Changeset 5eda6767 in git for modules/SimpleCalorimeter.cc
- Timestamp:
- Mar 18, 2021, 6:28:10 PM (4 years ago)
- Branches:
- master
- Children:
- cb80e6f
- Parents:
- d1678fd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/SimpleCalorimeter.cc
rd1678fd r5eda6767 208 208 fItParticleInputArray->Reset(); 209 209 number = -1; 210 fTowerRmax=0.; 210 211 while((particle = static_cast<Candidate *>(fItParticleInputArray->Next()))) 211 212 { 212 213 const TLorentzVector &particlePosition = particle->Position; 213 214 ++number; 215 216 // compute maximum radius (needed in FinalizeTower to assess whether barrel or endcap tower) 217 if (particlePosition.Perp() > fTowerRmax) 218 fTowerRmax=particlePosition.Perp(); 214 219 215 220 pdgCode = TMath::Abs(particle->PID); … … 444 449 445 450 pt = energy / TMath::CosH(eta); 446 r = TMath::Sqrt(fTower->Position.X()*fTower->Position.X()+fTower->Position.Y()*fTower->Position.Y()); 447 451 452 // check whether barrel or endcap tower 453 if (fTower->Position.Perp() < fTowerRmax && TMath::Abs(eta) > 0.) 454 r = fTower->Position.Z()/TMath::SinH(eta); 455 else 456 r = fTower->Position.Pt(); 457 448 458 fTower->Position.SetPtEtaPhiE(r, eta, phi, time); 449 459 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
Note:
See TracChangeset
for help on using the changeset viewer.