Changeset d1678fd in git for modules/DualReadoutCalorimeter.cc
- Timestamp:
- Mar 17, 2021, 5:07:53 PM (4 years ago)
- Branches:
- master
- Children:
- 5eda6767
- Parents:
- 9cc5aeb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/DualReadoutCalorimeter.cc
r9cc5aeb rd1678fd 466 466 467 467 fTower->AddCandidate(particle); 468 fTower->Position = position; 468 469 } 469 470 … … 478 479 479 480 Candidate *track, *tower, *mother; 480 Double_t energy, pt, eta, phi ;481 Double_t energy, pt, eta, phi, r; 481 482 Double_t ecalEnergy, hcalEnergy; 482 483 Double_t ecalNeutralEnergy, hcalNeutralEnergy, neutralEnergy; … … 494 495 if(!fTower) return; 495 496 496 497 //if (fHCalTowerEnergy < 30 && fECalTowerEnergy < 30) return;498 //cout<<"----------- New tower ---------"<<endl;499 500 501 // here we change behaviour w.r.t to standard calorimeter. Start with worse case scenario. If fHCalTowerEnergy > 0, assume total energy smeared by HCAL resolution.502 // For example, if overlapping charged pions and photons take hadronic resolution as combined measurement503 504 // if no hadronic fraction at all, then use ECAL resolution505 506 //cout<<"fECalTowerEnergy: "<<fECalTowerEnergy<<", fHCalTowerEnergy: "<<fHCalTowerEnergy<<", Eta: "<<fTowerEta<<endl;507 497 508 498 // if no hadronic energy, use ECAL resolution … … 562 552 for(size_t i = 0; i < fTower->ECalEnergyTimePairs.size(); ++i) 563 553 { 564 weight = TMath:: Sqrt(fTower->ECalEnergyTimePairs[i].first);554 weight = TMath::Power((fTower->ECalEnergyTimePairs[i].first),2); 565 555 sumWeightedTime += weight * fTower->ECalEnergyTimePairs[i].second; 566 556 sumWeight += weight; … … 568 558 } 569 559 560 r = TMath::Sqrt(fTower->Position.X()*fTower->Position.X()+fTower->Position.Y()*fTower->Position.Y()); 561 570 562 if(sumWeight > 0.0) 571 563 { 572 fTower->Position.SetPtEtaPhiE( 1.0, eta, phi, sumWeightedTime/sumWeight);564 fTower->Position.SetPtEtaPhiE(r, eta, phi, sumWeightedTime/sumWeight); 573 565 } 574 566 else 575 567 { 576 fTower->Position.SetPtEtaPhiE( 1.0, eta, phi, 999999.9);568 fTower->Position.SetPtEtaPhiE(r, eta, phi, 999999.9); 577 569 } 578 570
Note:
See TracChangeset
for help on using the changeset viewer.