Changeset 914fb04 in git for modules/SimpleCalorimeter.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/SimpleCalorimeter.cc
r122e1e5 r914fb04 168 168 // create output arrays 169 169 fTowerOutputArray = ExportArray(GetString("TowerOutputArray", "towers")); 170 171 fEFlowTrackOutputArray = ExportArray(GetString("EFlowTrackOutputArray", "eflowTracks")); 170 172 fEFlowTowerOutputArray = ExportArray(GetString("EFlowTowerOutputArray", "eflowTowers")); 171 173 } … … 395 397 void SimpleCalorimeter::FinalizeTower() 396 398 { 397 Candidate *tower ;399 Candidate *tower, *track; 398 400 Double_t energy, pt, eta, phi; 399 401 Double_t sigma; 400 402 Double_t time; 401 403 404 Double_t trkSigma, fraction; 405 406 Int_t pdgCode; 407 TLorentzVector momentum; 408 TFractionMap::iterator itFractionMap; 409 402 410 if(!fTower) return; 403 411 … … 439 447 if(energy > 0.0) fTowerOutputArray->Add(fTower); 440 448 441 // fill energy flow candidates 442 energy -= fTrackEnergy; 449 450 451 // fill e-flow candidates 452 fItTowerTrackArray->Reset(); 453 while((track = static_cast<Candidate*>(fItTowerTrackArray->Next()))) 454 { 455 momentum = track->Momentum; 456 457 pdgCode = TMath::Abs(track->PID); 458 459 itFractionMap = fFractionMap.find(pdgCode); 460 if(itFractionMap == fFractionMap.end()) 461 { 462 itFractionMap = fFractionMap.find(0); 463 } 464 465 fraction = itFractionMap->second; 466 467 // charged particle has to deposit either in ECAL or HCAL 468 if(fraction < 1.0E-9) continue; 469 470 trkSigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E()); 471 472 if(track->TrackResolution < trkSigma/momentum.E()) 473 { 474 energy -= momentum.E(); 475 fEFlowTrackOutputArray->Add(track); 476 } 477 478 } 479 443 480 444 481 sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy); 445 446 482 if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0; 447 483
Note:
See TracChangeset
for help on using the changeset viewer.