Changes in / [ec5e04b:b9ae4c3] in git
- Files:
-
- 21 added
- 1 deleted
- 101 edited
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
rec5e04b rb9ae4c3 1 3.4.0: 2 - corrected granularities for ECAL and HCAL in CMS default cards 3 - improved particle flow algorithm 4 - updated FastJet library to 3.2.1 5 - updated Nsubjettiness library to 2.2.4 6 - added scripts that produce validation plots 7 - added DelphesROOT reader 8 - added TrackSmearing and BeamSpotFilter modules 9 - completed TimeSmearing module 10 - added preliminary version of vertex clustering algorithm in 3/4D, VertexFinder and VertexFinder4D (special thanks to A. Hart and L. Gray) 11 - fixed muon efficiency at high energy 12 - replaced gaussian smearing with lognormal in MomentumSmearing module 13 1 14 3.3.3: 2 15 - improved compatibility with ROOT >= 6.04 -
Makefile
rec5e04b rb9ae4c3 137 137 tmp/examples/Example1.$(ObjSuf): \ 138 138 examples/Example1.cpp \ 139 classes/DelphesClasses.h \ 140 external/ExRootAnalysis/ExRootTreeReader.h \ 141 external/ExRootAnalysis/ExRootTreeWriter.h \ 142 external/ExRootAnalysis/ExRootTreeBranch.h \ 143 external/ExRootAnalysis/ExRootResult.h \ 144 external/ExRootAnalysis/ExRootUtilities.h 145 Validation$(ExeSuf): \ 146 tmp/examples/Validation.$(ObjSuf) 147 148 tmp/examples/Validation.$(ObjSuf): \ 149 examples/Validation.cpp \ 139 150 classes/DelphesClasses.h \ 140 151 external/ExRootAnalysis/ExRootTreeReader.h \ … … 150 161 root2pileup$(ExeSuf) \ 151 162 stdhep2pileup$(ExeSuf) \ 152 Example1$(ExeSuf) 163 Example1$(ExeSuf) \ 164 Validation$(ExeSuf) 153 165 154 166 EXECUTABLE_OBJ += \ … … 159 171 tmp/converters/root2pileup.$(ObjSuf) \ 160 172 tmp/converters/stdhep2pileup.$(ObjSuf) \ 161 tmp/examples/Example1.$(ObjSuf) 173 tmp/examples/Example1.$(ObjSuf) \ 174 tmp/examples/Validation.$(ObjSuf) 162 175 163 176 DelphesHepMC$(ExeSuf): \ … … 183 196 classes/DelphesLHEFReader.h \ 184 197 external/ExRootAnalysis/ExRootTreeWriter.h \ 198 external/ExRootAnalysis/ExRootTreeBranch.h \ 199 external/ExRootAnalysis/ExRootProgressBar.h 200 DelphesROOT$(ExeSuf): \ 201 tmp/readers/DelphesROOT.$(ObjSuf) 202 203 tmp/readers/DelphesROOT.$(ObjSuf): \ 204 readers/DelphesROOT.cpp \ 205 modules/Delphes.h \ 206 classes/DelphesStream.h \ 207 classes/DelphesClasses.h \ 208 classes/DelphesFactory.h \ 209 external/ExRootAnalysis/ExRootTreeWriter.h \ 210 external/ExRootAnalysis/ExRootTreeReader.h \ 185 211 external/ExRootAnalysis/ExRootTreeBranch.h \ 186 212 external/ExRootAnalysis/ExRootProgressBar.h … … 200 226 DelphesHepMC$(ExeSuf) \ 201 227 DelphesLHEF$(ExeSuf) \ 228 DelphesROOT$(ExeSuf) \ 202 229 DelphesSTDHEP$(ExeSuf) 203 230 … … 205 232 tmp/readers/DelphesHepMC.$(ObjSuf) \ 206 233 tmp/readers/DelphesLHEF.$(ObjSuf) \ 234 tmp/readers/DelphesROOT.$(ObjSuf) \ 207 235 tmp/readers/DelphesSTDHEP.$(ObjSuf) 208 236 … … 319 347 modules/EnergySmearing.h \ 320 348 modules/MomentumSmearing.h \ 349 modules/TrackSmearing.h \ 321 350 modules/ImpactParameterSmearing.h \ 322 351 modules/TimeSmearing.h \ … … 342 371 modules/StatusPidFilter.h \ 343 372 modules/PdgCodeFilter.h \ 373 modules/BeamSpotFilter.h \ 374 modules/RecoPuFilter.h \ 344 375 modules/Cloner.h \ 345 376 modules/Weighter.h \ … … 347 378 modules/JetFlavorAssociation.h \ 348 379 modules/JetFakeParticle.h \ 380 modules/VertexSorter.h \ 381 modules/VertexFinder.h \ 382 modules/VertexFinderDA4D.h \ 349 383 modules/ExampleModule.h 350 384 tmp/modules/ModulesDict$(PcmSuf): \ … … 553 587 classes/DelphesFactory.h \ 554 588 classes/DelphesFormula.h 589 tmp/modules/BeamSpotFilter.$(ObjSuf): \ 590 modules/BeamSpotFilter.$(SrcSuf) \ 591 modules/BeamSpotFilter.h \ 592 classes/DelphesClasses.h \ 593 classes/DelphesFactory.h \ 594 classes/DelphesFormula.h \ 595 external/ExRootAnalysis/ExRootResult.h \ 596 external/ExRootAnalysis/ExRootFilter.h \ 597 external/ExRootAnalysis/ExRootClassifier.h 555 598 tmp/modules/Calorimeter.$(ObjSuf): \ 556 599 modules/Calorimeter.$(SrcSuf) \ … … 785 828 external/ExRootAnalysis/ExRootFilter.h \ 786 829 external/ExRootAnalysis/ExRootClassifier.h 830 tmp/modules/RecoPuFilter.$(ObjSuf): \ 831 modules/RecoPuFilter.$(SrcSuf) \ 832 modules/RecoPuFilter.h \ 833 classes/DelphesClasses.h \ 834 classes/DelphesFactory.h \ 835 classes/DelphesFormula.h \ 836 external/ExRootAnalysis/ExRootResult.h \ 837 external/ExRootAnalysis/ExRootFilter.h \ 838 external/ExRootAnalysis/ExRootClassifier.h 787 839 tmp/modules/SimpleCalorimeter.$(ObjSuf): \ 788 840 modules/SimpleCalorimeter.$(SrcSuf) \ … … 846 898 modules/TrackPileUpSubtractor.$(SrcSuf) \ 847 899 modules/TrackPileUpSubtractor.h \ 900 classes/DelphesClasses.h \ 901 classes/DelphesFactory.h \ 902 classes/DelphesFormula.h \ 903 external/ExRootAnalysis/ExRootResult.h \ 904 external/ExRootAnalysis/ExRootFilter.h \ 905 external/ExRootAnalysis/ExRootClassifier.h 906 tmp/modules/TrackSmearing.$(ObjSuf): \ 907 modules/TrackSmearing.$(SrcSuf) \ 908 modules/TrackSmearing.h \ 848 909 classes/DelphesClasses.h \ 849 910 classes/DelphesFactory.h \ … … 868 929 classes/DelphesFactory.h \ 869 930 classes/DelphesFormula.h \ 931 external/ExRootAnalysis/ExRootResult.h \ 932 external/ExRootAnalysis/ExRootFilter.h \ 933 external/ExRootAnalysis/ExRootClassifier.h 934 tmp/modules/VertexFinder.$(ObjSuf): \ 935 modules/VertexFinder.$(SrcSuf) \ 936 modules/VertexFinder.h \ 937 classes/DelphesClasses.h \ 938 classes/DelphesFactory.h \ 939 classes/DelphesFormula.h \ 940 classes/DelphesPileUpReader.h \ 941 external/ExRootAnalysis/ExRootResult.h \ 942 external/ExRootAnalysis/ExRootFilter.h \ 943 external/ExRootAnalysis/ExRootClassifier.h 944 tmp/modules/VertexFinderDA4D.$(ObjSuf): \ 945 modules/VertexFinderDA4D.$(SrcSuf) \ 946 modules/VertexFinderDA4D.h \ 947 classes/DelphesClasses.h \ 948 classes/DelphesFactory.h \ 949 classes/DelphesFormula.h \ 950 classes/DelphesPileUpReader.h \ 951 external/ExRootAnalysis/ExRootResult.h \ 952 external/ExRootAnalysis/ExRootFilter.h \ 953 external/ExRootAnalysis/ExRootClassifier.h 954 tmp/modules/VertexSorter.$(ObjSuf): \ 955 modules/VertexSorter.$(SrcSuf) \ 956 modules/VertexSorter.h \ 957 classes/DelphesClasses.h \ 958 classes/DelphesFactory.h \ 959 classes/DelphesFormula.h \ 960 classes/DelphesPileUpReader.h \ 870 961 external/ExRootAnalysis/ExRootResult.h \ 871 962 external/ExRootAnalysis/ExRootFilter.h \ … … 931 1022 tmp/modules/AngularSmearing.$(ObjSuf) \ 932 1023 tmp/modules/BTagging.$(ObjSuf) \ 1024 tmp/modules/BeamSpotFilter.$(ObjSuf) \ 933 1025 tmp/modules/Calorimeter.$(ObjSuf) \ 934 1026 tmp/modules/Cloner.$(ObjSuf) \ … … 955 1047 tmp/modules/PileUpJetID.$(ObjSuf) \ 956 1048 tmp/modules/PileUpMerger.$(ObjSuf) \ 1049 tmp/modules/RecoPuFilter.$(ObjSuf) \ 957 1050 tmp/modules/SimpleCalorimeter.$(ObjSuf) \ 958 1051 tmp/modules/StatusPidFilter.$(ObjSuf) \ … … 963 1056 tmp/modules/TrackCountingTauTagging.$(ObjSuf) \ 964 1057 tmp/modules/TrackPileUpSubtractor.$(ObjSuf) \ 1058 tmp/modules/TrackSmearing.$(ObjSuf) \ 965 1059 tmp/modules/TreeWriter.$(ObjSuf) \ 966 1060 tmp/modules/UniqueObjectFinder.$(ObjSuf) \ 1061 tmp/modules/VertexFinder.$(ObjSuf) \ 1062 tmp/modules/VertexFinderDA4D.$(ObjSuf) \ 1063 tmp/modules/VertexSorter.$(ObjSuf) \ 967 1064 tmp/modules/Weighter.$(ObjSuf) 968 1065 … … 1210 1307 external/fastjet/plugins/Jade/JadePlugin.$(SrcSuf) \ 1211 1308 external/fastjet/ClusterSequence.hh \ 1212 external/fastjet/NNH.hh 1309 external/fastjet/NNH.hh \ 1310 external/fastjet/NNFJN2Plain.hh 1213 1311 tmp/external/fastjet/plugins/NestedDefs/NestedDefsPlugin.$(ObjSuf): \ 1214 1312 external/fastjet/plugins/NestedDefs/NestedDefsPlugin.$(SrcSuf) \ … … 1252 1350 external/fastjet/tools/Filter.$(SrcSuf) \ 1253 1351 external/fastjet/tools/Filter.hh \ 1254 external/fastjet/tools/Recluster.hh 1352 external/fastjet/tools/Recluster.hh \ 1353 external/fastjet/tools/Subtractor.hh 1255 1354 tmp/external/fastjet/tools/GridMedianBackgroundEstimator.$(ObjSuf): \ 1256 1355 external/fastjet/tools/GridMedianBackgroundEstimator.$(SrcSuf) \ … … 1569 1668 tmp/external/tcl/tclVar.$(ObjSuf) 1570 1669 1670 modules/VertexFinderDA4D.h: \ 1671 classes/DelphesModule.h 1672 @touch $@ 1673 1674 modules/TrackSmearing.h: \ 1675 classes/DelphesModule.h 1676 @touch $@ 1677 1571 1678 external/fastjet/ClusterSequence.hh: \ 1572 1679 external/fastjet/PseudoJet.hh \ … … 1576 1683 external/fastjet/LimitedWarning.hh \ 1577 1684 external/fastjet/FunctionOfPseudoJet.hh \ 1578 external/fastjet/ClusterSequenceStructure.hh 1685 external/fastjet/ClusterSequenceStructure.hh \ 1686 external/fastjet/internal/deprecated.hh 1579 1687 @touch $@ 1580 1688 … … 1582 1690 external/fastjet/internal/ClosestPair2DBase.hh \ 1583 1691 external/fastjet/internal/SearchTree.hh \ 1584 external/fastjet/internal/MinHeap.hh 1692 external/fastjet/internal/MinHeap.hh \ 1693 external/fastjet/SharedPtr.hh 1585 1694 @touch $@ 1586 1695 … … 1615 1724 external/fastjet/internal/numconsts.hh \ 1616 1725 external/fastjet/PseudoJet.hh \ 1726 external/fastjet/internal/deprecated.hh \ 1617 1727 external/fastjet/ClusterSequence.hh 1618 1728 @touch $@ … … 1820 1930 external/fastjet/internal/BasicRandom.hh \ 1821 1931 external/fastjet/Selector.hh \ 1822 external/fastjet/LimitedWarning.hh 1932 external/fastjet/LimitedWarning.hh \ 1933 external/fastjet/internal/deprecated.hh 1823 1934 @touch $@ 1824 1935 … … 1829 1940 @touch $@ 1830 1941 1942 modules/VertexSorter.h: \ 1943 classes/DelphesModule.h 1944 @touch $@ 1945 1831 1946 modules/Delphes.h: \ 1947 classes/DelphesModule.h 1948 @touch $@ 1949 1950 modules/VertexFinder.h: \ 1832 1951 classes/DelphesModule.h 1833 1952 @touch $@ … … 1875 1994 external/fastjet/PseudoJet.hh \ 1876 1995 external/fastjet/Error.hh \ 1877 external/fastjet/LimitedWarning.hh 1996 external/fastjet/LimitedWarning.hh \ 1997 external/fastjet/internal/deprecated.hh 1878 1998 @touch $@ 1879 1999 … … 1885 2005 external/fastjet/ClusterSequence.hh \ 1886 2006 external/fastjet/LimitedWarning.hh \ 1887 external/fastjet/Selector.hh 2007 external/fastjet/Selector.hh \ 2008 external/fastjet/internal/deprecated.hh 1888 2009 @touch $@ 1889 2010 … … 1902 2023 @touch $@ 1903 2024 2025 modules/RecoPuFilter.h: \ 2026 classes/DelphesModule.h 2027 @touch $@ 2028 1904 2029 modules/Hector.h: \ 1905 2030 classes/DelphesModule.h … … 2001 2126 2002 2127 modules/FastJetFinder.h: \ 2128 classes/DelphesModule.h 2129 @touch $@ 2130 2131 modules/BeamSpotFilter.h: \ 2003 2132 classes/DelphesModule.h 2004 2133 @touch $@ -
README
rec5e04b rb9ae4c3 4 4 Commands to get the code: 5 5 6 wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3. 3.3.tar.gz6 wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.4.0.tar.gz 7 7 8 tar -zxf Delphes-3. 3.3.tar.gz8 tar -zxf Delphes-3.4.0.tar.gz 9 9 10 10 Commands to compile the code: 11 11 12 cd Delphes-3. 3.312 cd Delphes-3.4.0 13 13 14 14 make -
VERSION
rec5e04b rb9ae4c3 1 3. 3.31 3.4.0 -
cards/converter_card.tcl
rec5e04b rb9ae4c3 13 13 module TreeWriter TreeWriter { 14 14 # add Branch InputArray BranchName BranchClass 15 add Branch Delphes/ allParticles Particle GenParticle15 add Branch Delphes/stableParticles Particle GenParticle 16 16 } 17 17 -
cards/delphes_card_ATLAS.tcl
rec5e04b rb9ae4c3 141 141 142 142 # resolution formula for charged hadrons 143 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 1^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)}143 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^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)} 146 146 } 147 147 -
cards/delphes_card_ATLAS_PileUp.tcl
rec5e04b rb9ae4c3 177 177 # resolution formula for charged hadrons 178 178 # based on arXiv:1405.6569 179 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 1^2 + pt^2*1.5e-4^2) +180 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0. 015^2 + pt^2*2.5e-4^2) +181 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0. 025^2 + pt^2*5.5e-4^2)}179 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^2 + pt^2*1.3e-3^2) + 180 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.10^2 + pt^2*1.7e-3^2) + 181 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.25^2 + pt^2*3.1e-3^2)} 182 182 } 183 183 -
cards/delphes_card_CMS.tcl
rec5e04b rb9ae4c3 15 15 16 16 TrackMerger 17 18 ECal 19 HCal 20 17 21 Calorimeter 18 22 EFlowMerger … … 124 128 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 125 129 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + 126 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + 130 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e3) * (0.99) + 131 (abs(eta) <= 1.5) * (pt > 1.0e3 ) * (0.99 * exp(0.5 - pt*5.0e-4)) + 132 127 133 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 128 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + 134 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e3) * (0.98) + 135 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e3) * (0.98 * exp(0.5 - pt*5.0e-4)) + 129 136 (abs(eta) > 2.5) * (0.00)} 130 137 } … … 142 149 # resolution formula for charged hadrons 143 150 # based on arXiv:1405.6569 144 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 1^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)}151 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^2 + pt^2*1.3e-3^2) + 152 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.10^2 + pt^2*1.7e-3^2) + 153 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.25^2 + pt^2*3.1e-3^2)} 147 154 } 148 155 … … 192 199 } 193 200 201 202 194 203 ############# 195 # Calorimeter204 # ECAL 196 205 ############# 197 206 198 module Calorimeter Calorimeter{207 module SimpleCalorimeter ECal { 199 208 set ParticleInputArray ParticlePropagator/stableParticles 200 209 set TrackInputArray TrackMerger/tracks 201 210 202 set TowerOutputArray towers 203 set PhotonOutputArray photons 204 211 set TowerOutputArray ecalTowers 205 212 set EFlowTrackOutputArray eflowTracks 206 set EFlowPhotonOutputArray eflowPhotons 207 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 208 209 set ECalEnergyMin 0.5 210 set HCalEnergyMin 1.0 211 212 set ECalEnergySignificanceMin 1.0 213 set HCalEnergySignificanceMin 1.0 213 set EFlowTowerOutputArray eflowPhotons 214 215 set IsEcal true 216 217 set EnergyMin 0.5 218 set EnergySignificanceMin 2.0 219 220 set SmearTowerCenter true 221 222 set pi [expr {acos(-1)}] 223 224 # lists of the edges of each tower in eta and phi 225 # each list starts with the lower edge of the first tower 226 # the list ends with the higher edged of the last tower 227 228 # assume 0.02 x 0.02 resolution in eta,phi in the barrel |eta| < 1.5 229 230 set PhiBins {} 231 for {set i -180} {$i <= 180} {incr i} { 232 add PhiBins [expr {$i * $pi/180.0}] 233 } 234 235 # 0.02 unit in eta up to eta = 1.5 (barrel) 236 for {set i -85} {$i <= 86} {incr i} { 237 set eta [expr {$i * 0.0174}] 238 add EtaPhiBins $eta $PhiBins 239 } 240 241 # assume 0.02 x 0.02 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 (HGCAL- ECAL) 242 243 set PhiBins {} 244 for {set i -180} {$i <= 180} {incr i} { 245 add PhiBins [expr {$i * $pi/180.0}] 246 } 247 248 # 0.02 unit in eta up to eta = 3 249 for {set i 1} {$i <= 84} {incr i} { 250 set eta [expr { -2.958 + $i * 0.0174}] 251 add EtaPhiBins $eta $PhiBins 252 } 253 254 for {set i 1} {$i <= 84} {incr i} { 255 set eta [expr { 1.4964 + $i * 0.0174}] 256 add EtaPhiBins $eta $PhiBins 257 } 258 259 # take present CMS granularity for HF 260 261 # 0.175 x (0.175 - 0.35) resolution in eta,phi in the HF 3.0 < |eta| < 5.0 262 set PhiBins {} 263 for {set i -18} {$i <= 18} {incr i} { 264 add PhiBins [expr {$i * $pi/18.0}] 265 } 266 267 foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.958 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} { 268 add EtaPhiBins $eta $PhiBins 269 } 270 271 272 add EnergyFraction {0} {0.0} 273 # energy fractions for e, gamma and pi0 274 add EnergyFraction {11} {1.0} 275 add EnergyFraction {22} {1.0} 276 add EnergyFraction {111} {1.0} 277 # energy fractions for muon, neutrinos and neutralinos 278 add EnergyFraction {12} {0.0} 279 add EnergyFraction {13} {0.0} 280 add EnergyFraction {14} {0.0} 281 add EnergyFraction {16} {0.0} 282 add EnergyFraction {1000022} {0.0} 283 add EnergyFraction {1000023} {0.0} 284 add EnergyFraction {1000025} {0.0} 285 add EnergyFraction {1000035} {0.0} 286 add EnergyFraction {1000045} {0.0} 287 # energy fractions for K0short and Lambda 288 add EnergyFraction {310} {0.3} 289 add EnergyFraction {3122} {0.3} 290 291 # set ResolutionFormula {resolution formula as a function of eta and energy} 292 293 # for the ECAL barrel (|eta| < 1.5), see hep-ex/1306.2016 and 1502.02701 294 295 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 296 # Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701 297 set ResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 298 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 299 (abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 300 301 } 302 303 304 ############# 305 # HCAL 306 ############# 307 308 module SimpleCalorimeter HCal { 309 set ParticleInputArray ParticlePropagator/stableParticles 310 set TrackInputArray ECal/eflowTracks 311 312 set TowerOutputArray hcalTowers 313 set EFlowTrackOutputArray eflowTracks 314 set EFlowTowerOutputArray eflowNeutralHadrons 315 316 set IsEcal false 317 318 set EnergyMin 1.0 319 set EnergySignificanceMin 2.0 214 320 215 321 set SmearTowerCenter true … … 249 355 250 356 # default energy fractions {abs(PDG code)} {Fecal Fhcal} 251 add EnergyFraction {0} { 0.01.0}357 add EnergyFraction {0} {1.0} 252 358 # energy fractions for e, gamma and pi0 253 add EnergyFraction {11} { 1.00.0}254 add EnergyFraction {22} { 1.00.0}255 add EnergyFraction {111} { 1.00.0}359 add EnergyFraction {11} {0.0} 360 add EnergyFraction {22} {0.0} 361 add EnergyFraction {111} {0.0} 256 362 # energy fractions for muon, neutrinos and neutralinos 257 add EnergyFraction {12} {0.0 0.0}258 add EnergyFraction {13} {0.0 0.0}259 add EnergyFraction {14} {0.0 0.0}260 add EnergyFraction {16} {0.0 0.0}261 add EnergyFraction {1000022} {0.0 0.0}262 add EnergyFraction {1000023} {0.0 0.0}263 add EnergyFraction {1000025} {0.0 0.0}264 add EnergyFraction {1000035} {0.0 0.0}265 add EnergyFraction {1000045} {0.0 0.0}363 add EnergyFraction {12} {0.0} 364 add EnergyFraction {13} {0.0} 365 add EnergyFraction {14} {0.0} 366 add EnergyFraction {16} {0.0} 367 add EnergyFraction {1000022} {0.0} 368 add EnergyFraction {1000023} {0.0} 369 add EnergyFraction {1000025} {0.0} 370 add EnergyFraction {1000035} {0.0} 371 add EnergyFraction {1000045} {0.0} 266 372 # energy fractions for K0short and Lambda 267 add EnergyFraction {310} {0.3 0.7} 268 add EnergyFraction {3122} {0.3 0.7} 269 270 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 271 # Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701 272 set ECalResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 273 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 274 (abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 373 add EnergyFraction {310} {0.7} 374 add EnergyFraction {3122} {0.7} 275 375 276 376 # set HCalResolutionFormula {resolution formula as a function of eta and energy} 277 set HCalResolutionFormula {(abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +377 set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + 278 378 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} 279 } 379 380 } 381 382 383 ################# 384 # Electron filter 385 ################# 386 387 module PdgCodeFilter ElectronFilter { 388 set InputArray HCal/eflowTracks 389 set OutputArray electrons 390 set Invert true 391 add PdgCode {11} 392 add PdgCode {-11} 393 } 394 395 ################################################### 396 # Tower Merger (in case not using e-flow algorithm) 397 ################################################### 398 399 module Merger Calorimeter { 400 # add InputArray InputArray 401 add InputArray ECal/ecalTowers 402 add InputArray HCal/hcalTowers 403 set OutputArray towers 404 } 405 406 280 407 281 408 #################### … … 285 412 module Merger EFlowMerger { 286 413 # add InputArray InputArray 287 add InputArray Calorimeter/eflowTracks288 add InputArray Calorimeter/eflowPhotons289 add InputArray Calorimeter/eflowNeutralHadrons414 add InputArray HCal/eflowTracks 415 add InputArray ECal/eflowPhotons 416 add InputArray HCal/eflowNeutralHadrons 290 417 set OutputArray eflow 291 418 } … … 296 423 297 424 module Efficiency PhotonEfficiency { 298 set InputArray Calorimeter/eflowPhotons425 set InputArray ECal/eflowPhotons 299 426 set OutputArray photons 300 427 … … 325 452 } 326 453 327 #################328 # Electron filter329 #################330 331 module PdgCodeFilter ElectronFilter {332 set InputArray Calorimeter/eflowTracks333 set OutputArray electrons334 set Invert true335 add PdgCode {11}336 add PdgCode {-11}337 }338 454 339 455 ##################### … … 382 498 383 499 # efficiency formula for muons 384 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 385 (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + 386 (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + 387 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + 388 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + 500 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 501 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 502 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0) * (0.95) + 389 503 (abs(eta) > 2.4) * (0.00)} 390 504 } … … 602 716 add Branch Calorimeter/towers Tower Tower 603 717 604 add Branch Calorimeter/eflowTracks EFlowTrack Track605 add Branch Calorimeter/eflowPhotons EFlowPhoton Tower606 add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower718 add Branch HCal/eflowTracks EFlowTrack Track 719 add Branch ECal/eflowPhotons EFlowPhoton Tower 720 add Branch HCal/eflowNeutralHadrons EFlowNeutralHadron Tower 607 721 608 722 add Branch GenJetFinder/jets GenJet Jet 609 723 add Branch GenMissingET/momentum GenMissingET MissingET 610 724 611 725 add Branch UniqueObjectFinder/jets Jet Jet 612 726 add Branch UniqueObjectFinder/electrons Electron Electron -
cards/delphes_card_CMS_NoFastJet.tcl
rec5e04b rb9ae4c3 15 15 16 16 TrackMerger 17 18 ECal 19 HCal 20 17 21 Calorimeter 18 22 EFlowMerger 23 19 24 } 20 25 … … 93 98 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 94 99 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + 95 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + 100 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e3) * (0.99) + 101 (abs(eta) <= 1.5) * (pt > 1.0e3 ) * (0.99 * exp(0.5 - pt*5.0e-4)) + 102 96 103 (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) + 104 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e3) * (0.98) + 105 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e3) * (0.98 * exp(0.5 - pt*5.0e-4)) + 98 106 (abs(eta) > 2.5) * (0.00)} 107 99 108 } 100 109 … … 128 137 # resolution formula for electrons 129 138 # based on arXiv:1405.6569 130 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 6^2 + pt^2*1.3e-3^2) +131 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0. 10^2 + pt^2*1.7e-3^2) +132 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0. 25^2 + pt^2*3.1e-3^2)}139 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.03^2 + pt^2*1.3e-3^2) + 140 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*1.7e-3^2) + 141 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.15^2 + pt^2*3.1e-3^2)} 133 142 } 134 143 … … 144 153 145 154 # resolution formula for muons 146 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*2.0e-4^2) + 147 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.02^2 + pt^2*3.0e-4^2) + 148 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.05^2 + pt^2*6.0e-4^2)} 149 } 155 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.0e-4^2) + 156 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*1.5e-4^2) + 157 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*3.5e-4^2)} 158 } 159 150 160 151 161 ############## … … 162 172 163 173 ############# 164 # Calorimeter174 # ECAL 165 175 ############# 166 176 167 module Calorimeter Calorimeter{177 module SimpleCalorimeter ECal { 168 178 set ParticleInputArray ParticlePropagator/stableParticles 169 179 set TrackInputArray TrackMerger/tracks 170 180 171 set TowerOutputArray towers 172 set PhotonOutputArray photons 173 181 set TowerOutputArray ecalTowers 174 182 set EFlowTrackOutputArray eflowTracks 175 set EFlowPhotonOutputArray eflowPhotons 176 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 177 178 set ECalEnergyMin 0.5 179 set HCalEnergyMin 1.0 180 181 set ECalEnergySignificanceMin 1.0 182 set HCalEnergySignificanceMin 1.0 183 set EFlowTowerOutputArray eflowPhotons 184 185 set IsEcal true 186 187 set EnergyMin 0.5 188 set EnergySignificanceMin 2.0 183 189 184 190 set SmearTowerCenter true … … 190 196 # the list ends with the higher edged of the last tower 191 197 198 # assume 0.02 x 0.02 resolution in eta,phi in the barrel |eta| < 1.5 199 200 set PhiBins {} 201 for {set i -180} {$i <= 180} {incr i} { 202 add PhiBins [expr {$i * $pi/180.0}] 203 } 204 205 # 0.02 unit in eta up to eta = 1.5 (barrel) 206 for {set i -85} {$i <= 86} {incr i} { 207 set eta [expr {$i * 0.0174}] 208 add EtaPhiBins $eta $PhiBins 209 } 210 211 # assume 0.02 x 0.02 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 (HGCAL- ECAL) 212 213 set PhiBins {} 214 for {set i -180} {$i <= 180} {incr i} { 215 add PhiBins [expr {$i * $pi/180.0}] 216 } 217 218 # 0.02 unit in eta up to eta = 3 219 for {set i 1} {$i <= 84} {incr i} { 220 set eta [expr { -2.958 + $i * 0.0174}] 221 add EtaPhiBins $eta $PhiBins 222 } 223 224 for {set i 1} {$i <= 84} {incr i} { 225 set eta [expr { 1.4964 + $i * 0.0174}] 226 add EtaPhiBins $eta $PhiBins 227 } 228 229 # take present CMS granularity for HF 230 231 # 0.175 x (0.175 - 0.35) resolution in eta,phi in the HF 3.0 < |eta| < 5.0 232 set PhiBins {} 233 for {set i -18} {$i <= 18} {incr i} { 234 add PhiBins [expr {$i * $pi/18.0}] 235 } 236 237 foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.958 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} { 238 add EtaPhiBins $eta $PhiBins 239 } 240 241 242 add EnergyFraction {0} {0.0} 243 # energy fractions for e, gamma and pi0 244 add EnergyFraction {11} {1.0} 245 add EnergyFraction {22} {1.0} 246 add EnergyFraction {111} {1.0} 247 # energy fractions for muon, neutrinos and neutralinos 248 add EnergyFraction {12} {0.0} 249 add EnergyFraction {13} {0.0} 250 add EnergyFraction {14} {0.0} 251 add EnergyFraction {16} {0.0} 252 add EnergyFraction {1000022} {0.0} 253 add EnergyFraction {1000023} {0.0} 254 add EnergyFraction {1000025} {0.0} 255 add EnergyFraction {1000035} {0.0} 256 add EnergyFraction {1000045} {0.0} 257 # energy fractions for K0short and Lambda 258 add EnergyFraction {310} {0.3} 259 add EnergyFraction {3122} {0.3} 260 261 # set ResolutionFormula {resolution formula as a function of eta and energy} 262 263 # for the ECAL barrel (|eta| < 1.5), see hep-ex/1306.2016 and 1502.02701 264 265 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 266 # Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701 267 set ResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 268 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 269 (abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 270 271 } 272 273 274 ############# 275 # HCAL 276 ############# 277 278 module SimpleCalorimeter HCal { 279 set ParticleInputArray ParticlePropagator/stableParticles 280 set TrackInputArray ECal/eflowTracks 281 282 set TowerOutputArray hcalTowers 283 set EFlowTrackOutputArray eflowTracks 284 set EFlowTowerOutputArray eflowNeutralHadrons 285 286 set IsEcal false 287 288 set EnergyMin 1.0 289 set EnergySignificanceMin 2.0 290 291 set SmearTowerCenter true 292 293 set pi [expr {acos(-1)}] 294 295 # lists of the edges of each tower in eta and phi 296 # each list starts with the lower edge of the first tower 297 # the list ends with the higher edged of the last tower 298 192 299 # 5 degrees towers 193 300 set PhiBins {} … … 218 325 219 326 # default energy fractions {abs(PDG code)} {Fecal Fhcal} 220 add EnergyFraction {0} { 0.01.0}327 add EnergyFraction {0} {1.0} 221 328 # energy fractions for e, gamma and pi0 222 add EnergyFraction {11} { 1.00.0}223 add EnergyFraction {22} { 1.00.0}224 add EnergyFraction {111} { 1.00.0}329 add EnergyFraction {11} {0.0} 330 add EnergyFraction {22} {0.0} 331 add EnergyFraction {111} {0.0} 225 332 # energy fractions for muon, neutrinos and neutralinos 226 add EnergyFraction {12} {0.0 0.0}227 add EnergyFraction {13} {0.0 0.0}228 add EnergyFraction {14} {0.0 0.0}229 add EnergyFraction {16} {0.0 0.0}230 add EnergyFraction {1000022} {0.0 0.0}231 add EnergyFraction {1000023} {0.0 0.0}232 add EnergyFraction {1000025} {0.0 0.0}233 add EnergyFraction {1000035} {0.0 0.0}234 add EnergyFraction {1000045} {0.0 0.0}333 add EnergyFraction {12} {0.0} 334 add EnergyFraction {13} {0.0} 335 add EnergyFraction {14} {0.0} 336 add EnergyFraction {16} {0.0} 337 add EnergyFraction {1000022} {0.0} 338 add EnergyFraction {1000023} {0.0} 339 add EnergyFraction {1000025} {0.0} 340 add EnergyFraction {1000035} {0.0} 341 add EnergyFraction {1000045} {0.0} 235 342 # energy fractions for K0short and Lambda 236 add EnergyFraction {310} {0.3 0.7} 237 add EnergyFraction {3122} {0.3 0.7} 238 239 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 240 set ECalResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + 241 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 343 add EnergyFraction {310} {0.7} 344 add EnergyFraction {3122} {0.7} 242 345 243 346 # set HCalResolutionFormula {resolution formula as a function of eta and energy} 244 set HCalResolutionFormula {(abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +347 set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + 245 348 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} 246 } 349 350 } 351 352 ################################################### 353 # Tower Merger (in case not using e-flow algorithm) 354 ################################################### 355 356 module Merger Calorimeter { 357 # add InputArray InputArray 358 add InputArray ECal/ecalTowers 359 add InputArray HCal/hcalTowers 360 set OutputArray towers 361 } 362 247 363 248 364 #################### … … 252 368 module Merger EFlowMerger { 253 369 # add InputArray InputArray 254 add InputArray Calorimeter/eflowTracks255 add InputArray Calorimeter/eflowPhotons256 add InputArray Calorimeter/eflowNeutralHadrons370 add InputArray HCal/eflowTracks 371 add InputArray ECal/eflowPhotons 372 add InputArray HCal/eflowNeutralHadrons 257 373 set OutputArray eflow 258 374 } 375 -
cards/delphes_card_CMS_PileUp.tcl
rec5e04b rb9ae4c3 17 17 18 18 TrackMerger 19 Calorimeter 19 20 ECal 21 HCal 22 20 23 ElectronFilter 21 24 TrackPileUpSubtractor … … 45 48 46 49 MissingET 47 50 48 51 JetFlavorAssociation 49 52 … … 82 85 # vertex smearing formula f(z,t) (z,t need to be respectively given in m,s) 83 86 set VertexDistributionFormula {exp(-(t^2/160e-12^2/2))*exp(-(z^2/0.053^2/2))} 84 87 85 88 86 89 } … … 160 163 set EfficiencyFormula { (pt <= 0.1) * (0.00) + 161 164 (abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) + 162 (abs(eta) <= 1.5) * (pt > 1.0) * (0.99) + 165 (abs(eta) <= 1.5) * (pt > 1.0 && pt <= 1.0e3) * (0.99) + 166 (abs(eta) <= 1.5) * (pt > 1.0e3 ) * (0.99 * exp(0.5 - pt*5.0e-4)) + 167 163 168 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1 && pt <= 1.0) * (0.70) + 164 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0) * (0.98) + 169 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0 && pt <= 1.0e3) * (0.98) + 170 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 1.0e3) * (0.98 * exp(0.5 - pt*5.0e-4)) + 165 171 (abs(eta) > 2.5) * (0.00)} 166 172 } … … 178 184 # resolution formula for charged hadrons 179 185 # based on arXiv:1405.6569 180 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.0 1^2 + pt^2*1.5e-4^2) +181 (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0. 015^2 + pt^2*2.5e-4^2) +182 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0. 025^2 + pt^2*5.5e-4^2)}186 set ResolutionFormula { (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^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)} 183 189 } 184 190 … … 229 235 230 236 ############# 231 # Calorimeter237 # ECAL 232 238 ############# 233 239 234 module Calorimeter Calorimeter{240 module SimpleCalorimeter ECal { 235 241 set ParticleInputArray ParticlePropagator/stableParticles 236 242 set TrackInputArray TrackMerger/tracks 237 243 238 set TowerOutputArray towers 239 set PhotonOutputArray photons 240 244 set TowerOutputArray ecalTowers 241 245 set EFlowTrackOutputArray eflowTracks 242 set EFlowPhotonOutputArray eflowPhotons 243 set EFlowNeutralHadronOutputArray eflowNeutralHadrons 244 245 set ECalEnergyMin 0.5 246 set HCalEnergyMin 1.0 247 248 set ECalEnergySignificanceMin 1.0 249 set HCalEnergySignificanceMin 1.0 246 set EFlowTowerOutputArray eflowPhotons 247 248 set IsEcal true 249 250 set EnergyMin 0.5 251 set EnergySignificanceMin 2.0 252 253 set SmearTowerCenter true 254 255 set pi [expr {acos(-1)}] 256 257 # lists of the edges of each tower in eta and phi 258 # each list starts with the lower edge of the first tower 259 # the list ends with the higher edged of the last tower 260 261 # assume 0.02 x 0.02 resolution in eta,phi in the barrel |eta| < 1.5 262 263 set PhiBins {} 264 for {set i -180} {$i <= 180} {incr i} { 265 add PhiBins [expr {$i * $pi/180.0}] 266 } 267 268 # 0.02 unit in eta up to eta = 1.5 (barrel) 269 for {set i -85} {$i <= 86} {incr i} { 270 set eta [expr {$i * 0.0174}] 271 add EtaPhiBins $eta $PhiBins 272 } 273 274 # assume 0.02 x 0.02 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 (HGCAL- ECAL) 275 276 set PhiBins {} 277 for {set i -180} {$i <= 180} {incr i} { 278 add PhiBins [expr {$i * $pi/180.0}] 279 } 280 281 # 0.02 unit in eta up to eta = 3 282 for {set i 1} {$i <= 84} {incr i} { 283 set eta [expr { -2.958 + $i * 0.0174}] 284 add EtaPhiBins $eta $PhiBins 285 } 286 287 for {set i 1} {$i <= 84} {incr i} { 288 set eta [expr { 1.4964 + $i * 0.0174}] 289 add EtaPhiBins $eta $PhiBins 290 } 291 292 # take present CMS granularity for HF 293 294 # 0.175 x (0.175 - 0.35) resolution in eta,phi in the HF 3.0 < |eta| < 5.0 295 set PhiBins {} 296 for {set i -18} {$i <= 18} {incr i} { 297 add PhiBins [expr {$i * $pi/18.0}] 298 } 299 300 foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.958 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} { 301 add EtaPhiBins $eta $PhiBins 302 } 303 304 305 add EnergyFraction {0} {0.0} 306 # energy fractions for e, gamma and pi0 307 add EnergyFraction {11} {1.0} 308 add EnergyFraction {22} {1.0} 309 add EnergyFraction {111} {1.0} 310 # energy fractions for muon, neutrinos and neutralinos 311 add EnergyFraction {12} {0.0} 312 add EnergyFraction {13} {0.0} 313 add EnergyFraction {14} {0.0} 314 add EnergyFraction {16} {0.0} 315 add EnergyFraction {1000022} {0.0} 316 add EnergyFraction {1000023} {0.0} 317 add EnergyFraction {1000025} {0.0} 318 add EnergyFraction {1000035} {0.0} 319 add EnergyFraction {1000045} {0.0} 320 # energy fractions for K0short and Lambda 321 add EnergyFraction {310} {0.3} 322 add EnergyFraction {3122} {0.3} 323 324 # set ResolutionFormula {resolution formula as a function of eta and energy} 325 326 # for the ECAL barrel (|eta| < 1.5), see hep-ex/1306.2016 and 1502.02701 327 328 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 329 # Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701 330 set ResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 331 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 332 (abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 333 334 } 335 336 337 ############# 338 # HCAL 339 ############# 340 341 module SimpleCalorimeter HCal { 342 set ParticleInputArray ParticlePropagator/stableParticles 343 set TrackInputArray ECal/eflowTracks 344 345 set TowerOutputArray hcalTowers 346 set EFlowTrackOutputArray eflowTracks 347 set EFlowTowerOutputArray eflowNeutralHadrons 348 349 set IsEcal false 350 351 set EnergyMin 1.0 352 set EnergySignificanceMin 2.0 250 353 251 354 set SmearTowerCenter true … … 285 388 286 389 # default energy fractions {abs(PDG code)} {Fecal Fhcal} 287 add EnergyFraction {0} { 0.01.0}390 add EnergyFraction {0} {1.0} 288 391 # energy fractions for e, gamma and pi0 289 add EnergyFraction {11} { 1.00.0}290 add EnergyFraction {22} { 1.00.0}291 add EnergyFraction {111} { 1.00.0}392 add EnergyFraction {11} {0.0} 393 add EnergyFraction {22} {0.0} 394 add EnergyFraction {111} {0.0} 292 395 # energy fractions for muon, neutrinos and neutralinos 293 add EnergyFraction {12} {0.0 0.0}294 add EnergyFraction {13} {0.0 0.0}295 add EnergyFraction {14} {0.0 0.0}296 add EnergyFraction {16} {0.0 0.0}297 add EnergyFraction {1000022} {0.0 0.0}298 add EnergyFraction {1000023} {0.0 0.0}299 add EnergyFraction {1000025} {0.0 0.0}300 add EnergyFraction {1000035} {0.0 0.0}301 add EnergyFraction {1000045} {0.0 0.0}396 add EnergyFraction {12} {0.0} 397 add EnergyFraction {13} {0.0} 398 add EnergyFraction {14} {0.0} 399 add EnergyFraction {16} {0.0} 400 add EnergyFraction {1000022} {0.0} 401 add EnergyFraction {1000023} {0.0} 402 add EnergyFraction {1000025} {0.0} 403 add EnergyFraction {1000035} {0.0} 404 add EnergyFraction {1000045} {0.0} 302 405 # energy fractions for K0short and Lambda 303 add EnergyFraction {310} {0.3 0.7} 304 add EnergyFraction {3122} {0.3 0.7} 305 306 # set ECalResolutionFormula {resolution formula as a function of eta and energy} 307 # Eta shape from arXiv:1306.2016, Energy shape from arXiv:1502.02701 308 set ECalResolutionFormula { (abs(eta) <= 1.5) * (1+0.64*eta^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 309 (abs(eta) > 1.5 && abs(eta) <= 2.5) * (2.16 + 5.6*(abs(eta)-2)^2) * sqrt(energy^2*0.008^2 + energy*0.11^2 + 0.40^2) + 310 (abs(eta) > 2.5 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2)} 406 add EnergyFraction {310} {0.7} 407 add EnergyFraction {3122} {0.7} 311 408 312 409 # set HCalResolutionFormula {resolution formula as a function of eta and energy} 313 set HCalResolutionFormula {(abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) +410 set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.050^2 + energy*1.50^2) + 314 411 (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)} 412 315 413 } 316 414 … … 320 418 321 419 module PdgCodeFilter ElectronFilter { 322 set InputArray Calorimeter/eflowTracks420 set InputArray HCal/eflowTracks 323 421 set OutputArray electrons 324 422 set Invert true … … 327 425 } 328 426 427 ################################################### 428 # Tower Merger (in case not using e-flow algorithm) 429 ################################################### 430 431 module Merger Calorimeter { 432 # add InputArray InputArray 433 add InputArray ECal/ecalTowers 434 add InputArray HCal/hcalTowers 435 set OutputArray towers 436 } 437 438 329 439 ########################## 330 440 # Track pile-up subtractor … … 333 443 module TrackPileUpSubtractor TrackPileUpSubtractor { 334 444 # add InputArray InputArray OutputArray 335 add InputArray Calorimeter/eflowTracks eflowTracks445 add InputArray HCal/eflowTracks eflowTracks 336 446 add InputArray ElectronFilter/electrons electrons 337 447 add InputArray MuonMomentumSmearing/muons muons … … 343 453 } 344 454 455 345 456 #################### 346 # Neutral tower merger457 # Neutral Tower merger 347 458 #################### 348 459 349 460 module Merger NeutralTowerMerger { 350 461 # add InputArray InputArray 351 add InputArray Calorimeter/eflowPhotons 352 add InputArray Calorimeter/eflowNeutralHadrons 353 set OutputArray eflowTowers 354 } 355 356 ################################## 357 # Energy flow merger (all tracks) 358 ################################## 359 360 module Merger EFlowMergerAllTracks { 361 # add InputArray InputArray 362 add InputArray TrackMerger/tracks 363 add InputArray Calorimeter/eflowPhotons 364 add InputArray Calorimeter/eflowNeutralHadrons 365 set OutputArray eflow 462 add InputArray ECal/eflowPhotons 463 add InputArray HCal/eflowNeutralHadrons 464 set OutputArray towers 366 465 } 367 466 … … 371 470 #################### 372 471 472 module Merger EFlowMergerAllTracks { 473 # add InputArray InputArray 474 add InputArray HCal/eflowTracks 475 add InputArray ECal/eflowPhotons 476 add InputArray HCal/eflowNeutralHadrons 477 set OutputArray eflow 478 } 479 480 481 482 483 #################### 484 # Energy flow merger 485 #################### 486 373 487 module Merger EFlowMerger { 374 488 # add InputArray InputArray 375 489 add InputArray TrackPileUpSubtractor/eflowTracks 376 add InputArray Calorimeter/eflowPhotons377 add InputArray Calorimeter/eflowNeutralHadrons490 add InputArray ECal/eflowPhotons 491 add InputArray HCal/eflowNeutralHadrons 378 492 set OutputArray eflow 379 493 } 380 381 382 494 383 495 ############# … … 450 562 } 451 563 452 453 454 564 ############ 455 565 # Jet finder … … 478 588 module PileUpJetID PileUpJetID { 479 589 set JetInputArray FastJetFinder/jets 480 set TrackInputArray Calorimeter/eflowTracks481 set NeutralInputArray NeutralTowerMerger/ eflowTowers590 set TrackInputArray HCal/eflowTracks 591 set NeutralInputArray NeutralTowerMerger/towers 482 592 483 593 set VertexInputArray PileUpMerger/vertices … … 524 634 525 635 module Efficiency PhotonEfficiency { 526 set InputArray Calorimeter/eflowPhotons636 set InputArray ECal/eflowPhotons 527 637 set OutputArray photons 528 638 … … 601 711 602 712 # efficiency formula for muons 603 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 604 (abs(eta) <= 1.5) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + 605 (abs(eta) <= 1.5) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + 606 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0 && pt <= 1.0e3) * (0.95) + 607 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 1.0e3) * (0.95 * exp(0.5 - pt*5.0e-4)) + 713 set EfficiencyFormula { (pt <= 10.0) * (0.00) + 714 (abs(eta) <= 1.5) * (pt > 10.0) * (0.95) + 715 (abs(eta) > 1.5 && abs(eta) <= 2.4) * (pt > 10.0) * (0.95) + 608 716 (abs(eta) > 2.4) * (0.00)} 717 609 718 } 610 719 … … 657 766 658 767 module JetFlavorAssociation JetFlavorAssociation { 659 768 660 769 set PartonInputArray Delphes/partons 661 770 set ParticleInputArray Delphes/allParticles 662 771 set ParticleLHEFInputArray Delphes/allParticlesLHEF 663 772 set JetInputArray JetEnergyScale/jets 664 773 665 774 set DeltaR 0.5 666 775 set PartonPTMin 1.0 … … 683 792 684 793 # based on arXiv:1211.4462 685 794 686 795 # default efficiency formula (misidentification rate) 687 796 add EfficiencyFormula {0} {0.01+0.000038*pt} -
classes/DelphesClasses.cc
rec5e04b rb9ae4c3 41 41 CompBase *Tower::fgCompare = CompE<Tower>::Instance(); 42 42 CompBase *HectorHit::fgCompare = CompE<HectorHit>::Instance(); 43 CompBase *Vertex::fgCompare = CompSumPT2<Vertex>::Instance(); 43 44 CompBase *Candidate::fgCompare = CompMomentumPt<Candidate>::Instance(); 44 45 … … 121 122 Charge(0), Mass(0.0), 122 123 IsPU(0), IsRecoPU(0), IsConstituent(0), IsFromConversion(0), 124 ClusterIndex(-1), ClusterNDF(0), ClusterSigma(0), SumPT2(0), BTVSumPT2(0), GenDeltaZ(0), GenSumPT2(0), 123 125 Flavor(0), FlavorAlgo(0), FlavorPhys(0), 124 126 BTag(0), BTagAlgo(0), BTagPhys(0), … … 127 129 Momentum(0.0, 0.0, 0.0, 0.0), 128 130 Position(0.0, 0.0, 0.0, 0.0), 131 PositionError(0.0, 0.0, 0.0, 0.0), 132 InitialPosition(0.0, 0.0, 0.0, 0.0), 129 133 Area(0.0, 0.0, 0.0, 0.0), 130 Dxy(0), SDxy(0), Xd(0), Yd(0), Zd(0), 134 L(0), 135 D0(0), ErrorD0(0), 136 DZ(0), ErrorDZ(0), 137 P(0), ErrorP(0), 138 PT(0), ErrorPT(0), 139 CtgTheta(0), ErrorCtgTheta(0), 140 Phi(0), ErrorPhi(0), 141 Xd(0), Yd(0), Zd(0), 131 142 TrackResolution(0), 132 143 NCharged(0), … … 245 256 object.IsConstituent = IsConstituent; 246 257 object.IsFromConversion = IsFromConversion; 258 object.ClusterIndex = ClusterIndex; 259 object.ClusterNDF = ClusterNDF; 260 object.ClusterSigma = ClusterSigma; 261 object.SumPT2 = SumPT2; 262 object.BTVSumPT2 = BTVSumPT2; 263 object.GenDeltaZ = GenDeltaZ; 264 object.GenSumPT2 = GenSumPT2; 247 265 object.Flavor = Flavor; 248 266 object.FlavorAlgo = FlavorAlgo; … … 262 280 object.Momentum = Momentum; 263 281 object.Position = Position; 282 object.InitialPosition = InitialPosition; 283 object.PositionError = PositionError; 264 284 object.Area = Area; 265 object.Dxy = Dxy; 266 object.SDxy = SDxy; 285 object.L = L; 286 object.ErrorT = ErrorT; 287 object.D0 = D0; 288 object.ErrorD0 = ErrorD0; 289 object.DZ = DZ; 290 object.ErrorDZ = ErrorDZ; 291 object.P = P; 292 object.ErrorP = ErrorP; 293 object.PT = PT; 294 object.ErrorPT = ErrorPT; 295 object.CtgTheta = CtgTheta ; 296 object.ErrorCtgTheta = ErrorCtgTheta; 297 object.Phi = Phi; 298 object.ErrorPhi = ErrorPhi; 267 299 object.Xd = Xd; 268 300 object.Yd = Yd; … … 282 314 object.SumPtChargedPU = SumPtChargedPU; 283 315 object.SumPt = SumPt; 284 316 object.ClusterIndex = ClusterIndex; 317 object.ClusterNDF = ClusterNDF; 318 object.ClusterSigma = ClusterSigma; 319 object.SumPT2 = SumPT2; 320 285 321 object.FracPt[0] = FracPt[0]; 286 322 object.FracPt[1] = FracPt[1]; … … 363 399 Momentum.SetXYZT(0.0, 0.0, 0.0, 0.0); 364 400 Position.SetXYZT(0.0, 0.0, 0.0, 0.0); 401 InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 365 402 Area.SetXYZT(0.0, 0.0, 0.0, 0.0); 366 Dxy = 0.0; 367 SDxy = 0.0; 403 L = 0.0; 404 ErrorT = 0.0; 405 D0 = 0.0; 406 ErrorD0 = 0.0; 407 DZ = 0.0; 408 ErrorDZ = 0.0; 409 P =0.0; 410 ErrorP =0.0; 411 PT = 0.0; 412 ErrorPT = 0.0; 413 CtgTheta = 0.0; 414 ErrorCtgTheta = 0.0; 415 Phi = 0.0; 416 ErrorPhi = 0.0; 368 417 Xd = 0.0; 369 418 Yd = 0.0; … … 387 436 SumPt = -999; 388 437 438 ClusterIndex = -1; 439 ClusterNDF = -99; 440 ClusterSigma = 0.0; 441 SumPT2 = 0.0; 442 BTVSumPT2 = 0.0; 443 GenDeltaZ = 0.0; 444 GenSumPT2 = 0.0; 445 389 446 FracPt[0] = 0.0; 390 447 FracPt[1] = 0.0; -
classes/DelphesClasses.h
rec5e04b rb9ae4c3 49 49 Long64_t Number; // event number 50 50 51 Float_t ReadTime; 52 Float_t ProcTime; 51 Float_t ReadTime; // read time 52 Float_t ProcTime; // processing time 53 53 54 54 ClassDef(Event, 1) … … 147 147 Float_t Pz; // particle momentum vector (z component) | hepevt.phep[number][2] 148 148 149 Float_t P; // particle momentum 149 150 Float_t PT; // particle transverse momentum 150 151 Float_t Eta; // particle pseudorapidity … … 152 153 153 154 Float_t Rapidity; // particle rapidity 155 Float_t CtgTheta; // particle cotangent of theta 156 157 Float_t D0; // particle transverse impact parameter 158 Float_t DZ; // particle longitudinal impact parameter 154 159 155 160 Float_t T; // particle vertex position (t component) | hepevt.vhep[number][3] … … 163 168 TLorentzVector P4() const; 164 169 165 ClassDef(GenParticle, 1) 166 }; 167 168 //--------------------------------------------------------------------------- 169 170 class Vertex: public TObject 171 { 172 public: 170 ClassDef(GenParticle, 2) 171 }; 172 173 //--------------------------------------------------------------------------- 174 175 class Vertex: public SortableObject 176 { 177 public: 178 173 179 Float_t T; // vertex position (t component) 174 180 Float_t X; // vertex position (x component) … … 176 182 Float_t Z; // vertex position (z component) 177 183 178 ClassDef(Vertex, 1) 184 Double_t ErrorT; // vertex position error (t component) 185 Double_t ErrorX; // vertex position error (x component) 186 Double_t ErrorY; // vertex position error (y component) 187 Double_t ErrorZ; // vertex position error (z component) 188 189 Int_t Index; // vertex index 190 Int_t NDF; // number of degrees of freedom 191 192 Double_t Sigma; // vertex position (z component) error 193 Double_t SumPT2; // sum pt^2 of tracks attached to the vertex 194 Double_t GenSumPT2; // sum pt^2 of gen tracks attached to the vertex 195 196 Double_t GenDeltaZ; // distance in z to closest generated vertex 197 Double_t BTVSumPT2; // sum pt^2 of tracks attached to the secondary vertex 198 199 TRefArray Constituents; // references to constituents 200 201 static CompBase *fgCompare; //! 202 const CompBase *GetCompare() const { return fgCompare; } 203 204 ClassDef(Vertex, 3) 179 205 }; 180 206 … … 236 262 Float_t E; // photon energy 237 263 238 Float_t T; // particle arrival time of flight264 Float_t T; // particle arrival time of flight 239 265 240 266 Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter … … 242 268 TRefArray Particles; // references to generated particles 243 269 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; 270 Float_t IsolationVar; // isolation variable 271 Float_t IsolationVarRhoCorr; // isolation variable 272 Float_t SumPtCharged; // isolation variable 273 Float_t SumPtNeutral; // isolation variable 274 Float_t SumPtChargedPU; // isolation variable 275 Float_t SumPt; // isolation variable 252 276 253 277 static CompBase *fgCompare; //! … … 269 293 Float_t Phi; // electron azimuthal angle 270 294 271 Float_t T; // particle arrival time of flight295 Float_t T; // particle arrival time of flight 272 296 273 297 Int_t Charge; // electron charge … … 277 301 TRef Particle; // reference to generated particle 278 302 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; 303 Float_t IsolationVar; // isolation variable 304 Float_t IsolationVarRhoCorr; // isolation variable 305 Float_t SumPtCharged; // isolation variable 306 Float_t SumPtNeutral; // isolation variable 307 Float_t SumPtChargedPU; // isolation variable 308 Float_t SumPt; // isolation variable 287 309 288 310 static CompBase *fgCompare; //! … … 304 326 Float_t Phi; // muon azimuthal angle 305 327 306 Float_t T; // particle arrival time of flight328 Float_t T; // particle arrival time of flight 307 329 308 330 Int_t Charge; // muon charge … … 310 332 TRef Particle; // reference to generated particle 311 333 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; 334 Float_t IsolationVar; // isolation variable 335 Float_t IsolationVarRhoCorr; // isolation variable 336 Float_t SumPtCharged; // isolation variable 337 Float_t SumPtNeutral; // isolation variable 338 Float_t SumPtChargedPU; // isolation variable 339 Float_t SumPt; // isolation variable 320 340 321 341 static CompBase *fgCompare; //! … … 344 364 Float_t DeltaPhi; // jet radius in azimuthal angle 345 365 346 UInt_t Flavor; 347 UInt_t FlavorAlgo; 348 UInt_t FlavorPhys; 366 UInt_t Flavor; // jet flavor 367 UInt_t FlavorAlgo; // jet flavor 368 UInt_t FlavorPhys; // jet flavor 349 369 350 370 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; 371 UInt_t BTagAlgo; // 0 or 1 for a jet that has been tagged as containing a heavy quark 372 UInt_t BTagPhys; // 0 or 1 for a jet that has been tagged as containing a heavy quark 353 373 354 374 UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau … … 397 417 Int_t Charge; // track charge 398 418 419 Float_t P; // track momentum 399 420 Float_t PT; // track transverse momentum 400 401 421 Float_t Eta; // track pseudorapidity 402 422 Float_t Phi; // track azimuthal angle 423 Float_t CtgTheta; // track cotangent of theta 403 424 404 425 Float_t EtaOuter; // track pseudorapidity at the tracker edge 405 426 Float_t PhiOuter; // track azimuthal angle at the tracker edge 406 427 428 Float_t T; // track vertex position (t component) 407 429 Float_t X; // track vertex position (x component) 408 430 Float_t Y; // track vertex position (y component) 409 431 Float_t Z; // track vertex position (z component) 410 Float_t T; // track vertex position (z component) 411 432 433 Float_t TOuter; // track position (t component) at the tracker edge 412 434 Float_t XOuter; // track position (x component) at the tracker edge 413 435 Float_t YOuter; // track position (y component) at the tracker edge 414 436 Float_t ZOuter; // track position (z component) at the tracker edge 415 Float_t TOuter; // track position (z component) at the tracker edge 416 417 Float_t Dxy; // track signed transverse impact parameter 418 Float_t SDxy; // signed error on the track signed transverse impact parameter 419 Float_t Xd; // X coordinate of point of closest approach to vertex 420 Float_t Yd; // Y coordinate of point of closest approach to vertex 421 Float_t Zd; // Z coordinate of point of closest approach to vertex 437 438 Float_t Xd; // X coordinate of point of closest approach to vertex 439 Float_t Yd; // Y coordinate of point of closest approach to vertex 440 Float_t Zd; // Z coordinate of point of closest approach to vertex 441 442 Float_t L; // track path length 443 Float_t D0; // track transverse impact parameter 444 Float_t DZ; // track longitudinal impact parameter 445 446 Float_t ErrorP; // track momentum error 447 Float_t ErrorPT; // track transverse momentum error 448 Float_t ErrorPhi; // track azimuthal angle error 449 Float_t ErrorCtgTheta; // track cotangent of theta error 450 451 Float_t ErrorT; // time measurement error 452 Float_t ErrorD0; // track transverse impact parameter error 453 Float_t ErrorDZ; // track longitudinal impact parameter error 422 454 423 455 TRef Particle; // reference to generated particle 424 456 425 static CompBase *fgCompare; //! 426 const CompBase *GetCompare() const { return fgCompare; } 427 428 TLorentzVector P4() const; 429 430 ClassDef(Track, 2) 457 Int_t VertexIndex; // reference to vertex 458 459 static CompBase *fgCompare; //! 460 const CompBase *GetCompare() const { return fgCompare; } 461 462 TLorentzVector P4() const; 463 464 ClassDef(Track, 3) 431 465 }; 432 466 … … 526 560 Float_t DeltaPhi; 527 561 528 TLorentzVector Momentum, Position, Area; 529 530 Float_t Dxy; 531 Float_t SDxy; 562 TLorentzVector Momentum, Position, InitialPosition, PositionError, Area; 563 564 Float_t L; // path length 565 Float_t ErrorT; // path length 566 Float_t D0; 567 Float_t ErrorD0; 568 Float_t DZ; 569 Float_t ErrorDZ; 570 Float_t P; 571 Float_t ErrorP; 572 Float_t PT; 573 Float_t ErrorPT; 574 Float_t CtgTheta; 575 Float_t ErrorCtgTheta; 576 Float_t Phi; 577 Float_t ErrorPhi; 578 532 579 Float_t Xd; 533 580 Float_t Yd; … … 535 582 536 583 // tracking resolution 537 584 538 585 Float_t TrackResolution; 539 586 … … 562 609 Float_t SumPt; 563 610 611 // vertex variables 612 613 Int_t ClusterIndex; 614 Int_t ClusterNDF; 615 Double_t ClusterSigma; 616 Double_t SumPT2; 617 Double_t BTVSumPT2; 618 Double_t GenDeltaZ; 619 Double_t GenSumPT2; 620 564 621 // N-subjettiness variables 565 622 … … 595 652 void SetFactory(DelphesFactory *factory) { fFactory = factory; } 596 653 597 ClassDef(Candidate, 4)654 ClassDef(Candidate, 5) 598 655 }; 599 656 -
classes/SortableObject.h
rec5e04b rb9ae4c3 156 156 return -1; 157 157 else if(t1->ET < t2->ET) 158 return 1; 159 else 160 return 0; 161 } 162 }; 163 164 //--------------------------------------------------------------------------- 165 166 template <typename T> 167 class CompSumPT2: public CompBase 168 { 169 CompSumPT2() {} 170 public: 171 static CompSumPT2 *Instance() 172 { 173 static CompSumPT2 single; 174 return &single; 175 } 176 177 Int_t Compare(const TObject *obj1, const TObject *obj2) const 178 { 179 const T *t1 = static_cast<const T*>(obj1); 180 const T *t2 = static_cast<const T*>(obj2); 181 if(t1->SumPT2 > t2->SumPT2) 182 return -1; 183 else if(t1->SumPT2 < t2->SumPT2) 158 184 return 1; 159 185 else -
doc/RootTreeDescription.html
rec5e04b rb9ae4c3 27 27 <td></td> 28 28 </tr> 29 <tr class="odd"> 30 <td>ReadTime</td> 31 <td>read time</td> 32 <td></td> 33 </tr> 34 <tr class="even"> 35 <td>ProcTime</td> 36 <td>processing time</td> 37 <td></td> 38 </tr> 29 39 <tr class="class"><td colspan="3" id="LHCOEvent">class LHCOEvent</td></tr> 30 40 <tr class="odd"> … … 69 79 <td> hepup.AQCDUP</td> 70 80 </tr> 81 <tr class="class"><td colspan="3" id="LHEFWeight">class LHEFWeight</td></tr> 82 <tr class="even"> 83 <td>ID</td> 84 <td>weight ID</td> 85 <td></td> 86 </tr> 87 <tr class="odd"> 88 <td>Weight</td> 89 <td>weight value</td> 90 <td></td> 91 </tr> 71 92 <tr class="class"><td colspan="3" id="HepMCEvent">class HepMCEvent</td></tr> 72 93 <tr class="odd"> … … 207 228 </tr> 208 229 <tr class="odd"> 230 <td>P</td> 231 <td>particle momentum</td> 232 <td></td> 233 </tr> 234 <tr class="even"> 209 235 <td>PT</td> 210 236 <td>particle transverse momentum</td> 211 237 <td></td> 212 238 </tr> 213 <tr class=" even">239 <tr class="odd"> 214 240 <td>Eta</td> 215 241 <td>particle pseudorapidity</td> 216 242 <td></td> 217 243 </tr> 218 <tr class=" odd">244 <tr class="even"> 219 245 <td>Phi</td> 220 246 <td>particle azimuthal angle</td> 221 247 <td></td> 222 248 </tr> 223 <tr class=" even">249 <tr class="odd"> 224 250 <td>Rapidity</td> 225 251 <td>particle rapidity</td> 252 <td></td> 253 </tr> 254 <tr class="even"> 255 <td>CtgTheta</td> 256 <td>particle cotangent of theta</td> 257 <td></td> 258 </tr> 259 <tr class="odd"> 260 <td>D0</td> 261 <td>particle transverse impact parameter</td> 262 <td></td> 263 </tr> 264 <tr class="even"> 265 <td>DZ</td> 266 <td>particle longitudinal impact parameter</td> 226 267 <td></td> 227 268 </tr> … … 267 308 <td></td> 268 309 </tr> 310 <tr class="even"> 311 <td>ErrorT</td> 312 <td>vertex position error (t component)</td> 313 <td></td> 314 </tr> 315 <tr class="odd"> 316 <td>ErrorX</td> 317 <td>vertex position error (x component)</td> 318 <td></td> 319 </tr> 320 <tr class="even"> 321 <td>ErrorY</td> 322 <td>vertex position error (y component)</td> 323 <td></td> 324 </tr> 325 <tr class="odd"> 326 <td>ErrorZ</td> 327 <td>vertex position error (z component)</td> 328 <td></td> 329 </tr> 330 <tr class="even"> 331 <td>Index</td> 332 <td>vertex index</td> 333 <td></td> 334 </tr> 335 <tr class="odd"> 336 <td>NDF</td> 337 <td>number of degrees of freedom</td> 338 <td></td> 339 </tr> 340 <tr class="even"> 341 <td>Sigma</td> 342 <td>vertex position (z component) error</td> 343 <td></td> 344 </tr> 345 <tr class="odd"> 346 <td>SumPT2</td> 347 <td>sum pt^2 of tracks attached to the vertex</td> 348 <td></td> 349 </tr> 350 <tr class="even"> 351 <td>GenSumPT2</td> 352 <td>sum pt^2 of gen tracks attached to the vertex</td> 353 <td></td> 354 </tr> 355 <tr class="odd"> 356 <td>GenDeltaZ</td> 357 <td>distance in z to closest generated vertex</td> 358 <td></td> 359 </tr> 360 <tr class="even"> 361 <td>BTVSumPT2</td> 362 <td>sum pt^2 of tracks attached to the secondary vertex</td> 363 <td></td> 364 </tr> 365 <tr class="odd"> 366 <td>Constituents</td> 367 <td>references to constituents</td> 368 <td></td> 369 </tr> 269 370 <tr class="class"><td colspan="3" id="MissingET">class MissingET</td></tr> 270 371 <tr class="even"> … … 328 429 </tr> 329 430 <tr class="even"> 431 <td>T</td> 432 <td>particle arrival time of flight</td> 433 <td></td> 434 </tr> 435 <tr class="odd"> 330 436 <td>EhadOverEem</td> 331 437 <td>ratio of the hadronic versus electromagnetic energy deposited in the calorimeter</td> 332 438 <td></td> 333 439 </tr> 334 <tr class=" odd">440 <tr class="even"> 335 441 <td>Particles</td> 336 442 <td>references to generated particles</td> 337 443 <td></td> 338 444 </tr> 445 <tr class="odd"> 446 <td>IsolationVar</td> 447 <td>isolation variable</td> 448 <td></td> 449 </tr> 450 <tr class="even"> 451 <td>IsolationVarRhoCorr</td> 452 <td>isolation variable</td> 453 <td></td> 454 </tr> 455 <tr class="odd"> 456 <td>SumPtCharged</td> 457 <td>isolation variable</td> 458 <td></td> 459 </tr> 460 <tr class="even"> 461 <td>SumPtNeutral</td> 462 <td>isolation variable</td> 463 <td></td> 464 </tr> 465 <tr class="odd"> 466 <td>SumPtChargedPU</td> 467 <td>isolation variable</td> 468 <td></td> 469 </tr> 470 <tr class="even"> 471 <td>SumPt</td> 472 <td>isolation variable</td> 473 <td></td> 474 </tr> 339 475 <tr class="class"><td colspan="3" id="Electron">class Electron</td></tr> 340 476 <tr class="even"> … … 354 490 </tr> 355 491 <tr class="odd"> 492 <td>T</td> 493 <td>particle arrival time of flight</td> 494 <td></td> 495 </tr> 496 <tr class="even"> 356 497 <td>Charge</td> 357 498 <td>electron charge</td> 358 499 <td></td> 359 500 </tr> 360 <tr class=" even">501 <tr class="odd"> 361 502 <td>EhadOverEem</td> 362 503 <td>ratio of the hadronic versus electromagnetic energy deposited in the calorimeter</td> 363 504 <td></td> 364 505 </tr> 365 <tr class=" odd">506 <tr class="even"> 366 507 <td>Particle</td> 367 508 <td>reference to generated particle</td> 368 509 <td></td> 369 510 </tr> 511 <tr class="odd"> 512 <td>IsolationVar</td> 513 <td>isolation variable</td> 514 <td></td> 515 </tr> 516 <tr class="even"> 517 <td>IsolationVarRhoCorr</td> 518 <td>isolation variable</td> 519 <td></td> 520 </tr> 521 <tr class="odd"> 522 <td>SumPtCharged</td> 523 <td>isolation variable</td> 524 <td></td> 525 </tr> 526 <tr class="even"> 527 <td>SumPtNeutral</td> 528 <td>isolation variable</td> 529 <td></td> 530 </tr> 531 <tr class="odd"> 532 <td>SumPtChargedPU</td> 533 <td>isolation variable</td> 534 <td></td> 535 </tr> 536 <tr class="even"> 537 <td>SumPt</td> 538 <td>isolation variable</td> 539 <td></td> 540 </tr> 370 541 <tr class="class"><td colspan="3" id="Muon">class Muon</td></tr> 371 542 <tr class="even"> … … 385 556 </tr> 386 557 <tr class="odd"> 558 <td>T</td> 559 <td>particle arrival time of flight</td> 560 <td></td> 561 </tr> 562 <tr class="even"> 387 563 <td>Charge</td> 388 564 <td>muon charge</td> 389 565 <td></td> 390 566 </tr> 391 <tr class=" even">567 <tr class="odd"> 392 568 <td>Particle</td> 393 569 <td>reference to generated particle</td> 394 570 <td></td> 395 571 </tr> 572 <tr class="even"> 573 <td>IsolationVar</td> 574 <td>isolation variable</td> 575 <td></td> 576 </tr> 577 <tr class="odd"> 578 <td>IsolationVarRhoCorr</td> 579 <td>isolation variable</td> 580 <td></td> 581 </tr> 582 <tr class="even"> 583 <td>SumPtCharged</td> 584 <td>isolation variable</td> 585 <td></td> 586 </tr> 587 <tr class="odd"> 588 <td>SumPtNeutral</td> 589 <td>isolation variable</td> 590 <td></td> 591 </tr> 592 <tr class="even"> 593 <td>SumPtChargedPU</td> 594 <td>isolation variable</td> 595 <td></td> 596 </tr> 597 <tr class="odd"> 598 <td>SumPt</td> 599 <td>isolation variable</td> 600 <td></td> 601 </tr> 396 602 <tr class="class"><td colspan="3" id="Jet">class Jet</td></tr> 397 603 <tr class="even"> … … 416 622 </tr> 417 623 <tr class="even"> 624 <td>Flavor</td> 625 <td>jet flavor</td> 626 <td></td> 627 </tr> 628 <tr class="odd"> 629 <td>FlavorAlgo</td> 630 <td>jet flavor</td> 631 <td></td> 632 </tr> 633 <tr class="even"> 634 <td>FlavorPhys</td> 635 <td>jet flavor</td> 636 <td></td> 637 </tr> 638 <tr class="odd"> 418 639 <td>BTag</td> 419 640 <td>0 or 1 for a jet that has been tagged as containing a heavy quark</td> 420 641 <td></td> 421 642 </tr> 422 <tr class="odd"> 643 <tr class="even"> 644 <td>BTagAlgo</td> 645 <td>0 or 1 for a jet that has been tagged as containing a heavy quark</td> 646 <td></td> 647 </tr> 648 <tr class="odd"> 649 <td>BTagPhys</td> 650 <td>0 or 1 for a jet that has been tagged as containing a heavy quark</td> 651 <td></td> 652 </tr> 653 <tr class="even"> 423 654 <td>TauTag</td> 424 655 <td>0 or 1 for a jet that has been tagged as a tau</td> 425 656 <td></td> 426 657 </tr> 427 <tr class=" even">658 <tr class="odd"> 428 659 <td>Charge</td> 429 660 <td>tau charge</td> 430 661 <td></td> 431 662 </tr> 432 <tr class=" odd">663 <tr class="even"> 433 664 <td>EhadOverEem</td> 434 665 <td>ratio of the hadronic versus electromagnetic energy deposited in the calorimeter</td> 435 666 <td></td> 436 667 </tr> 437 <tr class=" even">668 <tr class="odd"> 438 669 <td>NCharged</td> 439 <td>number of charged constituents 440 <td></td> 441 </tr> 442 <tr class=" odd">670 <td>number of charged constituents</td> 671 <td></td> 672 </tr> 673 <tr class="even"> 443 674 <td>NNeutrals</td> 444 <td>number of neutral constituents 445 <td></td> 446 </tr> 447 <tr class=" even">675 <td>number of neutral constituents</td> 676 <td></td> 677 </tr> 678 <tr class="odd"> 448 679 <td>Beta</td> 449 <td>(sum pt of charged pile-up constituents)/(sum pt of charged constituents) 450 <td></td> 451 </tr> 452 <tr class=" odd">680 <td>(sum pt of charged pile-up constituents)/(sum pt of charged constituents)</td> 681 <td></td> 682 </tr> 683 <tr class="even"> 453 684 <td>BetaStar</td> 454 <td>(sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents) 455 <td></td> 456 </tr> 457 <tr class=" even">685 <td>(sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents)</td> 686 <td></td> 687 </tr> 688 <tr class="odd"> 458 689 <td>MeanSqDeltaR</td> 459 690 <td>average distance (squared) between constituent and jet weighted by pt (squared) of constituent</td> 460 691 <td></td> 461 692 </tr> 462 <tr class=" odd">693 <tr class="even"> 463 694 <td>PTD</td> 464 695 <td>average pt between constituent and jet weighted by pt of constituent</td> 465 696 <td></td> 466 697 </tr> 467 <tr class=" even">698 <tr class="odd"> 468 699 <td>FracPt[5]</td> 469 <td>(sum pt of constituents within a ring 0.1*i < DeltaR < 0.1*(i+1))/(sum pt of constituents) </td> 470 <td></td> 471 </tr> 472 <tr class="odd"> 473 <td>Tau1</td> 474 <td>1-subjettiness</td> 475 <td></td> 476 </tr> 477 <tr class="even"> 478 <td>Tau2</td> 479 <td>2-subjettiness</td> 480 <td></td> 481 </tr> 482 <tr class="odd"> 483 <td>Tau3</td> 484 <td>3-subjettiness</td> 485 <td></td> 486 </tr> 487 <tr class="even"> 488 <td>Tau4</td> 489 <td>4-subjettiness</td> 490 <td></td> 491 </tr> 492 <tr class="odd"> 493 <td>Tau5</td> 494 <td>5-subjettiness</td> 495 <td></td> 496 </tr> 497 <tr class="even"> 700 <td>(sum pt of constituents within a ring 0.1*i < DeltaR < 0.1*(i+1))/(sum pt of constituents)</td> 701 <td></td> 702 </tr> 703 <tr class="even"> 704 <td>Tau[5]</td> 705 <td>N-subjettiness</td> 706 <td></td> 707 </tr> 708 <tr class="odd"> 709 <td>TrimmedP4[5]</td> 710 <td>first entry (i = 0) is the total Trimmed Jet 4-momenta and from i = 1 to 4 are the trimmed subjets 4-momenta</td> 711 <td></td> 712 </tr> 713 <tr class="even"> 714 <td>PrunedP4[5]</td> 715 <td>first entry (i = 0) is the total Pruned Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta</td> 716 <td></td> 717 </tr> 718 <tr class="odd"> 719 <td>SoftDroppedP4[5]</td> 720 <td>first entry (i = 0) is the total SoftDropped Jet 4-momenta and from i = 1 to 4 are the pruned subjets 4-momenta</td> 721 <td></td> 722 </tr> 723 <tr class="even"> 724 <td>NSubJetsTrimmed</td> 725 <td>number of subjets trimmed</td> 726 <td></td> 727 </tr> 728 <tr class="odd"> 729 <td>NSubJetsPruned</td> 730 <td>number of subjets pruned</td> 731 <td></td> 732 </tr> 733 <tr class="even"> 734 <td>NSubJetsSoftDropped</td> 735 <td>number of subjets soft-dropped</td> 736 <td></td> 737 </tr> 738 <tr class="odd"> 498 739 <td>Constituents</td> 499 740 <td>references to constituents</td> 500 741 <td></td> 501 742 </tr> 502 <tr class=" odd">743 <tr class="even"> 503 744 <td>Particles</td> 504 745 <td>references to generated particles</td> … … 517 758 </tr> 518 759 <tr class="even"> 760 <td>P</td> 761 <td>track momentum</td> 762 <td></td> 763 </tr> 764 <tr class="odd"> 519 765 <td>PT</td> 520 766 <td>track transverse momentum</td> 521 767 <td></td> 522 768 </tr> 523 <tr class=" odd">769 <tr class="even"> 524 770 <td>Eta</td> 525 771 <td>track pseudorapidity</td> 526 772 <td></td> 527 773 </tr> 528 <tr class=" even">774 <tr class="odd"> 529 775 <td>Phi</td> 530 776 <td>track azimuthal angle</td> 531 777 <td></td> 532 778 </tr> 779 <tr class="even"> 780 <td>CtgTheta</td> 781 <td>track cotangent of theta</td> 782 <td></td> 783 </tr> 533 784 <tr class="odd"> 534 785 <td>EtaOuter</td> … … 542 793 </tr> 543 794 <tr class="odd"> 795 <td>T</td> 796 <td>track vertex position (t component)</td> 797 <td></td> 798 </tr> 799 <tr class="even"> 544 800 <td>X</td> 545 801 <td>track vertex position (x component)</td> 546 802 <td></td> 547 803 </tr> 548 <tr class=" even">804 <tr class="odd"> 549 805 <td>Y</td> 550 806 <td>track vertex position (y component)</td> 551 807 <td></td> 552 808 </tr> 553 <tr class=" odd">809 <tr class="even"> 554 810 <td>Z</td> 555 811 <td>track vertex position (z component)</td> 556 812 <td></td> 557 813 </tr> 558 <tr class=" even">559 <td>T </td>560 <td>track vertex position (z component)</td>561 <td></td> 562 </tr> 563 <tr class=" odd">814 <tr class="odd"> 815 <td>TOuter</td> 816 <td>track position (t component) at the tracker edge</td> 817 <td></td> 818 </tr> 819 <tr class="even"> 564 820 <td>XOuter</td> 565 821 <td>track position (x component) at the tracker edge</td> 566 822 <td></td> 567 823 </tr> 568 <tr class=" even">824 <tr class="odd"> 569 825 <td>YOuter</td> 570 826 <td>track position (y component) at the tracker edge</td> 571 827 <td></td> 572 828 </tr> 573 <tr class=" odd">829 <tr class="even"> 574 830 <td>ZOuter</td> 575 831 <td>track position (z component) at the tracker edge</td> 576 832 <td></td> 577 833 </tr> 578 <tr class="even"> 579 <td>TOuter</td> 580 <td>track position (z component) at the tracker edge</td> 581 <td></td> 582 </tr> 583 <tr class="odd"> 834 <tr class="odd"> 835 <td>Xd</td> 836 <td>X coordinate of point of closest approach to vertex</td> 837 <td></td> 838 </tr> 839 <tr class="even"> 840 <td>Yd</td> 841 <td>Y coordinate of point of closest approach to vertex</td> 842 <td></td> 843 </tr> 844 <tr class="odd"> 845 <td>Zd</td> 846 <td>Z coordinate of point of closest approach to vertex</td> 847 <td></td> 848 </tr> 849 <tr class="even"> 850 <td>L</td> 851 <td>track path length</td> 852 <td></td> 853 </tr> 854 <tr class="odd"> 855 <td>D0</td> 856 <td>track transverse impact parameter</td> 857 <td></td> 858 </tr> 859 <tr class="even"> 860 <td>DZ</td> 861 <td>track longitudinal impact parameter</td> 862 <td></td> 863 </tr> 864 <tr class="odd"> 865 <td>ErrorP</td> 866 <td>track momentum error</td> 867 <td></td> 868 </tr> 869 <tr class="even"> 870 <td>ErrorPT</td> 871 <td>track transverse momentum error</td> 872 <td></td> 873 </tr> 874 <tr class="odd"> 875 <td>ErrorPhi</td> 876 <td>track azimuthal angle error</td> 877 <td></td> 878 </tr> 879 <tr class="even"> 880 <td>ErrorCtgTheta</td> 881 <td>track cotangent of theta error</td> 882 <td></td> 883 </tr> 884 <tr class="odd"> 885 <td>ErrorT</td> 886 <td>time measurement error</td> 887 <td></td> 888 </tr> 889 <tr class="even"> 890 <td>ErrorD0</td> 891 <td>track transverse impact parameter error</td> 892 <td></td> 893 </tr> 894 <tr class="odd"> 895 <td>ErrorDZ</td> 896 <td>track longitudinal impact parameter error</td> 897 <td></td> 898 </tr> 899 <tr class="even"> 584 900 <td>Particle</td> 585 901 <td>reference to generated particle</td> 586 902 <td></td> 587 903 </tr> 904 <tr class="odd"> 905 <td>VertexIndex</td> 906 <td>reference to vertex</td> 907 <td></td> 908 </tr> 588 909 <tr class="class"><td colspan="3" id="Tower">class Tower</td></tr> 589 910 <tr class="even"> … … 608 929 </tr> 609 930 <tr class="even"> 931 <td>T</td> 932 <td>ecal deposit time, averaged by sqrt(EM energy) over all particles, not smeared</td> 933 <td></td> 934 </tr> 935 <tr class="odd"> 936 <td>NTimeHits</td> 937 <td>number of hits contributing to time measurement</td> 938 <td></td> 939 </tr> 940 <tr class="even"> 610 941 <td>Eem</td> 611 942 <td>calorimeter tower electromagnetic energy</td> -
doc/genMakefile.tcl
rec5e04b rb9ae4c3 263 263 executableDeps {converters/*.cpp} {examples/*.cpp} 264 264 265 executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp} 265 executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp} {readers/DelphesROOT.cpp} 266 266 267 267 puts {ifeq ($(HAS_CMSSW),true)} -
doc/update_fastjet.sh
rec5e04b rb9ae4c3 1 version=3. 1.31 version=3.2.1 2 2 3 3 wget http://fastjet.fr/repo/fastjet-${version}.tar.gz … … 93 93 94 94 sed -i 's/#include "siscone\//#include "/' SISCone/SISConePlugin.cc 95 95 sed -i 's/#include <siscone\/config.h>/#include "config.h"/' SISCone/split_merge.h 96 96 cd - -
examples/Pythia8/configParticleGun.cmnd
rec5e04b rb9ae4c3 3 3 ! 1) Settings used in the main program. 4 4 5 Main:numberOfEvents = 10000 5 Main:numberOfEvents = 10000 ! number of events to generate 6 6 Main:timesAllowErrors = 3 ! how many aborts before run stops 7 Main:spareFlag1 = on ! true means particle gun 8 Main:spareMode1 = 11 ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 22 - single photon 9 Main:spareParm1 = 10000 ! max pt 7 Main:spareFlag1 = on ! true means particle gun 8 Main:spareMode1 = 11 ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 15 - single tau, 22 - single photon 9 Main:spareParm1 = 10000 ! max pt 10 Main:spareParm2 = 2.5 ! max eta 10 11 11 12 ! 2) Settings related to output in init(), next() and stat(). -
external/fastjet/CircularRange.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: CircularRange.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: CircularRange.hh 4074 2016-03-08 09:09:25Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 35 35 #include "fastjet/RangeDefinition.hh" 36 36 #include "fastjet/Error.hh" 37 #include "fastjet/internal/deprecated.hh" 37 38 38 39 // for backwards compatibility: one should now use SelectorCircle, … … 50 51 public: 51 52 /// constructor 53 FASTJET_DEPRECATED_MSG("CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead") 52 54 CircularRange() {_set_invalid_rapphi();} 53 55 54 56 /// initialise CircularRange with a jet 57 FASTJET_DEPRECATED_MSG("CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead") 55 58 CircularRange(const fastjet::PseudoJet & jet, double distance) { 56 59 _distance = distance; … … 60 63 61 64 /// initialise CircularRange with a (rap,phi) point 65 FASTJET_DEPRECATED_MSG("CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead") 62 66 CircularRange(double rap, double phi, double distance) { 63 67 _distance = distance; … … 67 71 68 72 /// initialise CircularRange with just the radius parameter 73 FASTJET_DEPRECATED_MSG("CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead") 69 74 CircularRange(double distance) { 70 75 _set_invalid_rapphi(); … … 76 81 77 82 /// return description of range 78 virtual inline std::string description() const {83 virtual inline std::string description() const FASTJET_OVERRIDE { 79 84 std::ostringstream ostr; 80 85 ostr << "CircularRange: within distance "<< _distance << " of given jet or point." ; … … 83 88 /// returns true since this range is localizable (i.e. set_position 84 89 /// does something meaningful) 85 virtual inline bool is_localizable() const { return true; }90 virtual inline bool is_localizable() const FASTJET_OVERRIDE { return true; } 86 91 87 92 /// return bool according to whether (rap,phi) is in range 88 virtual inline bool is_in_range(double rap, double phi) const {93 virtual inline bool is_in_range(double rap, double phi) const FASTJET_OVERRIDE { 89 94 if (! _rapphi_are_valid()) { 90 95 throw Error("Circular range used without a center having being defined (use set_position())"); … … 98 103 99 104 /// return the minimal and maximal rapidity of this range 100 virtual inline void get_rap_limits(double & rapmin, double & rapmax) const {105 virtual inline void get_rap_limits(double & rapmin, double & rapmax) const FASTJET_OVERRIDE { 101 106 rapmin = _rapjet - _distance; 102 107 rapmax = _rapjet + _distance; } -
external/fastjet/ClosestPair2D.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClosestPair2D.cc 3433 2014-07-23 08:17:03Z salam$2 // $Id: ClosestPair2D.cc 4059 2016-03-03 20:49:48Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 145 145 146 146 // and create the search tree 147 _trees[ishift] = auto_ptr<Tree>(new Tree(shuffles, max_size));147 _trees[ishift] = SharedPtr<Tree>(new Tree(shuffles, max_size)); 148 148 149 149 // now we look for the closest-pair candidates on this tree … … 174 174 mindists2[i] = _points[i].neighbour_dist2;} 175 175 176 _heap = auto_ptr<MinHeap>(new MinHeap(mindists2, max_size));176 _heap = SharedPtr<MinHeap>(new MinHeap(mindists2, max_size)); 177 177 } 178 178 -
external/fastjet/ClusterSequence.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequence.cc 3809 2015-02-20 13:05:13Z soyez $2 // $Id: ClusterSequence.cc 4154 2016-07-20 16:20:48Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 152 152 // set the pointer in the wrapper to this object to NULL to say that 153 153 // we're going out of scope 154 if (_structure_shared_ptr ()){155 ClusterSequenceStructure* csi = dynamic_cast<ClusterSequenceStructure*>(_structure_shared_ptr ());154 if (_structure_shared_ptr){ 155 ClusterSequenceStructure* csi = dynamic_cast<ClusterSequenceStructure*>(_structure_shared_ptr.get()); 156 156 // normally the csi is purely internal so it really should not be 157 157 // NULL i.e assert should be OK … … 724 724 } 725 725 726 bool code_should_never_reach_here = false; 727 assert(code_should_never_reach_here); 726 //bool code_should_never_reach_here = false; 727 //assert(code_should_never_reach_here); 728 729 assert(0 && "Code should never reach here"); 730 728 731 return N2MHTLazy9; 729 732 … … 775 778 776 779 780 ClusterSequence & ClusterSequence::operator=(const ClusterSequence & cs) { 781 // self assignment is trivial 782 if (&cs != this) { 783 _deletes_self_when_unused = false; 784 transfer_from_sequence(cs); 785 } 786 return *this; 787 } 788 777 789 //---------------------------------------------------------------------- 778 790 // transfer the sequence contained in other_seq into our own; … … 815 827 816 828 // clean up existing structure 817 if (_structure_shared_ptr ()) {829 if (_structure_shared_ptr) { 818 830 // If there are jets associated with an old version of the CS and 819 831 // a new one, keeping track of when to delete the CS becomes more … … 823 835 // anything that is currently associated with the cluster sequence 824 836 // should be told that its cluster sequence no longer exists 825 ClusterSequenceStructure* csi = dynamic_cast<ClusterSequenceStructure*>(_structure_shared_ptr ());837 ClusterSequenceStructure* csi = dynamic_cast<ClusterSequenceStructure*>(_structure_shared_ptr.get()); 826 838 assert(csi != NULL); 827 839 csi->set_associated_cs(NULL); … … 1455 1467 // initialise the history in a standard way 1456 1468 void ClusterSequence::_add_step_to_history ( 1457 const int step_number, const int parent1, 1469 //NO_LONGER_USED: const int step_number, 1470 const int parent1, 1458 1471 const int parent2, const int jetp_index, 1459 1472 const double dij) { … … 1469 1482 1470 1483 int local_step = _history.size()-1; 1471 assert(local_step == step_number); 1484 //#ifndef __NO_ASSERTS__ 1485 //assert(local_step == step_number); 1486 //#endif 1472 1487 1473 1488 // sanity check: make sure the particles have not already been recombined … … 1669 1684 int hist_j = _jets[jet_j].cluster_hist_index(); 1670 1685 1671 _add_step_to_history( newstep_k,min(hist_i, hist_j), max(hist_i,hist_j),1686 _add_step_to_history(min(hist_i, hist_j), max(hist_i,hist_j), 1672 1687 newjet_k, dij); 1688 1689 // _add_step_to_history(newstep_k, min(hist_i, hist_j), max(hist_i,hist_j), 1690 // newjet_k, dij); 1691 1673 1692 1674 1693 } … … 1680 1699 void ClusterSequence::_do_iB_recombination_step( 1681 1700 const int jet_i, const double diB) { 1682 // get history index1683 int newstep_k = _history.size();1684 1685 1701 // recombine the jet with the beam 1686 _add_step_to_history( newstep_k,_jets[jet_i].cluster_hist_index(),BeamJet,1702 _add_step_to_history(_jets[jet_i].cluster_hist_index(),BeamJet, 1687 1703 Invalid, diB); 1704 1705 // // get history index 1706 // int newstep_k = _history.size(); 1707 // 1708 // _add_step_to_history(newstep_k,_jets[jet_i].cluster_hist_index(),BeamJet, 1709 // Invalid, diB); 1688 1710 1689 1711 } -
external/fastjet/ClusterSequence.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: ClusterSequence.hh 3911 2015-07-02 12:09:58Z salam$5 // $Id: ClusterSequence.hh 4154 2016-07-20 16:20:48Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 49 49 #include "fastjet/ClusterSequenceStructure.hh" 50 50 51 #include "fastjet/internal/deprecated.hh" 52 51 53 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 52 54 … … 80 82 } 81 83 84 /// explicit assignment operator for a ClusterSequence 85 ClusterSequence & operator=(const ClusterSequence & cs); 86 82 87 // virtual ClusterSequence destructor, in case any derived class 83 88 // thinks of needing a destructor at some point … … 362 367 /// As of FJ v3.1, this is deprecated, in line with the deprecation 363 368 /// of auto_ptr in C++11 364 inline void plugin_associate_extras(std::auto_ptr<Extras> extras_in) { 369 #ifdef FASTJET_HAVE_AUTO_PTR_INTERFACE 370 FASTJET_DEPRECATED_MSG("Please use ClusterSequence::plugin_associate_extras(Extras * extras_in)) instead") 371 inline void plugin_associate_extras(std::auto_ptr<Extras> extras_in){ 365 372 _extras.reset(extras_in.release()); 366 373 } 374 #endif 367 375 368 376 /// returns true when the plugin is allowed to run the show. … … 730 738 void _fast_NsqrtN_cluster(); 731 739 732 void _add_step_to_history(const int step_number, const int parent1, 733 const int parent2, const int jetp_index, 734 const double dij); 740 void _add_step_to_history( //const int step_number, 741 const int parent1, 742 const int parent2, const int jetp_index, 743 const double dij); 735 744 736 745 /// internal routine associated with the construction of the unique … … 1037 1046 template <class J> inline double ClusterSequence::_bj_dist( 1038 1047 const J * const jetA, const J * const jetB) const { 1048 //#define FASTJET_NEW_DELTA_PHI 1049 #ifndef FASTJET_NEW_DELTA_PHI 1050 //GPS+MC old version of Delta phi calculation 1039 1051 double dphi = std::abs(jetA->phi - jetB->phi); 1040 1052 double deta = (jetA->eta - jetB->eta); 1041 1053 if (dphi > pi) {dphi = twopi - dphi;} 1054 #else 1055 //GPS+MC testing for 2015-02-faster-deltaR2 1056 double dphi = pi-std::abs(pi-std::abs(jetA->phi - jetB->phi)); 1057 double deta = (jetA->eta - jetB->eta); 1058 #endif 1042 1059 return dphi*dphi + deta*deta; 1043 1060 } -
external/fastjet/ClusterSequence1GhostPassiveArea.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequence1GhostPassiveArea.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: ClusterSequence1GhostPassiveArea.hh 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 70 70 /// AreaBase one rather than the ActiveArea one (which for which we 71 71 /// do not have the information). 72 virtual double n_empty_jets(const Selector & selector) const {72 virtual double n_empty_jets(const Selector & selector) const FASTJET_OVERRIDE { 73 73 return ClusterSequenceAreaBase::n_empty_jets(selector); 74 74 } -
external/fastjet/ClusterSequenceActiveArea.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequenceActiveArea.hh 3619 2014-08-13 14:17:19Z salam$2 // $Id: ClusterSequenceActiveArea.hh 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 74 74 const bool & writeout_combinations = false) ; 75 75 76 virtual double area (const PseudoJet & jet) const {76 virtual double area (const PseudoJet & jet) const FASTJET_OVERRIDE { 77 77 return _average_area[jet.cluster_hist_index()];}; 78 virtual double area_error (const PseudoJet & jet) const {78 virtual double area_error (const PseudoJet & jet) const FASTJET_OVERRIDE { 79 79 return _average_area2[jet.cluster_hist_index()];}; 80 80 81 virtual PseudoJet area_4vector (const PseudoJet & jet) const {81 virtual PseudoJet area_4vector (const PseudoJet & jet) const FASTJET_OVERRIDE { 82 82 return _average_area_4vector[jet.cluster_hist_index()];}; 83 83 … … 110 110 /// 111 111 /// The selector passed as an argument needs to apply jet by jet. 112 virtual double empty_area(const Selector & selector) const ;112 virtual double empty_area(const Selector & selector) const FASTJET_OVERRIDE; 113 113 114 114 /// return the true number of empty jets (replaces 115 115 /// ClusterSequenceAreaBase::n_empty_jets(...)) 116 virtual double n_empty_jets(const Selector & selector) const ;116 virtual double n_empty_jets(const Selector & selector) const FASTJET_OVERRIDE; 117 117 118 118 protected: -
external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequenceActiveAreaExplicitGhosts.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: ClusterSequenceActiveAreaExplicitGhosts.hh 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 97 97 98 98 /// returns the area of a jet 99 virtual double area (const PseudoJet & jet) const ;99 virtual double area (const PseudoJet & jet) const FASTJET_OVERRIDE; 100 100 101 101 /// returns a four vector corresponding to the sum (E-scheme) of the … … 103 103 /// for a small contiguous area the p_t of the extended_area jet is 104 104 /// equal to area of the jet. 105 virtual PseudoJet area_4vector (const PseudoJet & jet) const ;105 virtual PseudoJet area_4vector (const PseudoJet & jet) const FASTJET_OVERRIDE; 106 106 107 107 /// true if a jet is made exclusively of ghosts 108 virtual bool is_pure_ghost(const PseudoJet & jet) const ;108 virtual bool is_pure_ghost(const PseudoJet & jet) const FASTJET_OVERRIDE; 109 109 110 110 /// true if the entry in the history index corresponds to a … … 114 114 115 115 /// this class does have explicit ghosts 116 virtual bool has_explicit_ghosts() const {return true;}116 virtual bool has_explicit_ghosts() const FASTJET_OVERRIDE {return true;} 117 117 118 118 /// return the total area, corresponding to a given Selector, that … … 120 120 /// 121 121 /// The selector needs to apply jet by jet 122 virtual double empty_area(const Selector & selector) const ;122 virtual double empty_area(const Selector & selector) const FASTJET_OVERRIDE; 123 123 124 124 /// returns the total area under study -
external/fastjet/ClusterSequenceArea.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequenceArea.hh 3484 2014-07-29 21:39:39Z soyez$2 // $Id: ClusterSequenceArea.hh 4098 2016-03-15 16:38:22Z salam $ 3 3 // 4 4 // Copyright (c) 2006-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 80 80 81 81 /// return the area associated with the given jet 82 virtual double area (const PseudoJet & jet) const {82 virtual double area (const PseudoJet & jet) const FASTJET_OVERRIDE { 83 83 return _area_base->area(jet);} 84 84 85 85 /// return the error (uncertainty) associated with the determination 86 86 /// of the area of this jet 87 virtual double area_error (const PseudoJet & jet) const {87 virtual double area_error (const PseudoJet & jet) const FASTJET_OVERRIDE { 88 88 return _area_base->area_error(jet);} 89 89 90 90 /// return the 4-vector area 91 virtual PseudoJet area_4vector(const PseudoJet & jet) const {91 virtual PseudoJet area_4vector(const PseudoJet & jet) const FASTJET_OVERRIDE { 92 92 return _area_base->area_4vector(jet);} 93 93 … … 110 110 /// jet (see the BackgroundEstimator and Subtractor tools for more 111 111 /// advanced usage) 112 virtual double empty_area(const Selector & selector) const {112 virtual double empty_area(const Selector & selector) const FASTJET_OVERRIDE { 113 113 return _area_base->empty_area(selector);} 114 114 … … 122 122 /// jet (see the BackgroundEstimator and Subtractor tools for more 123 123 /// advanced usage) 124 virtual double n_empty_jets(const Selector & selector) const {124 virtual double n_empty_jets(const Selector & selector) const FASTJET_OVERRIDE { 125 125 return _area_base->n_empty_jets(selector); 126 126 } 127 127 128 128 /// true if a jet is made exclusively of ghosts 129 virtual bool is_pure_ghost(const PseudoJet & jet) const {129 virtual bool is_pure_ghost(const PseudoJet & jet) const FASTJET_OVERRIDE { 130 130 return _area_base->is_pure_ghost(jet); 131 131 } 132 132 133 133 /// true if this ClusterSequence has explicit ghosts 134 virtual bool has_explicit_ghosts() const {134 virtual bool has_explicit_ghosts() const FASTJET_OVERRIDE { 135 135 return _area_base->has_explicit_ghosts(); 136 136 } … … 144 144 /// jet (see the BackgroundEstimator and Subtractor tools for more 145 145 /// advanced usage) 146 //FASTJET_DEPRECATED_MSG("ClusterSequenceArea::get_median_rho_and_sigma(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 146 147 virtual void get_median_rho_and_sigma(const std::vector<PseudoJet> & all_jets, 147 148 const Selector & selector, … … 149 150 double & median, double & sigma, 150 151 double & mean_area, 151 bool all_are_incl = false) const {152 bool all_are_incl = false) const FASTJET_OVERRIDE { 152 153 _warn_if_range_unsuitable(selector); 153 ClusterSequenceAreaBase:: get_median_rho_and_sigma(154 ClusterSequenceAreaBase::_get_median_rho_and_sigma( 154 155 all_jets, selector, use_area_4vector, 155 156 median, sigma, mean_area, all_are_incl); … … 160 161 /// since we've overridden the 5-argument version above, we have to 161 162 /// override the 4-argument version too. 163 //FASTJET_DEPRECATED_MSG("ClusterSequenceArea::get_median_rho_and_sigma(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 162 164 virtual void get_median_rho_and_sigma(const Selector & selector, 163 165 bool use_area_4vector, 164 double & median, double & sigma) const {165 ClusterSequenceAreaBase:: get_median_rho_and_sigma(selector,use_area_4vector,166 median,sigma);166 double & median, double & sigma) const FASTJET_OVERRIDE { 167 ClusterSequenceAreaBase::_get_median_rho_and_sigma(selector,use_area_4vector, 168 median,sigma); 167 169 } 168 170 … … 171 173 /// since we've overridden the multi-argument version above, we have to 172 174 /// override the 5-argument version too. 175 //FASTJET_DEPRECATED_MSG("ClusterSequenceArea::get_median_rho_and_sigma(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 173 176 virtual void get_median_rho_and_sigma(const Selector & selector, 174 177 bool use_area_4vector, 175 178 double & median, double & sigma, 176 double & mean_area) const {177 ClusterSequenceAreaBase:: get_median_rho_and_sigma(selector,use_area_4vector,178 median,sigma, mean_area);179 double & mean_area) const FASTJET_OVERRIDE { 180 ClusterSequenceAreaBase::_get_median_rho_and_sigma(selector,use_area_4vector, 181 median,sigma, mean_area); 179 182 } 180 183 … … 183 186 /// additionally checks compatibility between "range" and region in which 184 187 /// ghosts are thrown. 188 //FASTJET_DEPRECATED_MSG("ClusterSequenceArea::parabolic_pt_per_unit_area(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 185 189 virtual void parabolic_pt_per_unit_area(double & a, double & b, 186 190 const Selector & selector, 187 191 double exclude_above=-1.0, 188 bool use_area_4vector=false) const { 189 _warn_if_range_unsuitable(selector); 190 ClusterSequenceAreaBase::parabolic_pt_per_unit_area( 191 a,b,selector, exclude_above, use_area_4vector); 192 bool use_area_4vector=false) const FASTJET_OVERRIDE { 193 return _parabolic_pt_per_unit_area(a,b,selector,exclude_above,use_area_4vector); 192 194 } 193 195 … … 204 206 const JetDefinition & jet_def); 205 207 206 std::auto_ptr<ClusterSequenceAreaBase> _area_base;208 SharedPtr<ClusterSequenceAreaBase> _area_base; 207 209 AreaDefinition _area_def; 208 210 static LimitedWarning _range_warnings; 209 211 static LimitedWarning _explicit_ghosts_repeats_warnings; 212 213 // the following set of private methods are all deprecated. Their 214 // role is simply to hide the corresponding methods (without the 215 // first underscore) from the public interface so that they can be 216 // used internally until all the deprecated methods are removed. 217 // DO NOT USE ANY OF THESE METHODS: THEY ARE DEPRECATED AND WILL BE 218 // REMOVED. 219 virtual void _parabolic_pt_per_unit_area(double & a, double & b, 220 const Selector & selector, 221 double exclude_above=-1.0, 222 bool use_area_4vector=false) const FASTJET_OVERRIDE { 223 _warn_if_range_unsuitable(selector); 224 ClusterSequenceAreaBase::_parabolic_pt_per_unit_area( 225 a,b,selector, exclude_above, use_area_4vector); 226 } 210 227 211 228 }; … … 254 271 } 255 272 // now copy across the information from the area base class 256 _area_base = std::auto_ptr<ClusterSequenceAreaBase>(_area_base_ptr);273 _area_base = SharedPtr<ClusterSequenceAreaBase>(_area_base_ptr); 257 274 transfer_from_sequence(*_area_base); 258 275 } -
external/fastjet/ClusterSequenceAreaBase.cc
rec5e04b rb9ae4c3 1 1 2 2 //FJSTARTHEADER 3 // $Id: ClusterSequenceAreaBase.cc 3433 2014-07-23 08:17:03Z salam$3 // $Id: ClusterSequenceAreaBase.cc 4079 2016-03-09 12:20:03Z soyez $ 4 4 // 5 5 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 79 79 } 80 80 81 // this is deprecated but used by other deprecated methods. So we hide 82 // the implementation in a protected method so that (i) it can still 83 // be used internally (without generating a compile-time warning when 84 // building FastJet) and the interface can be marked as deprecated. 85 // This can disappear once all the public interfaces have disappeared. 81 86 double ClusterSequenceAreaBase::median_pt_per_unit_area(const Selector & selector) const { 82 return median_pt_per_unit_something(selector,false); 83 } 84 87 return _median_pt_per_unit_area(selector); 88 } 89 90 // the hidden implementation 91 double ClusterSequenceAreaBase::_median_pt_per_unit_area(const Selector & selector) const { 92 return _median_pt_per_unit_something(selector,false); 93 } 94 95 96 97 // this is deprecated but used by other deprecated methods. So we hide 98 // the implementation in a protected method so that (i) it can still 99 // be used internally (without generating a compile-time warning when 100 // building FastJet) and the interface can be marked as deprecated. 101 // This can disappear once all the public interfaces have disappeared. 85 102 double ClusterSequenceAreaBase::median_pt_per_unit_area_4vector(const Selector & selector) const { 86 return median_pt_per_unit_something(selector,true); 87 } 88 89 90 //---------------------------------------------------------------------- 91 /// the median of (pt/area) for jets contained within range, counting 92 /// the empty area as if it were made up of a collection of empty 93 /// jets each of area (0.55 * pi R^2). 103 return _median_pt_per_unit_area_4vector(selector); 104 } 105 106 // the deprecated interface 107 double ClusterSequenceAreaBase::_median_pt_per_unit_area_4vector(const Selector & selector) const { 108 return _median_pt_per_unit_something(selector,true); 109 } 110 111 112 //---------------------------------------------------------------------- 113 // this is deprecated but used by other deprecated methods. So we hide 114 // the implementation in a protected method so that (i) it can still 115 // be used internally (without generating a compile-time warning when 116 // building FastJet) and the interface can be marked as deprecated. 117 // This can disappear once all the public interfaces have disappeared. 94 118 double ClusterSequenceAreaBase::median_pt_per_unit_something( 95 119 const Selector & selector, bool use_area_4vector) const { 96 120 return _median_pt_per_unit_something(selector, use_area_4vector); 121 } 122 123 // the median of (pt/area) for jets contained within range, counting 124 // the empty area as if it were made up of a collection of empty 125 // jets each of area (0.55 * pi R^2). 126 double ClusterSequenceAreaBase::_median_pt_per_unit_something( 127 const Selector & selector, bool use_area_4vector) const { 97 128 double median, sigma, mean_area; 98 get_median_rho_and_sigma(selector, use_area_4vector, median, sigma, mean_area);129 _get_median_rho_and_sigma(selector, use_area_4vector, median, sigma, mean_area); 99 130 return median; 100 101 } 102 103 104 //---------------------------------------------------------------------- 105 /// fits a form pt_per_unit_area(y) = a + b*y^2 for jets in range. 106 /// exclude_above allows one to exclude large values of pt/area from fit. 107 /// use_area_4vector = true uses the 4vector areas. 131 } 132 133 134 //---------------------------------------------------------------------- 135 /// fits a form pt_per_unit_area(y) = a + b*y^2 for jets in range. 136 /// exclude_above allows one to exclude large values of pt/area from 137 /// fit. use_area_4vector = true uses the 4vector areas. 108 138 void ClusterSequenceAreaBase::parabolic_pt_per_unit_area( 139 double & a, double & b, const Selector & selector, 140 double exclude_above, bool use_area_4vector) const { 141 return _parabolic_pt_per_unit_area(a, b, selector, exclude_above, use_area_4vector); 142 } 143 144 void ClusterSequenceAreaBase::_parabolic_pt_per_unit_area( 109 145 double & a, double & b, const Selector & selector, 110 146 double exclude_above, bool use_area_4vector) const { … … 161 197 162 198 163 199 //---------------------------------------------------------------------- 164 200 void ClusterSequenceAreaBase::get_median_rho_and_sigma( 165 201 const Selector & selector, bool use_area_4vector, 166 202 double & median, double & sigma, double & mean_area) const { 203 _get_median_rho_and_sigma(selector, use_area_4vector, median, sigma, mean_area); 204 } 205 206 void ClusterSequenceAreaBase::_get_median_rho_and_sigma( 207 const Selector & selector, bool use_area_4vector, 208 double & median, double & sigma, double & mean_area) const { 167 209 168 210 vector<PseudoJet> incl_jets = inclusive_jets(); 169 get_median_rho_and_sigma(incl_jets, selector, use_area_4vector, 170 median, sigma, mean_area, true); 171 } 172 211 _get_median_rho_and_sigma(incl_jets, selector, use_area_4vector, 212 median, sigma, mean_area, true); 213 } 173 214 174 215 void ClusterSequenceAreaBase::get_median_rho_and_sigma( 216 const vector<PseudoJet> & all_jets, 217 const Selector & selector, bool use_area_4vector, 218 double & median, double & sigma, double & mean_area, 219 bool all_are_incl) const { 220 _get_median_rho_and_sigma(all_jets, selector, use_area_4vector, 221 median, sigma, mean_area, all_are_incl); 222 } 223 224 void ClusterSequenceAreaBase::_get_median_rho_and_sigma( 175 225 const vector<PseudoJet> & all_jets, 176 226 const Selector & selector, bool use_area_4vector, … … 288 338 289 339 290 // /return a vector of all subtracted jets, using area_4vector, given rho.291 // /Only inclusive_jets above ptmin are subtracted and returned.292 // /the ordering is the same as that of sorted_by_pt(cs.inclusive_jets()),293 // /i.e. not necessarily ordered in pt once subtracted340 // return a vector of all subtracted jets, using area_4vector, given rho. 341 // Only inclusive_jets above ptmin are subtracted and returned. 342 // the ordering is the same as that of sorted_by_pt(cs.inclusive_jets()), 343 // i.e. not necessarily ordered in pt once subtracted 294 344 vector<PseudoJet> ClusterSequenceAreaBase::subtracted_jets(const double rho, 295 345 const double ptmin) 296 346 const { 347 return _subtracted_jets(rho,ptmin); 348 } 349 350 vector<PseudoJet> ClusterSequenceAreaBase::_subtracted_jets(const double rho, 351 const double ptmin) 352 const { 297 353 vector<PseudoJet> sub_jets; 298 354 vector<PseudoJet> jets_local = sorted_by_pt(inclusive_jets(ptmin)); 299 355 for (unsigned i=0; i<jets_local.size(); i++) { 300 PseudoJet sub_jet = subtracted_jet(jets_local[i],rho);356 PseudoJet sub_jet = _subtracted_jet(jets_local[i],rho); 301 357 sub_jets.push_back(sub_jet); 302 358 } … … 304 360 } 305 361 306 // /return a vector of subtracted jets, using area_4vector.307 // /Only inclusive_jets above ptmin are subtracted and returned.308 // /the ordering is the same as that of sorted_by_pt(cs.inclusive_jets()),309 // /i.e. not necessarily ordered in pt once subtracted362 // return a vector of subtracted jets, using area_4vector. 363 // Only inclusive_jets above ptmin are subtracted and returned. 364 // the ordering is the same as that of sorted_by_pt(cs.inclusive_jets()), 365 // i.e. not necessarily ordered in pt once subtracted 310 366 vector<PseudoJet> ClusterSequenceAreaBase::subtracted_jets( 311 367 const Selector & selector, 312 368 const double ptmin) 313 369 const { 314 double rho = median_pt_per_unit_area_4vector(selector);315 return subtracted_jets(rho,ptmin);370 double rho = _median_pt_per_unit_area_4vector(selector); 371 return _subtracted_jets(rho,ptmin); 316 372 } 317 373 … … 320 376 PseudoJet ClusterSequenceAreaBase::subtracted_jet(const PseudoJet & jet, 321 377 const double rho) const { 378 return _subtracted_jet(jet, rho); 379 } 380 381 PseudoJet ClusterSequenceAreaBase::_subtracted_jet(const PseudoJet & jet, 382 const double rho) const { 322 383 PseudoJet area4vect = area_4vector(jet); 323 384 PseudoJet sub_jet; … … 343 404 PseudoJet ClusterSequenceAreaBase::subtracted_jet(const PseudoJet & jet, 344 405 const Selector & selector) const { 345 double rho = median_pt_per_unit_area_4vector(selector); 346 PseudoJet sub_jet = subtracted_jet(jet, rho); 406 return _subtracted_jet(jet, selector); 407 } 408 409 PseudoJet ClusterSequenceAreaBase::_subtracted_jet(const PseudoJet & jet, 410 const Selector & selector) const { 411 double rho = _median_pt_per_unit_area_4vector(selector); 412 PseudoJet sub_jet = _subtracted_jet(jet, rho); 347 413 return sub_jet; 348 414 } … … 353 419 const double rho, 354 420 bool use_area_4vector) const { 421 return _subtracted_pt(jet, rho, use_area_4vector); 422 } 423 424 double ClusterSequenceAreaBase::_subtracted_pt(const PseudoJet & jet, 425 const double rho, 426 bool use_area_4vector) const { 355 427 if ( use_area_4vector ) { 356 PseudoJet sub_jet = subtracted_jet(jet,rho);428 PseudoJet sub_jet = _subtracted_jet(jet,rho); 357 429 return sub_jet.perp(); 358 430 } else { … … 369 441 bool use_area_4vector) const { 370 442 if ( use_area_4vector ) { 371 PseudoJet sub_jet = subtracted_jet(jet,selector);443 PseudoJet sub_jet = _subtracted_jet(jet,selector); 372 444 return sub_jet.perp(); 373 445 } else { 374 double rho = median_pt_per_unit_area(selector);375 return subtracted_pt(jet,rho,false);446 double rho = _median_pt_per_unit_area(selector); 447 return _subtracted_pt(jet,rho,false); 376 448 } 377 449 } -
external/fastjet/ClusterSequenceAreaBase.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequenceAreaBase.hh 3433 2014-07-23 08:17:03Z salam $2 // $Id: ClusterSequenceAreaBase.hh 4098 2016-03-15 16:38:22Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 35 35 #include "fastjet/LimitedWarning.hh" 36 36 #include "fastjet/Selector.hh" 37 #include "fastjet/internal/deprecated.hh" 37 38 38 39 FASTJET_BEGIN_NAMESPACE … … 144 145 /// apply jet-by-jet (see the BackgroundEstimator and Subtractor 145 146 /// tools for more generic usages) 147 FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::median_pt_per_unit_area(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 146 148 double median_pt_per_unit_area(const Selector & selector) const; 147 149 … … 151 153 /// The selector passed as an argument has to have a finite area and 152 154 /// apply jet-by-jet 155 FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::median_pt_per_unit_area_4vector(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 153 156 double median_pt_per_unit_area_4vector(const Selector & selector) const; 154 157 … … 157 160 /// - something_is_area_4vect = false -> use plain area 158 161 /// - something_is_area_4vect = true -> use 4-vector area 159 double median_pt_per_unit_something( 160 const Selector & selector, bool use_area_4vector) const; 162 FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::median_pt_per_unit_something(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 163 double median_pt_per_unit_something(const Selector & selector, 164 bool use_area_4vector) const; 161 165 162 166 /// using jets withing the selector range (and with 4-vector areas if … … 184 188 /// using a scalar area causes one to neglect terms of relative 185 189 /// order $R^2/8$ in the jet $p_t$. 190 //FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::get_median_rho_and_sigma(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 186 191 virtual void get_median_rho_and_sigma(const Selector & selector, 187 192 bool use_area_4vector, … … 208 213 /// apply jet-by-jet (see the BackgroundEstimator and Subtractor 209 214 /// tools for more generic usages) 215 //FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::get_median_rho_and_sigma(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 210 216 virtual void get_median_rho_and_sigma(const std::vector<PseudoJet> & all_jets, 211 217 const Selector & selector, … … 221 227 /// apply jet-by-jet (see the BackgroundEstimator and Subtractor 222 228 /// tools for more generic usages) 229 //FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::get_median_rho_and_sigma(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 223 230 virtual void get_median_rho_and_sigma(const Selector & selector, 224 bool use_area_4vector, 225 double & median, double & sigma) const { 226 double mean_area; 227 get_median_rho_and_sigma(selector, use_area_4vector, 228 median, sigma, mean_area); 231 bool use_area_4vector, 232 double & median, double & sigma) const{ 233 return _get_median_rho_and_sigma(selector, use_area_4vector, median, sigma); 229 234 } 230 235 … … 238 243 /// apply jet-by-jet (see the BackgroundEstimator and Subtractor 239 244 /// tools for more generic usages) 245 //FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::parabolic_pt_per_unit_area(...) is deprecated since FastJet 3.0. Use the BackgroundEstimator series of tools instead") 240 246 virtual void parabolic_pt_per_unit_area(double & a, double & b, 241 247 const Selector & selector, … … 247 253 /// the ordering is the same as that of sorted_by_pt(cs.inclusive_jets()), 248 254 /// i.e. not necessarily ordered in pt once subtracted 255 FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::subtracted_jets(...) is deprecated since FastJet 3.0. Use the Subtractor tool (with the BackgroundEstimator series of tools) instead") 249 256 std::vector<PseudoJet> subtracted_jets(const double rho, 250 257 const double ptmin=0.0) const; … … 258 265 /// apply jet-by-jet (see the BackgroundEstimator and Subtractor 259 266 /// tools for more generic usages) 267 FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::subtracted_jets(...) is deprecated since FastJet 3.0. Use the Subtractor tool (with the BackgroundEstimator series of tools) instead") 260 268 std::vector<PseudoJet> subtracted_jets(const Selector & selector, 261 269 const double ptmin=0.0) const; 262 270 263 271 /// return a subtracted jet, using area_4vector, given rho 272 FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::subtracted_jet(...) is deprecated since FastJet 3.0. Use the Subtractor tool (with the BackgroundEstimator series of tools) instead") 264 273 PseudoJet subtracted_jet(const PseudoJet & jet, 265 274 const double rho) const; … … 273 282 /// apply jet-by-jet (see the BackgroundEstimator and Subtractor 274 283 /// tools for more generic usages) 284 FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::subtracted_jet(...) is deprecated since FastJet 3.0. Use the Subtractor tool (with the BackgroundEstimator series of tools) instead") 275 285 PseudoJet subtracted_jet(const PseudoJet & jet, 276 286 const Selector & selector) const; 277 287 278 288 /// return the subtracted pt, given rho 289 FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::subtracted_pt(...) is deprecated since FastJet 3.0. Use the Subtractor tool (with the BackgroundEstimator series of tools) instead") 279 290 double subtracted_pt(const PseudoJet & jet, 280 291 const double rho, … … 288 299 /// apply jet-by-jet (see the BackgroundEstimator and Subtractor 289 300 /// tools for more generic usages) 301 FASTJET_DEPRECATED_MSG("ClusterSequenceAreaBase::subtracted_pt(...) is deprecated since FastJet 3.0. Use the Subtractor tool (with the BackgroundEstimator series of tools) instead") 290 302 double subtracted_pt(const PseudoJet & jet, 291 303 const Selector & selector, … … 296 308 void _check_selector_good_for_median(const Selector &selector) const; 297 309 310 // the following set of protected methods are all deprecated. Their 311 // role is simply to hide the corresponding methods (without the 312 // first underscore) from the public interface so that they can be 313 // used internally until all the deprecated methods are removed. 314 // DO NOT USE ANY OF THESE METHODS: THEY ARE DEPRECATED AND WILL BE 315 // REMOVED. 316 virtual void _get_median_rho_and_sigma(const Selector & selector, 317 bool use_area_4vector, 318 double & median, double & sigma, 319 double & mean_area) const; 320 virtual void _get_median_rho_and_sigma(const std::vector<PseudoJet> & all_jets, 321 const Selector & selector, 322 bool use_area_4vector, 323 double & median, double & sigma, 324 double & mean_area, 325 bool all_are_inclusive = false) const; 326 virtual void _get_median_rho_and_sigma(const Selector & selector, 327 bool use_area_4vector, 328 double & median, double & sigma) const { 329 double mean_area; 330 _get_median_rho_and_sigma(selector, use_area_4vector, 331 median, sigma, mean_area); 332 } 333 virtual void _parabolic_pt_per_unit_area(double & a, double & b, 334 const Selector & selector, 335 double exclude_above=-1.0, 336 bool use_area_4vector=false) const; 298 337 299 338 private: … … 305 344 /// check the jet algorithm is suitable (and if not issue a warning) 306 345 void _check_jet_alg_good_for_median() const; 307 346 347 // the following set of private methods are all deprecated. Their 348 // role is simply to hide the corresponding methods (without the 349 // first underscore) from the public interface so that they can be 350 // used internally until all the deprecated methods are removed. 351 // DO NOT USE ANY OF THESE METHODS: THEY ARE DEPRECATED AND WILL BE 352 // REMOVED. 353 double _median_pt_per_unit_area(const Selector & selector) const; 354 double _median_pt_per_unit_area_4vector(const Selector & selector) const; 355 double _median_pt_per_unit_something(const Selector & selector, 356 bool use_area_4vector) const; 357 std::vector<PseudoJet> _subtracted_jets(const double rho, 358 const double ptmin=0.0) const; 359 PseudoJet _subtracted_jet(const PseudoJet & jet, 360 const double rho) const; 361 PseudoJet _subtracted_jet(const PseudoJet & jet, 362 const Selector & selector) const; 363 double _subtracted_pt(const PseudoJet & jet, 364 const double rho, 365 bool use_area_4vector=false) const; 308 366 }; 309 367 -
external/fastjet/ClusterSequencePassiveArea.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequencePassiveArea.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: ClusterSequencePassiveArea.hh 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 65 65 /// return an empty area that's appropriate to the passive area 66 66 /// determination carried out 67 virtual double empty_area(const Selector & selector) const ;67 virtual double empty_area(const Selector & selector) const FASTJET_OVERRIDE; 68 68 69 69 private: -
external/fastjet/ClusterSequenceStructure.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequenceStructure.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: ClusterSequenceStructure.hh 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 76 76 77 77 /// description 78 virtual std::string description() const{ return "PseudoJet with an associated ClusterSequence"; } 78 virtual std::string description() const FASTJET_OVERRIDE{ 79 return "PseudoJet with an associated ClusterSequence"; 80 } 79 81 80 82 //------------------------------------------------------------- … … 85 87 //------------------------------------------------------------- 86 88 /// returns true if there is an associated ClusterSequence 87 virtual bool has_associated_cluster_sequence() const { return true;}89 virtual bool has_associated_cluster_sequence() const FASTJET_OVERRIDE{ return true;} 88 90 89 91 /// get a (const) pointer to the parent ClusterSequence (NULL if 90 92 /// inexistent) 91 virtual const ClusterSequence* associated_cluster_sequence() const ;93 virtual const ClusterSequence* associated_cluster_sequence() const FASTJET_OVERRIDE; 92 94 93 95 /// returns true if there is a valid associated ClusterSequence 94 virtual bool has_valid_cluster_sequence() const ;96 virtual bool has_valid_cluster_sequence() const FASTJET_OVERRIDE; 95 97 96 98 /// if the jet has a valid associated cluster sequence then return a 97 99 /// pointer to it; otherwise throw an error 98 virtual const ClusterSequence * validated_cs() const ;100 virtual const ClusterSequence * validated_cs() const FASTJET_OVERRIDE; 99 101 100 102 #ifndef __FJCORE__ 101 103 /// if the jet has valid area information then return a pointer to 102 104 /// the associated ClusterSequenceAreaBase object; otherwise throw an error 103 virtual const ClusterSequenceAreaBase * validated_csab() const ;105 virtual const ClusterSequenceAreaBase * validated_csab() const FASTJET_OVERRIDE; 104 106 #endif // __FJCORE__ 105 107 … … 125 127 /// an Error is thrown if this PseudoJet has no currently valid 126 128 /// associated ClusterSequence 127 virtual bool has_partner(const PseudoJet &reference, PseudoJet &partner) const ;129 virtual bool has_partner(const PseudoJet &reference, PseudoJet &partner) const FASTJET_OVERRIDE; 128 130 129 131 /// check if it has been recombined with another PseudoJet in which … … 133 135 /// an Error is thrown if this PseudoJet has no currently valid 134 136 /// associated ClusterSequence 135 virtual bool has_child(const PseudoJet &reference, PseudoJet &child) const ;137 virtual bool has_child(const PseudoJet &reference, PseudoJet &child) const FASTJET_OVERRIDE; 136 138 137 139 /// check if it is the product of a recombination, in which case … … 141 143 /// an Error is thrown if this PseudoJet has no currently valid 142 144 /// associated ClusterSequence 143 virtual bool has_parents(const PseudoJet &reference, PseudoJet &parent1, PseudoJet &parent2) const ;145 virtual bool has_parents(const PseudoJet &reference, PseudoJet &parent1, PseudoJet &parent2) const FASTJET_OVERRIDE; 144 146 145 147 /// check if the reference PseudoJet is contained in the second one … … 151 153 /// false is returned if the 2 PseudoJet do not belong the same 152 154 /// ClusterSequence 153 virtual bool object_in_jet(const PseudoJet &reference, const PseudoJet &jet) const ;155 virtual bool object_in_jet(const PseudoJet &reference, const PseudoJet &jet) const FASTJET_OVERRIDE; 154 156 155 157 /// return true if the structure supports constituents. … … 157 159 /// an Error is thrown if this PseudoJet has no currently valid 158 160 /// associated ClusterSequence 159 virtual bool has_constituents() const ;161 virtual bool has_constituents() const FASTJET_OVERRIDE; 160 162 161 163 /// retrieve the constituents. … … 163 165 /// an Error is thrown if this PseudoJet has no currently valid 164 166 /// associated ClusterSequence 165 virtual std::vector<PseudoJet> constituents(const PseudoJet &reference) const ;167 virtual std::vector<PseudoJet> constituents(const PseudoJet &reference) const FASTJET_OVERRIDE; 166 168 167 169 … … 170 172 /// an Error is thrown if this PseudoJet has no currently valid 171 173 /// associated ClusterSequence 172 virtual bool has_exclusive_subjets() const ;174 virtual bool has_exclusive_subjets() const FASTJET_OVERRIDE; 173 175 174 176 /// return a vector of all subjets of the current jet (in the sense … … 183 185 /// an Error is thrown if this PseudoJet has no currently valid 184 186 /// associated ClusterSequence 185 virtual std::vector<PseudoJet> exclusive_subjets(const PseudoJet &reference, const double & dcut) const ;187 virtual std::vector<PseudoJet> exclusive_subjets(const PseudoJet &reference, const double & dcut) const FASTJET_OVERRIDE; 186 188 187 189 /// return the size of exclusive_subjets(...); still n ln n with same … … 191 193 /// an Error is thrown if this PseudoJet has no currently valid 192 194 /// associated ClusterSequence 193 virtual int n_exclusive_subjets(const PseudoJet &reference, const double & dcut) const ;195 virtual int n_exclusive_subjets(const PseudoJet &reference, const double & dcut) const FASTJET_OVERRIDE; 194 196 195 197 /// return the list of subjets obtained by unclustering the supplied … … 201 203 /// an Error is thrown if this PseudoJet has no currently valid 202 204 /// associated ClusterSequence 203 virtual std::vector<PseudoJet> exclusive_subjets_up_to (const PseudoJet &reference, int nsub) const ;205 virtual std::vector<PseudoJet> exclusive_subjets_up_to (const PseudoJet &reference, int nsub) const FASTJET_OVERRIDE; 204 206 205 207 /// return the dij that was present in the merging nsub+1 -> nsub … … 208 210 /// an Error is thrown if this PseudoJet has no currently valid 209 211 /// associated ClusterSequence 210 virtual double exclusive_subdmerge(const PseudoJet &reference, int nsub) const ;212 virtual double exclusive_subdmerge(const PseudoJet &reference, int nsub) const FASTJET_OVERRIDE; 211 213 212 214 /// return the maximum dij that occurred in the whole event at the … … 216 218 /// an Error is thrown if this PseudoJet has no currently valid 217 219 /// associated ClusterSequence 218 virtual double exclusive_subdmerge_max(const PseudoJet &reference, int nsub) const ;220 virtual double exclusive_subdmerge_max(const PseudoJet &reference, int nsub) const FASTJET_OVERRIDE; 219 221 220 222 … … 224 226 /// by convention, a jet associated with a ClusterSequence will have 225 227 /// its parents as pieces 226 virtual bool has_pieces(const PseudoJet &reference) const ;228 virtual bool has_pieces(const PseudoJet &reference) const FASTJET_OVERRIDE; 227 229 228 230 /// by convention, a jet associated with a ClusterSequence will have … … 235 237 /// sequence. If the cluster sequence has gone out of scope, an 236 238 /// error will be thrown 237 virtual std::vector<PseudoJet> pieces(const PseudoJet &reference) const ;239 virtual std::vector<PseudoJet> pieces(const PseudoJet &reference) const FASTJET_OVERRIDE; 238 240 239 241 … … 244 246 245 247 /// check if it has a defined area 246 virtual bool has_area() const ;248 virtual bool has_area() const FASTJET_OVERRIDE; 247 249 248 250 /// return the jet (scalar) area. 249 251 /// throws an Error if there is no support for area in the parent CS 250 virtual double area(const PseudoJet &reference) const ;252 virtual double area(const PseudoJet &reference) const FASTJET_OVERRIDE; 251 253 252 254 /// return the error (uncertainty) associated with the determination 253 255 /// of the area of this jet. 254 256 /// throws an Error if there is no support for area in the parent CS 255 virtual double area_error(const PseudoJet &reference) const ;257 virtual double area_error(const PseudoJet &reference) const FASTJET_OVERRIDE; 256 258 257 259 /// return the jet 4-vector area. 258 260 /// throws an Error if there is no support for area in the parent CS 259 virtual PseudoJet area_4vector(const PseudoJet &reference) const ;261 virtual PseudoJet area_4vector(const PseudoJet &reference) const FASTJET_OVERRIDE; 260 262 261 263 /// true if this jet is made exclusively of ghosts. 262 264 /// throws an Error if there is no support for area in the parent CS 263 virtual bool is_pure_ghost(const PseudoJet &reference) const ;265 virtual bool is_pure_ghost(const PseudoJet &reference) const FASTJET_OVERRIDE; 264 266 265 267 #endif // __FJCORE__ -
external/fastjet/ClusterSequenceVoronoiArea.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequenceVoronoiArea.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: ClusterSequenceVoronoiArea.hh 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 65 65 66 66 /// return the area associated with the given jet 67 virtual inline double area(const PseudoJet & jet) const {67 virtual inline double area(const PseudoJet & jet) const FASTJET_OVERRIDE { 68 68 return _voronoi_area[jet.cluster_hist_index()];} 69 69 … … 72 72 /// made of sums of centres of all Voronoi cells in jet, each 73 73 /// contributing with a normalisation equal to the area of the cell 74 virtual inline PseudoJet area_4vector(const PseudoJet & jet) const {74 virtual inline PseudoJet area_4vector(const PseudoJet & jet) const FASTJET_OVERRIDE { 75 75 return _voronoi_area_4vector[jet.cluster_hist_index()];} 76 76 77 77 /// return the error of the area associated with the given jet 78 78 /// (0 by definition for a voronoi area) 79 virtual inline double area_error(const PseudoJet & /*jet*/) const {79 virtual inline double area_error(const PseudoJet & /*jet*/) const FASTJET_OVERRIDE { 80 80 return 0.0;} 81 81 -
external/fastjet/ClusterSequence_CP2DChan.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequence_CP2DChan.cc 3433 2014-07-23 08:17:03Z salam $2 // $Id: ClusterSequence_CP2DChan.cc 4045 2016-03-03 10:01:55Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 46 46 public: 47 47 int orig, mirror; 48 MirrorInfo(int a, int b) : orig(a), mirror(b) {} ;49 MirrorInfo() {};48 MirrorInfo(int a, int b) : orig(a), mirror(b) {} 49 MirrorInfo() : orig(0), mirror(0) {} // set dummy values to keep static code checkers happy 50 50 }; 51 51 -
external/fastjet/ClusterSequence_Delaunay.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClusterSequence_Delaunay.cc 3918 2015-07-03 14:19:13Z salam$2 // $Id: ClusterSequence_Delaunay.cc 4059 2016-03-03 20:49:48Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 69 69 70 70 // initialise our DNN structure with the set of points 71 auto_ptr<DynamicNearestNeighbours> DNN;72 bool verbose = false;71 SharedPtr<DynamicNearestNeighbours> DNN; 72 const bool verbose = false; 73 73 #ifndef DROP_CGAL // strategy = NlnN* are not supported if we drop CGAL... 74 74 bool ignore_nearest_is_mirror = (_Rparam < twopi); -
external/fastjet/CompositeJetStructure.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: CompositeJetStructure.hh 3652 2014-09-03 13:31:13Z salam$2 // $Id: CompositeJetStructure.hh 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 64 64 65 65 /// description 66 virtual std::string description() const ;66 virtual std::string description() const FASTJET_OVERRIDE; 67 67 68 68 // things reimplemented from the base structure … … 70 70 /// true unless the jet has no pieces (see also the description of 71 71 /// constituents() below) 72 virtual bool has_constituents() const ;72 virtual bool has_constituents() const FASTJET_OVERRIDE; 73 73 74 74 /// return the constituents (i.e. the union of the constituents of each piece) … … 78 78 /// Note that as a consequence, a composite jet with no pieces will 79 79 /// have an empty vector as constituents 80 virtual std::vector<PseudoJet> constituents(const PseudoJet &jet) const ;80 virtual std::vector<PseudoJet> constituents(const PseudoJet &jet) const FASTJET_OVERRIDE; 81 81 82 82 //------------------------------------------------------------------- … … 84 84 //------------------------------------------------------------------- 85 85 /// true if it has pieces (always the case) 86 virtual bool has_pieces(const PseudoJet & /*jet*/) const {return true;}86 virtual bool has_pieces(const PseudoJet & /*jet*/) const FASTJET_OVERRIDE {return true;} 87 87 88 88 /// returns the pieces 89 virtual std::vector<PseudoJet> pieces(const PseudoJet &jet) const ;89 virtual std::vector<PseudoJet> pieces(const PseudoJet &jet) const FASTJET_OVERRIDE; 90 90 91 91 // area-related material … … 93 93 94 94 /// check if it has a well-defined area 95 virtual bool has_area() const ;95 virtual bool has_area() const FASTJET_OVERRIDE; 96 96 97 97 /// return the jet (scalar) area. 98 virtual double area(const PseudoJet &reference) const ;98 virtual double area(const PseudoJet &reference) const FASTJET_OVERRIDE; 99 99 100 100 /// return the error (uncertainty) associated with the determination … … 102 102 /// 103 103 /// Be conservative: return the sum of the errors 104 virtual double area_error(const PseudoJet &reference) const ;104 virtual double area_error(const PseudoJet &reference) const FASTJET_OVERRIDE; 105 105 106 106 /// return the jet 4-vector area. 107 virtual PseudoJet area_4vector(const PseudoJet &reference) const ;107 virtual PseudoJet area_4vector(const PseudoJet &reference) const FASTJET_OVERRIDE; 108 108 109 109 /// true if this jet is made exclusively of ghosts. 110 110 /// 111 111 /// In this case, it will be true if all pieces are pure ghost 112 virtual bool is_pure_ghost(const PseudoJet &reference) const ;112 virtual bool is_pure_ghost(const PseudoJet &reference) const FASTJET_OVERRIDE; 113 113 114 114 //unused: // allows one to modify the area information -
external/fastjet/DnnPlane.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: DnnPlane.cc 391 8 2015-07-03 14:19:13Z salam $2 // $Id: DnnPlane.cc 3917 2015-07-03 14:07:50Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/Error.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: Error.hh 380 9 2015-02-20 13:05:13Z soyez $5 // $Id: Error.hh 3807 2015-02-20 11:16:55Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 114 114 }; 115 115 116 117 116 FASTJET_END_NAMESPACE 118 117 -
external/fastjet/GhostedAreaSpec.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: GhostedAreaSpec.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: GhostedAreaSpec.hh 4074 2016-03-08 09:09:25Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 39 39 #include "fastjet/Selector.hh" 40 40 #include "fastjet/LimitedWarning.hh" 41 #include "fastjet/internal/deprecated.hh" 41 42 42 43 // … … 173 174 /// 174 175 /// FJ2 placement is now deprecated. 176 FASTJET_DEPRECATED_MSG("This is deprecated since we strongly recomment to use the new ghost placement instead") 175 177 void set_fj2_placement(bool val); 176 178 -
external/fastjet/JetDefinition.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: JetDefinition.cc 3677 2014-09-09 22:45:25Z soyez $2 // $Id: JetDefinition.cc 4074 2016-03-08 09:09:25Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 45 45 JetDefinition::JetDefinition(JetAlgorithm jet_algorithm_in, 46 46 double R_in, 47 RecombinationScheme recomb_scheme_in, 47 48 Strategy strategy_in, 48 RecombinationScheme recomb_scheme_in,49 49 int nparameters) : 50 50 _jet_algorithm(jet_algorithm_in), _Rparam(R_in), _strategy(strategy_in) { … … 185 185 186 186 // do not forget to delete the existing recombiner if needed 187 if (_shared_recombiner ()) _shared_recombiner.reset();187 if (_shared_recombiner) _shared_recombiner.reset(); 188 188 189 189 _recombiner = 0; -
external/fastjet/JetDefinition.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: JetDefinition.hh 3677 2014-09-09 22:45:25Z soyez $5 // $Id: JetDefinition.hh 4074 2016-03-08 09:09:25Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 35 35 #include "fastjet/internal/numconsts.hh" 36 36 #include "fastjet/PseudoJet.hh" 37 #include "fastjet/internal/deprecated.hh" 37 38 #include<string> 38 39 #include<memory> … … 268 269 RecombinationScheme recomb_scheme_in = E_scheme, 269 270 Strategy strategy_in = Best) { 270 *this = JetDefinition(jet_algorithm_in, R_in, strategy_in, recomb_scheme_in, 1);271 *this = JetDefinition(jet_algorithm_in, R_in, recomb_scheme_in, strategy_in, 1); 271 272 } 272 273 … … 277 278 Strategy strategy_in = Best) { 278 279 double dummyR = 0.0; 279 *this = JetDefinition(jet_algorithm_in, dummyR, strategy_in, recomb_scheme_in, 0);280 *this = JetDefinition(jet_algorithm_in, dummyR, recomb_scheme_in, strategy_in, 0); 280 281 } 281 282 … … 287 288 RecombinationScheme recomb_scheme_in = E_scheme, 288 289 Strategy strategy_in = Best) { 289 *this = JetDefinition(jet_algorithm_in, R_in, strategy_in, recomb_scheme_in, 2);290 *this = JetDefinition(jet_algorithm_in, R_in, recomb_scheme_in, strategy_in, 2); 290 291 set_extra_param(xtra_param_in); 291 292 } … … 344 345 _strategy = plugin_strategy; 345 346 _Rparam = _plugin->R(); 347 _extra_param = 0.0; // a dummy value to keep static code checkers happy 346 348 _jet_algorithm = plugin_algorithm; 347 349 set_recombination_scheme(E_scheme); 348 350 } 349 351 350 351 352 /// constructor to fully specify a jet-definition (together with 352 353 /// information about how algorithically to run it). 354 JetDefinition(JetAlgorithm jet_algorithm_in, 355 double R_in, 356 RecombinationScheme recomb_scheme_in, 357 Strategy strategy_in, 358 int nparameters_in); 359 360 /// constructor to fully specify a jet-definition (together with 361 /// information about how algorithically to run it). 353 362 /// 354 363 /// the ordering of arguments here is old and deprecated (except 355 364 /// as the common constructor for internal use) 365 FASTJET_DEPRECATED_MSG("This argument ordering is deprecated. Use JetDefinition(alg, R, strategy, scheme[, n_parameters]) instead") 356 366 JetDefinition(JetAlgorithm jet_algorithm_in, 357 367 double R_in, 358 368 Strategy strategy_in, 359 369 RecombinationScheme recomb_scheme_in = E_scheme, 360 int nparameters_in = 1); 370 int nparameters_in = 1){ 371 (*this) = JetDefinition(jet_algorithm_in,R_in,recomb_scheme_in,strategy_in,nparameters_in); 372 } 373 361 374 362 375 /// cluster the supplied particles and returns a vector of resulting … … 388 401 /// Recombiner *) may lead to memory corruption. 389 402 void set_recombiner(const Recombiner * recomb) { 390 if (_shared_recombiner ()) _shared_recombiner.reset(recomb);403 if (_shared_recombiner) _shared_recombiner.reset(recomb); 391 404 _recombiner = recomb; 392 405 _default_recombiner = DefaultRecombiner(external_scheme); … … 521 534 _recomb_scheme(recomb_scheme) {} 522 535 523 virtual std::string description() const ;536 virtual std::string description() const FASTJET_OVERRIDE; 524 537 525 538 /// recombine pa and pb and put result into pab 526 539 virtual void recombine(const PseudoJet & pa, const PseudoJet & pb, 527 PseudoJet & pab) const ;528 529 virtual void preprocess(PseudoJet & p) const ;540 PseudoJet & pab) const FASTJET_OVERRIDE; 541 542 virtual void preprocess(PseudoJet & p) const FASTJET_OVERRIDE; 530 543 531 544 /// return the index of the recombination scheme -
external/fastjet/LazyTiling25.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling25.cc 380 8 2015-02-20 11:24:53Z soyez $2 // $Id: LazyTiling25.cc 3807 2015-02-20 11:16:55Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 369 369 double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin; 370 370 // cout << " max info looked at tile " << *near_tile - &_tiles[0] 371 // 372 // 371 // << ", dist = " << dist << " " << (*near_tile)->max_NN_dist 372 // << " -> diff = " << dist-(*near_tile)->max_NN_dist << endl; 373 373 if (dist > (*near_tile)->max_NN_dist) continue; 374 374 … … 665 665 int n_near_tiles = 0; 666 666 667 // GS comment: 668 // 669 // At this stage, we have perforned the clustering in 670 // ClusterSequence and we need to update the NNs. The objects we 671 // deal with are jetA and oldB (the once that have been clustered) 672 // as well as jetB (the result of the clustering) 673 // 674 // There are two types of objects we need to update: 675 // - find jetB NN 676 // - update the NN of points which had jetA or jetB as their NN 677 // 678 // Wile we find jetB's NN, browsing relevant tiles near jetB, we 679 // also search for points which had jetA or jetB as their 680 // NN. These are tagged. Then we list the relevant tiles where we 681 // can potentially have points to update (i.e. points which had 682 // jetA and oldB as NN) in the yet untagged relevant tiles near 683 // jetA and oldB. 684 // 685 // DEBUG: 686 // if (jetB != NULL) { 687 // cout << "jetA = " << jetA->_jets_index << " (tile " << jetA->tile_index << "), " 688 // << "oldB = " << oldB._jets_index << " (tile " << oldB. tile_index << "), " 689 // << "jetB = " << jetB->_jets_index << " (tile " << jetB->tile_index << ")" << endl; 690 // } else { 691 // cout << "jetA = " << jetA->_jets_index << " (tile " << jetA->tile_index << ")" << endl; 692 // } 693 667 694 // Initialise jetB's NN distance as well as updating it for other 668 695 // particles. While doing so, examine whether jetA or old jetB was … … 679 706 bool relevant_for_near_tile = dist_to_tile <= (*near_tile)->max_NN_dist; 680 707 bool relevant = relevant_for_jetB || relevant_for_near_tile; 708 709 // cout << " Relevance of tile " << *near_tile - & _tiles[0] 710 // << " wrt jetB is " << relevant << endl; 711 681 712 if (! relevant) continue; 682 713 // now label this tile as having been considered (so that we … … 702 733 // and one new jet. 703 734 int n_done_tiles = n_near_tiles; 735 //cout << "Looking at relevant tiles to update for jetA" << endl; 704 736 _add_untagged_neighbours_to_tile_union_using_max_info(jetA, 705 737 tile_union, n_near_tiles); 706 738 if (jetB != NULL) { 739 // cout << "Looking at relevant tiles to update for oldB" << endl; 707 740 _add_untagged_neighbours_to_tile_union_using_max_info(&oldB, 708 741 tile_union,n_near_tiles); -
external/fastjet/LazyTiling9.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling9.cc 380 8 2015-02-20 11:24:53Z soyez $2 // $Id: LazyTiling9.cc 3807 2015-02-20 11:16:55Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/LazyTiling9Alt.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling9Alt.cc 380 8 2015-02-20 11:24:53Z soyez $2 // $Id: LazyTiling9Alt.cc 3807 2015-02-20 11:16:55Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/LazyTiling9SeparateGhosts.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: LazyTiling9SeparateGhosts.cc 380 8 2015-02-20 11:24:53Z soyez $2 // $Id: LazyTiling9SeparateGhosts.cc 3807 2015-02-20 11:16:55Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/NNH.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: NNH.hh 3433 2014-07-23 08:17:03Z salam$5 // $Id: NNH.hh 4034 2016-03-02 00:20:27Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 32 32 //FJENDHEADER 33 33 34 #include<fastjet/ClusterSequence.hh> 35 34 #include <fastjet/NNBase.hh> 36 35 37 36 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 38 39 /// @ingroup advanced_usage40 /// \class _NoInfo41 /// dummy class, used as a default template argument42 class _NoInfo {};43 44 /// @ingroup advanced_usage45 /// \class NNHInfo46 /// template that will help initialise a BJ with a PseudoJet and extra information47 template<class I> class NNHInfo {48 public:49 NNHInfo() : _info(NULL) {}50 NNHInfo(I * info) : _info(info) {}51 template<class NNBJ> void init_jet(NNBJ * briefjet, const fastjet::PseudoJet & jet, int index) { briefjet->init(jet, index, _info);}52 private:53 I * _info;54 };55 56 /// @ingroup advanced_usage57 /// Specialisation of NNHInfo for cases where there is no extra info58 template<> class NNHInfo<_NoInfo> {59 public:60 NNHInfo() {}61 NNHInfo(_NoInfo * ) {}62 template<class NNBJ> void init_jet(NNBJ * briefjet, const fastjet::PseudoJet & jet, int index) { briefjet->init(jet, index);}63 };64 65 37 66 38 //---------------------------------------------------------------------- … … 68 40 /// \class NNH 69 41 /// Help solve closest pair problems with generic interparticle and 70 /// beam distance. 71 /// 72 /// Class to help solve closest pair problems with generic interparticle 73 /// distances and a beam distance, using Anderberg's Nearest Neighbour 74 /// Heuristic. 75 /// 76 /// It is templated with a BJ (brief jet) class --- BJ should 77 /// basically cache the minimal amount of information that is needed 78 /// to efficiently calculate interparticle distances and particle-beam 79 /// distances. 80 /// 81 /// This class can be used with or without an extra "Information" template, 82 /// i.e. NNB<BJ> or NNH<BJ,I> 42 /// beam distance (generic case) 43 /// 44 /// (see NNBase.hh for an introductory description) 45 /// 46 /// This variant provides an implementation for any distance measure. 47 /// It is templated with a BJ (brief jet) classand can be used with or 48 /// without an extra "Information" template, i.e. NNH<BJ> or NNH<BJ,I> 83 49 /// 84 50 /// For the NNH<BJ> version of the class to function, BJ must provide … … 88 54 /// - double BJ::distance(const BJ * other_bj_jet); // distance between this and other_bj_jet 89 55 /// - double BJ::beam_distance() ; // distance to the beam 90 /// 56 /// 91 57 /// For the NNH<BJ,I> version to function, the BJ::init(...) member 92 58 /// must accept an extra argument … … 94 60 /// - void BJ::init(const PseudoJet & jet, I * info); // initialise with a PseudoJet + info 95 61 /// 96 /// where info might be a pointer to a class that contains, e.g., information97 /// about R, or other parameters of the jet algorithm62 /// NOTE: THE DISTANCE MUST BE SYMMETRIC I.E. SATISFY 63 /// a.distance(b) == b.distance(a) 98 64 /// 99 65 /// For an example of how the NNH<BJ> class is used, see the Jade (and … … 107 73 /// implementations. 108 74 /// 109 /// 110 /// Implementation note: this class derives from NNHInfo, which deals 111 /// with storing any global information that is needed during the clustering 112 113 template<class BJ, class I = _NoInfo> class NNH : public NNHInfo<I> { 75 template<class BJ, class I = _NoInfo> class NNH : public NNBase<I> { 114 76 public: 115 77 116 78 /// constructor with an initial set of jets (which will be assigned indices 117 79 /// 0 ... jets.size()-1 118 NNH(const std::vector<PseudoJet> & jets) {start(jets);} 119 NNH(const std::vector<PseudoJet> & jets, I * info) : NNHInfo<I>(info) {start(jets);} 120 80 NNH(const std::vector<PseudoJet> & jets) : NNBase<I>() {start(jets);} 81 NNH(const std::vector<PseudoJet> & jets, I * info) : NNBase<I>(info) {start(jets);} 82 83 // initialisation from a given list of particles 121 84 void start(const std::vector<PseudoJet> & jets); 122 85 -
external/fastjet/PseudoJet.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: PseudoJet.cc 3652 2014-09-03 13:31:13Z salam $2 // $Id: PseudoJet.cc 4100 2016-03-15 20:50:22Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 409 409 string PseudoJet::description() const{ 410 410 // the "default" case of a PJ which does not belong to any cluster sequence 411 if (!_structure ())411 if (!_structure) 412 412 return "standard PseudoJet (with no associated clustering information)"; 413 413 414 414 // for all the other cases, the description comes from the structure 415 return _structure ()->description();415 return _structure->description(); 416 416 } 417 417 … … 429 429 // ClusterSequence 430 430 bool PseudoJet::has_associated_cluster_sequence() const{ 431 return (_structure ()) && (_structure->has_associated_cluster_sequence());431 return (_structure) && (_structure->has_associated_cluster_sequence()); 432 432 } 433 433 … … 446 446 // ClusterSequence that is still valid 447 447 bool PseudoJet::has_valid_cluster_sequence() const{ 448 return (_structure ()) && (_structure->has_valid_cluster_sequence());448 return (_structure) && (_structure->has_valid_cluster_sequence()); 449 449 } 450 450 … … 467 467 468 468 //---------------------------------------------------------------------- 469 // return true if there is some stru sture associated with this PseudoJet469 // return true if there is some structure associated with this PseudoJet 470 470 bool PseudoJet::has_structure() const{ 471 return _structure();471 return bool(_structure); 472 472 } 473 473 … … 478 478 // return NULL if there is no associated structure 479 479 const PseudoJetStructureBase* PseudoJet::structure_ptr() const { 480 if (!_structure()) return NULL;481 return _structure ();480 //if (!_structure) return NULL; 481 return _structure.get(); 482 482 } 483 483 … … 493 493 // underlying structure. 494 494 PseudoJetStructureBase* PseudoJet::structure_non_const_ptr(){ 495 if (!_structure()) return NULL;496 return _structure ();495 //if (!_structure) return NULL; 496 return _structure.get(); 497 497 } 498 498 … … 503 503 // throw an error if there is no associated structure 504 504 const PseudoJetStructureBase* PseudoJet::validated_structure_ptr() const { 505 if (!_structure ())505 if (!_structure) 506 506 throw Error("Trying to access the structure of a PseudoJet which has no associated structure"); 507 return _structure ();507 return _structure.get(); 508 508 } 509 509 … … 573 573 // returns true if the PseudoJet has constituents 574 574 bool PseudoJet::has_constituents() const{ 575 return (_structure ()) && (_structure->has_constituents());575 return (_structure) && (_structure->has_constituents()); 576 576 } 577 577 … … 586 586 // returns true if the PseudoJet has support for exclusive subjets 587 587 bool PseudoJet::has_exclusive_subjets() const{ 588 return (_structure ()) && (_structure->has_exclusive_subjets());588 return (_structure) && (_structure->has_exclusive_subjets()); 589 589 } 590 590 … … 670 670 // ClusterSequence have no pieces and this methos will return false. 671 671 bool PseudoJet::has_pieces() const{ 672 return ((_structure ()) && (_structure->has_pieces(*this)));672 return ((_structure) && (_structure->has_pieces(*this))); 673 673 } 674 674 … … 766 766 767 767 768 769 //----------------------------------------------------------------------770 /// given a vector of values with a one-to-one correspondence with the771 /// vector of objects, sort objects into an order such that the772 /// associated values would be in increasing order773 template<class T> vector<T> objects_sorted_by_values(774 const vector<T> & objects,775 const vector<double> & values) {776 777 assert(objects.size() == values.size());778 779 // get a vector of indices780 vector<int> indices(values.size());781 for (size_t i = 0; i < indices.size(); i++) {indices[i] = i;}782 783 // sort the indices784 sort_indices(indices, values);785 786 // copy the objects787 vector<T> objects_sorted(objects.size());788 789 // place the objects in the correct order790 for (size_t i = 0; i < indices.size(); i++) {791 objects_sorted[i] = objects[indices[i]];792 }793 794 return objects_sorted;795 }796 797 768 //---------------------------------------------------------------------- 798 769 /// return a vector of jets sorted into decreasing kt2 -
external/fastjet/PseudoJet.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: PseudoJet.hh 3566 2014-08-11 15:36:34Z salam$2 // $Id: PseudoJet.hh 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 437 437 /// retrieve a pointer to the (const) user information 438 438 const UserInfoBase * user_info_ptr() const{ 439 if (!_user_info()) return NULL; 439 // the line below is not needed since the next line would anyway 440 // return NULL in that case 441 //if (!_user_info) return NULL; 440 442 return _user_info.get(); 441 443 } … … 841 843 inline bool operator!=( const double val, const PseudoJet & a) {return !(a==val);} 842 844 845 /// returns the 4-vector dot product of a and b 843 846 inline double dot_product(const PseudoJet & a, const PseudoJet & b) { 844 847 return a.E()*b.E() - a.px()*b.px() - a.py()*b.py() - a.pz()*b.pz(); … … 880 883 /// touch the values vector in the process). 881 884 template<class T> std::vector<T> objects_sorted_by_values(const std::vector<T> & objects, 882 const std::vector<double> & values); 885 const std::vector<double> & values) { 886 //assert(objects.size() == values.size()); 887 if (objects.size() != values.size()){ 888 throw Error("fastjet::objects_sorted_by_values(...): the size of the 'objects' vector must match the size of the 'values' vector"); 889 } 890 891 // get a vector of indices 892 std::vector<int> indices(values.size()); 893 for (size_t i = 0; i < indices.size(); i++) {indices[i] = i;} 894 895 // sort the indices 896 sort_indices(indices, values); 897 898 // copy the objects 899 std::vector<T> objects_sorted(objects.size()); 900 901 // place the objects in the correct order 902 for (size_t i = 0; i < indices.size(); i++) { 903 objects_sorted[i] = objects[indices[i]]; 904 } 905 906 return objects_sorted; 907 } 883 908 884 909 /// \if internal_doc … … 970 995 template<typename TransformerType> 971 996 bool PseudoJet::has_structure_of() const{ 972 if (!_structure ()) return false;997 if (!_structure) return false; 973 998 974 999 return dynamic_cast<const typename TransformerType::StructureType *>(_structure.get()) != 0; … … 980 1005 template<typename TransformerType> 981 1006 const typename TransformerType::StructureType & PseudoJet::structure_of() const{ 982 if (!_structure ())1007 if (!_structure) 983 1008 throw Error("Trying to access the structure of a PseudoJet without an associated structure"); 984 1009 -
external/fastjet/RangeDefinition.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: RangeDefinition.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: RangeDefinition.hh 4074 2016-03-08 09:09:25Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 35 35 #include "fastjet/Error.hh" 36 36 #include "fastjet/LimitedWarning.hh" 37 #include "fastjet/internal/deprecated.hh" 37 38 #include<sstream> 38 39 #include<iostream> … … 51 52 public: 52 53 /// default constructor 54 FASTJET_DEPRECATED_MSG("RangeDefinition is deprecated since FastJet 3.0. Use the Selector mechanism instead") 53 55 RangeDefinition() { _warn_deprecated(); } 54 56 55 57 /// constructor for a range definition given by |y|<rapmax 58 FASTJET_DEPRECATED_MSG("RangeDefinition is deprecated since FastJet 3.0. Use the Selector mechanism instead") 56 59 RangeDefinition(double rapmax) { _warn_deprecated(); 57 60 assert ( rapmax > 0.0 ); -
external/fastjet/RectangularGrid.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: RectangularGrid.cc 377 1 2014-12-22 21:13:22Z salam$2 // $Id: RectangularGrid.cc 3773 2014-12-22 22:44:46Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/RectangularGrid.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: RectangularGrid.hh 3771 2014-12-22 21:13:22Z salam$5 // $Id: RectangularGrid.hh 4047 2016-03-03 13:21:49Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 118 118 RectangularGrid(); 119 119 120 virtual int n_tiles() const {return _ntotal;}120 virtual int n_tiles() const FASTJET_OVERRIDE {return _ntotal;} 121 121 122 virtual int n_good_tiles() const {return _ngood;}122 virtual int n_good_tiles() const FASTJET_OVERRIDE {return _ngood;} 123 123 124 124 // this was being kept inline, but it seems to make little 125 125 // difference whether it is or not (at least on Gavin's mac) 126 virtual int tile_index(const PseudoJet & p) const ;126 virtual int tile_index(const PseudoJet & p) const FASTJET_OVERRIDE; 127 127 128 128 /// returns whether a given tile is good 129 129 // tested in "issue" 2014-08-08-testing-rect-grid 130 virtual bool tile_is_good(int itile) const {return _tile_selector.worker() ? _is_good[itile] : true;} 130 virtual bool tile_is_good(int itile) const FASTJET_OVERRIDE { 131 return _tile_selector.worker() ? _is_good[itile] : true; 132 } 131 133 132 134 /// returns the area of tile itile. 133 virtual double tile_area(int /* itile */) const {return mean_tile_area();} 135 virtual double tile_area(int /* itile */) const FASTJET_OVERRIDE { 136 return mean_tile_area(); 137 } 134 138 135 139 /// returns the mean area of tiles. 136 virtual double mean_tile_area() const {return _dphi*_dy;};140 virtual double mean_tile_area() const FASTJET_OVERRIDE {return _dphi*_dy;}; 137 141 138 142 /// returns a textual description of the grid 139 virtual std::string description() const ;143 virtual std::string description() const FASTJET_OVERRIDE; 140 144 141 145 /// returns the minimum rapidity extent of the grid … … 149 153 150 154 /// returns true if the grid is in a suitably initialised state 151 virtual bool is_initialised() const {return _ntotal > 0;}155 virtual bool is_initialised() const FASTJET_OVERRIDE {return _ntotal > 0;} 152 156 153 157 private: -
external/fastjet/SharedPtr.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: SharedPtr.hh 3433 2014-07-23 08:17:03Z salam$5 // $Id: SharedPtr.hh 4051 2016-03-03 14:33:38Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 38 38 // for our SharedPtr simply to be derived from the STL TR1 one. 39 39 // #define __FASTJET_USETR1SHAREDPTR 40 41 #include "fastjet/internal/deprecated.hh" 40 42 41 43 #ifdef __FASTJET_USETR1SHAREDPTR … … 72 74 SharedPtr(const SharedPtr<T> & t) : std::tr1::shared_ptr<T>(t) {} 73 75 // for some reason operator() doesn't get inherited 76 #ifdef FASTJET_HAVE_EXPLICIT_FOR_OPERATORS 77 explicit 78 #endif 74 79 inline operator bool() const {return (this->get()!=NULL);} 75 80 /// return the pointer we're pointing to … … 211 216 } 212 217 213 /// return the pointer we're pointing to 218 /// return the pointer we're pointing to 219 /// 220 /// Since FastJet 3.2.0, this is depracated since it is no longer 221 /// part of std::shared_ptr<T>. Use SharedPtr<T>::get() instead 222 FASTJET_DEPRECATED_MSG("Use SharedPtr<T>::get() instead") 214 223 T* operator ()() const{ 215 224 if (_ptr==NULL) return NULL; … … 257 266 /// conversion to bool 258 267 /// This will allow you to use the indirection nicely 268 #ifdef FASTJET_HAVE_EXPLICIT_FOR_OPERATORS 269 explicit 270 #endif 259 271 inline operator bool() const{ 260 272 return (get()!=NULL); -
external/fastjet/TilingExtent.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: TilingExtent.cc 3433 2014-07-23 08:17:03Z salam$2 // $Id: TilingExtent.cc 4034 2016-03-02 00:20:27Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 41 41 _determine_rapidity_extent(cs.jets()); 42 42 } 43 43 44 TilingExtent::TilingExtent(const vector<PseudoJet> &particles) { 45 _determine_rapidity_extent(particles); 46 } 47 44 48 void TilingExtent::_determine_rapidity_extent(const vector<PseudoJet> & particles) { 45 49 // have a binning of rapidity that goes from -nrap to nrap -
external/fastjet/VERSION
rec5e04b rb9ae4c3 1 3. 1.31 3.2.1 -
external/fastjet/WrappedStructure.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: WrappedStructure.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: WrappedStructure.hh 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 57 57 WrappedStructure(const SharedPtr<PseudoJetStructureBase> & to_be_shared) 58 58 : _structure(to_be_shared){ 59 if (!_structure ())59 if (!_structure) 60 60 throw Error("Trying to construct a wrapped structure around an empty (NULL) structure"); 61 61 } … … 65 65 66 66 /// description 67 virtual std::string description() const {67 virtual std::string description() const FASTJET_OVERRIDE{ 68 68 return "PseudoJet wrapping the structure ("+_structure->description()+")"; 69 69 } … … 76 76 //------------------------------------------------------------- 77 77 /// returns true if there is an associated ClusterSequence 78 virtual bool has_associated_cluster_sequence() const {78 virtual bool has_associated_cluster_sequence() const FASTJET_OVERRIDE { 79 79 return _structure->has_associated_cluster_sequence(); 80 80 } … … 82 82 /// get a (const) pointer to the parent ClusterSequence (NULL if 83 83 /// inexistent) 84 virtual const ClusterSequence* associated_cluster_sequence() const {84 virtual const ClusterSequence* associated_cluster_sequence() const FASTJET_OVERRIDE{ 85 85 return _structure->associated_cluster_sequence(); 86 86 } … … 88 88 /// returns true if this PseudoJet has an associated and still 89 89 /// valid ClusterSequence. 90 virtual bool has_valid_cluster_sequence() const {90 virtual bool has_valid_cluster_sequence() const FASTJET_OVERRIDE { 91 91 return _structure->has_valid_cluster_sequence(); 92 92 } … … 94 94 /// if the jet has a valid associated cluster sequence then return a 95 95 /// pointer to it; otherwise throw an error 96 virtual const ClusterSequence * validated_cs() const {96 virtual const ClusterSequence * validated_cs() const FASTJET_OVERRIDE{ 97 97 return _structure->validated_cs(); 98 98 } … … 100 100 /// if the jet has valid area information then return a pointer to 101 101 /// the associated ClusterSequenceAreaBase object; otherwise throw an error 102 virtual const ClusterSequenceAreaBase * validated_csab() const {102 virtual const ClusterSequenceAreaBase * validated_csab() const FASTJET_OVERRIDE{ 103 103 return _structure->validated_csab(); 104 104 } … … 120 120 /// 121 121 /// By default, throws an Error 122 virtual bool has_partner(const PseudoJet &reference, PseudoJet &partner) const {122 virtual bool has_partner(const PseudoJet &reference, PseudoJet &partner) const FASTJET_OVERRIDE{ 123 123 return _structure->has_partner(reference, partner); 124 124 } … … 129 129 /// 130 130 /// By default, throws an Error 131 virtual bool has_child(const PseudoJet &reference, PseudoJet &child) const {131 virtual bool has_child(const PseudoJet &reference, PseudoJet &child) const FASTJET_OVERRIDE{ 132 132 return _structure->has_child(reference, child); 133 133 } … … 138 138 /// 139 139 /// By default, throws an Error 140 virtual bool has_parents(const PseudoJet &reference, PseudoJet &parent1, PseudoJet &parent2) const{ 140 virtual bool has_parents(const PseudoJet &reference, 141 PseudoJet &parent1, PseudoJet &parent2) const FASTJET_OVERRIDE{ 141 142 return _structure->has_parents(reference, parent1, parent2); 142 143 } … … 146 147 /// 147 148 /// By default, throws an Error 148 virtual bool object_in_jet(const PseudoJet &reference, const PseudoJet &jet) const{ 149 virtual bool object_in_jet(const PseudoJet &reference, 150 const PseudoJet &jet) const FASTJET_OVERRIDE{ 149 151 return _structure->object_in_jet(reference, jet); 150 152 } … … 154 156 /// 155 157 /// false by default 156 virtual bool has_constituents() const {158 virtual bool has_constituents() const FASTJET_OVERRIDE{ 157 159 return _structure->has_constituents(); 158 160 } … … 161 163 /// 162 164 /// By default, throws an Error 163 virtual std::vector<PseudoJet> constituents(const PseudoJet &reference) const {165 virtual std::vector<PseudoJet> constituents(const PseudoJet &reference) const FASTJET_OVERRIDE{ 164 166 return _structure->constituents(reference); 165 167 } 166 168 167 169 /// return true if the structure supports exclusive_subjets. 168 virtual bool has_exclusive_subjets() const {170 virtual bool has_exclusive_subjets() const FASTJET_OVERRIDE{ 169 171 return _structure->has_exclusive_subjets(); 170 172 } … … 180 182 /// 181 183 /// By default, throws an Error 182 virtual std::vector<PseudoJet> exclusive_subjets(const PseudoJet &reference, const double & dcut) const{ 184 virtual std::vector<PseudoJet> exclusive_subjets(const PseudoJet &reference, 185 const double & dcut) const FASTJET_OVERRIDE{ 183 186 return _structure->exclusive_subjets(reference, dcut); 184 187 } … … 189 192 /// 190 193 /// By default, throws an Error 191 virtual int n_exclusive_subjets(const PseudoJet &reference, const double & dcut) const{ 194 virtual int n_exclusive_subjets(const PseudoJet &reference, 195 const double & dcut) const FASTJET_OVERRIDE{ 192 196 return _structure->n_exclusive_subjets(reference, dcut); 193 197 } … … 198 202 /// 199 203 /// By default, throws an Error 200 virtual std::vector<PseudoJet> exclusive_subjets_up_to (const PseudoJet &reference, int nsub) const{ 204 virtual std::vector<PseudoJet> exclusive_subjets_up_to (const PseudoJet &reference, 205 int nsub) const FASTJET_OVERRIDE{ 201 206 return _structure->exclusive_subjets_up_to (reference, nsub); 202 207 } … … 206 211 /// 207 212 /// By default, throws an Error 208 virtual double exclusive_subdmerge(const PseudoJet &reference, int nsub) const {213 virtual double exclusive_subdmerge(const PseudoJet &reference, int nsub) const FASTJET_OVERRIDE{ 209 214 return _structure->exclusive_subdmerge(reference, nsub); 210 215 } … … 215 220 /// 216 221 /// By default, throws an Error 217 virtual double exclusive_subdmerge_max(const PseudoJet &reference, int nsub) const {222 virtual double exclusive_subdmerge_max(const PseudoJet &reference, int nsub) const FASTJET_OVERRIDE{ 218 223 return _structure->exclusive_subdmerge_max(reference, nsub); 219 224 } … … 226 231 /// 227 232 /// false by default 228 virtual bool has_pieces(const PseudoJet &reference) const {233 virtual bool has_pieces(const PseudoJet &reference) const FASTJET_OVERRIDE { 229 234 return _structure->has_pieces(reference); 230 235 } … … 233 238 /// 234 239 /// By default, throws an Error 235 virtual std::vector<PseudoJet> pieces(const PseudoJet &reference) const {240 virtual std::vector<PseudoJet> pieces(const PseudoJet &reference) const FASTJET_OVERRIDE { 236 241 return _structure->pieces(reference); 237 242 } … … 244 249 /// 245 250 /// false by default 246 virtual bool has_area() const {251 virtual bool has_area() const FASTJET_OVERRIDE { 247 252 return _structure->has_area(); 248 253 } … … 251 256 /// 252 257 /// By default, throws an Error 253 virtual double area(const PseudoJet &reference) const {258 virtual double area(const PseudoJet &reference) const FASTJET_OVERRIDE{ 254 259 return _structure->area(reference); 255 260 } … … 259 264 /// 260 265 /// By default, throws an Error 261 virtual double area_error(const PseudoJet &reference) const {266 virtual double area_error(const PseudoJet &reference) const FASTJET_OVERRIDE{ 262 267 return _structure->area_error(reference); 263 268 } … … 266 271 /// 267 272 /// By default, throws an Error 268 virtual PseudoJet area_4vector(const PseudoJet &reference) const {273 virtual PseudoJet area_4vector(const PseudoJet &reference) const FASTJET_OVERRIDE{ 269 274 return _structure->area_4vector(reference); 270 275 } … … 273 278 /// 274 279 /// By default, throws an Error 275 virtual bool is_pure_ghost(const PseudoJet &reference) const {280 virtual bool is_pure_ghost(const PseudoJet &reference) const FASTJET_OVERRIDE{ 276 281 return _structure->is_pure_ghost(reference); 277 282 } -
external/fastjet/config_auto.h
rec5e04b rb9ae4c3 64 64 #endif 65 65 66 /* defined if C++11 features have been enabled */ 67 /* #undef HAVE_CXX11_FEATURES */ 66 /* compile the deprecated parts of the interface using auto-ptr */ 67 #ifndef FASTJET_HAVE_AUTO_PTR_INTERFACE 68 #define FASTJET_HAVE_AUTO_PTR_INTERFACE /**/ 69 #endif 70 71 /* compiler supports c++14 deprecated keyword */ 72 /* #undef HAVE_CXX14_DEPRECATED */ 68 73 69 74 /* defined if demangling is enabled at configure time and is supported through … … 81 86 #endif 82 87 88 /* compiler supports the "explicit" keyword for operators */ 89 /* #undef HAVE_EXPLICIT_FOR_OPERATORS */ 90 91 /* compiler supports GNU c++ deprecated attribute */ 92 #ifndef FASTJET_HAVE_GNUCXX_DEPRECATED 93 #define FASTJET_HAVE_GNUCXX_DEPRECATED /**/ 94 #endif 95 83 96 /* Define to 1 if you have the <inttypes.h> header file. */ 84 97 #ifndef FASTJET_HAVE_INTTYPES_H … … 96 109 #endif 97 110 111 /* compiler supports the "override" keyword */ 112 /* #undef HAVE_OVERRIDE */ 113 98 114 /* Define to 1 if you have the <stdint.h> header file. */ 99 115 #ifndef FASTJET_HAVE_STDINT_H … … 131 147 #endif 132 148 133 /* Define to the sub-directory in which libtool stores uninstalled libraries. 134 */ 149 /* Define to the sub-directory where libtool stores uninstalled libraries. */ 135 150 #ifndef FASTJET_LT_OBJDIR 136 151 #define FASTJET_LT_OBJDIR ".libs/" … … 154 169 /* Define to the full name and version of this package. */ 155 170 #ifndef FASTJET_PACKAGE_STRING 156 #define FASTJET_PACKAGE_STRING "FastJet 3. 1.3"171 #define FASTJET_PACKAGE_STRING "FastJet 3.2.1" 157 172 #endif 158 173 … … 162 177 #endif 163 178 179 /* Define to the home page for this package. */ 180 #ifndef FASTJET_PACKAGE_URL 181 #define FASTJET_PACKAGE_URL "" 182 #endif 183 164 184 /* Define to the version of this package. */ 165 185 #ifndef FASTJET_PACKAGE_VERSION 166 #define FASTJET_PACKAGE_VERSION "3. 1.3"186 #define FASTJET_PACKAGE_VERSION "3.2.1" 167 187 #endif 168 188 … … 174 194 /* Version number of package */ 175 195 #ifndef FASTJET_VERSION 176 #define FASTJET_VERSION "3. 1.3"196 #define FASTJET_VERSION "3.2.1" 177 197 #endif 178 198 … … 184 204 /* Minor version of this package */ 185 205 #ifndef FASTJET_VERSION_MINOR 186 #define FASTJET_VERSION_MINOR 1206 #define FASTJET_VERSION_MINOR 2 187 207 #endif 188 208 189 209 /* Version of the package under the form XYYZZ (instead of X.Y.Z) */ 190 210 #ifndef FASTJET_VERSION_NUMBER 191 #define FASTJET_VERSION_NUMBER 30 103211 #define FASTJET_VERSION_NUMBER 30201 192 212 #endif 193 213 194 214 /* Patch version of this package */ 195 215 #ifndef FASTJET_VERSION_PATCHLEVEL 196 #define FASTJET_VERSION_PATCHLEVEL 3216 #define FASTJET_VERSION_PATCHLEVEL 1 197 217 #endif 198 218 -
external/fastjet/config_raw.h
rec5e04b rb9ae4c3 38 38 #define ENABLE_PLUGIN_TRACKJET /**/ 39 39 40 /* defined if C++11 features have been enabled */ 41 /* #undef HAVE_CXX11_FEATURES */ 40 /* compile the deprecated parts of the interface using auto-ptr */ 41 #define HAVE_AUTO_PTR_INTERFACE /**/ 42 43 /* compiler supports c++14 deprecated keyword */ 44 /* #undef HAVE_CXX14_DEPRECATED */ 42 45 43 46 /* defined if demangling is enabled at configure time and is supported through … … 51 54 #define HAVE_EXECINFO_H 1 52 55 56 /* compiler supports the "explicit" keyword for operators */ 57 /* #undef HAVE_EXPLICIT_FOR_OPERATORS */ 58 59 /* compiler supports GNU c++ deprecated attribute */ 60 #define HAVE_GNUCXX_DEPRECATED /**/ 61 53 62 /* Define to 1 if you have the <inttypes.h> header file. */ 54 63 #define HAVE_INTTYPES_H 1 … … 59 68 /* Define to 1 if you have the <memory.h> header file. */ 60 69 #define HAVE_MEMORY_H 1 70 71 /* compiler supports the "override" keyword */ 72 /* #undef HAVE_OVERRIDE */ 61 73 62 74 /* Define to 1 if you have the <stdint.h> header file. */ … … 81 93 #define HAVE_UNISTD_H 1 82 94 83 /* Define to the sub-directory in which libtool stores uninstalled libraries. 84 */ 95 /* Define to the sub-directory where libtool stores uninstalled libraries. */ 85 96 #define LT_OBJDIR ".libs/" 86 97 … … 95 106 96 107 /* Define to the full name and version of this package. */ 97 #define PACKAGE_STRING "FastJet 3. 1.3"108 #define PACKAGE_STRING "FastJet 3.2.1" 98 109 99 110 /* Define to the one symbol short name of this package. */ 100 111 #define PACKAGE_TARNAME "fastjet" 101 112 113 /* Define to the home page for this package. */ 114 #define PACKAGE_URL "" 115 102 116 /* Define to the version of this package. */ 103 #define PACKAGE_VERSION "3. 1.3"117 #define PACKAGE_VERSION "3.2.1" 104 118 105 119 /* Define to 1 if you have the ANSI C header files. */ … … 107 121 108 122 /* Version number of package */ 109 #define VERSION "3. 1.3"123 #define VERSION "3.2.1" 110 124 111 125 /* Major version of this package */ … … 113 127 114 128 /* Minor version of this package */ 115 #define VERSION_MINOR 1129 #define VERSION_MINOR 2 116 130 117 131 /* Version of the package under the form XYYZZ (instead of X.Y.Z) */ 118 #define VERSION_NUMBER 30 103132 #define VERSION_NUMBER 30201 119 133 120 134 /* Patch version of this package */ 121 #define VERSION_PATCHLEVEL 3135 #define VERSION_PATCHLEVEL 1 122 136 123 137 /* Pre-release version of this package */ -
external/fastjet/config_win.h
rec5e04b rb9ae4c3 1 #define FASTJET_PACKAGE_STRING "FastJet 3.1.3" 2 #define FASTJET_PACKAGE_VERSION "3.1.3" 3 #define FASTJET_VERSION "3.1.3" 4 #define FASTJET_VERSION_MAJOR 3.1.3 5 #define FASTJET_VERSION_MINOR 3.1.3 6 #define FASTJET_VERSION_PATCHLEVEL 3.1.3 7 #define FASTJET_VERSION_PRERELEASE "3.1.3" 8 #define FASTJET_VERSION_NUMBER 00000 1 #define FASTJET_PACKAGE_STRING "FastJet 3.2.1" 2 #define FASTJET_PACKAGE_VERSION "3.2.1" 3 #define FASTJET_VERSION "3.2.1" 4 #define FASTJET_VERSION_MAJOR 3 5 #define FASTJET_VERSION_MINOR 2 6 #define FASTJET_VERSION_PATCHLEVEL 1 7 #define FASTJET_VERSION_NUMBER 30201 9 8 10 9 /* The ATLASCone plugin is disabled by default*/ -
external/fastjet/contribs/Nsubjettiness/ChangeLog
rec5e04b rb9ae4c3 1 2016-06-08 <jthaler> 2 Fixed bug in MeasureDefinition.cc where axes were not completely defined, 3 leading to problems with multi-pass axes 4 2016-04-04 <jthaler> 5 Fixed Njettiness.cc to give value of _current_tau_components even if less 6 than N constituents 7 Delete extraneous code in example_advanced_usage.cc 8 2016-03-29 <jthaler> 9 Update for FJ 3.2.0 to deal with SharedPtr () deprecation 1 10 2015-09-28 <jthaler> 2 11 Updated NEWS for 2.2.1 release. -
external/fastjet/contribs/Nsubjettiness/MeasureDefinition.cc
rec5e04b rb9ae4c3 5 5 // Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason 6 6 // 7 // $Id: MeasureDefinition.cc 819 2015-06-12 21:23:24Z jthaler $7 // $Id: MeasureDefinition.cc 946 2016-06-14 19:11:27Z jthaler $ 8 8 //---------------------------------------------------------------------- 9 9 // This file is part of FastJet contrib. … … 524 524 old_axes[k].set_rap( seedAxes[k].rap() ); 525 525 old_axes[k].set_phi( seedAxes[k].phi() ); 526 old_axes[k].set_mom( seedAxes[k].modp() ); 526 527 } 527 528 -
external/fastjet/contribs/Nsubjettiness/NEWS
rec5e04b rb9ae4c3 32 32 N-jettiness as a jet finder using the new ConicalGeometric measure. 33 33 34 -- 2.2.4: (Jun 14, 2016) Fixed bug where multi-pass minimization could yield 35 pathological axes (thanks Gregory Soyez) 36 -- 2.2.3: (Apr 4, 2016) Fixed bug where a jet with fewer than N constituents 37 could give random value for tau_N (thanks Nathan Hartland) 38 -- 2.2.2: (Mar 29, 2016) Updating SharedPtr interface for FJ 3.2 34 39 -- 2.2.1: (Sept 28, 2015) Fix of small Makefile bug 35 40 -- 2.2.0: (Sept 7, 2015) Inclusion of the XCone jet algorithm, as well as a -
external/fastjet/contribs/Nsubjettiness/Njettiness.cc
rec5e04b rb9ae4c3 5 5 // Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason 6 6 // 7 // $Id: Njettiness.cc 821 2015-06-15 18:50:53Z jthaler $7 // $Id: Njettiness.cc 933 2016-04-04 22:23:32Z jthaler $ 8 8 //---------------------------------------------------------------------- 9 9 // This file is part of FastJet contrib. … … 46 46 // setAxes for Manual mode 47 47 void Njettiness::setAxes(const std::vector<fastjet::PseudoJet> & myAxes) { 48 if (_axes_def ()->needsManualAxes()) {48 if (_axes_def->needsManualAxes()) { 49 49 _currentAxes = myAxes; 50 50 } else { … … 59 59 _currentAxes = inputJets; 60 60 _currentAxes.resize(n_jets,fastjet::PseudoJet(0.0,0.0,0.0,0.0)); 61 _current_tau_components = TauComponents(); 61 62 // Put in empty tau components 63 std::vector<double> dummy_jet_pieces; 64 _current_tau_components = TauComponents(UNDEFINED_SHAPE, 65 dummy_jet_pieces, 66 0.0, 67 1.0, 68 _currentAxes, 69 _currentAxes 70 ); 62 71 _seedAxes = _currentAxes; 63 72 _currentPartition = TauPartition(n_jets); // empty partition 64 73 } else { 65 assert(_axes_def ()); // this should never fail.74 assert(_axes_def); // this should never fail. 66 75 67 if (_axes_def ()->needsManualAxes()) { // if manual mode76 if (_axes_def->needsManualAxes()) { // if manual mode 68 77 // take current axes as seeds 69 78 _seedAxes = _currentAxes; 70 79 71 80 // refine axes if requested 72 _currentAxes = _axes_def->get_refined_axes(n_jets,inputJets,_seedAxes, _measure_def ());81 _currentAxes = _axes_def->get_refined_axes(n_jets,inputJets,_seedAxes, _measure_def.get()); 73 82 } else { // non-manual axes 74 83 75 84 //set starting point for minimization 76 _seedAxes = _axes_def->get_starting_axes(n_jets,inputJets,_measure_def ());85 _seedAxes = _axes_def->get_starting_axes(n_jets,inputJets,_measure_def.get()); 77 86 78 87 // refine axes as needed 79 _currentAxes = _axes_def->get_refined_axes(n_jets,inputJets,_seedAxes, _measure_def ());88 _currentAxes = _axes_def->get_refined_axes(n_jets,inputJets,_seedAxes, _measure_def.get()); 80 89 81 90 // NOTE: The above two function calls are combined in "AxesDefinition::get_axes" -
external/fastjet/contribs/Nsubjettiness/VERSION
rec5e04b rb9ae4c3 1 2.2. 11 2.2.4 -
external/fastjet/internal/ClosestPair2D.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClosestPair2D.hh 3433 2014-07-23 08:17:03Z salam$2 // $Id: ClosestPair2D.hh 4059 2016-03-03 20:49:48Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 38 38 #include "fastjet/internal/SearchTree.hh" 39 39 #include "fastjet/internal/MinHeap.hh" 40 #include "fastjet/SharedPtr.hh" 40 41 41 42 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh … … 134 135 135 136 136 triplet< std::auto_ptr<Tree> > _trees;137 std::auto_ptr<MinHeap>_heap;137 triplet<SharedPtr<Tree> > _trees; 138 SharedPtr<MinHeap> _heap; 138 139 std::vector<Point> _points; 139 140 std::stack<Point *> _available_points; -
external/fastjet/internal/ClosestPair2DBase.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: ClosestPair2DBase.hh 3433 2014-07-23 08:17:03Z salam $2 // $Id: ClosestPair2DBase.hh 4049 2016-03-03 13:45:47Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 48 48 double x, y; 49 49 50 Coord2D() {};50 Coord2D() : x(0.0), y(0.0) {}; 51 51 52 52 Coord2D(double a, double b): x(a), y(b) {}; -
external/fastjet/internal/DnnPlane.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: DnnPlane.hh 391 8 2015-07-03 14:19:13Z salam $2 // $Id: DnnPlane.hh 3917 2015-07-03 14:07:50Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/internal/LazyTiling9Alt.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: LazyTiling9Alt.hh 380 8 2015-02-20 11:24:53Z soyez $5 // $Id: LazyTiling9Alt.hh 3807 2015-02-20 11:16:55Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/internal/TilingExtent.hh
rec5e04b rb9ae4c3 5 5 6 6 //FJSTARTHEADER 7 // $Id: TilingExtent.hh 3433 2014-07-23 08:17:03Z salam$7 // $Id: TilingExtent.hh 4034 2016-03-02 00:20:27Z soyez $ 8 8 // 9 9 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 46 46 TilingExtent(ClusterSequence & cs); 47 47 48 /// constructor that takes a list of PseudoJets 49 TilingExtent(const std::vector<PseudoJet> &particles); 50 48 51 /// returns the suggested minimum rapidity for the tiling 49 52 double minrap() const {return _minrap;} -
external/fastjet/internal/base.hh
rec5e04b rb9ae4c3 1 1 2 2 //FJSTARTHEADER 3 // $Id: base.hh 3433 2014-07-23 08:17:03Z salam$3 // $Id: base.hh 4047 2016-03-03 13:21:49Z soyez $ 4 4 // 5 5 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 33 33 #define __FASTJET_FASTJET_BASE_HH__ 34 34 35 #include "fastjet/config.h" 36 35 37 /// \namespace fastjet 36 38 /// the FastJet namespace … … 43 45 #define FASTJET_END_NAMESPACE } 44 46 47 // define a macro to mark virtual function in derived classes as 48 // overriding the base-class definition 49 #ifdef FASTJET_HAVE_OVERRIDE 50 #define FASTJET_OVERRIDE override 51 #else 52 #define FASTJET_OVERRIDE 53 #endif 54 45 55 #endif // __FASTJET_FASTJET_BASE_HH__ -
external/fastjet/plugins/Jade/JadePlugin.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: JadePlugin.cc 3433 2014-07-23 08:17:03Z salam $2 // $Id: JadePlugin.cc 4063 2016-03-04 10:31:40Z salam $ 3 3 // 4 4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 35 35 //#include "fastjet/internal/ClusterSequence_N2.icc" 36 36 #include "fastjet/NNH.hh" 37 #include "fastjet/NNFJN2Plain.hh" 37 38 38 39 // other stuff … … 51 52 //---------------------------------------------------------------------- 52 53 /// class to help run a JADE algorithm 54 /// 55 /// This class works both with NNH and NNFJN2Plain clustering 56 /// helpers. They both use the same init(...) call, but for the 57 /// clustering: 58 /// 59 /// - NNH uses distance(...) and beam_distance() 60 /// - NNFJPlainN2 uses geometrical_distance(...), momentum_factor() 61 /// and geometrical_beam_distance() 62 /// 63 /// For NNFJPlainN2 the 2 E_i E_j (1-cos theta_{ij}) factor 64 /// gets broken up into 65 /// 66 /// sqrt(2)*min(E_i,E_j) * [sqrt(2)*max(E_i,E_j) (1 - cos \theta_{ij})] 67 /// 68 /// The second factor is what we call the "geometrical_distance" even 69 /// though it isn't actually purely geometrical. But the fact that it 70 /// gets multiplied by min(E_i,E_j) to get the full distance is 71 /// sufficient for the validity of the FJ lemma, allowing for the use 72 /// of NNFJN2Plain. 53 73 class JadeBriefJet { 54 74 public: … … 69 89 } 70 90 91 double geometrical_distance(const JadeBriefJet * jet) const { 92 double dij = 1 - nx*jet->nx 93 - ny*jet->ny 94 - nz*jet->nz; 95 dij *= max(rt2E,jet->rt2E); 96 return dij; 97 } 98 99 double momentum_factor() const { 100 return rt2E; 101 } 102 71 103 double beam_distance() const { 72 104 return numeric_limits<double>::max(); 73 105 } 74 106 107 double geometrical_beam_distance() const { 108 // get a number that is almost the same as max(), just a little 109 // smaller so as to ensure that when we divide it by rt2E and then 110 // multiply it again, we won't get an overflow 111 const double almost_max = numeric_limits<double>::max() * (1 - 1e-13); 112 return almost_max / rt2E; 113 } 114 75 115 private: 76 116 double rt2E, nx, ny, nz; … … 82 122 ostringstream desc; 83 123 desc << "e+e- JADE algorithm plugin"; 124 switch(_strategy) { 125 case strategy_NNH: 126 desc << ", using NNH strategy"; break; 127 case strategy_NNFJN2Plain: 128 desc << ", using NNFJN2Plain strategy"; break; 129 default: 130 throw Error("Unrecognized strategy in JadePlugin"); 131 } 132 84 133 return desc.str(); 85 134 } 86 135 87 //---------------------------------------------------------------------- 88 void JadePlugin::run_clustering(ClusterSequence & cs) const { 136 // //---------------------------------------------------------------------- 137 // void JadePlugin::run_clustering(ClusterSequence & cs) const { 138 // int njets = cs.jets().size(); 139 // 140 // //SharedPtr<NNBase<> > nn; 141 // NNBase<> * nn; 142 // switch(_strategy) { 143 // case strategy_NNH: 144 // //nn.reset(new NNH<JadeBriefJet>(cs.jets())); 145 // nn = new NNH<JadeBriefJet>(cs.jets()); 146 // break; 147 // case strategy_NNFJN2Plain: 148 // //nn.reset(new NNFJN2Plain<JadeBriefJet>(cs.jets())); 149 // nn = new NNFJN2Plain<JadeBriefJet>(cs.jets()); 150 // break; 151 // default: 152 // throw Error("Unrecognized strategy in JadePlugin"); 153 // } 154 // //NNH<JadeBriefJet> nnh(cs.jets()); 155 // //NNFJN2Plain<JadeBriefJet> nnh(cs.jets()); 156 // 157 // // if testing against Hoeth's implementation, need to rescale the 158 // // dij by Q^2. 159 // //double Q2 = cs.Q2(); 160 // 161 // while (njets > 0) { 162 // int i, j, k; 163 // double dij = nn->dij_min(i, j); 164 // 165 // if (j >= 0) { 166 // cs.plugin_record_ij_recombination(i, j, dij, k); 167 // nn->merge_jets(i, j, cs.jets()[k], k); 168 // } else { 169 // double diB = cs.jets()[i].E()*cs.jets()[i].E(); // get new diB 170 // cs.plugin_record_iB_recombination(i, diB); 171 // nn->remove_jet(i); 172 // } 173 // njets--; 174 // } 175 // delete nn; 176 // } 177 178 179 template<class N> void JadePlugin::_actual_run_clustering(ClusterSequence & cs) const { 180 89 181 int njets = cs.jets().size(); 90 NNH<JadeBriefJet> nnh(cs.jets()); 182 183 N nn(cs.jets()); 91 184 92 185 // if testing against Hoeth's implementation, need to rescale the … … 96 189 while (njets > 0) { 97 190 int i, j, k; 98 double dij = nn h.dij_min(i, j);191 double dij = nn.dij_min(i, j); 99 192 100 193 if (j >= 0) { 101 194 cs.plugin_record_ij_recombination(i, j, dij, k); 102 nn h.merge_jets(i, j, cs.jets()[k], k);195 nn.merge_jets(i, j, cs.jets()[k], k); 103 196 } else { 104 197 double diB = cs.jets()[i].E()*cs.jets()[i].E(); // get new diB 105 198 cs.plugin_record_iB_recombination(i, diB); 106 nn h.remove_jet(i);199 nn.remove_jet(i); 107 200 } 108 201 njets--; 109 202 } 203 110 204 } 111 205 206 //---------------------------------------------------------------------- 207 void JadePlugin::run_clustering(ClusterSequence & cs) const { 208 209 switch(_strategy) { 210 case strategy_NNH: 211 _actual_run_clustering<NNH<JadeBriefJet> >(cs); 212 break; 213 case strategy_NNFJN2Plain: 214 _actual_run_clustering<NNFJN2Plain<JadeBriefJet> >(cs); 215 break; 216 default: 217 throw Error("Unrecognized strategy in JadePlugin"); 218 } 219 } 220 221 112 222 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh -
external/fastjet/plugins/Jade/fastjet/JadePlugin.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: JadePlugin.hh 3433 2014-07-23 08:17:03Z salam $5 // $Id: JadePlugin.hh 4061 2016-03-03 21:51:25Z salam $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 77 77 class JadePlugin : public JetDefinition::Plugin { 78 78 public: 79 /// enum that contains the two clustering strategy options; for 80 /// higher multiplicities, strategy_NNFJN2Plain is about a factor of 81 /// two faster. 82 enum Strategy { strategy_NNH = 0, strategy_NNFJN2Plain = 1}; 83 79 84 /// Main constructor for the Jade Plugin class. 80 JadePlugin ( ){}85 JadePlugin (Strategy strategy = strategy_NNFJN2Plain) : _strategy(strategy) {} 81 86 82 87 /// copy constructor … … 100 105 private: 101 106 107 template<class N> void _actual_run_clustering(ClusterSequence &) const; 108 109 Strategy _strategy; 102 110 }; 103 111 -
external/fastjet/plugins/SISCone/SISConePlugin.cc
rec5e04b rb9ae4c3 78 78 // static members declaration // 79 79 ///////////////////////////////////////////// 80 std::auto_ptr<SISConePlugin> SISConePlugin::stored_plugin;81 std::auto_ptr<std::vector<PseudoJet> > SISConePlugin::stored_particles;82 std::auto_ptr<Csiscone> SISConePlugin::stored_siscone;80 SharedPtr<SISConePlugin> SISConePlugin::stored_plugin; 81 SharedPtr<std::vector<PseudoJet> > SISConePlugin::stored_particles; 82 SharedPtr<Csiscone> SISConePlugin::stored_siscone; 83 83 84 84 -
external/fastjet/plugins/SISCone/config.h
rec5e04b rb9ae4c3 1 /* siscone/config.h. Generated from config.h.in by configure. */ 1 #ifndef _SISCONE_CONFIG_H 2 #define _SISCONE_CONFIG_H 1 3 4 /* siscone/config.h. Generated automatically at end of configure. */ 5 /* siscone/config_raw.h. Generated from config.h.in by configure. */ 2 6 /* config.h.in. Generated from configure.ac by autoheader. */ 3 7 4 8 /* Define to 1 if you have the <dlfcn.h> header file. */ 5 #define HAVE_DLFCN_H 1 9 #ifndef SISCONE_HAVE_DLFCN_H 10 #define SISCONE_HAVE_DLFCN_H 1 11 #endif 6 12 7 13 /* Define to 1 if you have the <inttypes.h> header file. */ 8 #define HAVE_INTTYPES_H 1 14 #ifndef SISCONE_HAVE_INTTYPES_H 15 #define SISCONE_HAVE_INTTYPES_H 1 16 #endif 9 17 10 18 /* Define to 1 if you have the `m' library (-lm). */ 11 #define HAVE_LIBM 1 19 #ifndef SISCONE_HAVE_LIBM 20 #define SISCONE_HAVE_LIBM 1 21 #endif 12 22 13 23 /* Define to 1 if you have the <memory.h> header file. */ 14 #define HAVE_MEMORY_H 1 24 #ifndef SISCONE_HAVE_MEMORY_H 25 #define SISCONE_HAVE_MEMORY_H 1 26 #endif 15 27 16 28 /* Define to 1 if you have the <stdint.h> header file. */ 17 #define HAVE_STDINT_H 1 29 #ifndef SISCONE_HAVE_STDINT_H 30 #define SISCONE_HAVE_STDINT_H 1 31 #endif 18 32 19 33 /* Define to 1 if you have the <stdlib.h> header file. */ 20 #define HAVE_STDLIB_H 1 34 #ifndef SISCONE_HAVE_STDLIB_H 35 #define SISCONE_HAVE_STDLIB_H 1 36 #endif 21 37 22 38 /* Define to 1 if you have the <strings.h> header file. */ 23 #define HAVE_STRINGS_H 1 39 #ifndef SISCONE_HAVE_STRINGS_H 40 #define SISCONE_HAVE_STRINGS_H 1 41 #endif 24 42 25 43 /* Define to 1 if you have the <string.h> header file. */ 26 #define HAVE_STRING_H 1 44 #ifndef SISCONE_HAVE_STRING_H 45 #define SISCONE_HAVE_STRING_H 1 46 #endif 27 47 28 48 /* Define to 1 if you have the <sys/stat.h> header file. */ 29 #define HAVE_SYS_STAT_H 1 49 #ifndef SISCONE_HAVE_SYS_STAT_H 50 #define SISCONE_HAVE_SYS_STAT_H 1 51 #endif 30 52 31 53 /* Define to 1 if you have the <sys/types.h> header file. */ 32 #define HAVE_SYS_TYPES_H 1 54 #ifndef SISCONE_HAVE_SYS_TYPES_H 55 #define SISCONE_HAVE_SYS_TYPES_H 1 56 #endif 33 57 34 58 /* Define to 1 if you have the <unistd.h> header file. */ 35 #define HAVE_UNISTD_H 1 59 #ifndef SISCONE_HAVE_UNISTD_H 60 #define SISCONE_HAVE_UNISTD_H 1 61 #endif 36 62 37 /* Define to the sub-directory in which libtool stores uninstalled libraries. 38 */ 39 #define LT_OBJDIR ".libs/" 63 /* Define to the sub-directory where libtool stores uninstalled libraries. */ 64 #ifndef SISCONE_LT_OBJDIR 65 #define SISCONE_LT_OBJDIR ".libs/" 66 #endif 40 67 41 68 /* Name of package */ 42 #define PACKAGE "siscone" 69 #ifndef SISCONE_PACKAGE 70 #define SISCONE_PACKAGE "siscone" 71 #endif 43 72 44 73 /* Define to the address where bug reports for this package should be sent. */ 45 #define PACKAGE_BUGREPORT "" 74 #ifndef SISCONE_PACKAGE_BUGREPORT 75 #define SISCONE_PACKAGE_BUGREPORT "" 76 #endif 46 77 47 78 /* Define to the full name of this package. */ 48 #define PACKAGE_NAME "SISCone" 79 #ifndef SISCONE_PACKAGE_NAME 80 #define SISCONE_PACKAGE_NAME "SISCone" 81 #endif 49 82 50 83 /* Define to the full name and version of this package. */ 51 #define PACKAGE_STRING "SISCone 3.0.0" 84 #ifndef SISCONE_PACKAGE_STRING 85 #define SISCONE_PACKAGE_STRING "SISCone 3.0.3" 86 #endif 52 87 53 88 /* Define to the one symbol short name of this package. */ 54 #define PACKAGE_TARNAME "siscone" 89 #ifndef SISCONE_PACKAGE_TARNAME 90 #define SISCONE_PACKAGE_TARNAME "siscone" 91 #endif 92 93 /* Define to the home page for this package. */ 94 #ifndef SISCONE_PACKAGE_URL 95 #define SISCONE_PACKAGE_URL "" 96 #endif 55 97 56 98 /* Define to the version of this package. */ 57 #define PACKAGE_VERSION "3.0.0" 99 #ifndef SISCONE_PACKAGE_VERSION 100 #define SISCONE_PACKAGE_VERSION "3.0.3" 101 #endif 58 102 59 103 /* Define to 1 if you have the ANSI C header files. */ 60 #define STDC_HEADERS 1 104 #ifndef SISCONE_STDC_HEADERS 105 #define SISCONE_STDC_HEADERS 1 106 #endif 107 108 /* use unique_ptr instead of auto_ptr */ 109 /* #undef USES_UNIQUE_PTR_AS_AUTO_PTR */ 61 110 62 111 /* Version number of package */ 63 #define VERSION "3.0.0" 112 #ifndef SISCONE_VERSION 113 #define SISCONE_VERSION "3.0.3" 114 #endif 115 116 /* once: _SISCONE_CONFIG_H */ 117 #endif -
external/fastjet/plugins/SISCone/defines.h
rec5e04b rb9ae4c3 22 22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // 23 23 // // 24 // $Revision:: 225$//25 // $Date:: 20 08-05-20 16:59:47 +0200 (Tue, 20 May 2008) $//24 // $Revision:: 401 $// 25 // $Date:: 2016-05-19 16:44:37 +0200 (Thu, 19 May 2016) $// 26 26 /////////////////////////////////////////////////////////////////////////////// 27 27 … … 35 35 // defined in siscone.h 36 36 // Otherwise, config.h 37 // It is also defined as " PACKAGE_NAME" in config.h but this method37 // It is also defined as "SISCONE_PACKAGE_NAME" in config.h but this method 38 38 // might lead to conflicts 39 //#define PROGRAM PACKAGE_NAME39 //#define PROGRAM SISCONE_PACKAGE_NAME 40 40 41 41 // program version … … 43 43 // siscone::siscone_version 44 44 // defined in siscone.h 45 // It is also defined as " VERSION" in config.h but this method45 // It is also defined as "SISCONE_VERSION" in config.h but this method 46 46 // might lead to conflicts 47 47 -
external/fastjet/plugins/SISCone/fastjet/SISConePlugin.hh
rec5e04b rb9ae4c3 191 191 // part needed for the cache 192 192 // variables for caching the results and the input 193 static std::auto_ptr<SISConePlugin > stored_plugin;194 static std::auto_ptr<std::vector<PseudoJet> > stored_particles;195 static std::auto_ptr<siscone::Csiscone > stored_siscone;193 static SharedPtr<SISConePlugin > stored_plugin; 194 static SharedPtr<std::vector<PseudoJet> > stored_particles; 195 static SharedPtr<siscone::Csiscone > stored_siscone; 196 196 }; 197 197 -
external/fastjet/plugins/SISCone/fastjet/SISConeSphericalPlugin.hh
rec5e04b rb9ae4c3 166 166 // part needed for the cache 167 167 // variables for caching the results and the input 168 static std::auto_ptr<SISConeSphericalPlugin > stored_plugin;169 static std::auto_ptr<std::vector<PseudoJet> > stored_particles;170 static std::auto_ptr<siscone_spherical::CSphsiscone> stored_siscone;168 static SharedPtr<SISConeSphericalPlugin > stored_plugin; 169 static SharedPtr<std::vector<PseudoJet> > stored_particles; 170 static SharedPtr<siscone_spherical::CSphsiscone> stored_siscone; 171 171 }; 172 172 -
external/fastjet/plugins/SISCone/siscone.cc
rec5e04b rb9ae4c3 21 21 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // 22 22 // // 23 // $Revision:: 371$//24 // $Date:: 201 4-09-09 10:05:32 +0200 (Tue, 09 Sep 2014) $//23 // $Revision:: 403 $// 24 // $Date:: 2016-05-19 16:52:05 +0200 (Thu, 19 May 2016) $// 25 25 /////////////////////////////////////////////////////////////////////////////// 26 26 27 //#ifdef HAVE_CONFIG_H28 27 #include "config.h" 29 //#else30 //#define PACKAGE_NAME "SISCone"31 //#define VERSION "3.0.0"32 //#warning "No config.h file available, using preset values"33 //#endif34 35 28 #include "ranlux.h" 36 29 #include "momentum.h" … … 254 247 // print the banner 255 248 if (_banner_ostr != 0){ 249 ios::fmtflags flags_to_restore(_banner_ostr->flags()); 250 256 251 (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl; 257 252 (*_banner_ostr) << "# SISCone version " << setw(28) << left << siscone_version() << "o" << endl; … … 269 264 270 265 _banner_ostr->flush(); 266 _banner_ostr->flags(flags_to_restore); 271 267 } 272 268 } … … 279 275 * return SISCone package name. 280 276 * This is nothing but "SISCone", it is a replacement to the 281 * PACKAGE_NAME string defined in config.h and which is not282 * public by default.277 * SISCONE_PACKAGE_NAME string defined in config.h and which is not 278 * guaranteed to be public. 283 279 * return the SISCone name as a string 284 280 */ 285 281 string siscone_package_name(){ 286 return PACKAGE_NAME;282 return SISCONE_PACKAGE_NAME; 287 283 } 288 284 … … 293 289 */ 294 290 string siscone_version(){ 295 return VERSION;296 } 297 298 } 291 return SISCONE_VERSION; 292 } 293 294 } -
external/fastjet/plugins/SISCone/siscone.h
rec5e04b rb9ae4c3 22 22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // 23 23 // // 24 // $Revision:: 369$//25 // $Date:: 201 4-09-04 16:57:55 +0200 (Thu, 04 Sep 2014) $//24 // $Revision:: 401 $// 25 // $Date:: 2016-05-19 16:44:37 +0200 (Thu, 19 May 2016) $// 26 26 /////////////////////////////////////////////////////////////////////////////// 27 27 … … 160 160 * return SISCone package name. 161 161 * This is nothing but "SISCone", it is a replacement to the 162 * PACKAGE_NAME string defined in config.h and which is not163 * public by default.162 * SISCONE_PACKAGE_NAME string defined in config.h and which is not 163 * guaranteed to be public. 164 164 * \return the SISCone name as a string 165 165 */ -
external/fastjet/plugins/SISCone/split_merge.cc
rec5e04b rb9ae4c3 21 21 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // 22 22 // // 23 // $Revision:: 3 70 $//24 // $Date:: 201 4-09-04 17:03:15 +0200 (Thu, 04 Sep 2014) $//23 // $Revision:: 390 $// 24 // $Date:: 2016-03-03 11:06:52 +0100 (Thu, 03 Mar 2016) $// 25 25 /////////////////////////////////////////////////////////////////////////////// 26 26 … … 54 54 pt_tilde = 0.0; 55 55 sm_var2 = 0.0; 56 pass = CJET_INEXISTENT_PASS; // initialised to a value that should 57 // notappear in the end (after clustering) 56 58 } 57 59 … … 659 661 660 662 #ifdef DEBUG_SPLIT_MERGE 661 cout << "PR-Jet " << jets.size() << " [size " << next_jet.contents.size() << "]:";663 cout << "PR-Jet " << jets.size() << " [size " << jet.contents.size() << "]:"; 662 664 #endif 663 665 … … 1179 1181 } 1180 1182 1181 return 0.0;1182 } 1183 1184 } 1183 //return 0.0; 1184 } 1185 1186 } -
external/fastjet/plugins/SISCone/split_merge.h
rec5e04b rb9ae4c3 22 22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // 23 23 // // 24 // $Revision:: 367$//25 // $Date:: 201 4-09-04 15:57:37 +0200 (Thu, 04 Sep 2014) $//24 // $Revision:: 405 $// 25 // $Date:: 2016-05-23 20:15:02 +0200 (Mon, 23 May 2016) $// 26 26 /////////////////////////////////////////////////////////////////////////////// 27 27 … … 29 29 #define __SPLIT_MERGE_H__ 30 30 31 #include "config.h" 31 32 #include "defines.h" 32 33 #include "geom_2d.h" … … 39 40 40 41 namespace siscone{ 42 43 const int CJET_INEXISTENT_PASS = -2; 41 44 42 45 /** … … 75 78 /// pass at which the jet has been found 76 79 /// It starts at 0 (first pass), -1 means infinite rapidity 80 /// (it will be initialised to "CJET_INEXISTENT_PASS" which should 81 /// never appear after clustering) 77 82 int pass; 78 83 }; … … 441 446 // jet information 442 447 /// list of jet candidates 448 #ifdef SISCONE_USES_UNIQUE_PTR_AS_AUTO_PTR 449 std::unique_ptr<std::multiset<Cjet,Csplit_merge_ptcomparison> > candidates; 450 #else 443 451 std::auto_ptr<std::multiset<Cjet,Csplit_merge_ptcomparison> > candidates; 444 452 #endif 453 445 454 /// minimal pt2 446 455 double pt_min2; -
external/fastjet/plugins/SISCone/vicinity.cc
rec5e04b rb9ae4c3 21 21 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // 22 22 // // 23 // $Revision:: 123$//24 // $Date:: 20 07-03-01 02:52:16 +0100 (Thu, 01 Mar 2007) $//23 // $Revision:: 388 $// 24 // $Date:: 2016-03-03 10:42:25 +0100 (Thu, 03 Mar 2016) $// 25 25 /////////////////////////////////////////////////////////////////////////////// 26 26 … … 80 80 VR2 = VR = 0.0; 81 81 82 ve_list = NULL; 82 83 set_particle_list(_particle_list); 83 84 } -
external/fastjet/tools/Filter.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: Filter.cc 3760 2014-12-19 10:05:10Z soyez $2 // $Id: Filter.cc 4080 2016-03-09 15:01:57Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 31 31 #include "fastjet/tools/Filter.hh" 32 32 #include "fastjet/tools/Recluster.hh" 33 #include "fastjet/tools/Subtractor.hh" 33 34 #include <fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh> 34 35 #include <cassert> … … 98 99 } else if (_rho!=0){ 99 100 if (subjets.size()>0){ 100 const ClusterSequenceAreaBase *csab = subjets[0].validated_csab();101 //const ClusterSequenceAreaBase *csab = subjets[0].validated_csab(); 101 102 for (unsigned int i=0;i<subjets.size();i++){ 102 subjets[i]=csab->subtracted_jet(subjets[i], _rho); 103 //subjets[i]=csab->subtracted_jet(subjets[i], _rho); 104 subjets[i]=Subtractor(_rho)(subjets[i]); 103 105 } 104 106 } -
external/fastjet/tools/Filter.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: Filter.hh 384 5 2015-03-08 08:35:36Z soyez $5 // $Id: Filter.hh 3846 2015-03-08 08:35:43Z soyez $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 143 143 /// deciding which ones to keep. It takes precedence over a non-zero rho. 144 144 void set_subtractor(const FunctionOfPseudoJet<PseudoJet> * subtractor_in) {_subtractor = subtractor_in;} 145 146 /// Set a subtractor that is applied to all individual subjets before 147 /// deciding which ones to keep. It takes precedence over a non-zero rho. 148 const FunctionOfPseudoJet<PseudoJet> * subtractor() const{ return _subtractor;} 145 149 146 150 /// runs the filtering and sets kept and rejected to be the jets of interest -
external/fastjet/tools/GridMedianBackgroundEstimator.hh
rec5e04b rb9ae4c3 3 3 4 4 //FJSTARTHEADER 5 // $Id: GridMedianBackgroundEstimator.hh 3 778 2014-12-24 09:28:09Z salam $5 // $Id: GridMedianBackgroundEstimator.hh 3969 2015-09-21 08:57:59Z salam $ 6 6 // 7 7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 194 194 /// determination of rho_m. 195 195 /// 196 /// Note that support for sigma_m is automatic i sone has sigma and196 /// Note that support for sigma_m is automatic if one has sigma and 197 197 /// rho_m support. 198 198 bool has_rho_m() const {return _enable_rho_m;} -
external/fastjet/tools/JetMedianBackgroundEstimator.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: JetMedianBackgroundEstimator.cc 3517 2014-08-01 14:23:13Z soyez $2 // $Id: JetMedianBackgroundEstimator.cc 4047 2016-03-03 13:21:49Z soyez $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 194 194 195 195 _csi = jets[0].structure_shared_ptr(); 196 ClusterSequenceStructure * csi = dynamic_cast<ClusterSequenceStructure*>(_csi ());196 ClusterSequenceStructure * csi = dynamic_cast<ClusterSequenceStructure*>(_csi.get()); 197 197 const ClusterSequenceAreaBase * csab = csi->validated_csab(); 198 198 … … 467 467 468 468 // determine the number of empty jets 469 const ClusterSequenceAreaBase * csab = (dynamic_cast<ClusterSequenceStructure*>(_csi ()))->validated_csab();469 const ClusterSequenceAreaBase * csab = (dynamic_cast<ClusterSequenceStructure*>(_csi.get()))->validated_csab(); 470 470 if (csab->has_explicit_ghosts()) { 471 471 _empty_area = 0.0; … … 503 503 // throw an error otherwise 504 504 void JetMedianBackgroundEstimator::_check_csa_alive() const{ 505 ClusterSequenceStructure* csa = dynamic_cast<ClusterSequenceStructure*>(_csi ());505 ClusterSequenceStructure* csa = dynamic_cast<ClusterSequenceStructure*>(_csi.get()); 506 506 if (csa == 0) { 507 507 throw Error("JetMedianBackgroundEstimator: there is no cluster sequence associated with the JetMedianBackgroundEstimator"); 508 508 } 509 if (! dynamic_cast<ClusterSequenceStructure*>(_csi ())->has_associated_cluster_sequence())509 if (! dynamic_cast<ClusterSequenceStructure*>(_csi.get())->has_associated_cluster_sequence()) 510 510 throw Error("JetMedianBackgroundEstimator: modifications are no longer possible as the underlying ClusterSequence has gone out of scope"); 511 511 } … … 521 521 // cluster sequence 522 522 if (_jet_def.jet_algorithm() == undefined_jet_algorithm){ 523 const ClusterSequence * cs = dynamic_cast<ClusterSequenceStructure*>(_csi ())->validated_cs();523 const ClusterSequence * cs = dynamic_cast<ClusterSequenceStructure*>(_csi.get())->validated_cs(); 524 524 jet_def = &(cs->jet_def()); 525 525 } -
external/fastjet/tools/Recluster.hh
rec5e04b rb9ae4c3 2 2 #define __FASTJET_TOOLS_RECLUSTER_HH__ 3 3 4 // $Id: Recluster.hh 37 60 2014-12-19 10:05:10Z soyez$4 // $Id: Recluster.hh 3753 2014-12-17 15:19:55Z salam $ 5 5 // 6 6 // Copyright (c) 2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez -
external/fastjet/tools/Subtractor.cc
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: Subtractor.cc 3 670 2014-09-08 14:17:59Z soyez$2 // $Id: Subtractor.cc 3970 2015-09-21 10:31:17Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 39 39 const double Subtractor::_invalid_rho = -numeric_limits<double>::infinity(); 40 40 41 LimitedWarning Subtractor::_unused_rho_m_warning; 41 42 42 43 //---------------------------------------------------------------------- -
external/fastjet/tools/Subtractor.hh
rec5e04b rb9ae4c3 1 1 //FJSTARTHEADER 2 // $Id: Subtractor.hh 3 670 2014-09-08 14:17:59Z soyez$2 // $Id: Subtractor.hh 3970 2015-09-21 10:31:17Z salam $ 3 3 // 4 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez … … 203 203 static const double _invalid_rho; 204 204 205 mutableLimitedWarning _unused_rho_m_warning;205 static LimitedWarning _unused_rho_m_warning; 206 206 }; 207 207 -
modules/Calorimeter.cc
rec5e04b rb9ae4c3 58 58 fItParticleInputArray(0), fItTrackInputArray(0) 59 59 { 60 Int_t i; 61 60 62 61 fECalResolutionFormula = new DelphesFormula; 63 62 fHCalResolutionFormula = new DelphesFormula; 64 63 65 for(i = 0; i < 2; ++i) 66 { 67 fECalTowerTrackArray[i] = new TObjArray; 68 fItECalTowerTrackArray[i] = fECalTowerTrackArray[i]->MakeIterator(); 69 70 fHCalTowerTrackArray[i] = new TObjArray; 71 fItHCalTowerTrackArray[i] = fHCalTowerTrackArray[i]->MakeIterator(); 72 } 64 fECalTowerTrackArray = new TObjArray; 65 fItECalTowerTrackArray = fECalTowerTrackArray->MakeIterator(); 66 67 fHCalTowerTrackArray = new TObjArray; 68 fItHCalTowerTrackArray = fHCalTowerTrackArray->MakeIterator(); 69 73 70 } 74 71 … … 77 74 Calorimeter::~Calorimeter() 78 75 { 79 Int_t i; 80 76 81 77 if(fECalResolutionFormula) delete fECalResolutionFormula; 82 78 if(fHCalResolutionFormula) delete fHCalResolutionFormula; 83 79 84 for(i = 0; i < 2; ++i) 85 { 86 if(fECalTowerTrackArray[i]) delete fECalTowerTrackArray[i]; 87 if(fItECalTowerTrackArray[i]) delete fItECalTowerTrackArray[i]; 88 89 if(fHCalTowerTrackArray[i]) delete fHCalTowerTrackArray[i]; 90 if(fItHCalTowerTrackArray[i]) delete fItHCalTowerTrackArray[i]; 91 } 80 if(fECalTowerTrackArray) delete fECalTowerTrackArray; 81 if(fItECalTowerTrackArray) delete fItECalTowerTrackArray; 82 83 if(fHCalTowerTrackArray) delete fHCalTowerTrackArray; 84 if(fItHCalTowerTrackArray) delete fItHCalTowerTrackArray; 85 92 86 } 93 87 … … 219 213 Double_t ecalEnergy, hcalEnergy; 220 214 Double_t ecalSigma, hcalSigma; 215 Double_t energyGuess; 221 216 Int_t pdgCode; 222 217 … … 368 363 fHCalTowerEnergy = 0.0; 369 364 370 fECalTrackEnergy [0]= 0.0;371 f ECalTrackEnergy[1]= 0.0;372 373 f HCalTrackEnergy[0]= 0.0;374 fHCalTrack Energy[1]= 0.0;375 365 fECalTrackEnergy = 0.0; 366 fHCalTrackEnergy = 0.0; 367 368 fECalTrackSigma = 0.0; 369 fHCalTrackSigma = 0.0; 370 376 371 fTowerTrackHits = 0; 377 372 fTowerPhotonHits = 0; 378 373 379 fECalTowerTrackArray[0]->Clear(); 380 fECalTowerTrackArray[1]->Clear(); 381 382 fHCalTowerTrackArray[0]->Clear(); 383 fHCalTowerTrackArray[1]->Clear(); 374 fECalTowerTrackArray->Clear(); 375 fHCalTowerTrackArray->Clear(); 376 384 377 } 385 378 … … 406 399 if(fECalTrackFractions[number] > 1.0E-9 && fHCalTrackFractions[number] < 1.0E-9) 407 400 { 408 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E()); 409 if(ecalSigma/momentum.E() < track->TrackResolution) 410 { 411 fECalTrackEnergy[0] += ecalEnergy; 412 fECalTowerTrackArray[0]->Add(track); 413 } 414 else 415 { 416 fECalTrackEnergy[1] += ecalEnergy; 417 fECalTowerTrackArray[1]->Add(track); 418 } 401 fECalTrackEnergy += ecalEnergy; 402 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E()); 403 if(ecalSigma/momentum.E() < track->TrackResolution) energyGuess = ecalEnergy; 404 else energyGuess = momentum.E(); 405 406 fECalTrackSigma += (track->TrackResolution)*energyGuess*(track->TrackResolution)*energyGuess; 407 fECalTowerTrackArray->Add(track); 419 408 } 409 420 410 else if(fECalTrackFractions[number] < 1.0E-9 && fHCalTrackFractions[number] > 1.0E-9) 421 411 { 412 fHCalTrackEnergy += hcalEnergy; 422 413 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E()); 423 if(hcalSigma/momentum.E() < track->TrackResolution) 424 { 425 fHCalTrackEnergy[0] += hcalEnergy; 426 fHCalTowerTrackArray[0]->Add(track); 427 } 428 else 429 { 430 fHCalTrackEnergy[1] += hcalEnergy; 431 fHCalTowerTrackArray[1]->Add(track); 432 } 414 if(hcalSigma/momentum.E() < track->TrackResolution) energyGuess = hcalEnergy; 415 else energyGuess = momentum.E(); 416 417 fHCalTrackSigma += (track->TrackResolution)*energyGuess*(track->TrackResolution)*energyGuess; 418 fHCalTowerTrackArray->Add(track); 433 419 } 420 434 421 else if(fECalTrackFractions[number] < 1.0E-9 && fHCalTrackFractions[number] < 1.0E-9) 435 422 { … … 476 463 Double_t energy, pt, eta, phi; 477 464 Double_t ecalEnergy, hcalEnergy; 465 Double_t ecalNeutralEnergy, hcalNeutralEnergy; 466 478 467 Double_t ecalSigma, hcalSigma; 479 468 Double_t ecalNeutralSigma, hcalNeutralSigma; 469 470 Double_t weightTrack, weightCalo, bestEnergyEstimate, rescaleFactor; 471 480 472 TLorentzVector momentum; 481 473 TFractionMap::iterator itFractionMap; … … 484 476 485 477 if(!fTower) return; 486 487 478 488 479 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fECalTowerEnergy); … … 554 545 fTowerOutputArray->Add(fTower); 555 546 } 556 547 557 548 // fill energy flow candidates 558 559 ecalEnergy -= fECalTrackEnergy[1]; 560 hcalEnergy -= fHCalTrackEnergy[1]; 561 562 fItECalTowerTrackArray[0]->Reset(); 563 while((track = static_cast<Candidate*>(fItECalTowerTrackArray[0]->Next()))) 564 { 565 mother = track; 566 track = static_cast<Candidate*>(track->Clone()); 567 track->AddCandidate(mother); 568 569 track->Momentum *= ecalEnergy/fECalTrackEnergy[0]; 570 571 fEFlowTrackOutputArray->Add(track); 572 } 573 574 fItECalTowerTrackArray[1]->Reset(); 575 while((track = static_cast<Candidate*>(fItECalTowerTrackArray[1]->Next()))) 576 { 577 mother = track; 578 track = static_cast<Candidate*>(track->Clone()); 579 track->AddCandidate(mother); 580 581 fEFlowTrackOutputArray->Add(track); 582 } 583 584 fItHCalTowerTrackArray[0]->Reset(); 585 while((track = static_cast<Candidate*>(fItHCalTowerTrackArray[0]->Next()))) 586 { 587 mother = track; 588 track = static_cast<Candidate*>(track->Clone()); 589 track->AddCandidate(mother); 590 591 track->Momentum *= hcalEnergy/fHCalTrackEnergy[0]; 592 593 fEFlowTrackOutputArray->Add(track); 594 } 595 596 fItHCalTowerTrackArray[1]->Reset(); 597 while((track = static_cast<Candidate*>(fItHCalTowerTrackArray[1]->Next()))) 598 { 599 mother = track; 600 track = static_cast<Candidate*>(track->Clone()); 601 track->AddCandidate(mother); 602 603 fEFlowTrackOutputArray->Add(track); 604 } 605 606 if(fECalTowerTrackArray[0]->GetEntriesFast() > 0) ecalEnergy = 0.0; 607 if(fHCalTowerTrackArray[0]->GetEntriesFast() > 0) hcalEnergy = 0.0; 608 609 ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy); 610 hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy); 611 612 if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalEnergySignificanceMin*ecalSigma) ecalEnergy = 0.0; 613 if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0; 614 615 energy = ecalEnergy + hcalEnergy; 616 617 if(ecalEnergy > 0.0) 549 fECalTrackSigma = TMath::Sqrt(fECalTrackSigma); 550 fHCalTrackSigma = TMath::Sqrt(fHCalTrackSigma); 551 552 //compute neutral excesses 553 ecalNeutralEnergy = max( (ecalEnergy - fECalTrackEnergy) , 0.0); 554 hcalNeutralEnergy = max( (hcalEnergy - fHCalTrackEnergy) , 0.0); 555 556 ecalNeutralSigma = ecalNeutralEnergy / TMath::Sqrt(fECalTrackSigma*fECalTrackSigma + ecalSigma*ecalSigma); 557 hcalNeutralSigma = hcalNeutralEnergy / TMath::Sqrt(fHCalTrackSigma*fHCalTrackSigma + hcalSigma*hcalSigma); 558 559 // if ecal neutral excess is significant, simply create neutral EflowPhoton tower and clone each track into eflowtrack 560 if(ecalNeutralEnergy > fECalEnergyMin && ecalNeutralSigma > fECalEnergySignificanceMin) 618 561 { 619 562 // create new photon tower 620 563 tower = static_cast<Candidate*>(fTower->Clone()); 621 622 pt = ecalEnergy / TMath::CosH(eta); 623 624 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalEnergy); 625 tower->Eem = ecalEnergy; 564 pt = ecalNeutralEnergy / TMath::CosH(eta); 565 566 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalNeutralEnergy); 567 tower->Eem = ecalNeutralEnergy; 626 568 tower->Ehad = 0.0; 627 569 tower->PID = 22; 628 570 629 571 fEFlowPhotonOutputArray->Add(tower); 630 } 631 if(hcalEnergy > 0.0) 632 { 633 // create new neutral hadron tower 572 573 //clone tracks 574 fItECalTowerTrackArray->Reset(); 575 while((track = static_cast<Candidate*>(fItECalTowerTrackArray->Next()))) 576 { 577 mother = track; 578 track = static_cast<Candidate*>(track->Clone()); 579 track->AddCandidate(mother); 580 581 fEFlowTrackOutputArray->Add(track); 582 } 583 584 } 585 586 // if neutral excess is not significant, rescale eflow tracks, such that the total charged equals the best measurement given by the calorimeter and tracking 587 else if(fECalTrackEnergy > 0.0) 588 { 589 weightTrack = (fECalTrackSigma > 0.0) ? 1 / (fECalTrackSigma*fECalTrackSigma) : 0.0; 590 weightCalo = (ecalSigma > 0.0) ? 1 / (ecalSigma*ecalSigma) : 0.0; 591 592 bestEnergyEstimate = (weightTrack*fECalTrackEnergy + weightCalo*ecalEnergy) / (weightTrack + weightCalo); 593 rescaleFactor = bestEnergyEstimate/fECalTrackEnergy; 594 595 //rescale tracks 596 fItECalTowerTrackArray->Reset(); 597 while((track = static_cast<Candidate*>(fItECalTowerTrackArray->Next()))) 598 { 599 mother = track; 600 track = static_cast<Candidate*>(track->Clone()); 601 track->AddCandidate(mother); 602 603 track->Momentum *= rescaleFactor; 604 605 fEFlowTrackOutputArray->Add(track); 606 } 607 } 608 609 610 // if hcal neutral excess is significant, simply create neutral EflowNeutralHadron tower and clone each track into eflowtrack 611 if(hcalNeutralEnergy > fHCalEnergyMin && hcalNeutralSigma > fHCalEnergySignificanceMin) 612 { 613 // create new photon tower 634 614 tower = static_cast<Candidate*>(fTower->Clone()); 635 636 pt = hcalEnergy / TMath::CosH(eta);637 638 tower-> Momentum.SetPtEtaPhiE(pt, eta, phi, hcalEnergy);615 pt = hcalNeutralEnergy / TMath::CosH(eta); 616 617 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalNeutralEnergy); 618 tower->Ehad = hcalNeutralEnergy; 639 619 tower->Eem = 0.0; 640 tower->Ehad = hcalEnergy; 641 620 642 621 fEFlowNeutralHadronOutputArray->Add(tower); 643 } 622 623 //clone tracks 624 fItHCalTowerTrackArray->Reset(); 625 while((track = static_cast<Candidate*>(fItHCalTowerTrackArray->Next()))) 626 { 627 mother = track; 628 track = static_cast<Candidate*>(track->Clone()); 629 track->AddCandidate(mother); 630 631 fEFlowTrackOutputArray->Add(track); 632 } 633 634 } 635 636 // if neutral excess is not significant, rescale eflow tracks, such that the total charged equals the best measurement given by the calorimeter and tracking 637 else if(fHCalTrackEnergy > 0.0) 638 { 639 weightTrack = (fHCalTrackSigma > 0.0) ? 1 / (fHCalTrackSigma*fHCalTrackSigma) : 0.0; 640 weightCalo = (hcalSigma > 0.0) ? 1 / (hcalSigma*hcalSigma) : 0.0; 641 642 bestEnergyEstimate = (weightTrack*fHCalTrackEnergy + weightCalo*hcalEnergy) / (weightTrack + weightCalo); 643 rescaleFactor = bestEnergyEstimate / fHCalTrackEnergy; 644 645 //rescale tracks 646 fItHCalTowerTrackArray->Reset(); 647 while((track = static_cast<Candidate*>(fItHCalTowerTrackArray->Next()))) 648 { 649 mother = track; 650 track = static_cast<Candidate*>(track->Clone()); 651 track->AddCandidate(mother); 652 653 track->Momentum *= rescaleFactor; 654 655 fEFlowTrackOutputArray->Add(track); 656 } 657 } 658 659 644 660 } 645 661 -
modules/Calorimeter.h
rec5e04b rb9ae4c3 58 58 Double_t fTowerEta, fTowerPhi, fTowerEdges[4]; 59 59 Double_t fECalTowerEnergy, fHCalTowerEnergy; 60 Double_t fECalTrackEnergy [2], fHCalTrackEnergy[2];60 Double_t fECalTrackEnergy, fHCalTrackEnergy; 61 61 62 62 Double_t fTimingEnergyMin; … … 70 70 Double_t fECalEnergySignificanceMin; 71 71 Double_t fHCalEnergySignificanceMin; 72 73 Double_t fECalTrackSigma; 74 Double_t fHCalTrackSigma; 72 75 73 76 Bool_t fSmearTowerCenter; … … 103 106 TObjArray *fEFlowNeutralHadronOutputArray; //! 104 107 105 TObjArray *fECalTowerTrackArray [2]; //!106 TIterator *fItECalTowerTrackArray [2]; //!108 TObjArray *fECalTowerTrackArray; //! 109 TIterator *fItECalTowerTrackArray; //! 107 110 108 TObjArray *fHCalTowerTrackArray [2]; //!109 TIterator *fItHCalTowerTrackArray [2]; //!111 TObjArray *fHCalTowerTrackArray; //! 112 TIterator *fItHCalTowerTrackArray; //! 110 113 111 114 void FinalizeTower(); -
modules/ImpactParameterSmearing.cc
rec5e04b rb9ae4c3 96 96 { 97 97 Candidate *candidate, *particle, *mother; 98 Double_t xd, yd, zd, d xy, sx, sy, sz, ddxy;98 Double_t xd, yd, zd, d0, sx, sy, sz, dd0; 99 99 Double_t pt, eta, px, py, phi, e; 100 100 … … 103 103 { 104 104 105 // take momentum before smearing (otherwise apply double smearing on d xy)105 // take momentum before smearing (otherwise apply double smearing on d0) 106 106 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 107 107 … … 131 131 132 132 // calculate impact parameter (after-smearing) 133 d xy= (xd*py - yd*px)/pt;133 d0 = (xd*py - yd*px)/pt; 134 134 135 dd xy= gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));135 dd0 = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 136 136 137 137 // fill smeared values in candidate … … 143 143 candidate->Zd = zd; 144 144 145 candidate->D xy = dxy;146 candidate-> SDxy = ddxy;145 candidate->D0 = d0; 146 candidate->ErrorD0 = dd0; 147 147 148 148 candidate->AddCandidate(mother); -
modules/ModulesLinkDef.h
rec5e04b rb9ae4c3 35 35 #include "modules/EnergySmearing.h" 36 36 #include "modules/MomentumSmearing.h" 37 #include "modules/TrackSmearing.h" 37 38 #include "modules/ImpactParameterSmearing.h" 38 39 #include "modules/TimeSmearing.h" … … 58 59 #include "modules/StatusPidFilter.h" 59 60 #include "modules/PdgCodeFilter.h" 61 #include "modules/BeamSpotFilter.h" 60 62 #include "modules/RecoPuFilter.h" 61 63 #include "modules/Cloner.h" … … 64 66 #include "modules/JetFlavorAssociation.h" 65 67 #include "modules/JetFakeParticle.h" 68 #include "modules/VertexSorter.h" 69 #include "modules/VertexFinder.h" 70 #include "modules/VertexFinderDA4D.h" 66 71 #include "modules/ExampleModule.h" 67 72 … … 81 86 #pragma link C++ class EnergySmearing+; 82 87 #pragma link C++ class MomentumSmearing+; 88 #pragma link C++ class TrackSmearing+; 83 89 #pragma link C++ class ImpactParameterSmearing+; 84 90 #pragma link C++ class TimeSmearing+; … … 104 110 #pragma link C++ class StatusPidFilter+; 105 111 #pragma link C++ class PdgCodeFilter+; 112 #pragma link C++ class BeamSpotFilter+; 106 113 #pragma link C++ class RecoPuFilter+; 107 114 #pragma link C++ class Cloner+; … … 110 117 #pragma link C++ class JetFlavorAssociation+; 111 118 #pragma link C++ class JetFakeParticle+; 119 #pragma link C++ class VertexSorter+; 120 #pragma link C++ class VertexFinder+; 121 #pragma link C++ class VertexFinderDA4D+; 112 122 #pragma link C++ class ExampleModule+; 113 123 -
modules/MomentumSmearing.cc
rec5e04b rb9ae4c3 96 96 { 97 97 Candidate *candidate, *mother; 98 Double_t pt, eta, phi, e ;98 Double_t pt, eta, phi, e, res; 99 99 100 100 fItInputArray->Reset(); … … 107 107 pt = candidateMomentum.Pt(); 108 108 e = candidateMomentum.E(); 109 res = fFormula->Eval(pt, eta, phi, e); 110 111 // apply smearing formula 112 //pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt); 113 114 res = ( res > 1.0 ) ? 1.0 : res; 109 115 110 // apply smearing formula 111 pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt); 116 pt = LogNormal(pt, res * pt ); 112 117 113 if(pt <= 0.0) continue;118 //if(pt <= 0.0) continue; 114 119 115 120 mother = candidate; … … 118 123 phi = candidateMomentum.Phi(); 119 124 candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta)); 120 candidate->TrackResolution = fFormula->Eval(pt, eta, phi, e); 125 //candidate->TrackResolution = fFormula->Eval(pt, eta, phi, e); 126 candidate->TrackResolution = res; 121 127 candidate->AddCandidate(mother); 122 128 … … 124 130 } 125 131 } 132 //---------------------------------------------------------------- 133 134 Double_t MomentumSmearing::LogNormal(Double_t mean, Double_t sigma) 135 { 136 Double_t a, b; 137 138 if(mean > 0.0) 139 { 140 b = TMath::Sqrt(TMath::Log((1.0 + (sigma*sigma)/(mean*mean)))); 141 a = TMath::Log(mean) - 0.5*b*b; 142 143 return TMath::Exp(a + b*gRandom->Gaus(0.0, 1.0)); 144 } 145 else 146 { 147 return 0.0; 148 } 149 } 150 126 151 127 152 //------------------------------------------------------------------------------ -
modules/MomentumSmearing.h
rec5e04b rb9ae4c3 47 47 private: 48 48 49 Double_t LogNormal(Double_t mean, Double_t sigma); 50 49 51 DelphesFormula *fFormula; //! 50 52 -
modules/ParticlePropagator.cc
rec5e04b rb9ae4c3 67 67 } 68 68 69 69 70 //------------------------------------------------------------------------------ 70 71 … … 91 92 fItInputArray = fInputArray->MakeIterator(); 92 93 94 // import beamspot 95 try 96 { 97 fBeamSpotInputArray = ImportArray(GetString("BeamSpotInputArray", "BeamSpotFilter/beamSpotParticle")); 98 } 99 catch(runtime_error &e) 100 { 101 fBeamSpotInputArray = 0; 102 } 93 103 // create output arrays 94 104 … … 111 121 { 112 122 Candidate *candidate, *mother; 113 TLorentzVector candidatePosition, candidateMomentum ;123 TLorentzVector candidatePosition, candidateMomentum, beamSpotPosition; 114 124 Double_t px, py, pz, pt, pt2, e, q; 115 125 Double_t x, y, z, t, r, phi; … … 120 130 Double_t tmp, discr, discr2; 121 131 Double_t delta, gammam, omega, asinrho; 122 Double_t rcu, rc2, dxy, xd, yd, zd; 132 Double_t rcu, rc2, xd, yd, zd; 133 Double_t l, d0, dz, p, ctgTheta, phip, etap, alpha; 134 Double_t bsx, bsy, bsz; 123 135 124 136 const Double_t c_light = 2.99792458E8; 137 138 if (!fBeamSpotInputArray || fBeamSpotInputArray->GetSize () == 0) 139 beamSpotPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 140 else 141 { 142 Candidate &beamSpotCandidate = *((Candidate *) fBeamSpotInputArray->At(0)); 143 beamSpotPosition = beamSpotCandidate.Position; 144 } 125 145 126 146 fItInputArray->Reset(); … … 132 152 y = candidatePosition.Y()*1.0E-3; 133 153 z = candidatePosition.Z()*1.0E-3; 154 155 bsx = beamSpotPosition.X()*1.0E-3; 156 bsy = beamSpotPosition.Y()*1.0E-3; 157 bsz = beamSpotPosition.Z()*1.0E-3; 158 134 159 q = candidate->Charge; 135 160 … … 182 207 z_t = z + pz*t; 183 208 209 l = TMath::Sqrt( (x_t - x)*(x_t - x) + (y_t - y)*(y_t - y) + (z_t - z)*(z_t - z)); 210 184 211 mother = candidate; 185 212 candidate = static_cast<Candidate*>(candidate->Clone()); 186 213 214 candidate->InitialPosition = candidatePosition; 187 215 candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*e*1.0E3); 216 candidate->L = l*1.0E3; 188 217 189 218 candidate->Momentum = candidateMomentum; … … 239 268 zd = z + (TMath::Sqrt(xd*xd + yd*yd) - TMath::Sqrt(x*x + y*y))*pz/pt; 240 269 241 // calculate impact paramater 242 dxy = (xd*py - yd*px)/pt; 270 // use perigee momentum rather than original particle 271 // momentum, since the orignal particle momentum isn't known 272 273 px = TMath::Sign(1.0,r) * pt * (-y_c / r_c); 274 py = TMath::Sign(1.0,r) * pt * (x_c / r_c); 275 etap = candidateMomentum.Eta(); 276 phip = TMath::ATan2(py, px); 277 278 candidateMomentum.SetPtEtaPhiE(pt, etap, phip, candidateMomentum.E()); 279 280 // calculate additional track parameters (correct for beamspot position) 281 282 d0 = ( (x - bsx) * py - (y - bsy) * px) / pt; 283 dz = z - ((x - bsx) * px + (y - bsy) * py) / pt * (pz / pt); 284 p = candidateMomentum.P(); 285 ctgTheta = 1.0 / TMath::Tan (candidateMomentum.Theta ()); 286 243 287 244 288 // 3. time evaluation t = TMath::Min(t_r, t_z) … … 287 331 r_t = TMath::Hypot(x_t, y_t); 288 332 333 334 // compute path length for an helix 335 336 alpha = pz*1.0E9 / c_light / gammam; 337 l = t * TMath::Sqrt(alpha*alpha + r*r*omega*omega); 338 289 339 if(r_t > 0.0) 290 340 { 341 342 // store these variables before cloning 343 candidate->D0 = d0*1.0E3; 344 candidate->DZ = dz*1.0E3; 345 candidate->P = p; 346 candidate->PT = pt; 347 candidate->CtgTheta = ctgTheta; 348 candidate->Phi = phip; 349 291 350 mother = candidate; 292 351 candidate = static_cast<Candidate*>(candidate->Clone()); 293 352 353 candidate->InitialPosition = candidatePosition; 294 354 candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*c_light*1.0E3); 295 355 296 356 candidate->Momentum = candidateMomentum; 297 candidate->Dxy = dxy*1.0E3; 298 candidate->Xd = xd*1.0E3; 357 358 candidate->L = l*1.0E3; 359 360 candidate->Xd = xd*1.0E3; 299 361 candidate->Yd = yd*1.0E3; 300 362 candidate->Zd = zd*1.0E3; -
modules/ParticlePropagator.h
rec5e04b rb9ae4c3 35 35 class TClonesArray; 36 36 class TIterator; 37 class TLorentzVector; 37 38 38 39 class ParticlePropagator: public DelphesModule … … 55 56 56 57 const TObjArray *fInputArray; //! 58 const TObjArray *fBeamSpotInputArray; //! 57 59 58 60 TObjArray *fOutputArray; //! -
modules/PileUpMerger.cc
rec5e04b rb9ae4c3 115 115 TDatabasePDG *pdg = TDatabasePDG::Instance(); 116 116 TParticlePDG *pdgParticle; 117 Int_t pid ;117 Int_t pid, nch, nvtx = -1; 118 118 Float_t x, y, z, t, vx, vy; 119 Float_t px, py, pz, e ;120 Double_t dz, dphi, dt ;119 Float_t px, py, pz, e, pt; 120 Double_t dz, dphi, dt, sumpt2, dz0, dt0; 121 121 Int_t numberOfEvents, event, numberOfParticles; 122 122 Long64_t allEntries, entry; … … 132 132 fFunction->GetRandom2(dz, dt); 133 133 134 dz0 = -1.0e6; 135 dt0 = -1.0e6; 136 134 137 dt *= c_light*1.0E3; // necessary in order to make t in mm/c 135 138 dz *= 1.0E3; // necessary in order to make z in mm 139 140 //cout<<dz<<","<<dt<<endl; 141 136 142 vx = 0.0; 137 143 vy = 0.0; 144 138 145 numberOfParticles = fInputArray->GetEntriesFast(); 146 nch = 0; 147 sumpt2 = 0.0; 148 149 factory = GetFactory(); 150 vertex = factory->NewCandidate(); 151 139 152 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 140 153 { … … 143 156 z = candidate->Position.Z(); 144 157 t = candidate->Position.T(); 145 candidate->Position.SetZ(z + dz); 146 candidate->Position.SetT(t + dt); 158 pt = candidate->Momentum.Pt(); 159 160 // take postion and time from first stable particle 161 if (dz0 < -999999.0) 162 dz0 = z; 163 if (dt0 < -999999.0) 164 dt0 = t; 165 166 // cancel any possible offset in position and time the input file 167 candidate->Position.SetZ(z - dz0 + dz); 168 candidate->Position.SetT(t - dt0 + dt); 169 170 candidate->IsPU = 0; 171 147 172 fParticleOutputArray->Add(candidate); 173 174 if(TMath::Abs(candidate->Charge) > 1.0E-9) 175 { 176 nch++; 177 sumpt2 += pt*pt; 178 vertex->AddCandidate(candidate); 179 } 148 180 } 149 181 150 182 if(numberOfParticles > 0) 151 183 { 152 vx /= numberOfParticles;153 vy /= numberOfParticles;184 vx /= sumpt2; 185 vy /= sumpt2; 154 186 } 155 187 156 factory = GetFactory(); 157 158 vertex = factory->NewCandidate(); 188 nvtx++; 159 189 vertex->Position.SetXYZT(vx, vy, dz, dt); 190 vertex->ClusterIndex = nvtx; 191 vertex->ClusterNDF = nch; 192 vertex->SumPT2 = sumpt2; 193 vertex->GenSumPT2 = sumpt2; 160 194 fVertexOutputArray->Add(vertex); 161 195 … … 170 204 numberOfEvents = gRandom->Integer(2*fMeanPileUp + 1); 171 205 break; 206 case 2: 207 numberOfEvents = fMeanPileUp; 208 break; 172 209 default: 173 210 numberOfEvents = gRandom->Poisson(fMeanPileUp); … … 176 213 177 214 allEntries = fReader->GetEntries(); 215 178 216 179 217 for(event = 0; event < numberOfEvents; ++event) … … 198 236 vx = 0.0; 199 237 vy = 0.0; 238 200 239 numberOfParticles = 0; 240 sumpt2 = 0.0; 241 242 //factory = GetFactory(); 243 vertex = factory->NewCandidate(); 244 201 245 while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e)) 202 246 { … … 215 259 candidate->Momentum.SetPxPyPzE(px, py, pz, e); 216 260 candidate->Momentum.RotateZ(dphi); 261 pt = candidate->Momentum.Pt(); 217 262 218 263 x -= fInputBeamSpotX; … … 224 269 vx += candidate->Position.X(); 225 270 vy += candidate->Position.Y(); 271 226 272 ++numberOfParticles; 273 if(TMath::Abs(candidate->Charge) > 1.0E-9) 274 { 275 nch++; 276 sumpt2 += pt*pt; 277 vertex->AddCandidate(candidate); 278 } 227 279 228 280 fParticleOutputArray->Add(candidate); … … 235 287 } 236 288 237 vertex = factory->NewCandidate(); 289 nvtx++; 290 238 291 vertex->Position.SetXYZT(vx, vy, dz, dt); 292 293 vertex->ClusterIndex = nvtx; 294 vertex->ClusterNDF = nch; 295 vertex->SumPT2 = sumpt2; 296 vertex->GenSumPT2 = sumpt2; 297 239 298 vertex->IsPU = 1; 240 299 241 300 fVertexOutputArray->Add(vertex); 301 242 302 } 243 303 } -
modules/SimpleCalorimeter.cc
rec5e04b rb9ae4c3 58 58 fItParticleInputArray(0), fItTrackInputArray(0) 59 59 { 60 Int_t i; 61 60 62 61 fResolutionFormula = new DelphesFormula; 63 64 for(i = 0; i < 2; ++i) 65 { 66 fTowerTrackArray[i] = new TObjArray; 67 fItTowerTrackArray[i] = fTowerTrackArray[i]->MakeIterator(); 68 } 62 fTowerTrackArray = new TObjArray; 63 fItTowerTrackArray = fTowerTrackArray->MakeIterator(); 64 69 65 } 70 66 … … 73 69 SimpleCalorimeter::~SimpleCalorimeter() 74 70 { 75 Int_t i; 76 71 77 72 if(fResolutionFormula) delete fResolutionFormula; 78 79 for(i = 0; i < 2; ++i) 80 { 81 if(fTowerTrackArray[i]) delete fTowerTrackArray[i]; 82 if(fItTowerTrackArray[i]) delete fItTowerTrackArray[i]; 83 } 73 if(fTowerTrackArray) delete fTowerTrackArray; 74 if(fItTowerTrackArray) delete fItTowerTrackArray; 75 84 76 } 85 77 … … 199 191 Double_t energy; 200 192 Double_t sigma; 193 Double_t energyGuess; 194 201 195 Int_t pdgCode; 202 196 … … 340 334 fTowerEnergy = 0.0; 341 335 342 fTrackEnergy [0]= 0.0;343 fTrack Energy[1]= 0.0;336 fTrackEnergy = 0.0; 337 fTrackSigma = 0.0; 344 338 345 339 fTowerTime = 0.0; … … 351 345 fTowerPhotonHits = 0; 352 346 353 fTowerTrackArray[0]->Clear(); 354 fTowerTrackArray[1]->Clear(); 355 } 347 fTowerTrackArray->Clear(); 348 } 356 349 357 350 // check for track hits … … 371 364 if(fTrackFractions[number] > 1.0E-9) 372 365 { 373 sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E()); 374 if(sigma/momentum.E() < track->TrackResolution) 375 { 376 fTrackEnergy[0] += energy; 377 fTowerTrackArray[0]->Add(track); 378 } 379 else 380 { 381 fTrackEnergy[1] += energy; 382 fTowerTrackArray[1]->Add(track); 383 } 366 367 // compute total charged energy 368 fTrackEnergy += energy; 369 sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E()); 370 if(sigma/momentum.E() < track->TrackResolution) energyGuess = energy; 371 else energyGuess = momentum.E(); 372 373 fTrackSigma += ((track->TrackResolution)*energyGuess)*((track->TrackResolution)*energyGuess); 374 fTowerTrackArray->Add(track); 384 375 } 376 385 377 else 386 378 { … … 403 395 fTowerEnergy += energy; 404 396 405 fTowerTime += TMath::Sqrt(energy)*position.T();406 fTowerTimeWeight += TMath::Sqrt(energy);397 fTowerTime += energy*position.T(); 398 fTowerTimeWeight += energy; 407 399 408 400 fTower->AddCandidate(particle); … … 418 410 { 419 411 Candidate *tower, *track, *mother; 420 Double_t energy, pt, eta, phi;421 Double_t sigma ;412 Double_t energy,neutralEnergy, pt, eta, phi; 413 Double_t sigma, neutralSigma; 422 414 Double_t time; 415 416 Double_t weightTrack, weightCalo, bestEnergyEstimate, rescaleFactor; 423 417 424 418 TLorentzVector momentum; … … 436 430 437 431 if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0; 432 438 433 439 434 if(fSmearTowerCenter) … … 464 459 if(energy > 0.0) fTowerOutputArray->Add(fTower); 465 460 466 // fill e-flow candidates 467 468 energy -= fTrackEnergy[1]; 469 470 fItTowerTrackArray[0]->Reset(); 471 while((track = static_cast<Candidate*>(fItTowerTrackArray[0]->Next()))) 472 { 473 mother = track; 474 track = static_cast<Candidate*>(track->Clone()); 475 track->AddCandidate(mother); 476 477 track->Momentum *= energy/fTrackEnergy[0]; 478 479 fEFlowTrackOutputArray->Add(track); 480 } 481 482 fItTowerTrackArray[1]->Reset(); 483 while((track = static_cast<Candidate*>(fItTowerTrackArray[1]->Next()))) 484 { 485 mother = track; 486 track = static_cast<Candidate*>(track->Clone()); 487 track->AddCandidate(mother); 488 489 fEFlowTrackOutputArray->Add(track); 490 } 491 492 if(fTowerTrackArray[0]->GetEntriesFast() > 0) energy = 0.0; 493 494 sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy); 495 if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0; 496 497 // save energy excess as an energy flow tower 498 if(energy > 0.0) 461 462 // e-flow candidates 463 464 //compute neutral excess 465 466 fTrackSigma = TMath::Sqrt(fTrackSigma); 467 neutralEnergy = max( (energy - fTrackEnergy) , 0.0); 468 469 //compute sigma_trk total 470 neutralSigma = neutralEnergy / TMath::Sqrt(fTrackSigma*fTrackSigma+ sigma*sigma); 471 472 // if neutral excess is significant, simply create neutral Eflow tower and clone each track into eflowtrack 473 if(neutralEnergy > fEnergyMin && neutralSigma > fEnergySignificanceMin) 499 474 { 500 475 // create new photon tower 501 476 tower = static_cast<Candidate*>(fTower->Clone()); 502 pt = energy / TMath::CosH(eta); 503 504 tower->Eem = (!fIsEcal) ? 0 : energy; 505 tower->Ehad = (fIsEcal) ? 0 : energy; 477 pt = neutralEnergy / TMath::CosH(eta); 478 479 tower->Eem = (!fIsEcal) ? 0 : neutralEnergy; 480 tower->Ehad = (fIsEcal) ? 0 : neutralEnergy; 481 tower->PID = (fIsEcal) ? 22 : 0; 482 483 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, neutralEnergy); 484 fEFlowTowerOutputArray->Add(tower); 506 485 507 tower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy); 486 fItTowerTrackArray->Reset(); 487 while((track = static_cast<Candidate*>(fItTowerTrackArray->Next()))) 488 { 489 mother = track; 490 track = static_cast<Candidate*>(track->Clone()); 491 track->AddCandidate(mother); 492 493 fEFlowTrackOutputArray->Add(track); 494 } 495 } 508 496 509 tower->PID = (fIsEcal) ? 22 : 0; 510 511 fEFlowTowerOutputArray->Add(tower); 512 } 513 } 497 // if neutral excess is not significant, rescale eflow tracks, such that the total charged equals the best measurement given by the calorimeter and tracking 498 else if (fTrackEnergy > 0.0) 499 { 500 weightTrack = (fTrackSigma > 0.0) ? 1 / (fTrackSigma*fTrackSigma) : 0.0; 501 weightCalo = (sigma > 0.0) ? 1 / (sigma*sigma) : 0.0; 502 503 bestEnergyEstimate = (weightTrack*fTrackEnergy + weightCalo*energy) / (weightTrack + weightCalo); 504 rescaleFactor = bestEnergyEstimate/fTrackEnergy; 505 506 fItTowerTrackArray->Reset(); 507 while((track = static_cast<Candidate*>(fItTowerTrackArray->Next()))) 508 { 509 mother = track; 510 track = static_cast<Candidate*>(track->Clone()); 511 track->AddCandidate(mother); 512 513 track->Momentum *= rescaleFactor; 514 515 fEFlowTrackOutputArray->Add(track); 516 } 517 } 518 519 } 514 520 515 521 //------------------------------------------------------------------------------ -
modules/SimpleCalorimeter.h
rec5e04b rb9ae4c3 59 59 Double_t fTowerEta, fTowerPhi, fTowerEdges[4]; 60 60 Double_t fTowerEnergy; 61 Double_t fTrackEnergy [2];61 Double_t fTrackEnergy; 62 62 63 63 Double_t fTowerTime; … … 72 72 73 73 Double_t fEnergySignificanceMin; 74 75 Double_t fTrackSigma; 74 76 75 77 Bool_t fSmearTowerCenter; … … 102 104 TObjArray *fEFlowTowerOutputArray; //! 103 105 104 TObjArray *fTowerTrackArray [2]; //!105 TIterator *fItTowerTrackArray [2]; //!106 TObjArray *fTowerTrackArray; //! 107 TIterator *fItTowerTrackArray; //! 106 108 107 109 void FinalizeTower(); -
modules/TimeSmearing.cc
rec5e04b rb9ae4c3 93 93 { 94 94 Candidate *candidate, *mother; 95 Double_t t ;95 Double_t ti, tf_smeared, tf; 96 96 const Double_t c_light = 2.99792458E8; 97 97 … … 99 99 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 100 100 { 101 const TLorentzVector &candidatePosition = candidate->Position; 102 t = candidatePosition.T()*1.0E-3/c_light; 101 const TLorentzVector &candidateInitialPosition = candidate->InitialPosition; 102 const TLorentzVector &candidateFinalPosition = candidate->Position; 103 104 ti = candidateInitialPosition.T()*1.0E-3/c_light; 105 tf = candidateFinalPosition.T()*1.0E-3/c_light; 103 106 104 107 // apply smearing formula 105 t = gRandom->Gaus(t, fTimeResolution); 108 tf_smeared = gRandom->Gaus(tf, fTimeResolution); 109 ti = ti + tf_smeared - tf; 106 110 107 111 mother = candidate; 108 112 candidate = static_cast<Candidate*>(candidate->Clone()); 109 candidate->Position.SetT(t*1.0E3*c_light); 113 candidate->InitialPosition.SetT(ti*1.0E3*c_light); 114 candidate->Position.SetT(tf*1.0E3*c_light); 115 116 candidate->ErrorT = fTimeResolution*1.0E3*c_light; 110 117 111 118 candidate->AddCandidate(mother); -
modules/TrackCountingBTagging.cc
rec5e04b rb9ae4c3 96 96 97 97 Double_t jpx, jpy; 98 Double_t dr, tp x, tpy, tpt;99 Double_t xd, yd, d xy, ddxy, ip, sip;98 Double_t dr, tpt; 99 Double_t xd, yd, d0, dd0, ip, sip; 100 100 101 101 Int_t sign; … … 117 117 { 118 118 const TLorentzVector &trkMomentum = track->Momentum; 119 119 120 120 dr = jetMomentum.DeltaR(trkMomentum); 121 122 121 tpt = trkMomentum.Pt(); 123 tpx = trkMomentum.Px();124 tpy = trkMomentum.Py();125 126 122 xd = track->Xd; 127 123 yd = track->Yd; 128 d xy= TMath::Hypot(xd, yd);129 dd xy = track->SDxy;124 d0 = TMath::Hypot(xd, yd); 125 dd0 = track->ErrorD0; 130 126 131 127 if(tpt < fPtMin) continue; 132 128 if(dr > fDeltaR) continue; 133 if(d xy> fIPmax) continue;129 if(d0 > fIPmax) continue; 134 130 135 131 sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1; 136 132 137 ip = sign*d xy;138 sip = ip / TMath::Abs(dd xy);133 ip = sign*d0; 134 sip = ip / TMath::Abs(dd0); 139 135 140 136 if(sip > fSigMin) count++; -
modules/TreeWriter.cc
rec5e04b rb9ae4c3 215 215 entry->Pz = momentum.Pz(); 216 216 217 entry->D0 = candidate->D0; 218 entry->DZ = candidate->DZ; 219 entry->P = candidate->P; 220 entry->PT = candidate->PT; 221 entry->CtgTheta = candidate->CtgTheta; 222 entry->Phi = candidate->Phi; 223 217 224 entry->Eta = eta; 218 225 entry->Phi = momentum.Phi(); … … 233 240 { 234 241 TIter iterator(array); 235 Candidate *candidate = 0 ;242 Candidate *candidate = 0, *constituent = 0; 236 243 Vertex *entry = 0; 237 244 238 245 const Double_t c_light = 2.99792458E8; 239 246 247 Double_t x, y, z, t, xError, yError, zError, tError, sigma, sumPT2, btvSumPT2, genDeltaZ, genSumPT2; 248 UInt_t index, ndf; 249 250 CompBase *compare = Candidate::fgCompare; 251 Candidate::fgCompare = CompSumPT2<Candidate>::Instance(); 252 array->Sort(); 253 Candidate::fgCompare = compare; 254 240 255 // loop over all vertices 241 256 iterator.Reset(); 242 257 while((candidate = static_cast<Candidate*>(iterator.Next()))) 243 258 { 244 const TLorentzVector &position = candidate->Position; 259 260 index = candidate->ClusterIndex; 261 ndf = candidate->ClusterNDF; 262 sigma = candidate->ClusterSigma; 263 sumPT2 = candidate->SumPT2; 264 btvSumPT2 = candidate->BTVSumPT2; 265 genDeltaZ = candidate->GenDeltaZ; 266 genSumPT2 = candidate->GenSumPT2; 267 268 x = candidate->Position.X(); 269 y = candidate->Position.Y(); 270 z = candidate->Position.Z(); 271 t = candidate->Position.T()*1.0E-3/c_light; 272 273 xError = candidate->PositionError.X (); 274 yError = candidate->PositionError.Y (); 275 zError = candidate->PositionError.Z (); 276 tError = candidate->PositionError.T ()*1.0E-3/c_light; 245 277 246 278 entry = static_cast<Vertex*>(branch->NewEntry()); 247 279 248 entry->X = position.X(); 249 entry->Y = position.Y(); 250 entry->Z = position.Z(); 251 entry->T = position.T()*1.0E-3/c_light; 252 } 253 } 280 entry->Index = index; 281 entry->NDF = ndf; 282 entry->Sigma = sigma; 283 entry->SumPT2 = sumPT2; 284 entry->BTVSumPT2 = btvSumPT2; 285 entry->GenDeltaZ = genDeltaZ; 286 entry->GenSumPT2 = genSumPT2; 287 288 entry->X = x; 289 entry->Y = y; 290 entry->Z = z; 291 entry->T = t; 292 293 entry->ErrorX = xError; 294 entry->ErrorY = yError; 295 entry->ErrorZ = zError; 296 entry->ErrorT = tError; 297 298 299 TIter itConstituents(candidate->GetCandidates()); 300 itConstituents.Reset(); 301 entry->Constituents.Clear(); 302 while((constituent = static_cast<Candidate*>(itConstituents.Next()))) 303 { 304 entry->Constituents.Add(constituent); 305 } 306 307 } 308 } 309 254 310 255 311 //------------------------------------------------------------------------------ … … 261 317 Candidate *particle = 0; 262 318 Track *entry = 0; 263 Double_t pt, signz, cosTheta, eta, rapidity ;319 Double_t pt, signz, cosTheta, eta, rapidity, p, ctgTheta, phi; 264 320 const Double_t c_light = 2.99792458E8; 265 321 … … 292 348 entry->TOuter = position.T()*1.0E-3/c_light; 293 349 294 entry->Dxy = candidate->Dxy; 295 entry->SDxy = candidate->SDxy ; 350 entry->L = candidate->L; 351 352 entry->D0 = candidate->D0; 353 entry->ErrorD0 = candidate->ErrorD0; 354 entry->DZ = candidate->DZ; 355 entry->ErrorDZ = candidate->ErrorDZ; 356 357 entry->ErrorP = candidate->ErrorP; 358 entry->ErrorPT = candidate->ErrorPT; 359 entry->ErrorCtgTheta = candidate->ErrorCtgTheta; 360 entry->ErrorPhi = candidate->ErrorPhi; 361 296 362 entry->Xd = candidate->Xd; 297 363 entry->Yd = candidate->Yd; … … 301 367 302 368 pt = momentum.Pt(); 369 p = momentum.P(); 370 phi = momentum.Phi(); 371 ctgTheta = (TMath::Tan(momentum.Theta()) != 0) ? 1/TMath::Tan(momentum.Theta()) : 1e10; 372 303 373 cosTheta = TMath::Abs(momentum.CosTheta()); 304 374 signz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0; … … 306 376 rapidity = (cosTheta == 1.0 ? signz*999.9 : momentum.Rapidity()); 307 377 378 entry->PT = pt; 308 379 entry->Eta = eta; 309 entry->Phi = momentum.Phi();310 entry-> PT = pt;380 entry->Phi = phi; 381 entry->CtgTheta = ctgTheta; 311 382 312 383 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); … … 319 390 320 391 entry->Particle = particle; 392 393 entry->VertexIndex = candidate->ClusterIndex; 394 321 395 } 322 396 } -
readers/DelphesCMSFWLite.cpp
rec5e04b rb9ae4c3 272 272 273 273 branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class()); 274 branchRwgt = treeWriter->NewBranch(" Rwgt", Weight::Class());274 branchRwgt = treeWriter->NewBranch("Weight", Weight::Class()); 275 275 276 276 confReader = new ExRootConfReader; -
readers/DelphesPythia8.cpp
rec5e04b rb9ae4c3 153 153 // from pythia8 example 21 154 154 155 void fillParticle(int id, double ee_max, double thetaIn, double phiIn,156 Pythia8::Event & event, Pythia8::ParticleData& pdt, Pythia8::Rndm& rndm, bool atRest = false) {157 155 void fillParticle(int id, double pt_max, double eta_max, 156 Pythia8::Event &event, Pythia8::ParticleData &pdt, Pythia8::Rndm &rndm) 157 { 158 158 // Reset event record to allow for new event. 159 159 event.reset(); 160 160 161 // Angles uniform in solid angle.162 double cThe, sThe, phi, ee;163 cThe = 2. * rndm.flat() - 1.;164 sThe = Pythia8::sqrtpos(1. - cThe * cThe);165 phi = 2. * M_PI * rndm.flat();166 ee = pow(10,1+(log10(ee_max)-1)*rndm.flat());167 doublemm = pdt.mSel(id);168 double pp = Pythia8::sqrtpos(ee*ee -mm*mm);161 // Generate uniform pt and eta. 162 double pt, eta, phi, pp, ee, mm; 163 pt = pow(10, 1.0 + (log10(pt_max) - 1.0) * rndm.flat()); 164 eta = (2.0 * rndm.flat() - 1.0) * eta_max; 165 phi = 2.0 * M_PI * rndm.flat(); 166 pp = pt * cosh(eta); 167 mm = pdt.mSel(id); 168 ee = Pythia8::sqrtpos(pp*pp + mm*mm); 169 169 170 170 // Store the particle in the event record. 171 event.append( id, 1, 0, 0, pp * sThe * cos(phi), pp * sThe * sin(phi), pp * cThe, ee, mm); 172 171 event.append(id, 1, 0, 0, pt * cos(phi), pt * sin(phi), pt * sinh(eta), ee, mm); 173 172 } 174 173 175 void fillPartons(int type, double ee_max, Pythia8::Event& event, Pythia8::ParticleData& pdt, 176 Pythia8::Rndm& rndm) { 174 void fillPartons(int id, double pt_max, double eta_max, 175 Pythia8::Event &event, Pythia8::ParticleData &pdt, Pythia8::Rndm &rndm) 176 { 177 177 178 178 // Reset event record to allow for new event. 179 179 event.reset(); 180 180 181 // Angles uniform in solid angle.182 double cThe, sThe, phi, ee;183 184 181 // Information on a q qbar system, to be hadronized. 185 182 186 cThe = 2. * rndm.flat() - 1.; 187 sThe = Pythia8::sqrtpos(1. - cThe * cThe); 188 phi = 2. * M_PI * rndm.flat(); 189 ee = pow(10,1+(log10(ee_max)-1)*rndm.flat()); 190 double mm = pdt.m0(type); 191 double pp = Pythia8::sqrtpos(ee*ee - mm*mm); 192 if (type == 21) 193 { 194 event.append( 21, 23, 101, 102, pp * sThe * cos(phi), pp * sThe * sin(phi), pp * cThe, ee); 195 event.append( 21, 23, 102, 101, -pp * sThe * cos(phi), -pp * sThe * sin(phi), -pp * cThe, ee); 183 // Generate uniform pt and eta. 184 double pt, eta, phi, pp, ee, mm; 185 pt = pow(10, 1.0 + (log10(pt_max) - 1.0) * rndm.flat()); 186 eta = (2.0 * rndm.flat() - 1.0) * eta_max; 187 phi = 2.0 * M_PI * rndm.flat(); 188 pp = pt * cosh(eta); 189 mm = pdt.m0(id); 190 ee = Pythia8::sqrtpos(pp*pp + mm*mm); 191 192 if(id == 21) 193 { 194 event.append(21, 23, 101, 102, pt * cos(phi), pt * sin(phi), pt * sinh(eta), ee); 195 event.append(21, 23, 102, 101, -pt * cos(phi), -pt * sin(phi), -pt * sinh(eta), ee); 196 196 } 197 197 else 198 198 { 199 event.append( type, 23, 101, 0, pp * sThe * cos(phi), pp * sThe * sin(phi), pp * cThe, ee, mm);200 event.append( -type, 23, 0, 101, -pp * sThe * cos(phi), -pp * sThe * sin(phi), -pp * cThe, ee, mm);199 event.append(id, 23, 101, 0, pt * cos(phi), pt * sin(phi), pt * sinh(eta), ee, mm); 200 event.append(-id, 23, 0, 101, -pt * cos(phi), -pt * sin(phi), -pt * sinh(eta), ee, mm); 201 201 } 202 202 } … … 338 338 if (pythia->flag("Main:spareFlag1")) 339 339 { 340 if (pythia->mode("Main:spareMode1") == 11 || pythia->mode("Main:spareMode1") == 13 || pythia->mode("Main:spareMode1") == 22)340 if (pythia->mode("Main:spareMode1") == 11 || pythia->mode("Main:spareMode1") == 13 || pythia->mode("Main:spareMode1") == 15 || pythia->mode("Main:spareMode1") == 22) 341 341 { 342 fillParticle( pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), -1., 0.,pythia->event, pythia->particleData, pythia->rndm, 0);342 fillParticle(pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), pythia->parm("Main:spareParm2"), pythia->event, pythia->particleData, pythia->rndm); 343 343 } 344 else fillPartons( pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), pythia->event, pythia->particleData, pythia->rndm); 344 else 345 { 346 fillPartons(pythia->mode("Main:spareMode1"), pythia->parm("Main:spareParm1"), pythia->parm("Main:spareParm2"), pythia->event, pythia->particleData, pythia->rndm); 347 } 345 348 } 346 349
Note:
See TracChangeset
for help on using the changeset viewer.