9 #include <HepMC/GenEvent.h>
12 #include <fastjet/JetDefinition.hh>
13 #include <fastjet/PseudoJet.hh>
14 #include <fastjet/ClusterSequence.hh>
15 #include <fastjet/SISConePlugin.hh>
38 std::vector<fastjet::PseudoJet> pseudojets;
39 for ( HepMC::GenEvent::particle_const_iterator
p
40 = evt->particles_begin();
p != evt->particles_end(); ++
p ){
43 if ( ((*p)->status()!=1) != 0)
continue;
51 if ((abs(((*p)->pdg_id())) >= 12) && (abs(((*p)->pdg_id())) <= 16))
continue;
54 if (((*p)->momentum().px() == 0.0) && ((*p)->momentum().py() == 0.0))
continue;
55 if ( (((*p)->momentum().pseudoRapidity()) <
_theEtaLow) ||
56 (((*p)->momentum().pseudoRapidity()) >
_theEtaHigh))
continue;
59 fastjet::PseudoJet pseudojet ((*p)->momentum().px(),
60 (*p)->momentum().py(),
61 (*p)->momentum().pz(),
62 (*p)->momentum().e());
63 pseudojet.set_user_index(idx);
64 pseudojets.push_back(pseudojet);
71 fastjet::ClusterSequence jetFinder(pseudojets,*jetdef);
72 std::vector<fastjet::PseudoJet> fastjets = jetFinder.inclusive_jets();
75 bool jetFound =
false;
77 for (
unsigned int ijet = 0; ijet < fastjets.size(); ++ijet) {
79 const double pt = sqrt(pow(fastjets[ijet].px(),2) + pow(fastjets[ijet].py(),2));
81 if (pt > max_pt) max_pt =
pt;
90 cout <<
"PHPy6JetTrigger::Apply - max_pt = "<<max_pt<<
", and jetFound = "<<jetFound<<endl;
117 cout <<
"---------------- PHPy6JetTrigger::PrintConfig --------------------" << endl;
120 cout <<
" Minimum Jet pT: " <<
_minPt <<
" GeV/c" << endl;
121 cout <<
" Anti-kT Radius: " <<
_R << endl;
122 cout <<
"-----------------------------------------------------------------------" << endl;