1#ifndef COSMICGENERATOR_COSMICEVENTPARSER_H
2#define COSMICGENERATOR_COSMICEVENTPARSER_H
5#include "CLHEP/Vector/ThreeVector.h"
11 const HepLorentzVector&
Vertex(
void){
return m_vertex;}
12 const HepLorentzVector&
Momentum(
void){
return m_momentum;}
13 int pdgID(
void){
return m_pdgId;}
15 HepLorentzVector m_vertex;
16 HepLorentzVector m_momentum;
19 std::istream& read(std::istream& is);
20 std::ostream& write(std::ostream& os)
const;
35std::istream& CosmicEventParser::read(std::istream& is)
41 is >> m_eventNumber >> dummy >>
id >> v_x >> v_y >> v_z >> mom;
57 m_vertex.setVect(vert);
61 m_momentum.setVect(mom);
62 double energy = sqrt(pow(105.66,2)+mom.mag2());
65 if(
id == 5) m_pdgId = 13;
72std::ostream& CosmicEventParser::write(std::ostream& os)
const
76 if(m_pdgId == -13)
id = 6;
77 os << m_eventNumber <<
" " << dummy <<
" " <<
id <<
" "
78 << m_vertex.x() <<
" " << m_vertex.y() <<
" " << m_vertex.z() <<
" "
79 << m_momentum.x() <<
" " << m_momentum.y() <<
" " << 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)