Changeset 914fb04 in git for modules/Calorimeter.cc
- Timestamp:
- Oct 1, 2015, 3:32:32 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- c62695e
- Parents:
- 122e1e5 (diff), fa7f333 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Calorimeter.cc
r122e1e5 r914fb04 426 426 Double_t ecalEnergy, hcalEnergy; 427 427 Double_t ecalSigma, hcalSigma; 428 Double_t ecalTrkSigma, hcalTrkSigma; 429 Double_t ecalFraction, hcalFraction; 430 431 Int_t pdgCode; 432 TLorentzVector momentum; 433 TFractionMap::iterator itFractionMap; 434 428 435 Float_t weight, sumWeightedTime, sumWeight; 429 436 430 437 if(!fTower) return; 431 438 439 432 440 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy); 433 441 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy); … … 501 509 // fill energy flow candidates 502 510 503 // save all the tracks as energy flow tracks 504 fItTowerTrackArray->Reset(); 505 while((track = static_cast<Candidate*>(fItTowerTrackArray->Next()))) 506 { 507 fEFlowTrackOutputArray->Add(track); 508 } 509 510 ecalEnergy -= fTrackECalEnergy; 511 hcalEnergy -= fTrackHCalEnergy; 511 // save as eflowtracks only tracks that have better resolution than calo 512 513 fItTowerTrackArray->Reset(); 514 while((track = static_cast<Candidate*>(fItTowerTrackArray->Next()))) 515 { 516 momentum = track->Momentum; 517 518 pdgCode = TMath::Abs(track->PID); 519 520 itFractionMap = fFractionMap.find(pdgCode); 521 if(itFractionMap == fFractionMap.end()) 522 { 523 itFractionMap = fFractionMap.find(0); 524 } 525 526 ecalFraction = itFractionMap->second.first; 527 hcalFraction = itFractionMap->second.second; 528 529 // charged particle has to deposit either in ECAL or HCAL 530 531 if(ecalFraction < 1.0E-9 && hcalFraction < 1.0E-9) continue; 532 if(ecalFraction > 1.0E-9 && hcalFraction > 1.0E-9) continue; 533 534 if(ecalFraction > 1.0E-9) 535 { 536 if(track->TrackResolution < ecalTrkSigma/momentum.E()) 537 { 538 ecalTrkSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E()); 539 ecalEnergy -= momentum.E(); 540 fEFlowTrackOutputArray->Add(track); 541 } 542 543 } 544 545 if(hcalFraction > 1.0E-9) 546 { 547 if(track->TrackResolution < hcalTrkSigma/momentum.E()) 548 { 549 hcalTrkSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E()); 550 hcalEnergy -= momentum.E(); 551 fEFlowTrackOutputArray->Add(track); 552 } 553 } 554 } 512 555 513 556 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
Note:
See TracChangeset
for help on using the changeset viewer.