Ticket #363: Calorimeter_Dither.patch
File Calorimeter_Dither.patch, 1.6 KB (added by , 10 years ago) |
---|
-
.h
old new private: 52 52 Double_t fTrackECalWeightTime, fTrackHCalWeightTime; 53 53 54 54 Int_t fTowerTrackHits, fTowerPhotonHits; 55 56 Bool_t fDitherCenter; 55 57 56 58 TFractionMap fFractionMap; //! 57 59 TBinMap fBinMap; //! -
.cc
old new void Calorimeter::Init() 152 152 fEFlowTrackOutputArray = ExportArray(GetString("EFlowTrackOutputArray", "eflowTracks")); 153 153 fEFlowPhotonOutputArray = ExportArray(GetString("EFlowPhotonOutputArray", "eflowPhotons")); 154 154 fEFlowNeutralHadronOutputArray = ExportArray(GetString("EFlowNeutralHadronOutputArray", "eflowNeutralHadrons")); 155 156 155 156 fDitherCenter = GetBool("DitherTowerCenters", true); 157 157 } 158 158 159 159 //------------------------------------------------------------------------------ … … void Calorimeter::FinalizeTower() 433 433 energy = ecalEnergy + hcalEnergy; 434 434 time = (TMath::Sqrt(ecalEnergy)*ecalTime + TMath::Sqrt(hcalEnergy)*hcalTime)/(TMath::Sqrt(ecalEnergy) + TMath::Sqrt(hcalEnergy)); 435 435 436 // eta = fTowerEta; 437 // phi = fTowerPhi; 438 439 eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]); 440 phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]); 436 if(fDitherCenter) 437 { 438 eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]); 439 phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]); 440 } 441 else 442 { 443 eta = fTowerEta; 444 phi = fTowerPhi; 445 } 441 446 442 447 pt = energy / TMath::CosH(eta); 443 448