Definition at line 83 of file MCAcceptanceAnalyzer.cc.
References gather_cfg::cout, allConversions_cfi::d0, reco::Candidate::daughter(), reco::Candidate::eta(), edm::Event::getByToken(), mps_fire::i, edm::Ref< C, T, F >::isNonnull(), funct::m, ResonanceBuilder::mass, reco::Candidate::mass(), mcMuDaughter(), reco::Candidate::numberOfDaughters(), nZToMuMu_, nZToMuMuMC_, nZToMuMuMCDen_, nZToMuMuMCMatched_, reco::Candidate::p4(), reco::Candidate::pt(), edm::View< T >::refAt(), select_, select_OnlyMassCut_, selZToMuMu_, selZToMuMuMC_, selZToMuMuMCMatched_, edm::Association< C >::size(), edm::View< T >::size(), 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;
bool isNonnull() const
Checks for non-null.
long selZToMuMuMCMatched_
EDGetTokenT< GenParticleMatch > zToMuMuMatchedToken_
EDGetTokenT< CandidateView > zToMuMuToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
RefToBase< value_type > refAt(size_type i) const
ZSelector select_OnlyMassCut_
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
const Candidate * mcMuDaughter(const Candidate *c)
virtual double eta() const =0
momentum pseudorapidity
virtual double pt() const =0
transverse momentum
virtual double mass() const =0
mass
EDGetTokenT< CandidateView > zToMuMuMCToken_
virtual size_type numberOfDaughters() const =0
number of daughters