1#ifndef COSMICGENERATOR_COSMICEVENTPARSER_H
2#define COSMICGENERATOR_COSMICEVENTPARSER_H
4#include "CLHEP/Vector/LorentzVector.h"
5#include "CLHEP/Vector/ThreeVector.h"
12 const HepLorentzVector&
Vertex(
void ) {
return m_vertex; }
13 const HepLorentzVector&
Momentum(
void ) {
return m_momentum; }
14 int pdgID(
void ) {
return m_pdgId; }
17 HepLorentzVector m_vertex;
18 HepLorentzVector m_momentum;
21 std::istream& read( std::istream& is );
22 std::ostream& write( std::ostream& os )
const;
31 return ev.write( os );
34inline std::istream& CosmicEventParser::read( std::istream& is ) {
39 is >> m_eventNumber >> dummy >>
id >> v_x >> v_y >> v_z >> mom;
54 m_vertex.setVect( vert );
57 m_momentum.setVect( mom );
58 double energy = sqrt( pow( 105.66, 2 ) + mom.mag2() );
61 if (
id == 5 ) m_pdgId = 13;
67inline std::ostream& CosmicEventParser::write( std::ostream& os )
const {
70 if ( m_pdgId == -13 )
id = 6;
71 os << m_eventNumber <<
" " << dummy <<
" " <<
id <<
" " << m_vertex.x() <<
" "
72 << m_vertex.y() <<
" " << m_vertex.z() <<
" " << m_momentum.x() <<
" " << m_momentum.y()
73 <<
" " << m_momentum.z();
std::ostream & operator<<(std::ostream &os, const CosmicEventParser &ev)
std::istream & operator>>(std::istream &is, CosmicEventParser &ev)
************Class m_ypar INTEGER m_KeyWgt INTEGER m_KeyIHVP INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
const HepLorentzVector & Vertex(void)
const HepLorentzVector & Momentum(void)
friend std::ostream & operator<<(std::ostream &os, const CosmicEventParser &ev)
friend std::istream & operator>>(std::istream &is, CosmicEventParser &ev)