- Timestamp:
- Dec 21, 2014, 12:12:45 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- f10999a
- Parents:
- 6cdc544
- Location:
- modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Calorimeter.cc
r6cdc544 r38bf1ae 151 151 152 152 // read min E value for towers to be saved 153 fECalEnergyMin = GetDouble("ECal MinEnergy", 0.0);154 fHCalEnergyMin = GetDouble("HCal MinEnergy", 0.0);155 156 fECal SigmaMin = GetDouble("ECalMinSignificance", 0.0);157 fHCal SigmaMin = GetDouble("HCalMinSignificance", 0.0);153 fECalEnergyMin = GetDouble("ECalEnergyMin", 0.0); 154 fHCalEnergyMin = GetDouble("HCalEnergyMin", 0.0); 155 156 fECalEnergySignificanceMin = GetDouble("ECalEnergySignificanceMin", 0.0); 157 fHCalEnergySignificanceMin = GetDouble("HCalEnergySignificanceMin", 0.0); 158 158 159 159 // switch on or off the dithering of the center of calorimeter towers … … 178 178 fEFlowPhotonOutputArray = ExportArray(GetString("EFlowPhotonOutputArray", "eflowPhotons")); 179 179 fEFlowNeutralHadronOutputArray = ExportArray(GetString("EFlowNeutralHadronOutputArray", "eflowNeutralHadrons")); 180 181 180 } 182 181 … … 440 439 441 440 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy); 441 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy); 442 442 443 443 ecalEnergy = LogNormal(fTowerECalEnergy, ecalSigma); 444 ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0 : fTowerECalTime/fTowerECalTimeWeight;445 446 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy);447 448 444 hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma); 449 hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0 : fTowerHCalTime/fTowerHCalTimeWeight; 450 445 446 ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerECalTime/fTowerECalTimeWeight; 447 hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerHCalTime/fTowerHCalTimeWeight; 451 448 452 449 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy); 453 450 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy); 454 451 455 ecalEnergy = (ecalEnergy < fECalEnergyMin || ecalEnergy < fECalSigmaMin*ecalSigma) ? 0 : ecalEnergy;456 hcalEnergy = (hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalSigmaMin*hcalSigma) ? 0 : hcalEnergy;452 if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalEnergySignificanceMin*ecalSigma) ecalEnergy = 0.0; 453 if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0; 457 454 458 455 energy = ecalEnergy + hcalEnergy; … … 461 458 if(fDitherTowerCenter) 462 459 { 463 464 460 eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]); 461 phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]); 465 462 } 466 463 else 467 464 { 468 469 465 eta = fTowerEta; 466 phi = fTowerPhi; 470 467 } 471 468 … … 482 479 fTower->Edges[3] = fTowerEdges[3]; 483 480 484 if( energy > 0.0)481 if(energy > 0.0) 485 482 { 486 483 if(fTowerPhotonHits > 0 && fTowerTrackHits == 0) … … 502 499 503 500 ecalEnergy -= fTrackECalEnergy; 504 if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;505 506 501 hcalEnergy -= fTrackHCalEnergy; 507 if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0; 502 503 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy); 504 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy); 505 506 if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalEnergySignificanceMin*ecalSigma) ecalEnergy = 0.0; 507 if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0; 508 508 509 509 energy = ecalEnergy + hcalEnergy; … … 518 518 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalEnergy); 519 519 tower->Eem = ecalEnergy; 520 tower->Ehad = 0 ;520 tower->Ehad = 0.0; 521 521 522 522 fEFlowPhotonOutputArray->Add(tower); … … 530 530 531 531 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalEnergy); 532 tower->Eem = 0 ;532 tower->Eem = 0.0; 533 533 tower->Ehad = hcalEnergy; 534 534 … … 548 548 a = TMath::Log(mean) - 0.5*b*b; 549 549 550 return TMath::Exp(a + b*gRandom->Gaus(0 , 1));550 return TMath::Exp(a + b*gRandom->Gaus(0.0, 1.0)); 551 551 } 552 552 else -
modules/Calorimeter.h
r6cdc544 r38bf1ae 71 71 Double_t fHCalEnergyMin; 72 72 73 Double_t fECal SigmaMin;74 Double_t fHCal SigmaMin;73 Double_t fECalEnergySignificanceMin; 74 Double_t fHCalEnergySignificanceMin; 75 75 76 76 Bool_t fDitherTowerCenter;
Note:
See TracChangeset
for help on using the changeset viewer.