39 |
|
fPileUpName (Names::gkPileupInfoBrn), |
40 |
|
fSuperClusterName ("PFSuperClusters"), |
41 |
|
fPFMetName ("PFMet"), |
42 |
+ |
fPFJetName (Names::gkPFJetBrn), |
43 |
|
|
44 |
|
|
45 |
|
fIsData (false), |
46 |
|
fPhotonsFromBranch (true), |
47 |
|
fPVFromBranch (true), |
48 |
|
fGoodElectronsFromBranch (kTRUE), |
49 |
+ |
fPFJetsFromBranch (kTRUE), |
50 |
|
|
51 |
|
// ---------------------------------------- |
52 |
|
// collections.... |
61 |
|
fMCParticles (0), |
62 |
|
fPileUp (0), |
63 |
|
fSuperClusters (0), |
64 |
+ |
fPFJets (0), |
65 |
|
|
66 |
|
fLoopOnGoodElectrons(kFALSE), |
67 |
|
fInvertElectronVeto(kFALSE), |
70 |
|
fWriteSingleTree(kTRUE), |
71 |
|
fExcludeSinglePrompt(kFALSE), |
72 |
|
fExcludeDoublePrompt(kFALSE), |
73 |
+ |
fEnableJets(kFALSE), |
74 |
|
fPhFixDataFile(gSystem->Getenv("CMSSW_BASE") + TString("/src/MitPhysics/data/PhotonFixSTART42V13.dat")), |
75 |
|
fTupleName ("hPhotonTree") |
76 |
|
|
111 |
|
LoadEventObject(fPFCandName, fPFCands); |
112 |
|
LoadEventObject(fSuperClusterName, fSuperClusters); |
113 |
|
LoadEventObject(fPFMetName, fPFMet); |
114 |
+ |
if (fEnableJets) LoadEventObject(fPFJetName, fPFJets); |
115 |
|
|
116 |
|
// ------------------------------------------------------------ |
117 |
|
// load event based information |
182 |
|
fDiphotonEvent->masscoreleerr = -99.; |
183 |
|
fDiphotonEvent->ismc = GetEventHeader()->IsMC(); |
184 |
|
|
185 |
+ |
//jets |
186 |
+ |
const Jet *jet1 = 0; |
187 |
+ |
const Jet *jet2 = 0; |
188 |
+ |
const Jet *jetcentral = 0; |
189 |
+ |
|
190 |
+ |
fDiphotonEvent->jet1pt = -99.; |
191 |
+ |
fDiphotonEvent->jet1eta = -99.; |
192 |
+ |
fDiphotonEvent->jet1phi = -99.; |
193 |
+ |
fDiphotonEvent->jet1mass = -99.; |
194 |
+ |
fDiphotonEvent->jet2pt = -99.; |
195 |
+ |
fDiphotonEvent->jet2eta = -99.; |
196 |
+ |
fDiphotonEvent->jet2phi = -99.; |
197 |
+ |
fDiphotonEvent->jet2mass = -99.; |
198 |
+ |
fDiphotonEvent->jetcentralpt = -99.; |
199 |
+ |
fDiphotonEvent->jetcentraleta = -99.; |
200 |
+ |
fDiphotonEvent->jetcentralphi = -99.; |
201 |
+ |
fDiphotonEvent->jetcentralmass = -99.; |
202 |
+ |
fDiphotonEvent->dijetpt = -99.; |
203 |
+ |
fDiphotonEvent->dijeteta = -99.; |
204 |
+ |
fDiphotonEvent->dijetphi = -99.; |
205 |
+ |
fDiphotonEvent->dijetmass = -99.; |
206 |
+ |
fDiphotonEvent->jetetaplus = -99.; |
207 |
+ |
fDiphotonEvent->jetetaminus = -99.; |
208 |
+ |
fDiphotonEvent->zeppenfeld = -99.; |
209 |
+ |
fDiphotonEvent->dphidijetgg = -99.; |
210 |
+ |
|
211 |
|
Int_t nhitsbeforevtxmax = 1; |
212 |
|
if (fInvertElectronVeto) nhitsbeforevtxmax = 999; |
213 |
|
|
256 |
|
phgen2 = PhotonTools::MatchMC(p2,fMCParticles,fInvertElectronVeto); |
257 |
|
} |
258 |
|
|
259 |
+ |
/* if (phgen1 && phgen2) { |
260 |
+ |
printf("p1 pt = %5f, eta = %5f, phi = %5f\n",p1->Pt(),p1->Eta(),p1->Phi()); |
261 |
+ |
printf("p2 pt = %5f, eta = %5f, phi = %5f\n",p2->Pt(),p2->Eta(),p2->Phi()); |
262 |
+ |
printf("phgen1 pt = %5f, eta = %5f, phi = %5f, pdg = %i, motherpdg = %i, distinctmotherpdg = %i, distinctmotherstatus = %i\n",phgen1->Pt(),phgen1->Eta(),phgen1->Phi(),phgen1->PdgId(),phgen1->Mother()->PdgId(),phgen1->DistinctMother()->PdgId(),phgen1->DistinctMother()->Status()); |
263 |
+ |
printf("phgen2 pt = %5f, eta = %5f, phi = %5f, pdg = %i, motherpdg = %i, distinctmotherpdg = %i, distinctmotherstatus = %i\n",phgen2->Pt(),phgen2->Eta(),phgen2->Phi(),phgen2->PdgId(),phgen2->Mother()->PdgId(),phgen2->DistinctMother()->PdgId(),phgen2->DistinctMother()->Status()); |
264 |
+ |
} */ |
265 |
+ |
|
266 |
+ |
|
267 |
|
if (fExcludeSinglePrompt && (phgen1 || phgen2) ) return; |
268 |
|
if (fExcludeDoublePrompt && (phgen1 && phgen2) ) return; |
269 |
|
|
274 |
|
fDiphotonEvent->vtxprob = phHard->VtxProb(); |
275 |
|
} |
276 |
|
|
277 |
+ |
//fill jet variables |
278 |
+ |
if (fEnableJets) { |
279 |
+ |
for (UInt_t ijet=0; ijet<fPFJets->GetEntries();++ijet) { |
280 |
+ |
const Jet *jet = fPFJets->At(ijet); |
281 |
+ |
if (jet->AbsEta()<4.7 && MathUtils::DeltaR(jet,p1)>0.3 && MathUtils::DeltaR(jet,p2)>0.3) { |
282 |
+ |
if (!jet1) jet1 = jet; |
283 |
+ |
else if (!jet2) jet2 = jet; |
284 |
+ |
else if (!jetcentral && 0) jetcentral = jet; |
285 |
+ |
} |
286 |
+ |
if (jet1&&jet2&&jetcentral) break; |
287 |
+ |
} |
288 |
+ |
} |
289 |
+ |
|
290 |
+ |
if (jet1) { |
291 |
+ |
fDiphotonEvent->jet1pt = jet1->Pt(); |
292 |
+ |
fDiphotonEvent->jet1eta = jet1->Eta(); |
293 |
+ |
fDiphotonEvent->jet1phi = jet1->Phi(); |
294 |
+ |
fDiphotonEvent->jet1mass = jet1->Mass(); |
295 |
+ |
} |
296 |
+ |
|
297 |
+ |
if (jet2) { |
298 |
+ |
fDiphotonEvent->jet2pt = jet2->Pt(); |
299 |
+ |
fDiphotonEvent->jet2eta = jet2->Eta(); |
300 |
+ |
fDiphotonEvent->jet2phi = jet2->Phi(); |
301 |
+ |
fDiphotonEvent->jet2mass = jet2->Mass(); |
302 |
+ |
} |
303 |
+ |
|
304 |
+ |
if (jetcentral) { |
305 |
+ |
fDiphotonEvent->jetcentralpt = jetcentral->Pt(); |
306 |
+ |
fDiphotonEvent->jetcentraleta = jetcentral->Eta(); |
307 |
+ |
fDiphotonEvent->jetcentralphi = jetcentral->Phi(); |
308 |
+ |
fDiphotonEvent->jetcentralmass = jetcentral->Mass(); |
309 |
+ |
} |
310 |
+ |
|
311 |
+ |
if (jet1&&jet2){ |
312 |
+ |
FourVectorM momjj = (jet1->Mom() + jet2->Mom()); |
313 |
+ |
|
314 |
+ |
fDiphotonEvent->dijetpt = momjj.Pt(); |
315 |
+ |
fDiphotonEvent->dijeteta = momjj.Eta(); |
316 |
+ |
fDiphotonEvent->dijetphi = momjj.Phi(); |
317 |
+ |
fDiphotonEvent->dijetmass = momjj.M(); |
318 |
+ |
|
319 |
+ |
if (jet1->Eta()>jet2->Eta()) { |
320 |
+ |
fDiphotonEvent->jetetaplus = jet1->Eta(); |
321 |
+ |
fDiphotonEvent->jetetaminus = jet2->Eta(); |
322 |
+ |
} |
323 |
+ |
else { |
324 |
+ |
fDiphotonEvent->jetetaplus = jet2->Eta(); |
325 |
+ |
fDiphotonEvent->jetetaminus = jet1->Eta(); |
326 |
+ |
} |
327 |
+ |
|
328 |
+ |
} |
329 |
+ |
|
330 |
+ |
|
331 |
+ |
|
332 |
|
Double_t _mass = -99.; |
333 |
|
Double_t _masserr = -99.; |
334 |
|
Double_t _masserrsmeared = -99.; |
335 |
|
Double_t _masserrwrongvtx = -99.; |
336 |
|
Double_t _masserrsmearedwrongvtx = -99.; |
337 |
|
Double_t _ptgg = -99.; |
338 |
+ |
Double_t _etagg = -99.; |
339 |
+ |
Double_t _phigg = -99.; |
340 |
|
Double_t _costheta = -99.; |
341 |
|
PhotonTools::DiphotonR9EtaPtCats _evtcat = PhotonTools::kOctCat0; |
342 |
|
if (phHard && phSoft) { |
344 |
|
_masserr = 0.5*_mass*TMath::Sqrt(phHard->EnergyErr()*phHard->EnergyErr()/phHard->E()/phHard->E() + phSoft->EnergyErr()*phSoft->EnergyErr()/phSoft->E()/phSoft->E()); |
345 |
|
_masserrsmeared = 0.5*_mass*TMath::Sqrt(phHard->EnergyErrSmeared()*phHard->EnergyErrSmeared()/phHard->E()/phHard->E() + phSoft->EnergyErrSmeared()*phSoft->EnergyErrSmeared()/phSoft->E()/phSoft->E()); |
346 |
|
_ptgg = (phHard->Mom()+phSoft->Mom()).Pt(); |
347 |
+ |
_etagg = (phHard->Mom()+phSoft->Mom()).Eta(); |
348 |
+ |
_phigg = (phHard->Mom()+phSoft->Mom()).Phi(); |
349 |
|
_costheta = ThreeVector(phHard->Mom()).Unit().Dot(ThreeVector(phSoft->Mom()).Unit()); |
350 |
|
_evtcat = PhotonTools::DiphotonR9EtaPtCat(phHard,phSoft); |
351 |
|
|
352 |
< |
const Double_t dz = 5.8; |
352 |
> |
const Double_t dz = sqrt(2.0)*5.8; |
353 |
|
Double_t deltamvtx = _mass*VertexTools::DeltaMassVtx(phHard->CaloPos().X(), phHard->CaloPos().Y(), phHard->CaloPos().Z(), |
354 |
|
phSoft->CaloPos().X(), phSoft->CaloPos().Y(), phSoft->CaloPos().Z(), |
355 |
|
dz); |
356 |
|
|
357 |
+ |
fDiphotonEvent->deltamvtx = deltamvtx; |
358 |
+ |
|
359 |
|
_masserrwrongvtx = TMath::Sqrt(_masserr*_masserr + deltamvtx*deltamvtx); |
360 |
|
_masserrsmearedwrongvtx = TMath::Sqrt(_masserrsmeared*_masserrsmeared + deltamvtx*deltamvtx); |
361 |
|
|
362 |
+ |
if (jet1 && jet2) { |
363 |
+ |
fDiphotonEvent->zeppenfeld = TMath::Abs(_etagg - 0.5*(jet1->Eta()+jet2->Eta())); |
364 |
+ |
fDiphotonEvent->dphidijetgg = MathUtils::DeltaPhi( (jet1->Mom()+jet2->Mom()).Phi(), _phigg ); |
365 |
+ |
} |
366 |
|
|
367 |
|
} |
368 |
|
|
388 |
|
fDiphotonEvent->masserrwrongvtx = _masserrwrongvtx; |
389 |
|
fDiphotonEvent->masserrsmearedwrongvtx = _masserrsmearedwrongvtx; |
390 |
|
fDiphotonEvent->ptgg = _ptgg; |
391 |
+ |
fDiphotonEvent->etagg = _etagg; |
392 |
+ |
fDiphotonEvent->phigg = _phigg; |
393 |
|
fDiphotonEvent->costheta = _costheta;; |
394 |
|
fDiphotonEvent->massele = _massele; |
395 |
|
fDiphotonEvent->ptee = _ptee; |
502 |
|
ReqEventObject(fPFCandName, fPFCands, true); |
503 |
|
ReqEventObject(fSuperClusterName, fSuperClusters, true); |
504 |
|
ReqEventObject(fPFMetName, fPFMet, true); |
505 |
+ |
if (fEnableJets) ReqEventObject(fPFJetName, fPFJets, fPFJetsFromBranch); |
506 |
|
|
507 |
|
if (!fIsData) { |
508 |
|
ReqBranch(fPileUpName, fPileUp); |
650 |
|
} |
651 |
|
} |
652 |
|
|
653 |
< |
// if (p && ele) { |
654 |
< |
// printf("p : r9 = %5f, e33 = %5f, e55 = %5f, hovere = %5f, sigieie = %5f\n",p->R9(),p->E33(),p->E55(),p->HadOverEm(),p->CoviEtaiEta()); |
655 |
< |
// printf("ele/b: r9 = %5f, e33 = %5f, e55 = %5f, hovere = %5f, sigieie = %5f\n",b->E3x3()/s->RawEnergy(),b->E3x3(),b->E5x5(),ele->HadronicOverEm(),ele->CoviEtaiEta()); |
656 |
< |
// } |
653 |
> |
const BasicCluster *bclast = 0; |
654 |
> |
Double_t ebcmin = 1e6; |
655 |
> |
for (UInt_t i=0; i<s->ClusterSize(); ++i) { |
656 |
> |
const BasicCluster *bc = s->Cluster(i); |
657 |
> |
if (bc->Energy() < ebcmin && bc !=b) { |
658 |
> |
bclast = bc; |
659 |
> |
ebcmin = bc->Energy(); |
660 |
> |
} |
661 |
> |
} |
662 |
> |
|
663 |
> |
const BasicCluster *bclast2 = 0; |
664 |
> |
ebcmin = 1e6; |
665 |
> |
for (UInt_t i=0; i<s->ClusterSize(); ++i) { |
666 |
> |
const BasicCluster *bc = s->Cluster(i); |
667 |
> |
if (bc->Energy() < ebcmin && bc !=b && bc!=bclast) { |
668 |
> |
bclast2 = bc; |
669 |
> |
ebcmin = bc->Energy(); |
670 |
> |
} |
671 |
> |
} |
672 |
> |
|
673 |
|
|
674 |
|
if (p) { |
675 |
|
hasphoton = kTRUE; |
686 |
|
eerr = p->EnergyErr(); |
687 |
|
eerrsmeared = p->EnergyErrSmeared(); |
688 |
|
esmearing = p->EnergySmearing(); |
689 |
+ |
idmva = p->IdMva(); |
690 |
+ |
hcalisodr03 = p->HcalTowerSumEtDr03(); |
691 |
+ |
ecalisodr03 = p->EcalRecHitIsoDr03(); |
692 |
+ |
trkisohollowdr03 = p->HollowConeTrkIsoDr03(); |
693 |
|
} |
694 |
|
else { |
695 |
|
hasphoton = kFALSE; |
706 |
|
eerr = -99.; |
707 |
|
eerrsmeared = -99.; |
708 |
|
esmearing = 0.; |
709 |
+ |
idmva = -99.; |
710 |
|
} |
711 |
|
|
712 |
|
|
723 |
|
isr9reco = (isbarrel && r9>0.94) || (!isbarrel && r9>0.95); |
724 |
|
isr9cat = (r9>0.94); |
725 |
|
|
598 |
– |
|
599 |
– |
|
600 |
– |
|
601 |
– |
sigiphiphi = TMath::Sqrt(b->CoviPhiiPhi()); |
602 |
– |
if (isnan(sigiphiphi)) sigiphiphi = -99.; |
603 |
– |
covietaiphi = b->CoviEtaiPhi(); |
604 |
– |
if (isnan(covietaiphi)) covietaiphi = -99.; |
605 |
– |
emax = b->EMax(); |
606 |
– |
e2nd = b->E2nd(); |
607 |
– |
etop = b->ETop(); |
608 |
– |
ebottom = b->EBottom(); |
609 |
– |
eleft = b->ELeft(); |
610 |
– |
eright = b->ERight(); |
611 |
– |
e1x3 = b->E1x3(); |
612 |
– |
e3x1 = b->E3x1(); |
613 |
– |
e1x5 = b->E1x5(); |
614 |
– |
e2x2 = b->E2x2(); |
615 |
– |
e4x4 = b->E4x4(); |
616 |
– |
e2x5max = b->E2x5Max(); |
617 |
– |
e2x5top = b->E2x5Top(); |
618 |
– |
e2x5bottom = b->E2x5Bottom(); |
619 |
– |
e2x5left = b->E2x5Left(); |
620 |
– |
e2x5right = b->E2x5Right(); |
621 |
– |
xseed = b->Pos().X(); |
622 |
– |
yseed = b->Pos().Y(); |
623 |
– |
zseed = b->Pos().Z(); |
624 |
– |
|
726 |
|
eseed = b->Energy(); |
727 |
|
etaseed = b->Eta(); |
728 |
|
phiseed = b->Phi(); |
736 |
|
ycryseed = b->YCry(); |
737 |
|
thetaaxisseed = b->ThetaAxis(); |
738 |
|
phiaxisseed = b->PhiAxis(); |
739 |
+ |
sigietaietaseed = TMath::Sqrt(b->CoviEtaiEta()); |
740 |
+ |
sigiphiphiseed = TMath::Sqrt(b->CoviPhiiPhi()); |
741 |
+ |
if (isnan(sigiphiphiseed)) sigiphiphiseed = -99.; |
742 |
+ |
covietaiphiseed = b->CoviEtaiPhi(); |
743 |
+ |
if (isnan(covietaiphiseed)) covietaiphiseed = -99.; |
744 |
+ |
e3x3seed = b->E3x3(); |
745 |
+ |
e5x5seed = b->E5x5(); |
746 |
+ |
emaxseed = b->EMax(); |
747 |
+ |
e2ndseed = b->E2nd(); |
748 |
+ |
etopseed = b->ETop(); |
749 |
+ |
ebottomseed = b->EBottom(); |
750 |
+ |
eleftseed = b->ELeft(); |
751 |
+ |
erightseed = b->ERight(); |
752 |
+ |
e1x3seed = b->E1x3(); |
753 |
+ |
e3x1seed = b->E3x1(); |
754 |
+ |
e1x5seed = b->E1x5(); |
755 |
+ |
e2x2seed = b->E2x2(); |
756 |
+ |
e4x4seed = b->E4x4(); |
757 |
+ |
e2x5maxseed = b->E2x5Max(); |
758 |
+ |
e2x5topseed = b->E2x5Top(); |
759 |
+ |
e2x5bottomseed = b->E2x5Bottom(); |
760 |
+ |
e2x5leftseed = b->E2x5Left(); |
761 |
+ |
e2x5rightseed = b->E2x5Right(); |
762 |
+ |
xseedseed = b->Pos().X(); |
763 |
+ |
yseedseed = b->Pos().Y(); |
764 |
+ |
zseedseed = b->Pos().Z(); |
765 |
+ |
nhitsseed = b->NHits(); |
766 |
+ |
|
767 |
|
|
768 |
|
if (b2) { |
769 |
|
ebc2 = b2->Energy(); |
778 |
|
xcrybc2 = b2->XCry(); |
779 |
|
ycrybc2 = b2->YCry(); |
780 |
|
thetaaxisbc2 = b2->ThetaAxis(); |
781 |
< |
phiaxisbc2 = b2->PhiAxis(); |
781 |
> |
phiaxisbc2 = b2->PhiAxis(); |
782 |
> |
sigietaietabc2 = TMath::Sqrt(b2->CoviEtaiEta()); |
783 |
> |
sigiphiphibc2 = TMath::Sqrt(b2->CoviPhiiPhi()); |
784 |
> |
if (isnan(sigiphiphibc2)) sigiphiphibc2 = -99.; |
785 |
> |
covietaiphibc2 = b2->CoviEtaiPhi(); |
786 |
> |
if (isnan(covietaiphibc2)) covietaiphibc2 = -99.; |
787 |
> |
e3x3bc2 = b2->E3x3(); |
788 |
> |
e5x5bc2 = b2->E5x5(); |
789 |
> |
emaxbc2 = b2->EMax(); |
790 |
> |
e2ndbc2 = b2->E2nd(); |
791 |
> |
etopbc2 = b2->ETop(); |
792 |
> |
ebottombc2 = b2->EBottom(); |
793 |
> |
eleftbc2 = b2->ELeft(); |
794 |
> |
erightbc2 = b2->ERight(); |
795 |
> |
e1x3bc2 = b2->E1x3(); |
796 |
> |
e3x1bc2 = b2->E3x1(); |
797 |
> |
e1x5bc2 = b2->E1x5(); |
798 |
> |
e2x2bc2 = b2->E2x2(); |
799 |
> |
e4x4bc2 = b2->E4x4(); |
800 |
> |
e2x5maxbc2 = b2->E2x5Max(); |
801 |
> |
e2x5topbc2 = b2->E2x5Top(); |
802 |
> |
e2x5bottombc2 = b2->E2x5Bottom(); |
803 |
> |
e2x5leftbc2 = b2->E2x5Left(); |
804 |
> |
e2x5rightbc2 = b2->E2x5Right(); |
805 |
> |
xbc2bc2 = b2->Pos().X(); |
806 |
> |
ybc2bc2 = b2->Pos().Y(); |
807 |
> |
zbc2bc2 = b2->Pos().Z(); |
808 |
> |
nhitsbc2= b2->NHits(); |
809 |
|
} |
810 |
|
else { |
811 |
< |
ebc2 = 0.; |
812 |
< |
etabc2 = 0.; |
813 |
< |
phibc2 = 0.; |
814 |
< |
ietabc2 = 0.; |
815 |
< |
iphibc2 = 0.; |
816 |
< |
ixbc2 = 0.; |
817 |
< |
iybc2 = 0.; |
818 |
< |
etacrybc2 = 0.; |
819 |
< |
phicrybc2 = 0.; |
820 |
< |
xcrybc2 = 0.; |
821 |
< |
ycrybc2 = 0.; |
822 |
< |
thetaaxisbc2 = 0.; |
823 |
< |
phiaxisbc2 = 0.; |
811 |
> |
ebc2 = 0; |
812 |
> |
etabc2 = 0; |
813 |
> |
phibc2 = 0; |
814 |
> |
ietabc2 = 0; |
815 |
> |
iphibc2 = 0; |
816 |
> |
ixbc2 = 0; |
817 |
> |
iybc2 = 0; |
818 |
> |
etacrybc2 = 0; |
819 |
> |
phicrybc2 = 0; |
820 |
> |
xcrybc2 = 0; |
821 |
> |
ycrybc2 = 0; |
822 |
> |
thetaaxisbc2 = 0; |
823 |
> |
phiaxisbc2 = 0; |
824 |
> |
sigietaietabc2 = 0; |
825 |
> |
sigiphiphibc2 = 0; |
826 |
> |
covietaiphibc2 = 0; |
827 |
> |
e3x3bc2 = 0; |
828 |
> |
e5x5bc2 = 0; |
829 |
> |
emaxbc2 = 0; |
830 |
> |
e2ndbc2 = 0; |
831 |
> |
etopbc2 = 0; |
832 |
> |
ebottombc2 = 0; |
833 |
> |
eleftbc2 = 0; |
834 |
> |
erightbc2 = 0; |
835 |
> |
e1x3bc2 = 0; |
836 |
> |
e3x1bc2 = 0; |
837 |
> |
e1x5bc2 = 0; |
838 |
> |
e2x2bc2 = 0; |
839 |
> |
e4x4bc2 = 0; |
840 |
> |
e2x5maxbc2 = 0; |
841 |
> |
e2x5topbc2 = 0; |
842 |
> |
e2x5bottombc2 = 0; |
843 |
> |
e2x5leftbc2 = 0; |
844 |
> |
e2x5rightbc2 = 0; |
845 |
> |
xbc2bc2 = 0; |
846 |
> |
ybc2bc2 = 0; |
847 |
> |
zbc2bc2 = 0; |
848 |
> |
nhitsbc2 = 0; |
849 |
|
} |
850 |
< |
|
850 |
> |
|
851 |
> |
if (bclast) { |
852 |
> |
ebclast = bclast->Energy(); |
853 |
> |
etabclast = bclast->Eta(); |
854 |
> |
phibclast = bclast->Phi(); |
855 |
> |
ietabclast = bclast->IEta(); |
856 |
> |
iphibclast = bclast->IPhi(); |
857 |
> |
ixbclast = bclast->IX(); |
858 |
> |
iybclast = bclast->IY(); |
859 |
> |
etacrybclast = bclast->EtaCry(); |
860 |
> |
phicrybclast = bclast->PhiCry(); |
861 |
> |
xcrybclast = bclast->XCry(); |
862 |
> |
ycrybclast = bclast->YCry(); |
863 |
> |
thetaaxisbclast = bclast->ThetaAxis(); |
864 |
> |
phiaxisbclast = bclast->PhiAxis(); |
865 |
> |
sigietaietabclast = TMath::Sqrt(bclast->CoviEtaiEta()); |
866 |
> |
sigiphiphibclast = TMath::Sqrt(bclast->CoviPhiiPhi()); |
867 |
> |
if (isnan(sigiphiphibclast)) sigiphiphibclast = -99.; |
868 |
> |
covietaiphibclast = bclast->CoviEtaiPhi(); |
869 |
> |
if (isnan(covietaiphibclast)) covietaiphibclast = -99.; |
870 |
> |
e3x3bclast = bclast->E3x3(); |
871 |
> |
nhitsbclast = bclast->NHits(); |
872 |
> |
} |
873 |
> |
else { |
874 |
> |
ebclast = 0; |
875 |
> |
etabclast = 0; |
876 |
> |
phibclast = 0; |
877 |
> |
ietabclast = 0; |
878 |
> |
iphibclast = 0; |
879 |
> |
ixbclast = 0; |
880 |
> |
iybclast = 0; |
881 |
> |
etacrybclast = 0; |
882 |
> |
phicrybclast = 0; |
883 |
> |
xcrybclast = 0; |
884 |
> |
ycrybclast = 0; |
885 |
> |
thetaaxisbclast = 0; |
886 |
> |
phiaxisbclast = 0; |
887 |
> |
sigietaietabclast = 0; |
888 |
> |
sigiphiphibclast = 0; |
889 |
> |
covietaiphibclast = 0; |
890 |
> |
e3x3bclast = 0; |
891 |
> |
nhitsbclast = 0; |
892 |
> |
} |
893 |
> |
|
894 |
> |
if (bclast2) { |
895 |
> |
ebclast2 = bclast2->Energy(); |
896 |
> |
etabclast2 = bclast2->Eta(); |
897 |
> |
phibclast2 = bclast2->Phi(); |
898 |
> |
ietabclast2 = bclast2->IEta(); |
899 |
> |
iphibclast2 = bclast2->IPhi(); |
900 |
> |
ixbclast2 = bclast2->IX(); |
901 |
> |
iybclast2 = bclast2->IY(); |
902 |
> |
etacrybclast2 = bclast2->EtaCry(); |
903 |
> |
phicrybclast2 = bclast2->PhiCry(); |
904 |
> |
xcrybclast2 = bclast2->XCry(); |
905 |
> |
ycrybclast2 = bclast2->YCry(); |
906 |
> |
thetaaxisbclast2 = bclast2->ThetaAxis(); |
907 |
> |
phiaxisbclast2 = bclast2->PhiAxis(); |
908 |
> |
sigietaietabclast2 = TMath::Sqrt(bclast2->CoviEtaiEta()); |
909 |
> |
sigiphiphibclast2 = TMath::Sqrt(bclast2->CoviPhiiPhi()); |
910 |
> |
if (isnan(sigiphiphibclast2)) sigiphiphibclast2 = -99.; |
911 |
> |
covietaiphibclast2 = bclast2->CoviEtaiPhi(); |
912 |
> |
if (isnan(covietaiphibclast2)) covietaiphibclast2 = -99.; |
913 |
> |
e3x3bclast2 = bclast2->E3x3(); |
914 |
> |
nhitsbclast2 = bclast2->NHits(); |
915 |
> |
} |
916 |
> |
else { |
917 |
> |
ebclast2 = 0; |
918 |
> |
etabclast2 = 0; |
919 |
> |
phibclast2 = 0; |
920 |
> |
ietabclast2 = 0; |
921 |
> |
iphibclast2 = 0; |
922 |
> |
ixbclast2 = 0; |
923 |
> |
iybclast2 = 0; |
924 |
> |
etacrybclast2 = 0; |
925 |
> |
phicrybclast2 = 0; |
926 |
> |
xcrybclast2 = 0; |
927 |
> |
ycrybclast2 = 0; |
928 |
> |
thetaaxisbclast2 = 0; |
929 |
> |
phiaxisbclast2 = 0; |
930 |
> |
sigietaietabclast2 = 0; |
931 |
> |
sigiphiphibclast2 = 0; |
932 |
> |
covietaiphibclast2 = 0; |
933 |
> |
e3x3bclast2 = 0; |
934 |
> |
nhitsbclast2 = 0; |
935 |
> |
} |
936 |
> |
|
937 |
> |
|
938 |
|
//initialize photon energy corrections if needed |
939 |
|
/*if (!PhotonFix::initialised()) { |
940 |
|
PhotonFix::initialise("4_2",std::string((gSystem->Getenv("CMSSW_BASE") + TString("/src/MitPhysics/data/PhotonFix.dat")).Data())); |
1103 |
|
genphi = m->Phi(); |
1104 |
|
const MCParticle *mm = m->DistinctMother(); |
1105 |
|
if (mm) genz = mm->DecayVertex().Z(); |
1106 |
+ |
pdgid = m->PdgId(); |
1107 |
+ |
if (mm) motherpdgid = mm->PdgId(); |
1108 |
+ |
else motherpdgid = -99; |
1109 |
|
} |
1110 |
|
else { |
1111 |
|
ispromptgen = kFALSE; |
1113 |
|
genpt = -99.; |
1114 |
|
geneta = -99.; |
1115 |
|
genphi = -99.; |
1116 |
+ |
pdgid = -99; |
1117 |
+ |
motherpdgid = -99; |
1118 |
|
} |
1119 |
|
|
1120 |
|
} |