Changeset a9c67b3a in git
- Timestamp:
- Jun 4, 2016, 8:10:24 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 4dd5358
- Parents:
- 3c46e17 (diff), 7b45ff5 (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:
-
- 1 added
- 5 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r3c46e17 ra9c67b3a 1001 1001 endif 1002 1002 1003 tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf): \ 1004 external/PUPPI/puppiCleanContainer.$(SrcSuf) \ 1003 tmp/external/PUPPI/PuppiAlgo.$(ObjSuf): \ 1004 external/PUPPI/PuppiAlgo.$(SrcSuf) \ 1005 external/fastjet/internal/base.hh 1006 tmp/external/PUPPI/PuppiContainer.$(ObjSuf): \ 1007 external/PUPPI/PuppiContainer.$(SrcSuf) \ 1008 external/fastjet/internal/base.hh \ 1005 1009 external/fastjet/Selector.hh 1006 1010 tmp/external/fastjet/AreaDefinition.$(ObjSuf): \ … … 1355 1359 modules/RunPUPPI.$(SrcSuf) \ 1356 1360 modules/RunPUPPI.h \ 1357 external/PUPPI/puppiCleanContainer.hh \ 1358 external/PUPPI/RecoObj.hh \ 1359 external/PUPPI/puppiParticle.hh \ 1360 external/PUPPI/puppiAlgoBin.hh \ 1361 external/PUPPI/RecoObj2.hh \ 1362 external/PUPPI/AlgoObj.hh \ 1361 1363 classes/DelphesClasses.h \ 1362 1364 classes/DelphesFactory.h \ 1363 1365 classes/DelphesFormula.h 1364 1366 FASTJET_OBJ += \ 1365 tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf) \ 1367 tmp/external/PUPPI/PuppiAlgo.$(ObjSuf) \ 1368 tmp/external/PUPPI/PuppiContainer.$(ObjSuf) \ 1366 1369 tmp/external/fastjet/AreaDefinition.$(ObjSuf) \ 1367 1370 tmp/external/fastjet/BasicRandom.$(ObjSuf) \ … … 1792 1795 1793 1796 modules/RunPUPPI.h: \ 1794 classes/DelphesModule.h 1797 classes/DelphesModule.h \ 1798 external/PUPPI/PuppiContainer.hh 1795 1799 @touch $@ 1796 1800 … … 1924 1928 external/fastjet/AreaDefinition.hh \ 1925 1929 external/fastjet/ClusterSequenceAreaBase.hh 1926 @touch $@1927 1928 external/PUPPI/puppiCleanContainer.hh: \1929 external/PUPPI/RecoObj.hh \1930 external/PUPPI/puppiParticle.hh \1931 external/PUPPI/puppiAlgoBin.hh \1932 external/fastjet/internal/base.hh \1933 external/fastjet/PseudoJet.hh1934 1930 @touch $@ 1935 1931 -
cards/CMS_PhaseII/CMS_PhaseII_200PU.tcl
r3c46e17 ra9c67b3a 40 40 EFlowMerger 41 41 42 LeptonFilterNoLep 43 LeptonFilterLep 44 RunPUPPIBase 42 45 RunPUPPI 46 43 47 44 48 PhotonIsolation … … 55 59 56 60 MissingET 61 PuppiMissingET 57 62 GenMissingET 58 63 GenPileUpMissingET … … 91 96 92 97 # pre-generated minbias input file 93 set PileUpFile ../eos/cms/store/group/upgrade/delphes/PhaseII/MinBias_100k.pileup98 set PileUpFile MinBias.pileup 94 99 95 100 # average expected pile up … … 105 110 106 111 #set VertexDistributionFormula {exp(-(t^2/(2*(0.05/2.99792458E8*exp(-(z^2/(2*(0.05)^2))))^2)))} 107 108 109 set VertexDistributionFormula { (abs(t) <= 1.0e-09) * (abs(z) <= 0.15) * (1.00) + 110 (abs(t) > 1.0e-09) * (abs(z) <= 0.15) * (0.00) + 111 (abs(t) <= 1.0e-09) * (abs(z) > 0.15) * (0.00) + 112 (abs(t) > 1.0e-09) * (abs(z) > 0.15) * (0.00)} 112 set VertexDistributionFormula { (abs(t) <= 1.6e-10) * (abs(z) <= 0.053) * (1.00) + 113 (abs(t) > 1.6e-10) * (abs(z) <= 0.053) * (0.00) + 114 (abs(t) <= 1.6e-10) * (abs(z) > 0.053) * (0.00) + 115 (abs(t) > 1.6e-10) * (abs(z) > 0.053) * (0.00)} 113 116 114 117 } … … 547 550 ######################################### 548 551 549 module RunPUPPI RunPUPPI { 552 module PdgCodeFilter LeptonFilterNoLep { 553 set InputArray HCal/eflowTracks 554 set OutputArray eflowTracksNoLeptons 555 set Invert false 556 add PdgCode {13} 557 add PdgCode {-13} 558 add PdgCode {11} 559 add PdgCode {-11} 560 } 561 562 module PdgCodeFilter LeptonFilterLep { 563 set InputArray HCal/eflowTracks 564 set OutputArray eflowTracksLeptons 565 set Invert true 566 add PdgCode {11} 567 add PdgCode {-11} 568 add PdgCode {13} 569 add PdgCode {-13} 570 } 571 572 module RunPUPPI RunPUPPIBase { 550 573 ## input information 551 set TrackInputArray TrackMerger/tracks574 set TrackInputArray LeptonFilterNoLep/eflowTracksNoLeptons 552 575 set NeutralInputArray NeutralEFlowMerger/eflowTowers 553 576 set PVInputArray PileUpMerger/vertices 554 577 set MinPuppiWeight 0.05 555 578 set UseExp false 579 set UseNoLep false 556 580 557 581 ## define puppi algorithm parameters (more than one for the same eta region is possible) 558 add EtaMinBin 0. 2.5 2.5 3.0 3.0 559 add EtaMaxBin 2.5 3.0 3.0 10.0 10.0 560 add PtMinBin 0. 0.5 0.5 0.5 0.5 561 add ConeSizeBin 0.25 0.25 0.25 0.25 0.25 562 add RMSPtMinBin 0.1 0.5 0.5 0.5 0.5 563 add RMSScaleFactorBin 1.0 1.0 1.0 1.0 1.0 564 add NeutralMinEBin 0.2 1.0 1.0 1.5 1.5 565 add NeutralPtSlope 0.02 0.02 0.02 0.02 0.02 566 add ApplyCHS true true true true true 567 add UseCharged true false false false false 568 add ApplyLowPUCorr true true true true true 569 add MetricId 5 5 1 5 1 582 add EtaMinBin 0.0 1.5 4.0 583 add EtaMaxBin 1.5 4.0 10.0 584 add PtMinBin 0.0 0.0 0.0 585 add ConeSizeBin 0.2 0.2 0.2 586 add RMSPtMinBin 0.1 0.5 0.5 587 add RMSScaleFactorBin 1.0 1.0 1.0 588 add NeutralMinEBin 0.2 0.2 0.5 589 add NeutralPtSlope 0.006 0.013 0.067 590 add ApplyCHS true true true 591 add UseCharged true true false 592 add ApplyLowPUCorr true true true 593 add MetricId 5 5 5 594 add CombId 0 0 0 570 595 571 596 ## output name … … 575 600 } 576 601 577 602 module Merger RunPUPPI { 603 add InputArray RunPUPPIBase/PuppiParticles 604 add InputArray LeptonFilterLep/eflowTracksLeptons 605 set OutputArray PuppiParticles 606 } 578 607 579 608 ################### … … 585 614 # add InputArray RunPUPPI/PuppiParticles 586 615 add InputArray EFlowMerger/eflow 616 set MomentumOutputArray momentum 617 } 618 619 module Merger PuppiMissingET { 620 #add InputArray InputArray 621 add InputArray RunPUPPI/PuppiParticles 622 #add InputArray EFlowMerger/eflow 587 623 set MomentumOutputArray momentum 588 624 } … … 971 1007 972 1008 add Branch MissingET/momentum MissingET MissingET 1009 add Branch PuppiMissingET/momentum PuppiMissingET MissingET 973 1010 add Branch GenPileUpMissingET/momentum GenPileUpMissingET MissingET 974 1011 add Branch ScalarHT/energy ScalarHT ScalarHT -
cards/delphes_card_ATLAS.tcl
r3c46e17 ra9c67b3a 141 141 142 142 # resolution formula for charged hadrons 143 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 6^2 + pt^2*1.3e-3^2) +144 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0. 10^2 + pt^2*1.7e-3^2) +145 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0. 25^2 + pt^2*3.1e-3^2)}143 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) + 144 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) + 145 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)} 146 146 } 147 147 … … 157 157 158 158 # resolution formula for electrons 159 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 6^2 + pt^2*1.3e-3^2) +160 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0. 10^2 + pt^2*1.7e-3^2) +161 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0. 25^2 + pt^2*3.1e-3^2)}159 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) + 160 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) + 161 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)} 162 162 } 163 163 … … 171 171 172 172 # set ResolutionFormula {resolution formula as a function of eta and pt} 173 174 173 # resolution formula for muons 175 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 2^2 + pt^2*2.0e-4^2) +176 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.0 3^2 + pt^2*3.0e-4^2) +177 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.0 6^2 + pt^2*6.0e-4^2)}174 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.0e-4^2) + 175 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*1.5e-4^2) + 176 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*3.5e-4^2)} 178 177 } 179 178 -
cards/delphes_card_ATLAS_PileUp.tcl
r3c46e17 ra9c67b3a 182 182 183 183 # resolution formula for charged hadrons 184 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^2 + pt^2*1.3e-3^2) + 185 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.10^2 + pt^2*1.7e-3^2) + 186 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.25^2 + pt^2*3.1e-3^2)} 184 # based on arXiv:1405.6569 185 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) + 186 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) + 187 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)} 187 188 } 188 189 … … 198 199 199 200 # resolution formula for electrons 200 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^2 + pt^2*1.3e-3^2) + 201 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.10^2 + pt^2*1.7e-3^2) + 202 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.25^2 + pt^2*3.1e-3^2)} 201 # based on arXiv:1405.6569 202 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) + 203 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) + 204 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)} 203 205 } 204 206 … … 214 216 215 217 # resolution formula for muons 216 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 2^2 + pt^2*2.0e-4^2) +217 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.0 3^2 + pt^2*3.0e-4^2) +218 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.0 5^2 + pt^2*6.0e-4^2)}218 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.0e-4^2) + 219 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*1.5e-4^2) + 220 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*3.5e-4^2)} 219 221 } 220 222 -
cards/delphes_card_CMS.tcl
r3c46e17 ra9c67b3a 142 142 # resolution formula for charged hadrons 143 143 # based on arXiv:1405.6569 144 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 6^2 + pt^2*1.3e-3^2) +145 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0. 10^2 + pt^2*1.7e-3^2) +146 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0. 25^2 + pt^2*3.1e-3^2)}144 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) + 145 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) + 146 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)} 147 147 } 148 148 … … 159 159 # resolution formula for electrons 160 160 # based on arXiv:1405.6569 161 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 6^2 + pt^2*1.3e-3^2) +162 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0. 10^2 + pt^2*1.7e-3^2) +163 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0. 25^2 + pt^2*3.1e-3^2)}161 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) + 162 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) + 163 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)} 164 164 } 165 165 … … 175 175 176 176 # resolution formula for muons 177 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2* 2.0e-4^2) +178 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.0 2^2 + pt^2*3.0e-4^2) +179 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.0 5^2 + pt^2*6.0e-4^2)}177 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.0e-4^2) + 178 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*1.5e-4^2) + 179 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*3.5e-4^2)} 180 180 } 181 181 -
cards/delphes_card_CMS_PileUp.tcl
r3c46e17 ra9c67b3a 184 184 # resolution formula for charged hadrons 185 185 # based on arXiv:1405.6569 186 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 6^2 + pt^2*1.3e-3^2) +187 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0. 10^2 + pt^2*1.7e-3^2) +188 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0. 25^2 + pt^2*3.1e-3^2)}186 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) + 187 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) + 188 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)} 189 189 } 190 190 … … 201 201 # resolution formula for electrons 202 202 # based on arXiv:1405.6569 203 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 6^2 + pt^2*1.3e-3^2) +204 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0. 10^2 + pt^2*1.7e-3^2) +205 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0. 25^2 + pt^2*3.1e-3^2)}203 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) + 204 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) + 205 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)} 206 206 } 207 207 … … 217 217 218 218 # resolution formula for muons 219 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2* 2.0e-4^2) +220 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.0 2^2 + pt^2*3.0e-4^2) +221 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.0 5^2 + pt^2*6.0e-4^2)}219 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.0e-4^2) + 220 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*1.5e-4^2) + 221 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*3.5e-4^2)} 222 222 } 223 223 -
modules/RunPUPPI.cc
r3c46e17 ra9c67b3a 1 1 #include "modules/RunPUPPI.h" 2 2 3 #include "PUPPI/ puppiCleanContainer.hh"4 #include "PUPPI/ RecoObj.hh"5 #include "PUPPI/puppiParticle.hh"6 #include "PUPPI/puppiAlgoBin.hh"3 #include "PUPPI/RecoObj2.hh" 4 #include "PUPPI/AlgoObj.hh" 5 //#include "PUPPI/puppiParticle.hh" 6 //#include "PUPPI/puppiAlgoBin.hh" 7 7 8 8 #include "classes/DelphesClasses.h" … … 30 30 31 31 void RunPUPPI::Init(){ 32 33 32 // input collection 34 33 fTrackInputArray = ImportArray(GetString("TrackInputArray", "Calorimeter/towers")); … … 38 37 fPVInputArray = ImportArray(GetString("PVInputArray", "PV")); 39 38 fPVItInputArray = fPVInputArray->MakeIterator(); 40 41 42 // puppi parameters 39 // puppi parameters 40 fApplyNoLep = GetBool("UseNoLep", true); 43 41 fMinPuppiWeight = GetDouble("MinPuppiWeight", 0.01); 44 42 fUseExp = GetBool("UseExp", false); 45 46 // read eta min ranges 43 // read eta min ranges 47 44 ExRootConfParam param = GetParam("EtaMinBin"); 48 45 fEtaMinBin.clear(); 49 46 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fEtaMinBin.push_back(param[iMap].GetDouble()); 50 51 // read eta max ranges 47 // read eta max ranges 52 48 param = GetParam("EtaMaxBin"); 53 49 fEtaMaxBin.clear(); 54 50 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fEtaMaxBin.push_back(param[iMap].GetDouble()); 55 56 // read pt min value 51 // read pt min value 57 52 param = GetParam("PtMinBin"); 58 53 fPtMinBin.clear(); 59 54 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fPtMinBin.push_back(param[iMap].GetDouble()); 60 61 55 // read cone size 62 56 param = GetParam("ConeSizeBin"); 63 57 fConeSizeBin.clear(); 64 58 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fConeSizeBin.push_back(param[iMap].GetDouble()); 65 66 59 // read RMS min pt 67 60 param = GetParam("RMSPtMinBin"); 68 61 fRMSPtMinBin.clear(); 69 62 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fRMSPtMinBin.push_back(param[iMap].GetDouble()); 70 71 // read RMS scale factor 63 // read RMS scale factor 72 64 param = GetParam("RMSScaleFactorBin"); 73 65 fRMSScaleFactorBin.clear(); 74 66 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fRMSScaleFactorBin.push_back(param[iMap].GetDouble()); 75 76 // read neutral pt min cut 67 // read neutral pt min cut 77 68 param = GetParam("NeutralMinEBin"); 78 69 fNeutralMinEBin.clear(); 79 70 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fNeutralMinEBin.push_back(param[iMap].GetDouble()); 80 81 // read neutral pt min slope 71 // read neutral pt min slope 82 72 param = GetParam("NeutralPtSlope"); 83 73 fNeutralPtSlope.clear(); 84 74 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fNeutralPtSlope.push_back(param[iMap].GetDouble()); 85 86 75 // read apply chs 87 param = GetParam("ApplyCHS"); 88 fApplyCHS.clear(); 89 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fApplyCHS.push_back(param[iMap].GetBool()); 90 91 // read use charged 76 //param = GetParam("ApplyCHS"); 77 //fApplyCHS.clear(); 78 //for(int iMap = 0; iMap < param.GetSize(); ++iMap) fApplyCHS.push_back(param[iMap].GetBool()); 79 // read use charged 92 80 param = GetParam("UseCharged"); 93 81 fUseCharged.clear(); 94 82 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fUseCharged.push_back(param[iMap].GetBool()); 95 96 // read apply chs correction 83 // read apply chs correction 97 84 param = GetParam("ApplyLowPUCorr"); 98 85 fApplyLowPUCorr.clear(); 99 86 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fApplyLowPUCorr.push_back(param[iMap].GetBool()); 100 101 87 // read metric id 102 88 param = GetParam("MetricId"); 103 89 fMetricId.clear(); 104 90 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fMetricId.push_back(param[iMap].GetInt()); 105 91 // scheme for combining 92 param = GetParam("CombId"); 93 fCombId.clear(); 94 for(int iMap = 0; iMap < param.GetSize(); ++iMap) fCombId.push_back(param[iMap].GetInt()); 106 95 // create output array 107 96 fOutputArray = ExportArray(GetString("OutputArray", "puppiParticles")); 108 97 fOutputTrackArray = ExportArray(GetString("OutputArrayTracks", "puppiTracks")); 109 98 fOutputNeutralArray = ExportArray(GetString("OutputArrayNeutrals", "puppiNeutrals")); 99 // Create algorithm list for puppi 100 std::vector<AlgoObj> puppiAlgo; 101 if(puppiAlgo.empty()){ 102 if(!(fEtaMinBin.size() == fEtaMaxBin.size() and fEtaMinBin.size() == fPtMinBin.size() and fEtaMinBin.size() == fConeSizeBin.size() and fEtaMinBin.size() == fRMSPtMinBin.size() 103 and fEtaMinBin.size() == fRMSScaleFactorBin.size() and fEtaMinBin.size() == fNeutralMinEBin.size() and fEtaMinBin.size() == fNeutralPtSlope.size() 104 and fEtaMinBin.size() == fUseCharged.size() 105 and fEtaMinBin.size() == fApplyLowPUCorr.size() and fEtaMinBin.size() == fMetricId.size())) { 106 std::cerr<<" Error in PUPPI configuration, algo info should have the same size --> exit from the code"<<std::endl; 107 std::exit(EXIT_FAILURE); 108 } 109 } 110 for( size_t iAlgo = 0 ; iAlgo < fEtaMinBin.size() ; iAlgo++){ 111 AlgoObj algoTmp ; 112 algoTmp.etaMin = fEtaMinBin.at(iAlgo); 113 algoTmp.etaMax = fEtaMaxBin.at(iAlgo); 114 algoTmp.ptMin = fPtMinBin.at(iAlgo); 115 algoTmp.minNeutralPt = fNeutralMinEBin.at(iAlgo); 116 algoTmp.minNeutralPtSlope = fNeutralPtSlope.at(iAlgo); 117 //Eta Extrapolation stuff is missing 118 //Loop through file requiring algos for same bins to be adjacent 119 while(iAlgo < fEtaMinBin.size() and algoTmp.etaMin == fEtaMinBin.at(iAlgo) and algoTmp.etaMax == fEtaMaxBin.at(iAlgo)) { 120 AlgoSubObj algoSubTmp; 121 algoSubTmp.metricId = fMetricId.at(iAlgo); 122 algoSubTmp.useCharged = fUseCharged.at(iAlgo); 123 algoSubTmp.applyLowPUCorr = fApplyLowPUCorr.at(iAlgo); 124 algoSubTmp.combId = fCombId.at(iAlgo); 125 algoSubTmp.coneSize = fConeSizeBin.at(iAlgo); 126 algoSubTmp.rmsPtMin = fRMSPtMinBin.at(iAlgo); 127 algoSubTmp.rmsScaleFactor = fRMSScaleFactorBin.at(iAlgo); 128 algoTmp.subAlgos.push_back(algoSubTmp); 129 iAlgo++; 130 } 131 iAlgo--; 132 //if(std::find(puppiAlgo.begin(),puppiAlgo.end(),algoTmp) != puppiAlgo.end()) continue; 133 puppiAlgo.push_back(algoTmp); 134 } 135 fPuppi = new PuppiContainer(true,fUseExp,fMinPuppiWeight,puppiAlgo); 110 136 } 111 137 … … 124 150 TLorentzVector momentum; 125 151 126 DelphesFactory *factory = GetFactory();152 //DelphesFactory *factory = GetFactory(); 127 153 128 154 // loop over input objects 129 fItTrackInputArray ->Reset();130 fItNeutralInputArray ->Reset();131 fPVItInputArray ->Reset();155 fItTrackInputArray ->Reset(); 156 fItNeutralInputArray ->Reset(); 157 fPVItInputArray ->Reset(); 132 158 133 159 std::vector<Candidate *> InputParticles; … … 142 168 std::vector<RecoObj> puppiInputVector; 143 169 puppiInputVector.clear(); 144 170 int lNBad = 0; 145 171 // Loop on charge track candidate 146 172 while((candidate = static_cast<Candidate*>(fItTrackInputArray->Next()))){ 147 148 173 momentum = candidate->Momentum; 149 150 174 RecoObj curRecoObj; 151 175 curRecoObj.pt = momentum.Pt(); … … 154 178 curRecoObj.m = momentum.M(); 155 179 particle = static_cast<Candidate*>(candidate->GetCandidates()->Last()); 180 //if(fApplyNoLep && TMath::Abs(candidate->PID) == 11) continue; //Dumb cut to minimize the nolepton on electron 181 //if(fApplyNoLep && TMath::Abs(candidate->PID) == 13) continue; 156 182 if (candidate->IsRecoPU and candidate->Charge !=0) { // if it comes fromPU vertexes after the resolution smearing and the dZ matching within resolution 183 lNBad++; 157 184 curRecoObj.id = 2; 158 curRecoObj.vtxId = candidate->IsPU;185 curRecoObj.vtxId = 0.7*(fPVInputArray->GetEntries()); //Hack apply reco vtx efficiency of 70% for calibration 159 186 if(TMath::Abs(candidate->PID) == 11) curRecoObj.pfType = 2; 160 187 else if(TMath::Abs(candidate->PID) == 13) curRecoObj.pfType = 3; … … 183 210 // Loop on neutral calo cells 184 211 while((candidate = static_cast<Candidate*>(fItNeutralInputArray->Next()))){ 185 186 212 momentum = candidate->Momentum; 187 188 213 RecoObj curRecoObj; 189 214 curRecoObj.pt = momentum.Pt(); … … 191 216 curRecoObj.phi = momentum.Phi(); 192 217 curRecoObj.m = momentum.M(); 218 curRecoObj.charge = 0; 193 219 particle = static_cast<Candidate*>(candidate->GetCandidates()->Last()); 194 195 220 196 221 if(candidate->Charge == 0){ … … 210 235 InputParticles.push_back(candidate); 211 236 } 212 213 // Create algorithm list for puppi214 std::vector<puppiAlgoBin> puppiAlgo;215 if(puppiAlgo.empty()){216 if(!(fEtaMinBin.size() == fEtaMaxBin.size() and fEtaMinBin.size() == fPtMinBin.size() and fEtaMinBin.size() == fConeSizeBin.size() and fEtaMinBin.size() == fRMSPtMinBin.size()217 and fEtaMinBin.size() == fRMSScaleFactorBin.size() and fEtaMinBin.size() == fNeutralMinEBin.size() and fEtaMinBin.size() == fNeutralPtSlope.size()218 and fEtaMinBin.size() == fApplyCHS.size() and fEtaMinBin.size() == fUseCharged.size()219 and fEtaMinBin.size() == fApplyLowPUCorr.size() and fEtaMinBin.size() == fMetricId.size())) {220 std::cerr<<" Error in PUPPI configuration, algo info should have the same size --> exit from the code"<<std::endl;221 std::exit(EXIT_FAILURE);222 }223 224 for( size_t iAlgo = 0 ; iAlgo < fEtaMinBin.size() ; iAlgo++){225 puppiAlgoBin algoTmp ;226 algoTmp.fEtaMin_ = fEtaMinBin.at(iAlgo);227 algoTmp.fEtaMax_ = fEtaMaxBin.at(iAlgo);228 algoTmp.fPtMin_ = fPtMinBin.at(iAlgo);229 algoTmp.fConeSize_ = fConeSizeBin.at(iAlgo);230 algoTmp.fRMSPtMin_ = fRMSPtMinBin.at(iAlgo);231 algoTmp.fRMSScaleFactor_ = fRMSScaleFactorBin.at(iAlgo);232 algoTmp.fNeutralMinE_ = fNeutralMinEBin.at(iAlgo);233 algoTmp.fNeutralPtSlope_ = fNeutralPtSlope.at(iAlgo);234 algoTmp.fApplyCHS_ = fApplyCHS.at(iAlgo);235 algoTmp.fUseCharged_ = fUseCharged.at(iAlgo);236 algoTmp.fApplyLowPUCorr_ = fApplyLowPUCorr.at(iAlgo);237 algoTmp.fMetricId_ = fMetricId.at(iAlgo);238 if(std::find(puppiAlgo.begin(),puppiAlgo.end(),algoTmp) != puppiAlgo.end()) continue;239 puppiAlgo.push_back(algoTmp);240 }241 }242 243 237 // Create PUPPI container 244 puppiCleanContainer curEvent(puppiInputVector,puppiAlgo,fMinPuppiWeight,fUseExp); 245 std::vector<fastjet::PseudoJet> puppiParticles = curEvent.puppiEvent(); 238 fPuppi->initialize(puppiInputVector); 239 fPuppi->puppiWeights(); 240 std::vector<fastjet::PseudoJet> puppiParticles = fPuppi->puppiParticles(); 246 241 247 242 // Loop on final particles -
modules/RunPUPPI.h
r3c46e17 ra9c67b3a 3 3 4 4 #include "classes/DelphesModule.h" 5 #include "PUPPI/PuppiContainer.hh" 5 6 #include <vector> 6 7 … … 29 30 const TObjArray *fNeutralInputArray; //! 30 31 const TObjArray *fPVInputArray; //! 31 32 PuppiContainer* fPuppi; 32 33 // puppi parameters 33 float fMinPuppiWeight; 34 bool fApplyNoLep; 35 double fMinPuppiWeight; 34 36 bool fUseExp; 35 37 … … 46 48 std::vector<bool> fApplyLowPUCorr; 47 49 std::vector<int> fMetricId; 50 std::vector<int> fCombId; 48 51 49 52 TObjArray *fOutputArray; -
readers/DelphesCMSFWLite.cpp
r3c46e17 ra9c67b3a 164 164 candidate->Momentum.SetPxPyPzE(px, py, pz, e); 165 165 166 candidate->Position.SetXYZT(x , y, z, 0.0);166 candidate->Position.SetXYZT(x*10.0, y*10.0, z*10.0, 0.0); 167 167 168 168 allParticleOutputArray->Add(candidate); -
readers/DelphesPythia8.cpp
r3c46e17 ra9c67b3a 144 144 interrupted = true; 145 145 } 146 147 148 // Single-particle gun. The particle must be a colour singlet. 149 // Input: flavour, energy, direction (theta, phi). 150 // If theta < 0 then random choice over solid angle. 151 // Optional final argument to put particle at rest => E = m. 152 // from pythia8 example 21 153 154 void fillParticle(int id, double ee_max, double thetaIn, double phiIn, 155 Pythia8::Event& event, Pythia8::ParticleData& pdt, Pythia8::Rndm& rndm, bool atRest = false) { 156 157 // Reset event record to allow for new event. 158 event.reset(); 159 160 // Angles uniform in solid angle. 161 double cThe, sThe, phi, ee; 162 cThe = 2. * rndm.flat() - 1.; 163 sThe = Pythia8::sqrtpos(1. - cThe * cThe); 164 phi = 2. * M_PI * rndm.flat(); 165 ee = pow(10,1+(log10(ee_max)-1)*rndm.flat()); 166 double mm = pdt.mSel(id); 167 double pp = Pythia8::sqrtpos(ee*ee - mm*mm); 168 169 // Store the particle in the event record. 170 event.append( id, 1, 0, 0, pp * sThe * cos(phi), pp * sThe * sin(phi), pp * cThe, ee, mm); 171 172 } 173 174 void fillPartons(int type, double ee_max, Pythia8::Event& event, Pythia8::ParticleData& pdt, 175 Pythia8::Rndm& rndm) { 176 177 // Reset event record to allow for new event. 178 event.reset(); 179 180 // Angles uniform in solid angle. 181 double cThe, sThe, phi, ee; 182 183 // Information on a q qbar system, to be hadronized. 184 185 cThe = 2. * rndm.flat() - 1.; 186 sThe = Pythia8::sqrtpos(1. - cThe * cThe); 187 phi = 2. * M_PI * rndm.flat(); 188 ee = pow(10,1+(log10(ee_max)-1)*rndm.flat()); 189 double mm = pdt.m0(type); 190 double pp = Pythia8::sqrtpos(ee*ee - mm*mm); 191 if (type == 21) 192 { 193 event.append( 21, 23, 101, 102, pp * sThe * cos(phi), pp * sThe * sin(phi), pp * cThe, ee); 194 event.append( 21, 23, 102, 101, -pp * sThe * cos(phi), -pp * sThe * sin(phi), -pp * cThe, ee); 195 } 196 else 197 { 198 event.append( type, 23, 101, 0, pp * sThe * cos(phi), pp * sThe * sin(phi), pp * cThe, ee, mm); 199 event.append( -type, 23, 0, 101, -pp * sThe * cos(phi), -pp * sThe * sin(phi), -pp * cThe, ee, mm); 200 } 201 } 202 146 203 147 204 //--------------------------------------------------------------------------- … … 213 270 // Initialize Pythia 214 271 pythia = new Pythia8::Pythia; 272 //Pythia8::Event& event = pythia->event; 273 //Pythia8::ParticleData& pdt = pythia->particleData; 215 274 216 275 if(pythia == NULL) … … 230 289 timesAllowErrors = pythia->mode("Main:timesAllowErrors"); 231 290 232 inputFile = fopen(pythia->word("Beams:LHEF").c_str(), "r"); 233 if(inputFile) 234 { 235 reader = new DelphesLHEFReader; 236 reader->SetInputFile(inputFile); 237 238 branchEventLHEF = treeWriter->NewBranch("EventLHEF", LHEFEvent::Class()); 239 branchWeightLHEF = treeWriter->NewBranch("WeightLHEF", LHEFWeight::Class()); 240 241 allParticleOutputArrayLHEF = modularDelphes->ExportArray("allParticlesLHEF"); 242 stableParticleOutputArrayLHEF = modularDelphes->ExportArray("stableParticlesLHEF"); 243 partonOutputArrayLHEF = modularDelphes->ExportArray("partonsLHEF"); 291 // Check if particle gun 292 if (!pythia->flag("Main:spareFlag1")) 293 { 294 inputFile = fopen(pythia->word("Beams:LHEF").c_str(), "r"); 295 if(inputFile) 296 { 297 reader = new DelphesLHEFReader; 298 reader->SetInputFile(inputFile); 299 300 branchEventLHEF = treeWriter->NewBranch("EventLHEF", LHEFEvent::Class()); 301 branchWeightLHEF = treeWriter->NewBranch("WeightLHEF", LHEFWeight::Class()); 302 303 allParticleOutputArrayLHEF = modularDelphes->ExportArray("allParticlesLHEF"); 304 stableParticleOutputArrayLHEF = modularDelphes->ExportArray("stableParticlesLHEF"); 305 partonOutputArrayLHEF = modularDelphes->ExportArray("partonsLHEF"); 306 } 244 307 } 245 308 … … 260 323 while(reader && reader->ReadBlock(factory, allParticleOutputArrayLHEF, 261 324 stableParticleOutputArrayLHEF, partonOutputArrayLHEF) && !reader->EventReady()); 325 326 if (pythia->flag("Main:spareFlag1")) 327 { 328 if (pythia->mode("Main:spareMode1") == 11 || pythia->mode("Main:spareMode1") == 13 || pythia->mode("Main:spareMode1") == 22) 329 { 330 fillParticle( pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), -1., 0.,pythia->event, pythia->particleData, pythia->rndm, 0); 331 } 332 else fillPartons( pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), pythia->event, pythia->particleData, pythia->rndm); 333 } 262 334 263 335 if(!pythia->next())
Note:
See TracChangeset
for help on using the changeset viewer.