Fork me on GitHub

Changeset 1357 in svn


Ignore:
Timestamp:
Mar 9, 2014, 12:10:05 PM (11 years ago)
Author:
Michele Selvaggi
Message:

separated Photon and Neutral Hadron components in particle algorithm

Location:
trunk/examples
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/Example3.C

    r1339 r1357  
    2020  TH1 *fTrackDeltaEta;
    2121
    22   TH1 *fTowerDeltaEem;
    23   TH1 *fTowerDeltaEhad;
    24 
    2522  TH1 *fJetDeltaPT;
    2623};
     
    8279    "(#eta^{particle} - #eta^{track})/#eta^{particle}", "number of tracks",
    8380    100, -0.1, 0.1);
    84 
    85   plots->fTowerDeltaEem = result->AddHist1D(
    86     "tower delta Eem", "(Eem^{particles} - Eem^{tower})/Eem^{particles}",
    87     "(Eem^{particles} - Eem^{tower})/Eem^{particles}", "number of tower",
    88     100, -0.5, 0.5);
    89 
    90   plots->fTowerDeltaEhad = result->AddHist1D(
    91     "tower delta Ehad", "(Ehad^{particles} - Ehad^{tower})/Ehad^{particles}",
    92     "(Ehad^{particles} - Ehad^{tower})/Ehad^{particles}", "number of tower",
    93     100, -5.0, 5.0);
    9481
    9582  plots->fJetDeltaPT = result->AddHist1D(
     
    11097
    11198  TClonesArray *branchEFlowTrack = treeReader->UseBranch("EFlowTrack");
    112   TClonesArray *branchEFlowTower = treeReader->UseBranch("EFlowTower");
     99  TClonesArray *branchEFlowPhoton = treeReader->UseBranch("EFlowPhoton");
     100  TClonesArray *branchEFlowNeutralHadron = treeReader->UseBranch("EFlowNeutralHadron");
    113101  TClonesArray *branchJet = treeReader->UseBranch("Jet");
    114102
     
    188176    }
    189177
    190     // Loop over all towers in event
    191     for(i = 0; i < branchEFlowTower->GetEntriesFast(); ++i)
    192     {
    193       tower = (Tower*) branchEFlowTower->At(i);
    194 
    195       Eem = 0.0;
    196       Ehad = 0.0;
    197       skip = kFALSE;
    198       for(j = 0; j < tower->Particles.GetEntriesFast(); ++j)
    199       {
    200         particle = (GenParticle*) tower->Particles.At(j);
    201         pdgCode = TMath::Abs(particle->PID);
    202 
    203         // skip muons and neutrinos
    204         if(pdgCode == 12 || pdgCode == 13 || pdgCode == 14 || pdgCode == 16)
    205         {
    206           continue;
    207         }
    208 
    209         // skip K0short and Lambda
    210         if(pdgCode == 310 || pdgCode == 3122)
    211         {
    212           skip = kTRUE;
    213         }
    214 
    215         if(pdgCode == 11 || pdgCode == 22)
    216         {
    217           Eem += particle->E;
    218         }
    219         else
    220         {
    221           Ehad += particle->E;
    222         }
    223       }
    224       if(skip) continue;
    225       if(Eem > 0.0 && tower->Eem > 0.0) plots->fTowerDeltaEem->Fill((Eem - tower->Eem)/Eem);
    226       if(Ehad > 0.0 && tower->Ehad > 0.0) plots->fTowerDeltaEhad->Fill((Ehad - tower->Ehad)/Ehad);
    227     }
     178    cout<<"--  New event -- "<<endl;
    228179
    229180    // Loop over all jets in event
     
    233184
    234185      momentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
     186
     187      cout<<"Looping over jet constituents. Jet pt: "<<jet->PT<<", eta: "<<jet->Eta<<", phi: "<<jet->Phi<<endl;     
    235188
    236189      // Loop over all jet's constituents
     
    244197        if(object->IsA() == GenParticle::Class())
    245198        {
     199          cout<<"    GenPart pt: "<<((GenParticle*) object)->PT<<", eta: "<<((GenParticle*) object)->Eta<<", phi: "<<((GenParticle*) object)->Phi<<endl;
    246200          momentum += ((GenParticle*) object)->P4();
    247201        }
    248202        else if(object->IsA() == Track::Class())
    249203        {
     204          cout<<"    Track pt: "<<((Track*) object)->PT<<", eta: "<<((Track*) object)->Eta<<", phi: "<<((Track*) object)->Phi<<endl;
    250205          momentum += ((Track*) object)->P4();
    251206        }
    252207        else if(object->IsA() == Tower::Class())
    253208        {
     209          cout<<"    Tower pt: "<<((Tower*) object)->ET<<", eta: "<<((Tower*) object)->Eta<<", phi: "<<((Tower*) object)->Phi<<endl;
    254210          momentum += ((Tower*) object)->P4();
    255211        }
    256212        else if(object->IsA() == Muon::Class())
    257213        {
     214          cout<<"    Muon pt: "<<((Muon*) object)->PT<<", eta: "<<((Muon*) object)->Eta<<", phi: "<<((Muon*) object)->Phi<<endl;
    258215          momentum += ((Muon*) object)->P4();
    259216        }
  • trunk/examples/delphes_card_ATLAS.tcl

    r1334 r1357  
    207207
    208208  set EFlowTrackOutputArray eflowTracks
    209   set EFlowTowerOutputArray eflowTowers
     209  set EFlowPhotonOutputArray eflowPhotons
     210  set EFlowNeutralHadronOutputArray eflowNeutralHadrons
    210211
    211212  set pi [expr {acos(-1)}]
     
    275276# add InputArray InputArray
    276277  add InputArray Calorimeter/eflowTracks
    277   add InputArray Calorimeter/eflowTowers
     278  add InputArray Calorimeter/eflowPhotons
     279  add InputArray Calorimeter/eflowNeutralHadrons
    278280  set OutputArray eflow
    279281}
     
    387389module Merger MissingET {
    388390# add InputArray InputArray
    389   add InputArray Calorimeter/eflowTracks
    390   add InputArray Calorimeter/eflowTowers
     391  add InputArray EFlowMerger/eflow
    391392  set MomentumOutputArray momentum
    392393}
     
    446447
    447448 # scale formula for jets
    448   set ScaleFormula {1.08}
     449  set ScaleFormula {1.00}
    449450}
    450451
     
    521522##################
    522523
     524
     525# tracks, towers and eflow objects are not stored by default in the output.
     526# if needed (for jet constituent or other studies), uncomment the relevant
     527# "add Branch ..." lines.
     528
     529
    523530module TreeWriter TreeWriter {
    524531# add Branch InputArray BranchName BranchClass
    525532  add Branch Delphes/allParticles Particle GenParticle
    526   add Branch TrackMerger/tracks Track Track
    527   add Branch Calorimeter/towers Tower Tower
     533
     534#  add Branch TrackMerger/tracks Track Track
     535#  add Branch Calorimeter/towers Tower Tower
    528536#  add Branch Calorimeter/eflowTracks EFlowTrack Track
    529 #  add Branch Calorimeter/eflowTowers EFlowTower Tower
     537#  add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
     538#  add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
     539 
    530540  add Branch GenJetFinder/jets GenJet Jet
    531541  add Branch UniqueObjectFinder/jets Jet Jet
  • trunk/examples/delphes_card_ATLAS_PileUp.tcl

    r1345 r1357  
    1919  Calorimeter
    2020  TrackPileUpSubtractor
     21  NeutralTowerMerger
    2122  EFlowMerger
    2223
     
    247248
    248249  set EFlowTrackOutputArray eflowTracks
    249   set EFlowTowerOutputArray eflowTowers
    250 
     250  set EFlowPhotonOutputArray eflowPhotons
     251  set EFlowNeutralHadronOutputArray eflowNeutralHadrons
     252 
    251253  set pi [expr {acos(-1)}]
    252254
     
    324326
    325327####################
     328# Neutral tower merger
     329####################
     330
     331module Merger NeutralTowerMerger {
     332# add InputArray InputArray
     333  add InputArray Calorimeter/eflowPhotons
     334  add InputArray Calorimeter/eflowNeutralHadrons
     335  set OutputArray eflowTowers
     336}
     337
     338
     339####################
    326340# Energy flow merger
    327341####################
    328 
     342 
    329343module Merger EFlowMerger {
    330344# add InputArray InputArray
    331   add InputArray TrackPileUpSubtractor/eflowTracks
    332   add InputArray Calorimeter/eflowTowers
     345  add InputArray Calorimeter/eflowTracks
     346  add InputArray Calorimeter/eflowPhotons
     347  add InputArray Calorimeter/eflowNeutralHadrons
    333348  set OutputArray eflow
    334 }
     349}
     350
    335351
    336352#############
     
    529545module Merger MissingET {
    530546# add InputArray InputArray
    531   add InputArray Calorimeter/eflowTracks
    532   add InputArray Calorimeter/eflowTowers
     547  add InputArray EFlowMerger/eflow
    533548  set MomentumOutputArray momentum
    534549}
     550
    535551
    536552##################
     
    619635##################
    620636
     637
     638# tracks, towers and eflow objects are not stored by default in the output.
     639# if needed (for jet constituent or other studies), uncomment the relevant
     640# "add Branch ..." lines.
     641
     642
    621643module TreeWriter TreeWriter {
    622644# add Branch InputArray BranchName BranchClass
    623645  add Branch Delphes/allParticles Particle GenParticle
    624   add Branch TrackMerger/tracks Track Track
    625   add Branch Calorimeter/towers Tower Tower
     646
     647#  add Branch TrackMerger/tracks Track Track
     648#  add Branch Calorimeter/towers Tower Tower
    626649#  add Branch Calorimeter/eflowTracks EFlowTrack Track
    627 #  add Branch Calorimeter/eflowTowers EFlowTower Tower
     650#  add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
     651#  add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
     652
    628653  add Branch GenJetFinder/jets GenJet Jet
    629654  add Branch UniqueObjectFinder/jets Jet Jet
     
    635660  add Branch Rho/rho Rho Rho
    636661  add Branch PileUpMerger/vertices Vertex Vertex
    637 }
    638 
     662
     663}
     664
     665
     666
  • trunk/examples/delphes_card_CMS.tcl

    r1320 r1357  
    212212
    213213  set EFlowTrackOutputArray eflowTracks
    214   set EFlowTowerOutputArray eflowTowers
     214  set EFlowPhotonOutputArray eflowPhotons
     215  set EFlowNeutralHadronOutputArray eflowNeutralHadrons
    215216
    216217  set pi [expr {acos(-1)}]
     
    283284# add InputArray InputArray
    284285  add InputArray Calorimeter/eflowTracks
    285   add InputArray Calorimeter/eflowTowers
     286  add InputArray Calorimeter/eflowPhotons
     287  add InputArray Calorimeter/eflowNeutralHadrons
    286288  set OutputArray eflow
    287289}
     
    292294
    293295module Efficiency PhotonEfficiency {
    294   set InputArray Calorimeter/photons
     296  set InputArray Calorimeter/eflowPhotons
    295297  set OutputArray photons
    296298
     
    397399module Merger MissingET {
    398400# add InputArray InputArray
    399   add InputArray Calorimeter/eflowTracks
    400   add InputArray Calorimeter/eflowTowers
     401  add InputArray EFlowMerger/eflow
    401402  set MomentumOutputArray momentum
    402403}
     
    457458
    458459 # scale formula for jets
    459   set ScaleFormula {1.08}
     460  set ScaleFormula {1.00}
    460461}
    461462
     
    533534##################
    534535
     536# tracks, towers and eflow objects are not stored by default in the output.
     537# if needed (for jet constituent or other studies), uncomment the relevant
     538# "add Branch ..." lines.
     539
    535540module TreeWriter TreeWriter {
    536541# add Branch InputArray BranchName BranchClass
     542 
    537543  add Branch Delphes/allParticles Particle GenParticle
    538   add Branch TrackMerger/tracks Track Track
    539   add Branch Calorimeter/towers Tower Tower
     544
     545#  add Branch TrackMerger/tracks Track Track
     546#  add Branch Calorimeter/towers Tower Tower
    540547  add Branch Calorimeter/eflowTracks EFlowTrack Track
    541   add Branch Calorimeter/eflowTowers EFlowTower Tower
     548  add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
     549  add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
     550 
    542551  add Branch GenJetFinder/jets GenJet Jet
    543552  add Branch UniqueObjectFinder/jets Jet Jet
  • trunk/examples/delphes_card_CMS_PileUp.tcl

    r1349 r1357  
     1
    12#######################################
    23# Order of execution of various modules
     
    1920  Calorimeter
    2021  TrackPileUpSubtractor
     22  NeutralTowerMerger
    2123  EFlowMerger
    2224
     
    253255
    254256  set EFlowTrackOutputArray eflowTracks
    255   set EFlowTowerOutputArray eflowTowers
     257  set EFlowPhotonOutputArray eflowPhotons
     258  set EFlowNeutralHadronOutputArray eflowNeutralHadrons
    256259
    257260  set pi [expr {acos(-1)}]
     
    334337
    335338####################
     339# Neutral tower merger
     340####################
     341
     342module Merger NeutralTowerMerger {
     343# add InputArray InputArray
     344  add InputArray Calorimeter/eflowPhotons
     345  add InputArray Calorimeter/eflowNeutralHadrons
     346  set OutputArray eflowTowers
     347}
     348
     349
     350####################
    336351# Energy flow merger
    337352####################
     
    340355# add InputArray InputArray
    341356  add InputArray TrackPileUpSubtractor/eflowTracks
    342   add InputArray Calorimeter/eflowTowers
     357  add InputArray Calorimeter/eflowPhotons
     358  add InputArray Calorimeter/eflowNeutralHadrons
    343359  set OutputArray eflow
    344360}
     361
    345362
    346363#############
     
    412429  set JetInputArray FastJetFinder/jets
    413430  set TrackInputArray Calorimeter/eflowTracks
    414   set NeutralInputArray Calorimeter/eflowTowers
     431  set NeutralInputArray NeutralTowerMerger/eflowTowers
    415432
    416433  set VertexInputArray PileUpMerger/vertices
     
    457474
    458475module Efficiency PhotonEfficiency {
    459   set InputArray Calorimeter/photons
     476  set InputArray Calorimeter/eflowPhotons
    460477  set OutputArray photons
    461478
     
    468485                         (abs(eta) > 2.5)                                   * (0.00)}
    469486}
     487
    470488
    471489##################
     
    565583module Merger MissingET {
    566584# add InputArray InputArray
    567   add InputArray Calorimeter/eflowTracks
    568   add InputArray Calorimeter/eflowTowers
     585  add InputArray EFlowMerger/eflow
    569586  set MomentumOutputArray momentum
    570587}
     588
     589
    571590
    572591##################
     
    656675##################
    657676
     677# tracks, towers and eflow objects are not stored by default in the output.
     678# if needed (for jet constituent or other studies), uncomment the relevant
     679# "add Branch ..." lines.
     680
     681
    658682module TreeWriter TreeWriter {
    659683# add Branch InputArray BranchName BranchClass
     684 
    660685  add Branch Delphes/allParticles Particle GenParticle
    661   add Branch TrackMerger/tracks Track Track
    662   add Branch Calorimeter/towers Tower Tower
    663   add Branch Calorimeter/eflowTracks EFlowTrack Track
    664   add Branch Calorimeter/eflowTowers EFlowTower Tower
     686
     687#  add Branch TrackMerger/tracks Track Track
     688#  add Branch Calorimeter/towers Tower Tower
     689#  add Branch Calorimeter/eflowTracks EFlowTrack Track
     690#  add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
     691#  add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
     692
    665693  add Branch GenJetFinder/jets GenJet Jet
    666694  add Branch UniqueObjectFinder/jets Jet Jet
Note: See TracChangeset for help on using the changeset viewer.