Implements edm::EDAnalyzer.
Definition at line 83 of file MCAcceptanceAnalyzer.cc.
References gather_cfg::cout, reco::Candidate::daughter(), reco::Candidate::eta(), edm::Event::getByToken(), 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, zToMuMuMatchedToken_, zToMuMuMCToken_, and zToMuMuToken_.
91 long nZToMuMuMC = zToMuMuMC->size();
92 long nZToMuMuMatched = zToMuMuMatched->size();
102 for(
long i = 0;
i < nZToMuMuMC; ++
i) {
110 for(
long i = 0;
i < nZToMuMuMatched; ++
i) {
126 int selectMC =
select_(*mcRef);
130 if(selectZ != selectMC) {
131 cout <<
">>> select reco: " << selectZ <<
", select mc: " << selectMC << endl;
132 if ((selectZ * selectMC) ==0 )
break;
135 if (mcRef->numberOfDaughters()>1){
138 double m = z.
mass(), mcm = (mcd0->
p4()+mcd1->p4()).mass();
139 cout <<
">>> reco pt1, eta1: " << d0->
pt() <<
", " << d0->
eta()
140 <<
", 2: " << d1->pt() <<
", " << d1->eta()
141 <<
", mass = " << m << endl;
142 cout <<
">>> mc pt1, eta1: " << mcd0->
pt() <<
", " << mcd0->
eta()
143 <<
", 2: " << mcd1->pt() <<
", " << mcd1->eta()
144 <<
", mass = " << mcm << endl;
150 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_
EDGetTokenT< GenParticleMatch > zToMuMuMatchedToken_
EDGetTokenT< CandidateView > zToMuMuToken_
virtual float mass() const =0
mass
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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
const Candidate * mcMuDaughter(const Candidate *c)
EDGetTokenT< CandidateView > zToMuMuMCToken_
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector