Fork me on GitHub

Changeset 360d17e in git


Ignore:
Timestamp:
Aug 26, 2016, 1:36:30 PM (8 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
46fb86c
Parents:
5076b1b
Message:

improve validation code

Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r5076b1b r360d17e  
    148148tmp/examples/Validation.$(ObjSuf): \
    149149        examples/Validation.cpp \
    150         classes/DelphesClasses.h \
    151         external/ExRootAnalysis/ExRootTreeReader.h \
    152         external/ExRootAnalysis/ExRootTreeWriter.h \
    153         external/ExRootAnalysis/ExRootTreeBranch.h \
    154         external/ExRootAnalysis/ExRootResult.h \
    155         external/ExRootAnalysis/ExRootUtilities.h
    156 Validation_electron$(ExeSuf): \
    157         tmp/examples/Validation_electron.$(ObjSuf)
    158 
    159 tmp/examples/Validation_electron.$(ObjSuf): \
    160         examples/Validation_electron.cpp \
    161         classes/DelphesClasses.h \
    162         external/ExRootAnalysis/ExRootTreeReader.h \
    163         external/ExRootAnalysis/ExRootTreeWriter.h \
    164         external/ExRootAnalysis/ExRootTreeBranch.h \
    165         external/ExRootAnalysis/ExRootResult.h \
    166         external/ExRootAnalysis/ExRootUtilities.h
    167 Validation_jet$(ExeSuf): \
    168         tmp/examples/Validation_jet.$(ObjSuf)
    169 
    170 tmp/examples/Validation_jet.$(ObjSuf): \
    171         examples/Validation_jet.cpp \
    172         classes/DelphesClasses.h \
    173         external/ExRootAnalysis/ExRootTreeReader.h \
    174         external/ExRootAnalysis/ExRootTreeWriter.h \
    175         external/ExRootAnalysis/ExRootTreeBranch.h \
    176         external/ExRootAnalysis/ExRootResult.h \
    177         external/ExRootAnalysis/ExRootUtilities.h
    178 Validation_muon$(ExeSuf): \
    179         tmp/examples/Validation_muon.$(ObjSuf)
    180 
    181 tmp/examples/Validation_muon.$(ObjSuf): \
    182         examples/Validation_muon.cpp \
    183         classes/DelphesClasses.h \
    184         external/ExRootAnalysis/ExRootTreeReader.h \
    185         external/ExRootAnalysis/ExRootTreeWriter.h \
    186         external/ExRootAnalysis/ExRootTreeBranch.h \
    187         external/ExRootAnalysis/ExRootResult.h \
    188         external/ExRootAnalysis/ExRootUtilities.h
    189 Validation_photon$(ExeSuf): \
    190         tmp/examples/Validation_photon.$(ObjSuf)
    191 
    192 tmp/examples/Validation_photon.$(ObjSuf): \
    193         examples/Validation_photon.cpp \
    194150        classes/DelphesClasses.h \
    195151        external/ExRootAnalysis/ExRootTreeReader.h \
     
    206162        stdhep2pileup$(ExeSuf) \
    207163        Example1$(ExeSuf) \
    208         Validation$(ExeSuf) \
    209         Validation_electron$(ExeSuf) \
    210         Validation_jet$(ExeSuf) \
    211         Validation_muon$(ExeSuf) \
    212         Validation_photon$(ExeSuf)
     164        Validation$(ExeSuf)
    213165
    214166EXECUTABLE_OBJ +=  \
     
    220172        tmp/converters/stdhep2pileup.$(ObjSuf) \
    221173        tmp/examples/Example1.$(ObjSuf) \
    222         tmp/examples/Validation.$(ObjSuf) \
    223         tmp/examples/Validation_electron.$(ObjSuf) \
    224         tmp/examples/Validation_jet.$(ObjSuf) \
    225         tmp/examples/Validation_muon.$(ObjSuf) \
    226         tmp/examples/Validation_photon.$(ObjSuf)
     174        tmp/examples/Validation.$(ObjSuf)
    227175
    228176DelphesHepMC$(ExeSuf): \
  • examples/Pythia8/configParticleGun.cmnd

    r5076b1b r360d17e  
    33! 1) Settings used in the main program.
    44
    5 Main:numberOfEvents = 100000         ! number of events to generate
     5Main:numberOfEvents = 10000        ! number of events to generate
    66Main:timesAllowErrors = 3          ! how many aborts before run stops
    7 Main:spareFlag1 = on                ! true means particle gun
    8 Main:spareMode1 = ID               ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 22 - single photon
    9 Main:spareParm1 = 10000           ! max pt
     7Main:spareFlag1 = on               ! true means particle gun
     8Main:spareMode1 = 11               ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 15 - single tau, 22 - single photon
     9Main:spareParm1 = 10000            ! max pt
     10Main:spareParm2 = 2.5              ! max eta
    1011
    1112! 2) Settings related to output in init(), next() and stat().
  • examples/Validation.cpp

    r5076b1b r360d17e  
    735735  std::pair<TH1D*,TH1D*> histos_el = GetEff<Electron>(branchElectron, branchParticleElectron, "Electron", elID, treeReaderElectron);
    736736
    737   histos_el.second->SaveAs("test1.pdf");
    738 
    739737  // tracking reconstruction efficiency
    740738  std::pair <TH1D*,TH1D*> histos_eltrack = GetEff<Track>(branchTrackElectron, branchParticleElectron, "electronTrack", elID, treeReaderElectron);
     
    836834  DrawAxis(mg_elFwd, leg_elFwd, 0.2);
    837835
    838   C_el1->Print("validation.pdf(","pdf");
    839   C_el2->Print("validation.pdf","pdf");
     836  C_el1->Print("delphes_validation.pdf(","pdf");
     837  C_el2->Print("delphes_validation.pdf","pdf");
    840838
    841839  gDirectory->cd(0);
     
    937935  DrawAxis(mg_muFwd, leg_muFwd, 0.3);
    938936
    939   //C_mu1->SaveAs(muEff+".eps");
    940   //C_mu->SaveAs(muRes+".eps");
    941 
    942   C_mu1->Print("validation.pdf","pdf");
    943   C_mu->Print("validation.pdf","pdf");
     937  C_mu1->Print("delphes_validation.pdf","pdf");
     938  C_mu->Print("delphes_validation.pdf","pdf");
    944939
    945940  gDirectory->cd(0);
     
    10081003  leg_ph2->Draw();
    10091004
    1010   C_ph1->SaveAs(phEff+".eps");
    1011 
    10121005  TString phRes = "phERes";
    10131006  TString phResFwd = "phEResFwd";
     
    10431036  DrawAxis(mg_phFwd, leg_phFwd, 0.3);
    10441037
    1045   C_ph->SaveAs(phRes+".eps");
    1046 
    1047   C_ph1->Print("validation.pdf","pdf");
    1048   C_ph->Print("validation.pdf","pdf");
     1038  C_ph1->Print("delphes_validation.pdf","pdf");
     1039  C_ph->Print("delphes_validation.pdf","pdf");
    10491040
    10501041  gDirectory->cd(0);
     
    11771168  DrawAxis(mg_jetFwd, leg_jetFwd, 0.25);
    11781169
    1179   C_btag1->SaveAs(btagEff+".eps");
    1180   C_jet->SaveAs(jetRes+".eps");
    1181 
    11821170  TString metRes = "MetRes";
    11831171  TCanvas *C_met = new TCanvas(metRes,metRes, 800, 600);
     
    11991187  mg_met->GetYaxis()->SetTitle("#sigma(ME_{x}) [GeV]");
    12001188
    1201   C_met->SaveAs(metRes+".eps");
    1202 
    1203   C_jet->Print("validation.pdf","pdf");
    1204   C_btag1->Print("validation.pdf","pdf");
    1205   C_tautag1->Print("validation.pdf","pdf");
    1206   C_met->Print("validation.pdf)","pdf");
     1189  C_jet->Print("delphes_validation.pdf","pdf");
     1190  C_btag1->Print("delphes_validation.pdf","pdf");
     1191  C_tautag1->Print("delphes_validation.pdf","pdf");
     1192  C_met->Print("delphes_validation.pdf)","pdf");
    12071193
    12081194  TFile *fout = new TFile(outputFile,"recreate");
  • examples/validation.sh

    r5076b1b r360d17e  
    1 #!/bin/bash
     1#! /bin/sh
    22function runParticleGun {
    3     in=$1
    4     ID=$2
    5     outcmnd="examples/Pythia8/configParticleGun$in.cmnd"
    6     sed 's/ID/'$ID'/g' examples/Pythia8/configParticleGun.cmnd > $outcmnd
    7     ./DelphesPythia8 cards/delphes_card_CMS.tcl $outcmnd delphes_ParticleGun$in.root
     3  name=$1
     4  pid=$2
     5  cmnd="examples/Pythia8/configParticleGun_$name.cmnd"
     6  sed '/Main:spareMode1/s/=[[:space:]]*[0-9]*/= '$pid'/' examples/Pythia8/configParticleGun.cmnd > $cmnd
     7  ./DelphesPythia8 cards/delphes_card_CMS.tcl $cmnd delphes_ParticleGun_$name.root
    88}
    9 runParticleGun el 11
    10 runParticleGun mu 13
    11 runParticleGun ph 22
    12 runParticleGun b 5
     9
     10runParticleGun electron 11
     11runParticleGun muon 13
     12runParticleGun photon 22
    1313runParticleGun jet 1
    14 runParticleGun tau 15
     14runParticleGun bjet 5
     15runParticleGun taujet 15
    1516
    16 ./Validation delphes_ParticleGunel.root delphes_ParticleGunmu.root delphes_ParticleGunph.root delphes_ParticleGunjet.root delphes_ParticleGunb.root delphes_ParticleGuntau.root validation.root
    17 
     17./Validation delphes_ParticleGun_electron.root delphes_ParticleGun_muon.root delphes_ParticleGun_photon.root delphes_ParticleGun_jet.root delphes_ParticleGun_bjet.root delphes_ParticleGun_taujet.root delphes_validation.root
Note: See TracChangeset for help on using the changeset viewer.