64 |
|
|
65 |
|
if (debug_) std::cout << "* nMC = " << lNMC << std::endl; |
66 |
|
|
67 |
< |
//loop on MC part to find b and bbar initial particles. |
67 |
> |
//loop on MC part to find any initial partons. |
68 |
|
for (unsigned int imc(0); imc < lNMC; imc++){//loop on MC particles |
69 |
|
const reco::GenParticle & lPart = (*aGenParticles).at(imc); |
70 |
|
//break loop if W events |
76 |
|
abs(lPart.pdgId()) == 16 ) ) { |
77 |
|
isW = true; |
78 |
|
nWEvts_++; |
79 |
< |
if (!isZ) break; |
79 |
> |
//if (!isZ) break; |
80 |
|
} |
81 |
|
//record when Z event |
82 |
|
if ( lPart.status() == 3 && lPart.numberOfMothers() > 1 && |
90 |
|
//looking for the final-states partons, which will have 2 parents being the 2 initial states partons. |
91 |
|
if (lPart.status() == 3 && lPart.numberOfMothers() > 1 && |
92 |
|
( ( flavour_ == 45 && (abs(lPart.pdgId()) == 4 || abs(lPart.pdgId()) == 5) ) || |
93 |
< |
( flavour_ > 3 && flavour_ < 22 && abs(lPart.pdgId()) == flavour_) || |
94 |
< |
( flavour_ == 3 && ( (abs(lPart.pdgId()) <= flavour_ || |
93 |
> |
( flavour_ > 3 && flavour_ < 22 && static_cast<unsigned int>(abs(lPart.pdgId())) == flavour_) || |
94 |
> |
( flavour_ == 3 && ( (static_cast<unsigned int>(abs(lPart.pdgId())) <= flavour_ || |
95 |
|
lPart.pdgId() == 21) |
96 |
|
) |
97 |
|
) |
114 |
|
}//loop on MC particles |
115 |
|
|
116 |
|
//if (isW == isZ) std::cout << "*** WARNING *** isW = " << isW << ", isZ = " << isZ << std::endl; |
117 |
< |
if ((flavour_ > 3 && flavour_ != 21) && !isZ) return 0; |
117 |
> |
//if ((flavour_ > 3 && flavour_ != 21) && !isZ) return 0; |
118 |
|
|
119 |
|
if (debug_) { |
120 |
|
std::cout << "nQuarks = " << n_quarks << ", n_antiQuarks = " << n_antiquarks << std::endl; |
264 |
|
}//for b and c jets |
265 |
|
|
266 |
|
|
267 |
< |
if (parents[ip].size() > 250) std::cout << "WARNING ! Initial default size of parents not sufficient = " << parents[ip].size() << std::endl; |
268 |
< |
if (daughters[ip].size() > 250) std::cout << "WARNING ! Initial default size of daughters not sufficient = " << daughters[ip].size() << std::endl; |
267 |
> |
if (parents[ip].size() > 500) std::cout << "WARNING ! Initial default size of parents not sufficient = " << parents[ip].size() << std::endl; |
268 |
> |
if (daughters[ip].size() > 500) std::cout << "WARNING ! Initial default size of daughters not sufficient = " << daughters[ip].size() << std::endl; |
269 |
|
|
270 |
|
|
271 |
|
}//loop on partons |
317 |
|
}//fillPartons |
318 |
|
|
319 |
|
|
320 |
< |
std::pair<int,unsigned int> JetFlavour::partonMatchingGenJet(const pat::Jet & aJet, const edm::Handle<reco::GenParticleCollection> & aGenParticles, double aDR){//parton match with gen jet |
320 |
> |
const std::pair<int,unsigned int> JetFlavour::partonMatchingGenJet(const pat::Jet & aJet, const edm::Handle<reco::GenParticleCollection> & aGenParticles, const double aDR) const{//parton match with gen jet |
321 |
|
|
322 |
|
int aIndex = -1; |
323 |
|
double deltaRMin = 1000; |
337 |
|
|
338 |
|
}//parton match with gen jet |
339 |
|
|
340 |
< |
unsigned int JetFlavour::leptonMatchingGenJet(const pat::Jet & aJet, const edm::Handle<reco::GenParticleCollection> & aGenParticles, double aDR){//lepton match with gen jet |
340 |
> |
const unsigned int JetFlavour::leptonMatchingGenJet(const pat::Jet & aJet, const edm::Handle<reco::GenParticleCollection> & aGenParticles, const double aDR) const{//lepton match with gen jet |
341 |
|
|
342 |
|
int aIndex = -1; |
343 |
|
double deltaRMin = 1000; |
373 |
|
|
374 |
|
}//lepton match with gen jet |
375 |
|
|
376 |
< |
unsigned int JetFlavour::partonMatchingRecoJet(const pat::Jet & aJet, const edm::Handle<reco::GenParticleCollection> & aGenParticles, double aDR){//parton match with reco jet |
376 |
> |
const unsigned int JetFlavour::partonMatchingRecoJet(const pat::Jet & aJet, const edm::Handle<reco::GenParticleCollection> & aGenParticles, const double aDR) const{//parton match with reco jet |
377 |
|
|
378 |
|
int aIndex = -1; |
379 |
|
double deltaRMin = 1000; |
391 |
|
|
392 |
|
}//parton match with reco jet |
393 |
|
|
394 |
< |
unsigned int JetFlavour::leptonMatchingRecoJet(const pat::Jet & aJet, const edm::Handle<reco::GenParticleCollection> & aGenParticles, double aDR){//lepton match with reco jet |
394 |
> |
const unsigned int JetFlavour::leptonMatchingRecoJet(const pat::Jet & aJet, const edm::Handle<reco::GenParticleCollection> & aGenParticles, const double aDR) const{//lepton match with reco jet |
395 |
|
|
396 |
|
int aIndex = -1; |
397 |
|
double deltaRMin = 1000; |
455 |
|
|
456 |
|
} |
457 |
|
|
458 |
< |
void JetFlavour::printSummary() { |
458 |
> |
void JetFlavour::printSummary() const{ |
459 |
|
|
460 |
|
std::cout << |
461 |
|
"=====================================================================" << std::endl << |