33 zMuMu_( pset.getParameter<
InputTag>(
"zMuMu" ) ),
34 Muons_( pset.getParameter<
InputTag>(
"Muons" ) ),
35 MuonsMap_( pset.getParameter<
InputTag>(
"MuonsMap" ) ),
36 Tracks_( pset.getParameter<
InputTag>(
"Tracks" ) ),
37 TracksMap_( pset.getParameter<
InputTag>(
"TracksMap" ) ),
38 genParticles_( pset.getParameter<
InputTag>(
"genParticles" ) ),
39 StandAlone_( pset.getParameter<
InputTag>(
"StandAlone" ) ),
40 StandAloneMap_( pset.getParameter<
InputTag>(
"StandAloneMap" ) ),
41 etacut_( pset.getParameter<double>(
"etacut" ) ),
42 ptcut_( pset.getParameter<double>(
"ptcut" ) ),
43 deltaRStacut_( pset.getParameter<double>(
"deltaRStacut" ) )
46 nMuMC =0; nMureco =0; nTrk=0; nSta=0; nNotMuMatching =0 ;
53 event.getByLabel(zMuMu_, zMuMu);
57 event.getByLabel(Muons_, Muons);
60 event.getByLabel(Tracks_, Tracks);
63 event.getByLabel(StandAlone_, StandAlone);
66 event.getByLabel(MuonsMap_, MuonsMap);
69 event.getByLabel(TracksMap_, TracksMap);
72 event.getByLabel(StandAloneMap_, StandAloneMap);
75 event.getByLabel(genParticles_, genParticles);
78 for(
unsigned int k = 0;
k < genParticles->size();
k++ )
80 const Candidate & ZCand = (*genParticles)[
k ];
83 if (ZCand.
pdgId()==23&& status==3 )
105 if (muCandidate->
pdgId() == muCand2->
pdgId() )
112 double deltaR_Mu_Sta =0;
113 int nMurecoTemp = nMureco;
116 for(i = MuonsMap->begin(); i != MuonsMap->end(); i++ )
119 if ((muCand1 == &mc) && (mc.
pt()>ptcut_) && (
abs(mc.
eta()<etacut_)))
126 if (nMureco == nMurecoTemp )
133 for(l = TracksMap->begin(); l != TracksMap->end(); l++ )
136 if (( muCand1 == & Trkmc) && (Trkmc.
pt()>ptcut_) && (
abs(Trkmc.
eta()<etacut_)))
145 for(n = StandAloneMap->begin(); n != StandAloneMap->end(); n++ )
147 const Candidate & Stareco = * n ->
key, & Stamc = * n -> val;
148 if ((muCand1 == &Stamc ) && (Stamc.pt()>ptcut_) && (
abs(Stamc.eta()<etacut_)))
152 deltaR_Mu_Sta =
deltaR(Stareco, *muCand1);
159 if ((nSta == nStaTemp + 1) && (nTrk == nTrkTemp + 1 ) )
162 if ((deltaR_Mu_Sta< deltaRStacut_))
164 v_.push_back(deltaR_Mu_Sta) ;
165 cout <<
"Not matching from trk and sta matched to MC mu, to reconstruct a recoMU" << endl;
178 cout <<
"--- nMuMC == "<<nMuMC<<endl;
179 cout <<
"--- nMureco == "<<nMureco<<endl;
180 cout <<
"--- nSta == "<<nSta<<endl;
181 cout <<
"--- nTrk == "<<nTrk<<endl;
182 cout <<
"--- nNotMuMatching from a trk and sta matched to a Mu MC == "<<nNotMuMatching<<endl;
185 cout<<
" effMu == "<<(double) nMureco/nMuMC<<endl;
186 cout<<
" effTrk == "<< (double)(nTrk + nMureco) /nMuMC<<endl;
187 cout<<
" effSta == "<< (double)(nSta + nMureco) / nMuMC<<endl;
190 vector< int >::const_iterator
p2;
191 for (
unsigned int i =0 ;
i < v_.size(); ++
i )
193 cout<<
" delta R Mu Sta == "<< v_[
i]<<endl;
203 InputTag zMuMu_, Muons_, MuonsMap_, Tracks_, TracksMap_, genParticles_, StandAlone_,StandAloneMap_;
205 int nMuMC, nMureco,
nTrk, nSta, nNotMuMatching;
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual float eta() const =0
momentum pseudorapidity
MCEfficiencyAnalyzer(const edm::ParameterSet &pset)
virtual int status() const =0
status word
DEFINE_FWK_MODULE(HiMixingModule)
virtual size_type numberOfDaughters() const =0
number of daughters
virtual float pt() const =0
transverse momentum
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
double deltaR(double eta1, double eta2, double phi1, double phi2)
virtual int pdgId() const =0
PDG identifier.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple zMuMu
zMuMu vector of PSet is common to all categories except zMuTrk category