Fork me on GitHub

Changeset 49234af in git for examples


Ignore:
Timestamp:
Dec 9, 2014, 1:27:13 PM (10 years ago)
Author:
Michele <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
37deb3b, 9e991f8
Parents:
f6b6ee7 (diff), e7e90df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'TestFastJet310b1'

Location:
examples
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • examples/Example1.C

    rf6b6ee7 r49234af  
    11/*
     2Simple macro showing how to access branches from the delphes output root file,
     3loop over events, and plot simple quantities such as the jet pt and the di-electron invariant
     4mass.
     5
    26root -l examples/Example1.C'("delphes_output.root")'
    37*/
     
    4145     
    4246      // Print jet transverse momentum
    43       cout << jet->PT << endl;
     47      cout << "Jet pt: "<<jet->PT << endl;
    4448    }
    4549
     
    6266  histMass->Draw();
    6367}
     68
  • examples/Example2.C

    rf6b6ee7 r49234af  
    11/*
     2Simple macro showing how to access branches from the delphes output root file,
     3loop over events, store histograms in a root file and print them as image files. 
     4
    25root -l examples/Example2.C'("delphes_output.root")'
    36*/
  • examples/Example3.C

    rf6b6ee7 r49234af  
    11/*
     2This macro shows how to access the particle-level reference for reconstructed objects.
     3It is also shown how to loop over the jet constituents.
     4
    25root -l examples/Example3.C'("delphes_output.root")'
    36*/
     
    3639
    3740  plots->fElectronDeltaPT = result->AddHist1D(
    38     "electron delta pt", "(p_{T}^{particle} - p_{T}^{electron})/p_{T}^{particle}",
     41    "electron_delta_pt", "(p_{T}^{particle} - p_{T}^{electron})/p_{T}^{particle}",
    3942    "(p_{T}^{particle} - p_{T}^{electron})/p_{T}^{particle}", "number of electrons",
    4043    100, -0.1, 0.1);
    4144
    4245  plots->fElectronDeltaEta = result->AddHist1D(
    43     "electron delta eta", "(#eta^{particle} - #eta^{electron})/#eta^{particle}",
     46    "electron_delta_eta", "(#eta^{particle} - #eta^{electron})/#eta^{particle}",
    4447    "(#eta^{particle} - #eta^{electron})/#eta^{particle}", "number of electrons",
    4548    100, -0.1, 0.1);
    4649
    4750  plots->fPhotonDeltaPT = result->AddHist1D(
    48     "photon delta pt", "(p_{T}^{particle} - p_{T}^{photon})/p_{T}^{particle}",
     51    "photon_delta_pt", "(p_{T}^{particle} - p_{T}^{photon})/p_{T}^{particle}",
    4952    "(p_{T}^{particle} - p_{T}^{photon})/p_{T}^{particle}", "number of photons",
    5053    100, -0.1, 0.1);
    5154
    5255  plots->fPhotonDeltaEta = result->AddHist1D(
    53     "photon delta eta", "(#eta^{particle} - #eta^{photon})/#eta^{particle}",
     56    "photon_delta_eta", "(#eta^{particle} - #eta^{photon})/#eta^{particle}",
    5457    "(#eta^{particle} - #eta^{photon})/#eta^{particle}", "number of photons",
    5558    100, -0.1, 0.1);
    5659
    5760  plots->fPhotonDeltaE = result->AddHist1D(
    58     "photon delta energy", "(E^{particle} - E^{photon})/E^{particle}",
     61    "photon_delta_energy", "(E^{particle} - E^{photon})/E^{particle}",
    5962    "(E^{particle} - E^{photon})/E^{particle}", "number of photons",
    6063    100, -0.1, 0.1);
    6164
    6265  plots->fMuonDeltaPT = result->AddHist1D(
    63     "muon delta pt", "(p_{T}^{particle} - p_{T}^{muon})/p_{T}^{particle}",
     66    "muon_delta_pt", "(p_{T}^{particle} - p_{T}^{muon})/p_{T}^{particle}",
    6467    "(p_{T}^{particle} - p_{T}^{muon})/p_{T}^{particle}", "number of muons",
    6568    100, -0.1, 0.1);
    6669
    6770  plots->fMuonDeltaEta = result->AddHist1D(
    68     "muon delta eta", "(#eta^{particle} - #eta^{muon})/#eta^{particle}",
     71    "muon_delta_eta", "(#eta^{particle} - #eta^{muon})/#eta^{particle}",
    6972    "(#eta^{particle} - #eta^{muon})/#eta^{particle}", "number of muons",
    7073    100, -0.1, 0.1);
    7174
    7275  plots->fTrackDeltaPT = result->AddHist1D(
    73     "track delta pt", "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}",
     76    "track_delta_pt", "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}",
    7477    "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}", "number of tracks",
    7578    100, -0.1, 0.1);
    7679
    7780  plots->fTrackDeltaEta = result->AddHist1D(
    78     "track delta eta", "(#eta^{particle} - #eta^{track})/#eta^{particle}",
     81    "track_delta_eta", "(#eta^{particle} - #eta^{track})/#eta^{particle}",
    7982    "(#eta^{particle} - #eta^{track})/#eta^{particle}", "number of tracks",
    8083    100, -0.1, 0.1);
    8184
    8285  plots->fJetDeltaPT = result->AddHist1D(
    83     "jet delta pt", "(p_{T}^{jet} - p_{T}^{constituents})/p_{T}^{jet}",
     86    "jet_delta_pt", "(p_{T}^{jet} - p_{T}^{constituents})/p_{T}^{jet}",
    8487    "(p_{T}^{jet} - p_{T}^{constituents})/p_{T}^{jet}", "number of jets",
    8588    100, -1.0e-1, 1.0e-1);
     
    179182    }
    180183
    181     cout<<"--  New event -- "<<endl;
     184  //  cout<<"--  New event -- "<<endl;
    182185
    183186    // Loop over all jets in event
     
    188191      momentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
    189192
    190       cout<<"Looping over jet constituents. Jet pt: "<<jet->PT<<", eta: "<<jet->Eta<<", phi: "<<jet->Phi<<endl;     
     193      //cout<<"Looping over jet constituents. Jet pt: "<<jet->PT<<", eta: "<<jet->Eta<<", phi: "<<jet->Phi<<endl;     
    191194
    192195      // Loop over all jet's constituents
     
    201204        {
    202205          particle = (GenParticle*) object;
    203           cout << "    GenPart pt: " << particle->PT << ", eta: " << particle->Eta << ", phi: " << particle->Phi << endl;
     206          //cout << "    GenPart pt: " << particle->PT << ", eta: " << particle->Eta << ", phi: " << particle->Phi << endl;
    204207          momentum += particle->P4();
    205208        }
     
    207210        {
    208211          track = (Track*) object;
    209           cout << "    Track pt: " << track->PT << ", eta: " << track->Eta << ", phi: " << track->Phi << endl;
     212          //cout << "    Track pt: " << track->PT << ", eta: " << track->Eta << ", phi: " << track->Phi << endl;
    210213          momentum += track->P4();
    211214        }
     
    213216        {
    214217          tower = (Tower*) object;
    215           cout << "    Tower pt: " << tower->ET << ", eta: " << tower->Eta << ", phi: " << tower->Phi << endl;
     218          //cout << "    Tower pt: " << tower->ET << ", eta: " << tower->Eta << ", phi: " << tower->Phi << endl;
    216219          momentum += tower->P4();
    217         }
    218         else if(object->IsA() == Muon::Class())
    219         {
    220           muon = (Muon*) object;
    221           cout << "    Muon pt: " << muon->PT << ", eta: " << muon->Eta << ", phi: " << muon->Phi << endl;
    222           momentum += muon->P4();
    223220        }
    224221      }
  • examples/delphes_card_ATLAS.tcl

    rf6b6ee7 r49234af  
    2929  MissingET
    3030
     31  NeutrinoFilter
    3132  GenJetFinder
    3233  FastJetFinder
     
    206207  set PhotonOutputArray photons
    207208
     209  set EcalTowerMinEnergy 0.50
     210  set HcalTowerMinEnergy 1.00
     211
     212  set EcalTowerMinSignificance 1.0
     213  set HcalTowerMinSignificance 1.0
     214 
    208215  set EFlowTrackOutputArray eflowTracks
    209216  set EFlowPhotonOutputArray eflowPhotons
     
    266273  set HCalResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \
    267274                             (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \
    268                              (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.9420^2 + energy*0.075^2)}
     275                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
    269276}
    270277
     
    406413}
    407414
     415
     416#####################
     417# Neutrino Filter
     418#####################
     419
     420module PdgCodeFilter NeutrinoFilter {
     421 
     422  set InputArray Delphes/stableParticles
     423  set OutputArray filteredParticles
     424
     425  set PTMin 0.0
     426 
     427  add PdgCode {12}
     428  add PdgCode {14}
     429  add PdgCode {16}
     430  add PdgCode {-12}
     431  add PdgCode {-14}
     432  add PdgCode {-16}
     433
     434}
     435
    408436#####################
    409437# MC truth jet finder
     
    411439
    412440module FastJetFinder GenJetFinder {
    413   set InputArray Delphes/stableParticles
     441  set InputArray NeutrinoFilter/filteredParticles
    414442
    415443  set OutputArray jets
     
    422450}
    423451
     452
    424453############
    425454# Jet finder
     
    446475  set OutputArray jets
    447476
    448  # scale formula for jets
    449   set ScaleFormula {1.00}
     477  # scale formula for jets
     478  set ScaleFormula {  sqrt( (3.0 - 0.2*(abs(eta)))^2 / pt + 1.0 )  }
    450479}
    451480
  • examples/delphes_card_ATLAS_PileUp.tcl

    rf6b6ee7 r49234af  
    2020  TrackPileUpSubtractor
    2121  NeutralTowerMerger
     22  EFlowMergerAllTracks
    2223  EFlowMerger
    23 
     24 
     25  NeutrinoFilter
    2426  GenJetFinder
    2527
     
    246248  set TowerOutputArray towers
    247249  set PhotonOutputArray photons
     250
     251  set EcalTowerMinEnergy 0.50
     252  set HcalTowerMinEnergy 1.00
     253
     254  set EcalTowerMinSignificance 1.0
     255  set HcalTowerMinSignificance 1.0
    248256
    249257  set EFlowTrackOutputArray eflowTracks
     
    307315  set HCalResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \
    308316                             (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \
    309                              (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.9420^2 + energy*0.075^2)}
     317                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
    310318}
    311319
     
    334342  add InputArray Calorimeter/eflowNeutralHadrons
    335343  set OutputArray eflowTowers
     344}
     345
     346##################################
     347# Energy flow merger (all tracks)
     348##################################
     349
     350module Merger EFlowMergerAllTracks {
     351# add InputArray InputArray
     352  add InputArray TrackMerger/tracks
     353  add InputArray Calorimeter/eflowPhotons
     354  add InputArray Calorimeter/eflowNeutralHadrons
     355  set OutputArray eflow
    336356}
    337357
     
    349369}
    350370
    351 
    352371#############
    353372# Rho pile-up
    354373#############
    355374
    356 module FastJetFinder Rho {
     375module FastJetGridMedianEstimator Rho {
     376 
    357377  set InputArray Calorimeter/towers
    358 
    359   set ComputeRho true
    360378  set RhoOutputArray rho
    361379
    362   # area algorithm: 0 Do not compute area, 1 Active area explicit ghosts, 2 One ghost passive area, 3 Passive area, 4 Voronoi, 5 Active area
    363   set AreaAlgorithm 5
    364 
    365   # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
    366   set JetAlgorithm 4
    367   set ParameterR 0.6
    368   set GhostEtaMax 5.0
    369   set RhoEtaMax 5.0
    370 
    371   add RhoEtaRange 0.0 5.0
    372 
    373   set JetPTMin 0.0
     380  # etamin etamax gridsize_eta gridsize_phi
     381 
     382  add GridRange 0.0 2.5 0.5 0.5
     383  add GridRange 2.5 5.0 0.5 0.5
     384
     385}
     386
     387
     388#####################
     389# Neutrino Filter
     390#####################
     391
     392module PdgCodeFilter NeutrinoFilter {
     393 
     394  set InputArray Delphes/stableParticles
     395  set OutputArray filteredParticles
     396
     397  set PTMin 0.0
     398 
     399  add PdgCode {12}
     400  add PdgCode {14}
     401  add PdgCode {16}
     402  add PdgCode {-12}
     403  add PdgCode {-14}
     404  add PdgCode {-16}
     405
    374406}
    375407
     
    379411
    380412module FastJetFinder GenJetFinder {
    381   set InputArray Delphes/stableParticles
     413  set InputArray NeutrinoFilter/filteredParticles
    382414
    383415  set OutputArray jets
     
    545577module Merger MissingET {
    546578# add InputArray InputArray
    547   add InputArray EFlowMerger/eflow
     579  add InputArray EFlowMergerAllTracks/eflow
    548580  set MomentumOutputArray momentum
    549581}
     
    644676
    645677#  add Branch TrackMerger/tracks Track Track
    646 #  add Branch Calorimeter/towers Tower Tower
     678  add Branch Calorimeter/towers Tower Tower
    647679
    648680#  add Branch Calorimeter/eflowTracks EFlowTrack Track
  • examples/delphes_card_CMS.tcl

    rf6b6ee7 r49234af  
    2929  MissingET
    3030
     31  NeutrinoFilter
    3132  GenJetFinder
    3233  FastJetFinder
     
    211212  set PhotonOutputArray photons
    212213
     214  set EcalTowerMinEnergy 0.5
     215  set HcalTowerMinEnergy 1.0
     216
     217  set EcalTowerMinSignificance 1.0
     218  set HcalTowerMinSignificance 1.0
     219   
    213220  set EFlowTrackOutputArray eflowTracks
    214221  set EFlowPhotonOutputArray eflowPhotons
     
    416423}
    417424
     425
     426#####################
     427# Neutrino Filter
     428#####################
     429
     430module PdgCodeFilter NeutrinoFilter {
     431 
     432  set InputArray Delphes/stableParticles
     433  set OutputArray filteredParticles
     434
     435  set PTMin 0.0
     436 
     437  add PdgCode {12}
     438  add PdgCode {14}
     439  add PdgCode {16}
     440  add PdgCode {-12}
     441  add PdgCode {-14}
     442  add PdgCode {-16}
     443
     444}
     445
     446
    418447#####################
    419448# MC truth jet finder
     
    421450
    422451module FastJetFinder GenJetFinder {
    423   set InputArray Delphes/stableParticles
     452  set InputArray NeutrinoFilter/filteredParticles
    424453
    425454  set OutputArray jets
     
    432461}
    433462
     463
     464
     465
    434466############
    435467# Jet finder
     
    457489  set OutputArray jets
    458490
    459  # scale formula for jets
    460   set ScaleFormula {1.00}
     491  # scale formula for jets
     492  set ScaleFormula {sqrt( (2.5 - 0.15*(abs(eta)))^2 / pt + 1.0 )}
    461493}
    462494
  • examples/delphes_card_CMS_PileUp.tcl

    rf6b6ee7 r49234af  
    1 
    21#######################################
    32# Order of execution of various modules
     
    2120  TrackPileUpSubtractor
    2221  NeutralTowerMerger
     22  EFlowMergerAllTracks
    2323  EFlowMerger
    24 
     24 
     25  NeutrinoFilter
    2526  GenJetFinder
    2627
     
    6768
    6869  # average expected pile up
    69   set MeanPileUp 10
     70  set MeanPileUp 50
    7071
    7172  # maximum spread in the beam direction in m
     
    253254  set TowerOutputArray towers
    254255  set PhotonOutputArray photons
     256
     257  set EcalTowerMinEnergy 0.5
     258  set HcalTowerMinEnergy 1.0
     259
     260  set EcalTowerMinSignificance 1.0
     261  set HcalTowerMinSignificance 1.0
    255262
    256263  set EFlowTrackOutputArray eflowTracks
     
    347354}
    348355
     356##################################
     357# Energy flow merger (all tracks)
     358##################################
     359
     360module Merger EFlowMergerAllTracks {
     361# add InputArray InputArray
     362  add InputArray TrackMerger/tracks
     363  add InputArray Calorimeter/eflowPhotons
     364  add InputArray Calorimeter/eflowNeutralHadrons
     365  set OutputArray eflow
     366}
     367
    349368
    350369####################
     
    361380
    362381
     382
    363383#############
    364384# Rho pile-up
    365385#############
    366386
    367 module FastJetFinder Rho {
    368 #  set InputArray Calorimeter/towers
     387module FastJetGridMedianEstimator Rho {
     388 
    369389  set InputArray EFlowMerger/eflow
    370 
    371   set ComputeRho true
    372390  set RhoOutputArray rho
    373391
    374   # area algorithm: 0 Do not compute area, 1 Active area explicit ghosts, 2 One ghost passive area, 3 Passive area, 4 Voronoi, 5 Active area
    375   set AreaAlgorithm 5
    376 
    377   # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
    378   set JetAlgorithm 4
    379   set ParameterR 0.6
    380   set GhostEtaMax 5.0
    381 
    382   add RhoEtaRange 0.0 2.5
    383   add RhoEtaRange 2.5 5.0
    384 
    385   set JetPTMin 0.0
    386 }
     392  # etamin etamax gridsize_eta gridsize_phi
     393 
     394  add GridRange 0.0 2.5 1.0 1.0
     395  add GridRange 2.5 5.0 1.0 1.0
     396
     397}
     398
     399#####################
     400# Neutrino Filter
     401#####################
     402
     403module PdgCodeFilter NeutrinoFilter {
     404 
     405  set InputArray Delphes/stableParticles
     406  set OutputArray filteredParticles
     407
     408  set PTMin 0.0
     409 
     410  add PdgCode {12}
     411  add PdgCode {14}
     412  add PdgCode {16}
     413  add PdgCode {-12}
     414  add PdgCode {-14}
     415  add PdgCode {-16}
     416
     417}
     418
     419
    387420
    388421#####################
     
    391424
    392425module FastJetFinder GenJetFinder {
    393   set InputArray Delphes/stableParticles
     426  set InputArray NeutrinoFilter/filteredParticles
    394427
    395428  set OutputArray jets
     
    583616module Merger MissingET {
    584617# add InputArray InputArray
    585   add InputArray EFlowMerger/eflow
     618  add InputArray EFlowMergerAllTracks/eflow
    586619  set MomentumOutputArray momentum
    587620}
  • examples/delphes_card_FCC_basic.tcl

    rf6b6ee7 r49234af  
    2424
    2525  MissingET
    26 
     26 
     27  NeutrinoFilter
    2728  GenJetFinder
    2829  FastJetFinder
     
    394395
    395396#####################
     397# Neutrino Filter
     398#####################
     399
     400module PdgCodeFilter NeutrinoFilter {
     401 
     402  set InputArray Delphes/stableParticles
     403  set OutputArray filteredParticles
     404
     405  set PTMin 0.0
     406 
     407  add PdgCode {12}
     408  add PdgCode {14}
     409  add PdgCode {16}
     410  add PdgCode {-12}
     411  add PdgCode {-14}
     412  add PdgCode {-16}
     413
     414}
     415
     416
     417#####################
    396418# MC truth jet finder
    397419#####################
    398420
    399421module FastJetFinder GenJetFinder {
    400   set InputArray Delphes/stableParticles
     422  set InputArray NeutrinoFilter/filteredParticles
    401423
    402424  set OutputArray jets
Note: See TracChangeset for help on using the changeset viewer.