Changeset d77b51d in git
- Timestamp:
- Sep 29, 2015, 2:08:10 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- a98c7ef
- Parents:
- d870fc5 (diff), 06ec139 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 38 added
- 2 deleted
- 95 edited
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
rd870fc5 rd77b51d 1 3.3.0: 2 - updated FastJet library to 3.1.2 3 - added a detector card for the ILD detector (for ILC) based on http://arxiv.org/abs/1306.6329 4 - adapted examples, EventDisplay, DelphesFormula and DelphesTF2 to ROOT 6.04 5 - fixed tau-tagging for events without tau (thanks to Sho Iwamoto) 6 - added PhotonConversions module 7 - added TaggingParticlesSkimmer module 8 - added phi and energy dependence to AngularSmearing, BTagging, Efficiency, EnergyScale, EnergySmearing, IdentificationMap, ImpactParameterSmearing and MomentumSmearing 9 - added IsRecoPU flag and PTMin parameter to TrackPileUpSubtractor 10 - added Invert and Status options to PdgCodeFilter (thanks to Chase Shimmin) 11 - added new isolation variables to Candidate, Electron, Muon and Photon classes (thanks to Raffaele Gerosa) 12 - added code from CMS to PileUpMerger and PileUpMergerPythia8 13 - added timing information to Calorimeter 14 - added new PileUpJetID version (thanks to Seth Senz) 15 - added Area 4-vector to jet class 16 - added PUPPI algorithm and RunPUPPI module 17 - added RecursiveTools package from fastjet contribs 18 - replaced N-subjettiness with an array in Jet class (same as in Candidate class) 19 - added Trimming, Pruning and SoftDrop to FastJetFinder 20 - added possibility to use DelphesPythia8 with LHE files 21 - added Pythia8 examples 22 - added JetFlavourAssociation module with Physics and Algorithmic definitions of the jet flavor 23 - added new jet flavor definitions to the BTagging module (available only when running DelphesPythia8 with LHE files) 24 1 25 3.2.0: 2 moved code repository to [GitHub](http://github.com/delphes/delphes) 3 moved configuration files from examples to cards directory 4 new event display, with automatic discovery of the object collections, navigation controls, and 3D geometry sketch (for more details, see [event display manual](/workbook/event-display)) 5 updated FastJet library to 3.1.0 6 added zero suppression in Calorimeter modules 7 added FastJetGridMedianEstimator module (provides fixed grid eta-dependent average pile-up density) 8 added AngularSmearing module (to smear track eta,phi) 9 added PdgCodeFilter (to veto particle with given PID from collections) 10 added IdentificationMap (allows to apply (mis)-identification) 11 added Example4.C (provide and example on how to compute the jet energy scale) 12 added examples (examples/ExternalFastJetBasic.cpp and examples/ExternalFastJetHepMC.cpp) on how to run Delphes as a library with external FastJet installation 13 updated example for FCC studies (cards/delphes_card_FCC_basic.tcl) 14 added example for LHCb studies (cards/delphes_card_LHCb.tcl) 26 - moved code repository to GitHub (http://github.com/delphes/delphes) 27 - moved configuration files from examples to cards directory 28 - new event display, with automatic discovery of the object collections, navigation controls, and 3D geometry sketch (for more details, see WorkBook/EventDisplay) 29 - updated FastJet library to 3.1.0 30 - added zero suppression to Calorimeter and SimpleCalorimeter modules 31 - added SmearTowerCenter configuration parameter to Calorimeter and SimpleCalorimeter modules (#363) 32 - added FastJetGridMedianEstimator module (provides much faster pile-up subtraction based on a fixed grid eta-dependent average pile-up density computation) 33 - added AngularSmearing module (to smear track eta,phi) 34 - added PdgCodeFilter (to veto particle with given PID from collections) 35 - added IdentificationMap (allows to apply (mis)-identification) 36 - added Example4.C (provides an example on how to compute the jet energy scale) 37 - added examples (examples/ExternalFastJet) on how to run Delphes as a library with external FastJet installation 38 - updated card for FCC studies (cards/delphes_card_FCC_basic.tcl) 39 - added card for LHCb studies (cards/delphes_card_LHCb.tcl) 40 - made interface with Pythia 8 turned off by default 41 - adapted Isolation module to new energy-flow photons and neutral hadrons (#362) 42 - fixed jet mass calculation for anti-kt with "winner-take-all" (#355) 43 - fixed crashing of root2lhco when ROOT file doesn't contain all required branches (#340) 44 - added possibility to build Delphes with CMake (#313) 15 45 16 46 3.1.2: 17 47 - fixed smearing of (z,t) vertex distribution in the PileUpMerger module 18 48 19 49 3.1.1: 20 50 - adapted DelphesSTDHEP to the latest version of the STDHEP format introduced in MadGraph5_aMC@NLO 2.1.2 21 51 22 52 3.1.0: 23 53 added Hector module (fast simulator for the transport of particles in beam lines) 24 25 26 27 28 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) 29 59 30 60 3.0.12: 31 32 33 34 35 61 - updated FastJet library to 3.0.6 62 - added smearing of (z,t) vertex distribution in the PileUpMerger module 63 - propagation time computed for every output collection 64 - added TimeSmearing module (for propagation time measurement) 65 - added PileUpJetId module (thanks to Seth Senz) 36 66 37 67 3.0.11: 38 39 40 41 42 43 44 45 68 - new energy-flow algorithm, optimized for better compatibility with pile-up subtraction 69 - added possibility of computing pile-up density in different eta regions via the RhoEtaRange parameter in FastJetFinder module 70 - implemented correct efficiency/resolution for high pt muons in CMS cards 71 - removed pile-up subtraction on missing energy 72 - added possibility to read re-weighting information from LHEF input files 73 - added UsePTSum and PTSumMax parameters to isolation module 74 - added possibility of specifying the shape of pile-up distribution (via the PileUpDistribution parameter in the PileUpMerger module) 75 - added pile-up Vertex collection to the output tree 46 76 47 77 3.0.10: 48 49 50 51 52 53 54 55 56 57 58 59 60 61 78 - new readers (DelphesProMC.cpp, DelphesProMC.py (#220), DelphesPythia8) 79 - new modules (EnergyScale, PileUpMergerPythia8, Weighter) 80 - new module parameters (absolute/relative isolation (#187), flat/poisson pile-up distribution) 81 - new global parameters (max number of events, skip events (#183), random seed (#202)) 82 - new branches (pile-up event density rho, MC event weight) 83 - updated CMS and ALTAS detector cards (and added ATLAS pile-up detector card) 84 - calorimeter smearing is now performed according to a logNormal distribution 85 - improved particle-flow algorithm (#204) 86 - added calculation of particle propagation time in the tracker 87 - fixed tau-jet matching by only considering visible hadronic tau (#208) 88 - read masses from MC event file (#195, #201) 89 - bug fixes in DelphesCMSFWLite (#196) 90 - compilable analysis macro examples (#182) 91 - ability to read MC re-weighting information from LHE files 62 92 63 93 3.0.9: 64 65 66 94 - fixed reading of weighted STDHEP events (#181) 95 - fixed script building Delphes with CMSFWLite (#180) 96 - added more particles to StatusPidFilter (#179) 67 97 68 98 3.0.8: 69 70 71 72 99 - fixed treatment of units in HepMC format (#175) 100 - added Weight to HepMCEvent branch to store the event weight (#173) 101 - added Rho branch to store the rho energy density (#176) 102 - added random rotation of pile-up events around the z-axis 73 103 74 104 3.0.7: 75 76 77 105 - added separate make rule for the event display to fix the compilation problem for systems without OpenGL libraries (#168, #127) 106 - added Cloner module 107 - modified BTagging module (several BTagging bits can be stored for the same jet collection, see here) -
Makefile
rd870fc5 rd77b51d 29 29 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH))) 30 30 endif 31 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormats PatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils31 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsCommon -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon 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 \ 259 260 external/ExRootAnalysis/ExRootTreeWriter.h \ 260 261 external/ExRootAnalysis/ExRootTreeBranch.h \ … … 308 309 modules/Delphes.h \ 309 310 modules/AngularSmearing.h \ 311 modules/PhotonConversions.h \ 310 312 modules/ParticlePropagator.h \ 311 313 modules/Efficiency.h \ … … 329 331 modules/JetPileUpSubtractor.h \ 330 332 modules/TrackPileUpSubtractor.h \ 333 modules/TaggingParticlesSkimmer.h \ 331 334 modules/PileUpJetID.h \ 332 335 modules/ConstituentFilter.h \ … … 336 339 modules/Weighter.h \ 337 340 modules/Hector.h \ 341 modules/JetFlavorAssociation.h \ 342 modules/JetFakeParticle.h \ 338 343 modules/ExampleModule.h 339 344 ModulesDict$(PcmSuf): \ … … 353 358 modules/FastJetLinkDef.h \ 354 359 modules/FastJetFinder.h \ 355 modules/FastJetGridMedianEstimator.h 360 modules/FastJetGridMedianEstimator.h \ 361 modules/RunPUPPI.h 356 362 FastJetDict$(PcmSuf): \ 357 363 tmp/modules/FastJetDict$(PcmSuf) \ … … 386 392 classes/DelphesFactory.h \ 387 393 classes/SortableObject.h 394 tmp/classes/DelphesCylindricalFormula.$(ObjSuf): \ 395 classes/DelphesCylindricalFormula.$(SrcSuf) \ 396 classes/DelphesCylindricalFormula.h 388 397 tmp/classes/DelphesFactory.$(ObjSuf): \ 389 398 classes/DelphesFactory.$(SrcSuf) \ … … 534 543 classes/DelphesClasses.h \ 535 544 classes/DelphesFactory.h \ 536 classes/DelphesFormula.h \ 537 external/ExRootAnalysis/ExRootResult.h \ 538 external/ExRootAnalysis/ExRootFilter.h \ 539 external/ExRootAnalysis/ExRootClassifier.h 545 classes/DelphesFormula.h 540 546 tmp/modules/Calorimeter.$(ObjSuf): \ 541 547 modules/Calorimeter.$(SrcSuf) \ … … 651 657 external/ExRootAnalysis/ExRootFilter.h \ 652 658 external/ExRootAnalysis/ExRootClassifier.h 659 tmp/modules/JetFakeParticle.$(ObjSuf): \ 660 modules/JetFakeParticle.$(SrcSuf) \ 661 modules/JetFakeParticle.h \ 662 classes/DelphesClasses.h \ 663 classes/DelphesFactory.h \ 664 classes/DelphesFormula.h \ 665 external/ExRootAnalysis/ExRootResult.h \ 666 external/ExRootAnalysis/ExRootFilter.h \ 667 external/ExRootAnalysis/ExRootClassifier.h 668 tmp/modules/JetFlavorAssociation.$(ObjSuf): \ 669 modules/JetFlavorAssociation.$(SrcSuf) \ 670 modules/JetFlavorAssociation.h \ 671 classes/DelphesClasses.h \ 672 classes/DelphesFactory.h \ 673 classes/DelphesFormula.h \ 674 external/ExRootAnalysis/ExRootResult.h \ 675 external/ExRootAnalysis/ExRootFilter.h \ 676 external/ExRootAnalysis/ExRootClassifier.h 653 677 tmp/modules/JetPileUpSubtractor.$(ObjSuf): \ 654 678 modules/JetPileUpSubtractor.$(SrcSuf) \ … … 705 729 external/ExRootAnalysis/ExRootFilter.h \ 706 730 external/ExRootAnalysis/ExRootClassifier.h 731 tmp/modules/PhotonConversions.$(ObjSuf): \ 732 modules/PhotonConversions.$(SrcSuf) \ 733 modules/PhotonConversions.h \ 734 classes/DelphesClasses.h \ 735 classes/DelphesFactory.h \ 736 classes/DelphesCylindricalFormula.h \ 737 external/ExRootAnalysis/ExRootResult.h \ 738 external/ExRootAnalysis/ExRootFilter.h \ 739 external/ExRootAnalysis/ExRootClassifier.h 707 740 tmp/modules/PileUpJetID.$(ObjSuf): \ 708 741 modules/PileUpJetID.$(SrcSuf) \ … … 729 762 classes/DelphesClasses.h \ 730 763 classes/DelphesFactory.h \ 731 classes/Delphes Formula.h \764 classes/DelphesTF2.h \ 732 765 classes/DelphesPileUpReader.h \ 733 766 external/ExRootAnalysis/ExRootResult.h \ … … 752 785 external/ExRootAnalysis/ExRootFilter.h \ 753 786 external/ExRootAnalysis/ExRootClassifier.h 787 tmp/modules/TaggingParticlesSkimmer.$(ObjSuf): \ 788 modules/TaggingParticlesSkimmer.$(SrcSuf) \ 789 modules/TaggingParticlesSkimmer.h \ 790 modules/TauTagging.h \ 791 classes/DelphesClasses.h \ 792 classes/DelphesFactory.h \ 793 classes/DelphesFormula.h \ 794 external/ExRootAnalysis/ExRootResult.h \ 795 external/ExRootAnalysis/ExRootFilter.h \ 796 external/ExRootAnalysis/ExRootClassifier.h 754 797 tmp/modules/TauTagging.$(ObjSuf): \ 755 798 modules/TauTagging.$(SrcSuf) \ … … 757 800 classes/DelphesClasses.h \ 758 801 classes/DelphesFactory.h \ 759 classes/DelphesFormula.h \ 760 external/ExRootAnalysis/ExRootResult.h \ 761 external/ExRootAnalysis/ExRootFilter.h \ 762 external/ExRootAnalysis/ExRootClassifier.h 802 classes/DelphesFormula.h 763 803 tmp/modules/TimeSmearing.$(ObjSuf): \ 764 804 modules/TimeSmearing.$(SrcSuf) \ … … 815 855 DELPHES_OBJ += \ 816 856 tmp/classes/DelphesClasses.$(ObjSuf) \ 857 tmp/classes/DelphesCylindricalFormula.$(ObjSuf) \ 817 858 tmp/classes/DelphesFactory.$(ObjSuf) \ 818 859 tmp/classes/DelphesFormula.$(ObjSuf) \ … … 875 916 tmp/modules/ImpactParameterSmearing.$(ObjSuf) \ 876 917 tmp/modules/Isolation.$(ObjSuf) \ 918 tmp/modules/JetFakeParticle.$(ObjSuf) \ 919 tmp/modules/JetFlavorAssociation.$(ObjSuf) \ 877 920 tmp/modules/JetPileUpSubtractor.$(ObjSuf) \ 878 921 tmp/modules/LeptonDressing.$(ObjSuf) \ … … 881 924 tmp/modules/ParticlePropagator.$(ObjSuf) \ 882 925 tmp/modules/PdgCodeFilter.$(ObjSuf) \ 926 tmp/modules/PhotonConversions.$(ObjSuf) \ 883 927 tmp/modules/PileUpJetID.$(ObjSuf) \ 884 928 tmp/modules/PileUpMerger.$(ObjSuf) \ 885 929 tmp/modules/SimpleCalorimeter.$(ObjSuf) \ 886 930 tmp/modules/StatusPidFilter.$(ObjSuf) \ 931 tmp/modules/TaggingParticlesSkimmer.$(ObjSuf) \ 887 932 tmp/modules/TauTagging.$(ObjSuf) \ 888 933 tmp/modules/TimeSmearing.$(ObjSuf) \ … … 898 943 endif 899 944 945 tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf): \ 946 external/PUPPI/puppiCleanContainer.$(SrcSuf) \ 947 external/fastjet/Selector.hh 900 948 tmp/external/fastjet/AreaDefinition.$(ObjSuf): \ 901 949 external/fastjet/AreaDefinition.$(SrcSuf) \ … … 1071 1119 tmp/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(ObjSuf): \ 1072 1120 external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(SrcSuf) 1121 tmp/external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(ObjSuf): \ 1122 external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(SrcSuf) \ 1123 external/fastjet/JetDefinition.hh \ 1124 external/fastjet/ClusterSequenceAreaBase.hh 1125 tmp/external/fastjet/contribs/RecursiveTools/Recluster.$(ObjSuf): \ 1126 external/fastjet/contribs/RecursiveTools/Recluster.$(SrcSuf) 1127 tmp/external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(ObjSuf): \ 1128 external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(SrcSuf) \ 1129 external/fastjet/JetDefinition.hh \ 1130 external/fastjet/ClusterSequenceAreaBase.hh 1131 tmp/external/fastjet/contribs/RecursiveTools/SoftDrop.$(ObjSuf): \ 1132 external/fastjet/contribs/RecursiveTools/SoftDrop.$(SrcSuf) 1073 1133 tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf): \ 1074 1134 external/fastjet/contribs/SoftKiller/SoftKiller.$(SrcSuf) … … 1204 1264 external/fastjet/contribs/Nsubjettiness/Njettiness.hh \ 1205 1265 external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \ 1206 external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh 1266 external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh \ 1267 external/fastjet/tools/Filter.hh \ 1268 external/fastjet/tools/Pruner.hh \ 1269 external/fastjet/contribs/RecursiveTools/SoftDrop.hh 1207 1270 tmp/modules/FastJetGridMedianEstimator.$(ObjSuf): \ 1208 1271 modules/FastJetGridMedianEstimator.$(SrcSuf) \ … … 1229 1292 external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \ 1230 1293 external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh 1294 tmp/modules/RunPUPPI.$(ObjSuf): \ 1295 modules/RunPUPPI.$(SrcSuf) \ 1296 modules/RunPUPPI.h \ 1297 external/PUPPI/puppiCleanContainer.hh \ 1298 external/PUPPI/RecoObj.hh \ 1299 external/PUPPI/puppiParticle.hh \ 1300 external/PUPPI/puppiAlgoBin.hh \ 1301 classes/DelphesClasses.h \ 1302 classes/DelphesFactory.h \ 1303 classes/DelphesFormula.h 1231 1304 FASTJET_OBJ += \ 1305 tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf) \ 1232 1306 tmp/external/fastjet/AreaDefinition.$(ObjSuf) \ 1233 1307 tmp/external/fastjet/BasicRandom.$(ObjSuf) \ … … 1276 1350 tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf) \ 1277 1351 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) \ 1278 1356 tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf) \ 1279 1357 tmp/external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(ObjSuf) \ … … 1319 1397 tmp/external/fastjet/tools/TopTaggerBase.$(ObjSuf) \ 1320 1398 tmp/modules/FastJetFinder.$(ObjSuf) \ 1321 tmp/modules/FastJetGridMedianEstimator.$(ObjSuf) 1399 tmp/modules/FastJetGridMedianEstimator.$(ObjSuf) \ 1400 tmp/modules/RunPUPPI.$(ObjSuf) 1322 1401 1323 1402 ifeq ($(HAS_PYTHIA8),true) … … 1329 1408 display/Delphes3DGeometry.$(SrcSuf) \ 1330 1409 display/Delphes3DGeometry.h \ 1331 external/ExRootAnalysis/ExRootConfReader.h \1332 classes/DelphesClasses.h1410 classes/DelphesClasses.h \ 1411 external/ExRootAnalysis/ExRootConfReader.h 1333 1412 tmp/display/DelphesBranchElement.$(ObjSuf): \ 1334 1413 display/DelphesBranchElement.$(SrcSuf) \ … … 1343 1422 tmp/display/DelphesEventDisplay.$(ObjSuf): \ 1344 1423 display/DelphesEventDisplay.$(SrcSuf) \ 1345 external/ExRootAnalysis/ExRootConfReader.h \1346 external/ExRootAnalysis/ExRootTreeReader.h \1347 1424 display/DelphesCaloData.h \ 1348 1425 display/DelphesBranchElement.h \ 1349 1426 display/Delphes3DGeometry.h \ 1350 1427 display/DelphesEventDisplay.h \ 1351 classes/DelphesClasses.h 1428 display/DelphesDisplay.h \ 1429 display/Delphes3DGeometry.h \ 1430 display/DelphesHtmlSummary.h \ 1431 display/DelphesPlotSummary.h \ 1432 classes/DelphesClasses.h \ 1433 external/ExRootAnalysis/ExRootConfReader.h \ 1434 external/ExRootAnalysis/ExRootTreeReader.h 1352 1435 tmp/display/DelphesHtmlSummary.$(ObjSuf): \ 1353 1436 display/DelphesHtmlSummary.$(SrcSuf) \ … … 1396 1479 tmp/external/tcl/tclHash.$(ObjSuf): \ 1397 1480 external/tcl/tclHash.c 1398 tmp/external/tcl/tclHistory.$(ObjSuf): \1399 external/tcl/tclHistory.c1400 1481 tmp/external/tcl/tclIndexObj.$(ObjSuf): \ 1401 1482 external/tcl/tclIndexObj.c … … 1410 1491 tmp/external/tcl/tclParse.$(ObjSuf): \ 1411 1492 external/tcl/tclParse.c 1412 tmp/external/tcl/tclPosixStr.$(ObjSuf): \1413 external/tcl/tclPosixStr.c1414 1493 tmp/external/tcl/tclPreserve.$(ObjSuf): \ 1415 1494 external/tcl/tclPreserve.c … … 1438 1517 tmp/external/tcl/tclGet.$(ObjSuf) \ 1439 1518 tmp/external/tcl/tclHash.$(ObjSuf) \ 1440 tmp/external/tcl/tclHistory.$(ObjSuf) \1441 1519 tmp/external/tcl/tclIndexObj.$(ObjSuf) \ 1442 1520 tmp/external/tcl/tclLink.$(ObjSuf) \ … … 1445 1523 tmp/external/tcl/tclObj.$(ObjSuf) \ 1446 1524 tmp/external/tcl/tclParse.$(ObjSuf) \ 1447 tmp/external/tcl/tclPosixStr.$(ObjSuf) \1448 1525 tmp/external/tcl/tclPreserve.$(ObjSuf) \ 1449 1526 tmp/external/tcl/tclProc.$(ObjSuf) \ … … 1538 1615 @touch $@ 1539 1616 1540 external/fastjet/Selector.hh: \1541 external/fastjet/PseudoJet.hh \1542 external/fastjet/RangeDefinition.hh1543 @touch $@1544 1545 1617 external/fastjet/internal/Dnn2piCylinder.hh: \ 1546 1618 external/fastjet/internal/DynamicNearestNeighbours.hh \ 1547 1619 external/fastjet/internal/DnnPlane.hh \ 1548 1620 external/fastjet/internal/numconsts.hh 1621 @touch $@ 1622 1623 external/fastjet/Selector.hh: \ 1624 external/fastjet/PseudoJet.hh \ 1625 external/fastjet/RangeDefinition.hh 1549 1626 @touch $@ 1550 1627 … … 1602 1679 @touch $@ 1603 1680 1681 modules/JetFakeParticle.h: \ 1682 classes/DelphesModule.h 1683 @touch $@ 1684 1604 1685 external/fastjet/ClusterSequence1GhostPassiveArea.hh: \ 1605 1686 external/fastjet/PseudoJet.hh \ … … 1634 1715 external/fastjet/internal/numconsts.hh \ 1635 1716 external/fastjet/Error.hh 1717 @touch $@ 1718 1719 modules/RunPUPPI.h: \ 1720 classes/DelphesModule.h 1636 1721 @touch $@ 1637 1722 … … 1672 1757 @touch $@ 1673 1758 1674 display/DelphesEventDisplay.h: \1675 external/ExRootAnalysis/ExRootTreeReader.h \1676 display/DelphesDisplay.h \1677 display/Delphes3DGeometry.h \1678 display/DelphesHtmlSummary.h \1679 display/DelphesPlotSummary.h1680 @touch $@1681 1682 1759 modules/TauTagging.h: \ 1683 classes/DelphesModule.h 1760 classes/DelphesModule.h \ 1761 external/ExRootAnalysis/ExRootResult.h \ 1762 external/ExRootAnalysis/ExRootFilter.h \ 1763 external/ExRootAnalysis/ExRootClassifier.h 1684 1764 @touch $@ 1685 1765 … … 1719 1799 @touch $@ 1720 1800 1801 modules/JetFlavorAssociation.h: \ 1802 classes/DelphesModule.h \ 1803 classes/DelphesClasses.h 1804 @touch $@ 1805 1721 1806 modules/ParticlePropagator.h: \ 1722 1807 classes/DelphesModule.h … … 1747 1832 @touch $@ 1748 1833 1834 modules/PhotonConversions.h: \ 1835 classes/DelphesModule.h 1836 @touch $@ 1837 1749 1838 external/fastjet/ClusterSequenceVoronoiArea.hh: \ 1750 1839 external/fastjet/PseudoJet.hh \ … … 1753 1842 @touch $@ 1754 1843 1844 external/PUPPI/puppiCleanContainer.hh: \ 1845 external/PUPPI/RecoObj.hh \ 1846 external/PUPPI/puppiParticle.hh \ 1847 external/PUPPI/puppiAlgoBin.hh \ 1848 external/fastjet/internal/base.hh \ 1849 external/fastjet/PseudoJet.hh 1850 @touch $@ 1851 1755 1852 modules/BTagging.h: \ 1756 1853 classes/DelphesModule.h … … 1775 1872 1776 1873 modules/Weighter.h: \ 1874 classes/DelphesModule.h 1875 @touch $@ 1876 1877 modules/TaggingParticlesSkimmer.h: \ 1777 1878 classes/DelphesModule.h 1778 1879 @touch $@ … … 1963 2064 @echo ">> Building $(DISTTAR)" 1964 2065 @mkdir -p $(DISTDIR) 1965 @cp -a CHANGELOG C OPYING CREDITS README VERSION Makefileconfigure cards classes converters display doc examples external modules python readers $(DISTDIR)2066 @cp -a CHANGELOG CMakeLists.txt COPYING CREDITS DelphesEnv.sh README README_4LHCb VERSION Makefile MinBias.pileup configure cards classes converters display doc examples external modules python readers $(DISTDIR) 1966 2067 @find $(DISTDIR) -depth -name .\* -exec rm -rf {} \; 1967 2068 @tar -czf $(DISTTAR) $(DISTDIR) -
README
rd870fc5 rd77b51d 39 39 40 40 https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook 41 42 43 Configure Delphes on lxplus.cern.ch 44 ==================================== 45 46 git clone git://github.com/delphes/delphes.git Delphes 47 48 cd Delphes 49 50 source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.32/x86_64-slc6-gcc48-opt/root/bin/thisroot 51 52 make 41 53 42 54 -
README_4LHCb
rd870fc5 rd77b51d 2 2 ============== 3 3 4 The card "delphes_card_ prelLHCb.tcl" contains a preliminary parametrization of the LHCb detector.4 The card "delphes_card_LHCb.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 ndentification rates26 This module is a recent addition in order to map particle misidentification rates 27 27 and reconstruction efficiencies. 28 28 … … 46 46 1) Compile: 47 47 48 48 make 49 49 50 50 2) Simulate p p -> b b~ events 51 51 52 53 wget http://cp3.irmp.ucl.ac.be/downloads/pp2bb.hep.tgz 54 tar -xzvf pp2bb.hep.tgz 55 ./DelphesSTDHEP cards/delphes_card_prelLHCb.tcl delphes_output.root pp2bb.hep 52 wget http://cp3.irmp.ucl.ac.be/downloads/pp_bb.hep.gz 53 gunzip pp_bb.hep.gz 54 ./DelphesSTDHEP cards/delphes_card_LHCb.tcl delphes_output.root pp_bb.hep 56 55 57 56 58 57 For more details, please visit: 59 58 60 https://cp3.irmp.ucl.ac.be/projects/delphes59 https://cp3.irmp.ucl.ac.be/projects/delphes 61 60 62 61 -
cards/delphes_card_ATLAS.tcl
rd870fc5 rd77b51d 34 34 35 35 JetEnergyScale 36 37 JetFlavorAssociation 36 38 37 39 BTagging … … 77 79 78 80 # tracking efficiency formula for charged hadrons 79 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \80 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \81 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + \82 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + \83 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + \81 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 82 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 83 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + 84 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + 85 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + 84 86 (abs(eta) > 2.5) * (0.00)} 85 87 } … … 96 98 97 99 # tracking efficiency formula for electrons 98 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \99 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + \100 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + \101 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + \102 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + \103 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + \104 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + \100 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 101 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + 102 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + 103 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + 104 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + 105 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + 106 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + 105 107 (abs(eta) > 2.5) * (0.00)} 106 108 } … … 117 119 118 120 # tracking efficiency formula for muons 119 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \120 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + \121 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + \122 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \123 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + \121 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 122 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + 123 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + 124 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 125 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + 124 126 (abs(eta) > 2.5) * (0.00)} 125 127 } … … 136 138 137 139 # resolution formula for charged hadrons 138 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + \139 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + \140 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \141 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + \142 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + \143 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + \144 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \140 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + 141 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + 142 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + 143 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + 144 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + 145 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + 146 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + 145 147 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)} 146 148 } … … 156 158 # set ResolutionFormula {resolution formula as a function of eta and energy} 157 159 158 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.5e1) * (energy*0.015) + \159 (abs(eta) <= 2.5) * (energy > 2.5e1) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \160 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \160 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.5e1) * (energy*0.015) + 161 (abs(eta) <= 2.5) * (energy > 2.5e1) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + 162 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + 161 163 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 162 164 … … 174 176 175 177 # resolution formula for muons 176 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + \177 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 5.0e1) * (0.03) + \178 (abs(eta) <= 1.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.04) + \179 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.07) + \180 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.04) + \181 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 5.0e1) * (0.04) + \182 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.05) + \178 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + 179 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 5.0e1) * (0.03) + 180 (abs(eta) <= 1.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.04) + 181 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.07) + 182 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.04) + 183 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 5.0e1) * (0.04) + 184 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.05) + 183 185 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.10)} 184 186 } … … 207 209 set PhotonOutputArray photons 208 210 209 set ECalEnergyMin 0.50210 set HCalEnergyMin 1.00211 212 set ECalEnergySignificanceMin 1.0213 set HCalEnergySignificanceMin 1.0214 215 211 set EFlowTrackOutputArray eflowTracks 216 212 set EFlowPhotonOutputArray eflowPhotons 217 213 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 214 215 set ECalEnergyMin 0.5 216 set HCalEnergyMin 1.0 217 218 set ECalEnergySignificanceMin 1.0 219 set HCalEnergySignificanceMin 1.0 220 221 set SmearTowerCenter true 218 222 219 223 set pi [expr {acos(-1)}] … … 265 269 # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 266 270 # http://www.physics.utoronto.ca/~krieger/procs/ComoProceedings.pdf 267 set ECalResolutionFormula { (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + \271 set ECalResolutionFormula { (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + 268 272 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)} 269 273 … … 271 275 # http://arxiv.org/pdf/hep-ex/0004009v1 272 276 # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 273 set HCalResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \274 (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \277 set HCalResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + 278 (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + 275 279 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)} 276 280 } … … 293 297 294 298 module Efficiency PhotonEfficiency { 295 set InputArray Calorimeter/ photons299 set InputArray Calorimeter/eflowPhotons 296 300 set OutputArray photons 297 301 … … 299 303 300 304 # efficiency formula for photons 301 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \302 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \303 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \305 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 306 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 307 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + 304 308 (abs(eta) > 2.5) * (0.00)} 305 309 } … … 333 337 334 338 # efficiency formula for electrons 335 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \336 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \337 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \339 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 340 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 341 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + 338 342 (abs(eta) > 2.5) * (0.00)} 339 343 } … … 367 371 368 372 # efficiency formula for muons 369 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \370 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \371 (abs(eta) > 1.5 && abs(eta) <= 2.7) * (pt > 10.0) * (0.85) + \373 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 374 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 375 (abs(eta) > 1.5 && abs(eta) <= 2.7) * (pt > 10.0) * (0.85) + 372 376 (abs(eta) > 2.7) * (0.00)} 373 377 } … … 419 423 420 424 module PdgCodeFilter NeutrinoFilter { 421 425 422 426 set InputArray Delphes/stableParticles 423 427 set OutputArray filteredParticles 424 428 425 429 set PTMin 0.0 426 430 427 431 add PdgCode {12} 428 432 add PdgCode {14} … … 475 479 set OutputArray jets 476 480 477 # scale formula for jets 481 # scale formula for jets 478 482 set ScaleFormula { sqrt( (3.0 - 0.2*(abs(eta)))^2 / pt + 1.0 ) } 483 } 484 485 ######################## 486 # Jet Flavor Association 487 ######################## 488 489 module JetFlavorAssociation JetFlavorAssociation { 490 491 set PartonInputArray Delphes/partons 492 set ParticleInputArray Delphes/allParticles 493 set ParticleLHEFInputArray Delphes/allParticlesLHEF 494 set JetInputArray JetEnergyScale/jets 495 496 set DeltaR 0.5 497 set PartonPTMin 1.0 498 set PartonEtaMax 2.5 499 479 500 } 480 501 … … 484 505 485 506 module BTagging BTagging { 486 set PartonInputArray Delphes/partons487 507 set JetInputArray JetEnergyScale/jets 488 508 489 509 set BitNumber 0 490 491 set DeltaR 0.5492 493 set PartonPTMin 1.0494 495 set PartonEtaMax 2.5496 510 497 511 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt} … … 503 517 504 518 # efficiency formula for c-jets (misidentification rate) 505 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + \506 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \507 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \519 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + 520 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + 521 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + 508 522 (abs(eta) > 2.5) * (0.000)} 509 523 510 524 # efficiency formula for b-jets 511 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + \512 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \513 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \525 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + 526 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + 527 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + 514 528 (abs(eta) > 2.5) * (0.000)} 515 529 } 530 531 ############# 532 # tau-tagging 533 ############# 516 534 517 535 module TauTagging TauTagging { -
cards/delphes_card_ATLAS_PileUp.tcl
rd870fc5 rd77b51d 22 22 EFlowMergerAllTracks 23 23 EFlowMerger 24 24 25 25 NeutrinoFilter 26 26 GenJetFinder … … 42 42 43 43 MissingET 44 45 JetFlavorAssociation 44 46 45 47 BTagging … … 79 81 set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))} 80 82 81 #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + \82 # (abs(t) > 1.0e-09) * (abs(z) <= 0.15) * (0.00) + \83 # (abs(t) <= 1.0e-09) * (abs(z) > 0.15) * (0.00) + \83 #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + 84 # (abs(t) > 1.0e-09) * (abs(z) <= 0.15) * (0.00) + 85 # (abs(t) <= 1.0e-09) * (abs(z) > 0.15) * (0.00) + 84 86 # (abs(t) > 1.0e-09) * (abs(z) > 0.15) * (0.00)} 85 87 … … 119 121 120 122 # tracking efficiency formula for charged hadrons 121 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \122 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \123 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + \124 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + \125 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + \123 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 124 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 125 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + 126 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + 127 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + 126 128 (abs(eta) > 2.5) * (0.00)} 127 129 } … … 138 140 139 141 # tracking efficiency formula for electrons 140 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \141 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + \142 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + \143 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + \144 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + \145 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + \146 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + \142 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 143 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + 144 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + 145 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + 146 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + 147 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + 148 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + 147 149 (abs(eta) > 2.5) * (0.00)} 148 150 } … … 159 161 160 162 # tracking efficiency formula for muons 161 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \162 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + \163 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + \164 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \165 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + \163 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 164 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + 165 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + 166 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 167 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + 166 168 (abs(eta) > 2.5) * (0.00)} 167 169 } … … 178 180 179 181 # resolution formula for charged hadrons 180 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + \181 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + \182 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \183 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + \184 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + \185 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + \186 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \182 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + 183 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + 184 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + 185 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + 186 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + 187 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + 188 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + 187 189 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)} 188 190 } … … 198 200 # set ResolutionFormula {resolution formula as a function of eta and energy} 199 201 200 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.5e1) * (energy*0.015) + \201 (abs(eta) <= 2.5) * (energy > 2.5e1) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \202 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + \202 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.5e1) * (energy*0.015) + 203 (abs(eta) <= 2.5) * (energy > 2.5e1) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + 204 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.005^2 + energy*0.05^2 + 0.25^2) + 203 205 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 204 206 … … 216 218 217 219 # resolution formula for muons 218 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + \219 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 5.0e1) * (0.03) + \220 (abs(eta) <= 1.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.04) + \221 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.07) + \222 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.04) + \223 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 5.0e1) * (0.04) + \224 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.05) + \220 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + 221 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 5.0e1) * (0.03) + 222 (abs(eta) <= 1.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.04) + 223 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.07) + 224 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.04) + 225 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 5.0e1) * (0.04) + 226 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0e1 && pt <= 1.0e2) * (0.05) + 225 227 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.10)} 226 228 } … … 249 251 set PhotonOutputArray photons 250 252 251 set ECalEnergyMin 0.50252 set HCalEnergyMin 1.00253 254 set ECalEnergySignificanceMin 1.0255 set HCalEnergySignificanceMin 1.0256 257 253 set EFlowTrackOutputArray eflowTracks 258 254 set EFlowPhotonOutputArray eflowPhotons 259 255 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 256 257 set ECalEnergyMin 0.5 258 set HCalEnergyMin 1.0 259 260 set ECalEnergySignificanceMin 1.0 261 set HCalEnergySignificanceMin 1.0 262 263 set SmearTowerCenter true 260 264 261 265 set pi [expr {acos(-1)}] … … 307 311 # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 308 312 # http://www.physics.utoronto.ca/~krieger/procs/ComoProceedings.pdf 309 set ECalResolutionFormula { (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + \313 set ECalResolutionFormula { (abs(eta) <= 3.2) * sqrt(energy^2*0.0017^2 + energy*0.101^2) + 310 314 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.0350^2 + energy*0.285^2)} 311 315 … … 313 317 # http://arxiv.org/pdf/hep-ex/0004009v1 314 318 # http://villaolmo.mib.infn.it/ICATPP9th_2005/Calorimetry/Schram.p.pdf 315 set HCalResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \316 (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \319 set HCalResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + 320 (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + 317 321 (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)} 318 322 } … … 374 378 375 379 module FastJetGridMedianEstimator Rho { 376 380 377 381 set InputArray Calorimeter/towers 378 382 set RhoOutputArray rho 379 383 380 # etamin etamax gridsize_eta gridsize_phi 381 382 add GridRange 0.0 2.5 0.5 0.5 383 add GridRange 2.5 5.0 0.5 0.5 384 # add GridRange rapmin rapmax drap dphi 385 # rapmin - the minimum rapidity extent of the grid 386 # rapmax - the maximum rapidity extent of the grid 387 # drap - the grid spacing in rapidity 388 # dphi - the grid spacing in azimuth 389 390 add GridRange -5.0 -2.5 1.0 1.0 391 add GridRange -2.5 2.5 0.5 0.5 392 add GridRange 2.5 5.0 1.0 1.0 384 393 385 394 } … … 391 400 392 401 module PdgCodeFilter NeutrinoFilter { 393 402 394 403 set InputArray Delphes/stableParticles 395 404 set OutputArray filteredParticles 396 405 397 406 set PTMin 0.0 398 407 399 408 add PdgCode {12} 400 409 add PdgCode {14} … … 471 480 472 481 module Efficiency PhotonEfficiency { 473 set InputArray Calorimeter/ photons482 set InputArray Calorimeter/eflowPhotons 474 483 set OutputArray photons 475 484 … … 477 486 478 487 # efficiency formula for photons 479 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \480 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \481 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \488 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 489 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 490 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + 482 491 (abs(eta) > 2.5) * (0.00)} 483 492 } … … 512 521 513 522 # efficiency formula for electrons 514 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \515 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \516 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \523 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 524 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 525 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + 517 526 (abs(eta) > 2.5) * (0.00)} 518 527 } … … 547 556 548 557 # efficiency formula for muons 549 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \550 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \551 (abs(eta) > 1.5 && abs(eta) <= 2.7) * (pt > 10.0) * (0.85) + \558 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 559 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 560 (abs(eta) > 1.5 && abs(eta) <= 2.7) * (pt > 10.0) * (0.85) + 552 561 (abs(eta) > 2.7) * (0.00)} 553 562 } … … 595 604 } 596 605 606 ######################## 607 # Jet Flavor Association 608 ######################## 609 610 module JetFlavorAssociation JetFlavorAssociation { 611 612 set PartonInputArray Delphes/partons 613 set ParticleInputArray Delphes/allParticles 614 set ParticleLHEFInputArray Delphes/allParticlesLHEF 615 set JetInputArray JetEnergyScale/jets 616 617 set DeltaR 0.5 618 set PartonPTMin 1.0 619 set PartonEtaMax 2.5 620 621 } 622 597 623 ########### 598 624 # b-tagging … … 600 626 601 627 module BTagging BTagging { 602 set PartonInputArray Delphes/partons603 628 set JetInputArray JetEnergyScale/jets 604 629 605 630 set BitNumber 0 606 607 set DeltaR 0.5608 609 set PartonPTMin 1.0610 611 set PartonEtaMax 2.5612 631 613 632 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt} … … 619 638 620 639 # efficiency formula for c-jets (misidentification rate) 621 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + \622 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \623 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \640 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + 641 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + 642 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + 624 643 (abs(eta) > 2.5) * (0.000)} 625 644 626 645 # efficiency formula for b-jets 627 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + \628 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \629 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \646 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + 647 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + 648 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + 630 649 (abs(eta) > 2.5) * (0.000)} 631 650 } 651 652 ############# 653 # tau-tagging 654 ############# 632 655 633 656 module TauTagging TauTagging { … … 693 716 694 717 } 695 696 697 -
cards/delphes_card_CMS.tcl
rd870fc5 rd77b51d 34 34 35 35 JetEnergyScale 36 37 JetFlavorAssociation 36 38 37 39 BTagging … … 77 79 78 80 # tracking efficiency formula for charged hadrons 79 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \80 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \81 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + \82 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + \83 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + \81 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 82 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 83 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + 84 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + 85 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + 84 86 (abs(eta) > 2.5) * (0.00)} 85 87 } … … 96 98 97 99 # tracking efficiency formula for electrons 98 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \99 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + \100 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + \101 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + \102 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + \103 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + \104 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + \100 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 101 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + 102 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + 103 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + 104 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + 105 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + 106 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + 105 107 (abs(eta) > 2.5) * (0.00)} 106 108 } … … 117 119 118 120 # tracking efficiency formula for muons 119 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \120 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + \121 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + \122 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \123 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + \121 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 122 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + 123 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + 124 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 125 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + 124 126 (abs(eta) > 2.5) * (0.00)} 125 127 } … … 136 138 137 139 # resolution formula for charged hadrons 138 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + \139 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + \140 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \141 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + \142 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + \143 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + \144 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \140 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + 141 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + 142 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + 143 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + 144 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + 145 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + 146 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + 145 147 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)} 146 148 } … … 157 159 158 160 # resolution formula for electrons 159 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.0e1) * (energy*0.0225) + \160 (abs(eta) <= 2.5) * (energy > 2.0e1) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \161 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \161 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.0e1) * (energy*0.0225) + 162 (abs(eta) <= 2.5) * (energy > 2.0e1) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + 163 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + 162 164 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 163 165 … … 175 177 176 178 # resolution formula for muons 177 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1 && pt <= 5.0) * (0.02) + \178 (abs(eta) <= 0.5) * (pt > 5.0 && pt <= 1.0e2) * (0.015) + \179 (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) + \180 (abs(eta) <= 0.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + \181 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1 && pt <= 5.0) * (0.03) + \182 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0 && pt <= 1.0e2) * (0.02) + \183 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) + \184 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + \185 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 5.0) * (0.04) + \186 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0 && pt <= 1.0e2) * (0.035) + \187 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) + \179 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1 && pt <= 5.0) * (0.02) + 180 (abs(eta) <= 0.5) * (pt > 5.0 && pt <= 1.0e2) * (0.015) + 181 (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) + 182 (abs(eta) <= 0.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + 183 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1 && pt <= 5.0) * (0.03) + 184 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0 && pt <= 1.0e2) * (0.02) + 185 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) + 186 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + 187 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 5.0) * (0.04) + 188 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0 && pt <= 1.0e2) * (0.035) + 189 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) + 188 190 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4)} 189 191 } … … 212 214 set PhotonOutputArray photons 213 215 214 set ECalEnergyMin 0.5215 set HCalEnergyMin 1.0216 217 set ECalEnergySignificanceMin 1.0218 set HCalEnergySignificanceMin 1.0219 220 216 set EFlowTrackOutputArray eflowTracks 221 217 set EFlowPhotonOutputArray eflowPhotons 222 218 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 219 220 set ECalEnergyMin 0.5 221 set HCalEnergyMin 1.0 222 223 set ECalEnergySignificanceMin 1.0 224 set HCalEnergySignificanceMin 1.0 225 226 set SmearTowerCenter true 223 227 224 228 set pi [expr {acos(-1)}] … … 276 280 277 281 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 278 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \282 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + 279 283 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 280 284 281 285 # set HCalResolutionFormula {resolution formula as a function of eta and energy} 282 set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \286 set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + 283 287 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} 284 288 } … … 307 311 308 312 # efficiency formula for photons 309 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \310 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \311 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \313 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 314 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 315 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + 312 316 (abs(eta) > 2.5) * (0.00)} 313 317 } … … 341 345 342 346 # efficiency formula for electrons 343 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \344 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \345 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \347 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 348 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 349 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + 346 350 (abs(eta) > 2.5) * (0.00)} 347 351 } … … 375 379 376 380 # efficiency formula for muons 377 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \378 (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \379 (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + \380 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \381 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + \381 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 382 (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + 383 (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + 384 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + 385 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + 382 386 (abs(eta) > 2.4) * (0.00)} 383 387 } … … 429 433 430 434 module PdgCodeFilter NeutrinoFilter { 431 435 432 436 set InputArray Delphes/stableParticles 433 437 set OutputArray filteredParticles 434 438 435 439 set PTMin 0.0 436 440 437 441 add PdgCode {12} 438 442 add PdgCode {14} … … 462 466 463 467 464 465 466 468 ############ 467 469 # Jet finder … … 493 495 } 494 496 497 ######################## 498 # Jet Flavor Association 499 ######################## 500 501 module JetFlavorAssociation JetFlavorAssociation { 502 503 set PartonInputArray Delphes/partons 504 set ParticleInputArray Delphes/allParticles 505 set ParticleLHEFInputArray Delphes/allParticlesLHEF 506 set JetInputArray JetEnergyScale/jets 507 508 set DeltaR 0.5 509 set PartonPTMin 1.0 510 set PartonEtaMax 2.5 511 512 } 513 495 514 ########### 496 515 # b-tagging … … 498 517 499 518 module BTagging BTagging { 500 set PartonInputArray Delphes/partons501 519 set JetInputArray JetEnergyScale/jets 502 520 503 521 set BitNumber 0 504 505 set DeltaR 0.5506 507 set PartonPTMin 1.0508 509 set PartonEtaMax 2.5510 522 511 523 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt} … … 518 530 519 531 # efficiency formula for c-jets (misidentification rate) 520 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + \521 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \522 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \532 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + 533 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + 534 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + 523 535 (abs(eta) > 2.5) * (0.000)} 524 536 525 537 # efficiency formula for b-jets 526 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + \527 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \528 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \538 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + 539 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + 540 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + 529 541 (abs(eta) > 2.5) * (0.000)} 530 542 } 543 544 ############# 545 # tau-tagging 546 ############# 531 547 532 548 module TauTagging TauTagging { … … 589 605 add Branch ScalarHT/energy ScalarHT ScalarHT 590 606 } 591 -
cards/delphes_card_CMS_NoFastJet.tcl
rd870fc5 rd77b51d 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.5189 set HCalEnergyMin 1.0190 191 set ECalEnergySignificanceMin 1.0192 set HCalEnergySignificanceMin 1.0193 194 188 set EFlowTrackOutputArray eflowTracks 195 189 set EFlowPhotonOutputArray eflowPhotons 196 190 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 191 192 set ECalEnergyMin 0.5 193 set HCalEnergyMin 1.0 194 195 set ECalEnergySignificanceMin 1.0 196 set HCalEnergySignificanceMin 1.0 197 198 set SmearTowerCenter true 197 199 198 200 set pi [expr {acos(-1)}] … … 250 252 251 253 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 252 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \254 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + 253 255 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 254 256 255 257 # set HCalResolutionFormula {resolution formula as a function of eta and energy} 256 set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \258 set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + 257 259 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} 258 260 } … … 269 271 set OutputArray eflow 270 272 } 271 272 -
cards/delphes_card_CMS_PileUp.tcl
rd870fc5 rd77b51d 22 22 EFlowMergerAllTracks 23 23 EFlowMerger 24 24 25 25 NeutrinoFilter 26 26 GenJetFinder … … 43 43 44 44 MissingET 45 46 JetFlavorAssociation 45 47 46 48 BTagging … … 80 82 set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))} 81 83 82 #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + \83 # (abs(t) > 1.0e-09) * (abs(z) <= 0.15) * (0.00) + \84 # (abs(t) <= 1.0e-09) * (abs(z) > 0.15) * (0.00) + \84 #set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + 85 # (abs(t) > 1.0e-09) * (abs(z) <= 0.15) * (0.00) + 86 # (abs(t) <= 1.0e-09) * (abs(z) > 0.15) * (0.00) + 85 87 # (abs(t) > 1.0e-09) * (abs(z) > 0.15) * (0.00)} 86 88 … … 120 122 121 123 # tracking efficiency formula for charged hadrons 122 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \123 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \124 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + \125 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + \126 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + \124 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 125 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 126 (abs(eta) <= 1.5) * (pt > 1.0) * (0.95) + 127 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.60) + 128 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.85) + 127 129 (abs(eta) > 2.5) * (0.00)} 128 130 } … … 139 141 140 142 # tracking efficiency formula for electrons 141 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \142 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + \143 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + \144 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + \145 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + \146 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + \147 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + \143 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 144 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.73) + 145 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e2) * (0.95) + 146 (abs(eta) <= 1.5) * (pt > 1.0e2) * (0.99) + 147 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.50) + 148 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e2) * (0.83) + 149 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2) * (0.90) + 148 150 (abs(eta) > 2.5) * (0.00)} 149 151 } … … 160 162 161 163 # tracking efficiency formula for muons 162 set EfficiencyFormula { (pt <= 0.1) * (0.00) + \163 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + \164 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + \165 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + \166 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + \164 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 165 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + 166 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + 167 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 168 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + 167 169 (abs(eta) > 2.5) * (0.00)} 168 170 } … … 179 181 180 182 # resolution formula for charged hadrons 181 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + \182 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + \183 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + \184 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + \185 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + \186 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + \187 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + \183 set ResolutionFormula { (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.02) + 184 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e1) * (0.01) + 185 (abs(eta) <= 1.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.03) + 186 (abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05) + 187 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.03) + 188 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e1) * (0.02) + 189 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e1 && pt <= 2.0e2) * (0.04) + 188 190 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05)} 189 191 } … … 200 202 201 203 # resolution formula for electrons 202 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.0e1) * (energy*0.0225) + \203 (abs(eta) <= 2.5) * (energy > 2.0e1) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \204 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \204 set ResolutionFormula { (abs(eta) <= 2.5) * (energy > 0.1 && energy <= 2.0e1) * (energy*0.0225) + 205 (abs(eta) <= 2.5) * (energy > 2.0e1) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + 206 (abs(eta) > 2.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + 205 207 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 206 208 … … 218 220 219 221 # resolution formula for muons 220 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1 && pt <= 5.0) * (0.02) + \221 (abs(eta) <= 0.5) * (pt > 5.0 && pt <= 1.0e2) * (0.015) + \222 (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) + \223 (abs(eta) <= 0.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + \224 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1 && pt <= 5.0) * (0.03) + \225 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0 && pt <= 1.0e2) * (0.02) + \226 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) + \227 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + \228 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 5.0) * (0.04) + \229 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0 && pt <= 1.0e2) * (0.035) + \230 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) + \222 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1 && pt <= 5.0) * (0.02) + 223 (abs(eta) <= 0.5) * (pt > 5.0 && pt <= 1.0e2) * (0.015) + 224 (abs(eta) <= 0.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.03) + 225 (abs(eta) <= 0.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + 226 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1 && pt <= 5.0) * (0.03) + 227 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 5.0 && pt <= 1.0e2) * (0.02) + 228 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.04) + 229 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4) + 230 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 5.0) * (0.04) + 231 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 5.0 && pt <= 1.0e2) * (0.035) + 232 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e2 && pt <= 2.0e2) * (0.05) + 231 233 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 2.0e2) * (0.05 + pt*1.e-4)} 232 234 } … … 255 257 set PhotonOutputArray photons 256 258 257 set ECalEnergyMin 0.5258 set HCalEnergyMin 1.0259 260 set ECalEnergySignificanceMin 1.0261 set HCalEnergySignificanceMin 1.0262 263 259 set EFlowTrackOutputArray eflowTracks 264 260 set EFlowPhotonOutputArray eflowPhotons 265 261 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 262 263 set ECalEnergyMin 0.5 264 set HCalEnergyMin 1.0 265 266 set ECalEnergySignificanceMin 1.0 267 set HCalEnergySignificanceMin 1.0 268 269 set SmearTowerCenter true 266 270 267 271 set pi [expr {acos(-1)}] … … 319 323 320 324 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 321 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + \325 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + 322 326 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 323 327 324 328 # set HCalResolutionFormula {resolution formula as a function of eta and energy} 325 set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + \329 set HCalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + 326 330 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} 327 331 } … … 386 390 387 391 module FastJetGridMedianEstimator Rho { 388 392 389 393 set InputArray EFlowMerger/eflow 390 394 set RhoOutputArray rho 391 395 392 # etamin etamax gridsize_eta gridsize_phi 393 394 add GridRange 0.0 2.5 1.0 1.0 396 # add GridRange rapmin rapmax drap dphi 397 # rapmin - the minimum rapidity extent of the grid 398 # rapmax - the maximum rapidity extent of the grid 399 # drap - the grid spacing in rapidity 400 # dphi - the grid spacing in azimuth 401 402 add GridRange -5.0 -2.5 1.0 1.0 403 add GridRange -2.5 2.5 1.0 1.0 395 404 add GridRange 2.5 5.0 1.0 1.0 396 405 … … 402 411 403 412 module PdgCodeFilter NeutrinoFilter { 404 413 405 414 set InputArray Delphes/stableParticles 406 415 set OutputArray filteredParticles 407 416 408 417 set PTMin 0.0 409 418 410 419 add PdgCode {12} 411 420 add PdgCode {14} … … 513 522 514 523 # efficiency formula for photons 515 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \516 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \517 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \524 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 525 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 526 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + 518 527 (abs(eta) > 2.5) * (0.00)} 519 528 } … … 549 558 550 559 # efficiency formula for electrons 551 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \552 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + \553 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + \560 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 561 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 562 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 10.0) * (0.85) + 554 563 (abs(eta) > 2.5) * (0.00)} 555 564 } … … 584 593 585 594 # efficiency formula for muons 586 set EfficiencyFormula { (pt <= 10.0) * (0.00) + \587 (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \588 (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + \589 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + \590 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + \595 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 596 (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + 597 (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + 598 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + 599 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + 591 600 (abs(eta) > 2.4) * (0.00)} 592 601 } … … 635 644 } 636 645 646 ######################## 647 # Jet Flavor Association 648 ######################## 649 650 module JetFlavorAssociation JetFlavorAssociation { 651 652 set PartonInputArray Delphes/partons 653 set ParticleInputArray Delphes/allParticles 654 set ParticleLHEFInputArray Delphes/allParticlesLHEF 655 set JetInputArray JetEnergyScale/jets 656 657 set DeltaR 0.5 658 set PartonPTMin 1.0 659 set PartonEtaMax 2.5 660 661 } 662 637 663 ########### 638 664 # b-tagging … … 640 666 641 667 module BTagging BTagging { 642 set PartonInputArray Delphes/partons643 668 set JetInputArray JetEnergyScale/jets 644 669 645 670 set BitNumber 0 646 647 set DeltaR 0.5648 649 set PartonPTMin 1.0650 651 set PartonEtaMax 2.5652 671 653 672 # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt} … … 660 679 661 680 # efficiency formula for c-jets (misidentification rate) 662 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + \663 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + \664 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + \681 add EfficiencyFormula {4} { (pt <= 15.0) * (0.000) + 682 (abs(eta) <= 1.2) * (pt > 15.0) * (0.2*tanh(pt*0.03 - 0.4)) + 683 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.1*tanh(pt*0.03 - 0.4)) + 665 684 (abs(eta) > 2.5) * (0.000)} 666 685 667 686 # efficiency formula for b-jets 668 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + \669 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + \670 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + \687 add EfficiencyFormula {5} { (pt <= 15.0) * (0.000) + 688 (abs(eta) <= 1.2) * (pt > 15.0) * (0.5*tanh(pt*0.03 - 0.4)) + 689 (abs(eta) > 1.2 && abs(eta) <= 2.5) * (pt > 15.0) * (0.4*tanh(pt*0.03 - 0.4)) + 671 690 (abs(eta) > 2.5) * (0.000)} 672 691 } 692 693 ############# 694 # tau-tagging 695 ############# 673 696 674 697 module TauTagging TauTagging { … … 733 756 add Branch PileUpMerger/vertices Vertex Vertex 734 757 } 735 -
cards/delphes_card_FCC_basic.tcl
rd870fc5 rd77b51d 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 227 228 set IsEcal true 229 228 230 set EnergyMin 0.5 229 231 set EnergySignificanceMin 1.0 230 232 233 set SmearTowerCenter true 234 231 235 set pi [expr {acos(-1)}] 232 236 … … 234 238 # each list starts with the lower edge of the first tower 235 239 # the list ends with the higher edged of the last tower 236 240 237 241 # 0.5 degree towers 238 242 set PhiBins {} … … 246 250 add EtaPhiBins $eta $PhiBins 247 251 } 248 252 249 253 # default energy fractions {abs(PDG code)} {fraction of energy deposited in ECAL} 250 254 251 255 add EnergyFraction {0} {0.0} 252 256 # energy fractions for e, gamma and pi0 … … 269 273 270 274 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 271 275 272 276 # This is the CMS ECAL resolution, extended up eta = 6.0 273 set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.003^2 + energy*0.029^2 + 0.125^2) + \277 set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.003^2 + energy*0.029^2 + 0.125^2) + 274 278 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 275 279 276 280 277 281 } 278 282 … … 287 291 set TowerOutputArray hcalTowers 288 292 set EFlowTowerOutputArray eflowNeutralHadrons 289 293 294 set IsEcal false 295 290 296 set EnergyMin 1.0 291 297 set EnergySignificanceMin 1.0 292 298 299 set SmearTowerCenter true 300 293 301 set pi [expr {acos(-1)}] 294 302 … … 296 304 # each list starts with the lower edge of the first tower 297 305 # the list ends with the higher edged of the last tower 298 299 306 307 300 308 # 5 degree towers 301 309 set PhiBins {} … … 309 317 add EtaPhiBins $eta $PhiBins 310 318 } 311 312 319 320 313 321 # default energy fractions {abs(PDG code)} {Fecal Fhcal} 314 322 add EnergyFraction {0} {1.0} … … 332 340 333 341 # set HCalResolutionFormula {resolution formula as a function of eta and energy} 334 342 335 343 # This is the ATLAS HCAL resolution, extended up eta = 6.0 336 set HCalResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \337 (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \344 set ResolutionFormula { (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + 345 (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + 338 346 (abs(eta) > 3.2 && abs(eta) <= 6.0) * sqrt(energy^2*0.09420^2 + energy*1.00^2)} 339 347 … … 373 381 set MomentumOutputArray momentum 374 382 } 375 383 376 384 377 385 ################## … … 390 398 391 399 module PdgCodeFilter NeutrinoFilter { 392 400 393 401 set InputArray Delphes/stableParticles 394 402 set OutputArray filteredParticles 395 403 396 404 set PTMin 0.0 397 405 398 406 add PdgCode {12} 399 407 add PdgCode {14} … … 427 435 428 436 module FastJetFinder FastJetFinder { 429 # set InputArray Calorimeter/towers437 # set InputArray TowerMerger/towers 430 438 set InputArray EFlowMerger/eflow 431 439 … … 463 471 # maximum distance between jet and track 464 472 set DeltaR 0.3 465 466 # minimum pt of tracks 473 474 # minimum pt of tracks 467 475 set TrackPTMin 1.0 468 476 469 477 # minimum transverse impact parameter (in mm) 470 478 set TrackIPMax 2.0 471 479 472 480 # minimum ip significance for the track to be counted 473 481 set SigMin 6.5 474 482 475 483 # minimum number of tracks (high efficiency n=2, high purity n=3) 476 484 set Ntracks 3 … … 510 518 add Branch Delphes/allParticles Particle GenParticle 511 519 add Branch GenJetFinder/jets GenJet Jet 512 520 513 521 add Branch ChargedHadronMomentumSmearing/chargedHadrons ChargedHadron Track 514 522 add Branch HCal/eflowNeutralHadrons NeutralHadron Tower … … 521 529 add Branch ScalarHT/energy ScalarHT ScalarHT 522 530 } 523 -
cards/delphes_card_LHCb.tcl
rd870fc5 rd77b51d 9 9 set ExecutionPath { 10 10 11 PhotonConversions 11 12 ParticlePropagator 12 13 13 14 ChargedHadronMomentumSmearing 14 15 ElectronEnergySmearing … … 17 18 TrackMerger 18 19 ImpactParameterSmearing 19 20 20 21 IdentificationMap 21 22 22 23 ECal 23 24 HCal 24 25 25 26 TreeWriter 27 } 28 29 30 31 ##################### 32 # Photon Conversions 33 ##################### 34 35 module PhotonConversions PhotonConversions { 36 set InputArray Delphes/stableParticles 37 38 set OutputArray stableParticles 39 40 # radius of the magnetic field coverage, in m 41 42 set Radius 3.31 43 44 set HalfLength 12.0 45 46 set EtaMin 2.0 47 set EtaMax 5.0 48 49 50 # material budget map: (uniform for now) 51 # distribution of the detector mass ( density / X0), can be thought as 52 # conversion rate per meter function of r,phi,z 53 54 55 # unit: m-1 56 57 set Step 0.05 58 59 set ConversionMap { (abs(z) > 0.0 && abs(z) < 12.0 ) * (0.07) + 60 (abs(z) > 0.0) * (0.00) + 61 (abs(z) < 0.0) * (0.00) 62 } 63 26 64 } 27 65 … … 33 71 34 72 module ParticlePropagator ParticlePropagator { 35 set InputArray Delphes/stableParticles73 set InputArray PhotonConversions/stableParticles 36 74 37 75 set OutputArray stableParticles … … 41 79 42 80 # radius of the magnetic field coverage, in m 43 81 44 82 set Radius 3.31 45 46 83 84 47 85 # half-length of the magnetic field coverage, in m 48 86 set HalfLength 12.0 … … 53 91 # Need to veto anything with theta > 0.269 rad -> eta = 2 54 92 # theta < 0.0135 rad -> eta = 5 55 56 # tracker and calos are at approx 0.269 rad, R = 12*tan(0.269) 57 58 } 59 60 93 94 # tracker and calos are at approx 0.269 rad, R = 12*tan(0.269) 95 96 } 97 98 61 99 ######################################## 62 100 # Momentum resolution for charged tracks … … 84 122 85 123 # resolution formula for electrons 86 set ResolutionFormula { (eta > 2.0 && eta <= 5.0) * (energy > 0.1 && energy <= 8.0) * (energy*0.05) + \124 set ResolutionFormula { (eta > 2.0 && eta <= 5.0) * (energy > 0.1 && energy <= 8.0) * (energy*0.05) + 87 125 (eta > 2.0 && eta <= 5.0) * (energy > 8.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)} 88 126 } … … 139 177 set InputArray ImpactParameterSmearing/tracks 140 178 set OutputArray tracks 141 179 142 180 # {PID in} {PID out} {formula} 143 181 # make sure "PID in" and "PID out" have the same charge (e.g {-13} {211} or {-321} {211}) 144 182 # {211} {-13} is equivalent to {-211} {13} (and needs to be written once only...) 145 146 147 148 149 150 151 # --- pions --- 152 153 add EfficiencyFormula {211} {211} { (eta <= 2.0) * (0.00) + \154 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + \155 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.95) + \183 184 185 186 187 188 189 # --- pions --- 190 191 add EfficiencyFormula {211} {211} { (eta <= 2.0) * (0.00) + 192 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + 193 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.95) + 156 194 (eta > 5.0) * (0.00)} 157 158 add EfficiencyFormula {211} {-13} { (eta <= 2.0) * (0.00) + \159 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + \160 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.005 + 0.0663*exp(-0.13*pt*cosh(eta))) + \195 196 add EfficiencyFormula {211} {-13} { (eta <= 2.0) * (0.00) + 197 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + 198 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.005 + 0.0663*exp(-0.13*pt*cosh(eta))) + 161 199 (eta > 5.0) * (0.00)} 162 200 163 201 164 202 # --- kaons --- 165 166 167 add EfficiencyFormula {321} {321} { (eta <= 2.0) * (0.00) + \168 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + \169 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.95) + \203 204 205 add EfficiencyFormula {321} {321} { (eta <= 2.0) * (0.00) + 206 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + 207 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.95) + 170 208 (eta > 5.0) * (0.00)} 171 172 add EfficiencyFormula {321} {-13} { (eta <= 2.0) * (0.00) + \173 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + \174 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.005 + 0.086*exp(-0.11*pt*cosh(eta))) + \209 210 add EfficiencyFormula {321} {-13} { (eta <= 2.0) * (0.00) + 211 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + 212 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.005 + 0.086*exp(-0.11*pt*cosh(eta))) + 175 213 (eta > 5.0) * (0.00)} 176 214 177 215 178 216 # --- protons --- 179 180 181 add EfficiencyFormula {2212} {2212} { (eta <= 2.0) * (0.00) + \182 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + \183 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.95) + \217 218 219 add EfficiencyFormula {2212} {2212} { (eta <= 2.0) * (0.00) + 220 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + 221 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.95) + 184 222 (eta > 5.0) * (0.00)} 185 186 add EfficiencyFormula {2212} {-13} { (eta <= 2.0) * (0.00) + \187 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + \188 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.002) + \223 224 add EfficiencyFormula {2212} {-13} { (eta <= 2.0) * (0.00) + 225 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + 226 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.002) + 189 227 (eta > 5.0) * (0.00)} 190 228 … … 195 233 196 234 197 add EfficiencyFormula {-13} {-13} { (eta <= 2.0) * (0.00) + \198 (eta > 2.0 && eta <= 5.0) * (pt < 0.8)* (0.00) + \199 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.97) + \235 add EfficiencyFormula {-13} {-13} { (eta <= 2.0) * (0.00) + 236 (eta > 2.0 && eta <= 5.0) * (pt < 0.8)* (0.00) + 237 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.97) + 200 238 (eta > 5.0) * (0.00)} 201 239 202 240 # --- electrons --- 241 242 243 244 add EfficiencyFormula {-11} {-11} { (eta <= 2.0) * (0.00) + 245 (eta > 2.0 && eta <= 5.0) * (pt < 0.6)* (0.97) + 246 (eta > 2.0 && eta <= 5.0) * (pt >= 0.6)* (0.97) + 247 (eta > 5.0) * (0.00)} 248 249 250 203 251 # efficiency for other charged particles (should be always {0} {0} {formula}) 204 205 add EfficiencyFormula {0} {0} { (eta <= 2.0) * (0.00) + \206 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + \207 (eta > 2.0 && eta <= 5.0) * (pt > 0.8) * (0.95) + \252 253 add EfficiencyFormula {0} {0} { (eta <= 2.0) * (0.00) + 254 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) + 255 (eta > 2.0 && eta <= 5.0) * (pt > 0.8) * (0.95) + 208 256 (eta > 5.0) * (0.00)} 209 257 … … 223 271 set TowerOutputArray ecalTowers 224 272 set EFlowTowerOutputArray eflowPhotons 225 273 274 set IsEcal true 275 276 set EnergyMin 0.0 277 set EnergySignificanceMin 0.0 278 279 set SmearTowerCenter true 280 226 281 set pi [expr {acos(-1)}] 227 282 … … 241 296 add EtaPhiBins $eta $PhiBins 242 297 } 243 298 244 299 # 1.25 degree towers 245 300 set PhiBins {} … … 285 340 add EnergyFraction {3122} {0.3} 286 341 287 342 set ResolutionFormula {(eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)} 288 343 } 289 344 … … 298 353 set TowerOutputArray hcalTowers 299 354 set EFlowTowerOutputArray eflowNeutralHadrons 300 355 356 set IsEcal false 357 358 set EnergyMin 0.0 359 set EnergySignificanceMin 0.0 360 361 set SmearTowerCenter true 362 301 363 set pi [expr {acos(-1)}] 302 364 … … 330 392 331 393 332 394 333 395 # default energy fractions {abs(PDG code)} {Fecal Fhcal} 334 396 add EnergyFraction {0} {1.0} … … 352 414 353 415 set ResolutionFormula { (eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.05^2 + energy*0.80^2)} 354 416 } 355 417 356 418 … … 360 422 361 423 # tracks, towers and eflow objects are not stored by default in the output. 362 # if needed (for jet constituent or other studies), uncomment the relevant 363 # "add Branch ..." lines. 424 # if needed (for jet constituent or other studies), uncomment the relevant 425 # "add Branch ..." lines. 364 426 365 427 module TreeWriter TreeWriter { 366 428 # add Branch InputArray BranchName BranchClass 367 429 368 430 add Branch Delphes/allParticles Particle GenParticle 369 431 … … 371 433 add Branch HCal/eflowNeutralHadrons NeutralHadron Tower 372 434 add Branch ECal/eflowPhotons Photon Photon 373 374 } 375 435 436 } 437 -
classes/ClassesLinkDef.h
rd870fc5 rd77b51d 46 46 #pragma link C++ class LHCOEvent+; 47 47 #pragma link C++ class LHEFEvent+; 48 #pragma link C++ class LHEFWeight+; 48 49 #pragma link C++ class HepMCEvent+; 49 50 #pragma link C++ class GenParticle+; -
classes/DelphesClasses.cc
rd870fc5 rd77b51d 45 45 //------------------------------------------------------------------------------ 46 46 47 TLorentzVector GenParticle::P4() 47 TLorentzVector GenParticle::P4() const 48 48 { 49 49 TLorentzVector vec; … … 54 54 //------------------------------------------------------------------------------ 55 55 56 TLorentzVector MissingET::P4() 56 TLorentzVector MissingET::P4() const 57 57 { 58 58 TLorentzVector vec; … … 63 63 //------------------------------------------------------------------------------ 64 64 65 TLorentzVector Photon::P4() 65 TLorentzVector Photon::P4() const 66 66 { 67 67 TLorentzVector vec; … … 72 72 //------------------------------------------------------------------------------ 73 73 74 TLorentzVector Electron::P4() 74 TLorentzVector Electron::P4() const 75 75 { 76 76 TLorentzVector vec; … … 81 81 //------------------------------------------------------------------------------ 82 82 83 TLorentzVector Muon::P4() 83 TLorentzVector Muon::P4() const 84 84 { 85 85 TLorentzVector vec; … … 90 90 //------------------------------------------------------------------------------ 91 91 92 TLorentzVector Jet::P4() 92 TLorentzVector Jet::P4() const 93 93 { 94 94 TLorentzVector vec; … … 99 99 //------------------------------------------------------------------------------ 100 100 101 TLorentzVector Track::P4() 101 TLorentzVector Track::P4() const 102 102 { 103 103 TLorentzVector vec; … … 108 108 //------------------------------------------------------------------------------ 109 109 110 TLorentzVector Tower::P4() 110 TLorentzVector Tower::P4() const 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), IsConstituent(0), 123 BTag(0), TauTag(0), Eem(0.0), Ehad(0.0), 122 IsPU(0), IsRecoPU(0), IsConstituent(0), IsFromConversion(0), 123 Flavor(0), FlavorAlgo(0), FlavorPhys(0), 124 BTag(0), BTagAlgo(0), BTagPhys(0), 125 TauTag(0), Eem(0.0), Ehad(0.0), 124 126 DeltaEta(0.0), DeltaPhi(0.0), 125 127 Momentum(0.0, 0.0, 0.0, 0.0), … … 133 135 MeanSqDeltaR(0), 134 136 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), 135 147 fFactory(0), 136 148 fArray(0) 137 149 { 150 int i; 138 151 Edges[0] = 0.0; 139 152 Edges[1] = 0.0; … … 150 163 Tau[3] = 0.0; 151 164 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 } 152 171 } 153 172 … … 224 243 object.IsPU = IsPU; 225 244 object.IsConstituent = IsConstituent; 245 object.IsFromConversion = IsFromConversion; 246 object.Flavor = Flavor; 247 object.FlavorAlgo = FlavorAlgo; 248 object.FlavorPhys = FlavorPhys; 226 249 object.BTag = BTag; 250 object.BTagAlgo = BTagAlgo; 251 object.BTagPhys = BTagPhys; 227 252 object.TauTag = TauTag; 228 253 object.Eem = Eem; … … 249 274 object.MeanSqDeltaR = MeanSqDeltaR; 250 275 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 251 284 object.FracPt[0] = FracPt[0]; 252 285 object.FracPt[1] = FracPt[1]; … … 260 293 object.Tau[4] = Tau[4]; 261 294 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 262 315 object.fFactory = fFactory; 263 316 object.fArray = 0; 317 318 // copy cluster timing info 319 copy(ECalEnergyTimePairs.begin(), ECalEnergyTimePairs.end(), back_inserter(object.ECalEnergyTimePairs)); 264 320 265 321 if(fArray && fArray->GetEntriesFast() > 0) … … 278 334 void Candidate::Clear(Option_t* option) 279 335 { 336 int i; 280 337 SetUniqueID(0); 281 338 ResetBit(kIsReferenced); … … 287 344 IsPU = 0; 288 345 IsConstituent = 0; 346 IsFromConversion = 0; 347 Flavor = 0; 348 FlavorAlgo = 0; 349 FlavorPhys = 0; 289 350 BTag = 0; 351 BTagAlgo = 0; 352 BTagPhys = 0; 290 353 TauTag = 0; 291 354 Eem = 0.0; … … 311 374 MeanSqDeltaR = 0.0; 312 375 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 313 387 FracPt[0] = 0.0; 314 388 FracPt[1] = 0.0; … … 322 396 Tau[4] = 0.0; 323 397 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 324 409 fArray = 0; 325 410 } -
classes/DelphesClasses.h
rd870fc5 rd77b51d 84 84 //--------------------------------------------------------------------------- 85 85 86 class LHEFWeight: public TObject 87 { 88 public: 89 Int_t ID; // weight ID 90 Float_t Weight; // weight value 91 92 ClassDef(LHEFWeight, 1) 93 }; 94 95 //--------------------------------------------------------------------------- 96 86 97 class HepMCEvent: public Event 87 98 { … … 150 161 const CompBase *GetCompare() const { return fgCompare; } 151 162 152 TLorentzVector P4() ;163 TLorentzVector P4() const; 153 164 154 165 ClassDef(GenParticle, 1) … … 177 188 Float_t Phi; // mising energy azimuthal angle 178 189 179 TLorentzVector P4() ;190 TLorentzVector P4() const; 180 191 181 192 ClassDef(MissingET, 1) … … 231 242 TRefArray Particles; // references to generated particles 232 243 233 static CompBase *fgCompare; //! 234 const CompBase *GetCompare() const { return fgCompare; } 235 236 TLorentzVector P4(); 237 238 ClassDef(Photon, 2) 244 // Isolation variables 245 246 Float_t IsolationVar; 247 Float_t IsolationVarRhoCorr; 248 Float_t SumPtCharged; 249 Float_t SumPtNeutral; 250 Float_t SumPtChargedPU; 251 Float_t SumPt; 252 253 static CompBase *fgCompare; //! 254 const CompBase *GetCompare() const { return fgCompare; } 255 256 TLorentzVector P4() const; 257 258 ClassDef(Photon, 3) 239 259 }; 240 260 … … 257 277 TRef Particle; // reference to generated particle 258 278 259 static CompBase *fgCompare; //! 260 const CompBase *GetCompare() const { return fgCompare; } 261 262 TLorentzVector P4(); 263 264 ClassDef(Electron, 2) 279 // Isolation variables 280 281 Float_t IsolationVar; 282 Float_t IsolationVarRhoCorr; 283 Float_t SumPtCharged; 284 Float_t SumPtNeutral; 285 Float_t SumPtChargedPU; 286 Float_t SumPt; 287 288 static CompBase *fgCompare; //! 289 const CompBase *GetCompare() const { return fgCompare; } 290 291 TLorentzVector P4() const; 292 293 ClassDef(Electron, 3) 265 294 }; 266 295 … … 281 310 TRef Particle; // reference to generated particle 282 311 283 static CompBase *fgCompare; //! 284 const CompBase *GetCompare() const { return fgCompare; } 285 286 TLorentzVector P4(); 287 288 ClassDef(Muon, 2) 312 // Isolation variables 313 314 Float_t IsolationVar; 315 Float_t IsolationVarRhoCorr; 316 Float_t SumPtCharged; 317 Float_t SumPtNeutral; 318 Float_t SumPtChargedPU; 319 Float_t SumPt; 320 321 static CompBase *fgCompare; //! 322 const CompBase *GetCompare() const { return fgCompare; } 323 324 TLorentzVector P4() const; 325 326 ClassDef(Muon, 3) 289 327 }; 290 328 … … 306 344 Float_t DeltaPhi; // jet radius in azimuthal angle 307 345 346 UInt_t Flavor; 347 UInt_t FlavorAlgo; 348 UInt_t FlavorPhys; 349 308 350 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 309 354 UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau 310 355 … … 313 358 Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter 314 359 315 Int_t NCharged; // number of charged constituents 316 Int_t NNeutrals; // number of neutral constituents 317 Float_t Beta; // (sum pt of charged pile-up constituents)/(sum pt of charged constituents) 318 Float_t BetaStar; // (sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents) 319 Float_t MeanSqDeltaR; // average distance (squared) between constituent and jet weighted by pt (squared) of constituent 320 Float_t PTD; // average pt between constituent and jet weighted by pt of constituent 321 Float_t FracPt[5]; // (sum pt of constituents within a ring 0.1*i < DeltaR < 0.1*(i+1))/(sum pt of constituents) 322 323 Float_t Tau1; // 1-subjettiness 324 Float_t Tau2; // 2-subjettiness 325 Float_t Tau3; // 3-subjettiness 326 Float_t Tau4; // 4-subjettiness 327 Float_t Tau5; // 5-subjettiness 360 Int_t NCharged; // number of charged constituents 361 Int_t NNeutrals; // number of neutral constituents 362 Float_t Beta; // (sum pt of charged pile-up constituents)/(sum pt of charged constituents) 363 Float_t BetaStar; // (sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents) 364 Float_t MeanSqDeltaR; // average distance (squared) between constituent and jet weighted by pt (squared) of constituent 365 Float_t PTD; // average pt between constituent and jet weighted by pt of constituent 366 Float_t FracPt[5]; // (sum pt of constituents within a ring 0.1*i < DeltaR < 0.1*(i+1))/(sum pt of constituents) 367 368 Float_t Tau[5]; // N-subjettiness 369 370 TLorentzVector TrimmedP4[5]; // first entry (i = 0) is the total Trimmed Jet 4-momenta and from i = 1 to 4 are the trimmed subjets 4-momenta 371 TLorentzVector PrunedP4[5]; // first entry (i = 0) is the total Pruned Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta 372 TLorentzVector SoftDroppedP4[5]; // first entry (i = 0) is the total SoftDropped Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta 373 374 Int_t NSubJetsTrimmed; // number of subjets trimmed 375 Int_t NSubJetsPruned; // number of subjets pruned 376 Int_t NSubJetsSoftDropped; // number of subjets soft-dropped 328 377 329 378 TRefArray Constituents; // references to constituents … … 333 382 const CompBase *GetCompare() const { return fgCompare; } 334 383 335 TLorentzVector P4(); 336 337 ClassDef(Jet, 2) 384 TLorentzVector P4() const; 385 TLorentzVector Area; 386 387 ClassDef(Jet, 3) 338 388 }; 339 389 … … 376 426 const CompBase *GetCompare() const { return fgCompare; } 377 427 378 TLorentzVector P4() ;428 TLorentzVector P4() const; 379 429 380 430 ClassDef(Track, 2) … … 392 442 Float_t E; // calorimeter tower energy 393 443 394 Float_t T; //particle arrival time of flight 444 Float_t T; // ecal deposit time, averaged by sqrt(EM energy) over all particles, not smeared 445 Int_t NTimeHits; // number of hits contributing to time measurement 395 446 396 447 Float_t Eem; // calorimeter tower electromagnetic energy … … 404 455 const CompBase *GetCompare() const { return fgCompare; } 405 456 406 TLorentzVector P4() ;407 408 ClassDef(Tower, 1)457 TLorentzVector P4() const; 458 459 ClassDef(Tower, 2) 409 460 }; 410 461 … … 452 503 453 504 Int_t IsPU; 505 Int_t IsRecoPU; 506 454 507 Int_t IsConstituent; 455 508 509 Int_t IsFromConversion; 510 511 UInt_t Flavor; 512 UInt_t FlavorAlgo; 513 UInt_t FlavorPhys; 514 456 515 UInt_t BTag; 516 UInt_t BTagAlgo; 517 UInt_t BTagPhys; 518 457 519 UInt_t TauTag; 458 520 … … 466 528 TLorentzVector Momentum, Position, Area; 467 529 468 Float_t 469 Float_t 470 Float_t 471 Float_t 472 Float_t 530 Float_t Dxy; 531 Float_t SDxy; 532 Float_t Xd; 533 Float_t Yd; 534 Float_t Zd; 473 535 474 536 // PileUpJetID variables 475 537 476 Int_t NCharged; 477 Int_t NNeutrals; 478 Float_t Beta; 479 Float_t BetaStar; 480 Float_t MeanSqDeltaR; 481 Float_t PTD; 482 Float_t FracPt[5]; 538 Int_t NCharged; 539 Int_t NNeutrals; 540 Float_t Beta; 541 Float_t BetaStar; 542 Float_t MeanSqDeltaR; 543 Float_t PTD; 544 Float_t FracPt[5]; 545 546 // Timing information 547 548 Int_t NTimeHits; 549 std::vector< std::pair< Float_t, Float_t > > ECalEnergyTimePairs; 550 551 // Isolation variables 552 553 Float_t IsolationVar; 554 Float_t IsolationVarRhoCorr; 555 Float_t SumPtCharged; 556 Float_t SumPtNeutral; 557 Float_t SumPtChargedPU; 558 Float_t SumPt; 483 559 484 560 // N-subjettiness variables 485 561 486 562 Float_t Tau[5]; 563 564 // Other Substructure variables 565 566 TLorentzVector TrimmedP4[5]; // first entry (i = 0) is the total Trimmed Jet 4-momenta and from i = 1 to 4 are the trimmed subjets 4-momenta 567 TLorentzVector PrunedP4[5]; // first entry (i = 0) is the total Pruned Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta 568 TLorentzVector SoftDroppedP4[5]; // first entry (i = 0) is the total SoftDropped Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta 569 570 Int_t NSubJetsTrimmed; // number of subjets trimmed 571 Int_t NSubJetsPruned; // number of subjets pruned 572 Int_t NSubJetsSoftDropped; // number of subjets soft-dropped 573 487 574 488 575 static CompBase *fgCompare; //! … … 504 591 void SetFactory(DelphesFactory *factory) { fFactory = factory; } 505 592 506 ClassDef(Candidate, 2)593 ClassDef(Candidate, 3) 507 594 }; 508 595 -
classes/DelphesFormula.cc
rd870fc5 rd77b51d 23 23 24 24 #include <stdexcept> 25 #include <string>26 25 27 26 using namespace std; … … 51 50 Int_t DelphesFormula::Compile(const char *expression) 52 51 { 53 string buffer;52 TString buffer; 54 53 const char *it; 55 54 for(it = expression; *it; ++it) 56 55 { 57 56 if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue; 58 buffer. push_back(*it);57 buffer.Append(*it); 59 58 } 60 if(TFormula::Compile(buffer.c_str()) != 0) 59 buffer.ReplaceAll("pt", "x"); 60 buffer.ReplaceAll("eta", "y"); 61 buffer.ReplaceAll("phi", "z"); 62 buffer.ReplaceAll("energy", "t"); 63 if(TFormula::Compile(buffer) != 0) 61 64 { 62 65 throw runtime_error("Invalid formula."); … … 74 77 75 78 //------------------------------------------------------------------------------ 76 77 Int_t DelphesFormula::DefinedVariable(TString &chaine, Int_t &action)78 {79 action = kVariable;80 if(chaine == "pt")81 {82 if(fNdim < 1) fNdim = 1;83 return 0;84 }85 else if(chaine == "eta")86 {87 if(fNdim < 2) fNdim = 2;88 return 1;89 }90 else if(chaine == "phi")91 {92 if(fNdim < 3) fNdim = 3;93 return 2;94 }95 else if(chaine == "energy")96 {97 if(fNdim < 4) fNdim = 4;98 return 3;99 }100 return -1;101 }102 103 //------------------------------------------------------------------------------ -
classes/DelphesFormula.h
rd870fc5 rd77b51d 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);39 37 }; 40 38 -
classes/DelphesLHEFReader.cc
rd870fc5 rd77b51d 82 82 fEventCounter = -1; 83 83 fParticleCounter = -1; 84 f RwgtList.clear();84 fWeightList.clear(); 85 85 } 86 86 … … 99 99 TObjArray *partonOutputArray) 100 100 { 101 int rc ;101 int rc, id; 102 102 char *pch; 103 103 double weight; … … 158 158 else if(strstr(fBuffer, "<wgt")) 159 159 { 160 pch = str str(fBuffer, ">");160 pch = strpbrk(fBuffer, "\"'"); 161 161 if(!pch) 162 162 { … … 165 165 } 166 166 167 DelphesStream bufferStream(pch + 1); 168 rc = bufferStream.ReadDbl(weight); 167 DelphesStream idStream(pch + 1); 168 rc = idStream.ReadInt(id); 169 170 pch = strchr(fBuffer, '>'); 171 if(!pch) 172 { 173 cerr << "** ERROR: " << "invalid weight format" << endl; 174 return kFALSE; 175 } 176 177 DelphesStream weightStream(pch + 1); 178 rc = weightStream.ReadDbl(weight); 169 179 170 180 if(!rc) … … 174 184 } 175 185 176 f RwgtList.push_back(weight);186 fWeightList.push_back(make_pair(id, weight)); 177 187 } 178 188 else if(strstr(fBuffer, "</event>")) … … 206 216 //--------------------------------------------------------------------------- 207 217 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; 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; 218 229 } 219 230 } -
classes/DelphesLHEFReader.h
rd870fc5 rd77b51d 31 31 32 32 #include <vector> 33 #include <utility> 33 34 34 35 class TObjArray; … … 58 59 TStopwatch *readStopWatch, TStopwatch *procStopWatch); 59 60 60 void Analyze Rwgt(ExRootTreeBranch *branch);61 void AnalyzeWeight(ExRootTreeBranch *branch); 61 62 62 63 private: … … 83 84 double fPx, fPy, fPz, fE, fMass; 84 85 85 std::vector< double> fRwgtList;86 std::vector< std::pair< int, double > > fWeightList; 86 87 }; 87 88 -
classes/DelphesSTDHEPReader.cc
rd870fc5 rd77b51d 77 77 fInputFile = inputFile; 78 78 xdrstdio_create(fInputXDR, inputFile, XDR_DECODE); 79 ReadFileHeader();80 79 } 81 80 … … 107 106 SkipBytes(4); 108 107 109 if(fBlockType == EVENTTABLE) 108 if(fBlockType == FILEHEADER) 109 { 110 ReadFileHeader(); 111 } 112 else if(fBlockType == EVENTTABLE) 110 113 { 111 114 ReadEventTable(); … … 177 180 u_int i; 178 181 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);187 182 188 183 // version -
classes/DelphesTF2.cc
rd870fc5 rd77b51d 18 18 19 19 #include "classes/DelphesTF2.h" 20 21 #include "RVersion.h" 20 22 #include "TString.h" 23 21 24 #include <stdexcept> 22 #include <string>23 25 24 26 using namespace std; … … 34 36 35 37 DelphesTF2::DelphesTF2(const char *name, const char *expression) : 36 TF2(name, expression)38 TF2(name, expression) 37 39 { 38 40 } … … 46 48 //------------------------------------------------------------------------------ 47 49 48 Int_t DelphesTF2:: DefinedVariable(TString &chaine, Int_t &action)50 Int_t DelphesTF2::Compile(const char *expression) 49 51 { 50 action = kVariable; 51 if(chaine == "z") 52 TString buffer; 53 const char *it; 54 for(it = expression; *it; ++it) 52 55 { 53 if( fNdim < 1) fNdim = 1;54 return 0;56 if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue; 57 buffer.Append(*it); 55 58 } 56 else if(chaine == "t") 59 buffer.ReplaceAll("z", "x"); 60 buffer.ReplaceAll("t", "y"); 61 #if ROOT_VERSION_CODE < ROOT_VERSION(6,04,00) 62 if(TF2::Compile(buffer) != 0) 63 #else 64 if(TF2::GetFormula()->Compile(buffer) != 0) 65 #endif 57 66 { 58 if(fNdim < 2) fNdim = 2; 59 return 1; 67 throw runtime_error("Invalid formula."); 60 68 } 61 return -1;69 return 0; 62 70 } 63 71 -
classes/DelphesTF2.h
rd870fc5 rd77b51d 21 21 22 22 #include "TF2.h" 23 #include "TFormula.h"24 25 #include <string>26 23 27 24 class DelphesTF2: public TF2 … … 35 32 ~DelphesTF2(); 36 33 37 Int_t DefinedVariable(TString &variable, Int_t &action); 38 34 Int_t Compile(const char *expression); 39 35 }; 40 36 41 37 #endif /* DelphesTF2_h */ 42 -
display/Delphes3DGeometry.cc
rd870fc5 rd77b51d 17 17 */ 18 18 19 #include "display/Delphes3DGeometry.h"20 19 #include <set> 21 20 #include <map> … … 25 24 #include <sstream> 26 25 #include <cassert> 26 27 #include "TAxis.h" 27 28 #include "TGeoManager.h" 28 29 #include "TGeoVolume.h" … … 34 35 #include "TGeoCone.h" 35 36 #include "TGeoArb8.h" 36 #include "external/ExRootAnalysis/ExRootConfReader.h"37 #include "classes/DelphesClasses.h"38 37 #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" 41 47 42 48 using namespace std; … … 90 96 tk_length_ = confReader->GetDouble(Form("%s::HalfLength",ParticlePropagator), 3.0)*100.; // tk_length 91 97 tk_Bz_ = confReader->GetDouble("ParticlePropagator::Bz", 0.0); // tk_Bz 92 98 99 TString buffer; 100 const char *it; 101 102 93 103 { 94 104 TString tkEffFormula = confReader->GetString(Form("%s::EfficiencyFormula",TrackingEfficiency),"abs(eta)<3.0"); … … 96 106 tkEffFormula.ReplaceAll("eta","y"); 97 107 tkEffFormula.ReplaceAll("phi","0."); 98 TF2* tkEffFunction = new TF2("tkEff",tkEffFormula,0,1000,-10,10); 108 109 buffer.Clear(); 110 for(it = tkEffFormula.Data(); *it; ++it) 111 { 112 if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue; 113 buffer.Append(*it); 114 } 115 116 TF2* tkEffFunction = new TF2("tkEff",buffer,0,1000,-10,10); 99 117 TH1F etaHisto("eta","eta",100,5.,-5.); 100 118 Double_t pt,eta; … … 118 136 muonEffFormula.ReplaceAll("eta","y"); 119 137 muonEffFormula.ReplaceAll("phi","0."); 120 TF2* muEffFunction = new TF2("muEff",muonEffFormula,0,1000,-10,10); 138 139 buffer.Clear(); 140 for(it = muonEffFormula.Data(); *it; ++it) 141 { 142 if(*it == ' ' || *it == '\t' || *it == '\r' || *it == '\n' || *it == '\\' ) continue; 143 buffer.Append(*it); 144 } 145 146 TF2* muEffFunction = new TF2("muEff",buffer,0,1000,-10,10); 121 147 TH1F etaHisto("eta2","eta2",100,5.,-5.); 122 148 Double_t pt,eta; -
display/Delphes3DGeometry.h
rd870fc5 rd77b51d 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>25 24 #include <vector> 26 #include <algorithm> 27 #include <sstream> 28 #include "TAxis.h" 29 #include "TGeoManager.h" 30 #include "TGeoVolume.h" 31 #include "TGeoMedium.h" 25 26 #include "Rtypes.h" 27 28 class TAxis; 29 class TGeoManager; 30 class TGeoVolume; 31 class TGeoMedium; 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"); 44 45 void loadFromFile(const char* filename, const char* name="DelphesGeometry"); 46 void save(const char* filename, const char* name="DelphesGeometry"); 40 void readFile(const char *filename, const char *ParticlePropagator="ParticlePropagator", 41 const char *TrackingEfficiency="ChargedHadronTrackingEfficiency", 42 const char *MuonEfficiency="MuonEfficiency", 43 const char *Calorimeters="Calorimeter"); 47 44 48 45 void setContingency(Double_t contingency) { contingency_ = contingency; } … … 51 48 void setMuonSystemThickness(Double_t thickness) { muonSystem_thickn_ = thickness; } 52 49 53 TGeoVolume *getDetector(bool withTowers = true);50 TGeoVolume *getDetector(bool withTowers = true); 54 51 55 52 Double_t getTrackerRadius() const { return tk_radius_; } … … 62 59 private: 63 60 std::pair<Double_t, Double_t> addTracker(TGeoVolume *top); 64 std::pair<Double_t, Double_t> addCalorimeter(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);65 std::pair<Double_t, Double_t> addMuonDets(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength);66 void addCaloTowers(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning);61 std::pair<Double_t, Double_t> addCalorimeter(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning); 62 std::pair<Double_t, Double_t> addMuonDets(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength); 63 void addCaloTowers(TGeoVolume *top, const char *name, Double_t innerBarrelRadius, Double_t innerBarrelLength, std::set< std::pair<Double_t, Int_t> >& caloBinning); 67 64 68 65 private: … … 75 72 TGeoMedium *mudetmed_; 76 73 77 TAxis *etaAxis_;78 TAxis *phiAxis_;74 TAxis *etaAxis_; 75 TAxis *phiAxis_; 79 76 80 77 Double_t contingency_; … … 94 91 std::map<std::string, Double_t> muonSystem_etamax_; 95 92 std::map<std::string, std::set< std::pair<Double_t, Int_t> > > caloBinning_; 96 93 97 94 }; 98 95 -
display/DelphesBranchElement.cc
rd870fc5 rd77b51d 155 155 trkProp->SetMaxR(tkRadius_); 156 156 trkProp->SetMaxZ(tkHalfLength_); 157 GenParticle *particle; 157 158 if(type=="Track") { // CASE 1: TRACKS 158 159 Track *track; … … 161 162 track->P4().Px(), track->P4().Py(), 162 163 track->P4().Pz(), track->P4().E(), 163 track->X , track->Y, track->Z,0.0);164 track->X/10.0, track->Y/10.0, track->Z/10.0, track->T/10.0); 164 165 eveTrack = new TEveTrack(&pb, counter, trkProp); 165 166 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 173 174 Electron *electron; 174 175 while((electron = (Electron *) itTrack.Next())) { 176 particle = (GenParticle*) electron->Particle.GetObject(); 175 177 TParticle pb(electron->Charge<0?11:-11, 1, 0, 0, 0, 0, 176 178 electron->P4().Px(), electron->P4().Py(), 177 179 electron->P4().Pz(), electron->P4().E(), 178 0., 0., 0., 0.);180 particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0); 179 181 eveTrack = new TEveTrack(&pb, counter, trkProp); 180 182 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 188 190 Muon *muon; 189 191 while((muon = (Muon *) itTrack.Next())) { 192 particle = (GenParticle*) muon->Particle.GetObject(); 190 193 TParticle pb(muon->Charge<0?13:-13, 1, 0, 0, 0, 0, 191 194 muon->P4().Px(), muon->P4().Py(), 192 195 muon->P4().Pz(), muon->P4().E(), 193 0., 0., 0., 0.);196 particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0); 194 197 eveTrack = new TEveTrack(&pb, counter, trkProp); 195 198 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 206 209 photon->P4().Px(), photon->P4().Py(), 207 210 photon->P4().Pz(), photon->P4().E(), 208 0. , 0., 0., 0.);211 0.0, 0.0, 0.0, 0.0); 209 212 eveTrack = new TEveTrack(&pb, counter, trkProp); 210 213 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); … … 223 226 particle->P4().Px(), particle->P4().Py(), 224 227 particle->P4().Pz(), particle->P4().E(), 225 particle->X , particle->Y, particle->Z, particle->T);228 particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0); 226 229 eveTrack = new TEveTrack(&pb, counter, trkProp); 227 230 eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++)); -
display/DelphesEventDisplay.cc
rd870fc5 rd77b51d 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 23 24 #include "TGeoManager.h" 24 25 #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"32 26 #include "TEveElement.h" 33 27 #include "TEveJetCone.h" … … 53 47 #include "TCanvas.h" 54 48 #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" 55 66 56 67 DelphesEventDisplay::DelphesEventDisplay() … … 98 109 TEveManager::Create(kTRUE, "IV"); 99 110 fStatusBar_ = gEve->GetBrowser()->GetStatusBar(); 100 TGeoManager *geom = gGeoManager;111 TGeoManager *geom = gGeoManager; 101 112 102 113 // build the detector … … 108 119 etaAxis_ = det3D.getCaloAxes().first; 109 120 phiAxis_ = det3D.getCaloAxes().second; 110 TGeoVolume *top = det3D.getDetector(false);121 TGeoVolume *top = det3D.getDetector(false); 111 122 geom->SetTopVolume(top); 112 123 TEveElementList *geometry = new TEveElementList("Geometry"); 113 TObjArray *nodes = top->GetNodes();124 TObjArray *nodes = top->GetNodes(); 114 125 TIter itNodes(nodes); 115 TGeoNode *nodeobj;116 TEveGeoTopNode *node;126 TGeoNode *nodeobj; 127 TEveGeoTopNode *node; 117 128 while((nodeobj = (TGeoNode*)itNodes.Next())) { 118 129 node = new TEveGeoTopNode(gGeoManager,nodeobj); … … 131 142 // prepare data collections 132 143 readConfig(configFile, elements_); 133 for(std::vector<DelphesBranchBase *>::iterator element = elements_.begin(); element<elements_.end(); ++element) {134 DelphesBranchElement<TEveTrackList> *item_v1 = dynamic_cast<DelphesBranchElement<TEveTrackList>*>(*element);135 DelphesBranchElement<TEveElementList> *item_v2 = dynamic_cast<DelphesBranchElement<TEveElementList>*>(*element);144 for(std::vector<DelphesBranchBase *>::iterator element = elements_.begin(); element<elements_.end(); ++element) { 145 DelphesBranchElement<TEveTrackList> *item_v1 = dynamic_cast<DelphesBranchElement<TEveTrackList>*>(*element); 146 DelphesBranchElement<TEveElementList> *item_v2 = dynamic_cast<DelphesBranchElement<TEveElementList>*>(*element); 136 147 if(item_v1) gEve->AddElement(item_v1->GetContainer()); 137 148 if(item_v2) gEve->AddElement(item_v2->GetContainer()); … … 144 155 delphesDisplay_->ImportGeomRhoZ(geometry); 145 156 // find the first calo data and use that to initialize the calo display 146 for(std::vector<DelphesBranchBase *>::iterator data=elements_.begin();data<elements_.end();++data) {157 for(std::vector<DelphesBranchBase *>::iterator data=elements_.begin();data<elements_.end();++data) { 147 158 if(TString((*data)->GetType())=="Tower") { // we could also use GetClassName()=="DelphesCaloData" 148 DelphesCaloData *container = dynamic_cast<DelphesBranchElement<DelphesCaloData>*>((*data))->GetContainer();159 DelphesCaloData *container = dynamic_cast<DelphesBranchElement<DelphesCaloData>*>((*data))->GetContainer(); 149 160 assert(container); 150 161 TEveCalo3D *calo3d = new TEveCalo3D(container); … … 182 193 ExRootConfParam branches = confReader->GetParam("TreeWriter::Branch"); 183 194 Int_t nBranches = branches.GetSize()/3; 184 DelphesBranchElement<TEveTrackList> *tlist;185 DelphesBranchElement<DelphesCaloData> *clist;186 DelphesBranchElement<TEveElementList> *elist;195 DelphesBranchElement<TEveTrackList> *tlist; 196 DelphesBranchElement<DelphesCaloData> *clist; 197 DelphesBranchElement<TEveElementList> *elist; 187 198 // first loop with all but tracks 188 199 for(Int_t b = 0; b<nBranches; ++b) { … … 273 284 274 285 // update display 275 TEveElement *top = (TEveElement*)gEve->GetCurrentEvent();286 TEveElement *top = (TEveElement*)gEve->GetCurrentEvent(); 276 287 delphesDisplay_->DestroyEventRPhi(); 277 288 delphesDisplay_->ImportEventRPhi(top); … … 356 367 357 368 // add a tab on the left 358 TEveBrowser *browser = gEve->GetBrowser();369 TEveBrowser *browser = gEve->GetBrowser(); 359 370 browser->SetWindowName("Delphes Event Display"); 360 371 browser->StartEmbedding(TRootBrowser::kLeft); 361 372 362 373 // set the main title 363 TGMainFrame *frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);374 TGMainFrame *frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600); 364 375 frmMain->SetWindowName("Delphes Event Display"); 365 376 frmMain->SetCleanup(kDeepCleanup); … … 371 382 if(!gSystem->OpenDirectory(icondir)) 372 383 icondir = Form("%s/icons/", (const char*)gSystem->GetFromPipe("root-config --etcdir") ); 373 TGGroupFrame *vf = new TGGroupFrame(frmMain,"Event navigation",kVerticalFrame | kFitWidth );384 TGGroupFrame *vf = new TGGroupFrame(frmMain,"Event navigation",kVerticalFrame | kFitWidth ); 374 385 { 375 TGHorizontalFrame *hf = new TGHorizontalFrame(frmMain);386 TGHorizontalFrame *hf = new TGHorizontalFrame(frmMain); 376 387 { 377 TGPictureButton *b = 0;388 TGPictureButton *b = 0; 378 389 379 390 b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoBack.gif")); … … 381 392 b->Connect("Clicked()", "DelphesEventDisplay", this, "Bck()"); 382 393 383 TGNumberEntry *numberEntry = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries());394 TGNumberEntry *numberEntry = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries()); 384 395 hf->AddFrame(numberEntry, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 2, 0, 10, 10)); 385 396 this->Connect("EventChanged(Int_t)","TGNumberEntry",numberEntry,"SetIntNumber(Long_t)"); … … 394 405 vf->AddFrame(hf, new TGLayoutHints(kLHintsExpandX , 2, 2, 2, 2)); 395 406 396 TGHProgressBar *progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);407 TGHProgressBar *progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100); 397 408 progress->SetMax( treeReader_->GetEntries()); 398 409 progress->ShowPosition(kTRUE, kFALSE, "Event %.0f"); … … 418 429 // the summary tab 419 430 htmlSummary_ = new DelphesHtmlSummary("Delphes Event Display Summary Table"); 420 TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());431 TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight()); 421 432 gHtml_ = new TGHtml(0, 100, 100); 422 433 TEveWindowFrame *wf = slot->MakeFrame(gHtml_); … … 426 437 // plot tab 427 438 slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight()); 428 TEveWindowTab *tab = slot->MakeTab();439 TEveWindowTab *tab = slot->MakeTab(); 429 440 tab->SetElementName("Summary plots"); 430 441 tab->SetShowTitleBar(kFALSE); … … 435 446 } 436 447 437 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 } -
display/DelphesEventDisplay.h
rd870fc5 rd77b51d 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>38 23 24 #include "Rtypes.h" 25 #include "RQ_OBJECT.h" 39 26 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; 40 37 41 38 /* 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 table45 *39 *assembly.C: sauvegarde as shape-extract -> implement in the geometry class (read/write) 40 *histobrowser.C: intégration d'histogrammes dans le display (on pourrait avoir Pt, eta, phi pour les principales collections) 41 *also from alice_esd: summary html table 42 * 46 43 */ 47 44 … … 59 56 void make_gui(); 60 57 void load_event(); 61 void readConfig(const char *configFile, std::vector<DelphesBranchBase *>& elements);58 void readConfig(const char *configFile, std::vector<DelphesBranchBase *>& elements); 62 59 63 60 // Configuration and global variables. … … 67 64 Double_t tkRadius_, totRadius_, tkHalfLength_, muHalfLength_, bz_; 68 65 TAxis *etaAxis_, *phiAxis_; 69 TChain *chain_;70 std::vector<DelphesBranchBase *> elements_;66 TChain *chain_; 67 std::vector<DelphesBranchBase *> elements_; 71 68 DelphesDisplay *delphesDisplay_; 72 69 DelphesHtmlSummary *htmlSummary_; 73 70 TGHtml *gHtml_; 74 71 DelphesPlotSummary *plotSummary_; 75 TGStatusBar *fStatusBar_;72 TGStatusBar *fStatusBar_; 76 73 77 74 // gui controls 78 75 public: 79 void Fwd() { 80 if (event_id_ < treeReader_->GetEntries() - 2) { 81 EventChanged(event_id_+1); 82 } else { 83 printf("Already at last event.\n"); 84 } 85 } 76 void Fwd(); 86 77 87 void Bck() { 88 if (event_id_ > 0) { 89 EventChanged(event_id_-1); 90 } else { 91 printf("Already at first event.\n"); 92 } 93 } 78 void Bck(); 94 79 95 void PreSetEv(char* ev) { 96 event_id_tmp_ = Int_t(atoi(ev)); 97 } 80 void PreSetEv(char *ev); 98 81 99 void GoTo() { 100 if (event_id_tmp_>=0 && event_id_tmp_ < treeReader_->GetEntries()-1) { 101 EventChanged(event_id_tmp_); 102 } else { 103 printf("Error: no such event.\n"); 104 } 105 } 82 void GoTo(); 106 83 107 void InitSummaryPlots() { 108 plotSummary_->FillSample(treeReader_, event_id_); 109 plotSummary_->FillEvent(); 110 plotSummary_->Draw(); 111 } 84 void InitSummaryPlots(); 112 85 113 void DisplayProgress(Int_t p) { 114 fStatusBar_->SetText(Form("Processing... %d %%",p), 1); 115 gSystem->ProcessEvents(); 116 } 86 void DisplayProgress(Int_t p); 117 87 }; 118 88 -
doc/genMakefile.tcl
rd870fc5 rd77b51d 103 103 if {$fileName == "modules/PileUpMergerPythia8.cc"} { 104 104 lappend srcObjFilesPythia8 $srcObjName$objSuf 105 } elseif { [string match {modules/FastJet*.cc} $fileName]&& $srcPrefix != {FASTJET}} {105 } elseif {([string match {modules/FastJet*.cc} $fileName] || [string match {modules/RunPUPPI.cc} $fileName]) && $srcPrefix != {FASTJET}} { 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 PatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils221 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsCommon -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon 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} { external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc} {external/fastjet/contribs/*/*.cc}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} 288 288 289 289 sourceDeps {DISPLAY} {display/*.cc} … … 396 396 @echo ">> Building $(DISTTAR)" 397 397 @mkdir -p $(DISTDIR) 398 @cp -a CHANGELOG C OPYING CREDITS README VERSION Makefileconfigure cards classes converters display doc examples external modules python readers $(DISTDIR)398 @cp -a CHANGELOG CMakeLists.txt COPYING CREDITS DelphesEnv.sh README README_4LHCb VERSION Makefile MinBias.pileup configure cards classes converters display doc examples external modules python readers $(DISTDIR) 399 399 @find $(DISTDIR) -depth -name .\* -exec rm -rf {} \; 400 400 @tar -czf $(DISTTAR) $(DISTDIR) -
doc/update_fastjet.sh
rd870fc5 rd77b51d 1 version=3.1. 01 version=3.1.2 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 .cpp .cc SISCone/*.cpp 86 85 rename 's/\.cpp$/.cc/' SISCone/*.cpp 87 86 88 87 mkdir -p TrackJet/fastjet … … 90 89 cp -a ../../fastjet-${version}/plugins/TrackJet/fastjet/*.hh TrackJet/fastjet 91 90 92 sed -i 's/#include "fastjet\/ /#include"/' D0RunICone/fastjet/D0RunIpre96ConePlugin.hh93 sed -i 's/#include "fastjet\/ /#include"/' D0RunICone/fastjet/D0RunIConePlugin.hh91 sed -i 's/#include "fastjet\/D0RunIBaseConePlugin.hh"/#include "D0RunIBaseConePlugin.hh"/' D0RunICone/fastjet/D0RunIpre96ConePlugin.hh 92 sed -i 's/#include "fastjet\/D0RunIBaseConePlugin.hh"/#include "D0RunIBaseConePlugin.hh"/' D0RunICone/fastjet/D0RunIConePlugin.hh 94 93 95 94 sed -i 's/#include "siscone\//#include "/' SISCone/SISConePlugin.cc -
examples/EventDisplay.C
rd870fc5 rd77b51d 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 #endif 5 12 6 13 void EventDisplay(const char *configfile = "delphes_card_CMS.tcl", … … 33 40 34 41 // create the application 35 DelphesEventDisplay *display = new DelphesEventDisplay(configfile, datafile, det3D);42 DelphesEventDisplay *display = new DelphesEventDisplay(configfile, datafile, det3D); 36 43 } 37 44 } -
examples/Example1.C
rd870fc5 rd77b51d 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 #endif 8 14 9 15 //------------------------------------------------------------------------------ -
examples/Example2.C
rd870fc5 rd77b51d 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 #endif 10 17 11 18 //------------------------------------------------------------------------------ -
examples/Example3.C
rd870fc5 rd77b51d 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 #else 14 class ExRootTreeReader; 15 class ExRootResult; 16 #endif 17 8 18 //------------------------------------------------------------------------------ 9 19 … … 25 35 TH1 *fJetDeltaPT; 26 36 }; 27 28 //------------------------------------------------------------------------------29 30 class ExRootResult;31 class ExRootTreeReader;32 37 33 38 //------------------------------------------------------------------------------ -
examples/Example4.C
rd870fc5 rd77b51d 1 1 /* 2 3 2 This macro shows how to compute jet energy scale. 4 3 root -l examples/Example4.C'("delphes_output.root", "plots.root")' 5 4 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 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 12 12 13 13 e.g a smooth function: 14 14 15 16 set ScaleFormula { sqrt(3.0 - 0.1*(abs(eta)))^2 / pt + 1.0 ) } 17 15 set ScaleFormula { sqrt(3.0 - 0.1*(abs(eta)))^2 / pt + 1.0) } 18 16 19 17 or a binned function: 20 21 18 22 19 set ScaleFormula {(abs(eta) > 0.0 && abs(eta) <= 2.5) * (pt > 20.0 && pt <= 50.0) * (1.10) + … … 27 24 (abs(eta) > 2.5 && abs(eta) <= 5.0) * (pt > 100.0) * (1.00)} 28 25 29 30 Be aware that a binned jet energy scale can produce "steps" in the corrected jet pt distribution ... 31 32 33 26 Be aware that a binned jet energy scale can produce "steps" in the corrected 27 jet pt distribution ... 34 28 */ 29 30 #ifdef __CLING__ 31 R__LOAD_LIBRARY(libDelphes) 32 #include "classes/DelphesClasses.h" 33 #include "external/ExRootAnalysis/ExRootTreeReader.h" 34 #include "external/ExRootAnalysis/ExRootResult.h" 35 #else 36 class ExRootTreeReader; 37 class ExRootResult; 38 #endif 35 39 36 40 //------------------------------------------------------------------------------ … … 161 165 162 166 Jet *jet, *genjet; 163 GenParticle *part ;167 GenParticle *particle; 164 168 TObject *object; 165 169 166 TLorentzVector JetMom, GenJetMom, BestGenJetMom;167 168 Float_t Dr;170 TLorentzVector jetMomentum, genJetMomentum, bestGenJetMomentum; 171 172 Float_t deltaR; 169 173 Float_t pt, eta; 170 174 Long64_t entry; … … 177 181 // Load selected branches with data from specified event 178 182 treeReader->ReadEntry(entry); 179 // cout<<"-- New event -- "<<endl;180 183 181 184 if(entry%500 == 0) cout << "Event number: "<< entry <<endl; … … 186 189 187 190 jet = (Jet*) branchJet->At(i); 188 JetMom = jet->P4();189 190 plots->fJetPT->Fill( JetMom.Pt());191 192 Dr= 999;191 jetMomentum = jet->P4(); 192 193 plots->fJetPT->Fill(jetMomentum.Pt()); 194 195 deltaR = 999; 193 196 194 197 // Loop over all hard partons in event 195 198 for(j = 0; j < branchParticle->GetEntriesFast(); ++j) 196 199 { 197 198 part = (GenParticle*) branchParticle->At(j); 199 200 GenJetMom = part -> P4(); 201 202 //this is simply to avoid warnings from initial state particlehaving infite rapidity ...203 if( GenJetMom.Px() == 0 && GenJetMom.Py() == 0) continue;204 205 // take the closest parton candidate206 if( GenJetMom.DeltaR(JetMom) < Dr)200 particle = (GenParticle*) branchParticle->At(j); 201 202 genJetMomentum = particle->P4(); 203 204 // this is simply to avoid warnings from initial state particle 205 // having infite rapidity ... 206 if(genJetMomentum.Px() == 0 && genJetMomentum.Py() == 0) continue; 207 208 // take the closest parton candidate 209 if(genJetMomentum.DeltaR(jetMomentum) < deltaR) 207 210 { 208 Dr = GenJetMom.DeltaR(JetMom);209 BestGenJetMom = GenJetMom;211 deltaR = genJetMomentum.DeltaR(jetMomentum); 212 bestGenJetMomentum = genJetMomentum; 210 213 } 211 212 214 } 213 215 214 if(Dr < 0.3) 215 { 216 pt = JetMom.Pt(); 217 eta = TMath::Abs(JetMom.Eta()); 218 219 220 if( pt > 20.0 && pt < 50.0 && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_20_50_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 221 if( pt > 20.0 && pt < 50.0 && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_20_50_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 222 223 if( pt > 50.0 && pt < 100.0 && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_50_100_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 224 if( pt > 50.0 && pt < 100.0 && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_50_100_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 225 226 if( pt > 100.0 && pt < 200.0 && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_100_200_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 227 if( pt > 100.0 && pt < 200.0 && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_100_200_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 228 229 if( pt > 200.0 && pt < 500.0 && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_200_500_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 230 if( pt > 200.0 && pt < 500.0 && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_200_500_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 231 232 if( pt > 500.0 && eta > 0.0 && eta < 2.5 ) plots -> fJetRes_Pt_500_inf_Eta_0_25->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 233 if( pt > 500.0 && eta > 2.5 && eta < 5.0 ) plots -> fJetRes_Pt_500_inf_Eta_25_5->Fill(BestGenJetMom.Pt()/JetMom.Pt()); 234 235 236 } 237 238 216 if(deltaR < 0.3) 217 { 218 pt = jetMomentum.Pt(); 219 eta = TMath::Abs(jetMomentum.Eta()); 220 221 222 if(pt > 20.0 && pt < 50.0 && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_20_50_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 223 if(pt > 20.0 && pt < 50.0 && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_20_50_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 224 225 if(pt > 50.0 && pt < 100.0 && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_50_100_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 226 if(pt > 50.0 && pt < 100.0 && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_50_100_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 227 228 if(pt > 100.0 && pt < 200.0 && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_100_200_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 229 if(pt > 100.0 && pt < 200.0 && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_100_200_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 230 231 if(pt > 200.0 && pt < 500.0 && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_200_500_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 232 if(pt > 200.0 && pt < 500.0 && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_200_500_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 233 234 if(pt > 500.0 && eta > 0.0 && eta < 2.5) plots -> fJetRes_Pt_500_inf_Eta_0_25->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 235 if(pt > 500.0 && eta > 2.5 && eta < 5.0) plots -> fJetRes_Pt_500_inf_Eta_25_5->Fill(bestGenJetMomentum.Pt()/jetMomentum.Pt()); 236 237 } 239 238 } 240 239 } 241 240 } 242 243 241 244 242 //------------------------------------------------------------------------------ -
examples/ExternalFastJet/ExternalFastJetBasic.cpp
rd870fc5 rd77b51d 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 tionnal array "EVENTS" (for an example reading26 an hepmcfile see ExternalFastJetHepMC.cpp).27 28 In order to run this example you first , youneed 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 multidimensional array "EVENTS" (for an example reading 26 an HepMC file see ExternalFastJetHepMC.cpp). 27 28 In order to run this example you first need to set the paths to your Delphes, FastJet 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 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 $DELPHES_LIB"47 48 g++ $CXXFLAGS $LDFLAGS examples/ExternalFastJetBasic.cpp -o examples/ExternalFastJetBasic46 LDFLAGS="$FASTJET_LIB $ROOT_LIB -lEG $DELPHES_LIB" 47 48 g++ $CXXFLAGS examples/ExternalFastJet/ExternalFastJetBasic.cpp $LDFLAGS -o ExternalFastJetBasic 49 49 50 50 Then run: 51 51 52 ./ examples/ExternalFastJetBasic cards/delphes_card_CMS_NoFastJet.tcl52 ./ExternalFastJetBasic cards/delphes_card_CMS_NoFastJet.tcl 53 53 54 54 -
examples/ExternalFastJet/ExternalFastJetHepMC.cpp
rd870fc5 rd77b51d 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 , youneed 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 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 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 $DELPHES_LIB"46 47 g++ $CXXFLAGS $LDFLAGS examples/ExternalFastJetHepMC.cpp -o examples/ExternalFastJetHepMC48 49 Then run (you need an event file in hepmcformat):50 51 ./ examples/ExternalFastJetHepMC cards/delphes_card_CMS_NoFastJet.tcl file.hepmc45 LDFLAGS="$FASTJET_LIB $ROOT_LIB -lEG $DELPHES_LIB" 46 47 g++ $CXXFLAGS examples/ExternalFastJet/ExternalFastJetHepMC.cpp $LDFLAGS -o ExternalFastJetHepMC 48 49 Then run (you need an event file in HepMC format): 50 51 ./ExternalFastJetHepMC cards/delphes_card_CMS_NoFastJet.tcl file.hepmc 52 52 53 53 -
external/fastjet/ClusterSequence.cc
rd870fc5 rd77b51d 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequence.cc 3 685 2014-09-11 20:15:00Z salam$2 // $Id: ClusterSequence.cc 3809 2015-02-20 13:05:13Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 372 372 _plugin_activated = false; 373 373 374 } else if (_strategy == N2MHTLazy9AntiKtSeparateGhosts) { 374 375 #ifndef __FJCORE__ 375 } else if (_strategy == N2MHTLazy9AntiKtSeparateGhosts) {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 recombined 1474 // 1475 // Note that good practice would make this an assert (since this is 1476 // a serious internal issue). However, we decided to throw an 1477 // InternalError so that the end user can decide to catch it and 1478 // retry the clustering with a different strategy. 1479 1473 1480 assert(parent1 >= 0); 1481 if (_history[parent1].child != Invalid){ 1482 throw InternalError("trying to recomine an object that has previsously been recombined"); 1483 } 1474 1484 _history[parent1].child = local_step; 1475 if (parent2 >= 0) {_history[parent2].child = local_step;} 1485 if (parent2 >= 0) { 1486 if (_history[parent2].child != Invalid){ 1487 throw InternalError("trying to recomine an object that has previsously been recombined"); 1488 } 1489 _history[parent2].child = local_step; 1490 } 1476 1491 1477 1492 // get cross-referencing right from PseudoJets -
external/fastjet/Error.hh
rd870fc5 rd77b51d 3 3 4 4 //FJSTARTHEADER 5 // $Id: Error.hh 3 694 2014-09-18 13:21:54Z soyez $5 // $Id: Error.hh 3809 2015-02-20 13:05:13Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 96 96 97 97 98 /// @ingroup error_handling 99 /// \class InternalError 100 /// class corresponding to critical internal errors 101 /// 102 /// This is an error class (derived from Error) meant for serious, 103 /// critical, internal errors that we still want to be catchable by an 104 /// end-user [e.g. a serious issue in clustering where the end-user 105 /// can catch it and retry with a different strategy] 106 /// 107 /// Please directly contact the FastJet authors if you see such an 108 /// error. 109 class InternalError : public Error{ 110 public: 111 /// ctor with error message: 112 /// just add a bit of info to the message and pass it to the base class 113 InternalError(const std::string & message_in) : Error(std::string("*** CRITICAL INTERNAL FASTJET ERROR *** CONTACT THE AUTHORS *** ") + message_in){ } 114 }; 115 116 98 117 FASTJET_END_NAMESPACE 99 118 -
external/fastjet/LazyTiling25.cc
rd870fc5 rd77b51d 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling25.cc 3 477 2014-07-29 14:34:39Z salam$2 // $Id: LazyTiling25.cc 3808 2015-02-20 11:24:53Z soyez $ 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 double dist = _distance_to_tile(jet, *near_tile); 367 // here we are not allowed to miss a tile due to some rounding 368 // error. We therefore allow for a margin of security 369 double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin; 368 370 // cout << " max info looked at tile " << *near_tile - &_tiles[0] 369 371 // << ", dist = " << dist << " " << (*near_tile)->max_NN_dist -
external/fastjet/LazyTiling9.cc
rd870fc5 rd77b51d 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling9.cc 3 477 2014-07-29 14:34:39Z salam$2 // $Id: LazyTiling9.cc 3808 2015-02-20 11:24:53Z soyez $ 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 double dist = _distance_to_tile(jet, *near_tile); 350 // here we are not allowed to miss a tile due to some rounding 351 // error. We therefore allow for a margin of security 352 double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin; 351 353 // cout << " max info looked at tile " << *near_tile - &_tiles[0] 352 354 // << ", dist = " << dist << " " << (*near_tile)->max_NN_dist -
external/fastjet/LazyTiling9Alt.cc
rd870fc5 rd77b51d 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling9Alt.cc 3 477 2014-07-29 14:34:39Z salam$2 // $Id: LazyTiling9Alt.cc 3808 2015-02-20 11:24:53Z soyez $ 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 double dist = (tile.*(near_tile->second))(jet); 321 // here we are not allowed to miss a tile due to some rounding 322 // error. We therefore allow for a margin of security 323 double dist = (tile.*(near_tile->second))(jet) - tile_edge_security_margin; 322 324 // cout << " max info looked at tile " << *near_tile - &_tiles[0] 323 325 // << ", dist = " << dist << " " << (*near_tile)->max_NN_dist -
external/fastjet/LazyTiling9SeparateGhosts.cc
rd870fc5 rd77b51d 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling9SeparateGhosts.cc 3 596 2014-08-12 15:27:19Z soyez $2 // $Id: LazyTiling9SeparateGhosts.cc 3808 2015-02-20 11:24:53Z 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 double dist = _distance_to_tile(jet, *near_tile); 300 // here we are not allowed to miss a tile due to some rounding 301 // error. We therefore allow for a margin of security 302 double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin; 301 303 // cout << " max info looked at tile " << *near_tile - &_tiles[0] 302 304 // << ", dist = " << dist << " " << (*near_tile)->max_NN_dist -
external/fastjet/RectangularGrid.cc
rd870fc5 rd77b51d 1 1 //FJSTARTHEADER 2 // $Id $2 // $Id: RectangularGrid.cc 3771 2014-12-22 21:13:22Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/RectangularGrid.hh
rd870fc5 rd77b51d 3 3 4 4 //FJSTARTHEADER 5 // $Id $5 // $Id: RectangularGrid.hh 3771 2014-12-22 21:13:22Z salam $ 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 46 44 /// returns the index of the tile in which p is located, or -1 if p 47 45 /// is outside the tiling region … … 81 79 virtual bool is_initialised() const = 0; 82 80 bool is_initialized() const {return is_initialised();} 81 82 /// virtual destructor 83 virtual ~TilingBase() {} 83 84 }; 84 85 … … 165 166 // a tile selector 166 167 Selector _tile_selector; 167 // a cached 168 // if there's a tile selector, then for each tile, this caches the 169 // information about whether it is "good" i.e. it passes the tile 170 // selector 168 171 std::vector<bool> _is_good; 169 172 -
external/fastjet/VERSION
rd870fc5 rd77b51d 1 3.1. 01 3.1.2 -
external/fastjet/config_auto.h
rd870fc5 rd77b51d 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. 0"153 #define FASTJET_PACKAGE_STRING "FastJet 3.1.2" 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. 0"163 #define FASTJET_PACKAGE_VERSION "3.1.2" 164 164 #endif 165 165 … … 171 171 /* Version number of package */ 172 172 #ifndef FASTJET_VERSION 173 #define FASTJET_VERSION "3.1. 0"173 #define FASTJET_VERSION "3.1.2" 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 0188 #define FASTJET_VERSION_NUMBER 30102 189 189 #endif 190 190 191 191 /* Patch version of this package */ 192 192 #ifndef FASTJET_VERSION_PATCHLEVEL 193 #define FASTJET_VERSION_PATCHLEVEL 0193 #define FASTJET_VERSION_PATCHLEVEL 2 194 194 #endif 195 195 -
external/fastjet/config_raw.h
rd870fc5 rd77b51d 92 92 93 93 /* Define to the full name and version of this package. */ 94 #define PACKAGE_STRING "FastJet 3.1. 0"94 #define PACKAGE_STRING "FastJet 3.1.2" 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. 0"100 #define PACKAGE_VERSION "3.1.2" 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. 0"106 #define VERSION "3.1.2" 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 0115 #define VERSION_NUMBER 30102 116 116 117 117 /* Patch version of this package */ 118 #define VERSION_PATCHLEVEL 0118 #define VERSION_PATCHLEVEL 2 119 119 120 120 /* Pre-release version of this package */ -
external/fastjet/config_win.h
rd870fc5 rd77b51d 1 #define FASTJET_PACKAGE_STRING "FastJet 3.1. 0"2 #define FASTJET_PACKAGE_VERSION "3.1. 0"3 #define FASTJET_VERSION "3.1. 0"1 #define FASTJET_PACKAGE_STRING "FastJet 3.1.2" 2 #define FASTJET_PACKAGE_VERSION "3.1.2" 3 #define FASTJET_VERSION "3.1.2" 4 4 #define FASTJET_VERSION_MAJOR 3 5 5 #define FASTJET_VERSION_MINOR 1 6 #define FASTJET_VERSION_PATCHLEVEL 07 #define FASTJET_VERSION_NUMBER 3010 06 #define FASTJET_VERSION_PATCHLEVEL 2 7 #define FASTJET_VERSION_NUMBER 30102 8 8 9 9 /* The ATLASCone plugin is disabled by default*/ -
external/fastjet/internal/LazyTiling9Alt.hh
rd870fc5 rd77b51d 3 3 4 4 //FJSTARTHEADER 5 // $Id: LazyTiling9Alt.hh 3 477 2014-07-29 14:34:39Z salam$5 // $Id: LazyTiling9Alt.hh 3808 2015-02-20 11:24:53Z soyez $ 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 following 41 /// problem: when browsing tiles in the vicinity of the particles 42 /// being clustered in order to decide which of these tiles may 43 /// contain particles that need to be updated (because theit NN is one 44 /// of the particles that are currently clustered), we discard tiles 45 /// that are deemed "too far from the cell" by the "max_NN_dist" 46 /// criterion. Because of rounding error, this condition can sometimes 47 /// miss cases where an update is needed. 48 /// 49 /// An example of this happens if a particle '1' is, say, at the lower 50 /// edge of the rapidity of a given tile, with a particle '2' in the 51 /// tile directly on its left at the same rapidity. Assume also that 52 /// max_NN_dist in 2's tile corresponds to the distance between 2 and 53 /// teh tile of 1. If 2 is 1's NN then in case 2 gets clustered, 1's 54 /// NN needs to be updated. However, rounding errors in the 55 /// calculation of the distance between 1 and 2 may result is 56 /// something slightly larger than the max_NN_dist in 2's tile. 57 /// 58 /// This situation corresponds to the bug reported by Jochen Olt on 59 /// February 12 2015 [see issue-tracker/2015-02-infinite-loop], 60 /// causing an infinite loop. 61 /// 62 /// To prevent this, the simplest solution is, when looking at tiles 63 /// to browse for updateds, to add a margin of security close to the 64 /// edges of the cell, i.e. instead of updating only tiles for which 65 /// distance<=max_NN_dist, we will update tiles for which 66 /// distance<=max_NN_dist+tile_edge_security_margin. 67 /// 68 /// Note that this does not need to be done when computing nearest 69 /// neighbours [rounding errors are tolerated there] but it is 70 /// critical when tracking points that have to be updated. 71 const double tile_edge_security_margin=1.0e-7; 39 72 40 73 /// structure analogous to BriefJet, but with the extra information -
external/fastjet/plugins/D0RunICone/fastjet/D0RunIConePlugin.hh
rd870fc5 rd77b51d 32 32 //FJENDHEADER 33 33 34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen)34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen) 35 35 #include "D0RunIBaseConePlugin.hh" 36 36 -
external/fastjet/plugins/D0RunICone/fastjet/D0RunIpre96ConePlugin.hh
rd870fc5 rd77b51d 32 32 //FJENDHEADER 33 33 34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen)34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen) 35 35 #include "D0RunIBaseConePlugin.hh" 36 36 -
external/fastjet/plugins/SISCone/config.h
rd870fc5 rd77b51d 54 54 #define PACKAGE_TARNAME "siscone" 55 55 56 /* Define to the home page for this package. */57 /* #undef PACKAGE_URL */58 59 56 /* Define to the version of this package. */ 60 57 #define PACKAGE_VERSION "3.0.0" -
external/fastjet/tools/Filter.cc
rd870fc5 rd77b51d 1 1 //FJSTARTHEADER 2 // $Id: Filter.cc 3 633 2014-08-15 13:23:52Z soyez $2 // $Id: Filter.cc 3760 2014-12-19 10:05:10Z 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
rd870fc5 rd77b51d 3 3 4 4 //FJSTARTHEADER 5 // $Id: Filter.hh 3 494 2014-07-30 20:38:48Z soyez $5 // $Id: Filter.hh 3845 2015-03-08 08:35:36Z 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 ) {_subtractor = subtractor;}144 void set_subtractor(const FunctionOfPseudoJet<PseudoJet> * subtractor_in) {_subtractor = subtractor_in;} 145 145 146 146 /// runs the filtering and sets kept and rejected to be the jets of interest -
external/fastjet/tools/GridMedianBackgroundEstimator.hh
rd870fc5 rd77b51d 3 3 4 4 //FJSTARTHEADER 5 // $Id: GridMedianBackgroundEstimator.hh 3 610 2014-08-13 09:49:28Z salam $5 // $Id: GridMedianBackgroundEstimator.hh 3778 2014-12-24 09:28:09Z 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 79 , 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 96 //---------------------------------------------------------------- 97 /// Constructor based on a user's fully specified RectangularGrid 98 GridMedianBackgroundEstimator(const RectangularGrid & grid) : 99 RectangularGrid(grid), 100 _has_particles(false), _enable_rho_m(true) { 101 if (!RectangularGrid::is_initialised()) 102 throw Error("attempt to construct GridMedianBackgroundEstimator with uninitialised RectangularGrid"); 103 } 104 105 //---------------------------------------------------------------- 106 /// Constructor with the explicit parameters for the underlying 107 /// RectangularGrid 108 /// 97 109 /// \param rapmin the minimum rapidity extent of the grid 98 110 /// \param rapmax the maximum rapidity extent of the grid 99 111 /// \param drap the grid spacing in rapidity 100 112 /// \param dphi the grid spacing in azimuth 101 /// \param tile_selector optional (geometric) selector to specify 113 /// \param tile_selector optional (geometric) selector to specify 102 114 /// which tiles are good; a tile is good if 103 115 /// a massless 4-vector at the center of the tile passes … … 107 119 RectangularGrid(rapmin_in, rapmax_in, drap_in, dphi_in, tile_selector), 108 120 _has_particles(false), _enable_rho_m(true) {} 109 110 //----------------------------------------------------------------111 /// Constructor based on a user's fully specified RectangularGrid112 GridMedianBackgroundEstimator(const RectangularGrid & grid) :113 RectangularGrid(grid),114 _has_particles(false), _enable_rho_m(true) {115 if (!RectangularGrid::is_initialised())116 throw Error("attempt to construct GridMedianBackgroundEstimator with uninitialised RectangularGrid");117 }118 121 119 122 #else // alternative in old framework where we didn't have the rectangular grid -
external/fastjet/tools/Recluster.hh
rd870fc5 rd77b51d 2 2 #define __FASTJET_TOOLS_RECLUSTER_HH__ 3 3 4 // $Id: Recluster.hh 37 14 2014-09-30 09:47:31Z soyez $4 // $Id: Recluster.hh 3760 2014-12-19 10:05:10Z 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 nthe jet being processed (unless you52 /// systematically obtained from 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 snew_jet_alg, double new_jet_radius, Keep keep_in = keep_only_hardest);126 Recluster(JetAlgorithm new_jet_alg, double new_jet_radius, Keep keep_in = keep_only_hardest); 127 127 128 128 /// constructor with just a jet algorithm, but no jet radius. If the -
external/tcl/tcl.h
rd870fc5 rd77b51d 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 choices685 * for evalFlag bits in tclInt.h!!686 */687 688 #define TCL_NO_EVAL 0x10000689 #define TCL_EVAL_GLOBAL 0x20000690 681 691 682 /* … … 1224 1215 EXTERN Tcl_Obj * Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr)); 1225 1216 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));1228 1217 EXTERN int Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp, 1229 1218 char *string)); … … 1413 1402 char *bufPtr, int toRead)); 1414 1403 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));1419 1404 EXTERN Tcl_RegExp Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp, 1420 1405 char *string)); … … 1485 1470 char *part1, char *part2, char *newValue, 1486 1471 int flags)); 1487 EXTERN char * Tcl_SignalId _ANSI_ARGS_((int sig));1488 EXTERN char * Tcl_SignalMsg _ANSI_ARGS_((int sig));1489 1472 EXTERN void Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp)); 1490 1473 EXTERN int Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp, -
modules/AngularSmearing.cc
rd870fc5 rd77b51d 100 100 { 101 101 Candidate *candidate, *mother; 102 Double_t pt, eta, phi ;102 Double_t pt, eta, phi, e; 103 103 104 104 fItInputArray->Reset(); … … 110 110 phi = candidatePosition.Phi(); 111 111 pt = candidateMomentum.Pt(); 112 e = candidateMomentum.E(); 112 113 113 114 // apply smearing formula for eta,phi 114 115 115 eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta ));116 phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta ));116 eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta, phi, e)); 117 phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta, phi, e)); 117 118 118 119 if(pt <= 0.0) continue; -
modules/BTagging.cc
rd870fc5 rd77b51d 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 … … 34 34 #include "classes/DelphesFormula.h" 35 35 36 #include "ExRootAnalysis/ExRootResult.h"37 #include "ExRootAnalysis/ExRootFilter.h"38 #include "ExRootAnalysis/ExRootClassifier.h"39 40 36 #include "TMath.h" 41 37 #include "TString.h" … … 46 42 #include "TLorentzVector.h" 47 43 48 #include <algorithm> 44 #include <algorithm> 49 45 #include <stdexcept> 50 46 #include <iostream> … … 55 51 //------------------------------------------------------------------------------ 56 52 57 class BTaggingPartonClassifier : public ExRootClassifier 53 BTagging::BTagging() : 54 fItJetInputArray(0) 58 55 { 59 public:60 61 BTaggingPartonClassifier() {}62 63 Int_t GetCategory(TObject *object);64 65 Double_t fEtaMax, fPTMin;66 };67 68 //------------------------------------------------------------------------------69 70 Int_t BTaggingPartonClassifier::GetCategory(TObject *object)71 {72 Candidate *parton = static_cast<Candidate*>(object);73 const TLorentzVector &momentum = parton->Momentum;74 Int_t pdgCode;75 76 if(momentum.Pt() <= fPTMin || TMath::Abs(momentum.Eta()) > fEtaMax) return -1;77 78 pdgCode = TMath::Abs(parton->PID);79 if(pdgCode != 21 && pdgCode > 5) return -1;80 81 return 0;82 }83 84 //------------------------------------------------------------------------------85 86 BTagging::BTagging() :87 fClassifier(0), fFilter(0),88 fItPartonInputArray(0), fItJetInputArray(0)89 {90 fClassifier = new BTaggingPartonClassifier;91 56 } 92 57 … … 95 60 BTagging::~BTagging() 96 61 { 97 if(fClassifier) delete fClassifier;98 62 } 99 63 … … 109 73 fBitNumber = GetInt("BitNumber", 0); 110 74 111 fDeltaR = GetDouble("DeltaR", 0.5);112 113 fClassifier->fPTMin = GetDouble("PartonPTMin", 1.0);114 fClassifier->fEtaMax = GetDouble("PartonEtaMax", 2.5);115 116 75 // read efficiency formulas 117 76 param = GetParam("EfficiencyFormula"); 118 77 size = param.GetSize(); 119 78 120 79 fEfficiencyMap.clear(); 121 80 for(i = 0; i < size/2; ++i) … … 139 98 // import input array(s) 140 99 141 fPartonInputArray = ImportArray(GetString("PartonInputArray", "Delphes/partons"));142 fItPartonInputArray = fPartonInputArray->MakeIterator();143 144 fFilter = new ExRootFilter(fPartonInputArray);145 146 100 fJetInputArray = ImportArray(GetString("JetInputArray", "FastJetFinder/jets")); 147 101 fItJetInputArray = fJetInputArray->MakeIterator(); … … 155 109 DelphesFormula *formula; 156 110 157 if(fFilter) delete fFilter;158 111 if(fItJetInputArray) delete fItJetInputArray; 159 if(fItPartonInputArray) delete fItPartonInputArray;160 112 161 113 for(itEfficiencyMap = fEfficiencyMap.begin(); itEfficiencyMap != fEfficiencyMap.end(); ++itEfficiencyMap) … … 170 122 void BTagging::Process() 171 123 { 172 Candidate *jet, *parton; 173 Double_t pt, eta, phi; 174 TObjArray *partonArray; 124 Candidate *jet; 125 Double_t pt, eta, phi, e; 175 126 map< Int_t, DelphesFormula * >::iterator itEfficiencyMap; 176 127 DelphesFormula *formula; 177 Int_t pdgCode, pdgCodeMax;178 128 179 // select quark and gluons180 fFilter->Reset();181 partonArray = fFilter->GetSubArray(fClassifier, 0);182 183 if(partonArray == 0) return;184 185 TIter itPartonArray(partonArray);186 187 129 // loop over all input jets 188 130 fItJetInputArray->Reset(); … … 190 132 { 191 133 const TLorentzVector &jetMomentum = jet->Momentum; 192 pdgCodeMax = -1;193 134 eta = jetMomentum.Eta(); 194 135 phi = jetMomentum.Phi(); 195 136 pt = jetMomentum.Pt(); 137 e = jetMomentum.E(); 196 138 197 // loop over all input partons 198 itPartonArray.Reset(); 199 while((parton = static_cast<Candidate*>(itPartonArray.Next()))) 200 { 201 pdgCode = TMath::Abs(parton->PID); 202 if(pdgCode == 21) pdgCode = 0; 203 if(jetMomentum.DeltaR(parton->Momentum) <= fDeltaR) 204 { 205 if(pdgCodeMax < pdgCode) pdgCodeMax = pdgCode; 206 } 207 } 208 if(pdgCodeMax == 0) pdgCodeMax = 21; 209 if(pdgCodeMax == -1) pdgCodeMax = 0; 210 211 // find an efficency formula 212 itEfficiencyMap = fEfficiencyMap.find(pdgCodeMax); 139 // find an efficiency formula 140 itEfficiencyMap = fEfficiencyMap.find(jet->Flavor); 213 141 if(itEfficiencyMap == fEfficiencyMap.end()) 214 142 { … … 217 145 formula = itEfficiencyMap->second; 218 146 219 // apply an efficency formula 220 jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta)) << fBitNumber; 147 // apply an efficiency formula 148 jet->BTag |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber; 149 150 // find an efficiency formula for algo flavor definition 151 itEfficiencyMap = fEfficiencyMap.find(jet->FlavorAlgo); 152 if(itEfficiencyMap == fEfficiencyMap.end()) 153 { 154 itEfficiencyMap = fEfficiencyMap.find(0); 155 } 156 formula = itEfficiencyMap->second; 157 158 // apply an efficiency formula 159 jet->BTagAlgo |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber; 160 161 // find an efficiency formula for phys flavor definition 162 itEfficiencyMap = fEfficiencyMap.find(jet->FlavorPhys); 163 if(itEfficiencyMap == fEfficiencyMap.end()) 164 { 165 itEfficiencyMap = fEfficiencyMap.find(0); 166 } 167 formula = itEfficiencyMap->second; 168 169 // apply an efficiency formula 170 jet->BTagPhys |= (gRandom->Uniform() <= formula->Eval(pt, eta, phi, e)) << fBitNumber; 221 171 } 222 172 } -
modules/BTagging.h
rd870fc5 rd77b51d 37 37 class DelphesFormula; 38 38 39 class ExRootFilter;40 class BTaggingPartonClassifier;41 42 39 class BTagging: public DelphesModule 43 40 { … … 55 52 Int_t fBitNumber; 56 53 57 Double_t fDeltaR;58 59 54 #if !defined(__CINT__) && !defined(__CLING__) 60 55 std::map< Int_t, DelphesFormula * > fEfficiencyMap; //! 61 56 #endif 62 57 63 BTaggingPartonClassifier *fClassifier; //!64 65 ExRootFilter *fFilter;66 67 TIterator *fItPartonInputArray; //!68 69 58 TIterator *fItJetInputArray; //! 70 71 const TObjArray *fPartonInputArray; //!72 59 73 60 const TObjArray *fJetInputArray; //! -
modules/CMakeLists.txt
rd870fc5 rd77b51d 7 7 file(GLOB sources *.cc) 8 8 file(GLOB headers *.h) 9 list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/FastJetLinkDef.h) 9 10 list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/ModulesLinkDef.h) 10 11 list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/Pythia8LinkDef.h) 11 12 13 DELPHES_GENERATE_DICTIONARY(FastJetDict ${headers} LINKDEF FastJetLinkDef.h) 12 14 DELPHES_GENERATE_DICTIONARY(ModulesDict ${headers} LINKDEF ModulesLinkDef.h) 13 15 … … 15 17 list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/PileUpMergerPythia8.cc) 16 18 17 add_library(modules OBJECT ${sources} ModulesDict.cxx)19 add_library(modules OBJECT ${sources} FastJetDict.cxx ModulesDict.cxx) -
modules/Calorimeter.cc
rd870fc5 rd77b51d 142 142 } 143 143 144 /* 145 TFractionMap::iterator itFractionMap; 146 for(itFractionMap = fFractionMap.begin(); itFractionMap != fFractionMap.end(); ++itFractionMap) 147 { 148 cout << itFractionMap->first << " " << itFractionMap->second.first << " " << itFractionMap->second.second << endl; 149 } 150 */ 144 // read min E value for timing measurement in ECAL 145 fTimingEnergyMin = GetDouble("TimingEnergyMin",4.); 146 // For timing 147 // So far this flag needs to be false 148 // Curved extrapolation not supported 149 fElectronsFromTrack = false; 151 150 152 151 // read min E value for towers to be saved … … 158 157 159 158 // switch on or off the dithering of the center of calorimeter towers 160 f DitherTowerCenter = GetBool("DitherTowerCenter", true);159 fSmearTowerCenter = GetBool("SmearTowerCenter", true); 161 160 162 161 // read resolution formulas … … 356 355 fTrackHCalEnergy = 0.0; 357 356 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 367 357 fTowerTrackHits = 0; 368 358 fTowerPhotonHits = 0; … … 380 370 position = track->Position; 381 371 382 383 372 ecalEnergy = momentum.E() * fTrackECalFractions[number]; 384 373 hcalEnergy = momentum.E() * fTrackHCalFractions[number]; … … 387 376 fTrackHCalEnergy += hcalEnergy; 388 377 389 fTrackECalTime += TMath::Sqrt(ecalEnergy)*position.T(); 390 fTrackHCalTime += TMath::Sqrt(hcalEnergy)*position.T(); 391 392 fTrackECalTimeWeight += TMath::Sqrt(ecalEnergy); 393 fTrackHCalTimeWeight += TMath::Sqrt(hcalEnergy); 378 if(ecalEnergy > fTimingEnergyMin && fTower) 379 { 380 if(fElectronsFromTrack) 381 { 382 fTower->ECalEnergyTimePairs.push_back(make_pair<Float_t, Float_t>(ecalEnergy, track->Position.T())); 383 } 384 } 394 385 395 386 fTowerTrackArray->Add(track); … … 412 403 fTowerHCalEnergy += hcalEnergy; 413 404 414 fTowerECalTime += TMath::Sqrt(ecalEnergy)*position.T(); 415 fTowerHCalTime += TMath::Sqrt(hcalEnergy)*position.T(); 416 417 fTowerECalTimeWeight += TMath::Sqrt(ecalEnergy); 418 fTowerHCalTimeWeight += TMath::Sqrt(hcalEnergy); 419 405 if(ecalEnergy > fTimingEnergyMin && fTower) 406 { 407 if (abs(particle->PID) != 11 || !fElectronsFromTrack) 408 { 409 fTower->ECalEnergyTimePairs.push_back(make_pair<Float_t, Float_t>(ecalEnergy, particle->Position.T())); 410 } 411 } 420 412 421 413 fTower->AddCandidate(particle); … … 434 426 Double_t ecalEnergy, hcalEnergy; 435 427 Double_t ecalSigma, hcalSigma; 436 Double_t ecalTime, hcalTime, time;428 Float_t weight, sumWeightedTime, sumWeight; 437 429 438 430 if(!fTower) return; … … 444 436 hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma); 445 437 446 ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerECalTime/fTowerECalTimeWeight;447 hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerHCalTime/fTowerHCalTimeWeight;448 449 438 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy); 450 439 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy); … … 454 443 455 444 energy = ecalEnergy + hcalEnergy; 456 time = (TMath::Sqrt(ecalEnergy)*ecalTime + TMath::Sqrt(hcalEnergy)*hcalTime)/(TMath::Sqrt(ecalEnergy) + TMath::Sqrt(hcalEnergy)); 457 458 if(fDitherTowerCenter) 445 446 if(fSmearTowerCenter) 459 447 { 460 448 eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]); … … 469 457 pt = energy / TMath::CosH(eta); 470 458 471 fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time); 459 // Time calculation for tower 460 fTower->NTimeHits = 0; 461 sumWeightedTime = 0.0; 462 sumWeight = 0.0; 463 464 for(size_t i = 0; i < fTower->ECalEnergyTimePairs.size(); ++i) 465 { 466 weight = TMath::Sqrt(fTower->ECalEnergyTimePairs[i].first); 467 sumWeightedTime += weight * fTower->ECalEnergyTimePairs[i].second; 468 sumWeight += weight; 469 fTower->NTimeHits++; 470 } 471 472 if(sumWeight > 0.0) 473 { 474 fTower->Position.SetPtEtaPhiE(1.0, eta, phi, sumWeightedTime/sumWeight); 475 } 476 else 477 { 478 fTower->Position.SetPtEtaPhiE(1.0, eta, phi, 999999.9); 479 } 480 481 472 482 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 473 483 fTower->Eem = ecalEnergy; -
modules/Calorimeter.h
rd870fc5 rd77b51d 60 60 Double_t fTrackECalEnergy, fTrackHCalEnergy; 61 61 62 Double_t fTowerECalTime, fTowerHCalTime; 63 Double_t fTrackECalTime, fTrackHCalTime; 64 65 Double_t fTowerECalTimeWeight, fTowerHCalTimeWeight; 66 Double_t fTrackECalTimeWeight, fTrackHCalTimeWeight; 62 Double_t fTimingEnergyMin; 63 Bool_t fElectronsFromTrack; 67 64 68 65 Int_t fTowerTrackHits, fTowerPhotonHits; … … 74 71 Double_t fHCalEnergySignificanceMin; 75 72 76 Bool_t f DitherTowerCenter;73 Bool_t fSmearTowerCenter; 77 74 78 75 TFractionMap fFractionMap; //! -
modules/Efficiency.cc
rd870fc5 rd77b51d 96 96 { 97 97 Candidate *candidate; 98 Double_t pt, eta, phi ;98 Double_t pt, eta, phi, e; 99 99 100 100 fItInputArray->Reset(); … … 106 106 phi = candidatePosition.Phi(); 107 107 pt = candidateMomentum.Pt(); 108 e = candidateMomentum.E(); 108 109 109 110 // apply an efficency formula 110 if(gRandom->Uniform() > fFormula->Eval(pt, eta )) continue;111 if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e)) continue; 111 112 112 113 fOutputArray->Add(candidate); -
modules/EnergyScale.cc
rd870fc5 rd77b51d 104 104 momentum = candidate->Momentum; 105 105 106 scale = fFormula->Eval(momentum.Pt(), momentum.Eta() );106 scale = fFormula->Eval(momentum.Pt(), momentum.Eta(), momentum.Phi(), momentum.E()); 107 107 108 108 if(scale > 0.0) momentum *= scale; -
modules/EnergySmearing.cc
rd870fc5 rd77b51d 96 96 { 97 97 Candidate *candidate, *mother; 98 Double_t energy, eta, phi;98 Double_t pt, 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(); 105 107 eta = candidatePosition.Eta(); 106 108 phi = candidatePosition.Phi(); … … 108 110 109 111 // apply smearing formula 110 energy = gRandom->Gaus(energy, fFormula->Eval( 0.0, eta, 0.0, energy));112 energy = gRandom->Gaus(energy, fFormula->Eval(pt, eta, phi, energy)); 111 113 112 114 if(energy <= 0.0) continue; -
modules/FastJetFinder.cc
rd870fc5 rd77b51d 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 68 72 using namespace std; 69 73 using namespace fastjet; … … 92 96 JetDefinition::Plugin *plugin = 0; 93 97 JetDefinition::Recombiner *recomb = 0; 94 NjettinessPlugin *njetPlugin = 0; 95 96 // read eta ranges 97 98 ExRootConfParam param = GetParam("RhoEtaRange"); 98 ExRootConfParam param; 99 99 Long_t i, size; 100 101 fEtaRangeMap.clear(); 102 size = param.GetSize(); 103 for(i = 0; i < size/2; ++i) 104 { 105 fEtaRangeMap[param[i*2].GetDouble()] = param[i*2 + 1].GetDouble(); 106 } 100 Double_t etaMin, etaMax; 101 TEstimatorStruct estimatorStruct; 107 102 108 103 // define algorithm … … 130 125 fN = GetInt("N", 2); // used only if Njettiness is used as jet clustering algo (case 8) 131 126 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 132 149 // --- Jet Area Parameters --- 133 150 fAreaAlgorithm = GetInt("AreaAlgorithm", 0); … … 197 214 break; 198 215 case 8: 199 njetPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff);200 fDefinition = new JetDefinition( njetPlugin);216 fNjettinessPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff); 217 fDefinition = new JetDefinition(fNjettinessPlugin); 201 218 break; 202 219 } … … 204 221 fPlugin = plugin; 205 222 fRecomb = recomb; 206 fNjettinessPlugin = njetPlugin;207 223 208 224 ClusterSequence::print_banner(); 225 226 if(fComputeRho && fAreaDefinition) 227 { 228 // read eta ranges 229 230 param = GetParam("RhoEtaRange"); 231 size = param.GetSize(); 232 233 fEstimators.clear(); 234 for(i = 0; i < size/2; ++i) 235 { 236 etaMin = param[i*2].GetDouble(); 237 etaMax = param[i*2 + 1].GetDouble(); 238 estimatorStruct.estimator = new JetMedianBackgroundEstimator(SelectorEtaRange(etaMin, etaMax), *fDefinition, *fAreaDefinition); 239 estimatorStruct.etaMin = etaMin; 240 estimatorStruct.etaMax = etaMax; 241 fEstimators.push_back(estimatorStruct); 242 } 243 } 209 244 210 245 // import input array … … 223 258 void FastJetFinder::Finish() 224 259 { 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 225 267 if(fItInputArray) delete fItInputArray; 226 268 if(fDefinition) delete fDefinition; … … 241 283 Double_t time, timeWeight; 242 284 Int_t number; 285 Int_t charge; 243 286 Double_t rho = 0.0; 244 287 PseudoJet jet, area; 245 vector<PseudoJet> inputList, outputList;246 288 ClusterSequence *sequence; 247 map< Double_t, Double_t >::iterator itEtaRangeMap; 289 vector< PseudoJet > inputList, outputList, subjets; 290 vector< PseudoJet >::iterator itInputList, itOutputList; 291 vector< TEstimatorStruct >::iterator itEstimators; 248 292 249 293 DelphesFactory *factory = GetFactory(); … … 276 320 if(fComputeRho && fAreaDefinition) 277 321 { 278 for(itEtaRangeMap = fEtaRangeMap.begin(); itEtaRangeMap != fEtaRangeMap.end(); ++itEtaRangeMap) 279 { 280 Selector select_rapidity = SelectorAbsRapRange(itEtaRangeMap->first, itEtaRangeMap->second); 281 JetMedianBackgroundEstimator estimator(select_rapidity, *fDefinition, *fAreaDefinition); 282 estimator.set_particles(inputList); 283 rho = estimator.rho(); 322 for(itEstimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators) 323 { 324 itEstimators->estimator->set_particles(inputList); 325 rho = itEstimators->estimator->rho(); 284 326 285 327 candidate = factory->NewCandidate(); 286 328 candidate->Momentum.SetPtEtaPhiE(rho, 0.0, 0.0, rho); 287 candidate->Edges[0] = itE taRangeMap->first;288 candidate->Edges[1] = itE taRangeMap->second;329 candidate->Edges[0] = itEstimators->etaMin; 330 candidate->Edges[1] = itEstimators->etaMax; 289 331 fRhoOutputArray->Add(candidate); 290 332 } … … 298 340 detaMax = 0.0; 299 341 dphiMax = 0.0; 300 vector<PseudoJet>::iterator itInputList, itOutputList;301 342 for(itOutputList = outputList.begin(); itOutputList != outputList.end(); ++itOutputList) 302 343 { … … 314 355 timeWeight = 0.0; 315 356 357 charge = 0; 358 316 359 inputList.clear(); 317 360 inputList = sequence->constituents(*itOutputList); … … 319 362 for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList) 320 363 { 364 if(itInputList->user_index() < 0) continue; 321 365 constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index())); 322 366 … … 329 373 timeWeight += TMath::Sqrt(constituent->Momentum.E()); 330 374 375 charge += constituent->Charge; 376 331 377 candidate->AddCandidate(constituent); 332 378 } … … 338 384 candidate->DeltaEta = detaMax; 339 385 candidate->DeltaPhi = dphiMax; 340 386 candidate->Charge = charge; 387 //------------------------------------ 388 // Trimming 389 //------------------------------------ 390 391 if(fComputeTrimming) 392 { 393 394 fastjet::Filter trimmer(fastjet::JetDefinition(fastjet::kt_algorithm,fRTrim),fastjet::SelectorPtFractionMin(fPtFracTrim)); 395 fastjet::PseudoJet trimmed_jet = trimmer(*itOutputList); 396 397 trimmed_jet = join(trimmed_jet.constituents()); 398 399 candidate->TrimmedP4[0].SetPtEtaPhiM(trimmed_jet.pt(), trimmed_jet.eta(), trimmed_jet.phi(), trimmed_jet.m()); 400 401 // four hardest subjets 402 subjets.clear(); 403 subjets = trimmed_jet.pieces(); 404 subjets = sorted_by_pt(subjets); 405 406 candidate->NSubJetsTrimmed = subjets.size(); 407 408 for (size_t i = 0; i < subjets.size() and i < 4; i++){ 409 if(subjets.at(i).pt() < 0) continue ; 410 candidate->TrimmedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m()); 411 } 412 } 413 414 415 //------------------------------------ 416 // Pruning 417 //------------------------------------ 418 419 420 if(fComputePruning) 421 { 422 423 fastjet::Pruner pruner(fastjet::JetDefinition(fastjet::cambridge_algorithm,fRPrun),fZcutPrun,fRcutPrun); 424 fastjet::PseudoJet pruned_jet = pruner(*itOutputList); 425 426 candidate->PrunedP4[0].SetPtEtaPhiM(pruned_jet.pt(), pruned_jet.eta(), pruned_jet.phi(), pruned_jet.m()); 427 428 // four hardest subjet 429 subjets.clear(); 430 subjets = pruned_jet.pieces(); 431 subjets = sorted_by_pt(subjets); 432 433 candidate->NSubJetsPruned = subjets.size(); 434 435 for (size_t i = 0; i < subjets.size() and i < 4; i++){ 436 if(subjets.at(i).pt() < 0) continue ; 437 candidate->PrunedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m()); 438 } 439 440 } 441 442 //------------------------------------ 443 // SoftDrop 444 //------------------------------------ 445 446 if(fComputeSoftDrop) 447 { 448 449 contrib::SoftDrop softDrop(fBetaSoftDrop,fSymmetryCutSoftDrop,fR0SoftDrop); 450 fastjet::PseudoJet softdrop_jet = softDrop(*itOutputList); 451 452 candidate->SoftDroppedP4[0].SetPtEtaPhiM(softdrop_jet.pt(), softdrop_jet.eta(), softdrop_jet.phi(), softdrop_jet.m()); 453 454 // four hardest subjet 455 456 subjets.clear(); 457 subjets = softdrop_jet.pieces(); 458 subjets = sorted_by_pt(subjets); 459 candidate->NSubJetsSoftDropped = softdrop_jet.pieces().size(); 460 461 for (size_t i = 0; i < subjets.size() and i < 4; i++){ 462 if(subjets.at(i).pt() < 0) continue ; 463 candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m()); 464 } 465 } 466 341 467 // --- compute N-subjettiness with N = 1,2,3,4,5 ---- 342 468 … … 377 503 } 378 504 379 380 505 fOutputArray->Add(candidate); 381 506 } -
modules/FastJetFinder.h
rd870fc5 rd77b51d 30 30 #include "classes/DelphesModule.h" 31 31 32 #include < map>32 #include <vector> 33 33 34 34 class TObjArray; … … 38 38 class JetDefinition; 39 39 class AreaDefinition; 40 class Selector;40 class JetMedianBackgroundEstimator; 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 85 105 // --- FastJet Area method -------- 86 106 … … 100 120 Double_t fEffectiveRfact; 101 121 102 std::map< Double_t, Double_t > fEtaRangeMap; //! 122 #if !defined(__CINT__) && !defined(__CLING__) 123 struct TEstimatorStruct 124 { 125 fastjet::JetMedianBackgroundEstimator *estimator; 126 Double_t etaMin, etaMax; 127 }; 128 129 std::vector< TEstimatorStruct > fEstimators; //! 130 #endif 103 131 104 132 TIterator *fItInputArray; //! -
modules/FastJetLinkDef.h
rd870fc5 rd77b51d 28 28 #include "modules/FastJetFinder.h" 29 29 #include "modules/FastJetGridMedianEstimator.h" 30 #include "modules/RunPUPPI.h" 30 31 31 32 #ifdef __CINT__ … … 37 38 #pragma link C++ class FastJetFinder+; 38 39 #pragma link C++ class FastJetGridMedianEstimator+; 40 #pragma link C++ class RunPUPPI+; 39 41 40 42 #endif -
modules/IdentificationMap.cc
rd870fc5 rd77b51d 69 69 void IdentificationMap::Init() 70 70 { 71 // read efficiency formula72 73 74 71 TMisIDMap::iterator itEfficiencyMap; 75 72 ExRootConfParam param; … … 87 84 formula->Compile(param[i*3 + 2].GetString()); 88 85 pdg = param[i*3].GetInt(); 89 fEfficiencyMap.insert(make_pair(pdg,make_pair(param[i*3 + 1].GetInt(),formula))); 90 91 // cout<<param[i*3].GetInt()<<","<<param[i*3+1].GetInt()<<","<<param[i*3 + 2].GetString()<<endl; 92 86 fEfficiencyMap.insert(make_pair(pdg, make_pair(param[i*3 + 1].GetInt(), formula))); 93 87 } 94 88 … … 100 94 formula->Compile("1.0"); 101 95 102 fEfficiencyMap.insert(make_pair(0, make_pair(0,formula)));96 fEfficiencyMap.insert(make_pair(0, make_pair(0, formula))); 103 97 } 104 98 … … 126 120 if(formula) delete formula; 127 121 } 128 129 122 } 130 123 … … 134 127 { 135 128 Candidate *candidate; 136 Double_t pt, eta, phi ;129 Double_t pt, eta, phi, e; 137 130 TMisIDMap::iterator itEfficiencyMap; 138 131 pair <TMisIDMap::iterator, TMisIDMap::iterator> range; 139 132 DelphesFormula *formula; 140 Int_t pdg In, pdgOut, charge;133 Int_t pdgCodeIn, pdgCodeOut, charge; 141 134 142 Double_t P, Pi; 143 144 // cout<<"------------ New Event ------------"<<endl; 135 Double_t p, r, total; 145 136 146 137 fItInputArray->Reset(); … … 152 143 phi = candidatePosition.Phi(); 153 144 pt = candidateMomentum.Pt(); 154 pdgIn = candidate->PID; 145 e = candidateMomentum.E(); 146 147 pdgCodeIn = candidate->PID; 155 148 charge = candidate->Charge; 156 149 157 // cout<<"------------ New Candidate ------------"<<endl;158 // cout<<candidate->PID<<" "<<pt<<","<<eta<<","<<phi<<endl;150 // first check that PID of this particle is specified in the map 151 // otherwise, look for PID = 0 159 152 160 P = 1.0;153 itEfficiencyMap = fEfficiencyMap.find(pdgCodeIn); 161 154 162 //first check that PID of this particle is specified in cfg, if not set look for PID=0 163 164 itEfficiencyMap = fEfficiencyMap.find(pdgIn); 165 166 range = fEfficiencyMap.equal_range(pdgIn); 167 if(range.first == range.second) range = fEfficiencyMap.equal_range(-pdgIn); 155 range = fEfficiencyMap.equal_range(pdgCodeIn); 156 if(range.first == range.second) range = fEfficiencyMap.equal_range(-pdgCodeIn); 168 157 if(range.first == range.second) range = fEfficiencyMap.equal_range(0); 169 158 170 //loop over submap for this pid 171 for (TMisIDMap::iterator it=range.first; it!=range.second; ++it) 159 r = gRandom->Uniform(); 160 total = 0.0; 161 162 // loop over sub-map for this PID 163 for(TMisIDMap::iterator it = range.first; it != range.second; ++it) 172 164 { 165 formula = (it->second).second; 166 pdgCodeOut = (it->second).first; 173 167 174 formula = (it->second).second; 175 pdgOut = (it->second).first; 168 p = formula->Eval(pt, eta, phi, e); 176 169 177 Pi = formula->Eval(pt, eta); 178 179 // check that sum of probabilities does not exceed 1. 180 P = (P - Pi)/P; 181 182 if( P < 0.0 ) continue; 183 else 170 if(total <= r && r < total + p) 184 171 { 185 186 //randomly assign a PID to particle according to map 187 Double_t rndm = gRandom->Uniform(); 188 189 if(rndm > P) 190 { 191 //change PID of particle 192 if(pdgOut != 0) candidate->PID = charge*pdgOut; 193 fOutputArray->Add(candidate); 194 break; 195 } 172 // change PID of particle 173 if(pdgCodeOut != 0) candidate->PID = charge*pdgCodeOut; 174 fOutputArray->Add(candidate); 175 break; 196 176 } 197 177 178 total += p; 198 179 } 199 200 } 201 180 } 202 181 } 203 182 -
modules/IdentificationMap.h
rd870fc5 rd77b51d 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
rd870fc5 rd77b51d 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 ;99 Double_t pt, eta, px, py, phi, e; 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 112 115 px = candidateMomentum.Px(); 113 116 py = candidateMomentum.Py(); … … 119 122 120 123 // calculate smeared values 121 sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta ));122 sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta ));123 sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta ));124 sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 125 sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 126 sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 124 127 125 128 xd += sx; … … 130 133 dxy = (xd*py - yd*px)/pt; 131 134 132 ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta ));135 ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 133 136 134 137 // fill smeared values in candidate -
modules/Isolation.cc
rd870fc5 rd77b51d 25 25 * the transverse momenta fraction within (PTRatioMin, PTRatioMax]. 26 26 * 27 * \author P. Demin - UCL, Louvain-la-Neuve27 * \author P. Demin, M. Selvaggi, R. Gerosa - UCL, Louvain-la-Neuve 28 28 * 29 29 */ … … 153 153 Candidate *candidate, *isolation, *object; 154 154 TObjArray *isolationArray; 155 Double_t sum , ratio;155 Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr; 156 156 Int_t counter; 157 157 Double_t eta = 0.0; 158 158 Double_t rho = 0.0; 159 160 if(fRhoInputArray && fRhoInputArray->GetEntriesFast() > 0)161 {162 candidate = static_cast<Candidate*>(fRhoInputArray->At(0));163 rho = candidate->Momentum.Pt();164 }165 159 166 160 // select isolation objects … … 178 172 const TLorentzVector &candidateMomentum = candidate->Momentum; 179 173 eta = TMath::Abs(candidateMomentum.Eta()); 180 181 // loop over all input tracks182 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 }196 174 197 175 // find rho … … 209 187 } 210 188 211 // correct sum for pile-up contamination 212 sum = sum - rho*fDeltaRMax*fDeltaRMax*TMath::Pi(); 213 214 ratio = sum/candidateMomentum.Pt(); 215 if((fUsePTSum && sum > fPTSumMax) || ratio > fPTRatioMax) continue; 216 189 // loop over all input tracks 190 191 sumNeutral = 0.0; 192 sumCharged = 0.0; 193 sumChargedPU = 0.0; 194 sumAllParticles = 0.0; 195 196 counter = 0; 197 itIsolationArray.Reset(); 198 199 while((isolation = static_cast<Candidate*>(itIsolationArray.Next()))) 200 { 201 const TLorentzVector &isolationMomentum = isolation->Momentum; 202 203 if(candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax && 204 candidate->GetUniqueID() != isolation->GetUniqueID()) 205 { 206 sumAllParticles += isolationMomentum.Pt(); 207 if(isolation->Charge !=0) 208 { 209 sumCharged += isolationMomentum.Pt(); 210 if(isolation->IsRecoPU != 0) sumChargedPU += isolationMomentum.Pt(); 211 } 212 else 213 { 214 sumNeutral += isolationMomentum.Pt(); 215 } 216 ++counter; 217 } 218 } 219 220 // find rho 221 rho = 0.0; 222 if(fRhoInputArray) 223 { 224 fItRhoInputArray->Reset(); 225 while((object = static_cast<Candidate*>(fItRhoInputArray->Next()))) 226 { 227 if(eta >= object->Edges[0] && eta < object->Edges[1]) 228 { 229 rho = object->Momentum.Pt(); 230 } 231 } 232 } 233 234 // correct sum for pile-up contamination 235 sumDBeta = sumCharged + TMath::Max(sumNeutral-0.5*sumChargedPU,0.0); 236 sumRhoCorr = sumCharged + TMath::Max(sumNeutral-TMath::Max(rho,0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(),0.0); 237 ratioDBeta = sumDBeta/candidateMomentum.Pt(); 238 ratioRhoCorr = sumRhoCorr/candidateMomentum.Pt(); 239 240 candidate->IsolationVar = ratioDBeta; 241 candidate->IsolationVarRhoCorr = ratioRhoCorr; 242 candidate->SumPtCharged = sumCharged; 243 candidate->SumPtNeutral = sumNeutral; 244 candidate->SumPtChargedPU = sumChargedPU; 245 candidate->SumPt = sumAllParticles; 246 247 if((fUsePTSum && sumDBeta > fPTSumMax) || (!fUsePTSum && ratioDBeta > fPTRatioMax)) continue; 217 248 fOutputArray->Add(candidate); 218 249 } -
modules/JetPileUpSubtractor.cc
rd870fc5 rd77b51d 109 109 momentum = candidate->Momentum; 110 110 area = candidate->Area; 111 eta = TMath::Abs(momentum.Eta());111 eta = momentum.Eta(); 112 112 113 113 // find rho -
modules/ModulesLinkDef.h
rd870fc5 rd77b51d 29 29 30 30 #include "modules/AngularSmearing.h" 31 #include "modules/PhotonConversions.h" 31 32 #include "modules/ParticlePropagator.h" 32 33 #include "modules/Efficiency.h" … … 50 51 #include "modules/JetPileUpSubtractor.h" 51 52 #include "modules/TrackPileUpSubtractor.h" 53 #include "modules/TaggingParticlesSkimmer.h" 52 54 #include "modules/PileUpJetID.h" 53 55 #include "modules/ConstituentFilter.h" … … 57 59 #include "modules/Weighter.h" 58 60 #include "modules/Hector.h" 61 #include "modules/JetFlavorAssociation.h" 62 #include "modules/JetFakeParticle.h" 59 63 #include "modules/ExampleModule.h" 60 64 … … 68 72 69 73 #pragma link C++ class AngularSmearing+; 74 #pragma link C++ class PhotonConversions+; 70 75 #pragma link C++ class ParticlePropagator+; 71 76 #pragma link C++ class Efficiency+; … … 89 94 #pragma link C++ class JetPileUpSubtractor+; 90 95 #pragma link C++ class TrackPileUpSubtractor+; 96 #pragma link C++ class TaggingParticlesSkimmer+; 91 97 #pragma link C++ class PileUpJetID+; 92 98 #pragma link C++ class ConstituentFilter+; … … 96 102 #pragma link C++ class Weighter+; 97 103 #pragma link C++ class Hector+; 104 #pragma link C++ class JetFlavorAssociation+; 105 #pragma link C++ class JetFakeParticle+; 98 106 #pragma link C++ class ExampleModule+; 99 107 -
modules/MomentumSmearing.cc
rd870fc5 rd77b51d 96 96 { 97 97 Candidate *candidate, *mother; 98 Double_t pt, eta, phi ;98 Double_t pt, eta, phi, e; 99 99 100 100 fItInputArray->Reset(); … … 106 106 phi = candidatePosition.Phi(); 107 107 pt = candidateMomentum.Pt(); 108 e = candidateMomentum.E(); 108 109 109 110 // apply smearing formula 110 pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta ) * pt);111 pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt); 111 112 112 113 if(pt <= 0.0) continue; -
modules/PdgCodeFilter.cc
rd870fc5 rd77b51d 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 76 81 // import input array 77 82 fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles")); … … 109 114 Double_t pt; 110 115 116 const Bool_t requireStatus = fRequireStatus; 117 const Bool_t invertPdg = fInvertPdg; 118 const int reqStatus = fStatus; 119 111 120 fItInputArray->Reset(); 112 121 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) … … 116 125 pt = candidateMomentum.Pt(); 117 126 127 if(pt < fPTMin) continue; 128 if(requireStatus && (candidate->Status != reqStatus)) continue; 129 118 130 pass = kTRUE; 119 120 if(pt < fPTMin) pass = kFALSE;121 131 if(find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE; 122 132 133 if (invertPdg) pass = !pass; 123 134 if(pass) fOutputArray->Add(candidate); 124 135 } -
modules/PdgCodeFilter.h
rd870fc5 rd77b51d 50 50 51 51 Double_t fPTMin; //! 52 Bool_t fInvertPdg; //! 53 Bool_t fRequireStatus; //! 54 Int_t fStatus; //! 52 55 53 56 std::vector<Int_t> fPdgCodes; -
modules/PileUpJetID.cc
rd870fc5 rd77b51d 1 /*2 * Delphes: a framework for fast simulation of a generic collider experiment3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium4 *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.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.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/>.17 */18 19 1 20 2 /** \class PileUpJetID 21 3 * 22 * CMS PileUp Jet ID Variables , based on http://cds.cern.ch/record/15815834 * CMS PileUp Jet ID Variables 23 5 * 24 * \author S. Zenz , December 20136 * \author S. Zenz 25 7 * 26 8 */ … … 41 23 #include "TRandom3.h" 42 24 #include "TObjArray.h" 43 #include "TDatabasePDG.h"25 //#include "TDatabasePDG.h" 44 26 #include "TLorentzVector.h" 45 27 … … 54 36 55 37 PileUpJetID::PileUpJetID() : 56 fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0) ,fItVertexInputArray(0)38 fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0) 57 39 { 58 40 … … 70 52 void PileUpJetID::Init() 71 53 { 54 72 55 fJetPTMin = GetDouble("JetPTMin", 20.0); 73 56 fParameterR = GetDouble("ParameterR", 0.5); 74 57 fUseConstituents = GetInt("UseConstituents", 0); 75 58 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 76 67 fAverageEachTower = false; // for timing 77 68 … … 81 72 fItJetInputArray = fJetInputArray->MakeIterator(); 82 73 83 fTrackInputArray = ImportArray(GetString("TrackInputArray", " Calorimeter/eflowTracks"));74 fTrackInputArray = ImportArray(GetString("TrackInputArray", "ParticlePropagator/tracks")); 84 75 fItTrackInputArray = fTrackInputArray->MakeIterator(); 85 76 86 fNeutralInputArray = ImportArray(GetString("NeutralInputArray", " Calorimeter/eflowTowers"));77 fNeutralInputArray = ImportArray(GetString("NeutralInputArray", "ParticlePropagator/tracks")); 87 78 fItNeutralInputArray = fNeutralInputArray->MakeIterator(); 88 79 89 fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices"));90 fItVertexInputArray = fVertexInputArray->MakeIterator();91 92 fZVertexResolution = GetDouble("ZVertexResolution", 0.005)*1.0E3;93 94 80 // create output array(s) 95 81 96 82 fOutputArray = ExportArray(GetString("OutputArray", "jets")); 83 84 fNeutralsInPassingJets = ExportArray(GetString("NeutralsInPassingJets","eflowtowers")); 85 97 86 } 98 87 … … 101 90 void PileUpJetID::Finish() 102 91 { 92 // cout << "In finish" << endl; 93 103 94 if(fItJetInputArray) delete fItJetInputArray; 104 95 if(fItTrackInputArray) delete fItTrackInputArray; 105 96 if(fItNeutralInputArray) delete fItNeutralInputArray; 106 if(fItVertexInputArray) delete fItVertexInputArray; 97 107 98 } 108 99 … … 113 104 Candidate *candidate, *constituent; 114 105 TLorentzVector momentum, area; 115 Int_t i, nc, nn; 116 Double_t sumpt, sumptch, sumptchpv, sumptchpu, sumdrsqptsq, sumptsq; 117 Double_t dr, pt, pt_ann[5]; 118 Double_t zvtx = 0.0; 119 120 Candidate *track; 121 122 // find z position of primary vertex 123 124 fItVertexInputArray->Reset(); 125 while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next()))) 126 { 127 if(!candidate->IsPU) 128 { 129 zvtx = candidate->Position.Z(); 130 break; 131 } 132 } 106 107 Candidate *trk; 133 108 134 109 // loop over all input candidates … … 139 114 area = candidate->Area; 140 115 141 sumpt = 0.0; 142 sumptch = 0.0; 143 sumptchpv = 0.0; 144 sumptchpu = 0.0; 145 sumdrsqptsq = 0.0; 146 sumptsq = 0.0; 147 nc = 0; 148 nn = 0; 149 150 for(i = 0; i < 5; ++i) 151 { 152 pt_ann[i] = 0.0; 153 } 154 155 if(fUseConstituents) 156 { 116 float sumT0 = 0.; 117 float sumT1 = 0.; 118 float sumT10 = 0.; 119 float sumT20 = 0.; 120 float sumT30 = 0.; 121 float sumT40 = 0.; 122 float sumWeightsForT = 0.; 123 candidate->NTimeHits = 0; 124 125 float sumpt = 0.; 126 float sumptch = 0.; 127 float sumptchpv = 0.; 128 float sumptchpu = 0.; 129 float sumdrsqptsq = 0.; 130 float sumptsq = 0.; 131 int nc = 0; 132 int nn = 0; 133 float pt_ann[5]; 134 135 for (int i = 0 ; i < 5 ; i++) { 136 pt_ann[i] = 0.; 137 } 138 139 if (fUseConstituents) { 157 140 TIter itConstituents(candidate->GetCandidates()); 158 while((constituent = static_cast<Candidate*>(itConstituents.Next()))) 159 { 160 pt = constituent->Momentum.Pt(); 161 dr = candidate->Momentum.DeltaR(constituent->Momentum); 162 sumpt += pt; 163 sumdrsqptsq += dr*dr*pt*pt; 164 sumptsq += pt*pt; 165 if(constituent->Charge == 0) 166 { 167 // neutrals 168 ++nn; 169 } 170 else 171 { 172 // charged 173 if(constituent->IsPU && TMath::Abs(constituent->Position.Z()-zvtx) > fZVertexResolution) 174 { 175 sumptchpu += pt; 176 } 177 else 178 { 179 sumptchpv += pt; 180 } 181 sumptch += pt; 182 ++nc; 183 } 184 for(i = 0; i < 5; ++i) 185 { 186 if(dr > 0.1*i && dr < 0.1*(i + 1)) 187 { 188 pt_ann[i] += pt; 189 } 190 } 191 } 192 } 193 else 194 { 141 while((constituent = static_cast<Candidate*>(itConstituents.Next()))) { 142 float pt = constituent->Momentum.Pt(); 143 float dr = candidate->Momentum.DeltaR(constituent->Momentum); 144 // cout << " There exists a constituent with dr=" << dr << endl; 145 sumpt += pt; 146 sumdrsqptsq += dr*dr*pt*pt; 147 sumptsq += pt*pt; 148 if (constituent->Charge == 0) { 149 nn++; 150 } else { 151 if (constituent->IsRecoPU) { 152 sumptchpu += pt; 153 } else { 154 sumptchpv += pt; 155 } 156 sumptch += pt; 157 nc++; 158 } 159 for (int i = 0 ; i < 5 ; i++) { 160 if (dr > 0.1*i && dr < 0.1*(i+1)) { 161 pt_ann[i] += pt; 162 } 163 } 164 float tow_sumT = 0; 165 float tow_sumW = 0; 166 for (int i = 0 ; i < constituent->ECalEnergyTimePairs.size() ; i++) { 167 float w = TMath::Sqrt(constituent->ECalEnergyTimePairs[i].first); 168 if (fAverageEachTower) { 169 tow_sumT += w*constituent->ECalEnergyTimePairs[i].second; 170 tow_sumW += w; 171 } else { 172 sumT0 += w*constituent->ECalEnergyTimePairs[i].second; 173 sumT1 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.001); 174 sumT10 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.010); 175 sumT20 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.020); 176 sumT30 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.030); 177 sumT40 += w*gRandom->Gaus(constituent->ECalEnergyTimePairs[i].second,0.040); 178 sumWeightsForT += w; 179 candidate->NTimeHits++; 180 } 181 } 182 if (fAverageEachTower && tow_sumW > 0.) { 183 sumT0 += tow_sumT; 184 sumT1 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.001); 185 sumT10 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.0010); 186 sumT20 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.0020); 187 sumT30 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.0030); 188 sumT40 += tow_sumW*gRandom->Gaus(tow_sumT/tow_sumW,0.0040); 189 sumWeightsForT += tow_sumW; 190 candidate->NTimeHits++; 191 } 192 } 193 } else { 195 194 // Not using constituents, using dr 196 195 fItTrackInputArray->Reset(); 197 while((track = static_cast<Candidate*>(fItTrackInputArray->Next()))) 198 { 199 if(track->Momentum.DeltaR(candidate->Momentum) < fParameterR) 200 { 201 pt = track->Momentum.Pt(); 202 sumpt += pt; 203 sumptch += pt; 204 if(track->IsPU && TMath::Abs(track->Position.Z()-zvtx) > fZVertexResolution) 205 { 206 sumptchpu += pt; 207 } 208 else 209 { 210 sumptchpv += pt; 211 } 212 dr = candidate->Momentum.DeltaR(track->Momentum); 213 sumdrsqptsq += dr*dr*pt*pt; 214 sumptsq += pt*pt; 215 nc++; 216 for(i = 0; i < 5; ++i) 217 { 218 if(dr > 0.1*i && dr < 0.1*(i + 1)) 219 { 220 pt_ann[i] += pt; 221 } 222 } 223 } 224 } 225 196 while ((trk = static_cast<Candidate*>(fItTrackInputArray->Next()))) { 197 if (trk->Momentum.DeltaR(candidate->Momentum) < fParameterR) { 198 float pt = trk->Momentum.Pt(); 199 sumpt += pt; 200 sumptch += pt; 201 if (trk->IsRecoPU) { 202 sumptchpu += pt; 203 } else { 204 sumptchpv += pt; 205 } 206 float dr = candidate->Momentum.DeltaR(trk->Momentum); 207 sumdrsqptsq += dr*dr*pt*pt; 208 sumptsq += pt*pt; 209 nc++; 210 for (int i = 0 ; i < 5 ; i++) { 211 if (dr > 0.1*i && dr < 0.1*(i+1)) { 212 pt_ann[i] += pt; 213 } 214 } 215 } 216 } 226 217 fItNeutralInputArray->Reset(); 227 while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next()))) 228 { 229 if(constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR) 230 { 231 pt = constituent->Momentum.Pt(); 232 sumpt += pt; 233 dr = candidate->Momentum.DeltaR(constituent->Momentum); 234 sumdrsqptsq += dr*dr*pt*pt; 235 sumptsq += pt*pt; 236 nn++; 237 for(i = 0; i < 5; ++i) 238 { 239 if(dr > 0.1*i && dr < 0.1*(i + 1)) 240 { 241 pt_ann[i] += pt; 242 } 243 } 244 } 245 } 246 } 247 248 if(sumptch > 0.0) 249 { 250 candidate->Beta = sumptchpu/sumptch; 251 candidate->BetaStar = sumptchpv/sumptch; 252 } 253 else 254 { 255 candidate->Beta = -999.0; 256 candidate->BetaStar = -999.0; 257 } 258 if(sumptsq > 0.0) 259 { 218 while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next()))) { 219 if (constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR) { 220 float pt = constituent->Momentum.Pt(); 221 sumpt += pt; 222 float dr = candidate->Momentum.DeltaR(constituent->Momentum); 223 sumdrsqptsq += dr*dr*pt*pt; 224 sumptsq += pt*pt; 225 nn++; 226 for (int i = 0 ; i < 5 ; i++) { 227 if (dr > 0.1*i && dr < 0.1*(i+1)) { 228 pt_ann[i] += pt; 229 } 230 } 231 } 232 } 233 } 234 235 if (sumptch > 0.) { 236 candidate->Beta = sumptchpv/sumptch; 237 candidate->BetaStar = sumptchpu/sumptch; 238 } else { 239 candidate->Beta = -999.; 240 candidate->BetaStar = -999.; 241 } 242 if (sumptsq > 0.) { 260 243 candidate->MeanSqDeltaR = sumdrsqptsq/sumptsq; 261 } 262 else 263 { 264 candidate->MeanSqDeltaR = -999.0; 244 } else { 245 candidate->MeanSqDeltaR = -999.; 265 246 } 266 247 candidate->NCharged = nc; 267 248 candidate->NNeutrals = nn; 268 if(sumpt > 0.0) 269 { 249 if (sumpt > 0.) { 270 250 candidate->PTD = TMath::Sqrt(sumptsq) / sumpt; 271 for(i = 0; i < 5; ++i) 272 { 251 for (int i = 0 ; i < 5 ; i++) { 273 252 candidate->FracPt[i] = pt_ann[i]/sumpt; 274 253 } 275 } 276 else 277 { 278 candidate->PTD = -999.0; 279 for(i = 0; i < 5; ++i) 280 { 281 candidate->FracPt[i] = -999.0; 254 } else { 255 candidate->PTD = -999.; 256 for (int i = 0 ; i < 5 ; i++) { 257 candidate->FracPt[i] = -999.; 282 258 } 283 259 } 284 260 285 261 fOutputArray->Add(candidate); 262 263 // New stuff 264 /* 265 fMeanSqDeltaRMaxBarrel = GetDouble("MeanSqDeltaRMaxBarrel",0.1); 266 fBetaMinBarrel = GetDouble("BetaMinBarrel",0.1); 267 fMeanSqDeltaRMaxEndcap = GetDouble("MeanSqDeltaRMaxEndcap",0.1); 268 fBetaMinEndcap = GetDouble("BetaMinEndcap",0.1); 269 fMeanSqDeltaRMaxForward = GetDouble("MeanSqDeltaRMaxForward",0.1); 270 */ 271 272 bool passId = false; 273 if (candidate->Momentum.Pt() > fJetPTMinForNeutrals && candidate->MeanSqDeltaR > -0.1) { 274 if (fabs(candidate->Momentum.Eta())<1.5) { 275 passId = ((candidate->Beta > fBetaMinBarrel) && (candidate->MeanSqDeltaR < fMeanSqDeltaRMaxBarrel)); 276 } else if (fabs(candidate->Momentum.Eta())<4.0) { 277 passId = ((candidate->Beta > fBetaMinEndcap) && (candidate->MeanSqDeltaR < fMeanSqDeltaRMaxEndcap)); 278 } else { 279 passId = (candidate->MeanSqDeltaR < fMeanSqDeltaRMaxForward); 280 } 281 } 282 283 // cout << " Pt Eta MeanSqDeltaR Beta PassId " << candidate->Momentum.Pt() 284 // << " " << candidate->Momentum.Eta() << " " << candidate->MeanSqDeltaR << " " << candidate->Beta << " " << passId << endl; 285 286 if (passId) { 287 if (fUseConstituents) { 288 TIter itConstituents(candidate->GetCandidates()); 289 while((constituent = static_cast<Candidate*>(itConstituents.Next()))) { 290 if (constituent->Charge == 0 && constituent->Momentum.Pt() > fNeutralPTMin) { 291 fNeutralsInPassingJets->Add(constituent); 292 // cout << " Constitutent added Pt Eta Charge " << constituent->Momentum.Pt() << " " << constituent->Momentum.Eta() << " " << constituent->Charge << endl; 293 } 294 } 295 } else { // use DeltaR 296 fItNeutralInputArray->Reset(); 297 while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next()))) { 298 if (constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR && constituent->Momentum.Pt() > fNeutralPTMin) { 299 fNeutralsInPassingJets->Add(constituent); 300 // cout << " Constitutent added Pt Eta Charge " << constituent->Momentum.Pt() << " " << constituent->Momentum.Eta() << " " << constituent->Charge << endl; 301 } 302 } 303 } 304 } 305 306 286 307 } 287 308 } 288 309 289 310 //------------------------------------------------------------------------------ 290 -
modules/PileUpJetID.h
rd870fc5 rd77b51d 1 /*2 * Delphes: a framework for fast simulation of a generic collider experiment3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium4 *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.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.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/>.17 */18 19 1 #ifndef PileUpJetID_h 20 2 #define PileUpJetID_h … … 22 4 /** \class PileUpJetID 23 5 * 24 * CMS PileUp Jet ID Variables , based on http://cds.cern.ch/record/15815836 * CMS PileUp Jet ID Variables 25 7 * 26 * \author S. Zenz , December 20138 * \author S. Zenz 27 9 * 28 10 */ … … 34 16 35 17 class TObjArray; 18 class DelphesFormula; 36 19 37 20 class PileUpJetID: public DelphesModule … … 51 34 Double_t fParameterR; 52 35 36 Double_t fMeanSqDeltaRMaxBarrel; // |eta| < 1.5 37 Double_t fBetaMinBarrel; // |eta| < 2.5 38 Double_t fMeanSqDeltaRMaxEndcap; // 1.5 < |eta| < 4.0 39 Double_t fBetaMinEndcap; // 1.5 < |eta| < 4.0 40 Double_t fMeanSqDeltaRMaxForward; // |eta| > 4.0 41 42 Double_t fNeutralPTMin; 43 Double_t fJetPTMinForNeutrals; 44 45 /* 46 JAY 47 --- 48 49 |Eta|<1.5 50 51 meanSqDeltaR betaStar SigEff BgdEff 52 0.13 0.92 96% 8% 53 0.13 0.95 97% 16% 54 0.13 0.97 98% 27% 55 56 |Eta|>1.5 57 58 meanSqDeltaR betaStar SigEff BgdEff 59 0.14 0.91 95% 15% 60 0.14 0.94 97% 19% 61 0.14 0.97 98% 29% 62 63 BRYAN 64 ----- 65 66 Barrel (MeanSqDR, Beta, sig eff, bg eff): 67 0.10, 0.08, 90%, 8% 68 0.11, 0.12, 90%, 6% 69 0.13, 0.16, 89%, 5% 70 71 Endcap (MeanSqDR, Beta, sig eff, bg eff): 72 0.07, 0.06, 89%, 4% 73 0.08, 0.08, 92%, 6% 74 0.09, 0.08, 95%, 10% 75 0.10, 0.08, 97%, 13% 76 77 SETH GUESSES FOR |eta| > 4.0 78 ---------------------------- 79 80 MeanSqDeltaR 81 0.07 82 0.10 83 0.14 84 0.2 85 */ 86 53 87 // If set to true, may have weird results for PFCHS 54 88 // If set to false, uses everything within dR < fParameterR even if in other jets &c. 55 89 // Results should be very similar for PF 56 Int_t fUseConstituents; 90 Int_t fUseConstituents; 57 91 58 92 Bool_t fAverageEachTower; … … 62 96 const TObjArray *fJetInputArray; //! 63 97 64 const TObjArray *fTrackInputArray; // !65 const TObjArray *fNeutralInputArray; //!98 const TObjArray *fTrackInputArray; // SCZ 99 const TObjArray *fNeutralInputArray; 66 100 67 TIterator *fItTrackInputArray; // !68 TIterator *fItNeutralInputArray; // !101 TIterator *fItTrackInputArray; // SCZ 102 TIterator *fItNeutralInputArray; // SCZ 69 103 70 104 TObjArray *fOutputArray; //! 105 TObjArray *fNeutralsInPassingJets; // SCZ 71 106 72 TIterator *fItVertexInputArray; //!73 const TObjArray *fVertexInputArray; //!74 107 75 Double_t fZVertexResolution; 76 77 ClassDef(PileUpJetID, 1) 108 ClassDef(PileUpJetID, 2) 78 109 }; 79 110 80 111 #endif 81 -
modules/PileUpMerger.cc
rd870fc5 rd77b51d 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 82 87 // read vertex smearing formula 83 88 … … 111 116 TParticlePDG *pdgParticle; 112 117 Int_t pid; 113 Float_t x, y, z, t ;118 Float_t x, y, z, t, vx, vy; 114 119 Float_t px, py, pz, e; 115 120 Double_t dz, dphi, dt; 116 Int_t numberOfEvents, event ;121 Int_t numberOfEvents, event, numberOfParticles; 117 122 Long64_t allEntries, entry; 118 Candidate *candidate, *vertex candidate;123 Candidate *candidate, *vertex; 119 124 DelphesFactory *factory; 120 125 … … 123 128 fItInputArray->Reset(); 124 129 125 // --- Deal with Primary vertex first ------130 // --- Deal with primary vertex first ------ 126 131 127 132 fFunction->GetRandom2(dz, dt); … … 129 134 dt *= c_light*1.0E3; // necessary in order to make t in mm/c 130 135 dz *= 1.0E3; // necessary in order to make z in mm 131 136 vx = 0.0; 137 vy = 0.0; 138 numberOfParticles = fInputArray->GetEntriesFast(); 132 139 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 133 140 { 141 vx += candidate->Position.X(); 142 vy += candidate->Position.Y(); 134 143 z = candidate->Position.Z(); 135 144 t = candidate->Position.T(); … … 139 148 } 140 149 150 if(numberOfParticles > 0) 151 { 152 vx /= numberOfParticles; 153 vy /= numberOfParticles; 154 } 155 141 156 factory = GetFactory(); 142 157 143 vertex candidate= factory->NewCandidate();144 vertex candidate->Position.SetXYZT(0.0, 0.0, dz, dt);145 fVertexOutputArray->Add(vertex candidate);158 vertex = factory->NewCandidate(); 159 vertex->Position.SetXYZT(vx, vy, dz, dt); 160 fVertexOutputArray->Add(vertex); 146 161 147 162 // --- Then with pile-up vertices ------ … … 181 196 dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi()); 182 197 183 vertexcandidate = factory->NewCandidate(); 184 vertexcandidate->Position.SetXYZT(0.0, 0.0, dz, dt); 185 vertexcandidate->IsPU = 1; 186 187 fVertexOutputArray->Add(vertexcandidate); 188 198 vx = 0.0; 199 vy = 0.0; 200 numberOfParticles = 0; 189 201 while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e)) 190 202 { … … 204 216 candidate->Momentum.RotateZ(dphi); 205 217 218 x -= fInputBeamSpotX; 219 y -= fInputBeamSpotY; 206 220 candidate->Position.SetXYZT(x, y, z + dz, t + dt); 207 221 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; 208 227 209 228 fParticleOutputArray->Add(candidate); 210 229 } 211 } 212 } 213 214 //------------------------------------------------------------------------------ 215 230 231 if(numberOfParticles > 0) 232 { 233 vx /= numberOfParticles; 234 vy /= numberOfParticles; 235 } 236 237 vertex = factory->NewCandidate(); 238 vertex->Position.SetXYZT(vx, vy, dz, dt); 239 vertex->IsPU = 1; 240 241 fVertexOutputArray->Add(vertex); 242 } 243 } 244 245 //------------------------------------------------------------------------------ -
modules/PileUpMerger.h
rd870fc5 rd77b51d 53 53 Double_t fTVertexSpread; 54 54 55 Double_t fInputBeamSpotX; 56 Double_t fInputBeamSpotY; 57 Double_t fOutputBeamSpotX; 58 Double_t fOutputBeamSpotY; 59 55 60 DelphesTF2 *fFunction; //! 56 61 -
modules/PileUpMergerPythia8.cc
rd870fc5 rd77b51d 21 21 * Merges particles from pile-up sample into event 22 22 * 23 * \author P. Selvaggi - UCL, Louvain-la-Neuve23 * \author M. 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 Formula.h"31 #include "classes/DelphesTF2.h" 32 32 #include "classes/DelphesPileUpReader.h" 33 33 … … 56 56 57 57 PileUpMergerPythia8::PileUpMergerPythia8() : 58 fPythia(0), fItInputArray(0) 59 { 58 fFunction(0), fPythia(0), fItInputArray(0) 59 { 60 fFunction = new DelphesTF2; 60 61 } 61 62 … … 64 65 PileUpMergerPythia8::~PileUpMergerPythia8() 65 66 { 67 delete fFunction; 66 68 } 67 69 … … 72 74 const char *fileName; 73 75 76 fPileUpDistribution = GetInt("PileUpDistribution", 0); 77 74 78 fMeanPileUp = GetDouble("MeanPileUp", 10); 75 fZVertexSpread = GetDouble("ZVertexSpread", 0.05)*1.0E3; 79 80 fZVertexSpread = GetDouble("ZVertexSpread", 0.15); 81 fTVertexSpread = GetDouble("TVertexSpread", 1.5E-09); 82 83 fInputBeamSpotX = GetDouble("InputBeamSpotX", 0.0); 84 fInputBeamSpotY = GetDouble("InputBeamSpotY", 0.0); 85 fOutputBeamSpotX = GetDouble("OutputBeamSpotX", 0.0); 86 fOutputBeamSpotY = GetDouble("OutputBeamSpotY", 0.0); 76 87 77 88 fPTMin = GetDouble("PTMin", 0.0); 89 90 fFunction->Compile(GetString("VertexDistributionFormula", "0.0")); 91 fFunction->SetRange(-fZVertexSpread, -fTVertexSpread, fZVertexSpread, fTVertexSpread); 78 92 79 93 fileName = GetString("ConfigFile", "MinBias.cmnd"); … … 86 100 87 101 // create output arrays 88 fOutputArray = ExportArray(GetString("OutputArray", "stableParticles")); 102 fParticleOutputArray = ExportArray(GetString("ParticleOutputArray", "stableParticles")); 103 fVertexOutputArray = ExportArray(GetString("VertexOutputArray", "vertices")); 89 104 } 90 105 … … 102 117 TDatabasePDG *pdg = TDatabasePDG::Instance(); 103 118 TParticlePDG *pdgParticle; 104 Int_t pid ;105 Float_t x, y, z, t ;119 Int_t pid, status; 120 Float_t x, y, z, t, vx, vy; 106 121 Float_t px, py, pz, e; 107 Double_t dz, dphi ;108 Int_t poisson, event, i;109 Candidate *candidate ;122 Double_t dz, dphi, dt; 123 Int_t numberOfEvents, event, numberOfParticles, i; 124 Candidate *candidate, *vertex; 110 125 DelphesFactory *factory; 111 126 127 const Double_t c_light = 2.99792458E8; 128 112 129 fItInputArray->Reset(); 130 131 // --- Deal with primary vertex first ------ 132 133 fFunction->GetRandom2(dz, dt); 134 135 dt *= c_light*1.0E3; // necessary in order to make t in mm/c 136 dz *= 1.0E3; // necessary in order to make z in mm 137 vx = 0.0; 138 vy = 0.0; 139 numberOfParticles = fInputArray->GetEntriesFast(); 113 140 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 114 141 { 115 fOutputArray->Add(candidate); 142 vx += candidate->Position.X(); 143 vy += candidate->Position.Y(); 144 z = candidate->Position.Z(); 145 t = candidate->Position.T(); 146 candidate->Position.SetZ(z + dz); 147 candidate->Position.SetT(t + dt); 148 fParticleOutputArray->Add(candidate); 149 } 150 151 if(numberOfParticles > 0) 152 { 153 vx /= numberOfParticles; 154 vy /= numberOfParticles; 116 155 } 117 156 118 157 factory = GetFactory(); 119 158 120 poisson = gRandom->Poisson(fMeanPileUp); 121 122 for(event = 0; event < poisson; ++event) 159 vertex = factory->NewCandidate(); 160 vertex->Position.SetXYZT(vx, vy, dz, dt); 161 fVertexOutputArray->Add(vertex); 162 163 // --- Then with pile-up vertices ------ 164 165 switch(fPileUpDistribution) 166 { 167 case 0: 168 numberOfEvents = gRandom->Poisson(fMeanPileUp); 169 break; 170 case 1: 171 numberOfEvents = gRandom->Integer(2*fMeanPileUp + 1); 172 break; 173 default: 174 numberOfEvents = gRandom->Poisson(fMeanPileUp); 175 break; 176 } 177 178 for(event = 0; event < numberOfEvents; ++event) 123 179 { 124 180 while(!fPythia->next()); 125 181 126 dz = gRandom->Gaus(0.0, fZVertexSpread); 182 // --- Pile-up vertex smearing 183 184 fFunction->GetRandom2(dz, dt); 185 186 dt *= c_light*1.0E3; // necessary in order to make t in mm/c 187 dz *= 1.0E3; // necessary in order to make z in mm 188 127 189 dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi()); 128 190 129 for(i = 1; i < fPythia->event.size(); ++i) 191 vx = 0.0; 192 vy = 0.0; 193 numberOfParticles = fPythia->event.size(); 194 for(i = 1; i < numberOfParticles; ++i) 130 195 { 131 196 Pythia8::Particle &particle = fPythia->event[i]; 132 197 133 if(particle.status() != 1 || !particle.isVisible() || particle.pT() <= fPTMin) continue; 198 status = particle.statusHepMC(); 199 200 if(status != 1 || !particle.isVisible() || particle.pT() <= fPTMin) continue; 134 201 135 202 pid = particle.id(); … … 152 219 candidate->Momentum.RotateZ(dphi); 153 220 154 candidate->Position.SetXYZT(x, y, z + dz, t); 221 x -= fInputBeamSpotX; 222 y -= fInputBeamSpotY; 223 candidate->Position.SetXYZT(x, y, z + dz, t + dt); 155 224 candidate->Position.RotateZ(dphi); 156 157 fOutputArray->Add(candidate); 225 candidate->Position += TLorentzVector(fOutputBeamSpotX, fOutputBeamSpotY, 0.0, 0.0); 226 227 vx += candidate->Position.X(); 228 vy += candidate->Position.Y(); 229 230 fParticleOutputArray->Add(candidate); 158 231 } 159 } 160 } 161 162 //------------------------------------------------------------------------------ 163 232 233 if(numberOfParticles > 0) 234 { 235 vx /= numberOfParticles; 236 vy /= numberOfParticles; 237 } 238 239 vertex = factory->NewCandidate(); 240 vertex->Position.SetXYZT(vx, vy, dz, dt); 241 vertex->IsPU = 1; 242 243 fVertexOutputArray->Add(vertex); 244 } 245 } 246 247 //------------------------------------------------------------------------------ -
modules/PileUpMergerPythia8.h
rd870fc5 rd77b51d 31 31 32 32 class TObjArray; 33 class DelphesTF2; 33 34 34 35 namespace Pythia8 … … 50 51 private: 51 52 53 Int_t fPileUpDistribution; 52 54 Double_t fMeanPileUp; 55 53 56 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 54 64 Double_t fPTMin; 65 66 DelphesTF2 *fFunction; //! 55 67 56 68 Pythia8::Pythia *fPythia; //! … … 60 72 const TObjArray *fInputArray; //! 61 73 62 TObjArray *fOutputArray; //! 74 TObjArray *fParticleOutputArray; //! 75 TObjArray *fVertexOutputArray; //! 63 76 64 77 ClassDef(PileUpMergerPythia8, 1) -
modules/SimpleCalorimeter.cc
rd870fc5 rd77b51d 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 152 155 // switch on or off the dithering of the center of calorimeter towers 153 f DitherTowerCenter = GetBool("DitherTowerCenter", true);156 fSmearTowerCenter = GetBool("SmearTowerCenter", true); 154 157 155 158 // read resolution formulas … … 409 412 if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0; 410 413 411 if(f DitherTowerCenter)414 if(fSmearTowerCenter) 412 415 { 413 416 eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]); … … 424 427 fTower->Position.SetPtEtaPhiE(1.0, eta, phi, time); 425 428 fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 429 430 fTower->Eem = (!fIsEcal) ? 0 : energy; 431 fTower->Ehad = (fIsEcal) ? 0 : energy; 426 432 427 433 fTower->Edges[0] = fTowerEdges[0]; … … 447 453 pt = energy / TMath::CosH(eta); 448 454 455 tower->Eem = (!fIsEcal) ? 0 : energy; 456 tower->Ehad = (fIsEcal) ? 0 : energy; 457 449 458 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 450 459 fEFlowTowerOutputArray->Add(tower); -
modules/SimpleCalorimeter.h
rd870fc5 rd77b51d 1 1 2 /* 2 3 * Delphes: a framework for fast simulation of a generic collider experiment … … 72 73 Double_t fEnergySignificanceMin; 73 74 74 Bool_t fDitherTowerCenter; 75 Bool_t fSmearTowerCenter; 76 77 Bool_t fIsEcal; //! 75 78 76 79 TFractionMap fFractionMap; //! -
modules/TauTagging.cc
rd870fc5 rd77b51d 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"39 35 40 36 #include "TMath.h" … … 53 49 using namespace std; 54 50 55 //------------------------------------------------------------------------------56 57 class TauTaggingPartonClassifier : public ExRootClassifier58 {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 };69 51 70 52 //------------------------------------------------------------------------------ … … 79 61 { 80 62 Candidate *tau = static_cast<Candidate *>(object); 81 Candidate *daughter = 0; 63 Candidate *daughter1 = 0; 64 Candidate *daughter2 = 0; 65 82 66 const TLorentzVector &momentum = tau->Momentum; 83 Int_t pdgCode, i ;67 Int_t pdgCode, i, j; 84 68 85 69 pdgCode = TMath::Abs(tau->PID); … … 90 74 if(tau->D1 < 0) return -1; 91 75 76 if(tau->D2 < tau->D1) return -1; 77 92 78 if(tau->D1 >= fParticleInputArray->GetEntriesFast() || 93 79 tau->D2 >= fParticleInputArray->GetEntriesFast()) … … 98 84 for(i = tau->D1; i <= tau->D2; ++i) 99 85 { 100 daughter = static_cast<Candidate *>(fParticleInputArray->At(i)); 101 pdgCode = TMath::Abs(daughter->PID); 102 if(pdgCode == 11 || pdgCode == 13 || pdgCode == 15 || pdgCode == 24) return -1; 86 daughter1 = static_cast<Candidate *>(fParticleInputArray->At(i)); 87 pdgCode = TMath::Abs(daughter1->PID); 88 if(pdgCode == 11 || pdgCode == 13 || pdgCode == 15) return -1; 89 else if(pdgCode == 24) 90 { 91 if(daughter1->D1 < 0) return -1; 92 for(j = daughter1->D1; j <= daughter1->D2; ++j) 93 { 94 daughter2 = static_cast<Candidate*>(fParticleInputArray->At(j)); 95 pdgCode = TMath::Abs(daughter2->PID); 96 if(pdgCode == 11 || pdgCode == 13) return -1; 97 } 98 99 } 103 100 } 104 101 … … 206 203 tauArray = fFilter->GetSubArray(fClassifier, 0); 207 204 208 if(tauArray == 0) return;209 210 TIter itTauArray(tauArray);211 212 205 // loop over all input jets 213 206 fItJetInputArray->Reset(); … … 222 215 223 216 // loop over all input taus 224 itTauArray.Reset(); 225 while((tau = static_cast<Candidate *>(itTauArray.Next()))) 226 { 227 if(tau->D1 < 0) continue; 228 229 if(tau->D1 >= fParticleInputArray->GetEntriesFast() || 230 tau->D2 >= fParticleInputArray->GetEntriesFast()) 217 if(tauArray){ 218 TIter itTauArray(tauArray); 219 while((tau = static_cast<Candidate *>(itTauArray.Next()))) 231 220 { 232 throw runtime_error("tau's daughter index is greater than the ParticleInputArray size"); 233 } 234 235 tauMomentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0); 236 237 for(i = tau->D1; i <= tau->D2; ++i) 238 { 239 daughter = static_cast<Candidate *>(fParticleInputArray->At(i)); 240 if(TMath::Abs(daughter->PID) == 16) continue; 241 tauMomentum += daughter->Momentum; 242 } 243 244 if(jetMomentum.DeltaR(tauMomentum) <= fDeltaR) 245 { 246 pdgCode = 15; 247 charge = tau->Charge; 221 if(tau->D1 < 0) continue; 222 223 if(tau->D1 >= fParticleInputArray->GetEntriesFast() || 224 tau->D2 >= fParticleInputArray->GetEntriesFast()) 225 { 226 throw runtime_error("tau's daughter index is greater than the ParticleInputArray size"); 227 } 228 229 tauMomentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0); 230 231 for(i = tau->D1; i <= tau->D2; ++i) 232 { 233 daughter = static_cast<Candidate *>(fParticleInputArray->At(i)); 234 if(TMath::Abs(daughter->PID) == 16) continue; 235 tauMomentum += daughter->Momentum; 236 } 237 238 if(jetMomentum.DeltaR(tauMomentum) <= fDeltaR) 239 { 240 pdgCode = 15; 241 charge = tau->Charge; 242 } 248 243 } 249 244 } -
modules/TauTagging.h
rd870fc5 rd77b51d 31 31 32 32 #include "classes/DelphesModule.h" 33 #include "ExRootAnalysis/ExRootResult.h" 34 #include "ExRootAnalysis/ExRootFilter.h" 35 #include "ExRootAnalysis/ExRootClassifier.h" 33 36 34 37 #include <map> … … 76 79 }; 77 80 81 82 //------------------------------------------------------------------------------ 83 84 class TauTaggingPartonClassifier : public ExRootClassifier 85 { 86 public: 87 88 TauTaggingPartonClassifier(const TObjArray *array); 89 90 Int_t GetCategory(TObject *object); 91 92 Double_t fEtaMax, fPTMin; 93 94 const TObjArray *fParticleInputArray; 95 }; 96 97 78 98 #endif -
modules/TrackPileUpSubtractor.cc
rd870fc5 rd77b51d 74 74 fZVertexResolution = GetDouble("ZVertexResolution", 0.005)*1.0E3; 75 75 76 fPTMin = GetDouble("PTMin", 0.); 76 77 // import arrays with output from other modules 77 78 78 79 ExRootConfParam param = GetParam("InputArray"); 79 80 Long_t i, size; … … 147 148 // assume perfect pile-up subtraction for tracks outside fZVertexResolution 148 149 149 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) continue; 150 151 array->Add(candidate); 150 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) candidate->IsRecoPU = 1; 151 else 152 { 153 candidate->IsRecoPU = 0; 154 if( candidate->Momentum.Pt() > fPTMin) array->Add(candidate); 155 } 152 156 } 153 157 } -
modules/TrackPileUpSubtractor.h
rd870fc5 rd77b51d 50 50 Double_t fZVertexResolution; 51 51 52 Double_t fPTMin; 53 52 54 std::map< TIterator *, TObjArray * > fInputMap; //! 53 55 -
modules/TreeWriter.cc
rd870fc5 rd77b51d 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; 364 365 365 366 FillParticles(candidate, &entry->Particles); … … 403 404 entry->T = position.T()*1.0E-3/c_light; 404 405 406 // Isolation variables 407 408 entry->IsolationVar = candidate->IsolationVar; 409 entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ; 410 entry->SumPtCharged = candidate->SumPtCharged ; 411 entry->SumPtNeutral = candidate->SumPtNeutral ; 412 entry->SumPtChargedPU = candidate->SumPtChargedPU ; 413 entry->SumPt = candidate->SumPt ; 414 405 415 entry->EhadOverEem = candidate->Eem > 0.0 ? candidate->Ehad/candidate->Eem : 999.9; 406 416 … … 442 452 entry->T = position.T()*1.0E-3/c_light; 443 453 454 // Isolation variables 455 456 entry->IsolationVar = candidate->IsolationVar; 457 entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ; 458 entry->SumPtCharged = candidate->SumPtCharged ; 459 entry->SumPtNeutral = candidate->SumPtNeutral ; 460 entry->SumPtChargedPU = candidate->SumPtChargedPU ; 461 entry->SumPt = candidate->SumPt ; 462 463 444 464 entry->Charge = candidate->Charge; 445 465 … … 469 489 const TLorentzVector &momentum = candidate->Momentum; 470 490 const TLorentzVector &position = candidate->Position; 471 472 491 473 492 pt = momentum.Pt(); … … 488 507 entry->T = position.T()*1.0E-3/c_light; 489 508 509 // Isolation variables 510 511 entry->IsolationVar = candidate->IsolationVar; 512 entry->IsolationVarRhoCorr = candidate->IsolationVarRhoCorr ; 513 entry->SumPtCharged = candidate->SumPtCharged ; 514 entry->SumPtNeutral = candidate->SumPtNeutral ; 515 entry->SumPtChargedPU = candidate->SumPtChargedPU ; 516 entry->SumPt = candidate->SumPt ; 517 490 518 entry->Charge = candidate->Charge; 491 519 … … 504 532 Double_t ecalEnergy, hcalEnergy; 505 533 const Double_t c_light = 2.99792458E8; 534 Int_t i; 506 535 507 536 array->Sort(); … … 532 561 entry->Mass = momentum.M(); 533 562 563 entry->Area = candidate->Area; 564 534 565 entry->DeltaEta = candidate->DeltaEta; 535 566 entry->DeltaPhi = candidate->DeltaPhi; 536 567 568 entry->Flavor = candidate->Flavor; 569 entry->FlavorAlgo = candidate->FlavorAlgo; 570 entry->FlavorPhys = candidate->FlavorPhys; 571 537 572 entry->BTag = candidate->BTag; 573 574 entry->BTagAlgo = candidate->BTagAlgo; 575 entry->BTagPhys = candidate->BTagPhys; 576 538 577 entry->TauTag = candidate->TauTag; 539 578 … … 561 600 entry->MeanSqDeltaR = candidate->MeanSqDeltaR; 562 601 entry->PTD = candidate->PTD; 563 entry->FracPt[0] = candidate->FracPt[0]; 564 entry->FracPt[1] = candidate->FracPt[1]; 565 entry->FracPt[2] = candidate->FracPt[2]; 566 entry->FracPt[3] = candidate->FracPt[3]; 567 entry->FracPt[4] = candidate->FracPt[4]; 568 569 //--- N-subjettiness variables ---- 570 571 entry->Tau1 = candidate->Tau[0]; 572 entry->Tau2 = candidate->Tau[1]; 573 entry->Tau3 = candidate->Tau[2]; 574 entry->Tau4 = candidate->Tau[3]; 575 entry->Tau5 = candidate->Tau[4]; 576 602 603 //--- Sub-structure variables ---- 604 605 entry->NSubJetsTrimmed = candidate->NSubJetsTrimmed; 606 entry->NSubJetsPruned = candidate->NSubJetsPruned; 607 entry->NSubJetsSoftDropped = candidate->NSubJetsSoftDropped; 608 609 for(i = 0; i < 5; i++) 610 { 611 entry->FracPt[i] = candidate -> FracPt[i]; 612 entry->Tau[i] = candidate -> Tau[i]; 613 entry->TrimmedP4[i] = candidate -> TrimmedP4[i]; 614 entry->PrunedP4[i] = candidate -> PrunedP4[i]; 615 entry->SoftDroppedP4[i] = candidate -> SoftDroppedP4[i]; 616 } 617 577 618 FillParticles(candidate, &entry->Particles); 578 619 } -
modules/UniqueObjectFinder.cc
rd870fc5 rd77b51d 74 74 TIterator *iterator; 75 75 76 fInputMap.clear(); 77 76 78 size = param.GetSize(); 77 79 for(i = 0; i < size/2; ++i) … … 80 82 iterator = array->MakeIterator(); 81 83 82 fInputMap [iterator] = ExportArray(param[i*2 + 1].GetString());84 fInputMap.push_back(make_pair(iterator, ExportArray(param[i*2 + 1].GetString()))); 83 85 } 84 86 } … … 88 90 void UniqueObjectFinder::Finish() 89 91 { 90 map< TIterator *, TObjArray *>::iterator itInputMap;92 vector< pair< TIterator *, TObjArray * > >::iterator itInputMap; 91 93 TIterator *iterator; 92 94 … … 104 106 { 105 107 Candidate *candidate; 106 map< TIterator *, TObjArray *>::iterator itInputMap;108 vector< pair< TIterator *, TObjArray * > >::iterator itInputMap; 107 109 TIterator *iterator; 108 110 TObjArray *array; … … 128 130 //------------------------------------------------------------------------------ 129 131 130 Bool_t UniqueObjectFinder::Unique(Candidate *candidate, map< TIterator *, TObjArray *>::iterator itInputMap)132 Bool_t UniqueObjectFinder::Unique(Candidate *candidate, vector< pair< TIterator *, TObjArray * > >::iterator itInputMap) 131 133 { 132 134 Candidate *previousCandidate; 133 map< TIterator *, TObjArray *>::iterator previousItInputMap;135 vector< pair< TIterator *, TObjArray * > >::iterator previousItInputMap; 134 136 TObjArray *array; 135 137 -
modules/UniqueObjectFinder.h
rd870fc5 rd77b51d 30 30 #include "classes/DelphesModule.h" 31 31 32 #include <map> 32 #include <vector> 33 #include <utility> 33 34 34 35 class TIterator; … … 49 50 private: 50 51 51 Bool_t Unique(Candidate *candidate, std:: map< TIterator *, TObjArray *>::iterator itInputMap);52 Bool_t Unique(Candidate *candidate, std::vector< std::pair< TIterator *, TObjArray * > >::iterator itInputMap); 52 53 53 std:: map< TIterator *, TObjArray *> fInputMap; //!54 std::vector< std::pair< TIterator *, TObjArray * > > fInputMap; //! 54 55 55 56 ClassDef(UniqueObjectFinder, 1) -
readers/DelphesCMSFWLite.cpp
rd870fc5 rd77b51d 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" 58 60 59 61 using namespace std; … … 62 64 63 65 void ConvertInput(fwlite::Event &event, Long64_t eventCounter, 64 ExRootTreeBranch *branchEvent, DelphesFactory *factory,65 TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray,66 TObjArray * partonOutputArray)66 ExRootTreeBranch *branchEvent, ExRootTreeBranch *branchRwgt, 67 DelphesFactory *factory, TObjArray *allParticleOutputArray, 68 TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray) 67 69 { 68 70 fwlite::Handle< GenEventInfoProduct > handleGenEventInfo; 69 71 72 fwlite::Handle< LHEEventProduct > handleLHEEvent; 73 70 74 fwlite::Handle< vector< reco::GenParticle > > handleParticle; 71 75 vector< reco::GenParticle >::const_iterator itParticle; … … 75 79 76 80 handleGenEventInfo.getByLabel(event, "generator"); 81 handleLHEEvent.getByLabel(event, "source"); 77 82 handleParticle.getByLabel(event, "genParticles"); 78 83 79 84 HepMCEvent *element; 85 Weight *weight; 80 86 Candidate *candidate; 81 87 TDatabasePDG *pdg; … … 86 92 Double_t px, py, pz, e, mass; 87 93 Double_t x, y, z; 94 95 const vector< gen::WeightsInfo > &vectorWeightsInfo = handleLHEEvent->weights(); 96 vector< gen::WeightsInfo >::const_iterator itWeightsInfo; 88 97 89 98 element = static_cast<HepMCEvent *>(branchEvent->NewEntry()); … … 108 117 element->ReadTime = 0.0; 109 118 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 } 110 125 111 126 pdg = TDatabasePDG::Instance(); … … 186 201 TStopwatch eventStopWatch; 187 202 ExRootTreeWriter *treeWriter = 0; 188 ExRootTreeBranch *branchEvent = 0 ;203 ExRootTreeBranch *branchEvent = 0, *branchRwgt = 0; 189 204 ExRootConfReader *confReader = 0; 190 205 Delphes *modularDelphes = 0; … … 226 241 227 242 branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class()); 243 branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class()); 228 244 229 245 confReader = new ExRootConfReader; … … 268 284 for(event.toBegin(); !event.atEnd() && !interrupted; ++event) 269 285 { 270 ConvertInput(event, eventCounter, branchEvent, factory,286 ConvertInput(event, eventCounter, branchEvent, branchRwgt, factory, 271 287 allParticleOutputArray, stableParticleOutputArray, partonOutputArray); 272 288 modularDelphes->ProcessTask(); -
readers/DelphesLHEF.cpp
rd870fc5 rd77b51d 63 63 TStopwatch readStopWatch, procStopWatch; 64 64 ExRootTreeWriter *treeWriter = 0; 65 ExRootTreeBranch *branchEvent = 0, *branch Rwgt = 0;65 ExRootTreeBranch *branchEvent = 0, *branchWeight = 0; 66 66 ExRootConfReader *confReader = 0; 67 67 Delphes *modularDelphes = 0; … … 103 103 104 104 branchEvent = treeWriter->NewBranch("Event", LHEFEvent::Class()); 105 branch Rwgt = treeWriter->NewBranch("Rwgt", Weight::Class());105 branchWeight = treeWriter->NewBranch("Weight", Weight::Class()); 106 106 107 107 confReader = new ExRootConfReader; … … 196 196 197 197 reader->AnalyzeEvent(branchEvent, eventCounter, &readStopWatch, &procStopWatch); 198 reader->Analyze Rwgt(branchRwgt);198 reader->AnalyzeWeight(branchWeight); 199 199 200 200 treeWriter->Fill(); -
readers/DelphesPythia8.cpp
rd870fc5 rd77b51d 20 20 #include <iostream> 21 21 #include <sstream> 22 #include <string> 22 23 23 24 #include <signal.h> … … 38 39 #include "classes/DelphesClasses.h" 39 40 #include "classes/DelphesFactory.h" 41 #include "classes/DelphesLHEFReader.h" 40 42 41 43 #include "ExRootAnalysis/ExRootTreeWriter.h" … … 149 151 char appName[] = "DelphesPythia8"; 150 152 stringstream message; 153 FILE *inputFile = 0; 151 154 TFile *outputFile = 0; 152 155 TStopwatch readStopWatch, procStopWatch; 153 156 ExRootTreeWriter *treeWriter = 0; 154 157 ExRootTreeBranch *branchEvent = 0; 158 ExRootTreeBranch *branchEventLHEF = 0, *branchWeightLHEF = 0; 155 159 ExRootConfReader *confReader = 0; 156 160 Delphes *modularDelphes = 0; 157 161 DelphesFactory *factory = 0; 158 162 TObjArray *stableParticleOutputArray = 0, *allParticleOutputArray = 0, *partonOutputArray = 0; 163 TObjArray *stableParticleOutputArrayLHEF = 0, *allParticleOutputArrayLHEF = 0, *partonOutputArrayLHEF = 0; 164 DelphesLHEFReader *reader = 0; 159 165 Long64_t eventCounter, errorCounter; 160 166 Long64_t numberOfEvents, timesAllowErrors; … … 205 211 partonOutputArray = modularDelphes->ExportArray("partons"); 206 212 207 modularDelphes->InitTask(); 208 209 // Initialize pythia 213 // Initialize Pythia 210 214 pythia = new Pythia8::Pythia; 211 215 … … 221 225 numberOfEvents = pythia->mode("Main:numberOfEvents"); 222 226 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(); 223 243 224 244 pythia->init(); … … 234 254 for(eventCounter = 0; eventCounter < numberOfEvents && !interrupted; ++eventCounter) 235 255 { 256 while(reader && reader->ReadBlock(factory, allParticleOutputArrayLHEF, 257 stableParticleOutputArrayLHEF, partonOutputArrayLHEF) && !reader->EventReady()); 258 236 259 if(!pythia->next()) 237 260 { 238 261 // If failure because reached end of file then exit event loop 239 if 262 if(pythia->info.atEndOfFile()) 240 263 { 241 264 cerr << "Aborted since reached end of Les Houches Event File" << endl; … … 244 267 245 268 // First few failures write off as "acceptable" errors, then quit 246 if (++errorCounter < timesAllowErrors) continue; 247 cerr << "Event generation aborted prematurely, owing to error!" << endl; 248 break; 269 if(++errorCounter > timesAllowErrors) 270 { 271 cerr << "Event generation aborted prematurely, owing to error!" << endl; 272 break; 273 } 274 275 modularDelphes->Clear(); 276 reader->Clear(); 277 continue; 249 278 } 250 279 … … 258 287 procStopWatch.Stop(); 259 288 289 if(reader) 290 { 291 reader->AnalyzeEvent(branchEventLHEF, eventCounter, &readStopWatch, &procStopWatch); 292 reader->AnalyzeWeight(branchWeightLHEF); 293 } 294 260 295 treeWriter->Fill(); 261 296 262 297 treeWriter->Clear(); 263 298 modularDelphes->Clear(); 299 if(reader) reader->Clear(); 264 300 265 301 readStopWatch.Start(); … … 277 313 cout << "** Exiting..." << endl; 278 314 315 delete reader; 279 316 delete pythia; 280 317 delete modularDelphes;
Note:
See TracChangeset
for help on using the changeset viewer.