Fork me on GitHub

Changes in / [d77b51d:d870fc5] in git


Ignore:
Files:
2 added
38 deleted
95 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rd77b51d rd870fc5  
    1 3.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 
    2513.2.0:
    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)
     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)
    4515
    46163.1.2:
    47 - fixed smearing of (z,t) vertex distribution in the PileUpMerger module
     17  fixed smearing of (z,t) vertex distribution in the PileUpMerger module
    4818
    49193.1.1:
    50 - adapted DelphesSTDHEP to the latest version of the STDHEP format introduced in MadGraph5_aMC@NLO 2.1.2
     20  adapted DelphesSTDHEP to the latest version of the STDHEP format introduced in MadGraph5_aMC@NLO 2.1.2
    5121
    52223.1.0:
    5323  added Hector module (fast simulator for the transport of particles in beam lines)
    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)
     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)
    5929
    60303.0.12:
    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)
     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)
    6636
    67373.0.11:
    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
     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
    7646
    77473.0.10:
    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
     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
    9262
    93633.0.9:
    94 - fixed reading of weighted STDHEP events (#181)
    95 - fixed script building Delphes with CMSFWLite (#180)
    96 - added more particles to StatusPidFilter (#179)
     64  fixed reading of weighted STDHEP events (#181)
     65  fixed script building Delphes with CMSFWLite (#180)
     66  added more particles to StatusPidFilter (#179)
    9767
    98683.0.8:
    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
     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
    10373
    104743.0.7:
    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)
     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)
  • Makefile

    rd77b51d rd870fc5  
    2929OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
    3030endif
    31 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsCommon -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon
     31OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
    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
     42#CXXFLAGS += -I$(PYTHIA8)/include
     43#CXXFLAGS += -I$(PYTHIA8)/include/Pythia8
     44#OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl
    4545endif
    4646
     
    257257        classes/DelphesClasses.h \
    258258        classes/DelphesFactory.h \
    259         classes/DelphesLHEFReader.h \
    260259        external/ExRootAnalysis/ExRootTreeWriter.h \
    261260        external/ExRootAnalysis/ExRootTreeBranch.h \
     
    309308        modules/Delphes.h \
    310309        modules/AngularSmearing.h \
    311         modules/PhotonConversions.h \
    312310        modules/ParticlePropagator.h \
    313311        modules/Efficiency.h \
     
    331329        modules/JetPileUpSubtractor.h \
    332330        modules/TrackPileUpSubtractor.h \
    333         modules/TaggingParticlesSkimmer.h \
    334331        modules/PileUpJetID.h \
    335332        modules/ConstituentFilter.h \
     
    339336        modules/Weighter.h \
    340337        modules/Hector.h \
    341         modules/JetFlavorAssociation.h \
    342         modules/JetFakeParticle.h \
    343338        modules/ExampleModule.h
    344339ModulesDict$(PcmSuf): \
     
    358353        modules/FastJetLinkDef.h \
    359354        modules/FastJetFinder.h \
    360         modules/FastJetGridMedianEstimator.h \
    361         modules/RunPUPPI.h
     355        modules/FastJetGridMedianEstimator.h
    362356FastJetDict$(PcmSuf): \
    363357        tmp/modules/FastJetDict$(PcmSuf) \
     
    392386        classes/DelphesFactory.h \
    393387        classes/SortableObject.h
    394 tmp/classes/DelphesCylindricalFormula.$(ObjSuf): \
    395         classes/DelphesCylindricalFormula.$(SrcSuf) \
    396         classes/DelphesCylindricalFormula.h
    397388tmp/classes/DelphesFactory.$(ObjSuf): \
    398389        classes/DelphesFactory.$(SrcSuf) \
     
    543534        classes/DelphesClasses.h \
    544535        classes/DelphesFactory.h \
    545         classes/DelphesFormula.h
     536        classes/DelphesFormula.h \
     537        external/ExRootAnalysis/ExRootResult.h \
     538        external/ExRootAnalysis/ExRootFilter.h \
     539        external/ExRootAnalysis/ExRootClassifier.h
    546540tmp/modules/Calorimeter.$(ObjSuf): \
    547541        modules/Calorimeter.$(SrcSuf) \
     
    657651        external/ExRootAnalysis/ExRootFilter.h \
    658652        external/ExRootAnalysis/ExRootClassifier.h
    659 tmp/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
    668 tmp/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
    677653tmp/modules/JetPileUpSubtractor.$(ObjSuf): \
    678654        modules/JetPileUpSubtractor.$(SrcSuf) \
     
    729705        external/ExRootAnalysis/ExRootFilter.h \
    730706        external/ExRootAnalysis/ExRootClassifier.h
    731 tmp/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
    740707tmp/modules/PileUpJetID.$(ObjSuf): \
    741708        modules/PileUpJetID.$(SrcSuf) \
     
    762729        classes/DelphesClasses.h \
    763730        classes/DelphesFactory.h \
    764         classes/DelphesTF2.h \
     731        classes/DelphesFormula.h \
    765732        classes/DelphesPileUpReader.h \
    766733        external/ExRootAnalysis/ExRootResult.h \
     
    785752        external/ExRootAnalysis/ExRootFilter.h \
    786753        external/ExRootAnalysis/ExRootClassifier.h
    787 tmp/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
    797754tmp/modules/TauTagging.$(ObjSuf): \
    798755        modules/TauTagging.$(SrcSuf) \
     
    800757        classes/DelphesClasses.h \
    801758        classes/DelphesFactory.h \
    802         classes/DelphesFormula.h
     759        classes/DelphesFormula.h \
     760        external/ExRootAnalysis/ExRootResult.h \
     761        external/ExRootAnalysis/ExRootFilter.h \
     762        external/ExRootAnalysis/ExRootClassifier.h
    803763tmp/modules/TimeSmearing.$(ObjSuf): \
    804764        modules/TimeSmearing.$(SrcSuf) \
     
    855815DELPHES_OBJ +=  \
    856816        tmp/classes/DelphesClasses.$(ObjSuf) \
    857         tmp/classes/DelphesCylindricalFormula.$(ObjSuf) \
    858817        tmp/classes/DelphesFactory.$(ObjSuf) \
    859818        tmp/classes/DelphesFormula.$(ObjSuf) \
     
    916875        tmp/modules/ImpactParameterSmearing.$(ObjSuf) \
    917876        tmp/modules/Isolation.$(ObjSuf) \
    918         tmp/modules/JetFakeParticle.$(ObjSuf) \
    919         tmp/modules/JetFlavorAssociation.$(ObjSuf) \
    920877        tmp/modules/JetPileUpSubtractor.$(ObjSuf) \
    921878        tmp/modules/LeptonDressing.$(ObjSuf) \
     
    924881        tmp/modules/ParticlePropagator.$(ObjSuf) \
    925882        tmp/modules/PdgCodeFilter.$(ObjSuf) \
    926         tmp/modules/PhotonConversions.$(ObjSuf) \
    927883        tmp/modules/PileUpJetID.$(ObjSuf) \
    928884        tmp/modules/PileUpMerger.$(ObjSuf) \
    929885        tmp/modules/SimpleCalorimeter.$(ObjSuf) \
    930886        tmp/modules/StatusPidFilter.$(ObjSuf) \
    931         tmp/modules/TaggingParticlesSkimmer.$(ObjSuf) \
    932887        tmp/modules/TauTagging.$(ObjSuf) \
    933888        tmp/modules/TimeSmearing.$(ObjSuf) \
     
    943898endif
    944899
    945 tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf): \
    946         external/PUPPI/puppiCleanContainer.$(SrcSuf) \
    947         external/fastjet/Selector.hh
    948900tmp/external/fastjet/AreaDefinition.$(ObjSuf): \
    949901        external/fastjet/AreaDefinition.$(SrcSuf) \
     
    11191071tmp/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(ObjSuf): \
    11201072        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(SrcSuf)
    1121 tmp/external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(ObjSuf): \
    1122         external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(SrcSuf) \
    1123         external/fastjet/JetDefinition.hh \
    1124         external/fastjet/ClusterSequenceAreaBase.hh
    1125 tmp/external/fastjet/contribs/RecursiveTools/Recluster.$(ObjSuf): \
    1126         external/fastjet/contribs/RecursiveTools/Recluster.$(SrcSuf)
    1127 tmp/external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(ObjSuf): \
    1128         external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(SrcSuf) \
    1129         external/fastjet/JetDefinition.hh \
    1130         external/fastjet/ClusterSequenceAreaBase.hh
    1131 tmp/external/fastjet/contribs/RecursiveTools/SoftDrop.$(ObjSuf): \
    1132         external/fastjet/contribs/RecursiveTools/SoftDrop.$(SrcSuf)
    11331073tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf): \
    11341074        external/fastjet/contribs/SoftKiller/SoftKiller.$(SrcSuf)
     
    12641204        external/fastjet/contribs/Nsubjettiness/Njettiness.hh \
    12651205        external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.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
     1206        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh
    12701207tmp/modules/FastJetGridMedianEstimator.$(ObjSuf): \
    12711208        modules/FastJetGridMedianEstimator.$(SrcSuf) \
     
    12921229        external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \
    12931230        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh
    1294 tmp/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
    13041231FASTJET_OBJ +=  \
    1305         tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf) \
    13061232        tmp/external/fastjet/AreaDefinition.$(ObjSuf) \
    13071233        tmp/external/fastjet/BasicRandom.$(ObjSuf) \
     
    13501276        tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf) \
    13511277        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) \
    13561278        tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf) \
    13571279        tmp/external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(ObjSuf) \
     
    13971319        tmp/external/fastjet/tools/TopTaggerBase.$(ObjSuf) \
    13981320        tmp/modules/FastJetFinder.$(ObjSuf) \
    1399         tmp/modules/FastJetGridMedianEstimator.$(ObjSuf) \
    1400         tmp/modules/RunPUPPI.$(ObjSuf)
     1321        tmp/modules/FastJetGridMedianEstimator.$(ObjSuf)
    14011322
    14021323ifeq ($(HAS_PYTHIA8),true)
     
    14081329        display/Delphes3DGeometry.$(SrcSuf) \
    14091330        display/Delphes3DGeometry.h \
    1410         classes/DelphesClasses.h \
    1411         external/ExRootAnalysis/ExRootConfReader.h
     1331        external/ExRootAnalysis/ExRootConfReader.h \
     1332        classes/DelphesClasses.h
    14121333tmp/display/DelphesBranchElement.$(ObjSuf): \
    14131334        display/DelphesBranchElement.$(SrcSuf) \
     
    14221343tmp/display/DelphesEventDisplay.$(ObjSuf): \
    14231344        display/DelphesEventDisplay.$(SrcSuf) \
     1345        external/ExRootAnalysis/ExRootConfReader.h \
     1346        external/ExRootAnalysis/ExRootTreeReader.h \
    14241347        display/DelphesCaloData.h \
    14251348        display/DelphesBranchElement.h \
    14261349        display/Delphes3DGeometry.h \
    14271350        display/DelphesEventDisplay.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
     1351        classes/DelphesClasses.h
    14351352tmp/display/DelphesHtmlSummary.$(ObjSuf): \
    14361353        display/DelphesHtmlSummary.$(SrcSuf) \
     
    14791396tmp/external/tcl/tclHash.$(ObjSuf): \
    14801397        external/tcl/tclHash.c
     1398tmp/external/tcl/tclHistory.$(ObjSuf): \
     1399        external/tcl/tclHistory.c
    14811400tmp/external/tcl/tclIndexObj.$(ObjSuf): \
    14821401        external/tcl/tclIndexObj.c
     
    14911410tmp/external/tcl/tclParse.$(ObjSuf): \
    14921411        external/tcl/tclParse.c
     1412tmp/external/tcl/tclPosixStr.$(ObjSuf): \
     1413        external/tcl/tclPosixStr.c
    14931414tmp/external/tcl/tclPreserve.$(ObjSuf): \
    14941415        external/tcl/tclPreserve.c
     
    15171438        tmp/external/tcl/tclGet.$(ObjSuf) \
    15181439        tmp/external/tcl/tclHash.$(ObjSuf) \
     1440        tmp/external/tcl/tclHistory.$(ObjSuf) \
    15191441        tmp/external/tcl/tclIndexObj.$(ObjSuf) \
    15201442        tmp/external/tcl/tclLink.$(ObjSuf) \
     
    15231445        tmp/external/tcl/tclObj.$(ObjSuf) \
    15241446        tmp/external/tcl/tclParse.$(ObjSuf) \
     1447        tmp/external/tcl/tclPosixStr.$(ObjSuf) \
    15251448        tmp/external/tcl/tclPreserve.$(ObjSuf) \
    15261449        tmp/external/tcl/tclProc.$(ObjSuf) \
     
    16151538        @touch $@
    16161539
     1540external/fastjet/Selector.hh: \
     1541        external/fastjet/PseudoJet.hh \
     1542        external/fastjet/RangeDefinition.hh
     1543        @touch $@
     1544
    16171545external/fastjet/internal/Dnn2piCylinder.hh: \
    16181546        external/fastjet/internal/DynamicNearestNeighbours.hh \
    16191547        external/fastjet/internal/DnnPlane.hh \
    16201548        external/fastjet/internal/numconsts.hh
    1621         @touch $@
    1622 
    1623 external/fastjet/Selector.hh: \
    1624         external/fastjet/PseudoJet.hh \
    1625         external/fastjet/RangeDefinition.hh
    16261549        @touch $@
    16271550
     
    16791602        @touch $@
    16801603
    1681 modules/JetFakeParticle.h: \
    1682         classes/DelphesModule.h
    1683         @touch $@
    1684 
    16851604external/fastjet/ClusterSequence1GhostPassiveArea.hh: \
    16861605        external/fastjet/PseudoJet.hh \
     
    17151634        external/fastjet/internal/numconsts.hh \
    17161635        external/fastjet/Error.hh
    1717         @touch $@
    1718 
    1719 modules/RunPUPPI.h: \
    1720         classes/DelphesModule.h
    17211636        @touch $@
    17221637
     
    17571672        @touch $@
    17581673
     1674display/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
    17591682modules/TauTagging.h: \
    1760         classes/DelphesModule.h \
    1761         external/ExRootAnalysis/ExRootResult.h \
    1762         external/ExRootAnalysis/ExRootFilter.h \
    1763         external/ExRootAnalysis/ExRootClassifier.h
     1683        classes/DelphesModule.h
    17641684        @touch $@
    17651685
     
    17991719        @touch $@
    18001720
    1801 modules/JetFlavorAssociation.h: \
    1802         classes/DelphesModule.h \
    1803         classes/DelphesClasses.h
    1804         @touch $@
    1805 
    18061721modules/ParticlePropagator.h: \
    18071722        classes/DelphesModule.h
     
    18321747        @touch $@
    18331748
    1834 modules/PhotonConversions.h: \
    1835         classes/DelphesModule.h
    1836         @touch $@
    1837 
    18381749external/fastjet/ClusterSequenceVoronoiArea.hh: \
    18391750        external/fastjet/PseudoJet.hh \
     
    18421753        @touch $@
    18431754
    1844 external/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 
    18521755modules/BTagging.h: \
    18531756        classes/DelphesModule.h
     
    18721775
    18731776modules/Weighter.h: \
    1874         classes/DelphesModule.h
    1875         @touch $@
    1876 
    1877 modules/TaggingParticlesSkimmer.h: \
    18781777        classes/DelphesModule.h
    18791778        @touch $@
     
    20641963        @echo ">> Building $(DISTTAR)"
    20651964        @mkdir -p $(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)
     1965        @cp -a CHANGELOG COPYING CREDITS README VERSION Makefile configure cards classes converters display doc examples external modules python readers $(DISTDIR)
    20671966        @find $(DISTDIR) -depth -name .\* -exec rm -rf {} \;
    20681967        @tar -czf $(DISTTAR) $(DISTDIR)
  • README

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

    rd77b51d rd870fc5  
    22==============
    33
    4 The card "delphes_card_LHCb.tcl" contains a preliminary parametrization of the LHCb detector.
     4The card "delphes_card_prelLHCb.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 misidentification rates
     26This module is a recent addition in order to map particle misindentification rates
    2727and reconstruction efficiencies.
    2828
     
    46461) Compile:
    4747
    48   make
     48   make
    4949
    50502) Simulate p p -> b b~ events
    5151
    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
     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
    5556
    5657
    5758For more details, please visit:
    5859
    59   https://cp3.irmp.ucl.ac.be/projects/delphes
     60https://cp3.irmp.ucl.ac.be/projects/delphes
    6061
    6162
  • cards/delphes_card_ATLAS.tcl

    rd77b51d rd870fc5  
    3434
    3535  JetEnergyScale
    36  
    37   JetFlavorAssociation
    3836
    3937  BTagging
     
    7977
    8078  # tracking efficiency formula for charged hadrons
    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) +
     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) + \
    8684                         (abs(eta) > 2.5)                                                  * (0.00)}
    8785}
     
    9896
    9997  # tracking efficiency formula for electrons
    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) +
     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) + \
    107105                         (abs(eta) > 2.5)                                                  * (0.00)}
    108106}
     
    119117
    120118  # tracking efficiency formula for muons
    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) +
     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) + \
    126124                         (abs(eta) > 2.5)                                                  * (0.00)}
    127125}
     
    138136
    139137  # resolution formula for charged hadrons
    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) +
     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) + \
    147145                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
    148146}
     
    158156  # set ResolutionFormula {resolution formula as a function of eta and energy}
    159157
    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) +
     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) + \
    163161                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    164162
     
    176174
    177175  # resolution formula for muons
    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) +
     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) + \
    185183                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.10)}
    186184}
     
    209207  set PhotonOutputArray photons
    210208
     209  set ECalEnergyMin 0.50
     210  set HCalEnergyMin 1.00
     211
     212  set ECalEnergySignificanceMin 1.0
     213  set HCalEnergySignificanceMin 1.0
     214 
    211215  set EFlowTrackOutputArray eflowTracks
    212216  set EFlowPhotonOutputArray eflowPhotons
    213217  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
    222218
    223219  set pi [expr {acos(-1)}]
     
    269265  # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    270266  # http://www.physics.utoronto.ca/~krieger/procs/ComoProceedings.pdf
    271   set ECalResolutionFormula {                  (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) +
     267  set ECalResolutionFormula {                  (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + \
    272268                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)}
    273269
     
    275271  # http://arxiv.org/pdf/hep-ex/0004009v1
    276272  # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    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) +
     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) + \
    279275                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
    280276}
     
    297293
    298294module Efficiency PhotonEfficiency {
    299   set InputArray Calorimeter/eflowPhotons
     295  set InputArray Calorimeter/photons
    300296  set OutputArray photons
    301297
     
    303299
    304300  # efficiency formula for photons
    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) +
     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) + \
    308304                         (abs(eta) > 2.5)                                   * (0.00)}
    309305}
     
    337333
    338334  # efficiency formula for electrons
    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) +
     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) + \
    342338                         (abs(eta) > 2.5)                                   * (0.00)}
    343339}
     
    371367
    372368  # efficiency formula for muons
    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) +
     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) + \
    376372                         (abs(eta) > 2.7)                                   * (0.00)}
    377373}
     
    423419
    424420module PdgCodeFilter NeutrinoFilter {
    425 
     421 
    426422  set InputArray Delphes/stableParticles
    427423  set OutputArray filteredParticles
    428424
    429425  set PTMin 0.0
    430 
     426 
    431427  add PdgCode {12}
    432428  add PdgCode {14}
     
    479475  set OutputArray jets
    480476
    481   # scale formula for jets
     477  # scale formula for jets 
    482478  set ScaleFormula {  sqrt( (3.0 - 0.2*(abs(eta)))^2 / pt + 1.0 )  }
    483 }
    484 
    485 ########################
    486 # Jet Flavor Association
    487 ########################
    488 
    489 module 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 
    500479}
    501480
     
    505484
    506485module BTagging BTagging {
     486  set PartonInputArray Delphes/partons
    507487  set JetInputArray JetEnergyScale/jets
    508488
    509489  set BitNumber 0
     490
     491  set DeltaR 0.5
     492
     493  set PartonPTMin 1.0
     494
     495  set PartonEtaMax 2.5
    510496
    511497  # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
     
    517503
    518504  # efficiency formula for c-jets (misidentification rate)
    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)) +
     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)) + \
    522508                              (abs(eta) > 2.5)                                  * (0.000)}
    523509
    524510  # efficiency formula for b-jets
    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)) +
     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)) + \
    528514                              (abs(eta) > 2.5)                                  * (0.000)}
    529515}
    530 
    531 #############
    532 # tau-tagging
    533 #############
    534516
    535517module TauTagging TauTagging {
  • cards/delphes_card_ATLAS_PileUp.tcl

    rd77b51d rd870fc5  
    2222  EFlowMergerAllTracks
    2323  EFlowMerger
    24 
     24 
    2525  NeutrinoFilter
    2626  GenJetFinder
     
    4242
    4343  MissingET
    44  
    45   JetFlavorAssociation
    4644
    4745  BTagging
     
    8179  set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))}
    8280
    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) +
     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) + \
    8684  #                               (abs(t) >  1.0e-09) * (abs(z) > 0.15)  * (0.00)}
    8785
     
    121119
    122120  # tracking efficiency formula for charged hadrons
    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) +
     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) + \
    128126                         (abs(eta) > 2.5)                                                  * (0.00)}
    129127}
     
    140138
    141139  # tracking efficiency formula for electrons
    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) +
     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) + \
    149147                         (abs(eta) > 2.5)                                                  * (0.00)}
    150148}
     
    161159
    162160  # tracking efficiency formula for muons
    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) +
     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) + \
    168166                         (abs(eta) > 2.5)                                                  * (0.00)}
    169167}
     
    180178
    181179  # resolution formula for charged hadrons
    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) +
     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) + \
    189187                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
    190188}
     
    200198  # set ResolutionFormula {resolution formula as a function of eta and energy}
    201199
    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) +
     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) + \
    205203                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    206204
     
    218216
    219217  # resolution formula for muons
    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) +
     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) + \
    227225                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2)                * (0.10)}
    228226}
     
    251249  set PhotonOutputArray photons
    252250
     251  set ECalEnergyMin 0.50
     252  set HCalEnergyMin 1.00
     253
     254  set ECalEnergySignificanceMin 1.0
     255  set HCalEnergySignificanceMin 1.0
     256
    253257  set EFlowTrackOutputArray eflowTracks
    254258  set EFlowPhotonOutputArray eflowPhotons
    255259  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
    264260
    265261  set pi [expr {acos(-1)}]
     
    311307  # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    312308  # http://www.physics.utoronto.ca/~krieger/procs/ComoProceedings.pdf
    313   set ECalResolutionFormula {                  (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) +
     309  set ECalResolutionFormula {                  (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + \
    314310                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)}
    315311
     
    317313  # http://arxiv.org/pdf/hep-ex/0004009v1
    318314  # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf
    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) +
     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) + \
    321317                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
    322318}
     
    378374
    379375module FastJetGridMedianEstimator Rho {
    380 
     376 
    381377  set InputArray Calorimeter/towers
    382378  set RhoOutputArray rho
    383379
    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
     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
    393384
    394385}
     
    400391
    401392module PdgCodeFilter NeutrinoFilter {
    402 
     393 
    403394  set InputArray Delphes/stableParticles
    404395  set OutputArray filteredParticles
    405396
    406397  set PTMin 0.0
    407 
     398 
    408399  add PdgCode {12}
    409400  add PdgCode {14}
     
    480471
    481472module Efficiency PhotonEfficiency {
    482   set InputArray Calorimeter/eflowPhotons
     473  set InputArray Calorimeter/photons
    483474  set OutputArray photons
    484475
     
    486477
    487478  # efficiency formula for photons
    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) +
     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) + \
    491482                         (abs(eta) > 2.5)                                   * (0.00)}
    492483}
     
    521512
    522513  # efficiency formula for electrons
    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) +
     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) + \
    526517                         (abs(eta) > 2.5)                                   * (0.00)}
    527518}
     
    556547
    557548  # efficiency formula for muons
    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) +
     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) + \
    561552                         (abs(eta) > 2.7)                                   * (0.00)}
    562553}
     
    604595}
    605596
    606 ########################
    607 # Jet Flavor Association
    608 ########################
    609 
    610 module 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 
    623597###########
    624598# b-tagging
     
    626600
    627601module BTagging BTagging {
     602  set PartonInputArray Delphes/partons
    628603  set JetInputArray JetEnergyScale/jets
    629604
    630605  set BitNumber 0
     606
     607  set DeltaR 0.5
     608
     609  set PartonPTMin 1.0
     610
     611  set PartonEtaMax 2.5
    631612
    632613  # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
     
    638619
    639620  # efficiency formula for c-jets (misidentification rate)
    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)) +
     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)) + \
    643624                              (abs(eta) > 2.5)                                  * (0.000)}
    644625
    645626  # efficiency formula for b-jets
    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)) +
     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)) + \
    649630                              (abs(eta) > 2.5)                                  * (0.000)}
    650631}
    651 
    652 #############
    653 # tau-tagging
    654 #############
    655632
    656633module TauTagging TauTagging {
     
    716693
    717694}
     695
     696
     697
  • cards/delphes_card_CMS.tcl

    rd77b51d rd870fc5  
    3434
    3535  JetEnergyScale
    36 
    37   JetFlavorAssociation
    3836
    3937  BTagging
     
    7977
    8078  # tracking efficiency formula for charged hadrons
    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) +
     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) + \
    8684                         (abs(eta) > 2.5)                                                  * (0.00)}
    8785}
     
    9896
    9997  # tracking efficiency formula for electrons
    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) +
     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) + \
    107105                         (abs(eta) > 2.5)                                                  * (0.00)}
    108106}
     
    119117
    120118  # tracking efficiency formula for muons
    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) +
     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) + \
    126124                         (abs(eta) > 2.5)                                                  * (0.00)}
    127125}
     
    138136
    139137  # resolution formula for charged hadrons
    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) +
     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) + \
    147145                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
    148146}
     
    159157
    160158  # resolution formula for electrons
    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) +
     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) + \
    164162                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    165163
     
    177175
    178176  # resolution formula for muons
    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) +
     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) + \
    190188                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4)}
    191189}
     
    214212  set PhotonOutputArray photons
    215213
     214  set ECalEnergyMin 0.5
     215  set HCalEnergyMin 1.0
     216
     217  set ECalEnergySignificanceMin 1.0
     218  set HCalEnergySignificanceMin 1.0
     219   
    216220  set EFlowTrackOutputArray eflowTracks
    217221  set EFlowPhotonOutputArray eflowPhotons
    218222  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
    227223
    228224  set pi [expr {acos(-1)}]
     
    280276
    281277  # set ECalResolutionFormula {resolution formula as a function of eta and energy}
    282   set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  +
     278  set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  + \
    283279                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    284280
    285281  # set HCalResolutionFormula {resolution formula as a function of eta and energy}
    286   set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +
     282  set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \
    287283                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
    288284}
     
    311307
    312308  # efficiency formula for photons
    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) +
     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) + \
    316312                         (abs(eta) > 2.5)                                   * (0.00)}
    317313}
     
    345341
    346342  # efficiency formula for electrons
    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) +
     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) + \
    350346                         (abs(eta) > 2.5)                                   * (0.00)}
    351347}
     
    379375
    380376  # efficiency formula for muons
    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)) +
     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)) + \
    386382                         (abs(eta) > 2.4)                                                 * (0.00)}
    387383}
     
    433429
    434430module PdgCodeFilter NeutrinoFilter {
    435 
     431 
    436432  set InputArray Delphes/stableParticles
    437433  set OutputArray filteredParticles
    438434
    439435  set PTMin 0.0
    440 
     436 
    441437  add PdgCode {12}
    442438  add PdgCode {14}
     
    466462
    467463
     464
     465
    468466############
    469467# Jet finder
     
    495493}
    496494
    497 ########################
    498 # Jet Flavor Association
    499 ########################
    500 
    501 module 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 
    514495###########
    515496# b-tagging
     
    517498
    518499module BTagging BTagging {
     500  set PartonInputArray Delphes/partons
    519501  set JetInputArray JetEnergyScale/jets
    520502
    521503  set BitNumber 0
     504
     505  set DeltaR 0.5
     506
     507  set PartonPTMin 1.0
     508
     509  set PartonEtaMax 2.5
    522510
    523511  # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
     
    530518
    531519  # efficiency formula for c-jets (misidentification rate)
    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)) +
     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)) + \
    535523                              (abs(eta) > 2.5)                                  * (0.000)}
    536524
    537525  # efficiency formula for b-jets
    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)) +
     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)) + \
    541529                              (abs(eta) > 2.5)                                  * (0.000)}
    542530}
    543 
    544 #############
    545 # tau-tagging
    546 #############
    547531
    548532module TauTagging TauTagging {
     
    605589  add Branch ScalarHT/energy ScalarHT ScalarHT
    606590}
     591
  • cards/delphes_card_CMS_NoFastJet.tcl

    rd77b51d rd870fc5  
    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   
    188194  set EFlowTrackOutputArray eflowTracks
    189195  set EFlowPhotonOutputArray eflowPhotons
    190196  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
    199197
    200198  set pi [expr {acos(-1)}]
     
    252250
    253251  # set ECalResolutionFormula {resolution formula as a function of eta and energy}
    254   set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  +
     252  set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  + \
    255253                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    256254
    257255  # set HCalResolutionFormula {resolution formula as a function of eta and energy}
    258   set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +
     256  set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \
    259257                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
    260258}
     
    271269  set OutputArray eflow
    272270}
     271
     272
  • cards/delphes_card_CMS_PileUp.tcl

    rd77b51d rd870fc5  
    2222  EFlowMergerAllTracks
    2323  EFlowMerger
    24 
     24 
    2525  NeutrinoFilter
    2626  GenJetFinder
     
    4343
    4444  MissingET
    45  
    46   JetFlavorAssociation
    4745
    4846  BTagging
     
    8280  set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))}
    8381
    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) +
     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) + \
    8785  #                               (abs(t) >  1.0e-09) * (abs(z) > 0.15)  * (0.00)}
    8886
     
    122120
    123121  # tracking efficiency formula for charged hadrons
    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) +
     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) + \
    129127                         (abs(eta) > 2.5)                                                  * (0.00)}
    130128}
     
    141139
    142140  # tracking efficiency formula for electrons
    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) +
     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) + \
    150148                         (abs(eta) > 2.5)                                                  * (0.00)}
    151149}
     
    162160
    163161  # tracking efficiency formula for muons
    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) +
     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) + \
    169167                         (abs(eta) > 2.5)                                                  * (0.00)}
    170168}
     
    181179
    182180  # resolution formula for charged hadrons
    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) +
     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) + \
    190188                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05)}
    191189}
     
    202200
    203201  # resolution formula for electrons
    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) +
     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) + \
    207205                         (abs(eta) > 3.0 && abs(eta) <= 5.0)                                       * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    208206
     
    220218
    221219  # resolution formula for muons
    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) +
     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) + \
    233231                         (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2)                * (0.05 + pt*1.e-4)}
    234232}
     
    257255  set PhotonOutputArray photons
    258256
     257  set ECalEnergyMin 0.5
     258  set HCalEnergyMin 1.0
     259
     260  set ECalEnergySignificanceMin 1.0
     261  set HCalEnergySignificanceMin 1.0
     262
    259263  set EFlowTrackOutputArray eflowTracks
    260264  set EFlowPhotonOutputArray eflowPhotons
    261265  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
    270266
    271267  set pi [expr {acos(-1)}]
     
    323319
    324320  # set ECalResolutionFormula {resolution formula as a function of eta and energy}
    325   set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) +
     321  set ECalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2)  + \
    326322                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    327323
    328324  # set HCalResolutionFormula {resolution formula as a function of eta and energy}
    329   set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +
     325  set HCalResolutionFormula {                  (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \
    330326                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
    331327}
     
    390386
    391387module FastJetGridMedianEstimator Rho {
    392 
     388 
    393389  set InputArray EFlowMerger/eflow
    394390  set RhoOutputArray rho
    395391
    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
     392  # etamin etamax gridsize_eta gridsize_phi
     393 
     394  add GridRange 0.0 2.5 1.0 1.0
    404395  add GridRange 2.5 5.0 1.0 1.0
    405396
     
    411402
    412403module PdgCodeFilter NeutrinoFilter {
    413 
     404 
    414405  set InputArray Delphes/stableParticles
    415406  set OutputArray filteredParticles
    416407
    417408  set PTMin 0.0
    418 
     409 
    419410  add PdgCode {12}
    420411  add PdgCode {14}
     
    522513
    523514  # efficiency formula for photons
    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) +
     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) + \
    527518                         (abs(eta) > 2.5)                                   * (0.00)}
    528519}
     
    558549
    559550  # efficiency formula for electrons
    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) +
     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) + \
    563554                         (abs(eta) > 2.5)                                   * (0.00)}
    564555}
     
    593584
    594585  # efficiency formula for muons
    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)) +
     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)) + \
    600591                         (abs(eta) > 2.4)                                                 * (0.00)}
    601592}
     
    644635}
    645636
    646 ########################
    647 # Jet Flavor Association
    648 ########################
    649 
    650 module 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 
    663637###########
    664638# b-tagging
     
    666640
    667641module BTagging BTagging {
     642  set PartonInputArray Delphes/partons
    668643  set JetInputArray JetEnergyScale/jets
    669644
    670645  set BitNumber 0
     646
     647  set DeltaR 0.5
     648
     649  set PartonPTMin 1.0
     650
     651  set PartonEtaMax 2.5
    671652
    672653  # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
     
    679660
    680661  # efficiency formula for c-jets (misidentification rate)
    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)) +
     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)) + \
    684665                              (abs(eta) > 2.5)                                  * (0.000)}
    685666
    686667  # efficiency formula for b-jets
    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)) +
     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)) + \
    690671                              (abs(eta) > 2.5)                                  * (0.000)}
    691672}
    692 
    693 #############
    694 # tau-tagging
    695 #############
    696673
    697674module TauTagging TauTagging {
     
    756733  add Branch PileUpMerger/vertices Vertex Vertex
    757734}
     735
  • cards/delphes_card_FCC_basic.tcl

    rd77b51d rd870fc5  
    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 
    228   set IsEcal true
    229  
     227 
    230228  set EnergyMin 0.5
    231229  set EnergySignificanceMin 1.0
    232 
    233   set SmearTowerCenter true
    234 
     230 
    235231  set pi [expr {acos(-1)}]
    236232
     
    238234  # each list starts with the lower edge of the first tower
    239235  # the list ends with the higher edged of the last tower
    240 
     236   
    241237  # 0.5 degree towers
    242238  set PhiBins {}
     
    250246    add EtaPhiBins $eta $PhiBins
    251247  }
    252 
     248 
    253249  # default energy fractions {abs(PDG code)} {fraction of energy deposited in ECAL}
    254 
     250 
    255251  add EnergyFraction {0} {0.0}
    256252  # energy fractions for e, gamma and pi0
     
    273269
    274270  # set ECalResolutionFormula {resolution formula as a function of eta and energy}
    275 
     271 
    276272  # This is the CMS ECAL resolution, extended up eta = 6.0
    277   set ResolutionFormula { (abs(eta) <= 3.0)                   * sqrt(energy^2*0.003^2 + energy*0.029^2 + 0.125^2)  +
     273  set ResolutionFormula { (abs(eta) <= 3.0)                   * sqrt(energy^2*0.003^2 + energy*0.029^2 + 0.125^2)  + \
    278274                          (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)}
    279275
    280 
     276 
    281277}
    282278
     
    291287  set TowerOutputArray hcalTowers
    292288  set EFlowTowerOutputArray eflowNeutralHadrons
    293 
    294   set IsEcal false
    295  
     289 
    296290  set EnergyMin 1.0
    297291  set EnergySignificanceMin 1.0
    298 
    299   set SmearTowerCenter true
    300 
     292 
    301293  set pi [expr {acos(-1)}]
    302294
     
    304296  # each list starts with the lower edge of the first tower
    305297  # the list ends with the higher edged of the last tower
    306 
    307 
     298 
     299 
    308300  # 5 degree towers
    309301  set PhiBins {}
     
    317309    add EtaPhiBins $eta $PhiBins
    318310  }
    319 
    320 
     311 
     312   
    321313  # default energy fractions {abs(PDG code)} {Fecal Fhcal}
    322314  add EnergyFraction {0} {1.0}
     
    340332
    341333  # set HCalResolutionFormula {resolution formula as a function of eta and energy}
    342 
     334 
    343335  # This is the ATLAS HCAL resolution, extended up eta = 6.0
    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) +
     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) + \
    346338                             (abs(eta) > 3.2 && abs(eta) <= 6.0) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
    347339
     
    381373  set MomentumOutputArray momentum
    382374}
    383 
     375                   
    384376
    385377##################
     
    398390
    399391module PdgCodeFilter NeutrinoFilter {
    400 
     392 
    401393  set InputArray Delphes/stableParticles
    402394  set OutputArray filteredParticles
    403395
    404396  set PTMin 0.0
    405 
     397 
    406398  add PdgCode {12}
    407399  add PdgCode {14}
     
    435427
    436428module FastJetFinder FastJetFinder {
    437 #  set InputArray TowerMerger/towers
     429#  set InputArray Calorimeter/towers
    438430  set InputArray EFlowMerger/eflow
    439431
     
    471463  # maximum distance between jet and track
    472464  set DeltaR 0.3
    473 
    474   # minimum pt of tracks
     465 
     466  # minimum pt of tracks 
    475467  set TrackPTMin 1.0
    476 
     468 
    477469  # minimum transverse impact parameter (in mm)
    478470  set TrackIPMax 2.0
    479 
     471 
    480472  # minimum ip significance for the track to be counted
    481473  set SigMin 6.5
    482 
     474 
    483475  # minimum number of tracks (high efficiency n=2, high purity n=3)
    484476  set Ntracks 3
     
    518510  add Branch Delphes/allParticles Particle GenParticle
    519511  add Branch GenJetFinder/jets GenJet Jet
    520 
     512 
    521513  add Branch ChargedHadronMomentumSmearing/chargedHadrons ChargedHadron Track
    522514  add Branch HCal/eflowNeutralHadrons NeutralHadron Tower
     
    529521  add Branch ScalarHT/energy ScalarHT ScalarHT
    530522}
     523 
  • cards/delphes_card_LHCb.tcl

    rd77b51d rd870fc5  
    99set ExecutionPath {
    1010 
    11   PhotonConversions
    1211  ParticlePropagator
    13 
     12 
    1413  ChargedHadronMomentumSmearing
    1514  ElectronEnergySmearing
     
    1817  TrackMerger
    1918  ImpactParameterSmearing
    20 
     19 
    2120  IdentificationMap
    22 
     21 
    2322  ECal
    2423  HCal
    2524
    2625  TreeWriter
    27 }
    28 
    29 
    30 
    31 #####################
    32 # Photon Conversions
    33 #####################
    34 
    35 module 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 
    6426}
    6527
     
    7133
    7234module ParticlePropagator ParticlePropagator {
    73   set InputArray PhotonConversions/stableParticles
     35  set InputArray Delphes/stableParticles
    7436
    7537  set OutputArray stableParticles
     
    7941
    8042  # radius of the magnetic field coverage, in m
    81 
     43 
    8244  set Radius 3.31
    83 
    84 
     45 
     46 
    8547  # half-length of the magnetic field coverage, in m
    8648  set HalfLength 12.0
     
    9153  # Need to veto anything with theta > 0.269 rad  -> eta = 2
    9254  #                            theta < 0.0135 rad -> eta = 5
    93 
    94   # tracker and calos are at approx 0.269 rad, R = 12*tan(0.269)
    95 
    96 }
    97 
    98 
     55 
     56  # tracker and calos are at approx 0.269 rad, R = 12*tan(0.269) 
     57
     58}
     59
     60 
    9961########################################
    10062# Momentum resolution for charged tracks
     
    12284
    12385  # resolution formula for electrons
    124   set ResolutionFormula { (eta > 2.0  && eta <= 5.0) * (energy > 0.1   && energy <= 8.0) * (energy*0.05) +
     86  set ResolutionFormula { (eta > 2.0  && eta <= 5.0) * (energy > 0.1   && energy <= 8.0) * (energy*0.05) + \
    12587                          (eta > 2.0  && eta <= 5.0) * (energy > 8.0)                    *  sqrt(energy^2*0.015^2 + energy*0.10^2)}
    12688  }
     
    177139  set InputArray ImpactParameterSmearing/tracks
    178140  set OutputArray tracks
    179 
     141 
    180142  # {PID in} {PID out} {formula}
    181143  # make sure "PID in" and "PID out" have the same charge (e.g {-13} {211} or {-321} {211})
    182144  # {211} {-13} is equivalent to {-211} {13} (and needs to be written once only...)
    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) +
     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) + \
    194156                                           (eta > 5.0)                                   * (0.00)}
    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))) +
     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))) + \
    199161                                           (eta > 5.0)                                  * (0.00)}
    200162
    201 
     163 
    202164 # --- kaons ---
    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) +
     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) + \
    208170                                           (eta > 5.0)                                   * (0.00)}
    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))) +
     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))) + \
    213175                                           (eta > 5.0)                                  * (0.00)}
    214176
    215177
    216178 # --- protons ---
    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) +
     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) + \
    222184                                           (eta > 5.0)                                   * (0.00)}
    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) +
     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) + \
    227189                                           (eta > 5.0)                                  * (0.00)}
    228190
     
    233195
    234196
    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) +
     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) + \
    238200                                           (eta > 5.0)                                 * (0.00)}
    239201
    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 
     202 
    251203 # efficiency for other charged particles (should be always {0} {0} {formula})
    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) +
     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) + \
    256208                                           (eta > 5.0)                                 * (0.00)}
    257209
     
    271223  set TowerOutputArray ecalTowers
    272224  set EFlowTowerOutputArray eflowPhotons
    273 
    274   set IsEcal true
    275 
    276   set EnergyMin 0.0
    277   set EnergySignificanceMin 0.0
    278 
    279   set SmearTowerCenter true
    280 
     225 
    281226  set pi [expr {acos(-1)}]
    282227
     
    296241    add EtaPhiBins $eta $PhiBins
    297242  }
    298 
     243 
    299244    # 1.25 degree towers
    300245  set PhiBins {}
     
    340285  add EnergyFraction {3122} {0.3}
    341286
    342   set ResolutionFormula {(eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)}
     287   set ResolutionFormula {(eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)}
    343288}
    344289
     
    353298  set TowerOutputArray hcalTowers
    354299  set EFlowTowerOutputArray eflowNeutralHadrons
    355 
    356   set IsEcal false
    357 
    358   set EnergyMin 0.0
    359   set EnergySignificanceMin 0.0
    360 
    361   set SmearTowerCenter true
    362 
     300 
    363301  set pi [expr {acos(-1)}]
    364302
     
    392330
    393331
    394 
     332   
    395333  # default energy fractions {abs(PDG code)} {Fecal Fhcal}
    396334  add EnergyFraction {0} {1.0}
     
    414352
    415353  set ResolutionFormula { (eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.05^2 + energy*0.80^2)}
    416 }
     354  }
    417355
    418356
     
    422360
    423361# tracks, towers and eflow objects are not stored by default in the output.
    424 # if needed (for jet constituent or other studies), uncomment the relevant
    425 # "add Branch ..." lines.
     362# if needed (for jet constituent or other studies), uncomment the relevant 
     363# "add Branch ..." lines. 
    426364
    427365module TreeWriter TreeWriter {
    428366# add Branch InputArray BranchName BranchClass
    429 
     367 
    430368  add Branch Delphes/allParticles Particle GenParticle
    431369
     
    433371  add Branch HCal/eflowNeutralHadrons NeutralHadron Tower
    434372  add Branch ECal/eflowPhotons Photon Photon
    435 
    436 }
    437 
     373 
     374}
     375
  • classes/ClassesLinkDef.h

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

    rd77b51d rd870fc5  
    4545//------------------------------------------------------------------------------
    4646
    47 TLorentzVector GenParticle::P4() const
     47TLorentzVector GenParticle::P4()
    4848{
    4949  TLorentzVector vec;
     
    5454//------------------------------------------------------------------------------
    5555
    56 TLorentzVector MissingET::P4() const
     56TLorentzVector MissingET::P4()
    5757{
    5858  TLorentzVector vec;
     
    6363//------------------------------------------------------------------------------
    6464
    65 TLorentzVector Photon::P4() const
     65TLorentzVector Photon::P4()
    6666{
    6767  TLorentzVector vec;
     
    7272//------------------------------------------------------------------------------
    7373
    74 TLorentzVector Electron::P4() const
     74TLorentzVector Electron::P4()
    7575{
    7676  TLorentzVector vec;
     
    8181//------------------------------------------------------------------------------
    8282
    83 TLorentzVector Muon::P4() const
     83TLorentzVector Muon::P4()
    8484{
    8585  TLorentzVector vec;
     
    9090//------------------------------------------------------------------------------
    9191
    92 TLorentzVector Jet::P4() const
     92TLorentzVector Jet::P4()
    9393{
    9494  TLorentzVector vec;
     
    9999//------------------------------------------------------------------------------
    100100
    101 TLorentzVector Track::P4() const
     101TLorentzVector Track::P4()
    102102{
    103103  TLorentzVector vec;
     
    108108//------------------------------------------------------------------------------
    109109
    110 TLorentzVector Tower::P4() const
     110TLorentzVector Tower::P4()
    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), 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),
     122  IsPU(0), IsConstituent(0),
     123  BTag(0), TauTag(0), Eem(0.0), Ehad(0.0),
    126124  DeltaEta(0.0), DeltaPhi(0.0),
    127125  Momentum(0.0, 0.0, 0.0, 0.0),
     
    135133  MeanSqDeltaR(0),
    136134  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),
    147135  fFactory(0),
    148136  fArray(0)
    149137{
    150   int i;
    151138  Edges[0] = 0.0;
    152139  Edges[1] = 0.0;
     
    163150  Tau[3] = 0.0;
    164151  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   }
    171152}
    172153
     
    243224  object.IsPU = IsPU;
    244225  object.IsConstituent = IsConstituent;
    245   object.IsFromConversion = IsFromConversion;
    246   object.Flavor = Flavor;
    247   object.FlavorAlgo = FlavorAlgo;
    248   object.FlavorPhys = FlavorPhys;
    249226  object.BTag = BTag;
    250   object.BTagAlgo = BTagAlgo;
    251   object.BTagPhys = BTagPhys;
    252227  object.TauTag = TauTag;
    253228  object.Eem = Eem;
     
    274249  object.MeanSqDeltaR = MeanSqDeltaR;
    275250  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 
    284251  object.FracPt[0] = FracPt[0];
    285252  object.FracPt[1] = FracPt[1];
     
    293260  object.Tau[4] = Tau[4];
    294261
    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 
    315262  object.fFactory = fFactory;
    316263  object.fArray = 0;
    317 
    318   // copy cluster timing info
    319   copy(ECalEnergyTimePairs.begin(), ECalEnergyTimePairs.end(), back_inserter(object.ECalEnergyTimePairs));
    320264
    321265  if(fArray && fArray->GetEntriesFast() > 0)
     
    334278void Candidate::Clear(Option_t* option)
    335279{
    336   int i;
    337280  SetUniqueID(0);
    338281  ResetBit(kIsReferenced);
     
    344287  IsPU = 0;
    345288  IsConstituent = 0;
    346   IsFromConversion = 0;
    347   Flavor = 0;
    348   FlavorAlgo = 0;
    349   FlavorPhys = 0;
    350289  BTag = 0;
    351   BTagAlgo = 0;
    352   BTagPhys = 0;
    353290  TauTag = 0;
    354291  Eem = 0.0;
     
    374311  MeanSqDeltaR = 0.0;
    375312  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 
    387313  FracPt[0] = 0.0;
    388314  FracPt[1] = 0.0;
     
    396322  Tau[4] = 0.0;
    397323
    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 
    409324  fArray = 0;
    410325}
  • classes/DelphesClasses.h

    rd77b51d rd870fc5  
    8484//---------------------------------------------------------------------------
    8585
    86 class LHEFWeight: public TObject
    87 {
    88 public:
    89   Int_t ID; // weight ID
    90   Float_t Weight; // weight value
    91 
    92   ClassDef(LHEFWeight, 1)
    93 };
    94 
    95 //---------------------------------------------------------------------------
    96 
    9786class HepMCEvent: public Event
    9887{
     
    161150  const CompBase *GetCompare() const { return fgCompare; }
    162151
    163   TLorentzVector P4() const;
     152  TLorentzVector P4();
    164153
    165154  ClassDef(GenParticle, 1)
     
    188177  Float_t Phi; // mising energy azimuthal angle
    189178
    190   TLorentzVector P4() const;
     179  TLorentzVector P4();
    191180
    192181  ClassDef(MissingET, 1)
     
    242231  TRefArray Particles; // references to generated particles
    243232
    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)
     233  static CompBase *fgCompare; //!
     234  const CompBase *GetCompare() const { return fgCompare; }
     235
     236  TLorentzVector P4();
     237
     238  ClassDef(Photon, 2)
    259239};
    260240
     
    277257  TRef Particle; // reference to generated particle
    278258
    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)
     259  static CompBase *fgCompare; //!
     260  const CompBase *GetCompare() const { return fgCompare; }
     261
     262  TLorentzVector P4();
     263
     264  ClassDef(Electron, 2)
    294265};
    295266
     
    310281  TRef Particle; // reference to generated particle
    311282
    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)
     283  static CompBase *fgCompare; //!
     284  const CompBase *GetCompare() const { return fgCompare; }
     285
     286  TLorentzVector P4();
     287
     288  ClassDef(Muon, 2)
    327289};
    328290
     
    344306  Float_t DeltaPhi;  // jet radius in azimuthal angle
    345307
    346   UInt_t Flavor;
    347   UInt_t FlavorAlgo;
    348   UInt_t FlavorPhys;
    349 
    350308  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 
    354309  UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau
    355310
     
    358313  Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter
    359314
    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
     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
    377328
    378329  TRefArray Constituents; // references to constituents
     
    382333  const CompBase *GetCompare() const { return fgCompare; }
    383334
    384   TLorentzVector P4() const;
    385   TLorentzVector Area;
    386 
    387   ClassDef(Jet, 3)
     335  TLorentzVector P4();
     336
     337  ClassDef(Jet, 2)
    388338};
    389339
     
    426376  const CompBase *GetCompare() const { return fgCompare; }
    427377
    428   TLorentzVector P4() const;
     378  TLorentzVector P4();
    429379
    430380  ClassDef(Track, 2)
     
    442392  Float_t E; // calorimeter tower energy
    443393
    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
     394  Float_t T; //particle arrival time of flight
    446395
    447396  Float_t Eem; // calorimeter tower electromagnetic energy
     
    455404  const CompBase *GetCompare() const { return fgCompare; }
    456405
    457   TLorentzVector P4() const;
    458 
    459   ClassDef(Tower, 2)
     406  TLorentzVector P4();
     407
     408  ClassDef(Tower, 1)
    460409};
    461410
     
    503452
    504453  Int_t IsPU;
    505   Int_t IsRecoPU;
    506 
    507454  Int_t IsConstituent;
    508455
    509   Int_t IsFromConversion;
    510 
    511   UInt_t Flavor;
    512   UInt_t FlavorAlgo;
    513   UInt_t FlavorPhys;
    514 
    515456  UInt_t BTag;
    516   UInt_t BTagAlgo;
    517   UInt_t BTagPhys;
    518 
    519457  UInt_t TauTag;
    520458
     
    528466  TLorentzVector Momentum, Position, Area;
    529467
    530   Float_t Dxy;
    531   Float_t SDxy;
    532   Float_t Xd;
    533   Float_t Yd;
    534   Float_t Zd;
     468  Float_t  Dxy;
     469  Float_t  SDxy;
     470  Float_t  Xd;
     471  Float_t  Yd;
     472  Float_t  Zd;
    535473
    536474  // PileUpJetID variables
    537475
    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;
     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];
    559483
    560484  // N-subjettiness variables
    561485
    562486  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 
    574487
    575488  static CompBase *fgCompare; //!
     
    591504  void SetFactory(DelphesFactory *factory) { fFactory = factory; }
    592505
    593   ClassDef(Candidate, 3)
     506  ClassDef(Candidate, 2)
    594507};
    595508
  • classes/DelphesFormula.cc

    rd77b51d rd870fc5  
    2323
    2424#include <stdexcept>
     25#include <string>
    2526
    2627using namespace std;
     
    5051Int_t DelphesFormula::Compile(const char *expression)
    5152{
    52   TString buffer;
     53  string buffer;
    5354  const char *it;
    5455  for(it = expression; *it; ++it)
    5556  {
    5657    if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
    57     buffer.Append(*it);
     58    buffer.push_back(*it);
    5859  }
    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)
     60  if(TFormula::Compile(buffer.c_str()) != 0)
    6461  {
    6562    throw runtime_error("Invalid formula.");
     
    7774
    7875//------------------------------------------------------------------------------
     76
     77Int_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

    rd77b51d rd870fc5  
    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);
    3739};
    3840
  • classes/DelphesLHEFReader.cc

    rd77b51d rd870fc5  
    8282  fEventCounter = -1;
    8383  fParticleCounter = -1;
    84   fWeightList.clear();
     84  fRwgtList.clear();
    8585}
    8686
     
    9999  TObjArray *partonOutputArray)
    100100{
    101   int rc, id;
     101  int rc;
    102102  char *pch;
    103103  double weight;
     
    158158  else if(strstr(fBuffer, "<wgt"))
    159159  {
    160     pch = strpbrk(fBuffer, "\"'");
     160    pch = strstr(fBuffer, ">");
    161161    if(!pch)
    162162    {
     
    165165    }
    166166
    167     DelphesStream idStream(pch + 1);
    168     rc = idStream.ReadInt(id);
    169 
    170     pch = strchr(fBuffer, '>');
    171     if(!pch)
     167    DelphesStream bufferStream(pch + 1);
     168    rc = bufferStream.ReadDbl(weight);
     169
     170    if(!rc)
    172171    {
    173172      cerr << "** ERROR: " << "invalid weight format" << endl;
     
    175174    }
    176175
    177     DelphesStream weightStream(pch + 1);
    178     rc = weightStream.ReadDbl(weight);
    179 
    180     if(!rc)
    181     {
    182       cerr << "** ERROR: " << "invalid weight format" << endl;
    183       return kFALSE;
    184     }
    185 
    186     fWeightList.push_back(make_pair(id, weight));
     176    fRwgtList.push_back(weight);
    187177  }
    188178  else if(strstr(fBuffer, "</event>"))
     
    216206//---------------------------------------------------------------------------
    217207
    218 void 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;
     208void 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;
    229218  }
    230219}
  • classes/DelphesLHEFReader.h

    rd77b51d rd870fc5  
    3131
    3232#include <vector>
    33 #include <utility>
    3433
    3534class TObjArray;
     
    5958    TStopwatch *readStopWatch, TStopwatch *procStopWatch);
    6059
    61   void AnalyzeWeight(ExRootTreeBranch *branch);
     60  void AnalyzeRwgt(ExRootTreeBranch *branch);
    6261
    6362private:
     
    8483  double fPx, fPy, fPz, fE, fMass;
    8584 
    86   std::vector< std::pair< int, double > > fWeightList;
     85  std::vector<double> fRwgtList;
    8786};
    8887
  • classes/DelphesSTDHEPReader.cc

    rd77b51d rd870fc5  
    7777  fInputFile = inputFile;
    7878  xdrstdio_create(fInputXDR, inputFile, XDR_DECODE);
     79  ReadFileHeader();
    7980}
    8081
     
    106107  SkipBytes(4);
    107108
    108   if(fBlockType == FILEHEADER)
    109   {
    110     ReadFileHeader();
    111   }
    112   else if(fBlockType == EVENTTABLE)
     109  if(fBlockType == EVENTTABLE)
    113110  {
    114111    ReadEventTable();
     
    180177  u_int i;
    181178  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);
    182187
    183188  // version
  • classes/DelphesTF2.cc

    rd77b51d rd870fc5  
    1818
    1919#include "classes/DelphesTF2.h"
    20 
    21 #include "RVersion.h"
    2220#include "TString.h"
    23 
    2421#include <stdexcept>
     22#include <string>
    2523
    2624using namespace std;
     
    3634
    3735DelphesTF2::DelphesTF2(const char *name, const char *expression) :
    38   TF2(name, expression)
     36  TF2(name,expression)
    3937{
    4038}
     
    4846//------------------------------------------------------------------------------
    4947
    50 Int_t DelphesTF2::Compile(const char *expression)
     48Int_t DelphesTF2::DefinedVariable(TString &chaine, Int_t &action)
    5149{
    52   TString buffer;
    53   const char *it;
    54   for(it = expression; *it; ++it)
     50  action = kVariable;
     51  if(chaine == "z")
    5552  {
    56     if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;
    57     buffer.Append(*it);
     53    if(fNdim < 1) fNdim = 1;
     54    return 0;
    5855  }
    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
     56  else if(chaine == "t")
    6657  {
    67     throw runtime_error("Invalid formula.");
     58    if(fNdim < 2) fNdim = 2;
     59    return 1;
    6860  }
    69   return 0;
     61  return -1;
    7062}
    7163
  • classes/DelphesTF2.h

    rd77b51d rd870fc5  
    2121
    2222#include "TF2.h"
     23#include "TFormula.h"
     24
     25#include <string>
    2326
    2427class DelphesTF2: public TF2
     
    3235  ~DelphesTF2();
    3336
    34   Int_t Compile(const char *expression);
     37  Int_t DefinedVariable(TString &variable, Int_t &action);
     38
    3539};
    3640
    3741#endif /* DelphesTF2_h */
     42
  • display/Delphes3DGeometry.cc

    rd77b51d rd870fc5  
    1717 */
    1818
     19#include "display/Delphes3DGeometry.h"
    1920#include <set>
    2021#include <map>
     
    2425#include <sstream>
    2526#include <cassert>
    26 
    27 #include "TAxis.h"
    2827#include "TGeoManager.h"
    2928#include "TGeoVolume.h"
     
    3534#include "TGeoCone.h"
    3635#include "TGeoArb8.h"
     36#include "external/ExRootAnalysis/ExRootConfReader.h"
     37#include "classes/DelphesClasses.h"
    3738#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"
    4741
    4842using namespace std;
     
    9690   tk_length_ = confReader->GetDouble(Form("%s::HalfLength",ParticlePropagator), 3.0)*100.;     // tk_length
    9791   tk_Bz_     = confReader->GetDouble("ParticlePropagator::Bz", 0.0);                           // tk_Bz
    98    
    99    TString buffer;
    100    const char *it;
    101  
    102    
     92
    10393   {
    10494   TString tkEffFormula = confReader->GetString(Form("%s::EfficiencyFormula",TrackingEfficiency),"abs(eta)<3.0");
     
    10696   tkEffFormula.ReplaceAll("eta","y");
    10797   tkEffFormula.ReplaceAll("phi","0.");
    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);
     98   TF2* tkEffFunction = new TF2("tkEff",tkEffFormula,0,1000,-10,10);
    11799   TH1F etaHisto("eta","eta",100,5.,-5.);
    118100   Double_t pt,eta;
     
    136118   muonEffFormula.ReplaceAll("eta","y");
    137119   muonEffFormula.ReplaceAll("phi","0.");
    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);
     120   TF2* muEffFunction = new TF2("muEff",muonEffFormula,0,1000,-10,10);
    147121   TH1F etaHisto("eta2","eta2",100,5.,-5.);
    148122   Double_t pt,eta;
  • display/Delphes3DGeometry.h

    rd77b51d rd870fc5  
    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>
    2425#include <vector>
    25 
    26 #include "Rtypes.h"
    27 
    28 class TAxis;
    29 class TGeoManager;
    30 class TGeoVolume;
    31 class TGeoMedium;
     26#include <algorithm>
     27#include <sstream>
     28#include "TAxis.h"
     29#include "TGeoManager.h"
     30#include "TGeoVolume.h"
     31#include "TGeoMedium.h"
    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");
     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");
    4447
    4548     void setContingency(Double_t contingency) { contingency_ = contingency; }
     
    4851     void setMuonSystemThickness(Double_t thickness) { muonSystem_thickn_ = thickness; }
    4952
    50      TGeoVolume *getDetector(bool withTowers = true);
     53     TGeoVolume* getDetector(bool withTowers = true);
    5154
    5255     Double_t getTrackerRadius() const { return tk_radius_; }
     
    5962   private:
    6063     std::pair<Double_t, Double_t> addTracker(TGeoVolume *top);
    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);
     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);
    6467
    6568   private:
     
    7275     TGeoMedium *mudetmed_;
    7376
    74      TAxis *etaAxis_;
    75      TAxis *phiAxis_;
     77     TAxis* etaAxis_;
     78     TAxis* phiAxis_;
    7679
    7780     Double_t contingency_;
     
    9194     std::map<std::string, Double_t> muonSystem_etamax_;
    9295     std::map<std::string, std::set< std::pair<Double_t, Int_t> > > caloBinning_;
    93 
     96     
    9497};
    9598
  • display/DelphesBranchElement.cc

    rd77b51d rd870fc5  
    155155  trkProp->SetMaxR(tkRadius_);
    156156  trkProp->SetMaxZ(tkHalfLength_);
    157   GenParticle *particle;
    158157  if(type=="Track") { // CASE 1: TRACKS
    159158    Track *track;
     
    162161                   track->P4().Px(), track->P4().Py(),
    163162                   track->P4().Pz(), track->P4().E(),
    164                    track->X/10.0, track->Y/10.0, track->Z/10.0, track->T/10.0);
     163                   track->X, track->Y, track->Z, 0.0);
    165164      eveTrack = new TEveTrack(&pb, counter, trkProp);
    166165      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    174173    Electron *electron;
    175174    while((electron = (Electron *) itTrack.Next())) {
    176       particle = (GenParticle*) electron->Particle.GetObject();
    177175      TParticle pb(electron->Charge<0?11:-11, 1, 0, 0, 0, 0,
    178176                   electron->P4().Px(), electron->P4().Py(),
    179177                   electron->P4().Pz(), electron->P4().E(),
    180                    particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0);
     178                   0., 0., 0., 0.);
    181179      eveTrack = new TEveTrack(&pb, counter, trkProp);
    182180      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    190188    Muon *muon;
    191189    while((muon = (Muon *) itTrack.Next())) {
    192       particle = (GenParticle*) muon->Particle.GetObject();
    193190      TParticle pb(muon->Charge<0?13:-13, 1, 0, 0, 0, 0,
    194191                   muon->P4().Px(), muon->P4().Py(),
    195192                   muon->P4().Pz(), muon->P4().E(),
    196                    particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0);
     193                   0., 0., 0., 0.);
    197194      eveTrack = new TEveTrack(&pb, counter, trkProp);
    198195      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    209206                   photon->P4().Px(), photon->P4().Py(),
    210207                   photon->P4().Pz(), photon->P4().E(),
    211                    0.0, 0.0, 0.0, 0.0);
     208                   0., 0., 0., 0.);
    212209      eveTrack = new TEveTrack(&pb, counter, trkProp);
    213210      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    226223                   particle->P4().Px(), particle->P4().Py(),
    227224                   particle->P4().Pz(), particle->P4().E(),
    228                    particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0);
     225                   particle->X, particle->Y, particle->Z, particle->T);
    229226      eveTrack = new TEveTrack(&pb, counter, trkProp);
    230227      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
  • display/DelphesEventDisplay.cc

    rd77b51d rd870fc5  
    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 
    2423#include "TGeoManager.h"
    2524#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"
    2632#include "TEveElement.h"
    2733#include "TEveJetCone.h"
     
    4753#include "TCanvas.h"
    4854#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"
    6655
    6756DelphesEventDisplay::DelphesEventDisplay()
     
    10998   TEveManager::Create(kTRUE, "IV");
    11099   fStatusBar_ = gEve->GetBrowser()->GetStatusBar();
    111    TGeoManager *geom = gGeoManager;
     100   TGeoManager* geom = gGeoManager;
    112101
    113102   // build the detector
     
    119108   etaAxis_ = det3D.getCaloAxes().first;
    120109   phiAxis_ = det3D.getCaloAxes().second;
    121    TGeoVolume *top = det3D.getDetector(false);
     110   TGeoVolume* top = det3D.getDetector(false);
    122111   geom->SetTopVolume(top);
    123112   TEveElementList *geometry = new TEveElementList("Geometry");
    124    TObjArray *nodes = top->GetNodes();
     113   TObjArray* nodes = top->GetNodes();
    125114   TIter itNodes(nodes);
    126    TGeoNode *nodeobj;
    127    TEveGeoTopNode *node;
     115   TGeoNode* nodeobj;
     116   TEveGeoTopNode* node;
    128117   while((nodeobj = (TGeoNode*)itNodes.Next())) {
    129118     node = new TEveGeoTopNode(gGeoManager,nodeobj);
     
    142131   // prepare data collections
    143132   readConfig(configFile, elements_);
    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);
     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);
    147136     if(item_v1) gEve->AddElement(item_v1->GetContainer());
    148137     if(item_v2) gEve->AddElement(item_v2->GetContainer());
     
    155144   delphesDisplay_->ImportGeomRhoZ(geometry);
    156145   // find the first calo data and use that to initialize the calo display
    157    for(std::vector<DelphesBranchBase *>::iterator data=elements_.begin();data<elements_.end();++data) {
     146   for(std::vector<DelphesBranchBase*>::iterator data=elements_.begin();data<elements_.end();++data) {
    158147     if(TString((*data)->GetType())=="Tower") { // we could also use GetClassName()=="DelphesCaloData"
    159        DelphesCaloData *container = dynamic_cast<DelphesBranchElement<DelphesCaloData>*>((*data))->GetContainer();
     148       DelphesCaloData* container = dynamic_cast<DelphesBranchElement<DelphesCaloData>*>((*data))->GetContainer();
    160149       assert(container);
    161150       TEveCalo3D *calo3d = new TEveCalo3D(container);
     
    193182   ExRootConfParam branches = confReader->GetParam("TreeWriter::Branch");
    194183   Int_t nBranches = branches.GetSize()/3;
    195    DelphesBranchElement<TEveTrackList> *tlist;
    196    DelphesBranchElement<DelphesCaloData> *clist;
    197    DelphesBranchElement<TEveElementList> *elist;
     184   DelphesBranchElement<TEveTrackList>* tlist;
     185   DelphesBranchElement<DelphesCaloData>* clist;
     186   DelphesBranchElement<TEveElementList>* elist;
    198187   // first loop with all but tracks
    199188   for(Int_t b = 0; b<nBranches; ++b) {
     
    284273
    285274   // update display
    286    TEveElement *top = (TEveElement*)gEve->GetCurrentEvent();
     275   TEveElement* top = (TEveElement*)gEve->GetCurrentEvent();
    287276   delphesDisplay_->DestroyEventRPhi();
    288277   delphesDisplay_->ImportEventRPhi(top);
     
    367356
    368357   // add a tab on the left
    369    TEveBrowser *browser = gEve->GetBrowser();
     358   TEveBrowser* browser = gEve->GetBrowser();
    370359   browser->SetWindowName("Delphes Event Display");
    371360   browser->StartEmbedding(TRootBrowser::kLeft);
    372361
    373362   // set the main title
    374    TGMainFrame *frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
     363   TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
    375364   frmMain->SetWindowName("Delphes Event Display");
    376365   frmMain->SetCleanup(kDeepCleanup);
     
    382371   if(!gSystem->OpenDirectory(icondir))
    383372     icondir = Form("%s/icons/", (const char*)gSystem->GetFromPipe("root-config --etcdir") );
    384    TGGroupFrame *vf = new TGGroupFrame(frmMain,"Event navigation",kVerticalFrame | kFitWidth );
     373   TGGroupFrame* vf = new TGGroupFrame(frmMain,"Event navigation",kVerticalFrame | kFitWidth );
    385374   {
    386      TGHorizontalFrame *hf = new TGHorizontalFrame(frmMain);
     375     TGHorizontalFrame* hf = new TGHorizontalFrame(frmMain);
    387376     {
    388         TGPictureButton *b = 0;
     377        TGPictureButton* b = 0;
    389378
    390379        b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoBack.gif"));
     
    392381        b->Connect("Clicked()", "DelphesEventDisplay", this, "Bck()");
    393382
    394         TGNumberEntry *numberEntry = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries());
     383        TGNumberEntry* numberEntry = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries());
    395384        hf->AddFrame(numberEntry, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 2, 0, 10, 10));
    396385        this->Connect("EventChanged(Int_t)","TGNumberEntry",numberEntry,"SetIntNumber(Long_t)");
     
    405394     vf->AddFrame(hf, new TGLayoutHints(kLHintsExpandX , 2, 2, 2, 2));
    406395
    407      TGHProgressBar *progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);
     396     TGHProgressBar* progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);
    408397     progress->SetMax( treeReader_->GetEntries());
    409398     progress->ShowPosition(kTRUE, kFALSE, "Event %.0f");
     
    429418   // the summary tab
    430419   htmlSummary_ = new DelphesHtmlSummary("Delphes Event Display Summary Table");
    431    TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
     420   TEveWindowSlot* slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
    432421   gHtml_ = new TGHtml(0, 100, 100);
    433422   TEveWindowFrame *wf = slot->MakeFrame(gHtml_);
     
    437426   // plot tab
    438427   slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
    439    TEveWindowTab *tab = slot->MakeTab();
     428   TEveWindowTab* tab = slot->MakeTab();
    440429   tab->SetElementName("Summary plots");
    441430   tab->SetShowTitleBar(kFALSE);
     
    446435}
    447436
    448 void 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 
    456 void DelphesEventDisplay::Bck() {
    457   if (event_id_ > 0) {
    458      EventChanged(event_id_-1);
    459   } else {
    460      printf("Already at first event.\n");
    461   }
    462 }
    463 
    464 void DelphesEventDisplay::PreSetEv(char *ev) {
    465   event_id_tmp_ = Int_t(atoi(ev));
    466 }
    467 
    468 void 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 
    476 void DelphesEventDisplay::InitSummaryPlots() {
    477   plotSummary_->FillSample(treeReader_, event_id_);
    478   plotSummary_->FillEvent();
    479   plotSummary_->Draw();
    480 }
    481 
    482 void DelphesEventDisplay::DisplayProgress(Int_t p) {
    483   fStatusBar_->SetText(Form("Processing... %d %%",p), 1);
    484   gSystem->ProcessEvents();
    485 }
     437
  • display/DelphesEventDisplay.h

    rd77b51d rd870fc5  
    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>
    2338
    24 #include "Rtypes.h"
    25 #include "RQ_OBJECT.h"
    2639
    27 class TAxis;
    28 class TChain;
    29 class TGHtml;
    30 class TGStatusBar;
    31 class DelphesDisplay;
    32 class Delphes3DGeometry;
    33 class DelphesBranchBase;
    34 class DelphesHtmlSummary;
    35 class DelphesPlotSummary;
    36 class ExRootTreeReader;
    3740
    3841/*
    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   *
     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 *
    4346 */
    4447
     
    5659    void make_gui();
    5760    void load_event();
    58     void readConfig(const char *configFile, std::vector<DelphesBranchBase *>& elements);
     61    void readConfig(const char *configFile, std::vector<DelphesBranchBase*>& elements);
    5962
    6063    // Configuration and global variables.
     
    6467    Double_t tkRadius_, totRadius_, tkHalfLength_, muHalfLength_, bz_;
    6568    TAxis *etaAxis_, *phiAxis_;
    66     TChain *chain_;
    67     std::vector<DelphesBranchBase *> elements_;
     69    TChain* chain_;
     70    std::vector<DelphesBranchBase*> elements_;
    6871    DelphesDisplay *delphesDisplay_;
    6972    DelphesHtmlSummary *htmlSummary_;
    7073    TGHtml *gHtml_;
    7174    DelphesPlotSummary *plotSummary_;
    72     TGStatusBar *fStatusBar_;
     75    TGStatusBar* fStatusBar_;
    7376   
    7477    // gui controls
    7578  public:
    76      void Fwd();
     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     }
    7786
    78      void Bck();
     87     void Bck() {
     88        if (event_id_ > 0) {
     89           EventChanged(event_id_-1);
     90        } else {
     91           printf("Already at first event.\n");
     92        }
     93     }
    7994
    80     void PreSetEv(char *ev);
     95    void PreSetEv(char* ev) {
     96      event_id_tmp_ = Int_t(atoi(ev));
     97    }
    8198
    82     void GoTo();
     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    }
    83106
    84     void InitSummaryPlots();
     107    void InitSummaryPlots() {
     108      plotSummary_->FillSample(treeReader_, event_id_);
     109      plotSummary_->FillEvent();
     110      plotSummary_->Draw();
     111    }
    85112
    86     void DisplayProgress(Int_t p);
     113    void DisplayProgress(Int_t p) {
     114         fStatusBar_->SetText(Form("Processing... %d %%",p), 1);
     115         gSystem->ProcessEvents();
     116    }
    87117};
    88118
  • doc/genMakefile.tcl

    rd77b51d rd870fc5  
    103103    if {$fileName == "modules/PileUpMergerPythia8.cc"} {
    104104      lappend srcObjFilesPythia8 $srcObjName$objSuf
    105     } elseif {([string match {modules/FastJet*.cc} $fileName] || [string match {modules/RunPUPPI.cc} $fileName]) && $srcPrefix != {FASTJET}} {
     105    } elseif {[string match {modules/FastJet*.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 -lDataFormatsCommon -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon
     221OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
    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
     232#CXXFLAGS += -I$(PYTHIA8)/include
     233#CXXFLAGS += -I$(PYTHIA8)/include/Pythia8
     234#OPT_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} {modules/RunPUPPI.cc} {external/PUPPI/*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc} {external/fastjet/contribs/*/*.cc}
     287sourceDeps {FASTJET} {modules/FastJet*.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 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)
     398        @cp -a CHANGELOG COPYING CREDITS README VERSION Makefile 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

    rd77b51d rd870fc5  
    1 version=3.1.2
     1version=3.1.0
    22
    3 wget http://fastjet.fr/repo/fastjet-${version}.tar.gz
     3#wget 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 's/\.cpp$/.cc/' SISCone/*.cpp
     85rename .cpp .cc SISCone/*.cpp
     86
    8687
    8788mkdir -p TrackJet/fastjet
     
    8990cp -a ../../fastjet-${version}/plugins/TrackJet/fastjet/*.hh TrackJet/fastjet
    9091
    91 sed -i 's/#include "fastjet\/D0RunIBaseConePlugin.hh"/#include "D0RunIBaseConePlugin.hh"/' D0RunICone/fastjet/D0RunIpre96ConePlugin.hh
    92 sed -i 's/#include "fastjet\/D0RunIBaseConePlugin.hh"/#include "D0RunIBaseConePlugin.hh"/' D0RunICone/fastjet/D0RunIConePlugin.hh
     92sed -i 's/#include "fastjet\//#include "/' D0RunICone/fastjet/D0RunIpre96ConePlugin.hh
     93sed -i 's/#include "fastjet\//#include "/' D0RunICone/fastjet/D0RunIConePlugin.hh
    9394
    9495sed -i 's/#include "siscone\//#include "/' SISCone/SISConePlugin.cc
  • examples/EventDisplay.C

    rd77b51d rd870fc5  
    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__
    7 R__LOAD_LIBRARY(libEve)
    8 R__LOAD_LIBRARY(libDelphesDisplay)
    9 #include "display/DelphesEventDisplay.h"
    10 #include "display/Delphes3DGeometry.h"
    11 #endif
    125
    136void EventDisplay(const char *configfile = "delphes_card_CMS.tcl",
     
    4033
    4134    // create the application
    42     DelphesEventDisplay *display = new DelphesEventDisplay(configfile, datafile, det3D);
     35    DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
    4336  }
    4437}
  • examples/Example1.C

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

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

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

    rd77b51d rd870fc5  
    11/*
     2
    23This macro shows how to compute jet energy scale.
    34root -l examples/Example4.C'("delphes_output.root", "plots.root")'
    45
    5 The output ROOT file contains the pT(MC)/pT(Reco) distributions for
    6 various pT(Reco) and |eta| bins. The peak value of such distribution is
    7 interpreted as the jet energy correction to be applied for that
    8 given pT(Reco), |eta| bin.
    9 
    10 This can be done by modifying the "ScaleFormula" input parameter to
    11 the JetEnergyScale module in the delphes_card_XXX.tcl
     6The output ROOT file contains the pT(MC)/pT(Reco) distributions for various pT(Reco) and |eta| bins.
     7The peak value of such distribution is interpreted as the jet energy correction to be applied for that given pT(Reco), |eta| bin.
     8
     9This can be done by modifying the "ScaleFormula" input parameter to the JetEnergyScale module in the delphes_card_XXX.tcl
     10
     11
    1212
    1313e.g  a smooth function:
    1414
    15   set ScaleFormula { sqrt(3.0 - 0.1*(abs(eta)))^2 / pt + 1.0) }
     15
     16  set ScaleFormula { sqrt(3.0 - 0.1*(abs(eta)))^2 / pt + 1.0 ) }
     17
    1618
    1719or a binned function:
     20
    1821
    1922  set ScaleFormula {(abs(eta) > 0.0 && abs(eta) <= 2.5) * (pt > 20.0 && pt <= 50.0)  * (1.10) +
     
    2427                    (abs(eta) > 2.5 && abs(eta) <= 5.0) * (pt > 100.0)               * (1.00)}
    2528
    26 Be aware that a binned jet energy scale can produce "steps" in the corrected
    27 jet pt distribution ...
     29
     30Be aware that a binned jet energy scale can produce "steps" in the corrected jet pt distribution ...
     31
     32
     33
    2834*/
    29 
    30 #ifdef __CLING__
    31 R__LOAD_LIBRARY(libDelphes)
    32 #include "classes/DelphesClasses.h"
    33 #include "external/ExRootAnalysis/ExRootTreeReader.h"
    34 #include "external/ExRootAnalysis/ExRootResult.h"
    35 #else
    36 class ExRootTreeReader;
    37 class ExRootResult;
    38 #endif
    3935
    4036//------------------------------------------------------------------------------
     
    165161
    166162  Jet *jet, *genjet;
    167   GenParticle *particle;
     163  GenParticle *part;
    168164  TObject *object;
    169165
    170   TLorentzVector jetMomentum, genJetMomentum, bestGenJetMomentum;
    171 
    172   Float_t deltaR;
     166  TLorentzVector JetMom, GenJetMom, BestGenJetMom;
     167
     168  Float_t Dr;
    173169  Float_t pt, eta;
    174170  Long64_t entry;
     
    181177    // Load selected branches with data from specified event
    182178    treeReader->ReadEntry(entry);
     179    //  cout<<"--  New event -- "<<endl;
    183180
    184181    if(entry%500 == 0) cout << "Event number: "<< entry <<endl;
     
    189186
    190187      jet = (Jet*) branchJet->At(i);
    191       jetMomentum = jet->P4();
    192 
    193       plots->fJetPT->Fill(jetMomentum.Pt());
    194 
    195       deltaR = 999;
     188      JetMom = jet-> P4();
     189
     190      plots->fJetPT->Fill(JetMom.Pt());
     191
     192      Dr = 999;
    196193
    197194     // Loop over all hard partons in event
    198195     for(j = 0; j < branchParticle->GetEntriesFast(); ++j)
    199196     {
    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)
     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 )
    210207        {
    211            deltaR = genJetMomentum.DeltaR(jetMomentum);
    212            bestGenJetMomentum = genJetMomentum;
     208           Dr = GenJetMom.DeltaR(JetMom);
     209           BestGenJetMom = GenJetMom;
    213210        }
     211
    214212      }
    215213
    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       }
     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
    238239    }
    239240  }
    240241}
     242
    241243
    242244//------------------------------------------------------------------------------
  • examples/ExternalFastJet/ExternalFastJetBasic.cpp

    rd77b51d rd870fc5  
    2222
    2323
    24 This simple example shows how to use Delphes with an external FastJet installation.
    25 Events are specified via the multidimensional array "EVENTS" (for an example reading
    26 an HepMC file see ExternalFastJetHepMC.cpp).
    27 
    28 In order to run this example you first 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 multidimentionnal array "EVENTS" (for an example reading
     26an hepmc file see ExternalFastJetHepMC.cpp).
     27
     28In order to run this example you first, you 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 -lEG $DELPHES_LIB"
    47 
    48 g++ $CXXFLAGS examples/ExternalFastJet/ExternalFastJetBasic.cpp $LDFLAGS -o ExternalFastJetBasic
     46LDFLAGS="$FASTJET_LIB $ROOT_LIB $DELPHES_LIB"
     47
     48g++ $CXXFLAGS $LDFLAGS examples/ExternalFastJetBasic.cpp -o examples/ExternalFastJetBasic
    4949
    5050Then run:
    5151
    52 ./ExternalFastJetBasic cards/delphes_card_CMS_NoFastJet.tcl
     52./examples/ExternalFastJetBasic cards/delphes_card_CMS_NoFastJet.tcl
    5353
    5454
  • examples/ExternalFastJet/ExternalFastJetHepMC.cpp

    rd77b51d rd870fc5  
    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 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, you 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 -lEG $DELPHES_LIB"
    46 
    47 g++ $CXXFLAGS examples/ExternalFastJet/ExternalFastJetHepMC.cpp $LDFLAGS -o ExternalFastJetHepMC
    48 
    49 Then run (you need an event file in HepMC format):
    50 
    51 ./ExternalFastJetHepMC cards/delphes_card_CMS_NoFastJet.tcl file.hepmc
     45LDFLAGS="$FASTJET_LIB $ROOT_LIB $DELPHES_LIB"
     46
     47g++ $CXXFLAGS $LDFLAGS examples/ExternalFastJetHepMC.cpp -o examples/ExternalFastJetHepMC
     48
     49Then run (you need an event file in hepmc format):
     50
     51./examples/ExternalFastJetHepMC cards/delphes_card_CMS_NoFastJet.tcl file.hepmc
    5252
    5353
  • external/fastjet/ClusterSequence.cc

    rd77b51d rd870fc5  
    11//FJSTARTHEADER
    2 // $Id: ClusterSequence.cc 3809 2015-02-20 13:05:13Z soyez $
     2// $Id: ClusterSequence.cc 3685 2014-09-11 20:15:00Z salam $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    372372    _plugin_activated = false;
    373373
     374#ifndef __FJCORE__
    374375  } else if (_strategy == N2MHTLazy9AntiKtSeparateGhosts) {
    375 #ifndef __FJCORE__
    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 
    14801473  assert(parent1 >= 0);
    1481   if (_history[parent1].child != Invalid){
    1482     throw InternalError("trying to recomine an object that has previsously been recombined");
    1483   }
    14841474  _history[parent1].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   }
     1475  if (parent2 >= 0) {_history[parent2].child = local_step;}
    14911476
    14921477  // get cross-referencing right from PseudoJets
  • external/fastjet/Error.hh

    rd77b51d rd870fc5  
    33
    44//FJSTARTHEADER
    5 // $Id: Error.hh 3809 2015-02-20 13:05:13Z soyez $
     5// $Id: Error.hh 3694 2014-09-18 13:21:54Z 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.
    109 class InternalError : public Error{
    110 public:
    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 
    11798FASTJET_END_NAMESPACE
    11899
  • external/fastjet/LazyTiling25.cc

    rd77b51d rd870fc5  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling25.cc 3808 2015-02-20 11:24:53Z soyez $
     2// $Id: LazyTiling25.cc 3477 2014-07-29 14:34:39Z salam $
    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     // 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;
     367    double dist = _distance_to_tile(jet, *near_tile);
    370368    // cout << "      max info looked at tile " << *near_tile - &_tiles[0]
    371369    //   << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
  • external/fastjet/LazyTiling9.cc

    rd77b51d rd870fc5  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling9.cc 3808 2015-02-20 11:24:53Z soyez $
     2// $Id: LazyTiling9.cc 3477 2014-07-29 14:34:39Z salam $
    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     // 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;
     350    double dist = _distance_to_tile(jet, *near_tile);
    353351    // cout << "      max info looked at tile " << *near_tile - &_tiles[0]
    354352    //   << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
  • external/fastjet/LazyTiling9Alt.cc

    rd77b51d rd870fc5  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling9Alt.cc 3808 2015-02-20 11:24:53Z soyez $
     2// $Id: LazyTiling9Alt.cc 3477 2014-07-29 14:34:39Z salam $
    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     // 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;
     321    double dist = (tile.*(near_tile->second))(jet);
    324322    // cout << "      max info looked at tile " << *near_tile - &_tiles[0]
    325323    //   << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
  • external/fastjet/LazyTiling9SeparateGhosts.cc

    rd77b51d rd870fc5  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling9SeparateGhosts.cc 3808 2015-02-20 11:24:53Z soyez $
     2// $Id: LazyTiling9SeparateGhosts.cc 3596 2014-08-12 15:27:19Z 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     // 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;
     300    double dist = _distance_to_tile(jet, *near_tile);
    303301    // cout << "      max info looked at tile " << *near_tile - &_tiles[0]
    304302    //   << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
  • external/fastjet/RectangularGrid.cc

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

    rd77b51d rd870fc5  
    33
    44//FJSTARTHEADER
    5 // $Id: RectangularGrid.hh 3771 2014-12-22 21:13:22Z salam $
     5// $Id$
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    4242class TilingBase {
    4343public:
     44  virtual ~TilingBase() {}
     45
    4446  /// returns the index of the tile in which p is located, or -1 if p
    4547  /// is outside the tiling region
     
    7981  virtual bool is_initialised() const = 0;
    8082  bool is_initialized() const {return is_initialised();}
    81 
    82   /// virtual destructor
    83   virtual ~TilingBase() {}
    8483};
    8584
     
    166165  // a tile selector
    167166  Selector _tile_selector;
    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
     167  // a cached
    171168  std::vector<bool> _is_good;
    172169 
  • external/fastjet/VERSION

    rd77b51d rd870fc5  
    1 3.1.2
     13.1.0
  • external/fastjet/config_auto.h

    rd77b51d rd870fc5  
    151151/* Define to the full name and version of this package. */
    152152#ifndef FASTJET_PACKAGE_STRING
    153 #define FASTJET_PACKAGE_STRING  "FastJet 3.1.2"
     153#define FASTJET_PACKAGE_STRING  "FastJet 3.1.0"
    154154#endif
    155155
     
    161161/* Define to the version of this package. */
    162162#ifndef FASTJET_PACKAGE_VERSION
    163 #define FASTJET_PACKAGE_VERSION  "3.1.2"
     163#define FASTJET_PACKAGE_VERSION  "3.1.0"
    164164#endif
    165165
     
    171171/* Version number of package */
    172172#ifndef FASTJET_VERSION
    173 #define FASTJET_VERSION  "3.1.2"
     173#define FASTJET_VERSION  "3.1.0"
    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  30102
     188#define FASTJET_VERSION_NUMBER  30100
    189189#endif
    190190
    191191/* Patch version of this package */
    192192#ifndef FASTJET_VERSION_PATCHLEVEL
    193 #define FASTJET_VERSION_PATCHLEVEL  2
     193#define FASTJET_VERSION_PATCHLEVEL  0
    194194#endif
    195195
  • external/fastjet/config_raw.h

    rd77b51d rd870fc5  
    9292
    9393/* Define to the full name and version of this package. */
    94 #define PACKAGE_STRING "FastJet 3.1.2"
     94#define PACKAGE_STRING "FastJet 3.1.0"
    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.2"
     100#define PACKAGE_VERSION "3.1.0"
    101101
    102102/* Define to 1 if you have the ANSI C header files. */
     
    104104
    105105/* Version number of package */
    106 #define VERSION "3.1.2"
     106#define VERSION "3.1.0"
    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 30102
     115#define VERSION_NUMBER 30100
    116116
    117117/* Patch version of this package */
    118 #define VERSION_PATCHLEVEL 2
     118#define VERSION_PATCHLEVEL 0
    119119
    120120/* Pre-release version of this package */
  • external/fastjet/config_win.h

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

    rd77b51d rd870fc5  
    33
    44//FJSTARTHEADER
    5 // $Id: LazyTiling9Alt.hh 3808 2015-02-20 11:24:53Z soyez $
     5// $Id: LazyTiling9Alt.hh 3477 2014-07-29 14:34:39Z salam $
    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.
    71 const double tile_edge_security_margin=1.0e-7;
    7239
    7340/// structure analogous to BriefJet, but with the extra information
  • external/fastjet/plugins/D0RunICone/fastjet/D0RunIConePlugin.hh

    rd77b51d rd870fc5  
    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

    rd77b51d rd870fc5  
    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

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

    rd77b51d rd870fc5  
    11//FJSTARTHEADER
    2 // $Id: Filter.cc 3760 2014-12-19 10:05:10Z soyez $
     2// $Id: Filter.cc 3633 2014-08-15 13:23:52Z 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

    rd77b51d rd870fc5  
    33
    44//FJSTARTHEADER
    5 // $Id: Filter.hh 3845 2015-03-08 08:35:36Z soyez $
     5// $Id: Filter.hh 3494 2014-07-30 20:38:48Z 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_in) {_subtractor = subtractor_in;}
     144  void set_subtractor(const FunctionOfPseudoJet<PseudoJet> * subtractor) {_subtractor = subtractor;}
    145145
    146146  /// runs the filtering and sets kept and rejected to be the jets of interest
  • external/fastjet/tools/GridMedianBackgroundEstimator.hh

    rd77b51d rd870fc5  
    33
    44//FJSTARTHEADER
    5 // $Id: GridMedianBackgroundEstimator.hh 3778 2014-12-24 09:28:09Z salam $
     5// $Id: GridMedianBackgroundEstimator.hh 3610 2014-08-13 09:49:28Z 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
     97  ///  \param rapmin         the minimum rapidity extent of the grid
     98  ///  \param rapmax         the maximum rapidity extent of the grid
     99  ///  \param drap           the grid spacing in rapidity
     100  ///  \param dphi           the grid spacing in azimuth
     101  ///  \param tile_selector  optional (geometric) selector to specify
     102  ///                        which tiles are good; a tile is good if
     103  ///                        a massless 4-vector at the center of the tile passes
     104  ///                        the selection
     105  GridMedianBackgroundEstimator(double rapmin_in, double rapmax_in, double drap_in, double dphi_in,
     106                                Selector tile_selector = Selector()) :
     107    RectangularGrid(rapmin_in, rapmax_in, drap_in, dphi_in, tile_selector),
     108    _has_particles(false), _enable_rho_m(true) {}
     109
    96110  //----------------------------------------------------------------
    97111  /// Constructor based on a user's fully specified RectangularGrid
     
    102116      throw Error("attempt to construct GridMedianBackgroundEstimator with uninitialised RectangularGrid");
    103117  }   
    104 
    105   //----------------------------------------------------------------
    106   /// Constructor with the explicit parameters for the underlying
    107   /// RectangularGrid
    108   ///
    109   ///  \param rapmin         the minimum rapidity extent of the grid
    110   ///  \param rapmax         the maximum rapidity extent of the grid
    111   ///  \param drap           the grid spacing in rapidity
    112   ///  \param dphi           the grid spacing in azimuth
    113   ///  \param tile_selector  optional (geometric) selector to specify
    114   ///                        which tiles are good; a tile is good if
    115   ///                        a massless 4-vector at the center of the tile passes
    116   ///                        the selection
    117   GridMedianBackgroundEstimator(double rapmin_in, double rapmax_in, double drap_in, double dphi_in,
    118                                 Selector tile_selector = Selector()) :
    119     RectangularGrid(rapmin_in, rapmax_in, drap_in, dphi_in, tile_selector),
    120     _has_particles(false), _enable_rho_m(true) {}
    121118
    122119#else  // alternative in old framework where we didn't have the rectangular grid
  • external/fastjet/tools/Recluster.hh

    rd77b51d rd870fc5  
    22#define __FASTJET_TOOLS_RECLUSTER_HH__
    33
    4 // $Id: Recluster.hh 3760 2014-12-19 10:05:10Z soyez $
     4// $Id: Recluster.hh 3714 2014-09-30 09:47:31Z 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 from the jet being processed (unless you
     52/// systematically obtained fromn 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 new_jet_alg, double new_jet_radius, Keep keep_in = keep_only_hardest);
     126  Recluster(JetAlgorithm snew_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

    rd77b51d rd870fc5  
    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
    681690
    682691/*
     
    12151224EXTERN Tcl_Obj *        Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
    12161225EXTERN int              Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
     1226EXTERN char *           Tcl_ErrnoId _ANSI_ARGS_((void));
     1227EXTERN char *           Tcl_ErrnoMsg _ANSI_ARGS_((int err));
    12171228EXTERN int              Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
    12181229                            char *string));
     
    14021413                            char *bufPtr, int toRead));
    14031414EXTERN void             Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
     1415EXTERN int              Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
     1416                            char *cmd, int flags));
     1417EXTERN int              Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
     1418                            Tcl_Obj *cmdPtr, int flags));
    14041419EXTERN Tcl_RegExp       Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
    14051420                            char *string));
     
    14701485                            char *part1, char *part2, char *newValue,
    14711486                            int flags));
     1487EXTERN char *           Tcl_SignalId _ANSI_ARGS_((int sig));
     1488EXTERN char *           Tcl_SignalMsg _ANSI_ARGS_((int sig));
    14721489EXTERN void             Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
    14731490EXTERN int              Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
  • modules/AngularSmearing.cc

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

    rd77b51d rd870fc5  
    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
     
    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"
    3539
    3640#include "TMath.h"
     
    4246#include "TLorentzVector.h"
    4347
    44 #include <algorithm>
     48#include <algorithm> 
    4549#include <stdexcept>
    4650#include <iostream>
     
    5155//------------------------------------------------------------------------------
    5256
     57class BTaggingPartonClassifier : public ExRootClassifier
     58{
     59public:
     60
     61  BTaggingPartonClassifier() {}
     62
     63  Int_t GetCategory(TObject *object);
     64 
     65  Double_t fEtaMax, fPTMin;
     66};
     67
     68//------------------------------------------------------------------------------
     69
     70Int_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
    5386BTagging::BTagging() :
    54   fItJetInputArray(0)
    55 {
     87  fClassifier(0), fFilter(0),
     88  fItPartonInputArray(0), fItJetInputArray(0)
     89{
     90  fClassifier = new BTaggingPartonClassifier;
    5691}
    5792
     
    6095BTagging::~BTagging()
    6196{
     97  if(fClassifier) delete fClassifier;
    6298}
    6399
     
    73109  fBitNumber = GetInt("BitNumber", 0);
    74110
     111  fDeltaR = GetDouble("DeltaR", 0.5);
     112
     113  fClassifier->fPTMin = GetDouble("PartonPTMin", 1.0);
     114  fClassifier->fEtaMax = GetDouble("PartonEtaMax", 2.5);
     115
    75116  // read efficiency formulas
    76117  param = GetParam("EfficiencyFormula");
    77118  size = param.GetSize();
    78 
     119 
    79120  fEfficiencyMap.clear();
    80121  for(i = 0; i < size/2; ++i)
     
    98139  // import input array(s)
    99140
     141  fPartonInputArray = ImportArray(GetString("PartonInputArray", "Delphes/partons"));
     142  fItPartonInputArray = fPartonInputArray->MakeIterator();
     143
     144  fFilter = new ExRootFilter(fPartonInputArray);
     145 
    100146  fJetInputArray = ImportArray(GetString("JetInputArray", "FastJetFinder/jets"));
    101147  fItJetInputArray = fJetInputArray->MakeIterator();
     
    109155  DelphesFormula *formula;
    110156
     157  if(fFilter) delete fFilter;
    111158  if(fItJetInputArray) delete fItJetInputArray;
     159  if(fItPartonInputArray) delete fItPartonInputArray;
    112160
    113161  for(itEfficiencyMap = fEfficiencyMap.begin(); itEfficiencyMap != fEfficiencyMap.end(); ++itEfficiencyMap)
     
    122170void BTagging::Process()
    123171{
    124   Candidate *jet;
    125   Double_t pt, eta, phi, e;
     172  Candidate *jet, *parton;
     173  Double_t pt, eta, phi;
     174  TObjArray *partonArray;
    126175  map< Int_t, DelphesFormula * >::iterator itEfficiencyMap;
    127176  DelphesFormula *formula;
    128 
     177  Int_t pdgCode, pdgCodeMax;
     178
     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 
    129187  // loop over all input jets
    130188  fItJetInputArray->Reset();
     
    132190  {
    133191    const TLorentzVector &jetMomentum = jet->Momentum;
     192    pdgCodeMax = -1;
    134193    eta = jetMomentum.Eta();
    135194    phi = jetMomentum.Phi();
    136195    pt = jetMomentum.Pt();
    137     e = jetMomentum.E();
    138 
    139     // find an efficiency formula
    140     itEfficiencyMap = fEfficiencyMap.find(jet->Flavor);
     196
     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);
    141213    if(itEfficiencyMap == fEfficiencyMap.end())
    142214    {
     
    145217    formula = itEfficiencyMap->second;
    146218
    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;
    171   }
    172 }
    173 
    174 //------------------------------------------------------------------------------
     219    // apply an efficency formula
     220    jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta)) << fBitNumber;
     221  }
     222}
     223
     224//------------------------------------------------------------------------------
  • modules/BTagging.h

    rd77b51d rd870fc5  
    3737class DelphesFormula;
    3838
     39class ExRootFilter;
     40class BTaggingPartonClassifier;
     41
    3942class BTagging: public DelphesModule
    4043{
     
    5255  Int_t fBitNumber;
    5356
     57  Double_t fDeltaR;
     58
    5459#if !defined(__CINT__) && !defined(__CLING__)
    5560  std::map< Int_t, DelphesFormula * > fEfficiencyMap; //!
    5661#endif
    5762
     63  BTaggingPartonClassifier *fClassifier; //!
     64 
     65  ExRootFilter *fFilter;
     66
     67  TIterator *fItPartonInputArray; //!
     68 
    5869  TIterator *fItJetInputArray; //!
     70
     71  const TObjArray *fPartonInputArray; //!
    5972 
    6073  const TObjArray *fJetInputArray; //!
  • modules/CMakeLists.txt

    rd77b51d rd870fc5  
    77file(GLOB sources *.cc)
    88file(GLOB headers *.h)
    9 list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/FastJetLinkDef.h)
    109list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/ModulesLinkDef.h)
    1110list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/Pythia8LinkDef.h)
    1211
    13 DELPHES_GENERATE_DICTIONARY(FastJetDict ${headers} LINKDEF FastJetLinkDef.h)
    1412DELPHES_GENERATE_DICTIONARY(ModulesDict ${headers} LINKDEF ModulesLinkDef.h)
    1513
     
    1715list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/PileUpMergerPythia8.cc)
    1816
    19 add_library(modules OBJECT ${sources} FastJetDict.cxx ModulesDict.cxx)
     17add_library(modules OBJECT ${sources} ModulesDict.cxx)
  • modules/Calorimeter.cc

    rd77b51d rd870fc5  
    142142  }
    143143
    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;
     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*/
    150151
    151152  // read min E value for towers to be saved
     
    157158
    158159  // switch on or off the dithering of the center of calorimeter towers
    159   fSmearTowerCenter = GetBool("SmearTowerCenter", true);
     160  fDitherTowerCenter = GetBool("DitherTowerCenter", true);
    160161
    161162  // read resolution formulas
     
    355356      fTrackHCalEnergy = 0.0;
    356357
     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
    357367      fTowerTrackHits = 0;
    358368      fTowerPhotonHits = 0;
     
    370380      position = track->Position;
    371381
     382
    372383      ecalEnergy = momentum.E() * fTrackECalFractions[number];
    373384      hcalEnergy = momentum.E() * fTrackHCalFractions[number];
     
    376387      fTrackHCalEnergy += hcalEnergy;
    377388
    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       }
     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);
    385394
    386395      fTowerTrackArray->Add(track);
     
    403412    fTowerHCalEnergy += hcalEnergy;
    404413
    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     }
     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
    412420
    413421    fTower->AddCandidate(particle);
     
    426434  Double_t ecalEnergy, hcalEnergy;
    427435  Double_t ecalSigma, hcalSigma;
    428   Float_t weight, sumWeightedTime, sumWeight;
     436  Double_t ecalTime, hcalTime, time;
    429437
    430438  if(!fTower) return;
     
    436444  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    437445
     446  ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerECalTime/fTowerECalTimeWeight;
     447  hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerHCalTime/fTowerHCalTimeWeight;
     448
    438449  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
    439450  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
     
    443454
    444455  energy = ecalEnergy + hcalEnergy;
    445 
    446   if(fSmearTowerCenter)
     456  time = (TMath::Sqrt(ecalEnergy)*ecalTime + TMath::Sqrt(hcalEnergy)*hcalTime)/(TMath::Sqrt(ecalEnergy) + TMath::Sqrt(hcalEnergy));
     457
     458  if(fDitherTowerCenter)
    447459  {
    448460    eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
     
    457469  pt = energy / TMath::CosH(eta);
    458470
    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 
     471  fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time);
    482472  fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
    483473  fTower->Eem = ecalEnergy;
  • modules/Calorimeter.h

    rd77b51d rd870fc5  
    6060  Double_t fTrackECalEnergy, fTrackHCalEnergy;
    6161
    62   Double_t fTimingEnergyMin;
    63   Bool_t fElectronsFromTrack;
     62  Double_t fTowerECalTime, fTowerHCalTime;
     63  Double_t fTrackECalTime, fTrackHCalTime;
     64
     65  Double_t fTowerECalTimeWeight, fTowerHCalTimeWeight;
     66  Double_t fTrackECalTimeWeight, fTrackHCalTimeWeight;
    6467
    6568  Int_t fTowerTrackHits, fTowerPhotonHits;
     
    7174  Double_t fHCalEnergySignificanceMin;
    7275
    73   Bool_t fSmearTowerCenter;
     76  Bool_t fDitherTowerCenter;
    7477
    7578  TFractionMap fFractionMap; //!
  • modules/Efficiency.cc

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

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

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

    rd77b51d rd870fc5  
    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 
    7268using namespace std;
    7369using namespace fastjet;
     
    9692  JetDefinition::Plugin *plugin = 0;
    9793  JetDefinition::Recombiner *recomb = 0;
    98   ExRootConfParam param;
     94  NjettinessPlugin *njetPlugin = 0;
     95
     96  // read eta ranges
     97
     98  ExRootConfParam param = GetParam("RhoEtaRange");
    9999  Long_t i, size;
    100   Double_t etaMin, etaMax;
    101   TEstimatorStruct estimatorStruct;
     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  }
    102107
    103108  // define algorithm
     
    125130  fN = GetInt("N", 2);                  // used only if Njettiness is used as jet clustering algo (case 8)
    126131
    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 
    149132  // ---  Jet Area Parameters ---
    150133  fAreaAlgorithm = GetInt("AreaAlgorithm", 0);
     
    214197      break;
    215198    case 8:
    216       fNjettinessPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff);
    217       fDefinition = new JetDefinition(fNjettinessPlugin);
     199      njetPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff);
     200      fDefinition = new JetDefinition(njetPlugin);
    218201      break;
    219202  }
     
    221204  fPlugin = plugin;
    222205  fRecomb = recomb;
     206  fNjettinessPlugin = njetPlugin;
    223207
    224208  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   }
    244209
    245210  // import input array
     
    258223void FastJetFinder::Finish()
    259224{
    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 
    267225  if(fItInputArray) delete fItInputArray;
    268226  if(fDefinition) delete fDefinition;
     
    283241  Double_t time, timeWeight;
    284242  Int_t number;
    285   Int_t charge;
    286243  Double_t rho = 0.0;
    287244  PseudoJet jet, area;
     245  vector<PseudoJet> inputList, outputList;
    288246  ClusterSequence *sequence;
    289   vector< PseudoJet > inputList, outputList, subjets;
    290   vector< PseudoJet >::iterator itInputList, itOutputList;
    291   vector< TEstimatorStruct >::iterator itEstimators;
     247  map< Double_t, Double_t >::iterator itEtaRangeMap;
    292248
    293249  DelphesFactory *factory = GetFactory();
     
    320276  if(fComputeRho && fAreaDefinition)
    321277  {
    322     for(itEstimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators)
     278    for(itEtaRangeMap = fEtaRangeMap.begin(); itEtaRangeMap != fEtaRangeMap.end(); ++itEtaRangeMap)
    323279    {
    324       itEstimators->estimator->set_particles(inputList);
    325       rho = itEstimators->estimator->rho();
     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();
    326284
    327285      candidate = factory->NewCandidate();
    328286      candidate->Momentum.SetPtEtaPhiE(rho, 0.0, 0.0, rho);
    329       candidate->Edges[0] = itEstimators->etaMin;
    330       candidate->Edges[1] = itEstimators->etaMax;
     287      candidate->Edges[0] = itEtaRangeMap->first;
     288      candidate->Edges[1] = itEtaRangeMap->second;
    331289      fRhoOutputArray->Add(candidate);
    332290    }
     
    340298  detaMax = 0.0;
    341299  dphiMax = 0.0;
     300  vector<PseudoJet>::iterator itInputList, itOutputList;
    342301  for(itOutputList = outputList.begin(); itOutputList != outputList.end(); ++itOutputList)
    343302  {
     
    355314    timeWeight = 0.0;
    356315
    357     charge = 0;
    358 
    359316    inputList.clear();
    360317    inputList = sequence->constituents(*itOutputList);
     
    362319    for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList)
    363320    {
    364       if(itInputList->user_index() < 0) continue;
    365321      constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index()));
    366322
     
    373329      timeWeight += TMath::Sqrt(constituent->Momentum.E());
    374330
    375       charge += constituent->Charge;
    376 
    377331      candidate->AddCandidate(constituent);
    378332    }
     
    384338    candidate->DeltaEta = detaMax;
    385339    candidate->DeltaPhi = dphiMax;
    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  
     340
    467341    // --- compute N-subjettiness with N = 1,2,3,4,5 ----
    468342
     
    503377    }
    504378
     379
    505380    fOutputArray->Add(candidate);
    506381  }
  • modules/FastJetFinder.h

    rd77b51d rd870fc5  
    3030#include "classes/DelphesModule.h"
    3131
    32 #include <vector>
     32#include <map>
    3333
    3434class TObjArray;
     
    3838  class JetDefinition;
    3939  class AreaDefinition;
    40   class JetMedianBackgroundEstimator;
     40  class Selector;
    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 
    10585  // --- FastJet Area method --------
    10686
     
    120100  Double_t fEffectiveRfact;
    121101
    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
     102  std::map< Double_t, Double_t > fEtaRangeMap; //!
    131103
    132104  TIterator *fItInputArray; //!
  • modules/FastJetLinkDef.h

    rd77b51d rd870fc5  
    2828#include "modules/FastJetFinder.h"
    2929#include "modules/FastJetGridMedianEstimator.h"
    30 #include "modules/RunPUPPI.h"
    3130
    3231#ifdef __CINT__
     
    3837#pragma link C++ class FastJetFinder+;
    3938#pragma link C++ class FastJetGridMedianEstimator+;
    40 #pragma link C++ class RunPUPPI+;
    4139
    4240#endif
  • modules/IdentificationMap.cc

    rd77b51d rd870fc5  
    6969void IdentificationMap::Init()
    7070{
     71  // read efficiency formula
     72
     73
    7174  TMisIDMap::iterator itEfficiencyMap;
    7275  ExRootConfParam param;
     
    8487    formula->Compile(param[i*3 + 2].GetString());
    8588    pdg = param[i*3].GetInt();
    86     fEfficiencyMap.insert(make_pair(pdg, make_pair(param[i*3 + 1].GetInt(), formula)));
     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
    8793  }
    8894
     
    94100    formula->Compile("1.0");
    95101
    96     fEfficiencyMap.insert(make_pair(0, make_pair(0, formula)));
     102    fEfficiencyMap.insert(make_pair(0,make_pair(0,formula)));
    97103  }
    98104
     
    120126    if(formula) delete formula;
    121127  }
     128
    122129}
    123130
     
    127134{
    128135  Candidate *candidate;
    129   Double_t pt, eta, phi, e;
     136  Double_t pt, eta, phi;
    130137  TMisIDMap::iterator itEfficiencyMap;
    131138  pair <TMisIDMap::iterator, TMisIDMap::iterator> range;
    132139  DelphesFormula *formula;
    133   Int_t pdgCodeIn, pdgCodeOut, charge;
    134 
    135   Double_t p, r, total;
     140  Int_t pdgIn, pdgOut, charge;
     141
     142  Double_t P, Pi;
     143
     144 // cout<<"------------ New Event ------------"<<endl;
    136145
    137146  fItInputArray->Reset();
     
    143152    phi = candidatePosition.Phi();
    144153    pt = candidateMomentum.Pt();
    145     e = candidateMomentum.E();
    146    
    147     pdgCodeIn = candidate->PID;
     154    pdgIn = candidate->PID;
    148155    charge = candidate->Charge;
    149156
    150     // first check that PID of this particle is specified in the map
    151     // otherwise, look for PID = 0
    152 
    153     itEfficiencyMap = fEfficiencyMap.find(pdgCodeIn);
    154 
    155     range = fEfficiencyMap.equal_range(pdgCodeIn);
    156     if(range.first == range.second) range = fEfficiencyMap.equal_range(-pdgCodeIn);
     157   // cout<<"------------ New Candidate ------------"<<endl;
     158   // cout<<candidate->PID<<"   "<<pt<<","<<eta<<","<<phi<<endl;
     159
     160    P = 1.0;
     161
     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);
    157168    if(range.first == range.second) range = fEfficiencyMap.equal_range(0);
    158169
    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)
     170    //loop over submap for this pid
     171    for (TMisIDMap::iterator it=range.first; it!=range.second; ++it)
    164172    {
     173
    165174      formula = (it->second).second;
    166       pdgCodeOut = (it->second).first;
    167 
    168       p = formula->Eval(pt, eta, phi, e);
    169 
    170       if(total <= r && r < total + p)
     175      pdgOut = (it->second).first;
     176
     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
    171184      {
    172         // change PID of particle
    173         if(pdgCodeOut != 0) candidate->PID = charge*pdgCodeOut;
    174         fOutputArray->Add(candidate);
    175         break;
     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       }
    176196      }
    177197
    178       total += p;
    179198    }
    180   }
    181 }
    182 
    183 //------------------------------------------------------------------------------
     199
     200   }
     201
     202}
     203
     204//------------------------------------------------------------------------------
  • modules/IdentificationMap.h

    rd77b51d rd870fc5  
    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

    rd77b51d rd870fc5  
    9797  Candidate *candidate, *particle, *mother;
    9898  Double_t xd, yd, zd, dxy, sx, sy, sz, ddxy;
    99   Double_t pt, eta, px, py, phi, e;
     99  Double_t pt, eta, px, py;
    100100
    101101  fItInputArray->Reset();
     
    110110    eta = candidateMomentum.Eta();
    111111    pt = candidateMomentum.Pt();
    112     phi = candidateMomentum.Phi();
    113     e = candidateMomentum.E();
    114    
    115112    px = candidateMomentum.Px();
    116113    py = candidateMomentum.Py();
     
    122119
    123120    // calculate smeared values
    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));
     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));
    127124
    128125    xd += sx;
     
    133130    dxy = (xd*py - yd*px)/pt;
    134131
    135     ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
     132    ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta));
    136133
    137134    // fill smeared values in candidate
  • modules/Isolation.cc

    rd77b51d rd870fc5  
    2525 *  the transverse momenta fraction within (PTRatioMin, PTRatioMax].
    2626 *
    27  *  \author P. Demin, M. Selvaggi, R. Gerosa - UCL, Louvain-la-Neuve
     27 *  \author P. Demin - UCL, Louvain-la-Neuve
    2828 *
    2929 */
     
    153153  Candidate *candidate, *isolation, *object;
    154154  TObjArray *isolationArray;
    155   Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr;
     155  Double_t sum, ratio;
    156156  Int_t counter;
    157157  Double_t eta = 0.0;
    158158  Double_t rho = 0.0;
    159159
     160  if(fRhoInputArray && fRhoInputArray->GetEntriesFast() > 0)
     161  {
     162    candidate = static_cast<Candidate*>(fRhoInputArray->At(0));
     163    rho = candidate->Momentum.Pt();
     164  }
     165
    160166  // select isolation objects
    161167  fFilter->Reset();
     
    172178    const TLorentzVector &candidateMomentum = candidate->Momentum;
    173179    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    }
    174196
    175197    // find rho
     
    187209    }
    188210
    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;
     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
    248217    fOutputArray->Add(candidate);
    249218  }
  • modules/JetPileUpSubtractor.cc

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

    rd77b51d rd870fc5  
    2929
    3030#include "modules/AngularSmearing.h"
    31 #include "modules/PhotonConversions.h"
    3231#include "modules/ParticlePropagator.h"
    3332#include "modules/Efficiency.h"
     
    5150#include "modules/JetPileUpSubtractor.h"
    5251#include "modules/TrackPileUpSubtractor.h"
    53 #include "modules/TaggingParticlesSkimmer.h"
    5452#include "modules/PileUpJetID.h"
    5553#include "modules/ConstituentFilter.h"
     
    5957#include "modules/Weighter.h"
    6058#include "modules/Hector.h"
    61 #include "modules/JetFlavorAssociation.h"
    62 #include "modules/JetFakeParticle.h"
    6359#include "modules/ExampleModule.h"
    6460
     
    7268
    7369#pragma link C++ class AngularSmearing+;
    74 #pragma link C++ class PhotonConversions+;
    7570#pragma link C++ class ParticlePropagator+;
    7671#pragma link C++ class Efficiency+;
     
    9489#pragma link C++ class JetPileUpSubtractor+;
    9590#pragma link C++ class TrackPileUpSubtractor+;
    96 #pragma link C++ class TaggingParticlesSkimmer+;
    9791#pragma link C++ class PileUpJetID+;
    9892#pragma link C++ class ConstituentFilter+;
     
    10296#pragma link C++ class Weighter+;
    10397#pragma link C++ class Hector+;
    104 #pragma link C++ class JetFlavorAssociation+;
    105 #pragma link C++ class JetFakeParticle+;
    10698#pragma link C++ class ExampleModule+;
    10799
  • modules/MomentumSmearing.cc

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

    rd77b51d rd870fc5  
    7474  fPTMin = GetDouble("PTMin", 0.0);
    7575
    76   fInvertPdg = GetBool("InvertPdg", false);
    77 
    78   fRequireStatus = GetBool("RequireStatus", false);
    79   fStatus = GetInt("Status", 1);
    80 
    8176  // import input array
    8277  fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles"));
     
    114109  Double_t pt;
    115110
    116   const Bool_t requireStatus = fRequireStatus;
    117   const Bool_t invertPdg = fInvertPdg;
    118   const int reqStatus = fStatus;
    119 
    120111  fItInputArray->Reset();
    121112  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     
    125116    pt = candidateMomentum.Pt();
    126117
    127     if(pt < fPTMin) continue;
    128     if(requireStatus && (candidate->Status != reqStatus)) continue;
     118    pass = kTRUE;
    129119
    130     pass = kTRUE;
     120    if(pt < fPTMin) pass = kFALSE;
    131121    if(find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE;
    132122
    133     if (invertPdg) pass = !pass;
    134123    if(pass) fOutputArray->Add(candidate);
    135124  }
  • modules/PdgCodeFilter.h

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

    rd77b51d rd870fc5  
     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
    119
    220/** \class PileUpJetID
    321 *
    4  *  CMS PileUp Jet ID Variables
    5  *
    6  *  \author S. Zenz
     22 *  CMS PileUp Jet ID Variables, based on http://cds.cern.ch/record/1581583
     23 *
     24 *  \author S. Zenz, December 2013
    725 *
    826 */
     
    2341#include "TRandom3.h"
    2442#include "TObjArray.h"
    25 //#include "TDatabasePDG.h"
     43#include "TDatabasePDG.h"
    2644#include "TLorentzVector.h"
    2745
     
    3654
    3755PileUpJetID::PileUpJetID() :
    38   fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0)
     56  fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0),fItVertexInputArray(0)
    3957{
    4058
     
    5270void PileUpJetID::Init()
    5371{
    54 
    5572  fJetPTMin = GetDouble("JetPTMin", 20.0);
    5673  fParameterR = GetDouble("ParameterR", 0.5);
    5774  fUseConstituents = GetInt("UseConstituents", 0);
    5875
    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 
    6776  fAverageEachTower = false; // for timing
    6877
     
    7281  fItJetInputArray = fJetInputArray->MakeIterator();
    7382
    74   fTrackInputArray = ImportArray(GetString("TrackInputArray", "ParticlePropagator/tracks"));
     83  fTrackInputArray = ImportArray(GetString("TrackInputArray", "Calorimeter/eflowTracks"));
    7584  fItTrackInputArray = fTrackInputArray->MakeIterator();
    7685
    77   fNeutralInputArray = ImportArray(GetString("NeutralInputArray", "ParticlePropagator/tracks"));
     86  fNeutralInputArray = ImportArray(GetString("NeutralInputArray", "Calorimeter/eflowTowers"));
    7887  fItNeutralInputArray = fNeutralInputArray->MakeIterator();
    7988
     89  fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices"));
     90  fItVertexInputArray = fVertexInputArray->MakeIterator();
     91
     92  fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
     93
    8094  // create output array(s)
    8195
    8296  fOutputArray = ExportArray(GetString("OutputArray", "jets"));
    83 
    84   fNeutralsInPassingJets = ExportArray(GetString("NeutralsInPassingJets","eflowtowers"));
    85 
    8697}
    8798
     
    90101void PileUpJetID::Finish()
    91102{
    92   //  cout << "In finish" << endl;
    93 
    94103  if(fItJetInputArray) delete fItJetInputArray;
    95104  if(fItTrackInputArray) delete fItTrackInputArray;
    96105  if(fItNeutralInputArray) delete fItNeutralInputArray;
    97 
     106  if(fItVertexInputArray) delete fItVertexInputArray;
    98107}
    99108
     
    104113  Candidate *candidate, *constituent;
    105114  TLorentzVector momentum, area;
    106 
    107   Candidate *trk;
     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  }
    108133
    109134  // loop over all input candidates
     
    114139    area = candidate->Area;
    115140
    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) {
     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    {
    140157      TIter itConstituents(candidate->GetCandidates());
    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 {
     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    {
    194195      // Not using constituents, using dr
    195196      fItTrackInputArray->Reset();
    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       }
     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
    217226      fItNeutralInputArray->Reset();
    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.) {
     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    {
    243260      candidate->MeanSqDeltaR = sumdrsqptsq/sumptsq;
    244     } else {
    245       candidate->MeanSqDeltaR = -999.;
     261    }
     262    else
     263    {
     264      candidate->MeanSqDeltaR = -999.0;
    246265    }
    247266    candidate->NCharged = nc;
    248267    candidate->NNeutrals = nn;
    249     if (sumpt > 0.) {
     268    if(sumpt > 0.0)
     269    {
    250270      candidate->PTD = TMath::Sqrt(sumptsq) / sumpt;
    251       for (int i = 0 ; i < 5 ; i++) {
     271      for(i = 0; i < 5; ++i)
     272      {
    252273        candidate->FracPt[i] = pt_ann[i]/sumpt;
    253274      }
    254     } else {
    255       candidate->PTD = -999.;
    256       for (int i = 0 ; i < 5 ; i++) {
    257         candidate->FracPt[i] = -999.;
     275    }
     276    else
     277    {
     278      candidate->PTD = -999.0;
     279      for(i = 0; i < 5; ++i)
     280      {
     281        candidate->FracPt[i] = -999.0;
    258282      }
    259283    }
    260284
    261285    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 
    307286  }
    308287}
    309288
    310289//------------------------------------------------------------------------------
     290
  • modules/PileUpJetID.h

    rd77b51d rd870fc5  
     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
    119#ifndef PileUpJetID_h
    220#define PileUpJetID_h
     
    422/** \class PileUpJetID
    523 *
    6  *  CMS PileUp Jet ID Variables
     24 *  CMS PileUp Jet ID Variables, based on http://cds.cern.ch/record/1581583
    725 *
    8  *  \author S. Zenz
     26 *  \author S. Zenz, December 2013
    927 *
    1028 */
     
    1634
    1735class TObjArray;
    18 class DelphesFormula;
    1936
    2037class PileUpJetID: public DelphesModule
     
    3451  Double_t fParameterR;
    3552
    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   /*
    46 JAY
    47 ---
    48 
    49 |Eta|<1.5
    50 
    51 meanSqDeltaR betaStar SigEff BgdEff
    52 0.13 0.92 96% 8%
    53 0.13 0.95 97% 16%
    54 0.13 0.97 98% 27%
    55 
    56 |Eta|>1.5
    57 
    58 meanSqDeltaR betaStar SigEff BgdEff
    59 0.14 0.91 95% 15%
    60 0.14 0.94 97% 19%
    61 0.14 0.97 98% 29%
    62 
    63 BRYAN
    64 -----
    65 
    66 Barrel (MeanSqDR, Beta, sig eff, bg eff):
    67 0.10, 0.08, 90%, 8%
    68 0.11, 0.12, 90%, 6%
    69 0.13, 0.16, 89%, 5%
    70 
    71 Endcap (MeanSqDR, Beta, sig eff, bg eff):
    72 0.07, 0.06, 89%, 4%
    73 0.08, 0.08, 92%, 6%
    74 0.09, 0.08, 95%, 10%
    75 0.10, 0.08, 97%, 13%
    76 
    77 SETH GUESSES FOR |eta| > 4.0
    78 ----------------------------
    79 
    80 MeanSqDeltaR
    81 0.07
    82 0.10
    83 0.14
    84 0.2
    85   */
    86 
    8753  // If set to true, may have weird results for PFCHS
    8854  // If set to false, uses everything within dR < fParameterR even if in other jets &c.
    8955  // Results should be very similar for PF
    90   Int_t fUseConstituents; 
     56  Int_t fUseConstituents;
    9157
    9258  Bool_t fAverageEachTower;
     
    9662  const TObjArray *fJetInputArray; //!
    9763
    98   const TObjArray *fTrackInputArray; // SCZ
    99   const TObjArray *fNeutralInputArray;
     64  const TObjArray *fTrackInputArray; //!
     65  const TObjArray *fNeutralInputArray; //!
    10066
    101   TIterator *fItTrackInputArray; // SCZ
    102   TIterator *fItNeutralInputArray; // SCZ
     67  TIterator *fItTrackInputArray; //!
     68  TIterator *fItNeutralInputArray; //!
    10369
    10470  TObjArray *fOutputArray; //!
    105   TObjArray *fNeutralsInPassingJets; // SCZ
    10671
     72  TIterator *fItVertexInputArray; //!
     73  const TObjArray *fVertexInputArray; //!
    10774
    108   ClassDef(PileUpJetID, 2)
     75  Double_t fZVertexResolution;
     76
     77  ClassDef(PileUpJetID, 1)
    10978};
    11079
    11180#endif
     81
  • modules/PileUpMerger.cc

    rd77b51d rd870fc5  
    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 
    8782  // read vertex smearing formula
    8883
     
    116111  TParticlePDG *pdgParticle;
    117112  Int_t pid;
    118   Float_t x, y, z, t, vx, vy;
     113  Float_t x, y, z, t;
    119114  Float_t px, py, pz, e;
    120115  Double_t dz, dphi, dt;
    121   Int_t numberOfEvents, event, numberOfParticles;
     116  Int_t numberOfEvents, event;
    122117  Long64_t allEntries, entry;
    123   Candidate *candidate, *vertex;
     118  Candidate *candidate, *vertexcandidate;
    124119  DelphesFactory *factory;
    125120
     
    128123  fItInputArray->Reset();
    129124
    130   // --- Deal with primary vertex first  ------
     125  // --- Deal with Primary vertex first  ------
    131126
    132127  fFunction->GetRandom2(dz, dt);
     
    134129  dt *= c_light*1.0E3; // necessary in order to make t in mm/c
    135130  dz *= 1.0E3; // necessary in order to make z in mm
    136   vx = 0.0;
    137   vy = 0.0;
    138   numberOfParticles = fInputArray->GetEntriesFast();
     131
    139132  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    140133  {
    141     vx += candidate->Position.X();
    142     vy += candidate->Position.Y();
    143134    z = candidate->Position.Z();
    144135    t = candidate->Position.T();
     
    148139  }
    149140
    150   if(numberOfParticles > 0)
    151   {
    152     vx /= numberOfParticles;
    153     vy /= numberOfParticles;
    154   }
    155 
    156141  factory = GetFactory();
    157142
    158   vertex = factory->NewCandidate();
    159   vertex->Position.SetXYZT(vx, vy, dz, dt);
    160   fVertexOutputArray->Add(vertex);
     143  vertexcandidate = factory->NewCandidate();
     144  vertexcandidate->Position.SetXYZT(0.0, 0.0, dz, dt);
     145  fVertexOutputArray->Add(vertexcandidate);
    161146
    162147  // --- Then with pile-up vertices  ------
     
    196181    dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi());
    197182
    198     vx = 0.0;
    199     vy = 0.0;
    200     numberOfParticles = 0;
     183    vertexcandidate = factory->NewCandidate();
     184    vertexcandidate->Position.SetXYZT(0.0, 0.0, dz, dt);
     185    vertexcandidate->IsPU = 1;
     186
     187    fVertexOutputArray->Add(vertexcandidate);
     188
    201189    while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e))
    202190    {
     
    216204      candidate->Momentum.RotateZ(dphi);
    217205
    218       x -= fInputBeamSpotX;
    219       y -= fInputBeamSpotY;
    220206      candidate->Position.SetXYZT(x, y, z + dz, t + dt);
    221207      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;
    227208
    228209      fParticleOutputArray->Add(candidate);
    229210    }
    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);
    242211  }
    243212}
    244213
    245214//------------------------------------------------------------------------------
     215
  • modules/PileUpMerger.h

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

    rd77b51d rd870fc5  
    2121 *  Merges particles from pile-up sample into event
    2222 *
    23  *  \author M. Selvaggi - UCL, Louvain-la-Neuve
     23 *  \author P. Selvaggi - UCL, Louvain-la-Neuve
    2424 *
    2525 */
     
    2929#include "classes/DelphesClasses.h"
    3030#include "classes/DelphesFactory.h"
    31 #include "classes/DelphesTF2.h"
     31#include "classes/DelphesFormula.h"
    3232#include "classes/DelphesPileUpReader.h"
    3333
     
    5656
    5757PileUpMergerPythia8::PileUpMergerPythia8() :
    58   fFunction(0), fPythia(0), fItInputArray(0)
     58  fPythia(0), fItInputArray(0)
    5959{
    60   fFunction = new DelphesTF2;
    6160}
    6261
     
    6564PileUpMergerPythia8::~PileUpMergerPythia8()
    6665{
    67   delete fFunction;
    6866}
    6967
     
    7472  const char *fileName;
    7573
    76   fPileUpDistribution = GetInt("PileUpDistribution", 0);
    77 
    7874  fMeanPileUp  = GetDouble("MeanPileUp", 10);
    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);
     75  fZVertexSpread = GetDouble("ZVertexSpread", 0.05)*1.0E3;
    8776
    8877  fPTMin = GetDouble("PTMin", 0.0);
    89 
    90   fFunction->Compile(GetString("VertexDistributionFormula", "0.0"));
    91   fFunction->SetRange(-fZVertexSpread, -fTVertexSpread, fZVertexSpread, fTVertexSpread);
    9278
    9379  fileName = GetString("ConfigFile", "MinBias.cmnd");
     
    10086
    10187  // create output arrays
    102   fParticleOutputArray = ExportArray(GetString("ParticleOutputArray", "stableParticles"));
    103   fVertexOutputArray = ExportArray(GetString("VertexOutputArray", "vertices"));
     88  fOutputArray = ExportArray(GetString("OutputArray", "stableParticles"));
    10489}
    10590
     
    117102  TDatabasePDG *pdg = TDatabasePDG::Instance();
    118103  TParticlePDG *pdgParticle;
    119   Int_t pid, status;
    120   Float_t x, y, z, t, vx, vy;
     104  Int_t pid;
     105  Float_t x, y, z, t;
    121106  Float_t px, py, pz, e;
    122   Double_t dz, dphi, dt;
    123   Int_t numberOfEvents, event, numberOfParticles, i;
    124   Candidate *candidate, *vertex;
     107  Double_t dz, dphi;
     108  Int_t poisson, event, i;
     109  Candidate *candidate;
    125110  DelphesFactory *factory;
    126111
    127   const Double_t c_light = 2.99792458E8;
    128 
    129112  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();
    140113  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    141114  {
    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;
     115    fOutputArray->Add(candidate);
    155116  }
    156117
    157118  factory = GetFactory();
    158119
    159   vertex = factory->NewCandidate();
    160   vertex->Position.SetXYZT(vx, vy, dz, dt);
    161   fVertexOutputArray->Add(vertex);
     120  poisson = gRandom->Poisson(fMeanPileUp);
    162121
    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)
     122  for(event = 0; event < poisson; ++event)
    179123  {
    180124    while(!fPythia->next());
    181125
    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 
     126    dz = gRandom->Gaus(0.0, fZVertexSpread);
    189127    dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi());
    190128
    191     vx = 0.0;
    192     vy = 0.0;
    193     numberOfParticles = fPythia->event.size();
    194     for(i = 1; i < numberOfParticles; ++i)
     129    for(i = 1; i < fPythia->event.size(); ++i)
    195130    {
    196131      Pythia8::Particle &particle = fPythia->event[i];
    197132
    198       status = particle.statusHepMC();
    199 
    200       if(status != 1 || !particle.isVisible() || particle.pT() <= fPTMin) continue;
     133      if(particle.status() != 1 || !particle.isVisible() || particle.pT() <= fPTMin) continue;
    201134
    202135      pid = particle.id();
     
    219152      candidate->Momentum.RotateZ(dphi);
    220153
    221       x -= fInputBeamSpotX;
    222       y -= fInputBeamSpotY;
    223       candidate->Position.SetXYZT(x, y, z + dz, t + dt);
     154      candidate->Position.SetXYZT(x, y, z + dz, t);
    224155      candidate->Position.RotateZ(dphi);
    225       candidate->Position += TLorentzVector(fOutputBeamSpotX, fOutputBeamSpotY, 0.0, 0.0);
    226156
    227       vx += candidate->Position.X();
    228       vy += candidate->Position.Y();
    229 
    230       fParticleOutputArray->Add(candidate);
     157      fOutputArray->Add(candidate);
    231158    }
    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);
    244159  }
    245160}
    246161
    247162//------------------------------------------------------------------------------
     163
  • modules/PileUpMergerPythia8.h

    rd77b51d rd870fc5  
    3131
    3232class TObjArray;
    33 class DelphesTF2;
    3433
    3534namespace Pythia8
     
    5150private:
    5251
    53   Int_t fPileUpDistribution;
    5452  Double_t fMeanPileUp;
    55 
    5653  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 
    6454  Double_t fPTMin;
    65 
    66   DelphesTF2 *fFunction; //!
    6755
    6856  Pythia8::Pythia *fPythia; //!
     
    7260  const TObjArray *fInputArray; //!
    7361
    74   TObjArray *fParticleOutputArray; //!
    75   TObjArray *fVertexOutputArray; //!
     62  TObjArray *fOutputArray; //!
    7663
    7764  ClassDef(PileUpMergerPythia8, 1)
  • modules/SimpleCalorimeter.cc

    rd77b51d rd870fc5  
    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 
    155152  // switch on or off the dithering of the center of calorimeter towers
    156   fSmearTowerCenter = GetBool("SmearTowerCenter", true);
     153  fDitherTowerCenter = GetBool("DitherTowerCenter", true);
    157154
    158155  // read resolution formulas
     
    412409  if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0;
    413410
    414   if(fSmearTowerCenter)
     411  if(fDitherTowerCenter)
    415412  {
    416413    eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
     
    427424  fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time);
    428425  fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
    429 
    430   fTower->Eem = (!fIsEcal) ? 0 : energy;
    431   fTower->Ehad = (fIsEcal) ? 0 : energy;
    432426
    433427  fTower->Edges[0] = fTowerEdges[0];
     
    453447    pt = energy / TMath::CosH(eta);
    454448
    455     tower->Eem = (!fIsEcal) ? 0 : energy;
    456     tower->Ehad = (fIsEcal) ? 0 : energy;
    457 
    458449    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
    459450    fEFlowTowerOutputArray->Add(tower);
  • modules/SimpleCalorimeter.h

    rd77b51d rd870fc5  
    1 
    21/*
    32 *  Delphes: a framework for fast simulation of a generic collider experiment
     
    7372  Double_t fEnergySignificanceMin;
    7473
    75   Bool_t fSmearTowerCenter;
    76 
    77   Bool_t fIsEcal; //!
     74  Bool_t fDitherTowerCenter;
    7875
    7976  TFractionMap fFractionMap; //!
  • modules/TauTagging.cc

    rd77b51d rd870fc5  
    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"
    3539
    3640#include "TMath.h"
     
    4953using namespace std;
    5054
     55//------------------------------------------------------------------------------
     56
     57class TauTaggingPartonClassifier : public ExRootClassifier
     58{
     59public:
     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};
    5169
    5270//------------------------------------------------------------------------------
     
    6179{
    6280  Candidate *tau = static_cast<Candidate *>(object);
    63   Candidate *daughter1 = 0;
    64   Candidate *daughter2 = 0;
    65  
     81  Candidate *daughter = 0;
    6682  const TLorentzVector &momentum = tau->Momentum;
    67   Int_t pdgCode, i, j;
     83  Int_t pdgCode, i;
    6884
    6985  pdgCode = TMath::Abs(tau->PID);
     
    7490  if(tau->D1 < 0) return -1;
    7591
    76   if(tau->D2 < tau->D1) return -1;
    77 
    7892  if(tau->D1 >= fParticleInputArray->GetEntriesFast() ||
    7993     tau->D2 >= fParticleInputArray->GetEntriesFast())
     
    8498  for(i = tau->D1; i <= tau->D2; ++i)
    8599  {
    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     }
     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;
    100103  }
    101104
     
    203206  tauArray = fFilter->GetSubArray(fClassifier, 0);
    204207
     208  if(tauArray == 0) return;
     209
     210  TIter itTauArray(tauArray);
     211
    205212  // loop over all input jets
    206213  fItJetInputArray->Reset();
     
    215222
    216223    // loop over all input taus
    217     if(tauArray){
    218       TIter itTauArray(tauArray);
    219       while((tau = static_cast<Candidate *>(itTauArray.Next())))
     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())
    220231      {
    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         }
     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;
    243248      }
    244249    }
  • modules/TauTagging.h

    rd77b51d rd870fc5  
    3131
    3232#include "classes/DelphesModule.h"
    33 #include "ExRootAnalysis/ExRootResult.h"
    34 #include "ExRootAnalysis/ExRootFilter.h"
    35 #include "ExRootAnalysis/ExRootClassifier.h"
    3633
    3734#include <map>
     
    7976};
    8077
    81 
    82 //------------------------------------------------------------------------------
    83 
    84 class TauTaggingPartonClassifier : public ExRootClassifier
    85 {
    86 public:
    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 
    9878#endif
  • modules/TrackPileUpSubtractor.cc

    rd77b51d rd870fc5  
    7474  fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
    7575
    76   fPTMin = GetDouble("PTMin", 0.);
    7776  // import arrays with output from other modules
    78    
     77
    7978  ExRootConfParam param = GetParam("InputArray");
    8079  Long_t i, size;
     
    148147      // assume perfect pile-up subtraction for tracks outside fZVertexResolution
    149148     
    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       }
     149      if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) continue;
     150
     151      array->Add(candidate);
    156152    }
    157153  }
  • modules/TrackPileUpSubtractor.h

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

    rd77b51d rd870fc5  
    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;
    365364
    366365    FillParticles(candidate, &entry->Particles);
     
    404403    entry->T = position.T()*1.0E-3/c_light;
    405404
    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 
    415405    entry->EhadOverEem = candidate->Eem > 0.0 ? candidate->Ehad/candidate->Eem : 999.9;
    416406
     
    452442    entry->T = position.T()*1.0E-3/c_light;
    453443
    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 
    464444    entry->Charge = candidate->Charge;
    465445
     
    489469    const TLorentzVector &momentum = candidate->Momentum;
    490470    const TLorentzVector &position = candidate->Position;
     471
    491472
    492473    pt = momentum.Pt();
     
    507488    entry->T = position.T()*1.0E-3/c_light;
    508489
    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 
    518490    entry->Charge = candidate->Charge;
    519491
     
    532504  Double_t ecalEnergy, hcalEnergy;
    533505  const Double_t c_light = 2.99792458E8;
    534   Int_t i;
    535506
    536507  array->Sort();
     
    561532    entry->Mass = momentum.M();
    562533
    563     entry->Area = candidate->Area;
    564 
    565534    entry->DeltaEta = candidate->DeltaEta;
    566535    entry->DeltaPhi = candidate->DeltaPhi;
    567536
    568     entry->Flavor = candidate->Flavor;
    569     entry->FlavorAlgo = candidate->FlavorAlgo;
    570     entry->FlavorPhys = candidate->FlavorPhys;
    571 
    572537    entry->BTag = candidate->BTag;
    573 
    574     entry->BTagAlgo = candidate->BTagAlgo;
    575     entry->BTagPhys = candidate->BTagPhys;
    576 
    577538    entry->TauTag = candidate->TauTag;
    578539
     
    600561    entry->MeanSqDeltaR = candidate->MeanSqDeltaR;
    601562    entry->PTD = candidate->PTD;
    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 
     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   
    618577    FillParticles(candidate, &entry->Particles);
    619578  }
  • modules/UniqueObjectFinder.cc

    rd77b51d rd870fc5  
    7474  TIterator *iterator;
    7575
    76   fInputMap.clear();
    77 
    7876  size = param.GetSize();
    7977  for(i = 0; i < size/2; ++i)
     
    8280    iterator = array->MakeIterator();
    8381
    84     fInputMap.push_back(make_pair(iterator, ExportArray(param[i*2 + 1].GetString())));
     82    fInputMap[iterator] = ExportArray(param[i*2 + 1].GetString());
    8583  }
    8684}
     
    9088void UniqueObjectFinder::Finish()
    9189{
    92   vector< pair< TIterator *, TObjArray * > >::iterator itInputMap;
     90  map< TIterator *, TObjArray * >::iterator itInputMap;
    9391  TIterator *iterator;
    9492
     
    106104{
    107105  Candidate *candidate;
    108   vector< pair< TIterator *, TObjArray * > >::iterator itInputMap;
     106  map< TIterator *, TObjArray * >::iterator itInputMap;
    109107  TIterator *iterator;
    110108  TObjArray *array;
     
    130128//------------------------------------------------------------------------------
    131129
    132 Bool_t UniqueObjectFinder::Unique(Candidate *candidate, vector< pair< TIterator *, TObjArray * > >::iterator itInputMap)
     130Bool_t UniqueObjectFinder::Unique(Candidate *candidate, map< TIterator *, TObjArray * >::iterator itInputMap)
    133131{
    134132  Candidate *previousCandidate;
    135   vector< pair< TIterator *, TObjArray * > >::iterator previousItInputMap;
     133  map< TIterator *, TObjArray * >::iterator previousItInputMap;
    136134  TObjArray *array;
    137135
  • modules/UniqueObjectFinder.h

    rd77b51d rd870fc5  
    3030#include "classes/DelphesModule.h"
    3131
    32 #include <vector>
    33 #include <utility>
     32#include <map>
    3433
    3534class TIterator;
     
    5049private:
    5150
    52   Bool_t Unique(Candidate *candidate, std::vector< std::pair< TIterator *, TObjArray * > >::iterator itInputMap);
     51  Bool_t Unique(Candidate *candidate, std::map< TIterator *, TObjArray * >::iterator itInputMap);
    5352
    54   std::vector< std::pair< TIterator *, TObjArray * > > fInputMap; //!
     53  std::map< TIterator *, TObjArray * > fInputMap; //!
    5554
    5655  ClassDef(UniqueObjectFinder, 1)
  • readers/DelphesCMSFWLite.cpp

    rd77b51d rd870fc5  
    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"
    6058
    6159using namespace std;
     
    6462
    6563void ConvertInput(fwlite::Event &event, Long64_t eventCounter,
    66   ExRootTreeBranch *branchEvent, ExRootTreeBranch *branchRwgt,
    67   DelphesFactory *factory, TObjArray *allParticleOutputArray,
    68   TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray)
     64  ExRootTreeBranch *branchEvent, DelphesFactory *factory,
     65  TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray,
     66  TObjArray *partonOutputArray)
    6967{
    7068  fwlite::Handle< GenEventInfoProduct > handleGenEventInfo;
    7169
    72   fwlite::Handle< LHEEventProduct > handleLHEEvent;
    73 
    7470  fwlite::Handle< vector< reco::GenParticle > > handleParticle;
    7571  vector< reco::GenParticle >::const_iterator itParticle;
     
    7975
    8076  handleGenEventInfo.getByLabel(event, "generator");
    81   handleLHEEvent.getByLabel(event, "source");
    8277  handleParticle.getByLabel(event, "genParticles");
    8378
    8479  HepMCEvent *element;
    85   Weight *weight;
    8680  Candidate *candidate;
    8781  TDatabasePDG *pdg;
     
    9286  Double_t px, py, pz, e, mass;
    9387  Double_t x, y, z;
    94 
    95   const vector< gen::WeightsInfo > &vectorWeightsInfo = handleLHEEvent->weights();
    96   vector< gen::WeightsInfo >::const_iterator itWeightsInfo;
    9788
    9889  element = static_cast<HepMCEvent *>(branchEvent->NewEntry());
     
    117108  element->ReadTime = 0.0;
    118109  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   }
    125110
    126111  pdg = TDatabasePDG::Instance();
     
    201186  TStopwatch eventStopWatch;
    202187  ExRootTreeWriter *treeWriter = 0;
    203   ExRootTreeBranch *branchEvent = 0, *branchRwgt = 0;
     188  ExRootTreeBranch *branchEvent = 0;
    204189  ExRootConfReader *confReader = 0;
    205190  Delphes *modularDelphes = 0;
     
    241226
    242227    branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class());
    243     branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class());
    244228
    245229    confReader = new ExRootConfReader;
     
    284268      for(event.toBegin(); !event.atEnd() && !interrupted; ++event)
    285269      {
    286         ConvertInput(event, eventCounter, branchEvent, branchRwgt, factory,
     270        ConvertInput(event, eventCounter, branchEvent, factory,
    287271          allParticleOutputArray, stableParticleOutputArray, partonOutputArray);
    288272        modularDelphes->ProcessTask();
  • readers/DelphesLHEF.cpp

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

    rd77b51d rd870fc5  
    2020#include <iostream>
    2121#include <sstream>
    22 #include <string>
    2322
    2423#include <signal.h>
     
    3938#include "classes/DelphesClasses.h"
    4039#include "classes/DelphesFactory.h"
    41 #include "classes/DelphesLHEFReader.h"
    4240
    4341#include "ExRootAnalysis/ExRootTreeWriter.h"
     
    151149  char appName[] = "DelphesPythia8";
    152150  stringstream message;
    153   FILE *inputFile = 0;
    154151  TFile *outputFile = 0;
    155152  TStopwatch readStopWatch, procStopWatch;
    156153  ExRootTreeWriter *treeWriter = 0;
    157154  ExRootTreeBranch *branchEvent = 0;
    158   ExRootTreeBranch *branchEventLHEF = 0, *branchWeightLHEF = 0;
    159155  ExRootConfReader *confReader = 0;
    160156  Delphes *modularDelphes = 0;
    161157  DelphesFactory *factory = 0;
    162158  TObjArray *stableParticleOutputArray = 0, *allParticleOutputArray = 0, *partonOutputArray = 0;
    163   TObjArray *stableParticleOutputArrayLHEF = 0, *allParticleOutputArrayLHEF = 0, *partonOutputArrayLHEF = 0;
    164   DelphesLHEFReader *reader = 0;
    165159  Long64_t eventCounter, errorCounter;
    166160  Long64_t numberOfEvents, timesAllowErrors;
     
    211205    partonOutputArray = modularDelphes->ExportArray("partons");
    212206
    213     // Initialize Pythia
     207    modularDelphes->InitTask();
     208
     209    // Initialize pythia
    214210    pythia = new Pythia8::Pythia;
    215211
     
    225221    numberOfEvents = pythia->mode("Main:numberOfEvents");
    226222    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();
    243223
    244224    pythia->init();
     
    254234    for(eventCounter = 0; eventCounter < numberOfEvents && !interrupted; ++eventCounter)
    255235    {
    256       while(reader && reader->ReadBlock(factory, allParticleOutputArrayLHEF,
    257         stableParticleOutputArrayLHEF, partonOutputArrayLHEF) && !reader->EventReady());
    258 
    259236      if(!pythia->next())
    260237      {
    261238        // If failure because reached end of file then exit event loop
    262         if(pythia->info.atEndOfFile())
     239        if (pythia->info.atEndOfFile())
    263240        {
    264241          cerr << "Aborted since reached end of Les Houches Event File" << endl;
     
    267244
    268245        // First few failures write off as "acceptable" errors, then quit
    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;
     246        if (++errorCounter < timesAllowErrors) continue;
     247        cerr << "Event generation aborted prematurely, owing to error!" << endl;
     248        break;
    278249      }
    279250
     
    287258      procStopWatch.Stop();
    288259
    289       if(reader)
    290       {
    291         reader->AnalyzeEvent(branchEventLHEF, eventCounter, &readStopWatch, &procStopWatch);
    292         reader->AnalyzeWeight(branchWeightLHEF);
    293       }
    294 
    295260      treeWriter->Fill();
    296261
    297262      treeWriter->Clear();
    298263      modularDelphes->Clear();
    299       if(reader) reader->Clear();
    300264
    301265      readStopWatch.Start();
     
    313277    cout << "** Exiting..." << endl;
    314278
    315     delete reader;
    316279    delete pythia;
    317280    delete modularDelphes;
Note: See TracChangeset for help on using the changeset viewer.