27 #include "Math/GenVector/VectorUtil.h" 28 #include "Math/GenVector/PxPyPzE4D.h" 36 nEvents_(0), nAccepted_(0)
43 if ( LeptonType_ !=
"electron" && LeptonType_ !=
"muon" )
45 <<
"unknown lepton type !!";
56 if ( MinNLeptonJet_ < 1 )
58 <<
"MinimunNCaloJet < 1 !!";
83 if ( CaloJetsHandle->empty() )
return false;
85 std::stable_sort( TheCaloJets.begin(), TheCaloJets.end(),
PtSorter() );
101 TheMuons = *MuonHandle;
102 std::stable_sort( TheMuons.begin(), TheMuons.end(),
PtSorter() );
117 TheElectrons = *ElectronHandle;
118 std::stable_sort( TheElectrons.begin(), TheElectrons.end(),
PtSorter() );
123 for ( CaloJetCollection::const_iterator ajet = TheCaloJets.begin(); ajet != TheCaloJets.end(); ++ajet ) {
128 for ( MuonCollection::const_iterator amuon = TheMuons.begin(); amuon != TheMuons.end(); ++amuon ) {
135 TVector3 jetvec(ajet->p4().Vect().X(),
136 ajet->p4().Vect().Y(),
137 ajet->p4().Vect().Z() );
138 TVector3 muvec( amuon->momentum().X(),
139 amuon->momentum().Y(),
140 amuon->momentum().Z() );
142 double ptrel = muvec.Perp(jetvec);
151 for ( GsfElectronCollection::const_iterator anelectron = TheElectrons.begin(); anelectron != TheElectrons.end(); anelectron++ ) {
155 anelectron->momentum() );
157 TVector3 jetvec(ajet->p4().Vect().X(),
158 ajet->p4().Vect().Y(),
159 ajet->p4().Vect().Z() );
160 TVector3 evec( anelectron->momentum().X(),
161 anelectron->momentum().Y(),
162 anelectron->momentum().Z() );
164 double ptrel = evec.Perp(jetvec);
187 <<
"=============================================================================\n" 191 <<
"\n===========================================================================" T getParameter(std::string const &) const
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< Muon > MuonCollection
collection of Muon objects
#define DEFINE_FWK_MODULE(type)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects