1 #include "CmsLikeJetEfficiency.h"
2 #include "generator/pythia6.h"
4 #include "PythiaJetGun.hh"
10 CmsLikeJetEfficiency::CmsLikeJetEfficiency(
11 const double i_minTrackPt,
12 const double i_minNeutralHadronPt,
13 const double i_minPhotonPt ,
14 const double i_trackingEfficiencyInJets)
15 : m_minTrackPt(i_minTrackPt),
17 m_minNeutralHadronPt(i_minNeutralHadronPt),
19 m_minPhotonPt(i_minPhotonPt),
21 m_trackingEfficiencyInJets(i_trackingEfficiencyInJets),
24 m_klong_mass = pymass(CODE_KLONG);
27 void CmsLikeJetEfficiency::processPhoton(
28 const PseudoJet& in,
const StabilityUserInfo &info, ParticleCollection* out
31 if ( in.pt() >= m_minPhotonPt && fabs(in.eta()) < m_photoRap ) {
33 m_friendInfo->push_back( info );
37 void CmsLikeJetEfficiency::processTrack(
38 const PseudoJet& in,
const StabilityUserInfo &info, ParticleCollection* out
41 if ( in.pt() >= m_minTrackPt && fabs(in.eta()) < m_trackRap )
44 const double rnd = PythiaJetGun::pyrandom();
45 if (rnd > m_trackingEfficiencyInJets) {
47 PseudoJet part(in.px(),in.py(),in.pz(),in.E());
50 out->push_back( part );
51 m_friendInfo->push_back( StabilityUserInfo(CODE_KLONG,m_klong_mass) );
55 m_friendInfo->push_back( info );
59 void CmsLikeJetEfficiency::processNeutralHadron(
60 const PseudoJet& in,
const StabilityUserInfo &info, ParticleCollection* out
63 if ( in.pt() >= m_minNeutralHadronPt && fabs(in.eta()) < m_hadRap )
65 m_friendInfo->push_back(info);