- Timestamp:
- Mar 17, 2021, 5:07:53 PM (4 years ago)
- Branches:
- master
- Children:
- 5eda6767
- Parents:
- 9cc5aeb
- Location:
- modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Calorimeter.cc
r9cc5aeb rd1678fd 450 450 451 451 fTower->AddCandidate(particle); 452 fTower->Position = position; 452 453 } 453 454 … … 461 462 { 462 463 Candidate *track, *tower, *mother; 463 Double_t energy, pt, eta, phi ;464 Double_t energy, pt, eta, phi, r; 464 465 Double_t ecalEnergy, hcalEnergy; 465 466 Double_t ecalNeutralEnergy, hcalNeutralEnergy; … … 511 512 for(size_t i = 0; i < fTower->ECalEnergyTimePairs.size(); ++i) 512 513 { 513 weight = TMath:: Sqrt(fTower->ECalEnergyTimePairs[i].first);514 weight = TMath::Power((fTower->ECalEnergyTimePairs[i].first),2); 514 515 sumWeightedTime += weight * fTower->ECalEnergyTimePairs[i].second; 515 516 sumWeight += weight; … … 517 518 } 518 519 520 r = TMath::Sqrt(fTower->Position.X()*fTower->Position.X()+fTower->Position.Y()*fTower->Position.Y()); 521 519 522 if(sumWeight > 0.0) 520 523 { 521 fTower->Position.SetPtEtaPhiE( 1.0, eta, phi, sumWeightedTime / sumWeight);524 fTower->Position.SetPtEtaPhiE(r, eta, phi, sumWeightedTime / sumWeight); 522 525 } 523 526 else 524 527 { 525 fTower->Position.SetPtEtaPhiE( 1.0, eta, phi, 999999.9);528 fTower->Position.SetPtEtaPhiE(r, eta, phi, 999999.9); 526 529 } 527 530 -
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 -
modules/SimpleCalorimeter.cc
r9cc5aeb rd1678fd 394 394 fTowerEnergy += energy; 395 395 396 fTowerTime += energy * position.T();397 fTowerTimeWeight += energy ;396 fTowerTime += energy * energy * position.T(); //sigma_t ~ 1/E 397 fTowerTimeWeight += energy * energy; 398 398 399 399 fTower->AddCandidate(particle); 400 fTower->Position = position; 401 400 402 } 401 403 … … 409 411 { 410 412 Candidate *tower, *track, *mother; 411 Double_t energy, neutralEnergy, pt, eta, phi ;413 Double_t energy, neutralEnergy, pt, eta, phi, r; 412 414 Double_t sigma, neutralSigma; 413 415 Double_t time; … … 442 444 443 445 pt = energy / TMath::CosH(eta); 444 445 fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time); 446 r = TMath::Sqrt(fTower->Position.X()*fTower->Position.X()+fTower->Position.Y()*fTower->Position.Y()); 447 448 fTower->Position.SetPtEtaPhiE(r, eta, phi, time); 446 449 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 447 450
Note:
See TracChangeset
for help on using the changeset viewer.