Implements edm::EDAnalyzer.
Definition at line 77 of file MCAcceptanceAnalyzer.cc.
References gather_cfg::cout, reco::Candidate::daughter(), reco::Candidate::eta(), edm::Event::getByLabel(), i, edm::Ref< C, T, F >::isNonnull(), m, reco::Candidate::mass(), mcMuDaughter(), reco::Candidate::numberOfDaughters(), nZToMuMu_, nZToMuMuMC_, nZToMuMuMCDen_, nZToMuMuMCMatched_, reco::Candidate::p4(), reco::Candidate::pt(), select_, select_OnlyMassCut_, selZToMuMu_, selZToMuMuMC_, selZToMuMuMCMatched_, detailsBasic3DVector::z, zToMuMu_, zToMuMuMatched_, and zToMuMuMC_.
85 long nZToMuMuMC = zToMuMuMC->size();
86 long nZToMuMuMatched = zToMuMuMatched->size();
96 for(
long i = 0;
i < nZToMuMuMC; ++
i) {
104 for(
long i = 0;
i < nZToMuMuMatched; ++
i) {
120 int selectMC =
select_(*mcRef);
124 if(selectZ != selectMC) {
125 cout <<
">>> select reco: " << selectZ <<
", select mc: " << selectMC << endl;
126 if ((selectZ * selectMC) ==0 )
break;
129 if (mcRef->numberOfDaughters()>1){
132 double m = z.
mass(), mcm = (mcd0->
p4()+mcd1->p4()).mass();
133 cout <<
">>> reco pt1, eta1: " << d0->
pt() <<
", " << d0->
eta()
134 <<
", 2: " << d1->pt() <<
", " << d1->eta()
135 <<
", mass = " << m << endl;
136 cout <<
">>> mc pt1, eta1: " << mcd0->
pt() <<
", " << mcd0->
eta()
137 <<
", 2: " << mcd1->pt() <<
", " << mcd1->eta()
138 <<
", mass = " << mcm << endl;
144 if ((selectZ==3) && (selectMC==3))
break;
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
long selZToMuMuMCMatched_
virtual float mass() const =0
mass
virtual float eta() const =0
momentum pseudorapidity
ZSelector select_OnlyMassCut_
bool isNonnull() const
Checks for non-null.
virtual size_type numberOfDaughters() const =0
number of daughters
virtual float pt() const =0
transverse momentum
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const Candidate * mcMuDaughter(const Candidate *c)
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector