Changeset 4b9a2dc in git
- Timestamp:
- Sep 24, 2014, 10:08:15 AM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 1c8d9db
- Parents:
- fcc959c
- Location:
- modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Calorimeter.cc
rfcc959c r4b9a2dc 135 135 } 136 136 */ 137 138 // read min E value for towers to be saved 139 fEcalEnergyMin = GetDouble("EcalTowerMinEnergy", 0.0); 140 fHcalEnergyMin = GetDouble("HcalTowerMinEnergy", 0.0); 141 142 fEcalSigmaMin = GetDouble("EcalTowerMinSignificance", 0.0); 143 fHcalSigmaMin = GetDouble("HcalTowerMinSignificance", 0.0); 144 145 137 146 // read resolution formulas 138 147 fECalResolutionFormula->Compile(GetString("ECalResolutionFormula", "0")); … … 414 423 415 424 if(!fTower) return; 425 // cout<<"----------------------"<<endl; 426 // cout<<"Finalize Tower"<<endl; 427 // cout<<""<<endl; 428 416 429 417 430 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy); … … 430 443 hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma); 431 444 hcalTime = (fTowerHCalWeightTime < 1.0E-09 ) ? 0 : fTowerHCalTime/fTowerHCalWeightTime; 445 446 447 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy); 448 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy); 449 450 ecalEnergy = (ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*ecalSigma) ? 0 : ecalEnergy; 451 hcalEnergy = (hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*hcalSigma) ? 0 : hcalEnergy; 432 452 433 453 energy = ecalEnergy + hcalEnergy; … … 453 473 fTower->Edges[3] = fTowerEdges[3]; 454 474 455 456 // fill calorimeter towers 457 if(energy > 0.0) 475 if( energy > 0.0 ) 458 476 { 459 477 if(fTowerPhotonHits > 0 && fTowerTrackHits == 0) … … 475 493 476 494 ecalEnergy -= fTrackECalEnergy; 477 if(ecalEnergy < 0.0) ecalEnergy = 0.0;495 if(ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0; 478 496 479 497 hcalEnergy -= fTrackHCalEnergy; 480 if(hcalEnergy < 0.0) hcalEnergy = 0.0;498 if(hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0; 481 499 482 500 energy = ecalEnergy + hcalEnergy; 483 501 484 485 // save ECAL and/or HCAL energy excess as an energy flow tower486 502 if(ecalEnergy > 0.0) 487 503 { … … 497 513 fEFlowPhotonOutputArray->Add(tower); 498 514 } 499 500 515 if(hcalEnergy > 0.0) 501 516 { -
modules/Calorimeter.h
rfcc959c r4b9a2dc 54 54 Int_t fTowerTrackHits, fTowerPhotonHits; 55 55 56 Double_t fEcalEnergyMin; 57 Double_t fHcalEnergyMin; 58 59 Double_t fEcalSigmaMin; 60 Double_t fHcalSigmaMin; 61 56 62 TFractionMap fFractionMap; //! 57 63 TBinMap fBinMap; //! -
modules/SimpleCalorimeter.cc
rfcc959c r4b9a2dc 129 129 } 130 130 */ 131 132 // read min E value for towers to be saved 133 fEnergyMin = GetDouble("TowerMinEnergy", 0.0); 134 fSigmaMin = GetDouble("TowerMinSignificance", 0.0); 135 131 136 // read resolution formulas 132 137 fResolutionFormula->Compile(GetString("ResolutionFormula", "0")); … … 384 389 time = (fTowerWeightTime < 1.0E-09 ) ? 0 : fTowerTime/fTowerWeightTime; 385 390 391 sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy); 392 393 energy = (energy < fEnergyMin || energy < fSigmaMin*sigma) ? 0 : energy; 394 386 395 eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]); 387 396 phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]); … … 405 414 // fill energy flow candidates 406 415 energy -= fTrackEnergy; 407 if(energy < 0.0) energy = 0.0;416 if(energy < fEnergyMin || energy < fSigmaMin*fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy)) energy = 0.0; 408 417 409 418 // save energy excess as an energy flow tower -
modules/SimpleCalorimeter.h
rfcc959c r4b9a2dc 54 54 Int_t fTowerTrackHits, fTowerPhotonHits; 55 55 56 Double_t fEnergyMin; 57 Double_t fSigmaMin; 58 56 59 TFractionMap fFractionMap; //! 57 60 TBinMap fBinMap; //!
Note:
See TracChangeset
for help on using the changeset viewer.