Changeset 1356 in svn for trunk/modules/Calorimeter.cc
- Timestamp:
- Mar 9, 2014, 12:09:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/Calorimeter.cc
r1345 r1356 3 3 * 4 4 * Fills calorimeter towers, performs calorimeter resolution smearing, 5 * preselects towers hit by photons and creates energy flow objects.5 * and creates energy flow objects (tracks, photons, and neutral hadrons). 6 6 * 7 7 * $Date$ … … 149 149 fTowerOutputArray = ExportArray(GetString("TowerOutputArray", "towers")); 150 150 fPhotonOutputArray = ExportArray(GetString("PhotonOutputArray", "photons")); 151 151 152 152 fEFlowTrackOutputArray = ExportArray(GetString("EFlowTrackOutputArray", "eflowTracks")); 153 fEFlowTowerOutputArray = ExportArray(GetString("EFlowTowerOutputArray", "eflowTowers")); 153 fEFlowPhotonOutputArray = ExportArray(GetString("EFlowPhotonOutputArray", "eflowPhotons")); 154 fEFlowNeutralHadronOutputArray = ExportArray(GetString("EFlowNeutralHadronOutputArray", "eflowNeutralHadrons")); 155 156 154 157 } 155 158 … … 341 344 fTowerTrackHits = 0; 342 345 fTowerPhotonHits = 0; 343 346 344 347 fTowerTrackArray->Clear(); 345 348 } … … 371 374 continue; 372 375 } 373 376 374 377 // check for photon and electron hits in current tower 375 378 if(flags & 2) ++fTowerPhotonHits; 376 379 377 380 particle = static_cast<Candidate*>(fParticleInputArray->At(number)); 378 381 momentum = particle->Momentum; … … 451 454 452 455 453 // fill calorimeter towers and photon candidates456 // fill calorimeter towers 454 457 if(energy > 0.0) 455 458 { … … 458 461 fPhotonOutputArray->Add(fTower); 459 462 } 460 463 461 464 fTowerOutputArray->Add(fTower); 462 465 } … … 479 482 energy = ecalEnergy + hcalEnergy; 480 483 484 481 485 // save ECAL and/or HCAL energy excess as an energy flow tower 482 if(e nergy > 0.0)483 { 484 // create new tower486 if(ecalEnergy > 0.0) 487 { 488 // create new photon tower 485 489 tower = static_cast<Candidate*>(fTower->Clone()); 486 490 487 pt = e nergy / TMath::CosH(eta);488 489 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, e nergy);491 pt = ecalEnergy / TMath::CosH(eta); 492 493 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalEnergy); 490 494 tower->Eem = ecalEnergy; 495 tower->Ehad = 0; 496 497 fEFlowPhotonOutputArray->Add(tower); 498 } 499 500 if(hcalEnergy > 0.0) 501 { 502 // create new neutral hadron tower 503 tower = static_cast<Candidate*>(fTower->Clone()); 504 505 pt = hcalEnergy / TMath::CosH(eta); 506 507 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalEnergy); 508 tower->Eem = 0; 491 509 tower->Ehad = hcalEnergy; 492 510 493 fEFlowTowerOutputArray->Add(tower); 494 } 511 fEFlowNeutralHadronOutputArray->Add(tower); 512 } 513 514 515 516 495 517 } 496 518
Note:
See TracChangeset
for help on using the changeset viewer.