Changeset 10 in svn
- Timestamp:
- Nov 6, 2008, 11:15:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SmearUtil.cc
r9 r10 212 212 // some of the particles decay mostly in the ecal, some mostly in the hcal 213 213 214 float energyS1,energyS2; 214 215 if(fabs(hadron.Eta()) < MAX_CALO_CEN) { 215 floatenergyS1 = gRandom->Gaus(energy_hcal, sqrt(216 energyS1 = gRandom->Gaus(energy_hcal, sqrt( 216 217 pow(HAD_Nhcal,2) + 217 218 pow(HAD_Chcal*energy_hcal,2) + 218 219 pow(HAD_Shcal*sqrt(energy_hcal),2) )) ; 220 219 221 220 float energyS2 =gRandom->Gaus(energy_ecal, sqrt(222 energyS2 = gRandom->Gaus(energy_ecal, sqrt( 221 223 pow(HAD_Necal,2) + 222 224 pow(HAD_Cecal*energy_ecal,2) + 223 pow(HAD_Secal*sqrt(energy_ecal),2) ) ); 224 225 energyS = (energyS1>0)?energyS1:0 + (energyS2>0)?energyS2:0; 226 cout << "avant: " << energyS1 + energyS2 << "\t\t" << energyS << endl; 225 pow(HAD_Secal*sqrt(energy_ecal),2) ) ); 226 227 energyS = ((energyS1>0)?energyS1:0) + ((energyS2>0)?energyS2:0); 227 228 } else { 228 229 energyS = gRandom->Gaus(energy, … … 231 232 pow(HAD_Shf*sqrt(energy),2) ); 232 233 } 234 235 233 236 hadron.SetPtEtaPhiE(energyS/cosh(hadron.Eta()),hadron.Eta(), hadron.Phi(), energyS); 234 237
Note:
See TracChangeset
for help on using the changeset viewer.