Fork me on GitHub

Changes in / [ec5e04b:b9ae4c3] in git


Ignore:
Files:
21 added
1 deleted
101 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rec5e04b rb9ae4c3  
     13.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
    1143.3.3:
    215- improved compatibility with ROOT >= 6.04
  • Makefile

    rec5e04b rb9ae4c3  
    137137tmp/examples/Example1.$(ObjSuf): \
    138138        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
     145Validation$(ExeSuf): \
     146        tmp/examples/Validation.$(ObjSuf)
     147
     148tmp/examples/Validation.$(ObjSuf): \
     149        examples/Validation.cpp \
    139150        classes/DelphesClasses.h \
    140151        external/ExRootAnalysis/ExRootTreeReader.h \
     
    150161        root2pileup$(ExeSuf) \
    151162        stdhep2pileup$(ExeSuf) \
    152         Example1$(ExeSuf)
     163        Example1$(ExeSuf) \
     164        Validation$(ExeSuf)
    153165
    154166EXECUTABLE_OBJ +=  \
     
    159171        tmp/converters/root2pileup.$(ObjSuf) \
    160172        tmp/converters/stdhep2pileup.$(ObjSuf) \
    161         tmp/examples/Example1.$(ObjSuf)
     173        tmp/examples/Example1.$(ObjSuf) \
     174        tmp/examples/Validation.$(ObjSuf)
    162175
    163176DelphesHepMC$(ExeSuf): \
     
    183196        classes/DelphesLHEFReader.h \
    184197        external/ExRootAnalysis/ExRootTreeWriter.h \
     198        external/ExRootAnalysis/ExRootTreeBranch.h \
     199        external/ExRootAnalysis/ExRootProgressBar.h
     200DelphesROOT$(ExeSuf): \
     201        tmp/readers/DelphesROOT.$(ObjSuf)
     202
     203tmp/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 \
    185211        external/ExRootAnalysis/ExRootTreeBranch.h \
    186212        external/ExRootAnalysis/ExRootProgressBar.h
     
    200226        DelphesHepMC$(ExeSuf) \
    201227        DelphesLHEF$(ExeSuf) \
     228        DelphesROOT$(ExeSuf) \
    202229        DelphesSTDHEP$(ExeSuf)
    203230
     
    205232        tmp/readers/DelphesHepMC.$(ObjSuf) \
    206233        tmp/readers/DelphesLHEF.$(ObjSuf) \
     234        tmp/readers/DelphesROOT.$(ObjSuf) \
    207235        tmp/readers/DelphesSTDHEP.$(ObjSuf)
    208236
     
    319347        modules/EnergySmearing.h \
    320348        modules/MomentumSmearing.h \
     349        modules/TrackSmearing.h \
    321350        modules/ImpactParameterSmearing.h \
    322351        modules/TimeSmearing.h \
     
    342371        modules/StatusPidFilter.h \
    343372        modules/PdgCodeFilter.h \
     373        modules/BeamSpotFilter.h \
     374        modules/RecoPuFilter.h \
    344375        modules/Cloner.h \
    345376        modules/Weighter.h \
     
    347378        modules/JetFlavorAssociation.h \
    348379        modules/JetFakeParticle.h \
     380        modules/VertexSorter.h \
     381        modules/VertexFinder.h \
     382        modules/VertexFinderDA4D.h \
    349383        modules/ExampleModule.h
    350384tmp/modules/ModulesDict$(PcmSuf): \
     
    553587        classes/DelphesFactory.h \
    554588        classes/DelphesFormula.h
     589tmp/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
    555598tmp/modules/Calorimeter.$(ObjSuf): \
    556599        modules/Calorimeter.$(SrcSuf) \
     
    785828        external/ExRootAnalysis/ExRootFilter.h \
    786829        external/ExRootAnalysis/ExRootClassifier.h
     830tmp/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
    787839tmp/modules/SimpleCalorimeter.$(ObjSuf): \
    788840        modules/SimpleCalorimeter.$(SrcSuf) \
     
    846898        modules/TrackPileUpSubtractor.$(SrcSuf) \
    847899        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
     906tmp/modules/TrackSmearing.$(ObjSuf): \
     907        modules/TrackSmearing.$(SrcSuf) \
     908        modules/TrackSmearing.h \
    848909        classes/DelphesClasses.h \
    849910        classes/DelphesFactory.h \
     
    868929        classes/DelphesFactory.h \
    869930        classes/DelphesFormula.h \
     931        external/ExRootAnalysis/ExRootResult.h \
     932        external/ExRootAnalysis/ExRootFilter.h \
     933        external/ExRootAnalysis/ExRootClassifier.h
     934tmp/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
     944tmp/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
     954tmp/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 \
    870961        external/ExRootAnalysis/ExRootResult.h \
    871962        external/ExRootAnalysis/ExRootFilter.h \
     
    9311022        tmp/modules/AngularSmearing.$(ObjSuf) \
    9321023        tmp/modules/BTagging.$(ObjSuf) \
     1024        tmp/modules/BeamSpotFilter.$(ObjSuf) \
    9331025        tmp/modules/Calorimeter.$(ObjSuf) \
    9341026        tmp/modules/Cloner.$(ObjSuf) \
     
    9551047        tmp/modules/PileUpJetID.$(ObjSuf) \
    9561048        tmp/modules/PileUpMerger.$(ObjSuf) \
     1049        tmp/modules/RecoPuFilter.$(ObjSuf) \
    9571050        tmp/modules/SimpleCalorimeter.$(ObjSuf) \
    9581051        tmp/modules/StatusPidFilter.$(ObjSuf) \
     
    9631056        tmp/modules/TrackCountingTauTagging.$(ObjSuf) \
    9641057        tmp/modules/TrackPileUpSubtractor.$(ObjSuf) \
     1058        tmp/modules/TrackSmearing.$(ObjSuf) \
    9651059        tmp/modules/TreeWriter.$(ObjSuf) \
    9661060        tmp/modules/UniqueObjectFinder.$(ObjSuf) \
     1061        tmp/modules/VertexFinder.$(ObjSuf) \
     1062        tmp/modules/VertexFinderDA4D.$(ObjSuf) \
     1063        tmp/modules/VertexSorter.$(ObjSuf) \
    9671064        tmp/modules/Weighter.$(ObjSuf)
    9681065
     
    12101307        external/fastjet/plugins/Jade/JadePlugin.$(SrcSuf) \
    12111308        external/fastjet/ClusterSequence.hh \
    1212         external/fastjet/NNH.hh
     1309        external/fastjet/NNH.hh \
     1310        external/fastjet/NNFJN2Plain.hh
    12131311tmp/external/fastjet/plugins/NestedDefs/NestedDefsPlugin.$(ObjSuf): \
    12141312        external/fastjet/plugins/NestedDefs/NestedDefsPlugin.$(SrcSuf) \
     
    12521350        external/fastjet/tools/Filter.$(SrcSuf) \
    12531351        external/fastjet/tools/Filter.hh \
    1254         external/fastjet/tools/Recluster.hh
     1352        external/fastjet/tools/Recluster.hh \
     1353        external/fastjet/tools/Subtractor.hh
    12551354tmp/external/fastjet/tools/GridMedianBackgroundEstimator.$(ObjSuf): \
    12561355        external/fastjet/tools/GridMedianBackgroundEstimator.$(SrcSuf) \
     
    15691668        tmp/external/tcl/tclVar.$(ObjSuf)
    15701669
     1670modules/VertexFinderDA4D.h: \
     1671        classes/DelphesModule.h
     1672        @touch $@
     1673
     1674modules/TrackSmearing.h: \
     1675        classes/DelphesModule.h
     1676        @touch $@
     1677
    15711678external/fastjet/ClusterSequence.hh: \
    15721679        external/fastjet/PseudoJet.hh \
     
    15761683        external/fastjet/LimitedWarning.hh \
    15771684        external/fastjet/FunctionOfPseudoJet.hh \
    1578         external/fastjet/ClusterSequenceStructure.hh
     1685        external/fastjet/ClusterSequenceStructure.hh \
     1686        external/fastjet/internal/deprecated.hh
    15791687        @touch $@
    15801688
     
    15821690        external/fastjet/internal/ClosestPair2DBase.hh \
    15831691        external/fastjet/internal/SearchTree.hh \
    1584         external/fastjet/internal/MinHeap.hh
     1692        external/fastjet/internal/MinHeap.hh \
     1693        external/fastjet/SharedPtr.hh
    15851694        @touch $@
    15861695
     
    16151724        external/fastjet/internal/numconsts.hh \
    16161725        external/fastjet/PseudoJet.hh \
     1726        external/fastjet/internal/deprecated.hh \
    16171727        external/fastjet/ClusterSequence.hh
    16181728        @touch $@
     
    18201930        external/fastjet/internal/BasicRandom.hh \
    18211931        external/fastjet/Selector.hh \
    1822         external/fastjet/LimitedWarning.hh
     1932        external/fastjet/LimitedWarning.hh \
     1933        external/fastjet/internal/deprecated.hh
    18231934        @touch $@
    18241935
     
    18291940        @touch $@
    18301941
     1942modules/VertexSorter.h: \
     1943        classes/DelphesModule.h
     1944        @touch $@
     1945
    18311946modules/Delphes.h: \
     1947        classes/DelphesModule.h
     1948        @touch $@
     1949
     1950modules/VertexFinder.h: \
    18321951        classes/DelphesModule.h
    18331952        @touch $@
     
    18751994        external/fastjet/PseudoJet.hh \
    18761995        external/fastjet/Error.hh \
    1877         external/fastjet/LimitedWarning.hh
     1996        external/fastjet/LimitedWarning.hh \
     1997        external/fastjet/internal/deprecated.hh
    18781998        @touch $@
    18791999
     
    18852005        external/fastjet/ClusterSequence.hh \
    18862006        external/fastjet/LimitedWarning.hh \
    1887         external/fastjet/Selector.hh
     2007        external/fastjet/Selector.hh \
     2008        external/fastjet/internal/deprecated.hh
    18882009        @touch $@
    18892010
     
    19022023        @touch $@
    19032024
     2025modules/RecoPuFilter.h: \
     2026        classes/DelphesModule.h
     2027        @touch $@
     2028
    19042029modules/Hector.h: \
    19052030        classes/DelphesModule.h
     
    20012126
    20022127modules/FastJetFinder.h: \
     2128        classes/DelphesModule.h
     2129        @touch $@
     2130
     2131modules/BeamSpotFilter.h: \
    20032132        classes/DelphesModule.h
    20042133        @touch $@
  • README

    rec5e04b rb9ae4c3  
    44Commands to get the code:
    55
    6    wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.3.3.tar.gz
     6   wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.4.0.tar.gz
    77
    8    tar -zxf Delphes-3.3.3.tar.gz
     8   tar -zxf Delphes-3.4.0.tar.gz
    99
    1010Commands to compile the code:
    1111
    12    cd Delphes-3.3.3
     12   cd Delphes-3.4.0
    1313
    1414   make
  • VERSION

    rec5e04b rb9ae4c3  
    1 3.3.3
     13.4.0
  • cards/converter_card.tcl

    rec5e04b rb9ae4c3  
    1313module TreeWriter TreeWriter {
    1414# add Branch InputArray BranchName BranchClass
    15   add Branch Delphes/allParticles Particle GenParticle
     15  add Branch Delphes/stableParticles Particle GenParticle
    1616}
    1717
  • cards/delphes_card_ATLAS.tcl

    rec5e04b rb9ae4c3  
    141141
    142142  # resolution formula for charged hadrons
    143   set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) +
    144                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) +
    145                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)}
     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)}
    146146}
    147147
  • cards/delphes_card_ATLAS_PileUp.tcl

    rec5e04b rb9ae4c3  
    177177  # resolution formula for charged hadrons
    178178  # based on arXiv:1405.6569
    179   set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^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)}
    182182}
    183183
  • cards/delphes_card_CMS.tcl

    rec5e04b rb9ae4c3  
    1515
    1616  TrackMerger
     17 
     18  ECal
     19  HCal
     20 
    1721  Calorimeter
    1822  EFlowMerger
     
    124128  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
    125129                                           (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
    127133                         (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)) +
    129136                         (abs(eta) > 2.5)                                                  * (0.00)}
    130137}
     
    142149  # resolution formula for charged hadrons
    143150  # based on arXiv:1405.6569
    144   set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^2 + pt^2*1.5e-4^2) +
    145                          (abs(eta) > 0.5 && abs(eta) <= 1.5) * (pt > 0.1) * sqrt(0.015^2 + pt^2*2.5e-4^2) +
    146                          (abs(eta) > 1.5 && abs(eta) <= 2.5) * (pt > 0.1) * sqrt(0.025^2 + pt^2*5.5e-4^2)}
     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)}
    147154}
    148155
     
    192199}
    193200
     201
     202
    194203#############
    195 # Calorimeter
     204#   ECAL
    196205#############
    197206
    198 module Calorimeter Calorimeter {
     207module SimpleCalorimeter ECal {
    199208  set ParticleInputArray ParticlePropagator/stableParticles
    200209  set TrackInputArray TrackMerger/tracks
    201210
    202   set TowerOutputArray towers
    203   set PhotonOutputArray photons
    204 
     211  set TowerOutputArray ecalTowers
    205212  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
     308module 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
    214320
    215321  set SmearTowerCenter true
     
    249355
    250356  # default energy fractions {abs(PDG code)} {Fecal Fhcal}
    251   add EnergyFraction {0} {0.0 1.0}
     357  add EnergyFraction {0} {1.0}
    252358  # energy fractions for e, gamma and pi0
    253   add EnergyFraction {11} {1.0 0.0}
    254   add EnergyFraction {22} {1.0 0.0}
    255   add EnergyFraction {111} {1.0 0.0}
     359  add EnergyFraction {11} {0.0}
     360  add EnergyFraction {22} {0.0}
     361  add EnergyFraction {111} {0.0}
    256362  # 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}
    266372  # 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}
    275375
    276376  # 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) +
    278378                             (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
     387module 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
     399module Merger Calorimeter {
     400# add InputArray InputArray
     401  add InputArray ECal/ecalTowers
     402  add InputArray HCal/hcalTowers
     403  set OutputArray towers
     404}
     405
     406
    280407
    281408####################
     
    285412module Merger EFlowMerger {
    286413# add InputArray InputArray
    287   add InputArray Calorimeter/eflowTracks
    288   add InputArray Calorimeter/eflowPhotons
    289   add InputArray Calorimeter/eflowNeutralHadrons
     414  add InputArray HCal/eflowTracks
     415  add InputArray ECal/eflowPhotons
     416  add InputArray HCal/eflowNeutralHadrons
    290417  set OutputArray eflow
    291418}
     
    296423
    297424module Efficiency PhotonEfficiency {
    298   set InputArray Calorimeter/eflowPhotons
     425  set InputArray ECal/eflowPhotons
    299426  set OutputArray photons
    300427
     
    325452}
    326453
    327 #################
    328 # Electron filter
    329 #################
    330 
    331 module PdgCodeFilter ElectronFilter {
    332   set InputArray Calorimeter/eflowTracks
    333   set OutputArray electrons
    334   set Invert true
    335   add PdgCode {11}
    336   add PdgCode {-11}
    337 }
    338454
    339455#####################
     
    382498
    383499  # 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) +
    389503                         (abs(eta) > 2.4)                                                 * (0.00)}
    390504}
     
    602716  add Branch Calorimeter/towers Tower Tower
    603717
    604   add Branch Calorimeter/eflowTracks EFlowTrack Track
    605   add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
    606   add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
     718  add Branch HCal/eflowTracks EFlowTrack Track
     719  add Branch ECal/eflowPhotons EFlowPhoton Tower
     720  add Branch HCal/eflowNeutralHadrons EFlowNeutralHadron Tower
    607721
    608722  add Branch GenJetFinder/jets GenJet Jet
    609723  add Branch GenMissingET/momentum GenMissingET MissingET
    610 
     724 
    611725  add Branch UniqueObjectFinder/jets Jet Jet
    612726  add Branch UniqueObjectFinder/electrons Electron Electron
  • cards/delphes_card_CMS_NoFastJet.tcl

    rec5e04b rb9ae4c3  
    1515
    1616  TrackMerger
     17
     18  ECal
     19  HCal
     20
    1721  Calorimeter
    1822  EFlowMerger
     23
    1924}
    2025
     
    9398  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
    9499                                           (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
    96103                         (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)) +
    98106                         (abs(eta) > 2.5)                                                  * (0.00)}
     107
    99108}
    100109
     
    128137  # resolution formula for electrons
    129138  # based on arXiv:1405.6569
    130   set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.06^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)}
    133142}
    134143
     
    144153
    145154  # 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
    150160
    151161##############
     
    162172
    163173#############
    164 # Calorimeter
     174#   ECAL
    165175#############
    166176
    167 module Calorimeter Calorimeter {
     177module SimpleCalorimeter ECal {
    168178  set ParticleInputArray ParticlePropagator/stableParticles
    169179  set TrackInputArray TrackMerger/tracks
    170180
    171   set TowerOutputArray towers
    172   set PhotonOutputArray photons
    173 
     181  set TowerOutputArray ecalTowers
    174182  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
    183189
    184190  set SmearTowerCenter true
     
    190196  # the list ends with the higher edged of the last tower
    191197
     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
     278module 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
    192299  # 5 degrees towers
    193300  set PhiBins {}
     
    218325
    219326  # default energy fractions {abs(PDG code)} {Fecal Fhcal}
    220   add EnergyFraction {0} {0.0 1.0}
     327  add EnergyFraction {0} {1.0}
    221328  # energy fractions for e, gamma and pi0
    222   add EnergyFraction {11} {1.0 0.0}
    223   add EnergyFraction {22} {1.0 0.0}
    224   add EnergyFraction {111} {1.0 0.0}
     329  add EnergyFraction {11} {0.0}
     330  add EnergyFraction {22} {0.0}
     331  add EnergyFraction {111} {0.0}
    225332  # 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}
    235342  # 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}
    242345
    243346  # 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) +
    245348                             (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
     356module Merger Calorimeter {
     357# add InputArray InputArray
     358  add InputArray ECal/ecalTowers
     359  add InputArray HCal/hcalTowers
     360  set OutputArray towers
     361}
     362
    247363
    248364####################
     
    252368module Merger EFlowMerger {
    253369# add InputArray InputArray
    254   add InputArray Calorimeter/eflowTracks
    255   add InputArray Calorimeter/eflowPhotons
    256   add InputArray Calorimeter/eflowNeutralHadrons
     370  add InputArray HCal/eflowTracks
     371  add InputArray ECal/eflowPhotons
     372  add InputArray HCal/eflowNeutralHadrons
    257373  set OutputArray eflow
    258374}
     375
  • cards/delphes_card_CMS_PileUp.tcl

    rec5e04b rb9ae4c3  
    1717
    1818  TrackMerger
    19   Calorimeter
     19
     20  ECal
     21  HCal
     22
    2023  ElectronFilter
    2124  TrackPileUpSubtractor
     
    4548
    4649  MissingET
    47  
     50
    4851  JetFlavorAssociation
    4952
     
    8285  # vertex smearing formula f(z,t) (z,t need to be respectively given in m,s)
    8386  set VertexDistributionFormula {exp(-(t^2/160e-12^2/2))*exp(-(z^2/0.053^2/2))}
    84  
     87
    8588
    8689}
     
    160163  set EfficiencyFormula {                                                    (pt <= 0.1)   * (0.00) +
    161164                                           (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
    163168                         (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)) +
    165171                         (abs(eta) > 2.5)                                                  * (0.00)}
    166172}
     
    178184  # resolution formula for charged hadrons
    179185  # based on arXiv:1405.6569
    180   set ResolutionFormula {                  (abs(eta) <= 0.5) * (pt > 0.1) * sqrt(0.01^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)}
    183189}
    184190
     
    229235
    230236#############
    231 # Calorimeter
     237#   ECAL
    232238#############
    233239
    234 module Calorimeter Calorimeter {
     240module SimpleCalorimeter ECal {
    235241  set ParticleInputArray ParticlePropagator/stableParticles
    236242  set TrackInputArray TrackMerger/tracks
    237243
    238   set TowerOutputArray towers
    239   set PhotonOutputArray photons
    240 
     244  set TowerOutputArray ecalTowers
    241245  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
     341module 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
    250353
    251354  set SmearTowerCenter true
     
    285388
    286389  # default energy fractions {abs(PDG code)} {Fecal Fhcal}
    287   add EnergyFraction {0} {0.0 1.0}
     390  add EnergyFraction {0} {1.0}
    288391  # energy fractions for e, gamma and pi0
    289   add EnergyFraction {11} {1.0 0.0}
    290   add EnergyFraction {22} {1.0 0.0}
    291   add EnergyFraction {111} {1.0 0.0}
     392  add EnergyFraction {11} {0.0}
     393  add EnergyFraction {22} {0.0}
     394  add EnergyFraction {111} {0.0}
    292395  # 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}
    302405  # 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}
    311408
    312409  # 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) +
    314411                             (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.130^2 + energy*2.70^2)}
     412
    315413}
    316414
     
    320418
    321419module PdgCodeFilter ElectronFilter {
    322   set InputArray Calorimeter/eflowTracks
     420  set InputArray HCal/eflowTracks
    323421  set OutputArray electrons
    324422  set Invert true
     
    327425}
    328426
     427###################################################
     428# Tower Merger (in case not using e-flow algorithm)
     429###################################################
     430
     431module Merger Calorimeter {
     432# add InputArray InputArray
     433  add InputArray ECal/ecalTowers
     434  add InputArray HCal/hcalTowers
     435  set OutputArray towers
     436}
     437
     438
    329439##########################
    330440# Track pile-up subtractor
     
    333443module TrackPileUpSubtractor TrackPileUpSubtractor {
    334444# add InputArray InputArray OutputArray
    335   add InputArray Calorimeter/eflowTracks eflowTracks
     445  add InputArray HCal/eflowTracks eflowTracks
    336446  add InputArray ElectronFilter/electrons electrons
    337447  add InputArray MuonMomentumSmearing/muons muons
     
    343453}
    344454
     455
    345456####################
    346 # Neutral tower merger
     457# Neutral Tower merger
    347458####################
    348459
    349460module Merger NeutralTowerMerger {
    350461# 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
    366465}
    367466
     
    371470####################
    372471
     472module 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
    373487module Merger EFlowMerger {
    374488# add InputArray InputArray
    375489  add InputArray TrackPileUpSubtractor/eflowTracks
    376   add InputArray Calorimeter/eflowPhotons
    377   add InputArray Calorimeter/eflowNeutralHadrons
     490  add InputArray ECal/eflowPhotons
     491  add InputArray HCal/eflowNeutralHadrons
    378492  set OutputArray eflow
    379493}
    380 
    381 
    382494
    383495#############
     
    450562}
    451563
    452 
    453 
    454564############
    455565# Jet finder
     
    478588module PileUpJetID PileUpJetID {
    479589  set JetInputArray FastJetFinder/jets
    480   set TrackInputArray Calorimeter/eflowTracks
    481   set NeutralInputArray NeutralTowerMerger/eflowTowers
     590  set TrackInputArray HCal/eflowTracks
     591  set NeutralInputArray NeutralTowerMerger/towers
    482592
    483593  set VertexInputArray PileUpMerger/vertices
     
    524634
    525635module Efficiency PhotonEfficiency {
    526   set InputArray Calorimeter/eflowPhotons
     636  set InputArray ECal/eflowPhotons
    527637  set OutputArray photons
    528638
     
    601711
    602712  # 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) +
    608716                         (abs(eta) > 2.4)                                                 * (0.00)}
     717
    609718}
    610719
     
    657766
    658767module JetFlavorAssociation JetFlavorAssociation {
    659  
     768
    660769  set PartonInputArray Delphes/partons
    661770  set ParticleInputArray Delphes/allParticles
    662771  set ParticleLHEFInputArray Delphes/allParticlesLHEF
    663772  set JetInputArray JetEnergyScale/jets
    664  
     773
    665774  set DeltaR 0.5
    666775  set PartonPTMin 1.0
     
    683792
    684793  # based on arXiv:1211.4462
    685  
     794
    686795  # default efficiency formula (misidentification rate)
    687796  add EfficiencyFormula {0} {0.01+0.000038*pt}
  • classes/DelphesClasses.cc

    rec5e04b rb9ae4c3  
    4141CompBase *Tower::fgCompare = CompE<Tower>::Instance();
    4242CompBase *HectorHit::fgCompare = CompE<HectorHit>::Instance();
     43CompBase *Vertex::fgCompare = CompSumPT2<Vertex>::Instance();
    4344CompBase *Candidate::fgCompare = CompMomentumPt<Candidate>::Instance();
    4445
     
    121122  Charge(0), Mass(0.0),
    122123  IsPU(0), IsRecoPU(0), IsConstituent(0), IsFromConversion(0),
     124  ClusterIndex(-1), ClusterNDF(0), ClusterSigma(0), SumPT2(0), BTVSumPT2(0), GenDeltaZ(0), GenSumPT2(0),
    123125  Flavor(0), FlavorAlgo(0), FlavorPhys(0),
    124126  BTag(0), BTagAlgo(0), BTagPhys(0),
     
    127129  Momentum(0.0, 0.0, 0.0, 0.0),
    128130  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),
    129133  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),
    131142  TrackResolution(0),
    132143  NCharged(0),
     
    245256  object.IsConstituent = IsConstituent;
    246257  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;
    247265  object.Flavor = Flavor;
    248266  object.FlavorAlgo = FlavorAlgo;
     
    262280  object.Momentum = Momentum;
    263281  object.Position = Position;
     282  object.InitialPosition = InitialPosition;
     283  object.PositionError = PositionError;
    264284  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; 
    267299  object.Xd = Xd;
    268300  object.Yd = Yd;
     
    282314  object.SumPtChargedPU = SumPtChargedPU;
    283315  object.SumPt = SumPt;
    284 
     316  object.ClusterIndex = ClusterIndex;
     317  object.ClusterNDF = ClusterNDF;
     318  object.ClusterSigma = ClusterSigma;
     319  object.SumPT2 = SumPT2;
     320 
    285321  object.FracPt[0] = FracPt[0];
    286322  object.FracPt[1] = FracPt[1];
     
    363399  Momentum.SetXYZT(0.0, 0.0, 0.0, 0.0);
    364400  Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
     401  InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
    365402  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;
    368417  Xd = 0.0;
    369418  Yd = 0.0;
     
    387436  SumPt = -999;
    388437
     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 
    389446  FracPt[0] = 0.0;
    390447  FracPt[1] = 0.0;
  • classes/DelphesClasses.h

    rec5e04b rb9ae4c3  
    4949  Long64_t Number; // event number
    5050
    51   Float_t ReadTime;
    52   Float_t ProcTime;
     51  Float_t ReadTime; // read time
     52  Float_t ProcTime; // processing time
    5353
    5454  ClassDef(Event, 1)
     
    147147  Float_t Pz; // particle momentum vector (z component) | hepevt.phep[number][2]
    148148
     149  Float_t P; // particle momentum
    149150  Float_t PT; // particle transverse momentum
    150151  Float_t Eta; // particle pseudorapidity
     
    152153
    153154  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
    154159
    155160  Float_t T; // particle vertex position (t component) | hepevt.vhep[number][3]
     
    163168  TLorentzVector P4() const;
    164169
    165   ClassDef(GenParticle, 1)
    166 };
    167 
    168 //---------------------------------------------------------------------------
    169 
    170 class Vertex: public TObject
    171 {
    172 public:
     170  ClassDef(GenParticle, 2)
     171};
     172
     173//---------------------------------------------------------------------------
     174
     175class Vertex: public SortableObject
     176{
     177public:
     178
    173179  Float_t T; // vertex position (t component)
    174180  Float_t X; // vertex position (x component)
     
    176182  Float_t Z; // vertex position (z component)
    177183
    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)
    179205};
    180206
     
    236262  Float_t E; // photon energy
    237263
    238   Float_t T; //particle arrival time of flight
     264  Float_t T; // particle arrival time of flight
    239265
    240266  Float_t EhadOverEem; // ratio of the hadronic versus electromagnetic energy deposited in the calorimeter
     
    242268  TRefArray Particles; // references to generated particles
    243269
    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
    252276
    253277  static CompBase *fgCompare; //!
     
    269293  Float_t Phi; // electron azimuthal angle
    270294
    271   Float_t T; //particle arrival time of flight
     295  Float_t T; // particle arrival time of flight
    272296
    273297  Int_t Charge; // electron charge
     
    277301  TRef Particle; // reference to generated particle
    278302
    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
    287309
    288310  static CompBase *fgCompare; //!
     
    304326  Float_t Phi; // muon azimuthal angle
    305327
    306   Float_t T; //particle arrival time of flight
     328  Float_t T; // particle arrival time of flight
    307329
    308330  Int_t Charge; // muon charge
     
    310332  TRef Particle; // reference to generated particle
    311333
    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
    320340
    321341  static CompBase *fgCompare; //!
     
    344364  Float_t DeltaPhi;  // jet radius in azimuthal angle
    345365
    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
    349369
    350370  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
    353373
    354374  UInt_t TauTag; // 0 or 1 for a jet that has been tagged as a tau
     
    397417  Int_t Charge; // track charge
    398418
     419  Float_t P; // track momentum
    399420  Float_t PT; // track transverse momentum
    400 
    401421  Float_t Eta; // track pseudorapidity
    402422  Float_t Phi; // track azimuthal angle
     423  Float_t CtgTheta; // track cotangent of theta
    403424
    404425  Float_t EtaOuter; // track pseudorapidity at the tracker edge
    405426  Float_t PhiOuter; // track azimuthal angle at the tracker edge
    406427
     428  Float_t T; // track vertex position (t component)
    407429  Float_t X; // track vertex position (x component)
    408430  Float_t Y; // track vertex position (y component)
    409431  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
    412434  Float_t XOuter; // track position (x component) at the tracker edge
    413435  Float_t YOuter; // track position (y component) at the tracker edge
    414436  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
    422454
    423455  TRef Particle; // reference to generated particle
    424456
    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)
    431465};
    432466
     
    526560  Float_t DeltaPhi;
    527561
    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
    532579  Float_t Xd;
    533580  Float_t Yd;
     
    535582
    536583  // tracking resolution
    537  
     584
    538585  Float_t TrackResolution;
    539586
     
    562609  Float_t SumPt;
    563610
     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
    564621  // N-subjettiness variables
    565622
     
    595652  void SetFactory(DelphesFactory *factory) { fFactory = factory; }
    596653
    597   ClassDef(Candidate, 4)
     654  ClassDef(Candidate, 5)
    598655};
    599656
  • classes/SortableObject.h

    rec5e04b rb9ae4c3  
    156156      return -1;
    157157    else if(t1->ET < t2->ET)
     158      return 1;
     159    else
     160      return 0;
     161  }
     162};
     163
     164//---------------------------------------------------------------------------
     165
     166template <typename T>
     167class CompSumPT2: public CompBase
     168{
     169  CompSumPT2() {}
     170public:
     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)
    158184      return 1;
    159185    else
  • doc/RootTreeDescription.html

    rec5e04b rb9ae4c3  
    2727  <td></td>
    2828</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>
    2939<tr class="class"><td colspan="3" id="LHCOEvent">class LHCOEvent</td></tr>
    3040<tr class="odd">
     
    6979  <td> hepup.AQCDUP</td>
    7080</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>
    7192<tr class="class"><td colspan="3" id="HepMCEvent">class HepMCEvent</td></tr>
    7293<tr class="odd">
     
    207228</tr>
    208229<tr class="odd">
     230  <td>P</td>
     231  <td>particle momentum</td>
     232  <td></td>
     233</tr>
     234<tr class="even">
    209235  <td>PT</td>
    210236  <td>particle transverse momentum</td>
    211237  <td></td>
    212238</tr>
    213 <tr class="even">
     239<tr class="odd">
    214240  <td>Eta</td>
    215241  <td>particle pseudorapidity</td>
    216242  <td></td>
    217243</tr>
    218 <tr class="odd">
     244<tr class="even">
    219245  <td>Phi</td>
    220246  <td>particle azimuthal angle</td>
    221247  <td></td>
    222248</tr>
    223 <tr class="even">
     249<tr class="odd">
    224250  <td>Rapidity</td>
    225251  <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>
    226267  <td></td>
    227268</tr>
     
    267308  <td></td>
    268309</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>
    269370<tr class="class"><td colspan="3" id="MissingET">class MissingET</td></tr>
    270371<tr class="even">
     
    328429</tr>
    329430<tr class="even">
     431  <td>T</td>
     432  <td>particle arrival time of flight</td>
     433  <td></td>
     434</tr>
     435<tr class="odd">
    330436  <td>EhadOverEem</td>
    331437  <td>ratio of the hadronic versus electromagnetic energy deposited in the calorimeter</td>
    332438  <td></td>
    333439</tr>
    334 <tr class="odd">
     440<tr class="even">
    335441  <td>Particles</td>
    336442  <td>references to generated particles</td>
    337443  <td></td>
    338444</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>
    339475<tr class="class"><td colspan="3" id="Electron">class Electron</td></tr>
    340476<tr class="even">
     
    354490</tr>
    355491<tr class="odd">
     492  <td>T</td>
     493  <td>particle arrival time of flight</td>
     494  <td></td>
     495</tr>
     496<tr class="even">
    356497  <td>Charge</td>
    357498  <td>electron charge</td>
    358499  <td></td>
    359500</tr>
    360 <tr class="even">
     501<tr class="odd">
    361502  <td>EhadOverEem</td>
    362503  <td>ratio of the hadronic versus electromagnetic energy deposited in the calorimeter</td>
    363504  <td></td>
    364505</tr>
    365 <tr class="odd">
     506<tr class="even">
    366507  <td>Particle</td>
    367508  <td>reference to generated particle</td>
    368509  <td></td>
    369510</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>
    370541<tr class="class"><td colspan="3" id="Muon">class Muon</td></tr>
    371542<tr class="even">
     
    385556</tr>
    386557<tr class="odd">
     558  <td>T</td>
     559  <td>particle arrival time of flight</td>
     560  <td></td>
     561</tr>
     562<tr class="even">
    387563  <td>Charge</td>
    388564  <td>muon charge</td>
    389565  <td></td>
    390566</tr>
    391 <tr class="even">
     567<tr class="odd">
    392568  <td>Particle</td>
    393569  <td>reference to generated particle</td>
    394570  <td></td>
    395571</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>
    396602<tr class="class"><td colspan="3" id="Jet">class Jet</td></tr>
    397603<tr class="even">
     
    416622</tr>
    417623<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">
    418639  <td>BTag</td>
    419640  <td>0 or 1 for a jet that has been tagged as containing a heavy quark</td>
    420641  <td></td>
    421642</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">
    423654  <td>TauTag</td>
    424655  <td>0 or 1 for a jet that has been tagged as a tau</td>
    425656  <td></td>
    426657</tr>
    427 <tr class="even">
     658<tr class="odd">
    428659  <td>Charge</td>
    429660  <td>tau charge</td>
    430661  <td></td>
    431662</tr>
    432 <tr class="odd">
     663<tr class="even">
    433664  <td>EhadOverEem</td>
    434665  <td>ratio of the hadronic versus electromagnetic energy deposited in the calorimeter</td>
    435666  <td></td>
    436667</tr>
    437 <tr class="even">
     668<tr class="odd">
    438669  <td>NCharged</td>
    439   <td>number of charged constituents </td>
    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">
    443674  <td>NNeutrals</td>
    444   <td>number of neutral constituents </td>
    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">
    448679  <td>Beta</td>
    449   <td>(sum pt of charged pile-up constituents)/(sum pt of charged constituents) </td>
    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">
    453684  <td>BetaStar</td>
    454   <td>(sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents) </td>
    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">
    458689  <td>MeanSqDeltaR</td>
    459690  <td>average distance (squared) between constituent and jet weighted by pt (squared) of constituent</td>
    460691  <td></td>
    461692</tr>
    462 <tr class="odd">
     693<tr class="even">
    463694  <td>PTD</td>
    464695  <td>average pt between constituent and jet weighted by pt of constituent</td>
    465696  <td></td>
    466697</tr>
    467 <tr class="even">
     698<tr class="odd">
    468699  <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">
    498739  <td>Constituents</td>
    499740  <td>references to constituents</td>
    500741  <td></td>
    501742</tr>
    502 <tr class="odd">
     743<tr class="even">
    503744  <td>Particles</td>
    504745  <td>references to generated particles</td>
     
    517758</tr>
    518759<tr class="even">
     760  <td>P</td>
     761  <td>track momentum</td>
     762  <td></td>
     763</tr>
     764<tr class="odd">
    519765  <td>PT</td>
    520766  <td>track transverse momentum</td>
    521767  <td></td>
    522768</tr>
    523 <tr class="odd">
     769<tr class="even">
    524770  <td>Eta</td>
    525771  <td>track pseudorapidity</td>
    526772  <td></td>
    527773</tr>
    528 <tr class="even">
     774<tr class="odd">
    529775  <td>Phi</td>
    530776  <td>track azimuthal angle</td>
    531777  <td></td>
    532778</tr>
     779<tr class="even">
     780  <td>CtgTheta</td>
     781  <td>track cotangent of theta</td>
     782  <td></td>
     783</tr>
    533784<tr class="odd">
    534785  <td>EtaOuter</td>
     
    542793</tr>
    543794<tr class="odd">
     795  <td>T</td>
     796  <td>track vertex position (t component)</td>
     797  <td></td>
     798</tr>
     799<tr class="even">
    544800  <td>X</td>
    545801  <td>track vertex position (x component)</td>
    546802  <td></td>
    547803</tr>
    548 <tr class="even">
     804<tr class="odd">
    549805  <td>Y</td>
    550806  <td>track vertex position (y component)</td>
    551807  <td></td>
    552808</tr>
    553 <tr class="odd">
     809<tr class="even">
    554810  <td>Z</td>
    555811  <td>track vertex position (z component)</td>
    556812  <td></td>
    557813</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">
    564820  <td>XOuter</td>
    565821  <td>track position (x component) at the tracker edge</td>
    566822  <td></td>
    567823</tr>
    568 <tr class="even">
     824<tr class="odd">
    569825  <td>YOuter</td>
    570826  <td>track position (y component) at the tracker edge</td>
    571827  <td></td>
    572828</tr>
    573 <tr class="odd">
     829<tr class="even">
    574830  <td>ZOuter</td>
    575831  <td>track position (z component) at the tracker edge</td>
    576832  <td></td>
    577833</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">
    584900  <td>Particle</td>
    585901  <td>reference to generated particle</td>
    586902  <td></td>
    587903</tr>
     904<tr class="odd">
     905  <td>VertexIndex</td>
     906  <td>reference to vertex</td>
     907  <td></td>
     908</tr>
    588909<tr class="class"><td colspan="3" id="Tower">class Tower</td></tr>
    589910<tr class="even">
     
    608929</tr>
    609930<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">
    610941  <td>Eem</td>
    611942  <td>calorimeter tower electromagnetic energy</td>
  • doc/genMakefile.tcl

    rec5e04b rb9ae4c3  
    263263executableDeps {converters/*.cpp} {examples/*.cpp}
    264264
    265 executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp}
     265executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp} {readers/DelphesROOT.cpp}
    266266
    267267puts {ifeq ($(HAS_CMSSW),true)}
  • doc/update_fastjet.sh

    rec5e04b rb9ae4c3  
    1 version=3.1.3
     1version=3.2.1
    22
    33wget http://fastjet.fr/repo/fastjet-${version}.tar.gz
     
    9393
    9494sed -i 's/#include "siscone\//#include "/' SISCone/SISConePlugin.cc
    95 
     95sed -i 's/#include <siscone\/config.h>/#include "config.h"/' SISCone/split_merge.h
    9696cd -
  • examples/Pythia8/configParticleGun.cmnd

    rec5e04b rb9ae4c3  
    33! 1) Settings used in the main program.
    44
    5 Main:numberOfEvents = 10000         ! number of events to generate
     5Main:numberOfEvents = 10000        ! number of events to generate
    66Main: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
     7Main:spareFlag1 = on               ! true means particle gun
     8Main:spareMode1 = 11               ! 1-5 - di-quark, 21 - di-gluon, 11 - single electron, 13 - single muon, 15 - single tau, 22 - single photon
     9Main:spareParm1 = 10000            ! max pt
     10Main:spareParm2 = 2.5              ! max eta
    1011
    1112! 2) Settings related to output in init(), next() and stat().
  • external/fastjet/CircularRange.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3535#include "fastjet/RangeDefinition.hh"
    3636#include "fastjet/Error.hh"
     37#include "fastjet/internal/deprecated.hh"
    3738
    3839// for backwards compatibility: one should now use SelectorCircle,
     
    5051public:
    5152  /// constructor
     53  FASTJET_DEPRECATED_MSG("CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead")
    5254  CircularRange() {_set_invalid_rapphi();}
    5355 
    5456  /// initialise CircularRange with a jet
     57  FASTJET_DEPRECATED_MSG("CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead")
    5558  CircularRange(const fastjet::PseudoJet & jet, double distance) {
    5659                _distance = distance;
     
    6063
    6164  /// initialise CircularRange with a (rap,phi) point
     65  FASTJET_DEPRECATED_MSG("CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead")
    6266  CircularRange(double rap, double phi, double distance) {
    6367                _distance = distance;
     
    6771
    6872  /// initialise CircularRange with just the radius parameter
     73  FASTJET_DEPRECATED_MSG("CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead")
    6974  CircularRange(double distance) {
    7075                _set_invalid_rapphi();
     
    7681 
    7782  /// return description of range
    78   virtual inline std::string description() const {
     83  virtual inline std::string description() const FASTJET_OVERRIDE {
    7984    std::ostringstream ostr;
    8085    ostr << "CircularRange: within distance "<< _distance << " of given jet or point." ;
     
    8388  /// returns true since this range is localizable (i.e. set_position
    8489  /// does something meaningful)
    85   virtual inline bool is_localizable() const { return true; }
     90  virtual inline bool is_localizable() const FASTJET_OVERRIDE { return true; }
    8691 
    8792  /// 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 {
    8994     if (! _rapphi_are_valid()) {
    9095       throw Error("Circular range used without a center having being defined (use set_position())");
     
    98103
    99104  /// 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 {
    101106     rapmin = _rapjet - _distance;
    102107     rapmax = _rapjet + _distance; }
  • external/fastjet/ClosestPair2D.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    145145
    146146    // 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));
    148148
    149149    // now we look for the closest-pair candidates on this tree
     
    174174    mindists2[i] = _points[i].neighbour_dist2;}
    175175 
    176   _heap = auto_ptr<MinHeap>(new MinHeap(mindists2, max_size));
     176  _heap = SharedPtr<MinHeap>(new MinHeap(mindists2, max_size));
    177177}
    178178
  • external/fastjet/ClusterSequence.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    152152  // set the pointer in the wrapper to this object to NULL to say that
    153153  // 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());
    156156    // normally the csi is purely internal so it really should not be
    157157    // NULL i.e assert should be OK
     
    724724  }
    725725 
    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
    728731  return N2MHTLazy9;
    729732
     
    775778
    776779
     780ClusterSequence & 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
    777789//----------------------------------------------------------------------
    778790// transfer the sequence contained in other_seq into our own;
     
    815827
    816828  // clean up existing structure
    817   if (_structure_shared_ptr()) {
     829  if (_structure_shared_ptr) {
    818830    // If there are jets associated with an old version of the CS and
    819831    // a new one, keeping track of when to delete the CS becomes more
     
    823835    // anything that is currently associated with the cluster sequence
    824836    // 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());
    826838    assert(csi != NULL);
    827839    csi->set_associated_cs(NULL);
     
    14551467// initialise the history in a standard way
    14561468void 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,
    14581471               const int parent2, const int jetp_index,
    14591472               const double dij) {
     
    14691482
    14701483  int local_step = _history.size()-1;
    1471   assert(local_step == step_number);
     1484  //#ifndef __NO_ASSERTS__
     1485  //assert(local_step == step_number);
     1486  //#endif
    14721487
    14731488  // sanity check: make sure the particles have not already been recombined
     
    16691684  int hist_j = _jets[jet_j].cluster_hist_index();
    16701685
    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),
    16721687                       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
    16731692
    16741693}
     
    16801699void ClusterSequence::_do_iB_recombination_step(
    16811700                                  const int jet_i, const double diB) {
    1682   // get history index
    1683   int newstep_k = _history.size();
    1684 
    16851701  // 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,
    16871703                       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);
    16881710
    16891711}
  • external/fastjet/ClusterSequence.hh

    rec5e04b rb9ae4c3  
    33
    44//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 $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    4949#include "fastjet/ClusterSequenceStructure.hh"
    5050
     51#include "fastjet/internal/deprecated.hh"
     52
    5153FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
    5254
     
    8082  }
    8183
     84  /// explicit assignment operator for a ClusterSequence
     85  ClusterSequence & operator=(const ClusterSequence & cs);
     86 
    8287  // virtual ClusterSequence destructor, in case any derived class
    8388  // thinks of needing a destructor at some point
     
    362367  /// As of FJ v3.1, this is deprecated, in line with the deprecation
    363368  /// 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){
    365372    _extras.reset(extras_in.release());
    366373  }
     374#endif
    367375
    368376  /// returns true when the plugin is allowed to run the show.
     
    730738  void _fast_NsqrtN_cluster();
    731739
    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);
    735744
    736745  /// internal routine associated with the construction of the unique
     
    10371046template <class J> inline double ClusterSequence::_bj_dist(
    10381047                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
    10391051  double dphi = std::abs(jetA->phi - jetB->phi);
    10401052  double deta = (jetA->eta - jetB->eta);
    10411053  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
    10421059  return dphi*dphi + deta*deta;
    10431060}
  • external/fastjet/ClusterSequence1GhostPassiveArea.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    7070  /// AreaBase one rather than the ActiveArea one (which for which we
    7171  /// 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 {
    7373    return ClusterSequenceAreaBase::n_empty_jets(selector);
    7474  }
  • external/fastjet/ClusterSequenceActiveArea.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    7474          const bool & writeout_combinations = false) ;
    7575
    76   virtual double area (const PseudoJet & jet) const {
     76  virtual double area (const PseudoJet & jet) const FASTJET_OVERRIDE {
    7777                             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 {
    7979                             return _average_area2[jet.cluster_hist_index()];};
    8080
    81   virtual PseudoJet area_4vector (const PseudoJet & jet) const {
     81  virtual PseudoJet area_4vector (const PseudoJet & jet) const FASTJET_OVERRIDE {
    8282                    return _average_area_4vector[jet.cluster_hist_index()];};
    8383
     
    110110  ///
    111111  /// 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;
    113113
    114114  /// return the true number of empty jets (replaces
    115115  /// 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;
    117117
    118118protected:
  • external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    9797
    9898  /// returns the area of a jet
    99   virtual double area (const PseudoJet & jet) const;
     99  virtual double area (const PseudoJet & jet) const FASTJET_OVERRIDE;
    100100
    101101  /// returns a four vector corresponding to the sum (E-scheme) of the
     
    103103  /// for a small contiguous area the p_t of the extended_area jet is
    104104  /// 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;
    106106
    107107  /// 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;
    109109
    110110  /// true if the entry in the history index corresponds to a
     
    114114
    115115  /// 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;}
    117117
    118118  /// return the total area, corresponding to a given Selector, that
     
    120120  ///
    121121  /// 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;
    123123
    124124  /// returns the total area under study
  • external/fastjet/ClusterSequenceArea.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2006-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    8080
    8181  /// 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 {
    8383    return _area_base->area(jet);}
    8484
    8585  /// return the error (uncertainty) associated with the determination
    8686  /// 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 {
    8888    return _area_base->area_error(jet);}
    8989
    9090  /// 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 {
    9292    return _area_base->area_4vector(jet);}
    9393
     
    110110  /// jet (see the BackgroundEstimator and Subtractor tools for more
    111111  /// advanced usage)
    112   virtual double empty_area(const Selector & selector) const {
     112  virtual double empty_area(const Selector & selector) const FASTJET_OVERRIDE {
    113113    return _area_base->empty_area(selector);}
    114114
     
    122122  /// jet (see the BackgroundEstimator and Subtractor tools for more
    123123  /// advanced usage)
    124   virtual double n_empty_jets(const Selector & selector) const {
     124  virtual double n_empty_jets(const Selector & selector) const FASTJET_OVERRIDE {
    125125    return _area_base->n_empty_jets(selector);
    126126  }
    127127
    128128  /// 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 {
    130130    return _area_base->is_pure_ghost(jet);
    131131  }
    132132
    133133  /// true if this ClusterSequence has explicit ghosts
    134   virtual bool has_explicit_ghosts() const {
     134  virtual bool has_explicit_ghosts() const FASTJET_OVERRIDE {
    135135    return _area_base->has_explicit_ghosts();
    136136  }
     
    144144  /// jet (see the BackgroundEstimator and Subtractor tools for more
    145145  /// 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")
    146147  virtual void get_median_rho_and_sigma(const std::vector<PseudoJet> & all_jets,
    147148                                        const Selector & selector,
     
    149150                                        double & median, double & sigma,
    150151                                        double & mean_area,
    151                                         bool all_are_incl = false) const {
     152                                        bool all_are_incl = false) const FASTJET_OVERRIDE {
    152153    _warn_if_range_unsuitable(selector);
    153     ClusterSequenceAreaBase::get_median_rho_and_sigma(
     154    ClusterSequenceAreaBase::_get_median_rho_and_sigma(
    154155                                 all_jets, selector, use_area_4vector,
    155156                                 median, sigma, mean_area, all_are_incl);
     
    160161  /// since we've overridden the 5-argument version above, we have to
    161162  /// 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")
    162164  virtual void get_median_rho_and_sigma(const Selector & selector,
    163165                                        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);
    167169  }
    168170
     
    171173  /// since we've overridden the multi-argument version above, we have to
    172174  /// 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")
    173176  virtual void get_median_rho_and_sigma(const Selector & selector,
    174177                                        bool use_area_4vector,
    175178                                        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);
    179182  }
    180183
     
    183186  /// additionally checks compatibility between "range" and region in which
    184187  /// 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") 
    185189  virtual void parabolic_pt_per_unit_area(double & a, double & b,
    186190                                          const Selector & selector,
    187191                                          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);
    192194  }
    193195
     
    204206                                 const JetDefinition & jet_def);
    205207
    206   std::auto_ptr<ClusterSequenceAreaBase> _area_base;
     208  SharedPtr<ClusterSequenceAreaBase> _area_base;
    207209  AreaDefinition _area_def;
    208210  static LimitedWarning _range_warnings;
    209211  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  }
    210227
    211228};
     
    254271  }
    255272  // 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);
    257274  transfer_from_sequence(*_area_base);
    258275}
  • external/fastjet/ClusterSequenceAreaBase.cc

    rec5e04b rb9ae4c3  
    11
    22//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 $
    44//
    55// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    7979}
    8080
     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.
    8186double 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
     91double 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.
    85102double 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
     107double 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.
    94118double ClusterSequenceAreaBase::median_pt_per_unit_something(
    95119                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).
     126double ClusterSequenceAreaBase::_median_pt_per_unit_something(
     127                const Selector & selector, bool use_area_4vector) const {
    97128  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);
    99130  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.
    108138void 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
     144void ClusterSequenceAreaBase::_parabolic_pt_per_unit_area(
    109145       double & a, double & b, const Selector & selector,
    110146       double exclude_above, bool use_area_4vector) const {
     
    161197
    162198
    163 
     199//----------------------------------------------------------------------
    164200void ClusterSequenceAreaBase::get_median_rho_and_sigma(
    165201            const Selector & selector, bool use_area_4vector,
    166202            double & median, double & sigma, double & mean_area) const {
     203  _get_median_rho_and_sigma(selector, use_area_4vector, median, sigma, mean_area);
     204}
     205
     206void ClusterSequenceAreaBase::_get_median_rho_and_sigma(
     207            const Selector & selector, bool use_area_4vector,
     208            double & median, double & sigma, double & mean_area) const {
    167209
    168210  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}
    173214
    174215void 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
     224void ClusterSequenceAreaBase::_get_median_rho_and_sigma(
    175225            const vector<PseudoJet> & all_jets,
    176226            const Selector & selector, bool use_area_4vector,
     
    288338
    289339
    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 subtracted
     340// 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
    294344vector<PseudoJet> ClusterSequenceAreaBase::subtracted_jets(const double rho,
    295345                                                           const double ptmin)
    296346                                                           const {
     347  return _subtracted_jets(rho,ptmin);
     348}
     349
     350vector<PseudoJet> ClusterSequenceAreaBase::_subtracted_jets(const double rho,
     351                                                            const double ptmin)
     352  const {
    297353  vector<PseudoJet> sub_jets;
    298354  vector<PseudoJet> jets_local = sorted_by_pt(inclusive_jets(ptmin));
    299355  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);
    301357     sub_jets.push_back(sub_jet);
    302358  }
     
    304360}
    305361
    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 subtracted
     362// 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
    310366vector<PseudoJet> ClusterSequenceAreaBase::subtracted_jets(
    311367                                                 const Selector & selector,
    312368                                                 const double ptmin)
    313369                                                 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);
    316372}
    317373
     
    320376PseudoJet ClusterSequenceAreaBase::subtracted_jet(const PseudoJet & jet,
    321377                                                  const double rho) const {
     378  return _subtracted_jet(jet, rho);
     379}
     380
     381PseudoJet ClusterSequenceAreaBase::_subtracted_jet(const PseudoJet & jet,
     382                                                   const double rho) const {
    322383  PseudoJet area4vect = area_4vector(jet);
    323384  PseudoJet sub_jet;
     
    343404PseudoJet ClusterSequenceAreaBase::subtracted_jet(const PseudoJet & jet,
    344405                                       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
     409PseudoJet 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);
    347413  return sub_jet;
    348414}
     
    353419                                              const double rho,
    354420                                              bool use_area_4vector) const {
     421  return _subtracted_pt(jet, rho, use_area_4vector);
     422}
     423
     424double ClusterSequenceAreaBase::_subtracted_pt(const PseudoJet & jet,
     425                                              const double rho,
     426                                              bool use_area_4vector) const {
    355427  if ( use_area_4vector ) {
    356      PseudoJet sub_jet = subtracted_jet(jet,rho);
     428     PseudoJet sub_jet = _subtracted_jet(jet,rho);
    357429     return sub_jet.perp();
    358430  } else {
     
    369441                                              bool use_area_4vector) const {
    370442  if ( use_area_4vector ) {
    371      PseudoJet sub_jet = subtracted_jet(jet,selector);
     443     PseudoJet sub_jet = _subtracted_jet(jet,selector);
    372444     return sub_jet.perp();
    373445  } 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);
    376448  }
    377449
  • external/fastjet/ClusterSequenceAreaBase.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3535#include "fastjet/LimitedWarning.hh"
    3636#include "fastjet/Selector.hh"
     37#include "fastjet/internal/deprecated.hh"
    3738
    3839FASTJET_BEGIN_NAMESPACE
     
    144145  /// apply jet-by-jet (see the BackgroundEstimator and Subtractor
    145146  /// 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")
    146148  double median_pt_per_unit_area(const Selector & selector) const;
    147149
     
    151153  /// The selector passed as an argument has to have a finite area and
    152154  /// 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")
    153156  double median_pt_per_unit_area_4vector(const Selector & selector) const;
    154157 
     
    157160  /// - something_is_area_4vect = false -> use plain area
    158161  /// - 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;
    161165
    162166  /// using jets withing the selector range (and with 4-vector areas if
     
    184188  /// using a scalar area causes one to neglect terms of relative
    185189  /// 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")
    186191  virtual void get_median_rho_and_sigma(const Selector & selector,
    187192                                        bool use_area_4vector,
     
    208213  /// apply jet-by-jet (see the BackgroundEstimator and Subtractor
    209214  /// 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")
    210216  virtual void get_median_rho_and_sigma(const std::vector<PseudoJet> & all_jets,
    211217                                        const Selector & selector,
     
    221227  /// apply jet-by-jet (see the BackgroundEstimator and Subtractor
    222228  /// 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")
    223230  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);
    229234  }
    230235 
     
    238243  /// apply jet-by-jet (see the BackgroundEstimator and Subtractor
    239244  /// 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")
    240246  virtual void parabolic_pt_per_unit_area(double & a, double & b,
    241247                                          const Selector & selector,
     
    247253  /// the ordering is the same as that of sorted_by_pt(cs.inclusive_jets()),
    248254  /// 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")
    249256  std::vector<PseudoJet> subtracted_jets(const double rho,
    250257                                         const double ptmin=0.0) const;
     
    258265  /// apply jet-by-jet (see the BackgroundEstimator and Subtractor
    259266  /// 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")
    260268  std::vector<PseudoJet> subtracted_jets(const Selector & selector,
    261269                                         const double ptmin=0.0) const;
    262270
    263271  /// 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")
    264273  PseudoJet subtracted_jet(const PseudoJet & jet,
    265274                           const double rho) const;
     
    273282  /// apply jet-by-jet (see the BackgroundEstimator and Subtractor
    274283  /// 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")
    275285  PseudoJet subtracted_jet(const PseudoJet & jet,
    276286                           const Selector & selector) const;
    277287
    278288  /// 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")
    279290  double subtracted_pt(const PseudoJet & jet,
    280291                       const double rho,
     
    288299  /// apply jet-by-jet (see the BackgroundEstimator and Subtractor
    289300  /// 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")
    290302  double subtracted_pt(const PseudoJet & jet,
    291303                       const Selector & selector,
     
    296308  void _check_selector_good_for_median(const Selector &selector) const;
    297309
     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;
    298337
    299338private:
     
    305344  /// check the jet algorithm is suitable (and if not issue a warning)
    306345  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;
    308366};
    309367
  • external/fastjet/ClusterSequencePassiveArea.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    6565  /// return an empty area that's appropriate to the passive area
    6666  /// determination carried out
    67   virtual double empty_area(const Selector & selector) const;
     67  virtual double empty_area(const Selector & selector) const FASTJET_OVERRIDE;
    6868
    6969private:
  • external/fastjet/ClusterSequenceStructure.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    7676
    7777  /// 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  }
    7981
    8082  //-------------------------------------------------------------
     
    8587  //-------------------------------------------------------------
    8688  /// 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;}
    8890
    8991  /// get a (const) pointer to the parent ClusterSequence (NULL if
    9092  /// inexistent)
    91   virtual const ClusterSequence* associated_cluster_sequence() const;
     93  virtual const ClusterSequence* associated_cluster_sequence() const FASTJET_OVERRIDE;
    9294 
    9395  /// 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;
    9597
    9698  /// if the jet has a valid associated cluster sequence then return a
    9799  /// pointer to it; otherwise throw an error
    98   virtual const ClusterSequence * validated_cs() const;
     100  virtual const ClusterSequence * validated_cs() const FASTJET_OVERRIDE;
    99101
    100102#ifndef __FJCORE__
    101103  /// if the jet has valid area information then return a pointer to
    102104  /// the associated ClusterSequenceAreaBase object; otherwise throw an error
    103   virtual const ClusterSequenceAreaBase * validated_csab() const;
     105  virtual const ClusterSequenceAreaBase * validated_csab() const FASTJET_OVERRIDE;
    104106#endif  // __FJCORE__
    105107
     
    125127  /// an Error is thrown if this PseudoJet has no currently valid
    126128  /// 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;
    128130
    129131  /// check if it has been recombined with another PseudoJet in which
     
    133135  /// an Error is thrown if this PseudoJet has no currently valid
    134136  /// 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;
    136138
    137139  /// check if it is the product of a recombination, in which case
     
    141143  /// an Error is thrown if this PseudoJet has no currently valid
    142144  /// 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;
    144146
    145147  /// check if the reference PseudoJet is contained in the second one
     
    151153  /// false is returned if the 2 PseudoJet do not belong the same
    152154  /// 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;
    154156
    155157  /// return true if the structure supports constituents.
     
    157159  /// an Error is thrown if this PseudoJet has no currently valid
    158160  /// associated ClusterSequence
    159   virtual bool has_constituents() const;
     161  virtual bool has_constituents() const FASTJET_OVERRIDE;
    160162
    161163  /// retrieve the constituents.
     
    163165  /// an Error is thrown if this PseudoJet has no currently valid
    164166  /// associated ClusterSequence
    165   virtual std::vector<PseudoJet> constituents(const PseudoJet &reference) const;
     167  virtual std::vector<PseudoJet> constituents(const PseudoJet &reference) const FASTJET_OVERRIDE;
    166168
    167169
     
    170172  /// an Error is thrown if this PseudoJet has no currently valid
    171173  /// associated ClusterSequence
    172   virtual bool has_exclusive_subjets() const;
     174  virtual bool has_exclusive_subjets() const FASTJET_OVERRIDE;
    173175
    174176  /// return a vector of all subjets of the current jet (in the sense
     
    183185  /// an Error is thrown if this PseudoJet has no currently valid
    184186  /// 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;
    186188
    187189  /// return the size of exclusive_subjets(...); still n ln n with same
     
    191193  /// an Error is thrown if this PseudoJet has no currently valid
    192194  /// 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;
    194196
    195197  /// return the list of subjets obtained by unclustering the supplied
     
    201203  /// an Error is thrown if this PseudoJet has no currently valid
    202204  /// 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;
    204206
    205207  /// return the dij that was present in the merging nsub+1 -> nsub
     
    208210  /// an Error is thrown if this PseudoJet has no currently valid
    209211  /// 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;
    211213
    212214  /// return the maximum dij that occurred in the whole event at the
     
    216218  /// an Error is thrown if this PseudoJet has no currently valid
    217219  /// 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;
    219221
    220222
     
    224226  /// by convention, a jet associated with a ClusterSequence will have
    225227  /// its parents as pieces
    226   virtual bool has_pieces(const PseudoJet &reference) const;
     228  virtual bool has_pieces(const PseudoJet &reference) const FASTJET_OVERRIDE;
    227229
    228230  /// by convention, a jet associated with a ClusterSequence will have
     
    235237  /// sequence. If the cluster sequence has gone out of scope, an
    236238  /// 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;
    238240
    239241
     
    244246
    245247  /// check if it has a defined area
    246   virtual bool has_area() const;
     248  virtual bool has_area() const FASTJET_OVERRIDE;
    247249
    248250  /// return the jet (scalar) area.
    249251  /// 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;
    251253
    252254  /// return the error (uncertainty) associated with the determination
    253255  /// of the area of this jet.
    254256  /// 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;
    256258
    257259  /// return the jet 4-vector area.
    258260  /// 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;
    260262
    261263  /// true if this jet is made exclusively of ghosts.
    262264  /// 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;
    264266
    265267#endif  // __FJCORE__
  • external/fastjet/ClusterSequenceVoronoiArea.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    6565
    6666  /// 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 {
    6868    return _voronoi_area[jet.cluster_hist_index()];}
    6969
     
    7272  /// made of sums of centres of all Voronoi cells in jet, each
    7373  /// 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 {
    7575    return _voronoi_area_4vector[jet.cluster_hist_index()];}
    7676
    7777  /// return the error of the area associated with the given jet
    7878  /// (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 {
    8080    return 0.0;}
    8181
  • external/fastjet/ClusterSequence_CP2DChan.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    4646  public:
    4747    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
    5050  };
    5151
  • external/fastjet/ClusterSequence_Delaunay.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    6969
    7070  // 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;
    7373#ifndef DROP_CGAL // strategy = NlnN* are not supported if we drop CGAL...
    7474  bool ignore_nearest_is_mirror = (_Rparam < twopi);
  • external/fastjet/CompositeJetStructure.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    6464
    6565  /// description
    66   virtual std::string description() const;
     66  virtual std::string description() const FASTJET_OVERRIDE;
    6767
    6868  // things reimplemented from the base structure
     
    7070  /// true unless the jet has no pieces (see also the description of
    7171  /// constituents() below)
    72   virtual bool has_constituents() const;
     72  virtual bool has_constituents() const FASTJET_OVERRIDE;
    7373
    7474  /// return the constituents (i.e. the union of the constituents of each piece)
     
    7878  /// Note that as a consequence, a composite jet with no pieces will
    7979  /// 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;
    8181
    8282  //-------------------------------------------------------------------
     
    8484  //-------------------------------------------------------------------
    8585  /// 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;}
    8787
    8888  /// 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;
    9090
    9191  // area-related material
     
    9393
    9494  /// check if it has a well-defined area
    95   virtual bool has_area() const;
     95  virtual bool has_area() const FASTJET_OVERRIDE;
    9696
    9797  /// return the jet (scalar) area.
    98   virtual double area(const PseudoJet &reference) const;
     98  virtual double area(const PseudoJet &reference) const FASTJET_OVERRIDE;
    9999
    100100  /// return the error (uncertainty) associated with the determination
     
    102102  ///
    103103  /// 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;
    105105
    106106  /// 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;
    108108
    109109  /// true if this jet is made exclusively of ghosts.
    110110  ///
    111111  /// 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;
    113113
    114114  //unused: // allows one to modify the area information
  • external/fastjet/DnnPlane.cc

    rec5e04b rb9ae4c3  
    11//FJSTARTHEADER
    2 // $Id: DnnPlane.cc 3918 2015-07-03 14:19:13Z salam $
     2// $Id: DnnPlane.cc 3917 2015-07-03 14:07:50Z salam $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
  • external/fastjet/Error.hh

    rec5e04b rb9ae4c3  
    33
    44//FJSTARTHEADER
    5 // $Id: Error.hh 3809 2015-02-20 13:05:13Z soyez $
     5// $Id: Error.hh 3807 2015-02-20 11:16:55Z soyez $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    114114};
    115115
    116 
    117116FASTJET_END_NAMESPACE
    118117
  • external/fastjet/GhostedAreaSpec.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3939#include "fastjet/Selector.hh"
    4040#include "fastjet/LimitedWarning.hh"
     41#include "fastjet/internal/deprecated.hh"
    4142
    4243//
     
    173174  ///
    174175  /// FJ2 placement is now deprecated.
     176  FASTJET_DEPRECATED_MSG("This is deprecated since we strongly recomment to use the new ghost placement instead")
    175177  void set_fj2_placement(bool  val);
    176178
  • external/fastjet/JetDefinition.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    4545JetDefinition::JetDefinition(JetAlgorithm jet_algorithm_in,
    4646                             double R_in,
     47                             RecombinationScheme recomb_scheme_in,
    4748                             Strategy strategy_in,
    48                              RecombinationScheme recomb_scheme_in,
    4949                             int nparameters) :
    5050  _jet_algorithm(jet_algorithm_in), _Rparam(R_in), _strategy(strategy_in) {
     
    185185
    186186  // do not forget to delete the existing recombiner if needed
    187   if (_shared_recombiner()) _shared_recombiner.reset();
     187  if (_shared_recombiner) _shared_recombiner.reset();
    188188
    189189  _recombiner = 0;
  • external/fastjet/JetDefinition.hh

    rec5e04b rb9ae4c3  
    33
    44//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 $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3535#include "fastjet/internal/numconsts.hh"
    3636#include "fastjet/PseudoJet.hh"
     37#include "fastjet/internal/deprecated.hh"
    3738#include<string>
    3839#include<memory>
     
    268269                RecombinationScheme recomb_scheme_in = E_scheme,
    269270                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);
    271272  }
    272273
     
    277278                Strategy strategy_in = Best) {
    278279    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);
    280281  }
    281282
     
    287288                RecombinationScheme recomb_scheme_in = E_scheme,
    288289                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);
    290291    set_extra_param(xtra_param_in);
    291292  }
     
    344345    _strategy = plugin_strategy;
    345346    _Rparam = _plugin->R();
     347    _extra_param = 0.0; // a dummy value to keep static code checkers happy
    346348    _jet_algorithm = plugin_algorithm;
    347349    set_recombination_scheme(E_scheme);
    348350  }
    349351
    350 
    351352  /// constructor to fully specify a jet-definition (together with
    352353  /// 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).
    353362  ///
    354363  /// the ordering of arguments here is old and deprecated (except
    355364  /// 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")
    356366  JetDefinition(JetAlgorithm jet_algorithm_in,
    357367                double R_in,
    358368                Strategy strategy_in,
    359369                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
    361374
    362375  /// cluster the supplied particles and returns a vector of resulting
     
    388401  /// Recombiner *) may lead to memory corruption.
    389402  void set_recombiner(const Recombiner * recomb) {
    390     if (_shared_recombiner()) _shared_recombiner.reset(recomb);
     403    if (_shared_recombiner) _shared_recombiner.reset(recomb);
    391404    _recombiner = recomb;
    392405    _default_recombiner = DefaultRecombiner(external_scheme);
     
    521534      _recomb_scheme(recomb_scheme) {}
    522535   
    523     virtual std::string description() const;
     536    virtual std::string description() const FASTJET_OVERRIDE;
    524537   
    525538    /// recombine pa and pb and put result into pab
    526539    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;
    530543
    531544    /// return the index of the recombination scheme
  • external/fastjet/LazyTiling25.cc

    rec5e04b rb9ae4c3  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling25.cc 3808 2015-02-20 11:24:53Z soyez $
     2// $Id: LazyTiling25.cc 3807 2015-02-20 11:16:55Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    369369    double dist = _distance_to_tile(jet, *near_tile) - tile_edge_security_margin;
    370370    // cout << "      max info looked at tile " << *near_tile - &_tiles[0]
    371     //   << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
    372     //   << endl;
     371    //     << ", dist = " << dist << " " << (*near_tile)->max_NN_dist
     372    //      << " -> diff = " << dist-(*near_tile)->max_NN_dist << endl;
    373373    if (dist > (*near_tile)->max_NN_dist) continue;
    374374
     
    665665    int n_near_tiles = 0;
    666666
     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   
    667694    // Initialise jetB's NN distance as well as updating it for other
    668695    // particles. While doing so, examine whether jetA or old jetB was
     
    679706        bool relevant_for_near_tile = dist_to_tile <= (*near_tile)->max_NN_dist;
    680707        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
    681712        if (! relevant) continue;
    682713        // now label this tile as having been considered (so that we
     
    702733    // and one new jet.
    703734    int n_done_tiles = n_near_tiles;
     735    //cout << "Looking at relevant tiles to update for jetA" << endl;
    704736    _add_untagged_neighbours_to_tile_union_using_max_info(jetA,
    705737                                           tile_union, n_near_tiles);
    706738    if (jetB != NULL) {
     739      // cout << "Looking at relevant tiles to update for oldB" << endl;
    707740        _add_untagged_neighbours_to_tile_union_using_max_info(&oldB,
    708741                                                              tile_union,n_near_tiles);
  • external/fastjet/LazyTiling9.cc

    rec5e04b rb9ae4c3  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling9.cc 3808 2015-02-20 11:24:53Z soyez $
     2// $Id: LazyTiling9.cc 3807 2015-02-20 11:16:55Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
  • external/fastjet/LazyTiling9Alt.cc

    rec5e04b rb9ae4c3  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling9Alt.cc 3808 2015-02-20 11:24:53Z soyez $
     2// $Id: LazyTiling9Alt.cc 3807 2015-02-20 11:16:55Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
  • external/fastjet/LazyTiling9SeparateGhosts.cc

    rec5e04b rb9ae4c3  
    11//FJSTARTHEADER
    2 // $Id: LazyTiling9SeparateGhosts.cc 3808 2015-02-20 11:24:53Z soyez $
     2// $Id: LazyTiling9SeparateGhosts.cc 3807 2015-02-20 11:16:55Z soyez $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
  • external/fastjet/NNH.hh

    rec5e04b rb9ae4c3  
    33
    44//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 $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3232//FJENDHEADER
    3333
    34 #include<fastjet/ClusterSequence.hh>
    35 
     34#include <fastjet/NNBase.hh>
    3635
    3736FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
    38 
    39 /// @ingroup advanced_usage
    40 /// \class _NoInfo
    41 /// dummy class, used as a default template argument
    42 class _NoInfo {};
    43 
    44 /// @ingroup advanced_usage
    45 /// \class NNHInfo
    46 /// template that will help initialise a BJ with a PseudoJet and extra information
    47 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_usage
    57 /// Specialisation of NNHInfo for cases where there is no extra info
    58 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 
    6537
    6638//----------------------------------------------------------------------
     
    6840/// \class NNH
    6941/// 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>
    8349///
    8450/// For the NNH<BJ> version of the class to function, BJ must provide
     
    8854///  - double BJ::distance(const BJ * other_bj_jet); // distance between this and other_bj_jet
    8955///  - double BJ::beam_distance()                  ; // distance to the beam
    90 ///
     56/// 
    9157/// For the NNH<BJ,I> version to function, the BJ::init(...) member
    9258/// must accept an extra argument
     
    9460///  - void   BJ::init(const PseudoJet & jet, I * info);   // initialise with a PseudoJet + info
    9561///
    96 /// where info might be a pointer to a class that contains, e.g., information
    97 /// about R, or other parameters of the jet algorithm
     62/// NOTE: THE DISTANCE MUST BE SYMMETRIC I.E. SATISFY
     63///     a.distance(b) == b.distance(a)
    9864///
    9965/// For an example of how the NNH<BJ> class is used, see the Jade (and
     
    10773/// implementations.
    10874///
    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> {
     75template<class BJ, class I = _NoInfo> class NNH : public NNBase<I> {
    11476public:
    11577
    11678  /// constructor with an initial set of jets (which will be assigned indices
    11779  /// 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
    12184  void start(const std::vector<PseudoJet> & jets);
    12285
  • external/fastjet/PseudoJet.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    409409string PseudoJet::description() const{
    410410  // the "default" case of a PJ which does not belong to any cluster sequence
    411   if (!_structure())
     411  if (!_structure)
    412412    return "standard PseudoJet (with no associated clustering information)";
    413413 
    414414  // for all the other cases, the description comes from the structure
    415   return _structure()->description();
     415  return _structure->description();
    416416}
    417417
     
    429429// ClusterSequence
    430430bool PseudoJet::has_associated_cluster_sequence() const{
    431   return (_structure()) && (_structure->has_associated_cluster_sequence());
     431  return (_structure) && (_structure->has_associated_cluster_sequence());
    432432}
    433433
     
    446446// ClusterSequence that is still valid
    447447bool PseudoJet::has_valid_cluster_sequence() const{
    448   return (_structure()) && (_structure->has_valid_cluster_sequence());
     448  return (_structure) && (_structure->has_valid_cluster_sequence());
    449449}
    450450
     
    467467
    468468//----------------------------------------------------------------------
    469 // return true if there is some strusture associated with this PseudoJet
     469// return true if there is some structure associated with this PseudoJet
    470470bool PseudoJet::has_structure() const{
    471   return _structure();
     471  return bool(_structure);
    472472}
    473473
     
    478478// return NULL if there is no associated structure
    479479const PseudoJetStructureBase* PseudoJet::structure_ptr() const {
    480   if (!_structure()) return NULL;
    481   return _structure();
     480  //if (!_structure) return NULL;
     481  return _structure.get();
    482482}
    483483 
     
    493493// underlying structure.
    494494PseudoJetStructureBase* PseudoJet::structure_non_const_ptr(){
    495   if (!_structure()) return NULL;
    496   return _structure();
     495  //if (!_structure) return NULL;
     496  return _structure.get();
    497497}
    498498 
     
    503503// throw an error if there is no associated structure
    504504const PseudoJetStructureBase* PseudoJet::validated_structure_ptr() const {
    505   if (!_structure())
     505  if (!_structure)
    506506    throw Error("Trying to access the structure of a PseudoJet which has no associated structure");
    507   return _structure();
     507  return _structure.get();
    508508}
    509509 
     
    573573// returns true if the PseudoJet has constituents
    574574bool PseudoJet::has_constituents() const{
    575   return (_structure()) && (_structure->has_constituents());
     575  return (_structure) && (_structure->has_constituents());
    576576}
    577577
     
    586586// returns true if the PseudoJet has support for exclusive subjets
    587587bool PseudoJet::has_exclusive_subjets() const{
    588   return (_structure()) && (_structure->has_exclusive_subjets());
     588  return (_structure) && (_structure->has_exclusive_subjets());
    589589}
    590590
     
    670670// ClusterSequence have no pieces and this methos will return false.
    671671bool PseudoJet::has_pieces() const{
    672   return ((_structure()) && (_structure->has_pieces(*this)));
     672  return ((_structure) && (_structure->has_pieces(*this)));
    673673}
    674674
     
    766766
    767767
    768 
    769 //----------------------------------------------------------------------
    770 /// given a vector of values with a one-to-one correspondence with the
    771 /// vector of objects, sort objects into an order such that the
    772 /// associated values would be in increasing order
    773 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 indices
    780   vector<int> indices(values.size());
    781   for (size_t i = 0; i < indices.size(); i++) {indices[i] = i;}
    782  
    783   // sort the indices
    784   sort_indices(indices, values);
    785  
    786   // copy the objects
    787   vector<T> objects_sorted(objects.size());
    788  
    789   // place the objects in the correct order
    790   for (size_t i = 0; i < indices.size(); i++) {
    791     objects_sorted[i] = objects[indices[i]];
    792   }
    793 
    794   return objects_sorted;
    795 }
    796 
    797768//----------------------------------------------------------------------
    798769/// return a vector of jets sorted into decreasing kt2
  • external/fastjet/PseudoJet.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    437437  /// retrieve a pointer to the (const) user information
    438438  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;
    440442    return _user_info.get();
    441443  }
     
    841843inline bool operator!=( const double val, const PseudoJet & a) {return !(a==val);}
    842844
     845/// returns the 4-vector dot product of a and b
    843846inline double dot_product(const PseudoJet & a, const PseudoJet & b) {
    844847  return a.E()*b.E() - a.px()*b.px() - a.py()*b.py() - a.pz()*b.pz();
     
    880883/// touch the values vector in the process).
    881884template<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}
    883908
    884909/// \if internal_doc
     
    970995template<typename TransformerType>
    971996bool PseudoJet::has_structure_of() const{
    972   if (!_structure()) return false;
     997  if (!_structure) return false;
    973998
    974999  return dynamic_cast<const typename TransformerType::StructureType *>(_structure.get()) != 0;
     
    9801005template<typename TransformerType>
    9811006const typename TransformerType::StructureType & PseudoJet::structure_of() const{
    982   if (!_structure())
     1007  if (!_structure)
    9831008    throw Error("Trying to access the structure of a PseudoJet without an associated structure");
    9841009
  • external/fastjet/RangeDefinition.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3535#include "fastjet/Error.hh"
    3636#include "fastjet/LimitedWarning.hh"
     37#include "fastjet/internal/deprecated.hh"
    3738#include<sstream>
    3839#include<iostream>
     
    5152public:
    5253  /// default constructor
     54  FASTJET_DEPRECATED_MSG("RangeDefinition is deprecated since FastJet 3.0. Use the Selector mechanism instead")
    5355  RangeDefinition() { _warn_deprecated(); }
    5456
    5557  /// 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")
    5659  RangeDefinition(double rapmax) {  _warn_deprecated();
    5760                     assert ( rapmax > 0.0 );
  • external/fastjet/RectangularGrid.cc

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

    rec5e04b rb9ae4c3  
    33
    44//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 $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    118118  RectangularGrid();
    119119
    120   virtual int n_tiles() const {return _ntotal;}
     120  virtual int n_tiles() const FASTJET_OVERRIDE {return _ntotal;}
    121121
    122   virtual int n_good_tiles() const {return _ngood;}
     122  virtual int n_good_tiles() const FASTJET_OVERRIDE {return _ngood;}
    123123
    124124  // this was being kept inline, but it seems to make little
    125125  // 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;
    127127
    128128  /// returns whether a given tile is good
    129129  // 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  }
    131133
    132134  /// 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  }
    134138
    135139  /// 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;};
    137141
    138142  /// returns a textual description of the grid
    139   virtual std::string description() const;
     143  virtual std::string description() const FASTJET_OVERRIDE;
    140144 
    141145  /// returns the minimum rapidity extent of the grid
     
    149153
    150154  /// 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;}
    152156
    153157private:
  • external/fastjet/SharedPtr.hh

    rec5e04b rb9ae4c3  
    33
    44//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 $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3838// for our SharedPtr simply to be derived from the STL TR1 one.
    3939// #define __FASTJET_USETR1SHAREDPTR
     40
     41#include "fastjet/internal/deprecated.hh"
    4042
    4143#ifdef __FASTJET_USETR1SHAREDPTR
     
    7274  SharedPtr(const SharedPtr<T> & t) : std::tr1::shared_ptr<T>(t) {}
    7375  // for some reason operator() doesn't get inherited
     76  #ifdef FASTJET_HAVE_EXPLICIT_FOR_OPERATORS
     77  explicit
     78  #endif
    7479  inline operator bool() const {return (this->get()!=NULL);}
    7580  /// return the pointer we're pointing to 
     
    211216  }
    212217 
    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")
    214223  T* operator ()() const{
    215224    if (_ptr==NULL) return NULL;
     
    257266  /// conversion to bool
    258267  /// This will allow you to use the indirection nicely
     268  #ifdef FASTJET_HAVE_EXPLICIT_FOR_OPERATORS
     269  explicit
     270  #endif
    259271  inline operator bool() const{
    260272    return (get()!=NULL);
  • external/fastjet/TilingExtent.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    4141  _determine_rapidity_extent(cs.jets());
    4242}
    43  
     43
     44TilingExtent::TilingExtent(const vector<PseudoJet> &particles) {
     45  _determine_rapidity_extent(particles);
     46}
     47
    4448void TilingExtent::_determine_rapidity_extent(const vector<PseudoJet> & particles) {
    4549  // have a binning of rapidity that goes from -nrap to nrap
  • external/fastjet/VERSION

    rec5e04b rb9ae4c3  
    1 3.1.3
     13.2.1
  • external/fastjet/WrappedStructure.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    5757  WrappedStructure(const SharedPtr<PseudoJetStructureBase> & to_be_shared)
    5858    : _structure(to_be_shared){
    59     if (!_structure())
     59    if (!_structure)
    6060      throw Error("Trying to construct a wrapped structure around an empty (NULL) structure");
    6161  }
     
    6565
    6666  /// description
    67   virtual std::string description() const{
     67  virtual std::string description() const FASTJET_OVERRIDE{
    6868    return "PseudoJet wrapping the structure ("+_structure->description()+")";
    6969  }
     
    7676  //-------------------------------------------------------------
    7777  /// 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 {
    7979    return _structure->has_associated_cluster_sequence();
    8080  }
     
    8282  /// get a (const) pointer to the parent ClusterSequence (NULL if
    8383  /// inexistent)
    84   virtual const ClusterSequence* associated_cluster_sequence() const{
     84  virtual const ClusterSequence* associated_cluster_sequence() const FASTJET_OVERRIDE{
    8585    return _structure->associated_cluster_sequence();
    8686  }
     
    8888  /// returns true if this PseudoJet has an associated and still
    8989  /// valid ClusterSequence.
    90   virtual bool has_valid_cluster_sequence() const {
     90  virtual bool has_valid_cluster_sequence() const FASTJET_OVERRIDE {
    9191    return _structure->has_valid_cluster_sequence();
    9292  }
     
    9494  /// if the jet has a valid associated cluster sequence then return a
    9595  /// pointer to it; otherwise throw an error
    96   virtual const ClusterSequence * validated_cs() const{
     96  virtual const ClusterSequence * validated_cs() const FASTJET_OVERRIDE{
    9797    return _structure->validated_cs();
    9898  }
     
    100100  /// if the jet has valid area information then return a pointer to
    101101  /// the associated ClusterSequenceAreaBase object; otherwise throw an error
    102   virtual const ClusterSequenceAreaBase * validated_csab() const{
     102  virtual const ClusterSequenceAreaBase * validated_csab() const FASTJET_OVERRIDE{
    103103    return _structure->validated_csab();
    104104  }
     
    120120  ///
    121121  /// 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{
    123123    return _structure->has_partner(reference, partner);
    124124  }
     
    129129  ///
    130130  /// 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{
    132132    return _structure->has_child(reference, child);
    133133  }
     
    138138  ///
    139139  /// 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{
    141142    return _structure->has_parents(reference, parent1, parent2);
    142143  }
     
    146147  ///
    147148  /// 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{
    149151    return _structure->object_in_jet(reference, jet);
    150152  }
     
    154156  ///
    155157  /// false by default
    156   virtual bool has_constituents() const {
     158  virtual bool has_constituents() const  FASTJET_OVERRIDE{
    157159    return _structure->has_constituents();
    158160  }
     
    161163  ///
    162164  /// 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{
    164166    return _structure->constituents(reference);
    165167  }
    166168
    167169  /// return true if the structure supports exclusive_subjets.
    168   virtual bool has_exclusive_subjets() const {
     170  virtual bool has_exclusive_subjets() const  FASTJET_OVERRIDE{
    169171    return _structure->has_exclusive_subjets();
    170172  }
     
    180182  ///
    181183  /// 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{
    183186    return _structure->exclusive_subjets(reference, dcut);
    184187  }
     
    189192  ///
    190193  /// 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{
    192196    return _structure->n_exclusive_subjets(reference, dcut);
    193197  }
     
    198202  ///
    199203  /// 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{
    201206    return _structure->exclusive_subjets_up_to (reference, nsub);
    202207  }
     
    206211  ///
    207212  /// 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{
    209214    return _structure->exclusive_subdmerge(reference, nsub);
    210215  }
     
    215220  ///
    216221  /// 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{
    218223    return _structure->exclusive_subdmerge_max(reference, nsub);
    219224  }
     
    226231  ///
    227232  /// false by default
    228   virtual bool has_pieces(const PseudoJet &reference) const {
     233  virtual bool has_pieces(const PseudoJet &reference) const FASTJET_OVERRIDE {
    229234    return _structure->has_pieces(reference);
    230235  }
     
    233238  ///
    234239  /// 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 {
    236241    return _structure->pieces(reference);
    237242  }
     
    244249  ///
    245250  /// false by default
    246   virtual bool has_area() const {
     251  virtual bool has_area() const FASTJET_OVERRIDE  {
    247252    return _structure->has_area();
    248253  }
     
    251256  ///
    252257  /// By default, throws an Error
    253   virtual double area(const PseudoJet &reference) const{
     258  virtual double area(const PseudoJet &reference) const FASTJET_OVERRIDE{
    254259    return _structure->area(reference);
    255260  }
     
    259264  ///
    260265  /// 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{
    262267    return _structure->area_error(reference);
    263268  }
     
    266271  ///
    267272  /// 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{
    269274    return _structure->area_4vector(reference);
    270275  }
     
    273278  ///
    274279  /// 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{
    276281    return _structure->is_pure_ghost(reference);
    277282  }
  • external/fastjet/config_auto.h

    rec5e04b rb9ae4c3  
    6464#endif
    6565
    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 */
    6873
    6974/* defined if demangling is enabled at configure time and is supported through
     
    8186#endif
    8287
     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
    8396/* Define to 1 if you have the <inttypes.h> header file. */
    8497#ifndef FASTJET_HAVE_INTTYPES_H
     
    96109#endif
    97110
     111/* compiler supports the "override" keyword */
     112/* #undef HAVE_OVERRIDE */
     113
    98114/* Define to 1 if you have the <stdint.h> header file. */
    99115#ifndef FASTJET_HAVE_STDINT_H
     
    131147#endif
    132148
    133 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    134    */
     149/* Define to the sub-directory where libtool stores uninstalled libraries. */
    135150#ifndef FASTJET_LT_OBJDIR
    136151#define FASTJET_LT_OBJDIR  ".libs/"
     
    154169/* Define to the full name and version of this package. */
    155170#ifndef FASTJET_PACKAGE_STRING
    156 #define FASTJET_PACKAGE_STRING  "FastJet 3.1.3"
     171#define FASTJET_PACKAGE_STRING  "FastJet 3.2.1"
    157172#endif
    158173
     
    162177#endif
    163178
     179/* Define to the home page for this package. */
     180#ifndef FASTJET_PACKAGE_URL
     181#define FASTJET_PACKAGE_URL  ""
     182#endif
     183
    164184/* Define to the version of this package. */
    165185#ifndef FASTJET_PACKAGE_VERSION
    166 #define FASTJET_PACKAGE_VERSION  "3.1.3"
     186#define FASTJET_PACKAGE_VERSION  "3.2.1"
    167187#endif
    168188
     
    174194/* Version number of package */
    175195#ifndef FASTJET_VERSION
    176 #define FASTJET_VERSION  "3.1.3"
     196#define FASTJET_VERSION  "3.2.1"
    177197#endif
    178198
     
    184204/* Minor version of this package */
    185205#ifndef FASTJET_VERSION_MINOR
    186 #define FASTJET_VERSION_MINOR  1
     206#define FASTJET_VERSION_MINOR  2
    187207#endif
    188208
    189209/* Version of the package under the form XYYZZ (instead of X.Y.Z) */
    190210#ifndef FASTJET_VERSION_NUMBER
    191 #define FASTJET_VERSION_NUMBER  30103
     211#define FASTJET_VERSION_NUMBER  30201
    192212#endif
    193213
    194214/* Patch version of this package */
    195215#ifndef FASTJET_VERSION_PATCHLEVEL
    196 #define FASTJET_VERSION_PATCHLEVEL  3
     216#define FASTJET_VERSION_PATCHLEVEL  1
    197217#endif
    198218
  • external/fastjet/config_raw.h

    rec5e04b rb9ae4c3  
    3838#define ENABLE_PLUGIN_TRACKJET /**/
    3939
    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 */
    4245
    4346/* defined if demangling is enabled at configure time and is supported through
     
    5154#define HAVE_EXECINFO_H 1
    5255
     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
    5362/* Define to 1 if you have the <inttypes.h> header file. */
    5463#define HAVE_INTTYPES_H 1
     
    5968/* Define to 1 if you have the <memory.h> header file. */
    6069#define HAVE_MEMORY_H 1
     70
     71/* compiler supports the "override" keyword */
     72/* #undef HAVE_OVERRIDE */
    6173
    6274/* Define to 1 if you have the <stdint.h> header file. */
     
    8193#define HAVE_UNISTD_H 1
    8294
    83 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    84    */
     95/* Define to the sub-directory where libtool stores uninstalled libraries. */
    8596#define LT_OBJDIR ".libs/"
    8697
     
    95106
    96107/* 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"
    98109
    99110/* Define to the one symbol short name of this package. */
    100111#define PACKAGE_TARNAME "fastjet"
    101112
     113/* Define to the home page for this package. */
     114#define PACKAGE_URL ""
     115
    102116/* Define to the version of this package. */
    103 #define PACKAGE_VERSION "3.1.3"
     117#define PACKAGE_VERSION "3.2.1"
    104118
    105119/* Define to 1 if you have the ANSI C header files. */
     
    107121
    108122/* Version number of package */
    109 #define VERSION "3.1.3"
     123#define VERSION "3.2.1"
    110124
    111125/* Major version of this package */
     
    113127
    114128/* Minor version of this package */
    115 #define VERSION_MINOR 1
     129#define VERSION_MINOR 2
    116130
    117131/* Version of the package under the form XYYZZ (instead of X.Y.Z) */
    118 #define VERSION_NUMBER 30103
     132#define VERSION_NUMBER 30201
    119133
    120134/* Patch version of this package */
    121 #define VERSION_PATCHLEVEL 3
     135#define VERSION_PATCHLEVEL 1
    122136
    123137/* 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
    98
    109/* The ATLASCone plugin is disabled by default*/
  • external/fastjet/contribs/Nsubjettiness/ChangeLog

    rec5e04b rb9ae4c3  
     12016-06-08 <jthaler>
     2   Fixed bug in MeasureDefinition.cc where axes were not completely defined,
     3      leading to problems with multi-pass axes
     42016-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
     82016-03-29 <jthaler>
     9   Update for FJ 3.2.0 to deal with SharedPtr () deprecation
    1102015-09-28 <jthaler>
    211   Updated NEWS for 2.2.1 release.
  • external/fastjet/contribs/Nsubjettiness/MeasureDefinition.cc

    rec5e04b rb9ae4c3  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: MeasureDefinition.cc 819 2015-06-12 21:23:24Z jthaler $
     7//  $Id: MeasureDefinition.cc 946 2016-06-14 19:11:27Z jthaler $
    88//----------------------------------------------------------------------
    99// This file is part of FastJet contrib.
     
    524524      old_axes[k].set_rap( seedAxes[k].rap() );
    525525      old_axes[k].set_phi( seedAxes[k].phi() );
     526      old_axes[k].set_mom( seedAxes[k].modp()  );
    526527   }
    527528   
  • external/fastjet/contribs/Nsubjettiness/NEWS

    rec5e04b rb9ae4c3  
    3232    N-jettiness as a jet finder using the new ConicalGeometric measure.
    3333
     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
    3439-- 2.2.1:  (Sept 28, 2015)  Fix of small Makefile bug
    3540-- 2.2.0:  (Sept 7, 2015)  Inclusion of the XCone jet algorithm, as well as a
  • external/fastjet/contribs/Nsubjettiness/Njettiness.cc

    rec5e04b rb9ae4c3  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: Njettiness.cc 821 2015-06-15 18:50:53Z jthaler $
     7//  $Id: Njettiness.cc 933 2016-04-04 22:23:32Z jthaler $
    88//----------------------------------------------------------------------
    99// This file is part of FastJet contrib.
     
    4646// setAxes for Manual mode
    4747void Njettiness::setAxes(const std::vector<fastjet::PseudoJet> & myAxes) {
    48    if (_axes_def()->needsManualAxes()) {
     48   if (_axes_def->needsManualAxes()) {
    4949      _currentAxes = myAxes;
    5050   } else {
     
    5959      _currentAxes = inputJets;
    6060      _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                                             );
    6271      _seedAxes = _currentAxes;
    6372      _currentPartition = TauPartition(n_jets); // empty partition
    6473   } else {
    65       assert(_axes_def()); // this should never fail.
     74      assert(_axes_def); // this should never fail.
    6675     
    67       if (_axes_def()->needsManualAxes()) { // if manual mode
     76      if (_axes_def->needsManualAxes()) { // if manual mode
    6877         // take current axes as seeds
    6978         _seedAxes = _currentAxes;
    7079         
    7180         // 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());
    7382      } else { // non-manual axes
    7483         
    7584          //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());
    7786         
    7887         // 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());
    8089         
    8190         // NOTE:  The above two function calls are combined in "AxesDefinition::get_axes"
  • external/fastjet/contribs/Nsubjettiness/VERSION

    rec5e04b rb9ae4c3  
    1 2.2.1
     12.2.4
  • external/fastjet/internal/ClosestPair2D.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3838#include "fastjet/internal/SearchTree.hh"
    3939#include "fastjet/internal/MinHeap.hh"
     40#include "fastjet/SharedPtr.hh"
    4041
    4142FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     
    134135
    135136
    136   triplet<std::auto_ptr<Tree> >  _trees;
    137   std::auto_ptr<MinHeap> _heap;
     137  triplet<SharedPtr<Tree> >  _trees;
     138  SharedPtr<MinHeap>    _heap;
    138139  std::vector<Point>     _points;
    139140  std::stack<Point *>    _available_points;
  • external/fastjet/internal/ClosestPair2DBase.hh

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    4848  double x, y;
    4949
    50   Coord2D() {};
     50  Coord2D() : x(0.0), y(0.0) {};
    5151
    5252  Coord2D(double a, double b): x(a), y(b) {};
  • external/fastjet/internal/DnnPlane.hh

    rec5e04b rb9ae4c3  
    11//FJSTARTHEADER
    2 // $Id: DnnPlane.hh 3918 2015-07-03 14:19:13Z salam $
     2// $Id: DnnPlane.hh 3917 2015-07-03 14:07:50Z salam $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
  • external/fastjet/internal/LazyTiling9Alt.hh

    rec5e04b rb9ae4c3  
    33
    44//FJSTARTHEADER
    5 // $Id: LazyTiling9Alt.hh 3808 2015-02-20 11:24:53Z soyez $
     5// $Id: LazyTiling9Alt.hh 3807 2015-02-20 11:16:55Z soyez $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
  • external/fastjet/internal/TilingExtent.hh

    rec5e04b rb9ae4c3  
    55
    66//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 $
    88//
    99// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    4646  TilingExtent(ClusterSequence & cs);
    4747
     48  /// constructor that takes a list of PseudoJets
     49  TilingExtent(const std::vector<PseudoJet> &particles);
     50
    4851  /// returns the suggested minimum rapidity for the tiling
    4952  double minrap() const {return _minrap;}
  • external/fastjet/internal/base.hh

    rec5e04b rb9ae4c3  
    11
    22//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 $
    44//
    55// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3333#define __FASTJET_FASTJET_BASE_HH__
    3434
     35#include "fastjet/config.h"
     36
    3537/// \namespace fastjet
    3638/// the FastJet namespace
     
    4345#define FASTJET_END_NAMESPACE   }
    4446
     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
    4555#endif // __FASTJET_FASTJET_BASE_HH__
  • external/fastjet/plugins/Jade/JadePlugin.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3535//#include "fastjet/internal/ClusterSequence_N2.icc"
    3636#include "fastjet/NNH.hh"
     37#include "fastjet/NNFJN2Plain.hh"
    3738
    3839// other stuff
     
    5152//----------------------------------------------------------------------
    5253/// 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.
    5373class JadeBriefJet {
    5474public:
     
    6989  }
    7090
     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 
    71103  double beam_distance() const {
    72104    return numeric_limits<double>::max();
    73105  }
    74106
     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 
    75115private:
    76116  double rt2E, nx, ny, nz;
     
    82122  ostringstream desc;
    83123  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
    84133  return desc.str();
    85134}
    86135
    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
     179template<class N> void JadePlugin::_actual_run_clustering(ClusterSequence & cs) const {
     180
    89181  int njets = cs.jets().size();
    90   NNH<JadeBriefJet> nnh(cs.jets());
     182
     183  N nn(cs.jets());
    91184
    92185  // if testing against Hoeth's implementation, need to rescale the
     
    96189  while (njets > 0) {
    97190    int i, j, k;
    98     double dij = nnh.dij_min(i, j);
     191    double dij = nn.dij_min(i, j);
    99192
    100193    if (j >= 0) {
    101194      cs.plugin_record_ij_recombination(i, j, dij, k);
    102       nnh.merge_jets(i, j, cs.jets()[k], k);
     195      nn.merge_jets(i, j, cs.jets()[k], k);
    103196    } else {
    104197      double diB = cs.jets()[i].E()*cs.jets()[i].E(); // get new diB
    105198      cs.plugin_record_iB_recombination(i, diB);
    106       nnh.remove_jet(i);
     199      nn.remove_jet(i);
    107200    }
    108201    njets--;
    109202  }
     203
    110204}
    111205
     206//----------------------------------------------------------------------
     207void 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
    112222FASTJET_END_NAMESPACE      // defined in fastjet/internal/base.hh
  • external/fastjet/plugins/Jade/fastjet/JadePlugin.hh

    rec5e04b rb9ae4c3  
    33
    44//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 $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    7777class JadePlugin : public JetDefinition::Plugin {
    7878public:
     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 
    7984  /// Main constructor for the Jade Plugin class. 
    80   JadePlugin (){}
     85  JadePlugin (Strategy strategy = strategy_NNFJN2Plain) : _strategy(strategy) {}
    8186
    8287  /// copy constructor
     
    100105private:
    101106
     107  template<class N> void _actual_run_clustering(ClusterSequence &) const;
     108 
     109  Strategy _strategy;
    102110};
    103111
  • external/fastjet/plugins/SISCone/SISConePlugin.cc

    rec5e04b rb9ae4c3  
    7878// static members declaration              //
    7979/////////////////////////////////////////////
    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;
     80SharedPtr<SISConePlugin>           SISConePlugin::stored_plugin;
     81SharedPtr<std::vector<PseudoJet> > SISConePlugin::stored_particles;
     82SharedPtr<Csiscone>                SISConePlugin::stored_siscone;
    8383
    8484
  • 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.  */
    26/* config.h.in.  Generated from configure.ac by autoheader.  */
    37
    48/* 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
    612
    713/* 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
    917
    1018/* 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
    1222
    1323/* 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
    1527
    1628/* 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
    1832
    1933/* 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
    2137
    2238/* 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
    2442
    2543/* 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
    2747
    2848/* 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
    3052
    3153/* 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
    3357
    3458/* 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
    3662
    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
    4067
    4168/* Name of package */
    42 #define PACKAGE "siscone"
     69#ifndef SISCONE_PACKAGE
     70#define SISCONE_PACKAGE  "siscone"
     71#endif
    4372
    4473/* 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
    4677
    4778/* 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
    4982
    5083/* 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
    5287
    5388/* 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
    5597
    5698/* 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
    58102
    59103/* 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 */
    61110
    62111/* 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  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 225                                                          $//
    25 // $Date:: 2008-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)                     $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
     
    3535// defined in siscone.h
    3636// Otherwise, config.h
    37 // It is also defined as "PACKAGE_NAME" in config.h but this method
     37// It is also defined as "SISCONE_PACKAGE_NAME" in config.h but this method
    3838// might lead to conflicts
    39 //#define PROGRAM   PACKAGE_NAME
     39//#define PROGRAM   SISCONE_PACKAGE_NAME
    4040
    4141// program version
     
    4343//   siscone::siscone_version
    4444// defined in siscone.h
    45 // It is also defined as "VERSION" in config.h but this method
     45// It is also defined as "SISCONE_VERSION" in config.h but this method
    4646// might lead to conflicts
    4747
  • external/fastjet/plugins/SISCone/fastjet/SISConePlugin.hh

    rec5e04b rb9ae4c3  
    191191  // part needed for the cache
    192192  // 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;
    196196};
    197197
  • external/fastjet/plugins/SISCone/fastjet/SISConeSphericalPlugin.hh

    rec5e04b rb9ae4c3  
    166166  // part needed for the cache
    167167  // 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;
    171171};
    172172
  • external/fastjet/plugins/SISCone/siscone.cc

    rec5e04b rb9ae4c3  
    2121// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2222//                                                                           //
    23 // $Revision:: 371                                                          $//
    24 // $Date:: 2014-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)                     $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
    27 //#ifdef HAVE_CONFIG_H
    2827#include "config.h"
    29 //#else
    30 //#define PACKAGE_NAME "SISCone"
    31 //#define VERSION "3.0.0"
    32 //#warning "No config.h file available, using preset values"
    33 //#endif
    34 
    3528#include "ranlux.h"
    3629#include "momentum.h"
     
    254247  // print the banner
    255248  if (_banner_ostr != 0){
     249    ios::fmtflags flags_to_restore(_banner_ostr->flags());
     250
    256251    (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
    257252    (*_banner_ostr) << "#                    SISCone   version " << setw(28) << left << siscone_version() << "o" << endl;
     
    269264
    270265    _banner_ostr->flush();
     266    _banner_ostr->flags(flags_to_restore);
    271267  }
    272268}
     
    279275 * return SISCone package name.
    280276 * This is nothing but "SISCone", it is a replacement to the
    281  * PACKAGE_NAME string defined in config.h and which is not
    282  * public by default.
     277 * SISCONE_PACKAGE_NAME string defined in config.h and which is not
     278 * guaranteed to be public.
    283279 * return the SISCone name as a string
    284280 */
    285281string siscone_package_name(){
    286   return PACKAGE_NAME;
     282  return SISCONE_PACKAGE_NAME;
    287283}
    288284
     
    293289 */
    294290string siscone_version(){
    295   return VERSION;
    296 }
    297 
    298 }
     291  return SISCONE_VERSION;
     292}
     293
     294}
  • external/fastjet/plugins/SISCone/siscone.h

    rec5e04b rb9ae4c3  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 369                                                          $//
    25 // $Date:: 2014-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)                     $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
     
    160160 * return SISCone package name.
    161161 * This is nothing but "SISCone", it is a replacement to the
    162  * PACKAGE_NAME string defined in config.h and which is not
    163  * public by default.
     162 * SISCONE_PACKAGE_NAME string defined in config.h and which is not
     163 * guaranteed to be public.
    164164 * \return the SISCone name as a string
    165165 */
  • external/fastjet/plugins/SISCone/split_merge.cc

    rec5e04b rb9ae4c3  
    2121// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2222//                                                                           //
    23 // $Revision:: 370                                                          $//
    24 // $Date:: 2014-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)                     $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
     
    5454  pt_tilde = 0.0;
    5555  sm_var2 = 0.0;
     56  pass = CJET_INEXISTENT_PASS; // initialised to a value that should
     57                               // notappear in the end (after clustering)
    5658}
    5759
     
    659661
    660662#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() << "]:";
    662664#endif
    663665   
     
    11791181  }
    11801182
    1181   return 0.0;
    1182 }
    1183 
    1184 }
     1183  //return 0.0;
     1184}
     1185
     1186}
  • external/fastjet/plugins/SISCone/split_merge.h

    rec5e04b rb9ae4c3  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 367                                                          $//
    25 // $Date:: 2014-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)                     $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
     
    2929#define __SPLIT_MERGE_H__
    3030
     31#include "config.h"
    3132#include "defines.h"
    3233#include "geom_2d.h"
     
    3940
    4041namespace siscone{
     42
     43const int CJET_INEXISTENT_PASS = -2;
    4144
    4245/**
     
    7578  /// pass at which the jet has been found
    7679  /// 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)
    7782  int pass;
    7883};
     
    441446  // jet information
    442447  /// 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
    443451  std::auto_ptr<std::multiset<Cjet,Csplit_merge_ptcomparison> > candidates;
    444 
     452#endif
     453 
    445454  /// minimal pt2
    446455  double pt_min2;
  • external/fastjet/plugins/SISCone/vicinity.cc

    rec5e04b rb9ae4c3  
    2121// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2222//                                                                           //
    23 // $Revision:: 123                                                          $//
    24 // $Date:: 2007-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)                     $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
     
    8080  VR2 = VR = 0.0;
    8181
     82  ve_list = NULL;
    8283  set_particle_list(_particle_list);
    8384}
  • external/fastjet/tools/Filter.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3131#include "fastjet/tools/Filter.hh"
    3232#include "fastjet/tools/Recluster.hh"
     33#include "fastjet/tools/Subtractor.hh"
    3334#include <fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh>
    3435#include <cassert>
     
    9899  } else if (_rho!=0){
    99100    if (subjets.size()>0){
    100       const ClusterSequenceAreaBase *csab = subjets[0].validated_csab();
     101      //const ClusterSequenceAreaBase *csab = subjets[0].validated_csab();
    101102      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]);
    103105      }
    104106    }
  • external/fastjet/tools/Filter.hh

    rec5e04b rb9ae4c3  
    33
    44//FJSTARTHEADER
    5 // $Id: Filter.hh 3845 2015-03-08 08:35:36Z soyez $
     5// $Id: Filter.hh 3846 2015-03-08 08:35:43Z soyez $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    143143  /// deciding which ones to keep. It takes precedence over a non-zero rho.
    144144  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;}
    145149
    146150  /// runs the filtering and sets kept and rejected to be the jets of interest
  • external/fastjet/tools/GridMedianBackgroundEstimator.hh

    rec5e04b rb9ae4c3  
    33
    44//FJSTARTHEADER
    5 // $Id: GridMedianBackgroundEstimator.hh 3778 2014-12-24 09:28:09Z salam $
     5// $Id: GridMedianBackgroundEstimator.hh 3969 2015-09-21 08:57:59Z salam $
    66//
    77// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    194194  /// determination of rho_m.
    195195  ///
    196   /// Note that support for sigma_m is automatic is one has sigma and
     196  /// Note that support for sigma_m is automatic if one has sigma and
    197197  /// rho_m support.
    198198  bool has_rho_m() const {return _enable_rho_m;}
  • external/fastjet/tools/JetMedianBackgroundEstimator.cc

    rec5e04b rb9ae4c3  
    11//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 $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    194194
    195195  _csi = jets[0].structure_shared_ptr();
    196   ClusterSequenceStructure * csi = dynamic_cast<ClusterSequenceStructure*>(_csi());
     196  ClusterSequenceStructure * csi = dynamic_cast<ClusterSequenceStructure*>(_csi.get());
    197197  const ClusterSequenceAreaBase * csab = csi->validated_csab();
    198198
     
    467467
    468468  // 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();
    470470  if (csab->has_explicit_ghosts()) {
    471471    _empty_area = 0.0;
     
    503503// throw an error otherwise
    504504void JetMedianBackgroundEstimator::_check_csa_alive() const{
    505   ClusterSequenceStructure* csa = dynamic_cast<ClusterSequenceStructure*>(_csi());
     505  ClusterSequenceStructure* csa = dynamic_cast<ClusterSequenceStructure*>(_csi.get());
    506506  if (csa == 0) {
    507507    throw Error("JetMedianBackgroundEstimator: there is no cluster sequence associated with the JetMedianBackgroundEstimator");
    508508  }
    509   if (! dynamic_cast<ClusterSequenceStructure*>(_csi())->has_associated_cluster_sequence())
     509  if (! dynamic_cast<ClusterSequenceStructure*>(_csi.get())->has_associated_cluster_sequence())
    510510    throw Error("JetMedianBackgroundEstimator: modifications are no longer possible as the underlying ClusterSequence has gone out of scope");
    511511}
     
    521521  // cluster sequence
    522522  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();
    524524    jet_def = &(cs->jet_def());
    525525  }
  • external/fastjet/tools/Recluster.hh

    rec5e04b rb9ae4c3  
    22#define __FASTJET_TOOLS_RECLUSTER_HH__
    33
    4 // $Id: Recluster.hh 3760 2014-12-19 10:05:10Z soyez $
     4// $Id: Recluster.hh 3753 2014-12-17 15:19:55Z salam $
    55//
    66// Copyright (c) 2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
  • external/fastjet/tools/Subtractor.cc

    rec5e04b rb9ae4c3  
    11//FJSTARTHEADER
    2 // $Id: Subtractor.cc 3670 2014-09-08 14:17:59Z soyez $
     2// $Id: Subtractor.cc 3970 2015-09-21 10:31:17Z salam $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    3939const double Subtractor::_invalid_rho = -numeric_limits<double>::infinity();
    4040
     41LimitedWarning Subtractor::_unused_rho_m_warning;
    4142
    4243//----------------------------------------------------------------------
  • external/fastjet/tools/Subtractor.hh

    rec5e04b rb9ae4c3  
    11//FJSTARTHEADER
    2 // $Id: Subtractor.hh 3670 2014-09-08 14:17:59Z soyez $
     2// $Id: Subtractor.hh 3970 2015-09-21 10:31:17Z salam $
    33//
    44// Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     
    203203  static const double _invalid_rho;
    204204
    205   mutable LimitedWarning _unused_rho_m_warning;
     205  static LimitedWarning _unused_rho_m_warning;
    206206};
    207207
  • modules/Calorimeter.cc

    rec5e04b rb9ae4c3  
    5858  fItParticleInputArray(0), fItTrackInputArray(0)
    5959{
    60   Int_t i;
    61 
     60 
    6261  fECalResolutionFormula = new DelphesFormula;
    6362  fHCalResolutionFormula = new DelphesFormula;
    6463
    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 
    7370}
    7471
     
    7774Calorimeter::~Calorimeter()
    7875{
    79   Int_t i;
    80 
     76 
    8177  if(fECalResolutionFormula) delete fECalResolutionFormula;
    8278  if(fHCalResolutionFormula) delete fHCalResolutionFormula;
    8379
    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 
    9286}
    9387
     
    219213  Double_t ecalEnergy, hcalEnergy;
    220214  Double_t ecalSigma, hcalSigma;
     215  Double_t energyGuess;
    221216  Int_t pdgCode;
    222217
     
    368363      fHCalTowerEnergy = 0.0;
    369364
    370       fECalTrackEnergy[0] = 0.0;
    371       fECalTrackEnergy[1] = 0.0;
    372 
    373       fHCalTrackEnergy[0] = 0.0;
    374       fHCalTrackEnergy[1] = 0.0;
    375 
     365      fECalTrackEnergy = 0.0;
     366      fHCalTrackEnergy = 0.0;
     367     
     368      fECalTrackSigma = 0.0;
     369      fHCalTrackSigma = 0.0;
     370     
    376371      fTowerTrackHits = 0;
    377372      fTowerPhotonHits = 0;
    378373
    379       fECalTowerTrackArray[0]->Clear();
    380       fECalTowerTrackArray[1]->Clear();
    381 
    382       fHCalTowerTrackArray[0]->Clear();
    383       fHCalTowerTrackArray[1]->Clear();
     374      fECalTowerTrackArray->Clear();
     375      fHCalTowerTrackArray->Clear();
     376   
    384377    }
    385378
     
    406399      if(fECalTrackFractions[number] > 1.0E-9 && fHCalTrackFractions[number] < 1.0E-9)
    407400      {
    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);
    419408      }
     409     
    420410      else if(fECalTrackFractions[number] < 1.0E-9 && fHCalTrackFractions[number] > 1.0E-9)
    421411      {
     412        fHCalTrackEnergy += hcalEnergy;
    422413        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);
    433419      }
     420     
    434421      else if(fECalTrackFractions[number] < 1.0E-9 && fHCalTrackFractions[number] < 1.0E-9)
    435422      {
     
    476463  Double_t energy, pt, eta, phi;
    477464  Double_t ecalEnergy, hcalEnergy;
     465  Double_t ecalNeutralEnergy, hcalNeutralEnergy;
     466 
    478467  Double_t ecalSigma, hcalSigma;
    479 
     468  Double_t ecalNeutralSigma, hcalNeutralSigma;
     469
     470  Double_t weightTrack, weightCalo, bestEnergyEstimate, rescaleFactor;
     471 
    480472  TLorentzVector momentum;
    481473  TFractionMap::iterator itFractionMap;
     
    484476
    485477  if(!fTower) return;
    486 
    487478
    488479  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fECalTowerEnergy);
     
    554545    fTowerOutputArray->Add(fTower);
    555546  }
    556 
     547 
    557548  // 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)
    618561  {
    619562    // create new photon tower
    620563    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;
    626568    tower->Ehad = 0.0;
    627569    tower->PID = 22;
    628 
     570   
    629571    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
    634614    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;
    639619    tower->Eem = 0.0;
    640     tower->Ehad = hcalEnergy;
    641 
     620   
    642621    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 
    644660}
    645661
  • modules/Calorimeter.h

    rec5e04b rb9ae4c3  
    5858  Double_t fTowerEta, fTowerPhi, fTowerEdges[4];
    5959  Double_t fECalTowerEnergy, fHCalTowerEnergy;
    60   Double_t fECalTrackEnergy[2], fHCalTrackEnergy[2];
     60  Double_t fECalTrackEnergy, fHCalTrackEnergy;
    6161
    6262  Double_t fTimingEnergyMin;
     
    7070  Double_t fECalEnergySignificanceMin;
    7171  Double_t fHCalEnergySignificanceMin;
     72
     73  Double_t fECalTrackSigma;
     74  Double_t fHCalTrackSigma;
    7275
    7376  Bool_t fSmearTowerCenter;
     
    103106  TObjArray *fEFlowNeutralHadronOutputArray; //!
    104107
    105   TObjArray *fECalTowerTrackArray[2]; //!
    106   TIterator *fItECalTowerTrackArray[2]; //!
     108  TObjArray *fECalTowerTrackArray; //!
     109  TIterator *fItECalTowerTrackArray; //!
    107110
    108   TObjArray *fHCalTowerTrackArray[2]; //!
    109   TIterator *fItHCalTowerTrackArray[2]; //!
     111  TObjArray *fHCalTowerTrackArray; //!
     112  TIterator *fItHCalTowerTrackArray; //!
    110113
    111114  void FinalizeTower();
  • modules/ImpactParameterSmearing.cc

    rec5e04b rb9ae4c3  
    9696{
    9797  Candidate *candidate, *particle, *mother;
    98   Double_t xd, yd, zd, dxy, sx, sy, sz, ddxy;
     98  Double_t xd, yd, zd, d0, sx, sy, sz, dd0;
    9999  Double_t pt, eta, px, py, phi, e;
    100100
     
    103103  {
    104104
    105     // take momentum before smearing (otherwise apply double smearing on dxy)
     105    // take momentum before smearing (otherwise apply double smearing on d0)
    106106    particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    107107
     
    131131
    132132    // calculate impact parameter (after-smearing)
    133     dxy = (xd*py - yd*px)/pt;
     133    d0 = (xd*py - yd*px)/pt;
    134134
    135     ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
     135    dd0 = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));
    136136
    137137    // fill smeared values in candidate
     
    143143    candidate->Zd = zd;
    144144
    145     candidate->Dxy = dxy;
    146     candidate->SDxy = ddxy;
     145    candidate->D0 = d0;
     146    candidate->ErrorD0 = dd0;
    147147
    148148    candidate->AddCandidate(mother);
  • modules/ModulesLinkDef.h

    rec5e04b rb9ae4c3  
    3535#include "modules/EnergySmearing.h"
    3636#include "modules/MomentumSmearing.h"
     37#include "modules/TrackSmearing.h"
    3738#include "modules/ImpactParameterSmearing.h"
    3839#include "modules/TimeSmearing.h"
     
    5859#include "modules/StatusPidFilter.h"
    5960#include "modules/PdgCodeFilter.h"
     61#include "modules/BeamSpotFilter.h"
    6062#include "modules/RecoPuFilter.h"
    6163#include "modules/Cloner.h"
     
    6466#include "modules/JetFlavorAssociation.h"
    6567#include "modules/JetFakeParticle.h"
     68#include "modules/VertexSorter.h"
     69#include "modules/VertexFinder.h"
     70#include "modules/VertexFinderDA4D.h"
    6671#include "modules/ExampleModule.h"
    6772
     
    8186#pragma link C++ class EnergySmearing+;
    8287#pragma link C++ class MomentumSmearing+;
     88#pragma link C++ class TrackSmearing+;
    8389#pragma link C++ class ImpactParameterSmearing+;
    8490#pragma link C++ class TimeSmearing+;
     
    104110#pragma link C++ class StatusPidFilter+;
    105111#pragma link C++ class PdgCodeFilter+;
     112#pragma link C++ class BeamSpotFilter+;
    106113#pragma link C++ class RecoPuFilter+;
    107114#pragma link C++ class Cloner+;
     
    110117#pragma link C++ class JetFlavorAssociation+;
    111118#pragma link C++ class JetFakeParticle+;
     119#pragma link C++ class VertexSorter+;
     120#pragma link C++ class VertexFinder+;
     121#pragma link C++ class VertexFinderDA4D+;
    112122#pragma link C++ class ExampleModule+;
    113123
  • modules/MomentumSmearing.cc

    rec5e04b rb9ae4c3  
    9696{
    9797  Candidate *candidate, *mother;
    98   Double_t pt, eta, phi, e;
     98  Double_t pt, eta, phi, e, res;
    9999
    100100  fItInputArray->Reset();
     
    107107    pt = candidateMomentum.Pt();
    108108    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;
    109115
    110     // apply smearing formula
    111     pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt);
     116    pt = LogNormal(pt, res * pt );
    112117   
    113     if(pt <= 0.0) continue;
     118    //if(pt <= 0.0) continue;
    114119
    115120    mother = candidate;
     
    118123    phi = candidateMomentum.Phi();
    119124    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;
    121127    candidate->AddCandidate(mother);
    122128       
     
    124130  }
    125131}
     132//----------------------------------------------------------------
     133
     134Double_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
    126151
    127152//------------------------------------------------------------------------------
  • modules/MomentumSmearing.h

    rec5e04b rb9ae4c3  
    4747private:
    4848
     49  Double_t LogNormal(Double_t mean, Double_t sigma);
     50
    4951  DelphesFormula *fFormula; //!
    5052
  • modules/ParticlePropagator.cc

    rec5e04b rb9ae4c3  
    6767}
    6868
     69
    6970//------------------------------------------------------------------------------
    7071
     
    9192  fItInputArray = fInputArray->MakeIterator();
    9293
     94  // import beamspot
     95  try
     96  {
     97    fBeamSpotInputArray = ImportArray(GetString("BeamSpotInputArray", "BeamSpotFilter/beamSpotParticle"));
     98  }
     99  catch(runtime_error &e)
     100  {
     101    fBeamSpotInputArray = 0;
     102  }
    93103  // create output arrays
    94104
     
    111121{
    112122  Candidate *candidate, *mother;
    113   TLorentzVector candidatePosition, candidateMomentum;
     123  TLorentzVector candidatePosition, candidateMomentum, beamSpotPosition;
    114124  Double_t px, py, pz, pt, pt2, e, q;
    115125  Double_t x, y, z, t, r, phi;
     
    120130  Double_t tmp, discr, discr2;
    121131  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;
    123135
    124136  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  }
    125145
    126146  fItInputArray->Reset();
     
    132152    y = candidatePosition.Y()*1.0E-3;
    133153    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
    134159    q = candidate->Charge;
    135160
     
    182207      z_t = z + pz*t;
    183208
     209      l = TMath::Sqrt( (x_t - x)*(x_t - x) + (y_t - y)*(y_t - y) + (z_t - z)*(z_t - z));
     210
    184211      mother = candidate;
    185212      candidate = static_cast<Candidate*>(candidate->Clone());
    186213
     214      candidate->InitialPosition = candidatePosition;
    187215      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;
    188217
    189218      candidate->Momentum = candidateMomentum;
     
    239268      zd = z + (TMath::Sqrt(xd*xd + yd*yd) - TMath::Sqrt(x*x + y*y))*pz/pt;
    240269
    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
    243287
    244288      // 3. time evaluation t = TMath::Min(t_r, t_z)
     
    287331      r_t = TMath::Hypot(x_t, y_t);
    288332
     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
    289339      if(r_t > 0.0)
    290340      {
     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
    291350        mother = candidate;
    292351        candidate = static_cast<Candidate*>(candidate->Clone());
    293352
     353        candidate->InitialPosition = candidatePosition;
    294354        candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*c_light*1.0E3);
    295355
    296356        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;
    299361        candidate->Yd = yd*1.0E3;
    300362        candidate->Zd = zd*1.0E3;
  • modules/ParticlePropagator.h

    rec5e04b rb9ae4c3  
    3535class TClonesArray;
    3636class TIterator;
     37class TLorentzVector;
    3738
    3839class ParticlePropagator: public DelphesModule
     
    5556
    5657  const TObjArray *fInputArray; //!
     58  const TObjArray *fBeamSpotInputArray; //!
    5759
    5860  TObjArray *fOutputArray; //!
  • modules/PileUpMerger.cc

    rec5e04b rb9ae4c3  
    115115  TDatabasePDG *pdg = TDatabasePDG::Instance();
    116116  TParticlePDG *pdgParticle;
    117   Int_t pid;
     117  Int_t pid, nch, nvtx = -1;
    118118  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;
    121121  Int_t numberOfEvents, event, numberOfParticles;
    122122  Long64_t allEntries, entry;
     
    132132  fFunction->GetRandom2(dz, dt);
    133133
     134  dz0 = -1.0e6;
     135  dt0 = -1.0e6;
     136
    134137  dt *= c_light*1.0E3; // necessary in order to make t in mm/c
    135138  dz *= 1.0E3; // necessary in order to make z in mm
     139
     140  //cout<<dz<<","<<dt<<endl;
     141
    136142  vx = 0.0;
    137143  vy = 0.0;
     144
    138145  numberOfParticles = fInputArray->GetEntriesFast();
     146  nch = 0;
     147  sumpt2 = 0.0;
     148
     149  factory = GetFactory();
     150  vertex = factory->NewCandidate();
     151
    139152  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    140153  {
     
    143156    z = candidate->Position.Z();
    144157    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
    147172    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    }
    148180  }
    149181
    150182  if(numberOfParticles > 0)
    151183  {
    152     vx /= numberOfParticles;
    153     vy /= numberOfParticles;
     184    vx /= sumpt2;
     185    vy /= sumpt2;
    154186  }
    155187
    156   factory = GetFactory();
    157 
    158   vertex = factory->NewCandidate();
     188  nvtx++;
    159189  vertex->Position.SetXYZT(vx, vy, dz, dt);
     190  vertex->ClusterIndex = nvtx;
     191  vertex->ClusterNDF = nch;
     192  vertex->SumPT2 = sumpt2;
     193  vertex->GenSumPT2 = sumpt2;
    160194  fVertexOutputArray->Add(vertex);
    161195
     
    170204      numberOfEvents = gRandom->Integer(2*fMeanPileUp + 1);
    171205      break;
     206    case 2:
     207      numberOfEvents = fMeanPileUp;
     208      break;
    172209    default:
    173210      numberOfEvents = gRandom->Poisson(fMeanPileUp);
     
    176213
    177214  allEntries = fReader->GetEntries();
     215
    178216
    179217  for(event = 0; event < numberOfEvents; ++event)
     
    198236    vx = 0.0;
    199237    vy = 0.0;
     238
    200239    numberOfParticles = 0;
     240    sumpt2 = 0.0;
     241
     242    //factory = GetFactory();
     243    vertex = factory->NewCandidate();
     244
    201245    while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e))
    202246    {
     
    215259      candidate->Momentum.SetPxPyPzE(px, py, pz, e);
    216260      candidate->Momentum.RotateZ(dphi);
     261      pt = candidate->Momentum.Pt();
    217262
    218263      x -= fInputBeamSpotX;
     
    224269      vx += candidate->Position.X();
    225270      vy += candidate->Position.Y();
     271
    226272      ++numberOfParticles;
     273      if(TMath::Abs(candidate->Charge) >  1.0E-9)
     274      {
     275        nch++;
     276        sumpt2 += pt*pt;
     277        vertex->AddCandidate(candidate);
     278      }
    227279
    228280      fParticleOutputArray->Add(candidate);
     
    235287    }
    236288
    237     vertex = factory->NewCandidate();
     289    nvtx++;
     290
    238291    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
    239298    vertex->IsPU = 1;
    240299
    241300    fVertexOutputArray->Add(vertex);
     301
    242302  }
    243303}
  • modules/SimpleCalorimeter.cc

    rec5e04b rb9ae4c3  
    5858  fItParticleInputArray(0), fItTrackInputArray(0)
    5959{
    60   Int_t i;
    61 
     60 
    6261  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 
    6965}
    7066
     
    7369SimpleCalorimeter::~SimpleCalorimeter()
    7470{
    75   Int_t i;
    76 
     71 
    7772  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 
    8476}
    8577
     
    199191  Double_t energy;
    200192  Double_t sigma;
     193  Double_t energyGuess;
     194
    201195  Int_t pdgCode;
    202196
     
    340334      fTowerEnergy = 0.0;
    341335
    342       fTrackEnergy[0] = 0.0;
    343       fTrackEnergy[1] = 0.0;
     336      fTrackEnergy = 0.0;
     337      fTrackSigma = 0.0;
    344338
    345339      fTowerTime = 0.0;
     
    351345      fTowerPhotonHits = 0;
    352346
    353       fTowerTrackArray[0]->Clear();
    354       fTowerTrackArray[1]->Clear();
    355     }
     347      fTowerTrackArray->Clear();
     348     }
    356349
    357350    // check for track hits
     
    371364      if(fTrackFractions[number] > 1.0E-9)
    372365      {
    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);
    384375      }
     376       
    385377      else
    386378      {
     
    403395    fTowerEnergy += energy;
    404396
    405     fTowerTime += TMath::Sqrt(energy)*position.T();
    406     fTowerTimeWeight += TMath::Sqrt(energy);
     397    fTowerTime += energy*position.T();
     398    fTowerTimeWeight += energy;
    407399
    408400    fTower->AddCandidate(particle);
     
    418410{
    419411  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;
    422414  Double_t time;
     415   
     416  Double_t weightTrack, weightCalo, bestEnergyEstimate, rescaleFactor;
    423417
    424418  TLorentzVector momentum;
     
    436430
    437431  if(energy < fEnergyMin || energy < fEnergySignificanceMin*sigma) energy = 0.0;
     432
    438433
    439434  if(fSmearTowerCenter)
     
    464459  if(energy > 0.0) fTowerOutputArray->Add(fTower);
    465460
    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)
    499474  {
    500475    // create new photon tower
    501476    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);
    506485   
    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  }
    508496   
    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 }
    514520
    515521//------------------------------------------------------------------------------
  • modules/SimpleCalorimeter.h

    rec5e04b rb9ae4c3  
    5959  Double_t fTowerEta, fTowerPhi, fTowerEdges[4];
    6060  Double_t fTowerEnergy;
    61   Double_t fTrackEnergy[2];
     61  Double_t fTrackEnergy;
    6262
    6363  Double_t fTowerTime;
     
    7272
    7373  Double_t fEnergySignificanceMin;
     74
     75  Double_t fTrackSigma;
    7476
    7577  Bool_t fSmearTowerCenter;
     
    102104  TObjArray *fEFlowTowerOutputArray; //!
    103105
    104   TObjArray *fTowerTrackArray[2]; //!
    105   TIterator *fItTowerTrackArray[2]; //!
     106  TObjArray *fTowerTrackArray; //!
     107  TIterator *fItTowerTrackArray; //!
    106108
    107109  void FinalizeTower();
  • modules/TimeSmearing.cc

    rec5e04b rb9ae4c3  
    9393{
    9494  Candidate *candidate, *mother;
    95   Double_t t;
     95  Double_t ti, tf_smeared, tf;
    9696  const Double_t c_light = 2.99792458E8;
    9797
     
    9999  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
    100100  {
    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;
    103106
    104107    // apply smearing formula
    105     t = gRandom->Gaus(t, fTimeResolution);
     108    tf_smeared = gRandom->Gaus(tf, fTimeResolution);
     109    ti = ti + tf_smeared - tf;
    106110
    107111    mother = candidate;
    108112    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;
    110117
    111118    candidate->AddCandidate(mother);
  • modules/TrackCountingBTagging.cc

    rec5e04b rb9ae4c3  
    9696
    9797  Double_t jpx, jpy;
    98   Double_t dr, tpx, tpy, tpt;
    99   Double_t xd, yd, dxy, ddxy, ip, sip;
     98  Double_t dr, tpt;
     99  Double_t xd, yd, d0, dd0, ip, sip;
    100100
    101101  Int_t sign;
     
    117117    {
    118118      const TLorentzVector &trkMomentum = track->Momentum;
    119 
     119     
    120120      dr = jetMomentum.DeltaR(trkMomentum);
    121 
    122121      tpt = trkMomentum.Pt();
    123       tpx = trkMomentum.Px();
    124       tpy = trkMomentum.Py();
    125 
    126122      xd = track->Xd;
    127123      yd = track->Yd;
    128       dxy = TMath::Hypot(xd, yd);
    129       ddxy = track->SDxy;
     124      d0 = TMath::Hypot(xd, yd);
     125      dd0 = track->ErrorD0;
    130126
    131127      if(tpt < fPtMin) continue;
    132128      if(dr > fDeltaR) continue;
    133       if(dxy > fIPmax) continue;
     129      if(d0 > fIPmax) continue;
    134130
    135131      sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1;
    136132
    137       ip = sign*dxy;
    138       sip = ip / TMath::Abs(ddxy);
     133      ip = sign*d0;
     134      sip = ip / TMath::Abs(dd0);
    139135
    140136      if(sip > fSigMin) count++;
  • modules/TreeWriter.cc

    rec5e04b rb9ae4c3  
    215215    entry->Pz = momentum.Pz();
    216216
     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
    217224    entry->Eta = eta;
    218225    entry->Phi = momentum.Phi();
     
    233240{
    234241  TIter iterator(array);
    235   Candidate *candidate = 0;
     242  Candidate *candidate = 0, *constituent = 0;
    236243  Vertex *entry = 0;
    237244
    238245  const Double_t c_light = 2.99792458E8;
    239246
     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
    240255  // loop over all vertices
    241256  iterator.Reset();
    242257  while((candidate = static_cast<Candidate*>(iterator.Next())))
    243258  {
    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;
    245277
    246278    entry = static_cast<Vertex*>(branch->NewEntry());
    247279
    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
    254310
    255311//------------------------------------------------------------------------------
     
    261317  Candidate *particle = 0;
    262318  Track *entry = 0;
    263   Double_t pt, signz, cosTheta, eta, rapidity;
     319  Double_t pt, signz, cosTheta, eta, rapidity, p, ctgTheta, phi;
    264320  const Double_t c_light = 2.99792458E8;
    265321
     
    292348    entry->TOuter = position.T()*1.0E-3/c_light;
    293349
    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
    296362    entry->Xd = candidate->Xd;
    297363    entry->Yd = candidate->Yd;
     
    301367
    302368    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
    303373    cosTheta = TMath::Abs(momentum.CosTheta());
    304374    signz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
     
    306376    rapidity = (cosTheta == 1.0 ? signz*999.9 : momentum.Rapidity());
    307377
     378    entry->PT  = pt;
    308379    entry->Eta = eta;
    309     entry->Phi = momentum.Phi();
    310     entry->PT = pt;
     380    entry->Phi = phi;
     381    entry->CtgTheta = ctgTheta;
    311382
    312383    particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
     
    319390
    320391    entry->Particle = particle;
     392
     393    entry->VertexIndex = candidate->ClusterIndex;
     394
    321395  }
    322396}
  • readers/DelphesCMSFWLite.cpp

    rec5e04b rb9ae4c3  
    272272
    273273    branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class());
    274     branchRwgt = treeWriter->NewBranch("Rwgt", Weight::Class());
     274    branchRwgt = treeWriter->NewBranch("Weight", Weight::Class());
    275275
    276276    confReader = new ExRootConfReader;
  • readers/DelphesPythia8.cpp

    rec5e04b rb9ae4c3  
    153153// from pythia8 example 21
    154154
    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 
     155void fillParticle(int id, double pt_max, double eta_max,
     156  Pythia8::Event &event, Pythia8::ParticleData &pdt, Pythia8::Rndm &rndm)
     157{
    158158  // Reset event record to allow for new event.
    159159  event.reset();
    160160
    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   double mm = 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);
    169169
    170170  // 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);
    173172}
    174173
    175 void fillPartons(int type, double ee_max, Pythia8::Event& event, Pythia8::ParticleData& pdt,
    176   Pythia8::Rndm& rndm) {
     174void fillPartons(int id, double pt_max, double eta_max,
     175  Pythia8::Event &event, Pythia8::ParticleData &pdt, Pythia8::Rndm &rndm)
     176{
    177177
    178178  // Reset event record to allow for new event.
    179179  event.reset();
    180180
    181   // Angles uniform in solid angle.
    182   double cThe, sThe, phi, ee;
    183 
    184181  // Information on a q qbar system, to be hadronized.
    185182
    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);
    196196  }
    197197  else
    198198  {
    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);
    201201  }
    202202}
     
    338338      if (pythia->flag("Main:spareFlag1"))
    339339      {
    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)
    341341        {
    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);
    343343        }
    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        }
    345348      }
    346349
Note: See TracChangeset for help on using the changeset viewer.