Changes in / [d77b51d:d870fc5] in git
- 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.23 - added a detector card for the ILD detector (for ILC) based on http://arxiv.org/abs/1306.63294 - adapted examples, EventDisplay, DelphesFormula and DelphesTF2 to ROOT 6.045 - fixed tau-tagging for events without tau (thanks to Sho Iwamoto)6 - added PhotonConversions module7 - added TaggingParticlesSkimmer module8 - added phi and energy dependence to AngularSmearing, BTagging, Efficiency, EnergyScale, EnergySmearing, IdentificationMap, ImpactParameterSmearing and MomentumSmearing9 - added IsRecoPU flag and PTMin parameter to TrackPileUpSubtractor10 - 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 PileUpMergerPythia813 - added timing information to Calorimeter14 - added new PileUpJetID version (thanks to Seth Senz)15 - added Area 4-vector to jet class16 - added PUPPI algorithm and RunPUPPI module17 - added RecursiveTools package from fastjet contribs18 - replaced N-subjettiness with an array in Jet class (same as in Candidate class)19 - added Trimming, Pruning and SoftDrop to FastJetFinder20 - added possibility to use DelphesPythia8 with LHE files21 - added Pythia8 examples22 - added JetFlavourAssociation module with Physics and Algorithmic definitions of the jet flavor23 - added new jet flavor definitions to the BTagging module (available only when running DelphesPythia8 with LHE files)24 25 1 3.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) 45 15 46 16 3.1.2: 47 -fixed smearing of (z,t) vertex distribution in the PileUpMerger module17 fixed smearing of (z,t) vertex distribution in the PileUpMerger module 48 18 49 19 3.1.1: 50 -adapted DelphesSTDHEP to the latest version of the STDHEP format introduced in MadGraph5_aMC@NLO 2.1.220 adapted DelphesSTDHEP to the latest version of the STDHEP format introduced in MadGraph5_aMC@NLO 2.1.2 51 21 52 22 3.1.0: 53 23 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) 59 29 60 30 3.0.12: 61 -updated FastJet library to 3.0.662 -added smearing of (z,t) vertex distribution in the PileUpMerger module63 -propagation time computed for every output collection64 -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) 66 36 67 37 3.0.11: 68 -new energy-flow algorithm, optimized for better compatibility with pile-up subtraction69 -added possibility of computing pile-up density in different eta regions via the RhoEtaRange parameter in FastJetFinder module70 -implemented correct efficiency/resolution for high pt muons in CMS cards71 -removed pile-up subtraction on missing energy72 -added possibility to read re-weighting information from LHEF input files73 -added UsePTSum and PTSumMax parameters to isolation module74 -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 tree38 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 76 46 77 47 3.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 distribution85 -improved particle-flow algorithm (#204)86 -added calculation of particle propagation time in the tracker87 -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 files48 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 92 62 93 63 3.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) 97 67 98 68 3.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-axis69 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 103 73 104 74 3.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 module107 -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 29 29 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH))) 30 30 endif 31 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormats Common -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon31 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils 32 32 endif 33 33 … … 40 40 ifneq ($(PYTHIA8),) 41 41 #HAS_PYTHIA8 = true 42 CXXFLAGS += -I$(PYTHIA8)/include43 CXXFLAGS += -I$(PYTHIA8)/include/Pythia844 OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl42 #CXXFLAGS += -I$(PYTHIA8)/include 43 #CXXFLAGS += -I$(PYTHIA8)/include/Pythia8 44 #OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl 45 45 endif 46 46 … … 257 257 classes/DelphesClasses.h \ 258 258 classes/DelphesFactory.h \ 259 classes/DelphesLHEFReader.h \260 259 external/ExRootAnalysis/ExRootTreeWriter.h \ 261 260 external/ExRootAnalysis/ExRootTreeBranch.h \ … … 309 308 modules/Delphes.h \ 310 309 modules/AngularSmearing.h \ 311 modules/PhotonConversions.h \312 310 modules/ParticlePropagator.h \ 313 311 modules/Efficiency.h \ … … 331 329 modules/JetPileUpSubtractor.h \ 332 330 modules/TrackPileUpSubtractor.h \ 333 modules/TaggingParticlesSkimmer.h \334 331 modules/PileUpJetID.h \ 335 332 modules/ConstituentFilter.h \ … … 339 336 modules/Weighter.h \ 340 337 modules/Hector.h \ 341 modules/JetFlavorAssociation.h \342 modules/JetFakeParticle.h \343 338 modules/ExampleModule.h 344 339 ModulesDict$(PcmSuf): \ … … 358 353 modules/FastJetLinkDef.h \ 359 354 modules/FastJetFinder.h \ 360 modules/FastJetGridMedianEstimator.h \ 361 modules/RunPUPPI.h 355 modules/FastJetGridMedianEstimator.h 362 356 FastJetDict$(PcmSuf): \ 363 357 tmp/modules/FastJetDict$(PcmSuf) \ … … 392 386 classes/DelphesFactory.h \ 393 387 classes/SortableObject.h 394 tmp/classes/DelphesCylindricalFormula.$(ObjSuf): \395 classes/DelphesCylindricalFormula.$(SrcSuf) \396 classes/DelphesCylindricalFormula.h397 388 tmp/classes/DelphesFactory.$(ObjSuf): \ 398 389 classes/DelphesFactory.$(SrcSuf) \ … … 543 534 classes/DelphesClasses.h \ 544 535 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 546 540 tmp/modules/Calorimeter.$(ObjSuf): \ 547 541 modules/Calorimeter.$(SrcSuf) \ … … 657 651 external/ExRootAnalysis/ExRootFilter.h \ 658 652 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.h668 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.h677 653 tmp/modules/JetPileUpSubtractor.$(ObjSuf): \ 678 654 modules/JetPileUpSubtractor.$(SrcSuf) \ … … 729 705 external/ExRootAnalysis/ExRootFilter.h \ 730 706 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.h740 707 tmp/modules/PileUpJetID.$(ObjSuf): \ 741 708 modules/PileUpJetID.$(SrcSuf) \ … … 762 729 classes/DelphesClasses.h \ 763 730 classes/DelphesFactory.h \ 764 classes/Delphes TF2.h \731 classes/DelphesFormula.h \ 765 732 classes/DelphesPileUpReader.h \ 766 733 external/ExRootAnalysis/ExRootResult.h \ … … 785 752 external/ExRootAnalysis/ExRootFilter.h \ 786 753 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.h797 754 tmp/modules/TauTagging.$(ObjSuf): \ 798 755 modules/TauTagging.$(SrcSuf) \ … … 800 757 classes/DelphesClasses.h \ 801 758 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 803 763 tmp/modules/TimeSmearing.$(ObjSuf): \ 804 764 modules/TimeSmearing.$(SrcSuf) \ … … 855 815 DELPHES_OBJ += \ 856 816 tmp/classes/DelphesClasses.$(ObjSuf) \ 857 tmp/classes/DelphesCylindricalFormula.$(ObjSuf) \858 817 tmp/classes/DelphesFactory.$(ObjSuf) \ 859 818 tmp/classes/DelphesFormula.$(ObjSuf) \ … … 916 875 tmp/modules/ImpactParameterSmearing.$(ObjSuf) \ 917 876 tmp/modules/Isolation.$(ObjSuf) \ 918 tmp/modules/JetFakeParticle.$(ObjSuf) \919 tmp/modules/JetFlavorAssociation.$(ObjSuf) \920 877 tmp/modules/JetPileUpSubtractor.$(ObjSuf) \ 921 878 tmp/modules/LeptonDressing.$(ObjSuf) \ … … 924 881 tmp/modules/ParticlePropagator.$(ObjSuf) \ 925 882 tmp/modules/PdgCodeFilter.$(ObjSuf) \ 926 tmp/modules/PhotonConversions.$(ObjSuf) \927 883 tmp/modules/PileUpJetID.$(ObjSuf) \ 928 884 tmp/modules/PileUpMerger.$(ObjSuf) \ 929 885 tmp/modules/SimpleCalorimeter.$(ObjSuf) \ 930 886 tmp/modules/StatusPidFilter.$(ObjSuf) \ 931 tmp/modules/TaggingParticlesSkimmer.$(ObjSuf) \932 887 tmp/modules/TauTagging.$(ObjSuf) \ 933 888 tmp/modules/TimeSmearing.$(ObjSuf) \ … … 943 898 endif 944 899 945 tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf): \946 external/PUPPI/puppiCleanContainer.$(SrcSuf) \947 external/fastjet/Selector.hh948 900 tmp/external/fastjet/AreaDefinition.$(ObjSuf): \ 949 901 external/fastjet/AreaDefinition.$(SrcSuf) \ … … 1119 1071 tmp/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(ObjSuf): \ 1120 1072 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.hh1125 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.hh1131 tmp/external/fastjet/contribs/RecursiveTools/SoftDrop.$(ObjSuf): \1132 external/fastjet/contribs/RecursiveTools/SoftDrop.$(SrcSuf)1133 1073 tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf): \ 1134 1074 external/fastjet/contribs/SoftKiller/SoftKiller.$(SrcSuf) … … 1264 1204 external/fastjet/contribs/Nsubjettiness/Njettiness.hh \ 1265 1205 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 1270 1207 tmp/modules/FastJetGridMedianEstimator.$(ObjSuf): \ 1271 1208 modules/FastJetGridMedianEstimator.$(SrcSuf) \ … … 1292 1229 external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \ 1293 1230 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.h1304 1231 FASTJET_OBJ += \ 1305 tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf) \1306 1232 tmp/external/fastjet/AreaDefinition.$(ObjSuf) \ 1307 1233 tmp/external/fastjet/BasicRandom.$(ObjSuf) \ … … 1350 1276 tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf) \ 1351 1277 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) \1356 1278 tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf) \ 1357 1279 tmp/external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(ObjSuf) \ … … 1397 1319 tmp/external/fastjet/tools/TopTaggerBase.$(ObjSuf) \ 1398 1320 tmp/modules/FastJetFinder.$(ObjSuf) \ 1399 tmp/modules/FastJetGridMedianEstimator.$(ObjSuf) \ 1400 tmp/modules/RunPUPPI.$(ObjSuf) 1321 tmp/modules/FastJetGridMedianEstimator.$(ObjSuf) 1401 1322 1402 1323 ifeq ($(HAS_PYTHIA8),true) … … 1408 1329 display/Delphes3DGeometry.$(SrcSuf) \ 1409 1330 display/Delphes3DGeometry.h \ 1410 classes/DelphesClasses.h \1411 external/ExRootAnalysis/ExRootConfReader.h1331 external/ExRootAnalysis/ExRootConfReader.h \ 1332 classes/DelphesClasses.h 1412 1333 tmp/display/DelphesBranchElement.$(ObjSuf): \ 1413 1334 display/DelphesBranchElement.$(SrcSuf) \ … … 1422 1343 tmp/display/DelphesEventDisplay.$(ObjSuf): \ 1423 1344 display/DelphesEventDisplay.$(SrcSuf) \ 1345 external/ExRootAnalysis/ExRootConfReader.h \ 1346 external/ExRootAnalysis/ExRootTreeReader.h \ 1424 1347 display/DelphesCaloData.h \ 1425 1348 display/DelphesBranchElement.h \ 1426 1349 display/Delphes3DGeometry.h \ 1427 1350 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 1435 1352 tmp/display/DelphesHtmlSummary.$(ObjSuf): \ 1436 1353 display/DelphesHtmlSummary.$(SrcSuf) \ … … 1479 1396 tmp/external/tcl/tclHash.$(ObjSuf): \ 1480 1397 external/tcl/tclHash.c 1398 tmp/external/tcl/tclHistory.$(ObjSuf): \ 1399 external/tcl/tclHistory.c 1481 1400 tmp/external/tcl/tclIndexObj.$(ObjSuf): \ 1482 1401 external/tcl/tclIndexObj.c … … 1491 1410 tmp/external/tcl/tclParse.$(ObjSuf): \ 1492 1411 external/tcl/tclParse.c 1412 tmp/external/tcl/tclPosixStr.$(ObjSuf): \ 1413 external/tcl/tclPosixStr.c 1493 1414 tmp/external/tcl/tclPreserve.$(ObjSuf): \ 1494 1415 external/tcl/tclPreserve.c … … 1517 1438 tmp/external/tcl/tclGet.$(ObjSuf) \ 1518 1439 tmp/external/tcl/tclHash.$(ObjSuf) \ 1440 tmp/external/tcl/tclHistory.$(ObjSuf) \ 1519 1441 tmp/external/tcl/tclIndexObj.$(ObjSuf) \ 1520 1442 tmp/external/tcl/tclLink.$(ObjSuf) \ … … 1523 1445 tmp/external/tcl/tclObj.$(ObjSuf) \ 1524 1446 tmp/external/tcl/tclParse.$(ObjSuf) \ 1447 tmp/external/tcl/tclPosixStr.$(ObjSuf) \ 1525 1448 tmp/external/tcl/tclPreserve.$(ObjSuf) \ 1526 1449 tmp/external/tcl/tclProc.$(ObjSuf) \ … … 1615 1538 @touch $@ 1616 1539 1540 external/fastjet/Selector.hh: \ 1541 external/fastjet/PseudoJet.hh \ 1542 external/fastjet/RangeDefinition.hh 1543 @touch $@ 1544 1617 1545 external/fastjet/internal/Dnn2piCylinder.hh: \ 1618 1546 external/fastjet/internal/DynamicNearestNeighbours.hh \ 1619 1547 external/fastjet/internal/DnnPlane.hh \ 1620 1548 external/fastjet/internal/numconsts.hh 1621 @touch $@1622 1623 external/fastjet/Selector.hh: \1624 external/fastjet/PseudoJet.hh \1625 external/fastjet/RangeDefinition.hh1626 1549 @touch $@ 1627 1550 … … 1679 1602 @touch $@ 1680 1603 1681 modules/JetFakeParticle.h: \1682 classes/DelphesModule.h1683 @touch $@1684 1685 1604 external/fastjet/ClusterSequence1GhostPassiveArea.hh: \ 1686 1605 external/fastjet/PseudoJet.hh \ … … 1715 1634 external/fastjet/internal/numconsts.hh \ 1716 1635 external/fastjet/Error.hh 1717 @touch $@1718 1719 modules/RunPUPPI.h: \1720 classes/DelphesModule.h1721 1636 @touch $@ 1722 1637 … … 1757 1672 @touch $@ 1758 1673 1674 display/DelphesEventDisplay.h: \ 1675 external/ExRootAnalysis/ExRootTreeReader.h \ 1676 display/DelphesDisplay.h \ 1677 display/Delphes3DGeometry.h \ 1678 display/DelphesHtmlSummary.h \ 1679 display/DelphesPlotSummary.h 1680 @touch $@ 1681 1759 1682 modules/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 1764 1684 @touch $@ 1765 1685 … … 1799 1719 @touch $@ 1800 1720 1801 modules/JetFlavorAssociation.h: \1802 classes/DelphesModule.h \1803 classes/DelphesClasses.h1804 @touch $@1805 1806 1721 modules/ParticlePropagator.h: \ 1807 1722 classes/DelphesModule.h … … 1832 1747 @touch $@ 1833 1748 1834 modules/PhotonConversions.h: \1835 classes/DelphesModule.h1836 @touch $@1837 1838 1749 external/fastjet/ClusterSequenceVoronoiArea.hh: \ 1839 1750 external/fastjet/PseudoJet.hh \ … … 1842 1753 @touch $@ 1843 1754 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.hh1850 @touch $@1851 1852 1755 modules/BTagging.h: \ 1853 1756 classes/DelphesModule.h … … 1872 1775 1873 1776 modules/Weighter.h: \ 1874 classes/DelphesModule.h1875 @touch $@1876 1877 modules/TaggingParticlesSkimmer.h: \1878 1777 classes/DelphesModule.h 1879 1778 @touch $@ … … 2064 1963 @echo ">> Building $(DISTTAR)" 2065 1964 @mkdir -p $(DISTDIR) 2066 @cp -a CHANGELOG C MakeLists.txt COPYING CREDITS DelphesEnv.sh README README_4LHCb VERSION Makefile MinBias.pileupconfigure 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) 2067 1966 @find $(DISTDIR) -depth -name .\* -exec rm -rf {} \; 2068 1967 @tar -czf $(DISTTAR) $(DISTDIR) -
README
rd77b51d rd870fc5 39 39 40 40 https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook 41 42 43 Configure Delphes on lxplus.cern.ch44 ====================================45 46 git clone git://github.com/delphes/delphes.git Delphes47 48 cd Delphes49 50 source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.32/x86_64-slc6-gcc48-opt/root/bin/thisroot51 52 make53 41 54 42 -
README_4LHCb
rd77b51d rd870fc5 2 2 ============== 3 3 4 The card "delphes_card_ LHCb.tcl" contains a preliminary parametrization of the LHCb detector.4 The card "delphes_card_prelLHCb.tcl" contains a preliminary parametrization of the LHCb detector. 5 5 6 6 - ParticlePropagator … … 24 24 - IdentificationMap 25 25 26 This module is a recent addition in order to map particle misi dentification rates26 This module is a recent addition in order to map particle misindentification rates 27 27 and reconstruction efficiencies. 28 28 … … 46 46 1) Compile: 47 47 48 make48 make 49 49 50 50 2) Simulate p p -> b b~ events 51 51 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 55 56 56 57 57 58 For more details, please visit: 58 59 59 60 https://cp3.irmp.ucl.ac.be/projects/delphes 60 61 61 62 -
cards/delphes_card_ATLAS.tcl
rd77b51d rd870fc5 34 34 35 35 JetEnergyScale 36 37 JetFlavorAssociation38 36 39 37 BTagging … … 79 77 80 78 # 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) + \ 86 84 (abs(eta) > 2.5) * (0.00)} 87 85 } … … 98 96 99 97 # 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) + \ 107 105 (abs(eta) > 2.5) * (0.00)} 108 106 } … … 119 117 120 118 # 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) + \ 126 124 (abs(eta) > 2.5) * (0.00)} 127 125 } … … 138 136 139 137 # 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) + \ 147 145 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)} 148 146 } … … 158 156 # set ResolutionFormula {resolution formula as a function of eta and energy} 159 157 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) + \ 163 161 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 164 162 … … 176 174 177 175 # 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) + \ 185 183 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.10)} 186 184 } … … 209 207 set PhotonOutputArray photons 210 208 209 set ECalEnergyMin 0.50 210 set HCalEnergyMin 1.00 211 212 set ECalEnergySignificanceMin 1.0 213 set HCalEnergySignificanceMin 1.0 214 211 215 set EFlowTrackOutputArray eflowTracks 212 216 set EFlowPhotonOutputArray eflowPhotons 213 217 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 214 215 set ECalEnergyMin 0.5216 set HCalEnergyMin 1.0217 218 set ECalEnergySignificanceMin 1.0219 set HCalEnergySignificanceMin 1.0220 221 set SmearTowerCenter true222 218 223 219 set pi [expr {acos(-1)}] … … 269 265 # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 270 266 # 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) + \ 272 268 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)} 273 269 … … 275 271 # http://arxiv.org/pdf/hep-ex/0004009v1 276 272 # 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) + \ 279 275 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)} 280 276 } … … 297 293 298 294 module Efficiency PhotonEfficiency { 299 set InputArray Calorimeter/ eflowPhotons295 set InputArray Calorimeter/photons 300 296 set OutputArray photons 301 297 … … 303 299 304 300 # 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) + \ 308 304 (abs(eta) > 2.5) * (0.00)} 309 305 } … … 337 333 338 334 # 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) + \ 342 338 (abs(eta) > 2.5) * (0.00)} 343 339 } … … 371 367 372 368 # 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) + \ 376 372 (abs(eta) > 2.7) * (0.00)} 377 373 } … … 423 419 424 420 module PdgCodeFilter NeutrinoFilter { 425 421 426 422 set InputArray Delphes/stableParticles 427 423 set OutputArray filteredParticles 428 424 429 425 set PTMin 0.0 430 426 431 427 add PdgCode {12} 432 428 add PdgCode {14} … … 479 475 set OutputArray jets 480 476 481 # scale formula for jets 477 # scale formula for jets 482 478 set ScaleFormula { sqrt( (3.0 - 0.2*(abs(eta)))^2 / pt + 1.0 ) } 483 }484 485 ########################486 # Jet Flavor Association487 ########################488 489 module JetFlavorAssociation JetFlavorAssociation {490 491 set PartonInputArray Delphes/partons492 set ParticleInputArray Delphes/allParticles493 set ParticleLHEFInputArray Delphes/allParticlesLHEF494 set JetInputArray JetEnergyScale/jets495 496 set DeltaR 0.5497 set PartonPTMin 1.0498 set PartonEtaMax 2.5499 500 479 } 501 480 … … 505 484 506 485 module BTagging BTagging { 486 set PartonInputArray Delphes/partons 507 487 set JetInputArray JetEnergyScale/jets 508 488 509 489 set BitNumber 0 490 491 set DeltaR 0.5 492 493 set PartonPTMin 1.0 494 495 set PartonEtaMax 2.5 510 496 511 497 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt} … … 517 503 518 504 # 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)) + \ 522 508 (abs(eta) > 2.5) * (0.000)} 523 509 524 510 # 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)) + \ 528 514 (abs(eta) > 2.5) * (0.000)} 529 515 } 530 531 #############532 # tau-tagging533 #############534 516 535 517 module TauTagging TauTagging { -
cards/delphes_card_ATLAS_PileUp.tcl
rd77b51d rd870fc5 22 22 EFlowMergerAllTracks 23 23 EFlowMerger 24 24 25 25 NeutrinoFilter 26 26 GenJetFinder … … 42 42 43 43 MissingET 44 45 JetFlavorAssociation46 44 47 45 BTagging … … 81 79 set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))} 82 80 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) + \ 86 84 # (abs(t) > 1.0e-09) * (abs(z) > 0.15) * (0.00)} 87 85 … … 121 119 122 120 # 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) + \ 128 126 (abs(eta) > 2.5) * (0.00)} 129 127 } … … 140 138 141 139 # 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) + \ 149 147 (abs(eta) > 2.5) * (0.00)} 150 148 } … … 161 159 162 160 # 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) + \ 168 166 (abs(eta) > 2.5) * (0.00)} 169 167 } … … 180 178 181 179 # 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) + \ 189 187 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)} 190 188 } … … 200 198 # set ResolutionFormula {resolution formula as a function of eta and energy} 201 199 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) + \ 205 203 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 206 204 … … 218 216 219 217 # 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) + \ 227 225 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.10)} 228 226 } … … 251 249 set PhotonOutputArray photons 252 250 251 set ECalEnergyMin 0.50 252 set HCalEnergyMin 1.00 253 254 set ECalEnergySignificanceMin 1.0 255 set HCalEnergySignificanceMin 1.0 256 253 257 set EFlowTrackOutputArray eflowTracks 254 258 set EFlowPhotonOutputArray eflowPhotons 255 259 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 256 257 set ECalEnergyMin 0.5258 set HCalEnergyMin 1.0259 260 set ECalEnergySignificanceMin 1.0261 set HCalEnergySignificanceMin 1.0262 263 set SmearTowerCenter true264 260 265 261 set pi [expr {acos(-1)}] … … 311 307 # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 312 308 # 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) + \ 314 310 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)} 315 311 … … 317 313 # http://arxiv.org/pdf/hep-ex/0004009v1 318 314 # 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) + \ 321 317 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)} 322 318 } … … 378 374 379 375 module FastJetGridMedianEstimator Rho { 380 376 381 377 set InputArray Calorimeter/towers 382 378 set RhoOutputArray rho 383 379 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 393 384 394 385 } … … 400 391 401 392 module PdgCodeFilter NeutrinoFilter { 402 393 403 394 set InputArray Delphes/stableParticles 404 395 set OutputArray filteredParticles 405 396 406 397 set PTMin 0.0 407 398 408 399 add PdgCode {12} 409 400 add PdgCode {14} … … 480 471 481 472 module Efficiency PhotonEfficiency { 482 set InputArray Calorimeter/ eflowPhotons473 set InputArray Calorimeter/photons 483 474 set OutputArray photons 484 475 … … 486 477 487 478 # 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) + \ 491 482 (abs(eta) > 2.5) * (0.00)} 492 483 } … … 521 512 522 513 # 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) + \ 526 517 (abs(eta) > 2.5) * (0.00)} 527 518 } … … 556 547 557 548 # 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) + \ 561 552 (abs(eta) > 2.7) * (0.00)} 562 553 } … … 604 595 } 605 596 606 ########################607 # Jet Flavor Association608 ########################609 610 module JetFlavorAssociation JetFlavorAssociation {611 612 set PartonInputArray Delphes/partons613 set ParticleInputArray Delphes/allParticles614 set ParticleLHEFInputArray Delphes/allParticlesLHEF615 set JetInputArray JetEnergyScale/jets616 617 set DeltaR 0.5618 set PartonPTMin 1.0619 set PartonEtaMax 2.5620 621 }622 623 597 ########### 624 598 # b-tagging … … 626 600 627 601 module BTagging BTagging { 602 set PartonInputArray Delphes/partons 628 603 set JetInputArray JetEnergyScale/jets 629 604 630 605 set BitNumber 0 606 607 set DeltaR 0.5 608 609 set PartonPTMin 1.0 610 611 set PartonEtaMax 2.5 631 612 632 613 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt} … … 638 619 639 620 # 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)) + \ 643 624 (abs(eta) > 2.5) * (0.000)} 644 625 645 626 # 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)) + \ 649 630 (abs(eta) > 2.5) * (0.000)} 650 631 } 651 652 #############653 # tau-tagging654 #############655 632 656 633 module TauTagging TauTagging { … … 716 693 717 694 } 695 696 697 -
cards/delphes_card_CMS.tcl
rd77b51d rd870fc5 34 34 35 35 JetEnergyScale 36 37 JetFlavorAssociation38 36 39 37 BTagging … … 79 77 80 78 # 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) + \ 86 84 (abs(eta) > 2.5) * (0.00)} 87 85 } … … 98 96 99 97 # 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) + \ 107 105 (abs(eta) > 2.5) * (0.00)} 108 106 } … … 119 117 120 118 # 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) + \ 126 124 (abs(eta) > 2.5) * (0.00)} 127 125 } … … 138 136 139 137 # 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) + \ 147 145 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)} 148 146 } … … 159 157 160 158 # 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) + \ 164 162 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 165 163 … … 177 175 178 176 # 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) + \ 190 188 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4)} 191 189 } … … 214 212 set PhotonOutputArray photons 215 213 214 set ECalEnergyMin 0.5 215 set HCalEnergyMin 1.0 216 217 set ECalEnergySignificanceMin 1.0 218 set HCalEnergySignificanceMin 1.0 219 216 220 set EFlowTrackOutputArray eflowTracks 217 221 set EFlowPhotonOutputArray eflowPhotons 218 222 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 219 220 set ECalEnergyMin 0.5221 set HCalEnergyMin 1.0222 223 set ECalEnergySignificanceMin 1.0224 set HCalEnergySignificanceMin 1.0225 226 set SmearTowerCenter true227 223 228 224 set pi [expr {acos(-1)}] … … 280 276 281 277 # 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) + \ 283 279 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 284 280 285 281 # 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) + \ 287 283 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} 288 284 } … … 311 307 312 308 # 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) + \ 316 312 (abs(eta) > 2.5) * (0.00)} 317 313 } … … 345 341 346 342 # 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) + \ 350 346 (abs(eta) > 2.5) * (0.00)} 351 347 } … … 379 375 380 376 # 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)) + \ 386 382 (abs(eta) > 2.4) * (0.00)} 387 383 } … … 433 429 434 430 module PdgCodeFilter NeutrinoFilter { 435 431 436 432 set InputArray Delphes/stableParticles 437 433 set OutputArray filteredParticles 438 434 439 435 set PTMin 0.0 440 436 441 437 add PdgCode {12} 442 438 add PdgCode {14} … … 466 462 467 463 464 465 468 466 ############ 469 467 # Jet finder … … 495 493 } 496 494 497 ########################498 # Jet Flavor Association499 ########################500 501 module JetFlavorAssociation JetFlavorAssociation {502 503 set PartonInputArray Delphes/partons504 set ParticleInputArray Delphes/allParticles505 set ParticleLHEFInputArray Delphes/allParticlesLHEF506 set JetInputArray JetEnergyScale/jets507 508 set DeltaR 0.5509 set PartonPTMin 1.0510 set PartonEtaMax 2.5511 512 }513 514 495 ########### 515 496 # b-tagging … … 517 498 518 499 module BTagging BTagging { 500 set PartonInputArray Delphes/partons 519 501 set JetInputArray JetEnergyScale/jets 520 502 521 503 set BitNumber 0 504 505 set DeltaR 0.5 506 507 set PartonPTMin 1.0 508 509 set PartonEtaMax 2.5 522 510 523 511 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt} … … 530 518 531 519 # 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)) + \ 535 523 (abs(eta) > 2.5) * (0.000)} 536 524 537 525 # 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)) + \ 541 529 (abs(eta) > 2.5) * (0.000)} 542 530 } 543 544 #############545 # tau-tagging546 #############547 531 548 532 module TauTagging TauTagging { … … 605 589 add Branch ScalarHT/energy ScalarHT ScalarHT 606 590 } 591 -
cards/delphes_card_CMS_NoFastJet.tcl
rd77b51d rd870fc5 51 51 52 52 # 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) + \ 58 58 (abs(eta) > 2.5) * (0.00)} 59 59 } … … 70 70 71 71 # 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) + \ 79 79 (abs(eta) > 2.5) * (0.00)} 80 80 } … … 91 91 92 92 # 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) + \ 98 98 (abs(eta) > 2.5) * (0.00)} 99 99 } … … 110 110 111 111 # 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) + \ 119 119 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)} 120 120 } … … 131 131 132 132 # 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) + \ 136 136 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 137 137 … … 149 149 150 150 # 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) + \ 162 162 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4)} 163 163 } … … 186 186 set PhotonOutputArray photons 187 187 188 set ECalEnergyMin 0.5 189 set HCalEnergyMin 1.0 190 191 set ECalEnergySignificanceMin 1.0 192 set HCalEnergySignificanceMin 1.0 193 188 194 set EFlowTrackOutputArray eflowTracks 189 195 set EFlowPhotonOutputArray eflowPhotons 190 196 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 191 192 set ECalEnergyMin 0.5193 set HCalEnergyMin 1.0194 195 set ECalEnergySignificanceMin 1.0196 set HCalEnergySignificanceMin 1.0197 198 set SmearTowerCenter true199 197 200 198 set pi [expr {acos(-1)}] … … 252 250 253 251 # 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) + \ 255 253 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 256 254 257 255 # 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) + \ 259 257 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} 260 258 } … … 271 269 set OutputArray eflow 272 270 } 271 272 -
cards/delphes_card_CMS_PileUp.tcl
rd77b51d rd870fc5 22 22 EFlowMergerAllTracks 23 23 EFlowMerger 24 24 25 25 NeutrinoFilter 26 26 GenJetFinder … … 43 43 44 44 MissingET 45 46 JetFlavorAssociation47 45 48 46 BTagging … … 82 80 set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))} 83 81 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) + \ 87 85 # (abs(t) > 1.0e-09) * (abs(z) > 0.15) * (0.00)} 88 86 … … 122 120 123 121 # 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) + \ 129 127 (abs(eta) > 2.5) * (0.00)} 130 128 } … … 141 139 142 140 # 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) + \ 150 148 (abs(eta) > 2.5) * (0.00)} 151 149 } … … 162 160 163 161 # 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) + \ 169 167 (abs(eta) > 2.5) * (0.00)} 170 168 } … … 181 179 182 180 # 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) + \ 190 188 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)} 191 189 } … … 202 200 203 201 # 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) + \ 207 205 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 208 206 … … 220 218 221 219 # 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) + \ 233 231 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4)} 234 232 } … … 257 255 set PhotonOutputArray photons 258 256 257 set ECalEnergyMin 0.5 258 set HCalEnergyMin 1.0 259 260 set ECalEnergySignificanceMin 1.0 261 set HCalEnergySignificanceMin 1.0 262 259 263 set EFlowTrackOutputArray eflowTracks 260 264 set EFlowPhotonOutputArray eflowPhotons 261 265 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 262 263 set ECalEnergyMin 0.5264 set HCalEnergyMin 1.0265 266 set ECalEnergySignificanceMin 1.0267 set HCalEnergySignificanceMin 1.0268 269 set SmearTowerCenter true270 266 271 267 set pi [expr {acos(-1)}] … … 323 319 324 320 # 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) + \ 326 322 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 327 323 328 324 # 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) + \ 330 326 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} 331 327 } … … 390 386 391 387 module FastJetGridMedianEstimator Rho { 392 388 393 389 set InputArray EFlowMerger/eflow 394 390 set RhoOutputArray rho 395 391 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 404 395 add GridRange 2.5 5.0 1.0 1.0 405 396 … … 411 402 412 403 module PdgCodeFilter NeutrinoFilter { 413 404 414 405 set InputArray Delphes/stableParticles 415 406 set OutputArray filteredParticles 416 407 417 408 set PTMin 0.0 418 409 419 410 add PdgCode {12} 420 411 add PdgCode {14} … … 522 513 523 514 # 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) + \ 527 518 (abs(eta) > 2.5) * (0.00)} 528 519 } … … 558 549 559 550 # 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) + \ 563 554 (abs(eta) > 2.5) * (0.00)} 564 555 } … … 593 584 594 585 # 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)) + \ 600 591 (abs(eta) > 2.4) * (0.00)} 601 592 } … … 644 635 } 645 636 646 ########################647 # Jet Flavor Association648 ########################649 650 module JetFlavorAssociation JetFlavorAssociation {651 652 set PartonInputArray Delphes/partons653 set ParticleInputArray Delphes/allParticles654 set ParticleLHEFInputArray Delphes/allParticlesLHEF655 set JetInputArray JetEnergyScale/jets656 657 set DeltaR 0.5658 set PartonPTMin 1.0659 set PartonEtaMax 2.5660 661 }662 663 637 ########### 664 638 # b-tagging … … 666 640 667 641 module BTagging BTagging { 642 set PartonInputArray Delphes/partons 668 643 set JetInputArray JetEnergyScale/jets 669 644 670 645 set BitNumber 0 646 647 set DeltaR 0.5 648 649 set PartonPTMin 1.0 650 651 set PartonEtaMax 2.5 671 652 672 653 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt} … … 679 660 680 661 # 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)) + \ 684 665 (abs(eta) > 2.5) * (0.000)} 685 666 686 667 # 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)) + \ 690 671 (abs(eta) > 2.5) * (0.000)} 691 672 } 692 693 #############694 # tau-tagging695 #############696 673 697 674 module TauTagging TauTagging { … … 756 733 add Branch PileUpMerger/vertices Vertex Vertex 757 734 } 735 -
cards/delphes_card_FCC_basic.tcl
rd77b51d rd870fc5 17 17 AngularSmearing 18 18 ImpactParameterSmearing 19 19 20 20 ECal 21 21 HCal 22 22 23 23 TowerMerger 24 24 EFlowMerger 25 25 26 26 MissingET 27 27 28 28 NeutrinoFilter 29 29 GenJetFinder … … 31 31 32 32 JetEnergyScale 33 33 34 34 TrackCountingBTagging 35 35 TauTagging … … 72 72 73 73 # 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) + \ 79 79 (abs(eta) > 4.0) * (0.00)} 80 80 81 81 } 82 82 … … 92 92 93 93 # 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) + \ 99 99 (abs(eta) > 4.0) * (0.00)} 100 100 } … … 111 111 112 112 # 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) + \ 118 118 (abs(eta) > 4.0) * (0.00)} 119 119 } … … 130 130 131 131 # 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) + \ 133 133 (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1) * (0.02 + pt*3.e-5)} 134 134 … … 147 147 148 148 # 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) + \ 151 151 (abs(eta) > 4.0 && abs(eta) <= 6.0) * sqrt(energy^2*0.05^2 + energy*1.00^2)} 152 152 … … 164 164 165 165 # 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) + \ 167 167 (abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1) * (0.02 + pt*1.e-5)} 168 168 … … 210 210 211 211 # 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) + \ 213 213 (pt > 5.0) * (0.005)} 214 214 … … 225 225 set TowerOutputArray ecalTowers 226 226 set EFlowTowerOutputArray eflowPhotons 227 228 set IsEcal true 229 227 230 228 set EnergyMin 0.5 231 229 set EnergySignificanceMin 1.0 232 233 set SmearTowerCenter true 234 230 235 231 set pi [expr {acos(-1)}] 236 232 … … 238 234 # each list starts with the lower edge of the first tower 239 235 # the list ends with the higher edged of the last tower 240 236 241 237 # 0.5 degree towers 242 238 set PhiBins {} … … 250 246 add EtaPhiBins $eta $PhiBins 251 247 } 252 248 253 249 # default energy fractions {abs(PDG code)} {fraction of energy deposited in ECAL} 254 250 255 251 add EnergyFraction {0} {0.0} 256 252 # energy fractions for e, gamma and pi0 … … 273 269 274 270 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 275 271 276 272 # 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) + \ 278 274 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 279 275 280 276 281 277 } 282 278 … … 291 287 set TowerOutputArray hcalTowers 292 288 set EFlowTowerOutputArray eflowNeutralHadrons 293 294 set IsEcal false 295 289 296 290 set EnergyMin 1.0 297 291 set EnergySignificanceMin 1.0 298 299 set SmearTowerCenter true 300 292 301 293 set pi [expr {acos(-1)}] 302 294 … … 304 296 # each list starts with the lower edge of the first tower 305 297 # the list ends with the higher edged of the last tower 306 307 298 299 308 300 # 5 degree towers 309 301 set PhiBins {} … … 317 309 add EtaPhiBins $eta $PhiBins 318 310 } 319 320 311 312 321 313 # default energy fractions {abs(PDG code)} {Fecal Fhcal} 322 314 add EnergyFraction {0} {1.0} … … 340 332 341 333 # set HCalResolutionFormula {resolution formula as a function of eta and energy} 342 334 343 335 # 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) + \ 346 338 (abs(eta) > 3.2 && abs(eta) <= 6.0) * sqrt(energy^2*0.09420^2 + energy*1.00^2)} 347 339 … … 381 373 set MomentumOutputArray momentum 382 374 } 383 375 384 376 385 377 ################## … … 398 390 399 391 module PdgCodeFilter NeutrinoFilter { 400 392 401 393 set InputArray Delphes/stableParticles 402 394 set OutputArray filteredParticles 403 395 404 396 set PTMin 0.0 405 397 406 398 add PdgCode {12} 407 399 add PdgCode {14} … … 435 427 436 428 module FastJetFinder FastJetFinder { 437 # set InputArray TowerMerger/towers429 # set InputArray Calorimeter/towers 438 430 set InputArray EFlowMerger/eflow 439 431 … … 471 463 # maximum distance between jet and track 472 464 set DeltaR 0.3 473 474 # minimum pt of tracks 465 466 # minimum pt of tracks 475 467 set TrackPTMin 1.0 476 468 477 469 # minimum transverse impact parameter (in mm) 478 470 set TrackIPMax 2.0 479 471 480 472 # minimum ip significance for the track to be counted 481 473 set SigMin 6.5 482 474 483 475 # minimum number of tracks (high efficiency n=2, high purity n=3) 484 476 set Ntracks 3 … … 518 510 add Branch Delphes/allParticles Particle GenParticle 519 511 add Branch GenJetFinder/jets GenJet Jet 520 512 521 513 add Branch ChargedHadronMomentumSmearing/chargedHadrons ChargedHadron Track 522 514 add Branch HCal/eflowNeutralHadrons NeutralHadron Tower … … 529 521 add Branch ScalarHT/energy ScalarHT ScalarHT 530 522 } 523 -
cards/delphes_card_LHCb.tcl
rd77b51d rd870fc5 9 9 set ExecutionPath { 10 10 11 PhotonConversions12 11 ParticlePropagator 13 12 14 13 ChargedHadronMomentumSmearing 15 14 ElectronEnergySmearing … … 18 17 TrackMerger 19 18 ImpactParameterSmearing 20 19 21 20 IdentificationMap 22 21 23 22 ECal 24 23 HCal 25 24 26 25 TreeWriter 27 }28 29 30 31 #####################32 # Photon Conversions33 #####################34 35 module PhotonConversions PhotonConversions {36 set InputArray Delphes/stableParticles37 38 set OutputArray stableParticles39 40 # radius of the magnetic field coverage, in m41 42 set Radius 3.3143 44 set HalfLength 12.045 46 set EtaMin 2.047 set EtaMax 5.048 49 50 # material budget map: (uniform for now)51 # distribution of the detector mass ( density / X0), can be thought as52 # conversion rate per meter function of r,phi,z53 54 55 # unit: m-156 57 set Step 0.0558 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 64 26 } 65 27 … … 71 33 72 34 module ParticlePropagator ParticlePropagator { 73 set InputArray PhotonConversions/stableParticles35 set InputArray Delphes/stableParticles 74 36 75 37 set OutputArray stableParticles … … 79 41 80 42 # radius of the magnetic field coverage, in m 81 43 82 44 set Radius 3.31 83 84 45 46 85 47 # half-length of the magnetic field coverage, in m 86 48 set HalfLength 12.0 … … 91 53 # Need to veto anything with theta > 0.269 rad -> eta = 2 92 54 # 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 99 61 ######################################## 100 62 # Momentum resolution for charged tracks … … 122 84 123 85 # 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) + \ 125 87 (eta > 2.0 && eta <= 5.0) * (energy > 8.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)} 126 88 } … … 177 139 set InputArray ImpactParameterSmearing/tracks 178 140 set OutputArray tracks 179 141 180 142 # {PID in} {PID out} {formula} 181 143 # make sure "PID in" and "PID out" have the same charge (e.g {-13} {211} or {-321} {211}) 182 144 # {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) + \ 194 156 (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))) + \ 199 161 (eta > 5.0) * (0.00)} 200 162 201 163 202 164 # --- 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) + \ 208 170 (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))) + \ 213 175 (eta > 5.0) * (0.00)} 214 176 215 177 216 178 # --- 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) + \ 222 184 (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) + \ 227 189 (eta > 5.0) * (0.00)} 228 190 … … 233 195 234 196 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) + \ 238 200 (eta > 5.0) * (0.00)} 239 201 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 251 203 # 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) + \ 256 208 (eta > 5.0) * (0.00)} 257 209 … … 271 223 set TowerOutputArray ecalTowers 272 224 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 281 226 set pi [expr {acos(-1)}] 282 227 … … 296 241 add EtaPhiBins $eta $PhiBins 297 242 } 298 243 299 244 # 1.25 degree towers 300 245 set PhiBins {} … … 340 285 add EnergyFraction {3122} {0.3} 341 286 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)} 343 288 } 344 289 … … 353 298 set TowerOutputArray hcalTowers 354 299 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 363 301 set pi [expr {acos(-1)}] 364 302 … … 392 330 393 331 394 332 395 333 # default energy fractions {abs(PDG code)} {Fecal Fhcal} 396 334 add EnergyFraction {0} {1.0} … … 414 352 415 353 set ResolutionFormula { (eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.05^2 + energy*0.80^2)} 416 }354 } 417 355 418 356 … … 422 360 423 361 # 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. 426 364 427 365 module TreeWriter TreeWriter { 428 366 # add Branch InputArray BranchName BranchClass 429 367 430 368 add Branch Delphes/allParticles Particle GenParticle 431 369 … … 433 371 add Branch HCal/eflowNeutralHadrons NeutralHadron Tower 434 372 add Branch ECal/eflowPhotons Photon Photon 435 436 } 437 373 374 } 375 -
classes/ClassesLinkDef.h
rd77b51d rd870fc5 46 46 #pragma link C++ class LHCOEvent+; 47 47 #pragma link C++ class LHEFEvent+; 48 #pragma link C++ class LHEFWeight+;49 48 #pragma link C++ class HepMCEvent+; 50 49 #pragma link C++ class GenParticle+; -
classes/DelphesClasses.cc
rd77b51d rd870fc5 45 45 //------------------------------------------------------------------------------ 46 46 47 TLorentzVector GenParticle::P4() const47 TLorentzVector GenParticle::P4() 48 48 { 49 49 TLorentzVector vec; … … 54 54 //------------------------------------------------------------------------------ 55 55 56 TLorentzVector MissingET::P4() const56 TLorentzVector MissingET::P4() 57 57 { 58 58 TLorentzVector vec; … … 63 63 //------------------------------------------------------------------------------ 64 64 65 TLorentzVector Photon::P4() const65 TLorentzVector Photon::P4() 66 66 { 67 67 TLorentzVector vec; … … 72 72 //------------------------------------------------------------------------------ 73 73 74 TLorentzVector Electron::P4() const74 TLorentzVector Electron::P4() 75 75 { 76 76 TLorentzVector vec; … … 81 81 //------------------------------------------------------------------------------ 82 82 83 TLorentzVector Muon::P4() const83 TLorentzVector Muon::P4() 84 84 { 85 85 TLorentzVector vec; … … 90 90 //------------------------------------------------------------------------------ 91 91 92 TLorentzVector Jet::P4() const92 TLorentzVector Jet::P4() 93 93 { 94 94 TLorentzVector vec; … … 99 99 //------------------------------------------------------------------------------ 100 100 101 TLorentzVector Track::P4() const101 TLorentzVector Track::P4() 102 102 { 103 103 TLorentzVector vec; … … 108 108 //------------------------------------------------------------------------------ 109 109 110 TLorentzVector Tower::P4() const110 TLorentzVector Tower::P4() 111 111 { 112 112 TLorentzVector vec; … … 120 120 PID(0), Status(0), M1(-1), M2(-1), D1(-1), D2(-1), 121 121 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), 126 124 DeltaEta(0.0), DeltaPhi(0.0), 127 125 Momentum(0.0, 0.0, 0.0, 0.0), … … 135 133 MeanSqDeltaR(0), 136 134 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),147 135 fFactory(0), 148 136 fArray(0) 149 137 { 150 int i;151 138 Edges[0] = 0.0; 152 139 Edges[1] = 0.0; … … 163 150 Tau[3] = 0.0; 164 151 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 }171 152 } 172 153 … … 243 224 object.IsPU = IsPU; 244 225 object.IsConstituent = IsConstituent; 245 object.IsFromConversion = IsFromConversion;246 object.Flavor = Flavor;247 object.FlavorAlgo = FlavorAlgo;248 object.FlavorPhys = FlavorPhys;249 226 object.BTag = BTag; 250 object.BTagAlgo = BTagAlgo;251 object.BTagPhys = BTagPhys;252 227 object.TauTag = TauTag; 253 228 object.Eem = Eem; … … 274 249 object.MeanSqDeltaR = MeanSqDeltaR; 275 250 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 284 251 object.FracPt[0] = FracPt[0]; 285 252 object.FracPt[1] = FracPt[1]; … … 293 260 object.Tau[4] = Tau[4]; 294 261 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 315 262 object.fFactory = fFactory; 316 263 object.fArray = 0; 317 318 // copy cluster timing info319 copy(ECalEnergyTimePairs.begin(), ECalEnergyTimePairs.end(), back_inserter(object.ECalEnergyTimePairs));320 264 321 265 if(fArray && fArray->GetEntriesFast() > 0) … … 334 278 void Candidate::Clear(Option_t* option) 335 279 { 336 int i;337 280 SetUniqueID(0); 338 281 ResetBit(kIsReferenced); … … 344 287 IsPU = 0; 345 288 IsConstituent = 0; 346 IsFromConversion = 0;347 Flavor = 0;348 FlavorAlgo = 0;349 FlavorPhys = 0;350 289 BTag = 0; 351 BTagAlgo = 0;352 BTagPhys = 0;353 290 TauTag = 0; 354 291 Eem = 0.0; … … 374 311 MeanSqDeltaR = 0.0; 375 312 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 387 313 FracPt[0] = 0.0; 388 314 FracPt[1] = 0.0; … … 396 322 Tau[4] = 0.0; 397 323 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 409 324 fArray = 0; 410 325 } -
classes/DelphesClasses.h
rd77b51d rd870fc5 84 84 //--------------------------------------------------------------------------- 85 85 86 class LHEFWeight: public TObject87 {88 public:89 Int_t ID; // weight ID90 Float_t Weight; // weight value91 92 ClassDef(LHEFWeight, 1)93 };94 95 //---------------------------------------------------------------------------96 97 86 class HepMCEvent: public Event 98 87 { … … 161 150 const CompBase *GetCompare() const { return fgCompare; } 162 151 163 TLorentzVector P4() const;152 TLorentzVector P4(); 164 153 165 154 ClassDef(GenParticle, 1) … … 188 177 Float_t Phi; // mising energy azimuthal angle 189 178 190 TLorentzVector P4() const;179 TLorentzVector P4(); 191 180 192 181 ClassDef(MissingET, 1) … … 242 231 TRefArray Particles; // references to generated particles 243 232 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) 259 239 }; 260 240 … … 277 257 TRef Particle; // reference to generated particle 278 258 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) 294 265 }; 295 266 … … 310 281 TRef Particle; // reference to generated particle 311 282 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) 327 289 }; 328 290 … … 344 306 Float_t DeltaPhi; // jet radius in azimuthal angle 345 307 346 UInt_t Flavor;347 UInt_t FlavorAlgo;348 UInt_t FlavorPhys;349 350 308 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 354 309 UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau 355 310 … … 358 313 Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter 359 314 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 377 328 378 329 TRefArray Constituents; // references to constituents … … 382 333 const CompBase *GetCompare() const { return fgCompare; } 383 334 384 TLorentzVector P4() const; 385 TLorentzVector Area; 386 387 ClassDef(Jet, 3) 335 TLorentzVector P4(); 336 337 ClassDef(Jet, 2) 388 338 }; 389 339 … … 426 376 const CompBase *GetCompare() const { return fgCompare; } 427 377 428 TLorentzVector P4() const;378 TLorentzVector P4(); 429 379 430 380 ClassDef(Track, 2) … … 442 392 Float_t E; // calorimeter tower energy 443 393 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 446 395 447 396 Float_t Eem; // calorimeter tower electromagnetic energy … … 455 404 const CompBase *GetCompare() const { return fgCompare; } 456 405 457 TLorentzVector P4() const;458 459 ClassDef(Tower, 2)406 TLorentzVector P4(); 407 408 ClassDef(Tower, 1) 460 409 }; 461 410 … … 503 452 504 453 Int_t IsPU; 505 Int_t IsRecoPU;506 507 454 Int_t IsConstituent; 508 455 509 Int_t IsFromConversion;510 511 UInt_t Flavor;512 UInt_t FlavorAlgo;513 UInt_t FlavorPhys;514 515 456 UInt_t BTag; 516 UInt_t BTagAlgo;517 UInt_t BTagPhys;518 519 457 UInt_t TauTag; 520 458 … … 528 466 TLorentzVector Momentum, Position, Area; 529 467 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; 535 473 536 474 // PileUpJetID variables 537 475 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]; 559 483 560 484 // N-subjettiness variables 561 485 562 486 Float_t Tau[5]; 563 564 // Other Substructure variables565 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-momenta567 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-momenta568 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-momenta569 570 Int_t NSubJetsTrimmed; // number of subjets trimmed571 Int_t NSubJetsPruned; // number of subjets pruned572 Int_t NSubJetsSoftDropped; // number of subjets soft-dropped573 574 487 575 488 static CompBase *fgCompare; //! … … 591 504 void SetFactory(DelphesFactory *factory) { fFactory = factory; } 592 505 593 ClassDef(Candidate, 3)506 ClassDef(Candidate, 2) 594 507 }; 595 508 -
classes/DelphesFormula.cc
rd77b51d rd870fc5 23 23 24 24 #include <stdexcept> 25 #include <string> 25 26 26 27 using namespace std; … … 50 51 Int_t DelphesFormula::Compile(const char *expression) 51 52 { 52 TString buffer;53 string buffer; 53 54 const char *it; 54 55 for(it = expression; *it; ++it) 55 56 { 56 57 if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue; 57 buffer. Append(*it);58 buffer.push_back(*it); 58 59 } 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) 64 61 { 65 62 throw runtime_error("Invalid formula."); … … 77 74 78 75 //------------------------------------------------------------------------------ 76 77 Int_t DelphesFormula::DefinedVariable(TString &chaine, Int_t &action) 78 { 79 action = kVariable; 80 if(chaine == "pt") 81 { 82 if(fNdim < 1) fNdim = 1; 83 return 0; 84 } 85 else if(chaine == "eta") 86 { 87 if(fNdim < 2) fNdim = 2; 88 return 1; 89 } 90 else if(chaine == "phi") 91 { 92 if(fNdim < 3) fNdim = 3; 93 return 2; 94 } 95 else if(chaine == "energy") 96 { 97 if(fNdim < 4) fNdim = 4; 98 return 3; 99 } 100 return -1; 101 } 102 103 //------------------------------------------------------------------------------ -
classes/DelphesFormula.h
rd77b51d rd870fc5 35 35 36 36 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); 37 39 }; 38 40 -
classes/DelphesLHEFReader.cc
rd77b51d rd870fc5 82 82 fEventCounter = -1; 83 83 fParticleCounter = -1; 84 f WeightList.clear();84 fRwgtList.clear(); 85 85 } 86 86 … … 99 99 TObjArray *partonOutputArray) 100 100 { 101 int rc , id;101 int rc; 102 102 char *pch; 103 103 double weight; … … 158 158 else if(strstr(fBuffer, "<wgt")) 159 159 { 160 pch = str pbrk(fBuffer, "\"'");160 pch = strstr(fBuffer, ">"); 161 161 if(!pch) 162 162 { … … 165 165 } 166 166 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) 172 171 { 173 172 cerr << "** ERROR: " << "invalid weight format" << endl; … … 175 174 } 176 175 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); 187 177 } 188 178 else if(strstr(fBuffer, "</event>")) … … 216 206 //--------------------------------------------------------------------------- 217 207 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; 208 void DelphesLHEFReader::AnalyzeRwgt(ExRootTreeBranch *branch) 209 { 210 Weight *element; 211 vector<double>::const_iterator itRwgtList; 212 213 for(itRwgtList = fRwgtList.begin(); itRwgtList != fRwgtList.end(); ++itRwgtList) 214 { 215 element = static_cast<Weight *>(branch->NewEntry()); 216 217 element->Weight = *itRwgtList; 229 218 } 230 219 } -
classes/DelphesLHEFReader.h
rd77b51d rd870fc5 31 31 32 32 #include <vector> 33 #include <utility>34 33 35 34 class TObjArray; … … 59 58 TStopwatch *readStopWatch, TStopwatch *procStopWatch); 60 59 61 void Analyze Weight(ExRootTreeBranch *branch);60 void AnalyzeRwgt(ExRootTreeBranch *branch); 62 61 63 62 private: … … 84 83 double fPx, fPy, fPz, fE, fMass; 85 84 86 std::vector< std::pair< int, double > > fWeightList;85 std::vector<double> fRwgtList; 87 86 }; 88 87 -
classes/DelphesSTDHEPReader.cc
rd77b51d rd870fc5 77 77 fInputFile = inputFile; 78 78 xdrstdio_create(fInputXDR, inputFile, XDR_DECODE); 79 ReadFileHeader(); 79 80 } 80 81 … … 106 107 SkipBytes(4); 107 108 108 if(fBlockType == FILEHEADER) 109 { 110 ReadFileHeader(); 111 } 112 else if(fBlockType == EVENTTABLE) 109 if(fBlockType == EVENTTABLE) 113 110 { 114 111 ReadEventTable(); … … 180 177 u_int i; 181 178 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); 182 187 183 188 // version -
classes/DelphesTF2.cc
rd77b51d rd870fc5 18 18 19 19 #include "classes/DelphesTF2.h" 20 21 #include "RVersion.h"22 20 #include "TString.h" 23 24 21 #include <stdexcept> 22 #include <string> 25 23 26 24 using namespace std; … … 36 34 37 35 DelphesTF2::DelphesTF2(const char *name, const char *expression) : 38 TF2(name, 36 TF2(name,expression) 39 37 { 40 38 } … … 48 46 //------------------------------------------------------------------------------ 49 47 50 Int_t DelphesTF2:: Compile(const char *expression)48 Int_t DelphesTF2::DefinedVariable(TString &chaine, Int_t &action) 51 49 { 52 TString buffer; 53 const char *it; 54 for(it = expression; *it; ++it) 50 action = kVariable; 51 if(chaine == "z") 55 52 { 56 if( *it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue;57 buffer.Append(*it);53 if(fNdim < 1) fNdim = 1; 54 return 0; 58 55 } 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") 66 57 { 67 throw runtime_error("Invalid formula."); 58 if(fNdim < 2) fNdim = 2; 59 return 1; 68 60 } 69 return 0;61 return -1; 70 62 } 71 63 -
classes/DelphesTF2.h
rd77b51d rd870fc5 21 21 22 22 #include "TF2.h" 23 #include "TFormula.h" 24 25 #include <string> 23 26 24 27 class DelphesTF2: public TF2 … … 32 35 ~DelphesTF2(); 33 36 34 Int_t Compile(const char *expression); 37 Int_t DefinedVariable(TString &variable, Int_t &action); 38 35 39 }; 36 40 37 41 #endif /* DelphesTF2_h */ 42 -
display/Delphes3DGeometry.cc
rd77b51d rd870fc5 17 17 */ 18 18 19 #include "display/Delphes3DGeometry.h" 19 20 #include <set> 20 21 #include <map> … … 24 25 #include <sstream> 25 26 #include <cassert> 26 27 #include "TAxis.h"28 27 #include "TGeoManager.h" 29 28 #include "TGeoVolume.h" … … 35 34 #include "TGeoCone.h" 36 35 #include "TGeoArb8.h" 36 #include "external/ExRootAnalysis/ExRootConfReader.h" 37 #include "classes/DelphesClasses.h" 37 38 #include "TF2.h" 38 #include "TFormula.h"39 39 #include "TH1F.h" 40 40 #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"47 41 48 42 using namespace std; … … 96 90 tk_length_ = confReader->GetDouble(Form("%s::HalfLength",ParticlePropagator), 3.0)*100.; // tk_length 97 91 tk_Bz_ = confReader->GetDouble("ParticlePropagator::Bz", 0.0); // tk_Bz 98 99 TString buffer; 100 const char *it; 101 102 92 103 93 { 104 94 TString tkEffFormula = confReader->GetString(Form("%s::EfficiencyFormula",TrackingEfficiency),"abs(eta)<3.0"); … … 106 96 tkEffFormula.ReplaceAll("eta","y"); 107 97 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); 117 99 TH1F etaHisto("eta","eta",100,5.,-5.); 118 100 Double_t pt,eta; … … 136 118 muonEffFormula.ReplaceAll("eta","y"); 137 119 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); 147 121 TH1F etaHisto("eta2","eta2",100,5.,-5.); 148 122 Double_t pt,eta; -
display/Delphes3DGeometry.h
rd77b51d rd870fc5 1 1 /* 2 *Delphes: a framework for fast simulation of a generic collider experiment3 *Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium2 * Delphes: a framework for fast simulation of a generic collider experiment 3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium 4 4 * 5 *This program is free software: you can redistribute it and/or modify6 *it under the terms of the GNU General Public License as published by7 *the Free Software Foundation, either version 3 of the License, or8 *(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. 9 9 * 10 *This program is distributed in the hope that it will be useful,11 *but WITHOUT ANY WARRANTY; without even the implied warranty of12 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 *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. 14 14 * 15 *You should have received a copy of the GNU General Public License16 *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/>. 17 17 */ 18 18 … … 22 22 #include <set> 23 23 #include <map> 24 #include <utility> 24 25 #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" 32 32 33 33 // TODO: asymmetric detector … … 38 38 ~Delphes3DGeometry() {} 39 39 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"); 44 47 45 48 void setContingency(Double_t contingency) { contingency_ = contingency; } … … 48 51 void setMuonSystemThickness(Double_t thickness) { muonSystem_thickn_ = thickness; } 49 52 50 TGeoVolume *getDetector(bool withTowers = true);53 TGeoVolume* getDetector(bool withTowers = true); 51 54 52 55 Double_t getTrackerRadius() const { return tk_radius_; } … … 59 62 private: 60 63 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); 64 67 65 68 private: … … 72 75 TGeoMedium *mudetmed_; 73 76 74 TAxis *etaAxis_;75 TAxis *phiAxis_;77 TAxis* etaAxis_; 78 TAxis* phiAxis_; 76 79 77 80 Double_t contingency_; … … 91 94 std::map<std::string, Double_t> muonSystem_etamax_; 92 95 std::map<std::string, std::set< std::pair<Double_t, Int_t> > > caloBinning_; 93 96 94 97 }; 95 98 -
display/DelphesBranchElement.cc
rd77b51d rd870fc5 155 155 trkProp->SetMaxR(tkRadius_); 156 156 trkProp->SetMaxZ(tkHalfLength_); 157 GenParticle *particle;158 157 if(type=="Track") { // CASE 1: TRACKS 159 158 Track *track; … … 162 161 track->P4().Px(), track->P4().Py(), 163 162 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); 165 164 eveTrack = new TEveTrack(&pb, counter, trkProp); 166 165 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 174 173 Electron *electron; 175 174 while((electron = (Electron *) itTrack.Next())) { 176 particle = (GenParticle*) electron->Particle.GetObject();177 175 TParticle pb(electron->Charge<0?11:-11, 1, 0, 0, 0, 0, 178 176 electron->P4().Px(), electron->P4().Py(), 179 177 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.); 181 179 eveTrack = new TEveTrack(&pb, counter, trkProp); 182 180 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 190 188 Muon *muon; 191 189 while((muon = (Muon *) itTrack.Next())) { 192 particle = (GenParticle*) muon->Particle.GetObject();193 190 TParticle pb(muon->Charge<0?13:-13, 1, 0, 0, 0, 0, 194 191 muon->P4().Px(), muon->P4().Py(), 195 192 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.); 197 194 eveTrack = new TEveTrack(&pb, counter, trkProp); 198 195 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 209 206 photon->P4().Px(), photon->P4().Py(), 210 207 photon->P4().Pz(), photon->P4().E(), 211 0. 0, 0.0, 0.0, 0.0);208 0., 0., 0., 0.); 212 209 eveTrack = new TEveTrack(&pb, counter, trkProp); 213 210 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 226 223 particle->P4().Px(), particle->P4().Py(), 227 224 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); 229 226 eveTrack = new TEveTrack(&pb, counter, trkProp); 230 227 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); -
display/DelphesEventDisplay.cc
rd77b51d rd870fc5 1 1 /* 2 *Delphes: a framework for fast simulation of a generic collider experiment3 *Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium2 * Delphes: a framework for fast simulation of a generic collider experiment 3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium 4 4 * 5 *This program is free software: you can redistribute it and/or modify6 *it under the terms of the GNU General Public License as published by7 *the Free Software Foundation, either version 3 of the License, or8 *(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. 9 9 * 10 *This program is distributed in the hope that it will be useful,11 *but WITHOUT ANY WARRANTY; without even the implied warranty of12 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 *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. 14 14 * 15 *You should have received a copy of the GNU General Public License16 *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/>. 17 17 */ 18 18 … … 21 21 #include <utility> 22 22 #include <algorithm> 23 24 23 #include "TGeoManager.h" 25 24 #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" 26 32 #include "TEveElement.h" 27 33 #include "TEveJetCone.h" … … 47 53 #include "TCanvas.h" 48 54 #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"66 55 67 56 DelphesEventDisplay::DelphesEventDisplay() … … 109 98 TEveManager::Create(kTRUE, "IV"); 110 99 fStatusBar_ = gEve->GetBrowser()->GetStatusBar(); 111 TGeoManager *geom = gGeoManager;100 TGeoManager* geom = gGeoManager; 112 101 113 102 // build the detector … … 119 108 etaAxis_ = det3D.getCaloAxes().first; 120 109 phiAxis_ = det3D.getCaloAxes().second; 121 TGeoVolume *top = det3D.getDetector(false);110 TGeoVolume* top = det3D.getDetector(false); 122 111 geom->SetTopVolume(top); 123 112 TEveElementList *geometry = new TEveElementList("Geometry"); 124 TObjArray *nodes = top->GetNodes();113 TObjArray* nodes = top->GetNodes(); 125 114 TIter itNodes(nodes); 126 TGeoNode *nodeobj;127 TEveGeoTopNode *node;115 TGeoNode* nodeobj; 116 TEveGeoTopNode* node; 128 117 while((nodeobj = (TGeoNode*)itNodes.Next())) { 129 118 node = new TEveGeoTopNode(gGeoManager,nodeobj); … … 142 131 // prepare data collections 143 132 readConfig(configFile, elements_); 144 for(std::vector<DelphesBranchBase 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); 147 136 if(item_v1) gEve->AddElement(item_v1->GetContainer()); 148 137 if(item_v2) gEve->AddElement(item_v2->GetContainer()); … … 155 144 delphesDisplay_->ImportGeomRhoZ(geometry); 156 145 // find the first calo data and use that to initialize the calo display 157 for(std::vector<DelphesBranchBase 146 for(std::vector<DelphesBranchBase*>::iterator data=elements_.begin();data<elements_.end();++data) { 158 147 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(); 160 149 assert(container); 161 150 TEveCalo3D *calo3d = new TEveCalo3D(container); … … 193 182 ExRootConfParam branches = confReader->GetParam("TreeWriter::Branch"); 194 183 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; 198 187 // first loop with all but tracks 199 188 for(Int_t b = 0; b<nBranches; ++b) { … … 284 273 285 274 // update display 286 TEveElement *top = (TEveElement*)gEve->GetCurrentEvent();275 TEveElement* top = (TEveElement*)gEve->GetCurrentEvent(); 287 276 delphesDisplay_->DestroyEventRPhi(); 288 277 delphesDisplay_->ImportEventRPhi(top); … … 367 356 368 357 // add a tab on the left 369 TEveBrowser *browser = gEve->GetBrowser();358 TEveBrowser* browser = gEve->GetBrowser(); 370 359 browser->SetWindowName("Delphes Event Display"); 371 360 browser->StartEmbedding(TRootBrowser::kLeft); 372 361 373 362 // set the main title 374 TGMainFrame *frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);363 TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600); 375 364 frmMain->SetWindowName("Delphes Event Display"); 376 365 frmMain->SetCleanup(kDeepCleanup); … … 382 371 if(!gSystem->OpenDirectory(icondir)) 383 372 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 ); 385 374 { 386 TGHorizontalFrame *hf = new TGHorizontalFrame(frmMain);375 TGHorizontalFrame* hf = new TGHorizontalFrame(frmMain); 387 376 { 388 TGPictureButton *b = 0;377 TGPictureButton* b = 0; 389 378 390 379 b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoBack.gif")); … … 392 381 b->Connect("Clicked()", "DelphesEventDisplay", this, "Bck()"); 393 382 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()); 395 384 hf->AddFrame(numberEntry, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 2, 0, 10, 10)); 396 385 this->Connect("EventChanged(Int_t)","TGNumberEntry",numberEntry,"SetIntNumber(Long_t)"); … … 405 394 vf->AddFrame(hf, new TGLayoutHints(kLHintsExpandX , 2, 2, 2, 2)); 406 395 407 TGHProgressBar *progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);396 TGHProgressBar* progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100); 408 397 progress->SetMax( treeReader_->GetEntries()); 409 398 progress->ShowPosition(kTRUE, kFALSE, "Event %.0f"); … … 429 418 // the summary tab 430 419 htmlSummary_ = new DelphesHtmlSummary("Delphes Event Display Summary Table"); 431 TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());420 TEveWindowSlot* slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight()); 432 421 gHtml_ = new TGHtml(0, 100, 100); 433 422 TEveWindowFrame *wf = slot->MakeFrame(gHtml_); … … 437 426 // plot tab 438 427 slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight()); 439 TEveWindowTab *tab = slot->MakeTab();428 TEveWindowTab* tab = slot->MakeTab(); 440 429 tab->SetElementName("Summary plots"); 441 430 tab->SetShowTitleBar(kFALSE); … … 446 435 } 447 436 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 1 1 /* 2 *Delphes: a framework for fast simulation of a generic collider experiment3 *Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium2 * Delphes: a framework for fast simulation of a generic collider experiment 3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium 4 4 * 5 *This program is free software: you can redistribute it and/or modify6 *it under the terms of the GNU General Public License as published by7 *the Free Software Foundation, either version 3 of the License, or8 *(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. 9 9 * 10 *This program is distributed in the hope that it will be useful,11 *but WITHOUT ANY WARRANTY; without even the implied warranty of12 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 *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. 14 14 * 15 *You should have received a copy of the GNU General Public License16 *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/>. 17 17 */ 18 18 … … 21 21 22 22 #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> 23 38 24 #include "Rtypes.h"25 #include "RQ_OBJECT.h"26 39 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;37 40 38 41 /* 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 table42 *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 * 43 46 */ 44 47 … … 56 59 void make_gui(); 57 60 void load_event(); 58 void readConfig(const char *configFile, std::vector<DelphesBranchBase 61 void readConfig(const char *configFile, std::vector<DelphesBranchBase*>& elements); 59 62 60 63 // Configuration and global variables. … … 64 67 Double_t tkRadius_, totRadius_, tkHalfLength_, muHalfLength_, bz_; 65 68 TAxis *etaAxis_, *phiAxis_; 66 TChain *chain_;67 std::vector<DelphesBranchBase 69 TChain* chain_; 70 std::vector<DelphesBranchBase*> elements_; 68 71 DelphesDisplay *delphesDisplay_; 69 72 DelphesHtmlSummary *htmlSummary_; 70 73 TGHtml *gHtml_; 71 74 DelphesPlotSummary *plotSummary_; 72 TGStatusBar *fStatusBar_;75 TGStatusBar* fStatusBar_; 73 76 74 77 // gui controls 75 78 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 } 77 86 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 } 79 94 80 void PreSetEv(char *ev); 95 void PreSetEv(char* ev) { 96 event_id_tmp_ = Int_t(atoi(ev)); 97 } 81 98 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 } 83 106 84 void InitSummaryPlots(); 107 void InitSummaryPlots() { 108 plotSummary_->FillSample(treeReader_, event_id_); 109 plotSummary_->FillEvent(); 110 plotSummary_->Draw(); 111 } 85 112 86 void DisplayProgress(Int_t p); 113 void DisplayProgress(Int_t p) { 114 fStatusBar_->SetText(Form("Processing... %d %%",p), 1); 115 gSystem->ProcessEvents(); 116 } 87 117 }; 88 118 -
doc/genMakefile.tcl
rd77b51d rd870fc5 103 103 if {$fileName == "modules/PileUpMergerPythia8.cc"} { 104 104 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}} { 106 106 continue 107 107 } else { … … 219 219 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH))) 220 220 endif 221 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormats Common -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon221 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils 222 222 endif 223 223 … … 230 230 ifneq ($(PYTHIA8),) 231 231 #HAS_PYTHIA8 = true 232 CXXFLAGS += -I$(PYTHIA8)/include233 CXXFLAGS += -I$(PYTHIA8)/include/Pythia8234 OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl232 #CXXFLAGS += -I$(PYTHIA8)/include 233 #CXXFLAGS += -I$(PYTHIA8)/include/Pythia8 234 #OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl 235 235 endif 236 236 … … 285 285 sourceDeps {DELPHES} {classes/*.cc} {modules/*.cc} {external/ExRootAnalysis/*.cc} {external/Hector/*.cc} 286 286 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}287 sourceDeps {FASTJET} {modules/FastJet*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc} {external/fastjet/contribs/*/*.cc} 288 288 289 289 sourceDeps {DISPLAY} {display/*.cc} … … 396 396 @echo ">> Building $(DISTTAR)" 397 397 @mkdir -p $(DISTDIR) 398 @cp -a CHANGELOG C MakeLists.txt COPYING CREDITS DelphesEnv.sh README README_4LHCb VERSION Makefile MinBias.pileupconfigure 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) 399 399 @find $(DISTDIR) -depth -name .\* -exec rm -rf {} \; 400 400 @tar -czf $(DISTTAR) $(DISTDIR) -
doc/update_fastjet.sh
rd77b51d rd870fc5 1 version=3.1. 21 version=3.1.0 2 2 3 wget http://fastjet.fr/repo/fastjet-${version}.tar.gz3 #wget http://fastjet.fr/repo/fastjet-${version}.tar.gz 4 4 5 5 tar -zxf fastjet-${version}.tar.gz … … 83 83 cp -a ../../fastjet-${version}/plugins/SISCone/siscone/siscone/*.cpp SISCone 84 84 cp -a ../../fastjet-${version}/plugins/SISCone/fastjet/*.hh SISCone/fastjet 85 rename 's/\.cpp$/.cc/' SISCone/*.cpp 85 rename .cpp .cc SISCone/*.cpp 86 86 87 87 88 mkdir -p TrackJet/fastjet … … 89 90 cp -a ../../fastjet-${version}/plugins/TrackJet/fastjet/*.hh TrackJet/fastjet 90 91 91 sed -i 's/#include "fastjet\/ D0RunIBaseConePlugin.hh"/#include "D0RunIBaseConePlugin.hh"/' D0RunICone/fastjet/D0RunIpre96ConePlugin.hh92 sed -i 's/#include "fastjet\/ D0RunIBaseConePlugin.hh"/#include "D0RunIBaseConePlugin.hh"/' D0RunICone/fastjet/D0RunIConePlugin.hh92 sed -i 's/#include "fastjet\//#include "/' D0RunICone/fastjet/D0RunIpre96ConePlugin.hh 93 sed -i 's/#include "fastjet\//#include "/' D0RunICone/fastjet/D0RunIConePlugin.hh 93 94 94 95 sed -i 's/#include "siscone\//#include "/' SISCone/SISConePlugin.cc -
examples/EventDisplay.C
rd77b51d rd870fc5 3 3 * root -l examples/EventDisplay.C'("cards/delphes_card_FCC_basic.tcl","delphes_output.root","ParticlePropagator","ChargedHadronTrackingEfficiency","MuonTrackingEfficiency","Ecal,Hcal")' 4 4 */ 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 #endif12 5 13 6 void EventDisplay(const char *configfile = "delphes_card_CMS.tcl", … … 40 33 41 34 // create the application 42 DelphesEventDisplay *display = new DelphesEventDisplay(configfile, datafile, det3D);35 DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D); 43 36 } 44 37 } -
examples/Example1.C
rd77b51d rd870fc5 6 6 root -l examples/Example1.C'("delphes_output.root")' 7 7 */ 8 9 #ifdef __CLING__10 R__LOAD_LIBRARY(libDelphes)11 #include "classes/DelphesClasses.h"12 #include "external/ExRootAnalysis/ExRootTreeReader.h"13 #endif14 8 15 9 //------------------------------------------------------------------------------ -
examples/Example2.C
rd77b51d rd870fc5 8 8 #include "TH1.h" 9 9 #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 #endif17 10 18 11 //------------------------------------------------------------------------------ -
examples/Example3.C
rd77b51d rd870fc5 6 6 */ 7 7 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 #else14 class ExRootTreeReader;15 class ExRootResult;16 #endif17 18 8 //------------------------------------------------------------------------------ 19 9 … … 35 25 TH1 *fJetDeltaPT; 36 26 }; 27 28 //------------------------------------------------------------------------------ 29 30 class ExRootResult; 31 class ExRootTreeReader; 37 32 38 33 //------------------------------------------------------------------------------ -
examples/Example4.C
rd77b51d rd870fc5 1 1 /* 2 2 3 This macro shows how to compute jet energy scale. 3 4 root -l examples/Example4.C'("delphes_output.root", "plots.root")' 4 5 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 6 The output ROOT file contains the pT(MC)/pT(Reco) distributions for various pT(Reco) and |eta| bins. 7 The peak value of such distribution is interpreted as the jet energy correction to be applied for that given pT(Reco), |eta| bin. 8 9 This can be done by modifying the "ScaleFormula" input parameter to the JetEnergyScale module in the delphes_card_XXX.tcl 10 11 12 12 13 13 e.g a smooth function: 14 14 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 16 18 17 19 or a binned function: 20 18 21 19 22 set ScaleFormula {(abs(eta) > 0.0 && abs(eta) <= 2.5) * (pt > 20.0 && pt <= 50.0) * (1.10) + … … 24 27 (abs(eta) > 2.5 && abs(eta) <= 5.0) * (pt > 100.0) * (1.00)} 25 28 26 Be aware that a binned jet energy scale can produce "steps" in the corrected 27 jet pt distribution ... 29 30 Be aware that a binned jet energy scale can produce "steps" in the corrected jet pt distribution ... 31 32 33 28 34 */ 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 #else36 class ExRootTreeReader;37 class ExRootResult;38 #endif39 35 40 36 //------------------------------------------------------------------------------ … … 165 161 166 162 Jet *jet, *genjet; 167 GenParticle *part icle;163 GenParticle *part; 168 164 TObject *object; 169 165 170 TLorentzVector jetMomentum, genJetMomentum, bestGenJetMomentum;171 172 Float_t deltaR;166 TLorentzVector JetMom, GenJetMom, BestGenJetMom; 167 168 Float_t Dr; 173 169 Float_t pt, eta; 174 170 Long64_t entry; … … 181 177 // Load selected branches with data from specified event 182 178 treeReader->ReadEntry(entry); 179 // cout<<"-- New event -- "<<endl; 183 180 184 181 if(entry%500 == 0) cout << "Event number: "<< entry <<endl; … … 189 186 190 187 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; 196 193 197 194 // Loop over all hard partons in event 198 195 for(j = 0; j < branchParticle->GetEntriesFast(); ++j) 199 196 { 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 // 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 ) 210 207 { 211 deltaR = genJetMomentum.DeltaR(jetMomentum);212 bestGenJetMomentum = genJetMomentum;208 Dr = GenJetMom.DeltaR(JetMom); 209 BestGenJetMom = GenJetMom; 213 210 } 211 214 212 } 215 213 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 238 239 } 239 240 } 240 241 } 242 241 243 242 244 //------------------------------------------------------------------------------ -
examples/ExternalFastJet/ExternalFastJetBasic.cpp
rd77b51d rd870fc5 22 22 23 23 24 This simple example shows how to use Delphes with an external FastJet installation.25 Events are specified via the multidimen sional array "EVENTS" (for an example reading26 an HepMCfile see ExternalFastJetHepMC.cpp).27 28 In order to run this example you first need to set the paths to your Delphes, FastJet24 This simple example shows how to use Delphes with an external fastjet installation. 25 Events are specified via the multidimentionnal array "EVENTS" (for an example reading 26 an hepmc file see ExternalFastJetHepMC.cpp). 27 28 In order to run this example you first, you need to set the paths to your Delphes, FastJet 29 29 and ROOT installations (DELPHES_DIR, FASTJET_DIR and ROOT_DIR): 30 30 … … 35 35 Then run the following commands to build the executable: 36 36 37 DELPHES_LIB="-Wl,-rpath ,$DELPHES_DIR -L$DELPHES_DIR -lDelphesNoFastJet"37 DELPHES_LIB="-Wl,-rpath $DELPHES_DIR -L$DELPHES_DIR -lDelphesNoFastJet" 38 38 39 39 FASTJET_INC=`$FASTJET_DIR/bin/fastjet-config --cxxflags` … … 44 44 45 45 CXXFLAGS="$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 -oExternalFastJetBasic46 LDFLAGS="$FASTJET_LIB $ROOT_LIB $DELPHES_LIB" 47 48 g++ $CXXFLAGS $LDFLAGS examples/ExternalFastJetBasic.cpp -o examples/ExternalFastJetBasic 49 49 50 50 Then run: 51 51 52 ./ ExternalFastJetBasic cards/delphes_card_CMS_NoFastJet.tcl52 ./examples/ExternalFastJetBasic cards/delphes_card_CMS_NoFastJet.tcl 53 53 54 54 -
examples/ExternalFastJet/ExternalFastJetHepMC.cpp
rd77b51d rd870fc5 22 22 23 23 24 This simple example shows how to use Delphes with an external FastJet installation.25 Events in HepMCformat are read via the DelphesHepMC reader.26 27 In order to run this example you first need to set the paths to your Delphes, FastJet24 This simple example shows how to use Delphes with an external fastjet installation. 25 Events in hepmc format are read via the DelphesHepMC reader. 26 27 In order to run this example you first, you need to set the paths to your Delphes, FastJet 28 28 and ROOT installations (DELPHES_DIR, FASTJET_DIR and ROOT_DIR): 29 29 … … 34 34 Then run the following commands to build the executable: 35 35 36 DELPHES_LIB="-Wl,-rpath ,$DELPHES_DIR -L$DELPHES_DIR -lDelphesNoFastJet"36 DELPHES_LIB="-Wl,-rpath $DELPHES_DIR -L$DELPHES_DIR -lDelphesNoFastJet" 37 37 38 38 FASTJET_INC=`$FASTJET_DIR/bin/fastjet-config --cxxflags` … … 43 43 44 44 CXXFLAGS="$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 -oExternalFastJetHepMC48 49 Then run (you need an event file in HepMCformat):50 51 ./ ExternalFastJetHepMC cards/delphes_card_CMS_NoFastJet.tcl file.hepmc45 LDFLAGS="$FASTJET_LIB $ROOT_LIB $DELPHES_LIB" 46 47 g++ $CXXFLAGS $LDFLAGS examples/ExternalFastJetHepMC.cpp -o examples/ExternalFastJetHepMC 48 49 Then run (you need an event file in hepmc format): 50 51 ./examples/ExternalFastJetHepMC cards/delphes_card_CMS_NoFastJet.tcl file.hepmc 52 52 53 53 -
external/fastjet/ClusterSequence.cc
rd77b51d rd870fc5 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequence.cc 3 809 2015-02-20 13:05:13Z soyez$2 // $Id: ClusterSequence.cc 3685 2014-09-11 20:15:00Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 372 372 _plugin_activated = false; 373 373 374 #ifndef __FJCORE__ 374 375 } else if (_strategy == N2MHTLazy9AntiKtSeparateGhosts) { 375 #ifndef __FJCORE__376 376 // attempt to use an external tiling routine -- it manipulates 377 377 // the CS history via the plugin mechanism … … 1471 1471 assert(local_step == step_number); 1472 1472 1473 // sanity check: make sure the particles have not already been recombined1474 //1475 // Note that good practice would make this an assert (since this is1476 // a serious internal issue). However, we decided to throw an1477 // InternalError so that the end user can decide to catch it and1478 // retry the clustering with a different strategy.1479 1480 1473 assert(parent1 >= 0); 1481 if (_history[parent1].child != Invalid){1482 throw InternalError("trying to recomine an object that has previsously been recombined");1483 }1484 1474 _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;} 1491 1476 1492 1477 // get cross-referencing right from PseudoJets -
external/fastjet/Error.hh
rd77b51d rd870fc5 3 3 4 4 //FJSTARTHEADER 5 // $Id: Error.hh 3 809 2015-02-20 13:05:13Z soyez $5 // $Id: Error.hh 3694 2014-09-18 13:21:54Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 96 96 97 97 98 /// @ingroup error_handling99 /// \class InternalError100 /// class corresponding to critical internal errors101 ///102 /// This is an error class (derived from Error) meant for serious,103 /// critical, internal errors that we still want to be catchable by an104 /// end-user [e.g. a serious issue in clustering where the end-user105 /// can catch it and retry with a different strategy]106 ///107 /// Please directly contact the FastJet authors if you see such an108 /// 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 class113 InternalError(const std::string & message_in) : Error(std::string("*** CRITICAL INTERNAL FASTJET ERROR *** CONTACT THE AUTHORS *** ") + message_in){ }114 };115 116 117 98 FASTJET_END_NAMESPACE 118 99 -
external/fastjet/LazyTiling25.cc
rd77b51d rd870fc5 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling25.cc 3 808 2015-02-20 11:24:53Z soyez$2 // $Id: LazyTiling25.cc 3477 2014-07-29 14:34:39Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 365 365 for (Tile25 ** near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){ 366 366 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); 370 368 // cout << " max info looked at tile " << *near_tile - &_tiles[0] 371 369 // << ", dist = " << dist << " " << (*near_tile)->max_NN_dist -
external/fastjet/LazyTiling9.cc
rd77b51d rd870fc5 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling9.cc 3 808 2015-02-20 11:24:53Z soyez$2 // $Id: LazyTiling9.cc 3477 2014-07-29 14:34:39Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 348 348 for (Tile2 ** near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){ 349 349 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); 353 351 // cout << " max info looked at tile " << *near_tile - &_tiles[0] 354 352 // << ", dist = " << dist << " " << (*near_tile)->max_NN_dist -
external/fastjet/LazyTiling9Alt.cc
rd77b51d rd870fc5 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling9Alt.cc 3 808 2015-02-20 11:24:53Z soyez$2 // $Id: LazyTiling9Alt.cc 3477 2014-07-29 14:34:39Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 319 319 for (Tile::TileFnPair * near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){ 320 320 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); 324 322 // cout << " max info looked at tile " << *near_tile - &_tiles[0] 325 323 // << ", dist = " << dist << " " << (*near_tile)->max_NN_dist -
external/fastjet/LazyTiling9SeparateGhosts.cc
rd77b51d rd870fc5 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling9SeparateGhosts.cc 3 808 2015-02-20 11:24:53Z soyez $2 // $Id: LazyTiling9SeparateGhosts.cc 3596 2014-08-12 15:27:19Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 298 298 for (Tile3 ** near_tile = tile.begin_tiles; near_tile != tile.end_tiles; near_tile++){ 299 299 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); 303 301 // cout << " max info looked at tile " << *near_tile - &_tiles[0] 304 302 // << ", dist = " << dist << " " << (*near_tile)->max_NN_dist -
external/fastjet/RectangularGrid.cc
rd77b51d rd870fc5 1 1 //FJSTARTHEADER 2 // $Id : RectangularGrid.cc 3771 2014-12-22 21:13:22Z salam$2 // $Id$ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/RectangularGrid.hh
rd77b51d rd870fc5 3 3 4 4 //FJSTARTHEADER 5 // $Id : RectangularGrid.hh 3771 2014-12-22 21:13:22Z salam$5 // $Id$ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 42 42 class TilingBase { 43 43 public: 44 virtual ~TilingBase() {} 45 44 46 /// returns the index of the tile in which p is located, or -1 if p 45 47 /// is outside the tiling region … … 79 81 virtual bool is_initialised() const = 0; 80 82 bool is_initialized() const {return is_initialised();} 81 82 /// virtual destructor83 virtual ~TilingBase() {}84 83 }; 85 84 … … 166 165 // a tile selector 167 166 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 171 168 std::vector<bool> _is_good; 172 169 -
external/fastjet/VERSION
rd77b51d rd870fc5 1 3.1. 21 3.1.0 -
external/fastjet/config_auto.h
rd77b51d rd870fc5 151 151 /* Define to the full name and version of this package. */ 152 152 #ifndef FASTJET_PACKAGE_STRING 153 #define FASTJET_PACKAGE_STRING "FastJet 3.1. 2"153 #define FASTJET_PACKAGE_STRING "FastJet 3.1.0" 154 154 #endif 155 155 … … 161 161 /* Define to the version of this package. */ 162 162 #ifndef FASTJET_PACKAGE_VERSION 163 #define FASTJET_PACKAGE_VERSION "3.1. 2"163 #define FASTJET_PACKAGE_VERSION "3.1.0" 164 164 #endif 165 165 … … 171 171 /* Version number of package */ 172 172 #ifndef FASTJET_VERSION 173 #define FASTJET_VERSION "3.1. 2"173 #define FASTJET_VERSION "3.1.0" 174 174 #endif 175 175 … … 186 186 /* Version of the package under the form XYYZZ (instead of X.Y.Z) */ 187 187 #ifndef FASTJET_VERSION_NUMBER 188 #define FASTJET_VERSION_NUMBER 3010 2188 #define FASTJET_VERSION_NUMBER 30100 189 189 #endif 190 190 191 191 /* Patch version of this package */ 192 192 #ifndef FASTJET_VERSION_PATCHLEVEL 193 #define FASTJET_VERSION_PATCHLEVEL 2193 #define FASTJET_VERSION_PATCHLEVEL 0 194 194 #endif 195 195 -
external/fastjet/config_raw.h
rd77b51d rd870fc5 92 92 93 93 /* 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" 95 95 96 96 /* Define to the one symbol short name of this package. */ … … 98 98 99 99 /* Define to the version of this package. */ 100 #define PACKAGE_VERSION "3.1. 2"100 #define PACKAGE_VERSION "3.1.0" 101 101 102 102 /* Define to 1 if you have the ANSI C header files. */ … … 104 104 105 105 /* Version number of package */ 106 #define VERSION "3.1. 2"106 #define VERSION "3.1.0" 107 107 108 108 /* Major version of this package */ … … 113 113 114 114 /* Version of the package under the form XYYZZ (instead of X.Y.Z) */ 115 #define VERSION_NUMBER 3010 2115 #define VERSION_NUMBER 30100 116 116 117 117 /* Patch version of this package */ 118 #define VERSION_PATCHLEVEL 2118 #define VERSION_PATCHLEVEL 0 119 119 120 120 /* 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" 4 4 #define FASTJET_VERSION_MAJOR 3 5 5 #define FASTJET_VERSION_MINOR 1 6 #define FASTJET_VERSION_PATCHLEVEL 27 #define FASTJET_VERSION_NUMBER 3010 26 #define FASTJET_VERSION_PATCHLEVEL 0 7 #define FASTJET_VERSION_NUMBER 30100 8 8 9 9 /* The ATLASCone plugin is disabled by default*/ -
external/fastjet/internal/LazyTiling9Alt.hh
rd77b51d rd870fc5 3 3 4 4 //FJSTARTHEADER 5 // $Id: LazyTiling9Alt.hh 3 808 2015-02-20 11:24:53Z soyez$5 // $Id: LazyTiling9Alt.hh 3477 2014-07-29 14:34:39Z salam $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 37 37 38 38 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 39 40 /// Rounding errors in the Lazy strategies may cause the following41 /// problem: when browsing tiles in the vicinity of the particles42 /// being clustered in order to decide which of these tiles may43 /// contain particles that need to be updated (because theit NN is one44 /// of the particles that are currently clustered), we discard tiles45 /// that are deemed "too far from the cell" by the "max_NN_dist"46 /// criterion. Because of rounding error, this condition can sometimes47 /// miss cases where an update is needed.48 ///49 /// An example of this happens if a particle '1' is, say, at the lower50 /// edge of the rapidity of a given tile, with a particle '2' in the51 /// tile directly on its left at the same rapidity. Assume also that52 /// max_NN_dist in 2's tile corresponds to the distance between 2 and53 /// teh tile of 1. If 2 is 1's NN then in case 2 gets clustered, 1's54 /// NN needs to be updated. However, rounding errors in the55 /// calculation of the distance between 1 and 2 may result is56 /// something slightly larger than the max_NN_dist in 2's tile.57 ///58 /// This situation corresponds to the bug reported by Jochen Olt on59 /// 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 tiles63 /// to browse for updateds, to add a margin of security close to the64 /// edges of the cell, i.e. instead of updating only tiles for which65 /// distance<=max_NN_dist, we will update tiles for which66 /// distance<=max_NN_dist+tile_edge_security_margin.67 ///68 /// Note that this does not need to be done when computing nearest69 /// neighbours [rounding errors are tolerated there] but it is70 /// critical when tracking points that have to be updated.71 const double tile_edge_security_margin=1.0e-7;72 39 73 40 /// structure analogous to BriefJet, but with the extra information -
external/fastjet/plugins/D0RunICone/fastjet/D0RunIConePlugin.hh
rd77b51d rd870fc5 32 32 //FJENDHEADER 33 33 34 #include "fastjet/internal/base.hh" 34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen) 35 35 #include "D0RunIBaseConePlugin.hh" 36 36 -
external/fastjet/plugins/D0RunICone/fastjet/D0RunIpre96ConePlugin.hh
rd77b51d rd870fc5 32 32 //FJENDHEADER 33 33 34 #include "fastjet/internal/base.hh" 34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen) 35 35 #include "D0RunIBaseConePlugin.hh" 36 36 -
external/fastjet/plugins/SISCone/config.h
rd77b51d rd870fc5 54 54 #define PACKAGE_TARNAME "siscone" 55 55 56 /* Define to the home page for this package. */ 57 /* #undef PACKAGE_URL */ 58 56 59 /* Define to the version of this package. */ 57 60 #define PACKAGE_VERSION "3.0.0" -
external/fastjet/tools/Filter.cc
rd77b51d rd870fc5 1 1 //FJSTARTHEADER 2 // $Id: Filter.cc 3 760 2014-12-19 10:05:10Z soyez $2 // $Id: Filter.cc 3633 2014-08-15 13:23:52Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 164 164 if ((ca_optimisation_used) && (kept.size()+rejected.size()>0)){ 165 165 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()); 168 168 if (has_non_explicit_ghost_area) 169 169 fs->discard_area(); -
external/fastjet/tools/Filter.hh
rd77b51d rd870fc5 3 3 4 4 //FJSTARTHEADER 5 // $Id: Filter.hh 3 845 2015-03-08 08:35:36Z soyez $5 // $Id: Filter.hh 3494 2014-07-30 20:38:48Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 142 142 /// Set a subtractor that is applied to all individual subjets before 143 143 /// 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;} 145 145 146 146 /// runs the filtering and sets kept and rejected to be the jets of interest -
external/fastjet/tools/GridMedianBackgroundEstimator.hh
rd77b51d rd870fc5 3 3 4 4 //FJSTARTHEADER 5 // $Id: GridMedianBackgroundEstimator.hh 3 778 2014-12-24 09:28:09Z salam $5 // $Id: GridMedianBackgroundEstimator.hh 3610 2014-08-13 09:49:28Z salam $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 77 77 class GridMedianBackgroundEstimator : public BackgroundEstimatorBase 78 78 #ifdef FASTJET_GMBGE_USEFJGRID 79 , public RectangularGrid79 , public RectangularGrid 80 80 #endif 81 81 { … … 94 94 _has_particles(false), _enable_rho_m(true) {} 95 95 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 96 110 //---------------------------------------------------------------- 97 111 /// Constructor based on a user's fully specified RectangularGrid … … 102 116 throw Error("attempt to construct GridMedianBackgroundEstimator with uninitialised RectangularGrid"); 103 117 } 104 105 //----------------------------------------------------------------106 /// Constructor with the explicit parameters for the underlying107 /// RectangularGrid108 ///109 /// \param rapmin the minimum rapidity extent of the grid110 /// \param rapmax the maximum rapidity extent of the grid111 /// \param drap the grid spacing in rapidity112 /// \param dphi the grid spacing in azimuth113 /// \param tile_selector optional (geometric) selector to specify114 /// which tiles are good; a tile is good if115 /// a massless 4-vector at the center of the tile passes116 /// the selection117 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) {}121 118 122 119 #else // alternative in old framework where we didn't have the rectangular grid -
external/fastjet/tools/Recluster.hh
rd77b51d rd870fc5 2 2 #define __FASTJET_TOOLS_RECLUSTER_HH__ 3 3 4 // $Id: Recluster.hh 37 60 2014-12-19 10:05:10Z soyez $4 // $Id: Recluster.hh 3714 2014-09-30 09:47:31Z soyez $ 5 5 // 6 6 // Copyright (c) 2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 50 50 /// Alternatively, Recluster can be constructed from a jet algorithm 51 51 /// and an optional radius. In that case the recombiner is 52 /// systematically obtained from the jet being processed (unless you52 /// systematically obtained fromn the jet being processed (unless you 53 53 /// call set_acquire_recombiner(false)). If only the jet algorithm is 54 54 /// specified, a default radius of max_allowable_R will be assumed if … … 124 124 /// parameter (like the genkt algorithm), please specify the jet 125 125 /// 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); 127 127 128 128 /// constructor with just a jet algorithm, but no jet radius. If the -
external/tcl/tcl.h
rd77b51d rd870fc5 679 679 680 680 #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 681 690 682 691 /* … … 1215 1224 EXTERN Tcl_Obj * Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr)); 1216 1225 EXTERN int Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan)); 1226 EXTERN char * Tcl_ErrnoId _ANSI_ARGS_((void)); 1227 EXTERN char * Tcl_ErrnoMsg _ANSI_ARGS_((int err)); 1217 1228 EXTERN int Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp, 1218 1229 char *string)); … … 1402 1413 char *bufPtr, int toRead)); 1403 1414 EXTERN void Tcl_ReapDetachedProcs _ANSI_ARGS_((void)); 1415 EXTERN int Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp, 1416 char *cmd, int flags)); 1417 EXTERN int Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp, 1418 Tcl_Obj *cmdPtr, int flags)); 1404 1419 EXTERN Tcl_RegExp Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp, 1405 1420 char *string)); … … 1470 1485 char *part1, char *part2, char *newValue, 1471 1486 int flags)); 1487 EXTERN char * Tcl_SignalId _ANSI_ARGS_((int sig)); 1488 EXTERN char * Tcl_SignalMsg _ANSI_ARGS_((int sig)); 1472 1489 EXTERN void Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp)); 1473 1490 EXTERN int Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp, -
modules/AngularSmearing.cc
rd77b51d rd870fc5 100 100 { 101 101 Candidate *candidate, *mother; 102 Double_t pt, eta, phi , e;102 Double_t pt, eta, phi; 103 103 104 104 fItInputArray->Reset(); … … 110 110 phi = candidatePosition.Phi(); 111 111 pt = candidateMomentum.Pt(); 112 e = candidateMomentum.E();113 112 114 113 // apply smearing formula for eta,phi 115 114 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)); 118 117 119 118 if(pt <= 0.0) continue; -
modules/BTagging.cc
rd77b51d rd870fc5 22 22 * Determines origin of jet, 23 23 * applies b-tagging efficiency (miss identification rate) formulas 24 * and sets b-tagging flags 24 * and sets b-tagging flags 25 25 * 26 26 * \author P. Demin - UCL, Louvain-la-Neuve … … 33 33 #include "classes/DelphesFactory.h" 34 34 #include "classes/DelphesFormula.h" 35 36 #include "ExRootAnalysis/ExRootResult.h" 37 #include "ExRootAnalysis/ExRootFilter.h" 38 #include "ExRootAnalysis/ExRootClassifier.h" 35 39 36 40 #include "TMath.h" … … 42 46 #include "TLorentzVector.h" 43 47 44 #include <algorithm> 48 #include <algorithm> 45 49 #include <stdexcept> 46 50 #include <iostream> … … 51 55 //------------------------------------------------------------------------------ 52 56 57 class BTaggingPartonClassifier : public ExRootClassifier 58 { 59 public: 60 61 BTaggingPartonClassifier() {} 62 63 Int_t GetCategory(TObject *object); 64 65 Double_t fEtaMax, fPTMin; 66 }; 67 68 //------------------------------------------------------------------------------ 69 70 Int_t BTaggingPartonClassifier::GetCategory(TObject *object) 71 { 72 Candidate *parton = static_cast<Candidate*>(object); 73 const TLorentzVector &momentum = parton->Momentum; 74 Int_t pdgCode; 75 76 if(momentum.Pt() <= fPTMin || TMath::Abs(momentum.Eta()) > fEtaMax) return -1; 77 78 pdgCode = TMath::Abs(parton->PID); 79 if(pdgCode != 21 && pdgCode > 5) return -1; 80 81 return 0; 82 } 83 84 //------------------------------------------------------------------------------ 85 53 86 BTagging::BTagging() : 54 fItJetInputArray(0) 55 { 87 fClassifier(0), fFilter(0), 88 fItPartonInputArray(0), fItJetInputArray(0) 89 { 90 fClassifier = new BTaggingPartonClassifier; 56 91 } 57 92 … … 60 95 BTagging::~BTagging() 61 96 { 97 if(fClassifier) delete fClassifier; 62 98 } 63 99 … … 73 109 fBitNumber = GetInt("BitNumber", 0); 74 110 111 fDeltaR = GetDouble("DeltaR", 0.5); 112 113 fClassifier->fPTMin = GetDouble("PartonPTMin", 1.0); 114 fClassifier->fEtaMax = GetDouble("PartonEtaMax", 2.5); 115 75 116 // read efficiency formulas 76 117 param = GetParam("EfficiencyFormula"); 77 118 size = param.GetSize(); 78 119 79 120 fEfficiencyMap.clear(); 80 121 for(i = 0; i < size/2; ++i) … … 98 139 // import input array(s) 99 140 141 fPartonInputArray = ImportArray(GetString("PartonInputArray", "Delphes/partons")); 142 fItPartonInputArray = fPartonInputArray->MakeIterator(); 143 144 fFilter = new ExRootFilter(fPartonInputArray); 145 100 146 fJetInputArray = ImportArray(GetString("JetInputArray", "FastJetFinder/jets")); 101 147 fItJetInputArray = fJetInputArray->MakeIterator(); … … 109 155 DelphesFormula *formula; 110 156 157 if(fFilter) delete fFilter; 111 158 if(fItJetInputArray) delete fItJetInputArray; 159 if(fItPartonInputArray) delete fItPartonInputArray; 112 160 113 161 for(itEfficiencyMap = fEfficiencyMap.begin(); itEfficiencyMap != fEfficiencyMap.end(); ++itEfficiencyMap) … … 122 170 void BTagging::Process() 123 171 { 124 Candidate *jet; 125 Double_t pt, eta, phi, e; 172 Candidate *jet, *parton; 173 Double_t pt, eta, phi; 174 TObjArray *partonArray; 126 175 map< Int_t, DelphesFormula * >::iterator itEfficiencyMap; 127 176 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 129 187 // loop over all input jets 130 188 fItJetInputArray->Reset(); … … 132 190 { 133 191 const TLorentzVector &jetMomentum = jet->Momentum; 192 pdgCodeMax = -1; 134 193 eta = jetMomentum.Eta(); 135 194 phi = jetMomentum.Phi(); 136 195 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); 141 213 if(itEfficiencyMap == fEfficiencyMap.end()) 142 214 { … … 145 217 formula = itEfficiencyMap->second; 146 218 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 37 37 class DelphesFormula; 38 38 39 class ExRootFilter; 40 class BTaggingPartonClassifier; 41 39 42 class BTagging: public DelphesModule 40 43 { … … 52 55 Int_t fBitNumber; 53 56 57 Double_t fDeltaR; 58 54 59 #if !defined(__CINT__) && !defined(__CLING__) 55 60 std::map< Int_t, DelphesFormula * > fEfficiencyMap; //! 56 61 #endif 57 62 63 BTaggingPartonClassifier *fClassifier; //! 64 65 ExRootFilter *fFilter; 66 67 TIterator *fItPartonInputArray; //! 68 58 69 TIterator *fItJetInputArray; //! 70 71 const TObjArray *fPartonInputArray; //! 59 72 60 73 const TObjArray *fJetInputArray; //! -
modules/CMakeLists.txt
rd77b51d rd870fc5 7 7 file(GLOB sources *.cc) 8 8 file(GLOB headers *.h) 9 list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/FastJetLinkDef.h)10 9 list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/ModulesLinkDef.h) 11 10 list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/Pythia8LinkDef.h) 12 11 13 DELPHES_GENERATE_DICTIONARY(FastJetDict ${headers} LINKDEF FastJetLinkDef.h)14 12 DELPHES_GENERATE_DICTIONARY(ModulesDict ${headers} LINKDEF ModulesLinkDef.h) 15 13 … … 17 15 list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/PileUpMergerPythia8.cc) 18 16 19 add_library(modules OBJECT ${sources} FastJetDict.cxxModulesDict.cxx)17 add_library(modules OBJECT ${sources} ModulesDict.cxx) -
modules/Calorimeter.cc
rd77b51d rd870fc5 142 142 } 143 143 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 */ 150 151 151 152 // read min E value for towers to be saved … … 157 158 158 159 // switch on or off the dithering of the center of calorimeter towers 159 f SmearTowerCenter = GetBool("SmearTowerCenter", true);160 fDitherTowerCenter = GetBool("DitherTowerCenter", true); 160 161 161 162 // read resolution formulas … … 355 356 fTrackHCalEnergy = 0.0; 356 357 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 357 367 fTowerTrackHits = 0; 358 368 fTowerPhotonHits = 0; … … 370 380 position = track->Position; 371 381 382 372 383 ecalEnergy = momentum.E() * fTrackECalFractions[number]; 373 384 hcalEnergy = momentum.E() * fTrackHCalFractions[number]; … … 376 387 fTrackHCalEnergy += hcalEnergy; 377 388 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); 385 394 386 395 fTowerTrackArray->Add(track); … … 403 412 fTowerHCalEnergy += hcalEnergy; 404 413 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 412 420 413 421 fTower->AddCandidate(particle); … … 426 434 Double_t ecalEnergy, hcalEnergy; 427 435 Double_t ecalSigma, hcalSigma; 428 Float_t weight, sumWeightedTime, sumWeight;436 Double_t ecalTime, hcalTime, time; 429 437 430 438 if(!fTower) return; … … 436 444 hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma); 437 445 446 ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerECalTime/fTowerECalTimeWeight; 447 hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerHCalTime/fTowerHCalTimeWeight; 448 438 449 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy); 439 450 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy); … … 443 454 444 455 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) 447 459 { 448 460 eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]); … … 457 469 pt = energy / TMath::CosH(eta); 458 470 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); 482 472 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 483 473 fTower->Eem = ecalEnergy; -
modules/Calorimeter.h
rd77b51d rd870fc5 60 60 Double_t fTrackECalEnergy, fTrackHCalEnergy; 61 61 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; 64 67 65 68 Int_t fTowerTrackHits, fTowerPhotonHits; … … 71 74 Double_t fHCalEnergySignificanceMin; 72 75 73 Bool_t f SmearTowerCenter;76 Bool_t fDitherTowerCenter; 74 77 75 78 TFractionMap fFractionMap; //! -
modules/Efficiency.cc
rd77b51d rd870fc5 96 96 { 97 97 Candidate *candidate; 98 Double_t pt, eta, phi , e;98 Double_t pt, eta, phi; 99 99 100 100 fItInputArray->Reset(); … … 106 106 phi = candidatePosition.Phi(); 107 107 pt = candidateMomentum.Pt(); 108 e = candidateMomentum.E();109 108 110 109 // apply an efficency formula 111 if(gRandom->Uniform() > fFormula->Eval(pt, eta , phi, e)) continue;110 if(gRandom->Uniform() > fFormula->Eval(pt, eta)) continue; 112 111 113 112 fOutputArray->Add(candidate); -
modules/EnergyScale.cc
rd77b51d rd870fc5 104 104 momentum = candidate->Momentum; 105 105 106 scale = fFormula->Eval(momentum.Pt(), momentum.Eta() , momentum.Phi(), momentum.E());106 scale = fFormula->Eval(momentum.Pt(), momentum.Eta()); 107 107 108 108 if(scale > 0.0) momentum *= scale; -
modules/EnergySmearing.cc
rd77b51d rd870fc5 96 96 { 97 97 Candidate *candidate, *mother; 98 Double_t pt,energy, eta, phi;98 Double_t energy, eta, phi; 99 99 100 100 fItInputArray->Reset(); … … 103 103 const TLorentzVector &candidatePosition = candidate->Position; 104 104 const TLorentzVector &candidateMomentum = candidate->Momentum; 105 106 pt = candidatePosition.Pt();107 105 eta = candidatePosition.Eta(); 108 106 phi = candidatePosition.Phi(); … … 110 108 111 109 // 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)); 113 111 114 112 if(energy <= 0.0) continue; -
modules/FastJetFinder.cc
rd77b51d rd870fc5 66 66 #include "fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh" 67 67 68 #include "fastjet/tools/Filter.hh"69 #include "fastjet/tools/Pruner.hh"70 #include "fastjet/contribs/RecursiveTools/SoftDrop.hh"71 72 68 using namespace std; 73 69 using namespace fastjet; … … 96 92 JetDefinition::Plugin *plugin = 0; 97 93 JetDefinition::Recombiner *recomb = 0; 98 ExRootConfParam param; 94 NjettinessPlugin *njetPlugin = 0; 95 96 // read eta ranges 97 98 ExRootConfParam param = GetParam("RhoEtaRange"); 99 99 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 } 102 107 103 108 // define algorithm … … 125 130 fN = GetInt("N", 2); // used only if Njettiness is used as jet clustering algo (case 8) 126 131 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 149 132 // --- Jet Area Parameters --- 150 133 fAreaAlgorithm = GetInt("AreaAlgorithm", 0); … … 214 197 break; 215 198 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); 218 201 break; 219 202 } … … 221 204 fPlugin = plugin; 222 205 fRecomb = recomb; 206 fNjettinessPlugin = njetPlugin; 223 207 224 208 ClusterSequence::print_banner(); 225 226 if(fComputeRho && fAreaDefinition)227 {228 // read eta ranges229 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 }244 209 245 210 // import input array … … 258 223 void FastJetFinder::Finish() 259 224 { 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 267 225 if(fItInputArray) delete fItInputArray; 268 226 if(fDefinition) delete fDefinition; … … 283 241 Double_t time, timeWeight; 284 242 Int_t number; 285 Int_t charge;286 243 Double_t rho = 0.0; 287 244 PseudoJet jet, area; 245 vector<PseudoJet> inputList, outputList; 288 246 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; 292 248 293 249 DelphesFactory *factory = GetFactory(); … … 320 276 if(fComputeRho && fAreaDefinition) 321 277 { 322 for(itE stimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators)278 for(itEtaRangeMap = fEtaRangeMap.begin(); itEtaRangeMap != fEtaRangeMap.end(); ++itEtaRangeMap) 323 279 { 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(); 326 284 327 285 candidate = factory->NewCandidate(); 328 286 candidate->Momentum.SetPtEtaPhiE(rho, 0.0, 0.0, rho); 329 candidate->Edges[0] = itE stimators->etaMin;330 candidate->Edges[1] = itE stimators->etaMax;287 candidate->Edges[0] = itEtaRangeMap->first; 288 candidate->Edges[1] = itEtaRangeMap->second; 331 289 fRhoOutputArray->Add(candidate); 332 290 } … … 340 298 detaMax = 0.0; 341 299 dphiMax = 0.0; 300 vector<PseudoJet>::iterator itInputList, itOutputList; 342 301 for(itOutputList = outputList.begin(); itOutputList != outputList.end(); ++itOutputList) 343 302 { … … 355 314 timeWeight = 0.0; 356 315 357 charge = 0;358 359 316 inputList.clear(); 360 317 inputList = sequence->constituents(*itOutputList); … … 362 319 for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList) 363 320 { 364 if(itInputList->user_index() < 0) continue;365 321 constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index())); 366 322 … … 373 329 timeWeight += TMath::Sqrt(constituent->Momentum.E()); 374 330 375 charge += constituent->Charge;376 377 331 candidate->AddCandidate(constituent); 378 332 } … … 384 338 candidate->DeltaEta = detaMax; 385 339 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 467 341 // --- compute N-subjettiness with N = 1,2,3,4,5 ---- 468 342 … … 503 377 } 504 378 379 505 380 fOutputArray->Add(candidate); 506 381 } -
modules/FastJetFinder.h
rd77b51d rd870fc5 30 30 #include "classes/DelphesModule.h" 31 31 32 #include < vector>32 #include <map> 33 33 34 34 class TObjArray; … … 38 38 class JetDefinition; 39 39 class AreaDefinition; 40 class JetMedianBackgroundEstimator;40 class Selector; 41 41 namespace contrib { 42 42 class NjettinessPlugin; … … 83 83 Int_t fN ; 84 84 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 105 85 // --- FastJet Area method -------- 106 86 … … 120 100 Double_t fEffectiveRfact; 121 101 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; //! 131 103 132 104 TIterator *fItInputArray; //! -
modules/FastJetLinkDef.h
rd77b51d rd870fc5 28 28 #include "modules/FastJetFinder.h" 29 29 #include "modules/FastJetGridMedianEstimator.h" 30 #include "modules/RunPUPPI.h"31 30 32 31 #ifdef __CINT__ … … 38 37 #pragma link C++ class FastJetFinder+; 39 38 #pragma link C++ class FastJetGridMedianEstimator+; 40 #pragma link C++ class RunPUPPI+;41 39 42 40 #endif -
modules/IdentificationMap.cc
rd77b51d rd870fc5 69 69 void IdentificationMap::Init() 70 70 { 71 // read efficiency formula 72 73 71 74 TMisIDMap::iterator itEfficiencyMap; 72 75 ExRootConfParam param; … … 84 87 formula->Compile(param[i*3 + 2].GetString()); 85 88 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 87 93 } 88 94 … … 94 100 formula->Compile("1.0"); 95 101 96 fEfficiencyMap.insert(make_pair(0, make_pair(0,formula)));102 fEfficiencyMap.insert(make_pair(0,make_pair(0,formula))); 97 103 } 98 104 … … 120 126 if(formula) delete formula; 121 127 } 128 122 129 } 123 130 … … 127 134 { 128 135 Candidate *candidate; 129 Double_t pt, eta, phi , e;136 Double_t pt, eta, phi; 130 137 TMisIDMap::iterator itEfficiencyMap; 131 138 pair <TMisIDMap::iterator, TMisIDMap::iterator> range; 132 139 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; 136 145 137 146 fItInputArray->Reset(); … … 143 152 phi = candidatePosition.Phi(); 144 153 pt = candidateMomentum.Pt(); 145 e = candidateMomentum.E(); 146 147 pdgCodeIn = candidate->PID; 154 pdgIn = candidate->PID; 148 155 charge = candidate->Charge; 149 156 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); 157 168 if(range.first == range.second) range = fEfficiencyMap.equal_range(0); 158 169 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) 164 172 { 173 165 174 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 171 184 { 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 } 176 196 } 177 197 178 total += p;179 198 } 180 } 181 } 182 183 //------------------------------------------------------------------------------ 199 200 } 201 202 } 203 204 //------------------------------------------------------------------------------ -
modules/IdentificationMap.h
rd77b51d rd870fc5 49 49 private: 50 50 51 typedef std::multimap< Int_t, std::pair< Int_t, DelphesFormula * > > TMisIDMap; //!51 typedef std::multimap< Int_t, std::pair<Int_t , DelphesFormula * > > TMisIDMap; //! 52 52 53 TMisIDMap fEfficiencyMap; //!53 TMisIDMap fEfficiencyMap; 54 54 55 55 TIterator *fItInputArray; //! -
modules/ImpactParameterSmearing.cc
rd77b51d rd870fc5 97 97 Candidate *candidate, *particle, *mother; 98 98 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; 100 100 101 101 fItInputArray->Reset(); … … 110 110 eta = candidateMomentum.Eta(); 111 111 pt = candidateMomentum.Pt(); 112 phi = candidateMomentum.Phi();113 e = candidateMomentum.E();114 115 112 px = candidateMomentum.Px(); 116 113 py = candidateMomentum.Py(); … … 122 119 123 120 // 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)); 127 124 128 125 xd += sx; … … 133 130 dxy = (xd*py - yd*px)/pt; 134 131 135 ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta , phi, e));132 ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta)); 136 133 137 134 // fill smeared values in candidate -
modules/Isolation.cc
rd77b51d rd870fc5 25 25 * the transverse momenta fraction within (PTRatioMin, PTRatioMax]. 26 26 * 27 * \author P. Demin , M. Selvaggi, R. Gerosa- UCL, Louvain-la-Neuve27 * \author P. Demin - UCL, Louvain-la-Neuve 28 28 * 29 29 */ … … 153 153 Candidate *candidate, *isolation, *object; 154 154 TObjArray *isolationArray; 155 Double_t sum Charged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr;155 Double_t sum, ratio; 156 156 Int_t counter; 157 157 Double_t eta = 0.0; 158 158 Double_t rho = 0.0; 159 159 160 if(fRhoInputArray && fRhoInputArray->GetEntriesFast() > 0) 161 { 162 candidate = static_cast<Candidate*>(fRhoInputArray->At(0)); 163 rho = candidate->Momentum.Pt(); 164 } 165 160 166 // select isolation objects 161 167 fFilter->Reset(); … … 172 178 const TLorentzVector &candidateMomentum = candidate->Momentum; 173 179 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 } 174 196 175 197 // find rho … … 187 209 } 188 210 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 248 217 fOutputArray->Add(candidate); 249 218 } -
modules/JetPileUpSubtractor.cc
rd77b51d rd870fc5 109 109 momentum = candidate->Momentum; 110 110 area = candidate->Area; 111 eta = momentum.Eta();111 eta = TMath::Abs(momentum.Eta()); 112 112 113 113 // find rho -
modules/ModulesLinkDef.h
rd77b51d rd870fc5 29 29 30 30 #include "modules/AngularSmearing.h" 31 #include "modules/PhotonConversions.h"32 31 #include "modules/ParticlePropagator.h" 33 32 #include "modules/Efficiency.h" … … 51 50 #include "modules/JetPileUpSubtractor.h" 52 51 #include "modules/TrackPileUpSubtractor.h" 53 #include "modules/TaggingParticlesSkimmer.h"54 52 #include "modules/PileUpJetID.h" 55 53 #include "modules/ConstituentFilter.h" … … 59 57 #include "modules/Weighter.h" 60 58 #include "modules/Hector.h" 61 #include "modules/JetFlavorAssociation.h"62 #include "modules/JetFakeParticle.h"63 59 #include "modules/ExampleModule.h" 64 60 … … 72 68 73 69 #pragma link C++ class AngularSmearing+; 74 #pragma link C++ class PhotonConversions+;75 70 #pragma link C++ class ParticlePropagator+; 76 71 #pragma link C++ class Efficiency+; … … 94 89 #pragma link C++ class JetPileUpSubtractor+; 95 90 #pragma link C++ class TrackPileUpSubtractor+; 96 #pragma link C++ class TaggingParticlesSkimmer+;97 91 #pragma link C++ class PileUpJetID+; 98 92 #pragma link C++ class ConstituentFilter+; … … 102 96 #pragma link C++ class Weighter+; 103 97 #pragma link C++ class Hector+; 104 #pragma link C++ class JetFlavorAssociation+;105 #pragma link C++ class JetFakeParticle+;106 98 #pragma link C++ class ExampleModule+; 107 99 -
modules/MomentumSmearing.cc
rd77b51d rd870fc5 96 96 { 97 97 Candidate *candidate, *mother; 98 Double_t pt, eta, phi , e;98 Double_t pt, eta, phi; 99 99 100 100 fItInputArray->Reset(); … … 106 106 phi = candidatePosition.Phi(); 107 107 pt = candidateMomentum.Pt(); 108 e = candidateMomentum.E();109 108 110 109 // 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); 112 111 113 112 if(pt <= 0.0) continue; -
modules/PdgCodeFilter.cc
rd77b51d rd870fc5 74 74 fPTMin = GetDouble("PTMin", 0.0); 75 75 76 fInvertPdg = GetBool("InvertPdg", false);77 78 fRequireStatus = GetBool("RequireStatus", false);79 fStatus = GetInt("Status", 1);80 81 76 // import input array 82 77 fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles")); … … 114 109 Double_t pt; 115 110 116 const Bool_t requireStatus = fRequireStatus;117 const Bool_t invertPdg = fInvertPdg;118 const int reqStatus = fStatus;119 120 111 fItInputArray->Reset(); 121 112 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) … … 125 116 pt = candidateMomentum.Pt(); 126 117 127 if(pt < fPTMin) continue; 128 if(requireStatus && (candidate->Status != reqStatus)) continue; 118 pass = kTRUE; 129 119 130 pass = kTRUE;120 if(pt < fPTMin) pass = kFALSE; 131 121 if(find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE; 132 122 133 if (invertPdg) pass = !pass;134 123 if(pass) fOutputArray->Add(candidate); 135 124 } -
modules/PdgCodeFilter.h
rd77b51d rd870fc5 50 50 51 51 Double_t fPTMin; //! 52 Bool_t fInvertPdg; //!53 Bool_t fRequireStatus; //!54 Int_t fStatus; //!55 52 56 53 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 1 19 2 20 /** \class PileUpJetID 3 21 * 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 7 25 * 8 26 */ … … 23 41 #include "TRandom3.h" 24 42 #include "TObjArray.h" 25 //#include "TDatabasePDG.h"43 #include "TDatabasePDG.h" 26 44 #include "TLorentzVector.h" 27 45 … … 36 54 37 55 PileUpJetID::PileUpJetID() : 38 fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0) 56 fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0),fItVertexInputArray(0) 39 57 { 40 58 … … 52 70 void PileUpJetID::Init() 53 71 { 54 55 72 fJetPTMin = GetDouble("JetPTMin", 20.0); 56 73 fParameterR = GetDouble("ParameterR", 0.5); 57 74 fUseConstituents = GetInt("UseConstituents", 0); 58 75 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 67 76 fAverageEachTower = false; // for timing 68 77 … … 72 81 fItJetInputArray = fJetInputArray->MakeIterator(); 73 82 74 fTrackInputArray = ImportArray(GetString("TrackInputArray", " ParticlePropagator/tracks"));83 fTrackInputArray = ImportArray(GetString("TrackInputArray", "Calorimeter/eflowTracks")); 75 84 fItTrackInputArray = fTrackInputArray->MakeIterator(); 76 85 77 fNeutralInputArray = ImportArray(GetString("NeutralInputArray", " ParticlePropagator/tracks"));86 fNeutralInputArray = ImportArray(GetString("NeutralInputArray", "Calorimeter/eflowTowers")); 78 87 fItNeutralInputArray = fNeutralInputArray->MakeIterator(); 79 88 89 fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices")); 90 fItVertexInputArray = fVertexInputArray->MakeIterator(); 91 92 fZVertexResolution = GetDouble("ZVertexResolution", 0.005)*1.0E3; 93 80 94 // create output array(s) 81 95 82 96 fOutputArray = ExportArray(GetString("OutputArray", "jets")); 83 84 fNeutralsInPassingJets = ExportArray(GetString("NeutralsInPassingJets","eflowtowers"));85 86 97 } 87 98 … … 90 101 void PileUpJetID::Finish() 91 102 { 92 // cout << "In finish" << endl;93 94 103 if(fItJetInputArray) delete fItJetInputArray; 95 104 if(fItTrackInputArray) delete fItTrackInputArray; 96 105 if(fItNeutralInputArray) delete fItNeutralInputArray; 97 106 if(fItVertexInputArray) delete fItVertexInputArray; 98 107 } 99 108 … … 104 113 Candidate *candidate, *constituent; 105 114 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 } 108 133 109 134 // loop over all input candidates … … 114 139 area = candidate->Area; 115 140 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 { 140 157 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 { 194 195 // Not using constituents, using dr 195 196 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 217 226 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 { 243 260 candidate->MeanSqDeltaR = sumdrsqptsq/sumptsq; 244 } else { 245 candidate->MeanSqDeltaR = -999.; 261 } 262 else 263 { 264 candidate->MeanSqDeltaR = -999.0; 246 265 } 247 266 candidate->NCharged = nc; 248 267 candidate->NNeutrals = nn; 249 if (sumpt > 0.) { 268 if(sumpt > 0.0) 269 { 250 270 candidate->PTD = TMath::Sqrt(sumptsq) / sumpt; 251 for (int i = 0 ; i < 5 ; i++) { 271 for(i = 0; i < 5; ++i) 272 { 252 273 candidate->FracPt[i] = pt_ann[i]/sumpt; 253 274 } 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; 258 282 } 259 283 } 260 284 261 285 fOutputArray->Add(candidate); 262 263 // New stuff264 /*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 DeltaR296 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 307 286 } 308 287 } 309 288 310 289 //------------------------------------------------------------------------------ 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 1 19 #ifndef PileUpJetID_h 2 20 #define PileUpJetID_h … … 4 22 /** \class PileUpJetID 5 23 * 6 * CMS PileUp Jet ID Variables 24 * CMS PileUp Jet ID Variables, based on http://cds.cern.ch/record/1581583 7 25 * 8 * \author S. Zenz 26 * \author S. Zenz, December 2013 9 27 * 10 28 */ … … 16 34 17 35 class TObjArray; 18 class DelphesFormula;19 36 20 37 class PileUpJetID: public DelphesModule … … 34 51 Double_t fParameterR; 35 52 36 Double_t fMeanSqDeltaRMaxBarrel; // |eta| < 1.537 Double_t fBetaMinBarrel; // |eta| < 2.538 Double_t fMeanSqDeltaRMaxEndcap; // 1.5 < |eta| < 4.039 Double_t fBetaMinEndcap; // 1.5 < |eta| < 4.040 Double_t fMeanSqDeltaRMaxForward; // |eta| > 4.041 42 Double_t fNeutralPTMin;43 Double_t fJetPTMinForNeutrals;44 45 /*46 JAY47 ---48 49 |Eta|<1.550 51 meanSqDeltaR betaStar SigEff BgdEff52 0.13 0.92 96% 8%53 0.13 0.95 97% 16%54 0.13 0.97 98% 27%55 56 |Eta|>1.557 58 meanSqDeltaR betaStar SigEff BgdEff59 0.14 0.91 95% 15%60 0.14 0.94 97% 19%61 0.14 0.97 98% 29%62 63 BRYAN64 -----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.078 ----------------------------79 80 MeanSqDeltaR81 0.0782 0.1083 0.1484 0.285 */86 87 53 // If set to true, may have weird results for PFCHS 88 54 // If set to false, uses everything within dR < fParameterR even if in other jets &c. 89 55 // Results should be very similar for PF 90 Int_t fUseConstituents; 56 Int_t fUseConstituents; 91 57 92 58 Bool_t fAverageEachTower; … … 96 62 const TObjArray *fJetInputArray; //! 97 63 98 const TObjArray *fTrackInputArray; // SCZ99 const TObjArray *fNeutralInputArray; 64 const TObjArray *fTrackInputArray; //! 65 const TObjArray *fNeutralInputArray; //! 100 66 101 TIterator *fItTrackInputArray; // SCZ102 TIterator *fItNeutralInputArray; // SCZ67 TIterator *fItTrackInputArray; //! 68 TIterator *fItNeutralInputArray; //! 103 69 104 70 TObjArray *fOutputArray; //! 105 TObjArray *fNeutralsInPassingJets; // SCZ106 71 72 TIterator *fItVertexInputArray; //! 73 const TObjArray *fVertexInputArray; //! 107 74 108 ClassDef(PileUpJetID, 2) 75 Double_t fZVertexResolution; 76 77 ClassDef(PileUpJetID, 1) 109 78 }; 110 79 111 80 #endif 81 -
modules/PileUpMerger.cc
rd77b51d rd870fc5 80 80 fTVertexSpread = GetDouble("TVertexSpread", 1.5E-09); 81 81 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 87 82 // read vertex smearing formula 88 83 … … 116 111 TParticlePDG *pdgParticle; 117 112 Int_t pid; 118 Float_t x, y, z, t , vx, vy;113 Float_t x, y, z, t; 119 114 Float_t px, py, pz, e; 120 115 Double_t dz, dphi, dt; 121 Int_t numberOfEvents, event , numberOfParticles;116 Int_t numberOfEvents, event; 122 117 Long64_t allEntries, entry; 123 Candidate *candidate, *vertex ;118 Candidate *candidate, *vertexcandidate; 124 119 DelphesFactory *factory; 125 120 … … 128 123 fItInputArray->Reset(); 129 124 130 // --- Deal with primary vertex first ------125 // --- Deal with Primary vertex first ------ 131 126 132 127 fFunction->GetRandom2(dz, dt); … … 134 129 dt *= c_light*1.0E3; // necessary in order to make t in mm/c 135 130 dz *= 1.0E3; // necessary in order to make z in mm 136 vx = 0.0; 137 vy = 0.0; 138 numberOfParticles = fInputArray->GetEntriesFast(); 131 139 132 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 140 133 { 141 vx += candidate->Position.X();142 vy += candidate->Position.Y();143 134 z = candidate->Position.Z(); 144 135 t = candidate->Position.T(); … … 148 139 } 149 140 150 if(numberOfParticles > 0)151 {152 vx /= numberOfParticles;153 vy /= numberOfParticles;154 }155 156 141 factory = GetFactory(); 157 142 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); 161 146 162 147 // --- Then with pile-up vertices ------ … … 196 181 dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi()); 197 182 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 201 189 while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e)) 202 190 { … … 216 204 candidate->Momentum.RotateZ(dphi); 217 205 218 x -= fInputBeamSpotX;219 y -= fInputBeamSpotY;220 206 candidate->Position.SetXYZT(x, y, z + dz, t + dt); 221 207 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;227 208 228 209 fParticleOutputArray->Add(candidate); 229 210 } 230 231 if(numberOfParticles > 0)232 {233 vx /= numberOfParticles;234 vy /= numberOfParticles;235 }236 237 vertex = factory->NewCandidate();238 vertex->Position.SetXYZT(vx, vy, dz, dt);239 vertex->IsPU = 1;240 241 fVertexOutputArray->Add(vertex);242 211 } 243 212 } 244 213 245 214 //------------------------------------------------------------------------------ 215 -
modules/PileUpMerger.h
rd77b51d rd870fc5 53 53 Double_t fTVertexSpread; 54 54 55 Double_t fInputBeamSpotX;56 Double_t fInputBeamSpotY;57 Double_t fOutputBeamSpotX;58 Double_t fOutputBeamSpotY;59 60 55 DelphesTF2 *fFunction; //! 61 56 -
modules/PileUpMergerPythia8.cc
rd77b51d rd870fc5 21 21 * Merges particles from pile-up sample into event 22 22 * 23 * \author M. Selvaggi - UCL, Louvain-la-Neuve23 * \author P. Selvaggi - UCL, Louvain-la-Neuve 24 24 * 25 25 */ … … 29 29 #include "classes/DelphesClasses.h" 30 30 #include "classes/DelphesFactory.h" 31 #include "classes/Delphes TF2.h"31 #include "classes/DelphesFormula.h" 32 32 #include "classes/DelphesPileUpReader.h" 33 33 … … 56 56 57 57 PileUpMergerPythia8::PileUpMergerPythia8() : 58 f Function(0), fPythia(0), fItInputArray(0)58 fPythia(0), fItInputArray(0) 59 59 { 60 fFunction = new DelphesTF2;61 60 } 62 61 … … 65 64 PileUpMergerPythia8::~PileUpMergerPythia8() 66 65 { 67 delete fFunction;68 66 } 69 67 … … 74 72 const char *fileName; 75 73 76 fPileUpDistribution = GetInt("PileUpDistribution", 0);77 78 74 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; 87 76 88 77 fPTMin = GetDouble("PTMin", 0.0); 89 90 fFunction->Compile(GetString("VertexDistributionFormula", "0.0"));91 fFunction->SetRange(-fZVertexSpread, -fTVertexSpread, fZVertexSpread, fTVertexSpread);92 78 93 79 fileName = GetString("ConfigFile", "MinBias.cmnd"); … … 100 86 101 87 // create output arrays 102 fParticleOutputArray = ExportArray(GetString("ParticleOutputArray", "stableParticles")); 103 fVertexOutputArray = ExportArray(GetString("VertexOutputArray", "vertices")); 88 fOutputArray = ExportArray(GetString("OutputArray", "stableParticles")); 104 89 } 105 90 … … 117 102 TDatabasePDG *pdg = TDatabasePDG::Instance(); 118 103 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; 121 106 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; 125 110 DelphesFactory *factory; 126 111 127 const Double_t c_light = 2.99792458E8;128 129 112 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/c136 dz *= 1.0E3; // necessary in order to make z in mm137 vx = 0.0;138 vy = 0.0;139 numberOfParticles = fInputArray->GetEntriesFast();140 113 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 141 114 { 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); 155 116 } 156 117 157 118 factory = GetFactory(); 158 119 159 vertex = factory->NewCandidate(); 160 vertex->Position.SetXYZT(vx, vy, dz, dt); 161 fVertexOutputArray->Add(vertex); 120 poisson = gRandom->Poisson(fMeanPileUp); 162 121 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) 179 123 { 180 124 while(!fPythia->next()); 181 125 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); 189 127 dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi()); 190 128 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) 195 130 { 196 131 Pythia8::Particle &particle = fPythia->event[i]; 197 132 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; 201 134 202 135 pid = particle.id(); … … 219 152 candidate->Momentum.RotateZ(dphi); 220 153 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); 224 155 candidate->Position.RotateZ(dphi); 225 candidate->Position += TLorentzVector(fOutputBeamSpotX, fOutputBeamSpotY, 0.0, 0.0);226 156 227 vx += candidate->Position.X(); 228 vy += candidate->Position.Y(); 229 230 fParticleOutputArray->Add(candidate); 157 fOutputArray->Add(candidate); 231 158 } 232 233 if(numberOfParticles > 0)234 {235 vx /= numberOfParticles;236 vy /= numberOfParticles;237 }238 239 vertex = factory->NewCandidate();240 vertex->Position.SetXYZT(vx, vy, dz, dt);241 vertex->IsPU = 1;242 243 fVertexOutputArray->Add(vertex);244 159 } 245 160 } 246 161 247 162 //------------------------------------------------------------------------------ 163 -
modules/PileUpMergerPythia8.h
rd77b51d rd870fc5 31 31 32 32 class TObjArray; 33 class DelphesTF2;34 33 35 34 namespace Pythia8 … … 51 50 private: 52 51 53 Int_t fPileUpDistribution;54 52 Double_t fMeanPileUp; 55 56 53 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 64 54 Double_t fPTMin; 65 66 DelphesTF2 *fFunction; //!67 55 68 56 Pythia8::Pythia *fPythia; //! … … 72 60 const TObjArray *fInputArray; //! 73 61 74 TObjArray *fParticleOutputArray; //! 75 TObjArray *fVertexOutputArray; //! 62 TObjArray *fOutputArray; //! 76 63 77 64 ClassDef(PileUpMergerPythia8, 1) -
modules/SimpleCalorimeter.cc
rd77b51d rd870fc5 150 150 fEnergySignificanceMin = GetDouble("EnergySignificanceMin", 0.0); 151 151 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 155 152 // switch on or off the dithering of the center of calorimeter towers 156 f SmearTowerCenter = GetBool("SmearTowerCenter", true);153 fDitherTowerCenter = GetBool("DitherTowerCenter", true); 157 154 158 155 // read resolution formulas … … 412 409 if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0; 413 410 414 if(f SmearTowerCenter)411 if(fDitherTowerCenter) 415 412 { 416 413 eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]); … … 427 424 fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time); 428 425 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 429 430 fTower->Eem = (!fIsEcal) ? 0 : energy;431 fTower->Ehad = (fIsEcal) ? 0 : energy;432 426 433 427 fTower->Edges[0] = fTowerEdges[0]; … … 453 447 pt = energy / TMath::CosH(eta); 454 448 455 tower->Eem = (!fIsEcal) ? 0 : energy;456 tower->Ehad = (fIsEcal) ? 0 : energy;457 458 449 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 459 450 fEFlowTowerOutputArray->Add(tower); -
modules/SimpleCalorimeter.h
rd77b51d rd870fc5 1 2 1 /* 3 2 * Delphes: a framework for fast simulation of a generic collider experiment … … 73 72 Double_t fEnergySignificanceMin; 74 73 75 Bool_t fSmearTowerCenter; 76 77 Bool_t fIsEcal; //! 74 Bool_t fDitherTowerCenter; 78 75 79 76 TFractionMap fFractionMap; //! -
modules/TauTagging.cc
rd77b51d rd870fc5 33 33 #include "classes/DelphesFactory.h" 34 34 #include "classes/DelphesFormula.h" 35 36 #include "ExRootAnalysis/ExRootResult.h" 37 #include "ExRootAnalysis/ExRootFilter.h" 38 #include "ExRootAnalysis/ExRootClassifier.h" 35 39 36 40 #include "TMath.h" … … 49 53 using namespace std; 50 54 55 //------------------------------------------------------------------------------ 56 57 class TauTaggingPartonClassifier : public ExRootClassifier 58 { 59 public: 60 61 TauTaggingPartonClassifier(const TObjArray *array); 62 63 Int_t GetCategory(TObject *object); 64 65 Double_t fEtaMax, fPTMin; 66 67 const TObjArray *fParticleInputArray; 68 }; 51 69 52 70 //------------------------------------------------------------------------------ … … 61 79 { 62 80 Candidate *tau = static_cast<Candidate *>(object); 63 Candidate *daughter1 = 0; 64 Candidate *daughter2 = 0; 65 81 Candidate *daughter = 0; 66 82 const TLorentzVector &momentum = tau->Momentum; 67 Int_t pdgCode, i , j;83 Int_t pdgCode, i; 68 84 69 85 pdgCode = TMath::Abs(tau->PID); … … 74 90 if(tau->D1 < 0) return -1; 75 91 76 if(tau->D2 < tau->D1) return -1;77 78 92 if(tau->D1 >= fParticleInputArray->GetEntriesFast() || 79 93 tau->D2 >= fParticleInputArray->GetEntriesFast()) … … 84 98 for(i = tau->D1; i <= tau->D2; ++i) 85 99 { 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; 100 103 } 101 104 … … 203 206 tauArray = fFilter->GetSubArray(fClassifier, 0); 204 207 208 if(tauArray == 0) return; 209 210 TIter itTauArray(tauArray); 211 205 212 // loop over all input jets 206 213 fItJetInputArray->Reset(); … … 215 222 216 223 // 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()) 220 231 { 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; 243 248 } 244 249 } -
modules/TauTagging.h
rd77b51d rd870fc5 31 31 32 32 #include "classes/DelphesModule.h" 33 #include "ExRootAnalysis/ExRootResult.h"34 #include "ExRootAnalysis/ExRootFilter.h"35 #include "ExRootAnalysis/ExRootClassifier.h"36 33 37 34 #include <map> … … 79 76 }; 80 77 81 82 //------------------------------------------------------------------------------83 84 class TauTaggingPartonClassifier : public ExRootClassifier85 {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 98 78 #endif -
modules/TrackPileUpSubtractor.cc
rd77b51d rd870fc5 74 74 fZVertexResolution = GetDouble("ZVertexResolution", 0.005)*1.0E3; 75 75 76 fPTMin = GetDouble("PTMin", 0.);77 76 // import arrays with output from other modules 78 77 79 78 ExRootConfParam param = GetParam("InputArray"); 80 79 Long_t i, size; … … 148 147 // assume perfect pile-up subtraction for tracks outside fZVertexResolution 149 148 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); 156 152 } 157 153 } -
modules/TrackPileUpSubtractor.h
rd77b51d rd870fc5 50 50 Double_t fZVertexResolution; 51 51 52 Double_t fPTMin;53 54 52 std::map< TIterator *, TObjArray * > fInputMap; //! 55 53 -
modules/TreeWriter.cc
rd77b51d rd870fc5 291 291 entry->ZOuter = position.Z(); 292 292 entry->TOuter = position.T()*1.0E-3/c_light; 293 293 294 294 entry->Dxy = candidate->Dxy; 295 295 entry->SDxy = candidate->SDxy ; … … 297 297 entry->Yd = candidate->Yd; 298 298 entry->Zd = candidate->Zd; 299 299 300 300 const TLorentzVector &momentum = candidate->Momentum; 301 301 … … 362 362 363 363 entry->T = position.T()*1.0E-3/c_light; 364 entry->NTimeHits = candidate->NTimeHits;365 364 366 365 FillParticles(candidate, &entry->Particles); … … 404 403 entry->T = position.T()*1.0E-3/c_light; 405 404 406 // Isolation variables407 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 415 405 entry->EhadOverEem = candidate->Eem > 0.0 ? candidate->Ehad/candidate->Eem : 999.9; 416 406 … … 452 442 entry->T = position.T()*1.0E-3/c_light; 453 443 454 // Isolation variables455 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 464 444 entry->Charge = candidate->Charge; 465 445 … … 489 469 const TLorentzVector &momentum = candidate->Momentum; 490 470 const TLorentzVector &position = candidate->Position; 471 491 472 492 473 pt = momentum.Pt(); … … 507 488 entry->T = position.T()*1.0E-3/c_light; 508 489 509 // Isolation variables510 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 518 490 entry->Charge = candidate->Charge; 519 491 … … 532 504 Double_t ecalEnergy, hcalEnergy; 533 505 const Double_t c_light = 2.99792458E8; 534 Int_t i;535 506 536 507 array->Sort(); … … 561 532 entry->Mass = momentum.M(); 562 533 563 entry->Area = candidate->Area;564 565 534 entry->DeltaEta = candidate->DeltaEta; 566 535 entry->DeltaPhi = candidate->DeltaPhi; 567 536 568 entry->Flavor = candidate->Flavor;569 entry->FlavorAlgo = candidate->FlavorAlgo;570 entry->FlavorPhys = candidate->FlavorPhys;571 572 537 entry->BTag = candidate->BTag; 573 574 entry->BTagAlgo = candidate->BTagAlgo;575 entry->BTagPhys = candidate->BTagPhys;576 577 538 entry->TauTag = candidate->TauTag; 578 539 … … 600 561 entry->MeanSqDeltaR = candidate->MeanSqDeltaR; 601 562 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 618 577 FillParticles(candidate, &entry->Particles); 619 578 } -
modules/UniqueObjectFinder.cc
rd77b51d rd870fc5 74 74 TIterator *iterator; 75 75 76 fInputMap.clear();77 78 76 size = param.GetSize(); 79 77 for(i = 0; i < size/2; ++i) … … 82 80 iterator = array->MakeIterator(); 83 81 84 fInputMap .push_back(make_pair(iterator, ExportArray(param[i*2 + 1].GetString())));82 fInputMap[iterator] = ExportArray(param[i*2 + 1].GetString()); 85 83 } 86 84 } … … 90 88 void UniqueObjectFinder::Finish() 91 89 { 92 vector< pair< TIterator *, TObjArray * >>::iterator itInputMap;90 map< TIterator *, TObjArray * >::iterator itInputMap; 93 91 TIterator *iterator; 94 92 … … 106 104 { 107 105 Candidate *candidate; 108 vector< pair< TIterator *, TObjArray * >>::iterator itInputMap;106 map< TIterator *, TObjArray * >::iterator itInputMap; 109 107 TIterator *iterator; 110 108 TObjArray *array; … … 130 128 //------------------------------------------------------------------------------ 131 129 132 Bool_t UniqueObjectFinder::Unique(Candidate *candidate, vector< pair< TIterator *, TObjArray * >>::iterator itInputMap)130 Bool_t UniqueObjectFinder::Unique(Candidate *candidate, map< TIterator *, TObjArray * >::iterator itInputMap) 133 131 { 134 132 Candidate *previousCandidate; 135 vector< pair< TIterator *, TObjArray * >>::iterator previousItInputMap;133 map< TIterator *, TObjArray * >::iterator previousItInputMap; 136 134 TObjArray *array; 137 135 -
modules/UniqueObjectFinder.h
rd77b51d rd870fc5 30 30 #include "classes/DelphesModule.h" 31 31 32 #include <vector> 33 #include <utility> 32 #include <map> 34 33 35 34 class TIterator; … … 50 49 private: 51 50 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); 53 52 54 std:: vector< std::pair< TIterator *, TObjArray * >> fInputMap; //!53 std::map< TIterator *, TObjArray * > fInputMap; //! 55 54 56 55 ClassDef(UniqueObjectFinder, 1) -
readers/DelphesCMSFWLite.cpp
rd77b51d rd870fc5 56 56 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" 57 57 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" 58 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"59 #include "SimDataFormats/GeneratorProducts/interface/WeightsInfo.h"60 58 61 59 using namespace std; … … 64 62 65 63 void 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) 69 67 { 70 68 fwlite::Handle< GenEventInfoProduct > handleGenEventInfo; 71 69 72 fwlite::Handle< LHEEventProduct > handleLHEEvent;73 74 70 fwlite::Handle< vector< reco::GenParticle > > handleParticle; 75 71 vector< reco::GenParticle >::const_iterator itParticle; … … 79 75 80 76 handleGenEventInfo.getByLabel(event, "generator"); 81 handleLHEEvent.getByLabel(event, "source");82 77 handleParticle.getByLabel(event, "genParticles"); 83 78 84 79 HepMCEvent *element; 85 Weight *weight;86 80 Candidate *candidate; 87 81 TDatabasePDG *pdg; … … 92 86 Double_t px, py, pz, e, mass; 93 87 Double_t x, y, z; 94 95 const vector< gen::WeightsInfo > &vectorWeightsInfo = handleLHEEvent->weights();96 vector< gen::WeightsInfo >::const_iterator itWeightsInfo;97 88 98 89 element = static_cast<HepMCEvent *>(branchEvent->NewEntry()); … … 117 108 element->ReadTime = 0.0; 118 109 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 }125 110 126 111 pdg = TDatabasePDG::Instance(); … … 201 186 TStopwatch eventStopWatch; 202 187 ExRootTreeWriter *treeWriter = 0; 203 ExRootTreeBranch *branchEvent = 0 , *branchRwgt = 0;188 ExRootTreeBranch *branchEvent = 0; 204 189 ExRootConfReader *confReader = 0; 205 190 Delphes *modularDelphes = 0; … … 241 226 242 227 branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class()); 243 branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class());244 228 245 229 confReader = new ExRootConfReader; … … 284 268 for(event.toBegin(); !event.atEnd() && !interrupted; ++event) 285 269 { 286 ConvertInput(event, eventCounter, branchEvent, branchRwgt,factory,270 ConvertInput(event, eventCounter, branchEvent, factory, 287 271 allParticleOutputArray, stableParticleOutputArray, partonOutputArray); 288 272 modularDelphes->ProcessTask(); -
readers/DelphesLHEF.cpp
rd77b51d rd870fc5 63 63 TStopwatch readStopWatch, procStopWatch; 64 64 ExRootTreeWriter *treeWriter = 0; 65 ExRootTreeBranch *branchEvent = 0, *branch Weight = 0;65 ExRootTreeBranch *branchEvent = 0, *branchRwgt = 0; 66 66 ExRootConfReader *confReader = 0; 67 67 Delphes *modularDelphes = 0; … … 103 103 104 104 branchEvent = treeWriter->NewBranch("Event", LHEFEvent::Class()); 105 branch Weight = treeWriter->NewBranch("Weight", Weight::Class());105 branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class()); 106 106 107 107 confReader = new ExRootConfReader; … … 196 196 197 197 reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch); 198 reader->Analyze Weight(branchWeight);198 reader->AnalyzeRwgt(branchRwgt); 199 199 200 200 treeWriter->Fill(); -
readers/DelphesPythia8.cpp
rd77b51d rd870fc5 20 20 #include <iostream> 21 21 #include <sstream> 22 #include <string>23 22 24 23 #include <signal.h> … … 39 38 #include "classes/DelphesClasses.h" 40 39 #include "classes/DelphesFactory.h" 41 #include "classes/DelphesLHEFReader.h"42 40 43 41 #include "ExRootAnalysis/ExRootTreeWriter.h" … … 151 149 char appName[] = "DelphesPythia8"; 152 150 stringstream message; 153 FILE *inputFile = 0;154 151 TFile *outputFile = 0; 155 152 TStopwatch readStopWatch, procStopWatch; 156 153 ExRootTreeWriter *treeWriter = 0; 157 154 ExRootTreeBranch *branchEvent = 0; 158 ExRootTreeBranch *branchEventLHEF = 0, *branchWeightLHEF = 0;159 155 ExRootConfReader *confReader = 0; 160 156 Delphes *modularDelphes = 0; 161 157 DelphesFactory *factory = 0; 162 158 TObjArray *stableParticleOutputArray = 0, *allParticleOutputArray = 0, *partonOutputArray = 0; 163 TObjArray *stableParticleOutputArrayLHEF = 0, *allParticleOutputArrayLHEF = 0, *partonOutputArrayLHEF = 0;164 DelphesLHEFReader *reader = 0;165 159 Long64_t eventCounter, errorCounter; 166 160 Long64_t numberOfEvents, timesAllowErrors; … … 211 205 partonOutputArray = modularDelphes->ExportArray("partons"); 212 206 213 // Initialize Pythia 207 modularDelphes->InitTask(); 208 209 // Initialize pythia 214 210 pythia = new Pythia8::Pythia; 215 211 … … 225 221 numberOfEvents = pythia->mode("Main:numberOfEvents"); 226 222 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();243 223 244 224 pythia->init(); … … 254 234 for(eventCounter = 0; eventCounter < numberOfEvents && !interrupted; ++eventCounter) 255 235 { 256 while(reader && reader->ReadBlock(factory, allParticleOutputArrayLHEF,257 stableParticleOutputArrayLHEF, partonOutputArrayLHEF) && !reader->EventReady());258 259 236 if(!pythia->next()) 260 237 { 261 238 // If failure because reached end of file then exit event loop 262 if (pythia->info.atEndOfFile())239 if (pythia->info.atEndOfFile()) 263 240 { 264 241 cerr << "Aborted since reached end of Les Houches Event File" << endl; … … 267 244 268 245 // 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; 278 249 } 279 250 … … 287 258 procStopWatch.Stop(); 288 259 289 if(reader)290 {291 reader->AnalyzeEvent(branchEventLHEF, eventCounter, &readStopWatch, &procStopWatch);292 reader->AnalyzeWeight(branchWeightLHEF);293 }294 295 260 treeWriter->Fill(); 296 261 297 262 treeWriter->Clear(); 298 263 modularDelphes->Clear(); 299 if(reader) reader->Clear();300 264 301 265 readStopWatch.Start(); … … 313 277 cout << "** Exiting..." << endl; 314 278 315 delete reader;316 279 delete pythia; 317 280 delete modularDelphes;
Note:
See TracChangeset
for help on using the changeset viewer.