27 m_photonSrc = userCut_params.
getParameter<
string>(
"photons");
28 m_photonProducerSrc = userCut_params.
getParameter<
string>(
"photonProducer");
32 reco_metMin = userCut_params.
getParameter<
double>(
"reco_metMin") ;
33 reco_ptJet1Min = userCut_params.
getParameter<
double>(
"reco_ptJet1Min");
34 reco_ptJet2Min = userCut_params.
getParameter<
double>(
"reco_ptJet2Min");
35 reco_ptElecMin = userCut_params.
getParameter<
double>(
"reco_ptElecMin");
36 reco_ptMuonMin = userCut_params.
getParameter<
double>(
"reco_ptMuonMin");
37 reco_ptPhotMin = userCut_params.
getParameter<
double>(
"reco_ptPhotMin");
40 edm::LogInfo(
"RecoSelectorParameters") <<
"UserAnalysis parameters for " <<
name <<
" selection:" << endl;
41 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_metMin = " << reco_metMin << endl;
42 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptJet1Min = " << reco_ptJet1Min << endl;
43 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptJet2Min = " << reco_ptJet2Min << endl;
44 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptElecMin = " << reco_ptElecMin << endl;
45 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptMuonMin = " << reco_ptMuonMin << endl;
46 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptPhotMin = " << reco_ptPhotMin << endl;
56 this->handleObjects(iEvent);
59 bool TotalCutPassed =
false;
61 bool ElectronCutPassed =
false;
62 for(
unsigned int i=0;
i<theElectronCollection->size();
i++) {
66 float elpt = electron.
pt() * elenergy / electron.
p();
67 if(elpt>reco_ptElecMin) ElectronCutPassed =
true;
68 LogDebug(
"RecoSelectorCuts") <<
"elpt = " << elpt << endl;
73 ElectronCutPassed =
false;
77 bool MuonCutPassed =
false;
78 for(
unsigned int i=0;
i<theMuonCollection->size();
i++) {
80 float muonpt = muon.
pt();
81 if(muonpt>reco_ptMuonMin) MuonCutPassed =
true;
82 LogDebug(
"RecoSelectorCuts") <<
"muonpt = " << muonpt << endl;
85 bool PhotonCutPassed =
false;
86 for(
unsigned int i=0;
i<thePhotonCollection->size();
i++) {
87 Photon photon = (*thePhotonCollection)[
i];
88 float photonpt = photon.
pt();
89 if(photonpt>reco_ptPhotMin) PhotonCutPassed =
true;
90 LogDebug(
"RecoSelectorCuts") <<
"photonpt = " << photonpt << endl;
94 bool JetCutPassed =
false;
95 if(theCaloJetCollection->size()>1) {
96 if((*theCaloJetCollection)[0].pt() > reco_ptJet1Min &&
97 (*theCaloJetCollection)[1].pt() > reco_ptJet2Min ) JetCutPassed =
true;
100 bool MetCutPassed =
false;
101 const CaloMET theCaloMET = theCaloMETCollection->front();
102 float calomet = theCaloMET.
pt();
103 LogDebug(
"RecoSelectorCuts") <<
"calomet = " << calomet << endl;
104 if(calomet > reco_metMin) MetCutPassed =
true;
106 edm::LogInfo(
"RecoSelectorPassed") <<
"ElectronCutPassed = " << (int)ElectronCutPassed << endl;
107 edm::LogInfo(
"RecoSelectorPassed") <<
"MuonCutPassed = " << (int)MuonCutPassed << endl;
108 edm::LogInfo(
"RecoSelectorPassed") <<
"PhotonCutPassed = " << (int)PhotonCutPassed << endl;
109 edm::LogInfo(
"RecoSelectorPassed") <<
"JetCutPassed = " << (int)JetCutPassed << endl;
110 edm::LogInfo(
"RecoSelectorPassed") <<
"MetCutPassed = " << (int)MetCutPassed << endl;
114 (ElectronCutPassed || MuonCutPassed) &&
117 MetCutPassed ) TotalCutPassed =
true;
119 return TotalCutPassed;
127 iEvent.
getByToken(m_electronSrc, theElectronCollectionHandle);
128 theElectronCollection = theElectronCollectionHandle.
product();
132 iEvent.
getByToken(m_muonSrc, theMuonCollectionHandle);
133 theMuonCollection = theMuonCollectionHandle.
product();
137 iEvent.
getByToken(m_photon_token_, thePhotonCollectionHandle);
138 thePhotonCollection = thePhotonCollectionHandle.
product();
142 iEvent.
getByToken(m_jetsSrc, theCaloJetCollectionHandle);
143 theCaloJetCollection = theCaloJetCollectionHandle.
product();
147 iEvent.
getByToken(m_calometSrc, theCaloMETCollectionHandle);
148 theCaloMETCollection = theCaloMETCollectionHandle.
product();
T getParameter(std::string const &) const
virtual double p() const
magnitude of momentum vector
virtual float pt() const
transverse momentum
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< Muon > MuonCollection
collection of Muon objects
void handleObjects(const edm::Event &)
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
bool isSelected(const edm::Event &)
RecoSelector(const edm::ParameterSet &userCut_params, edm::ConsumesCollector &&iC)
std::vector< Photon > PhotonCollection
collectin of Photon objects
T const * product() const
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
bool ecalDrivenSeed() const