Fork me on GitHub

Changeset a98c7ef in git for modules/SimpleCalorimeter.cc


Ignore:
Timestamp:
Oct 1, 2015, 3:21:57 PM (9 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
fa7f333
Parents:
d77b51d
Message:

fixed eflow at high pt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/SimpleCalorimeter.cc

    rd77b51d ra98c7ef  
    168168  // create output arrays
    169169  fTowerOutputArray = ExportArray(GetString("TowerOutputArray", "towers"));
     170 
     171  fEFlowTrackOutputArray = ExportArray(GetString("EFlowTrackOutputArray", "eflowTracks"));
    170172  fEFlowTowerOutputArray = ExportArray(GetString("EFlowTowerOutputArray", "eflowTowers"));
    171173}
     
    395397void SimpleCalorimeter::FinalizeTower()
    396398{
    397   Candidate *tower;
     399  Candidate *tower, *track;
    398400  Double_t energy, pt, eta, phi;
    399401  Double_t sigma;
    400402  Double_t time;
    401403
     404  Double_t trkSigma, fraction;
     405 
     406  Int_t pdgCode;
     407  TLorentzVector momentum;
     408  TFractionMap::iterator itFractionMap;
     409 
    402410  if(!fTower) return;
    403411
     
    439447  if(energy > 0.0) fTowerOutputArray->Add(fTower);
    440448
    441   // fill energy flow candidates
    442   energy -= fTrackEnergy;
     449
     450
     451  // fill e-flow candidates
     452  fItTowerTrackArray->Reset();
     453  while((track = static_cast<Candidate*>(fItTowerTrackArray->Next())))
     454  {
     455     momentum = track->Momentum;
     456   
     457     pdgCode = TMath::Abs(track->PID);
     458
     459     itFractionMap = fFractionMap.find(pdgCode);
     460     if(itFractionMap == fFractionMap.end())
     461     {
     462       itFractionMap = fFractionMap.find(0);
     463     }
     464
     465     fraction = itFractionMap->second;
     466   
     467     // charged particle has to deposit either in ECAL or HCAL
     468     if(fraction < 1.0E-9) continue; 
     469   
     470     trkSigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E());       
     471 
     472     if(track->TrackResolution < trkSigma/momentum.E())
     473     {
     474        energy -= momentum.E();
     475        fEFlowTrackOutputArray->Add(track);
     476     }
     477
     478  }
     479
    443480
    444481  sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy);
    445 
    446482  if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0;
    447483
Note: See TracChangeset for help on using the changeset viewer.