Fork me on GitHub

Changeset d77b51d in git


Ignore:
Timestamp:
Sep 29, 2015, 2:08:10 PM (9 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
a98c7ef
Parents:
d870fc5 (diff), 06ec139 (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 remote-tracking branch 'upstream/master'

Files:
38 added
2 deleted
95 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rd870fc5 rd77b51d  
     13.3.0:
     2- updated FastJet library to 3.1.2
     3- added a detector card for the ILD detector (for ILC)  based on http://arxiv.org/abs/1306.6329
     4- adapted examples, EventDisplay, DelphesFormula and DelphesTF2 to ROOT 6.04
     5- fixed tau-tagging for events without tau (thanks to Sho Iwamoto)
     6- added PhotonConversions module
     7- added TaggingParticlesSkimmer module
     8- added phi and energy dependence to AngularSmearing, BTagging, Efficiency, EnergyScale, EnergySmearing, IdentificationMap, ImpactParameterSmearing and MomentumSmearing
     9- added IsRecoPU flag and PTMin parameter to TrackPileUpSubtractor
     10- added Invert and Status options to PdgCodeFilter (thanks to Chase Shimmin)
     11- added new isolation variables to Candidate, Electron, Muon and Photon classes (thanks to Raffaele Gerosa)
     12- added code from CMS to PileUpMerger and PileUpMergerPythia8
     13- added timing information to Calorimeter
     14- added new PileUpJetID version (thanks to Seth Senz)
     15- added Area 4-vector to jet class
     16- added PUPPI algorithm and RunPUPPI module
     17- added RecursiveTools package from fastjet contribs
     18- replaced N-subjettiness with an array in Jet class (same as in Candidate class)
     19- added Trimming, Pruning and SoftDrop to FastJetFinder
     20- added possibility to use DelphesPythia8 with LHE files
     21- added Pythia8 examples
     22- added JetFlavourAssociation module with Physics and Algorithmic definitions of the jet flavor
     23- added new jet flavor definitions to the BTagging module (available only when running DelphesPythia8 with LHE files)
     24
    1253.2.0:
    2   moved code repository to [GitHub](http://github.com/delphes/delphes)
    3   moved configuration files from examples to cards directory
    4   new event display, with automatic discovery of the object collections, navigation controls, and 3D  geometry sketch (for more details, see [event display manual](/workbook/event-display))
    5   updated FastJet library to 3.1.0
    6   added zero suppression in Calorimeter modules
    7   added FastJetGridMedianEstimator module (provides fixed grid eta-dependent average pile-up density)
    8   added AngularSmearing module (to smear track eta,phi)
    9   added PdgCodeFilter (to veto particle with given PID from collections)
    10   added IdentificationMap (allows to apply (mis)-identification)
    11   added Example4.C (provide and example on how to compute the jet energy scale)
    12   added examples (examples/ExternalFastJetBasic.cpp and examples/ExternalFastJetHepMC.cpp) on how to run Delphes as a library with external FastJet installation
    13   updated example for FCC studies (cards/delphes_card_FCC_basic.tcl)
    14   added example for LHCb studies (cards/delphes_card_LHCb.tcl)
     26- moved code repository to GitHub (http://github.com/delphes/delphes)
     27- moved configuration files from examples to cards directory
     28- new event display, with automatic discovery of the object collections, navigation controls, and 3D geometry sketch (for more details, see WorkBook/EventDisplay)
     29- updated FastJet library to 3.1.0
     30- added zero suppression to Calorimeter and SimpleCalorimeter modules
     31- added SmearTowerCenter configuration parameter to Calorimeter and SimpleCalorimeter modules (#363)
     32- added FastJetGridMedianEstimator module (provides much faster pile-up subtraction based on a fixed grid eta-dependent average pile-up density computation)
     33- added AngularSmearing module (to smear track eta,phi)
     34- added PdgCodeFilter (to veto particle with given PID from collections)
     35- added IdentificationMap (allows to apply (mis)-identification)
     36- added Example4.C (provides an example on how to compute the jet energy scale)
     37- added examples (examples/ExternalFastJet) on how to run Delphes as a library with external FastJet installation
     38- updated card for FCC studies (cards/delphes_card_FCC_basic.tcl)
     39- added card for LHCb studies (cards/delphes_card_LHCb.tcl)
     40- made interface with Pythia 8 turned off by default
     41- adapted Isolation module to new energy-flow photons and neutral hadrons (#362)
     42- fixed jet mass calculation for anti-kt with "winner-take-all" (#355)
     43- fixed crashing of root2lhco when ROOT file doesn't contain all required branches (#340)
     44- added possibility to build Delphes with CMake (#313)
    1545
    16463.1.2:
    17   fixed smearing of (z,t) vertex distribution in the PileUpMerger module
     47- fixed smearing of (z,t) vertex distribution in the PileUpMerger module
    1848
    19493.1.1:
    20   adapted DelphesSTDHEP to the latest version of the STDHEP format introduced in MadGraph5_aMC@NLO 2.1.2
     50- adapted DelphesSTDHEP to the latest version of the STDHEP format introduced in MadGraph5_aMC@NLO 2.1.2
    2151
    22523.1.0:
    2353  added Hector module (fast simulator for the transport of particles in beam lines)
    24   added N-subjettiness and N-jettiness (to identify boosted hadronically-decaying objects like electroweak bosons and top quarks)
    25   added SimpleCalorimeter module (to study effects of different granularity in ECAL and HCAL)
    26   added ImpactParameterSmearing (to smear transverse and longitudinal track impact parameter needed for track counting b-tagging)
    27   added TrackCountingBTagging module (for simple b-tagging algorithm based on counting tracks with large impact parameter)
    28   added basic card for FCC studies (examples/delphes_card_FCC_basic.tcl)
     54- added N-subjettiness and N-jettiness (to identify boosted hadronically-decaying objects like electroweak bosons and top quarks)
     55- added SimpleCalorimeter module (to study effects of different granularity in ECAL and HCAL)
     56- added ImpactParameterSmearing (to smear transverse and longitudinal track impact parameter needed for track counting b-tagging)
     57- added TrackCountingBTagging module (for simple b-tagging algorithm based on counting tracks with large impact parameter)
     58- added basic card for FCC studies (examples/delphes_card_FCC_basic.tcl)
    2959
    30603.0.12:
    31   updated FastJet library to 3.0.6
    32   added smearing of (z,t) vertex distribution in the PileUpMerger module
    33   propagation time computed for every output collection
    34   added TimeSmearing module (for propagation time measurement)
    35   added PileUpJetId module (thanks to Seth Senz)
     61- updated FastJet library to 3.0.6
     62- added smearing of (z,t) vertex distribution in the PileUpMerger module
     63- propagation time computed for every output collection
     64- added TimeSmearing module (for propagation time measurement)
     65- added PileUpJetId module (thanks to Seth Senz)
    3666
    37673.0.11:
    38   new energy-flow algorithm, optimized for better compatibility with pile-up subtraction
    39   added possibility of computing pile-up density in different eta regions via the RhoEtaRange parameter in FastJetFinder module
    40   implemented correct efficiency/resolution for high pt muons in CMS cards
    41   removed pile-up subtraction on missing energy
    42   added possibility to read re-weighting information from LHEF input files
    43   added UsePTSum and PTSumMax parameters to isolation module
    44   added possibility of specifying the shape of pile-up distribution (via the PileUpDistribution parameter in the PileUpMerger module)
    45   added pile-up Vertex collection to the output tree
     68- new energy-flow algorithm, optimized for better compatibility with pile-up subtraction
     69- added possibility of computing pile-up density in different eta regions via the RhoEtaRange parameter in FastJetFinder module
     70- implemented correct efficiency/resolution for high pt muons in CMS cards
     71- removed pile-up subtraction on missing energy
     72- added possibility to read re-weighting information from LHEF input files
     73- added UsePTSum and PTSumMax parameters to isolation module
     74- added possibility of specifying the shape of pile-up distribution (via the PileUpDistribution parameter in the PileUpMerger module)
     75- added pile-up Vertex collection to the output tree
    4676
    47773.0.10:
    48   new readers (DelphesProMC.cpp, DelphesProMC.py (#220), DelphesPythia8)
    49   new modules (EnergyScale, PileUpMergerPythia8, Weighter)
    50   new module parameters (absolute/relative isolation (#187), flat/poisson pile-up distribution)
    51   new global parameters (max number of events, skip events (#183), random seed (#202))
    52   new branches (pile-up event density rho, MC event weight)
    53   updated CMS and ALTAS detector cards (and added ATLAS pile-up detector card)
    54   calorimeter smearing is now performed according to a logNormal distribution
    55   improved particle-flow algorithm (#204)
    56   added calculation of particle propagation time in the tracker
    57   fixed tau-jet matching by only considering visible hadronic tau (#208)
    58   read masses from MC event file (#195, #201)
    59   bug fixes in DelphesCMSFWLite (#196)
    60   compilable analysis macro examples (#182)
    61   ability to read MC re-weighting information from LHE files
     78- new readers (DelphesProMC.cpp, DelphesProMC.py (#220), DelphesPythia8)
     79- new modules (EnergyScale, PileUpMergerPythia8, Weighter)
     80- new module parameters (absolute/relative isolation (#187), flat/poisson pile-up distribution)
     81- new global parameters (max number of events, skip events (#183), random seed (#202))
     82- new branches (pile-up event density rho, MC event weight)
     83- updated CMS and ALTAS detector cards (and added ATLAS pile-up detector card)
     84- calorimeter smearing is now performed according to a logNormal distribution
     85- improved particle-flow algorithm (#204)
     86- added calculation of particle propagation time in the tracker
     87- fixed tau-jet matching by only considering visible hadronic tau (#208)
     88- read masses from MC event file (#195, #201)
     89- bug fixes in DelphesCMSFWLite (#196)
     90- compilable analysis macro examples (#182)
     91- ability to read MC re-weighting information from LHE files
    6292
    63933.0.9:
    64   fixed reading of weighted STDHEP events (#181)
    65   fixed script building Delphes with CMSFWLite (#180)
    66   added more particles to StatusPidFilter (#179)
     94- fixed reading of weighted STDHEP events (#181)
     95- fixed script building Delphes with CMSFWLite (#180)
     96- added more particles to StatusPidFilter (#179)
    6797
    68983.0.8:
    69   fixed treatment of units in HepMC format (#175)
    70   added Weight to HepMCEvent branch to store the event weight (#173)
    71   added Rho branch to store the rho energy density (#176)
    72   added random rotation of pile-up events around the z-axis
     99- fixed treatment of units in HepMC format (#175)
     100- added Weight to HepMCEvent branch to store the event weight (#173)
     101- added Rho branch to store the rho energy density (#176)
     102- added random rotation of pile-up events around the z-axis
    73103
    741043.0.7:
    75   added separate make rule for the event display to fix the compilation problem for systems without OpenGL libraries (#168, #127)
    76   added Cloner module
    77   modified BTagging module (several BTagging bits can be stored for the same jet collection, see here)
     105- added separate make rule for the event display to fix the compilation problem for systems without OpenGL libraries (#168, #127)
     106- added Cloner module
     107- modified BTagging module (several BTagging bits can be stored for the same jet collection, see here)
  • Makefile

    rd870fc5 rd77b51d  
    2929OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
    3030endif
    31 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
     31OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsCommon -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon
    3232endif
    3333
     
    4040ifneq ($(PYTHIA8),)
    4141#HAS_PYTHIA8 = true
    42 #CXXFLAGS += -I$(PYTHIA8)/include
    43 #CXXFLAGS += -I$(PYTHIA8)/include/Pythia8
    44 #OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl
     42CXXFLAGS += -I$(PYTHIA8)/include
     43CXXFLAGS += -I$(PYTHIA8)/include/Pythia8
     44OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl
    4545endif
    4646
     
    257257        classes/DelphesClasses.h \
    258258        classes/DelphesFactory.h \
     259        classes/DelphesLHEFReader.h \
    259260        external/ExRootAnalysis/ExRootTreeWriter.h \
    260261        external/ExRootAnalysis/ExRootTreeBranch.h \
     
    308309        modules/Delphes.h \
    309310        modules/AngularSmearing.h \
     311        modules/PhotonConversions.h \
    310312        modules/ParticlePropagator.h \
    311313        modules/Efficiency.h \
     
    329331        modules/JetPileUpSubtractor.h \
    330332        modules/TrackPileUpSubtractor.h \
     333        modules/TaggingParticlesSkimmer.h \
    331334        modules/PileUpJetID.h \
    332335        modules/ConstituentFilter.h \
     
    336339        modules/Weighter.h \
    337340        modules/Hector.h \
     341        modules/JetFlavorAssociation.h \
     342        modules/JetFakeParticle.h \
    338343        modules/ExampleModule.h
    339344ModulesDict$(PcmSuf): \
     
    353358        modules/FastJetLinkDef.h \
    354359        modules/FastJetFinder.h \
    355         modules/FastJetGridMedianEstimator.h
     360        modules/FastJetGridMedianEstimator.h \
     361        modules/RunPUPPI.h
    356362FastJetDict$(PcmSuf): \
    357363        tmp/modules/FastJetDict$(PcmSuf) \
     
    386392        classes/DelphesFactory.h \
    387393        classes/SortableObject.h
     394tmp/classes/DelphesCylindricalFormula.$(ObjSuf): \
     395        classes/DelphesCylindricalFormula.$(SrcSuf) \
     396        classes/DelphesCylindricalFormula.h
    388397tmp/classes/DelphesFactory.$(ObjSuf): \
    389398        classes/DelphesFactory.$(SrcSuf) \
     
    534543        classes/DelphesClasses.h \
    535544        classes/DelphesFactory.h \
    536         classes/DelphesFormula.h \
    537         external/ExRootAnalysis/ExRootResult.h \
    538         external/ExRootAnalysis/ExRootFilter.h \
    539         external/ExRootAnalysis/ExRootClassifier.h
     545        classes/DelphesFormula.h
    540546tmp/modules/Calorimeter.$(ObjSuf): \
    541547        modules/Calorimeter.$(SrcSuf) \
     
    651657        external/ExRootAnalysis/ExRootFilter.h \
    652658        external/ExRootAnalysis/ExRootClassifier.h
     659tmp/modules/JetFakeParticle.$(ObjSuf): \
     660        modules/JetFakeParticle.$(SrcSuf) \
     661        modules/JetFakeParticle.h \
     662        classes/DelphesClasses.h \
     663        classes/DelphesFactory.h \
     664        classes/DelphesFormula.h \
     665        external/ExRootAnalysis/ExRootResult.h \
     666        external/ExRootAnalysis/ExRootFilter.h \
     667        external/ExRootAnalysis/ExRootClassifier.h
     668tmp/modules/JetFlavorAssociation.$(ObjSuf): \
     669        modules/JetFlavorAssociation.$(SrcSuf) \
     670        modules/JetFlavorAssociation.h \
     671        classes/DelphesClasses.h \
     672        classes/DelphesFactory.h \
     673        classes/DelphesFormula.h \
     674        external/ExRootAnalysis/ExRootResult.h \
     675        external/ExRootAnalysis/ExRootFilter.h \
     676        external/ExRootAnalysis/ExRootClassifier.h
    653677tmp/modules/JetPileUpSubtractor.$(ObjSuf): \
    654678        modules/JetPileUpSubtractor.$(SrcSuf) \
     
    705729        external/ExRootAnalysis/ExRootFilter.h \
    706730        external/ExRootAnalysis/ExRootClassifier.h
     731tmp/modules/PhotonConversions.$(ObjSuf): \
     732        modules/PhotonConversions.$(SrcSuf) \
     733        modules/PhotonConversions.h \
     734        classes/DelphesClasses.h \
     735        classes/DelphesFactory.h \
     736        classes/DelphesCylindricalFormula.h \
     737        external/ExRootAnalysis/ExRootResult.h \
     738        external/ExRootAnalysis/ExRootFilter.h \
     739        external/ExRootAnalysis/ExRootClassifier.h
    707740tmp/modules/PileUpJetID.$(ObjSuf): \
    708741        modules/PileUpJetID.$(SrcSuf) \
     
    729762        classes/DelphesClasses.h \
    730763        classes/DelphesFactory.h \
    731         classes/DelphesFormula.h \
     764        classes/DelphesTF2.h \
    732765        classes/DelphesPileUpReader.h \
    733766        external/ExRootAnalysis/ExRootResult.h \
     
    752785        external/ExRootAnalysis/ExRootFilter.h \
    753786        external/ExRootAnalysis/ExRootClassifier.h
     787tmp/modules/TaggingParticlesSkimmer.$(ObjSuf): \
     788        modules/TaggingParticlesSkimmer.$(SrcSuf) \
     789        modules/TaggingParticlesSkimmer.h \
     790        modules/TauTagging.h \
     791        classes/DelphesClasses.h \
     792        classes/DelphesFactory.h \
     793        classes/DelphesFormula.h \
     794        external/ExRootAnalysis/ExRootResult.h \
     795        external/ExRootAnalysis/ExRootFilter.h \
     796        external/ExRootAnalysis/ExRootClassifier.h
    754797tmp/modules/TauTagging.$(ObjSuf): \
    755798        modules/TauTagging.$(SrcSuf) \
     
    757800        classes/DelphesClasses.h \
    758801        classes/DelphesFactory.h \
    759         classes/DelphesFormula.h \
    760         external/ExRootAnalysis/ExRootResult.h \
    761         external/ExRootAnalysis/ExRootFilter.h \
    762         external/ExRootAnalysis/ExRootClassifier.h
     802        classes/DelphesFormula.h
    763803tmp/modules/TimeSmearing.$(ObjSuf): \
    764804        modules/TimeSmearing.$(SrcSuf) \
     
    815855DELPHES_OBJ +=  \
    816856        tmp/classes/DelphesClasses.$(ObjSuf) \
     857        tmp/classes/DelphesCylindricalFormula.$(ObjSuf) \
    817858        tmp/classes/DelphesFactory.$(ObjSuf) \
    818859        tmp/classes/DelphesFormula.$(ObjSuf) \
     
    875916        tmp/modules/ImpactParameterSmearing.$(ObjSuf) \
    876917        tmp/modules/Isolation.$(ObjSuf) \
     918        tmp/modules/JetFakeParticle.$(ObjSuf) \
     919        tmp/modules/JetFlavorAssociation.$(ObjSuf) \
    877920        tmp/modules/JetPileUpSubtractor.$(ObjSuf) \
    878921        tmp/modules/LeptonDressing.$(ObjSuf) \
     
    881924        tmp/modules/ParticlePropagator.$(ObjSuf) \
    882925        tmp/modules/PdgCodeFilter.$(ObjSuf) \
     926        tmp/modules/PhotonConversions.$(ObjSuf) \
    883927        tmp/modules/PileUpJetID.$(ObjSuf) \
    884928        tmp/modules/PileUpMerger.$(ObjSuf) \
    885929        tmp/modules/SimpleCalorimeter.$(ObjSuf) \
    886930        tmp/modules/StatusPidFilter.$(ObjSuf) \
     931        tmp/modules/TaggingParticlesSkimmer.$(ObjSuf) \
    887932        tmp/modules/TauTagging.$(ObjSuf) \
    888933        tmp/modules/TimeSmearing.$(ObjSuf) \
     
    898943endif
    899944
     945tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf): \
     946        external/PUPPI/puppiCleanContainer.$(SrcSuf) \
     947        external/fastjet/Selector.hh
    900948tmp/external/fastjet/AreaDefinition.$(ObjSuf): \
    901949        external/fastjet/AreaDefinition.$(SrcSuf) \
     
    10711119tmp/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(ObjSuf): \
    10721120        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(SrcSuf)
     1121tmp/external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(ObjSuf): \
     1122        external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(SrcSuf) \
     1123        external/fastjet/JetDefinition.hh \
     1124        external/fastjet/ClusterSequenceAreaBase.hh
     1125tmp/external/fastjet/contribs/RecursiveTools/Recluster.$(ObjSuf): \
     1126        external/fastjet/contribs/RecursiveTools/Recluster.$(SrcSuf)
     1127tmp/external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(ObjSuf): \
     1128        external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(SrcSuf) \
     1129        external/fastjet/JetDefinition.hh \
     1130        external/fastjet/ClusterSequenceAreaBase.hh
     1131tmp/external/fastjet/contribs/RecursiveTools/SoftDrop.$(ObjSuf): \
     1132        external/fastjet/contribs/RecursiveTools/SoftDrop.$(SrcSuf)
    10731133tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf): \
    10741134        external/fastjet/contribs/SoftKiller/SoftKiller.$(SrcSuf)
     
    12041264        external/fastjet/contribs/Nsubjettiness/Njettiness.hh \
    12051265        external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \
    1206         external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh
     1266        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh \
     1267        external/fastjet/tools/Filter.hh \
     1268        external/fastjet/tools/Pruner.hh \
     1269        external/fastjet/contribs/RecursiveTools/SoftDrop.hh
    12071270tmp/modules/FastJetGridMedianEstimator.$(ObjSuf): \
    12081271        modules/FastJetGridMedianEstimator.$(SrcSuf) \
     
    12291292        external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \
    12301293        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh
     1294tmp/modules/RunPUPPI.$(ObjSuf): \
     1295        modules/RunPUPPI.$(SrcSuf) \
     1296        modules/RunPUPPI.h \
     1297        external/PUPPI/puppiCleanContainer.hh \
     1298        external/PUPPI/RecoObj.hh \
     1299        external/PUPPI/puppiParticle.hh \
     1300        external/PUPPI/puppiAlgoBin.hh \
     1301        classes/DelphesClasses.h \
     1302        classes/DelphesFactory.h \
     1303        classes/DelphesFormula.h
    12311304FASTJET_OBJ +=  \
     1305        tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf) \
    12321306        tmp/external/fastjet/AreaDefinition.$(ObjSuf) \
    12331307        tmp/external/fastjet/BasicRandom.$(ObjSuf) \
     
    12761350        tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf) \
    12771351        tmp/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(ObjSuf) \
     1352        tmp/external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(ObjSuf) \
     1353        tmp/external/fastjet/contribs/RecursiveTools/Recluster.$(ObjSuf) \
     1354        tmp/external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(ObjSuf) \
     1355        tmp/external/fastjet/contribs/RecursiveTools/SoftDrop.$(ObjSuf) \
    12781356        tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf) \
    12791357        tmp/external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(ObjSuf) \
     
    13191397        tmp/external/fastjet/tools/TopTaggerBase.$(ObjSuf) \
    13201398        tmp/modules/FastJetFinder.$(ObjSuf) \
    1321         tmp/modules/FastJetGridMedianEstimator.$(ObjSuf)
     1399        tmp/modules/FastJetGridMedianEstimator.$(ObjSuf) \
     1400        tmp/modules/RunPUPPI.$(ObjSuf)
    13221401
    13231402ifeq ($(HAS_PYTHIA8),true)
     
    13291408        display/Delphes3DGeometry.$(SrcSuf) \
    13301409        display/Delphes3DGeometry.h \
    1331         external/ExRootAnalysis/ExRootConfReader.h \
    1332         classes/DelphesClasses.h
     1410        classes/DelphesClasses.h \
     1411        external/ExRootAnalysis/ExRootConfReader.h
    13331412tmp/display/DelphesBranchElement.$(ObjSuf): \
    13341413        display/DelphesBranchElement.$(SrcSuf) \
     
    13431422tmp/display/DelphesEventDisplay.$(ObjSuf): \
    13441423        display/DelphesEventDisplay.$(SrcSuf) \
    1345         external/ExRootAnalysis/ExRootConfReader.h \
    1346         external/ExRootAnalysis/ExRootTreeReader.h \
    13471424        display/DelphesCaloData.h \
    13481425        display/DelphesBranchElement.h \
    13491426        display/Delphes3DGeometry.h \
    13501427        display/DelphesEventDisplay.h \
    1351         classes/DelphesClasses.h
     1428        display/DelphesDisplay.h \
     1429        display/Delphes3DGeometry.h \
     1430        display/DelphesHtmlSummary.h \
     1431        display/DelphesPlotSummary.h \
     1432        classes/DelphesClasses.h \
     1433        external/ExRootAnalysis/ExRootConfReader.h \
     1434        external/ExRootAnalysis/ExRootTreeReader.h
    13521435tmp/display/DelphesHtmlSummary.$(ObjSuf): \
    13531436        display/DelphesHtmlSummary.$(SrcSuf) \
     
    13961479tmp/external/tcl/tclHash.$(ObjSuf): \
    13971480        external/tcl/tclHash.c
    1398 tmp/external/tcl/tclHistory.$(ObjSuf): \
    1399         external/tcl/tclHistory.c
    14001481tmp/external/tcl/tclIndexObj.$(ObjSuf): \
    14011482        external/tcl/tclIndexObj.c
     
    14101491tmp/external/tcl/tclParse.$(ObjSuf): \
    14111492        external/tcl/tclParse.c
    1412 tmp/external/tcl/tclPosixStr.$(ObjSuf): \
    1413         external/tcl/tclPosixStr.c
    14141493tmp/external/tcl/tclPreserve.$(ObjSuf): \
    14151494        external/tcl/tclPreserve.c
     
    14381517        tmp/external/tcl/tclGet.$(ObjSuf) \
    14391518        tmp/external/tcl/tclHash.$(ObjSuf) \
    1440         tmp/external/tcl/tclHistory.$(ObjSuf) \
    14411519        tmp/external/tcl/tclIndexObj.$(ObjSuf) \
    14421520        tmp/external/tcl/tclLink.$(ObjSuf) \
     
    14451523        tmp/external/tcl/tclObj.$(ObjSuf) \
    14461524        tmp/external/tcl/tclParse.$(ObjSuf) \
    1447         tmp/external/tcl/tclPosixStr.$(ObjSuf) \
    14481525        tmp/external/tcl/tclPreserve.$(ObjSuf) \
    14491526        tmp/external/tcl/tclProc.$(ObjSuf) \
     
    15381615        @touch $@
    15391616
    1540 external/fastjet/Selector.hh: \
    1541         external/fastjet/PseudoJet.hh \
    1542         external/fastjet/RangeDefinition.hh
    1543         @touch $@
    1544 
    15451617external/fastjet/internal/Dnn2piCylinder.hh: \
    15461618        external/fastjet/internal/DynamicNearestNeighbours.hh \
    15471619        external/fastjet/internal/DnnPlane.hh \
    15481620        external/fastjet/internal/numconsts.hh
     1621        @touch $@
     1622
     1623external/fastjet/Selector.hh: \
     1624        external/fastjet/PseudoJet.hh \
     1625        external/fastjet/RangeDefinition.hh
    15491626        @touch $@
    15501627
     
    16021679        @touch $@
    16031680
     1681modules/JetFakeParticle.h: \
     1682        classes/DelphesModule.h
     1683        @touch $@
     1684
    16041685external/fastjet/ClusterSequence1GhostPassiveArea.hh: \
    16051686        external/fastjet/PseudoJet.hh \
     
    16341715        external/fastjet/internal/numconsts.hh \
    16351716        external/fastjet/Error.hh
     1717        @touch $@
     1718
     1719modules/RunPUPPI.h: \
     1720        classes/DelphesModule.h
    16361721        @touch $@
    16371722
     
    16721757        @touch $@
    16731758
    1674 display/DelphesEventDisplay.h: \
    1675         external/ExRootAnalysis/ExRootTreeReader.h \
    1676         display/DelphesDisplay.h \
    1677         display/Delphes3DGeometry.h \
    1678         display/DelphesHtmlSummary.h \
    1679         display/DelphesPlotSummary.h
    1680         @touch $@
    1681 
    16821759modules/TauTagging.h: \
    1683         classes/DelphesModule.h
     1760        classes/DelphesModule.h \
     1761        external/ExRootAnalysis/ExRootResult.h \
     1762        external/ExRootAnalysis/ExRootFilter.h \
     1763        external/ExRootAnalysis/ExRootClassifier.h
    16841764        @touch $@
    16851765
     
    17191799        @touch $@
    17201800
     1801modules/JetFlavorAssociation.h: \
     1802        classes/DelphesModule.h \
     1803        classes/DelphesClasses.h
     1804        @touch $@
     1805
    17211806modules/ParticlePropagator.h: \
    17221807        classes/DelphesModule.h
     
    17471832        @touch $@
    17481833
     1834modules/PhotonConversions.h: \
     1835        classes/DelphesModule.h
     1836        @touch $@
     1837
    17491838external/fastjet/ClusterSequenceVoronoiArea.hh: \
    17501839        external/fastjet/PseudoJet.hh \
     
    17531842        @touch $@
    17541843
     1844external/PUPPI/puppiCleanContainer.hh: \
     1845        external/PUPPI/RecoObj.hh \
     1846        external/PUPPI/puppiParticle.hh \
     1847        external/PUPPI/puppiAlgoBin.hh \
     1848        external/fastjet/internal/base.hh \
     1849        external/fastjet/PseudoJet.hh
     1850        @touch $@
     1851
    17551852modules/BTagging.h: \
    17561853        classes/DelphesModule.h
     
    17751872
    17761873modules/Weighter.h: \
     1874        classes/DelphesModule.h
     1875        @touch $@
     1876
     1877modules/TaggingParticlesSkimmer.h: \
    17771878        classes/DelphesModule.h
    17781879        @touch $@
     
    19632064        @echo ">> Building $(DISTTAR)"
    19642065        @mkdir -p $(DISTDIR)
    1965         @cp -a CHANGELOG COPYING CREDITS README VERSION Makefile configure cards classes converters display doc examples external modules python readers $(DISTDIR)
     2066        @cp -a CHANGELOG CMakeLists.txt COPYING CREDITS DelphesEnv.sh README README_4LHCb VERSION Makefile MinBias.pileup configure cards classes converters display doc examples external modules python readers $(DISTDIR)
    19662067        @find $(DISTDIR) -depth -name .\* -exec rm -rf {} \;
    19672068        @tar -czf $(DISTTAR) $(DISTDIR)
  • README

    rd870fc5 rd77b51d  
    3939
    4040https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook
     41
     42
     43Configure Delphes on lxplus.cern.ch
     44====================================
     45
     46git clone git://github.com/delphes/delphes.git Delphes
     47
     48cd Delphes
     49
     50source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.32/x86_64-slc6-gcc48-opt/root/bin/thisroot
     51
     52make
    4153
    4254
  • README_4LHCb

    rd870fc5 rd77b51d  
    22==============
    33
    4 The card "delphes_card_prelLHCb.tcl" contains a preliminary parametrization of the LHCb detector.
     4The card "delphes_card_LHCb.tcl" contains a preliminary parametrization of the LHCb detector.
    55
    66- ParticlePropagator
     
    2424- IdentificationMap
    2525
    26 This module is a recent addition in order to map particle misindentification rates
     26This module is a recent addition in order to map particle misidentification rates
    2727and reconstruction efficiencies.
    2828
     
    46461) Compile:
    4747
    48    make
     48  make
    4949
    50502) Simulate p p -> b b~ events
    5151
    52 
    53   wget http://cp3.irmp.ucl.ac.be/downloads/pp2bb.hep.tgz
    54   tar -xzvf pp2bb.hep.tgz
    55   ./DelphesSTDHEP cards/delphes_card_prelLHCb.tcl delphes_output.root pp2bb.hep
     52  wget http://cp3.irmp.ucl.ac.be/downloads/pp_bb.hep.gz
     53  gunzip pp_bb.hep.gz
     54  ./DelphesSTDHEP cards/delphes_card_LHCb.tcl delphes_output.root pp_bb.hep
    5655
    5756
    5857For more details, please visit:
    5958
    60 https://cp3.irmp.ucl.ac.be/projects/delphes
     59  https://cp3.irmp.ucl.ac.be/projects/delphes
    6160
    6261
  • cards/delphes_card_ATLAS.tcl

    rd870fc5 rd77b51d  
    3434
    3535  JetEnergyScale
     36 
     37  JetFlavorAssociation
    3638
    3739  BTagging
     
    7779
    7880  # tracking efficiency formula for charged hadrons
    79   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    80                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    81                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) + \
    82                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) + \
    83                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) + \
     81  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     82                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     83                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) +
     84                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) +
     85                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) +
    8486                         (abs(eta) > 2.5)                                                  * (0.00)}
    8587}
     
    9698
    9799  # tracking efficiency formula for electrons
    98   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    99                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) + \
    100                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) + \
    101                                            (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) + \
    102                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) + \
    103                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) + \
    104                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) + \
     100  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     101                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) +
     102                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) +
     103                                           (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) +
     104                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) +
     105                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) +
     106                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) +
    105107                         (abs(eta) > 2.5)                                                  * (0.00)}
    106108}
     
    117119
    118120  # tracking efficiency formula for muons
    119   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    120                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) + \
    121                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) + \
    122                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    123                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) + \
     121  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     122                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) +
     123                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) +
     124                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     125                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) +
    124126                         (abs(eta) > 2.5)                                                  * (0.00)}
    125127}
     
    136138
    137139  # resolution formula for charged hadrons
    138   set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) + \
    139                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) + \
    140                                            (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \
    141                                            (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) + \
    142                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) + \
    143                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) + \
    144                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \
     140  set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) +
     141                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) +
     142                                           (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) +
     143                                           (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) +
     144                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) +
     145                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) +
     146                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) +
    145147                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
    146148}
     
    156158  # set ResolutionFormula {resolution formula as a function of eta and energy}
    157159
    158   set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.5e1) * (energy*0.015) + \
    159                                            (abs(eta) <= 2.5) * (energy > 2.5e1)                    * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \
    160                          (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \
     160  set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.5e1) * (energy*0.015) +
     161                                           (abs(eta) <= 2.5) * (energy > 2.5e1)                    * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) +
     162                         (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) +
    161163                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    162164
     
    174176
    175177  # resolution formula for muons
    176   set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) + \
    177                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 5.0e1) * (0.03) + \
    178                                            (abs(eta) <= 1.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.04) + \
    179                                            (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.07) + \
    180                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.04) + \
    181                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 5.0e1) * (0.04) + \
    182                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.05) + \
     178  set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) +
     179                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 5.0e1) * (0.03) +
     180                                           (abs(eta) <= 1.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.04) +
     181                                           (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.07) +
     182                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.04) +
     183                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 5.0e1) * (0.04) +
     184                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.05) +
    183185                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.10)}
    184186}
     
    207209  set PhotonOutputArray photons
    208210
    209   set ECalEnergyMin 0.50
    210   set HCalEnergyMin 1.00
    211 
    212   set ECalEnergySignificanceMin 1.0
    213   set HCalEnergySignificanceMin 1.0
    214  
    215211  set EFlowTrackOutputArray eflowTracks
    216212  set EFlowPhotonOutputArray eflowPhotons
    217213  set EFlowNeutralHadronOutputArray eflowNeutralHadrons
     214
     215  set ECalEnergyMin 0.5
     216  set HCalEnergyMin 1.0
     217
     218  set ECalEnergySignificanceMin 1.0
     219  set HCalEnergySignificanceMin 1.0
     220
     221  set SmearTowerCenter true
    218222
    219223  set pi [expr {acos(-1)}]
     
    265269  # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    266270  # http://www.physics.utoronto.ca/~krieger/procs/ComoProceedings.pdf
    267   set ECalResolutionFormula {                  (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + \
     271  set ECalResolutionFormula {                  (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) +
    268272                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)}
    269273
     
    271275  # http://arxiv.org/pdf/hep-ex/0004009v1
    272276  # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    273   set HCalResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \
    274                              (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \
     277  set HCalResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) +
     278                             (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) +
    275279                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
    276280}
     
    293297
    294298module Efficiency PhotonEfficiency {
    295   set InputArray Calorimeter/photons
     299  set InputArray Calorimeter/eflowPhotons
    296300  set OutputArray photons
    297301
     
    299303
    300304  # efficiency formula for photons
    301   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    302                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    303                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) + \
     305  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     306                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     307                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) +
    304308                         (abs(eta) > 2.5)                                   * (0.00)}
    305309}
     
    333337
    334338  # efficiency formula for electrons
    335   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    336                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    337                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) + \
     339  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     340                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     341                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) +
    338342                         (abs(eta) > 2.5)                                   * (0.00)}
    339343}
     
    367371
    368372  # efficiency formula for muons
    369   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    370                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    371                          (abs(eta) > 1.5 && abs(eta) <= 2.7) * (pt > 10.0)  * (0.85) + \
     373  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     374                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     375                         (abs(eta) > 1.5 && abs(eta) <= 2.7) * (pt > 10.0)  * (0.85) +
    372376                         (abs(eta) > 2.7)                                   * (0.00)}
    373377}
     
    419423
    420424module PdgCodeFilter NeutrinoFilter {
    421  
     425
    422426  set InputArray Delphes/stableParticles
    423427  set OutputArray filteredParticles
    424428
    425429  set PTMin 0.0
    426  
     430
    427431  add PdgCode {12}
    428432  add PdgCode {14}
     
    475479  set OutputArray jets
    476480
    477   # scale formula for jets 
     481  # scale formula for jets
    478482  set ScaleFormula {  sqrt( (3.0 - 0.2*(abs(eta)))^2 / pt + 1.0 )  }
     483}
     484
     485########################
     486# Jet Flavor Association
     487########################
     488
     489module JetFlavorAssociation JetFlavorAssociation {
     490 
     491  set PartonInputArray Delphes/partons
     492  set ParticleInputArray Delphes/allParticles
     493  set ParticleLHEFInputArray Delphes/allParticlesLHEF
     494  set JetInputArray JetEnergyScale/jets
     495 
     496  set DeltaR 0.5
     497  set PartonPTMin 1.0
     498  set PartonEtaMax 2.5
     499
    479500}
    480501
     
    484505
    485506module BTagging BTagging {
    486   set PartonInputArray Delphes/partons
    487507  set JetInputArray JetEnergyScale/jets
    488508
    489509  set BitNumber 0
    490 
    491   set DeltaR 0.5
    492 
    493   set PartonPTMin 1.0
    494 
    495   set PartonEtaMax 2.5
    496510
    497511  # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
     
    503517
    504518  # efficiency formula for c-jets (misidentification rate)
    505   add EfficiencyFormula {4} {                                      (pt <= 15.0) * (0.000) + \
    506                                                 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \
    507                               (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \
     519  add EfficiencyFormula {4} {                                      (pt <= 15.0) * (0.000) +
     520                                                (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) +
     521                              (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) +
    508522                              (abs(eta) > 2.5)                                  * (0.000)}
    509523
    510524  # efficiency formula for b-jets
    511   add EfficiencyFormula {5} {                                      (pt <= 15.0) * (0.000) + \
    512                                                 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \
    513                               (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \
     525  add EfficiencyFormula {5} {                                      (pt <= 15.0) * (0.000) +
     526                                                (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) +
     527                              (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) +
    514528                              (abs(eta) > 2.5)                                  * (0.000)}
    515529}
     530
     531#############
     532# tau-tagging
     533#############
    516534
    517535module TauTagging TauTagging {
  • cards/delphes_card_ATLAS_PileUp.tcl

    rd870fc5 rd77b51d  
    2222  EFlowMergerAllTracks
    2323  EFlowMerger
    24  
     24
    2525  NeutrinoFilter
    2626  GenJetFinder
     
    4242
    4343  MissingET
     44 
     45  JetFlavorAssociation
    4446
    4547  BTagging
     
    7981  set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))}
    8082
    81   #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + \
    82   #                                (abs(t) >  1.0e-09) * (abs(z) <= 0.15) * (0.00) + \
    83   #                               (abs(t) <= 1.0e-09) * (abs(z) > 0.15)  * (0.00) + \
     83  #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) +
     84  #                                (abs(t) >  1.0e-09) * (abs(z) <= 0.15) * (0.00) +
     85  #                               (abs(t) <= 1.0e-09) * (abs(z) > 0.15)  * (0.00) +
    8486  #                               (abs(t) >  1.0e-09) * (abs(z) > 0.15)  * (0.00)}
    8587
     
    119121
    120122  # tracking efficiency formula for charged hadrons
    121   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    122                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    123                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) + \
    124                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) + \
    125                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) + \
     123  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     124                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     125                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) +
     126                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) +
     127                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) +
    126128                         (abs(eta) > 2.5)                                                  * (0.00)}
    127129}
     
    138140
    139141  # tracking efficiency formula for electrons
    140   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    141                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) + \
    142                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) + \
    143                                            (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) + \
    144                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) + \
    145                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) + \
    146                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) + \
     142  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     143                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) +
     144                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) +
     145                                           (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) +
     146                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) +
     147                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) +
     148                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) +
    147149                         (abs(eta) > 2.5)                                                  * (0.00)}
    148150}
     
    159161
    160162  # tracking efficiency formula for muons
    161   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    162                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) + \
    163                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) + \
    164                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    165                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) + \
     163  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     164                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) +
     165                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) +
     166                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     167                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) +
    166168                         (abs(eta) > 2.5)                                                  * (0.00)}
    167169}
     
    178180
    179181  # resolution formula for charged hadrons
    180   set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) + \
    181                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) + \
    182                                            (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \
    183                                            (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) + \
    184                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) + \
    185                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) + \
    186                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \
     182  set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) +
     183                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) +
     184                                           (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) +
     185                                           (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) +
     186                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) +
     187                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) +
     188                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) +
    187189                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
    188190}
     
    198200  # set ResolutionFormula {resolution formula as a function of eta and energy}
    199201
    200   set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.5e1) * (energy*0.015) + \
    201                                            (abs(eta) <= 2.5) * (energy > 2.5e1)                    * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \
    202                          (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \
     202  set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.5e1) * (energy*0.015) +
     203                                           (abs(eta) <= 2.5) * (energy > 2.5e1)                    * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) +
     204                         (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) +
    203205                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    204206
     
    216218
    217219  # resolution formula for muons
    218   set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) + \
    219                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 5.0e1) * (0.03) + \
    220                                            (abs(eta) <= 1.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.04) + \
    221                                            (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.07) + \
    222                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.04) + \
    223                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 5.0e1) * (0.04) + \
    224                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.05) + \
     220  set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) +
     221                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 5.0e1) * (0.03) +
     222                                           (abs(eta) <= 1.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.04) +
     223                                           (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.07) +
     224                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.04) +
     225                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 5.0e1) * (0.04) +
     226                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.05) +
    225227                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.10)}
    226228}
     
    249251  set PhotonOutputArray photons
    250252
    251   set ECalEnergyMin 0.50
    252   set HCalEnergyMin 1.00
    253 
    254   set ECalEnergySignificanceMin 1.0
    255   set HCalEnergySignificanceMin 1.0
    256 
    257253  set EFlowTrackOutputArray eflowTracks
    258254  set EFlowPhotonOutputArray eflowPhotons
    259255  set EFlowNeutralHadronOutputArray eflowNeutralHadrons
     256
     257  set ECalEnergyMin 0.5
     258  set HCalEnergyMin 1.0
     259
     260  set ECalEnergySignificanceMin 1.0
     261  set HCalEnergySignificanceMin 1.0
     262
     263  set SmearTowerCenter true
    260264
    261265  set pi [expr {acos(-1)}]
     
    307311  # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    308312  # http://www.physics.utoronto.ca/~krieger/procs/ComoProceedings.pdf
    309   set ECalResolutionFormula {                  (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + \
     313  set ECalResolutionFormula {                  (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) +
    310314                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)}
    311315
     
    313317  # http://arxiv.org/pdf/hep-ex/0004009v1
    314318  # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    315   set HCalResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \
    316                              (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \
     319  set HCalResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) +
     320                             (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) +
    317321                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
    318322}
     
    374378
    375379module FastJetGridMedianEstimator Rho {
    376  
     380
    377381  set InputArray Calorimeter/towers
    378382  set RhoOutputArray rho
    379383
    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  # add GridRange rapmin rapmax drap dphi
     385  # rapmin - the minimum rapidity extent of the grid
     386  # rapmax - the maximum rapidity extent of the grid
     387  # drap - the grid spacing in rapidity
     388  # dphi - the grid spacing in azimuth
     389
     390  add GridRange -5.0 -2.5 1.0 1.0
     391  add GridRange -2.5 2.5 0.5 0.5
     392  add GridRange 2.5 5.0 1.0 1.0
    384393
    385394}
     
    391400
    392401module PdgCodeFilter NeutrinoFilter {
    393  
     402
    394403  set InputArray Delphes/stableParticles
    395404  set OutputArray filteredParticles
    396405
    397406  set PTMin 0.0
    398  
     407
    399408  add PdgCode {12}
    400409  add PdgCode {14}
     
    471480
    472481module Efficiency PhotonEfficiency {
    473   set InputArray Calorimeter/photons
     482  set InputArray Calorimeter/eflowPhotons
    474483  set OutputArray photons
    475484
     
    477486
    478487  # efficiency formula for photons
    479   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    480                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    481                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) + \
     488  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     489                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     490                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) +
    482491                         (abs(eta) > 2.5)                                   * (0.00)}
    483492}
     
    512521
    513522  # efficiency formula for electrons
    514   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    515                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    516                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) + \
     523  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     524                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     525                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) +
    517526                         (abs(eta) > 2.5)                                   * (0.00)}
    518527}
     
    547556
    548557  # efficiency formula for muons
    549   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    550                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    551                          (abs(eta) > 1.5 && abs(eta) <= 2.7) * (pt > 10.0)  * (0.85) + \
     558  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     559                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     560                         (abs(eta) > 1.5 && abs(eta) <= 2.7) * (pt > 10.0)  * (0.85) +
    552561                         (abs(eta) > 2.7)                                   * (0.00)}
    553562}
     
    595604}
    596605
     606########################
     607# Jet Flavor Association
     608########################
     609
     610module JetFlavorAssociation JetFlavorAssociation {
     611 
     612  set PartonInputArray Delphes/partons
     613  set ParticleInputArray Delphes/allParticles
     614  set ParticleLHEFInputArray Delphes/allParticlesLHEF
     615  set JetInputArray JetEnergyScale/jets
     616 
     617  set DeltaR 0.5
     618  set PartonPTMin 1.0
     619  set PartonEtaMax 2.5
     620
     621}
     622
    597623###########
    598624# b-tagging
     
    600626
    601627module BTagging BTagging {
    602   set PartonInputArray Delphes/partons
    603628  set JetInputArray JetEnergyScale/jets
    604629
    605630  set BitNumber 0
    606 
    607   set DeltaR 0.5
    608 
    609   set PartonPTMin 1.0
    610 
    611   set PartonEtaMax 2.5
    612631
    613632  # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
     
    619638
    620639  # efficiency formula for c-jets (misidentification rate)
    621   add EfficiencyFormula {4} {                                      (pt <= 15.0) * (0.000) + \
    622                                                 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \
    623                               (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \
     640  add EfficiencyFormula {4} {                                      (pt <= 15.0) * (0.000) +
     641                                                (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) +
     642                              (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) +
    624643                              (abs(eta) > 2.5)                                  * (0.000)}
    625644
    626645  # efficiency formula for b-jets
    627   add EfficiencyFormula {5} {                                      (pt <= 15.0) * (0.000) + \
    628                                                 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \
    629                               (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \
     646  add EfficiencyFormula {5} {                                      (pt <= 15.0) * (0.000) +
     647                                                (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) +
     648                              (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) +
    630649                              (abs(eta) > 2.5)                                  * (0.000)}
    631650}
     651
     652#############
     653# tau-tagging
     654#############
    632655
    633656module TauTagging TauTagging {
     
    693716
    694717}
    695 
    696 
    697 
  • cards/delphes_card_CMS.tcl

    rd870fc5 rd77b51d  
    3434
    3535  JetEnergyScale
     36
     37  JetFlavorAssociation
    3638
    3739  BTagging
     
    7779
    7880  # tracking efficiency formula for charged hadrons
    79   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    80                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    81                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) + \
    82                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) + \
    83                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) + \
     81  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     82                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     83                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) +
     84                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) +
     85                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) +
    8486                         (abs(eta) > 2.5)                                                  * (0.00)}
    8587}
     
    9698
    9799  # tracking efficiency formula for electrons
    98   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    99                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) + \
    100                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) + \
    101                                            (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) + \
    102                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) + \
    103                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) + \
    104                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) + \
     100  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     101                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) +
     102                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) +
     103                                           (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) +
     104                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) +
     105                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) +
     106                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) +
    105107                         (abs(eta) > 2.5)                                                  * (0.00)}
    106108}
     
    117119
    118120  # tracking efficiency formula for muons
    119   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    120                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) + \
    121                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) + \
    122                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    123                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) + \
     121  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     122                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) +
     123                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) +
     124                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     125                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) +
    124126                         (abs(eta) > 2.5)                                                  * (0.00)}
    125127}
     
    136138
    137139  # resolution formula for charged hadrons
    138   set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) + \
    139                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) + \
    140                                            (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \
    141                                            (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) + \
    142                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) + \
    143                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) + \
    144                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \
     140  set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) +
     141                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) +
     142                                           (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) +
     143                                           (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) +
     144                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) +
     145                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) +
     146                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) +
    145147                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
    146148}
     
    157159
    158160  # resolution formula for electrons
    159   set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.0e1) * (energy*0.0225) + \
    160                                            (abs(eta) <= 2.5) * (energy > 2.0e1)                    * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
    161                          (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
     161  set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.0e1) * (energy*0.0225) +
     162                                           (abs(eta) <= 2.5) * (energy > 2.0e1)                    * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) +
     163                         (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) +
    162164                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    163165
     
    175177
    176178  # resolution formula for muons
    177   set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1   && pt <= 5.0)   * (0.02) + \
    178                                            (abs(eta) <= 0.5) * (pt > 5.0   && pt <= 1.0e2) * (0.015) + \
    179                                            (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) + \
    180                                            (abs(eta) <= 0.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) + \
    181                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1   && pt <= 5.0)   * (0.03) + \
    182                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0   && pt <= 1.0e2) * (0.02) + \
    183                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) + \
    184                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) + \
    185                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 5.0)   * (0.04) + \
    186                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0   && pt <= 1.0e2) * (0.035) + \
    187                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) + \
     179  set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1   && pt <= 5.0)   * (0.02) +
     180                                           (abs(eta) <= 0.5) * (pt > 5.0   && pt <= 1.0e2) * (0.015) +
     181                                           (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) +
     182                                           (abs(eta) <= 0.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) +
     183                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1   && pt <= 5.0)   * (0.03) +
     184                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0   && pt <= 1.0e2) * (0.02) +
     185                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) +
     186                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) +
     187                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 5.0)   * (0.04) +
     188                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0   && pt <= 1.0e2) * (0.035) +
     189                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) +
    188190                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4)}
    189191}
     
    212214  set PhotonOutputArray photons
    213215
    214   set ECalEnergyMin 0.5
    215   set HCalEnergyMin 1.0
    216 
    217   set ECalEnergySignificanceMin 1.0
    218   set HCalEnergySignificanceMin 1.0
    219    
    220216  set EFlowTrackOutputArray eflowTracks
    221217  set EFlowPhotonOutputArray eflowPhotons
    222218  set EFlowNeutralHadronOutputArray eflowNeutralHadrons
     219
     220  set ECalEnergyMin 0.5
     221  set HCalEnergyMin 1.0
     222
     223  set ECalEnergySignificanceMin 1.0
     224  set HCalEnergySignificanceMin 1.0
     225
     226  set SmearTowerCenter true
    223227
    224228  set pi [expr {acos(-1)}]
     
    276280
    277281  # set ECalResolutionFormula {resolution formula as a function of eta and energy}
    278   set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  + \
     282  set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  +
    279283                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    280284
    281285  # set HCalResolutionFormula {resolution formula as a function of eta and energy}
    282   set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \
     286  set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +
    283287                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
    284288}
     
    307311
    308312  # efficiency formula for photons
    309   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    310                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    311                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) + \
     313  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     314                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     315                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) +
    312316                         (abs(eta) > 2.5)                                   * (0.00)}
    313317}
     
    341345
    342346  # efficiency formula for electrons
    343   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    344                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    345                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) + \
     347  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     348                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     349                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) +
    346350                         (abs(eta) > 2.5)                                   * (0.00)}
    347351}
     
    375379
    376380  # efficiency formula for muons
    377   set EfficiencyFormula {                                      (pt <= 10.0)               * (0.00) + \
    378                                            (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \
    379                                            (abs(eta) <= 1.5) * (pt > 1.0e3)               * (0.95 * exp(0.5 - pt*5.0e-4)) + \
    380                          (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \
    381                          (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3)               * (0.95 * exp(0.5 - pt*5.0e-4)) + \
     381  set EfficiencyFormula {                                      (pt <= 10.0)               * (0.00) +
     382                                           (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) +
     383                                           (abs(eta) <= 1.5) * (pt > 1.0e3)               * (0.95 * exp(0.5 - pt*5.0e-4)) +
     384                         (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) +
     385                         (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3)               * (0.95 * exp(0.5 - pt*5.0e-4)) +
    382386                         (abs(eta) > 2.4)                                                 * (0.00)}
    383387}
     
    429433
    430434module PdgCodeFilter NeutrinoFilter {
    431  
     435
    432436  set InputArray Delphes/stableParticles
    433437  set OutputArray filteredParticles
    434438
    435439  set PTMin 0.0
    436  
     440
    437441  add PdgCode {12}
    438442  add PdgCode {14}
     
    462466
    463467
    464 
    465 
    466468############
    467469# Jet finder
     
    493495}
    494496
     497########################
     498# Jet Flavor Association
     499########################
     500
     501module JetFlavorAssociation JetFlavorAssociation {
     502 
     503  set PartonInputArray Delphes/partons
     504  set ParticleInputArray Delphes/allParticles
     505  set ParticleLHEFInputArray Delphes/allParticlesLHEF
     506  set JetInputArray JetEnergyScale/jets
     507 
     508  set DeltaR 0.5
     509  set PartonPTMin 1.0
     510  set PartonEtaMax 2.5
     511
     512}
     513
    495514###########
    496515# b-tagging
     
    498517
    499518module BTagging BTagging {
    500   set PartonInputArray Delphes/partons
    501519  set JetInputArray JetEnergyScale/jets
    502520
    503521  set BitNumber 0
    504 
    505   set DeltaR 0.5
    506 
    507   set PartonPTMin 1.0
    508 
    509   set PartonEtaMax 2.5
    510522
    511523  # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
     
    518530
    519531  # efficiency formula for c-jets (misidentification rate)
    520   add EfficiencyFormula {4} {                                      (pt <= 15.0) * (0.000) + \
    521                                                 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \
    522                               (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \
     532  add EfficiencyFormula {4} {                                      (pt <= 15.0) * (0.000) +
     533                                                (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) +
     534                              (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) +
    523535                              (abs(eta) > 2.5)                                  * (0.000)}
    524536
    525537  # efficiency formula for b-jets
    526   add EfficiencyFormula {5} {                                      (pt <= 15.0) * (0.000) + \
    527                                                 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \
    528                               (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \
     538  add EfficiencyFormula {5} {                                      (pt <= 15.0) * (0.000) +
     539                                                (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) +
     540                              (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) +
    529541                              (abs(eta) > 2.5)                                  * (0.000)}
    530542}
     543
     544#############
     545# tau-tagging
     546#############
    531547
    532548module TauTagging TauTagging {
     
    589605  add Branch ScalarHT/energy ScalarHT ScalarHT
    590606}
    591 
  • cards/delphes_card_CMS_NoFastJet.tcl

    rd870fc5 rd77b51d  
    5151
    5252  # tracking efficiency formula for charged hadrons
    53   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    54                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    55                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) + \
    56                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) + \
    57                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) + \
     53  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     54                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     55                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) +
     56                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) +
     57                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) +
    5858                         (abs(eta) > 2.5)                                                  * (0.00)}
    5959}
     
    7070
    7171  # tracking efficiency formula for electrons
    72   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    73                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) + \
    74                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) + \
    75                                            (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) + \
    76                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) + \
    77                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) + \
    78                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) + \
     72  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     73                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) +
     74                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) +
     75                                           (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) +
     76                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) +
     77                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) +
     78                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) +
    7979                         (abs(eta) > 2.5)                                                  * (0.00)}
    8080}
     
    9191
    9292  # tracking efficiency formula for muons
    93   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    94                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) + \
    95                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) + \
    96                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    97                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) + \
     93  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     94                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) +
     95                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) +
     96                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     97                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) +
    9898                         (abs(eta) > 2.5)                                                  * (0.00)}
    9999}
     
    110110
    111111  # resolution formula for charged hadrons
    112   set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) + \
    113                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) + \
    114                                            (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \
    115                                            (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) + \
    116                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) + \
    117                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) + \
    118                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \
     112  set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) +
     113                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) +
     114                                           (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) +
     115                                           (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) +
     116                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) +
     117                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) +
     118                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) +
    119119                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
    120120}
     
    131131
    132132  # resolution formula for electrons
    133   set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.0e1) * (energy*0.0225) + \
    134                                            (abs(eta) <= 2.5) * (energy > 2.0e1)                    * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
    135                          (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
     133  set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.0e1) * (energy*0.0225) +
     134                                           (abs(eta) <= 2.5) * (energy > 2.0e1)                    * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) +
     135                         (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) +
    136136                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    137137
     
    149149
    150150  # resolution formula for muons
    151   set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1   && pt <= 5.0)   * (0.02) + \
    152                                            (abs(eta) <= 0.5) * (pt > 5.0   && pt <= 1.0e2) * (0.015) + \
    153                                            (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) + \
    154                                            (abs(eta) <= 0.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) + \
    155                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1   && pt <= 5.0)   * (0.03) + \
    156                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0   && pt <= 1.0e2) * (0.02) + \
    157                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) + \
    158                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) + \
    159                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 5.0)   * (0.04) + \
    160                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0   && pt <= 1.0e2) * (0.035) + \
    161                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) + \
     151  set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1   && pt <= 5.0)   * (0.02) +
     152                                           (abs(eta) <= 0.5) * (pt > 5.0   && pt <= 1.0e2) * (0.015) +
     153                                           (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) +
     154                                           (abs(eta) <= 0.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) +
     155                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1   && pt <= 5.0)   * (0.03) +
     156                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0   && pt <= 1.0e2) * (0.02) +
     157                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) +
     158                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) +
     159                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 5.0)   * (0.04) +
     160                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0   && pt <= 1.0e2) * (0.035) +
     161                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) +
    162162                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4)}
    163163}
     
    186186  set PhotonOutputArray photons
    187187
    188   set ECalEnergyMin 0.5
    189   set HCalEnergyMin 1.0
    190 
    191   set ECalEnergySignificanceMin 1.0
    192   set HCalEnergySignificanceMin 1.0
    193    
    194188  set EFlowTrackOutputArray eflowTracks
    195189  set EFlowPhotonOutputArray eflowPhotons
    196190  set EFlowNeutralHadronOutputArray eflowNeutralHadrons
     191
     192  set ECalEnergyMin 0.5
     193  set HCalEnergyMin 1.0
     194
     195  set ECalEnergySignificanceMin 1.0
     196  set HCalEnergySignificanceMin 1.0
     197
     198  set SmearTowerCenter true
    197199
    198200  set pi [expr {acos(-1)}]
     
    250252
    251253  # set ECalResolutionFormula {resolution formula as a function of eta and energy}
    252   set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  + \
     254  set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  +
    253255                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    254256
    255257  # set HCalResolutionFormula {resolution formula as a function of eta and energy}
    256   set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \
     258  set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +
    257259                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
    258260}
     
    269271  set OutputArray eflow
    270272}
    271 
    272 
  • cards/delphes_card_CMS_PileUp.tcl

    rd870fc5 rd77b51d  
    2222  EFlowMergerAllTracks
    2323  EFlowMerger
    24  
     24
    2525  NeutrinoFilter
    2626  GenJetFinder
     
    4343
    4444  MissingET
     45 
     46  JetFlavorAssociation
    4547
    4648  BTagging
     
    8082  set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))}
    8183
    82   #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + \
    83   #                                (abs(t) >  1.0e-09) * (abs(z) <= 0.15) * (0.00) + \
    84   #                               (abs(t) <= 1.0e-09) * (abs(z) > 0.15)  * (0.00) + \
     84  #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) +
     85  #                                (abs(t) >  1.0e-09) * (abs(z) <= 0.15) * (0.00) +
     86  #                               (abs(t) <= 1.0e-09) * (abs(z) > 0.15)  * (0.00) +
    8587  #                               (abs(t) >  1.0e-09) * (abs(z) > 0.15)  * (0.00)}
    8688
     
    120122
    121123  # tracking efficiency formula for charged hadrons
    122   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    123                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    124                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) + \
    125                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) + \
    126                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) + \
     124  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     125                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     126                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) +
     127                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.60) +
     128                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.85) +
    127129                         (abs(eta) > 2.5)                                                  * (0.00)}
    128130}
     
    139141
    140142  # tracking efficiency formula for electrons
    141   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    142                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) + \
    143                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) + \
    144                                            (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) + \
    145                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) + \
    146                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) + \
    147                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) + \
     143  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     144                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.73) +
     145                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e2) * (0.95) +
     146                                           (abs(eta) <= 1.5) * (pt > 1.0e2)                * (0.99) +
     147                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.50) +
     148                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e2) * (0.83) +
     149                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.90) +
    148150                         (abs(eta) > 2.5)                                                  * (0.00)}
    149151}
     
    160162
    161163  # tracking efficiency formula for muons
    162   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    163                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) + \
    164                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) + \
    165                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    166                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) + \
     164  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     165                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) +
     166                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) +
     167                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     168                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0)                  * (0.98) +
    167169                         (abs(eta) > 2.5)                                                  * (0.00)}
    168170}
     
    179181
    180182  # resolution formula for charged hadrons
    181   set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) + \
    182                                            (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) + \
    183                                            (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \
    184                                            (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) + \
    185                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) + \
    186                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) + \
    187                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \
     183  set ResolutionFormula {                  (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.02) +
     184                                           (abs(eta) <= 1.5) * (pt > 1.0   && pt <= 1.0e1) * (0.01) +
     185                                           (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) +
     186                                           (abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05) +
     187                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 1.0)   * (0.03) +
     188                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0   && pt <= 1.0e1) * (0.02) +
     189                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) +
    188190                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
    189191}
     
    200202
    201203  # resolution formula for electrons
    202   set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.0e1) * (energy*0.0225) + \
    203                                            (abs(eta) <= 2.5) * (energy > 2.0e1)                    * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
    204                          (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \
     204  set ResolutionFormula {                  (abs(eta) <= 2.5) * (energy > 0.1   && energy <= 2.0e1) * (energy*0.0225) +
     205                                           (abs(eta) <= 2.5) * (energy > 2.0e1)                    * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) +
     206                         (abs(eta) > 2.5 && abs(eta) <= 3.0)                                       * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) +
    205207                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    206208
     
    218220
    219221  # resolution formula for muons
    220   set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1   && pt <= 5.0)   * (0.02) + \
    221                                            (abs(eta) <= 0.5) * (pt > 5.0   && pt <= 1.0e2) * (0.015) + \
    222                                            (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) + \
    223                                            (abs(eta) <= 0.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) + \
    224                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1   && pt <= 5.0)   * (0.03) + \
    225                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0   && pt <= 1.0e2) * (0.02) + \
    226                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) + \
    227                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) + \
    228                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 5.0)   * (0.04) + \
    229                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0   && pt <= 1.0e2) * (0.035) + \
    230                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) + \
     222  set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1   && pt <= 5.0)   * (0.02) +
     223                                           (abs(eta) <= 0.5) * (pt > 5.0   && pt <= 1.0e2) * (0.015) +
     224                                           (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) +
     225                                           (abs(eta) <= 0.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) +
     226                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1   && pt <= 5.0)   * (0.03) +
     227                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0   && pt <= 1.0e2) * (0.02) +
     228                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) +
     229                         (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4) +
     230                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1   && pt <= 5.0)   * (0.04) +
     231                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0   && pt <= 1.0e2) * (0.035) +
     232                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) +
    231233                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4)}
    232234}
     
    255257  set PhotonOutputArray photons
    256258
    257   set ECalEnergyMin 0.5
    258   set HCalEnergyMin 1.0
    259 
    260   set ECalEnergySignificanceMin 1.0
    261   set HCalEnergySignificanceMin 1.0
    262 
    263259  set EFlowTrackOutputArray eflowTracks
    264260  set EFlowPhotonOutputArray eflowPhotons
    265261  set EFlowNeutralHadronOutputArray eflowNeutralHadrons
     262
     263  set ECalEnergyMin 0.5
     264  set HCalEnergyMin 1.0
     265
     266  set ECalEnergySignificanceMin 1.0
     267  set HCalEnergySignificanceMin 1.0
     268
     269  set SmearTowerCenter true
    266270
    267271  set pi [expr {acos(-1)}]
     
    319323
    320324  # set ECalResolutionFormula {resolution formula as a function of eta and energy}
    321   set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  + \
     325  set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) +
    322326                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    323327
    324328  # set HCalResolutionFormula {resolution formula as a function of eta and energy}
    325   set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \
     329  set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +
    326330                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
    327331}
     
    386390
    387391module FastJetGridMedianEstimator Rho {
    388  
     392
    389393  set InputArray EFlowMerger/eflow
    390394  set RhoOutputArray rho
    391395
    392   # etamin etamax gridsize_eta gridsize_phi
    393  
    394   add GridRange 0.0 2.5 1.0 1.0
     396  # add GridRange rapmin rapmax drap dphi
     397  # rapmin - the minimum rapidity extent of the grid
     398  # rapmax - the maximum rapidity extent of the grid
     399  # drap - the grid spacing in rapidity
     400  # dphi - the grid spacing in azimuth
     401
     402  add GridRange -5.0 -2.5 1.0 1.0
     403  add GridRange -2.5 2.5 1.0 1.0
    395404  add GridRange 2.5 5.0 1.0 1.0
    396405
     
    402411
    403412module PdgCodeFilter NeutrinoFilter {
    404  
     413
    405414  set InputArray Delphes/stableParticles
    406415  set OutputArray filteredParticles
    407416
    408417  set PTMin 0.0
    409  
     418
    410419  add PdgCode {12}
    411420  add PdgCode {14}
     
    513522
    514523  # efficiency formula for photons
    515   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    516                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    517                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) + \
     524  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     525                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     526                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) +
    518527                         (abs(eta) > 2.5)                                   * (0.00)}
    519528}
     
    549558
    550559  # efficiency formula for electrons
    551   set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) + \
    552                                            (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) + \
    553                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) + \
     560  set EfficiencyFormula {                                      (pt <= 10.0) * (0.00) +
     561                                           (abs(eta) <= 1.5) * (pt > 10.0)  * (0.95) +
     562                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0)  * (0.85) +
    554563                         (abs(eta) > 2.5)                                   * (0.00)}
    555564}
     
    584593
    585594  # efficiency formula for muons
    586   set EfficiencyFormula {                                      (pt <= 10.0)               * (0.00) + \
    587                                            (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \
    588                                            (abs(eta) <= 1.5) * (pt > 1.0e3)               * (0.95 * exp(0.5 - pt*5.0e-4)) + \
    589                          (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \
    590                          (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3)               * (0.95 * exp(0.5 - pt*5.0e-4)) + \
     595  set EfficiencyFormula {                                      (pt <= 10.0)               * (0.00) +
     596                                           (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) +
     597                                           (abs(eta) <= 1.5) * (pt > 1.0e3)               * (0.95 * exp(0.5 - pt*5.0e-4)) +
     598                         (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) +
     599                         (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3)               * (0.95 * exp(0.5 - pt*5.0e-4)) +
    591600                         (abs(eta) > 2.4)                                                 * (0.00)}
    592601}
     
    635644}
    636645
     646########################
     647# Jet Flavor Association
     648########################
     649
     650module JetFlavorAssociation JetFlavorAssociation {
     651 
     652  set PartonInputArray Delphes/partons
     653  set ParticleInputArray Delphes/allParticles
     654  set ParticleLHEFInputArray Delphes/allParticlesLHEF
     655  set JetInputArray JetEnergyScale/jets
     656 
     657  set DeltaR 0.5
     658  set PartonPTMin 1.0
     659  set PartonEtaMax 2.5
     660
     661}
     662
    637663###########
    638664# b-tagging
     
    640666
    641667module BTagging BTagging {
    642   set PartonInputArray Delphes/partons
    643668  set JetInputArray JetEnergyScale/jets
    644669
    645670  set BitNumber 0
    646 
    647   set DeltaR 0.5
    648 
    649   set PartonPTMin 1.0
    650 
    651   set PartonEtaMax 2.5
    652671
    653672  # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
     
    660679
    661680  # efficiency formula for c-jets (misidentification rate)
    662   add EfficiencyFormula {4} {                                      (pt <= 15.0) * (0.000) + \
    663                                                 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \
    664                               (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \
     681  add EfficiencyFormula {4} {                                      (pt <= 15.0) * (0.000) +
     682                                                (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) +
     683                              (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) +
    665684                              (abs(eta) > 2.5)                                  * (0.000)}
    666685
    667686  # efficiency formula for b-jets
    668   add EfficiencyFormula {5} {                                      (pt <= 15.0) * (0.000) + \
    669                                                 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \
    670                               (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \
     687  add EfficiencyFormula {5} {                                      (pt <= 15.0) * (0.000) +
     688                                                (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) +
     689                              (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) +
    671690                              (abs(eta) > 2.5)                                  * (0.000)}
    672691}
     692
     693#############
     694# tau-tagging
     695#############
    673696
    674697module TauTagging TauTagging {
     
    733756  add Branch PileUpMerger/vertices Vertex Vertex
    734757}
    735 
  • cards/delphes_card_FCC_basic.tcl

    rd870fc5 rd77b51d  
    1717  AngularSmearing
    1818  ImpactParameterSmearing
    19  
     19
    2020  ECal
    2121  HCal
    22  
     22
    2323  TowerMerger
    2424  EFlowMerger
    2525
    2626  MissingET
    27  
     27
    2828  NeutrinoFilter
    2929  GenJetFinder
     
    3131
    3232  JetEnergyScale
    33  
     33
    3434  TrackCountingBTagging
    3535  TauTagging
     
    7272
    7373  # tracking efficiency formula for charged hadrons
    74   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    75                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) + \
    76                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) + \
    77                          (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1   && pt <= 1.0)   * (0.60) + \
    78                          (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 1.0)                  * (0.90) + \
     74  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     75                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) +
     76                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.95) +
     77                         (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1   && pt <= 1.0)   * (0.60) +
     78                         (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 1.0)                  * (0.90) +
    7979                         (abs(eta) > 4.0)                                                  * (0.00)}
    80                          
     80
    8181}
    8282
     
    9292
    9393  # tracking efficiency formula for electrons
    94   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    95                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) + \
    96                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) + \
    97                          (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    98                          (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 1.0)                  * (0.98) + \
     94  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     95                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) +
     96                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) +
     97                         (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     98                         (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 1.0)                  * (0.98) +
    9999                         (abs(eta) > 4.0)                                                  * (0.00)}
    100100}
     
    111111
    112112  # tracking efficiency formula for muons
    113   set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) + \
    114                                            (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) + \
    115                                            (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) + \
    116                          (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1   && pt <= 1.0)   * (0.70) + \
    117                          (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 1.0)                  * (0.98) + \
     113  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
     114                                           (abs(eta) <= 1.5) * (pt > 0.1   && pt <= 1.0)   * (0.75) +
     115                                           (abs(eta) <= 1.5) * (pt > 1.0)                  * (0.99) +
     116                         (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1   && pt <= 1.0)   * (0.70) +
     117                         (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 1.0)                  * (0.98) +
    118118                         (abs(eta) > 4.0)                                                  * (0.00)}
    119119}
     
    130130
    131131  # resolution formula for charged hadrons
    132   set ResolutionFormula {    (abs(eta) <= 1.5)                   * (pt > 0.1) * (0.01 + pt*2.e-5) + \
     132  set ResolutionFormula {    (abs(eta) <= 1.5)                   * (pt > 0.1) * (0.01 + pt*2.e-5) +
    133133                             (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1) * (0.02 + pt*3.e-5)}
    134134
     
    147147
    148148  # resolution formula for electrons
    149   set ResolutionFormula {                  (abs(eta) <= 4.0) * (energy > 0.1   && energy <= 2.0e1) * (energy*0.007) + \
    150                                            (abs(eta) <= 4.0) * (energy > 2.0e1)                    * sqrt(energy^2*0.005^2 + energy*0.02^2) + \
     149  set ResolutionFormula {                  (abs(eta) <= 4.0) * (energy > 0.1   && energy <= 2.0e1) * (energy*0.007) +
     150                                           (abs(eta) <= 4.0) * (energy > 2.0e1)                    * sqrt(energy^2*0.005^2 + energy*0.02^2) +
    151151                                           (abs(eta) > 4.0 && abs(eta) <= 6.0)                     * sqrt(energy^2*0.05^2 + energy*1.00^2)}
    152152
     
    164164
    165165  # resolution formula for muons
    166   set ResolutionFormula {    (abs(eta) <= 1.5)                   * (pt > 0.1) * (0.01 + pt*5.e-6) + \
     166  set ResolutionFormula {    (abs(eta) <= 1.5)                   * (pt > 0.1) * (0.01 + pt*5.e-6) +
    167167                             (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1) * (0.02 + pt*1.e-5)}
    168168
     
    210210
    211211  # absolute impact parameter smearing formula (in mm) as a function of pt and eta
    212   set ResolutionFormula {(pt > 0.1  && pt <= 5.0)   * (0.010) + \
     212  set ResolutionFormula {(pt > 0.1  && pt <= 5.0)   * (0.010) +
    213213                         (pt > 5.0)                 * (0.005)}
    214214
     
    225225  set TowerOutputArray ecalTowers
    226226  set EFlowTowerOutputArray eflowPhotons
    227  
     227
     228  set IsEcal true
     229 
    228230  set EnergyMin 0.5
    229231  set EnergySignificanceMin 1.0
    230  
     232
     233  set SmearTowerCenter true
     234
    231235  set pi [expr {acos(-1)}]
    232236
     
    234238  # each list starts with the lower edge of the first tower
    235239  # the list ends with the higher edged of the last tower
    236    
     240
    237241  # 0.5 degree towers
    238242  set PhiBins {}
     
    246250    add EtaPhiBins $eta $PhiBins
    247251  }
    248  
     252
    249253  # default energy fractions {abs(PDG code)} {fraction of energy deposited in ECAL}
    250  
     254
    251255  add EnergyFraction {0} {0.0}
    252256  # energy fractions for e, gamma and pi0
     
    269273
    270274  # set ECalResolutionFormula {resolution formula as a function of eta and energy}
    271  
     275
    272276  # This is the CMS ECAL resolution, extended up eta = 6.0
    273   set ResolutionFormula { (abs(eta) <= 3.0)                   * sqrt(energy^2*0.003^2 + energy*0.029^2 + 0.125^2)  + \
     277  set ResolutionFormula { (abs(eta) <= 3.0)                   * sqrt(energy^2*0.003^2 + energy*0.029^2 + 0.125^2)  +
    274278                          (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    275279
    276  
     280
    277281}
    278282
     
    287291  set TowerOutputArray hcalTowers
    288292  set EFlowTowerOutputArray eflowNeutralHadrons
    289  
     293
     294  set IsEcal false
     295 
    290296  set EnergyMin 1.0
    291297  set EnergySignificanceMin 1.0
    292  
     298
     299  set SmearTowerCenter true
     300
    293301  set pi [expr {acos(-1)}]
    294302
     
    296304  # each list starts with the lower edge of the first tower
    297305  # the list ends with the higher edged of the last tower
    298  
    299  
     306
     307
    300308  # 5 degree towers
    301309  set PhiBins {}
     
    309317    add EtaPhiBins $eta $PhiBins
    310318  }
    311  
    312    
     319
     320
    313321  # default energy fractions {abs(PDG code)} {Fecal Fhcal}
    314322  add EnergyFraction {0} {1.0}
     
    332340
    333341  # set HCalResolutionFormula {resolution formula as a function of eta and energy}
    334  
     342
    335343  # This is the ATLAS HCAL resolution, extended up eta = 6.0
    336   set HCalResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \
    337                              (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \
     344  set ResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) +
     345                             (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) +
    338346                             (abs(eta) > 3.2 && abs(eta) <= 6.0) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
    339347
     
    373381  set MomentumOutputArray momentum
    374382}
    375                    
     383
    376384
    377385##################
     
    390398
    391399module PdgCodeFilter NeutrinoFilter {
    392  
     400
    393401  set InputArray Delphes/stableParticles
    394402  set OutputArray filteredParticles
    395403
    396404  set PTMin 0.0
    397  
     405
    398406  add PdgCode {12}
    399407  add PdgCode {14}
     
    427435
    428436module FastJetFinder FastJetFinder {
    429 #  set InputArray Calorimeter/towers
     437#  set InputArray TowerMerger/towers
    430438  set InputArray EFlowMerger/eflow
    431439
     
    463471  # maximum distance between jet and track
    464472  set DeltaR 0.3
    465  
    466   # minimum pt of tracks 
     473
     474  # minimum pt of tracks
    467475  set TrackPTMin 1.0
    468  
     476
    469477  # minimum transverse impact parameter (in mm)
    470478  set TrackIPMax 2.0
    471  
     479
    472480  # minimum ip significance for the track to be counted
    473481  set SigMin 6.5
    474  
     482
    475483  # minimum number of tracks (high efficiency n=2, high purity n=3)
    476484  set Ntracks 3
     
    510518  add Branch Delphes/allParticles Particle GenParticle
    511519  add Branch GenJetFinder/jets GenJet Jet
    512  
     520
    513521  add Branch ChargedHadronMomentumSmearing/chargedHadrons ChargedHadron Track
    514522  add Branch HCal/eflowNeutralHadrons NeutralHadron Tower
     
    521529  add Branch ScalarHT/energy ScalarHT ScalarHT
    522530}
    523  
  • cards/delphes_card_LHCb.tcl

    rd870fc5 rd77b51d  
    99set ExecutionPath {
    1010 
     11  PhotonConversions
    1112  ParticlePropagator
    12  
     13
    1314  ChargedHadronMomentumSmearing
    1415  ElectronEnergySmearing
     
    1718  TrackMerger
    1819  ImpactParameterSmearing
    19  
     20
    2021  IdentificationMap
    21  
     22
    2223  ECal
    2324  HCal
    2425
    2526  TreeWriter
     27}
     28
     29
     30
     31#####################
     32# Photon Conversions
     33#####################
     34
     35module PhotonConversions PhotonConversions {
     36  set InputArray Delphes/stableParticles
     37
     38  set OutputArray stableParticles
     39 
     40  # radius of the magnetic field coverage, in m
     41 
     42  set Radius 3.31
     43   
     44  set HalfLength 12.0
     45 
     46  set EtaMin 2.0
     47  set EtaMax 5.0
     48 
     49 
     50  # material budget map: (uniform for now)
     51  # distribution of the detector mass ( density / X0), can be thought as
     52  # conversion rate per meter function of r,phi,z
     53 
     54 
     55  # unit: m-1
     56 
     57  set Step 0.05
     58 
     59  set ConversionMap {          (abs(z) > 0.0 && abs(z) < 12.0 ) * (0.07) +
     60                               (abs(z) > 0.0) * (0.00) +
     61                               (abs(z) < 0.0) * (0.00)
     62                    }
     63
    2664}
    2765
     
    3371
    3472module ParticlePropagator ParticlePropagator {
    35   set InputArray Delphes/stableParticles
     73  set InputArray PhotonConversions/stableParticles
    3674
    3775  set OutputArray stableParticles
     
    4179
    4280  # radius of the magnetic field coverage, in m
    43  
     81
    4482  set Radius 3.31
    45  
    46  
     83
     84
    4785  # half-length of the magnetic field coverage, in m
    4886  set HalfLength 12.0
     
    5391  # Need to veto anything with theta > 0.269 rad  -> eta = 2
    5492  #                            theta < 0.0135 rad -> eta = 5
    55  
    56   # tracker and calos are at approx 0.269 rad, R = 12*tan(0.269) 
    57 
    58 }
    59 
    60  
     93
     94  # tracker and calos are at approx 0.269 rad, R = 12*tan(0.269)
     95
     96}
     97
     98
    6199########################################
    62100# Momentum resolution for charged tracks
     
    84122
    85123  # resolution formula for electrons
    86   set ResolutionFormula { (eta > 2.0  && eta <= 5.0) * (energy > 0.1   && energy <= 8.0) * (energy*0.05) + \
     124  set ResolutionFormula { (eta > 2.0  && eta <= 5.0) * (energy > 0.1   && energy <= 8.0) * (energy*0.05) +
    87125                          (eta > 2.0  && eta <= 5.0) * (energy > 8.0)                    *  sqrt(energy^2*0.015^2 + energy*0.10^2)}
    88126  }
     
    139177  set InputArray ImpactParameterSmearing/tracks
    140178  set OutputArray tracks
    141  
     179
    142180  # {PID in} {PID out} {formula}
    143181  # make sure "PID in" and "PID out" have the same charge (e.g {-13} {211} or {-321} {211})
    144182  # {211} {-13} is equivalent to {-211} {13} (and needs to be written once only...)
    145  
    146  
    147  
    148  
    149  
    150  
    151   # --- pions --- 
    152  
    153   add EfficiencyFormula {211} {211} {      (eta <= 2.0)                                  * (0.00) + \
    154                                            (eta > 2.0  && eta <= 5.0) *       (pt < 0.8) * (0.00) + \
    155                                            (eta > 2.0  && eta <= 5.0) *       (pt >= 0.8)* (0.95) + \
     183
     184
     185
     186
     187
     188
     189  # --- pions ---
     190
     191  add EfficiencyFormula {211} {211} {      (eta <= 2.0)                                  * (0.00) +
     192                                           (eta > 2.0  && eta <= 5.0) *       (pt < 0.8) * (0.00) +
     193                                           (eta > 2.0  && eta <= 5.0) *       (pt >= 0.8)* (0.95) +
    156194                                           (eta > 5.0)                                   * (0.00)}
    157  
    158   add EfficiencyFormula {211} {-13} {      (eta <= 2.0)                                 * (0.00) + \
    159                                            (eta > 2.0  && eta <= 5.0) *      (pt < 0.8) * (0.00) + \
    160                                            (eta > 2.0  && eta <= 5.0) *      (pt >= 0.8)* (0.005 + 0.0663*exp(-0.13*pt*cosh(eta))) + \
     195
     196  add EfficiencyFormula {211} {-13} {      (eta <= 2.0)                                 * (0.00) +
     197                                           (eta > 2.0  && eta <= 5.0) *      (pt < 0.8) * (0.00) +
     198                                           (eta > 2.0  && eta <= 5.0) *      (pt >= 0.8)* (0.005 + 0.0663*exp(-0.13*pt*cosh(eta))) +
    161199                                           (eta > 5.0)                                  * (0.00)}
    162200
    163  
     201
    164202 # --- kaons ---
    165  
    166  
    167   add EfficiencyFormula {321} {321} {      (eta <= 2.0)                                  * (0.00) + \
    168                                            (eta > 2.0  && eta <= 5.0) *       (pt < 0.8) * (0.00) + \
    169                                            (eta > 2.0  && eta <= 5.0) *       (pt >= 0.8)* (0.95) + \
     203
     204
     205  add EfficiencyFormula {321} {321} {      (eta <= 2.0)                                  * (0.00) +
     206                                           (eta > 2.0  && eta <= 5.0) *       (pt < 0.8) * (0.00) +
     207                                           (eta > 2.0  && eta <= 5.0) *       (pt >= 0.8)* (0.95) +
    170208                                           (eta > 5.0)                                   * (0.00)}
    171                                            
    172   add EfficiencyFormula {321} {-13} {      (eta <= 2.0)                                 * (0.00) + \
    173                                            (eta > 2.0  && eta <= 5.0) *      (pt < 0.8) * (0.00) + \
    174                                            (eta > 2.0  && eta <= 5.0) *      (pt >= 0.8)* (0.005 + 0.086*exp(-0.11*pt*cosh(eta))) + \
     209
     210  add EfficiencyFormula {321} {-13} {      (eta <= 2.0)                                 * (0.00) +
     211                                           (eta > 2.0  && eta <= 5.0) *      (pt < 0.8) * (0.00) +
     212                                           (eta > 2.0  && eta <= 5.0) *      (pt >= 0.8)* (0.005 + 0.086*exp(-0.11*pt*cosh(eta))) +
    175213                                           (eta > 5.0)                                  * (0.00)}
    176214
    177215
    178216 # --- protons ---
    179  
    180  
    181   add EfficiencyFormula {2212} {2212} {    (eta <= 2.0)                                  * (0.00) + \
    182                                            (eta > 2.0  && eta <= 5.0) *       (pt < 0.8) * (0.00) + \
    183                                            (eta > 2.0  && eta <= 5.0) *       (pt >= 0.8)* (0.95) + \
     217
     218
     219  add EfficiencyFormula {2212} {2212} {    (eta <= 2.0)                                  * (0.00) +
     220                                           (eta > 2.0  && eta <= 5.0) *       (pt < 0.8) * (0.00) +
     221                                           (eta > 2.0  && eta <= 5.0) *       (pt >= 0.8)* (0.95) +
    184222                                           (eta > 5.0)                                   * (0.00)}
    185                                            
    186   add EfficiencyFormula {2212} {-13} {     (eta <= 2.0)                                 * (0.00) + \
    187                                            (eta > 2.0  && eta <= 5.0) *      (pt < 0.8) * (0.00) + \
    188                                            (eta > 2.0  && eta <= 5.0) *      (pt >= 0.8)* (0.002) + \
     223
     224  add EfficiencyFormula {2212} {-13} {     (eta <= 2.0)                                 * (0.00) +
     225                                           (eta > 2.0  && eta <= 5.0) *      (pt < 0.8) * (0.00) +
     226                                           (eta > 2.0  && eta <= 5.0) *      (pt >= 0.8)* (0.002) +
    189227                                           (eta > 5.0)                                  * (0.00)}
    190228
     
    195233
    196234
    197   add EfficiencyFormula {-13} {-13} {      (eta <= 2.0)                                * (0.00) + \
    198                                            (eta > 2.0  && eta <= 5.0) *      (pt < 0.8)* (0.00) + \
    199                                            (eta > 2.0  && eta <= 5.0) *     (pt >= 0.8)* (0.97) + \
     235  add EfficiencyFormula {-13} {-13} {      (eta <= 2.0)                                * (0.00) +
     236                                           (eta > 2.0  && eta <= 5.0) *      (pt < 0.8)* (0.00) +
     237                                           (eta > 2.0  && eta <= 5.0) *     (pt >= 0.8)* (0.97) +
    200238                                           (eta > 5.0)                                 * (0.00)}
    201239
    202  
     240# --- electrons ---
     241
     242
     243
     244  add EfficiencyFormula {-11} {-11} {      (eta <= 2.0)                                * (0.00) +
     245                                           (eta > 2.0  && eta <= 5.0) *      (pt < 0.6)* (0.97) +
     246                                           (eta > 2.0  && eta <= 5.0) *     (pt >= 0.6)* (0.97) +
     247                                           (eta > 5.0)                                 * (0.00)}
     248
     249
     250
    203251 # efficiency for other charged particles (should be always {0} {0} {formula})
    204  
    205   add EfficiencyFormula {0} {0}     {      (eta <= 2.0)                                * (0.00) + \
    206                                            (eta > 2.0  && eta <= 5.0) *     (pt < 0.8) * (0.00) + \
    207                                            (eta > 2.0  && eta <= 5.0) *     (pt > 0.8) * (0.95) + \
     252
     253  add EfficiencyFormula {0} {0}     {      (eta <= 2.0)                                * (0.00) +
     254                                           (eta > 2.0  && eta <= 5.0) *     (pt < 0.8) * (0.00) +
     255                                           (eta > 2.0  && eta <= 5.0) *     (pt > 0.8) * (0.95) +
    208256                                           (eta > 5.0)                                 * (0.00)}
    209257
     
    223271  set TowerOutputArray ecalTowers
    224272  set EFlowTowerOutputArray eflowPhotons
    225  
     273
     274  set IsEcal true
     275
     276  set EnergyMin 0.0
     277  set EnergySignificanceMin 0.0
     278
     279  set SmearTowerCenter true
     280
    226281  set pi [expr {acos(-1)}]
    227282
     
    241296    add EtaPhiBins $eta $PhiBins
    242297  }
    243  
     298
    244299    # 1.25 degree towers
    245300  set PhiBins {}
     
    285340  add EnergyFraction {3122} {0.3}
    286341
    287    set ResolutionFormula {(eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)}
     342  set ResolutionFormula {(eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)}
    288343}
    289344
     
    298353  set TowerOutputArray hcalTowers
    299354  set EFlowTowerOutputArray eflowNeutralHadrons
    300  
     355
     356  set IsEcal false
     357
     358  set EnergyMin 0.0
     359  set EnergySignificanceMin 0.0
     360
     361  set SmearTowerCenter true
     362
    301363  set pi [expr {acos(-1)}]
    302364
     
    330392
    331393
    332    
     394
    333395  # default energy fractions {abs(PDG code)} {Fecal Fhcal}
    334396  add EnergyFraction {0} {1.0}
     
    352414
    353415  set ResolutionFormula { (eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.05^2 + energy*0.80^2)}
    354   }
     416}
    355417
    356418
     
    360422
    361423# tracks, towers and eflow objects are not stored by default in the output.
    362 # if needed (for jet constituent or other studies), uncomment the relevant 
    363 # "add Branch ..." lines. 
     424# if needed (for jet constituent or other studies), uncomment the relevant
     425# "add Branch ..." lines.
    364426
    365427module TreeWriter TreeWriter {
    366428# add Branch InputArray BranchName BranchClass
    367  
     429
    368430  add Branch Delphes/allParticles Particle GenParticle
    369431
     
    371433  add Branch HCal/eflowNeutralHadrons NeutralHadron Tower
    372434  add Branch ECal/eflowPhotons Photon Photon
    373  
    374 }
    375 
     435
     436}
     437
  • classes/ClassesLinkDef.h

    rd870fc5 rd77b51d  
    4646#pragma link C++ class LHCOEvent+;
    4747#pragma link C++ class LHEFEvent+;
     48#pragma link C++ class LHEFWeight+;
    4849#pragma link C++ class HepMCEvent+;
    4950#pragma link C++ class GenParticle+;
  • classes/DelphesClasses.cc

    rd870fc5 rd77b51d  
    4545//------------------------------------------------------------------------------
    4646
    47 TLorentzVector GenParticle::P4()
     47TLorentzVector GenParticle::P4() const
    4848{
    4949  TLorentzVector vec;
     
    5454//------------------------------------------------------------------------------
    5555
    56 TLorentzVector MissingET::P4()
     56TLorentzVector MissingET::P4() const
    5757{
    5858  TLorentzVector vec;
     
    6363//------------------------------------------------------------------------------
    6464
    65 TLorentzVector Photon::P4()
     65TLorentzVector Photon::P4() const
    6666{
    6767  TLorentzVector vec;
     
    7272//------------------------------------------------------------------------------
    7373
    74 TLorentzVector Electron::P4()
     74TLorentzVector Electron::P4() const
    7575{
    7676  TLorentzVector vec;
     
    8181//------------------------------------------------------------------------------
    8282
    83 TLorentzVector Muon::P4()
     83TLorentzVector Muon::P4() const
    8484{
    8585  TLorentzVector vec;
     
    9090//------------------------------------------------------------------------------
    9191
    92 TLorentzVector Jet::P4()
     92TLorentzVector Jet::P4() const
    9393{
    9494  TLorentzVector vec;
     
    9999//------------------------------------------------------------------------------
    100100
    101 TLorentzVector Track::P4()
     101TLorentzVector Track::P4() const
    102102{
    103103  TLorentzVector vec;
     
    108108//------------------------------------------------------------------------------
    109109
    110 TLorentzVector Tower::P4()
     110TLorentzVector Tower::P4() const
    111111{
    112112  TLorentzVector vec;
     
    120120  PID(0), Status(0), M1(-1), M2(-1), D1(-1), D2(-1),
    121121  Charge(0), Mass(0.0),
    122   IsPU(0), IsConstituent(0),
    123   BTag(0), TauTag(0), Eem(0.0), Ehad(0.0),
     122  IsPU(0), IsRecoPU(0), IsConstituent(0), IsFromConversion(0),
     123  Flavor(0), FlavorAlgo(0), FlavorPhys(0),
     124  BTag(0), BTagAlgo(0), BTagPhys(0),
     125  TauTag(0), Eem(0.0), Ehad(0.0),
    124126  DeltaEta(0.0), DeltaPhi(0.0),
    125127  Momentum(0.0, 0.0, 0.0, 0.0),
     
    133135  MeanSqDeltaR(0),
    134136  PTD(0),
     137  NTimeHits(-1),
     138  IsolationVar(-999),
     139  IsolationVarRhoCorr(-999),
     140  SumPtCharged(-999),
     141  SumPtNeutral(-999),
     142  SumPtChargedPU(-999),
     143  SumPt(-999),
     144  NSubJetsTrimmed(0),
     145  NSubJetsPruned(0),
     146  NSubJetsSoftDropped(0),
    135147  fFactory(0),
    136148  fArray(0)
    137149{
     150  int i;
    138151  Edges[0] = 0.0;
    139152  Edges[1] = 0.0;
     
    150163  Tau[3] = 0.0;
    151164  Tau[4] = 0.0;
     165  for(i = 0; i < 5; ++i)
     166  {
     167    TrimmedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
     168    PrunedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
     169    SoftDroppedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
     170  }
    152171}
    153172
     
    224243  object.IsPU = IsPU;
    225244  object.IsConstituent = IsConstituent;
     245  object.IsFromConversion = IsFromConversion;
     246  object.Flavor = Flavor;
     247  object.FlavorAlgo = FlavorAlgo;
     248  object.FlavorPhys = FlavorPhys;
    226249  object.BTag = BTag;
     250  object.BTagAlgo = BTagAlgo;
     251  object.BTagPhys = BTagPhys;
    227252  object.TauTag = TauTag;
    228253  object.Eem = Eem;
     
    249274  object.MeanSqDeltaR = MeanSqDeltaR;
    250275  object.PTD = PTD;
     276  object.NTimeHits = NTimeHits;
     277  object.IsolationVar = IsolationVar;
     278  object.IsolationVarRhoCorr = IsolationVarRhoCorr;
     279  object.SumPtCharged = SumPtCharged;
     280  object.SumPtNeutral = SumPtNeutral;
     281  object.SumPtChargedPU = SumPtChargedPU;
     282  object.SumPt = SumPt;
     283
    251284  object.FracPt[0] = FracPt[0];
    252285  object.FracPt[1] = FracPt[1];
     
    260293  object.Tau[4] = Tau[4];
    261294
     295  object.TrimmedP4[0] = TrimmedP4[0];
     296  object.TrimmedP4[1] = TrimmedP4[1];
     297  object.TrimmedP4[2] = TrimmedP4[2];
     298  object.TrimmedP4[3] = TrimmedP4[3];
     299  object.TrimmedP4[4] = TrimmedP4[4];
     300  object.PrunedP4[0] = PrunedP4[0];
     301  object.PrunedP4[1] = PrunedP4[1];
     302  object.PrunedP4[2] = PrunedP4[2];
     303  object.PrunedP4[3] = PrunedP4[3];
     304  object.PrunedP4[4] = PrunedP4[4];
     305  object.SoftDroppedP4[0] = SoftDroppedP4[0];
     306  object.SoftDroppedP4[1] = SoftDroppedP4[1];
     307  object.SoftDroppedP4[2] = SoftDroppedP4[2];
     308  object.SoftDroppedP4[3] = SoftDroppedP4[3];
     309  object.SoftDroppedP4[4] = SoftDroppedP4[4];
     310
     311  object.NSubJetsTrimmed = NSubJetsTrimmed;
     312  object.NSubJetsPruned = NSubJetsPruned;
     313  object.NSubJetsSoftDropped = NSubJetsSoftDropped;
     314
    262315  object.fFactory = fFactory;
    263316  object.fArray = 0;
     317
     318  // copy cluster timing info
     319  copy(ECalEnergyTimePairs.begin(), ECalEnergyTimePairs.end(), back_inserter(object.ECalEnergyTimePairs));
    264320
    265321  if(fArray && fArray->GetEntriesFast() > 0)
     
    278334void Candidate::Clear(Option_t* option)
    279335{
     336  int i;
    280337  SetUniqueID(0);
    281338  ResetBit(kIsReferenced);
     
    287344  IsPU = 0;
    288345  IsConstituent = 0;
     346  IsFromConversion = 0;
     347  Flavor = 0;
     348  FlavorAlgo = 0;
     349  FlavorPhys = 0;
    289350  BTag = 0;
     351  BTagAlgo = 0;
     352  BTagPhys = 0;
    290353  TauTag = 0;
    291354  Eem = 0.0;
     
    311374  MeanSqDeltaR = 0.0;
    312375  PTD = 0.0;
     376
     377  NTimeHits = 0;
     378  ECalEnergyTimePairs.clear();
     379
     380  IsolationVar = -999;
     381  IsolationVarRhoCorr = -999;
     382  SumPtCharged = -999;
     383  SumPtNeutral = -999;
     384  SumPtChargedPU = -999;
     385  SumPt = -999;
     386
    313387  FracPt[0] = 0.0;
    314388  FracPt[1] = 0.0;
     
    322396  Tau[4] = 0.0;
    323397
     398  for(i = 0; i < 5; ++i)
     399  {
     400    TrimmedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
     401    PrunedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
     402    SoftDroppedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
     403  }
     404
     405  NSubJetsTrimmed = 0;
     406  NSubJetsPruned = 0;
     407  NSubJetsSoftDropped = 0;
     408
    324409  fArray = 0;
    325410}
  • classes/DelphesClasses.h

    rd870fc5 rd77b51d  
    8484//---------------------------------------------------------------------------
    8585
     86class LHEFWeight: public TObject
     87{
     88public:
     89  Int_t ID; // weight ID
     90  Float_t Weight; // weight value
     91
     92  ClassDef(LHEFWeight, 1)
     93};
     94
     95//---------------------------------------------------------------------------
     96
    8697class HepMCEvent: public Event
    8798{
     
    150161  const CompBase *GetCompare() const { return fgCompare; }
    151162
    152   TLorentzVector P4();
     163  TLorentzVector P4() const;
    153164
    154165  ClassDef(GenParticle, 1)
     
    177188  Float_t Phi; // mising energy azimuthal angle
    178189
    179   TLorentzVector P4();
     190  TLorentzVector P4() const;
    180191
    181192  ClassDef(MissingET, 1)
     
    231242  TRefArray Particles; // references to generated particles
    232243
    233   static CompBase *fgCompare; //!
    234   const CompBase *GetCompare() const { return fgCompare; }
    235 
    236   TLorentzVector P4();
    237 
    238   ClassDef(Photon, 2)
     244  // Isolation variables
     245
     246  Float_t IsolationVar;
     247  Float_t IsolationVarRhoCorr;
     248  Float_t SumPtCharged;
     249  Float_t SumPtNeutral;
     250  Float_t SumPtChargedPU;
     251  Float_t SumPt;
     252
     253  static CompBase *fgCompare; //!
     254  const CompBase *GetCompare() const { return fgCompare; }
     255
     256  TLorentzVector P4() const;
     257
     258  ClassDef(Photon, 3)
    239259};
    240260
     
    257277  TRef Particle; // reference to generated particle
    258278
    259   static CompBase *fgCompare; //!
    260   const CompBase *GetCompare() const { return fgCompare; }
    261 
    262   TLorentzVector P4();
    263 
    264   ClassDef(Electron, 2)
     279  // Isolation variables
     280
     281  Float_t IsolationVar;
     282  Float_t IsolationVarRhoCorr;
     283  Float_t SumPtCharged;
     284  Float_t SumPtNeutral;
     285  Float_t SumPtChargedPU;
     286  Float_t SumPt;
     287
     288  static CompBase *fgCompare; //!
     289  const CompBase *GetCompare() const { return fgCompare; }
     290
     291  TLorentzVector P4() const;
     292
     293  ClassDef(Electron, 3)
    265294};
    266295
     
    281310  TRef Particle; // reference to generated particle
    282311
    283   static CompBase *fgCompare; //!
    284   const CompBase *GetCompare() const { return fgCompare; }
    285 
    286   TLorentzVector P4();
    287 
    288   ClassDef(Muon, 2)
     312   // Isolation variables
     313
     314  Float_t IsolationVar;
     315  Float_t IsolationVarRhoCorr;
     316  Float_t SumPtCharged;
     317  Float_t SumPtNeutral;
     318  Float_t SumPtChargedPU;
     319  Float_t SumPt;
     320
     321  static CompBase *fgCompare; //!
     322  const CompBase *GetCompare() const { return fgCompare; }
     323
     324  TLorentzVector P4() const;
     325
     326  ClassDef(Muon, 3)
    289327};
    290328
     
    306344  Float_t DeltaPhi;  // jet radius in azimuthal angle
    307345
     346  UInt_t Flavor;
     347  UInt_t FlavorAlgo;
     348  UInt_t FlavorPhys;
     349
    308350  UInt_t BTag; // 0 or 1 for a jet that has been tagged as containing a heavy quark
     351  UInt_t BTagAlgo;
     352  UInt_t BTagPhys;
     353
    309354  UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau
    310355
     
    313358  Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter
    314359
    315   Int_t    NCharged; // number of charged constituents
    316   Int_t    NNeutrals; // number of neutral constituents
    317   Float_t  Beta; // (sum pt of charged pile-up constituents)/(sum pt of charged constituents)
    318   Float_t  BetaStar; // (sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents)
    319   Float_t  MeanSqDeltaR; // average distance (squared) between constituent and jet weighted by pt (squared) of constituent
    320   Float_t  PTD; // average pt between constituent and jet weighted by pt of constituent
    321   Float_t  FracPt[5]; // (sum pt of constituents within a ring 0.1*i < DeltaR < 0.1*(i+1))/(sum pt of constituents)
    322 
    323   Float_t Tau1; // 1-subjettiness
    324   Float_t Tau2; // 2-subjettiness
    325   Float_t Tau3; // 3-subjettiness
    326   Float_t Tau4; // 4-subjettiness
    327   Float_t Tau5; // 5-subjettiness
     360  Int_t NCharged; // number of charged constituents
     361  Int_t NNeutrals; // number of neutral constituents
     362  Float_t Beta; // (sum pt of charged pile-up constituents)/(sum pt of charged constituents)
     363  Float_t BetaStar; // (sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents)
     364  Float_t MeanSqDeltaR; // average distance (squared) between constituent and jet weighted by pt (squared) of constituent
     365  Float_t PTD; // average pt between constituent and jet weighted by pt of constituent
     366  Float_t FracPt[5]; // (sum pt of constituents within a ring 0.1*i < DeltaR < 0.1*(i+1))/(sum pt of constituents)
     367
     368  Float_t Tau[5]; // N-subjettiness
     369
     370  TLorentzVector TrimmedP4[5]; // first entry (i = 0) is the total Trimmed Jet 4-momenta and from i = 1 to 4 are the trimmed subjets 4-momenta
     371  TLorentzVector PrunedP4[5]; // first entry (i = 0) is the total Pruned Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta
     372  TLorentzVector SoftDroppedP4[5]; // first entry (i = 0) is the total SoftDropped Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta
     373
     374  Int_t NSubJetsTrimmed; // number of subjets trimmed
     375  Int_t NSubJetsPruned; // number of subjets pruned
     376  Int_t NSubJetsSoftDropped; // number of subjets soft-dropped
    328377
    329378  TRefArray Constituents; // references to constituents
     
    333382  const CompBase *GetCompare() const { return fgCompare; }
    334383
    335   TLorentzVector P4();
    336 
    337   ClassDef(Jet, 2)
     384  TLorentzVector P4() const;
     385  TLorentzVector Area;
     386
     387  ClassDef(Jet, 3)
    338388};
    339389
     
    376426  const CompBase *GetCompare() const { return fgCompare; }
    377427
    378   TLorentzVector P4();
     428  TLorentzVector P4() const;
    379429
    380430  ClassDef(Track, 2)
     
    392442  Float_t E; // calorimeter tower energy
    393443
    394   Float_t T; //particle arrival time of flight
     444  Float_t T; // ecal deposit time, averaged by sqrt(EM energy) over all particles, not smeared
     445  Int_t NTimeHits; // number of hits contributing to time measurement
    395446
    396447  Float_t Eem; // calorimeter tower electromagnetic energy
     
    404455  const CompBase *GetCompare() const { return fgCompare; }
    405456
    406   TLorentzVector P4();
    407 
    408   ClassDef(Tower, 1)
     457  TLorentzVector P4() const;
     458
     459  ClassDef(Tower, 2)
    409460};
    410461
     
    452503
    453504  Int_t IsPU;
     505  Int_t IsRecoPU;
     506
    454507  Int_t IsConstituent;
    455508
     509  Int_t IsFromConversion;
     510
     511  UInt_t Flavor;
     512  UInt_t FlavorAlgo;
     513  UInt_t FlavorPhys;
     514
    456515  UInt_t BTag;
     516  UInt_t BTagAlgo;
     517  UInt_t BTagPhys;
     518
    457519  UInt_t TauTag;
    458520
     
    466528  TLorentzVector Momentum, Position, Area;
    467529
    468   Float_t  Dxy;
    469   Float_t  SDxy;
    470   Float_t  Xd;
    471   Float_t  Yd;
    472   Float_t  Zd;
     530  Float_t Dxy;
     531  Float_t SDxy;
     532  Float_t Xd;
     533  Float_t Yd;
     534  Float_t Zd;
    473535
    474536  // PileUpJetID variables
    475537
    476   Int_t    NCharged;
    477   Int_t    NNeutrals;
    478   Float_t  Beta;
    479   Float_t  BetaStar;
    480   Float_t  MeanSqDeltaR;
    481   Float_t  PTD;
    482   Float_t  FracPt[5];
     538  Int_t NCharged;
     539  Int_t NNeutrals;
     540  Float_t Beta;
     541  Float_t BetaStar;
     542  Float_t MeanSqDeltaR;
     543  Float_t PTD;
     544  Float_t FracPt[5];
     545
     546  // Timing information
     547
     548  Int_t NTimeHits;
     549  std::vector< std::pair< Float_t, Float_t > > ECalEnergyTimePairs;
     550
     551  // Isolation variables
     552
     553  Float_t IsolationVar;
     554  Float_t IsolationVarRhoCorr;
     555  Float_t SumPtCharged;
     556  Float_t SumPtNeutral;
     557  Float_t SumPtChargedPU;
     558  Float_t SumPt;
    483559
    484560  // N-subjettiness variables
    485561
    486562  Float_t Tau[5];
     563
     564  // Other Substructure variables
     565
     566  TLorentzVector TrimmedP4[5]; // first entry (i = 0) is the total Trimmed Jet 4-momenta and from i = 1 to 4 are the trimmed subjets 4-momenta
     567  TLorentzVector PrunedP4[5]; // first entry (i = 0) is the total Pruned Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta
     568  TLorentzVector SoftDroppedP4[5]; // first entry (i = 0) is the total SoftDropped Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta
     569
     570  Int_t NSubJetsTrimmed; // number of subjets trimmed
     571  Int_t NSubJetsPruned; // number of subjets pruned
     572  Int_t NSubJetsSoftDropped; // number of subjets soft-dropped
     573
    487574
    488575  static CompBase *fgCompare; //!
     
    504591  void SetFactory(DelphesFactory *factory) { fFactory = factory; }
    505592
    506   ClassDef(Candidate, 2)
     593  ClassDef(Candidate, 3)
    507594};
    508595
  • classes/DelphesFormula.cc

    rd870fc5 rd77b51d  
    2323
    2424#include <stdexcept>
    25 #include <string>
    2625
    2726using namespace std;
     
    5150Int_t DelphesFormula::Compile(const char *expression)
    5251{
    53   string buffer;
     52  TString buffer;
    5453  const char *it;
    5554  for(it = expression; *it; ++it)
    5655  {
    5756    if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
    58     buffer.push_back(*it);
     57    buffer.Append(*it);
    5958  }
    60   if(TFormula::Compile(buffer.c_str()) != 0)
     59  buffer.ReplaceAll("pt", "x");
     60  buffer.ReplaceAll("eta", "y");
     61  buffer.ReplaceAll("phi", "z");
     62  buffer.ReplaceAll("energy", "t");
     63  if(TFormula::Compile(buffer) != 0)
    6164  {
    6265    throw runtime_error("Invalid formula.");
     
    7477
    7578//------------------------------------------------------------------------------
    76 
    77 Int_t DelphesFormula::DefinedVariable(TString &chaine, Int_t &action)
    78 {
    79   action = kVariable;
    80   if(chaine == "pt")
    81   {
    82     if(fNdim < 1) fNdim = 1;
    83     return 0;
    84   }
    85   else if(chaine == "eta")
    86   {
    87     if(fNdim < 2) fNdim = 2;
    88     return 1;
    89   }
    90   else if(chaine == "phi")
    91   {
    92     if(fNdim < 3) fNdim = 3;
    93     return 2;
    94   }
    95   else if(chaine == "energy")
    96   {
    97     if(fNdim < 4) fNdim = 4;
    98     return 3;
    99   }
    100   return -1;
    101 }
    102 
    103 //------------------------------------------------------------------------------
  • classes/DelphesFormula.h

    rd870fc5 rd77b51d  
    3535
    3636  Double_t Eval(Double_t pt, Double_t eta = 0, Double_t phi = 0, Double_t energy = 0);
    37 
    38   Int_t DefinedVariable(TString &variable, Int_t &action);
    3937};
    4038
  • classes/DelphesLHEFReader.cc

    rd870fc5 rd77b51d  
    8282  fEventCounter = -1;
    8383  fParticleCounter = -1;
    84   fRwgtList.clear();
     84  fWeightList.clear();
    8585}
    8686
     
    9999  TObjArray *partonOutputArray)
    100100{
    101   int rc;
     101  int rc, id;
    102102  char *pch;
    103103  double weight;
     
    158158  else if(strstr(fBuffer, "<wgt"))
    159159  {
    160     pch = strstr(fBuffer, ">");
     160    pch = strpbrk(fBuffer, "\"'");
    161161    if(!pch)
    162162    {
     
    165165    }
    166166
    167     DelphesStream bufferStream(pch + 1);
    168     rc = bufferStream.ReadDbl(weight);
     167    DelphesStream idStream(pch + 1);
     168    rc = idStream.ReadInt(id);
     169
     170    pch = strchr(fBuffer, '>');
     171    if(!pch)
     172    {
     173      cerr << "** ERROR: " << "invalid weight format" << endl;
     174      return kFALSE;
     175    }
     176
     177    DelphesStream weightStream(pch + 1);
     178    rc = weightStream.ReadDbl(weight);
    169179
    170180    if(!rc)
     
    174184    }
    175185
    176     fRwgtList.push_back(weight);
     186    fWeightList.push_back(make_pair(id, weight));
    177187  }
    178188  else if(strstr(fBuffer, "</event>"))
     
    206216//---------------------------------------------------------------------------
    207217
    208 void DelphesLHEFReader::AnalyzeRwgt(ExRootTreeBranch *branch)
    209 {
    210   Weight *element;
    211   vector<double>::const_iterator itRwgtList;
    212 
    213   for(itRwgtList = fRwgtList.begin(); itRwgtList != fRwgtList.end(); ++itRwgtList)
    214   {
    215     element = static_cast<Weight *>(branch->NewEntry());
    216 
    217     element->Weight = *itRwgtList;
     218void DelphesLHEFReader::AnalyzeWeight(ExRootTreeBranch *branch)
     219{
     220  LHEFWeight *element;
     221  vector< pair< int, double > >::const_iterator itWeightList;
     222
     223  for(itWeightList = fWeightList.begin(); itWeightList != fWeightList.end(); ++itWeightList)
     224  {
     225    element = static_cast<LHEFWeight *>(branch->NewEntry());
     226
     227    element->ID = itWeightList->first;
     228    element->Weight = itWeightList->second;
    218229  }
    219230}
  • classes/DelphesLHEFReader.h

    rd870fc5 rd77b51d  
    3131
    3232#include <vector>
     33#include <utility>
    3334
    3435class TObjArray;
     
    5859    TStopwatch *readStopWatch, TStopwatch *procStopWatch);
    5960
    60   void AnalyzeRwgt(ExRootTreeBranch *branch);
     61  void AnalyzeWeight(ExRootTreeBranch *branch);
    6162
    6263private:
     
    8384  double fPx, fPy, fPz, fE, fMass;
    8485 
    85   std::vector<double> fRwgtList;
     86  std::vector< std::pair< int, double > > fWeightList;
    8687};
    8788
  • classes/DelphesSTDHEPReader.cc

    rd870fc5 rd77b51d  
    7777  fInputFile = inputFile;
    7878  xdrstdio_create(fInputXDR, inputFile, XDR_DECODE);
    79   ReadFileHeader();
    8079}
    8180
     
    107106  SkipBytes(4);
    108107
    109   if(fBlockType == EVENTTABLE)
     108  if(fBlockType == FILEHEADER)
     109  {
     110    ReadFileHeader();
     111  }
     112  else if(fBlockType == EVENTTABLE)
    110113  {
    111114    ReadEventTable();
     
    177180  u_int i;
    178181  enum STDHEPVersion {UNKNOWN, V1, V2, V21} version;
    179 
    180   xdr_int(fInputXDR, &fBlockType);
    181   if (fBlockType != FILEHEADER)
    182   {
    183     throw runtime_error("Header block not found. File is probably corrupted.");
    184   }
    185 
    186   SkipBytes(4);
    187182
    188183  // version
  • classes/DelphesTF2.cc

    rd870fc5 rd77b51d  
    1818
    1919#include "classes/DelphesTF2.h"
     20
     21#include "RVersion.h"
    2022#include "TString.h"
     23
    2124#include <stdexcept>
    22 #include <string>
    2325
    2426using namespace std;
     
    3436
    3537DelphesTF2::DelphesTF2(const char *name, const char *expression) :
    36   TF2(name,expression)
     38  TF2(name, expression)
    3739{
    3840}
     
    4648//------------------------------------------------------------------------------
    4749
    48 Int_t DelphesTF2::DefinedVariable(TString &chaine, Int_t &action)
     50Int_t DelphesTF2::Compile(const char *expression)
    4951{
    50   action = kVariable;
    51   if(chaine == "z")
     52  TString buffer;
     53  const char *it;
     54  for(it = expression; *it; ++it)
    5255  {
    53     if(fNdim < 1) fNdim = 1;
    54     return 0;
     56    if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
     57    buffer.Append(*it);
    5558  }
    56   else if(chaine == "t")
     59  buffer.ReplaceAll("z", "x");
     60  buffer.ReplaceAll("t", "y");
     61#if  ROOT_VERSION_CODE < ROOT_VERSION(6,04,00)
     62  if(TF2::Compile(buffer) != 0)
     63#else
     64  if(TF2::GetFormula()->Compile(buffer) != 0)
     65#endif
    5766  {
    58     if(fNdim < 2) fNdim = 2;
    59     return 1;
     67    throw runtime_error("Invalid formula.");
    6068  }
    61   return -1;
     69  return 0;
    6270}
    6371
  • classes/DelphesTF2.h

    rd870fc5 rd77b51d  
    2121
    2222#include "TF2.h"
    23 #include "TFormula.h"
    24 
    25 #include <string>
    2623
    2724class DelphesTF2: public TF2
     
    3532  ~DelphesTF2();
    3633
    37   Int_t DefinedVariable(TString &variable, Int_t &action);
    38 
     34  Int_t Compile(const char *expression);
    3935};
    4036
    4137#endif /* DelphesTF2_h */
    42 
  • display/Delphes3DGeometry.cc

    rd870fc5 rd77b51d  
    1717 */
    1818
    19 #include "display/Delphes3DGeometry.h"
    2019#include <set>
    2120#include <map>
     
    2524#include <sstream>
    2625#include <cassert>
     26
     27#include "TAxis.h"
    2728#include "TGeoManager.h"
    2829#include "TGeoVolume.h"
     
    3435#include "TGeoCone.h"
    3536#include "TGeoArb8.h"
    36 #include "external/ExRootAnalysis/ExRootConfReader.h"
    37 #include "classes/DelphesClasses.h"
    3837#include "TF2.h"
     38#include "TFormula.h"
    3939#include "TH1F.h"
    4040#include "TMath.h"
     41#include "TString.h"
     42
     43#include "display/Delphes3DGeometry.h"
     44
     45#include "classes/DelphesClasses.h"
     46#include "external/ExRootAnalysis/ExRootConfReader.h"
    4147
    4248using namespace std;
     
    9096   tk_length_ = confReader->GetDouble(Form("%s::HalfLength",ParticlePropagator), 3.0)*100.;     // tk_length
    9197   tk_Bz_     = confReader->GetDouble("ParticlePropagator::Bz", 0.0);                           // tk_Bz
    92 
     98   
     99   TString buffer;
     100   const char *it;
     101 
     102   
    93103   {
    94104   TString tkEffFormula = confReader->GetString(Form("%s::EfficiencyFormula",TrackingEfficiency),"abs(eta)<3.0");
     
    96106   tkEffFormula.ReplaceAll("eta","y");
    97107   tkEffFormula.ReplaceAll("phi","0.");
    98    TF2* tkEffFunction = new TF2("tkEff",tkEffFormula,0,1000,-10,10);
     108 
     109   buffer.Clear();
     110   for(it = tkEffFormula.Data(); *it; ++it)
     111   {
     112     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
     113     buffer.Append(*it);
     114   }
     115
     116   TF2* tkEffFunction = new TF2("tkEff",buffer,0,1000,-10,10);
    99117   TH1F etaHisto("eta","eta",100,5.,-5.);
    100118   Double_t pt,eta;
     
    118136   muonEffFormula.ReplaceAll("eta","y");
    119137   muonEffFormula.ReplaceAll("phi","0.");
    120    TF2* muEffFunction = new TF2("muEff",muonEffFormula,0,1000,-10,10);
     138   
     139   buffer.Clear();
     140   for(it = muonEffFormula.Data(); *it; ++it)
     141   {
     142     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
     143     buffer.Append(*it);
     144   }
     145
     146   TF2* muEffFunction = new TF2("muEff",buffer,0,1000,-10,10);
    121147   TH1F etaHisto("eta2","eta2",100,5.,-5.);
    122148   Double_t pt,eta;
  • display/Delphes3DGeometry.h

    rd870fc5 rd77b51d  
    11/*
    2  * Delphes: a framework for fast simulation of a generic collider experiment
    3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
     2  * Delphes: a framework for fast simulation of a generic collider experiment
     3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    44 *
    5  * This program is free software: you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation, either version 3 of the License, or
    8  * (at your option) any later version.
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation, either version 3 of the License, or
     8  * (at your option) any later version.
    99 *
    10  * This program is distributed in the hope that it will be useful,
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  * GNU General Public License for more details.
     10  * This program is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13  * GNU General Public License for more details.
    1414 *
    15  * You should have received a copy of the GNU General Public License
    16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  * You should have received a copy of the GNU General Public License
     16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    1818
     
    2222#include <set>
    2323#include <map>
    24 #include <utility>
    2524#include <vector>
    26 #include <algorithm>
    27 #include <sstream>
    28 #include "TAxis.h"
    29 #include "TGeoManager.h"
    30 #include "TGeoVolume.h"
    31 #include "TGeoMedium.h"
     25
     26#include "Rtypes.h"
     27
     28class TAxis;
     29class TGeoManager;
     30class TGeoVolume;
     31class TGeoMedium;
    3232
    3333// TODO: asymmetric detector
     
    3838     ~Delphes3DGeometry() {}
    3939
    40      void readFile(const char* filename, const char* ParticlePropagator="ParticlePropagator",
    41                                          const char* TrackingEfficiency="ChargedHadronTrackingEfficiency",
    42                                          const char* MuonEfficiency="MuonEfficiency",
    43                                          const char* Calorimeters="Calorimeter");
    44 
    45      void loadFromFile(const char* filename, const char* name="DelphesGeometry");
    46      void save(const char* filename, const char* name="DelphesGeometry");
     40     void readFile(const char *filename, const char *ParticlePropagator="ParticlePropagator",
     41                                         const char *TrackingEfficiency="ChargedHadronTrackingEfficiency",
     42                                         const char *MuonEfficiency="MuonEfficiency",
     43                                         const char *Calorimeters="Calorimeter");
    4744
    4845     void setContingency(Double_t contingency) { contingency_ = contingency; }
     
    5148     void setMuonSystemThickness(Double_t thickness) { muonSystem_thickn_ = thickness; }
    5249
    53      TGeoVolume* getDetector(bool withTowers = true);
     50     TGeoVolume *getDetector(bool withTowers = true);
    5451
    5552     Double_t getTrackerRadius() const { return tk_radius_; }
     
    6259   private:
    6360     std::pair<Double_t, Double_t> addTracker(TGeoVolume *top);
    64      std::pair<Double_t, Double_t> addCalorimeter(TGeoVolume *top, const char* name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);
    65      std::pair<Double_t, Double_t> addMuonDets(TGeoVolume *top, const char* name, Double_t innerBarrelRadius, Double_t innerBarrelLength);
    66      void addCaloTowers(TGeoVolume *top, const char* name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);
     61     std::pair<Double_t, Double_t> addCalorimeter(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);
     62     std::pair<Double_t, Double_t> addMuonDets(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength);
     63     void addCaloTowers(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);
    6764
    6865   private:
     
    7572     TGeoMedium *mudetmed_;
    7673
    77      TAxis* etaAxis_;
    78      TAxis* phiAxis_;
     74     TAxis *etaAxis_;
     75     TAxis *phiAxis_;
    7976
    8077     Double_t contingency_;
     
    9491     std::map<std::string, Double_t> muonSystem_etamax_;
    9592     std::map<std::string, std::set< std::pair<Double_t, Int_t> > > caloBinning_;
    96      
     93
    9794};
    9895
  • display/DelphesBranchElement.cc

    rd870fc5 rd77b51d  
    155155  trkProp->SetMaxR(tkRadius_);
    156156  trkProp->SetMaxZ(tkHalfLength_);
     157  GenParticle *particle;
    157158  if(type=="Track") { // CASE 1: TRACKS
    158159    Track *track;
     
    161162                   track->P4().Px(), track->P4().Py(),
    162163                   track->P4().Pz(), track->P4().E(),
    163                    track->X, track->Y, track->Z, 0.0);
     164                   track->X/10.0, track->Y/10.0, track->Z/10.0, track->T/10.0);
    164165      eveTrack = new TEveTrack(&pb, counter, trkProp);
    165166      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    173174    Electron *electron;
    174175    while((electron = (Electron *) itTrack.Next())) {
     176      particle = (GenParticle*) electron->Particle.GetObject();
    175177      TParticle pb(electron->Charge<0?11:-11, 1, 0, 0, 0, 0,
    176178                   electron->P4().Px(), electron->P4().Py(),
    177179                   electron->P4().Pz(), electron->P4().E(),
    178                    0., 0., 0., 0.);
     180                   particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0);
    179181      eveTrack = new TEveTrack(&pb, counter, trkProp);
    180182      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    188190    Muon *muon;
    189191    while((muon = (Muon *) itTrack.Next())) {
     192      particle = (GenParticle*) muon->Particle.GetObject();
    190193      TParticle pb(muon->Charge<0?13:-13, 1, 0, 0, 0, 0,
    191194                   muon->P4().Px(), muon->P4().Py(),
    192195                   muon->P4().Pz(), muon->P4().E(),
    193                    0., 0., 0., 0.);
     196                   particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0);
    194197      eveTrack = new TEveTrack(&pb, counter, trkProp);
    195198      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    206209                   photon->P4().Px(), photon->P4().Py(),
    207210                   photon->P4().Pz(), photon->P4().E(),
    208                    0., 0., 0., 0.);
     211                   0.0, 0.0, 0.0, 0.0);
    209212      eveTrack = new TEveTrack(&pb, counter, trkProp);
    210213      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    223226                   particle->P4().Px(), particle->P4().Py(),
    224227                   particle->P4().Pz(), particle->P4().E(),
    225                    particle->X, particle->Y, particle->Z, particle->T);
     228                   particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0);
    226229      eveTrack = new TEveTrack(&pb, counter, trkProp);
    227230      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
  • display/DelphesEventDisplay.cc

    rd870fc5 rd77b51d  
    11/*
    2  * Delphes: a framework for fast simulation of a generic collider experiment
    3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
     2  * Delphes: a framework for fast simulation of a generic collider experiment
     3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    44 *
    5  * This program is free software: you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation, either version 3 of the License, or
    8  * (at your option) any later version.
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation, either version 3 of the License, or
     8  * (at your option) any later version.
    99 *
    10  * This program is distributed in the hope that it will be useful,
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  * GNU General Public License for more details.
     10  * This program is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13  * GNU General Public License for more details.
    1414 *
    15  * You should have received a copy of the GNU General Public License
    16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  * You should have received a copy of the GNU General Public License
     16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    1818
     
    2121#include <utility>
    2222#include <algorithm>
     23
    2324#include "TGeoManager.h"
    2425#include "TGeoVolume.h"
    25 #include "external/ExRootAnalysis/ExRootConfReader.h"
    26 #include "external/ExRootAnalysis/ExRootTreeReader.h"
    27 #include "display/DelphesCaloData.h"
    28 #include "display/DelphesBranchElement.h"
    29 #include "display/Delphes3DGeometry.h"
    30 #include "display/DelphesEventDisplay.h"
    31 #include "classes/DelphesClasses.h"
    3226#include "TEveElement.h"
    3327#include "TEveJetCone.h"
     
    5347#include "TCanvas.h"
    5448#include "TH1F.h"
     49#include "TAxis.h"
     50#include "TChain.h"
     51#include "TGHtml.h"
     52#include "TGStatusBar.h"
     53
     54#include "display/DelphesCaloData.h"
     55#include "display/DelphesBranchElement.h"
     56#include "display/Delphes3DGeometry.h"
     57#include "display/DelphesEventDisplay.h"
     58#include "display/DelphesDisplay.h"
     59#include "display/Delphes3DGeometry.h"
     60#include "display/DelphesHtmlSummary.h"
     61#include "display/DelphesPlotSummary.h"
     62
     63#include "classes/DelphesClasses.h"
     64#include "external/ExRootAnalysis/ExRootConfReader.h"
     65#include "external/ExRootAnalysis/ExRootTreeReader.h"
    5566
    5667DelphesEventDisplay::DelphesEventDisplay()
     
    98109   TEveManager::Create(kTRUE, "IV");
    99110   fStatusBar_ = gEve->GetBrowser()->GetStatusBar();
    100    TGeoManager* geom = gGeoManager;
     111   TGeoManager *geom = gGeoManager;
    101112
    102113   // build the detector
     
    108119   etaAxis_ = det3D.getCaloAxes().first;
    109120   phiAxis_ = det3D.getCaloAxes().second;
    110    TGeoVolume* top = det3D.getDetector(false);
     121   TGeoVolume *top = det3D.getDetector(false);
    111122   geom->SetTopVolume(top);
    112123   TEveElementList *geometry = new TEveElementList("Geometry");
    113    TObjArray* nodes = top->GetNodes();
     124   TObjArray *nodes = top->GetNodes();
    114125   TIter itNodes(nodes);
    115    TGeoNode* nodeobj;
    116    TEveGeoTopNode* node;
     126   TGeoNode *nodeobj;
     127   TEveGeoTopNode *node;
    117128   while((nodeobj = (TGeoNode*)itNodes.Next())) {
    118129     node = new TEveGeoTopNode(gGeoManager,nodeobj);
     
    131142   // prepare data collections
    132143   readConfig(configFile, elements_);
    133    for(std::vector<DelphesBranchBase*>::iterator element = elements_.begin(); element<elements_.end(); ++element) {
    134      DelphesBranchElement<TEveTrackList>*   item_v1 = dynamic_cast<DelphesBranchElement<TEveTrackList>*>(*element);
    135      DelphesBranchElement<TEveElementList>* item_v2 = dynamic_cast<DelphesBranchElement<TEveElementList>*>(*element);
     144   for(std::vector<DelphesBranchBase *>::iterator element = elements_.begin(); element<elements_.end(); ++element) {
     145     DelphesBranchElement<TEveTrackList> *item_v1 = dynamic_cast<DelphesBranchElement<TEveTrackList>*>(*element);
     146     DelphesBranchElement<TEveElementList> *item_v2 = dynamic_cast<DelphesBranchElement<TEveElementList>*>(*element);
    136147     if(item_v1) gEve->AddElement(item_v1->GetContainer());
    137148     if(item_v2) gEve->AddElement(item_v2->GetContainer());
     
    144155   delphesDisplay_->ImportGeomRhoZ(geometry);
    145156   // find the first calo data and use that to initialize the calo display
    146    for(std::vector<DelphesBranchBase*>::iterator data=elements_.begin();data<elements_.end();++data) {
     157   for(std::vector<DelphesBranchBase *>::iterator data=elements_.begin();data<elements_.end();++data) {
    147158     if(TString((*data)->GetType())=="Tower") { // we could also use GetClassName()=="DelphesCaloData"
    148        DelphesCaloData* container = dynamic_cast<DelphesBranchElement<DelphesCaloData>*>((*data))->GetContainer();
     159       DelphesCaloData *container = dynamic_cast<DelphesBranchElement<DelphesCaloData>*>((*data))->GetContainer();
    149160       assert(container);
    150161       TEveCalo3D *calo3d = new TEveCalo3D(container);
     
    182193   ExRootConfParam branches = confReader->GetParam("TreeWriter::Branch");
    183194   Int_t nBranches = branches.GetSize()/3;
    184    DelphesBranchElement<TEveTrackList>* tlist;
    185    DelphesBranchElement<DelphesCaloData>* clist;
    186    DelphesBranchElement<TEveElementList>* elist;
     195   DelphesBranchElement<TEveTrackList> *tlist;
     196   DelphesBranchElement<DelphesCaloData> *clist;
     197   DelphesBranchElement<TEveElementList> *elist;
    187198   // first loop with all but tracks
    188199   for(Int_t b = 0; b<nBranches; ++b) {
     
    273284
    274285   // update display
    275    TEveElement* top = (TEveElement*)gEve->GetCurrentEvent();
     286   TEveElement *top = (TEveElement*)gEve->GetCurrentEvent();
    276287   delphesDisplay_->DestroyEventRPhi();
    277288   delphesDisplay_->ImportEventRPhi(top);
     
    356367
    357368   // add a tab on the left
    358    TEveBrowser* browser = gEve->GetBrowser();
     369   TEveBrowser *browser = gEve->GetBrowser();
    359370   browser->SetWindowName("Delphes Event Display");
    360371   browser->StartEmbedding(TRootBrowser::kLeft);
    361372
    362373   // set the main title
    363    TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
     374   TGMainFrame *frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
    364375   frmMain->SetWindowName("Delphes Event Display");
    365376   frmMain->SetCleanup(kDeepCleanup);
     
    371382   if(!gSystem->OpenDirectory(icondir))
    372383     icondir = Form("%s/icons/", (const char*)gSystem->GetFromPipe("root-config --etcdir") );
    373    TGGroupFrame* vf = new TGGroupFrame(frmMain,"Event navigation",kVerticalFrame | kFitWidth );
     384   TGGroupFrame *vf = new TGGroupFrame(frmMain,"Event navigation",kVerticalFrame | kFitWidth );
    374385   {
    375      TGHorizontalFrame* hf = new TGHorizontalFrame(frmMain);
     386     TGHorizontalFrame *hf = new TGHorizontalFrame(frmMain);
    376387     {
    377         TGPictureButton* b = 0;
     388        TGPictureButton *b = 0;
    378389
    379390        b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoBack.gif"));
     
    381392        b->Connect("Clicked()", "DelphesEventDisplay", this, "Bck()");
    382393
    383         TGNumberEntry* numberEntry = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries());
     394        TGNumberEntry *numberEntry = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries());
    384395        hf->AddFrame(numberEntry, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 2, 0, 10, 10));
    385396        this->Connect("EventChanged(Int_t)","TGNumberEntry",numberEntry,"SetIntNumber(Long_t)");
     
    394405     vf->AddFrame(hf, new TGLayoutHints(kLHintsExpandX , 2, 2, 2, 2));
    395406
    396      TGHProgressBar* progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);
     407     TGHProgressBar *progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);
    397408     progress->SetMax( treeReader_->GetEntries());
    398409     progress->ShowPosition(kTRUE, kFALSE, "Event %.0f");
     
    418429   // the summary tab
    419430   htmlSummary_ = new DelphesHtmlSummary("Delphes Event Display Summary Table");
    420    TEveWindowSlot* slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
     431   TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
    421432   gHtml_ = new TGHtml(0, 100, 100);
    422433   TEveWindowFrame *wf = slot->MakeFrame(gHtml_);
     
    426437   // plot tab
    427438   slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
    428    TEveWindowTab* tab = slot->MakeTab();
     439   TEveWindowTab *tab = slot->MakeTab();
    429440   tab->SetElementName("Summary plots");
    430441   tab->SetShowTitleBar(kFALSE);
     
    435446}
    436447
    437 
     448void DelphesEventDisplay::Fwd() { 
     449  if (event_id_ < treeReader_->GetEntries() - 2) {
     450     EventChanged(event_id_+1);
     451  } else {
     452     printf("Already at last event.\n");
     453  }
     454}
     455
     456void DelphesEventDisplay::Bck() {
     457  if (event_id_ > 0) {
     458     EventChanged(event_id_-1);
     459  } else {
     460     printf("Already at first event.\n");
     461  }
     462}
     463
     464void DelphesEventDisplay::PreSetEv(char *ev) {
     465  event_id_tmp_ = Int_t(atoi(ev));
     466}
     467
     468void DelphesEventDisplay::GoTo() {
     469  if (event_id_tmp_>=0 && event_id_tmp_ < treeReader_->GetEntries()-1) {
     470    EventChanged(event_id_tmp_);
     471  } else {
     472    printf("Error: no such event.\n");
     473  }
     474}
     475
     476void DelphesEventDisplay::InitSummaryPlots() {
     477  plotSummary_->FillSample(treeReader_, event_id_);
     478  plotSummary_->FillEvent();
     479  plotSummary_->Draw();
     480}
     481
     482void DelphesEventDisplay::DisplayProgress(Int_t p) {
     483  fStatusBar_->SetText(Form("Processing... %d %%",p), 1);
     484  gSystem->ProcessEvents();
     485}
  • display/DelphesEventDisplay.h

    rd870fc5 rd77b51d  
    11/*
    2  * Delphes: a framework for fast simulation of a generic collider experiment
    3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
     2  * Delphes: a framework for fast simulation of a generic collider experiment
     3  * Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    44 *
    5  * This program is free software: you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation, either version 3 of the License, or
    8  * (at your option) any later version.
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation, either version 3 of the License, or
     8  * (at your option) any later version.
    99 *
    10  * This program is distributed in the hope that it will be useful,
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  * GNU General Public License for more details.
     10  * This program is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13  * GNU General Public License for more details.
    1414 *
    15  * You should have received a copy of the GNU General Public License
    16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  * You should have received a copy of the GNU General Public License
     16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717 */
    1818
     
    2121
    2222#include <vector>
    23 #include <iostream>
    24 #include "external/ExRootAnalysis/ExRootTreeReader.h"
    25 #include "display/DelphesDisplay.h"
    26 #include "display/Delphes3DGeometry.h"
    27 #include "display/DelphesHtmlSummary.h"
    28 #include "display/DelphesPlotSummary.h"
    29 #include "TSystem.h"
    30 #include "TChain.h"
    31 #include "TAxis.h"
    32 #include "TGHtml.h"
    33 #include "TClonesArray.h"
    34 #include "TGStatusBar.h"
    35 #include "TGNumberEntry.h"
    36 #include "TGProgressBar.h"
    37 #include <RQ_OBJECT.h>
    3823
     24#include "Rtypes.h"
     25#include "RQ_OBJECT.h"
    3926
     27class TAxis;
     28class TChain;
     29class TGHtml;
     30class TGStatusBar;
     31class DelphesDisplay;
     32class Delphes3DGeometry;
     33class DelphesBranchBase;
     34class DelphesHtmlSummary;
     35class DelphesPlotSummary;
     36class ExRootTreeReader;
    4037
    4138/*
    42  * assembly.C: sauvegarde as shape-extract -> implement in the geometry class (read/write)
    43  * histobrowser.C: intégration d'histogrammes dans le display (on pourrait avoir Pt, eta, phi pour les principales collections)
    44  * also from alice_esd: summary html table
    45  *
     39  *assembly.C: sauvegarde as shape-extract -> implement in the geometry class (read/write)
     40  *histobrowser.C: intégration d'histogrammes dans le display (on pourrait avoir Pt, eta, phi pour les principales collections)
     41  *also from alice_esd: summary html table
     42  *
    4643 */
    4744
     
    5956    void make_gui();
    6057    void load_event();
    61     void readConfig(const char *configFile, std::vector<DelphesBranchBase*>& elements);
     58    void readConfig(const char *configFile, std::vector<DelphesBranchBase *>& elements);
    6259
    6360    // Configuration and global variables.
     
    6764    Double_t tkRadius_, totRadius_, tkHalfLength_, muHalfLength_, bz_;
    6865    TAxis *etaAxis_, *phiAxis_;
    69     TChain* chain_;
    70     std::vector<DelphesBranchBase*> elements_;
     66    TChain *chain_;
     67    std::vector<DelphesBranchBase *> elements_;
    7168    DelphesDisplay *delphesDisplay_;
    7269    DelphesHtmlSummary *htmlSummary_;
    7370    TGHtml *gHtml_;
    7471    DelphesPlotSummary *plotSummary_;
    75     TGStatusBar* fStatusBar_;
     72    TGStatusBar *fStatusBar_;
    7673   
    7774    // gui controls
    7875  public:
    79      void Fwd() { 
    80         if (event_id_ < treeReader_->GetEntries() - 2) {
    81            EventChanged(event_id_+1);
    82         } else {
    83            printf("Already at last event.\n");
    84         }
    85      }
     76     void Fwd();
    8677
    87      void Bck() {
    88         if (event_id_ > 0) {
    89            EventChanged(event_id_-1);
    90         } else {
    91            printf("Already at first event.\n");
    92         }
    93      }
     78     void Bck();
    9479
    95     void PreSetEv(char* ev) {
    96       event_id_tmp_ = Int_t(atoi(ev));
    97     }
     80    void PreSetEv(char *ev);
    9881
    99     void GoTo() {
    100       if (event_id_tmp_>=0 && event_id_tmp_ < treeReader_->GetEntries()-1) {
    101         EventChanged(event_id_tmp_);
    102       } else {
    103         printf("Error: no such event.\n");
    104       }
    105     }
     82    void GoTo();
    10683
    107     void InitSummaryPlots() {
    108       plotSummary_->FillSample(treeReader_, event_id_);
    109       plotSummary_->FillEvent();
    110       plotSummary_->Draw();
    111     }
     84    void InitSummaryPlots();
    11285
    113     void DisplayProgress(Int_t p) {
    114          fStatusBar_->SetText(Form("Processing... %d %%",p), 1);
    115          gSystem->ProcessEvents();
    116     }
     86    void DisplayProgress(Int_t p);
    11787};
    11888
  • doc/genMakefile.tcl

    rd870fc5 rd77b51d  
    103103    if {$fileName == "modules/PileUpMergerPythia8.cc"} {
    104104      lappend srcObjFilesPythia8 $srcObjName$objSuf
    105     } elseif {[string match {modules/FastJet*.cc} $fileName] && $srcPrefix != {FASTJET}} {
     105    } elseif {([string match {modules/FastJet*.cc} $fileName] || [string match {modules/RunPUPPI.cc} $fileName]) && $srcPrefix != {FASTJET}} {
    106106      continue
    107107    } else {
     
    219219OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
    220220endif
    221 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
     221OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsCommon -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon
    222222endif
    223223
     
    230230ifneq ($(PYTHIA8),)
    231231#HAS_PYTHIA8 = true
    232 #CXXFLAGS += -I$(PYTHIA8)/include
    233 #CXXFLAGS += -I$(PYTHIA8)/include/Pythia8
    234 #OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl
     232CXXFLAGS += -I$(PYTHIA8)/include
     233CXXFLAGS += -I$(PYTHIA8)/include/Pythia8
     234OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl
    235235endif
    236236
     
    285285sourceDeps {DELPHES} {classes/*.cc} {modules/*.cc} {external/ExRootAnalysis/*.cc} {external/Hector/*.cc}
    286286
    287 sourceDeps {FASTJET} {modules/FastJet*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc} {external/fastjet/contribs/*/*.cc}
     287sourceDeps {FASTJET} {modules/FastJet*.cc} {modules/RunPUPPI.cc} {external/PUPPI/*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc} {external/fastjet/contribs/*/*.cc}
    288288
    289289sourceDeps {DISPLAY} {display/*.cc}
     
    396396        @echo ">> Building $(DISTTAR)"
    397397        @mkdir -p $(DISTDIR)
    398         @cp -a CHANGELOG COPYING CREDITS README VERSION Makefile configure cards classes converters display doc examples external modules python readers $(DISTDIR)
     398        @cp -a CHANGELOG CMakeLists.txt COPYING CREDITS DelphesEnv.sh README README_4LHCb VERSION Makefile MinBias.pileup configure cards classes converters display doc examples external modules python readers $(DISTDIR)
    399399        @find $(DISTDIR) -depth -name .\* -exec rm -rf {} \;
    400400        @tar -czf $(DISTTAR) $(DISTDIR)
  • doc/update_fastjet.sh

    rd870fc5 rd77b51d  
    1 version=3.1.0
     1version=3.1.2
    22
    3 #wget http://fastjet.fr/repo/fastjet-${version}.tar.gz
     3wget http://fastjet.fr/repo/fastjet-${version}.tar.gz
    44
    55tar -zxf fastjet-${version}.tar.gz
     
    8383cp -a ../../fastjet-${version}/plugins/SISCone/siscone/siscone/*.cpp SISCone
    8484cp -a ../../fastjet-${version}/plugins/SISCone/fastjet/*.hh SISCone/fastjet
    85 rename .cpp .cc SISCone/*.cpp
    86 
     85rename 's/\.cpp$/.cc/' SISCone/*.cpp
    8786
    8887mkdir -p TrackJet/fastjet
     
    9089cp -a ../../fastjet-${version}/plugins/TrackJet/fastjet/*.hh TrackJet/fastjet
    9190
    92 sed -i 's/#include "fastjet\//#include "/' D0RunICone/fastjet/D0RunIpre96ConePlugin.hh
    93 sed -i 's/#include "fastjet\//#include "/' D0RunICone/fastjet/D0RunIConePlugin.hh
     91sed -i 's/#include "fastjet\/D0RunIBaseConePlugin.hh"/#include "D0RunIBaseConePlugin.hh"/' D0RunICone/fastjet/D0RunIpre96ConePlugin.hh
     92sed -i 's/#include "fastjet\/D0RunIBaseConePlugin.hh"/#include "D0RunIBaseConePlugin.hh"/' D0RunICone/fastjet/D0RunIConePlugin.hh
    9493
    9594sed -i 's/#include "siscone\//#include "/' SISCone/SISConePlugin.cc
  • examples/EventDisplay.C

    rd870fc5 rd77b51d  
    33 * root -l examples/EventDisplay.C'("cards/delphes_card_FCC_basic.tcl","delphes_output.root","ParticlePropagator","ChargedHadronTrackingEfficiency","MuonTrackingEfficiency","Ecal,Hcal")'
    44 */
     5
     6#ifdef __CLING__
     7R__LOAD_LIBRARY(libEve)
     8R__LOAD_LIBRARY(libDelphesDisplay)
     9#include "display/DelphesEventDisplay.h"
     10#include "display/Delphes3DGeometry.h"
     11#endif
    512
    613void EventDisplay(const char *configfile = "delphes_card_CMS.tcl",
     
    3340
    3441    // create the application
    35     DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
     42    DelphesEventDisplay *display = new DelphesEventDisplay(configfile, datafile, det3D);
    3643  }
    3744}
  • examples/Example1.C

    rd870fc5 rd77b51d  
    66root -l examples/Example1.C'("delphes_output.root")'
    77*/
     8
     9#ifdef __CLING__
     10R__LOAD_LIBRARY(libDelphes)
     11#include "classes/DelphesClasses.h"
     12#include "external/ExRootAnalysis/ExRootTreeReader.h"
     13#endif
    814
    915//------------------------------------------------------------------------------
  • examples/Example2.C

    rd870fc5 rd77b51d  
    88#include "TH1.h"
    99#include "TSystem.h"
     10
     11#ifdef __CLING__
     12R__LOAD_LIBRARY(libDelphes)
     13#include "classes/DelphesClasses.h"
     14#include "external/ExRootAnalysis/ExRootTreeReader.h"
     15#include "external/ExRootAnalysis/ExRootResult.h"
     16#endif
    1017
    1118//------------------------------------------------------------------------------
  • examples/Example3.C

    rd870fc5 rd77b51d  
    66*/
    77
     8#ifdef __CLING__
     9R__LOAD_LIBRARY(libDelphes)
     10#include "classes/DelphesClasses.h"
     11#include "external/ExRootAnalysis/ExRootTreeReader.h"
     12#include "external/ExRootAnalysis/ExRootResult.h"
     13#else
     14class ExRootTreeReader;
     15class ExRootResult;
     16#endif
     17
    818//------------------------------------------------------------------------------
    919
     
    2535  TH1 *fJetDeltaPT;
    2636};
    27 
    28 //------------------------------------------------------------------------------
    29 
    30 class ExRootResult;
    31 class ExRootTreeReader;
    3237
    3338//------------------------------------------------------------------------------
  • examples/Example4.C

    rd870fc5 rd77b51d  
    11/*
    2 
    32This macro shows how to compute jet energy scale.
    43root -l examples/Example4.C'("delphes_output.root", "plots.root")'
    54
    6 The output ROOT file contains the pT(MC)/pT(Reco) distributions for various pT(Reco) and |eta| bins.
    7 The peak value of such distribution is interpreted as the jet energy correction to be applied for that given pT(Reco), |eta| bin.
    8 
    9 This can be done by modifying the "ScaleFormula" input parameter to the JetEnergyScale module in the delphes_card_XXX.tcl
    10 
    11 
     5The output ROOT file contains the pT(MC)/pT(Reco) distributions for
     6various pT(Reco) and |eta| bins. The peak value of such distribution is
     7interpreted as the jet energy correction to be applied for that
     8given pT(Reco), |eta| bin.
     9
     10This can be done by modifying the "ScaleFormula" input parameter to
     11the JetEnergyScale module in the delphes_card_XXX.tcl
    1212
    1313e.g  a smooth function:
    1414
    15 
    16   set ScaleFormula { sqrt(3.0 - 0.1*(abs(eta)))^2 / pt + 1.0 ) }
    17 
     15  set ScaleFormula { sqrt(3.0 - 0.1*(abs(eta)))^2 / pt + 1.0) }
    1816
    1917or a binned function:
    20 
    2118
    2219  set ScaleFormula {(abs(eta) > 0.0 && abs(eta) <= 2.5) * (pt > 20.0 && pt <= 50.0)  * (1.10) +
     
    2724                    (abs(eta) > 2.5 && abs(eta) <= 5.0) * (pt > 100.0)               * (1.00)}
    2825
    29 
    30 Be aware that a binned jet energy scale can produce "steps" in the corrected jet pt distribution ...
    31 
    32 
    33 
     26Be aware that a binned jet energy scale can produce "steps" in the corrected
     27jet pt distribution ...
    3428*/
     29
     30#ifdef __CLING__
     31R__LOAD_LIBRARY(libDelphes)
     32#include "classes/DelphesClasses.h"
     33#include "external/ExRootAnalysis/ExRootTreeReader.h"
     34#include "external/ExRootAnalysis/ExRootResult.h"
     35#else
     36class ExRootTreeReader;
     37class ExRootResult;
     38#endif
    3539
    3640//------------------------------------------------------------------------------
     
    161165
    162166  Jet *jet, *genjet;
    163   GenParticle *part;
     167  GenParticle *particle;
    164168  TObject *object;
    165169
    166   TLorentzVector JetMom, GenJetMom, BestGenJetMom;
    167 
    168   Float_t Dr;
     170  TLorentzVector jetMomentum, genJetMomentum, bestGenJetMomentum;
     171
     172  Float_t deltaR;
    169173  Float_t pt, eta;
    170174  Long64_t entry;
     
    177181    // Load selected branches with data from specified event
    178182    treeReader->ReadEntry(entry);
    179     //  cout<<"--  New event -- "<<endl;
    180183
    181184    if(entry%500 == 0) cout << "Event number: "<< entry <<endl;
     
    186189
    187190      jet = (Jet*) branchJet->At(i);
    188       JetMom = jet-> P4();
    189 
    190       plots->fJetPT->Fill(JetMom.Pt());
    191 
    192       Dr = 999;
     191      jetMomentum = jet->P4();
     192
     193      plots->fJetPT->Fill(jetMomentum.Pt());
     194
     195      deltaR = 999;
    193196
    194197     // Loop over all hard partons in event
    195198     for(j = 0; j < branchParticle->GetEntriesFast(); ++j)
    196199     {
    197 
    198         part = (GenParticle*) branchParticle->At(j);
    199 
    200         GenJetMom = part -> P4();
    201 
    202         //this is simply to avoid warnings from initial state particle having infite rapidity ...
    203         if(GenJetMom.Px() == 0 && GenJetMom.Py() == 0) continue;
    204 
    205         //take the closest parton candidate
    206         if( GenJetMom.DeltaR(JetMom) < Dr )
     200        particle = (GenParticle*) branchParticle->At(j);
     201
     202        genJetMomentum = particle->P4();
     203
     204        // this is simply to avoid warnings from initial state particle
     205        // having infite rapidity ...
     206        if(genJetMomentum.Px() == 0 && genJetMomentum.Py() == 0) continue;
     207
     208        // take the closest parton candidate
     209        if(genJetMomentum.DeltaR(jetMomentum) < deltaR)
    207210        {
    208            Dr = GenJetMom.DeltaR(JetMom);
    209            BestGenJetMom = GenJetMom;
     211           deltaR = genJetMomentum.DeltaR(jetMomentum);
     212           bestGenJetMomentum = genJetMomentum;
    210213        }
    211 
    212214      }
    213215
    214      if(Dr < 0.3)
    215      {
    216        pt  = JetMom.Pt();
    217        eta = TMath::Abs(JetMom.Eta());
    218 
    219 
    220        if( pt > 20.0 && pt < 50.0 && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_20_50_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    221        if( pt > 20.0 && pt < 50.0 && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_20_50_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    222 
    223        if( pt > 50.0 && pt < 100.0 && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_50_100_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    224        if( pt > 50.0 && pt < 100.0 && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_50_100_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    225 
    226        if( pt > 100.0 && pt < 200.0 && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_100_200_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    227        if( pt > 100.0 && pt < 200.0 && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_100_200_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    228 
    229        if( pt > 200.0 && pt < 500.0 && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_200_500_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    230        if( pt > 200.0 && pt < 500.0 && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_200_500_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    231 
    232        if( pt > 500.0               && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_500_inf_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    233        if( pt > 500.0               && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_500_inf_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt());
    234 
    235 
    236      }
    237 
    238 
     216      if(deltaR < 0.3)
     217      {
     218        pt  = jetMomentum.Pt();
     219        eta = TMath::Abs(jetMomentum.Eta());
     220
     221
     222        if(pt > 20.0 && pt < 50.0 && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_20_50_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     223        if(pt > 20.0 && pt < 50.0 && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_20_50_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     224
     225        if(pt > 50.0 && pt < 100.0 && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_50_100_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     226        if(pt > 50.0 && pt < 100.0 && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_50_100_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     227
     228        if(pt > 100.0 && pt < 200.0 && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_100_200_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     229        if(pt > 100.0 && pt < 200.0 && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_100_200_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     230
     231        if(pt > 200.0 && pt < 500.0 && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_200_500_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     232        if(pt > 200.0 && pt < 500.0 && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_200_500_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     233
     234        if(pt > 500.0               && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_500_inf_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     235        if(pt > 500.0               && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_500_inf_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt());
     236
     237      }
    239238    }
    240239  }
    241240}
    242 
    243241
    244242//------------------------------------------------------------------------------
  • examples/ExternalFastJet/ExternalFastJetBasic.cpp

    rd870fc5 rd77b51d  
    2222
    2323
    24 This simple example shows how to use Delphes with an external fastjet installation.
    25 Events are specified via the multidimentionnal array "EVENTS" (for an example reading
    26 an hepmc file see ExternalFastJetHepMC.cpp).
    27 
    28 In order to run this example you first, you need to set the paths to your Delphes, FastJet
     24This simple example shows how to use Delphes with an external FastJet installation.
     25Events are specified via the multidimensional array "EVENTS" (for an example reading
     26an HepMC file see ExternalFastJetHepMC.cpp).
     27
     28In order to run this example you first need to set the paths to your Delphes, FastJet
    2929and ROOT installations (DELPHES_DIR, FASTJET_DIR and ROOT_DIR):
    3030
     
    3535Then run the following commands to build the executable:
    3636
    37 DELPHES_LIB="-Wl,-rpath $DELPHES_DIR -L$DELPHES_DIR -lDelphesNoFastJet"
     37DELPHES_LIB="-Wl,-rpath,$DELPHES_DIR -L$DELPHES_DIR -lDelphesNoFastJet"
    3838
    3939FASTJET_INC=`$FASTJET_DIR/bin/fastjet-config --cxxflags`
     
    4444
    4545CXXFLAGS="$FASTJET_INC -I$ROOT_INC -I$DELPHES_DIR -I$DELPHES_DIR/external"
    46 LDFLAGS="$FASTJET_LIB $ROOT_LIB $DELPHES_LIB"
    47 
    48 g++ $CXXFLAGS $LDFLAGS examples/ExternalFastJetBasic.cpp -o examples/ExternalFastJetBasic
     46LDFLAGS="$FASTJET_LIB $ROOT_LIB -lEG $DELPHES_LIB"
     47
     48g++ $CXXFLAGS examples/ExternalFastJet/ExternalFastJetBasic.cpp $LDFLAGS -o ExternalFastJetBasic
    4949
    5050Then run:
    5151
    52 ./examples/ExternalFastJetBasic cards/delphes_card_CMS_NoFastJet.tcl
     52./ExternalFastJetBasic cards/delphes_card_CMS_NoFastJet.tcl
    5353
    5454
  • examples/ExternalFastJet/ExternalFastJetHepMC.cpp

    rd870fc5 rd77b51d  
    2222
    2323
    24 This simple example shows how to use Delphes with an external fastjet installation.
    25 Events in hepmc format are read via the DelphesHepMC reader.
    26 
    27 In order to run this example you first, you need to set the paths to your Delphes, FastJet
     24This simple example shows how to use Delphes with an external FastJet installation.
     25Events in HepMC format are read via the DelphesHepMC reader.
     26
     27In order to run this example you first need to set the paths to your Delphes, FastJet
    2828and ROOT installations (DELPHES_DIR, FASTJET_DIR and ROOT_DIR):
    2929
     
    3434Then run the following commands to build the executable:
    3535
    36 DELPHES_LIB="-Wl,-rpath $DELPHES_DIR -L$DELPHES_DIR -lDelphesNoFastJet"
     36DELPHES_LIB="-Wl,-rpath,$DELPHES_DIR -L$DELPHES_DIR -lDelphesNoFastJet"
    3737
    3838FASTJET_INC=`$FASTJET_DIR/bin/fastjet-config --cxxflags`
     
    4343
    4444CXXFLAGS="$FASTJET_INC -I$ROOT_INC -I$DELPHES_DIR -I$DELPHES_DIR/external"
    45 LDFLAGS="$FASTJET_LIB $ROOT_LIB $DELPHES_LIB"
    46 
    47 g++ $CXXFLAGS $LDFLAGS examples/ExternalFastJetHepMC.cpp -o examples/ExternalFastJetHepMC
    48 
    49 Then run (you need an event file in hepmc format):
    50 
    51 ./examples/ExternalFastJetHepMC cards/delphes_card_CMS_NoFastJet.tcl file.hepmc
     45LDFLAGS="$FASTJET_LIB $ROOT_LIB -lEG $DELPHES_LIB"
     46
     47g++ $CXXFLAGS examples/ExternalFastJet/ExternalFastJetHepMC.cpp $LDFLAGS -o ExternalFastJetHepMC
     48
     49Then run (you need an event file in HepMC format):
     50
     51./ExternalFastJetHepMC cards/delphes_card_CMS_NoFastJet.tcl file.hepmc
    5252
    5353
  • external/fastjet/ClusterSequence.cc

    rd870fc5 rd77b51d  
    11//FJSTARTHEADER
    2 // $Id: ClusterSequence.cc 3685 2014-09-11 20:15:00Z salam $
     2// $Id: ClusterSequence.cc 3809 2015-02-20 13:05:13Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    372372    _plugin_activated = false;
    373373
     374  } else if (_strategy == N2MHTLazy9AntiKtSeparateGhosts) {
    374375#ifndef __FJCORE__
    375   } else if (_strategy == N2MHTLazy9AntiKtSeparateGhosts) {
    376376    // attempt to use an external tiling routine -- it manipulates
    377377    // the CS history via the plugin mechanism
     
    14711471  assert(local_step == step_number);
    14721472
     1473  // sanity check: make sure the particles have not already been recombined
     1474  //
     1475  // Note that good practice would make this an assert (since this is
     1476  // a serious internal issue). However, we decided to throw an
     1477  // InternalError so that the end user can decide to catch it and
     1478  // retry the clustering with a different strategy.
     1479
    14731480  assert(parent1 >= 0);
     1481  if (_history[parent1].child != Invalid){
     1482    throw InternalError("trying to recomine an object that has previsously been recombined");
     1483  }
    14741484  _history[parent1].child = local_step;
    1475   if (parent2 >= 0) {_history[parent2].child = local_step;}
     1485  if (parent2 >= 0) {
     1486    if (_history[parent2].child != Invalid){
     1487      throw InternalError("trying to recomine an object that has previsously been recombined");
     1488    }
     1489    _history[parent2].child = local_step;
     1490  }
    14761491
    14771492  // get cross-referencing right from PseudoJets
  • external/fastjet/Error.hh

    rd870fc5 rd77b51d  
    33
    44//FJSTARTHEADER
    5 // $Id: Error.hh 3694 2014-09-18 13:21:54Z soyez $
     5// $Id: Error.hh 3809 2015-02-20 13:05:13Z soyez $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    9696
    9797
     98/// @ingroup error_handling
     99/// \class InternalError
     100/// class corresponding to critical internal errors
     101///
     102/// This is an error class (derived from Error) meant for serious,
     103/// critical, internal errors that we still want to be catchable by an
     104/// end-user [e.g. a serious issue in clustering where the end-user
     105/// can catch it and retry with a different strategy]
     106///
     107/// Please directly contact the FastJet authors if you see such an
     108/// error.
     109class InternalError : public Error{
     110public:
     111  /// ctor with error message:
     112  /// just add a bit of info to the message and pass it to the base class
     113  InternalError(const std::string & message_in) : Error(std::string("*** CRITICAL INTERNAL FASTJET ERROR *** CONTACT THE AUTHORS *** ") + message_in){ }
     114};
     115
     116
    98117FASTJET_END_NAMESPACE
    99118
  • external/fastjet/LazyTiling25.cc

    rd870fc5 rd77b51d  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling25.cc 3477 2014-07-29 14:34:39Z salam $
     2// $Id: LazyTiling25.cc 3808 2015-02-20 11:24:53Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    365365  for (Tile25 ** near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){
    366366    if ((*near_tile)->tagged) continue;
    367     double dist = _distance_to_tile(jet, *near_tile);
     367    // here we are not allowed to miss a tile due to some rounding
     368    // error. We therefore allow for a margin of security
     369    double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin;
    368370    // cout << "      max info looked at tile " << *near_tile - &_tiles[0]
    369371    //   << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
  • external/fastjet/LazyTiling9.cc

    rd870fc5 rd77b51d  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling9.cc 3477 2014-07-29 14:34:39Z salam $
     2// $Id: LazyTiling9.cc 3808 2015-02-20 11:24:53Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    348348  for (Tile2 ** near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){
    349349    if ((*near_tile)->tagged) continue;
    350     double dist = _distance_to_tile(jet, *near_tile);
     350    // here we are not allowed to miss a tile due to some rounding
     351    // error. We therefore allow for a margin of security
     352    double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin;
    351353    // cout << "      max info looked at tile " << *near_tile - &_tiles[0]
    352354    //   << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
  • external/fastjet/LazyTiling9Alt.cc

    rd870fc5 rd77b51d  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling9Alt.cc 3477 2014-07-29 14:34:39Z salam $
     2// $Id: LazyTiling9Alt.cc 3808 2015-02-20 11:24:53Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    319319  for (Tile::TileFnPair * near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){
    320320    if ((near_tile->first)->tagged) continue;
    321     double dist = (tile.*(near_tile->second))(jet);
     321    // here we are not allowed to miss a tile due to some rounding
     322    // error. We therefore allow for a margin of security
     323    double dist = (tile.*(near_tile->second))(jet) - tile_edge_security_margin;
    322324    // cout << "      max info looked at tile " << *near_tile - &_tiles[0]
    323325    //   << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
  • external/fastjet/LazyTiling9SeparateGhosts.cc

    rd870fc5 rd77b51d  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling9SeparateGhosts.cc 3596 2014-08-12 15:27:19Z soyez $
     2// $Id: LazyTiling9SeparateGhosts.cc 3808 2015-02-20 11:24:53Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    298298  for (Tile3 ** near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){
    299299    if ((*near_tile)->tagged) continue;
    300     double dist = _distance_to_tile(jet, *near_tile);
     300    // here we are not allowed to miss a tile due to some rounding
     301    // error. We therefore allow for a margin of security
     302    double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin;
    301303    // cout << "      max info looked at tile " << *near_tile - &_tiles[0]
    302304    //   << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
  • external/fastjet/RectangularGrid.cc

    rd870fc5 rd77b51d  
    11//FJSTARTHEADER
    2 // $Id$
     2// $Id: RectangularGrid.cc 3771 2014-12-22 21:13:22Z salam $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
  • external/fastjet/RectangularGrid.hh

    rd870fc5 rd77b51d  
    33
    44//FJSTARTHEADER
    5 // $Id$
     5// $Id: RectangularGrid.hh 3771 2014-12-22 21:13:22Z salam $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    4242class TilingBase {
    4343public:
    44   virtual ~TilingBase() {}
    45 
    4644  /// returns the index of the tile in which p is located, or -1 if p
    4745  /// is outside the tiling region
     
    8179  virtual bool is_initialised() const = 0;
    8280  bool is_initialized() const {return is_initialised();}
     81
     82  /// virtual destructor
     83  virtual ~TilingBase() {}
    8384};
    8485
     
    165166  // a tile selector
    166167  Selector _tile_selector;
    167   // a cached
     168  // if there's a tile selector, then for each tile, this caches the
     169  // information about whether it is "good" i.e. it passes the tile
     170  // selector
    168171  std::vector<bool> _is_good;
    169172 
  • external/fastjet/VERSION

    rd870fc5 rd77b51d  
    1 3.1.0
     13.1.2
  • external/fastjet/config_auto.h

    rd870fc5 rd77b51d  
    151151/* Define to the full name and version of this package. */
    152152#ifndef FASTJET_PACKAGE_STRING
    153 #define FASTJET_PACKAGE_STRING  "FastJet 3.1.0"
     153#define FASTJET_PACKAGE_STRING  "FastJet 3.1.2"
    154154#endif
    155155
     
    161161/* Define to the version of this package. */
    162162#ifndef FASTJET_PACKAGE_VERSION
    163 #define FASTJET_PACKAGE_VERSION  "3.1.0"
     163#define FASTJET_PACKAGE_VERSION  "3.1.2"
    164164#endif
    165165
     
    171171/* Version number of package */
    172172#ifndef FASTJET_VERSION
    173 #define FASTJET_VERSION  "3.1.0"
     173#define FASTJET_VERSION  "3.1.2"
    174174#endif
    175175
     
    186186/* Version of the package under the form XYYZZ (instead of X.Y.Z) */
    187187#ifndef FASTJET_VERSION_NUMBER
    188 #define FASTJET_VERSION_NUMBER  30100
     188#define FASTJET_VERSION_NUMBER  30102
    189189#endif
    190190
    191191/* Patch version of this package */
    192192#ifndef FASTJET_VERSION_PATCHLEVEL
    193 #define FASTJET_VERSION_PATCHLEVEL  0
     193#define FASTJET_VERSION_PATCHLEVEL  2
    194194#endif
    195195
  • external/fastjet/config_raw.h

    rd870fc5 rd77b51d  
    9292
    9393/* Define to the full name and version of this package. */
    94 #define PACKAGE_STRING "FastJet 3.1.0"
     94#define PACKAGE_STRING "FastJet 3.1.2"
    9595
    9696/* Define to the one symbol short name of this package. */
     
    9898
    9999/* Define to the version of this package. */
    100 #define PACKAGE_VERSION "3.1.0"
     100#define PACKAGE_VERSION "3.1.2"
    101101
    102102/* Define to 1 if you have the ANSI C header files. */
     
    104104
    105105/* Version number of package */
    106 #define VERSION "3.1.0"
     106#define VERSION "3.1.2"
    107107
    108108/* Major version of this package */
     
    113113
    114114/* Version of the package under the form XYYZZ (instead of X.Y.Z) */
    115 #define VERSION_NUMBER 30100
     115#define VERSION_NUMBER 30102
    116116
    117117/* Patch version of this package */
    118 #define VERSION_PATCHLEVEL 0
     118#define VERSION_PATCHLEVEL 2
    119119
    120120/* Pre-release version of this package */
  • external/fastjet/config_win.h

    rd870fc5 rd77b51d  
    1 #define FASTJET_PACKAGE_STRING  "FastJet 3.1.0"
    2 #define FASTJET_PACKAGE_VERSION  "3.1.0"
    3 #define FASTJET_VERSION  "3.1.0"
     1#define FASTJET_PACKAGE_STRING  "FastJet 3.1.2"
     2#define FASTJET_PACKAGE_VERSION  "3.1.2"
     3#define FASTJET_VERSION  "3.1.2"
    44#define FASTJET_VERSION_MAJOR       3
    55#define FASTJET_VERSION_MINOR       1
    6 #define FASTJET_VERSION_PATCHLEVEL  0
    7 #define FASTJET_VERSION_NUMBER      30100
     6#define FASTJET_VERSION_PATCHLEVEL  2
     7#define FASTJET_VERSION_NUMBER      30102
    88
    99/* The ATLASCone plugin is disabled by default*/
  • external/fastjet/internal/LazyTiling9Alt.hh

    rd870fc5 rd77b51d  
    33
    44//FJSTARTHEADER
    5 // $Id: LazyTiling9Alt.hh 3477 2014-07-29 14:34:39Z salam $
     5// $Id: LazyTiling9Alt.hh 3808 2015-02-20 11:24:53Z soyez $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3737
    3838FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     39
     40/// Rounding errors in the Lazy strategies may cause the following
     41/// problem: when browsing tiles in the vicinity of the particles
     42/// being clustered in order to decide which of these tiles may
     43/// contain particles that need to be updated (because theit NN is one
     44/// of the particles that are currently clustered), we discard tiles
     45/// that are deemed "too far from the cell" by the "max_NN_dist"
     46/// criterion. Because of rounding error, this condition can sometimes
     47/// miss cases where an update is needed.
     48///
     49/// An example of this happens if a particle '1' is, say, at the lower
     50/// edge of the rapidity of a given tile, with a particle '2' in the
     51/// tile directly on its left at the same rapidity. Assume also that
     52/// max_NN_dist in 2's tile corresponds to the distance between 2 and
     53/// teh tile of 1. If 2 is 1's NN then in case 2 gets clustered, 1's
     54/// NN needs to be updated. However, rounding errors in the
     55/// calculation of the distance between 1 and 2 may result is
     56/// something slightly larger than the max_NN_dist in 2's tile.
     57///
     58/// This situation corresponds to the bug reported by Jochen Olt on
     59/// February 12 2015 [see issue-tracker/2015-02-infinite-loop],
     60/// causing an infinite loop.
     61///
     62/// To prevent this, the simplest solution is, when looking at tiles
     63/// to browse for updateds, to add a margin of security close to the
     64/// edges of the cell, i.e. instead of updating only tiles for which
     65/// distance<=max_NN_dist, we will update tiles for which
     66/// distance<=max_NN_dist+tile_edge_security_margin.
     67///
     68/// Note that this does not need to be done when computing nearest
     69/// neighbours [rounding errors are tolerated there] but it is
     70/// critical when tracking points that have to be updated.
     71const double tile_edge_security_margin=1.0e-7;
    3972
    4073/// structure analogous to BriefJet, but with the extra information
  • external/fastjet/plugins/D0RunICone/fastjet/D0RunIConePlugin.hh

    rd870fc5 rd77b51d  
    3232//FJENDHEADER
    3333
    34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen)
     34#include "fastjet/internal/base.hh"     // namespace macros (include explicitly to help Doxygen)
    3535#include "D0RunIBaseConePlugin.hh"
    3636
  • external/fastjet/plugins/D0RunICone/fastjet/D0RunIpre96ConePlugin.hh

    rd870fc5 rd77b51d  
    3232//FJENDHEADER
    3333
    34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen)
     34#include "fastjet/internal/base.hh"     // namespace macros (include explicitly to help Doxygen)
    3535#include "D0RunIBaseConePlugin.hh"
    3636
  • external/fastjet/plugins/SISCone/config.h

    rd870fc5 rd77b51d  
    5454#define PACKAGE_TARNAME "siscone"
    5555
    56 /* Define to the home page for this package. */
    57 /* #undef PACKAGE_URL */
    58 
    5956/* Define to the version of this package. */
    6057#define PACKAGE_VERSION "3.0.0"
  • external/fastjet/tools/Filter.cc

    rd870fc5 rd77b51d  
    11//FJSTARTHEADER
    2 // $Id: Filter.cc 3633 2014-08-15 13:23:52Z soyez $
     2// $Id: Filter.cc 3760 2014-12-19 10:05:10Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    164164  if ((ca_optimisation_used) && (kept.size()+rejected.size()>0)){
    165165    bool has_non_explicit_ghost_area = (kept.size()>0)
    166       ? (kept[0].has_area()     && kept[0].validated_csab()->has_explicit_ghosts())
    167       : (rejected[0].has_area() && rejected[0].validated_csab()->has_explicit_ghosts());
     166      ? (kept[0].has_area()     && (!(kept[0].validated_csab()->has_explicit_ghosts())))
     167      : (rejected[0].has_area() && (!(rejected[0].validated_csab()->has_explicit_ghosts())));
    168168    if (has_non_explicit_ghost_area)
    169169      fs->discard_area();
  • external/fastjet/tools/Filter.hh

    rd870fc5 rd77b51d  
    33
    44//FJSTARTHEADER
    5 // $Id: Filter.hh 3494 2014-07-30 20:38:48Z soyez $
     5// $Id: Filter.hh 3845 2015-03-08 08:35:36Z soyez $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    142142  /// Set a subtractor that is applied to all individual subjets before
    143143  /// deciding which ones to keep. It takes precedence over a non-zero rho.
    144   void set_subtractor(const FunctionOfPseudoJet<PseudoJet> * subtractor) {_subtractor = subtractor;}
     144  void set_subtractor(const FunctionOfPseudoJet<PseudoJet> * subtractor_in) {_subtractor = subtractor_in;}
    145145
    146146  /// runs the filtering and sets kept and rejected to be the jets of interest
  • external/fastjet/tools/GridMedianBackgroundEstimator.hh

    rd870fc5 rd77b51d  
    33
    44//FJSTARTHEADER
    5 // $Id: GridMedianBackgroundEstimator.hh 3610 2014-08-13 09:49:28Z salam $
     5// $Id: GridMedianBackgroundEstimator.hh 3778 2014-12-24 09:28:09Z salam $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    7777class GridMedianBackgroundEstimator : public BackgroundEstimatorBase
    7878#ifdef FASTJET_GMBGE_USEFJGRID
    79                                                                     , public RectangularGrid
     79                                    , public RectangularGrid
    8080#endif
    8181{
     
    9494    _has_particles(false), _enable_rho_m(true) {}
    9595
    96   /// ctor with more control over initialisation
     96  //----------------------------------------------------------------
     97  /// Constructor based on a user's fully specified RectangularGrid
     98  GridMedianBackgroundEstimator(const RectangularGrid & grid) :
     99    RectangularGrid(grid),
     100    _has_particles(false), _enable_rho_m(true) {
     101    if (!RectangularGrid::is_initialised())
     102      throw Error("attempt to construct GridMedianBackgroundEstimator with uninitialised RectangularGrid");
     103  }   
     104
     105  //----------------------------------------------------------------
     106  /// Constructor with the explicit parameters for the underlying
     107  /// RectangularGrid
     108  ///
    97109  ///  \param rapmin         the minimum rapidity extent of the grid
    98110  ///  \param rapmax         the maximum rapidity extent of the grid
    99111  ///  \param drap           the grid spacing in rapidity
    100112  ///  \param dphi           the grid spacing in azimuth
    101   ///  \param tile_selector  optional (geometric) selector to specify
     113  ///  \param tile_selector  optional (geometric) selector to specify 
    102114  ///                        which tiles are good; a tile is good if
    103115  ///                        a massless 4-vector at the center of the tile passes
     
    107119    RectangularGrid(rapmin_in, rapmax_in, drap_in, dphi_in, tile_selector),
    108120    _has_particles(false), _enable_rho_m(true) {}
    109 
    110   //----------------------------------------------------------------
    111   /// Constructor based on a user's fully specified RectangularGrid
    112   GridMedianBackgroundEstimator(const RectangularGrid & grid) :
    113     RectangularGrid(grid),
    114     _has_particles(false), _enable_rho_m(true) {
    115     if (!RectangularGrid::is_initialised())
    116       throw Error("attempt to construct GridMedianBackgroundEstimator with uninitialised RectangularGrid");
    117   }   
    118121
    119122#else  // alternative in old framework where we didn't have the rectangular grid
  • external/fastjet/tools/Recluster.hh

    rd870fc5 rd77b51d  
    22#define __FASTJET_TOOLS_RECLUSTER_HH__
    33
    4 // $Id: Recluster.hh 3714 2014-09-30 09:47:31Z soyez $
     4// $Id: Recluster.hh 3760 2014-12-19 10:05:10Z soyez $
    55//
    66// Copyright (c) 2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    5050/// Alternatively, Recluster can be constructed from a jet algorithm
    5151/// and an optional radius. In that case the recombiner is
    52 /// systematically obtained fromn the jet being processed (unless you
     52/// systematically obtained from the jet being processed (unless you
    5353/// call set_acquire_recombiner(false)). If only the jet algorithm is
    5454/// specified, a default radius of max_allowable_R will be assumed if
     
    124124  /// parameter (like the genkt algorithm), please specify the jet
    125125  /// definition fully using the constructor above.
    126   Recluster(JetAlgorithm snew_jet_alg, double new_jet_radius, Keep keep_in = keep_only_hardest);
     126  Recluster(JetAlgorithm new_jet_alg, double new_jet_radius, Keep keep_in = keep_only_hardest);
    127127
    128128  /// constructor with just a jet algorithm, but no jet radius. If the
  • external/tcl/tcl.h

    rd870fc5 rd77b51d  
    679679
    680680#define TCL_EXACT       1
    681 
    682 /*
    683  * Flag values passed to Tcl_RecordAndEval.
    684  * WARNING: these bit choices must not conflict with the bit choices
    685  * for evalFlag bits in tclInt.h!!
    686  */
    687 
    688 #define TCL_NO_EVAL             0x10000
    689 #define TCL_EVAL_GLOBAL         0x20000
    690681
    691682/*
     
    12241215EXTERN Tcl_Obj *        Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
    12251216EXTERN int              Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
    1226 EXTERN char *           Tcl_ErrnoId _ANSI_ARGS_((void));
    1227 EXTERN char *           Tcl_ErrnoMsg _ANSI_ARGS_((int err));
    12281217EXTERN int              Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
    12291218                            char *string));
     
    14131402                            char *bufPtr, int toRead));
    14141403EXTERN void             Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
    1415 EXTERN int              Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
    1416                             char *cmd, int flags));
    1417 EXTERN int              Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
    1418                             Tcl_Obj *cmdPtr, int flags));
    14191404EXTERN Tcl_RegExp       Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
    14201405                            char *string));
     
    14851470                            char *part1, char *part2, char *newValue,
    14861471                            int flags));
    1487 EXTERN char *           Tcl_SignalId _ANSI_ARGS_((int sig));
    1488 EXTERN char *           Tcl_SignalMsg _ANSI_ARGS_((int sig));
    14891472EXTERN void             Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
    14901473EXTERN int              Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
  • modules/AngularSmearing.cc

    rd870fc5 rd77b51d  
    100100{
    101101  Candidate *candidate, *mother;
    102   Double_t pt, eta, phi;
     102  Double_t pt, eta, phi, e;
    103103
    104104  fItInputArray->Reset();
     
    110110    phi = candidatePosition.Phi();
    111111    pt = candidateMomentum.Pt();
     112    e = candidateMomentum.E();
    112113
    113114    // apply smearing formula for eta,phi
    114115
    115     eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta));
    116     phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta));
     116    eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta, phi, e));
     117    phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta, phi, e));
    117118   
    118119    if(pt <= 0.0) continue;
  • modules/BTagging.cc

    rd870fc5 rd77b51d  
    2222 *  Determines origin of jet,
    2323 *  applies b-tagging efficiency (miss identification rate) formulas
    24  *  and sets b-tagging flags 
     24 *  and sets b-tagging flags
    2525 *
    2626 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    3434#include "classes/DelphesFormula.h"
    3535
    36 #include "ExRootAnalysis/ExRootResult.h"
    37 #include "ExRootAnalysis/ExRootFilter.h"
    38 #include "ExRootAnalysis/ExRootClassifier.h"
    39 
    4036#include "TMath.h"
    4137#include "TString.h"
     
    4642#include "TLorentzVector.h"
    4743
    48 #include <algorithm> 
     44#include <algorithm>
    4945#include <stdexcept>
    5046#include <iostream>
     
    5551//------------------------------------------------------------------------------
    5652
    57 class BTaggingPartonClassifier : public ExRootClassifier
     53BTagging::BTagging() :
     54  fItJetInputArray(0)
    5855{
    59 public:
    60 
    61   BTaggingPartonClassifier() {}
    62 
    63   Int_t GetCategory(TObject *object);
    64  
    65   Double_t fEtaMax, fPTMin;
    66 };
    67 
    68 //------------------------------------------------------------------------------
    69 
    70 Int_t BTaggingPartonClassifier::GetCategory(TObject *object)
    71 {
    72   Candidate *parton = static_cast<Candidate*>(object);
    73   const TLorentzVector &momentum = parton->Momentum;
    74   Int_t pdgCode;
    75 
    76   if(momentum.Pt() <= fPTMin || TMath::Abs(momentum.Eta()) > fEtaMax) return -1;
    77  
    78   pdgCode = TMath::Abs(parton->PID);
    79   if(pdgCode != 21 && pdgCode > 5) return -1;
    80 
    81   return 0;
    82 }
    83 
    84 //------------------------------------------------------------------------------
    85 
    86 BTagging::BTagging() :
    87   fClassifier(0), fFilter(0),
    88   fItPartonInputArray(0), fItJetInputArray(0)
    89 {
    90   fClassifier = new BTaggingPartonClassifier;
    9156}
    9257
     
    9560BTagging::~BTagging()
    9661{
    97   if(fClassifier) delete fClassifier;
    9862}
    9963
     
    10973  fBitNumber = GetInt("BitNumber", 0);
    11074
    111   fDeltaR = GetDouble("DeltaR", 0.5);
    112 
    113   fClassifier->fPTMin = GetDouble("PartonPTMin", 1.0);
    114   fClassifier->fEtaMax = GetDouble("PartonEtaMax", 2.5);
    115 
    11675  // read efficiency formulas
    11776  param = GetParam("EfficiencyFormula");
    11877  size = param.GetSize();
    119  
     78
    12079  fEfficiencyMap.clear();
    12180  for(i = 0; i < size/2; ++i)
     
    13998  // import input array(s)
    14099
    141   fPartonInputArray = ImportArray(GetString("PartonInputArray", "Delphes/partons"));
    142   fItPartonInputArray = fPartonInputArray->MakeIterator();
    143 
    144   fFilter = new ExRootFilter(fPartonInputArray);
    145  
    146100  fJetInputArray = ImportArray(GetString("JetInputArray", "FastJetFinder/jets"));
    147101  fItJetInputArray = fJetInputArray->MakeIterator();
     
    155109  DelphesFormula *formula;
    156110
    157   if(fFilter) delete fFilter;
    158111  if(fItJetInputArray) delete fItJetInputArray;
    159   if(fItPartonInputArray) delete fItPartonInputArray;
    160112
    161113  for(itEfficiencyMap = fEfficiencyMap.begin(); itEfficiencyMap != fEfficiencyMap.end(); ++itEfficiencyMap)
     
    170122void BTagging::Process()
    171123{
    172   Candidate *jet, *parton;
    173   Double_t pt, eta, phi;
    174   TObjArray *partonArray;
     124  Candidate *jet;
     125  Double_t pt, eta, phi, e;
    175126  map< Int_t, DelphesFormula * >::iterator itEfficiencyMap;
    176127  DelphesFormula *formula;
    177   Int_t pdgCode, pdgCodeMax;
    178128
    179   // select quark and gluons
    180   fFilter->Reset();
    181   partonArray = fFilter->GetSubArray(fClassifier, 0);
    182  
    183   if(partonArray == 0) return;
    184 
    185   TIter itPartonArray(partonArray);
    186  
    187129  // loop over all input jets
    188130  fItJetInputArray->Reset();
     
    190132  {
    191133    const TLorentzVector &jetMomentum = jet->Momentum;
    192     pdgCodeMax = -1;
    193134    eta = jetMomentum.Eta();
    194135    phi = jetMomentum.Phi();
    195136    pt = jetMomentum.Pt();
     137    e = jetMomentum.E();
    196138
    197     // loop over all input partons
    198     itPartonArray.Reset();
    199     while((parton = static_cast<Candidate*>(itPartonArray.Next())))
    200     {
    201       pdgCode = TMath::Abs(parton->PID);
    202       if(pdgCode == 21) pdgCode = 0;
    203       if(jetMomentum.DeltaR(parton->Momentum) <= fDeltaR)
    204       {
    205         if(pdgCodeMax < pdgCode) pdgCodeMax = pdgCode;
    206       }
    207     }
    208     if(pdgCodeMax == 0) pdgCodeMax = 21;
    209     if(pdgCodeMax == -1) pdgCodeMax = 0;
    210 
    211     // find an efficency formula
    212     itEfficiencyMap = fEfficiencyMap.find(pdgCodeMax);
     139    // find an efficiency formula
     140    itEfficiencyMap = fEfficiencyMap.find(jet->Flavor);
    213141    if(itEfficiencyMap == fEfficiencyMap.end())
    214142    {
     
    217145    formula = itEfficiencyMap->second;
    218146
    219     // apply an efficency formula
    220     jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta)) << fBitNumber;
     147    // apply an efficiency formula
     148    jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber;
     149
     150    // find an efficiency formula for algo flavor definition
     151    itEfficiencyMap = fEfficiencyMap.find(jet->FlavorAlgo);
     152    if(itEfficiencyMap == fEfficiencyMap.end())
     153    {
     154      itEfficiencyMap = fEfficiencyMap.find(0);
     155    }
     156    formula = itEfficiencyMap->second;
     157
     158    // apply an efficiency formula
     159    jet->BTagAlgo |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber;
     160
     161    // find an efficiency formula for phys flavor definition
     162    itEfficiencyMap = fEfficiencyMap.find(jet->FlavorPhys);
     163    if(itEfficiencyMap == fEfficiencyMap.end())
     164    {
     165      itEfficiencyMap = fEfficiencyMap.find(0);
     166    }
     167    formula = itEfficiencyMap->second;
     168
     169    // apply an efficiency formula
     170    jet->BTagPhys |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber;
    221171  }
    222172}
  • modules/BTagging.h

    rd870fc5 rd77b51d  
    3737class DelphesFormula;
    3838
    39 class ExRootFilter;
    40 class BTaggingPartonClassifier;
    41 
    4239class BTagging: public DelphesModule
    4340{
     
    5552  Int_t fBitNumber;
    5653
    57   Double_t fDeltaR;
    58 
    5954#if !defined(__CINT__) && !defined(__CLING__)
    6055  std::map< Int_t, DelphesFormula * > fEfficiencyMap; //!
    6156#endif
    6257
    63   BTaggingPartonClassifier *fClassifier; //!
    64  
    65   ExRootFilter *fFilter;
    66 
    67   TIterator *fItPartonInputArray; //!
    68  
    6958  TIterator *fItJetInputArray; //!
    70 
    71   const TObjArray *fPartonInputArray; //!
    7259 
    7360  const TObjArray *fJetInputArray; //!
  • modules/CMakeLists.txt

    rd870fc5 rd77b51d  
    77file(GLOB sources *.cc)
    88file(GLOB headers *.h)
     9list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/FastJetLinkDef.h)
    910list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/ModulesLinkDef.h)
    1011list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/Pythia8LinkDef.h)
    1112
     13DELPHES_GENERATE_DICTIONARY(FastJetDict ${headers} LINKDEF FastJetLinkDef.h)
    1214DELPHES_GENERATE_DICTIONARY(ModulesDict ${headers} LINKDEF ModulesLinkDef.h)
    1315
     
    1517list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/PileUpMergerPythia8.cc)
    1618
    17 add_library(modules OBJECT ${sources} ModulesDict.cxx)
     19add_library(modules OBJECT ${sources} FastJetDict.cxx ModulesDict.cxx)
  • modules/Calorimeter.cc

    rd870fc5 rd77b51d  
    142142  }
    143143
    144 /*
    145   TFractionMap::iterator itFractionMap;
    146   for(itFractionMap = fFractionMap.begin(); itFractionMap != fFractionMap.end(); ++itFractionMap)
    147   {
    148     cout << itFractionMap->first << "   " << itFractionMap->second.first  << "   " << itFractionMap->second.second << endl;
    149   }
    150 */
     144  // read min E value for timing measurement in ECAL
     145  fTimingEnergyMin = GetDouble("TimingEnergyMin",4.);
     146  // For timing
     147  // So far this flag needs to be false
     148  // Curved extrapolation not supported
     149  fElectronsFromTrack = false;
    151150
    152151  // read min E value for towers to be saved
     
    158157
    159158  // switch on or off the dithering of the center of calorimeter towers
    160   fDitherTowerCenter = GetBool("DitherTowerCenter", true);
     159  fSmearTowerCenter = GetBool("SmearTowerCenter", true);
    161160
    162161  // read resolution formulas
     
    356355      fTrackHCalEnergy = 0.0;
    357356
    358       fTowerECalTime = 0.0;
    359       fTowerHCalTime = 0.0;
    360 
    361       fTrackECalTime = 0.0;
    362       fTrackHCalTime = 0.0;
    363 
    364       fTowerECalTimeWeight = 0.0;
    365       fTowerHCalTimeWeight = 0.0;
    366 
    367357      fTowerTrackHits = 0;
    368358      fTowerPhotonHits = 0;
     
    380370      position = track->Position;
    381371
    382 
    383372      ecalEnergy = momentum.E() * fTrackECalFractions[number];
    384373      hcalEnergy = momentum.E() * fTrackHCalFractions[number];
     
    387376      fTrackHCalEnergy += hcalEnergy;
    388377
    389       fTrackECalTime += TMath::Sqrt(ecalEnergy)*position.T();
    390       fTrackHCalTime += TMath::Sqrt(hcalEnergy)*position.T();
    391 
    392       fTrackECalTimeWeight += TMath::Sqrt(ecalEnergy);
    393       fTrackHCalTimeWeight += TMath::Sqrt(hcalEnergy);
     378      if(ecalEnergy > fTimingEnergyMin && fTower)
     379      {
     380        if(fElectronsFromTrack)
     381        {
     382          fTower->ECalEnergyTimePairs.push_back(make_pair<Float_t, Float_t>(ecalEnergy, track->Position.T()));
     383        }
     384      }
    394385
    395386      fTowerTrackArray->Add(track);
     
    412403    fTowerHCalEnergy += hcalEnergy;
    413404
    414     fTowerECalTime += TMath::Sqrt(ecalEnergy)*position.T();
    415     fTowerHCalTime += TMath::Sqrt(hcalEnergy)*position.T();
    416 
    417     fTowerECalTimeWeight += TMath::Sqrt(ecalEnergy);
    418     fTowerHCalTimeWeight += TMath::Sqrt(hcalEnergy);
    419 
     405    if(ecalEnergy > fTimingEnergyMin && fTower)
     406    {
     407      if (abs(particle->PID) != 11 || !fElectronsFromTrack)
     408      {
     409        fTower->ECalEnergyTimePairs.push_back(make_pair<Float_t, Float_t>(ecalEnergy, particle->Position.T()));
     410      }
     411    }
    420412
    421413    fTower->AddCandidate(particle);
     
    434426  Double_t ecalEnergy, hcalEnergy;
    435427  Double_t ecalSigma, hcalSigma;
    436   Double_t ecalTime, hcalTime, time;
     428  Float_t weight, sumWeightedTime, sumWeight;
    437429
    438430  if(!fTower) return;
     
    444436  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    445437
    446   ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerECalTime/fTowerECalTimeWeight;
    447   hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerHCalTime/fTowerHCalTimeWeight;
    448 
    449438  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
    450439  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
     
    454443
    455444  energy = ecalEnergy + hcalEnergy;
    456   time = (TMath::Sqrt(ecalEnergy)*ecalTime + TMath::Sqrt(hcalEnergy)*hcalTime)/(TMath::Sqrt(ecalEnergy) + TMath::Sqrt(hcalEnergy));
    457 
    458   if(fDitherTowerCenter)
     445
     446  if(fSmearTowerCenter)
    459447  {
    460448    eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
     
    469457  pt = energy / TMath::CosH(eta);
    470458
    471   fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time);
     459  // Time calculation for tower
     460  fTower->NTimeHits = 0;
     461  sumWeightedTime = 0.0;
     462  sumWeight = 0.0;
     463
     464  for(size_t i = 0; i < fTower->ECalEnergyTimePairs.size(); ++i)
     465  {
     466    weight = TMath::Sqrt(fTower->ECalEnergyTimePairs[i].first);
     467    sumWeightedTime += weight * fTower->ECalEnergyTimePairs[i].second;
     468    sumWeight += weight;
     469    fTower->NTimeHits++;
     470  }
     471
     472  if(sumWeight > 0.0)
     473  {
     474    fTower->Position.SetPtEtaPhiE(1.0, eta, phi, sumWeightedTime/sumWeight);
     475  }
     476  else
     477  {
     478    fTower->Position.SetPtEtaPhiE(1.0, eta, phi, 999999.9);
     479  }
     480
     481
    472482  fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
    473483  fTower->Eem = ecalEnergy;
  • modules/Calorimeter.h

    rd870fc5 rd77b51d  
    6060  Double_t fTrackECalEnergy, fTrackHCalEnergy;
    6161
    62   Double_t fTowerECalTime, fTowerHCalTime;
    63   Double_t fTrackECalTime, fTrackHCalTime;
    64 
    65   Double_t fTowerECalTimeWeight, fTowerHCalTimeWeight;
    66   Double_t fTrackECalTimeWeight, fTrackHCalTimeWeight;
     62  Double_t fTimingEnergyMin;
     63  Bool_t fElectronsFromTrack;
    6764
    6865  Int_t fTowerTrackHits, fTowerPhotonHits;
     
    7471  Double_t fHCalEnergySignificanceMin;
    7572
    76   Bool_t fDitherTowerCenter;
     73  Bool_t fSmearTowerCenter;
    7774
    7875  TFractionMap fFractionMap; //!
  • modules/Efficiency.cc

    rd870fc5 rd77b51d  
    9696{
    9797  Candidate *candidate;
    98   Double_t pt, eta, phi;
     98  Double_t pt, eta, phi, e;
    9999
    100100  fItInputArray->Reset();
     
    106106    phi = candidatePosition.Phi();
    107107    pt = candidateMomentum.Pt();
     108    e = candidateMomentum.E();
    108109
    109110    // apply an efficency formula
    110     if(gRandom->Uniform() > fFormula->Eval(pt, eta)) continue;
     111    if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e)) continue;
    111112   
    112113    fOutputArray->Add(candidate);
  • modules/EnergyScale.cc

    rd870fc5 rd77b51d  
    104104    momentum = candidate->Momentum;
    105105
    106     scale = fFormula->Eval(momentum.Pt(), momentum.Eta());
     106    scale = fFormula->Eval(momentum.Pt(), momentum.Eta(), momentum.Phi(), momentum.E());
    107107
    108108    if(scale > 0.0) momentum *= scale;
  • modules/EnergySmearing.cc

    rd870fc5 rd77b51d  
    9696{
    9797  Candidate *candidate, *mother;
    98   Double_t energy, eta, phi;
     98  Double_t pt, energy, eta, phi;
    9999
    100100  fItInputArray->Reset();
     
    103103    const TLorentzVector &candidatePosition = candidate->Position;
    104104    const TLorentzVector &candidateMomentum = candidate->Momentum;
     105   
     106    pt = candidatePosition.Pt();
    105107    eta = candidatePosition.Eta();
    106108    phi = candidatePosition.Phi();
     
    108110 
    109111    // apply smearing formula
    110     energy = gRandom->Gaus(energy, fFormula->Eval(0.0, eta, 0.0, energy));
     112    energy = gRandom->Gaus(energy, fFormula->Eval(pt, eta, phi, energy));
    111113     
    112114    if(energy <= 0.0) continue;
  • modules/FastJetFinder.cc

    rd870fc5 rd77b51d  
    6666#include "fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh"
    6767
     68#include "fastjet/tools/Filter.hh"
     69#include "fastjet/tools/Pruner.hh"
     70#include "fastjet/contribs/RecursiveTools/SoftDrop.hh"
     71
    6872using namespace std;
    6973using namespace fastjet;
     
    9296  JetDefinition::Plugin *plugin = 0;
    9397  JetDefinition::Recombiner *recomb = 0;
    94   NjettinessPlugin *njetPlugin = 0;
    95 
    96   // read eta ranges
    97 
    98   ExRootConfParam param = GetParam("RhoEtaRange");
     98  ExRootConfParam param;
    9999  Long_t i, size;
    100 
    101   fEtaRangeMap.clear();
    102   size = param.GetSize();
    103   for(i = 0; i < size/2; ++i)
    104   {
    105     fEtaRangeMap[param[i*2].GetDouble()] = param[i*2 + 1].GetDouble();
    106   }
     100  Double_t etaMin, etaMax;
     101  TEstimatorStruct estimatorStruct;
    107102
    108103  // define algorithm
     
    130125  fN = GetInt("N", 2);                  // used only if Njettiness is used as jet clustering algo (case 8)
    131126
     127  //-- Trimming parameters --
     128 
     129  fComputeTrimming = GetBool("ComputeTrimming", false);
     130  fRTrim = GetDouble("RTrim", 0.2);
     131  fPtFracTrim = GetDouble("PtFracTrim", 0.05);
     132 
     133
     134  //-- Pruning parameters --
     135 
     136  fComputePruning = GetBool("ComputePruning", false);
     137  fZcutPrun = GetDouble("ZcutPrun", 0.1);
     138  fRcutPrun = GetDouble("RcutPrun", 0.5);
     139  fRPrun = GetDouble("RPrun", 0.8);
     140 
     141  //-- SoftDrop parameters --
     142 
     143  fComputeSoftDrop     = GetBool("ComputeSoftDrop", false);
     144  fBetaSoftDrop        = GetDouble("BetaSoftDrop", 0.0);
     145  fSymmetryCutSoftDrop = GetDouble("SymmetryCutSoftDrop", 0.1);
     146  fR0SoftDrop= GetDouble("R0SoftDrop=", 0.8);
     147 
     148
    132149  // ---  Jet Area Parameters ---
    133150  fAreaAlgorithm = GetInt("AreaAlgorithm", 0);
     
    197214      break;
    198215    case 8:
    199       njetPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff);
    200       fDefinition = new JetDefinition(njetPlugin);
     216      fNjettinessPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff);
     217      fDefinition = new JetDefinition(fNjettinessPlugin);
    201218      break;
    202219  }
     
    204221  fPlugin = plugin;
    205222  fRecomb = recomb;
    206   fNjettinessPlugin = njetPlugin;
    207223
    208224  ClusterSequence::print_banner();
     225
     226  if(fComputeRho && fAreaDefinition)
     227  {
     228    // read eta ranges
     229
     230    param = GetParam("RhoEtaRange");
     231    size = param.GetSize();
     232
     233    fEstimators.clear();
     234    for(i = 0; i < size/2; ++i)
     235    {
     236      etaMin = param[i*2].GetDouble();
     237      etaMax = param[i*2 + 1].GetDouble();
     238      estimatorStruct.estimator = new JetMedianBackgroundEstimator(SelectorEtaRange(etaMin, etaMax), *fDefinition, *fAreaDefinition);
     239      estimatorStruct.etaMin = etaMin;
     240      estimatorStruct.etaMax = etaMax;
     241      fEstimators.push_back(estimatorStruct);
     242    }
     243  }
    209244
    210245  // import input array
     
    223258void FastJetFinder::Finish()
    224259{
     260  vector< TEstimatorStruct >::iterator itEstimators;
     261
     262  for(itEstimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators)
     263  {
     264    if(itEstimators->estimator) delete itEstimators->estimator;
     265  }
     266
    225267  if(fItInputArray) delete fItInputArray;
    226268  if(fDefinition) delete fDefinition;
     
    241283  Double_t time, timeWeight;
    242284  Int_t number;
     285  Int_t charge;
    243286  Double_t rho = 0.0;
    244287  PseudoJet jet, area;
    245   vector<PseudoJet> inputList, outputList;
    246288  ClusterSequence *sequence;
    247   map< Double_t, Double_t >::iterator itEtaRangeMap;
     289  vector< PseudoJet > inputList, outputList, subjets;
     290  vector< PseudoJet >::iterator itInputList, itOutputList;
     291  vector< TEstimatorStruct >::iterator itEstimators;
    248292
    249293  DelphesFactory *factory = GetFactory();
     
    276320  if(fComputeRho && fAreaDefinition)
    277321  {
    278     for(itEtaRangeMap = fEtaRangeMap.begin(); itEtaRangeMap != fEtaRangeMap.end(); ++itEtaRangeMap)
    279     {
    280       Selector select_rapidity = SelectorAbsRapRange(itEtaRangeMap->first, itEtaRangeMap->second);
    281       JetMedianBackgroundEstimator estimator(select_rapidity, *fDefinition, *fAreaDefinition);
    282       estimator.set_particles(inputList);
    283       rho = estimator.rho();
     322    for(itEstimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators)
     323    {
     324      itEstimators->estimator->set_particles(inputList);
     325      rho = itEstimators->estimator->rho();
    284326
    285327      candidate = factory->NewCandidate();
    286328      candidate->Momentum.SetPtEtaPhiE(rho, 0.0, 0.0, rho);
    287       candidate->Edges[0] = itEtaRangeMap->first;
    288       candidate->Edges[1] = itEtaRangeMap->second;
     329      candidate->Edges[0] = itEstimators->etaMin;
     330      candidate->Edges[1] = itEstimators->etaMax;
    289331      fRhoOutputArray->Add(candidate);
    290332    }
     
    298340  detaMax = 0.0;
    299341  dphiMax = 0.0;
    300   vector<PseudoJet>::iterator itInputList, itOutputList;
    301342  for(itOutputList = outputList.begin(); itOutputList != outputList.end(); ++itOutputList)
    302343  {
     
    314355    timeWeight = 0.0;
    315356
     357    charge = 0;
     358
    316359    inputList.clear();
    317360    inputList = sequence->constituents(*itOutputList);
     
    319362    for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList)
    320363    {
     364      if(itInputList->user_index() < 0) continue;
    321365      constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index()));
    322366
     
    329373      timeWeight += TMath::Sqrt(constituent->Momentum.E());
    330374
     375      charge += constituent->Charge;
     376
    331377      candidate->AddCandidate(constituent);
    332378    }
     
    338384    candidate->DeltaEta = detaMax;
    339385    candidate->DeltaPhi = dphiMax;
    340 
     386    candidate->Charge = charge;
     387    //------------------------------------
     388    // Trimming
     389    //------------------------------------
     390
     391     if(fComputeTrimming)
     392    {
     393
     394      fastjet::Filter    trimmer(fastjet::JetDefinition(fastjet::kt_algorithm,fRTrim),fastjet::SelectorPtFractionMin(fPtFracTrim));
     395      fastjet::PseudoJet trimmed_jet = trimmer(*itOutputList);
     396     
     397      trimmed_jet = join(trimmed_jet.constituents());
     398     
     399      candidate->TrimmedP4[0].SetPtEtaPhiM(trimmed_jet.pt(), trimmed_jet.eta(), trimmed_jet.phi(), trimmed_jet.m());
     400       
     401      // four hardest subjets
     402      subjets.clear();
     403      subjets = trimmed_jet.pieces();
     404      subjets = sorted_by_pt(subjets);
     405     
     406      candidate->NSubJetsTrimmed = subjets.size();
     407
     408      for (size_t i = 0; i < subjets.size() and i < 4; i++){
     409        if(subjets.at(i).pt() < 0) continue ;
     410        candidate->TrimmedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
     411      }
     412    }
     413   
     414   
     415    //------------------------------------
     416    // Pruning
     417    //------------------------------------
     418   
     419   
     420    if(fComputePruning)
     421    {
     422
     423      fastjet::Pruner    pruner(fastjet::JetDefinition(fastjet::cambridge_algorithm,fRPrun),fZcutPrun,fRcutPrun);
     424      fastjet::PseudoJet pruned_jet = pruner(*itOutputList);
     425
     426      candidate->PrunedP4[0].SetPtEtaPhiM(pruned_jet.pt(), pruned_jet.eta(), pruned_jet.phi(), pruned_jet.m());
     427         
     428      // four hardest subjet
     429      subjets.clear();
     430      subjets = pruned_jet.pieces();
     431      subjets = sorted_by_pt(subjets);
     432     
     433      candidate->NSubJetsPruned = subjets.size();
     434
     435      for (size_t i = 0; i < subjets.size() and i < 4; i++){
     436        if(subjets.at(i).pt() < 0) continue ;
     437        candidate->PrunedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
     438      }
     439
     440    }
     441     
     442    //------------------------------------
     443    // SoftDrop
     444    //------------------------------------
     445   
     446    if(fComputeSoftDrop)
     447    {
     448   
     449      contrib::SoftDrop  softDrop(fBetaSoftDrop,fSymmetryCutSoftDrop,fR0SoftDrop);
     450      fastjet::PseudoJet softdrop_jet = softDrop(*itOutputList);
     451     
     452      candidate->SoftDroppedP4[0].SetPtEtaPhiM(softdrop_jet.pt(), softdrop_jet.eta(), softdrop_jet.phi(), softdrop_jet.m());
     453       
     454      // four hardest subjet
     455     
     456      subjets.clear();
     457      subjets    = softdrop_jet.pieces();
     458      subjets    = sorted_by_pt(subjets);
     459      candidate->NSubJetsSoftDropped = softdrop_jet.pieces().size();
     460
     461      for (size_t i = 0; i < subjets.size()  and i < 4; i++){
     462        if(subjets.at(i).pt() < 0) continue ;
     463        candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m());
     464      }
     465    }
     466 
    341467    // --- compute N-subjettiness with N = 1,2,3,4,5 ----
    342468
     
    377503    }
    378504
    379 
    380505    fOutputArray->Add(candidate);
    381506  }
  • modules/FastJetFinder.h

    rd870fc5 rd77b51d  
    3030#include "classes/DelphesModule.h"
    3131
    32 #include <map>
     32#include <vector>
    3333
    3434class TObjArray;
     
    3838  class JetDefinition;
    3939  class AreaDefinition;
    40   class Selector;
     40  class JetMedianBackgroundEstimator;
    4141  namespace contrib {
    4242    class NjettinessPlugin;
     
    8383  Int_t fN ;
    8484
     85  //-- Trimming parameters --
     86 
     87  Bool_t fComputeTrimming;
     88  Double_t fRTrim;
     89  Double_t fPtFracTrim;
     90 
     91  //-- Pruning parameters --
     92
     93  Bool_t fComputePruning;
     94  Double_t fZcutPrun;
     95  Double_t fRcutPrun;
     96  Double_t fRPrun;
     97
     98  //-- SoftDrop parameters --
     99
     100  Bool_t fComputeSoftDrop;
     101  Double_t fBetaSoftDrop;
     102  Double_t fSymmetryCutSoftDrop;
     103  Double_t fR0SoftDrop;
     104
    85105  // --- FastJet Area method --------
    86106
     
    100120  Double_t fEffectiveRfact;
    101121
    102   std::map< Double_t, Double_t > fEtaRangeMap; //!
     122#if !defined(__CINT__) && !defined(__CLING__)
     123  struct TEstimatorStruct
     124  {
     125    fastjet::JetMedianBackgroundEstimator *estimator;
     126    Double_t etaMin, etaMax;
     127  };
     128
     129  std::vector< TEstimatorStruct > fEstimators; //!
     130#endif
    103131
    104132  TIterator *fItInputArray; //!
  • modules/FastJetLinkDef.h

    rd870fc5 rd77b51d  
    2828#include "modules/FastJetFinder.h"
    2929#include "modules/FastJetGridMedianEstimator.h"
     30#include "modules/RunPUPPI.h"
    3031
    3132#ifdef __CINT__
     
    3738#pragma link C++ class FastJetFinder+;
    3839#pragma link C++ class FastJetGridMedianEstimator+;
     40#pragma link C++ class RunPUPPI+;
    3941
    4042#endif
  • modules/IdentificationMap.cc

    rd870fc5 rd77b51d  
    6969void IdentificationMap::Init()
    7070{
    71   // read efficiency formula
    72 
    73 
    7471  TMisIDMap::iterator itEfficiencyMap;
    7572  ExRootConfParam param;
     
    8784    formula->Compile(param[i*3 + 2].GetString());
    8885    pdg = param[i*3].GetInt();
    89     fEfficiencyMap.insert(make_pair(pdg,make_pair(param[i*3 + 1].GetInt(),formula)));
    90 
    91    // cout<<param[i*3].GetInt()<<","<<param[i*3+1].GetInt()<<","<<param[i*3 + 2].GetString()<<endl;
    92 
     86    fEfficiencyMap.insert(make_pair(pdg, make_pair(param[i*3 + 1].GetInt(), formula)));
    9387  }
    9488
     
    10094    formula->Compile("1.0");
    10195
    102     fEfficiencyMap.insert(make_pair(0,make_pair(0,formula)));
     96    fEfficiencyMap.insert(make_pair(0, make_pair(0, formula)));
    10397  }
    10498
     
    126120    if(formula) delete formula;
    127121  }
    128 
    129122}
    130123
     
    134127{
    135128  Candidate *candidate;
    136   Double_t pt, eta, phi;
     129  Double_t pt, eta, phi, e;
    137130  TMisIDMap::iterator itEfficiencyMap;
    138131  pair <TMisIDMap::iterator, TMisIDMap::iterator> range;
    139132  DelphesFormula *formula;
    140   Int_t pdgIn, pdgOut, charge;
     133  Int_t pdgCodeIn, pdgCodeOut, charge;
    141134
    142   Double_t P, Pi;
    143 
    144  // cout<<"------------ New Event ------------"<<endl;
     135  Double_t p, r, total;
    145136
    146137  fItInputArray->Reset();
     
    152143    phi = candidatePosition.Phi();
    153144    pt = candidateMomentum.Pt();
    154     pdgIn = candidate->PID;
     145    e = candidateMomentum.E();
     146   
     147    pdgCodeIn = candidate->PID;
    155148    charge = candidate->Charge;
    156149
    157    // cout<<"------------ New Candidate ------------"<<endl;
    158    // cout<<candidate->PID<<"   "<<pt<<","<<eta<<","<<phi<<endl;
     150    // first check that PID of this particle is specified in the map
     151    // otherwise, look for PID = 0
    159152
    160     P = 1.0;
     153    itEfficiencyMap = fEfficiencyMap.find(pdgCodeIn);
    161154
    162     //first check that PID of this particle is specified in cfg, if not set look for PID=0
    163 
    164     itEfficiencyMap = fEfficiencyMap.find(pdgIn);
    165 
    166     range = fEfficiencyMap.equal_range(pdgIn);
    167     if(range.first == range.second) range = fEfficiencyMap.equal_range(-pdgIn);
     155    range = fEfficiencyMap.equal_range(pdgCodeIn);
     156    if(range.first == range.second) range = fEfficiencyMap.equal_range(-pdgCodeIn);
    168157    if(range.first == range.second) range = fEfficiencyMap.equal_range(0);
    169158
    170     //loop over submap for this pid
    171     for (TMisIDMap::iterator it=range.first; it!=range.second; ++it)
     159    r = gRandom->Uniform();
     160    total = 0.0;
     161
     162    // loop over sub-map for this PID
     163    for(TMisIDMap::iterator it = range.first; it != range.second; ++it)
    172164    {
     165      formula = (it->second).second;
     166      pdgCodeOut = (it->second).first;
    173167
    174       formula = (it->second).second;
    175       pdgOut = (it->second).first;
     168      p = formula->Eval(pt, eta, phi, e);
    176169
    177       Pi = formula->Eval(pt, eta);
    178 
    179       // check that sum of probabilities does not exceed 1.
    180       P = (P - Pi)/P;
    181 
    182       if( P < 0.0 ) continue;
    183       else
     170      if(total <= r && r < total + p)
    184171      {
    185 
    186        //randomly assign a PID to particle according to map
    187        Double_t rndm = gRandom->Uniform();
    188 
    189        if(rndm > P)
    190        {
    191          //change PID of particle
    192          if(pdgOut != 0) candidate->PID = charge*pdgOut;
    193          fOutputArray->Add(candidate);
    194          break;
    195        }
     172        // change PID of particle
     173        if(pdgCodeOut != 0) candidate->PID = charge*pdgCodeOut;
     174        fOutputArray->Add(candidate);
     175        break;
    196176      }
    197177
     178      total += p;
    198179    }
    199 
    200    }
    201 
     180  }
    202181}
    203182
  • modules/IdentificationMap.h

    rd870fc5 rd77b51d  
    4949private:
    5050
    51   typedef std::multimap< Int_t, std::pair<Int_t , DelphesFormula * > > TMisIDMap; //!
     51  typedef std::multimap< Int_t, std::pair< Int_t, DelphesFormula * > > TMisIDMap; //!
    5252
    53   TMisIDMap fEfficiencyMap;
     53  TMisIDMap fEfficiencyMap; //!
    5454
    5555  TIterator *fItInputArray; //!
  • modules/ImpactParameterSmearing.cc

    rd870fc5 rd77b51d  
    9797  Candidate *candidate, *particle, *mother;
    9898  Double_t xd, yd, zd, dxy, sx, sy, sz, ddxy;
    99   Double_t pt, eta, px, py;
     99  Double_t pt, eta, px, py, phi, e;
    100100
    101101  fItInputArray->Reset();
     
    110110    eta = candidateMomentum.Eta();
    111111    pt = candidateMomentum.Pt();
     112    phi = candidateMomentum.Phi();
     113    e = candidateMomentum.E();
     114   
    112115    px = candidateMomentum.Px();
    113116    py = candidateMomentum.Py();
     
    119122
    120123    // calculate smeared values
    121     sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
    122     sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
    123     sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
     124    sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
     125    sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
     126    sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
    124127
    125128    xd += sx;
     
    130133    dxy = (xd*py - yd*px)/pt;
    131134
    132     ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
     135    ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
    133136
    134137    // fill smeared values in candidate
  • modules/Isolation.cc

    rd870fc5 rd77b51d  
    2525 *  the transverse momenta fraction within (PTRatioMin, PTRatioMax].
    2626 *
    27  *  \author P. Demin - UCL, Louvain-la-Neuve
     27 *  \author P. Demin, M. Selvaggi, R. Gerosa - UCL, Louvain-la-Neuve
    2828 *
    2929 */
     
    153153  Candidate *candidate, *isolation, *object;
    154154  TObjArray *isolationArray;
    155   Double_t sum, ratio;
     155  Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr;
    156156  Int_t counter;
    157157  Double_t eta = 0.0;
    158158  Double_t rho = 0.0;
    159 
    160   if(fRhoInputArray && fRhoInputArray->GetEntriesFast() > 0)
    161   {
    162     candidate = static_cast<Candidate*>(fRhoInputArray->At(0));
    163     rho = candidate->Momentum.Pt();
    164   }
    165159
    166160  // select isolation objects
     
    178172    const TLorentzVector &candidateMomentum = candidate->Momentum;
    179173    eta = TMath::Abs(candidateMomentum.Eta());
    180 
    181     // loop over all input tracks
    182     sum = 0.0;
    183     counter = 0;
    184     itIsolationArray.Reset();
    185     while((isolation = static_cast<Candidate*>(itIsolationArray.Next())))
    186     {
    187       const TLorentzVector &isolationMomentum = isolation->Momentum;
    188 
    189       if(candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax &&
    190          candidate->GetUniqueID() != isolation->GetUniqueID())
    191       {
    192         sum += isolationMomentum.Pt();
    193         ++counter;
    194       }
    195     }
    196174
    197175    // find rho
     
    209187    }
    210188
    211     // correct sum for pile-up contamination
    212     sum = sum - rho*fDeltaRMax*fDeltaRMax*TMath::Pi();
    213 
    214     ratio = sum/candidateMomentum.Pt();
    215     if((fUsePTSum && sum > fPTSumMax) || ratio > fPTRatioMax) continue;
    216 
     189    // loop over all input tracks
     190   
     191    sumNeutral = 0.0;
     192    sumCharged = 0.0;
     193    sumChargedPU = 0.0;
     194    sumAllParticles = 0.0;
     195   
     196    counter = 0;
     197    itIsolationArray.Reset();
     198   
     199    while((isolation = static_cast<Candidate*>(itIsolationArray.Next())))
     200    {
     201      const TLorentzVector &isolationMomentum = isolation->Momentum;
     202
     203      if(candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax &&
     204         candidate->GetUniqueID() != isolation->GetUniqueID())
     205      {
     206        sumAllParticles += isolationMomentum.Pt();
     207        if(isolation->Charge !=0)
     208        {
     209          sumCharged += isolationMomentum.Pt();
     210          if(isolation->IsRecoPU != 0) sumChargedPU += isolationMomentum.Pt();
     211        }
     212        else
     213        {
     214          sumNeutral += isolationMomentum.Pt();
     215        }
     216        ++counter;
     217      }
     218    }
     219
     220    // find rho
     221    rho = 0.0;
     222    if(fRhoInputArray)
     223    {
     224      fItRhoInputArray->Reset();
     225      while((object = static_cast<Candidate*>(fItRhoInputArray->Next())))
     226      {
     227        if(eta >= object->Edges[0] && eta < object->Edges[1])
     228        {
     229          rho = object->Momentum.Pt();
     230        }
     231      }
     232    }
     233
     234     // correct sum for pile-up contamination
     235    sumDBeta = sumCharged + TMath::Max(sumNeutral-0.5*sumChargedPU,0.0);
     236    sumRhoCorr = sumCharged + TMath::Max(sumNeutral-TMath::Max(rho,0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(),0.0);
     237    ratioDBeta = sumDBeta/candidateMomentum.Pt();
     238    ratioRhoCorr = sumRhoCorr/candidateMomentum.Pt();
     239   
     240    candidate->IsolationVar = ratioDBeta;
     241    candidate->IsolationVarRhoCorr = ratioRhoCorr;
     242    candidate->SumPtCharged = sumCharged;
     243    candidate->SumPtNeutral = sumNeutral;
     244    candidate->SumPtChargedPU = sumChargedPU;
     245    candidate->SumPt = sumAllParticles;
     246
     247    if((fUsePTSum && sumDBeta > fPTSumMax) || (!fUsePTSum && ratioDBeta > fPTRatioMax)) continue;
    217248    fOutputArray->Add(candidate);
    218249  }
  • modules/JetPileUpSubtractor.cc

    rd870fc5 rd77b51d  
    109109    momentum = candidate->Momentum;
    110110    area = candidate->Area;
    111     eta = TMath::Abs(momentum.Eta());
     111    eta = momentum.Eta();
    112112
    113113    // find rho
  • modules/ModulesLinkDef.h

    rd870fc5 rd77b51d  
    2929
    3030#include "modules/AngularSmearing.h"
     31#include "modules/PhotonConversions.h"
    3132#include "modules/ParticlePropagator.h"
    3233#include "modules/Efficiency.h"
     
    5051#include "modules/JetPileUpSubtractor.h"
    5152#include "modules/TrackPileUpSubtractor.h"
     53#include "modules/TaggingParticlesSkimmer.h"
    5254#include "modules/PileUpJetID.h"
    5355#include "modules/ConstituentFilter.h"
     
    5759#include "modules/Weighter.h"
    5860#include "modules/Hector.h"
     61#include "modules/JetFlavorAssociation.h"
     62#include "modules/JetFakeParticle.h"
    5963#include "modules/ExampleModule.h"
    6064
     
    6872
    6973#pragma link C++ class AngularSmearing+;
     74#pragma link C++ class PhotonConversions+;
    7075#pragma link C++ class ParticlePropagator+;
    7176#pragma link C++ class Efficiency+;
     
    8994#pragma link C++ class JetPileUpSubtractor+;
    9095#pragma link C++ class TrackPileUpSubtractor+;
     96#pragma link C++ class TaggingParticlesSkimmer+;
    9197#pragma link C++ class PileUpJetID+;
    9298#pragma link C++ class ConstituentFilter+;
     
    96102#pragma link C++ class Weighter+;
    97103#pragma link C++ class Hector+;
     104#pragma link C++ class JetFlavorAssociation+;
     105#pragma link C++ class JetFakeParticle+;
    98106#pragma link C++ class ExampleModule+;
    99107
  • modules/MomentumSmearing.cc

    rd870fc5 rd77b51d  
    9696{
    9797  Candidate *candidate, *mother;
    98   Double_t pt, eta, phi;
     98  Double_t pt, eta, phi, e;
    9999
    100100  fItInputArray->Reset();
     
    106106    phi = candidatePosition.Phi();
    107107    pt = candidateMomentum.Pt();
     108    e = candidateMomentum.E();
    108109
    109110    // apply smearing formula
    110     pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta) * pt);
     111    pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt);
    111112   
    112113    if(pt <= 0.0) continue;
  • modules/PdgCodeFilter.cc

    rd870fc5 rd77b51d  
    7474  fPTMin = GetDouble("PTMin", 0.0);
    7575
     76  fInvertPdg = GetBool("InvertPdg", false);
     77
     78  fRequireStatus = GetBool("RequireStatus", false);
     79  fStatus = GetInt("Status", 1);
     80
    7681  // import input array
    7782  fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles"));
     
    109114  Double_t pt;
    110115
     116  const Bool_t requireStatus = fRequireStatus;
     117  const Bool_t invertPdg = fInvertPdg;
     118  const int reqStatus = fStatus;
     119
    111120  fItInputArray->Reset();
    112121  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     
    116125    pt = candidateMomentum.Pt();
    117126
     127    if(pt < fPTMin) continue;
     128    if(requireStatus && (candidate->Status != reqStatus)) continue;
     129
    118130    pass = kTRUE;
    119 
    120     if(pt < fPTMin) pass = kFALSE;
    121131    if(find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE;
    122132
     133    if (invertPdg) pass = !pass;
    123134    if(pass) fOutputArray->Add(candidate);
    124135  }
  • modules/PdgCodeFilter.h

    rd870fc5 rd77b51d  
    5050
    5151  Double_t fPTMin; //!
     52  Bool_t fInvertPdg; //!
     53  Bool_t fRequireStatus; //!
     54  Int_t fStatus; //!
    5255
    5356  std::vector<Int_t> fPdgCodes;
  • modules/PileUpJetID.cc

    rd870fc5 rd77b51d  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  *
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  *
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  *
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class PileUpJetID
    213 *
    22  *  CMS PileUp Jet ID Variables, based on http://cds.cern.ch/record/1581583
     4 *  CMS PileUp Jet ID Variables
    235 *
    24  *  \author S. Zenz, December 2013
     6 *  \author S. Zenz
    257 *
    268 */
     
    4123#include "TRandom3.h"
    4224#include "TObjArray.h"
    43 #include "TDatabasePDG.h"
     25//#include "TDatabasePDG.h"
    4426#include "TLorentzVector.h"
    4527
     
    5436
    5537PileUpJetID::PileUpJetID() :
    56   fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0),fItVertexInputArray(0)
     38  fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0)
    5739{
    5840
     
    7052void PileUpJetID::Init()
    7153{
     54
    7255  fJetPTMin = GetDouble("JetPTMin", 20.0);
    7356  fParameterR = GetDouble("ParameterR", 0.5);
    7457  fUseConstituents = GetInt("UseConstituents", 0);
    7558
     59  fMeanSqDeltaRMaxBarrel = GetDouble("MeanSqDeltaRMaxBarrel",0.1);
     60  fBetaMinBarrel = GetDouble("BetaMinBarrel",0.1);
     61  fMeanSqDeltaRMaxEndcap = GetDouble("MeanSqDeltaRMaxEndcap",0.1);
     62  fBetaMinEndcap = GetDouble("BetaMinEndcap",0.1);
     63  fMeanSqDeltaRMaxForward = GetDouble("MeanSqDeltaRMaxForward",0.1);
     64  fJetPTMinForNeutrals = GetDouble("JetPTMinForNeutrals", 20.0);
     65  fNeutralPTMin = GetDouble("NeutralPTMin", 2.0);
     66
    7667  fAverageEachTower = false; // for timing
    7768
     
    8172  fItJetInputArray = fJetInputArray->MakeIterator();
    8273
    83   fTrackInputArray = ImportArray(GetString("TrackInputArray", "Calorimeter/eflowTracks"));
     74  fTrackInputArray = ImportArray(GetString("TrackInputArray", "ParticlePropagator/tracks"));
    8475  fItTrackInputArray = fTrackInputArray->MakeIterator();
    8576
    86   fNeutralInputArray = ImportArray(GetString("NeutralInputArray", "Calorimeter/eflowTowers"));
     77  fNeutralInputArray = ImportArray(GetString("NeutralInputArray", "ParticlePropagator/tracks"));
    8778  fItNeutralInputArray = fNeutralInputArray->MakeIterator();
    8879
    89   fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices"));
    90   fItVertexInputArray = fVertexInputArray->MakeIterator();
    91 
    92   fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
    93 
    9480  // create output array(s)
    9581
    9682  fOutputArray = ExportArray(GetString("OutputArray", "jets"));
     83
     84  fNeutralsInPassingJets = ExportArray(GetString("NeutralsInPassingJets","eflowtowers"));
     85
    9786}
    9887
     
    10190void PileUpJetID::Finish()
    10291{
     92  //  cout << "In finish" << endl;
     93
    10394  if(fItJetInputArray) delete fItJetInputArray;
    10495  if(fItTrackInputArray) delete fItTrackInputArray;
    10596  if(fItNeutralInputArray) delete fItNeutralInputArray;
    106   if(fItVertexInputArray) delete fItVertexInputArray;
     97
    10798}
    10899
     
    113104  Candidate *candidate, *constituent;
    114105  TLorentzVector momentum, area;
    115   Int_t i, nc, nn;
    116   Double_t sumpt, sumptch, sumptchpv, sumptchpu, sumdrsqptsq, sumptsq;
    117   Double_t dr, pt, pt_ann[5];
    118   Double_t zvtx = 0.0;
    119 
    120   Candidate *track;
    121 
    122   // find z position of primary vertex
    123 
    124   fItVertexInputArray->Reset();
    125   while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next())))
    126   {
    127     if(!candidate->IsPU)
    128     {
    129       zvtx = candidate->Position.Z();
    130       break;
    131     }
    132   }
     106
     107  Candidate *trk;
    133108
    134109  // loop over all input candidates
     
    139114    area = candidate->Area;
    140115
    141     sumpt = 0.0;
    142     sumptch = 0.0;
    143     sumptchpv = 0.0;
    144     sumptchpu = 0.0;
    145     sumdrsqptsq = 0.0;
    146     sumptsq = 0.0;
    147     nc = 0;
    148     nn = 0;
    149 
    150     for(i = 0; i < 5; ++i)
    151     {
    152       pt_ann[i] = 0.0;
    153     }
    154 
    155     if(fUseConstituents)
    156     {
     116    float sumT0 = 0.;
     117    float sumT1 = 0.;
     118    float sumT10 = 0.;
     119    float sumT20 = 0.;
     120    float sumT30 = 0.;
     121    float sumT40 = 0.;
     122    float sumWeightsForT = 0.;
     123    candidate->NTimeHits = 0;
     124
     125    float sumpt = 0.;
     126    float sumptch = 0.;
     127    float sumptchpv = 0.;
     128    float sumptchpu = 0.;
     129    float sumdrsqptsq = 0.;
     130    float sumptsq = 0.;
     131    int nc = 0;
     132    int nn = 0;
     133    float pt_ann[5];
     134
     135    for (int i = 0 ; i < 5 ; i++) {
     136      pt_ann[i] = 0.;
     137    }
     138
     139    if (fUseConstituents) {
    157140      TIter itConstituents(candidate->GetCandidates());
    158       while((constituent = static_cast<Candidate*>(itConstituents.Next())))
    159       {
    160         pt = constituent->Momentum.Pt();
    161         dr = candidate->Momentum.DeltaR(constituent->Momentum);
    162         sumpt += pt;
    163         sumdrsqptsq += dr*dr*pt*pt;
    164         sumptsq += pt*pt;
    165         if(constituent->Charge == 0)
    166         {
    167           // neutrals
    168           ++nn;
    169         }
    170         else
    171         {
    172           // charged
    173           if(constituent->IsPU && TMath::Abs(constituent->Position.Z()-zvtx) > fZVertexResolution)
    174           {
    175             sumptchpu += pt;
    176           }
    177           else
    178           {
    179             sumptchpv += pt;
    180           }
    181           sumptch += pt;
    182           ++nc;
    183         }
    184         for(i = 0; i < 5; ++i)
    185         {
    186           if(dr > 0.1*i && dr < 0.1*(i + 1))
    187           {
    188             pt_ann[i] += pt;
    189           }
    190         }
    191       }
    192     }
    193     else
    194     {
     141      while((constituent = static_cast<Candidate*>(itConstituents.Next()))) {
     142        float pt = constituent->Momentum.Pt();
     143        float dr = candidate->Momentum.DeltaR(constituent->Momentum);
     144        //      cout << " There exists a constituent with dr=" << dr << endl;
     145        sumpt += pt;
     146        sumdrsqptsq += dr*dr*pt*pt;
     147        sumptsq += pt*pt;
     148        if (constituent->Charge == 0) {
     149          nn++;
     150        } else {
     151          if (constituent->IsRecoPU) {
     152            sumptchpu += pt;
     153          } else {
     154            sumptchpv += pt;
     155          }
     156          sumptch += pt;
     157          nc++;
     158        }
     159        for (int i = 0 ; i < 5 ; i++) {
     160          if (dr > 0.1*i && dr < 0.1*(i+1)) {
     161            pt_ann[i] += pt;
     162          }
     163        }
     164        float tow_sumT = 0;
     165        float tow_sumW = 0;
     166        for (int i = 0 ; i < constituent->ECalEnergyTimePairs.size() ; i++) {
     167          float w = TMath::Sqrt(constituent->ECalEnergyTimePairs[i].first);
     168          if (fAverageEachTower) {
     169            tow_sumT += w*constituent->ECalEnergyTimePairs[i].second;
     170            tow_sumW += w;
     171          } else {
     172            sumT0 += w*constituent->ECalEnergyTimePairs[i].second;
     173            sumT1 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.001);
     174            sumT10 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.010);
     175            sumT20 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.020);
     176            sumT30 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.030);
     177            sumT40 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.040);
     178            sumWeightsForT += w;
     179            candidate->NTimeHits++;
     180          }
     181        }
     182        if (fAverageEachTower && tow_sumW > 0.) {
     183          sumT0 += tow_sumT;
     184          sumT1 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.001);
     185          sumT10 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.0010);
     186          sumT20 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.0020);
     187          sumT30 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.0030);
     188          sumT40 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.0040);
     189          sumWeightsForT += tow_sumW;
     190          candidate->NTimeHits++;
     191        }
     192      }
     193    } else {
    195194      // Not using constituents, using dr
    196195      fItTrackInputArray->Reset();
    197       while((track = static_cast<Candidate*>(fItTrackInputArray->Next())))
    198       {
    199         if(track->Momentum.DeltaR(candidate->Momentum) < fParameterR)
    200         {
    201           pt = track->Momentum.Pt();
    202           sumpt += pt;
    203           sumptch += pt;
    204           if(track->IsPU && TMath::Abs(track->Position.Z()-zvtx) > fZVertexResolution)
    205           {
    206             sumptchpu += pt;
    207           }
    208           else
    209           {
    210             sumptchpv += pt;
    211           }
    212           dr = candidate->Momentum.DeltaR(track->Momentum);
    213           sumdrsqptsq += dr*dr*pt*pt;
    214           sumptsq += pt*pt;
    215           nc++;
    216           for(i = 0; i < 5; ++i)
    217           {
    218             if(dr > 0.1*i && dr < 0.1*(i + 1))
    219             {
    220               pt_ann[i] += pt;
    221             }
    222           }
    223         }
    224       }
    225 
     196      while ((trk = static_cast<Candidate*>(fItTrackInputArray->Next()))) {
     197        if (trk->Momentum.DeltaR(candidate->Momentum) < fParameterR) {
     198          float pt = trk->Momentum.Pt();
     199          sumpt += pt;
     200          sumptch += pt;
     201          if (trk->IsRecoPU) {
     202            sumptchpu += pt;
     203          } else {
     204            sumptchpv += pt;
     205          }
     206          float dr = candidate->Momentum.DeltaR(trk->Momentum);
     207          sumdrsqptsq += dr*dr*pt*pt;
     208          sumptsq += pt*pt;
     209          nc++;
     210          for (int i = 0 ; i < 5 ; i++) {
     211            if (dr > 0.1*i && dr < 0.1*(i+1)) {
     212              pt_ann[i] += pt;
     213            }
     214          }
     215        }
     216      }
    226217      fItNeutralInputArray->Reset();
    227       while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next())))
    228       {
    229         if(constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR)
    230         {
    231           pt = constituent->Momentum.Pt();
    232           sumpt += pt;
    233           dr = candidate->Momentum.DeltaR(constituent->Momentum);
    234           sumdrsqptsq += dr*dr*pt*pt;
    235           sumptsq += pt*pt;
    236           nn++;
    237           for(i = 0; i < 5; ++i)
    238           {
    239             if(dr > 0.1*i && dr < 0.1*(i + 1))
    240             {
    241               pt_ann[i] += pt;
    242             }
    243           }
    244         }
    245       }
    246     }
    247 
    248     if(sumptch > 0.0)
    249     {
    250       candidate->Beta = sumptchpu/sumptch;
    251       candidate->BetaStar = sumptchpv/sumptch;
    252     }
    253     else
    254     {
    255       candidate->Beta = -999.0;
    256       candidate->BetaStar = -999.0;
    257     }
    258     if(sumptsq > 0.0)
    259     {
     218      while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next()))) {
     219        if (constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR) {
     220          float pt = constituent->Momentum.Pt();
     221          sumpt += pt;
     222          float dr = candidate->Momentum.DeltaR(constituent->Momentum);
     223          sumdrsqptsq += dr*dr*pt*pt;
     224          sumptsq += pt*pt;
     225          nn++;
     226          for (int i = 0 ; i < 5 ; i++) {
     227            if (dr > 0.1*i && dr < 0.1*(i+1)) {
     228            pt_ann[i] += pt;
     229            }
     230          }
     231        }
     232      }
     233    }
     234
     235    if (sumptch > 0.) {
     236      candidate->Beta = sumptchpv/sumptch;
     237      candidate->BetaStar = sumptchpu/sumptch;
     238    } else {
     239      candidate->Beta = -999.;
     240      candidate->BetaStar = -999.;
     241    }
     242    if (sumptsq > 0.) {
    260243      candidate->MeanSqDeltaR = sumdrsqptsq/sumptsq;
    261     }
    262     else
    263     {
    264       candidate->MeanSqDeltaR = -999.0;
     244    } else {
     245      candidate->MeanSqDeltaR = -999.;
    265246    }
    266247    candidate->NCharged = nc;
    267248    candidate->NNeutrals = nn;
    268     if(sumpt > 0.0)
    269     {
     249    if (sumpt > 0.) {
    270250      candidate->PTD = TMath::Sqrt(sumptsq) / sumpt;
    271       for(i = 0; i < 5; ++i)
    272       {
     251      for (int i = 0 ; i < 5 ; i++) {
    273252        candidate->FracPt[i] = pt_ann[i]/sumpt;
    274253      }
    275     }
    276     else
    277     {
    278       candidate->PTD = -999.0;
    279       for(i = 0; i < 5; ++i)
    280       {
    281         candidate->FracPt[i] = -999.0;
     254    } else {
     255      candidate->PTD = -999.;
     256      for (int i = 0 ; i < 5 ; i++) {
     257        candidate->FracPt[i] = -999.;
    282258      }
    283259    }
    284260
    285261    fOutputArray->Add(candidate);
     262
     263    // New stuff
     264    /*
     265    fMeanSqDeltaRMaxBarrel = GetDouble("MeanSqDeltaRMaxBarrel",0.1);
     266    fBetaMinBarrel = GetDouble("BetaMinBarrel",0.1);
     267    fMeanSqDeltaRMaxEndcap = GetDouble("MeanSqDeltaRMaxEndcap",0.1);
     268    fBetaMinEndcap = GetDouble("BetaMinEndcap",0.1);
     269    fMeanSqDeltaRMaxForward = GetDouble("MeanSqDeltaRMaxForward",0.1);
     270    */
     271
     272    bool passId = false;
     273    if (candidate->Momentum.Pt() > fJetPTMinForNeutrals && candidate->MeanSqDeltaR > -0.1) {
     274      if (fabs(candidate->Momentum.Eta())<1.5) {
     275        passId = ((candidate->Beta > fBetaMinBarrel) && (candidate->MeanSqDeltaR < fMeanSqDeltaRMaxBarrel));
     276      } else if (fabs(candidate->Momentum.Eta())<4.0) {
     277        passId = ((candidate->Beta > fBetaMinEndcap) && (candidate->MeanSqDeltaR < fMeanSqDeltaRMaxEndcap));
     278      } else {
     279        passId = (candidate->MeanSqDeltaR < fMeanSqDeltaRMaxForward);
     280      }
     281    }
     282
     283    //    cout << " Pt Eta MeanSqDeltaR Beta PassId " << candidate->Momentum.Pt()
     284    //   << " " << candidate->Momentum.Eta() << " " << candidate->MeanSqDeltaR << " " << candidate->Beta << " " << passId << endl;
     285
     286    if (passId) {
     287      if (fUseConstituents) {
     288        TIter itConstituents(candidate->GetCandidates());
     289        while((constituent = static_cast<Candidate*>(itConstituents.Next()))) {
     290          if (constituent->Charge == 0 && constituent->Momentum.Pt() > fNeutralPTMin) {
     291            fNeutralsInPassingJets->Add(constituent);
     292            //      cout << "    Constitutent added Pt Eta Charge " << constituent->Momentum.Pt() << " " << constituent->Momentum.Eta() << " " << constituent->Charge << endl;
     293          }
     294        }
     295      } else { // use DeltaR
     296        fItNeutralInputArray->Reset();
     297        while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next()))) {
     298          if (constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR && constituent->Momentum.Pt() > fNeutralPTMin) {
     299            fNeutralsInPassingJets->Add(constituent);
     300            //            cout << "    Constitutent added Pt Eta Charge " << constituent->Momentum.Pt() << " " << constituent->Momentum.Eta() << " " << constituent->Charge << endl;
     301          }
     302        }
     303      }
     304    }
     305
     306
    286307  }
    287308}
    288309
    289310//------------------------------------------------------------------------------
    290 
  • modules/PileUpJetID.h

    rd870fc5 rd77b51d  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  *
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  *
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  *
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef PileUpJetID_h
    202#define PileUpJetID_h
     
    224/** \class PileUpJetID
    235 *
    24  *  CMS PileUp Jet ID Variables, based on http://cds.cern.ch/record/1581583
     6 *  CMS PileUp Jet ID Variables
    257 *
    26  *  \author S. Zenz, December 2013
     8 *  \author S. Zenz
    279 *
    2810 */
     
    3416
    3517class TObjArray;
     18class DelphesFormula;
    3619
    3720class PileUpJetID: public DelphesModule
     
    5134  Double_t fParameterR;
    5235
     36  Double_t fMeanSqDeltaRMaxBarrel; // |eta| < 1.5
     37  Double_t fBetaMinBarrel; // |eta| < 2.5
     38  Double_t fMeanSqDeltaRMaxEndcap; // 1.5 < |eta| < 4.0
     39  Double_t fBetaMinEndcap; // 1.5 < |eta| < 4.0
     40  Double_t fMeanSqDeltaRMaxForward; // |eta| > 4.0
     41
     42  Double_t fNeutralPTMin;
     43  Double_t fJetPTMinForNeutrals;
     44
     45  /*
     46JAY
     47---
     48
     49|Eta|<1.5
     50
     51meanSqDeltaR betaStar SigEff BgdEff
     520.13 0.92 96% 8%
     530.13 0.95 97% 16%
     540.13 0.97 98% 27%
     55
     56|Eta|>1.5
     57
     58meanSqDeltaR betaStar SigEff BgdEff
     590.14 0.91 95% 15%
     600.14 0.94 97% 19%
     610.14 0.97 98% 29%
     62
     63BRYAN
     64-----
     65
     66Barrel (MeanSqDR, Beta, sig eff, bg eff):
     670.10, 0.08, 90%, 8%
     680.11, 0.12, 90%, 6%
     690.13, 0.16, 89%, 5%
     70
     71Endcap (MeanSqDR, Beta, sig eff, bg eff):
     720.07, 0.06, 89%, 4%
     730.08, 0.08, 92%, 6%
     740.09, 0.08, 95%, 10%
     750.10, 0.08, 97%, 13%
     76
     77SETH GUESSES FOR |eta| > 4.0
     78----------------------------
     79
     80MeanSqDeltaR
     810.07
     820.10
     830.14
     840.2
     85  */
     86
    5387  // If set to true, may have weird results for PFCHS
    5488  // If set to false, uses everything within dR < fParameterR even if in other jets &c.
    5589  // Results should be very similar for PF
    56   Int_t fUseConstituents;
     90  Int_t fUseConstituents; 
    5791
    5892  Bool_t fAverageEachTower;
     
    6296  const TObjArray *fJetInputArray; //!
    6397
    64   const TObjArray *fTrackInputArray; //!
    65   const TObjArray *fNeutralInputArray; //!
     98  const TObjArray *fTrackInputArray; // SCZ
     99  const TObjArray *fNeutralInputArray;
    66100
    67   TIterator *fItTrackInputArray; //!
    68   TIterator *fItNeutralInputArray; //!
     101  TIterator *fItTrackInputArray; // SCZ
     102  TIterator *fItNeutralInputArray; // SCZ
    69103
    70104  TObjArray *fOutputArray; //!
     105  TObjArray *fNeutralsInPassingJets; // SCZ
    71106
    72   TIterator *fItVertexInputArray; //!
    73   const TObjArray *fVertexInputArray; //!
    74107
    75   Double_t fZVertexResolution;
    76 
    77   ClassDef(PileUpJetID, 1)
     108  ClassDef(PileUpJetID, 2)
    78109};
    79110
    80111#endif
    81 
  • modules/PileUpMerger.cc

    rd870fc5 rd77b51d  
    8080  fTVertexSpread = GetDouble("TVertexSpread", 1.5E-09);
    8181
     82  fInputBeamSpotX = GetDouble("InputBeamSpotX", 0.0);
     83  fInputBeamSpotY = GetDouble("InputBeamSpotY", 0.0);
     84  fOutputBeamSpotX = GetDouble("OutputBeamSpotX", 0.0);
     85  fOutputBeamSpotY = GetDouble("OutputBeamSpotY", 0.0);
     86
    8287  // read vertex smearing formula
    8388
     
    111116  TParticlePDG *pdgParticle;
    112117  Int_t pid;
    113   Float_t x, y, z, t;
     118  Float_t x, y, z, t, vx, vy;
    114119  Float_t px, py, pz, e;
    115120  Double_t dz, dphi, dt;
    116   Int_t numberOfEvents, event;
     121  Int_t numberOfEvents, event, numberOfParticles;
    117122  Long64_t allEntries, entry;
    118   Candidate *candidate, *vertexcandidate;
     123  Candidate *candidate, *vertex;
    119124  DelphesFactory *factory;
    120125
     
    123128  fItInputArray->Reset();
    124129
    125   // --- Deal with Primary vertex first  ------
     130  // --- Deal with primary vertex first  ------
    126131
    127132  fFunction->GetRandom2(dz, dt);
     
    129134  dt *= c_light*1.0E3; // necessary in order to make t in mm/c
    130135  dz *= 1.0E3; // necessary in order to make z in mm
    131 
     136  vx = 0.0;
     137  vy = 0.0;
     138  numberOfParticles = fInputArray->GetEntriesFast();
    132139  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    133140  {
     141    vx += candidate->Position.X();
     142    vy += candidate->Position.Y();
    134143    z = candidate->Position.Z();
    135144    t = candidate->Position.T();
     
    139148  }
    140149
     150  if(numberOfParticles > 0)
     151  {
     152    vx /= numberOfParticles;
     153    vy /= numberOfParticles;
     154  }
     155
    141156  factory = GetFactory();
    142157
    143   vertexcandidate = factory->NewCandidate();
    144   vertexcandidate->Position.SetXYZT(0.0, 0.0, dz, dt);
    145   fVertexOutputArray->Add(vertexcandidate);
     158  vertex = factory->NewCandidate();
     159  vertex->Position.SetXYZT(vx, vy, dz, dt);
     160  fVertexOutputArray->Add(vertex);
    146161
    147162  // --- Then with pile-up vertices  ------
     
    181196    dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi());
    182197
    183     vertexcandidate = factory->NewCandidate();
    184     vertexcandidate->Position.SetXYZT(0.0, 0.0, dz, dt);
    185     vertexcandidate->IsPU = 1;
    186 
    187     fVertexOutputArray->Add(vertexcandidate);
    188 
     198    vx = 0.0;
     199    vy = 0.0;
     200    numberOfParticles = 0;
    189201    while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e))
    190202    {
     
    204216      candidate->Momentum.RotateZ(dphi);
    205217
     218      x -= fInputBeamSpotX;
     219      y -= fInputBeamSpotY;
    206220      candidate->Position.SetXYZT(x, y, z + dz, t + dt);
    207221      candidate->Position.RotateZ(dphi);
     222      candidate->Position += TLorentzVector(fOutputBeamSpotX, fOutputBeamSpotY, 0.0, 0.0);
     223
     224      vx += candidate->Position.X();
     225      vy += candidate->Position.Y();
     226      ++numberOfParticles;
    208227
    209228      fParticleOutputArray->Add(candidate);
    210229    }
    211   }
    212 }
    213 
    214 //------------------------------------------------------------------------------
    215 
     230
     231    if(numberOfParticles > 0)
     232    {
     233      vx /= numberOfParticles;
     234      vy /= numberOfParticles;
     235    }
     236
     237    vertex = factory->NewCandidate();
     238    vertex->Position.SetXYZT(vx, vy, dz, dt);
     239    vertex->IsPU = 1;
     240
     241    fVertexOutputArray->Add(vertex);
     242  }
     243}
     244
     245//------------------------------------------------------------------------------
  • modules/PileUpMerger.h

    rd870fc5 rd77b51d  
    5353  Double_t fTVertexSpread;
    5454
     55  Double_t fInputBeamSpotX;
     56  Double_t fInputBeamSpotY;
     57  Double_t fOutputBeamSpotX;
     58  Double_t fOutputBeamSpotY;
     59
    5560  DelphesTF2 *fFunction; //!
    5661
  • modules/PileUpMergerPythia8.cc

    rd870fc5 rd77b51d  
    2121 *  Merges particles from pile-up sample into event
    2222 *
    23  *  \author P. Selvaggi - UCL, Louvain-la-Neuve
     23 *  \author M. Selvaggi - UCL, Louvain-la-Neuve
    2424 *
    2525 */
     
    2929#include "classes/DelphesClasses.h"
    3030#include "classes/DelphesFactory.h"
    31 #include "classes/DelphesFormula.h"
     31#include "classes/DelphesTF2.h"
    3232#include "classes/DelphesPileUpReader.h"
    3333
     
    5656
    5757PileUpMergerPythia8::PileUpMergerPythia8() :
    58   fPythia(0), fItInputArray(0)
    59 {
     58  fFunction(0), fPythia(0), fItInputArray(0)
     59{
     60  fFunction = new DelphesTF2;
    6061}
    6162
     
    6465PileUpMergerPythia8::~PileUpMergerPythia8()
    6566{
     67  delete fFunction;
    6668}
    6769
     
    7274  const char *fileName;
    7375
     76  fPileUpDistribution = GetInt("PileUpDistribution", 0);
     77
    7478  fMeanPileUp  = GetDouble("MeanPileUp", 10);
    75   fZVertexSpread = GetDouble("ZVertexSpread", 0.05)*1.0E3;
     79
     80  fZVertexSpread = GetDouble("ZVertexSpread", 0.15);
     81  fTVertexSpread = GetDouble("TVertexSpread", 1.5E-09);
     82
     83  fInputBeamSpotX = GetDouble("InputBeamSpotX", 0.0);
     84  fInputBeamSpotY = GetDouble("InputBeamSpotY", 0.0);
     85  fOutputBeamSpotX = GetDouble("OutputBeamSpotX", 0.0);
     86  fOutputBeamSpotY = GetDouble("OutputBeamSpotY", 0.0);
    7687
    7788  fPTMin = GetDouble("PTMin", 0.0);
     89
     90  fFunction->Compile(GetString("VertexDistributionFormula", "0.0"));
     91  fFunction->SetRange(-fZVertexSpread, -fTVertexSpread, fZVertexSpread, fTVertexSpread);
    7892
    7993  fileName = GetString("ConfigFile", "MinBias.cmnd");
     
    86100
    87101  // create output arrays
    88   fOutputArray = ExportArray(GetString("OutputArray", "stableParticles"));
     102  fParticleOutputArray = ExportArray(GetString("ParticleOutputArray", "stableParticles"));
     103  fVertexOutputArray = ExportArray(GetString("VertexOutputArray", "vertices"));
    89104}
    90105
     
    102117  TDatabasePDG *pdg = TDatabasePDG::Instance();
    103118  TParticlePDG *pdgParticle;
    104   Int_t pid;
    105   Float_t x, y, z, t;
     119  Int_t pid, status;
     120  Float_t x, y, z, t, vx, vy;
    106121  Float_t px, py, pz, e;
    107   Double_t dz, dphi;
    108   Int_t poisson, event, i;
    109   Candidate *candidate;
     122  Double_t dz, dphi, dt;
     123  Int_t numberOfEvents, event, numberOfParticles, i;
     124  Candidate *candidate, *vertex;
    110125  DelphesFactory *factory;
    111126
     127  const Double_t c_light = 2.99792458E8;
     128
    112129  fItInputArray->Reset();
     130
     131  // --- Deal with primary vertex first  ------
     132
     133  fFunction->GetRandom2(dz, dt);
     134
     135  dt *= c_light*1.0E3; // necessary in order to make t in mm/c
     136  dz *= 1.0E3; // necessary in order to make z in mm
     137  vx = 0.0;
     138  vy = 0.0;
     139  numberOfParticles = fInputArray->GetEntriesFast();
    113140  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    114141  {
    115     fOutputArray->Add(candidate);
     142    vx += candidate->Position.X();
     143    vy += candidate->Position.Y();
     144    z = candidate->Position.Z();
     145    t = candidate->Position.T();
     146    candidate->Position.SetZ(z + dz);
     147    candidate->Position.SetT(t + dt);
     148    fParticleOutputArray->Add(candidate);
     149  }
     150
     151  if(numberOfParticles > 0)
     152  {
     153    vx /= numberOfParticles;
     154    vy /= numberOfParticles;
    116155  }
    117156
    118157  factory = GetFactory();
    119158
    120   poisson = gRandom->Poisson(fMeanPileUp);
    121 
    122   for(event = 0; event < poisson; ++event)
     159  vertex = factory->NewCandidate();
     160  vertex->Position.SetXYZT(vx, vy, dz, dt);
     161  fVertexOutputArray->Add(vertex);
     162
     163  // --- Then with pile-up vertices  ------
     164
     165  switch(fPileUpDistribution)
     166  {
     167    case 0:
     168      numberOfEvents = gRandom->Poisson(fMeanPileUp);
     169      break;
     170    case 1:
     171      numberOfEvents = gRandom->Integer(2*fMeanPileUp + 1);
     172      break;
     173    default:
     174      numberOfEvents = gRandom->Poisson(fMeanPileUp);
     175      break;
     176  }
     177
     178  for(event = 0; event < numberOfEvents; ++event)
    123179  {
    124180    while(!fPythia->next());
    125181
    126     dz = gRandom->Gaus(0.0, fZVertexSpread);
     182   // --- Pile-up vertex smearing
     183
     184    fFunction->GetRandom2(dz, dt);
     185
     186    dt *= c_light*1.0E3; // necessary in order to make t in mm/c
     187    dz *= 1.0E3; // necessary in order to make z in mm
     188
    127189    dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi());
    128190
    129     for(i = 1; i < fPythia->event.size(); ++i)
     191    vx = 0.0;
     192    vy = 0.0;
     193    numberOfParticles = fPythia->event.size();
     194    for(i = 1; i < numberOfParticles; ++i)
    130195    {
    131196      Pythia8::Particle &particle = fPythia->event[i];
    132197
    133       if(particle.status() != 1 || !particle.isVisible() || particle.pT() <= fPTMin) continue;
     198      status = particle.statusHepMC();
     199
     200      if(status != 1 || !particle.isVisible() || particle.pT() <= fPTMin) continue;
    134201
    135202      pid = particle.id();
     
    152219      candidate->Momentum.RotateZ(dphi);
    153220
    154       candidate->Position.SetXYZT(x, y, z + dz, t);
     221      x -= fInputBeamSpotX;
     222      y -= fInputBeamSpotY;
     223      candidate->Position.SetXYZT(x, y, z + dz, t + dt);
    155224      candidate->Position.RotateZ(dphi);
    156 
    157       fOutputArray->Add(candidate);
     225      candidate->Position += TLorentzVector(fOutputBeamSpotX, fOutputBeamSpotY, 0.0, 0.0);
     226
     227      vx += candidate->Position.X();
     228      vy += candidate->Position.Y();
     229
     230      fParticleOutputArray->Add(candidate);
    158231    }
    159   }
    160 }
    161 
    162 //------------------------------------------------------------------------------
    163 
     232
     233    if(numberOfParticles > 0)
     234    {
     235      vx /= numberOfParticles;
     236      vy /= numberOfParticles;
     237    }
     238
     239    vertex = factory->NewCandidate();
     240    vertex->Position.SetXYZT(vx, vy, dz, dt);
     241    vertex->IsPU = 1;
     242
     243    fVertexOutputArray->Add(vertex);
     244  }
     245}
     246
     247//------------------------------------------------------------------------------
  • modules/PileUpMergerPythia8.h

    rd870fc5 rd77b51d  
    3131
    3232class TObjArray;
     33class DelphesTF2;
    3334
    3435namespace Pythia8
     
    5051private:
    5152
     53  Int_t fPileUpDistribution;
    5254  Double_t fMeanPileUp;
     55
    5356  Double_t fZVertexSpread;
     57  Double_t fTVertexSpread;
     58
     59  Double_t fInputBeamSpotX;
     60  Double_t fInputBeamSpotY;
     61  Double_t fOutputBeamSpotX;
     62  Double_t fOutputBeamSpotY;
     63
    5464  Double_t fPTMin;
     65
     66  DelphesTF2 *fFunction; //!
    5567
    5668  Pythia8::Pythia *fPythia; //!
     
    6072  const TObjArray *fInputArray; //!
    6173
    62   TObjArray *fOutputArray; //!
     74  TObjArray *fParticleOutputArray; //!
     75  TObjArray *fVertexOutputArray; //!
    6376
    6477  ClassDef(PileUpMergerPythia8, 1)
  • modules/SimpleCalorimeter.cc

    rd870fc5 rd77b51d  
    150150  fEnergySignificanceMin = GetDouble("EnergySignificanceMin", 0.0);
    151151
     152  // flag that says if current calo is Ecal of Hcal (will then fill correct values of Eem and Ehad)
     153  fIsEcal = GetBool("IsEcal", false);
     154
    152155  // switch on or off the dithering of the center of calorimeter towers
    153   fDitherTowerCenter = GetBool("DitherTowerCenter", true);
     156  fSmearTowerCenter = GetBool("SmearTowerCenter", true);
    154157
    155158  // read resolution formulas
     
    409412  if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0;
    410413
    411   if(fDitherTowerCenter)
     414  if(fSmearTowerCenter)
    412415  {
    413416    eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
     
    424427  fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time);
    425428  fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
     429
     430  fTower->Eem = (!fIsEcal) ? 0 : energy;
     431  fTower->Ehad = (fIsEcal) ? 0 : energy;
    426432
    427433  fTower->Edges[0] = fTowerEdges[0];
     
    447453    pt = energy / TMath::CosH(eta);
    448454
     455    tower->Eem = (!fIsEcal) ? 0 : energy;
     456    tower->Ehad = (fIsEcal) ? 0 : energy;
     457
    449458    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
    450459    fEFlowTowerOutputArray->Add(tower);
  • modules/SimpleCalorimeter.h

    rd870fc5 rd77b51d  
     1
    12/*
    23 *  Delphes: a framework for fast simulation of a generic collider experiment
     
    7273  Double_t fEnergySignificanceMin;
    7374
    74   Bool_t fDitherTowerCenter;
     75  Bool_t fSmearTowerCenter;
     76
     77  Bool_t fIsEcal; //!
    7578
    7679  TFractionMap fFractionMap; //!
  • modules/TauTagging.cc

    rd870fc5 rd77b51d  
    3333#include "classes/DelphesFactory.h"
    3434#include "classes/DelphesFormula.h"
    35 
    36 #include "ExRootAnalysis/ExRootResult.h"
    37 #include "ExRootAnalysis/ExRootFilter.h"
    38 #include "ExRootAnalysis/ExRootClassifier.h"
    3935
    4036#include "TMath.h"
     
    5349using namespace std;
    5450
    55 //------------------------------------------------------------------------------
    56 
    57 class TauTaggingPartonClassifier : public ExRootClassifier
    58 {
    59 public:
    60 
    61   TauTaggingPartonClassifier(const TObjArray *array);
    62 
    63   Int_t GetCategory(TObject *object);
    64 
    65   Double_t fEtaMax, fPTMin;
    66 
    67   const TObjArray *fParticleInputArray;
    68 };
    6951
    7052//------------------------------------------------------------------------------
     
    7961{
    8062  Candidate *tau = static_cast<Candidate *>(object);
    81   Candidate *daughter = 0;
     63  Candidate *daughter1 = 0;
     64  Candidate *daughter2 = 0;
     65 
    8266  const TLorentzVector &momentum = tau->Momentum;
    83   Int_t pdgCode, i;
     67  Int_t pdgCode, i, j;
    8468
    8569  pdgCode = TMath::Abs(tau->PID);
     
    9074  if(tau->D1 < 0) return -1;
    9175
     76  if(tau->D2 < tau->D1) return -1;
     77
    9278  if(tau->D1 >= fParticleInputArray->GetEntriesFast() ||
    9379     tau->D2 >= fParticleInputArray->GetEntriesFast())
     
    9884  for(i = tau->D1; i <= tau->D2; ++i)
    9985  {
    100     daughter = static_cast<Candidate *>(fParticleInputArray->At(i));
    101     pdgCode = TMath::Abs(daughter->PID);
    102     if(pdgCode == 11 || pdgCode == 13 || pdgCode == 15 || pdgCode == 24) return -1;
     86    daughter1 = static_cast<Candidate *>(fParticleInputArray->At(i));
     87    pdgCode = TMath::Abs(daughter1->PID);
     88    if(pdgCode == 11 || pdgCode == 13 || pdgCode == 15) return -1;
     89    else if(pdgCode == 24)
     90    {
     91     if(daughter1->D1 < 0) return -1;
     92     for(j = daughter1->D1; j <= daughter1->D2; ++j)
     93     {
     94       daughter2 = static_cast<Candidate*>(fParticleInputArray->At(j));
     95       pdgCode = TMath::Abs(daughter2->PID);
     96       if(pdgCode == 11 || pdgCode == 13) return -1;
     97     }
     98       
     99    }
    103100  }
    104101
     
    206203  tauArray = fFilter->GetSubArray(fClassifier, 0);
    207204
    208   if(tauArray == 0) return;
    209 
    210   TIter itTauArray(tauArray);
    211 
    212205  // loop over all input jets
    213206  fItJetInputArray->Reset();
     
    222215
    223216    // loop over all input taus
    224     itTauArray.Reset();
    225     while((tau = static_cast<Candidate *>(itTauArray.Next())))
    226     {
    227       if(tau->D1 < 0) continue;
    228 
    229       if(tau->D1 >= fParticleInputArray->GetEntriesFast() ||
    230          tau->D2 >= fParticleInputArray->GetEntriesFast())
     217    if(tauArray){
     218      TIter itTauArray(tauArray);
     219      while((tau = static_cast<Candidate *>(itTauArray.Next())))
    231220      {
    232         throw runtime_error("tau's daughter index is greater than the ParticleInputArray size");
    233       }
    234 
    235       tauMomentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
    236 
    237       for(i = tau->D1; i <= tau->D2; ++i)
    238       {
    239         daughter = static_cast<Candidate *>(fParticleInputArray->At(i));
    240         if(TMath::Abs(daughter->PID) == 16) continue;
    241         tauMomentum += daughter->Momentum;
    242       }
    243 
    244       if(jetMomentum.DeltaR(tauMomentum) <= fDeltaR)
    245       {
    246         pdgCode = 15;
    247         charge = tau->Charge;
     221        if(tau->D1 < 0) continue;
     222
     223        if(tau->D1 >= fParticleInputArray->GetEntriesFast() ||
     224           tau->D2 >= fParticleInputArray->GetEntriesFast())
     225        {
     226          throw runtime_error("tau's daughter index is greater than the ParticleInputArray size");
     227        }
     228
     229        tauMomentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
     230
     231        for(i = tau->D1; i <= tau->D2; ++i)
     232        {
     233          daughter = static_cast<Candidate *>(fParticleInputArray->At(i));
     234          if(TMath::Abs(daughter->PID) == 16) continue;
     235          tauMomentum += daughter->Momentum;
     236        }
     237
     238        if(jetMomentum.DeltaR(tauMomentum) <= fDeltaR)
     239        {
     240          pdgCode = 15;
     241          charge = tau->Charge;
     242        }
    248243      }
    249244    }
  • modules/TauTagging.h

    rd870fc5 rd77b51d  
    3131
    3232#include "classes/DelphesModule.h"
     33#include "ExRootAnalysis/ExRootResult.h"
     34#include "ExRootAnalysis/ExRootFilter.h"
     35#include "ExRootAnalysis/ExRootClassifier.h"
    3336
    3437#include <map>
     
    7679};
    7780
     81
     82//------------------------------------------------------------------------------
     83
     84class TauTaggingPartonClassifier : public ExRootClassifier
     85{
     86public:
     87
     88  TauTaggingPartonClassifier(const TObjArray *array);
     89
     90  Int_t GetCategory(TObject *object);
     91
     92  Double_t fEtaMax, fPTMin;
     93
     94  const TObjArray *fParticleInputArray;
     95};
     96
     97
    7898#endif
  • modules/TrackPileUpSubtractor.cc

    rd870fc5 rd77b51d  
    7474  fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
    7575
     76  fPTMin = GetDouble("PTMin", 0.);
    7677  // import arrays with output from other modules
    77 
     78   
    7879  ExRootConfParam param = GetParam("InputArray");
    7980  Long_t i, size;
     
    147148      // assume perfect pile-up subtraction for tracks outside fZVertexResolution
    148149     
    149       if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) continue;
    150 
    151       array->Add(candidate);
     150      if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) candidate->IsRecoPU = 1;
     151      else
     152      {
     153         candidate->IsRecoPU = 0;
     154         if( candidate->Momentum.Pt() > fPTMin) array->Add(candidate);
     155      }
    152156    }
    153157  }
  • modules/TrackPileUpSubtractor.h

    rd870fc5 rd77b51d  
    5050  Double_t fZVertexResolution;
    5151
     52  Double_t fPTMin;
     53
    5254  std::map< TIterator *, TObjArray * > fInputMap; //!
    5355
  • modules/TreeWriter.cc

    rd870fc5 rd77b51d  
    291291    entry->ZOuter = position.Z();
    292292    entry->TOuter = position.T()*1.0E-3/c_light;
    293    
     293
    294294    entry->Dxy = candidate->Dxy;
    295295    entry->SDxy = candidate->SDxy ;
     
    297297    entry->Yd = candidate->Yd;
    298298    entry->Zd = candidate->Zd;
    299    
     299
    300300    const TLorentzVector &momentum = candidate->Momentum;
    301301
     
    362362
    363363    entry->T = position.T()*1.0E-3/c_light;
     364    entry->NTimeHits = candidate->NTimeHits;
    364365
    365366    FillParticles(candidate, &entry->Particles);
     
    403404    entry->T = position.T()*1.0E-3/c_light;
    404405
     406    // Isolation variables
     407
     408    entry->IsolationVar = candidate->IsolationVar;
     409    entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ;
     410    entry->SumPtCharged = candidate->SumPtCharged ;
     411    entry->SumPtNeutral = candidate->SumPtNeutral ;
     412    entry->SumPtChargedPU = candidate->SumPtChargedPU ;
     413    entry->SumPt = candidate->SumPt ;
     414
    405415    entry->EhadOverEem = candidate->Eem > 0.0 ? candidate->Ehad/candidate->Eem : 999.9;
    406416
     
    442452    entry->T = position.T()*1.0E-3/c_light;
    443453
     454    // Isolation variables
     455
     456    entry->IsolationVar = candidate->IsolationVar;
     457    entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ;
     458    entry->SumPtCharged = candidate->SumPtCharged ;
     459    entry->SumPtNeutral = candidate->SumPtNeutral ;
     460    entry->SumPtChargedPU = candidate->SumPtChargedPU ;
     461    entry->SumPt = candidate->SumPt ;
     462
     463
    444464    entry->Charge = candidate->Charge;
    445465
     
    469489    const TLorentzVector &momentum = candidate->Momentum;
    470490    const TLorentzVector &position = candidate->Position;
    471 
    472491
    473492    pt = momentum.Pt();
     
    488507    entry->T = position.T()*1.0E-3/c_light;
    489508
     509    // Isolation variables
     510
     511    entry->IsolationVar = candidate->IsolationVar;
     512    entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ;
     513    entry->SumPtCharged = candidate->SumPtCharged ;
     514    entry->SumPtNeutral = candidate->SumPtNeutral ;
     515    entry->SumPtChargedPU = candidate->SumPtChargedPU ;
     516    entry->SumPt = candidate->SumPt ;
     517
    490518    entry->Charge = candidate->Charge;
    491519
     
    504532  Double_t ecalEnergy, hcalEnergy;
    505533  const Double_t c_light = 2.99792458E8;
     534  Int_t i;
    506535
    507536  array->Sort();
     
    532561    entry->Mass = momentum.M();
    533562
     563    entry->Area = candidate->Area;
     564
    534565    entry->DeltaEta = candidate->DeltaEta;
    535566    entry->DeltaPhi = candidate->DeltaPhi;
    536567
     568    entry->Flavor = candidate->Flavor;
     569    entry->FlavorAlgo = candidate->FlavorAlgo;
     570    entry->FlavorPhys = candidate->FlavorPhys;
     571
    537572    entry->BTag = candidate->BTag;
     573
     574    entry->BTagAlgo = candidate->BTagAlgo;
     575    entry->BTagPhys = candidate->BTagPhys;
     576
    538577    entry->TauTag = candidate->TauTag;
    539578
     
    561600    entry->MeanSqDeltaR = candidate->MeanSqDeltaR;
    562601    entry->PTD = candidate->PTD;
    563     entry->FracPt[0] = candidate->FracPt[0];
    564     entry->FracPt[1] = candidate->FracPt[1];
    565     entry->FracPt[2] = candidate->FracPt[2];
    566     entry->FracPt[3] = candidate->FracPt[3];
    567     entry->FracPt[4] = candidate->FracPt[4];
    568    
    569     //--- N-subjettiness variables ----
    570    
    571     entry->Tau1 = candidate->Tau[0];
    572     entry->Tau2 = candidate->Tau[1];
    573     entry->Tau3 = candidate->Tau[2];
    574     entry->Tau4 = candidate->Tau[3];
    575     entry->Tau5 = candidate->Tau[4];
    576    
     602
     603    //--- Sub-structure variables ----
     604
     605    entry->NSubJetsTrimmed = candidate->NSubJetsTrimmed;
     606    entry->NSubJetsPruned = candidate->NSubJetsPruned;
     607    entry->NSubJetsSoftDropped = candidate->NSubJetsSoftDropped;
     608
     609    for(i = 0; i < 5; i++)
     610    {
     611      entry->FracPt[i] = candidate -> FracPt[i];
     612      entry->Tau[i] = candidate -> Tau[i];
     613      entry->TrimmedP4[i] = candidate -> TrimmedP4[i];
     614      entry->PrunedP4[i] = candidate -> PrunedP4[i];
     615      entry->SoftDroppedP4[i] = candidate -> SoftDroppedP4[i];
     616    }
     617
    577618    FillParticles(candidate, &entry->Particles);
    578619  }
  • modules/UniqueObjectFinder.cc

    rd870fc5 rd77b51d  
    7474  TIterator *iterator;
    7575
     76  fInputMap.clear();
     77
    7678  size = param.GetSize();
    7779  for(i = 0; i < size/2; ++i)
     
    8082    iterator = array->MakeIterator();
    8183
    82     fInputMap[iterator] = ExportArray(param[i*2 + 1].GetString());
     84    fInputMap.push_back(make_pair(iterator, ExportArray(param[i*2 + 1].GetString())));
    8385  }
    8486}
     
    8890void UniqueObjectFinder::Finish()
    8991{
    90   map< TIterator *, TObjArray * >::iterator itInputMap;
     92  vector< pair< TIterator *, TObjArray * > >::iterator itInputMap;
    9193  TIterator *iterator;
    9294
     
    104106{
    105107  Candidate *candidate;
    106   map< TIterator *, TObjArray * >::iterator itInputMap;
     108  vector< pair< TIterator *, TObjArray * > >::iterator itInputMap;
    107109  TIterator *iterator;
    108110  TObjArray *array;
     
    128130//------------------------------------------------------------------------------
    129131
    130 Bool_t UniqueObjectFinder::Unique(Candidate *candidate, map< TIterator *, TObjArray * >::iterator itInputMap)
     132Bool_t UniqueObjectFinder::Unique(Candidate *candidate, vector< pair< TIterator *, TObjArray * > >::iterator itInputMap)
    131133{
    132134  Candidate *previousCandidate;
    133   map< TIterator *, TObjArray * >::iterator previousItInputMap;
     135  vector< pair< TIterator *, TObjArray * > >::iterator previousItInputMap;
    134136  TObjArray *array;
    135137
  • modules/UniqueObjectFinder.h

    rd870fc5 rd77b51d  
    3030#include "classes/DelphesModule.h"
    3131
    32 #include <map>
     32#include <vector>
     33#include <utility>
    3334
    3435class TIterator;
     
    4950private:
    5051
    51   Bool_t Unique(Candidate *candidate, std::map< TIterator *, TObjArray * >::iterator itInputMap);
     52  Bool_t Unique(Candidate *candidate, std::vector< std::pair< TIterator *, TObjArray * > >::iterator itInputMap);
    5253
    53   std::map< TIterator *, TObjArray * > fInputMap; //!
     54  std::vector< std::pair< TIterator *, TObjArray * > > fInputMap; //!
    5455
    5556  ClassDef(UniqueObjectFinder, 1)
  • readers/DelphesCMSFWLite.cpp

    rd870fc5 rd77b51d  
    5656#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
    5757#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
     58#include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"
     59#include "SimDataFormats/GeneratorProducts/interface/WeightsInfo.h"
    5860
    5961using namespace std;
     
    6264
    6365void ConvertInput(fwlite::Event &event, Long64_t eventCounter,
    64   ExRootTreeBranch *branchEvent, DelphesFactory *factory,
    65   TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray,
    66   TObjArray *partonOutputArray)
     66  ExRootTreeBranch *branchEvent, ExRootTreeBranch *branchRwgt,
     67  DelphesFactory *factory, TObjArray *allParticleOutputArray,
     68  TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray)
    6769{
    6870  fwlite::Handle< GenEventInfoProduct > handleGenEventInfo;
    6971
     72  fwlite::Handle< LHEEventProduct > handleLHEEvent;
     73
    7074  fwlite::Handle< vector< reco::GenParticle > > handleParticle;
    7175  vector< reco::GenParticle >::const_iterator itParticle;
     
    7579
    7680  handleGenEventInfo.getByLabel(event, "generator");
     81  handleLHEEvent.getByLabel(event, "source");
    7782  handleParticle.getByLabel(event, "genParticles");
    7883
    7984  HepMCEvent *element;
     85  Weight *weight;
    8086  Candidate *candidate;
    8187  TDatabasePDG *pdg;
     
    8692  Double_t px, py, pz, e, mass;
    8793  Double_t x, y, z;
     94
     95  const vector< gen::WeightsInfo > &vectorWeightsInfo = handleLHEEvent->weights();
     96  vector< gen::WeightsInfo >::const_iterator itWeightsInfo;
    8897
    8998  element = static_cast<HepMCEvent *>(branchEvent->NewEntry());
     
    108117  element->ReadTime = 0.0;
    109118  element->ProcTime = 0.0;
     119
     120  for(itWeightsInfo = vectorWeightsInfo.begin(); itWeightsInfo != vectorWeightsInfo.end(); ++itWeightsInfo)
     121  {
     122    weight = static_cast<Weight *>(branchRwgt->NewEntry());
     123    weight->Weight = itWeightsInfo->wgt;
     124  }
    110125
    111126  pdg = TDatabasePDG::Instance();
     
    186201  TStopwatch eventStopWatch;
    187202  ExRootTreeWriter *treeWriter = 0;
    188   ExRootTreeBranch *branchEvent = 0;
     203  ExRootTreeBranch *branchEvent = 0, *branchRwgt = 0;
    189204  ExRootConfReader *confReader = 0;
    190205  Delphes *modularDelphes = 0;
     
    226241
    227242    branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class());
     243    branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class());
    228244
    229245    confReader = new ExRootConfReader;
     
    268284      for(event.toBegin(); !event.atEnd() && !interrupted; ++event)
    269285      {
    270         ConvertInput(event, eventCounter, branchEvent, factory,
     286        ConvertInput(event, eventCounter, branchEvent, branchRwgt, factory,
    271287          allParticleOutputArray, stableParticleOutputArray, partonOutputArray);
    272288        modularDelphes->ProcessTask();
  • readers/DelphesLHEF.cpp

    rd870fc5 rd77b51d  
    6363  TStopwatch readStopWatch, procStopWatch;
    6464  ExRootTreeWriter *treeWriter = 0;
    65   ExRootTreeBranch *branchEvent = 0, *branchRwgt = 0;
     65  ExRootTreeBranch *branchEvent = 0, *branchWeight = 0;
    6666  ExRootConfReader *confReader = 0;
    6767  Delphes *modularDelphes = 0;
     
    103103
    104104    branchEvent = treeWriter->NewBranch("Event", LHEFEvent::Class());
    105     branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class());
     105    branchWeight = treeWriter->NewBranch("Weight", Weight::Class());
    106106
    107107    confReader = new ExRootConfReader;
     
    196196
    197197            reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch);
    198             reader->AnalyzeRwgt(branchRwgt);
     198            reader->AnalyzeWeight(branchWeight);
    199199
    200200            treeWriter->Fill();
  • readers/DelphesPythia8.cpp

    rd870fc5 rd77b51d  
    2020#include <iostream>
    2121#include <sstream>
     22#include <string>
    2223
    2324#include <signal.h>
     
    3839#include "classes/DelphesClasses.h"
    3940#include "classes/DelphesFactory.h"
     41#include "classes/DelphesLHEFReader.h"
    4042
    4143#include "ExRootAnalysis/ExRootTreeWriter.h"
     
    149151  char appName[] = "DelphesPythia8";
    150152  stringstream message;
     153  FILE *inputFile = 0;
    151154  TFile *outputFile = 0;
    152155  TStopwatch readStopWatch, procStopWatch;
    153156  ExRootTreeWriter *treeWriter = 0;
    154157  ExRootTreeBranch *branchEvent = 0;
     158  ExRootTreeBranch *branchEventLHEF = 0, *branchWeightLHEF = 0;
    155159  ExRootConfReader *confReader = 0;
    156160  Delphes *modularDelphes = 0;
    157161  DelphesFactory *factory = 0;
    158162  TObjArray *stableParticleOutputArray = 0, *allParticleOutputArray = 0, *partonOutputArray = 0;
     163  TObjArray *stableParticleOutputArrayLHEF = 0, *allParticleOutputArrayLHEF = 0, *partonOutputArrayLHEF = 0;
     164  DelphesLHEFReader *reader = 0;
    159165  Long64_t eventCounter, errorCounter;
    160166  Long64_t numberOfEvents, timesAllowErrors;
     
    205211    partonOutputArray = modularDelphes->ExportArray("partons");
    206212
    207     modularDelphes->InitTask();
    208 
    209     // Initialize pythia
     213    // Initialize Pythia
    210214    pythia = new Pythia8::Pythia;
    211215
     
    221225    numberOfEvents = pythia->mode("Main:numberOfEvents");
    222226    timesAllowErrors = pythia->mode("Main:timesAllowErrors");
     227
     228    inputFile = fopen(pythia->word("Beams:LHEF").c_str(), "r");
     229    if(inputFile)
     230    {
     231      reader = new DelphesLHEFReader;
     232      reader->SetInputFile(inputFile);
     233
     234      branchEventLHEF = treeWriter->NewBranch("EventLHEF", LHEFEvent::Class());
     235      branchWeightLHEF = treeWriter->NewBranch("WeightLHEF", LHEFWeight::Class());
     236
     237      allParticleOutputArrayLHEF = modularDelphes->ExportArray("allParticlesLHEF");
     238      stableParticleOutputArrayLHEF = modularDelphes->ExportArray("stableParticlesLHEF");
     239      partonOutputArrayLHEF = modularDelphes->ExportArray("partonsLHEF");
     240    }
     241
     242    modularDelphes->InitTask();
    223243
    224244    pythia->init();
     
    234254    for(eventCounter = 0; eventCounter < numberOfEvents && !interrupted; ++eventCounter)
    235255    {
     256      while(reader && reader->ReadBlock(factory, allParticleOutputArrayLHEF,
     257        stableParticleOutputArrayLHEF, partonOutputArrayLHEF) && !reader->EventReady());
     258
    236259      if(!pythia->next())
    237260      {
    238261        // If failure because reached end of file then exit event loop
    239         if (pythia->info.atEndOfFile())
     262        if(pythia->info.atEndOfFile())
    240263        {
    241264          cerr << "Aborted since reached end of Les Houches Event File" << endl;
     
    244267
    245268        // First few failures write off as "acceptable" errors, then quit
    246         if (++errorCounter < timesAllowErrors) continue;
    247         cerr << "Event generation aborted prematurely, owing to error!" << endl;
    248         break;
     269        if(++errorCounter > timesAllowErrors)
     270        {
     271          cerr << "Event generation aborted prematurely, owing to error!" << endl;
     272          break;
     273        }
     274
     275        modularDelphes->Clear();
     276        reader->Clear();
     277        continue;
    249278      }
    250279
     
    258287      procStopWatch.Stop();
    259288
     289      if(reader)
     290      {
     291        reader->AnalyzeEvent(branchEventLHEF, eventCounter, &readStopWatch, &procStopWatch);
     292        reader->AnalyzeWeight(branchWeightLHEF);
     293      }
     294
    260295      treeWriter->Fill();
    261296
    262297      treeWriter->Clear();
    263298      modularDelphes->Clear();
     299      if(reader) reader->Clear();
    264300
    265301      readStopWatch.Start();
     
    277313    cout << "** Exiting..." << endl;
    278314
     315    delete reader;
    279316    delete pythia;
    280317    delete modularDelphes;
Note: See TracChangeset for help on using the changeset viewer.