24 m_electronSrc = userCut_params.
getParameter<
string>(
"electrons");
25 m_muonSrc = userCut_params.
getParameter<
string>(
"muons");
27 m_photonProducerSrc = userCut_params.
getParameter<
string>(
"photonProducer");
28 m_photonSrc = userCut_params.
getParameter<
string>(
"photons");
29 m_calometSrc = userCut_params.
getParameter<
string>(
"calomet");
31 reco_metMin = userCut_params.
getParameter<
double>(
"reco_metMin") ;
32 reco_ptJet1Min = userCut_params.
getParameter<
double>(
"reco_ptJet1Min");
33 reco_ptJet2Min = userCut_params.
getParameter<
double>(
"reco_ptJet2Min");
34 reco_ptElecMin = userCut_params.
getParameter<
double>(
"reco_ptElecMin");
35 reco_ptMuonMin = userCut_params.
getParameter<
double>(
"reco_ptMuonMin");
36 reco_ptPhotMin = userCut_params.
getParameter<
double>(
"reco_ptPhotMin");
39 edm::LogInfo(
"RecoSelectorParameters") <<
"UserAnalysis parameters for " <<
name <<
" selection:" << endl;
40 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_metMin = " << reco_metMin << endl;
41 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptJet1Min = " << reco_ptJet1Min << endl;
42 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptJet2Min = " << reco_ptJet2Min << endl;
43 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptElecMin = " << reco_ptElecMin << endl;
44 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptMuonMin = " << reco_ptMuonMin << endl;
45 edm::LogInfo(
"RecoSelectorParameters") <<
" reco_ptPhotMin = " << reco_ptPhotMin << endl;
55 this->handleObjects(iEvent);
58 bool TotalCutPassed =
false;
60 bool ElectronCutPassed =
false;
61 for(
unsigned int i=0;
i<theElectronCollection->size();
i++) {
65 float elpt = electron.
pt() * elenergy / electron.
p();
66 if(elpt>reco_ptElecMin) ElectronCutPassed =
true;
67 LogDebug(
"RecoSelectorCuts") <<
"elpt = " << elpt << endl;
72 ElectronCutPassed =
false;
76 bool MuonCutPassed =
false;
77 for(
unsigned int i=0;
i<theMuonCollection->size();
i++) {
79 float muonpt = muon.
pt();
80 if(muonpt>reco_ptMuonMin) MuonCutPassed =
true;
81 LogDebug(
"RecoSelectorCuts") <<
"muonpt = " << muonpt << endl;
84 bool PhotonCutPassed =
false;
85 for(
unsigned int i=0;
i<thePhotonCollection->size();
i++) {
86 Photon photon = (*thePhotonCollection)[
i];
87 float photonpt = photon.
pt();
88 if(photonpt>reco_ptPhotMin) PhotonCutPassed =
true;
89 LogDebug(
"RecoSelectorCuts") <<
"photonpt = " << photonpt << endl;
93 bool JetCutPassed =
false;
94 if(theCaloJetCollection->size()>1) {
95 if((*theCaloJetCollection)[0].pt() > reco_ptJet1Min &&
96 (*theCaloJetCollection)[1].pt() > reco_ptJet2Min ) JetCutPassed =
true;
99 bool MetCutPassed =
false;
100 const CaloMET theCaloMET = theCaloMETCollection->front();
101 float calomet = theCaloMET.
pt();
102 LogDebug(
"RecoSelectorCuts") <<
"calomet = " << calomet << endl;
103 if(calomet > reco_metMin) MetCutPassed =
true;
105 edm::LogInfo(
"RecoSelectorPassed") <<
"ElectronCutPassed = " << (int)ElectronCutPassed << endl;
106 edm::LogInfo(
"RecoSelectorPassed") <<
"MuonCutPassed = " << (int)MuonCutPassed << endl;
107 edm::LogInfo(
"RecoSelectorPassed") <<
"PhotonCutPassed = " << (int)PhotonCutPassed << endl;
108 edm::LogInfo(
"RecoSelectorPassed") <<
"JetCutPassed = " << (int)JetCutPassed << endl;
109 edm::LogInfo(
"RecoSelectorPassed") <<
"MetCutPassed = " << (int)MetCutPassed << endl;
113 (ElectronCutPassed || MuonCutPassed) &&
116 MetCutPassed ) TotalCutPassed =
true;
118 return TotalCutPassed;
126 iEvent.
getByLabel(m_electronSrc, theElectronCollectionHandle);
127 theElectronCollection = theElectronCollectionHandle.
product();
131 iEvent.
getByLabel(m_muonSrc, theMuonCollectionHandle);
132 theMuonCollection = theMuonCollectionHandle.
product();
136 iEvent.
getByLabel(m_photonProducerSrc, m_photonSrc, thePhotonCollectionHandle);
137 thePhotonCollection = thePhotonCollectionHandle.
product();
141 iEvent.
getByLabel(m_jetsSrc, theCaloJetCollectionHandle);
142 theCaloJetCollection = theCaloJetCollectionHandle.
product();
146 iEvent.
getByLabel(m_calometSrc, theCaloMETCollectionHandle);
147 theCaloMETCollection = theCaloMETCollectionHandle.
product();
T getParameter(std::string const &) const
RecoSelector(edm::ParameterSet userCut_params)
virtual double p() const
magnitude of momentum vector
void handleObjects(const edm::Event &)
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool isSelected(const edm::Event &)
virtual double pt() const
transverse momentum
T const * product() const
bool ecalDrivenSeed() const