37 |
|
phoLabel_(iConfig.getUntrackedParameter<edm::InputTag>("photonTag")), |
38 |
|
dimuLabel_(iConfig.getUntrackedParameter<edm::InputTag>("dimuTag")), |
39 |
|
dielecLabel_(iConfig.getUntrackedParameter<edm::InputTag>("dielecTag")), |
40 |
< |
hltResults_(iConfig.getUntrackedParameter<edm::InputTag>("hltResultsTag")){ |
40 |
> |
hltResults_(iConfig.getUntrackedParameter<edm::InputTag>("hltResultsTag")), |
41 |
> |
runOnMC_(iConfig.getParameter<bool>("runOnMC")) { |
42 |
> |
|
43 |
> |
|
44 |
|
// |
45 |
|
// put the setwhatproduced etc etc |
46 |
|
|
314 |
|
|
315 |
|
Handle<GenParticleCollection> genParticles; |
316 |
|
|
314 |
– |
bool isMC=1; |
317 |
|
bool printJet=0; |
318 |
|
|
319 |
|
|
320 |
< |
if(isMC){ |
320 |
> |
if(runOnMC_){ |
321 |
|
|
322 |
|
int Hin=-99,Win=-99,Zin=-99,bin=-99,bbarin=-99; |
323 |
|
|
529 |
|
|
530 |
|
Particle::LorentzVector p4Jet = jet_iter->p4(); |
531 |
|
|
532 |
< |
if(isMC){ |
532 |
> |
if(runOnMC_){ |
533 |
|
double minb1DR=9999.; |
534 |
|
for(size_t i = 0; i < genParticles->size(); ++ i) { |
535 |
|
const GenParticle & p = (*genParticles)[i]; |
537 |
|
if(abs(id)<=6 || id==21 || id==23 || abs(id)==24){ |
538 |
|
double bb1DR=TMath::Sqrt((p.eta()-p4Jet.eta())*(p.eta()-p4Jet.eta())+ |
539 |
|
(p.phi()-p4Jet.phi())*(p.phi()-p4Jet.phi())); |
540 |
< |
if(bb1DR<minb1DR) {minb1DR=bb1DR; sj.b1BestMCid=id; if(p.mother()!=0) sj.b1BestMCmomid=p.mother()->pdgId();} |
540 |
> |
if(bb1DR<minb1DR) {minb1DR=bb1DR; sj.bestMCid=id; if(p.mother()!=0) sj.bestMCmomid=p.mother()->pdgId();} |
541 |
|
} |
542 |
|
} |
543 |
|
} //isMC |
565 |
|
|
566 |
|
Particle::LorentzVector p4Jet = jet_iter->p4(); |
567 |
|
|
568 |
< |
if(isMC){ |
568 |
> |
if(runOnMC_){ |
569 |
|
double minb2DR=9999.; |
570 |
|
for(size_t i = 0; i < genParticles->size(); ++ i) { |
571 |
|
const GenParticle & p = (*genParticles)[i]; |
573 |
|
if(abs(id)<=6 || id==21 || id==23 || abs(id)==24){ |
574 |
|
double bb2DR=TMath::Sqrt((p.eta()-p4Jet.eta())*(p.eta()-p4Jet.eta())+ |
575 |
|
(p.phi()-p4Jet.phi())*(p.phi()-p4Jet.phi())); |
576 |
< |
if(bb2DR<minb2DR) {minb2DR=bb2DR; sj.b1BestMCid=id; if(p.mother()!=0) sj.b1BestMCmomid=p.mother()->pdgId();} |
576 |
> |
if(bb2DR<minb2DR) {minb2DR=bb2DR; sj.bestMCid=id; if(p.mother()!=0) sj.bestMCmomid=p.mother()->pdgId();} |
577 |
|
} |
578 |
|
} |
579 |
|
} //isMC |
739 |
|
|
740 |
|
// int muInfo[12]; |
741 |
|
// fillMuBlock(mu, muInfo); |
742 |
< |
if(isMC){ |
742 |
> |
if(runOnMC_){ |
743 |
|
const GenParticle* muMc = mu->genLepton(); |
744 |
|
if(muMc!=0){ |
745 |
|
mf.mcId=muMc->pdgId(); |
764 |
|
Geom::Phi<double> deltaphi(elec->superCluster()->phi()-atan2(hbbInfo->calomet.fourMomentum.Py(),hbbInfo->calomet.fourMomentum.Px())); |
765 |
|
ef.acop = deltaphi.value(); |
766 |
|
|
767 |
< |
if(isMC){ |
767 |
> |
if(runOnMC_){ |
768 |
|
const GenParticle* elecMc = elec->genLepton(); |
769 |
|
if(elecMc!=0){ |
770 |
|
ef.mcId=elecMc->pdgId(); |