75 std::list<const HepMC::GenParticle *> seeds;
78 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
p != myGenEvent->particles_end(); ++
p ) {
80 if ( (*p)->pdg_id()==22 && (*p)->status()==1
81 && (*p)->momentum().perp() >
ptSeed 86 seeds.sort(ParticlePtGreater());
95 for(std::list<const HepMC::GenParticle *>::const_iterator is=
96 seeds.begin(); is!=seeds.end(); is++){
98 double etaPhoton=(*is)->momentum().eta();
99 double phiPhoton=(*is)->momentum().phi();
109 HepMC::GenEvent::particle_const_iterator ppp = myGenEvent->particles_begin();
110 for(
int i=0;
i<6;++
i) ppp++;
116 particle7->momentum().phi()));
118 particle8->momentum().phi()));
136 if(jetline==8) etaJet = particle8->momentum().eta();
137 else etaJet = particle7->momentum().eta();
145 if (etaPhoton<eta1 ||etaPhoton>eta2) {
154 tgx=(*is)->momentum().px()/(*is)->momentum().pz();
155 tgy=(*is)->momentum().py()/(*is)->momentum().pz();
159 double etPhotonCharged=0;
161 double etConeCharged=0;
162 double ptMaxHadron=0;
165 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
p != myGenEvent->particles_end(); ++
p ) {
167 if ( (*p)->status()!=1 )
continue;
168 int pid= (*p)->pdg_id();
170 if (apid>11 && apid<21)
continue;
171 double eta=(*p)->momentum().eta();
172 double phi=(*p)->momentum().phi();
174 double pt=(*p)->momentum().perp();
184 int charge3 = ((pdt->particle((*p)->pdg_id()))->ID().threeCharge());
188 if(charge3 && pt<2) etConeCharged+=
pt;
195 else if(
std::abs((*p)->momentum().px()/(*p)->momentum().pz() - tgx)
197 std::abs((*p)->momentum().py()/(*p)->momentum().pz() - tgy)
201 if(charge3 && pt<2) etPhotonCharged+=
pt;
202 if(apid>100 && apid!=310 && pt>ptMaxHadron) ptMaxHadron=
pt;
207 if(etPhoton<ptMin ||etPhoton>
ptMax) {
214 double isocut2 = 3+etPhoton/20-etPhoton*etPhoton*etPhoton/1e6;
215 double isocut3 = 4.5+etPhoton/40;
219 isocut2 = 3.+165./20.-165.*165.*165./1e6;
220 isocut3 = 4.5+165./40.;
227 if(etCone-etPhoton> 5+etPhoton/20-etPhoton*etPhoton/1
e4)
continue;
229 if(etCone-etPhoton-(etConeCharged-etPhotonCharged) >
232 if(ptMaxHadron > isocut3)
continue;
edm::EDGetTokenT< edm::HepMCProduct > token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool getData(T &iHolder) const
Abs< T >::type abs(const T &t)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const HepMC::GenEvent * GetEvent() const
bool accepted(std::vector< std::string_view > const &, std::string_view)