Fork me on GitHub

Changes in / [37deb3b:ba7fc1e] in git


Ignore:
Files:
11 added
50 deleted
300 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r37deb3b rba7fc1e  
    77
    88# Declare ROOT dependency
    9 find_package(ROOT COMPONENTS EG Eve Geom Gui GuiHtml GenVector Hist Physics Matrix Graf RIO Tree Gpad RGL MathCore)
     9find_package(ROOT COMPONENTS EG Eve GenVector Hist Physics Matrix Graf RIO Tree Gpad RGL MathCore)
    1010include(${ROOT_USE_FILE})
    1111
  • Makefile

    r37deb3b rba7fc1e  
    1717CXXFLAGS += $(ROOTCFLAGS) -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DDROP_CGAL -I. -Iexternal -Iexternal/tcl
    1818DELPHES_LIBS = $(shell $(RC) --libs) -lEG $(SYSLIBS)
    19 DISPLAY_LIBS = $(shell $(RC) --evelibs) -lGuiHtml  $(SYSLIBS)
     19DISPLAY_LIBS = $(shell $(RC) --evelibs) $(SYSLIBS)
    2020
    2121ifneq ($(CMSSW_FWLITE_INCLUDE_PATH),)
    2222HAS_CMSSW = true
    2323CXXFLAGS += -std=c++0x -I$(subst :, -I,$(CMSSW_FWLITE_INCLUDE_PATH))
    24 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(CMSSW_FWLITE_INCLUDE_PATH)))
     24DELPHES_LIBS += -L$(subst include,lib,$(subst :, -L,$(CMSSW_FWLITE_INCLUDE_PATH)))
    2525ifneq ($(CMSSW_RELEASE_BASE),)
    2626CXXFLAGS += -I$(CMSSW_RELEASE_BASE)/src
    2727endif
    2828ifneq ($(LD_LIBRARY_PATH),)
    29 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
    30 endif
    31 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
     29DELPHES_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
     30endif
     31DELPHES_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
    3232endif
    3333
    3434ifneq ($(PROMC),)
    3535HAS_PROMC = true
    36 CXXFLAGS += -I$(PROMC)/include -I$(PROMC)/src
    37 OPT_LIBS += -L$(PROMC)/lib -lpromc -lprotoc -lprotobuf -lprotobuf-lite -lcbook -lz
     36CXXFLAGS += -I$(PROMC)/include
     37DELPHES_LIBS += -L$(PROMC)/lib -lprotoc -lprotobuf -lprotobuf-lite -lcbook -lz
    3838endif
    3939
     
    4141HAS_PYTHIA8 = true
    4242CXXFLAGS += -I$(PYTHIA8)/include
    43 OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -lLHAPDF -lgfortran -lz
     43DELPHES_LIBS += -L$(PYTHIA8)/lib -lpythia8 -lLHAPDF -lgfortran -lz
    4444else
    4545ifneq ($(PYTHIA8DATA),)
    4646HAS_PYTHIA8 = true
    4747CXXFLAGS += -I$(PYTHIA8DATA)/../include
    48 OPT_LIBS += -L$(PYTHIA8DATA)/../lib -lpythia8 -lLHAPDF -lgfortran -lz
    49 endif
    50 endif
    51 
    52 DELPHES_LIBS += $(OPT_LIBS)
    53 DISPLAY_LIBS += $(OPT_LIBS)
     48DELPHES_LIBS += -L$(PYTHIA8DATA)/../lib -lpythia8 -lLHAPDF -lgfortran -lz
     49endif
     50endif
    5451
    5552###
     
    6865
    6966
     67pileup2root$(ExeSuf): \
     68        tmp/converters/pileup2root.$(ObjSuf)
     69
     70tmp/converters/pileup2root.$(ObjSuf): \
     71        converters/pileup2root.cpp \
     72        classes/DelphesStream.h \
     73        classes/DelphesClasses.h \
     74        classes/DelphesFactory.h \
     75        classes/DelphesPileUpReader.h \
     76        external/ExRootAnalysis/ExRootTreeWriter.h \
     77        external/ExRootAnalysis/ExRootTreeBranch.h \
     78        external/ExRootAnalysis/ExRootProgressBar.h
     79root2pileup$(ExeSuf): \
     80        tmp/converters/root2pileup.$(ObjSuf)
     81
     82tmp/converters/root2pileup.$(ObjSuf): \
     83        converters/root2pileup.cpp \
     84        classes/DelphesClasses.h \
     85        classes/DelphesPileUpWriter.h \
     86        external/ExRootAnalysis/ExRootTreeReader.h \
     87        external/ExRootAnalysis/ExRootProgressBar.h
    7088stdhep2pileup$(ExeSuf): \
    7189        tmp/converters/stdhep2pileup.$(ObjSuf)
     
    7694        classes/DelphesFactory.h \
    7795        classes/DelphesSTDHEPReader.h \
     96        classes/DelphesPileUpWriter.h \
     97        external/ExRootAnalysis/ExRootTreeWriter.h \
     98        external/ExRootAnalysis/ExRootTreeBranch.h \
     99        external/ExRootAnalysis/ExRootProgressBar.h
     100hepmc2pileup$(ExeSuf): \
     101        tmp/converters/hepmc2pileup.$(ObjSuf)
     102
     103tmp/converters/hepmc2pileup.$(ObjSuf): \
     104        converters/hepmc2pileup.cpp \
     105        classes/DelphesClasses.h \
     106        classes/DelphesFactory.h \
     107        classes/DelphesHepMCReader.h \
    78108        classes/DelphesPileUpWriter.h \
    79109        external/ExRootAnalysis/ExRootTreeWriter.h \
     
    100130        external/ExRootAnalysis/ExRootTreeReader.h \
    101131        external/ExRootAnalysis/ExRootProgressBar.h
    102 pileup2root$(ExeSuf): \
    103         tmp/converters/pileup2root.$(ObjSuf)
    104 
    105 tmp/converters/pileup2root.$(ObjSuf): \
    106         converters/pileup2root.cpp \
    107         classes/DelphesStream.h \
    108         classes/DelphesClasses.h \
    109         classes/DelphesFactory.h \
    110         classes/DelphesPileUpReader.h \
    111         external/ExRootAnalysis/ExRootTreeWriter.h \
    112         external/ExRootAnalysis/ExRootTreeBranch.h \
    113         external/ExRootAnalysis/ExRootProgressBar.h
    114 root2pileup$(ExeSuf): \
    115         tmp/converters/root2pileup.$(ObjSuf)
    116 
    117 tmp/converters/root2pileup.$(ObjSuf): \
    118         converters/root2pileup.cpp \
    119         classes/DelphesClasses.h \
    120         classes/DelphesPileUpWriter.h \
    121         external/ExRootAnalysis/ExRootTreeReader.h \
    122         external/ExRootAnalysis/ExRootProgressBar.h
    123 hepmc2pileup$(ExeSuf): \
    124         tmp/converters/hepmc2pileup.$(ObjSuf)
    125 
    126 tmp/converters/hepmc2pileup.$(ObjSuf): \
    127         converters/hepmc2pileup.cpp \
    128         classes/DelphesClasses.h \
    129         classes/DelphesFactory.h \
    130         classes/DelphesHepMCReader.h \
    131         classes/DelphesPileUpWriter.h \
    132         external/ExRootAnalysis/ExRootTreeWriter.h \
    133         external/ExRootAnalysis/ExRootTreeBranch.h \
    134         external/ExRootAnalysis/ExRootProgressBar.h
    135132Example1$(ExeSuf): \
    136133        tmp/examples/Example1.$(ObjSuf)
     
    145142        external/ExRootAnalysis/ExRootUtilities.h
    146143EXECUTABLE +=  \
     144        pileup2root$(ExeSuf) \
     145        root2pileup$(ExeSuf) \
    147146        stdhep2pileup$(ExeSuf) \
     147        hepmc2pileup$(ExeSuf) \
    148148        lhco2root$(ExeSuf) \
    149149        root2lhco$(ExeSuf) \
    150         pileup2root$(ExeSuf) \
    151         root2pileup$(ExeSuf) \
    152         hepmc2pileup$(ExeSuf) \
    153150        Example1$(ExeSuf)
    154151
    155152EXECUTABLE_OBJ +=  \
     153        tmp/converters/pileup2root.$(ObjSuf) \
     154        tmp/converters/root2pileup.$(ObjSuf) \
    156155        tmp/converters/stdhep2pileup.$(ObjSuf) \
     156        tmp/converters/hepmc2pileup.$(ObjSuf) \
    157157        tmp/converters/lhco2root.$(ObjSuf) \
    158158        tmp/converters/root2lhco.$(ObjSuf) \
    159         tmp/converters/pileup2root.$(ObjSuf) \
    160         tmp/converters/root2pileup.$(ObjSuf) \
    161         tmp/converters/hepmc2pileup.$(ObjSuf) \
    162159        tmp/examples/Example1.$(ObjSuf)
    163160
     
    241238        external/ExRootAnalysis/ExRootTreeWriter.h \
    242239        external/ExRootAnalysis/ExRootTreeBranch.h \
    243         external/ExRootAnalysis/ExRootProgressBar.h
     240        external/ExRootAnalysis/ExRootProgressBar.h \
     241        external/ProMC/ProMCBook.h
    244242EXECUTABLE +=  \
    245243        DelphesProMC$(ExeSuf)
     
    247245EXECUTABLE_OBJ +=  \
    248246        tmp/readers/DelphesProMC.$(ObjSuf)
     247
     248tmp/external/ProMC/ProMCStat.pb.$(ObjSuf): \
     249        external/ProMC/ProMCStat.pb.$(SrcSuf)
     250tmp/external/ProMC/ProMCDescription.pb.$(ObjSuf): \
     251        external/ProMC/ProMCDescription.pb.$(SrcSuf)
     252tmp/external/ProMC/ProMC.pb.$(ObjSuf): \
     253        external/ProMC/ProMC.pb.$(SrcSuf)
     254tmp/external/ProMC/ProMCHeader.pb.$(ObjSuf): \
     255        external/ProMC/ProMCHeader.pb.$(SrcSuf)
     256tmp/external/ProMC/ProMCBook.$(ObjSuf): \
     257        external/ProMC/ProMCBook.$(SrcSuf)
     258DELPHES_OBJ +=  \
     259        tmp/external/ProMC/ProMCStat.pb.$(ObjSuf) \
     260        tmp/external/ProMC/ProMCDescription.pb.$(ObjSuf) \
     261        tmp/external/ProMC/ProMC.pb.$(ObjSuf) \
     262        tmp/external/ProMC/ProMCHeader.pb.$(ObjSuf) \
     263        tmp/external/ProMC/ProMCBook.$(ObjSuf)
     264
     265ifeq ($(HAS_PYTHIA8),true)
     266DELPHES_OBJ +=  \
     267       
     268endif
    249269
    250270endif
     
    298318        modules/Delphes.h \
    299319        modules/FastJetFinder.h \
    300         modules/FastJetGridMedianEstimator.h \
    301320        modules/ParticlePropagator.h \
    302321        modules/Efficiency.h \
     
    323342        modules/ConstituentFilter.h \
    324343        modules/StatusPidFilter.h \
    325         modules/PdgCodeFilter.h \
    326344        modules/Cloner.h \
    327345        modules/Weighter.h \
     
    364382        display/DisplayLinkDef.h \
    365383        display/DelphesDisplay.h \
    366         display/DelphesCaloData.h \
    367         display/DelphesBranchElement.h \
    368         display/Delphes3DGeometry.h \
    369         display/DelphesEventDisplay.h \
    370         display/DelphesHtmlSummary.h \
    371         display/DelphesPlotSummary.h
     384        display/DelphesCaloData.h
    372385DisplayDict$(PcmSuf): \
    373386        tmp/display/DisplayDict$(PcmSuf) \
     
    382395        DisplayDict$(PcmSuf)
    383396
    384 tmp/classes/DelphesPileUpReader.$(ObjSuf): \
    385         classes/DelphesPileUpReader.$(SrcSuf) \
    386         classes/DelphesPileUpReader.h
    387 tmp/classes/DelphesSTDHEPReader.$(ObjSuf): \
    388         classes/DelphesSTDHEPReader.$(SrcSuf) \
    389         classes/DelphesSTDHEPReader.h \
    390         classes/DelphesClasses.h \
    391         classes/DelphesFactory.h \
    392         external/ExRootAnalysis/ExRootTreeBranch.h
    393397tmp/classes/DelphesTF2.$(ObjSuf): \
    394398        classes/DelphesTF2.$(SrcSuf) \
    395399        classes/DelphesTF2.h
    396 tmp/classes/DelphesHepMCReader.$(ObjSuf): \
    397         classes/DelphesHepMCReader.$(SrcSuf) \
    398         classes/DelphesHepMCReader.h \
    399         classes/DelphesClasses.h \
    400         classes/DelphesFactory.h \
    401         classes/DelphesStream.h \
    402         external/ExRootAnalysis/ExRootTreeBranch.h
    403 tmp/classes/DelphesLHEFReader.$(ObjSuf): \
    404         classes/DelphesLHEFReader.$(SrcSuf) \
    405         classes/DelphesLHEFReader.h \
    406         classes/DelphesClasses.h \
    407         classes/DelphesFactory.h \
    408         classes/DelphesStream.h \
    409         external/ExRootAnalysis/ExRootTreeBranch.h
    410400tmp/classes/DelphesStream.$(ObjSuf): \
    411401        classes/DelphesStream.$(SrcSuf) \
     
    419409        external/ExRootAnalysis/ExRootTreeWriter.h \
    420410        external/ExRootAnalysis/ExRootResult.h
    421 tmp/classes/DelphesFactory.$(ObjSuf): \
    422         classes/DelphesFactory.$(SrcSuf) \
    423         classes/DelphesFactory.h \
    424         classes/DelphesClasses.h \
     411tmp/classes/DelphesPileUpWriter.$(ObjSuf): \
     412        classes/DelphesPileUpWriter.$(SrcSuf) \
     413        classes/DelphesPileUpWriter.h
     414tmp/classes/DelphesHepMCReader.$(ObjSuf): \
     415        classes/DelphesHepMCReader.$(SrcSuf) \
     416        classes/DelphesHepMCReader.h \
     417        classes/DelphesClasses.h \
     418        classes/DelphesFactory.h \
     419        classes/DelphesStream.h \
    425420        external/ExRootAnalysis/ExRootTreeBranch.h
    426 tmp/classes/DelphesClasses.$(ObjSuf): \
    427         classes/DelphesClasses.$(SrcSuf) \
    428         classes/DelphesClasses.h \
    429         classes/DelphesFactory.h \
    430         classes/SortableObject.h
     421tmp/classes/DelphesLHEFReader.$(ObjSuf): \
     422        classes/DelphesLHEFReader.$(SrcSuf) \
     423        classes/DelphesLHEFReader.h \
     424        classes/DelphesClasses.h \
     425        classes/DelphesFactory.h \
     426        classes/DelphesStream.h \
     427        external/ExRootAnalysis/ExRootTreeBranch.h
    431428tmp/classes/DelphesFormula.$(ObjSuf): \
    432429        classes/DelphesFormula.$(SrcSuf) \
    433430        classes/DelphesFormula.h
    434 tmp/classes/DelphesPileUpWriter.$(ObjSuf): \
    435         classes/DelphesPileUpWriter.$(SrcSuf) \
    436         classes/DelphesPileUpWriter.h
     431tmp/classes/DelphesClasses.$(ObjSuf): \
     432        classes/DelphesClasses.$(SrcSuf) \
     433        classes/DelphesClasses.h \
     434        classes/DelphesFactory.h \
     435        classes/SortableObject.h
     436tmp/classes/DelphesSTDHEPReader.$(ObjSuf): \
     437        classes/DelphesSTDHEPReader.$(SrcSuf) \
     438        classes/DelphesSTDHEPReader.h \
     439        classes/DelphesClasses.h \
     440        classes/DelphesFactory.h \
     441        external/ExRootAnalysis/ExRootTreeBranch.h
     442tmp/classes/DelphesPileUpReader.$(ObjSuf): \
     443        classes/DelphesPileUpReader.$(SrcSuf) \
     444        classes/DelphesPileUpReader.h
     445tmp/classes/DelphesFactory.$(ObjSuf): \
     446        classes/DelphesFactory.$(SrcSuf) \
     447        classes/DelphesFactory.h \
     448        classes/DelphesClasses.h \
     449        external/ExRootAnalysis/ExRootTreeBranch.h
     450tmp/modules/Isolation.$(ObjSuf): \
     451        modules/Isolation.$(SrcSuf) \
     452        modules/Isolation.h \
     453        classes/DelphesClasses.h \
     454        classes/DelphesFactory.h \
     455        classes/DelphesFormula.h \
     456        external/ExRootAnalysis/ExRootResult.h \
     457        external/ExRootAnalysis/ExRootFilter.h \
     458        external/ExRootAnalysis/ExRootClassifier.h
     459tmp/modules/Efficiency.$(ObjSuf): \
     460        modules/Efficiency.$(SrcSuf) \
     461        modules/Efficiency.h \
     462        classes/DelphesClasses.h \
     463        classes/DelphesFactory.h \
     464        classes/DelphesFormula.h \
     465        external/ExRootAnalysis/ExRootResult.h \
     466        external/ExRootAnalysis/ExRootFilter.h \
     467        external/ExRootAnalysis/ExRootClassifier.h
     468tmp/modules/BTagging.$(ObjSuf): \
     469        modules/BTagging.$(SrcSuf) \
     470        modules/BTagging.h \
     471        classes/DelphesClasses.h \
     472        classes/DelphesFactory.h \
     473        classes/DelphesFormula.h \
     474        external/ExRootAnalysis/ExRootResult.h \
     475        external/ExRootAnalysis/ExRootFilter.h \
     476        external/ExRootAnalysis/ExRootClassifier.h
     477tmp/modules/PileUpMerger.$(ObjSuf): \
     478        modules/PileUpMerger.$(SrcSuf) \
     479        modules/PileUpMerger.h \
     480        classes/DelphesClasses.h \
     481        classes/DelphesFactory.h \
     482        classes/DelphesTF2.h \
     483        classes/DelphesPileUpReader.h \
     484        external/ExRootAnalysis/ExRootResult.h \
     485        external/ExRootAnalysis/ExRootFilter.h \
     486        external/ExRootAnalysis/ExRootClassifier.h
     487tmp/modules/ImpactParameterSmearing.$(ObjSuf): \
     488        modules/ImpactParameterSmearing.$(SrcSuf) \
     489        modules/ImpactParameterSmearing.h \
     490        classes/DelphesClasses.h \
     491        classes/DelphesFactory.h \
     492        classes/DelphesFormula.h \
     493        external/ExRootAnalysis/ExRootResult.h \
     494        external/ExRootAnalysis/ExRootFilter.h \
     495        external/ExRootAnalysis/ExRootClassifier.h
     496tmp/modules/SimpleCalorimeter.$(ObjSuf): \
     497        modules/SimpleCalorimeter.$(SrcSuf) \
     498        modules/SimpleCalorimeter.h \
     499        classes/DelphesClasses.h \
     500        classes/DelphesFactory.h \
     501        classes/DelphesFormula.h \
     502        external/ExRootAnalysis/ExRootResult.h \
     503        external/ExRootAnalysis/ExRootFilter.h \
     504        external/ExRootAnalysis/ExRootClassifier.h
     505tmp/modules/PileUpJetID.$(ObjSuf): \
     506        modules/PileUpJetID.$(SrcSuf) \
     507        modules/PileUpJetID.h \
     508        classes/DelphesClasses.h \
     509        classes/DelphesFactory.h \
     510        classes/DelphesFormula.h \
     511        external/ExRootAnalysis/ExRootResult.h \
     512        external/ExRootAnalysis/ExRootFilter.h \
     513        external/ExRootAnalysis/ExRootClassifier.h
     514tmp/modules/Cloner.$(ObjSuf): \
     515        modules/Cloner.$(SrcSuf) \
     516        modules/Cloner.h \
     517        classes/DelphesClasses.h \
     518        classes/DelphesFactory.h \
     519        classes/DelphesFormula.h \
     520        external/ExRootAnalysis/ExRootResult.h \
     521        external/ExRootAnalysis/ExRootFilter.h \
     522        external/ExRootAnalysis/ExRootClassifier.h
     523tmp/modules/TauTagging.$(ObjSuf): \
     524        modules/TauTagging.$(SrcSuf) \
     525        modules/TauTagging.h \
     526        classes/DelphesClasses.h \
     527        classes/DelphesFactory.h \
     528        classes/DelphesFormula.h \
     529        external/ExRootAnalysis/ExRootResult.h \
     530        external/ExRootAnalysis/ExRootFilter.h \
     531        external/ExRootAnalysis/ExRootClassifier.h
     532tmp/modules/ExampleModule.$(ObjSuf): \
     533        modules/ExampleModule.$(SrcSuf) \
     534        modules/ExampleModule.h \
     535        classes/DelphesClasses.h \
     536        classes/DelphesFactory.h \
     537        classes/DelphesFormula.h \
     538        external/ExRootAnalysis/ExRootResult.h \
     539        external/ExRootAnalysis/ExRootFilter.h \
     540        external/ExRootAnalysis/ExRootClassifier.h
     541tmp/modules/Merger.$(ObjSuf): \
     542        modules/Merger.$(SrcSuf) \
     543        modules/Merger.h \
     544        classes/DelphesClasses.h \
     545        classes/DelphesFactory.h \
     546        classes/DelphesFormula.h \
     547        external/ExRootAnalysis/ExRootResult.h \
     548        external/ExRootAnalysis/ExRootFilter.h \
     549        external/ExRootAnalysis/ExRootClassifier.h
     550tmp/modules/IdentificationMap.$(ObjSuf): \
     551        modules/IdentificationMap.$(SrcSuf) \
     552        modules/IdentificationMap.h \
     553        classes/DelphesClasses.h \
     554        classes/DelphesFactory.h \
     555        classes/DelphesFormula.h \
     556        external/ExRootAnalysis/ExRootResult.h \
     557        external/ExRootAnalysis/ExRootFilter.h \
     558        external/ExRootAnalysis/ExRootClassifier.h
     559tmp/modules/EnergyScale.$(ObjSuf): \
     560        modules/EnergyScale.$(SrcSuf) \
     561        modules/EnergyScale.h \
     562        classes/DelphesClasses.h \
     563        classes/DelphesFactory.h \
     564        classes/DelphesFormula.h \
     565        external/ExRootAnalysis/ExRootResult.h \
     566        external/ExRootAnalysis/ExRootFilter.h \
     567        external/ExRootAnalysis/ExRootClassifier.h
     568tmp/modules/MomentumSmearing.$(ObjSuf): \
     569        modules/MomentumSmearing.$(SrcSuf) \
     570        modules/MomentumSmearing.h \
     571        classes/DelphesClasses.h \
     572        classes/DelphesFactory.h \
     573        classes/DelphesFormula.h \
     574        external/ExRootAnalysis/ExRootResult.h \
     575        external/ExRootAnalysis/ExRootFilter.h \
     576        external/ExRootAnalysis/ExRootClassifier.h
     577tmp/modules/Calorimeter.$(ObjSuf): \
     578        modules/Calorimeter.$(SrcSuf) \
     579        modules/Calorimeter.h \
     580        classes/DelphesClasses.h \
     581        classes/DelphesFactory.h \
     582        classes/DelphesFormula.h \
     583        external/ExRootAnalysis/ExRootResult.h \
     584        external/ExRootAnalysis/ExRootFilter.h \
     585        external/ExRootAnalysis/ExRootClassifier.h
     586tmp/modules/TrackCountingBTagging.$(ObjSuf): \
     587        modules/TrackCountingBTagging.$(SrcSuf) \
     588        modules/TrackCountingBTagging.h \
     589        classes/DelphesClasses.h \
     590        classes/DelphesFactory.h \
     591        classes/DelphesFormula.h
     592tmp/modules/Delphes.$(ObjSuf): \
     593        modules/Delphes.$(SrcSuf) \
     594        modules/Delphes.h \
     595        classes/DelphesClasses.h \
     596        classes/DelphesFactory.h \
     597        classes/DelphesFormula.h \
     598        external/ExRootAnalysis/ExRootResult.h \
     599        external/ExRootAnalysis/ExRootFilter.h \
     600        external/ExRootAnalysis/ExRootClassifier.h \
     601        external/ExRootAnalysis/ExRootConfReader.h \
     602        external/ExRootAnalysis/ExRootTreeWriter.h
     603tmp/modules/TreeWriter.$(ObjSuf): \
     604        modules/TreeWriter.$(SrcSuf) \
     605        modules/TreeWriter.h \
     606        classes/DelphesClasses.h \
     607        classes/DelphesFactory.h \
     608        classes/DelphesFormula.h \
     609        external/ExRootAnalysis/ExRootResult.h \
     610        external/ExRootAnalysis/ExRootFilter.h \
     611        external/ExRootAnalysis/ExRootClassifier.h \
     612        external/ExRootAnalysis/ExRootTreeBranch.h
    437613tmp/modules/StatusPidFilter.$(ObjSuf): \
    438614        modules/StatusPidFilter.$(SrcSuf) \
    439615        modules/StatusPidFilter.h \
    440         classes/DelphesClasses.h \
    441         classes/DelphesFactory.h \
    442         classes/DelphesFormula.h \
    443         external/ExRootAnalysis/ExRootResult.h \
    444         external/ExRootAnalysis/ExRootFilter.h \
    445         external/ExRootAnalysis/ExRootClassifier.h
    446 tmp/modules/ParticlePropagator.$(ObjSuf): \
    447         modules/ParticlePropagator.$(SrcSuf) \
    448         modules/ParticlePropagator.h \
    449         classes/DelphesClasses.h \
    450         classes/DelphesFactory.h \
    451         classes/DelphesFormula.h \
    452         external/ExRootAnalysis/ExRootResult.h \
    453         external/ExRootAnalysis/ExRootFilter.h \
    454         external/ExRootAnalysis/ExRootClassifier.h
    455 tmp/modules/Delphes.$(ObjSuf): \
    456         modules/Delphes.$(SrcSuf) \
    457         modules/Delphes.h \
    458         classes/DelphesClasses.h \
    459         classes/DelphesFactory.h \
    460         classes/DelphesFormula.h \
    461         external/ExRootAnalysis/ExRootResult.h \
    462         external/ExRootAnalysis/ExRootFilter.h \
    463         external/ExRootAnalysis/ExRootClassifier.h \
    464         external/ExRootAnalysis/ExRootConfReader.h \
    465         external/ExRootAnalysis/ExRootTreeWriter.h
    466 tmp/modules/UniqueObjectFinder.$(ObjSuf): \
    467         modules/UniqueObjectFinder.$(SrcSuf) \
    468         modules/UniqueObjectFinder.h \
    469         classes/DelphesClasses.h \
    470         classes/DelphesFactory.h \
    471         classes/DelphesFormula.h \
    472         external/ExRootAnalysis/ExRootResult.h \
    473         external/ExRootAnalysis/ExRootFilter.h \
    474         external/ExRootAnalysis/ExRootClassifier.h
    475 tmp/modules/ConstituentFilter.$(ObjSuf): \
    476         modules/ConstituentFilter.$(SrcSuf) \
    477         modules/ConstituentFilter.h \
    478         classes/DelphesClasses.h \
    479         classes/DelphesFactory.h \
    480         classes/DelphesFormula.h \
    481         external/ExRootAnalysis/ExRootResult.h \
    482         external/ExRootAnalysis/ExRootFilter.h \
    483         external/ExRootAnalysis/ExRootClassifier.h
    484 tmp/modules/TrackPileUpSubtractor.$(ObjSuf): \
    485         modules/TrackPileUpSubtractor.$(SrcSuf) \
    486         modules/TrackPileUpSubtractor.h \
    487         classes/DelphesClasses.h \
    488         classes/DelphesFactory.h \
    489         classes/DelphesFormula.h \
    490         external/ExRootAnalysis/ExRootResult.h \
    491         external/ExRootAnalysis/ExRootFilter.h \
    492         external/ExRootAnalysis/ExRootClassifier.h
    493 tmp/modules/Weighter.$(ObjSuf): \
    494         modules/Weighter.$(SrcSuf) \
    495         modules/Weighter.h \
    496         classes/DelphesClasses.h \
    497         classes/DelphesFactory.h \
    498         classes/DelphesFormula.h \
    499         external/ExRootAnalysis/ExRootResult.h \
    500         external/ExRootAnalysis/ExRootFilter.h \
    501         external/ExRootAnalysis/ExRootClassifier.h
    502 tmp/modules/Isolation.$(ObjSuf): \
    503         modules/Isolation.$(SrcSuf) \
    504         modules/Isolation.h \
    505         classes/DelphesClasses.h \
    506         classes/DelphesFactory.h \
    507         classes/DelphesFormula.h \
    508         external/ExRootAnalysis/ExRootResult.h \
    509         external/ExRootAnalysis/ExRootFilter.h \
    510         external/ExRootAnalysis/ExRootClassifier.h
    511 tmp/modules/PileUpMerger.$(ObjSuf): \
    512         modules/PileUpMerger.$(SrcSuf) \
    513         modules/PileUpMerger.h \
    514         classes/DelphesClasses.h \
    515         classes/DelphesFactory.h \
    516         classes/DelphesTF2.h \
    517         classes/DelphesPileUpReader.h \
    518         external/ExRootAnalysis/ExRootResult.h \
    519         external/ExRootAnalysis/ExRootFilter.h \
    520         external/ExRootAnalysis/ExRootClassifier.h
    521 tmp/modules/ExampleModule.$(ObjSuf): \
    522         modules/ExampleModule.$(SrcSuf) \
    523         modules/ExampleModule.h \
    524616        classes/DelphesClasses.h \
    525617        classes/DelphesFactory.h \
     
    543635        modules/EnergySmearing.$(SrcSuf) \
    544636        modules/EnergySmearing.h \
     637        classes/DelphesClasses.h \
     638        classes/DelphesFactory.h \
     639        classes/DelphesFormula.h \
     640        external/ExRootAnalysis/ExRootResult.h \
     641        external/ExRootAnalysis/ExRootFilter.h \
     642        external/ExRootAnalysis/ExRootClassifier.h
     643tmp/modules/LeptonDressing.$(ObjSuf): \
     644        modules/LeptonDressing.$(SrcSuf) \
     645        modules/LeptonDressing.h \
     646        classes/DelphesClasses.h \
     647        classes/DelphesFactory.h \
     648        classes/DelphesFormula.h \
     649        external/ExRootAnalysis/ExRootResult.h \
     650        external/ExRootAnalysis/ExRootFilter.h \
     651        external/ExRootAnalysis/ExRootClassifier.h
     652tmp/modules/UniqueObjectFinder.$(ObjSuf): \
     653        modules/UniqueObjectFinder.$(SrcSuf) \
     654        modules/UniqueObjectFinder.h \
     655        classes/DelphesClasses.h \
     656        classes/DelphesFactory.h \
     657        classes/DelphesFormula.h \
     658        external/ExRootAnalysis/ExRootResult.h \
     659        external/ExRootAnalysis/ExRootFilter.h \
     660        external/ExRootAnalysis/ExRootClassifier.h
     661tmp/modules/ConstituentFilter.$(ObjSuf): \
     662        modules/ConstituentFilter.$(SrcSuf) \
     663        modules/ConstituentFilter.h \
     664        classes/DelphesClasses.h \
     665        classes/DelphesFactory.h \
     666        classes/DelphesFormula.h \
     667        external/ExRootAnalysis/ExRootResult.h \
     668        external/ExRootAnalysis/ExRootFilter.h \
     669        external/ExRootAnalysis/ExRootClassifier.h
     670tmp/modules/ParticlePropagator.$(ObjSuf): \
     671        modules/ParticlePropagator.$(SrcSuf) \
     672        modules/ParticlePropagator.h \
     673        classes/DelphesClasses.h \
     674        classes/DelphesFactory.h \
     675        classes/DelphesFormula.h \
     676        external/ExRootAnalysis/ExRootResult.h \
     677        external/ExRootAnalysis/ExRootFilter.h \
     678        external/ExRootAnalysis/ExRootClassifier.h
     679tmp/modules/JetPileUpSubtractor.$(ObjSuf): \
     680        modules/JetPileUpSubtractor.$(SrcSuf) \
     681        modules/JetPileUpSubtractor.h \
     682        classes/DelphesClasses.h \
     683        classes/DelphesFactory.h \
     684        classes/DelphesFormula.h \
     685        external/ExRootAnalysis/ExRootResult.h \
     686        external/ExRootAnalysis/ExRootFilter.h \
     687        external/ExRootAnalysis/ExRootClassifier.h
     688tmp/modules/TrackPileUpSubtractor.$(ObjSuf): \
     689        modules/TrackPileUpSubtractor.$(SrcSuf) \
     690        modules/TrackPileUpSubtractor.h \
    545691        classes/DelphesClasses.h \
    546692        classes/DelphesFactory.h \
     
    571717        external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \
    572718        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh
    573 tmp/modules/SimpleCalorimeter.$(ObjSuf): \
    574         modules/SimpleCalorimeter.$(SrcSuf) \
    575         modules/SimpleCalorimeter.h \
    576         classes/DelphesClasses.h \
    577         classes/DelphesFactory.h \
    578         classes/DelphesFormula.h \
    579         external/ExRootAnalysis/ExRootResult.h \
    580         external/ExRootAnalysis/ExRootFilter.h \
    581         external/ExRootAnalysis/ExRootClassifier.h
    582 tmp/modules/LeptonDressing.$(ObjSuf): \
    583         modules/LeptonDressing.$(SrcSuf) \
    584         modules/LeptonDressing.h \
    585         classes/DelphesClasses.h \
    586         classes/DelphesFactory.h \
    587         classes/DelphesFormula.h \
    588         external/ExRootAnalysis/ExRootResult.h \
    589         external/ExRootAnalysis/ExRootFilter.h \
    590         external/ExRootAnalysis/ExRootClassifier.h
    591 tmp/modules/Efficiency.$(ObjSuf): \
    592         modules/Efficiency.$(SrcSuf) \
    593         modules/Efficiency.h \
    594         classes/DelphesClasses.h \
    595         classes/DelphesFactory.h \
    596         classes/DelphesFormula.h \
    597         external/ExRootAnalysis/ExRootResult.h \
    598         external/ExRootAnalysis/ExRootFilter.h \
    599         external/ExRootAnalysis/ExRootClassifier.h
    600719tmp/modules/TimeSmearing.$(ObjSuf): \
    601720        modules/TimeSmearing.$(SrcSuf) \
     
    607726        external/ExRootAnalysis/ExRootFilter.h \
    608727        external/ExRootAnalysis/ExRootClassifier.h
    609 tmp/modules/PileUpJetID.$(ObjSuf): \
    610         modules/PileUpJetID.$(SrcSuf) \
    611         modules/PileUpJetID.h \
    612         classes/DelphesClasses.h \
    613         classes/DelphesFactory.h \
    614         classes/DelphesFormula.h \
    615         external/ExRootAnalysis/ExRootResult.h \
    616         external/ExRootAnalysis/ExRootFilter.h \
    617         external/ExRootAnalysis/ExRootClassifier.h
    618 tmp/modules/JetPileUpSubtractor.$(ObjSuf): \
    619         modules/JetPileUpSubtractor.$(SrcSuf) \
    620         modules/JetPileUpSubtractor.h \
    621         classes/DelphesClasses.h \
    622         classes/DelphesFactory.h \
    623         classes/DelphesFormula.h \
    624         external/ExRootAnalysis/ExRootResult.h \
    625         external/ExRootAnalysis/ExRootFilter.h \
    626         external/ExRootAnalysis/ExRootClassifier.h
    627 tmp/modules/TauTagging.$(ObjSuf): \
    628         modules/TauTagging.$(SrcSuf) \
    629         modules/TauTagging.h \
    630         classes/DelphesClasses.h \
    631         classes/DelphesFactory.h \
    632         classes/DelphesFormula.h \
    633         external/ExRootAnalysis/ExRootResult.h \
    634         external/ExRootAnalysis/ExRootFilter.h \
    635         external/ExRootAnalysis/ExRootClassifier.h
    636 tmp/modules/BTagging.$(ObjSuf): \
    637         modules/BTagging.$(SrcSuf) \
    638         modules/BTagging.h \
    639         classes/DelphesClasses.h \
    640         classes/DelphesFactory.h \
    641         classes/DelphesFormula.h \
    642         external/ExRootAnalysis/ExRootResult.h \
    643         external/ExRootAnalysis/ExRootFilter.h \
    644         external/ExRootAnalysis/ExRootClassifier.h
    645 tmp/modules/Merger.$(ObjSuf): \
    646         modules/Merger.$(SrcSuf) \
    647         modules/Merger.h \
    648         classes/DelphesClasses.h \
    649         classes/DelphesFactory.h \
    650         classes/DelphesFormula.h \
    651         external/ExRootAnalysis/ExRootResult.h \
    652         external/ExRootAnalysis/ExRootFilter.h \
    653         external/ExRootAnalysis/ExRootClassifier.h
    654 tmp/modules/FastJetGridMedianEstimator.$(ObjSuf): \
    655         modules/FastJetGridMedianEstimator.$(SrcSuf) \
    656         modules/FastJetGridMedianEstimator.h \
    657         classes/DelphesClasses.h \
    658         classes/DelphesFactory.h \
    659         classes/DelphesFormula.h \
    660         external/ExRootAnalysis/ExRootResult.h \
    661         external/ExRootAnalysis/ExRootFilter.h \
    662         external/ExRootAnalysis/ExRootClassifier.h \
    663         external/fastjet/PseudoJet.hh \
    664         external/fastjet/JetDefinition.hh \
    665         external/fastjet/ClusterSequence.hh \
    666         external/fastjet/Selector.hh \
    667         external/fastjet/RectangularGrid.hh \
    668         external/fastjet/ClusterSequenceArea.hh \
    669         external/fastjet/tools/JetMedianBackgroundEstimator.hh \
    670         external/fastjet/tools/GridMedianBackgroundEstimator.hh \
    671         external/fastjet/plugins/SISCone/fastjet/SISConePlugin.hh \
    672         external/fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh \
    673         external/fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh \
    674         external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh \
    675         external/fastjet/contribs/Nsubjettiness/Njettiness.hh \
    676         external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \
    677         external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh
    678 tmp/modules/Cloner.$(ObjSuf): \
    679         modules/Cloner.$(SrcSuf) \
    680         modules/Cloner.h \
    681         classes/DelphesClasses.h \
    682         classes/DelphesFactory.h \
    683         classes/DelphesFormula.h \
    684         external/ExRootAnalysis/ExRootResult.h \
    685         external/ExRootAnalysis/ExRootFilter.h \
    686         external/ExRootAnalysis/ExRootClassifier.h
    687 tmp/modules/PdgCodeFilter.$(ObjSuf): \
    688         modules/PdgCodeFilter.$(SrcSuf) \
    689         modules/PdgCodeFilter.h \
    690         classes/DelphesClasses.h \
    691         classes/DelphesFactory.h \
    692         classes/DelphesFormula.h \
    693         external/ExRootAnalysis/ExRootResult.h \
    694         external/ExRootAnalysis/ExRootFilter.h \
    695         external/ExRootAnalysis/ExRootClassifier.h
    696 tmp/modules/EnergyScale.$(ObjSuf): \
    697         modules/EnergyScale.$(SrcSuf) \
    698         modules/EnergyScale.h \
    699         classes/DelphesClasses.h \
    700         classes/DelphesFactory.h \
    701         classes/DelphesFormula.h \
    702         external/ExRootAnalysis/ExRootResult.h \
    703         external/ExRootAnalysis/ExRootFilter.h \
    704         external/ExRootAnalysis/ExRootClassifier.h
    705 tmp/modules/IdentificationMap.$(ObjSuf): \
    706         modules/IdentificationMap.$(SrcSuf) \
    707         modules/IdentificationMap.h \
    708         classes/DelphesClasses.h \
    709         classes/DelphesFactory.h \
    710         classes/DelphesFormula.h \
    711         external/ExRootAnalysis/ExRootResult.h \
    712         external/ExRootAnalysis/ExRootFilter.h \
    713         external/ExRootAnalysis/ExRootClassifier.h
    714 tmp/modules/TrackCountingBTagging.$(ObjSuf): \
    715         modules/TrackCountingBTagging.$(SrcSuf) \
    716         modules/TrackCountingBTagging.h \
    717         classes/DelphesClasses.h \
    718         classes/DelphesFactory.h \
    719         classes/DelphesFormula.h
    720 tmp/modules/Calorimeter.$(ObjSuf): \
    721         modules/Calorimeter.$(SrcSuf) \
    722         modules/Calorimeter.h \
     728tmp/modules/Weighter.$(ObjSuf): \
     729        modules/Weighter.$(SrcSuf) \
     730        modules/Weighter.h \
    723731        classes/DelphesClasses.h \
    724732        classes/DelphesFactory.h \
     
    737745        external/ExRootAnalysis/ExRootFilter.h \
    738746        external/ExRootAnalysis/ExRootClassifier.h
    739 tmp/modules/MomentumSmearing.$(ObjSuf): \
    740         modules/MomentumSmearing.$(SrcSuf) \
    741         modules/MomentumSmearing.h \
    742         classes/DelphesClasses.h \
    743         classes/DelphesFactory.h \
    744         classes/DelphesFormula.h \
    745         external/ExRootAnalysis/ExRootResult.h \
    746         external/ExRootAnalysis/ExRootFilter.h \
    747         external/ExRootAnalysis/ExRootClassifier.h
    748 tmp/modules/ImpactParameterSmearing.$(ObjSuf): \
    749         modules/ImpactParameterSmearing.$(SrcSuf) \
    750         modules/ImpactParameterSmearing.h \
    751         classes/DelphesClasses.h \
    752         classes/DelphesFactory.h \
    753         classes/DelphesFormula.h \
    754         external/ExRootAnalysis/ExRootResult.h \
    755         external/ExRootAnalysis/ExRootFilter.h \
    756         external/ExRootAnalysis/ExRootClassifier.h
    757 tmp/modules/TreeWriter.$(ObjSuf): \
    758         modules/TreeWriter.$(SrcSuf) \
    759         modules/TreeWriter.h \
    760         classes/DelphesClasses.h \
    761         classes/DelphesFactory.h \
    762         classes/DelphesFormula.h \
    763         external/ExRootAnalysis/ExRootResult.h \
    764         external/ExRootAnalysis/ExRootFilter.h \
    765         external/ExRootAnalysis/ExRootClassifier.h \
    766         external/ExRootAnalysis/ExRootTreeBranch.h
     747tmp/external/ExRootAnalysis/ExRootTask.$(ObjSuf): \
     748        external/ExRootAnalysis/ExRootTask.$(SrcSuf) \
     749        external/ExRootAnalysis/ExRootTask.h \
     750        external/ExRootAnalysis/ExRootConfReader.h
    767751tmp/external/ExRootAnalysis/ExRootTreeWriter.$(ObjSuf): \
    768752        external/ExRootAnalysis/ExRootTreeWriter.$(SrcSuf) \
     
    781765        external/ExRootAnalysis/ExRootConfReader.h \
    782766        external/tcl/tcl.h
     767tmp/external/ExRootAnalysis/ExRootTreeReader.$(ObjSuf): \
     768        external/ExRootAnalysis/ExRootTreeReader.$(SrcSuf) \
     769        external/ExRootAnalysis/ExRootTreeReader.h
    783770tmp/external/ExRootAnalysis/ExRootProgressBar.$(ObjSuf): \
    784771        external/ExRootAnalysis/ExRootProgressBar.$(SrcSuf) \
     
    787774        external/ExRootAnalysis/ExRootTreeBranch.$(SrcSuf) \
    788775        external/ExRootAnalysis/ExRootTreeBranch.h
    789 tmp/external/ExRootAnalysis/ExRootTreeReader.$(ObjSuf): \
    790         external/ExRootAnalysis/ExRootTreeReader.$(SrcSuf) \
    791         external/ExRootAnalysis/ExRootTreeReader.h
    792 tmp/external/ExRootAnalysis/ExRootTask.$(ObjSuf): \
    793         external/ExRootAnalysis/ExRootTask.$(SrcSuf) \
    794         external/ExRootAnalysis/ExRootTask.h \
    795         external/ExRootAnalysis/ExRootConfReader.h
    796776tmp/external/ExRootAnalysis/ExRootUtilities.$(ObjSuf): \
    797777        external/ExRootAnalysis/ExRootUtilities.$(SrcSuf) \
    798778        external/ExRootAnalysis/ExRootUtilities.h
    799 tmp/external/fastjet/Selector.$(ObjSuf): \
    800         external/fastjet/Selector.$(SrcSuf) \
    801         external/fastjet/Selector.hh \
    802         external/fastjet/GhostedAreaSpec.hh
    803 tmp/external/fastjet/BasicRandom.$(ObjSuf): \
    804         external/fastjet/BasicRandom.$(SrcSuf) \
    805         external/fastjet/internal/BasicRandom.hh
    806 tmp/external/fastjet/Dnn2piCylinder.$(ObjSuf): \
    807         external/fastjet/Dnn2piCylinder.$(SrcSuf) \
    808         external/fastjet/internal/Dnn2piCylinder.hh
    809 tmp/external/fastjet/Dnn3piCylinder.$(ObjSuf): \
    810         external/fastjet/Dnn3piCylinder.$(SrcSuf) \
    811         external/fastjet/internal/Dnn3piCylinder.hh
    812779tmp/external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf): \
    813780        external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.$(SrcSuf) \
    814781        external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh
    815 tmp/external/fastjet/LazyTiling9.$(ObjSuf): \
    816         external/fastjet/LazyTiling9.$(SrcSuf) \
    817         external/fastjet/internal/LazyTiling9.hh \
    818         external/fastjet/internal/TilingExtent.hh
     782tmp/external/fastjet/PseudoJetStructureBase.$(ObjSuf): \
     783        external/fastjet/PseudoJetStructureBase.$(SrcSuf) \
     784        external/fastjet/PseudoJetStructureBase.hh \
     785        external/fastjet/Error.hh \
     786        external/fastjet/PseudoJet.hh \
     787        external/fastjet/ClusterSequence.hh \
     788        external/fastjet/ClusterSequenceAreaBase.hh
     789tmp/external/fastjet/ClusterSequenceVoronoiArea.$(ObjSuf): \
     790        external/fastjet/ClusterSequenceVoronoiArea.$(SrcSuf) \
     791        external/fastjet/ClusterSequenceVoronoiArea.hh \
     792        external/fastjet/internal/Voronoi.hh
     793tmp/external/fastjet/ClusterSequence1GhostPassiveArea.$(ObjSuf): \
     794        external/fastjet/ClusterSequence1GhostPassiveArea.$(SrcSuf) \
     795        external/fastjet/ClusterSequence1GhostPassiveArea.hh
     796tmp/external/fastjet/ClusterSequenceStructure.$(ObjSuf): \
     797        external/fastjet/ClusterSequenceStructure.$(SrcSuf) \
     798        external/fastjet/ClusterSequenceStructure.hh \
     799        external/fastjet/Error.hh \
     800        external/fastjet/PseudoJet.hh \
     801        external/fastjet/ClusterSequence.hh \
     802        external/fastjet/ClusterSequenceAreaBase.hh
     803tmp/external/fastjet/ClosestPair2D.$(ObjSuf): \
     804        external/fastjet/ClosestPair2D.$(SrcSuf) \
     805        external/fastjet/internal/ClosestPair2D.hh
     806tmp/external/fastjet/JetDefinition.$(ObjSuf): \
     807        external/fastjet/JetDefinition.$(SrcSuf) \
     808        external/fastjet/JetDefinition.hh \
     809        external/fastjet/Error.hh \
     810        external/fastjet/CompositeJetStructure.hh
     811tmp/external/fastjet/ClusterSequenceActiveArea.$(ObjSuf): \
     812        external/fastjet/ClusterSequenceActiveArea.$(SrcSuf) \
     813        external/fastjet/PseudoJet.hh \
     814        external/fastjet/ClusterSequence.hh \
     815        external/fastjet/ClusterSequenceActiveArea.hh \
     816        external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh
     817tmp/external/fastjet/Dnn4piCylinder.$(ObjSuf): \
     818        external/fastjet/Dnn4piCylinder.$(SrcSuf) \
     819        external/fastjet/internal/Dnn4piCylinder.hh
    819820tmp/external/fastjet/AreaDefinition.$(ObjSuf): \
    820821        external/fastjet/AreaDefinition.$(SrcSuf) \
    821822        external/fastjet/AreaDefinition.hh
    822 tmp/external/fastjet/ClusterSequence_DumbN3.$(ObjSuf): \
    823         external/fastjet/ClusterSequence_DumbN3.$(SrcSuf) \
    824         external/fastjet/PseudoJet.hh \
    825         external/fastjet/ClusterSequence.hh
    826823tmp/external/fastjet/ClusterSequence_Delaunay.$(ObjSuf): \
    827824        external/fastjet/ClusterSequence_Delaunay.$(SrcSuf) \
     
    833830        external/fastjet/internal/Dnn3piCylinder.hh \
    834831        external/fastjet/internal/Dnn2piCylinder.hh
    835 tmp/external/fastjet/Dnn4piCylinder.$(ObjSuf): \
    836         external/fastjet/Dnn4piCylinder.$(SrcSuf) \
    837         external/fastjet/internal/Dnn4piCylinder.hh
    838 tmp/external/fastjet/ClosestPair2D.$(ObjSuf): \
    839         external/fastjet/ClosestPair2D.$(SrcSuf) \
    840         external/fastjet/internal/ClosestPair2D.hh
    841 tmp/external/fastjet/JetDefinition.$(ObjSuf): \
    842         external/fastjet/JetDefinition.$(SrcSuf) \
    843         external/fastjet/JetDefinition.hh \
    844         external/fastjet/Error.hh \
    845         external/fastjet/CompositeJetStructure.hh
    846 tmp/external/fastjet/RectangularGrid.$(ObjSuf): \
    847         external/fastjet/RectangularGrid.$(SrcSuf) \
    848         external/fastjet/RectangularGrid.hh
    849832tmp/external/fastjet/ClusterSequenceAreaBase.$(ObjSuf): \
    850833        external/fastjet/ClusterSequenceAreaBase.$(SrcSuf) \
    851834        external/fastjet/ClusterSequenceAreaBase.hh
    852 tmp/external/fastjet/DnnPlane.$(ObjSuf): \
    853         external/fastjet/DnnPlane.$(SrcSuf) \
    854         external/fastjet/internal/DnnPlane.hh
    855 tmp/external/fastjet/LazyTiling25.$(ObjSuf): \
    856         external/fastjet/LazyTiling25.$(SrcSuf) \
    857         external/fastjet/internal/LazyTiling25.hh \
    858         external/fastjet/internal/TilingExtent.hh
    859 tmp/external/fastjet/LazyTiling9SeparateGhosts.$(ObjSuf): \
    860         external/fastjet/LazyTiling9SeparateGhosts.$(SrcSuf) \
    861         external/fastjet/internal/LazyTiling9SeparateGhosts.hh \
    862         external/fastjet/internal/TilingExtent.hh
    863 tmp/external/fastjet/Error.$(ObjSuf): \
    864         external/fastjet/Error.$(SrcSuf) \
    865         external/fastjet/Error.hh \
    866         external/fastjet/config.h
    867 tmp/external/fastjet/ClusterSequenceActiveArea.$(ObjSuf): \
    868         external/fastjet/ClusterSequenceActiveArea.$(SrcSuf) \
    869         external/fastjet/PseudoJet.hh \
    870         external/fastjet/ClusterSequence.hh \
    871         external/fastjet/ClusterSequenceActiveArea.hh \
    872         external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh
    873 tmp/external/fastjet/CompositeJetStructure.$(ObjSuf): \
    874         external/fastjet/CompositeJetStructure.$(SrcSuf)
    875 tmp/external/fastjet/ClusterSequence_N2.$(ObjSuf): \
    876         external/fastjet/ClusterSequence_N2.$(SrcSuf)
    877835tmp/external/fastjet/ClusterSequence_TiledN2.$(ObjSuf): \
    878836        external/fastjet/ClusterSequence_TiledN2.$(SrcSuf) \
    879837        external/fastjet/PseudoJet.hh \
    880838        external/fastjet/ClusterSequence.hh \
    881         external/fastjet/internal/MinHeap.hh \
    882         external/fastjet/internal/TilingExtent.hh
    883 tmp/external/fastjet/ClusterSequenceStructure.$(ObjSuf): \
    884         external/fastjet/ClusterSequenceStructure.$(SrcSuf) \
    885         external/fastjet/ClusterSequenceStructure.hh \
    886         external/fastjet/Error.hh \
    887         external/fastjet/PseudoJet.hh \
    888         external/fastjet/ClusterSequence.hh \
    889         external/fastjet/ClusterSequenceAreaBase.hh
     839        external/fastjet/internal/MinHeap.hh
     840tmp/external/fastjet/ClusterSequence_N2.$(ObjSuf): \
     841        external/fastjet/ClusterSequence_N2.$(SrcSuf)
    890842tmp/external/fastjet/ClusterSequencePassiveArea.$(ObjSuf): \
    891843        external/fastjet/ClusterSequencePassiveArea.$(SrcSuf) \
    892844        external/fastjet/ClusterSequencePassiveArea.hh \
    893845        external/fastjet/ClusterSequenceVoronoiArea.hh
    894 tmp/external/fastjet/PseudoJetStructureBase.$(ObjSuf): \
    895         external/fastjet/PseudoJetStructureBase.$(SrcSuf) \
    896         external/fastjet/PseudoJetStructureBase.hh \
    897         external/fastjet/Error.hh \
    898         external/fastjet/PseudoJet.hh \
    899         external/fastjet/ClusterSequence.hh \
    900         external/fastjet/ClusterSequenceAreaBase.hh
    901 tmp/external/fastjet/TilingExtent.$(ObjSuf): \
    902         external/fastjet/TilingExtent.$(SrcSuf) \
    903         external/fastjet/internal/TilingExtent.hh
    904 tmp/external/fastjet/Voronoi.$(ObjSuf): \
    905         external/fastjet/Voronoi.$(SrcSuf) \
    906         external/fastjet/internal/Voronoi.hh
    907 tmp/external/fastjet/LazyTiling9Alt.$(ObjSuf): \
    908         external/fastjet/LazyTiling9Alt.$(SrcSuf) \
    909         external/fastjet/internal/LazyTiling9Alt.hh \
    910         external/fastjet/internal/TilingExtent.hh
    911 tmp/external/fastjet/ClusterSequenceArea.$(ObjSuf): \
    912         external/fastjet/ClusterSequenceArea.$(SrcSuf) \
    913         external/fastjet/ClusterSequenceArea.hh
    914 tmp/external/fastjet/ClusterSequence1GhostPassiveArea.$(ObjSuf): \
    915         external/fastjet/ClusterSequence1GhostPassiveArea.$(SrcSuf) \
    916         external/fastjet/ClusterSequence1GhostPassiveArea.hh
    917 tmp/external/fastjet/FunctionOfPseudoJet.$(ObjSuf): \
    918         external/fastjet/FunctionOfPseudoJet.$(SrcSuf)
    919 tmp/external/fastjet/MinHeap.$(ObjSuf): \
    920         external/fastjet/MinHeap.$(SrcSuf) \
    921         external/fastjet/internal/MinHeap.hh
    922 tmp/external/fastjet/GhostedAreaSpec.$(ObjSuf): \
    923         external/fastjet/GhostedAreaSpec.$(SrcSuf) \
    924         external/fastjet/GhostedAreaSpec.hh \
    925         external/fastjet/Error.hh
    926 tmp/external/fastjet/RangeDefinition.$(ObjSuf): \
    927         external/fastjet/RangeDefinition.$(SrcSuf) \
    928         external/fastjet/RangeDefinition.hh
     846tmp/external/fastjet/Dnn3piCylinder.$(ObjSuf): \
     847        external/fastjet/Dnn3piCylinder.$(SrcSuf) \
     848        external/fastjet/internal/Dnn3piCylinder.hh
     849tmp/external/fastjet/Dnn2piCylinder.$(ObjSuf): \
     850        external/fastjet/Dnn2piCylinder.$(SrcSuf) \
     851        external/fastjet/internal/Dnn2piCylinder.hh
    929852tmp/external/fastjet/ClusterSequence_CP2DChan.$(ObjSuf): \
    930853        external/fastjet/ClusterSequence_CP2DChan.$(SrcSuf) \
    931854        external/fastjet/ClusterSequence.hh \
    932855        external/fastjet/internal/ClosestPair2D.hh
     856tmp/external/fastjet/LimitedWarning.$(ObjSuf): \
     857        external/fastjet/LimitedWarning.$(SrcSuf) \
     858        external/fastjet/LimitedWarning.hh
     859tmp/external/fastjet/Selector.$(ObjSuf): \
     860        external/fastjet/Selector.$(SrcSuf) \
     861        external/fastjet/Selector.hh \
     862        external/fastjet/GhostedAreaSpec.hh
     863tmp/external/fastjet/BasicRandom.$(ObjSuf): \
     864        external/fastjet/BasicRandom.$(SrcSuf) \
     865        external/fastjet/internal/BasicRandom.hh
     866tmp/external/fastjet/Voronoi.$(ObjSuf): \
     867        external/fastjet/Voronoi.$(SrcSuf) \
     868        external/fastjet/internal/Voronoi.hh
     869tmp/external/fastjet/ClusterSequence_DumbN3.$(ObjSuf): \
     870        external/fastjet/ClusterSequence_DumbN3.$(SrcSuf) \
     871        external/fastjet/PseudoJet.hh \
     872        external/fastjet/ClusterSequence.hh
    933873tmp/external/fastjet/PseudoJet.$(ObjSuf): \
    934874        external/fastjet/PseudoJet.$(SrcSuf) \
     
    938878        external/fastjet/ClusterSequenceAreaBase.hh \
    939879        external/fastjet/CompositeJetStructure.hh
    940 tmp/external/fastjet/LimitedWarning.$(ObjSuf): \
    941         external/fastjet/LimitedWarning.$(SrcSuf) \
    942         external/fastjet/LimitedWarning.hh
    943 tmp/external/fastjet/ClusterSequenceVoronoiArea.$(ObjSuf): \
    944         external/fastjet/ClusterSequenceVoronoiArea.$(SrcSuf) \
    945         external/fastjet/ClusterSequenceVoronoiArea.hh \
    946         external/fastjet/internal/Voronoi.hh
     880tmp/external/fastjet/CompositeJetStructure.$(ObjSuf): \
     881        external/fastjet/CompositeJetStructure.$(SrcSuf)
     882tmp/external/fastjet/GhostedAreaSpec.$(ObjSuf): \
     883        external/fastjet/GhostedAreaSpec.$(SrcSuf) \
     884        external/fastjet/GhostedAreaSpec.hh \
     885        external/fastjet/Error.hh
     886tmp/external/fastjet/DnnPlane.$(ObjSuf): \
     887        external/fastjet/DnnPlane.$(SrcSuf) \
     888        external/fastjet/internal/DnnPlane.hh
     889tmp/external/fastjet/Error.$(ObjSuf): \
     890        external/fastjet/Error.$(SrcSuf) \
     891        external/fastjet/Error.hh \
     892        external/fastjet/config.h
     893tmp/external/fastjet/FunctionOfPseudoJet.$(ObjSuf): \
     894        external/fastjet/FunctionOfPseudoJet.$(SrcSuf)
     895tmp/external/fastjet/MinHeap.$(ObjSuf): \
     896        external/fastjet/MinHeap.$(SrcSuf) \
     897        external/fastjet/internal/MinHeap.hh
     898tmp/external/fastjet/RangeDefinition.$(ObjSuf): \
     899        external/fastjet/RangeDefinition.$(SrcSuf) \
     900        external/fastjet/RangeDefinition.hh
    947901tmp/external/fastjet/ClusterSequence.$(ObjSuf): \
    948902        external/fastjet/ClusterSequence.$(SrcSuf) \
     
    951905        external/fastjet/ClusterSequence.hh \
    952906        external/fastjet/ClusterSequenceStructure.hh \
    953         external/fastjet/version.hh \
    954         external/fastjet/internal/LazyTiling9Alt.hh \
    955         external/fastjet/internal/LazyTiling9.hh \
    956         external/fastjet/internal/LazyTiling25.hh \
    957         external/fastjet/internal/LazyTiling9SeparateGhosts.hh
     907        external/fastjet/version.hh
     908tmp/external/fastjet/ClusterSequenceArea.$(ObjSuf): \
     909        external/fastjet/ClusterSequenceArea.$(SrcSuf) \
     910        external/fastjet/ClusterSequenceArea.hh
     911tmp/external/fastjet/tools/CASubJetTagger.$(ObjSuf): \
     912        external/fastjet/tools/CASubJetTagger.$(SrcSuf)
     913tmp/external/fastjet/tools/Filter.$(ObjSuf): \
     914        external/fastjet/tools/Filter.$(SrcSuf) \
     915        external/fastjet/tools/Filter.hh
    958916tmp/external/fastjet/tools/RestFrameNSubjettinessTagger.$(ObjSuf): \
    959917        external/fastjet/tools/RestFrameNSubjettinessTagger.$(SrcSuf)
    960918tmp/external/fastjet/tools/MassDropTagger.$(ObjSuf): \
    961919        external/fastjet/tools/MassDropTagger.$(SrcSuf)
     920tmp/external/fastjet/tools/BackgroundEstimatorBase.$(ObjSuf): \
     921        external/fastjet/tools/BackgroundEstimatorBase.$(SrcSuf) \
     922        external/fastjet/tools/BackgroundEstimatorBase.hh
     923tmp/external/fastjet/tools/JHTopTagger.$(ObjSuf): \
     924        external/fastjet/tools/JHTopTagger.$(SrcSuf)
    962925tmp/external/fastjet/tools/GridMedianBackgroundEstimator.$(ObjSuf): \
    963926        external/fastjet/tools/GridMedianBackgroundEstimator.$(SrcSuf) \
    964927        external/fastjet/tools/GridMedianBackgroundEstimator.hh
     928tmp/external/fastjet/tools/Subtractor.$(ObjSuf): \
     929        external/fastjet/tools/Subtractor.$(SrcSuf) \
     930        external/fastjet/tools/Subtractor.hh
    965931tmp/external/fastjet/tools/Pruner.$(ObjSuf): \
    966932        external/fastjet/tools/Pruner.$(SrcSuf) \
     
    968934        external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh \
    969935        external/fastjet/Selector.hh
    970 tmp/external/fastjet/tools/CASubJetTagger.$(ObjSuf): \
    971         external/fastjet/tools/CASubJetTagger.$(SrcSuf)
    972 tmp/external/fastjet/tools/BackgroundEstimatorBase.$(ObjSuf): \
    973         external/fastjet/tools/BackgroundEstimatorBase.$(SrcSuf) \
    974         external/fastjet/tools/BackgroundEstimatorBase.hh
    975 tmp/external/fastjet/tools/Subtractor.$(ObjSuf): \
    976         external/fastjet/tools/Subtractor.$(SrcSuf) \
    977         external/fastjet/tools/Subtractor.hh
    978 tmp/external/fastjet/tools/Recluster.$(ObjSuf): \
    979         external/fastjet/tools/Recluster.$(SrcSuf) \
    980         external/fastjet/tools/Recluster.hh \
    981         external/fastjet/CompositeJetStructure.hh
    982936tmp/external/fastjet/tools/JetMedianBackgroundEstimator.$(ObjSuf): \
    983937        external/fastjet/tools/JetMedianBackgroundEstimator.$(SrcSuf) \
    984938        external/fastjet/tools/JetMedianBackgroundEstimator.hh
    985 tmp/external/fastjet/tools/JHTopTagger.$(ObjSuf): \
    986         external/fastjet/tools/JHTopTagger.$(SrcSuf)
    987 tmp/external/fastjet/tools/Filter.$(ObjSuf): \
    988         external/fastjet/tools/Filter.$(SrcSuf) \
    989         external/fastjet/tools/Filter.hh \
    990         external/fastjet/tools/Recluster.hh
    991939tmp/external/fastjet/tools/TopTaggerBase.$(ObjSuf): \
    992940        external/fastjet/tools/TopTaggerBase.$(SrcSuf)
    993 tmp/external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.$(ObjSuf): \
    994         external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.$(SrcSuf) \
    995         external/fastjet/ClusterSequence.hh \
    996         external/fastjet/Error.hh
    997 tmp/external/fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf): \
    998         external/fastjet/plugins/CDFCones/CDFMidPointPlugin.$(SrcSuf) \
    999         external/fastjet/ClusterSequence.hh \
    1000         external/fastjet/Error.hh
    1001 tmp/external/fastjet/plugins/CDFCones/MidPointAlgorithm.$(ObjSuf): \
    1002         external/fastjet/plugins/CDFCones/MidPointAlgorithm.$(SrcSuf)
    1003 tmp/external/fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf): \
    1004         external/fastjet/plugins/CDFCones/CDFJetCluPlugin.$(SrcSuf) \
     941tmp/external/fastjet/plugins/TrackJet/TrackJetPlugin.$(ObjSuf): \
     942        external/fastjet/plugins/TrackJet/TrackJetPlugin.$(SrcSuf) \
    1005943        external/fastjet/ClusterSequence.hh
    1006 tmp/external/fastjet/plugins/CDFCones/JetCluAlgorithm.$(ObjSuf): \
    1007         external/fastjet/plugins/CDFCones/JetCluAlgorithm.$(SrcSuf)
    1008 tmp/external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.$(ObjSuf): \
    1009         external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.$(SrcSuf) \
    1010         external/fastjet/ClusterSequence.hh \
    1011         external/fastjet/Error.hh
    1012 tmp/external/fastjet/plugins/GridJet/GridJetPlugin.$(ObjSuf): \
    1013         external/fastjet/plugins/GridJet/GridJetPlugin.$(SrcSuf) \
    1014         external/fastjet/ClusterSequence.hh
    1015 tmp/external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.$(ObjSuf): \
    1016         external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.$(SrcSuf) \
    1017         external/fastjet/ClusterSequence.hh
    1018 tmp/external/fastjet/plugins/SISCone/split_merge.$(ObjSuf): \
    1019         external/fastjet/plugins/SISCone/split_merge.$(SrcSuf)
    1020 tmp/external/fastjet/plugins/SISCone/hash.$(ObjSuf): \
    1021         external/fastjet/plugins/SISCone/hash.$(SrcSuf)
    1022 tmp/external/fastjet/plugins/SISCone/siscone_error.$(ObjSuf): \
    1023         external/fastjet/plugins/SISCone/siscone_error.$(SrcSuf)
    1024 tmp/external/fastjet/plugins/SISCone/ranlux.$(ObjSuf): \
    1025         external/fastjet/plugins/SISCone/ranlux.$(SrcSuf)
    1026 tmp/external/fastjet/plugins/SISCone/SISConePlugin.$(ObjSuf): \
    1027         external/fastjet/plugins/SISCone/SISConePlugin.$(SrcSuf) \
    1028         external/fastjet/ClusterSequence.hh
    1029 tmp/external/fastjet/plugins/SISCone/vicinity.$(ObjSuf): \
    1030         external/fastjet/plugins/SISCone/vicinity.$(SrcSuf)
    1031 tmp/external/fastjet/plugins/SISCone/area.$(ObjSuf): \
    1032         external/fastjet/plugins/SISCone/area.$(SrcSuf)
    1033 tmp/external/fastjet/plugins/SISCone/reference.$(ObjSuf): \
    1034         external/fastjet/plugins/SISCone/reference.$(SrcSuf)
    1035 tmp/external/fastjet/plugins/SISCone/quadtree.$(ObjSuf): \
    1036         external/fastjet/plugins/SISCone/quadtree.$(SrcSuf)
    1037 tmp/external/fastjet/plugins/SISCone/siscone.$(ObjSuf): \
    1038         external/fastjet/plugins/SISCone/siscone.$(SrcSuf)
    1039 tmp/external/fastjet/plugins/SISCone/momentum.$(ObjSuf): \
    1040         external/fastjet/plugins/SISCone/momentum.$(SrcSuf)
    1041 tmp/external/fastjet/plugins/SISCone/protocones.$(ObjSuf): \
    1042         external/fastjet/plugins/SISCone/protocones.$(SrcSuf)
    1043 tmp/external/fastjet/plugins/SISCone/geom_2d.$(ObjSuf): \
    1044         external/fastjet/plugins/SISCone/geom_2d.$(SrcSuf)
    1045944tmp/external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(ObjSuf): \
    1046945        external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(SrcSuf) \
     
    1052951tmp/external/fastjet/plugins/ATLASCone/JetSplitMergeTool.$(ObjSuf): \
    1053952        external/fastjet/plugins/ATLASCone/JetSplitMergeTool.$(SrcSuf)
    1054 tmp/external/fastjet/plugins/EECambridge/EECambridgePlugin.$(ObjSuf): \
    1055         external/fastjet/plugins/EECambridge/EECambridgePlugin.$(SrcSuf) \
     953tmp/external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.$(ObjSuf): \
     954        external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.$(SrcSuf) \
    1056955        external/fastjet/ClusterSequence.hh \
    1057         external/fastjet/NNH.hh
    1058 tmp/external/fastjet/plugins/TrackJet/TrackJetPlugin.$(ObjSuf): \
    1059         external/fastjet/plugins/TrackJet/TrackJetPlugin.$(SrcSuf) \
     956        external/fastjet/Error.hh
     957tmp/external/fastjet/plugins/GridJet/GridJetPlugin.$(ObjSuf): \
     958        external/fastjet/plugins/GridJet/GridJetPlugin.$(SrcSuf) \
    1060959        external/fastjet/ClusterSequence.hh
     960tmp/external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.$(ObjSuf): \
     961        external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.$(SrcSuf) \
     962        external/fastjet/ClusterSequence.hh
     963tmp/external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.$(ObjSuf): \
     964        external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.$(SrcSuf) \
     965        external/fastjet/ClusterSequence.hh \
     966        external/fastjet/Error.hh
     967tmp/external/fastjet/plugins/CDFCones/JetCluAlgorithm.$(ObjSuf): \
     968        external/fastjet/plugins/CDFCones/JetCluAlgorithm.$(SrcSuf)
     969tmp/external/fastjet/plugins/CDFCones/MidPointAlgorithm.$(ObjSuf): \
     970        external/fastjet/plugins/CDFCones/MidPointAlgorithm.$(SrcSuf)
     971tmp/external/fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf): \
     972        external/fastjet/plugins/CDFCones/CDFMidPointPlugin.$(SrcSuf) \
     973        external/fastjet/ClusterSequence.hh \
     974        external/fastjet/Error.hh
     975tmp/external/fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf): \
     976        external/fastjet/plugins/CDFCones/CDFJetCluPlugin.$(SrcSuf) \
     977        external/fastjet/ClusterSequence.hh
     978tmp/external/fastjet/plugins/SISCone/area.$(ObjSuf): \
     979        external/fastjet/plugins/SISCone/area.$(SrcSuf)
     980tmp/external/fastjet/plugins/SISCone/siscone.$(ObjSuf): \
     981        external/fastjet/plugins/SISCone/siscone.$(SrcSuf)
     982tmp/external/fastjet/plugins/SISCone/vicinity.$(ObjSuf): \
     983        external/fastjet/plugins/SISCone/vicinity.$(SrcSuf)
     984tmp/external/fastjet/plugins/SISCone/geom_2d.$(ObjSuf): \
     985        external/fastjet/plugins/SISCone/geom_2d.$(SrcSuf)
     986tmp/external/fastjet/plugins/SISCone/hash.$(ObjSuf): \
     987        external/fastjet/plugins/SISCone/hash.$(SrcSuf)
     988tmp/external/fastjet/plugins/SISCone/quadtree.$(ObjSuf): \
     989        external/fastjet/plugins/SISCone/quadtree.$(SrcSuf)
     990tmp/external/fastjet/plugins/SISCone/split_merge.$(ObjSuf): \
     991        external/fastjet/plugins/SISCone/split_merge.$(SrcSuf)
     992tmp/external/fastjet/plugins/SISCone/momentum.$(ObjSuf): \
     993        external/fastjet/plugins/SISCone/momentum.$(SrcSuf)
     994tmp/external/fastjet/plugins/SISCone/ranlux.$(ObjSuf): \
     995        external/fastjet/plugins/SISCone/ranlux.$(SrcSuf)
     996tmp/external/fastjet/plugins/SISCone/reference.$(ObjSuf): \
     997        external/fastjet/plugins/SISCone/reference.$(SrcSuf)
     998tmp/external/fastjet/plugins/SISCone/SISConePlugin.$(ObjSuf): \
     999        external/fastjet/plugins/SISCone/SISConePlugin.$(SrcSuf) \
     1000        external/fastjet/ClusterSequence.hh
     1001tmp/external/fastjet/plugins/SISCone/protocones.$(ObjSuf): \
     1002        external/fastjet/plugins/SISCone/protocones.$(SrcSuf)
     1003tmp/external/fastjet/plugins/SISCone/siscone_error.$(ObjSuf): \
     1004        external/fastjet/plugins/SISCone/siscone_error.$(SrcSuf)
    10611005tmp/external/fastjet/plugins/Jade/JadePlugin.$(ObjSuf): \
    10621006        external/fastjet/plugins/Jade/JadePlugin.$(SrcSuf) \
     
    10661010        external/fastjet/plugins/NestedDefs/NestedDefsPlugin.$(SrcSuf) \
    10671011        external/fastjet/ClusterSequence.hh
    1068 tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf): \
    1069         external/fastjet/contribs/SoftKiller/SoftKiller.$(SrcSuf)
     1012tmp/external/fastjet/plugins/EECambridge/EECambridgePlugin.$(ObjSuf): \
     1013        external/fastjet/plugins/EECambridge/EECambridgePlugin.$(SrcSuf) \
     1014        external/fastjet/ClusterSequence.hh \
     1015        external/fastjet/NNH.hh
     1016tmp/external/fastjet/contribs/Nsubjettiness/MeasureFunction.$(ObjSuf): \
     1017        external/fastjet/contribs/Nsubjettiness/MeasureFunction.$(SrcSuf)
     1018tmp/external/fastjet/contribs/Nsubjettiness/Njettiness.$(ObjSuf): \
     1019        external/fastjet/contribs/Nsubjettiness/Njettiness.$(SrcSuf)
    10701020tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf): \
    10711021        external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(SrcSuf)
     1022tmp/external/fastjet/contribs/Nsubjettiness/AxesFinder.$(ObjSuf): \
     1023        external/fastjet/contribs/Nsubjettiness/AxesFinder.$(SrcSuf)
    10721024tmp/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(ObjSuf): \
    10731025        external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(SrcSuf)
    1074 tmp/external/fastjet/contribs/Nsubjettiness/AxesFinder.$(ObjSuf): \
    1075         external/fastjet/contribs/Nsubjettiness/AxesFinder.$(SrcSuf)
    10761026tmp/external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.$(ObjSuf): \
    10771027        external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.$(SrcSuf)
    1078 tmp/external/fastjet/contribs/Nsubjettiness/Njettiness.$(ObjSuf): \
    1079         external/fastjet/contribs/Nsubjettiness/Njettiness.$(SrcSuf)
    1080 tmp/external/fastjet/contribs/Nsubjettiness/NjettinessDefinition.$(ObjSuf): \
    1081         external/fastjet/contribs/Nsubjettiness/NjettinessDefinition.$(SrcSuf)
    1082 tmp/external/fastjet/contribs/Nsubjettiness/MeasureFunction.$(ObjSuf): \
    1083         external/fastjet/contribs/Nsubjettiness/MeasureFunction.$(SrcSuf)
     1028tmp/external/Hector/H_HorizontalQuadrupole.$(ObjSuf): \
     1029        external/Hector/H_HorizontalQuadrupole.$(SrcSuf)
     1030tmp/external/Hector/H_Aperture.$(ObjSuf): \
     1031        external/Hector/H_Aperture.$(SrcSuf)
     1032tmp/external/Hector/H_TransportMatrices.$(ObjSuf): \
     1033        external/Hector/H_TransportMatrices.$(SrcSuf)
     1034tmp/external/Hector/H_RomanPot.$(ObjSuf): \
     1035        external/Hector/H_RomanPot.$(SrcSuf)
     1036tmp/external/Hector/H_RecRPObject.$(ObjSuf): \
     1037        external/Hector/H_RecRPObject.$(SrcSuf)
     1038tmp/external/Hector/H_VerticalQuadrupole.$(ObjSuf): \
     1039        external/Hector/H_VerticalQuadrupole.$(SrcSuf)
    10841040tmp/external/Hector/H_OpticalElement.$(ObjSuf): \
    10851041        external/Hector/H_OpticalElement.$(SrcSuf)
     1042tmp/external/Hector/H_RectangularAperture.$(ObjSuf): \
     1043        external/Hector/H_RectangularAperture.$(SrcSuf)
     1044tmp/external/Hector/H_EllipticAperture.$(ObjSuf): \
     1045        external/Hector/H_EllipticAperture.$(SrcSuf)
     1046tmp/external/Hector/H_BeamLineParser.$(ObjSuf): \
     1047        external/Hector/H_BeamLineParser.$(SrcSuf)
     1048tmp/external/Hector/H_RectangularDipole.$(ObjSuf): \
     1049        external/Hector/H_RectangularDipole.$(SrcSuf)
     1050tmp/external/Hector/H_Marker.$(ObjSuf): \
     1051        external/Hector/H_Marker.$(SrcSuf)
     1052tmp/external/Hector/H_Kicker.$(ObjSuf): \
     1053        external/Hector/H_Kicker.$(SrcSuf)
     1054tmp/external/Hector/H_BeamLine.$(ObjSuf): \
     1055        external/Hector/H_BeamLine.$(SrcSuf)
     1056tmp/external/Hector/H_Beam.$(ObjSuf): \
     1057        external/Hector/H_Beam.$(SrcSuf)
     1058tmp/external/Hector/H_RectangularCollimator.$(ObjSuf): \
     1059        external/Hector/H_RectangularCollimator.$(SrcSuf)
     1060tmp/external/Hector/H_Parameters.$(ObjSuf): \
     1061        external/Hector/H_Parameters.$(SrcSuf)
     1062tmp/external/Hector/H_Drift.$(ObjSuf): \
     1063        external/Hector/H_Drift.$(SrcSuf)
    10861064tmp/external/Hector/H_CircularAperture.$(ObjSuf): \
    10871065        external/Hector/H_CircularAperture.$(SrcSuf)
    1088 tmp/external/Hector/H_TransportMatrices.$(ObjSuf): \
    1089         external/Hector/H_TransportMatrices.$(SrcSuf)
     1066tmp/external/Hector/H_VerticalKicker.$(ObjSuf): \
     1067        external/Hector/H_VerticalKicker.$(SrcSuf)
    10901068tmp/external/Hector/H_SectorDipole.$(ObjSuf): \
    10911069        external/Hector/H_SectorDipole.$(SrcSuf)
     1070tmp/external/Hector/H_HorizontalKicker.$(ObjSuf): \
     1071        external/Hector/H_HorizontalKicker.$(SrcSuf)
    10921072tmp/external/Hector/H_Dipole.$(ObjSuf): \
    10931073        external/Hector/H_Dipole.$(SrcSuf)
    10941074tmp/external/Hector/H_AbstractBeamLine.$(ObjSuf): \
    10951075        external/Hector/H_AbstractBeamLine.$(SrcSuf)
    1096 tmp/external/Hector/H_BeamLine.$(ObjSuf): \
    1097         external/Hector/H_BeamLine.$(SrcSuf)
     1076tmp/external/Hector/H_BeamParticle.$(ObjSuf): \
     1077        external/Hector/H_BeamParticle.$(SrcSuf)
     1078tmp/external/Hector/H_Quadrupole.$(ObjSuf): \
     1079        external/Hector/H_Quadrupole.$(SrcSuf)
    10981080tmp/external/Hector/H_RectEllipticAperture.$(ObjSuf): \
    10991081        external/Hector/H_RectEllipticAperture.$(SrcSuf)
    1100 tmp/external/Hector/H_HorizontalKicker.$(ObjSuf): \
    1101         external/Hector/H_HorizontalKicker.$(SrcSuf)
    1102 tmp/external/Hector/H_Kicker.$(ObjSuf): \
    1103         external/Hector/H_Kicker.$(SrcSuf)
    1104 tmp/external/Hector/H_BeamLineParser.$(ObjSuf): \
    1105         external/Hector/H_BeamLineParser.$(SrcSuf)
    1106 tmp/external/Hector/H_BeamParticle.$(ObjSuf): \
    1107         external/Hector/H_BeamParticle.$(SrcSuf)
    1108 tmp/external/Hector/H_RectangularDipole.$(ObjSuf): \
    1109         external/Hector/H_RectangularDipole.$(SrcSuf)
    1110 tmp/external/Hector/H_VerticalQuadrupole.$(ObjSuf): \
    1111         external/Hector/H_VerticalQuadrupole.$(SrcSuf)
    1112 tmp/external/Hector/H_Marker.$(ObjSuf): \
    1113         external/Hector/H_Marker.$(SrcSuf)
    1114 tmp/external/Hector/H_Beam.$(ObjSuf): \
    1115         external/Hector/H_Beam.$(SrcSuf)
    1116 tmp/external/Hector/H_EllipticAperture.$(ObjSuf): \
    1117         external/Hector/H_EllipticAperture.$(SrcSuf)
    1118 tmp/external/Hector/H_VerticalKicker.$(ObjSuf): \
    1119         external/Hector/H_VerticalKicker.$(SrcSuf)
    1120 tmp/external/Hector/H_HorizontalQuadrupole.$(ObjSuf): \
    1121         external/Hector/H_HorizontalQuadrupole.$(SrcSuf)
    1122 tmp/external/Hector/H_Parameters.$(ObjSuf): \
    1123         external/Hector/H_Parameters.$(SrcSuf)
    1124 tmp/external/Hector/H_Drift.$(ObjSuf): \
    1125         external/Hector/H_Drift.$(SrcSuf)
    1126 tmp/external/Hector/H_RomanPot.$(ObjSuf): \
    1127         external/Hector/H_RomanPot.$(SrcSuf)
    1128 tmp/external/Hector/H_RecRPObject.$(ObjSuf): \
    1129         external/Hector/H_RecRPObject.$(SrcSuf)
    1130 tmp/external/Hector/H_RectangularCollimator.$(ObjSuf): \
    1131         external/Hector/H_RectangularCollimator.$(SrcSuf)
    1132 tmp/external/Hector/H_Aperture.$(ObjSuf): \
    1133         external/Hector/H_Aperture.$(SrcSuf)
    1134 tmp/external/Hector/H_RectangularAperture.$(ObjSuf): \
    1135         external/Hector/H_RectangularAperture.$(SrcSuf)
    1136 tmp/external/Hector/H_Quadrupole.$(ObjSuf): \
    1137         external/Hector/H_Quadrupole.$(SrcSuf)
    11381082DELPHES_OBJ +=  \
    1139         tmp/classes/DelphesPileUpReader.$(ObjSuf) \
    1140         tmp/classes/DelphesSTDHEPReader.$(ObjSuf) \
    11411083        tmp/classes/DelphesTF2.$(ObjSuf) \
     1084        tmp/classes/DelphesStream.$(ObjSuf) \
     1085        tmp/classes/DelphesModule.$(ObjSuf) \
     1086        tmp/classes/DelphesPileUpWriter.$(ObjSuf) \
    11421087        tmp/classes/DelphesHepMCReader.$(ObjSuf) \
    11431088        tmp/classes/DelphesLHEFReader.$(ObjSuf) \
    1144         tmp/classes/DelphesStream.$(ObjSuf) \
    1145         tmp/classes/DelphesModule.$(ObjSuf) \
     1089        tmp/classes/DelphesFormula.$(ObjSuf) \
     1090        tmp/classes/DelphesClasses.$(ObjSuf) \
     1091        tmp/classes/DelphesSTDHEPReader.$(ObjSuf) \
     1092        tmp/classes/DelphesPileUpReader.$(ObjSuf) \
    11461093        tmp/classes/DelphesFactory.$(ObjSuf) \
    1147         tmp/classes/DelphesClasses.$(ObjSuf) \
    1148         tmp/classes/DelphesFormula.$(ObjSuf) \
    1149         tmp/classes/DelphesPileUpWriter.$(ObjSuf) \
     1094        tmp/modules/Isolation.$(ObjSuf) \
     1095        tmp/modules/Efficiency.$(ObjSuf) \
     1096        tmp/modules/BTagging.$(ObjSuf) \
     1097        tmp/modules/PileUpMerger.$(ObjSuf) \
     1098        tmp/modules/ImpactParameterSmearing.$(ObjSuf) \
     1099        tmp/modules/SimpleCalorimeter.$(ObjSuf) \
     1100        tmp/modules/PileUpJetID.$(ObjSuf) \
     1101        tmp/modules/Cloner.$(ObjSuf) \
     1102        tmp/modules/TauTagging.$(ObjSuf) \
     1103        tmp/modules/ExampleModule.$(ObjSuf) \
     1104        tmp/modules/Merger.$(ObjSuf) \
     1105        tmp/modules/IdentificationMap.$(ObjSuf) \
     1106        tmp/modules/EnergyScale.$(ObjSuf) \
     1107        tmp/modules/MomentumSmearing.$(ObjSuf) \
     1108        tmp/modules/Calorimeter.$(ObjSuf) \
     1109        tmp/modules/TrackCountingBTagging.$(ObjSuf) \
     1110        tmp/modules/Delphes.$(ObjSuf) \
     1111        tmp/modules/TreeWriter.$(ObjSuf) \
    11501112        tmp/modules/StatusPidFilter.$(ObjSuf) \
    1151         tmp/modules/ParticlePropagator.$(ObjSuf) \
    1152         tmp/modules/Delphes.$(ObjSuf) \
     1113        tmp/modules/Hector.$(ObjSuf) \
     1114        tmp/modules/EnergySmearing.$(ObjSuf) \
     1115        tmp/modules/LeptonDressing.$(ObjSuf) \
    11531116        tmp/modules/UniqueObjectFinder.$(ObjSuf) \
    11541117        tmp/modules/ConstituentFilter.$(ObjSuf) \
     1118        tmp/modules/ParticlePropagator.$(ObjSuf) \
     1119        tmp/modules/JetPileUpSubtractor.$(ObjSuf) \
    11551120        tmp/modules/TrackPileUpSubtractor.$(ObjSuf) \
     1121        tmp/modules/FastJetFinder.$(ObjSuf) \
     1122        tmp/modules/TimeSmearing.$(ObjSuf) \
    11561123        tmp/modules/Weighter.$(ObjSuf) \
    1157         tmp/modules/Isolation.$(ObjSuf) \
    1158         tmp/modules/PileUpMerger.$(ObjSuf) \
    1159         tmp/modules/ExampleModule.$(ObjSuf) \
    1160         tmp/modules/Hector.$(ObjSuf) \
    1161         tmp/modules/EnergySmearing.$(ObjSuf) \
    1162         tmp/modules/FastJetFinder.$(ObjSuf) \
    1163         tmp/modules/SimpleCalorimeter.$(ObjSuf) \
    1164         tmp/modules/LeptonDressing.$(ObjSuf) \
    1165         tmp/modules/Efficiency.$(ObjSuf) \
    1166         tmp/modules/TimeSmearing.$(ObjSuf) \
    1167         tmp/modules/PileUpJetID.$(ObjSuf) \
    1168         tmp/modules/JetPileUpSubtractor.$(ObjSuf) \
    1169         tmp/modules/TauTagging.$(ObjSuf) \
    1170         tmp/modules/BTagging.$(ObjSuf) \
    1171         tmp/modules/Merger.$(ObjSuf) \
    1172         tmp/modules/FastJetGridMedianEstimator.$(ObjSuf) \
    1173         tmp/modules/Cloner.$(ObjSuf) \
    1174         tmp/modules/PdgCodeFilter.$(ObjSuf) \
    1175         tmp/modules/EnergyScale.$(ObjSuf) \
    1176         tmp/modules/IdentificationMap.$(ObjSuf) \
    1177         tmp/modules/TrackCountingBTagging.$(ObjSuf) \
    1178         tmp/modules/Calorimeter.$(ObjSuf) \
    1179         tmp/modules/MomentumSmearing.$(ObjSuf) \
    1180         tmp/modules/ImpactParameterSmearing.$(ObjSuf) \
    1181         tmp/modules/TreeWriter.$(ObjSuf) \
     1124        tmp/external/ExRootAnalysis/ExRootTask.$(ObjSuf) \
    11821125        tmp/external/ExRootAnalysis/ExRootTreeWriter.$(ObjSuf) \
    11831126        tmp/external/ExRootAnalysis/ExRootFilter.$(ObjSuf) \
    11841127        tmp/external/ExRootAnalysis/ExRootResult.$(ObjSuf) \
    11851128        tmp/external/ExRootAnalysis/ExRootConfReader.$(ObjSuf) \
     1129        tmp/external/ExRootAnalysis/ExRootTreeReader.$(ObjSuf) \
    11861130        tmp/external/ExRootAnalysis/ExRootProgressBar.$(ObjSuf) \
    11871131        tmp/external/ExRootAnalysis/ExRootTreeBranch.$(ObjSuf) \
    1188         tmp/external/ExRootAnalysis/ExRootTreeReader.$(ObjSuf) \
    1189         tmp/external/ExRootAnalysis/ExRootTask.$(ObjSuf) \
    11901132        tmp/external/ExRootAnalysis/ExRootUtilities.$(ObjSuf) \
     1133        tmp/external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf) \
     1134        tmp/external/fastjet/PseudoJetStructureBase.$(ObjSuf) \
     1135        tmp/external/fastjet/ClusterSequenceVoronoiArea.$(ObjSuf) \
     1136        tmp/external/fastjet/ClusterSequence1GhostPassiveArea.$(ObjSuf) \
     1137        tmp/external/fastjet/ClusterSequenceStructure.$(ObjSuf) \
     1138        tmp/external/fastjet/ClosestPair2D.$(ObjSuf) \
     1139        tmp/external/fastjet/JetDefinition.$(ObjSuf) \
     1140        tmp/external/fastjet/ClusterSequenceActiveArea.$(ObjSuf) \
     1141        tmp/external/fastjet/Dnn4piCylinder.$(ObjSuf) \
     1142        tmp/external/fastjet/AreaDefinition.$(ObjSuf) \
     1143        tmp/external/fastjet/ClusterSequence_Delaunay.$(ObjSuf) \
     1144        tmp/external/fastjet/ClusterSequenceAreaBase.$(ObjSuf) \
     1145        tmp/external/fastjet/ClusterSequence_TiledN2.$(ObjSuf) \
     1146        tmp/external/fastjet/ClusterSequence_N2.$(ObjSuf) \
     1147        tmp/external/fastjet/ClusterSequencePassiveArea.$(ObjSuf) \
     1148        tmp/external/fastjet/Dnn3piCylinder.$(ObjSuf) \
     1149        tmp/external/fastjet/Dnn2piCylinder.$(ObjSuf) \
     1150        tmp/external/fastjet/ClusterSequence_CP2DChan.$(ObjSuf) \
     1151        tmp/external/fastjet/LimitedWarning.$(ObjSuf) \
    11911152        tmp/external/fastjet/Selector.$(ObjSuf) \
    11921153        tmp/external/fastjet/BasicRandom.$(ObjSuf) \
    1193         tmp/external/fastjet/Dnn2piCylinder.$(ObjSuf) \
    1194         tmp/external/fastjet/Dnn3piCylinder.$(ObjSuf) \
    1195         tmp/external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf) \
    1196         tmp/external/fastjet/LazyTiling9.$(ObjSuf) \
    1197         tmp/external/fastjet/AreaDefinition.$(ObjSuf) \
     1154        tmp/external/fastjet/Voronoi.$(ObjSuf) \
    11981155        tmp/external/fastjet/ClusterSequence_DumbN3.$(ObjSuf) \
    1199         tmp/external/fastjet/ClusterSequence_Delaunay.$(ObjSuf) \
    1200         tmp/external/fastjet/Dnn4piCylinder.$(ObjSuf) \
    1201         tmp/external/fastjet/ClosestPair2D.$(ObjSuf) \
    1202         tmp/external/fastjet/JetDefinition.$(ObjSuf) \
    1203         tmp/external/fastjet/RectangularGrid.$(ObjSuf) \
    1204         tmp/external/fastjet/ClusterSequenceAreaBase.$(ObjSuf) \
     1156        tmp/external/fastjet/PseudoJet.$(ObjSuf) \
     1157        tmp/external/fastjet/CompositeJetStructure.$(ObjSuf) \
     1158        tmp/external/fastjet/GhostedAreaSpec.$(ObjSuf) \
    12051159        tmp/external/fastjet/DnnPlane.$(ObjSuf) \
    1206         tmp/external/fastjet/LazyTiling25.$(ObjSuf) \
    1207         tmp/external/fastjet/LazyTiling9SeparateGhosts.$(ObjSuf) \
    12081160        tmp/external/fastjet/Error.$(ObjSuf) \
    1209         tmp/external/fastjet/ClusterSequenceActiveArea.$(ObjSuf) \
    1210         tmp/external/fastjet/CompositeJetStructure.$(ObjSuf) \
    1211         tmp/external/fastjet/ClusterSequence_N2.$(ObjSuf) \
    1212         tmp/external/fastjet/ClusterSequence_TiledN2.$(ObjSuf) \
    1213         tmp/external/fastjet/ClusterSequenceStructure.$(ObjSuf) \
    1214         tmp/external/fastjet/ClusterSequencePassiveArea.$(ObjSuf) \
    1215         tmp/external/fastjet/PseudoJetStructureBase.$(ObjSuf) \
    1216         tmp/external/fastjet/TilingExtent.$(ObjSuf) \
    1217         tmp/external/fastjet/Voronoi.$(ObjSuf) \
    1218         tmp/external/fastjet/LazyTiling9Alt.$(ObjSuf) \
    1219         tmp/external/fastjet/ClusterSequenceArea.$(ObjSuf) \
    1220         tmp/external/fastjet/ClusterSequence1GhostPassiveArea.$(ObjSuf) \
    12211161        tmp/external/fastjet/FunctionOfPseudoJet.$(ObjSuf) \
    12221162        tmp/external/fastjet/MinHeap.$(ObjSuf) \
    1223         tmp/external/fastjet/GhostedAreaSpec.$(ObjSuf) \
    12241163        tmp/external/fastjet/RangeDefinition.$(ObjSuf) \
    1225         tmp/external/fastjet/ClusterSequence_CP2DChan.$(ObjSuf) \
    1226         tmp/external/fastjet/PseudoJet.$(ObjSuf) \
    1227         tmp/external/fastjet/LimitedWarning.$(ObjSuf) \
    1228         tmp/external/fastjet/ClusterSequenceVoronoiArea.$(ObjSuf) \
    12291164        tmp/external/fastjet/ClusterSequence.$(ObjSuf) \
     1165        tmp/external/fastjet/ClusterSequenceArea.$(ObjSuf) \
     1166        tmp/external/fastjet/tools/CASubJetTagger.$(ObjSuf) \
     1167        tmp/external/fastjet/tools/Filter.$(ObjSuf) \
    12301168        tmp/external/fastjet/tools/RestFrameNSubjettinessTagger.$(ObjSuf) \
    12311169        tmp/external/fastjet/tools/MassDropTagger.$(ObjSuf) \
     1170        tmp/external/fastjet/tools/BackgroundEstimatorBase.$(ObjSuf) \
     1171        tmp/external/fastjet/tools/JHTopTagger.$(ObjSuf) \
    12321172        tmp/external/fastjet/tools/GridMedianBackgroundEstimator.$(ObjSuf) \
     1173        tmp/external/fastjet/tools/Subtractor.$(ObjSuf) \
    12331174        tmp/external/fastjet/tools/Pruner.$(ObjSuf) \
    1234         tmp/external/fastjet/tools/CASubJetTagger.$(ObjSuf) \
    1235         tmp/external/fastjet/tools/BackgroundEstimatorBase.$(ObjSuf) \
    1236         tmp/external/fastjet/tools/Subtractor.$(ObjSuf) \
    1237         tmp/external/fastjet/tools/Recluster.$(ObjSuf) \
    12381175        tmp/external/fastjet/tools/JetMedianBackgroundEstimator.$(ObjSuf) \
    1239         tmp/external/fastjet/tools/JHTopTagger.$(ObjSuf) \
    1240         tmp/external/fastjet/tools/Filter.$(ObjSuf) \
    12411176        tmp/external/fastjet/tools/TopTaggerBase.$(ObjSuf) \
    1242         tmp/external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.$(ObjSuf) \
    1243         tmp/external/fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf) \
    1244         tmp/external/fastjet/plugins/CDFCones/MidPointAlgorithm.$(ObjSuf) \
    1245         tmp/external/fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf) \
    1246         tmp/external/fastjet/plugins/CDFCones/JetCluAlgorithm.$(ObjSuf) \
    1247         tmp/external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.$(ObjSuf) \
    1248         tmp/external/fastjet/plugins/GridJet/GridJetPlugin.$(ObjSuf) \
    1249         tmp/external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.$(ObjSuf) \
    1250         tmp/external/fastjet/plugins/SISCone/split_merge.$(ObjSuf) \
    1251         tmp/external/fastjet/plugins/SISCone/hash.$(ObjSuf) \
    1252         tmp/external/fastjet/plugins/SISCone/siscone_error.$(ObjSuf) \
    1253         tmp/external/fastjet/plugins/SISCone/ranlux.$(ObjSuf) \
    1254         tmp/external/fastjet/plugins/SISCone/SISConePlugin.$(ObjSuf) \
    1255         tmp/external/fastjet/plugins/SISCone/vicinity.$(ObjSuf) \
    1256         tmp/external/fastjet/plugins/SISCone/area.$(ObjSuf) \
    1257         tmp/external/fastjet/plugins/SISCone/reference.$(ObjSuf) \
    1258         tmp/external/fastjet/plugins/SISCone/quadtree.$(ObjSuf) \
    1259         tmp/external/fastjet/plugins/SISCone/siscone.$(ObjSuf) \
    1260         tmp/external/fastjet/plugins/SISCone/momentum.$(ObjSuf) \
    1261         tmp/external/fastjet/plugins/SISCone/protocones.$(ObjSuf) \
    1262         tmp/external/fastjet/plugins/SISCone/geom_2d.$(ObjSuf) \
     1177        tmp/external/fastjet/plugins/TrackJet/TrackJetPlugin.$(ObjSuf) \
    12631178        tmp/external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(ObjSuf) \
    12641179        tmp/external/fastjet/plugins/ATLASCone/Jet.$(ObjSuf) \
    12651180        tmp/external/fastjet/plugins/ATLASCone/JetConeFinderTool.$(ObjSuf) \
    12661181        tmp/external/fastjet/plugins/ATLASCone/JetSplitMergeTool.$(ObjSuf) \
    1267         tmp/external/fastjet/plugins/EECambridge/EECambridgePlugin.$(ObjSuf) \
    1268         tmp/external/fastjet/plugins/TrackJet/TrackJetPlugin.$(ObjSuf) \
     1182        tmp/external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.$(ObjSuf) \
     1183        tmp/external/fastjet/plugins/GridJet/GridJetPlugin.$(ObjSuf) \
     1184        tmp/external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.$(ObjSuf) \
     1185        tmp/external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.$(ObjSuf) \
     1186        tmp/external/fastjet/plugins/CDFCones/JetCluAlgorithm.$(ObjSuf) \
     1187        tmp/external/fastjet/plugins/CDFCones/MidPointAlgorithm.$(ObjSuf) \
     1188        tmp/external/fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf) \
     1189        tmp/external/fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf) \
     1190        tmp/external/fastjet/plugins/SISCone/area.$(ObjSuf) \
     1191        tmp/external/fastjet/plugins/SISCone/siscone.$(ObjSuf) \
     1192        tmp/external/fastjet/plugins/SISCone/vicinity.$(ObjSuf) \
     1193        tmp/external/fastjet/plugins/SISCone/geom_2d.$(ObjSuf) \
     1194        tmp/external/fastjet/plugins/SISCone/hash.$(ObjSuf) \
     1195        tmp/external/fastjet/plugins/SISCone/quadtree.$(ObjSuf) \
     1196        tmp/external/fastjet/plugins/SISCone/split_merge.$(ObjSuf) \
     1197        tmp/external/fastjet/plugins/SISCone/momentum.$(ObjSuf) \
     1198        tmp/external/fastjet/plugins/SISCone/ranlux.$(ObjSuf) \
     1199        tmp/external/fastjet/plugins/SISCone/reference.$(ObjSuf) \
     1200        tmp/external/fastjet/plugins/SISCone/SISConePlugin.$(ObjSuf) \
     1201        tmp/external/fastjet/plugins/SISCone/protocones.$(ObjSuf) \
     1202        tmp/external/fastjet/plugins/SISCone/siscone_error.$(ObjSuf) \
    12691203        tmp/external/fastjet/plugins/Jade/JadePlugin.$(ObjSuf) \
    12701204        tmp/external/fastjet/plugins/NestedDefs/NestedDefsPlugin.$(ObjSuf) \
    1271         tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf) \
     1205        tmp/external/fastjet/plugins/EECambridge/EECambridgePlugin.$(ObjSuf) \
     1206        tmp/external/fastjet/contribs/Nsubjettiness/MeasureFunction.$(ObjSuf) \
     1207        tmp/external/fastjet/contribs/Nsubjettiness/Njettiness.$(ObjSuf) \
    12721208        tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf) \
     1209        tmp/external/fastjet/contribs/Nsubjettiness/AxesFinder.$(ObjSuf) \
    12731210        tmp/external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.$(ObjSuf) \
    1274         tmp/external/fastjet/contribs/Nsubjettiness/AxesFinder.$(ObjSuf) \
    12751211        tmp/external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.$(ObjSuf) \
    1276         tmp/external/fastjet/contribs/Nsubjettiness/Njettiness.$(ObjSuf) \
    1277         tmp/external/fastjet/contribs/Nsubjettiness/NjettinessDefinition.$(ObjSuf) \
    1278         tmp/external/fastjet/contribs/Nsubjettiness/MeasureFunction.$(ObjSuf) \
     1212        tmp/external/Hector/H_HorizontalQuadrupole.$(ObjSuf) \
     1213        tmp/external/Hector/H_Aperture.$(ObjSuf) \
     1214        tmp/external/Hector/H_TransportMatrices.$(ObjSuf) \
     1215        tmp/external/Hector/H_RomanPot.$(ObjSuf) \
     1216        tmp/external/Hector/H_RecRPObject.$(ObjSuf) \
     1217        tmp/external/Hector/H_VerticalQuadrupole.$(ObjSuf) \
    12791218        tmp/external/Hector/H_OpticalElement.$(ObjSuf) \
     1219        tmp/external/Hector/H_RectangularAperture.$(ObjSuf) \
     1220        tmp/external/Hector/H_EllipticAperture.$(ObjSuf) \
     1221        tmp/external/Hector/H_BeamLineParser.$(ObjSuf) \
     1222        tmp/external/Hector/H_RectangularDipole.$(ObjSuf) \
     1223        tmp/external/Hector/H_Marker.$(ObjSuf) \
     1224        tmp/external/Hector/H_Kicker.$(ObjSuf) \
     1225        tmp/external/Hector/H_BeamLine.$(ObjSuf) \
     1226        tmp/external/Hector/H_Beam.$(ObjSuf) \
     1227        tmp/external/Hector/H_RectangularCollimator.$(ObjSuf) \
     1228        tmp/external/Hector/H_Parameters.$(ObjSuf) \
     1229        tmp/external/Hector/H_Drift.$(ObjSuf) \
    12801230        tmp/external/Hector/H_CircularAperture.$(ObjSuf) \
    1281         tmp/external/Hector/H_TransportMatrices.$(ObjSuf) \
     1231        tmp/external/Hector/H_VerticalKicker.$(ObjSuf) \
    12821232        tmp/external/Hector/H_SectorDipole.$(ObjSuf) \
     1233        tmp/external/Hector/H_HorizontalKicker.$(ObjSuf) \
    12831234        tmp/external/Hector/H_Dipole.$(ObjSuf) \
    12841235        tmp/external/Hector/H_AbstractBeamLine.$(ObjSuf) \
    1285         tmp/external/Hector/H_BeamLine.$(ObjSuf) \
    1286         tmp/external/Hector/H_RectEllipticAperture.$(ObjSuf) \
    1287         tmp/external/Hector/H_HorizontalKicker.$(ObjSuf) \
    1288         tmp/external/Hector/H_Kicker.$(ObjSuf) \
    1289         tmp/external/Hector/H_BeamLineParser.$(ObjSuf) \
    12901236        tmp/external/Hector/H_BeamParticle.$(ObjSuf) \
    1291         tmp/external/Hector/H_RectangularDipole.$(ObjSuf) \
    1292         tmp/external/Hector/H_VerticalQuadrupole.$(ObjSuf) \
    1293         tmp/external/Hector/H_Marker.$(ObjSuf) \
    1294         tmp/external/Hector/H_Beam.$(ObjSuf) \
    1295         tmp/external/Hector/H_EllipticAperture.$(ObjSuf) \
    1296         tmp/external/Hector/H_VerticalKicker.$(ObjSuf) \
    1297         tmp/external/Hector/H_HorizontalQuadrupole.$(ObjSuf) \
    1298         tmp/external/Hector/H_Parameters.$(ObjSuf) \
    1299         tmp/external/Hector/H_Drift.$(ObjSuf) \
    1300         tmp/external/Hector/H_RomanPot.$(ObjSuf) \
    1301         tmp/external/Hector/H_RecRPObject.$(ObjSuf) \
    1302         tmp/external/Hector/H_RectangularCollimator.$(ObjSuf) \
    1303         tmp/external/Hector/H_Aperture.$(ObjSuf) \
    1304         tmp/external/Hector/H_RectangularAperture.$(ObjSuf) \
    1305         tmp/external/Hector/H_Quadrupole.$(ObjSuf)
     1237        tmp/external/Hector/H_Quadrupole.$(ObjSuf) \
     1238        tmp/external/Hector/H_RectEllipticAperture.$(ObjSuf)
    13061239
    13071240ifeq ($(HAS_PYTHIA8),true)
     
    13161249        display/DelphesDisplay.$(SrcSuf) \
    13171250        display/DelphesDisplay.h
    1318 tmp/display/DelphesPlotSummary.$(ObjSuf): \
    1319         display/DelphesPlotSummary.$(SrcSuf) \
    1320         display/DelphesPlotSummary.h
    1321 tmp/display/DelphesBranchElement.$(ObjSuf): \
    1322         display/DelphesBranchElement.$(SrcSuf) \
    1323         display/DelphesBranchElement.h \
    1324         classes/DelphesClasses.h
    1325 tmp/display/Delphes3DGeometry.$(ObjSuf): \
    1326         display/Delphes3DGeometry.$(SrcSuf) \
    1327         display/Delphes3DGeometry.h \
    1328         external/ExRootAnalysis/ExRootConfReader.h \
    1329         classes/DelphesClasses.h
    1330 tmp/display/DelphesHtmlSummary.$(ObjSuf): \
    1331         display/DelphesHtmlSummary.$(SrcSuf) \
    1332         display/DelphesHtmlSummary.h
    1333 tmp/display/DelphesEventDisplay.$(ObjSuf): \
    1334         display/DelphesEventDisplay.$(SrcSuf) \
    1335         external/ExRootAnalysis/ExRootConfReader.h \
    1336         external/ExRootAnalysis/ExRootTreeReader.h \
    1337         display/DelphesCaloData.h \
    1338         display/DelphesBranchElement.h \
    1339         display/Delphes3DGeometry.h \
    1340         display/DelphesEventDisplay.h \
    1341         classes/DelphesClasses.h
    13421251DISPLAY_OBJ +=  \
    13431252        tmp/display/DelphesCaloData.$(ObjSuf) \
    1344         tmp/display/DelphesDisplay.$(ObjSuf) \
    1345         tmp/display/DelphesPlotSummary.$(ObjSuf) \
    1346         tmp/display/DelphesBranchElement.$(ObjSuf) \
    1347         tmp/display/Delphes3DGeometry.$(ObjSuf) \
    1348         tmp/display/DelphesHtmlSummary.$(ObjSuf) \
    1349         tmp/display/DelphesEventDisplay.$(ObjSuf)
     1253        tmp/display/DelphesDisplay.$(ObjSuf)
    13501254
    13511255ifeq ($(HAS_PYTHIA8),true)
     
    13541258endif
    13551259
     1260tmp/external/tcl/tclCmdMZ.$(ObjSuf): \
     1261        external/tcl/tclCmdMZ.c
     1262tmp/external/tcl/tclHistory.$(ObjSuf): \
     1263        external/tcl/tclHistory.c
     1264tmp/external/tcl/tclCmdAH.$(ObjSuf): \
     1265        external/tcl/tclCmdAH.c
     1266tmp/external/tcl/tclUtil.$(ObjSuf): \
     1267        external/tcl/tclUtil.c
    13561268tmp/external/tcl/tclListObj.$(ObjSuf): \
    13571269        external/tcl/tclListObj.c
     1270tmp/external/tcl/tclCmdIL.$(ObjSuf): \
     1271        external/tcl/tclCmdIL.c
     1272tmp/external/tcl/tclResolve.$(ObjSuf): \
     1273        external/tcl/tclResolve.c
    13581274tmp/external/tcl/tclHash.$(ObjSuf): \
    13591275        external/tcl/tclHash.c
    1360 tmp/external/tcl/tclResolve.$(ObjSuf): \
    1361         external/tcl/tclResolve.c
    1362 tmp/external/tcl/tclHistory.$(ObjSuf): \
    1363         external/tcl/tclHistory.c
     1276tmp/external/tcl/tclParse.$(ObjSuf): \
     1277        external/tcl/tclParse.c
     1278tmp/external/tcl/tclAlloc.$(ObjSuf): \
     1279        external/tcl/tclAlloc.c
     1280tmp/external/tcl/tclIndexObj.$(ObjSuf): \
     1281        external/tcl/tclIndexObj.c
     1282tmp/external/tcl/tclPosixStr.$(ObjSuf): \
     1283        external/tcl/tclPosixStr.c
     1284tmp/external/tcl/tclLink.$(ObjSuf): \
     1285        external/tcl/tclLink.c
     1286tmp/external/tcl/tclProc.$(ObjSuf): \
     1287        external/tcl/tclProc.c
     1288tmp/external/tcl/tclNamesp.$(ObjSuf): \
     1289        external/tcl/tclNamesp.c
     1290tmp/external/tcl/tclPreserve.$(ObjSuf): \
     1291        external/tcl/tclPreserve.c
     1292tmp/external/tcl/tclAsync.$(ObjSuf): \
     1293        external/tcl/tclAsync.c
     1294tmp/external/tcl/tclExecute.$(ObjSuf): \
     1295        external/tcl/tclExecute.c
     1296tmp/external/tcl/tclVar.$(ObjSuf): \
     1297        external/tcl/tclVar.c
     1298tmp/external/tcl/tclGet.$(ObjSuf): \
     1299        external/tcl/tclGet.c
     1300tmp/external/tcl/tclCompile.$(ObjSuf): \
     1301        external/tcl/tclCompile.c
    13641302tmp/external/tcl/tclCompExpr.$(ObjSuf): \
    13651303        external/tcl/tclCompExpr.c
    1366 tmp/external/tcl/tclAsync.$(ObjSuf): \
    1367         external/tcl/tclAsync.c
    1368 tmp/external/tcl/tclNamesp.$(ObjSuf): \
    1369         external/tcl/tclNamesp.c
    1370 tmp/external/tcl/tclVar.$(ObjSuf): \
    1371         external/tcl/tclVar.c
    1372 tmp/external/tcl/tclPreserve.$(ObjSuf): \
    1373         external/tcl/tclPreserve.c
    1374 tmp/external/tcl/tclGet.$(ObjSuf): \
    1375         external/tcl/tclGet.c
     1304tmp/external/tcl/tclCkalloc.$(ObjSuf): \
     1305        external/tcl/tclCkalloc.c
     1306tmp/external/tcl/panic.$(ObjSuf): \
     1307        external/tcl/panic.c
     1308tmp/external/tcl/tclObj.$(ObjSuf): \
     1309        external/tcl/tclObj.c
    13761310tmp/external/tcl/tclStringObj.$(ObjSuf): \
    13771311        external/tcl/tclStringObj.c
    13781312tmp/external/tcl/tclBasic.$(ObjSuf): \
    13791313        external/tcl/tclBasic.c
    1380 tmp/external/tcl/tclUtil.$(ObjSuf): \
    1381         external/tcl/tclUtil.c
    1382 tmp/external/tcl/tclObj.$(ObjSuf): \
    1383         external/tcl/tclObj.c
    1384 tmp/external/tcl/tclPosixStr.$(ObjSuf): \
    1385         external/tcl/tclPosixStr.c
    1386 tmp/external/tcl/tclCmdMZ.$(ObjSuf): \
    1387         external/tcl/tclCmdMZ.c
    1388 tmp/external/tcl/tclIndexObj.$(ObjSuf): \
    1389         external/tcl/tclIndexObj.c
    1390 tmp/external/tcl/tclCmdIL.$(ObjSuf): \
    1391         external/tcl/tclCmdIL.c
    1392 tmp/external/tcl/tclCmdAH.$(ObjSuf): \
    1393         external/tcl/tclCmdAH.c
    1394 tmp/external/tcl/tclLink.$(ObjSuf): \
    1395         external/tcl/tclLink.c
    1396 tmp/external/tcl/tclProc.$(ObjSuf): \
    1397         external/tcl/tclProc.c
    1398 tmp/external/tcl/tclCkalloc.$(ObjSuf): \
    1399         external/tcl/tclCkalloc.c
    1400 tmp/external/tcl/tclAlloc.$(ObjSuf): \
    1401         external/tcl/tclAlloc.c
    1402 tmp/external/tcl/tclCompile.$(ObjSuf): \
    1403         external/tcl/tclCompile.c
    1404 tmp/external/tcl/panic.$(ObjSuf): \
    1405         external/tcl/panic.c
    1406 tmp/external/tcl/tclParse.$(ObjSuf): \
    1407         external/tcl/tclParse.c
    1408 tmp/external/tcl/tclExecute.$(ObjSuf): \
    1409         external/tcl/tclExecute.c
    14101314TCL_OBJ +=  \
     1315        tmp/external/tcl/tclCmdMZ.$(ObjSuf) \
     1316        tmp/external/tcl/tclHistory.$(ObjSuf) \
     1317        tmp/external/tcl/tclCmdAH.$(ObjSuf) \
     1318        tmp/external/tcl/tclUtil.$(ObjSuf) \
    14111319        tmp/external/tcl/tclListObj.$(ObjSuf) \
     1320        tmp/external/tcl/tclCmdIL.$(ObjSuf) \
     1321        tmp/external/tcl/tclResolve.$(ObjSuf) \
    14121322        tmp/external/tcl/tclHash.$(ObjSuf) \
    1413         tmp/external/tcl/tclResolve.$(ObjSuf) \
    1414         tmp/external/tcl/tclHistory.$(ObjSuf) \
    1415         tmp/external/tcl/tclCompExpr.$(ObjSuf) \
    1416         tmp/external/tcl/tclAsync.$(ObjSuf) \
    1417         tmp/external/tcl/tclNamesp.$(ObjSuf) \
    1418         tmp/external/tcl/tclVar.$(ObjSuf) \
    1419         tmp/external/tcl/tclPreserve.$(ObjSuf) \
    1420         tmp/external/tcl/tclGet.$(ObjSuf) \
    1421         tmp/external/tcl/tclStringObj.$(ObjSuf) \
    1422         tmp/external/tcl/tclBasic.$(ObjSuf) \
    1423         tmp/external/tcl/tclUtil.$(ObjSuf) \
    1424         tmp/external/tcl/tclObj.$(ObjSuf) \
     1323        tmp/external/tcl/tclParse.$(ObjSuf) \
     1324        tmp/external/tcl/tclAlloc.$(ObjSuf) \
     1325        tmp/external/tcl/tclIndexObj.$(ObjSuf) \
    14251326        tmp/external/tcl/tclPosixStr.$(ObjSuf) \
    1426         tmp/external/tcl/tclCmdMZ.$(ObjSuf) \
    1427         tmp/external/tcl/tclIndexObj.$(ObjSuf) \
    1428         tmp/external/tcl/tclCmdIL.$(ObjSuf) \
    1429         tmp/external/tcl/tclCmdAH.$(ObjSuf) \
    14301327        tmp/external/tcl/tclLink.$(ObjSuf) \
    14311328        tmp/external/tcl/tclProc.$(ObjSuf) \
     1329        tmp/external/tcl/tclNamesp.$(ObjSuf) \
     1330        tmp/external/tcl/tclPreserve.$(ObjSuf) \
     1331        tmp/external/tcl/tclAsync.$(ObjSuf) \
     1332        tmp/external/tcl/tclExecute.$(ObjSuf) \
     1333        tmp/external/tcl/tclVar.$(ObjSuf) \
     1334        tmp/external/tcl/tclGet.$(ObjSuf) \
     1335        tmp/external/tcl/tclCompile.$(ObjSuf) \
     1336        tmp/external/tcl/tclCompExpr.$(ObjSuf) \
    14321337        tmp/external/tcl/tclCkalloc.$(ObjSuf) \
    1433         tmp/external/tcl/tclAlloc.$(ObjSuf) \
    1434         tmp/external/tcl/tclCompile.$(ObjSuf) \
    14351338        tmp/external/tcl/panic.$(ObjSuf) \
    1436         tmp/external/tcl/tclParse.$(ObjSuf) \
    1437         tmp/external/tcl/tclExecute.$(ObjSuf)
     1339        tmp/external/tcl/tclObj.$(ObjSuf) \
     1340        tmp/external/tcl/tclStringObj.$(ObjSuf) \
     1341        tmp/external/tcl/tclBasic.$(ObjSuf)
    14381342
    14391343external/fastjet/internal/ClosestPair2D.hh: \
     
    14531357        @touch $@
    14541358
    1455 modules/FastJetGridMedianEstimator.h: \
    1456         classes/DelphesModule.h
    1457         @touch $@
    1458 
    14591359external/fastjet/internal/MinHeap.hh: \
    14601360        external/fastjet/internal/base.hh
     
    14821382external/fastjet/JetDefinition.hh: \
    14831383        external/fastjet/internal/numconsts.hh \
    1484         external/fastjet/PseudoJet.hh \
    1485         external/fastjet/ClusterSequence.hh
     1384        external/fastjet/PseudoJet.hh
    14861385        @touch $@
    14871386
     
    15021401        @touch $@
    15031402
     1403modules/Isolation.h: \
     1404        classes/DelphesModule.h
     1405        @touch $@
     1406
     1407modules/EnergyScale.h: \
     1408        classes/DelphesModule.h
     1409        @touch $@
     1410
     1411modules/Merger.h: \
     1412        classes/DelphesModule.h
     1413        @touch $@
     1414
    15041415modules/ExampleModule.h: \
    1505         classes/DelphesModule.h
    1506         @touch $@
    1507 
    1508 modules/Isolation.h: \
    1509         classes/DelphesModule.h
    1510         @touch $@
    1511 
    1512 modules/EnergyScale.h: \
    1513         classes/DelphesModule.h
    1514         @touch $@
    1515 
    1516 modules/Merger.h: \
    15171416        classes/DelphesModule.h
    15181417        @touch $@
     
    15331432        @touch $@
    15341433
    1535 external/fastjet/internal/LazyTiling25.hh: \
    1536         external/fastjet/internal/MinHeap.hh \
    1537         external/fastjet/ClusterSequence.hh \
    1538         external/fastjet/internal/LazyTiling9Alt.hh \
    1539         external/fastjet/internal/LazyTiling9.hh
    1540         @touch $@
    1541 
    15421434external/fastjet/Error.hh: \
    1543         external/fastjet/internal/base.hh \
    1544         external/fastjet/config.h \
    1545         external/fastjet/LimitedWarning.hh
     1435        external/fastjet/internal/base.hh
    15461436        @touch $@
    15471437
    15481438external/fastjet/contribs/Nsubjettiness/Njettiness.hh: \
    1549         external/fastjet/PseudoJet.hh \
    1550         external/fastjet/SharedPtr.hh
    1551         @touch $@
    1552 
    1553 external/fastjet/internal/TilingExtent.hh: \
    1554         external/fastjet/ClusterSequence.hh
     1439        external/fastjet/PseudoJet.hh
    15551440        @touch $@
    15561441
     
    15611446modules/TrackPileUpSubtractor.h: \
    15621447        classes/DelphesModule.h
     1448        @touch $@
     1449
     1450external/fastjet/tools/GridMedianBackgroundEstimator.hh: \
     1451        external/fastjet/tools/BackgroundEstimatorBase.hh
    15631452        @touch $@
    15641453
     
    15661455        external/fastjet/internal/Triangulation.hh \
    15671456        external/fastjet/internal/DynamicNearestNeighbours.hh
    1568         @touch $@
    1569 
    1570 external/fastjet/tools/GridMedianBackgroundEstimator.hh: \
    1571         external/fastjet/tools/BackgroundEstimatorBase.hh \
    1572         external/fastjet/RectangularGrid.hh
    15731457        @touch $@
    15741458
     
    15881472        @touch $@
    15891473
    1590 external/fastjet/internal/LazyTiling9Alt.hh: \
    1591         external/fastjet/internal/MinHeap.hh \
    1592         external/fastjet/ClusterSequence.hh
    1593         @touch $@
    1594 
    1595 external/fastjet/RectangularGrid.hh: \
    1596         external/fastjet/PseudoJet.hh \
    1597         external/fastjet/Selector.hh
    1598         @touch $@
    1599 
    16001474modules/PileUpMerger.h: \
    16011475        classes/DelphesModule.h
    16021476        @touch $@
    16031477
    1604 display/DelphesBranchElement.h: \
    1605         display/DelphesCaloData.h
    1606         @touch $@
    1607 
    16081478external/fastjet/internal/DynamicNearestNeighbours.hh: \
    1609         external/fastjet/internal/numconsts.hh \
    1610         external/fastjet/Error.hh
     1479        external/fastjet/internal/numconsts.hh
    16111480        @touch $@
    16121481
     
    16341503        @touch $@
    16351504
    1636 external/fastjet/internal/LazyTiling9.hh: \
    1637         external/fastjet/internal/MinHeap.hh \
    1638         external/fastjet/ClusterSequence.hh \
    1639         external/fastjet/internal/LazyTiling9Alt.hh
    1640         @touch $@
    1641 
    16421505modules/PileUpJetID.h: \
    16431506        classes/DelphesModule.h
     
    16501513modules/MomentumSmearing.h: \
    16511514        classes/DelphesModule.h
    1652         @touch $@
    1653 
    1654 display/DelphesEventDisplay.h: \
    1655         external/ExRootAnalysis/ExRootTreeReader.h \
    1656         display/DelphesDisplay.h \
    1657         display/Delphes3DGeometry.h \
    1658         display/DelphesHtmlSummary.h \
    1659         display/DelphesPlotSummary.h
    16601515        @touch $@
    16611516
     
    17031558        @touch $@
    17041559
    1705 modules/PdgCodeFilter.h: \
    1706         classes/DelphesModule.h
    1707         @touch $@
    1708 
    17091560external/fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh: \
    17101561        external/fastjet/JetDefinition.hh
     
    17171568        @touch $@
    17181569
    1719 external/fastjet/PseudoJetStructureBase.hh: \
    1720         external/fastjet/internal/base.hh
    1721         @touch $@
    1722 
    17231570external/fastjet/ClusterSequenceAreaBase.hh: \
    17241571        external/fastjet/ClusterSequence.hh \
     
    17271574        @touch $@
    17281575
     1576external/fastjet/PseudoJetStructureBase.hh: \
     1577        external/fastjet/internal/base.hh
     1578        @touch $@
     1579
    17291580external/fastjet/ClusterSequenceVoronoiArea.hh: \
    17301581        external/fastjet/PseudoJet.hh \
     
    17501601        @touch $@
    17511602
    1752 display/DelphesPlotSummary.h: \
    1753         external/ExRootAnalysis/ExRootTreeReader.h
    1754         @touch $@
    1755 
    17561603modules/Weighter.h: \
    17571604        classes/DelphesModule.h
     
    17761623
    17771624external/fastjet/tools/Subtractor.hh: \
    1778         external/fastjet/internal/base.hh \
    17791625        external/fastjet/tools/Transformer.hh \
    17801626        external/fastjet/tools/BackgroundEstimatorBase.hh
    1781         @touch $@
    1782 
    1783 external/fastjet/internal/LazyTiling9SeparateGhosts.hh: \
    1784         external/fastjet/internal/MinHeap.hh \
    1785         external/fastjet/ClusterSequence.hh \
    1786         external/fastjet/internal/LazyTiling9Alt.hh
    1787         @touch $@
    1788 
    1789 external/fastjet/AreaDefinition.hh: \
    1790         external/fastjet/GhostedAreaSpec.hh
    17911627        @touch $@
    17921628
     
    17971633        @touch $@
    17981634
     1635external/fastjet/AreaDefinition.hh: \
     1636        external/fastjet/GhostedAreaSpec.hh
     1637        @touch $@
     1638
    17991639modules/TimeSmearing.h: \
    18001640        classes/DelphesModule.h
     
    18191659        @touch $@
    18201660
     1661external/fastjet/config.h: \
     1662        external/fastjet/config_win.h
     1663        @touch $@
     1664
    18211665external/fastjet/LimitedWarning.hh: \
    18221666        external/fastjet/internal/base.hh
    1823         @touch $@
    1824 
    1825 external/fastjet/config.h: \
    1826         external/fastjet/config_win.h
    18271667        @touch $@
    18281668
  • README

    r37deb3b rba7fc1e  
    137137or
    138138
    139    root -l examples/Example1.C'("delphes_output.root")'
     139   root -l examples/Example1.C\(\"delphes_output.root\"\)
  • README.md

    r37deb3b rba7fc1e  
    1 Quick start with Delphes
    2 ========================
     1delphes
     2=======
    33
    4 Commands to get the code:
    5 
    6 ```
    7 wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.1.2.tar.gz
    8 
    9 tar -zxf Delphes-3.1.2.tar.gz
    10 ```
    11 
    12 Commands to compile the code:
    13 
    14 ```
    15 cd Delphes-3.1.2
    16 
    17 make
    18 ```
    19 
    20 Finally, we can run Delphes:
    21 
    22 ```
    23 ./DelphesHepMC
    24 ```
    25 
    26 Command line parameters:
    27 
    28 ```
    29 ./DelphesHepMC config_file output_file [input_file(s)]
    30   config_file - configuration file in Tcl format
    31   output_file - output file in ROOT format,
    32   input_file(s) - input file(s) in HepMC format,
    33   with no input_file, or when input_file is -, read standard input.
    34 ```
    35 
    36 Let's simulate some Z->ee events:
    37 
    38 ```
    39 wget http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz
    40 gunzip z_ee.hep.gz
    41 ./DelphesSTDHEP examples/delphes_card_CMS.tcl delphes_output.root z_ee.hep
    42 ```
    43 
    44 or
    45 
    46 ```
    47 curl -s http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz | gunzip | ./DelphesSTDHEP examples/delphes_card_CMS.tcl delphes_output.root
    48 ```
    49 
    50 For more detailed documentation, please visit
    51 
    52 https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook
    53 
    54 
    55 Simple analysis using TTree::Draw
    56 =================================
    57 
    58 Now we can start ROOT and look at the data stored in the output ROOT file.
    59 
    60 Start ROOT and load Delphes shared library:
    61 
    62 ```
    63 root -l
    64 gSystem->Load("libDelphes");
    65 ```
    66 
    67 Open ROOT file and do some basic analysis using Draw or TBrowser:
    68 
    69 ```
    70 TFile::Open("delphes_output.root");
    71 Delphes->Draw("Electron.PT");
    72 TBrowser browser;
    73 ```
    74 
    75 Note 1: Delphes - tree name, it can be learned e.g. from TBrowser
    76 
    77 Note 2: Electron - branch name; PT - variable (leaf) of this branch
    78 
    79 Complete description of all branches can be found in
    80 
    81 doc/RootTreeDescription.html
    82 
    83 This information is also available at
    84 
    85 https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/RootTreeDescription
    86 
    87 
    88 Macro-based analysis
    89 ====================
    90 
    91 Analysis macro consists of histogram booking, event loop (histogram filling),
    92 histogram display.
    93 
    94 Start ROOT and load Delphes shared library:
    95 
    96 ```
    97 root -l
    98 gSystem->Load("libDelphes");
    99 ```
    100 
    101 Basic analysis macro:
    102 
    103 ```
    104 {
    105   // Create chain of root trees
    106   TChain chain("Delphes");
    107   chain.Add("delphes_output.root");
    108  
    109   // Create object of class ExRootTreeReader
    110   ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
    111   Long64_t numberOfEntries = treeReader->GetEntries();
    112  
    113   // Get pointers to branches used in this analysis
    114   TClonesArray *branchElectron = treeReader->UseBranch("Electron");
    115 
    116   // Book histograms
    117   TH1 *histElectronPT = new TH1F("electron pt", "electron P_{T}", 50, 0.0, 100.0);
    118 
    119   // Loop over all events
    120   for(Int_t entry = 0; entry < numberOfEntries; ++entry)
    121   {
    122 
    123     // Load selected branches with data from specified event
    124     treeReader->ReadEntry(entry);
    125  
    126     // If event contains at least 1 electron
    127     if(branchElectron->GetEntries() > 0)
    128     {
    129       // Take first electron
    130       Electron *electron = (Electron*) branchElectron->At(0);
    131      
    132       // Plot electron transverse momentum
    133       histElectronPT->Fill(electron->PT);
    134      
    135       // Print electron transverse momentum
    136       cout << electron->PT << endl;
    137     }
    138 
    139   }
    140 
    141   // Show resulting histograms
    142   histElectronPT->Draw();
    143 }
    144 ```
    145 
    146 
    147 More advanced macro-based analysis
    148 ==================================
    149 
    150 The 'examples' directory contains ROOT macros Example1.C, Example2.C and Example3.C.
    151 
    152 Here are the commands to run these ROOT macros:
    153 
    154 ```
    155 root -l
    156 .X examples/Example1.C("delphes_output.root");
    157 ```
    158 
    159 or
    160 
    161 ```
    162 root -l examples/Example1.C'("delphes_output.root")'
    163 ```
     4A framework for fast simulation of a generic collider experiment
  • classes/ClassesLinkDef.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** ExRootAnalysisLinkDef
  • classes/DelphesClasses.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/**
  • classes/DelphesClasses.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesClasses_h
    202#define DelphesClasses_h
  • classes/DelphesFactory.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class DelphesFactory
  • classes/DelphesFactory.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesFactory_h
    202#define DelphesFactory_h
     
    6749  ExRootTreeBranch *fObjArrays; //!
    6850
    69 #if !defined(__CINT__) && !defined(__CLING__)
    7051  std::map< const TClass*, ExRootTreeBranch* > fBranches; //!
    71 #endif
    72 
    7352  std::set< TObject* > fPool; //!
    7453 
  • classes/DelphesFormula.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202#include "classes/DelphesFormula.h"
  • classes/DelphesFormula.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesFormula_h
    202#define DelphesFormula_h
  • classes/DelphesHepMCReader.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class DelphesHepMCReader
  • classes/DelphesHepMCReader.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesHepMCReader_h
    202#define DelphesHepMCReader_h
  • classes/DelphesLHEFReader.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class DelphesLHEFReader
  • classes/DelphesLHEFReader.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesLHEFReader_h
    202#define DelphesLHEFReader_h
  • classes/DelphesModule.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class DelphesModule
  • classes/DelphesModule.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesModule_h
    202#define DelphesModule_h
  • classes/DelphesPileUpReader.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class DelphesPileUpReader
  • classes/DelphesPileUpReader.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesPileUpReader_h
    202#define DelphesPileUpReader_h
  • classes/DelphesPileUpWriter.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class DelphesPileUpWriter
  • classes/DelphesPileUpWriter.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesPileUpWriter_h
    202#define DelphesPileUpWriter_h
  • classes/DelphesSTDHEPReader.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class DelphesSTDHEPReader
     
    404386  u_int number;
    405387
     388  // version
     389  xdr_string(fInputXDR, &fBuffer, 100);
     390
    406391  // Extracting the event weight
    407392  xdr_double(fInputXDR, &fWeight);
  • classes/DelphesSTDHEPReader.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesSTDHEPReader_h
    202#define DelphesSTDHEPReader_h
  • classes/DelphesStream.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class DelphesStream
  • classes/DelphesStream.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesStream_h
    202#define DelphesStream_h
  • classes/DelphesTF2.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include "classes/DelphesTF2.h"
    202#include "TString.h"
  • classes/DelphesTF2.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesTF2_h
    202#define DelphesTF2_h
  • classes/SortableObject.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef SortableObject_h
    202#define SortableObject_h
     
    4325public:
    4426  virtual ~CompBase() { }
    45   virtual Bool_t IsSortable(const TObject *) const { return kTRUE; }
     27  virtual Bool_t IsSortable(const TObject *obj) const { return kTRUE; }
    4628  virtual Int_t Compare(const TObject *obj1, const TObject *obj2) const = 0;
    4729};
  • converters/hepmc2pileup.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
  • converters/lhco2root.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
  • converters/pileup2root.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202#include <stdexcept>
  • converters/root2lhco.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
  • converters/root2pileup.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
  • converters/stdhep2pileup.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
  • display/DelphesCaloData.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202#include "display/DelphesCaloData.h"
  • display/DelphesCaloData.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesCaloData_h
    202#define DelphesCaloData_h
  • display/DelphesDisplay.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202#include "TEveManager.h"
  • display/DelphesDisplay.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef DelphesDisplay_h
    202#define DelphesDisplay_h
  • display/DisplayLinkDef.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** ExRootAnalysisLinkDef
     
    3214#include "display/DelphesDisplay.h"
    3315#include "display/DelphesCaloData.h"
    34 #include "display/DelphesBranchElement.h"
    35 #include "display/Delphes3DGeometry.h"
    36 #include "display/DelphesEventDisplay.h"
    37 #include "display/DelphesHtmlSummary.h"
    38 #include "display/DelphesPlotSummary.h"
    3916
    4017#ifdef __CINT__
     
    4623#pragma link C++ class DelphesDisplay+;
    4724#pragma link C++ class DelphesCaloData+;
    48 #pragma link C++ class DelphesBranchElement<DelphesCaloData>-!;
    49 #pragma link C++ class DelphesBranchElement<TEveElementList>-!;
    50 #pragma link C++ class DelphesBranchElement<TEveTrackList>-!;
    51 #pragma link C++ class Delphes3DGeometry;
    52 #pragma link C++ class DelphesEventDisplay;
    53 #pragma link C++ class DelphesHtmlObjTable;
    54 #pragma link C++ class DelphesHtmlSummary;
    55 #pragma link C++ class DelphesPlotSummary;
    5625
    5726#endif
  • doc/genMakefile.tcl

    r37deb3b rba7fc1e  
    208208CXXFLAGS += $(ROOTCFLAGS) -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DDROP_CGAL -I. -Iexternal -Iexternal/tcl
    209209DELPHES_LIBS = $(shell $(RC) --libs) -lEG $(SYSLIBS)
    210 DISPLAY_LIBS = $(shell $(RC) --evelibs) -lGuiHtml  $(SYSLIBS)
     210DISPLAY_LIBS = $(shell $(RC) --evelibs) $(SYSLIBS)
    211211
    212212ifneq ($(CMSSW_FWLITE_INCLUDE_PATH),)
    213213HAS_CMSSW = true
    214214CXXFLAGS += -std=c++0x -I$(subst :, -I,$(CMSSW_FWLITE_INCLUDE_PATH))
    215 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(CMSSW_FWLITE_INCLUDE_PATH)))
     215DELPHES_LIBS += -L$(subst include,lib,$(subst :, -L,$(CMSSW_FWLITE_INCLUDE_PATH)))
    216216ifneq ($(CMSSW_RELEASE_BASE),)
    217217CXXFLAGS += -I$(CMSSW_RELEASE_BASE)/src
    218218endif
    219219ifneq ($(LD_LIBRARY_PATH),)
    220 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
    221 endif
    222 OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
     220DELPHES_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
     221endif
     222DELPHES_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
    223223endif
    224224
    225225ifneq ($(PROMC),)
    226226HAS_PROMC = true
    227 CXXFLAGS += -I$(PROMC)/include -I$(PROMC)/src
    228 OPT_LIBS += -L$(PROMC)/lib -lpromc -lprotoc -lprotobuf -lprotobuf-lite -lcbook -lz
     227CXXFLAGS += -I$(PROMC)/include
     228DELPHES_LIBS += -L$(PROMC)/lib -lprotoc -lprotobuf -lprotobuf-lite -lcbook -lz
    229229endif
    230230
     
    232232HAS_PYTHIA8 = true
    233233CXXFLAGS += -I$(PYTHIA8)/include
    234 OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -lLHAPDF -lgfortran -lz
     234DELPHES_LIBS += -L$(PYTHIA8)/lib -lpythia8 -lLHAPDF -lgfortran -lz
    235235else
    236236ifneq ($(PYTHIA8DATA),)
    237237HAS_PYTHIA8 = true
    238238CXXFLAGS += -I$(PYTHIA8DATA)/../include
    239 OPT_LIBS += -L$(PYTHIA8DATA)/../lib -lpythia8 -lLHAPDF -lgfortran -lz
    240 endif
    241 endif
    242 
    243 DELPHES_LIBS += $(OPT_LIBS)
    244 DISPLAY_LIBS += $(OPT_LIBS)
     239DELPHES_LIBS += -L$(PYTHIA8DATA)/../lib -lpythia8 -lLHAPDF -lgfortran -lz
     240endif
     241endif
    245242
    246243###
     
    271268puts {ifeq ($(HAS_PROMC),true)}
    272269executableDeps {readers/DelphesProMC.cpp}
     270sourceDeps {DELPHES} {external/ProMC/*.cc}
    273271puts {endif}
    274272puts {}
  • doc/update_fastjet.sh

    r37deb3b rba7fc1e  
    1 version=3.1.0
     1version=3.0.6
    22
    33#wget http://fastjet.fr/repo/fastjet-${version}.tar.gz
     
    9090cp -a ../../fastjet-${version}/plugins/TrackJet/fastjet/*.hh TrackJet/fastjet
    9191
    92 sed -i 's/#include "fastjet\//#include "/' D0RunICone/fastjet/D0RunIpre96ConePlugin.hh
    93 sed -i 's/#include "fastjet\//#include "/' D0RunICone/fastjet/D0RunIConePlugin.hh
    94 
    95 sed -i 's/#include "siscone\//#include "/' SISCone/SISConePlugin.cc
    96 
    9792cd -
  • examples/EventDisplay.C

    r37deb3b rba7fc1e  
    1 /* Example:
    2  * root -l 'EventDisplay.C("delphes_card_CMS.tcl","../delphes_output.root")'
    3  * root -l 'EventDisplay.C("delphes_card_FCC_basic.tcl","../delphes_output.root","ParticlePropagator","ChargedHadronTrackingEfficiency","MuonTrackingEfficiency","Ecal,Hcal")'
    4  */
    5 
    6 void EventDisplay(const char* configfile = "delphes_card_CMS.tcl", const char* datafile = "delphes_output.root",
    7                   const char* ParticlePropagator="ParticlePropagator",
    8                   const char* TrackingEfficiency="ChargedHadronTrackingEfficiency",
    9                   const char* MuonEfficiency="MuonEfficiency",
    10                   const char* Calorimeters="Calorimeter",
    11                   bool displayGeometryOnly = false)
     1/*
     2root -l examples/EventDisplay.C\(\"examples/delphes_card_CMS.tcl\",\"delphes_output.root\"\)
     3ShowEvent(1);
     4ShowEvent(2);
     5*/
     6
     7//------------------------------------------------------------------------------
     8
     9// radius of the barrel, in m
     10Double_t gRadius = 1.29;
     11
     12// half-length of the barrel, in m
     13Double_t gHalfLength = 3.0;
     14
     15// magnetic field
     16Double_t gBz = 3.8;
     17
     18TAxis *gEtaAxis = 0;
     19TAxis *gPhiAxis = 0;
     20
     21//------------------------------------------------------------------------------
     22
     23#include <set>
     24#include <vector>
     25
     26using namespace std;
     27
     28class ExRootTreeReader;
     29class DelphesCaloData;
     30class DelphesDisplay;
     31
     32TChain gChain("Delphes");
     33
     34ExRootTreeReader *gTreeReader = 0;
     35
     36TClonesArray *gBranchTower = 0;
     37TClonesArray *gBranchTrack = 0;
     38TClonesArray *gBranchJet = 0;
     39
     40DelphesCaloData *gCaloData = 0;
     41TEveElementList *gJetList = 0;
     42TEveTrackList *gTrackList = 0;
     43
     44DelphesDisplay *gDelphesDisplay = 0;
     45
     46//------------------------------------------------------------------------------
     47
     48void EventDisplay(const char *configFile, const char *inputFile)
    1249{
    13    // load the libraries
    14    gSystem->Load("libGeom");
    15    gSystem->Load("libGuiHtml");
    16    gSystem->Load("../libDelphesDisplay");
    17 
    18    if(displayGeometryOnly) {
    19      // create the detector representation without transparency
    20      Delphes3DGeometry det3D_geom(new TGeoManager("delphes", "Delphes geometry"), false);
    21      det3D_geom.readFile(configfile, ParticlePropagator, TrackingEfficiency, MuonEfficiency, Calorimeters);
    22 
    23      // display
    24      det3D_geom.getDetector()->Draw("ogl");
    25 
    26    } else {
    27 
    28      // create the detector representation
    29      Delphes3DGeometry det3D(new TGeoManager("delphes", "Delphes geometry"), true);
    30      det3D.readFile(configfile, ParticlePropagator, TrackingEfficiency, MuonEfficiency, Calorimeters);
    31 
    32      // create the application
    33      DelphesEventDisplay* display = new DelphesEventDisplay(configfile, datafile, det3D);
    34 
    35    }
     50  gSystem->Load("libDelphesDisplay");
     51
     52  TEveManager::Create(kTRUE, "IV");
     53
     54  ExRootConfParam param, paramEtaBins;
     55  Long_t i, j, size, sizeEtaBins;
     56  set< Double_t > etaSet;
     57  set< Double_t >::iterator itEtaSet;
     58
     59  Double_t *etaBins;
     60
     61  ExRootConfReader *confReader = new ExRootConfReader;
     62  confReader->ReadFile(configFile);
     63
     64  gRadius = confReader->GetDouble("ParticlePropagator::Radius", 1.0);
     65  gHalfLength = confReader->GetDouble("ParticlePropagator::HalfLength", 3.0);
     66  gBz = confReader->GetDouble("ParticlePropagator::Bz", 0.0);
     67
     68  // read eta and phi bins
     69  param = confReader->GetParam("Calorimeter::EtaPhiBins");
     70  size = param.GetSize();
     71  etaSet.clear();
     72  for(i = 0; i < size/2; ++i)
     73  {
     74    paramEtaBins = param[i*2];
     75    sizeEtaBins = paramEtaBins.GetSize();
     76
     77    for(j = 0; j < sizeEtaBins; ++j)
     78    {
     79      etaSet.insert(paramEtaBins[j].GetDouble());
     80    }
     81  }
     82
     83  delete confReader;
     84
     85  etaBins = new Double_t[etaSet.size()];
     86  i = 0;
     87
     88  for(itEtaSet = etaSet.begin(); itEtaSet != etaSet.end(); ++itEtaSet)
     89  {
     90    etaBins[i] = *itEtaSet;
     91    ++i;
     92  }
     93
     94  gEtaAxis = new TAxis(etaSet.size() - 1, etaBins);
     95  gPhiAxis = new TAxis(72, -TMath::Pi(), TMath::Pi());
     96
     97  // Create chain of root trees
     98  gChain.Add(inputFile);
     99
     100  // Create object of class ExRootTreeReader
     101  gTreeReader = new ExRootTreeReader(&gChain);
     102
     103  // Get pointers to branches
     104  gBranchTower = gTreeReader->UseBranch("Tower");
     105  gBranchTrack = gTreeReader->UseBranch("Track");
     106  gBranchJet = gTreeReader->UseBranch("Jet");
     107
     108  // data
     109  gCaloData = new DelphesCaloData(2);
     110  gCaloData->RefSliceInfo(0).Setup("ECAL", 0.1, kRed);
     111  gCaloData->RefSliceInfo(1).Setup("HCAL", 0.1, kBlue);
     112  gCaloData->SetEtaBins(gEtaAxis);
     113  gCaloData->SetPhiBins(gPhiAxis);
     114  gCaloData->IncDenyDestroy();
     115
     116  gJetList = new TEveElementList("Jets");
     117  gEve->AddElement(gJetList);
     118
     119  gTrackList = new TEveTrackList("Tracks");
     120  gTrackList->SetMainColor(kBlue);
     121  gTrackList->SetMarkerColor(kRed);
     122  gTrackList->SetMarkerStyle(kCircle);
     123  gTrackList->SetMarkerSize(0.5);
     124  gEve->AddElement(gTrackList);
     125
     126  TEveTrackPropagator *trkProp = gTrackList->GetPropagator();
     127  trkProp->SetMagField(0.0, 0.0, -gBz);
     128  trkProp->SetMaxR(gRadius*100.0);
     129  trkProp->SetMaxZ(gHalfLength*100.0);
     130
     131  // viewers and scenes
     132
     133  TEveElementList *geometry = new TEveElementList("Geometry");
     134
     135  TEveGeoShape *barell = new TEveGeoShape("Barell");
     136  barell->SetShape(new TGeoTube(gRadius*100.0 - 1, gRadius*100.0, gHalfLength*100.0));
     137  barell->SetMainColor(kCyan);
     138  barell->SetMainTransparency(80);
     139  geometry->AddElement(barell);
     140
     141  TEveCalo3D *calo = new TEveCalo3D(gCaloData);
     142  calo->SetBarrelRadius(gRadius*100.0);
     143  calo->SetEndCapPos(gHalfLength*100.0);
     144
     145  gStyle->SetPalette(1, 0);
     146  TEveCaloLego *lego = new TEveCaloLego(gCaloData);
     147  lego->InitMainTrans();
     148  lego->RefMainTrans().SetScale(TMath::TwoPi(), TMath::TwoPi(), TMath::Pi());
     149  lego->SetAutoRebin(kFALSE);
     150  lego->Set2DMode(TEveCaloLego::kValSizeOutline);
     151
     152  gDelphesDisplay = new DelphesDisplay;
     153
     154  gEve->AddGlobalElement(geometry);
     155  gEve->AddGlobalElement(calo);
     156
     157  gDelphesDisplay->ImportGeomRPhi(geometry);
     158  gDelphesDisplay->ImportCaloRPhi(calo);
     159
     160  gDelphesDisplay->ImportGeomRhoZ(geometry);
     161  gDelphesDisplay->ImportCaloRhoZ(calo);
     162
     163  gDelphesDisplay->ImportCaloLego(lego);
     164
     165  gEve->Redraw3D(kTRUE);
    36166}
    37167
     168//------------------------------------------------------------------------------
     169
     170void ShowEvent(Long64_t event)
     171{
     172  TIter itTower(gBranchTower);
     173  TIter itTrack(gBranchTrack);
     174  TIter itJet(gBranchJet);
     175
     176  Tower *tower;
     177  Track *track;
     178  Jet *jet;
     179
     180  TEveJetCone *eveJetCone;
     181  TEveTrack *eveTrack;
     182
     183  Int_t counter;
     184
     185  TEveElement *currentEvent = gEve->GetCurrentEvent();
     186
     187  TEveTrackPropagator *trkProp = gTrackList->GetPropagator();
     188
     189  if(event >= gTreeReader->GetEntries()) return;
     190
     191  // Load selected branches with data from specified event
     192  gTreeReader->ReadEntry(event);
     193
     194  gCaloData->ClearTowers();
     195  gJetList->DestroyElements();
     196  gTrackList->DestroyElements();
     197
     198  // Loop over all towers
     199  itTower.Reset();
     200  while((tower = (Tower *) itTower.Next()))
     201  {
     202    gCaloData->AddTower(tower->Edges[0], tower->Edges[1], tower->Edges[2], tower->Edges[3]);
     203    gCaloData->FillSlice(0, tower->Eem);
     204    gCaloData->FillSlice(1, tower->Ehad);
     205  }
     206  gCaloData->DataChanged();
     207
     208  // Loop over all tracks
     209  itTrack.Reset();
     210  counter = 0;
     211  while((track = (Track *) itTrack.Next()))
     212  {
     213    TParticle pb(track->PID, 1, 0, 0, 0, 0,
     214                 track->P4().Px(), track->P4().Py(),
     215                 track->P4().Pz(), track->P4().E(),
     216                 track->X, track->Y, track->Z, 0.0);
     217
     218    eveTrack = new TEveTrack(&pb, counter, trkProp);
     219    eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     220    eveTrack->SetStdTitle();
     221    eveTrack->SetAttLineAttMarker(gTrackList);
     222
     223    switch(TMath::Abs(track->PID))
     224    {
     225      case 11:
     226        eveTrack->SetLineColor(kRed);
     227        break;
     228      case 13:
     229        eveTrack->SetLineColor(kGreen);
     230        break;
     231      default:
     232        eveTrack->SetLineColor(kBlue);
     233    }
     234    gTrackList->AddElement(eveTrack);
     235    eveTrack->MakeTrack();
     236  }
     237
     238  // Loop over all jets
     239  itJet.Reset();
     240  counter = 0;
     241  while((jet = (Jet *) itJet.Next()))
     242  {
     243    eveJetCone = new TEveJetCone();
     244    eveJetCone->SetName(Form("jet [%d]", counter++));
     245    eveJetCone->SetMainTransparency(60);
     246    eveJetCone->SetLineColor(kYellow);
     247    eveJetCone->SetCylinder(gRadius*100.0 - 10, gHalfLength*100.0 - 10);
     248    eveJetCone->SetPickable(kTRUE);
     249    eveJetCone->AddEllipticCone(jet->Eta, jet->Phi, jet->DeltaEta, jet->DeltaPhi);
     250    gJetList->AddElement(eveJetCone);
     251  }
     252
     253  gDelphesDisplay->DestroyEventRPhi();
     254  gDelphesDisplay->ImportEventRPhi(currentEvent);
     255
     256  gDelphesDisplay->DestroyEventRhoZ();
     257  gDelphesDisplay->ImportEventRhoZ(currentEvent);
     258
     259  gEve->Redraw3D(kTRUE);
     260}
  • examples/Example1.C

    r37deb3b rba7fc1e  
    11/*
    2 Simple macro showing how to access branches from the delphes output root file,
    3 loop over events, and plot simple quantities such as the jet pt and the di-electron invariant
    4 mass.
    5 
    6 root -l examples/Example1.C'("delphes_output.root")'
     2root -l examples/Example1.C\(\"delphes_output.root\"\)
    73*/
    84
     
    4541     
    4642      // Print jet transverse momentum
    47       cout << "Jet pt: "<<jet->PT << endl;
     43      cout << jet->PT << endl;
    4844    }
    4945
     
    6662  histMass->Draw();
    6763}
    68 
  • examples/Example1.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <iostream>
    202#include <utility>
  • examples/Example2.C

    r37deb3b rba7fc1e  
    11/*
    2 Simple macro showing how to access branches from the delphes output root file,
    3 loop over events, store histograms in a root file and print them as image files. 
    4 
    5 root -l examples/Example2.C'("delphes_output.root")'
     2root -l examples/Example2.C\(\"delphes_output.root\"\)
    63*/
    74
  • examples/Example3.C

    r37deb3b rba7fc1e  
    11/*
    2 This macro shows how to access the particle-level reference for reconstructed objects.
    3 It is also shown how to loop over the jet constituents.
    4 
    5 root -l examples/Example3.C'("delphes_output.root")'
     2root -l examples/Example3.C\(\"delphes_output.root\"\)
    63*/
    74
     
    3936
    4037  plots->fElectronDeltaPT = result->AddHist1D(
    41     "electron_delta_pt", "(p_{T}^{particle} - p_{T}^{electron})/p_{T}^{particle}",
     38    "electron delta pt", "(p_{T}^{particle} - p_{T}^{electron})/p_{T}^{particle}",
    4239    "(p_{T}^{particle} - p_{T}^{electron})/p_{T}^{particle}", "number of electrons",
    4340    100, -0.1, 0.1);
    4441
    4542  plots->fElectronDeltaEta = result->AddHist1D(
    46     "electron_delta_eta", "(#eta^{particle} - #eta^{electron})/#eta^{particle}",
     43    "electron delta eta", "(#eta^{particle} - #eta^{electron})/#eta^{particle}",
    4744    "(#eta^{particle} - #eta^{electron})/#eta^{particle}", "number of electrons",
    4845    100, -0.1, 0.1);
    4946
    5047  plots->fPhotonDeltaPT = result->AddHist1D(
    51     "photon_delta_pt", "(p_{T}^{particle} - p_{T}^{photon})/p_{T}^{particle}",
     48    "photon delta pt", "(p_{T}^{particle} - p_{T}^{photon})/p_{T}^{particle}",
    5249    "(p_{T}^{particle} - p_{T}^{photon})/p_{T}^{particle}", "number of photons",
    5350    100, -0.1, 0.1);
    5451
    5552  plots->fPhotonDeltaEta = result->AddHist1D(
    56     "photon_delta_eta", "(#eta^{particle} - #eta^{photon})/#eta^{particle}",
     53    "photon delta eta", "(#eta^{particle} - #eta^{photon})/#eta^{particle}",
    5754    "(#eta^{particle} - #eta^{photon})/#eta^{particle}", "number of photons",
    5855    100, -0.1, 0.1);
    5956
    6057  plots->fPhotonDeltaE = result->AddHist1D(
    61     "photon_delta_energy", "(E^{particle} - E^{photon})/E^{particle}",
     58    "photon delta energy", "(E^{particle} - E^{photon})/E^{particle}",
    6259    "(E^{particle} - E^{photon})/E^{particle}", "number of photons",
    6360    100, -0.1, 0.1);
    6461
    6562  plots->fMuonDeltaPT = result->AddHist1D(
    66     "muon_delta_pt", "(p_{T}^{particle} - p_{T}^{muon})/p_{T}^{particle}",
     63    "muon delta pt", "(p_{T}^{particle} - p_{T}^{muon})/p_{T}^{particle}",
    6764    "(p_{T}^{particle} - p_{T}^{muon})/p_{T}^{particle}", "number of muons",
    6865    100, -0.1, 0.1);
    6966
    7067  plots->fMuonDeltaEta = result->AddHist1D(
    71     "muon_delta_eta", "(#eta^{particle} - #eta^{muon})/#eta^{particle}",
     68    "muon delta eta", "(#eta^{particle} - #eta^{muon})/#eta^{particle}",
    7269    "(#eta^{particle} - #eta^{muon})/#eta^{particle}", "number of muons",
    7370    100, -0.1, 0.1);
    7471
    7572  plots->fTrackDeltaPT = result->AddHist1D(
    76     "track_delta_pt", "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}",
     73    "track delta pt", "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}",
    7774    "(p_{T}^{particle} - p_{T}^{track})/p_{T}^{particle}", "number of tracks",
    7875    100, -0.1, 0.1);
    7976
    8077  plots->fTrackDeltaEta = result->AddHist1D(
    81     "track_delta_eta", "(#eta^{particle} - #eta^{track})/#eta^{particle}",
     78    "track delta eta", "(#eta^{particle} - #eta^{track})/#eta^{particle}",
    8279    "(#eta^{particle} - #eta^{track})/#eta^{particle}", "number of tracks",
    8380    100, -0.1, 0.1);
    8481
    8582  plots->fJetDeltaPT = result->AddHist1D(
    86     "jet_delta_pt", "(p_{T}^{jet} - p_{T}^{constituents})/p_{T}^{jet}",
     83    "jet delta pt", "(p_{T}^{jet} - p_{T}^{constituents})/p_{T}^{jet}",
    8784    "(p_{T}^{jet} - p_{T}^{constituents})/p_{T}^{jet}", "number of jets",
    8885    100, -1.0e-1, 1.0e-1);
     
    182179    }
    183180
    184   //  cout<<"--  New event -- "<<endl;
     181    cout<<"--  New event -- "<<endl;
    185182
    186183    // Loop over all jets in event
     
    191188      momentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
    192189
    193       //cout<<"Looping over jet constituents. Jet pt: "<<jet->PT<<", eta: "<<jet->Eta<<", phi: "<<jet->Phi<<endl;     
     190      cout<<"Looping over jet constituents. Jet pt: "<<jet->PT<<", eta: "<<jet->Eta<<", phi: "<<jet->Phi<<endl;     
    194191
    195192      // Loop over all jet's constituents
     
    204201        {
    205202          particle = (GenParticle*) object;
    206           //cout << "    GenPart pt: " << particle->PT << ", eta: " << particle->Eta << ", phi: " << particle->Phi << endl;
     203          cout << "    GenPart pt: " << particle->PT << ", eta: " << particle->Eta << ", phi: " << particle->Phi << endl;
    207204          momentum += particle->P4();
    208205        }
     
    210207        {
    211208          track = (Track*) object;
    212           //cout << "    Track pt: " << track->PT << ", eta: " << track->Eta << ", phi: " << track->Phi << endl;
     209          cout << "    Track pt: " << track->PT << ", eta: " << track->Eta << ", phi: " << track->Phi << endl;
    213210          momentum += track->P4();
    214211        }
     
    216213        {
    217214          tower = (Tower*) object;
    218           //cout << "    Tower pt: " << tower->ET << ", eta: " << tower->Eta << ", phi: " << tower->Phi << endl;
     215          cout << "    Tower pt: " << tower->ET << ", eta: " << tower->Eta << ", phi: " << tower->Phi << endl;
    219216          momentum += tower->P4();
     217        }
     218        else if(object->IsA() == Muon::Class())
     219        {
     220          muon = (Muon*) object;
     221          cout << "    Muon pt: " << muon->PT << ", eta: " << muon->Eta << ", phi: " << muon->Phi << endl;
     222          momentum += muon->P4();
    220223        }
    221224      }
  • examples/MemoryUsage.C

    r37deb3b rba7fc1e  
    11/*
    2 root -l examples/MemoryUsage.C'("ps_output.txt")'
     2root -l examples/MemoryUsage.C\(\"ps_output.txt\"\)
    33*/
    44
  • examples/ProcessingTime.C

    r37deb3b rba7fc1e  
    11/*
    2 root -l examples/ProcessingTime.C'("delphes_output.root")'
     2root -l examples/ProcessingTime.C\(\"delphes_output.root\"\)
    33*/
    44
  • examples/delphes_card_ATLAS.tcl

    r37deb3b rba7fc1e  
    2929  MissingET
    3030
    31   NeutrinoFilter
    3231  GenJetFinder
    3332  FastJetFinder
     
    207206  set PhotonOutputArray photons
    208207
    209   set EcalTowerMinEnergy 0.50
    210   set HcalTowerMinEnergy 1.00
    211 
    212   set EcalTowerMinSignificance 1.0
    213   set HcalTowerMinSignificance 1.0
    214  
    215208  set EFlowTrackOutputArray eflowTracks
    216209  set EFlowPhotonOutputArray eflowPhotons
     
    273266  set HCalResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \
    274267                             (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \
    275                              (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
     268                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.9420^2 + energy*0.075^2)}
    276269}
    277270
     
    413406}
    414407
    415 
    416 #####################
    417 # Neutrino Filter
    418 #####################
    419 
    420 module PdgCodeFilter NeutrinoFilter {
    421  
    422   set InputArray Delphes/stableParticles
    423   set OutputArray filteredParticles
    424 
    425   set PTMin 0.0
    426  
    427   add PdgCode {12}
    428   add PdgCode {14}
    429   add PdgCode {16}
    430   add PdgCode {-12}
    431   add PdgCode {-14}
    432   add PdgCode {-16}
    433 
    434 }
    435 
    436408#####################
    437409# MC truth jet finder
     
    439411
    440412module FastJetFinder GenJetFinder {
    441   set InputArray NeutrinoFilter/filteredParticles
     413  set InputArray Delphes/stableParticles
    442414
    443415  set OutputArray jets
     
    450422}
    451423
    452 
    453424############
    454425# Jet finder
     
    475446  set OutputArray jets
    476447
    477   # scale formula for jets
    478   set ScaleFormula {  sqrt( (3.0 - 0.2*(abs(eta)))^2 / pt + 1.0 )  }
     448 # scale formula for jets
     449  set ScaleFormula {1.00}
    479450}
    480451
  • examples/delphes_card_ATLAS_PileUp.tcl

    r37deb3b rba7fc1e  
    2020  TrackPileUpSubtractor
    2121  NeutralTowerMerger
    22   EFlowMergerAllTracks
    2322  EFlowMerger
    24  
    25   NeutrinoFilter
     23
    2624  GenJetFinder
    2725
     
    248246  set TowerOutputArray towers
    249247  set PhotonOutputArray photons
    250 
    251   set EcalTowerMinEnergy 0.50
    252   set HcalTowerMinEnergy 1.00
    253 
    254   set EcalTowerMinSignificance 1.0
    255   set HcalTowerMinSignificance 1.0
    256248
    257249  set EFlowTrackOutputArray eflowTracks
     
    315307  set HCalResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.0302^2 + energy*0.5205^2 + 1.59^2) + \
    316308                             (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.0500^2 + energy*0.706^2) + \
    317                              (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.09420^2 + energy*1.00^2)}
     309                             (abs(eta) > 3.2 && abs(eta) <= 4.9) * sqrt(energy^2*0.9420^2 + energy*0.075^2)}
    318310}
    319311
     
    342334  add InputArray Calorimeter/eflowNeutralHadrons
    343335  set OutputArray eflowTowers
    344 }
    345 
    346 ##################################
    347 # Energy flow merger (all tracks)
    348 ##################################
    349 
    350 module Merger EFlowMergerAllTracks {
    351 # add InputArray InputArray
    352   add InputArray TrackMerger/tracks
    353   add InputArray Calorimeter/eflowPhotons
    354   add InputArray Calorimeter/eflowNeutralHadrons
    355   set OutputArray eflow
    356336}
    357337
     
    369349}
    370350
     351
    371352#############
    372353# Rho pile-up
    373354#############
    374355
    375 module FastJetGridMedianEstimator Rho {
    376  
     356module FastJetFinder Rho {
    377357  set InputArray Calorimeter/towers
     358
     359  set ComputeRho true
    378360  set RhoOutputArray rho
    379361
    380   # etamin etamax gridsize_eta gridsize_phi
    381  
    382   add GridRange 0.0 2.5 0.5 0.5
    383   add GridRange 2.5 5.0 0.5 0.5
    384 
    385 }
    386 
    387 
    388 #####################
    389 # Neutrino Filter
    390 #####################
    391 
    392 module PdgCodeFilter NeutrinoFilter {
    393  
    394   set InputArray Delphes/stableParticles
    395   set OutputArray filteredParticles
    396 
    397   set PTMin 0.0
    398  
    399   add PdgCode {12}
    400   add PdgCode {14}
    401   add PdgCode {16}
    402   add PdgCode {-12}
    403   add PdgCode {-14}
    404   add PdgCode {-16}
    405 
     362  # area algorithm: 0 Do not compute area, 1 Active area explicit ghosts, 2 One ghost passive area, 3 Passive area, 4 Voronoi, 5 Active area
     363  set AreaAlgorithm 5
     364
     365  # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
     366  set JetAlgorithm 4
     367  set ParameterR 0.6
     368  set GhostEtaMax 5.0
     369  set RhoEtaMax 5.0
     370
     371  add RhoEtaRange 0.0 5.0
     372
     373  set JetPTMin 0.0
    406374}
    407375
     
    411379
    412380module FastJetFinder GenJetFinder {
    413   set InputArray NeutrinoFilter/filteredParticles
     381  set InputArray Delphes/stableParticles
    414382
    415383  set OutputArray jets
     
    577545module Merger MissingET {
    578546# add InputArray InputArray
    579   add InputArray EFlowMergerAllTracks/eflow
     547  add InputArray EFlowMerger/eflow
    580548  set MomentumOutputArray momentum
    581549}
     
    676644
    677645#  add Branch TrackMerger/tracks Track Track
    678   add Branch Calorimeter/towers Tower Tower
     646#  add Branch Calorimeter/towers Tower Tower
    679647
    680648#  add Branch Calorimeter/eflowTracks EFlowTrack Track
  • examples/delphes_card_CMS.tcl

    r37deb3b rba7fc1e  
    2929  MissingET
    3030
    31   NeutrinoFilter
    3231  GenJetFinder
    3332  FastJetFinder
     
    212211  set PhotonOutputArray photons
    213212
    214   set EcalTowerMinEnergy 0.5
    215   set HcalTowerMinEnergy 1.0
    216 
    217   set EcalTowerMinSignificance 1.0
    218   set HcalTowerMinSignificance 1.0
    219    
    220213  set EFlowTrackOutputArray eflowTracks
    221214  set EFlowPhotonOutputArray eflowPhotons
     
    423416}
    424417
    425 
    426 #####################
    427 # Neutrino Filter
    428 #####################
    429 
    430 module PdgCodeFilter NeutrinoFilter {
    431  
    432   set InputArray Delphes/stableParticles
    433   set OutputArray filteredParticles
    434 
    435   set PTMin 0.0
    436  
    437   add PdgCode {12}
    438   add PdgCode {14}
    439   add PdgCode {16}
    440   add PdgCode {-12}
    441   add PdgCode {-14}
    442   add PdgCode {-16}
    443 
    444 }
    445 
    446 
    447418#####################
    448419# MC truth jet finder
     
    450421
    451422module FastJetFinder GenJetFinder {
    452   set InputArray NeutrinoFilter/filteredParticles
     423  set InputArray Delphes/stableParticles
    453424
    454425  set OutputArray jets
     
    461432}
    462433
    463 
    464 
    465 
    466434############
    467435# Jet finder
     
    489457  set OutputArray jets
    490458
    491   # scale formula for jets
    492   set ScaleFormula {sqrt( (2.5 - 0.15*(abs(eta)))^2 / pt + 1.0 )}
     459 # scale formula for jets
     460  set ScaleFormula {1.00}
    493461}
    494462
  • examples/delphes_card_CMS_PileUp.tcl

    r37deb3b rba7fc1e  
     1
    12#######################################
    23# Order of execution of various modules
     
    2021  TrackPileUpSubtractor
    2122  NeutralTowerMerger
    22   EFlowMergerAllTracks
    2323  EFlowMerger
    24  
    25   NeutrinoFilter
     24
    2625  GenJetFinder
    2726
     
    6867
    6968  # average expected pile up
    70   set MeanPileUp 50
     69  set MeanPileUp 10
    7170
    7271  # maximum spread in the beam direction in m
     
    254253  set TowerOutputArray towers
    255254  set PhotonOutputArray photons
    256 
    257   set EcalTowerMinEnergy 0.5
    258   set HcalTowerMinEnergy 1.0
    259 
    260   set EcalTowerMinSignificance 1.0
    261   set HcalTowerMinSignificance 1.0
    262255
    263256  set EFlowTrackOutputArray eflowTracks
     
    354347}
    355348
    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
    366 }
    367 
    368349
    369350####################
     
    380361
    381362
    382 
    383363#############
    384364# Rho pile-up
    385365#############
    386366
    387 module FastJetGridMedianEstimator Rho {
    388  
     367module FastJetFinder Rho {
     368#  set InputArray Calorimeter/towers
    389369  set InputArray EFlowMerger/eflow
     370
     371  set ComputeRho true
    390372  set RhoOutputArray rho
    391373
    392   # etamin etamax gridsize_eta gridsize_phi
    393  
    394   add GridRange 0.0 2.5 1.0 1.0
    395   add GridRange 2.5 5.0 1.0 1.0
    396 
    397 }
    398 
    399 #####################
    400 # Neutrino Filter
    401 #####################
    402 
    403 module PdgCodeFilter NeutrinoFilter {
    404  
    405   set InputArray Delphes/stableParticles
    406   set OutputArray filteredParticles
    407 
    408   set PTMin 0.0
    409  
    410   add PdgCode {12}
    411   add PdgCode {14}
    412   add PdgCode {16}
    413   add PdgCode {-12}
    414   add PdgCode {-14}
    415   add PdgCode {-16}
    416 
    417 }
    418 
    419 
     374  # area algorithm: 0 Do not compute area, 1 Active area explicit ghosts, 2 One ghost passive area, 3 Passive area, 4 Voronoi, 5 Active area
     375  set AreaAlgorithm 5
     376
     377  # jet algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt
     378  set JetAlgorithm 4
     379  set ParameterR 0.6
     380  set GhostEtaMax 5.0
     381
     382  add RhoEtaRange 0.0 2.5
     383  add RhoEtaRange 2.5 5.0
     384
     385  set JetPTMin 0.0
     386}
    420387
    421388#####################
     
    424391
    425392module FastJetFinder GenJetFinder {
    426   set InputArray NeutrinoFilter/filteredParticles
     393  set InputArray Delphes/stableParticles
    427394
    428395  set OutputArray jets
     
    616583module Merger MissingET {
    617584# add InputArray InputArray
    618   add InputArray EFlowMergerAllTracks/eflow
     585  add InputArray EFlowMerger/eflow
    619586  set MomentumOutputArray momentum
    620587}
  • examples/delphes_card_FCC_basic.tcl

    r37deb3b rba7fc1e  
    2424
    2525  MissingET
    26  
    27   NeutrinoFilter
     26
    2827  GenJetFinder
    2928  FastJetFinder
     
    395394
    396395#####################
    397 # Neutrino Filter
    398 #####################
    399 
    400 module PdgCodeFilter NeutrinoFilter {
    401  
    402   set InputArray Delphes/stableParticles
    403   set OutputArray filteredParticles
    404 
    405   set PTMin 0.0
    406  
    407   add PdgCode {12}
    408   add PdgCode {14}
    409   add PdgCode {16}
    410   add PdgCode {-12}
    411   add PdgCode {-14}
    412   add PdgCode {-16}
    413 
    414 }
    415 
    416 
    417 #####################
    418396# MC truth jet finder
    419397#####################
    420398
    421399module FastJetFinder GenJetFinder {
    422   set InputArray NeutrinoFilter/filteredParticles
     400  set InputArray Delphes/stableParticles
    423401
    424402  set OutputArray jets
  • external/fastjet/AUTHORS

    r37deb3b rba7fc1e  
    1010----------------------------------------------------------------------
    1111
    12 Many people have provided bug reports, suggestions for development,
    13 documentation and in some cases explicit code for plugin
    14 algorithms. We would in particular like to thank
     12Many people have provided bug reports, suggestions for development and
     13in some cases explicit code for plugin algorithms. We would in
     14particular like to thank
    1515
    1616Vanya Belyaev
     
    3232Hartmut Stadie
    3333Mark Sutton
    34 Jesse Thaler
    3534Chris Vermilion
    3635Markus Wobisch
    37 Christopher Young
    3836
    3937----------------------------------------------------------------------
  • external/fastjet/ActiveAreaSpec.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ActiveAreaSpec.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: ActiveAreaSpec.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/AreaDefinition.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: AreaDefinition.cc 3619 2014-08-13 14:17:19Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/AreaDefinition.hh"
     
    7068    break;
    7169  default:
    72     ostr << "Error: unrecognized area_type in AreaDefinition::description():"
     70    cerr << "Error: unrecognized area_type in AreaDefinition::description():"
    7371         << area_type() << endl;
    74     throw Error(ostr.str());
     72    exit(-1);
    7573  }
    7674  return ostr.str();
  • external/fastjet/AreaDefinition.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: AreaDefinition.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: AreaDefinition.hh 2687 2011-11-14 11:17:51Z soyez $
    33//
    4 // Copyright (c) 2006-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2006-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/BasicRandom.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: BasicRandom.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// simple random number generator class taken from nlojet++.
     3// $Id$
    34//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     5//  Copyright (C) 2002 Zoltan Nagy
    56//
    6 //----------------------------------------------------------------------
    7 // This file is part of FastJet.
    8 //
    9 //  FastJet is free software; you can redistribute it and/or modify
     7//  This program is free software; you can redistribute it and/or modify
    108//  it under the terms of the GNU General Public License as published by
    119//  the Free Software Foundation; either version 2 of the License, or
    1210//  (at your option) any later version.
    1311//
    14 //  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    17 //  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
    20 //
    21 //  FastJet is distributed in the hope that it will be useful,
     12//  This program is distributed in the hope that it will be useful,
    2213//  but WITHOUT ANY WARRANTY; without even the implied warranty of
    2314//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     
    2516//
    2617//  You should have received a copy of the GNU General Public License
    27 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    28 //----------------------------------------------------------------------
    29 //FJENDHEADER
     18//  along with this program; if not, write to the Free Software
     19//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     20//ENDHEADER
    3021
    3122//   nlo includes
  • external/fastjet/CMakeLists.txt

    r37deb3b rba7fc1e  
    11include_directories(${CMAKE_SOURCE_DIR}/external)
    22
    3 file(GLOB sources *.cc plugins/*/*.cc contribs/*/*.cc tools/*.cc)
     3file(GLOB sources *.cc plugins/*/*.cc contribs/Nsubjettiness/*.cc tools/*cc)
    44
    55add_library(fastjet OBJECT ${sources})
  • external/fastjet/CircularRange.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CircularRange.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: CircularRange.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/ClosestPair2D.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClosestPair2D.cc 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/internal/ClosestPair2D.hh"
     
    3836FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
    3937
     38const unsigned int huge_unsigned = 4294967295U;
    4039const unsigned int twopow31      = 2147483648U;
    4140
     
    184183  ID2 = _ID(_points[ID1].neighbour);
    185184  distance2 = _points[ID1].neighbour_dist2;
    186   // we make the swap explicitly in the std namespace to avoid
    187   // potential conflict with the fastjet::swap introduced by
    188   // SharedPtr.
    189   // This is only an issue because we are in the fastjet namespace
    190185  if (ID1 > ID2) std::swap(ID1,ID2);
    191186}
  • external/fastjet/ClusterSequence.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequence.cc 3685 2014-09-11 20:15:00Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2013, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/Error.hh"
     
    3432#include "fastjet/ClusterSequenceStructure.hh"
    3533#include "fastjet/version.hh" // stores the current version number
    36 #include "fastjet/internal/LazyTiling9Alt.hh"
    37 #include "fastjet/internal/LazyTiling9.hh"
    38 #include "fastjet/internal/LazyTiling25.hh"
    39 #ifndef __FJCORE__
    40 #include "fastjet/internal/LazyTiling9SeparateGhosts.hh"
    41 #endif  // __FJCORE__
    4234#include<iostream>
    4335#include<sstream>
     
    195187//DEP //----------------------------------------------------------------------
    196188//DEP void ClusterSequence::_initialise_and_run (
    197 //DEP                             const double R,
     189//DEP                             const double & R,
    198190//DEP                             const Strategy & strategy,
    199191//DEP                             const bool & writeout_combinations) {
     
    281273  //             ./fastjet_timing_plugins -kt -nhardest 30 -repeat 50000 -strategy -3 -R 0.5 -nev 1  <  ../../data/Pythia-PtMin1000-LHC-1000ev.dat
    282274  if (_strategy == Best) {
    283     _strategy = _best_strategy();
    284 #ifdef DROP_CGAL
    285     // fall back strategy for large N when CGAL is missing
    286     if (_strategy == NlnN) _strategy = N2MHTLazy25;
    287 #endif  // DROP_CGAL
    288   } else if (_strategy == BestFJ30) {
    289275    int N = _jets.size();
    290276    //if (N <= 55*max(0.5,min(1.0,_Rparam))) {// old empirical scaling with R
     
    338324  // run the code containing the selected strategy
    339325  //
    340   // We order the strategies starting from the ones used by the Best
     326  // We order the strategies stqrting from the ones used by the Best
    341327  // strategy in the order of increasing N, then the remaining ones
    342328  // again in the order of increasing N.
     
    348334  } else if (_strategy == N2MinHeapTiled) {
    349335    this->_minheap_faster_tiled_N2_cluster();
    350   } else if (_strategy == N2MHTLazy9Alt) {
    351     // attempt to use an external tiling routine -- it manipulates
    352     // the CS history via the plugin mechanism
    353     _plugin_activated = true;
    354     LazyTiling9Alt tiling(*this);
    355     tiling.run();
    356     _plugin_activated = false;
    357 
    358   } else if (_strategy == N2MHTLazy25) {
    359     // attempt to use an external tiling routine -- it manipulates
    360     // the CS history via the plugin mechanism
    361     _plugin_activated = true;
    362     LazyTiling25 tiling(*this);
    363     tiling.run();
    364     _plugin_activated = false;
    365 
    366   } else if (_strategy == N2MHTLazy9) {
    367     // attempt to use an external tiling routine -- it manipulates
    368     // the CS history via the plugin mechanism
    369     _plugin_activated = true;
    370     LazyTiling9 tiling(*this);
    371     tiling.run();
    372     _plugin_activated = false;
    373 
    374 #ifndef __FJCORE__
    375   } else if (_strategy == N2MHTLazy9AntiKtSeparateGhosts) {
    376     // attempt to use an external tiling routine -- it manipulates
    377     // the CS history via the plugin mechanism
    378     _plugin_activated = true;
    379     LazyTiling9SeparateGhosts tiling(*this);
    380     tiling.run();
    381     _plugin_activated = false;
    382 #else
    383     throw Error("N2MHTLazy9AntiKtSeparateGhosts strategy not supported with FJCORE");
    384 #endif  // __FJCORE__
    385 
    386336  } else if (_strategy == NlnN) {
    387337    this->_delaunay_cluster();
     
    409359// these needs to be defined outside the class definition.
    410360bool ClusterSequence::_first_time = true;
    411 LimitedWarning ClusterSequence::_exclusive_warnings;
     361int ClusterSequence::_n_exclusive_warnings = 0;
    412362
    413363
     
    523473
    524474//----------------------------------------------------------------------
     475// Return the component corresponding to the specified index.
     476// taken from CLHEP
    525477string ClusterSequence::strategy_string (Strategy strategy_in)  const {
    526478  string strategy;
     
    540492  case N2PoorTiled:
    541493    strategy = "N2PoorTiled"; break;
    542   case N2MHTLazy9:
    543     strategy = "N2MHTLazy9"; break;
    544   case N2MHTLazy9Alt:
    545     strategy = "N2MHTLazy9Alt"; break;
    546   case N2MHTLazy25:
    547     strategy = "N2MHTLazy25"; break;
    548   case N2MHTLazy9AntiKtSeparateGhosts:
    549     strategy = "N2MHTLazy9AntiKtSeparateGhosts"; break;
    550494  case N3Dumb:
    551495    strategy = "N3Dumb"; break;
     
    584528    } else {return 1.0;}
    585529  } else {throw Error("Unrecognised jet algorithm");}
    586 }
    587 
    588 //----------------------------------------------------------------------
    589 // returns a suggestion for the best strategy to use on event
    590 // multiplicity, algorithm, R, etc.
    591 //
    592 // Some of the work to establish the best strategy is collected in
    593 // issue-tracker/2014-07-auto-strategy-selection;
    594 // transition_fit_v2.fit indicates the results of the fits that we're
    595 // using here. (Automatically generated by transition_fit_v2.gp).
    596 //
    597 // The transition to NlnN is always present, and it is the the
    598 // caller's responsibility to drop back down to N2MHTLazy25 if NlnN
    599 // isn't available.
    600 //
    601 // This routine should be called only if the jet alg is one of kt,
    602 // antikt, cam or genkt.
    603 Strategy ClusterSequence::_best_strategy() const {
    604   int N = _jets.size();
    605   // define bounded R, always above 0.1, because we don't trust any
    606   // of our parametrizations below R = 0.1
    607   double bounded_R = max(_Rparam, 0.1);
    608 
    609   // the very first test thing is a quick hard-coded test to decide
    610   // if we immediately opt for N2Plain
    611   if (N <= 30 || N <= 39.0/(bounded_R + 0.6)) {
    612     return N2Plain;
    613   }
    614  
    615   // Define objects that describe our various boundaries. A prefix N_
    616   // indicates that boundary is for N, while L_ means it's for log(N).
    617   //
    618   // Hopefully having them static will ensure minimal overhead
    619   // in creating them; collecting them in one place should
    620   // help with updates?
    621   //
    622   const static _Parabola N_Tiled_to_MHT_lowR             (-45.4947,54.3528,44.6283);
    623   const static _Parabola L_MHT_to_MHTLazy9_lowR          (0.677807,-1.05006,10.6994);
    624   const static _Parabola L_MHTLazy9_to_MHTLazy25_akt_lowR(0.169967,-0.512589,12.1572);
    625   const static _Parabola L_MHTLazy9_to_MHTLazy25_kt_lowR (0.16237,-0.484612,12.3373);
    626   const static _Parabola L_MHTLazy9_to_MHTLazy25_cam_lowR = L_MHTLazy9_to_MHTLazy25_kt_lowR;
    627   const static _Parabola L_MHTLazy25_to_NlnN_akt_lowR    (0.0472051,-0.22043,15.9196);
    628   const static _Parabola L_MHTLazy25_to_NlnN_kt_lowR     (0.118609,-0.326811,14.8287);
    629   const static _Parabola L_MHTLazy25_to_NlnN_cam_lowR    (0.10119,-0.295748,14.3924);
    630 
    631   const static _Line     L_Tiled_to_MHTLazy9_medR         (-1.31304,7.29621);
    632   const static _Parabola L_MHTLazy9_to_MHTLazy25_akt_medR = L_MHTLazy9_to_MHTLazy25_akt_lowR;
    633   const static _Parabola L_MHTLazy9_to_MHTLazy25_kt_medR  = L_MHTLazy9_to_MHTLazy25_kt_lowR;
    634   const static _Parabola L_MHTLazy9_to_MHTLazy25_cam_medR = L_MHTLazy9_to_MHTLazy25_cam_lowR;
    635   const static _Parabola L_MHTLazy25_to_NlnN_akt_medR     = L_MHTLazy25_to_NlnN_akt_lowR;
    636   const static _Parabola L_MHTLazy25_to_NlnN_kt_medR      = L_MHTLazy25_to_NlnN_kt_lowR;
    637   const static _Parabola L_MHTLazy25_to_NlnN_cam_medR     = L_MHTLazy25_to_NlnN_cam_lowR;
    638 
    639   const static double    N_Plain_to_MHTLazy9_largeR         = 75;
    640   const static double    N_MHTLazy9_to_MHTLazy25_akt_largeR = 700;
    641   const static double    N_MHTLazy9_to_MHTLazy25_kt_largeR  = 1000;
    642   const static double    N_MHTLazy9_to_MHTLazy25_cam_largeR = 1000;
    643   const static double    N_MHTLazy25_to_NlnN_akt_largeR     = 100000;
    644   const static double    N_MHTLazy25_to_NlnN_kt_largeR      = 40000;
    645   const static double    N_MHTLazy25_to_NlnN_cam_largeR     = 15000;
    646 
    647   // We have timing studies only for kt, cam and antikt; for other
    648   // algorithms we set the local jet_algorithm variable to the one of
    649   // kt,cam,antikt that we think will be closest in behaviour to the
    650   // other alg.
    651   JetAlgorithm jet_algorithm;
    652   if (_jet_algorithm == genkt_algorithm) {
    653     // for genkt, then we set the local jet_algorithm variable (used
    654     // only for strategy choice) to be either kt or antikt, depending on
    655     // the p value.
    656     double p   = jet_def().extra_param();
    657     if (p < 0.0) jet_algorithm = antikt_algorithm;
    658     else         jet_algorithm =     kt_algorithm;
    659   } else if (_jet_algorithm == cambridge_for_passive_algorithm) {
    660     // we assume (but haven't tested) that using the kt-alg timing
    661     // transitions should be adequate for cambridge_for_passive_algorithm
    662     jet_algorithm = kt_algorithm;
    663   } else {
    664     jet_algorithm = _jet_algorithm;
    665   }
    666 
    667   if (bounded_R < 0.65) {
    668     // low R case
    669     if          (N    < N_Tiled_to_MHT_lowR(bounded_R))              return N2Tiled;
    670     double logN = log(double(N));
    671     if          (logN < L_MHT_to_MHTLazy9_lowR(bounded_R))           return N2MinHeapTiled;
    672     else {
    673       if (jet_algorithm == antikt_algorithm){
    674         if      (logN < L_MHTLazy9_to_MHTLazy25_akt_lowR(bounded_R)) return N2MHTLazy9;
    675         else if (logN < L_MHTLazy25_to_NlnN_akt_lowR(bounded_R))     return N2MHTLazy25;
    676         else                                                         return NlnN;
    677       } else if (jet_algorithm == kt_algorithm){
    678         if      (logN < L_MHTLazy9_to_MHTLazy25_kt_lowR(bounded_R))  return N2MHTLazy9;
    679         else if (logN < L_MHTLazy25_to_NlnN_kt_lowR(bounded_R))      return N2MHTLazy25;
    680         else                                                         return NlnN;
    681       } else if (jet_algorithm == cambridge_algorithm)  {
    682         if      (logN < L_MHTLazy9_to_MHTLazy25_cam_lowR(bounded_R)) return N2MHTLazy9;
    683         else if (logN < L_MHTLazy25_to_NlnN_cam_lowR(bounded_R))     return N2MHTLazy25;
    684         else                                                         return NlnNCam;
    685       }
    686     }
    687   } else if (bounded_R < 0.5*pi) {
    688     // medium R case
    689     double logN = log(double(N));
    690     if      (logN < L_Tiled_to_MHTLazy9_medR(bounded_R))             return N2Tiled;
    691     else {
    692       if (jet_algorithm == antikt_algorithm){
    693         if      (logN < L_MHTLazy9_to_MHTLazy25_akt_medR(bounded_R)) return N2MHTLazy9;
    694         else if (logN < L_MHTLazy25_to_NlnN_akt_medR(bounded_R))     return N2MHTLazy25;
    695         else                                                         return NlnN;
    696       } else if (jet_algorithm == kt_algorithm){
    697         if      (logN < L_MHTLazy9_to_MHTLazy25_kt_medR(bounded_R))  return N2MHTLazy9;
    698         else if (logN < L_MHTLazy25_to_NlnN_kt_medR(bounded_R))      return N2MHTLazy25;
    699         else                                                         return NlnN;
    700       } else if (jet_algorithm == cambridge_algorithm)  {
    701         if      (logN < L_MHTLazy9_to_MHTLazy25_cam_medR(bounded_R)) return N2MHTLazy9;
    702         else if (logN < L_MHTLazy25_to_NlnN_cam_medR(bounded_R))     return N2MHTLazy25;
    703         else                                                         return NlnNCam;
    704       }
    705     }
    706   } else {
    707     // large R case (R > pi/2)
    708     if      (N    < N_Plain_to_MHTLazy9_largeR)                      return N2Plain;
    709     else {
    710       if (jet_algorithm == antikt_algorithm){
    711         if      (N < N_MHTLazy9_to_MHTLazy25_akt_largeR)             return N2MHTLazy9;
    712         else if (N < N_MHTLazy25_to_NlnN_akt_largeR)                 return N2MHTLazy25;
    713         else                                                         return NlnN;
    714       } else if (jet_algorithm == kt_algorithm){
    715         if      (N < N_MHTLazy9_to_MHTLazy25_kt_largeR)              return N2MHTLazy9;
    716         else if (N < N_MHTLazy25_to_NlnN_kt_largeR)                  return N2MHTLazy25;
    717         else                                                         return NlnN;
    718       } else if (jet_algorithm == cambridge_algorithm)  {
    719         if      (N < N_MHTLazy9_to_MHTLazy25_cam_largeR)             return N2MHTLazy9;
    720         else if (N < N_MHTLazy25_to_NlnN_cam_largeR)                 return N2MHTLazy25;
    721         else                                                         return NlnNCam;
    722       }
    723     }
    724   }
    725  
    726   bool code_should_never_reach_here = false;
    727   assert(code_should_never_reach_here);
    728   return N2MHTLazy9;
    729 
    730530}
    731531
     
    862662//----------------------------------------------------------------------
    863663// return all inclusive jets with pt > ptmin
    864 vector<PseudoJet> ClusterSequence::inclusive_jets (const double ptmin) const{
     664vector<PseudoJet> ClusterSequence::inclusive_jets (const double & ptmin) const{
    865665  double dcut = ptmin*ptmin;
    866666  int i = _history.size() - 1; // last jet
     
    914714// return the number of exclusive jets that would have been obtained
    915715// running the algorithm in exclusive mode with the given dcut
    916 int ClusterSequence::n_exclusive_jets (const double dcut) const {
     716int ClusterSequence::n_exclusive_jets (const double & dcut) const {
    917717
    918718  // first locate the point where clustering would have stopped (i.e. the
     
    933733// return all exclusive jets that would have been obtained running
    934734// the algorithm in exclusive mode with the given dcut
    935 vector<PseudoJet> ClusterSequence::exclusive_jets (const double dcut) const {
     735vector<PseudoJet> ClusterSequence::exclusive_jets (const double & dcut) const {
    936736  int njets = n_exclusive_jets(dcut);
    937737  return exclusive_jets(njets);
     
    942742// return the jets obtained by clustering the event to n jets.
    943743// Throw an error if there are fewer than n particles.
    944 vector<PseudoJet> ClusterSequence::exclusive_jets (const int njets) const {
     744vector<PseudoJet> ClusterSequence::exclusive_jets (const int & njets) const {
    945745
    946746  // make sure the user does not ask for more than jets than there
     
    959759// return the jets obtained by clustering the event to n jets.
    960760// If there are fewer than n particles, simply return all particles
    961 vector<PseudoJet> ClusterSequence::exclusive_jets_up_to (const int njets) const {
     761vector<PseudoJet> ClusterSequence::exclusive_jets_up_to (const int & njets) const {
    962762
    963763  // provide a warning when extracting exclusive jets for algorithms
    964764  // that does not support it explicitly.
    965   // Native algorithm that support it are: kt, ee_kt, Cambridge/Aachen,
     765  // Native algorithm that support it are: kt, ee_kt, cambridge,
    966766  //   genkt and ee_genkt (both with p>=0)
    967767  // For plugins, we check Plugin::exclusive_sequence_meaningful()
     
    973773       (_jet_def.extra_param() <0)) &&
    974774      ((_jet_def.jet_algorithm() != plugin_algorithm) ||
    975        (!_jet_def.plugin()->exclusive_sequence_meaningful()))) {
    976     _exclusive_warnings.warn("dcut and exclusive jets for jet-finders other than kt, C/A or genkt with p>=0 should be interpreted with care.");
     775       (!_jet_def.plugin()->exclusive_sequence_meaningful())) &&
     776      (_n_exclusive_warnings < 5)) {
     777    _n_exclusive_warnings++;
     778    cerr << "FastJet WARNING: dcut and exclusive jets for jet-finders other than kt should be interpreted with care." << endl;
    977779  }
    978780
     
    1027829/// return the dmin corresponding to the recombination that went from
    1028830/// n+1 to n jets
    1029 double ClusterSequence::exclusive_dmerge (const int njets) const {
     831double ClusterSequence::exclusive_dmerge (const int & njets) const {
    1030832  assert(njets >= 0);
    1031833  if (njets >= _initial_n) {return 0.0;}
     
    1039841/// exclusive_dmerge, except in cases where the dmin do not increase
    1040842/// monotonically.
    1041 double ClusterSequence::exclusive_dmerge_max (const int njets) const {
     843double ClusterSequence::exclusive_dmerge_max (const int & njets) const {
    1042844  assert(njets >= 0);
    1043845  if (njets >= _initial_n) {return 0.0;}
     
    1051853/// the algorithm with the given dcut.
    1052854std::vector<PseudoJet> ClusterSequence::exclusive_subjets
    1053    (const PseudoJet & jet, const double dcut) const {
     855   (const PseudoJet & jet, const double & dcut) const {
    1054856
    1055857  set<const history_element*> subhist;
     
    1074876/// exclusive_subjets.size()
    1075877int ClusterSequence::n_exclusive_subjets(const PseudoJet & jet,
    1076                         const double dcut) const {
     878                        const double & dcut) const {
    1077879  set<const history_element*> subhist;
    1078880  // get the set of history elements that correspond to subjets at
     
    13791181// //----------------------------------------------------------------------
    13801182// // print out all inclusive jets with pt > ptmin
    1381 // void ClusterSequence::print_jets (const double ptmin) const{
     1183// void ClusterSequence::print_jets (const double & ptmin) const{
    13821184//     vector<PseudoJet> jets = sorted_by_pt(inclusive_jets(ptmin));
    13831185//
     
    14551257// initialise the history in a standard way
    14561258void ClusterSequence::_add_step_to_history (
    1457                const int step_number, const int parent1,
    1458                const int parent2, const int jetp_index,
    1459                const double dij) {
     1259               const int & step_number, const int & parent1,
     1260               const int & parent2, const int & jetp_index,
     1261               const double & dij) {
    14601262
    14611263  history_element element;
     
    16271429/// of the recombined jet, newjet_k.
    16281430void ClusterSequence::_do_ij_recombination_step(
    1629                                const int jet_i, const int jet_j,
    1630                                const double dij,
     1431                               const int & jet_i, const int & jet_j,
     1432                               const double & dij,
    16311433                               int & newjet_k) {
    16321434
     
    16641466/// jet_i with the beam
    16651467void ClusterSequence::_do_iB_recombination_step(
    1666                                   const int jet_i, const double diB) {
     1468                                  const int & jet_i, const double & diB) {
    16671469  // get history index
    16681470  int newstep_k = _history.size();
  • external/fastjet/ClusterSequence.hh

    r37deb3b rba7fc1e  
    1 #ifndef __FASTJET_CLUSTERSEQUENCE_HH__
    2 #define __FASTJET_CLUSTERSEQUENCE_HH__
    3 
    4 //FJSTARTHEADER
    5 // $Id: ClusterSequence.hh 3709 2014-09-29 13:19:11Z soyez $
     1//STARTHEADER
     2// $Id: ClusterSequence.hh 3114 2013-05-04 08:46:00Z salam $
    63//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    85//
    96//----------------------------------------------------------------------
     
    1613//
    1714//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    2016//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2318//
    2419//  FastJet is distributed in the hope that it will be useful,
     
    3025//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3126//----------------------------------------------------------------------
    32 //FJENDHEADER
    33 
     27//ENDHEADER
     28
     29
     30#ifndef __FASTJET_CLUSTERSEQUENCE_HH__
     31#define __FASTJET_CLUSTERSEQUENCE_HH__
    3432
    3533#include<vector>
     
    6765  ClusterSequence () : _deletes_self_when_unused(false) {}
    6866
    69   /// create a ClusterSequence, starting from the supplied set
    70   /// of PseudoJets and clustering them with jet definition specified
     67//   /// create a clustersequence starting from the supplied set
     68//   /// of pseudojets and clustering them with the long-invariant
     69//   /// kt algorithm (E-scheme recombination) with the supplied
     70//   /// value for R.
     71//   ///
     72//   /// If strategy=DumbN3 a very stupid N^3 algorithm is used for the
     73//   /// clustering; otherwise strategy = NlnN* uses cylinders algorithms
     74//   /// with some number of pi coverage. If writeout_combinations=true a
     75//   /// summary of the recombination sequence is written out
     76//   template<class L> ClusterSequence (const std::vector<L> & pseudojets,
     77//                 const double & R = 1.0,
     78//                 const Strategy & strategy = Best,
     79//                 const bool & writeout_combinations = false);
     80
     81
     82  /// create a clustersequence starting from the supplied set
     83  /// of pseudojets and clustering them with jet definition specified
    7184  /// by jet_def (which also specifies the clustering strategy)
    7285  template<class L> ClusterSequence (
     
    91104  /// algorithm) with pt >= ptmin. Time taken should be of the order
    92105  /// of the number of jets returned.
    93   std::vector<PseudoJet> inclusive_jets (const double ptmin = 0.0) const;
     106  std::vector<PseudoJet> inclusive_jets (const double & ptmin = 0.0) const;
    94107
    95108  /// return the number of jets (in the sense of the exclusive
    96109  /// algorithm) that would be obtained when running the algorithm
    97110  /// with the given dcut.
    98   int n_exclusive_jets (const double dcut) const;
     111  int n_exclusive_jets (const double & dcut) const;
    99112
    100113  /// return a vector of all jets (in the sense of the exclusive
    101114  /// algorithm) that would be obtained when running the algorithm
    102115  /// with the given dcut.
    103   std::vector<PseudoJet> exclusive_jets (const double dcut) const;
     116  std::vector<PseudoJet> exclusive_jets (const double & dcut) const;
    104117
    105118  /// return a vector of all jets when the event is clustered (in the
     
    108121  /// If there are fewer than njets particles in the ClusterSequence
    109122  /// an error is thrown
    110   std::vector<PseudoJet> exclusive_jets (const int njets) const;
     123  std::vector<PseudoJet> exclusive_jets (const int & njets) const;
    111124
    112125  /// return a vector of all jets when the event is clustered (in the
     
    115128  /// If there are fewer than njets particles in the ClusterSequence
    116129  /// the function just returns however many particles there were.
    117   std::vector<PseudoJet> exclusive_jets_up_to (const int njets) const;
     130  std::vector<PseudoJet> exclusive_jets_up_to (const int & njets) const;
    118131
    119132  /// return the dmin corresponding to the recombination that went
    120133  /// from n+1 to n jets (sometimes known as d_{n n+1}). If the number
    121134  /// of particles in the event is <= njets, the function returns 0.
    122   double exclusive_dmerge (const int njets) const;
     135  double exclusive_dmerge (const int & njets) const;
    123136
    124137  /// return the maximum of the dmin encountered during all recombinations
     
    126139  /// exclusive_dmerge, except in cases where the dmin do not increase
    127140  /// monotonically.
    128   double exclusive_dmerge_max (const int njets) const;
     141  double exclusive_dmerge_max (const int & njets) const;
    129142
    130143  /// return the ymin corresponding to the recombination that went from
     
    145158
    146159
    147   //int n_exclusive_jets (const PseudoJet & jet, const double dcut) const;
     160  //int n_exclusive_jets (const PseudoJet & jet, const double & dcut) const;
    148161
    149162  /// return a vector of all subjets of the current jet (in the sense
     
    156169  /// just getting that list of constituents.
    157170  std::vector<PseudoJet> exclusive_subjets (const PseudoJet & jet,
    158                                             const double dcut) const;
     171                                            const double & dcut) const;
    159172
    160173  /// return the size of exclusive_subjets(...); still n ln n with same
     
    162175  /// exclusive_subjets.size()
    163176  int n_exclusive_subjets(const PseudoJet & jet,
    164                           const double dcut) const;
     177                          const double & dcut) const;
    165178
    166179  /// return the list of subjets obtained by unclustering the supplied
     
    180193                                                  int nsub) const;
    181194
    182   /// returns the dij that was present in the merging nsub+1 -> nsub
     195  /// return the dij that was present in the merging nsub+1 -> nsub
    183196  /// subjets inside this jet.
    184197  ///
     
    186199  double exclusive_subdmerge(const PseudoJet & jet, int nsub) const;
    187200
    188   /// returns the maximum dij that occurred in the whole event at the
     201  /// return the maximum dij that occurred in the whole event at the
    189202  /// stage that the nsub+1 -> nsub merge of subjets occurred inside
    190203  /// this jet.
     
    194207
    195208  //std::vector<PseudoJet> exclusive_jets (const PseudoJet & jet,
    196   //                                       const int njets) const;
    197   //double exclusive_dmerge (const PseudoJet & jet, const int njets) const;
     209  //                                       const int & njets) const;
     210  //double exclusive_dmerge (const PseudoJet & jet, const int & njets) const;
    198211
    199212  /// returns the sum of all energies in the event (relevant mainly for e+e-)
     
    259272// Not yet. Perhaps in a future release.
    260273//   /// print out all inclusive jets with pt > ptmin
    261 //   virtual void print_jets (const double ptmin=0.0) const;
     274//   virtual void print_jets (const double & ptmin=0.0) const;
    262275
    263276  /// add on to subjet_vector the constituents of jet (for internal use mainly)
     
    287300  ///
    288301  /// NB: after having made this call, the user is still allowed to
    289   /// delete the CS. Jets associated with it will then simply not be
    290   /// able to access their substructure after that point.
     302  /// delete the CS or let it go out of scope. Jets associated with it
     303  /// will then simply not be able to access their substructure after
     304  /// that point.
    291305  void delete_self_when_unused();
    292306
     
    299313
    300314  /// returns the scale associated with a jet as required for this
    301   /// clustering algorithm (kt^2 for the kt-algorithm, 1 for the
    302   /// Cambridge algorithm). Intended mainly for internal use and not
    303   /// valid for plugin algorithms.
     315  /// clustering algorithm (kt^2 for the kt-algorithm, 1 for the
     316  /// Cambridge algorithm). [May become virtual at some point]
    304317  double jet_scale_for_algorithm(const PseudoJet & jet) const;
    305318
     
    350363
    351364  /// the plugin can associate some extra information with the
    352   /// ClusterSequence object by calling this function. The
    353   /// ClusterSequence takes ownership of the pointer (and
    354   /// responsibility for deleting it when the CS gets deleted).
    355   inline void plugin_associate_extras(Extras * extras_in) {
    356     _extras.reset(extras_in);
    357   }
    358 
    359   /// the plugin can associate some extra information with the
    360365  /// ClusterSequence object by calling this function
    361   ///
    362   /// As of FJ v3.1, this is deprecated, in line with the deprecation
    363   /// of auto_ptr in C++11
    364366  inline void plugin_associate_extras(std::auto_ptr<Extras> extras_in) {
     367    //_extras = extras_in;
    365368    _extras.reset(extras_in.release());
    366369  }
     
    596599//DEP   /// clustering, provided for legacy purposes. The jet finder is that
    597600//DEP   /// specified in the static member _default_jet_algorithm.
    598 //DEP   void _initialise_and_run (const double R,
     601//DEP   void _initialise_and_run (const double & R,
    599602//DEP                       const Strategy & strategy,
    600603//DEP                       const bool & writeout_combinations);
     
    619622  /// jet_j, at distance scale dij; return the index newjet_k of the
    620623  /// result of the recombination of i and j.
    621   void _do_ij_recombination_step(const int jet_i, const int jet_j,
    622                                  const double dij, int & newjet_k);
     624  void _do_ij_recombination_step(const int & jet_i, const int & jet_j,
     625                                 const double & dij, int & newjet_k);
    623626
    624627  /// carry out an recombination step in which _jets[jet_i] merges with
    625628  /// the beam,
    626   void _do_iB_recombination_step(const int jet_i, const double diB);
     629  void _do_iB_recombination_step(const int & jet_i, const double & diB);
    627630
    628631  /// every time a jet is added internally during clustering, this
     
    637640  void _update_structure_use_count();
    638641 
    639   /// returns a suggestion for the best strategy to use on event
    640   /// multiplicity, algorithm, R, etc.
    641   Strategy _best_strategy() const;
    642  
    643   /// \if internal_doc
    644   /// \class _Parabola
    645   /// returns c*(a*R**2 + b*R + 1);
    646   /// Written as a class in case we want to give names to different
    647   /// parabolas
    648   /// \endif
    649   class _Parabola {
    650   public:
    651     _Parabola(double a, double b, double c) : _a(a), _b(b), _c(c) {}
    652     inline double operator()(const double R) const {return _c*(_a*R*R + _b*R + 1);}
    653   private:
    654     double _a, _b, _c;
    655   };
    656 
    657   /// \if internal_doc
    658   /// \class _Line
    659   /// operator()(R) returns a*R+b;
    660   /// \endif
    661   class _Line {
    662   public:
    663     _Line(double a, double b) : _a(a), _b(b) {}
    664     inline double operator()(const double R) const {return _a*R + _b;}
    665   private:
    666     double _a, _b;
    667   };
    668642
    669643  /// This contains the physical PseudoJets; for each PseudoJet one
     
    707681
    708682  bool _plugin_activated;
     683  //std::auto_ptr<Extras> _extras; // things the plugin might want to add
    709684  SharedPtr<Extras> _extras; // things the plugin might want to add
    710685
     
    730705  void _fast_NsqrtN_cluster();
    731706
    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);
     707  void _add_step_to_history(const int & step_number, const int & parent1,
     708                               const int & parent2, const int & jetp_index,
     709                               const double & dij);
    735710
    736711  /// internal routine associated with the construction of the unique
     
    751726
    752727  /// currently used only in the Voronoi based code
    753   void _add_ktdistance_to_map(const int ii,
     728  void _add_ktdistance_to_map(const int & ii,
    754729                              DistMap & DijMap,
    755730                              const DynamicNearestNeighbours * DNN);
     
    759734  static bool _first_time;
    760735
    761   /// manage warnings related to exclusive jets access
    762   static LimitedWarning _exclusive_warnings;
     736  /// record the number of warnings provided about the exclusive
     737  /// algorithm -- so that we don't print it out more than a few
     738  /// times.
     739  static int _n_exclusive_warnings;
    763740
    764741  /// the limited warning member for notification of user that
     
    777754    int        _jets_index;
    778755  };
     756
    779757
    780758  /// structure analogous to BriefJet, but with the extra information
     
    884862  // routines for tiled case, including some overloads of the plain
    885863  // BriefJet cases
    886   int  _tile_index(const double eta, const double phi) const;
     864  int  _tile_index(const double & eta, const double & phi) const;
    887865  void _tj_set_jetinfo ( TiledJet * const jet, const int _jets_index);
    888866  void  _bj_remove_from_tiles(TiledJet * const jet);
     
    893871  void _add_untagged_neighbours_to_tile_union(const int tile_index,
    894872                 std::vector<int> & tile_union, int & n_near_tiles);
     873
    895874
    896875  //----------------------------------------------------------------------
     
    944923// template<class L> ClusterSequence::ClusterSequence (
    945924//                                const std::vector<L> & pseudojets,
    946 //                                const double R,
     925//                                const double & R,
    947926//                                const Strategy & strategy,
    948927//                                const bool & writeout_combinations) {
     
    987966
    988967inline unsigned int ClusterSequence::n_particles() const {return _initial_n;}
    989 
    990 //----------------------------------------------------------------------
    991 // implementation of JetDefinition::operator() is here to avoid nasty
    992 // issues of order of implementations and includes
    993 template<class L>
    994 std::vector<PseudoJet> JetDefinition::operator()(const std::vector<L> & particles) const {
    995   // create a new cluster sequence
    996   ClusterSequence * cs = new ClusterSequence(particles, *this);
    997 
    998   // get the jets, and sort them according to whether the algorithm
    999   // is spherical or not
    1000   std::vector<PseudoJet> jets;
    1001   if (is_spherical()) {
    1002     jets = sorted_by_E(cs->inclusive_jets());
    1003   } else {
    1004     jets = sorted_by_pt(cs->inclusive_jets());
    1005   }
    1006  
    1007   // make sure the ClusterSequence gets deleted once it's no longer
    1008   // needed
    1009   if (jets.size() != 0) {
    1010     cs->delete_self_when_unused();
    1011   } else {
    1012     delete cs;
    1013   }
    1014 
    1015   return jets;
    1016 }
    1017968
    1018969
  • external/fastjet/ClusterSequence1GhostPassiveArea.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequence1GhostPassiveArea.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/ClusterSequence1GhostPassiveArea.hh"
  • external/fastjet/ClusterSequence1GhostPassiveArea.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequence1GhostPassiveArea.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: ClusterSequence1GhostPassiveArea.hh 2687 2011-11-14 11:17:51Z soyez $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLUSTERSEQUENCE1GHOSTPASSIVEAREA_HH__
  • external/fastjet/ClusterSequenceActiveArea.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceActiveArea.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/PseudoJet.hh"
  • external/fastjet/ClusterSequenceActiveArea.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceActiveArea.hh 3619 2014-08-13 14:17:19Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: ClusterSequenceActiveArea.hh 2687 2011-11-14 11:17:51Z soyez $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLUSTERSEQUENCEACTIVEAREA_HH__
     
    8583  /// the background (e.g. non-jet) activity in a highly populated event; the
    8684  /// one that has been most extensively tested is median.
    87   ///
    88   /// These strategies are OBSOLETE and deprecated (see comment
    89   /// for pt_per_unit_area).
    9085  enum mean_pt_strategies{median=0, non_ghost_median, pttot_over_areatot,
    9186                          pttot_over_areatot_cut, mean_ratio_cut, play,
     
    9893  /// have pt/area > median(pt/area)*range.
    9994  ///
    100   /// NB: This call is OBSOLETE and deprecated; use a
    101   /// JetMedianBackgroundEstimator or GridMedianBackgroundEstimator
    102   /// instead.
     95  /// NB: This call is OBSOLETE; use media_pt_per_unit_area from the
     96  //      ClusterSequenceAreaBase class instead
    10397  double pt_per_unit_area(mean_pt_strategies strat=median,
    10498                          double range=2.0 ) const;
    10599
     100  // following code removed -- now dealt with by AreaBase class (and
     101  // this definition here conflicts with it).
     102//   /// fits a form pt_per_unit_area(y) = a + b*y^2 in the range
     103//   /// abs(y)<raprange (for negative raprange, it defaults to
     104//   /// _safe_rap_for_area).
     105//   void parabolic_pt_per_unit_area(double & a,double & b, double raprange=-1.0,
     106//                                double exclude_above=-1.0,
     107//                                bool use_area_4vector=false ) const;
     108//
    106109  /// rewrite the empty area from the parent class, so as to use
    107110  /// all info at our disposal
  • external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceActiveAreaExplicitGhosts.cc 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh"
  • external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceActiveAreaExplicitGhosts.hh 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: ClusterSequenceActiveAreaExplicitGhosts.hh 2687 2011-11-14 11:17:51Z soyez $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLUSTERSEQUENCEACTIVEAREAEXPLICITGHOSTS_HH_
  • external/fastjet/ClusterSequenceArea.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceArea.cc 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2006-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    5 //
    6 //----------------------------------------------------------------------
    7 // This file is part of FastJet.
    8 //
    9 //  FastJet is free software; you can redistribute it and/or modify
    10 //  it under the terms of the GNU General Public License as published by
    11 //  the Free Software Foundation; either version 2 of the License, or
    12 //  (at your option) any later version.
    13 //
    14 //  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    17 //  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
    20 //
    21 //  FastJet is distributed in the hope that it will be useful,
    22 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
    23 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    24 //  GNU General Public License for more details.
    25 //
    26 //  You should have received a copy of the GNU General Public License
    27 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    28 //----------------------------------------------------------------------
    29 //FJENDHEADER
    30 
    311#include "fastjet/ClusterSequenceArea.hh"
    322
  • external/fastjet/ClusterSequenceArea.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceArea.hh 3484 2014-07-29 21:39:39Z soyez $
    3 //
    4 // Copyright (c) 2006-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: ClusterSequenceArea.hh 2690 2011-11-14 14:57:54Z soyez $
     3//
     4// Copyright (c) 2006-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLUSTERSEQUENCEAREA_HH__
     
    247245    break;
    248246  default:
    249     std::ostringstream err;
    250     err << "Error: unrecognized area_type in ClusterSequenceArea:"
    251         << _area_def.area_type();
    252     throw Error(err.str());
    253     //exit(-1);
     247    std::cerr << "Error: unrecognized area_type in ClusterSequenceArea:"
     248              << _area_def.area_type() << std::endl;
     249    exit(-1);
    254250  }
    255251  // now copy across the information from the area base class
  • external/fastjet/ClusterSequenceAreaBase.cc

    r37deb3b rba7fc1e  
    11
    2 //FJSTARTHEADER
    3 // $Id: ClusterSequenceAreaBase.cc 3433 2014-07-23 08:17:03Z salam $
    4 //
    5 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     2//STARTHEADER
     3// $Id$
     4//
     5// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    66//
    77//----------------------------------------------------------------------
     
    1414//
    1515//  The algorithms that underlie FastJet have required considerable
    16 //  development. They are described in the original FastJet paper,
    17 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     16//  development and are described in hep-ph/0512210. If you use
    1817//  FastJet as part of work towards a scientific publication, please
    19 //  quote the version you use and include a citation to the manual and
    20 //  optionally also to hep-ph/0512210.
     18//  include a citation to the FastJet paper.
    2119//
    2220//  FastJet is distributed in the hope that it will be useful,
     
    2826//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2927//----------------------------------------------------------------------
    30 //FJENDHEADER
     28//ENDHEADER
    3129
    3230
  • external/fastjet/ClusterSequenceAreaBase.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceAreaBase.hh 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: ClusterSequenceAreaBase.hh 2687 2011-11-14 11:17:51Z soyez $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLUSTERSEQUENCEAREABASE_HH__
  • external/fastjet/ClusterSequencePassiveArea.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequencePassiveArea.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/ClusterSequencePassiveArea.hh"
  • external/fastjet/ClusterSequencePassiveArea.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequencePassiveArea.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: ClusterSequencePassiveArea.hh 2687 2011-11-14 11:17:51Z soyez $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLUSTERSEQUENCEPASSIVEAREA_HH__
  • external/fastjet/ClusterSequenceStructure.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceStructure.cc 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/ClusterSequenceStructure.hh"
  • external/fastjet/ClusterSequenceStructure.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceStructure.hh 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: ClusterSequenceStructure.hh 3071 2013-04-01 12:52:46Z cacciari $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/ClusterSequenceVoronoiArea.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceVoronoiArea.cc 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2006-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    5 //
    6 //----------------------------------------------------------------------
    7 // This file is part of FastJet.
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2006-2007 Matteo Cacciari, Gavin Salam and Gregory Soyez
     5//
     6//----------------------------------------------------------------------
     7// This file is part of a simple command-line handling environment
    88//
    99//  FastJet is free software; you can redistribute it and/or modify
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/ClusterSequenceVoronoiArea.hh"
     
    278276  //  -- first the initial ones
    279277  _voronoi_area.reserve(2*n_particles());
    280   _voronoi_area_4vector.reserve(2*n_particles());
    281278  for (unsigned int i=0; i<n_particles(); i++) {
    282279    _voronoi_area.push_back(_pa_calc->area(i));
  • external/fastjet/ClusterSequenceVoronoiArea.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceVoronoiArea.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: ClusterSequenceVoronoiArea.hh 2687 2011-11-14 11:17:51Z soyez $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLUSTERSEQUENCEVORONOIAREA_HH__
     
    6866    return _voronoi_area[jet.cluster_hist_index()];}
    6967
    70   /// return a 4-vector area associated with the given jet -- strictly
     68  /// return a 4-vector area associated with the given jet -- stricly
    7169  /// this is not the exact 4-vector area, but rather an approximation
    7270  /// made of sums of centres of all Voronoi cells in jet, each
  • external/fastjet/ClusterSequenceWithArea.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequenceWithArea.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: ClusterSequenceWithArea.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2006-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2006-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLUSTERSEQUENCEWITHAREA_HH__
  • external/fastjet/ClusterSequence_CP2DChan.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequence_CP2DChan.cc 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/ClusterSequence.hh"
  • external/fastjet/ClusterSequence_Delaunay.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequence_Delaunay.cc 3475 2014-07-29 11:57:23Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    8785    throw Error(err.str());
    8886    //assert(false);
    89   } else
     87  }
    9088#endif // DROP_CGAL
    9189  {
    92     //ostringstream err;
    93     //err << "ERROR: Unrecognized value for strategy: "<<_strategy<<endl;
    94     //throw Error(err.str());
    95     //-----------------------------------------------------------------
    96     // The code should never reach this point, because the checks above
    97     // should always handle all _strategy values for which
    98     // _delaunay_cluster() is called
     90    ostringstream err;
     91    err << "ERROR: Unrecognized value for strategy: "<<_strategy<<endl;
    9992    assert(false);
     93    throw Error(err.str());
    10094  }
    10195
     
    223217///
    224218void ClusterSequence::_add_ktdistance_to_map(
    225                           const int ii,
     219                          const int & ii,
    226220                          DistMap & DijMap,
    227221                          const DynamicNearestNeighbours * DNN) {
  • external/fastjet/ClusterSequence_DumbN3.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequence_DumbN3.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/ClusterSequence_N2.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequence_N2.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/ClusterSequence_TiledN2.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClusterSequence_TiledN2.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
    30 
    31 
    32 // The tiled N^2 part of the ClusterSequence class -- separated out
     27//ENDHEADER
     28
     29
     30// The plain N^2 part of the ClusterSequence class -- separated out
    3331// from the rest of the class implementation so as to speed up
    3432// compilation of this particular part while it is under test.
     
    4139#include "fastjet/ClusterSequence.hh"
    4240#include "fastjet/internal/MinHeap.hh"
    43 #include "fastjet/internal/TilingExtent.hh"
    4441
    4542FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     
    9794  _tile_size_phi = twopi / _n_tiles_phi; // >= _Rparam and fits in 2pi
    9895
    99   TilingExtent tiling_analysis(*this);
    100   _tiles_eta_min = tiling_analysis.minrap();
    101   _tiles_eta_max = tiling_analysis.maxrap();
    102 
    103   // // always include zero rapidity in the tiling region
    104   // _tiles_eta_min = 0.0;
    105   // _tiles_eta_max = 0.0;
    106   // // but go no further than following
    107   // const double maxrap = 7.0;
    108   //
    109   // // and find out how much further one should go
    110   // for(unsigned int i = 0; i < _jets.size(); i++) {
    111   //   double eta = _jets[i].rap();
    112   //   // first check if eta is in range -- to avoid taking into account
    113   //   // very spurious rapidities due to particles with near-zero kt.
    114   //   if (abs(eta) < maxrap) {
    115   //     if (eta < _tiles_eta_min) {_tiles_eta_min = eta;}
    116   //     if (eta > _tiles_eta_max) {_tiles_eta_max = eta;}
    117   //   }
    118   // }
     96  // always include zero rapidity in the tiling region
     97  _tiles_eta_min = 0.0;
     98  _tiles_eta_max = 0.0;
     99  // but go no further than following
     100  const double maxrap = 7.0;
     101
     102  // and find out how much further one should go
     103  for(unsigned int i = 0; i < _jets.size(); i++) {
     104    double eta = _jets[i].rap();
     105    // first check if eta is in range -- to avoid taking into account
     106    // very spurious rapidities due to particles with near-zero kt.
     107    if (abs(eta) < maxrap) {
     108      if (eta < _tiles_eta_min) {_tiles_eta_min = eta;}
     109      if (eta > _tiles_eta_max) {_tiles_eta_max = eta;}
     110    }
     111  }
    119112
    120113  // now adjust the values
     
    174167//----------------------------------------------------------------------
    175168/// return the tile index corresponding to the given eta,phi point
    176 int ClusterSequence::_tile_index(const double eta, const double phi) const {
     169int ClusterSequence::_tile_index(const double & eta, const double & phi) const {
    177170  int ieta, iphi;
    178171  if      (eta <= _tiles_eta_min) {ieta = 0;}
     
    256249/// their "tagged" status is false; when a neighbour is added its
    257250/// tagged status is set to true.
    258 ///
    259 /// Note that with a high level of warnings (-pedantic -Wextra -ansi,
    260 /// gcc complains about tile_index maybe being used uninitialised for
    261 /// oldB in ClusterSequence::_minheap_faster_tiled_N2_cluster(). We
    262 /// have explicitly checked that it was harmless so we could disable
    263 /// the gcc warning by hand using the construct below
    264 ///
    265 ///  #pragma GCC diagnostic push
    266 ///  #pragma GCC diagnostic ignored "-Wpragmas"
    267 ///  #pragma GCC diagnostic ignored "-Wuninitialized"
    268 ///  #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
    269 ///    ...
    270 ///  #pragma GCC diagnostic pop
    271 ///
    272 /// the @GCC diagnostic push/pop directive was only introduced in
    273 /// gcc-4.6, so for broader usage, we'd need to insert #pragma GCC
    274 /// diagnostic ignored "-Wpragmas" at the top of this file
    275251inline void ClusterSequence::_add_untagged_neighbours_to_tile_union(
    276252               const int tile_index,
     
    298274  TiledJet * jetA = briefjets, * jetB;
    299275  TiledJet oldB;
    300   oldB.tile_index=0; // prevents a gcc warning
     276  oldB.tile_index=0; // prevents a gcc warning 
    301277
    302278  // will be used quite deep inside loops, but declare it here so that
     
    541517  TiledJet * jetA = briefjets, * jetB;
    542518  TiledJet oldB;
    543   oldB.tile_index=0; // prevents a gcc warning
     519  oldB.tile_index=0; // prevents a gcc warning 
    544520
    545521  // will be used quite deep inside loops, but declare it here so that
     
    579555    // when we set NN for both jetA and jetB on the RH tiles.
    580556  }
     557
    581558 
    582559  // now create the diJ (where J is i's NN) table -- remember that
     
    744721}
    745722
     723
     724
    746725//----------------------------------------------------------------------
    747726/// run a tiled clustering, with our minheap for keeping track of the
     
    756735  TiledJet oldB;
    757736  oldB.tile_index=0; // prevents a gcc warning
     737 
    758738
    759739  // will be used quite deep inside loops, but declare it here so that
  • external/fastjet/CompositeJetStructure.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CompositeJetStructure.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include <fastjet/CompositeJetStructure.hh>
     
    153151  double a_err=0;
    154152  for (unsigned i = 0; i < _pieces.size(); i++)
    155     a_err += _pieces[i].area_error();
     153    a_err += _pieces[i].area();
    156154
    157155  return a_err;
  • external/fastjet/CompositeJetStructure.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CompositeJetStructure.hh 3652 2014-09-03 13:31:13Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: CompositeJetStructure.hh 3071 2013-04-01 12:52:46Z cacciari $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    112110  virtual bool is_pure_ghost(const PseudoJet &reference) const;
    113111
    114   //unused: // allows one to modify the area information
    115   //unused: // (for use in join())
    116   //unused: //
    117   //unused: // This member cannot be used by users who need to create a jet with
    118   //unused: // user-supplied area information, because it sets only the 4-vector
    119   //unused: // part of the area, but not all the other area information
    120   //unused: // (e.g. scalar area) -- that other information is always deduced
    121   //unused: // dynamically from the individual constituents.
    122   //unused: // ------------------------------------------------------------------------------
    123   //unused: void set_area_information(PseudoJet *area_4vector_ptr){
    124   //unused:   _area_4vector_ptr = area_4vector_ptr;
    125   //unused: }
    126 
    127   /// disable the area of the composite jet
    128   ///
    129   /// this can be used e.g. to discard the area of a composite jet
    130   /// made of pieces with non-explicit-ghost area since the area may
    131   /// by erroneous in that case
    132   void discard_area(){
    133     if (_area_4vector_ptr) delete _area_4vector_ptr;
    134     _area_4vector_ptr = 0;
     112  // allow to modify the area information
     113  // (for use in join())
     114  //------------------------------------------------------------------------------
     115  void set_area_information(PseudoJet *area_4vector_ptr){
     116    _area_4vector_ptr = area_4vector_ptr;
    135117  }
    136118
     
    244226                                    const JetDefinition::Recombiner & recombiner){
    245227  std::vector<PseudoJet> pieces;
    246   pieces.reserve(2);
    247228  pieces.push_back(j1);
    248229  pieces.push_back(j2);
     
    256237                                    const JetDefinition::Recombiner & recombiner){
    257238  std::vector<PseudoJet> pieces;
    258   pieces.reserve(3);
    259239  pieces.push_back(j1);
    260240  pieces.push_back(j2);
     
    269249                                    const JetDefinition::Recombiner & recombiner){
    270250  std::vector<PseudoJet> pieces;
    271   pieces.reserve(4);
    272251  pieces.push_back(j1);
    273252  pieces.push_back(j2);
  • external/fastjet/Dnn2piCylinder.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Dnn2piCylinder.cc 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/Dnn3piCylinder.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Dnn3piCylinder.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/Dnn4piCylinder.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Dnn4piCylinder.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/DnnPlane.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: DnnPlane.cc 3442 2014-07-24 07:20:49Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    3533#include<list>
    3634#include "fastjet/internal/DnnPlane.hh"
    37 
    3835using namespace std;
    3936
    4037FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
    41 
    42 const double DnnPlane::DISTANCE_FOR_CGAL_CHECKS=1.0e-12; 
    4338
    4439
     
    5853       _TR.insert(Point(input_points[i].first, input_points[i].second));
    5954
    60     // check if we are dealing with coincident vertices
    61     int coinciding_index = _CheckIfVertexPresent(sv.vertex, i);
    62     if (coinciding_index == i){
    63       // we need to associate an index to each vertex -- thus when we get
    64       // a vertex (e.g. as a nearest neighbour) from CGAL, we will be
    65       // able to figure out which particle it corresponded to.
    66       sv.vertex->info() = sv.coincidence = i;
    67     } else {
    68       //cout << "  coincident with " << coinciding_index << endl;
    69       // the new vertex points to the already existing one and we
    70       // record the coincidence
    71       //
    72       // Note that we must not only set the coincidence of the
    73       // currently-added particle, the one it coincides with also
    74       // needs be updated (taking into account that it might already
    75       // coincide with another one)
    76       //
    77       // An example may help. Say coinciding_index = i1 and we're adding i2==i.
    78       // Then _sv[i2].coincidence = i1; _sv[i1].coincidence = i2. In both
    79       // cases sv.vertex->info() == i1;
    80       //
    81       // Later on we add i3; we find out that its coinciding index is i1;
    82       // so we set _sv[i3].coincidence = i2 and sv[i1].coincidence = i3.
    83       //
    84       // This gives us the structure
    85       //  _supervertex[i1].coincidence == in
    86       //  _supervertex[i2].coincidence == i1
    87       //  ...
    88       //  _supervertex[in].coincidence == in-1
    89       //
    90       sv.coincidence = _supervertex[coinciding_index].coincidence; // handles cases with previous coincidences
    91       _supervertex[coinciding_index].coincidence = i;
    92     }
    93      
     55    // we are not up to dealing with coincident vertices, so make
     56    // sure the user knows!
     57    _CrashIfVertexPresent(sv.vertex, i);
     58   
     59    // we need to assicate an index to each vertex -- thus when we get
     60    // a vertex (e.g. as a nearest neighbour) from CGAL, we will be
     61    // able to figure out which particle it corresponded to.
     62    sv.vertex->info() = i;
    9463    _supervertex.push_back(sv);   
    9564  }
     
    10776/// Crashes if the given vertex handle already exists. Otherwise
    10877/// it does the bookkeeping for future such tests
    109 int DnnPlane::_CheckIfVertexPresent(
    110         const Vertex_handle & vertex, const int its_index) {
     78void DnnPlane::_CrashIfVertexPresent(
     79        const Vertex_handle & vertex, const int & its_index) {
     80  if (!_crash_on_coincidence) return;
     81
    11182  // vertices that do not have the same geometric position as any
    11283  // other vertex so far added have info().val() == NEW_VERTEX -- this
     
    11990  // DNN:DNN) to be equal to a vertex "index".
    12091  if (vertex->info().val() != NEW_VERTEX) {
    121     if (_crash_on_coincidence){
    122       ostringstream err;
    123       err << "Error: DnnPlane::_CheckIfVertexPresent"
    124           << "Point "<<its_index<<" coincides with point "
    125           <<vertex->info().val() << endl;
    126       throw DnnError(err.str());
    127     }
    128     return vertex->info().val();
    129   }
    130 
    131   return its_index;
     92    ostringstream err;
     93    err << "ERROR in DnnPlane::_CrashIfVertexPresent"
     94         <<endl << "Point "<<its_index<<" coincides with point "
     95         <<vertex->info().val() << endl;
     96    throw DnnError(err.str());
     97  }
    13298}
    13399
     
    150116                          vector<int> & indices_of_updated_neighbours) {
    151117
    152   if (_verbose) cout << "Starting  DnnPlane::RemoveAndAddPoints" << endl;
    153118
    154119  // build set of UNION of Voronoi neighbours of a pair of nearest
     
    159124  set<int> indices_removed;
    160125
    161   // for each of the indices to be removed add the voronoi
    162   // neighbourhood to the NeighbourUnion set as well as the coinciding
    163   // points that had the current point as coincidence before.
     126  // for each of the indices to be removed add the voronoi neighbourhood to
     127  // the NeighbourUnion set.
    164128  for (size_t ir = 0; ir < indices_to_remove.size(); ir++) {
    165129    int index = indices_to_remove[ir];
    166130    indices_removed.insert(index);
    167     if (_verbose) cout << "  scheduling point " << index << " for removal" << endl;
    168 
    169     if (_supervertex[index].coincidence != index){
    170       // we have a coincidence
    171       //
    172       // The only one of the coincident points that has to be
    173       // inserted in the neighbourhood list (and thus updated) is the
    174       // one that has 'index' as coincidence.
    175       int new_index = _supervertex[index].coincidence;
    176       while (_supervertex[new_index].coincidence != index)
    177         new_index = _supervertex[new_index].coincidence;
    178       if (_verbose) cout << "  inserted coinciding " << new_index << " to neighbours union" << endl;
    179       NeighbourUnion.insert(new_index);
    180 
    181       // if this is the point among the coiciding ones that holds the
    182       // CGAL vertex, then also insert the CGAL neighbours, otherwise
    183       // just skip that step.
    184       if (index != _supervertex[index].vertex->info().val()) continue;
    185     }
    186 
     131    if (_verbose) cout << " Starting  RemoveAndAddPoints" << endl;
     132    if (_verbose) cout << " point " << index << endl;                   
    187133    // have a circulators that will go round the Voronoi neighbours of
    188134    // _supervertex[index1].vertex
    189135    Vertex_circulator vc = _TR.incident_vertices(_supervertex[index].vertex);
    190136    Vertex_circulator done = vc;
    191     if (vc != NULL){ // a safety check in case there is no Voronoi
    192                      // neighbour (which may happen e.g. if we just
    193                      // have a bunch of coincident points)
    194       do  {
    195         // if a neighbouring vertex is not the infinite vertex, then add it
    196         // to our union of neighbouring vertices.
    197         if (_verbose) cout << "examining " << vc->info().val() << endl;
    198         if (vc->info().val() != INFINITE_VERTEX) {
    199           // NB: from it=1 onwards occasionally it might already have
    200           // been inserted -- but double insertion still leaves only one
    201           // copy in the set, so there's no problem
    202           NeighbourUnion.insert(vc->info().val());
    203           if (_verbose) cout << "  inserted " << vc->info().val() << " to neighbours union" << endl;
    204         }
    205       } while (++vc != done);
    206     }
     137    do  {
     138      // if a neighbouring vertex not the infinite vertex, then add it
     139      // to our union of neighbouring vertices.
     140      if (_verbose) cout << "examining " << vc->info().val() << endl;
     141      if (vc->info().val() != INFINITE_VERTEX) {
     142        // NB: from it=1 onwards occasionally it might already have
     143        // been inserted -- but double insertion still leaves only one
     144        // copy in the set, so there's no problem
     145        NeighbourUnion.insert(vc->info().val());
     146        if (_verbose) cout << "inserted " << vc->info().val() << endl;
     147      }
     148    } while (++vc != done);
    207149  }
    208150 
     
    218160  for (size_t ir = 0; ir < indices_to_remove.size(); ir++) {
    219161    int index = indices_to_remove[ir];
    220     if (_verbose) cout << "  removing " << index << endl;
    221162
    222163    // NeighbourUnion should not contain the points to be removed
    223164    // (because later we will assume they still exist).
    224165    NeighbourUnion.erase(indices_to_remove[ir]);
    225 
    226     // first deal with  coincidences
    227     if (_supervertex[index].coincidence != index){
    228       int new_index = _supervertex[index].coincidence;
    229 
    230       // if this is the point among the coiciding ones that "owns" the
    231       // CGAL vertex we need to re-label the CGAL vertex so that it
    232       // points to the coincident particle and set the current one to
    233       // NULL
    234       //
    235       // This can be done only on the first point as they all share
    236       // the same value
    237       //
    238       // Note that this has to be done before the following step since
    239       // it will alter the coincidence information
    240       if (index == _supervertex[index].vertex->info().val())
    241         _supervertex[new_index].vertex->info() = new_index;
    242 
    243       // we need to browse the coincidences until we end the loop, at
    244       // which point we reset the coincidence of the point that has
    245       // the current one as a coincidence
    246       while (_supervertex[new_index].coincidence != index)
    247         new_index = _supervertex[new_index].coincidence;
    248       _supervertex[new_index].coincidence = _supervertex[index].coincidence;
    249 
    250       // remove the coincidence on the point being removed and mark it
    251       // as removed
    252       _supervertex[index].coincidence = index;
    253       _supervertex[index].vertex = NULL;
    254 
    255       continue;
    256     }
    257 
     166   
    258167    // points to be removed should also be eliminated from the
    259168    // triangulation and the supervertex structure should be updated
     
    283192  // of the neighbour union happens to be on the wrong side.
    284193  Face_handle face;
    285   //if (indices_to_remove.size() > 0) { // GS: use NeighbourUnion instead
    286                                         //     (safe also in case of coincidences)
    287   if (NeighbourUnion.size() > 0) {
     194  if (indices_to_remove.size() > 0) {
    288195    // face can only be found if there were points to remove in first place
    289196    face = _TR.incident_faces(
     
    297204    int index = _supervertex.size()-1;
    298205    indices_added.push_back(index);
    299     if (_verbose) cout << "  adding " << index << endl;
    300 
    301     //if (indices_to_remove.size() > 0) {
    302     if (NeighbourUnion.size() > 0) {
     206
     207    if (indices_to_remove.size() > 0) {
    303208      // be careful of using face (for location hinting) only when it exists
    304209      _supervertex[index].vertex = _TR.insert(Point(points_to_add[ia].first,
     
    308213                                                    points_to_add[ia].second));
    309214    }
    310 
    311     // check if this leads to a coincidence
    312     int coinciding_index = _CheckIfVertexPresent(_supervertex[index].vertex, index);
    313     if (coinciding_index == index){
    314       // we need to associate an index to each vertex -- thus when we get
    315       // a vertex (e.g. as a nearest neighbour) from CGAL, we will be
    316       // able to figure out which particle it corresponded to.
    317       _supervertex[index].vertex->info() = _supervertex[index].coincidence = index;
    318     } else {
    319       if (_verbose) cout << "  coinciding with vertex " << coinciding_index << endl;
    320       // the new vertex points to an already existing one and we
    321       // record the coincidence
    322       //
    323       // we also update the NN of the coinciding particle (to avoid
    324       // having to loop over the list of coinciding neighbours later)
    325       // This is done first as it allows us to check if this is a new
    326       // coincidence or a coincidence added to a particle that was
    327       // previously "alone"
    328       _supervertex[coinciding_index].NNindex = index;
    329       _supervertex[coinciding_index].NNdistance = 0.0;
    330       indices_of_updated_neighbours.push_back(coinciding_index);
    331 
    332       // Note that we must not only set the coincidence of the
    333       // currently-added particle, the one it coincides with also
    334       // needs be updated (taking into account that it might already
    335       // coincide with another one)
    336       _supervertex[index].coincidence = _supervertex[coinciding_index].coincidence; // handles cases with previous coincidences
    337       _supervertex[coinciding_index].coincidence = index;
    338 
    339     }
     215    // we are not up to dealing with coincident vertices, so make
     216    // sure the user knows!
     217    _CrashIfVertexPresent(_supervertex[index].vertex, index);
     218    _supervertex[index].vertex->info() = index;
    340219   
    341220    // first find nearest neighbour of "newpoint" (shorthand for
     
    348227    indices_of_updated_neighbours.push_back(index);
    349228    _SetAndUpdateNearest(index, indices_of_updated_neighbours);
    350 
    351     //cout << "Added: " << setprecision(20) << " ("
    352     //     << points_to_add[ia].first << "," << points_to_add[ia].second
    353     //     << ") with index " << index << endl;
    354229  }
    355230
     
    376251  }
    377252
    378   if (_verbose) cout << "Leaving  DnnPlane::RemoveAndAddPoints" << endl;
    379 }
     253}
     254
    380255
    381256//----------------------------------------------------------------------
    382257/// Determines the index and distance of the nearest neighbour to
    383258/// point j and puts the information into the _supervertex entry for j.
    384 void DnnPlane::_SetNearest (const int j) {
    385   // first deal with the cases where we have a coincidence
    386   if (_supervertex[j].coincidence != j){
    387     _supervertex[j].NNindex = _supervertex[j].coincidence;
    388     _supervertex[j].NNdistance = 0.0;
    389     return;
    390   }
    391 
    392   // The code below entirely uses CGAL distance comparisons to compute
    393   // the nearest neighbour. It has the mais drawback to induice a
    394   // 10-20% time penalty so we switched to our own comparison (which
    395   // only turns to CGAL for dangerous situations)
    396   //
    397   //  Vertex_handle current = _supervertex[j].vertex;
    398   //  Vertex_circulator vc = _TR.incident_vertices(current);
    399   //  Vertex_circulator done = vc;
    400   //  Vertex_handle nearest = _TR.infinite_vertex();
    401   //  double mindist = HUGE_DOUBLE;
    402   //
    403   //   // when there is only one finite point left in the triangulation,
    404   //   // there are no triangles. Presumably this is why voronoi returns
    405   //   // NULL for the incident vertex circulator. Check if this is
    406   //   // happening before circulating over it... (Otherwise it crashes
    407   //   // when looking for neighbours of last point)
    408   //   if (vc != NULL){
    409   //     // initialise the nearest vertex handle to the first incident
    410   //     // vertex that is not INFINITE_VERTEX
    411   //     while (vc->info().val() == INFINITE_VERTEX){
    412   //       vc++;
    413   //       if (vc==done) break; // if vc==done, then INFINITE_VERTEX is the
    414   //                       // only element in the neighbourhood
    415   //     }
    416   //
    417   //     // if there is just the infinite vertex, we have vc->info().val()
    418   //     // == INFINITE_VERTEX and nothing has to be done
    419   //     // otherwise, use the current vc as an initialisation
    420   //     if (vc->info().val() != INFINITE_VERTEX){
    421   //       nearest = vc; // initialisation to the first non-infinite vertex
    422   //
    423   //       // and loop over the following ones
    424   //       while (++vc != done){
    425   //    // we should not compare with the infinite vertex
    426   //    if (vc->info().val() == INFINITE_VERTEX) continue;
    427   //
    428   //    if (_verbose) cout << current->info().val() << " " << vc->info().val() << endl;
    429   //    // use CGAL's distance comparison to check if 'vc' is closer to
    430   //    // 'current' than the nearest so far (we include the == case for
    431   //    // safety though it should not matter in this precise case)
    432   //    if (CGAL::compare_distance_to_point(current->point(), vc->point(), nearest->point())!=CGAL::LARGER){
    433   //      nearest = vc;
    434   //      if (_verbose) cout << "nearer";
    435   //    }
    436   //       }
    437   //
    438   //       // now compute the distance
    439   //       //
    440   //       // Note that since we're always using CGAL to compare distances
    441   //       // (and never the distance computed using _euclid_distance) we
    442   //       // should not worry about rounding errors in mindist
    443   //       mindist = _euclid_distance(current->point(), nearest->point());
    444   //     }
    445   //   }
    446   //
    447   //  // set j's supervertex info about nearest neighbour
    448   //  _supervertex[j].NNindex = nearest->info().val();
    449   //  _supervertex[j].NNdistance = mindist;
    450 
     259void DnnPlane::_SetNearest (const int & j) {
    451260  Vertex_handle current = _supervertex[j].vertex;
    452261  Vertex_circulator vc = _TR.incident_vertices(current);
     
    455264  double mindist = HUGE_DOUBLE; // change this to "HUGE" or max_double?
    456265  Vertex_handle nearest = _TR.infinite_vertex();
    457  
     266
    458267  // when there is only one finite point left in the triangulation,
    459268  // there are no triangles. Presumably this is why voronoi returns
     
    465274      // find distance between j and its Voronoi neighbour (vc)
    466275      if (_verbose) cout << current->info().val() << " " << vc->info().val() << endl;
    467 
     276      dist = _euclid_distance(current->point(), vc->point());
    468277      // check if j is closer to vc than vc's currently registered
    469278      // nearest neighbour (and update things if it is)
    470       if (_is_closer_to(current->point(), vc->point(), nearest, dist, mindist)){
    471         nearest = vc;
    472         if (_verbose) cout << "nearer ";
     279      if (dist < mindist) {
     280        mindist = dist; nearest = vc;
     281        if (_verbose) cout << "nearer ";
    473282      }
    474283      if (_verbose) cout << vc->point() << "; "<< dist << endl;
    475284    }
    476285  } while (++vc != done); // move on to next Voronoi neighbour
    477  
    478286  // set j's supervertex info about nearest neighbour
    479287  _supervertex[j].NNindex = nearest->info().val();
     
    483291//----------------------------------------------------------------------
    484292/// Determines and stores the nearest neighbour of j, and where
    485 /// necessary updates the nearest-neighbour info of Voronoi neighbours
     293/// necessary update the nearest-neighbour info of Voronoi neighbours
    486294/// of j;
    487295///
     
    496304/// NB: note that we have _SetAndUpdateNearest as a completely
    497305///     separate routine from _SetNearest because we want to
    498 ///     use one single circulation over voronoi neighbours to find the
     306///     use one single ciruclation over voronoi neighbours to find the
    499307///     nearest neighbour and to update the voronoi neighbours if need
    500308///     be.
    501309void DnnPlane::_SetAndUpdateNearest(
    502                           const int j,
     310                          const int & j,
    503311                          vector<int> & indices_of_updated_neighbours) {
    504   //cout << "SetAndUpdateNearest for point " << j << endl;
    505   // first deal with coincidences
    506   if (_supervertex[j].coincidence != j){
    507     _supervertex[j].NNindex = _supervertex[j].coincidence;
    508     _supervertex[j].NNdistance = 0.0;
    509     //cout << "  set to coinciding point " << _supervertex[j].coincidence << endl;
    510     return;
    511   }
    512312
    513313  Vertex_handle current = _supervertex[j].vertex;
     
    526326    if (vc->info().val() != INFINITE_VERTEX) {
    527327      if (_verbose) cout << current->info().val() << " " << vc->info().val() << endl;
    528 
     328      // find distance between j and its Voronoi neighbour (vc)
     329      dist = _euclid_distance(current->point(), vc->point());
    529330      // update the mindist if we are closer than anything found so far
    530       if (_is_closer_to(current->point(), vc->point(), nearest, dist, mindist)){
    531         nearest = vc;
    532         if (_verbose) cout << "nearer ";
     331      if (dist < mindist) {
     332        mindist = dist; nearest = vc;
     333        if (_verbose) cout << "nearer ";
    533334      }
    534 
    535335      // find index corresponding to vc for easy manipulation
    536336      int vcindx = vc->info().val();
    537337      if (_verbose) cout << vc->point() << "; "<< dist << endl;
    538 
    539       if (_is_closer_to_with_hint(vc->point(), current->point(),
    540                                   _supervertex[_supervertex[vcindx].NNindex].vertex,
    541                                   dist, _supervertex[vcindx].NNdistance)){
     338      // check if j is closer to vc than vc's currently registered
     339      // nearest neighbour (and update things if it is)
     340      if (dist < _supervertex[vcindx].NNdistance) {
    542341        if (_verbose) cout << vcindx << "'s NN becomes " << current->info().val() << endl;
     342        _supervertex[vcindx].NNdistance = dist;
    543343        _supervertex[vcindx].NNindex = j;
    544344        indices_of_updated_neighbours.push_back(vcindx);
    545345      }
    546 
    547       // original code without the use of CGAL distance in potentially
    548       // dangerous cases
    549       //
    550       // // check if j is closer to vc than vc's currently registered
    551       // // nearest neighbour (and update things if it is)
    552       // //
    553       // // GS: originally, the distance test below was a strict <. It
    554       // //     has to be <= because if the two distances are ==, it is
    555       // //     possible that the old NN is no longer connected to vc in
    556       // //     the triangulation, and we are sure that the newly
    557       // //     inserted point (j) is (since we loop over j's
    558       // //     neighbouring points in the triangulation).
    559       // if (dist <= _supervertex[vcindx].NNdistance) {
    560       //        if (_verbose) cout << vcindx << "'s NN becomes " << current->info().val() << endl;
    561       //        _supervertex[vcindx].NNdistance = dist;
    562       //        _supervertex[vcindx].NNindex = j;
    563       //        indices_of_updated_neighbours.push_back(vcindx);
    564       // }
    565346    }
    566347  } while (++vc != done); // move on to next Voronoi neighbour
    567348  // set j's supervertex info about nearest neighbour
    568   //cout << "  set to point " << nearest->info().val() << endl;
    569349  _supervertex[j].NNindex = nearest->info().val();
    570350  _supervertex[j].NNdistance = mindist;
  • external/fastjet/Error.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Error.cc 3695 2014-09-18 13:57:56Z cacciari $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/Error.hh"
     
    3331#include <sstream>
    3432
    35 #ifndef __FJCORE__
    3633// printing the stack would need execinfo
    3734#ifdef FASTJET_HAVE_EXECINFO_H
    3835#include <execinfo.h>
    3936#include <cstdlib>
    40 #ifdef FASTJET_HAVE_DEMANGLING_SUPPORT
    41 #include <cstdio>
    42 #include <cxxabi.h>
    43 #endif // FASTJET_HAVE_DEMANGLING_SUPPORT
    44 #endif // FASTJET_HAVE_EXECINFO_H
    45 #endif  // __FJCORE__
     37#endif
    4638
    4739FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     
    5244bool Error::_print_backtrace = false;
    5345ostream * Error::_default_ostr = & cerr;
    54 #if (!defined(FASTJET_HAVE_EXECINFO_H)) || defined(__FJCORE__)
    55   LimitedWarning Error::_execinfo_undefined;
    56 #endif
    5746
    58 //----------------------------------------------------------------------
    59 #ifndef __FJCORE__
    60 
    61 // demangling only is included, i.e. --enable-demangling is specified
    62 // at configure time, execinfo.h is present and the GNU C++ ABI is
    63 // supported
    64 #if defined(FASTJET_HAVE_EXECINFO_H) && defined(FASTJET_HAVE_DEMANGLING_SUPPORT)
    65 // demangle a given backtrace symbol
    66 //
    67 // Notes:
    68 //  - at the moment, only the symbol is parsed.
    69 //  - one can get the offset by using
    70 //      "%*[^(]%*[^_]%127[^+)]%64[+x0123456789abcdef]", symbol, offset
    71 //    and checking if sscanf returns 0, 1 or 2
    72 //    (offset includes the leading +)
    73 //  - Similarly one could exctract the address and try to convert it
    74 //    into a filename+line number like addr2line does but this seems
    75 //    to require exteral dependencies. If we want to go down that
    76 //    route, one could look into the inplementation o faddr2line(.c)
    77 //    and/or dladdr.
    78 string Error::_demangle(const char* symbol) {
    79   size_t size;
    80   int status;
    81   char temp[128];
    82   char* demangled;
    83   // first, try to demangle a c++ name
    84   // decryption:
    85   //   %*[^(]  matches any number of characters different from "("
    86   //           the * tells not to store in input var
    87   //   %*[^_]  matches any number of characters different from "_"
    88   //           the * tells not to store in input var
    89   //   %127[^)+]  matches at most 127 characters different from "+"
    90   //              match is stored
    91   if (1 == sscanf(symbol, "%*[^(]%*[^_]%127[^)+]", temp)) {
    92     //cout << symbol << " -> " << temp << endl;
    93     if (NULL != (demangled = abi::__cxa_demangle(temp, NULL, &size, &status))) {
    94       string result(demangled);
    95       free(demangled);
    96       return result;
    97     }
    98   }
    99   //if that didn't work, try to get a regular c symbol
    100   if (1 == sscanf(symbol, "%127s", temp)) {
    101     return temp;
    102   }
    103  
    104   //if all else fails, just return the symbol
    105   return symbol;
    106 }
    107 #endif  // FASTJET_HAVE_DEMANGLING_SUPPORT && FASTJET_HAVE_EXECINFO_H
    108 #endif  // __FJCORE__
    109 
    110 
    111 //----------------------------------------------------------------------
    11247Error::Error(const std::string & message_in) {
    11348  _message = message_in;
    114 
    11549  if (_print_errors && _default_ostr){
    11650    ostringstream oss;
    11751    oss << "fastjet::Error:  "<< message_in << endl;
    11852
    119 #ifndef __FJCORE__
    12053    // only print the stack if execinfo is available and stack enabled
    12154#ifdef FASTJET_HAVE_EXECINFO_H
     
    12962      oss << "stack:" << endl;
    13063      for (int i = 1; i < size && messages != NULL; ++i){
    131 #ifdef FASTJET_HAVE_DEMANGLING_SUPPORT
    132         oss << "  #" << i << ": " << _demangle(messages[i])
    133             << " [" << messages[i]  << "]" << endl;
    134 #else
    13564        oss << "  #" << i << ": " << messages[i] << endl;
    136 #endif
    13765      }
    13866      free(messages);
    13967    }
    140 #endif  // FASTJET_HAVE_EXECINFO_H
    141 #endif  // __FJCORE__
     68#endif
    14269
    14370    *_default_ostr << oss.str();
     
    15683}
    15784
    158 //----------------------------------------------------------------------
    159 void Error::set_print_backtrace(bool enabled) {
    160 #if (!defined(FASTJET_HAVE_EXECINFO_H)) || defined(__FJCORE__)
    161   if (enabled) {
    162     _execinfo_undefined.warn("Error::set_print_backtrace(true) will not work with this build of FastJet");
    163   }
    164 #endif   
    165   _print_backtrace = enabled;
    166 }
    167 
    16885FASTJET_END_NAMESPACE
    16986
  • external/fastjet/Error.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_ERROR_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: Error.hh 3694 2014-09-18 13:21:54Z soyez $
     4//STARTHEADER
     5// $Id: Error.hh 2577 2011-09-13 15:11:38Z salam $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include<iostream>
    3533#include<string>
    3634#include "fastjet/internal/base.hh"
    37 #include "fastjet/config.h"
    38 #if (!defined(FASTJET_HAVE_EXECINFO_H)) || defined(__FJCORE__)
    39 #include "fastjet/LimitedWarning.hh"
    40 #endif
    4135
    4236FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     
    6963  /// controls whether the backtrace is printed out with the error message or not.
    7064  /// The default is "false".
    71   static void set_print_backtrace(bool enabled);
     65  static void set_print_backtrace(bool enabled) {_print_backtrace = enabled;}
    7266
    7367  /// sets the default output stream for all errors; by default
     
    7872
    7973private:
    80 
    81 #ifndef __FJCORE__
    82 #if defined(FASTJET_HAVE_EXECINFO_H) && defined(FASTJET_HAVE_DEMANGLING_SUPPORT)
    83   /// demangle a given backtrace symbol
    84   std::string _demangle(const char* symbol);
    85 #endif
    86 #endif
    87 
    8874  std::string _message;                ///< error message
    8975  static bool _print_errors;           ///< do we print anything?
    9076  static bool _print_backtrace;        ///< do we print the backtrace?
    9177  static std::ostream * _default_ostr; ///< the output stream (cerr if not set)
    92 #if (!defined(FASTJET_HAVE_EXECINFO_H)) || defined(__FJCORE__)
    93   static LimitedWarning _execinfo_undefined;
    94 #endif
    9578};
    9679
  • external/fastjet/FunctionOfPseudoJet.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: FunctionOfPseudoJet.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include <fastjet/FunctionOfPseudoJet.hh>
  • external/fastjet/FunctionOfPseudoJet.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_FUNCTION_OF_PSEUDOJET_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: FunctionOfPseudoJet.hh 3433 2014-07-23 08:17:03Z salam $
     4//STARTHEADER
     5// $Id: FunctionOfPseudoJet.hh 2577 2011-09-13 15:11:38Z salam $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include <fastjet/PseudoJet.hh>
     
    5149  FunctionOfPseudoJet(){}
    5250
    53   // ctor that creates a constant function
    54   //----------
    55   // this declaration was present in versions of FJ from 3.0.0 to 3.0.6,
    56   // but never implemented. It is being removed from 3.0.7 upwards
    57   // to avoid misleading users
    58   //FunctionOfPseudoJet(const TOut &constant_value);
     51  /// ctor that creates a constant function
     52  FunctionOfPseudoJet(const TOut &constant_value);
    5953
    6054  /// default dtor (virtual to allow safe polymorphism)
  • external/fastjet/GhostedAreaSpec.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: GhostedAreaSpec.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/GhostedAreaSpec.hh"
  • external/fastjet/GhostedAreaSpec.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: GhostedAreaSpec.hh 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: GhostedAreaSpec.hh 2728 2011-11-20 14:18:59Z salam $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    124122
    125123  // for accessing values set by the user
    126   inline double ghost_rapmax () const {return _ghost_maxrap;}
     124  inline double ghost_etamax () const {return _ghost_maxrap;}
    127125  inline double ghost_maxrap () const {return _ghost_maxrap;}
    128   inline double ghost_etamax () const {return _ghost_maxrap;}
    129   inline double ghost_maxeta () const {return _ghost_maxrap;}
    130126  inline double ghost_area   () const {return _ghost_area   ;}
    131127  inline double grid_scatter () const {return _grid_scatter;}
     
    144140  // when explicitly modifying values, sometimes call the initializer
    145141  inline void set_ghost_area   (double val) {_ghost_area    = val; _initialize();}
    146   inline void set_ghost_rapmax (double val) {_ghost_maxrap = val; _initialize();}
     142  inline void set_ghost_etamax (double val) {_ghost_maxrap = val; _initialize();}
    147143  inline void set_ghost_maxrap (double val) {_ghost_maxrap = val; _initialize();}
    148   inline void set_ghost_etamax (double val) {_ghost_maxrap = val; _initialize();}
    149   inline void set_ghost_maxeta (double val) {_ghost_maxrap = val; _initialize();}
    150144  inline void set_grid_scatter (double val) {_grid_scatter   = val; }
    151145  inline void set_pt_scatter   (double val) {_pt_scatter     = val; }
  • external/fastjet/JetDefinition.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: JetDefinition.cc 3677 2014-09-09 22:45:25Z soyez $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/JetDefinition.hh"
     
    7068  // cross-check the number of parameters that were declared in setting up the
    7169  // algorithm (passed internally from the public constructors)
    72   unsigned int nparameters_expected = n_parameters_for_algorithm(jet_algorithm_in);
    73   if (nparameters != (int) nparameters_expected){
    74     ostringstream oss;
    75     oss << "The jet algorithm you requested ("
    76         << jet_algorithm_in << ") should be constructed with " << nparameters_expected
    77         << " parameter(s) but was called with " << nparameters << " parameter(s)\n";
    78     throw Error(oss.str());
     70  switch (jet_algorithm_in) {
     71  case ee_kt_algorithm:
     72    if (nparameters != 0) {
     73      ostringstream oss;
     74      oss << "ee_kt_algorithm should be constructed with 0 parameters but was called with "
     75          << nparameters << " parameter(s)\n";
     76      throw Error(oss.str());
     77    }
     78    break;
     79  case genkt_algorithm:
     80  case ee_genkt_algorithm:
     81    if (nparameters != 2) {
     82      ostringstream oss;
     83      oss << "(ee_)genkt_algorithm should be constructed with 2 parameters but was called with "
     84          << nparameters << " parameter(s)\n";
     85      throw Error(oss.str());
     86    }
     87    break;
     88  default:
     89    if (nparameters != 1) {
     90      ostringstream oss;
     91      oss << "The jet algorithm you requested ("
     92          << jet_algorithm_in << ") should be constructed with 1 parameter but was called with "
     93          << nparameters << " parameter(s)\n";
     94      throw Error(oss.str());
     95    }
    7996  }
    8097
     
    89106
    90107//----------------------------------------------------------------------
    91 // returns true if the jet definition involves an algorithm
    92 // intended for use on a spherical geometry (e.g. e+e- algorithms,
    93 // as opposed to most pp algorithms, which use a cylindrical,
    94 // rapidity-phi geometry).
    95 bool JetDefinition::is_spherical() const {
    96   if (jet_algorithm() == plugin_algorithm) {
    97     return plugin()->is_spherical();
    98   } else {
    99     return (jet_algorithm() == ee_kt_algorithm ||  // as of 2013-02-14, the two
    100             jet_algorithm() == ee_genkt_algorithm  // native spherical algorithms
    101             );
    102   }
    103 }
    104 
    105 //----------------------------------------------------------------------
    106108string JetDefinition::description() const {
    107   ostringstream name;
    108  
    109   name << description_no_recombiner();
    110 
    111   if ((jet_algorithm() == plugin_algorithm) || (jet_algorithm() == undefined_jet_algorithm)){
    112     return name.str();
    113   }
    114 
    115   if (n_parameters_for_algorithm(jet_algorithm()) == 0)
    116     name << " with ";
    117   else
    118     name << " and ";
    119   name << recombiner()->description();
    120 
    121   return name.str();
    122 }
    123 
    124 //----------------------------------------------------------------------
    125 string JetDefinition::description_no_recombiner() const {
    126  
    127109  ostringstream name;
    128110  if (jet_algorithm() == plugin_algorithm) {
    129111    return plugin()->description();
     112  } else if (jet_algorithm() == kt_algorithm) {
     113    name << "Longitudinally invariant kt algorithm with R = " << R();
     114    name << " and " << recombiner()->description();
     115  } else if (jet_algorithm() == cambridge_algorithm) {
     116    name << "Longitudinally invariant Cambridge/Aachen algorithm with R = "
     117         << R() ;
     118    name << " and " << recombiner()->description();
     119  } else if (jet_algorithm() == antikt_algorithm) {
     120    name << "Longitudinally invariant anti-kt algorithm with R = "
     121         << R() ;
     122    name << " and " << recombiner()->description();
     123  } else if (jet_algorithm() == genkt_algorithm) {
     124    name << "Longitudinally invariant generalised kt algorithm with R = "
     125         << R() << ", p = " << extra_param();
     126    name << " and " << recombiner()->description();
     127  } else if (jet_algorithm() == cambridge_for_passive_algorithm) {
     128    name << "Longitudinally invariant Cambridge/Aachen algorithm with R = "
     129         << R() << "and a special hack whereby particles with kt < "
     130         << extra_param() << "are treated as passive ghosts";
     131  } else if (jet_algorithm() == ee_kt_algorithm) {
     132    name << "e+e- kt (Durham) algorithm (NB: no R)";
     133    name << " with " << recombiner()->description();
     134  } else if (jet_algorithm() == ee_genkt_algorithm) {
     135    name << "e+e- generalised kt algorithm with R = "
     136         << R() << ", p = " << extra_param();
     137    name << " and " << recombiner()->description();
    130138  } else if (jet_algorithm() == undefined_jet_algorithm) {
    131     return "uninitialised JetDefinition (jet_algorithm=undefined_jet_algorithm)" ;
    132   }
    133 
    134   name << algorithm_description(jet_algorithm());
    135   switch (n_parameters_for_algorithm(jet_algorithm())){
    136   case 0: name << " (NB: no R)"; break;
    137   case 1: name << " with R = " << R(); break; // the parameter is always R
    138   case 2:
    139     // the 1st parameter is always R
    140     name << " with R = " << R();
    141     // the 2nd depends on the algorithm
    142     if (jet_algorithm() == cambridge_for_passive_algorithm){
    143       name << "and a special hack whereby particles with kt < "
    144            << extra_param() << "are treated as passive ghosts";
    145     } else {
    146       name << ", p = " << extra_param();
    147     }
    148   };
    149 
     139    name << "uninitialised JetDefinition (jet_algorithm=undefined_jet_algorithm)" ;
     140  } else {
     141    throw Error("JetDefinition::description(): unrecognized jet_algorithm");
     142  }
    150143  return name.str();
    151144}
    152145
    153 //----------------------------------------------------------------------
    154 string JetDefinition::algorithm_description(const JetAlgorithm jet_alg){
    155   ostringstream name;
    156   switch (jet_alg){
    157   case plugin_algorithm:                return "plugin algorithm";
    158   case kt_algorithm:                    return "Longitudinally invariant kt algorithm";
    159   case cambridge_algorithm:             return "Longitudinally invariant Cambridge/Aachen algorithm";
    160   case antikt_algorithm:                return "Longitudinally invariant anti-kt algorithm";
    161   case genkt_algorithm:                 return "Longitudinally invariant generalised kt algorithm";
    162   case cambridge_for_passive_algorithm: return "Longitudinally invariant Cambridge/Aachen algorithm";
    163   case ee_kt_algorithm:                 return "e+e- kt (Durham) algorithm (NB: no R)";
    164   case ee_genkt_algorithm:              return "e+e- generalised kt algorithm";
    165   case undefined_jet_algorithm:         return "undefined jet algorithm";
    166   default:
    167     throw Error("JetDefinition::algorithm_description(): unrecognized jet_algorithm");
    168   };
    169 }
    170 
    171 //----------------------------------------------------------------------
    172 unsigned int JetDefinition::n_parameters_for_algorithm(const JetAlgorithm jet_alg){
    173   switch (jet_alg) {
    174   case ee_kt_algorithm:    return 0;
    175   case genkt_algorithm:
    176   case ee_genkt_algorithm: return 2;
    177   default:                 return 1;
    178   };
    179 }
    180 
    181 //----------------------------------------------------------------------
     146
    182147void JetDefinition::set_recombination_scheme(
    183148                               RecombinationScheme recomb_scheme) {
     
    185150
    186151  // do not forget to delete the existing recombiner if needed
    187   if (_shared_recombiner()) _shared_recombiner.reset();
     152  if (_recombiner_shared()) _recombiner_shared.reset();
    188153
    189154  _recombiner = 0;
    190 }
    191 
    192 void JetDefinition::set_recombiner(const JetDefinition &other_jet_def){
    193   // make sure the "invariants" of the other jet def are sensible
    194   assert(other_jet_def._recombiner ||
    195          other_jet_def.recombination_scheme() != external_scheme);
    196 
    197   // first treat the situation where we're using the default recombiner
    198   if (other_jet_def._recombiner == 0){
    199     set_recombination_scheme(other_jet_def.recombination_scheme());
    200     return;
    201   }
    202 
    203   // in other cases, copy the pointer to the recombiner
    204   _recombiner = other_jet_def._recombiner;
    205   // set the default recombiner appropriately
    206   _default_recombiner = DefaultRecombiner(external_scheme);
    207   // and set the _shared_recombiner to the same state
    208   // as in the other_jet_def, whatever that was
    209   _shared_recombiner.reset(other_jet_def._shared_recombiner);
    210 
    211   // NB: it is tempting to go via set_recombiner and then to sort
    212   // out the shared part, but this would be dangerous in the
    213   // specific (rare?) case where other_jet_def is the same as this
    214   // it deletes_recombiner_when_unused. In that case the shared
    215   // pointer reset would delete the recombiner.
    216155}
    217156
     
    224163  if (other_jd.recombination_scheme() != scheme) return false;
    225164
    226   // if the scheme is "external", also check that they have the same
     165  // if the scheme is "external", also check that they ahve the same
    227166  // recombiner
    228167  return (scheme != external_scheme)
     
    230169}
    231170
    232 /// causes the JetDefinition to handle the deletion of the
     171/// allows to let the JetDefinition handle the deletion of the
    233172/// recombiner when it is no longer used
    234173void JetDefinition::delete_recombiner_when_unused(){
    235174  if (_recombiner == 0){
    236175    throw Error("tried to call JetDefinition::delete_recombiner_when_unused() for a JetDefinition without a user-defined recombination scheme");
    237   } else if (_shared_recombiner.get()) {
    238     throw Error("Error in JetDefinition::delete_recombiner_when_unused: the recombiner is already scheduled for deletion when unused (or was already set as shared)");
    239   }
    240 
    241   _shared_recombiner.reset(_recombiner);
     176  }
     177
     178  _recombiner_shared.reset(_recombiner);
    242179}
    243180
     
    270207  case BIpt2_scheme:
    271208    return "boost-invariant pt2 scheme recombination";
    272   case WTA_pt_scheme:
    273     return "pt-ordered Winner-Takes-All recombination";
    274   // Energy-ordering can lead to dangerous situations with particles at
    275   // rest. We instead implement the WTA_modp_scheme
    276   //
    277   //   case WTA_E_scheme:
    278   //     return "energy-ordered Winner-Takes-All recombination";
    279   case WTA_modp_scheme:
    280     return "|3-momentum|-ordered Winner-Takes-All recombination";
    281209  default:
    282210    ostringstream err;
     
    318246    weightb = pb.perp2();
    319247    break;
    320   case WTA_pt_scheme:{
    321     const PseudoJet & phard = (pa.pt2() >= pb.pt2()) ? pa : pb;
    322     /// keep y,phi and m from the hardest, sum pt
    323     pab.reset_PtYPhiM(pa.pt()+pb.pt(),
    324                       phard.rap(), phard.phi(), phard.m());
    325     return;}
    326   // Energy-ordering can lead to dangerous situations with particles at
    327   // rest. We instead implement the WTA_modp_scheme
    328   //
    329   //   case WTA_E_scheme:{
    330   //     const PseudoJet & phard = (pa.E() >= pb.E()) ? pa : pb;
    331   //     /// keep 3-momentum direction and mass from the hardest, sum energies
    332   //     ///
    333   //     /// If the particle with the largest energy is at rest, the sum
    334   //     /// remains at rest, implying that the mass of the sum is larger
    335   //     /// than the mass of pa.
    336   //     double Eab = pa.E() + pb.E();
    337   //     double scale = (phard.modp2()==0.0)
    338   //       ? 0.0
    339   //       : sqrt((Eab*Eab - phard.m2())/phard.modp2());
    340   //     pab.reset(phard.px()*scale, phard.py()*scale, phard.pz()*scale, Eab);
    341   //     return;}
    342   case WTA_modp_scheme:{
    343     // Note: we need to compute both a and b modp. And we need pthard
    344     // and its modp. If we want to avoid repeating the test and do
    345     // only 2 modp calculations, we'd have to duplicate the code (or
    346     // use a pair<const PJ&>). An alternative is to write modp_soft as
    347     // modp_ab-modp_hard but this could suffer from larger rounding
    348     // errors
    349     bool a_hardest = (pa.modp2() >= pb.modp2());
    350     const PseudoJet & phard = a_hardest ? pa : pb;
    351     const PseudoJet & psoft = a_hardest ? pb : pa;
    352     /// keep 3-momentum direction and mass from the hardest, sum modp
    353     ///
    354     /// If the hardest particle is at rest, the sum remains at rest
    355     /// (the energy of the sum is therefore the mass of pa)
    356     double modp_hard = phard.modp();
    357     double modp_ab = modp_hard + psoft.modp();
    358     if (phard.modp2()==0.0){
    359       pab.reset(0.0, 0.0, 0.0, phard.m());
    360     } else {
    361       double scale = modp_ab/modp_hard;
    362       pab.reset(phard.px()*scale, phard.py()*scale, phard.pz()*scale,
    363                 sqrt(modp_ab*modp_ab + phard.m2()));
    364     }
    365     return;}
    366248  default:
    367249    ostringstream err;
     
    399281  case BIpt_scheme:
    400282  case BIpt2_scheme:
    401   case WTA_pt_scheme:
    402   //case WTA_E_scheme:
    403   case WTA_modp_scheme:
    404283    break;
    405284  case pt_scheme:
  • external/fastjet/JetDefinition.hh

    r37deb3b rba7fc1e  
    1 #ifndef __FASTJET_JETDEFINITION_HH__
    2 #define __FASTJET_JETDEFINITION_HH__
    3 
    4 //FJSTARTHEADER
    5 // $Id: JetDefinition.hh 3677 2014-09-09 22:45:25Z soyez $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: JetDefinition.hh 2687 2011-11-14 11:17:51Z soyez $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    85//
    96//----------------------------------------------------------------------
     
    1613//
    1714//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    2016//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2318//
    2419//  FastJet is distributed in the hope that it will be useful,
     
    3025//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3126//----------------------------------------------------------------------
    32 //FJENDHEADER
     27//ENDHEADER
     28
     29#ifndef __FASTJET_JETDEFINITION_HH__
     30#define __FASTJET_JETDEFINITION_HH__
    3331
    3432#include<cassert>
     
    4947/// clustering events with kt and cambridge style algorithms.
    5048enum Strategy {
    51   /// Like N2MHTLazy9 in a number of respects, but does not calculate
    52   /// ghost-ghost distances and so does not carry out ghost-ghost
    53   /// recombination.
    54   ///
    55   /// If you want active ghosted areas, then this is only suitable for
    56   /// use with the anti-kt algorithm (or genkt with negative p), and
    57   /// does not produce any pure ghost jets. If used with active areas
    58   /// with Kt or Cam algorithms it will actually produce a passive
    59   /// area.
    60   ///
    61   /// Particles are deemed to be ghosts if their pt is below a
    62   /// threshold (currently 1e-50, hard coded as ghost_limit in
    63   /// LazyTiling9SeparateGhosts).
    64   ///
    65   /// Currently for events with a couple of thousand normal particles
    66   /// and O(10k) ghosts, this can be quicker than N2MHTLazy9, which
    67   /// would otherwise be the best strategy.
    68   ///
    69   /// New in FJ3.1
    70   N2MHTLazy9AntiKtSeparateGhosts   = -10,
    71   /// only looks into a neighbouring tile for a particle's nearest
    72   /// neighbour (NN) if that particle's in-tile NN is further than the
    73   /// distance to the edge of the neighbouring tile. Uses tiles of
    74   /// size R and a 3x3 tile grid around the particle.
    75   /// New in FJ3.1
    76   N2MHTLazy9   = -7,
    77   /// Similar to N2MHTLazy9, but uses tiles of size R/2 and a 5x5 tile
    78   /// grid around the particle.
    79   /// New in FJ3.1
    80   N2MHTLazy25   = -6,
    81   /// Like to N2MHTLazy9 but uses slightly different optimizations,
    82   /// e.g. for calculations of distance to nearest tile; as of
    83   /// 2014-07-18 it is slightly slower and not recommended for
    84   /// production use. To considered deprecated.
    85   /// New in FJ3.1
    86   N2MHTLazy9Alt   = -5,
    87   /// faster that N2Tiled above about 500 particles; differs from it
    88   /// by retainig the di(closest j) distances in a MinHeap (sort of
    89   /// priority queue) rather than a simple vector.
     49  /// fastest form about 500..10^4
    9050  N2MinHeapTiled   = -4,
    9151  /// fastest from about 50..500
     
    9757  /// worse even than the usual N^3 algorithms
    9858  N3Dumb      =  0,
    99   /// automatic selection of the best (based on N), including
    100   /// the LazyTiled strategies that are new to FJ3.1
     59  /// automatic selection of the best (based on N)
    10160  Best        =  1,
    10261  /// best of the NlnN variants -- best overall for N>10^4.
     
    12079  /// (Does not work for R>=2pi)
    12180  NlnNCam      = 12, // 2piMultD
    122   /// the automatic strategy choice that was being made in FJ 3.0
    123   /// (restricted to strategies that were present in FJ 3.0)
    124   BestFJ30     =  21,
    12581  /// the plugin has been used...
    12682  plugin_strategy = 999
     
    13187/// \enum JetAlgorithm
    13288/// the various families of jet-clustering algorithm
    133 //
    134 // [Remember to update the "is_spherical()" routine if any further
    135 // spherical algorithms are added to the list below]
    13689enum JetAlgorithm {
    13790  /// the longitudinally invariant kt algorithm
     
    149102  /// where p = extra_param()
    150103  genkt_algorithm=3,
    151   /// a version of cambridge with a special distance measure for
    152   /// particles whose pt is < extra_param(); this is not usually
    153   /// intended for end users, but is instead automatically selected
    154   /// when requesting a passive Cambridge area.
     104  /// a version of cambridge with a special distance measure for particles
     105  /// whose pt is < extra_param()
    155106  cambridge_for_passive_algorithm=11,
    156107  /// a version of genkt with a special distance measure for particles
    157108  /// whose pt is < extra_param() [relevant for passive areas when p<=0]
    158   /// ***** NB: THERE IS CURRENTLY NO IMPLEMENTATION FOR THIS ALG *******
    159109  genkt_for_passive_algorithm=13,
    160110  //.................................................................
     
    181131
    182132//======================================================================
    183 /// The various recombination schemes
    184 ///
    185 /// Note that the schemes that recombine with non-linear weighting of
    186 /// the directions (e.g. pt2, winner-takes-all) are collinear safe
    187 /// only for algorithms with a suitable ordering of the
    188 /// recombinations: orderings in which, for particles of comparable
    189 /// energies, small-angle clusterings take place before large-angle
    190 /// clusterings. This property is satisfied by all gen-kt algorithms.
    191 ///
     133/// the various recombination schemes
    192134enum RecombinationScheme {
    193135  /// summing the 4-momenta
     
    211153  /// no preprocessing
    212154  BIpt2_scheme=6,
    213   /// pt-based Winner-Takes-All (WTA) recombination: the
    214   /// result of the recombination has the rapidity, azimuth and mass
    215   /// of the the PseudoJet with the larger pt, and a pt equal to the
    216   /// sum of the two pt's
    217   WTA_pt_scheme=7,
    218   /// mod-p-based Winner-Takes-All (WTA) recombination: the result of
    219   /// the recombination gets the 3-vector direction and mass of the
    220   /// PseudoJet with the larger |3-momentum| (modp), and a
    221   /// |3-momentum| equal to the scalar sum of the two |3-momenta|.
    222   WTA_modp_scheme=8,
    223   // Energy-ordering can lead to dangerous situations with particles at
    224   // rest. We instead implement the WTA_modp_scheme
    225   //
    226   // // energy-based Winner-Takes-All (WTA) recombination: the result of
    227   // // the recombination gets the 3-vector direction and mass of the
    228   // // PseudoJet with the larger energy, and an energy equal to the
    229   // // to the sum of the two energies
    230   // WTA_E_scheme=8,
    231155  /// for the user's external scheme
    232156  external_scheme = 99
     
    320244                const Recombiner * recombiner_in,
    321245                Strategy strategy_in = Best) {
    322     *this = JetDefinition(jet_algorithm_in, R_in, xtra_param_in, external_scheme, strategy_in);
     246    *this = JetDefinition(jet_algorithm_in, R_in, external_scheme, strategy_in);
    323247    _recombiner = recombiner_in;
     248    set_extra_param(xtra_param_in);
    324249  }
    325250
     
    359284                RecombinationScheme recomb_scheme_in = E_scheme,
    360285                int nparameters_in = 1);
    361 
    362   /// cluster the supplied particles and returns a vector of resulting
    363   /// jets, sorted by pt (or energy in the case of spherical,
    364   /// i.e. e+e-, algorithms). This routine currently only makes
    365   /// sense for "inclusive" type algorithms.
    366   template <class L>
    367   std::vector<PseudoJet> operator()(const std::vector<L> & particles) const;
    368286 
    369287  /// R values larger than max_allowable_R are not allowed.
     
    379297
    380298  /// set the recombiner class to the one provided
    381   ///
    382   /// Note that in order to associate to a jet definition a recombiner
    383   /// from another jet definition, it is strongly recommended to use
    384   /// the set_recombiner(const JetDefinition &) method below. The
    385   /// latter correctly handles the situations where the jet definition
    386   /// owns the recombiner (i.e. where delete_recombiner_when_unused
    387   /// has been called). In such cases, using set_recombiner(const
    388   /// Recombiner *) may lead to memory corruption.
    389299  void set_recombiner(const Recombiner * recomb) {
    390     if (_shared_recombiner()) _shared_recombiner.reset(recomb);
     300    if (_recombiner_shared()) _recombiner_shared.reset(recomb);
    391301    _recombiner = recomb;
    392302    _default_recombiner = DefaultRecombiner(external_scheme);
    393303  }
    394304
    395   /// set the recombiner to be the same as the one of 'other_jet_def'
    396   ///
    397   /// Note that this is the recommended method to associate to a jet
    398   /// definition the recombiner from another jet definition. Compared
    399   /// to the set_recombiner(const Recombiner *) above, it correctly
    400   /// handles the case where the jet definition owns the recombiner
    401   /// (i.e. where delete_recombiner_when_unused has been called)
    402   void set_recombiner(const JetDefinition &other_jet_def);
    403 
    404305  /// calling this tells the JetDefinition to handle the deletion of
    405   /// the recombiner when it is no longer used. (Should not be called
    406   /// if the recombiner was initialised from a JetDef whose recombiner
    407   /// was already scheduled to delete itself - memory handling will
    408   /// already be automatic across both JetDef's in that case).
     306  /// the recombiner when it is no longer used
    409307  void delete_recombiner_when_unused();
    410308
     
    412310  const Plugin * plugin() const {return _plugin;};
    413311
    414   /// calling this causes the JetDefinition to handle the deletion of the
     312  /// allows to let the JetDefinition handle the deletion of the
    415313  /// plugin when it is no longer used
    416314  void delete_plugin_when_unused();
     
    435333  void set_extra_param(double xtra_param) {_extra_param = xtra_param;}
    436334
    437   /// returns a pointer to the currently defined recombiner.
     335  /// return a pointer to the currently defined recombiner.
    438336  ///
    439337  /// Warning: the pointer may be to an internal recombiner (for
     
    449347
    450348  /// returns true if the current jet definitions shares the same
    451   /// recombiner as the one passed as an argument
     349  /// recombiner as teh one passed as an argument
    452350  bool has_same_recombiner(const JetDefinition &other_jd) const;
    453 
    454   /// returns true if the jet definition involves an algorithm
    455   /// intended for use on a spherical geometry (e.g. e+e- algorithms,
    456   /// as opposed to most pp algorithms, which use a cylindrical,
    457   /// rapidity-phi geometry).
    458   bool is_spherical() const;
    459351
    460352  /// return a textual description of the current jet definition
    461353  std::string description() const;
    462354
    463   /// returns a description not including the recombiner information
    464   std::string description_no_recombiner() const;
    465 
    466   /// a short textual description of the algorithm jet_alg
    467   static std::string algorithm_description(const JetAlgorithm jet_alg);
    468 
    469   /// the number of parameters associated to a given jet algorithm
    470   static unsigned int n_parameters_for_algorithm(const JetAlgorithm jet_alg);
    471355
    472356public:
     
    578462    virtual bool exclusive_sequence_meaningful() const {return false;}
    579463
    580     /// returns true if the plugin implements an algorithm intended
    581     /// for use on a spherical geometry (e.g. e+e- algorithms, as
    582     /// opposed to most pp algorithms, which use a cylindrical,
    583     /// rapidity-phi geometry).
    584     virtual bool is_spherical() const {return false;}
    585 
    586464    /// a destructor to be replaced if necessary in derived classes...
    587465    virtual ~Plugin() {};
     
    603481  DefaultRecombiner _default_recombiner;
    604482  const Recombiner * _recombiner;
    605   SharedPtr<const Recombiner> _shared_recombiner;
     483  SharedPtr<const Recombiner> _recombiner_shared;
    606484
    607485};
     
    638516
    639517
     518
     519
     520
    640521FASTJET_END_NAMESPACE
    641522
    642 // include ClusterSequence which includes the implementation of the
    643 // templated JetDefinition::operator()(...) member
    644 #include "fastjet/ClusterSequence.hh"
    645 
    646 
    647523#endif // __FASTJET_JETDEFINITION_HH__
  • external/fastjet/LimitedWarning.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: LimitedWarning.cc 3619 2014-08-13 14:17:19Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/LimitedWarning.hh"
     
    4240
    4341
    44 // /// output a warning to ostr
    45 // void LimitedWarning::warn(const std::string & warning) {
    46 //   warn(warning, _default_ostr);
    47 // }
     42/// output a warning to ostr
     43void LimitedWarning::warn(const std::string & warning) {
     44  warn(warning, _default_ostr);
     45}
    4846
    49 void LimitedWarning::warn(const char * warning, std::ostream * ostr) {
     47void LimitedWarning::warn(const std::string & warning, std::ostream * ostr) {
    5048  if (_this_warning_summary == 0) {
    5149    // prepare the information for the summary
     
    5654    // prepare the warning within a string stream
    5755    ostringstream warnstr;
    58     warnstr << "WARNING from FastJet: ";
     56    warnstr << "WARNING: ";
    5957    warnstr << warning;
    6058    _n_warn_so_far++;
  • external/fastjet/LimitedWarning.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_LIMITEDWARNING_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: LimitedWarning.hh 3622 2014-08-13 14:45:45Z salam $
     4//STARTHEADER
     5// $Id: LimitedWarning.hh 2577 2011-09-13 15:11:38Z salam $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432
     
    5250
    5351  /// constructor that provides a user-set max number of warnings
    54   LimitedWarning(int max_warn_in) : _max_warn(max_warn_in), _n_warn_so_far(0), _this_warning_summary(0) {}
     52  LimitedWarning(int max_warn) : _max_warn(max_warn), _n_warn_so_far(0), _this_warning_summary(0) {}
    5553
    5654  /// outputs a warning to standard error (or the user's default
    5755  /// warning stream if set)
    58   void warn(const char * warning) {warn(warning, _default_ostr);}
    59 
    60   /// outputs a warning to standard error (or the user's default
    61   /// warning stream if set)
    62   void warn(const std::string & warning) {warn(warning.c_str(), _default_ostr);}
     56  void warn(const std::string & warning);
    6357
    6458  /// outputs a warning to the specified stream
    65   void warn(const char * warning, std::ostream * ostr);
    66 
    67   /// outputs a warning to the specified stream
    68   void warn(const std::string & warning, std::ostream * ostr) {warn(warning.c_str(), ostr);}
     59  void warn(const std::string & warning, std::ostream * ostr);
    6960
    7061  /// sets the default output stream for all warnings (by default
     
    7970    _max_warn_default = max_warn;
    8071  }
    81 
    82   /// the maximum number of warning messages that will be printed
    83   /// by this instance of the class
    84   int max_warn() const {return _max_warn;}
    85 
    86   /// the number of times so far that a warning has been registered
    87   /// with this instance of the class.
    88   int n_warn_so_far() const {return _n_warn_so_far;}
    8972
    9073  /// returns a summary of all the warnings that came through the
  • external/fastjet/MinHeap.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: MinHeap.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/internal/MinHeap.hh"
     
    4543///
    4644///   . for _heap[i], the "parent" is to be found at (i-1)/2
    47 void MinHeap::initialise(const std::vector<double> & values){
     45void MinHeap::_initialise(const std::vector<double> & values){
    4846 
    4947  // fill the high-range of the heap with the largest possible value
  • external/fastjet/NNH.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_NNH_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: NNH.hh 3433 2014-07-23 08:17:03Z salam $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: NNH.hh 3203 2013-09-15 07:49:50Z salam $
     6//
     7// Copyright (c) 2009, Matteo Cacciari, Gavin Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include<fastjet/ClusterSequence.hh>
     
    140138  class NNBJ; // forward declaration
    141139 
    142   /// establish the nearest neighbour for jet, and cross check consistency
     140  /// establish the nearest neighbour for jet, and cross check constistency
    143141  /// of distances for the other jets that are encountered. Assumes
    144142  /// jet not contained within begin...end
  • external/fastjet/PseudoJet.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: PseudoJet.cc 3652 2014-09-03 13:31:13Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    178176// return the product, coeff * jet
    179177PseudoJet operator* (double coeff, const PseudoJet & jet) {
    180   // see the comment in operator*= about ensuring valid rap phi
    181   // before a multiplication to handle case of multiplication by
    182   // zero, while maintaining rapidity and phi
    183   jet._ensure_valid_rap_phi();
    184178  //return PseudoJet(coeff*jet.four_mom());
    185179  // the following code is hopefully more efficient
     
    204198/// multiply the jet's momentum by the coefficient
    205199void PseudoJet::operator*=(double coeff) {
    206   // operator*= aims to maintain the rapidity and azimuth
    207   // for the PseudoJet; if they have already been evaluated
    208   // this is fine, but if they haven't and coeff is sufficiently
    209   // small as to cause a zero or underflow result, then a subsequent
    210   // invocation of rap or phi will lead to a non-sensical result.
    211   // So, here, we preemptively ensure that rapidity and phi
    212   // are correctly cached
    213   _ensure_valid_rap_phi();
    214200  _px *= coeff;
    215201  _py *= coeff;
     
    275261
    276262//----------------------------------------------------------------------
    277 /// transform this jet (given in the rest frame of prest) into a jet
    278 /// in the lab frame
     263/// transform this jet (given in lab) into a jet in the rest
     264/// frame of prest
    279265//
    280266// NB: code adapted from that in herwig f77 (checked how it worked
     
    302288
    303289//----------------------------------------------------------------------
    304 /// transform this jet (given in lab) into a jet in the rest
    305 /// frame of prest 
     290/// transform this jet (given in the rest frame of prest) into a jet
     291/// in the lab frame;
    306292//
    307293// NB: code adapted from that in herwig f77 (checked how it worked
     
    601587// an Error is thrown if this PseudoJet has no currently valid
    602588// associated ClusterSequence
    603 std::vector<PseudoJet> PseudoJet::exclusive_subjets (const double dcut) const {
     589std::vector<PseudoJet> PseudoJet::exclusive_subjets (const double & dcut) const {
    604590  return validated_structure_ptr()->exclusive_subjets(*this, dcut);
    605591}
     
    612598// an Error is thrown if this PseudoJet has no currently valid
    613599// associated ClusterSequence
    614 int PseudoJet::n_exclusive_subjets(const double dcut) const {
     600int PseudoJet::n_exclusive_subjets(const double & dcut) const {
    615601  return validated_structure_ptr()->n_exclusive_subjets(*this, dcut);
    616602}
     
    861847PseudoJet join(const PseudoJet & j1, const PseudoJet & j2){
    862848  vector<PseudoJet> pieces;
    863   pieces.reserve(2);
    864849  pieces.push_back(j1);
    865850  pieces.push_back(j2);
     
    870855PseudoJet join(const PseudoJet & j1, const PseudoJet & j2, const PseudoJet & j3){
    871856  vector<PseudoJet> pieces;
    872   pieces.reserve(3);
    873857  pieces.push_back(j1);
    874858  pieces.push_back(j2);
     
    880864PseudoJet join(const PseudoJet & j1, const PseudoJet & j2, const PseudoJet & j3, const PseudoJet & j4){
    881865  vector<PseudoJet> pieces;
    882   pieces.reserve(4);
    883866  pieces.push_back(j1);
    884867  pieces.push_back(j2);
  • external/fastjet/PseudoJet.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: PseudoJet.hh 3566 2014-08-11 15:36:34Z salam $
     1//STARTHEADER
     2// $Id: PseudoJet.hh 3111 2013-05-04 08:17:27Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    573571  /// structure type
    574572  ///
    575   /// If there is no structure associated, an Error is thrown.
     573  /// If there is no sructure associated, an Error is thrown.
    576574  /// If the type is not met, a std::bad_cast error is thrown.
    577575  template<typename StructureType>
     
    666664  /// an Error is thrown if this PseudoJet has no currently valid
    667665  /// associated ClusterSequence
    668   std::vector<PseudoJet> exclusive_subjets (const double dcut) const;
     666  std::vector<PseudoJet> exclusive_subjets (const double & dcut) const;
    669667
    670668  /// return the size of exclusive_subjets(...); still n ln n with same
     
    674672  /// an Error is thrown if this PseudoJet has no currently valid
    675673  /// associated ClusterSequence
    676   int n_exclusive_subjets(const double dcut) const;
     674  int n_exclusive_subjets(const double & dcut) const;
    677675
    678676  /// return the list of subjets obtained by unclustering the supplied
     
    696694  std::vector<PseudoJet> exclusive_subjets_up_to (int nsub) const;
    697695
    698   /// Returns the dij that was present in the merging nsub+1 -> nsub
     696  /// return the dij that was present in the merging nsub+1 -> nsub
    699697  /// subjets inside this jet.
    700   ///
    701   /// Returns 0 if there were nsub or fewer constituents in the jet.
    702698  ///
    703699  /// an Error is thrown if this PseudoJet has no currently valid
     
    705701  double exclusive_subdmerge(int nsub) const;
    706702
    707   /// Returns the maximum dij that occurred in the whole event at the
     703  /// return the maximum dij that occurred in the whole event at the
    708704  /// stage that the nsub+1 -> nsub merge of subjets occurred inside
    709705  /// this jet.
    710   ///
    711   /// Returns 0 if there were nsub or fewer constituents in the jet.
    712706  ///
    713707  /// an Error is thrown if this PseudoJet has no currently valid
     
    808802  /// set cached rapidity and phi values
    809803  void _set_rap_phi() const;
    810 
    811   // needed for operator* to have access to _ensure_valid_rap_phi()
    812   friend PseudoJet operator*(double, const PseudoJet &);
    813804};
    814805
     
    834825/// momentum components are equal to val (=0.0)
    835826bool operator==(const PseudoJet & jet, const double val);
    836 inline bool operator==(const double val, const PseudoJet & jet) {return jet == val;}
    837827
    838828/// Can only be used with val=0 and tests whether at least one of the
    839829/// four momentum components is different from val (=0.0)
    840 inline bool operator!=(const PseudoJet & a, const double val)  {return !(a==val);}
    841 inline bool operator!=( const double val, const PseudoJet & a) {return !(a==val);}
     830inline bool operator!=(const PseudoJet & a, const double & val) {return !(a==val);}
    842831
    843832inline double dot_product(const PseudoJet & a, const PseudoJet & b) {
     
    892881    _ref_values = reference_values;
    893882  };
    894   inline int operator() (const int i1, const int i2) const {
     883  inline int operator() (const int & i1, const int & i2) const {
    895884    return  (*_ref_values)[i1] < (*_ref_values)[i2];
    896885  };
  • external/fastjet/PseudoJetStructureBase.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: PseudoJetStructureBase.cc 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/PseudoJetStructureBase.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_PSEUDOJET_STRUCTURE_BASE_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: PseudoJetStructureBase.hh 3433 2014-07-23 08:17:03Z salam $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: PseudoJetStructureBase.hh 3071 2013-04-01 12:52:46Z cacciari $
     6//
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432
     
    158156  ///
    159157  /// By default, throws an Error
    160   ///
    161   /// Note: in a future major release of FastJet (4 or higher),
    162   /// "const double & dcut" may be replaced with "const double dcut",
    163   /// requiring a modification of derived classes that overload
    164   /// this function.
    165158  virtual std::vector<PseudoJet> exclusive_subjets(const PseudoJet &reference, const double & dcut) const;
    166159
     
    170163  ///
    171164  /// By default, throws an Error
    172   ///
    173   /// Note: in a future major release of FastJet (4 or higher),
    174   /// "const double & dcut" may be replaced with "const double dcut",
    175   /// requiring a modification of derived classes that overload
    176   /// this function.
    177165  virtual int n_exclusive_subjets(const PseudoJet &reference, const double & dcut) const;
    178166
  • external/fastjet/RangeDefinition.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: RangeDefinition.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/RangeDefinition.hh"
  • external/fastjet/RangeDefinition.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: RangeDefinition.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: RangeDefinition.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_RANGEDEFINITION_HH__
  • external/fastjet/Selector.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Selector.cc 3504 2014-08-01 06:07:54Z soyez $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    9593
    9694  return n;
    97 }
    98 
    99 //----------------------------------------------------------------------
    100 // sum the momenta of the jets that pass the cuts
    101 PseudoJet Selector::sum(const std::vector<PseudoJet> & jets) const {
    102   PseudoJet this_sum(0,0,0,0);
    103   const SelectorWorker * worker_local = validated_worker();
    104  
    105   // separate strategies according to whether the worker applies jet by jet
    106   if (worker_local->applies_jet_by_jet()) {
    107     for (unsigned i = 0; i < jets.size(); i++) {
    108       if (worker_local->pass(jets[i])) this_sum += jets[i];
    109     }
    110   } else {
    111     std::vector<const PseudoJet *> jetptrs(jets.size());
    112     for (unsigned i = 0; i < jets.size(); i++) {
    113       jetptrs[i] = & jets[i];
    114     }
    115     worker_local->terminator(jetptrs);
    116     for (unsigned i = 0; i < jetptrs.size(); i++) {
    117       if (jetptrs[i]) this_sum += jets[i];
    118     }
    119   }
    120 
    121   return this_sum;
    122 }
    123 
    124 //----------------------------------------------------------------------
    125 // sum the (scalar) pt of the jets that pass the cuts
    126 double Selector::scalar_pt_sum(const std::vector<PseudoJet> & jets) const {
    127   double this_sum = 0.0;
    128   const SelectorWorker * worker_local = validated_worker();
    129  
    130   // separate strategies according to whether the worker applies jet by jet
    131   if (worker_local->applies_jet_by_jet()) {
    132     for (unsigned i = 0; i < jets.size(); i++) {
    133       if (worker_local->pass(jets[i])) this_sum += jets[i].pt();
    134     }
    135   } else {
    136     std::vector<const PseudoJet *> jetptrs(jets.size());
    137     for (unsigned i = 0; i < jets.size(); i++) {
    138       jetptrs[i] = & jets[i];
    139     }
    140     worker_local->terminator(jetptrs);
    141     for (unsigned i = 0; i < jetptrs.size(); i++) {
    142       if (jetptrs[i]) this_sum += jets[i].pt();
    143     }
    144   }
    145 
    146   return this_sum;
    14795}
    14896
     
    11071055class SW_Circle : public SW_WithReference {
    11081056public:
    1109   SW_Circle(const double radius) : _radius2(radius*radius) {}
     1057  SW_Circle(const double &radius) : _radius2(radius*radius) {}
    11101058
    11111059  /// return a copy of the current object
     
    11521100
    11531101// select on objets within a distance 'radius' of a variable location
    1154 Selector SelectorCircle(const double radius) {
     1102Selector SelectorCircle(const double & radius) {
    11551103  return Selector(new SW_Circle(radius));
    11561104}
     
    11621110class SW_Doughnut : public SW_WithReference {
    11631111public:
    1164   SW_Doughnut(const double radius_in, const double radius_out)
     1112  SW_Doughnut(const double &radius_in, const double &radius_out)
    11651113    : _radius_in2(radius_in*radius_in), _radius_out2(radius_out*radius_out) {}
    11661114
     
    12111159
    12121160// select on objets with distance from the centre is between 'radius_in' and 'radius_out'
    1213 Selector SelectorDoughnut(const double radius_in, const double radius_out) {
     1161Selector SelectorDoughnut(const double & radius_in, const double & radius_out) {
    12141162  return Selector(new SW_Doughnut(radius_in, radius_out));
    12151163}
     
    12201168class SW_Strip : public SW_WithReference {
    12211169public:
    1222   SW_Strip(const double delta) : _delta(delta) {}
     1170  SW_Strip(const double &delta) : _delta(delta) {}
    12231171
    12241172  /// return a copy of the current object
     
    12651213
    12661214// select on objets within a distance 'radius' of a variable location
    1267 Selector SelectorStrip(const double half_width) {
     1215Selector SelectorStrip(const double & half_width) {
    12681216  return Selector(new SW_Strip(half_width));
    12691217}
     
    12761224class SW_Rectangle : public SW_WithReference {
    12771225public:
    1278   SW_Rectangle(const double delta_rap, const double delta_phi)
     1226  SW_Rectangle(const double &delta_rap, const double &delta_phi)
    12791227    : _delta_rap(delta_rap),  _delta_phi(delta_phi) {}
    12801228
     
    13221270
    13231271// select on objets within a distance 'radius' of a variable location
    1324 Selector SelectorRectangle(const double half_rap_width, const double half_phi_width) {
     1272Selector SelectorRectangle(const double & half_rap_width, const double & half_phi_width) {
    13251273  return Selector(new SW_Rectangle(half_rap_width, half_phi_width));
    13261274}
  • external/fastjet/Selector.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_SELECTOR_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: Selector.hh 3711 2014-09-29 13:54:51Z salam $
    6 //
    7 // Copyright (c) 2009-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: Selector.hh 3203 2013-09-15 07:49:50Z salam $
     6//
     7// Copyright (c) 2009-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include "fastjet/PseudoJet.hh"
     
    6967  //----------------------------------------------------------
    7068
    71   /// returns true if a given object passes the selection criterion,
    72   /// and is the main function that needs to be overloaded by derived
    73   /// workers.
    74   ///
    75   /// NB: this function is used only if applies_jet_by_jet() returns
    76   /// true. If it does not, then derived classes are expected to
    77   /// (re)implement the terminator function()
     69  /// returns true if a given object passes the selection criterion.
     70  /// This has to be overloaded by derived workers
    7871  virtual bool pass(const PseudoJet & jet) const = 0;
    7972
    8073  /// For each jet that does not pass the cuts, this routine sets the
    81   /// pointer to 0.
    82   ///
    83   /// It does not assume that the PseudoJet* passed as argument are not NULL
     74  /// pointer to 0. 
     75  ///
     76  /// It does not assume that the PseudoJet* passed as argumetn are not NULL
    8477  virtual void terminator(std::vector<const PseudoJet *> & jets) const {
    8578    for (unsigned i = 0; i < jets.size(); i++) {
     
    140133    throw Error("this selector has no computable area");
    141134  }
    142 
    143135};
    144136
     
    159151  Selector(SelectorWorker * worker_in) {_worker.reset(worker_in);}
    160152
     153
    161154#ifndef __FJCORE__
    162155  /// ctor from a RangeDefinition
     
    193186  /// passes and then evaluating the size of the vector
    194187  unsigned int count(const std::vector<PseudoJet> & jets) const;
    195 
    196   /// Return the 4-vector sum of the objects that pass the selection.
    197   ///
    198   /// This will often be more efficient that getting the vector of objects that
    199   /// passes and then evaluating the size of the vector
    200   PseudoJet sum(const std::vector<PseudoJet> & jets) const;
    201 
    202   /// Return the scalar pt sum of the objects that pass the selection.
    203   ///
    204   /// This will often be more efficient that getting the vector of objects that
    205   /// passes and then evaluating the size of the vector
    206   double scalar_pt_sum(const std::vector<PseudoJet> & jets) const;
    207188
    208189  /// sift the input jets into two vectors -- those that pass the selector
     
    305286  }
    306287
    307   /// class that gets thrown when a Selector is applied despite it not
     288  /// class that gets throw when a Selector is applied despite it not
    308289  /// having a valid underlying worker.
    309290  class InvalidWorker : public Error {
     
    312293  };
    313294
    314   /// class that gets thrown when the area is requested from a Selector for which
    315   /// the area is not meaningful
     295  /// class that gets throw when a Selector is applied despite it not
     296  /// having a valid underlying worker.
    316297  class InvalidArea : public Error {
    317298  public:
     
    452433/// select objets within a distance 'radius' from the location of the
    453434/// reference jet, set by Selector::set_reference(...)
    454 Selector SelectorCircle(const double radius);
     435Selector SelectorCircle(const double & radius);
    455436
    456437/// select objets with distance from the reference jet is between 'radius_in'
    457438/// and 'radius_out'; the reference jet is set by Selector::set_reference(...)
    458 Selector SelectorDoughnut(const double radius_in, const double radius_out);
     439Selector SelectorDoughnut(const double & radius_in, const double & radius_out);
    459440
    460441/// select objets within a rapidity distance 'half_width' from the
    461442/// location of the reference jet, set by Selector::set_reference(...)
    462 Selector SelectorStrip(const double half_width);
     443Selector SelectorStrip(const double & half_width);
    463444
    464445/// select objets within rapidity distance 'half_rap_width' from the
    465446/// reference jet and azimuthal-angle distance within 'half_phi_width'; the
    466447/// reference jet is set by Selector::set_reference(...)
    467 Selector SelectorRectangle(const double half_rap_width, const double half_phi_width);
     448Selector SelectorRectangle(const double & half_rap_width, const double & half_phi_width);
    468449
    469450
  • external/fastjet/SharedPtr.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_SHARED_PTR_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: SharedPtr.hh 3433 2014-07-23 08:17:03Z salam $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: SharedPtr.hh 3129 2013-06-05 08:48:36Z salam $
     6//
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include "fastjet/internal/base.hh"
  • external/fastjet/VERSION

    r37deb3b rba7fc1e  
    1 3.1.0
     13.0.6
  • external/fastjet/Voronoi.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Voronoi.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 1994 by AT&T Bell Laboratories (see below)
     5//
    56//
    67//----------------------------------------------------------------------
    7 // This file is part of FastJet.
     8// This file is included as part of FastJet but was mostly written by
     9// S. Fortune in C, put into C++ with memory management by S
     10// O'Sullivan, and with further interface and memory management
     11// modifications by Gregory Soyez.
    812//
    9 //  FastJet is free software; you can redistribute it and/or modify
    10 //  it under the terms of the GNU General Public License as published by
    11 //  the Free Software Foundation; either version 2 of the License, or
    12 //  (at your option) any later version.
     13// Permission to use, copy, modify, and distribute this software for
     14// any purpose without fee is hereby granted, provided that this
     15// entire notice is included in all copies of any software which is or
     16// includes a copy or modification of this software and in all copies
     17// of the supporting documentation for such software. THIS SOFTWARE IS
     18// BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY.
     19// IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE ANY REPRESENTATION
     20// OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
     21// SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
    1322//
    14 //  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    17 //  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
    20 //
    21 //  FastJet is distributed in the hope that it will be useful,
    22 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
    23 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    24 //  GNU General Public License for more details.
    25 //
    26 //  You should have received a copy of the GNU General Public License
    27 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2823//----------------------------------------------------------------------
    29 //FJENDHEADER
     24//ENDHEADER
    3025
    3126
  • external/fastjet/WrappedStructure.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: WrappedStructure.hh 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: WrappedStructure.hh 2577 2011-09-13 15:11:38Z salam $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/config_auto.h

    r37deb3b rba7fc1e  
    6363#define FASTJET_ENABLE_PLUGIN_TRACKJET  /**/
    6464#endif
    65 
    66 /* defined if demangling is enabled at configure time and is supported through
    67    the GNU C++ ABI */
    68 /* #undef HAVE_DEMANGLING_SUPPORT */
    6965
    7066/* Define to 1 if you have the <dlfcn.h> header file. */
     
    151147/* Define to the full name and version of this package. */
    152148#ifndef FASTJET_PACKAGE_STRING
    153 #define FASTJET_PACKAGE_STRING  "FastJet 3.1.0"
     149#define FASTJET_PACKAGE_STRING  "FastJet 3.0.6"
    154150#endif
    155151
     
    161157/* Define to the version of this package. */
    162158#ifndef FASTJET_PACKAGE_VERSION
    163 #define FASTJET_PACKAGE_VERSION  "3.1.0"
     159#define FASTJET_PACKAGE_VERSION  "3.0.6"
    164160#endif
    165161
     
    171167/* Version number of package */
    172168#ifndef FASTJET_VERSION
    173 #define FASTJET_VERSION  "3.1.0"
     169#define FASTJET_VERSION  "3.0.6"
    174170#endif
    175 
    176 /* Major version of this package */
    177 #ifndef FASTJET_VERSION_MAJOR
    178 #define FASTJET_VERSION_MAJOR  3
    179 #endif
    180 
    181 /* Minor version of this package */
    182 #ifndef FASTJET_VERSION_MINOR
    183 #define FASTJET_VERSION_MINOR  1
    184 #endif
    185 
    186 /* Version of the package under the form XYYZZ (instead of X.Y.Z) */
    187 #ifndef FASTJET_VERSION_NUMBER
    188 #define FASTJET_VERSION_NUMBER  30100
    189 #endif
    190 
    191 /* Patch version of this package */
    192 #ifndef FASTJET_VERSION_PATCHLEVEL
    193 #define FASTJET_VERSION_PATCHLEVEL  0
    194 #endif
    195 
    196 /* Pre-release version of this package */
    197 /* #undef VERSION_PRERELEASE */
    198171 
    199172/* once: _INCLUDE_FASTJET_CONFIG_AUTO_H */
  • external/fastjet/config_raw.h

    r37deb3b rba7fc1e  
    3737/* The TrackJet plugin is enabled */
    3838#define ENABLE_PLUGIN_TRACKJET /**/
    39 
    40 /* defined if demangling is enabled at configure time and is supported through
    41    the GNU C++ ABI */
    42 /* #undef HAVE_DEMANGLING_SUPPORT */
    4339
    4440/* Define to 1 if you have the <dlfcn.h> header file. */
     
    9288
    9389/* Define to the full name and version of this package. */
    94 #define PACKAGE_STRING "FastJet 3.1.0"
     90#define PACKAGE_STRING "FastJet 3.0.6"
    9591
    9692/* Define to the one symbol short name of this package. */
     
    9894
    9995/* Define to the version of this package. */
    100 #define PACKAGE_VERSION "3.1.0"
     96#define PACKAGE_VERSION "3.0.6"
    10197
    10298/* Define to 1 if you have the ANSI C header files. */
     
    104100
    105101/* Version number of package */
    106 #define VERSION "3.1.0"
    107 
    108 /* Major version of this package */
    109 #define VERSION_MAJOR 3
    110 
    111 /* Minor version of this package */
    112 #define VERSION_MINOR 1
    113 
    114 /* Version of the package under the form XYYZZ (instead of X.Y.Z) */
    115 #define VERSION_NUMBER 30100
    116 
    117 /* Patch version of this package */
    118 #define VERSION_PATCHLEVEL 0
    119 
    120 /* Pre-release version of this package */
    121 /* #undef VERSION_PRERELEASE */
     102#define VERSION "3.0.6"
  • external/fastjet/config_win.h

    r37deb3b rba7fc1e  
    1 #define FASTJET_PACKAGE_STRING  "FastJet 3.1.0"
    2 #define FASTJET_PACKAGE_VERSION  "3.1.0"
    3 #define FASTJET_VERSION  "3.1.0"
    4 #define FASTJET_VERSION_MAJOR       3
    5 #define FASTJET_VERSION_MINOR       1
    6 #define FASTJET_VERSION_PATCHLEVEL  0
    7 #define FASTJET_VERSION_NUMBER      30100
     1#define FASTJET_PACKAGE_STRING  "FastJet 3.0.6"
     2#define FASTJET_PACKAGE_VERSION  "3.0.6"
    83
    94/* The ATLASCone plugin is disabled by default*/
  • external/fastjet/contribs/Nsubjettiness/AUTHORS

    r37deb3b rba7fc1e  
    1818   JHEP 1202:093 (2012), arXiv:1108.2701.
    1919
    20 New in v2.0 is the winner-take-all axis, described in:
    21 
    22    Jet Shapes with the Broadening Axis.
    23    Andrew J. Larkoski, Duff Neill, and Jesse Thaler.
    24    JHEP 1404:017 (2014), arXiv:1401.2158.
    25 
    26 as well as in unpublished work by Gavin Salam.
    27 
    2820----------------------------------------------------------------------
  • external/fastjet/contribs/Nsubjettiness/AxesFinder.cc

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: AxesFinder.cc 670 2014-06-06 01:24:42Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    3837template <int N>
    3938std::vector<LightLikeAxis> AxesFinderFromOnePassMinimization::UpdateAxesFast(const std::vector <LightLikeAxis> & old_axes,
    40                                   const std::vector <fastjet::PseudoJet> & inputJets) const {
     39                                  const std::vector <fastjet::PseudoJet> & inputJets) {
    4140   assert(old_axes.size() == N);
    4241   
     
    4645   for (int n = 0; n < N; ++n) {
    4746      new_axes[n].reset(0.0,0.0,0.0,0.0);
     47#ifdef FASTJET2
     48      new_jets[n].reset(0.0,0.0,0.0,0.0);
     49#else
     50      // use cheaper reset if available
    4851      new_jets[n].reset_momentum(0.0,0.0,0.0,0.0);
     52#endif
    4953   }
    5054
     
    131135// (This is just a wrapper for the templated version above.)
    132136std::vector<LightLikeAxis> AxesFinderFromOnePassMinimization::UpdateAxes(const std::vector <LightLikeAxis> & old_axes,
    133                                       const std::vector <fastjet::PseudoJet> & inputJets) const {
     137                                      const std::vector <fastjet::PseudoJet> & inputJets) {
    134138   int N = old_axes.size();
    135139   switch (N) {
     
    162166// uses minimization of N-jettiness to continually update axes until convergence.
    163167// The function returns the axes found at the (local) minimum
    164 std::vector<fastjet::PseudoJet> AxesFinderFromOnePassMinimization::getAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputJets, const std::vector<fastjet::PseudoJet>& seedAxes) const {
     168std::vector<fastjet::PseudoJet> AxesFinderFromOnePassMinimization::getBetterAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputJets, const std::vector<fastjet::PseudoJet>& seedAxes) {
    165169         
    166170   // convert from PseudoJets to LightLikeAxes
     
    207211}
    208212
    209 PseudoJet AxesFinderFromKmeansMinimization::jiggle(const PseudoJet& axis) const {
     213PseudoJet AxesFinderFromKmeansMinimization::jiggle(const PseudoJet& axis) {
    210214   double phi_noise = ((double)rand()/(double)RAND_MAX) * _noise_range * 2.0 - _noise_range;
    211215   double rap_noise = ((double)rand()/(double)RAND_MAX) * _noise_range * 2.0 - _noise_range;
     
    222226   
    223227// Repeatedly calls the one pass finder to try to find global minimum
    224 std::vector<fastjet::PseudoJet> AxesFinderFromKmeansMinimization::getAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputJets, const std::vector<fastjet::PseudoJet>& seedAxes) const {
     228std::vector<fastjet::PseudoJet> AxesFinderFromKmeansMinimization::getBetterAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputJets, const std::vector<fastjet::PseudoJet>& seedAxes) {
    225229   
    226230   // first iteration
     
    252256// It continually updates until it reaches convergence or it reaches the maximum number of attempts.
    253257// This is essentially the same as a stable cone finder.
    254 std::vector<fastjet::PseudoJet> AxesFinderFromGeometricMinimization::getAxes(int /*n_jets*/, const std::vector <fastjet::PseudoJet> & particles, const std::vector<fastjet::PseudoJet>& currentAxes) const {
     258std::vector<fastjet::PseudoJet> AxesFinderFromGeometricMinimization::getBetterAxes(int n_jets, const std::vector <fastjet::PseudoJet> & particles, const std::vector<fastjet::PseudoJet>& currentAxes) {
    255259
    256260   std::vector<fastjet::PseudoJet> seedAxes = currentAxes;
    257    double seedTau = _function.tau(particles, seedAxes);
     261   double seedTau = _function->tau(particles, seedAxes);
    258262   
    259263   for (int i = 0; i < _nAttempts; i++) {
     
    266270         // start from unclustered beam measure
    267271         int minJ = -1;
    268          double minDist = _function.beam_distance_squared(particles[i]);
     272         double minDist = _function->beam_distance_squared(particles[i]);
    269273         
    270274         // which axis am I closest to?
    271275         for (unsigned int j = 0; j < seedAxes.size(); j++) {
    272             double tempDist = _function.jet_distance_squared(particles[i],seedAxes[j]);
     276            double tempDist = _function->jet_distance_squared(particles[i],seedAxes[j]);
    273277            if (tempDist < minDist) {
    274278               minDist = tempDist;
     
    283287      // calculate tau on new axes
    284288      seedAxes = newAxes;
    285       double tempTau = _function.tau(particles, newAxes);
     289      double tempTau = _function->tau(particles, newAxes);
    286290     
    287291      // close enough to stop?
  • external/fastjet/contribs/Nsubjettiness/AxesFinder.hh

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: AxesFinder.hh 678 2014-06-12 20:43:03Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    5453class AxesFinder {
    5554   
     55protected:
     56   AxesFinder* _startingFinder; // storing a possible starting finder if needed
     57   std::vector<fastjet::PseudoJet> _seedAxes;
     58   
     59   AxesFinder(AxesFinder* startingFinder = NULL) : _startingFinder(startingFinder) {}
     60   
    5661public:
    57    
    58    // This function should be overloaded, and updates the seedAxes to return new axes
    59    virtual std::vector<fastjet::PseudoJet> getAxes(int n_jets,
    60                                                    const std::vector<fastjet::PseudoJet>& inputs,
    61                                                    const std::vector<fastjet::PseudoJet>& seedAxes) const = 0;
    62    // convenient shorthand for squaring
    63    static inline double sq(double x) {return x*x;}
    64 
    65    //virtual destructor
    66    virtual ~AxesFinder(){}
    67    
    68 };
    69 
    70    
     62   virtual ~AxesFinder(){
     63      if (_startingFinder) delete _startingFinder;  //TODO: Convert to smart pointers to avoid this.
     64   }
     65   
     66   // Allow setting of seedAxes from a starting finder
     67   std::vector<fastjet::PseudoJet> getAxes(int n_jets, const std::vector<fastjet::PseudoJet> & inputs, const std::vector<fastjet::PseudoJet>& currentAxes) {
     68      if (_startingFinder) {
     69         _seedAxes = _startingFinder->getAxes(n_jets,inputs,currentAxes);
     70         return getBetterAxes(n_jets,inputs,_seedAxes);
     71      } else {
     72         _seedAxes = getBetterAxes(n_jets,inputs,currentAxes);
     73         return _seedAxes;
     74      }
     75   }
     76   
     77   // say what the current seed axes are
     78   std::vector<fastjet::PseudoJet> seedAxes() const {
     79      return _seedAxes;
     80   }
     81   
     82   // This function should be overloaded, and updates the seedAxes
     83   virtual std::vector<fastjet::PseudoJet> getBetterAxes(int n_jets, const std::vector<fastjet::PseudoJet> & inputs, const std::vector<fastjet::PseudoJet>& seedAxes) = 0;
     84   
     85};
     86
    7187//------------------------------------------------------------------------
    7288/// \class AxesFinderFromExclusiveJetDefinition
     
    7490// with different jet algorithms.
    7591class AxesFinderFromExclusiveJetDefinition : public AxesFinder {
    76    
    77 public:
    78    AxesFinderFromExclusiveJetDefinition(fastjet::JetDefinition def)
    79    : _def(def) {}
    80    
    81    virtual std::vector<fastjet::PseudoJet> getAxes(int n_jets,
    82                                                    const std::vector <fastjet::PseudoJet> & inputs,
    83                                                    const std::vector<fastjet::PseudoJet>& /*seedAxes*/) const {
    84       fastjet::ClusterSequence jet_clust_seq(inputs, _def);
    85       return jet_clust_seq.exclusive_jets(n_jets);
    86    }
    87    
    88 private:
    89    fastjet::JetDefinition _def;
    90 
     92
     93   private:
     94      fastjet::JetDefinition _def;
     95   
     96   public:
     97      AxesFinderFromExclusiveJetDefinition(fastjet::JetDefinition def) : _def(def) {}
     98     
     99      virtual std::vector<fastjet::PseudoJet> getBetterAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputs, const std::vector<fastjet::PseudoJet>& currentAxes) {
     100         fastjet::ClusterSequence jet_clust_seq(inputs, _def);
     101         return jet_clust_seq.exclusive_jets(n_jets);
     102      }
    91103};
    92104
     
    96108// winner take all recombination scheme.
    97109class AxesFinderFromWTA_KT : public AxesFinderFromExclusiveJetDefinition {
    98 
    99 public:
    100    AxesFinderFromWTA_KT()
    101    : AxesFinderFromExclusiveJetDefinition(
    102       fastjet::JetDefinition(fastjet::kt_algorithm,
    103       fastjet::JetDefinition::max_allowable_R, //maximum jet radius constant
    104       &_recomb,
    105       fastjet::Best)) {}
    106    
    107 private:
    108    const WinnerTakeAllRecombiner _recomb;
    109 
    110 };
     110   private:
     111      const WinnerTakeAllRecombiner *recomb;
     112   public:
     113      AxesFinderFromWTA_KT() : AxesFinderFromExclusiveJetDefinition(
     114         fastjet::JetDefinition(fastjet::kt_algorithm,
     115         fastjet::JetDefinition::max_allowable_R, //maximum jet radius constant
     116         recomb = new WinnerTakeAllRecombiner(),
     117         fastjet::Best)) {}
     118      ~AxesFinderFromWTA_KT() {delete recomb;}
     119   };
    111120   
    112121//------------------------------------------------------------------------
     
    115124// winner take all recombination scheme.
    116125class AxesFinderFromWTA_CA : public AxesFinderFromExclusiveJetDefinition {
    117 public:
    118    AxesFinderFromWTA_CA()
    119    : AxesFinderFromExclusiveJetDefinition(
    120       fastjet::JetDefinition(fastjet::cambridge_algorithm,
    121       fastjet::JetDefinition::max_allowable_R, //maximum jet radius constant
    122       &_recomb,
    123       fastjet::Best)) {}
    124    
    125 private:
    126    const WinnerTakeAllRecombiner _recomb;
    127 };
    128 
     126   private:
     127      const WinnerTakeAllRecombiner *recomb;
     128   public:
     129      AxesFinderFromWTA_CA() : AxesFinderFromExclusiveJetDefinition(
     130         fastjet::JetDefinition(fastjet::cambridge_algorithm,
     131         fastjet::JetDefinition::max_allowable_R, //maximum jet radius constant
     132         recomb = new WinnerTakeAllRecombiner(),
     133         fastjet::Best)) {}
     134      ~AxesFinderFromWTA_CA() {delete recomb;}
     135};
     136
     137//  The following classes are for testing, and are commented out for initial release
     138//
     139////------------------------------------------------------------------------
     140///// \class AxesFinderFromWTA2_KT
     141//// This class finds axes by finding the exlusive jets after clustering according to a kT algorithm and a
     142//// winner take all recombination scheme with alpha = 2.
     143//class AxesFinderFromWTA2_KT : public AxesFinderFromExclusiveJetDefinition {
     144//   private:
     145//      const WinnerTakeAllRecombiner *recomb;
     146//   public:
     147//      AxesFinderFromWTA2_KT() : AxesFinderFromExclusiveJetDefinition(
     148//         fastjet::JetDefinition(fastjet::kt_algorithm,
     149//         fastjet::JetDefinition::max_allowable_R, //maximum jet radius constant
     150//         recomb = new WinnerTakeAllRecombiner(2), // uses alpha = 2 here
     151//         fastjet::Best)) {}
     152//      ~AxesFinderFromWTA2_KT() {delete recomb;}
     153//   };
     154//   
     155////------------------------------------------------------------------------
     156///// \class AxesFinderFromWTA2_CA
     157//// This class finds axes by finding the exlusive jets after clustering according to a CA algorithm and a
     158//// winner take all recombination scheme with alpha = 2.
     159//class AxesFinderFromWTA2_CA : public AxesFinderFromExclusiveJetDefinition {
     160//   private:
     161//      const WinnerTakeAllRecombiner *recomb;
     162//   public:
     163//      AxesFinderFromWTA2_CA() : AxesFinderFromExclusiveJetDefinition(
     164//         fastjet::JetDefinition(fastjet::cambridge_algorithm,
     165//         fastjet::JetDefinition::max_allowable_R, //maximum jet radius constant
     166//         recomb = new WinnerTakeAllRecombiner(2), //uses alpha = 2 here
     167//         fastjet::Best)) {}
     168//      ~AxesFinderFromWTA2_CA() {delete recomb;}
     169//};
    129170
    130171//------------------------------------------------------------------------
     
    133174// E_scheme recombination.
    134175class AxesFinderFromKT : public AxesFinderFromExclusiveJetDefinition {
    135 public:
    136    AxesFinderFromKT()
    137    : AxesFinderFromExclusiveJetDefinition(
    138       fastjet::JetDefinition(fastjet::kt_algorithm,
    139       fastjet::JetDefinition::max_allowable_R, //maximum jet radius constant
    140       fastjet::E_scheme,
    141       fastjet::Best)) {}
     176   public:
     177      AxesFinderFromKT() : AxesFinderFromExclusiveJetDefinition(
     178         fastjet::JetDefinition(fastjet::kt_algorithm,
     179         fastjet::JetDefinition::max_allowable_R, //maximum jet radius constant
     180         fastjet::E_scheme,
     181         fastjet::Best)) {}
    142182};
    143183
     
    147187// E_scheme recombination.
    148188class AxesFinderFromCA : public AxesFinderFromExclusiveJetDefinition {
    149 public:
    150    AxesFinderFromCA()
    151    : AxesFinderFromExclusiveJetDefinition(
    152       fastjet::JetDefinition(fastjet::cambridge_algorithm,
    153                              fastjet::JetDefinition::max_allowable_R,  //maximum jet radius constant
    154       fastjet::E_scheme,
    155       fastjet::Best)) {}
     189   public:
     190      AxesFinderFromCA() : AxesFinderFromExclusiveJetDefinition(
     191         fastjet::JetDefinition(fastjet::cambridge_algorithm,
     192                                fastjet::JetDefinition::max_allowable_R,  //maximum jet radius constant
     193         fastjet::E_scheme,
     194         fastjet::Best)) {}
    156195};
    157196
     
    162201// This can be implemented with different jet algorithms.
    163202class AxesFinderFromHardestJetDefinition : public AxesFinder {
    164 public:
    165    AxesFinderFromHardestJetDefinition(fastjet::JetDefinition def)
    166    : _def(def) {}
    167    
    168    virtual std::vector<fastjet::PseudoJet> getAxes(int n_jets,
    169                                                    const std::vector <fastjet::PseudoJet> & inputs,
    170                                                    const std::vector<fastjet::PseudoJet>& /*seedAxes*/) const {
    171       fastjet::ClusterSequence jet_clust_seq(inputs, _def);
    172       std::vector<fastjet::PseudoJet> myJets = sorted_by_pt(jet_clust_seq.inclusive_jets());
    173       myJets.resize(n_jets);  // only keep n hardest
    174       return myJets;
    175    }
    176    
    177 private:
    178    fastjet::JetDefinition _def;
     203
     204   private:
     205      fastjet::JetDefinition _def;
     206   
     207   public:
     208      AxesFinderFromHardestJetDefinition(fastjet::JetDefinition def) : _def(def) {}
     209     
     210      virtual std::vector<fastjet::PseudoJet> getBetterAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputs, const std::vector<fastjet::PseudoJet>& currentAxes) {
     211         fastjet::ClusterSequence jet_clust_seq(inputs, _def);
     212         std::vector<fastjet::PseudoJet> myJets = sorted_by_pt(jet_clust_seq.inclusive_jets());
     213         myJets.resize(n_jets);  // only keep n hardest
     214         return myJets;
     215      }     
    179216};
    180217
     
    184221// to an anti kT algorithm and E_scheme.
    185222class AxesFinderFromAntiKT : public AxesFinderFromHardestJetDefinition {
    186 public:
    187    AxesFinderFromAntiKT(double R0)
    188    : AxesFinderFromHardestJetDefinition(
    189       fastjet::JetDefinition(fastjet::antikt_algorithm,
    190                              R0,fastjet::E_scheme,fastjet::Best)) {}
     223   public:
     224      AxesFinderFromAntiKT(double R0) : AxesFinderFromHardestJetDefinition(fastjet::JetDefinition(fastjet::antikt_algorithm,R0,fastjet::E_scheme,fastjet::Best)) {}
    191225};
    192226
     
    197231class AxesFinderFromUserInput : public AxesFinder {
    198232
    199 public:
    200    AxesFinderFromUserInput() {}
    201    
    202    virtual std::vector<fastjet::PseudoJet> getAxes(int n_jets, const std::vector <fastjet::PseudoJet> & /*inputs*/, const std::vector<fastjet::PseudoJet>& currentAxes) const {
    203       assert(currentAxes.size() == (unsigned int) n_jets);
    204       (void)(n_jets);  // adding this line to fix unused-parameter warning
    205       return currentAxes;
    206    }
     233   public:
     234      AxesFinderFromUserInput() {}
     235     
     236      virtual std::vector<fastjet::PseudoJet> getBetterAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputs, const std::vector<fastjet::PseudoJet>& currentAxes) {
     237         assert(currentAxes.size() == (unsigned int) n_jets);
     238         return currentAxes;
     239      }
    207240};
    208241
     
    216249class AxesFinderFromOnePassMinimization : public AxesFinder {
    217250
    218 public:
    219 
    220    // From a startingFinder, try to minimize the unnormalized_measure
    221    AxesFinderFromOnePassMinimization(double beta, double Rcutoff)
    222       : _precision(0.0001), //hard coded for now
    223         _halt(1000), //hard coded for now
    224         _beta(beta),
    225         _Rcutoff(Rcutoff),
    226         _measureFunction(beta, Rcutoff)
    227         {}
    228 
    229    virtual std::vector<fastjet::PseudoJet> getAxes(int n_jets,
    230                                                    const std::vector <fastjet::PseudoJet> & inputJets,
    231                                                    const std::vector<fastjet::PseudoJet>& currentAxes) const;
    232    
    233 private:
    234    double _precision;  // Desired precision in axes alignment
    235    int _halt;  // maximum number of steps per iteration
    236    
    237    double _beta;
    238    double _Rcutoff;
    239    
    240    DefaultUnnormalizedMeasureFunction _measureFunction;
    241    
    242    template <int N> std::vector<LightLikeAxis> UpdateAxesFast(const std::vector <LightLikeAxis> & old_axes,
    243                                                               const std::vector <fastjet::PseudoJet> & inputJets) const;
    244    
    245    std::vector<LightLikeAxis> UpdateAxes(const std::vector <LightLikeAxis> & old_axes,
    246                                          const std::vector <fastjet::PseudoJet> & inputJets) const;
     251   private:
     252      double _precision;  // Desired precision in axes alignment
     253      int _halt;  // maximum number of steps per iteration
     254     
     255      double _beta;
     256      double _Rcutoff;
     257     
     258      DefaultUnnormalizedMeasure _measureFunction;
     259   
     260   public:
     261
     262      // From a startingFinder, try to minimize the unnormalized_measure
     263      AxesFinderFromOnePassMinimization(AxesFinder* startingFinder, double beta, double Rcutoff)
     264         : AxesFinder(startingFinder),
     265           _precision(0.0001), //hard coded for now
     266           _halt(1000), //hard coded for now
     267           _beta(beta),
     268           _Rcutoff(Rcutoff),
     269           _measureFunction(beta, Rcutoff)
     270           {}
     271   
     272      virtual std::vector<fastjet::PseudoJet> getBetterAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputJets, const std::vector<fastjet::PseudoJet>& currentAxes);
     273
     274      template <int N> std::vector<LightLikeAxis> UpdateAxesFast(const std::vector <LightLikeAxis> & old_axes,
     275                                  const std::vector <fastjet::PseudoJet> & inputJets);
     276   
     277      std::vector<LightLikeAxis> UpdateAxes(const std::vector <LightLikeAxis> & old_axes,
     278                                      const std::vector <fastjet::PseudoJet> & inputJets);
    247279
    248280};
     
    256288class AxesFinderFromKmeansMinimization : public AxesFinder{
    257289
    258 public:
    259    AxesFinderFromKmeansMinimization(double beta, double Rcutoff, int n_iterations)
    260    :  _n_iterations(n_iterations),
    261       _noise_range(1.0), // hard coded for the time being
    262       _measureFunction(beta, Rcutoff),
    263       _onePassFinder(beta, Rcutoff)
    264       {}
    265 
    266    virtual std::vector<fastjet::PseudoJet> getAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputJets, const std::vector<fastjet::PseudoJet>& currentAxes) const;
    267    
    268 private:
    269    int _n_iterations;   // Number of iterations to run  (0 for no minimization, 1 for one-pass, >>1 for global minimum)
    270    double _noise_range; // noise range for random initialization
    271    
    272    DefaultUnnormalizedMeasureFunction _measureFunction; //function to test whether minimum is reached
    273    
    274    AxesFinderFromOnePassMinimization _onePassFinder;  //one pass finder that is repeatedly called
    275    
    276    PseudoJet jiggle(const PseudoJet& axis) const;
     290   private:
     291      int _n_iterations;   // Number of iterations to run  (0 for no minimization, 1 for one-pass, >>1 for global minimum)
     292      double _noise_range; // noise range for random initialization
     293   
     294      DefaultUnnormalizedMeasure _measureFunction; //function to test whether minimum is reached
     295   
     296      AxesFinderFromOnePassMinimization _onePassFinder;  //one pass finder for minimization
     297
     298      PseudoJet jiggle(const PseudoJet& axis);
     299   
     300   public:
     301      AxesFinderFromKmeansMinimization(AxesFinder *startingFinder, double beta, double Rcutoff, int n_iterations) :
     302         AxesFinder(startingFinder),
     303         _n_iterations(n_iterations),
     304         _noise_range(1.0), // hard coded for the time being
     305         _measureFunction(beta, Rcutoff),
     306         _onePassFinder(NULL, beta, Rcutoff)
     307         {}
     308
     309      virtual std::vector<fastjet::PseudoJet> getBetterAxes(int n_jets, const std::vector <fastjet::PseudoJet> & inputJets, const std::vector<fastjet::PseudoJet>& currentAxes);
     310
    277311};
    278312
     
    283317class AxesFinderFromGeometricMinimization : public AxesFinder {
    284318
    285 public:
    286    AxesFinderFromGeometricMinimization(double beta, double Rcutoff)
    287    :  _nAttempts(100),
    288       _accuracy(0.000000001),
    289       _function(beta,Rcutoff)
    290    {
    291       if (beta != 2.0) {
    292          throw Error("Geometric minimization is currently only defined for beta = 2.0.");
     319   private:
     320      MeasureFunction* _function;
     321      double _Rcutoff;
     322      double _nAttempts;
     323      double _accuracy;
     324
     325   
     326   public:
     327      AxesFinderFromGeometricMinimization(AxesFinder* startingFinder, double beta, double Rcutoff) : AxesFinder(startingFinder), _Rcutoff(Rcutoff) {
     328         if (beta != 2.0) {
     329            std::cerr << "Geometric minimization is currently only defined for beta = 2.0." << std::endl;
     330            exit(1);
     331         }
     332         
     333         _nAttempts = 100;
     334         _accuracy = 0.000000001;
     335         _function = new GeometricMeasure(beta,_Rcutoff);
    293336      }
    294    }
    295 
    296    virtual std::vector<fastjet::PseudoJet> getAxes(int n_jets, const std::vector <fastjet::PseudoJet> & particles, const std::vector<fastjet::PseudoJet>& currentAxes) const;
    297 
    298 private:
    299    double _nAttempts;
    300    double _accuracy;
    301    GeometricMeasureFunction _function;
    302 
    303 
     337
     338      ~AxesFinderFromGeometricMinimization() {
     339         delete _function;
     340      }
     341   
     342      virtual std::vector<fastjet::PseudoJet> getBetterAxes(int n_jets, const std::vector <fastjet::PseudoJet> & particles, const std::vector<fastjet::PseudoJet>& currentAxes);
    304343};
    305344
     
    309348// in order to better facilitate calculations.
    310349class LightLikeAxis {
    311 
     350private:
     351   double _rap, _phi, _weight, _mom;
     352   
     353   double DistanceSq(double rap2, double phi2) const {
     354      double rap1 = _rap;
     355      double phi1 = _phi;
     356     
     357      double distRap = rap1-rap2;
     358      double distPhi = std::fabs(phi1-phi2);
     359      if (distPhi > M_PI) {distPhi = 2.0*M_PI - distPhi;}
     360      return sq(distRap) + sq(distPhi);
     361   }
     362   
     363   double Distance(double rap2, double phi2) const {
     364      return std::sqrt(DistanceSq(rap2,phi2));
     365   }
     366   
     367   
    312368public:
    313369   LightLikeAxis() : _rap(0.0), _phi(0.0), _weight(0.0), _mom(0.0) {}
     
    343399   }
    344400
    345 private:
    346    double _rap, _phi, _weight, _mom;
    347    
    348    double DistanceSq(double rap2, double phi2) const {
    349       double rap1 = _rap;
    350       double phi1 = _phi;
    351      
    352       double distRap = rap1-rap2;
    353       double distPhi = std::fabs(phi1-phi2);
    354       if (distPhi > M_PI) {distPhi = 2.0*M_PI - distPhi;}
    355       return distRap*distRap + distPhi*distPhi;
    356    }
    357    
    358    double Distance(double rap2, double phi2) const {
    359       return std::sqrt(DistanceSq(rap2,phi2));
    360    }
    361    
    362    
    363401};
    364402
  • external/fastjet/contribs/Nsubjettiness/MeasureFunction.cc

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: MeasureFunction.cc 670 2014-06-06 01:24:42Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    3736
    3837// Return all of the necessary TauComponents for specific input particles and axes
    39 TauComponents MeasureFunction::result(const std::vector<fastjet::PseudoJet>& particles, const std::vector<fastjet::PseudoJet>& axes) const {
     38TauComponents MeasureFunction::result(const std::vector<fastjet::PseudoJet>& particles, const std::vector<fastjet::PseudoJet>& axes) {
     39
     40   std::vector<double> jetPieces(axes.size(), 0.0);
     41   double beamPiece = 0.0;
    4042   
    41    // first find partition
    42    // this sets jetPartitionStorage and beamPartitionStorage
    43    PseudoJet beamPartitionStorage;
    44    std::vector<fastjet::PseudoJet> jetPartitionStorage = get_partition(particles,axes,&beamPartitionStorage);
    45    
    46    // then return result calculated from partition
    47    return result_from_partition(jetPartitionStorage,axes,&beamPartitionStorage);
    48 }
    49 
    50 std::vector<fastjet::PseudoJet> MeasureFunction::get_partition(const std::vector<fastjet::PseudoJet>& particles,
    51                                                                const std::vector<fastjet::PseudoJet>& axes,
    52                                                                PseudoJet * beamPartitionStorage) const {
    53    
    54    std::vector<std::vector<PseudoJet> > jetPartition(axes.size());
    55    std::vector<PseudoJet> beamPartition;
    56    
    57    // Figures out the partiting of the input particles into the various jet pieces
    58    // Based on which axis the parition is closest to
     43   // Calculates the unnormalized sub-tau values, i.e. a std::vector of the contributions to tau_N of each Voronoi region (or region within R_0)
    5944   for (unsigned i = 0; i < particles.size(); i++) {
    6045     
     
    7560     
    7661      if (j_min == -1) {
    77          if (_has_beam) beamPartition.push_back(particles[i]);
     62         if (_has_beam) beamPiece += beam_numerator(particles[i]);
    7863         else assert(_has_beam);  // this should never happen.
    7964      } else {
    80          jetPartition[j_min].push_back(particles[i]);
     65         jetPieces[j_min] += jet_numerator(particles[i],axes[j_min]);
    8166      }
    8267   }
    8368   
    84    // Store beam partition
    85    if (beamPartitionStorage) {
    86       *beamPartitionStorage = join(beamPartition);
    87    }
    88 
    89    // Store jet partitions
    90    std::vector<PseudoJet> jetPartitionStorage(axes.size(),PseudoJet(0,0,0,0));
    91    for (unsigned j = 0; j < axes.size(); j++) {
    92       jetPartitionStorage[j] = join(jetPartition[j]);
     69   // Calculates normalization for tau and subTau if _has_denominator is true, otherwise returns 1.0 (i.e. no normalization)
     70   double tauDen = 0.0;
     71   if (_has_denominator) {
     72      for (unsigned i = 0; i < particles.size(); i++) {
     73         tauDen += denominator(particles[i]);
     74      }
     75   } else {
     76      tauDen = 1.0; // if no denominator, then 1.0 for no normalization factor
    9377   }
    9478   
    95    return jetPartitionStorage;
    96 }
    97 
    98 // does partition, but only stores index of PseudoJets
    99 std::vector<std::list<int> > MeasureFunction::get_partition_list(const std::vector<fastjet::PseudoJet>& particles,
    100                                                                  const std::vector<fastjet::PseudoJet>& axes) const {
    101 
    102    std::vector<std::list<int> > jetPartition(axes.size());
    103    
    104    // Figures out the partiting of the input particles into the various jet pieces
    105    // Based on which axis the parition is closest to
    106    for (unsigned i = 0; i < particles.size(); i++) {
    107      
    108       // find minimum distance; start with beam (-1) for reference
    109       int j_min = -1;
    110       double minRsq;
    111       if (_has_beam) minRsq = beam_distance_squared(particles[i]);
    112       else minRsq = std::numeric_limits<double>::max(); // make it large value
    113      
    114       // check to see which axis the particle is closest to
    115       for (unsigned j = 0; j < axes.size(); j++) {
    116          double tempRsq = jet_distance_squared(particles[i],axes[j]); // delta R distance
    117          if (tempRsq < minRsq) {
    118             minRsq = tempRsq;
    119             j_min = j;
    120          }
    121       }
    122      
    123       if (j_min == -1) {
    124          assert(_has_beam); // consistency check
    125       } else {
    126          jetPartition[j_min].push_back(i);
    127       }
    128    }
    129    
    130    return jetPartition;
    131 }
    132    
    133 
    134 // Uses existing partition and calculates result
    135 // TODO:  Can we cache this for speed up when doing area subtraction?
    136 TauComponents MeasureFunction::result_from_partition(const std::vector<fastjet::PseudoJet>& jet_partition,
    137                                                      const std::vector<fastjet::PseudoJet>& axes,
    138                                                      PseudoJet * beamPartitionStorage) const {
    139    
    140    std::vector<double> jetPieces(axes.size(), 0.0);
    141    double beamPiece = 0.0;
    142    
    143    double tauDen = 0.0;
    144    if (!_has_denominator) tauDen = 1.0;  // if no denominator, then 1.0 for no normalization factor
    145    
    146    // first find jet pieces
    147    for (unsigned j = 0; j < axes.size(); j++) {
    148       std::vector<PseudoJet> thisPartition = jet_partition[j].constituents();
    149       for (unsigned i = 0; i < thisPartition.size(); i++) {
    150          jetPieces[j] += jet_numerator(thisPartition[i],axes[j]); //numerator jet piece
    151          if (_has_denominator) tauDen += denominator(thisPartition[i]); // denominator
    152       }
    153    }
    154    
    155    // then find beam piece
    156    if (_has_beam) {
    157       assert(beamPartitionStorage); // make sure I have beam information
    158       std::vector<PseudoJet> beamPartition = beamPartitionStorage->constituents();
    159 
    160       for (unsigned i = 0; i < beamPartition.size(); i++) {
    161          beamPiece += beam_numerator(beamPartition[i]); //numerator beam piece
    162          if (_has_denominator) tauDen += denominator(beamPartition[i]); // denominator
    163       }
    164    }
    16579   return TauComponents(jetPieces, beamPiece, tauDen, _has_denominator, _has_beam);
    16680}
    167 
    168    
    169    
    170    
    17181   
    17282} //namespace contrib
  • external/fastjet/contribs/Nsubjettiness/MeasureFunction.hh

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: MeasureFunction.hh 678 2014-06-12 20:43:03Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    3231#include <limits>
    3332
    34 
    3533FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
    3634
    3735namespace contrib{
    3836
     37inline double sq(double x) {return x*x;}
     38
    3939///////
    4040//
    41 // TauComponents
    42 // (eventually we might want to put this in a separate header file)
     41// Measure Function
    4342//
    4443///////
    45    
     44
    4645/// \class TauComponents
    4746// This class creates a wrapper for the various tau/subtau values calculated in Njettiness. This class allows Njettiness access to these variables
    4847// without ever having to do the calculation itself. It takes in subtau numerators and tau denominator from MeasureFunction
    4948// and outputs tau numerator, and normalized tau and subtau.
     49// TODO:  Consider merging with NjettinessExtras.  Add axes information?
    5050class TauComponents {
     51private:
     52   
     53   // these values are input in the constructor
     54   std::vector<double> _jet_pieces_numerator;
     55   double _beam_piece_numerator;
     56   double _denominator;
     57   bool _has_denominator; //added so that TauComponents knows if denominator is used or not
     58   bool _has_beam; //added so that TauComponents knows if beam regions is used or not
     59   
     60   // these values are derived from above values
     61   std::vector<double> _jet_pieces;
     62   double _beam_piece;
     63   double _numerator;
     64   double _tau;
     65   
    5166   
    5267public:
     
    100115   double beam_piece() const { return _beam_piece; }
    101116   double tau() const { return _tau; }
    102 
    103 private:
    104    
    105    // these values are input in the constructor
    106    std::vector<double> _jet_pieces_numerator;
    107    double _beam_piece_numerator;
    108    double _denominator;
    109    bool _has_denominator; //added so that TauComponents knows if denominator is used or not
    110    bool _has_beam; //added so that TauComponents knows if beam regions is used or not
    111    
    112    // these values are derived from above values
    113    std::vector<double> _jet_pieces;
    114    double _beam_piece;
    115    double _numerator;
    116    double _tau;
    117    
    118 };
    119 
    120 ///////
    121 //
    122 // Measure Function
    123 //
    124 ///////
    125 
     117   
     118};
    126119
    127120//------------------------------------------------------------------------
     
    132125class MeasureFunction {
    133126   
    134 public:
    135    //These functions define the measure by which tau_N is calculated,
    136    //and are overloaded by the various measures below
    137    
    138    // Distanes to axes.  These are called many times, so need to be as fast as possible
    139    virtual double jet_distance_squared(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) const = 0;
    140    virtual double beam_distance_squared(const fastjet::PseudoJet& particle) const = 0;
    141    
    142    // The actual measures used in N-(sub)jettiness
    143    virtual double jet_numerator(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) const  = 0;
    144    virtual double beam_numerator(const fastjet::PseudoJet& particle) const = 0;
    145    
    146    // a possible normalization factor
    147    virtual double denominator(const fastjet::PseudoJet& particle) const = 0;
    148    
    149    //------
    150    // The functions below call the above functions and are not virtual
    151    //------
    152    
    153    // Return all of the necessary TauComponents for specific input particles and axes
    154    // Also have optional pointers to get out information about partitioning
    155    TauComponents result(const std::vector<fastjet::PseudoJet>& particles, const std::vector<fastjet::PseudoJet>& axes) const;
    156 
    157    // Just getting tau value if that is all that is needed
    158    double tau(const std::vector<fastjet::PseudoJet>& particles, const std::vector<fastjet::PseudoJet>& axes) const {
    159       return result(particles,axes).tau();
    160    }
    161    
    162    // Create the partitioning and stores internally
    163    std::vector<fastjet::PseudoJet> get_partition(const std::vector<fastjet::PseudoJet>& particles, const std::vector<fastjet::PseudoJet>& axes, PseudoJet * beamPartitionStorage = NULL) const;
    164 
    165    // Essentially same as get_partition, but in the form needed for the jet algorithm
    166    std::vector<std::list<int> > get_partition_list(const std::vector<fastjet::PseudoJet>& particles, const std::vector<fastjet::PseudoJet>& axes) const;
    167 
    168    // calculates the tau result using an existing partition
    169    TauComponents result_from_partition(const std::vector<fastjet::PseudoJet>& jet_partitioning, const std::vector<fastjet::PseudoJet>& axes, PseudoJet * beamPartitionStorage = NULL) const;
    170 
    171    // shorthand for squaring
    172    static inline double sq(double x) {return x*x;}
    173 
    174    //virtual destructor
    175    virtual ~MeasureFunction(){}
    176    
    177127protected:
    178128   //bool set by derived classes to choose whether or not to use the denominator
     
    183133   MeasureFunction(bool has_denominator = true, bool has_beam = true) : _has_denominator(has_denominator), _has_beam(has_beam) {}
    184134   
    185 };
    186 
    187 
    188 /// \class DefaultNormalizedMeasureFunction
     135public:
     136   virtual ~MeasureFunction(){}
     137   
     138   //These functions define the measure by which tau_N is calculated,
     139   //and are overloaded by the various measures below
     140   
     141   // Distanes to axes.  These are called many times, so need to be as fast as possible
     142   virtual double jet_distance_squared(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) = 0;
     143   virtual double beam_distance_squared(const fastjet::PseudoJet& particle) = 0;
     144   
     145   // The actual measures used in N-(sub)jettiness
     146   virtual double jet_numerator(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) = 0;
     147   virtual double beam_numerator(const fastjet::PseudoJet& particle) = 0;
     148   
     149   // a possible normalization factor
     150   virtual double denominator(const fastjet::PseudoJet& particle) = 0;
     151   
     152   
     153   // These functions call the above functions and are not virtual
     154   
     155   // Do I cluster a particle into a jet?
     156   bool do_cluster(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) {
     157      return (jet_distance_squared(particle,axis) <= beam_distance_squared(particle));
     158   }
     159   
     160   // Return all of the necessary TauComponents for specific input particles and axes
     161   TauComponents result(const std::vector<fastjet::PseudoJet>& particles, const std::vector<fastjet::PseudoJet>& axes);
     162
     163   double tau(const std::vector<fastjet::PseudoJet>& particles, const std::vector<fastjet::PseudoJet>& axes) {
     164      return result(particles,axes).tau();
     165   }
     166
     167   
     168};
     169
     170
     171/// \class DefaultNormalizedMeasure
    189172// This class is the default measure, inheriting from the class above. This class will calculate tau_N
    190173// of a jet according to this measure. This measure is defined as the pT of the particle multiplied by deltaR
    191174// to the power of beta. This class includes the normalization factor determined by R0
    192 class DefaultNormalizedMeasureFunction : public MeasureFunction {
    193 
    194 public:
    195 
    196    DefaultNormalizedMeasureFunction(double beta, double R0, double Rcutoff, bool normalized = true)
    197    : MeasureFunction(normalized), _beta(beta), _R0(R0), _Rcutoff(Rcutoff) {}
    198 
    199    virtual double jet_distance_squared(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) const {
    200       return particle.squared_distance(axis);
    201    }
    202 
    203    virtual double beam_distance_squared(const fastjet::PseudoJet& /*particle*/) const {
    204       return sq(_Rcutoff);
    205    }
    206 
    207    virtual double jet_numerator(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) const{
    208       return particle.perp() * std::pow(jet_distance_squared(particle,axis),_beta/2.0);
    209    }
    210 
    211    virtual double beam_numerator(const fastjet::PseudoJet& particle) const {
    212       return particle.perp() * std::pow(_Rcutoff,_beta);
    213    }
    214 
    215    virtual double denominator(const fastjet::PseudoJet& particle) const {
    216       return particle.perp() * std::pow(_R0,_beta);
    217    }
    218    
    219 private:
    220    double _beta;
    221    double _R0;
    222    double _Rcutoff;
    223 
    224    
     175class DefaultNormalizedMeasure : public MeasureFunction {
     176
     177   private:
     178      double _beta;
     179      double _R0;
     180      double _Rcutoff;
     181
     182   public:
     183
     184      DefaultNormalizedMeasure(double beta, double R0, double Rcutoff, bool normalized = true)
     185      : MeasureFunction(normalized), _beta(beta), _R0(R0), _Rcutoff(Rcutoff) {}
     186
     187      virtual double jet_distance_squared(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) {
     188         return particle.squared_distance(axis);
     189      }
     190   
     191      virtual double beam_distance_squared(const fastjet::PseudoJet& particle) {
     192         return sq(_Rcutoff);
     193      }
     194
     195      virtual double jet_numerator(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) {
     196         return particle.perp() * std::pow(jet_distance_squared(particle,axis),_beta/2.0);
     197      }
     198   
     199      virtual double beam_numerator(const fastjet::PseudoJet& particle) {
     200         return particle.perp() * std::pow(_Rcutoff,_beta);
     201      }
     202
     203      virtual double denominator(const fastjet::PseudoJet& particle) {
     204         return particle.perp() * std::pow(_R0,_beta);
     205      }
     206
    225207};
    226208
    227209//------------------------------------------------------------------------
    228 /// \class DefaultUnnormalizedMeasureFunction
     210/// \class DefaultUnnormalizedMeasure
    229211// This class is the unnormalized default measure, inheriting from the class above. The only difference from above
    230212// is that the denominator is defined to be 1.0 by setting _has_denominator to false.
    231 class DefaultUnnormalizedMeasureFunction : public DefaultNormalizedMeasureFunction {
    232 
    233 public:
    234    // Since all methods are identical, UnnormalizedMeasure inherits directly
    235    // from NormalizedMeasure. R0 is a dummy value since the value of R0 is unecessary for this class,
    236    // and the "false" flag sets _has_denominator in MeasureFunction to false so no denominator is used.
    237    DefaultUnnormalizedMeasureFunction(double beta, double Rcutoff)
    238    : DefaultNormalizedMeasureFunction(beta, std::numeric_limits<double>::quiet_NaN(), Rcutoff, false) {}
     213class DefaultUnnormalizedMeasure : public DefaultNormalizedMeasure {
     214
     215   public:
     216      // Since all methods are identical, UnnormalizedMeasure inherits directly from NormalizedMeasure. R0 is defaulted to NAN since the value of R0 is unecessary for this class.
     217      // the "false" flag sets _has_denominator in MeasureFunction to false so no denominator is used.
     218      DefaultUnnormalizedMeasure(double beta, double Rcutoff) : DefaultNormalizedMeasure(beta, NAN, Rcutoff, false) {}
     219
     220      
    239221};
    240222
    241223//------------------------------------------------------------------------
    242 /// \class GeometricMeasureFunction
     224/// \class GeometricMeasure
    243225// This class is the geometic measure, inheriting from the class above. This class will calculate tau_N
    244226// of a jet according to this measure. This measure is defined by the Lorentz dot product between
    245227// the particle and the axis. This class includes normalization of tau_N.
    246 class GeometricMeasureFunction : public MeasureFunction {
    247 
    248 public:
    249    // Right now, we are hard coded for beam_beta = 1.0, but that will need to change
    250    GeometricMeasureFunction(double jet_beta, double Rcutoff) :
    251      MeasureFunction(false), // doesn't have denominator
    252      _jet_beta(jet_beta), _beam_beta(1.0), _Rcutoff(Rcutoff) {}
    253 
    254    virtual double jet_distance_squared(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) const {
    255       fastjet::PseudoJet lightAxis = lightFrom(axis);
    256       double pseudoRsquared = 2.0*dot_product(lightFrom(axis),particle)/(lightAxis.pt()*particle.pt());
    257       return pseudoRsquared;
    258    }
    259 
    260    virtual double beam_distance_squared(const fastjet::PseudoJet&  /*particle*/) const {
    261       return sq(_Rcutoff);
    262    }
    263 
    264    virtual double jet_numerator(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) const {
    265       fastjet::PseudoJet lightAxis = lightFrom(axis);
    266       double weight = (_beam_beta == 1.0) ? 1.0 : std::pow(lightAxis.pt(),_beam_beta - 1.0);
    267       return particle.pt() * weight * std::pow(jet_distance_squared(particle,axis),_jet_beta/2.0);
    268    }
    269 
    270    virtual double beam_numerator(const fastjet::PseudoJet& particle) const {
    271       double weight = (_beam_beta == 1.0) ? 1.0 : std::pow(particle.pt()/particle.e(),_beam_beta - 1.0);
    272       return particle.pt() * weight * std::pow(_Rcutoff,_jet_beta);
    273    }
    274 
    275    virtual double denominator(const fastjet::PseudoJet&  /*particle*/) const {
    276       return std::numeric_limits<double>::quiet_NaN();
    277    }
    278    
    279    
    280 private:
    281    double _jet_beta;
    282    double _beam_beta;
    283    double _Rcutoff;
    284    
    285    // create light-like axis
    286    fastjet::PseudoJet lightFrom(const fastjet::PseudoJet& input) const {
    287       double length = sqrt(pow(input.px(),2) + pow(input.py(),2) + pow(input.pz(),2));
    288       return fastjet::PseudoJet(input.px()/length,input.py()/length,input.pz()/length,1.0);
    289    }
    290 
    291 };
    292    
    293    
     228class GeometricMeasure : public MeasureFunction {
     229
     230   private:
     231      double _jet_beta;
     232      double _beam_beta;
     233      double _Rcutoff;
     234
     235      // create light-like axis
     236      fastjet::PseudoJet lightFrom(const fastjet::PseudoJet& input) const {
     237         double length = sqrt(pow(input.px(),2) + pow(input.py(),2) + pow(input.pz(),2));
     238         return fastjet::PseudoJet(input.px()/length,input.py()/length,input.pz()/length,1.0);
     239      }
     240
     241   public:
     242      // Right now, we are hard coded for beam_beta = 1.0, but that will need to change
     243      GeometricMeasure(double jet_beta, double Rcutoff) : _jet_beta(jet_beta), _beam_beta(1.0), _Rcutoff(Rcutoff) {}
     244   
     245      virtual double jet_distance_squared(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) {
     246         fastjet::PseudoJet lightAxis = lightFrom(axis);
     247         double pseudoRsquared = 2.0*dot_product(lightFrom(axis),particle)/(lightAxis.pt()*particle.pt());
     248         return pseudoRsquared;
     249      }
     250   
     251      virtual double beam_distance_squared(const fastjet::PseudoJet& particle) {
     252         return sq(_Rcutoff);
     253      }
     254
     255      virtual double jet_numerator(const fastjet::PseudoJet& particle, const fastjet::PseudoJet& axis) {
     256         fastjet::PseudoJet lightAxis = lightFrom(axis);
     257         double weight = (_beam_beta == 1.0) ? 1.0 : std::pow(lightAxis.pt(),_beam_beta - 1.0);
     258         return particle.pt() * weight * std::pow(jet_distance_squared(particle,axis),_jet_beta/2.0);
     259      }
     260   
     261      virtual double beam_numerator(const fastjet::PseudoJet& particle) {
     262         double weight = (_beam_beta == 1.0) ? 1.0 : std::pow(particle.pt()/particle.e(),_beam_beta - 1.0);
     263         return particle.pt() * weight * std::pow(_Rcutoff,_jet_beta);
     264      }
     265
     266      virtual double denominator(const fastjet::PseudoJet& particle) {
     267         return 1.0;
     268      }
     269};
     270
     271
    294272} //namespace contrib
    295273
  • external/fastjet/contribs/Nsubjettiness/Njettiness.cc

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: Njettiness.cc 677 2014-06-12 18:56:46Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    3635///////
    3736
    38 Njettiness::Njettiness(const AxesDefinition & axes_def, const MeasureDefinition & measure_def)
    39 : _axes_def(axes_def.create()), _measure_def(measure_def.create()) {
    40    setMeasureFunctionAndAxesFinder();  // call helper function to do the hard work
    41 }
    42 
    43 Njettiness::Njettiness(AxesMode axes_mode, const MeasureDefinition & measure_def)
    44 : _axes_def(createAxesDef(axes_mode)), _measure_def(measure_def.create()) {
    45    setMeasureFunctionAndAxesFinder();  // call helper function to do the hard work
    46 }
    47    
    48 // Convert from MeasureMode enum to MeasureDefinition
    49 // This returns a pointer that will be claimed by a SharedPtr
    50 MeasureDefinition* Njettiness::createMeasureDef(MeasureMode measure_mode, int num_para, double para1, double para2, double para3) const {
     37// Helper function to correlate one pass minimization with appropriate measure
     38void Njettiness::setOnePassAxesFinder(MeasureMode measure_mode, AxesFinder* startingFinder, double beta, double Rcutoff) {
     39   if (measure_mode == normalized_measure || measure_mode == unnormalized_measure || measure_mode == normalized_cutoff_measure || measure_mode == unnormalized_cutoff_measure) {
     40      _axesFinder = new AxesFinderFromOnePassMinimization(startingFinder, beta, Rcutoff);
     41   }
     42   else if (measure_mode == geometric_measure || measure_mode == geometric_cutoff_measure) {
     43      _axesFinder = new AxesFinderFromGeometricMinimization(startingFinder, beta, Rcutoff);
     44   }
     45   else {
     46      std::cerr << "Minimization only set up for normalized_measure, unnormalized_measure, normalized_cutoff_measure, unnormalized_cutoff_measure, geometric_measure, geometric_cutoff_measure" << std::endl;
     47      exit(1); }
     48}
     49
     50// Parsing needed for constructor to set AxesFinder and MeasureFunction
     51// All of the parameter handling is here, and checking that number of parameters is correct.
     52void Njettiness::setMeasureFunctionandAxesFinder(AxesMode axes_mode, MeasureMode measure_mode, double para1, double para2, double para3, double para4) {
    5153
    5254   // definition of maximum Rcutoff for non-cutoff measures, changed later by other measures
    5355   double Rcutoff = std::numeric_limits<double>::max();  //large number
    54    // Most (but not all) measures have some kind of beta value
    55    double beta = std::numeric_limits<double>::quiet_NaN();
     56   // Most (but all measures have some kind of beta value)
     57   double beta = NAN;
    5658   // The normalized measures have an R0 value.
    57    double R0 = std::numeric_limits<double>::quiet_NaN();
    58    
     59   double R0 = NAN;
     60
    5961   // Find the MeasureFunction and set the parameters.
    6062   switch (measure_mode) {
     
    6264         beta = para1;
    6365         R0 = para2;
    64          if(num_para == 2) {
    65             return new NormalizedMeasure(beta,R0);
    66          } else {
    67             throw Error("normalized_measure needs 2 parameters (beta and R0)");
    68          }
     66         if(correctParameterCount(2, para1, para2, para3, para4))
     67            _measureFunction = new DefaultNormalizedMeasure(beta, R0, Rcutoff); //normalized_measure requires 2 parameters, beta and R0
     68         else {
     69            std::cerr << "normalized_measure needs 2 parameters (beta and R0)" << std::endl;
     70            exit(1); }
    6971         break;
    7072      case unnormalized_measure:
    7173         beta = para1;
    72          if(num_para == 1) {
    73             return new UnnormalizedMeasure(beta);
    74          } else {
    75             throw Error("unnormalized_measure needs 1 parameter (beta)");
    76          }
     74         if(correctParameterCount(1, para1, para2, para3, para4))
     75            _measureFunction = new DefaultUnnormalizedMeasure(beta, Rcutoff); //unnormalized_measure requires 1 parameter, beta
     76         else {
     77            std::cerr << "unnormalized_measure needs 1 parameter (beta)" << std::endl;
     78            exit(1); }
    7779         break;
    7880      case geometric_measure:
    7981         beta = para1;
    80          if (num_para == 1) {
    81             return new GeometricMeasure(beta);
    82          } else {
    83             throw Error("geometric_measure needs 1 parameter (beta)");
    84          }
     82         if(correctParameterCount(1, para1, para2, para3, para4))
     83            _measureFunction = new GeometricMeasure(beta,Rcutoff); //geometric_measure requires 1 parameter, beta
     84         else {
     85            std::cerr << "geometric_measure needs 1 parameter (beta)" << std::endl;
     86            exit(1); }
    8587         break;
    8688      case normalized_cutoff_measure:
     
    8890         R0 = para2;
    8991         Rcutoff = para3; //Rcutoff parameter is 3rd parameter in normalized_cutoff_measure
    90          if (num_para == 3) {
    91             return new NormalizedCutoffMeasure(beta,R0,Rcutoff);
    92          } else {
    93             throw Error("normalized_cutoff_measure has 3 parameters (beta, R0, Rcutoff)");
    94          }
     92         if(correctParameterCount(3, para1, para2, para3, para4))
     93            _measureFunction = new DefaultNormalizedMeasure(beta, R0, Rcutoff); //normalized_cutoff_measure requires 3 parameters, beta, R0, and Rcutoff
     94         else {
     95            std::cerr << "normalized_cutoff_measure has 3 parameters (beta, R0, Rcutoff)" << std::endl;
     96            exit(1); }
    9597         break;
    9698      case unnormalized_cutoff_measure:
    9799         beta = para1;
    98100         Rcutoff = para2; //Rcutoff parameter is 2nd parameter in normalized_cutoff_measure
    99          if (num_para == 2) {
    100             return new UnnormalizedCutoffMeasure(beta,Rcutoff);
    101          } else {
    102             throw Error("unnormalized_cutoff_measure has 2 parameters (beta, Rcutoff)");
    103          }
     101         if (correctParameterCount(2, para1, para2, para3, para4))
     102            _measureFunction = new DefaultUnnormalizedMeasure(beta, Rcutoff); //unnormalized_cutoff_measure requires 2 parameters, beta and Rcutoff
     103         else {
     104            std::cerr << "unnormalized_cutoff_measure has 2 parameters (beta, Rcutoff)" << std::endl;
     105            exit(1); }
    104106         break;
    105107      case geometric_cutoff_measure:
    106108         beta = para1;
    107109         Rcutoff = para2; //Rcutoff parameter is 2nd parameter in geometric_cutoff_measure
    108          if(num_para == 2) {
    109            return new GeometricCutoffMeasure(beta,Rcutoff);
    110          } else {
    111             throw Error("geometric_cutoff_measure has 2 parameters (beta, Rcutoff)");
    112          }
     110         if(correctParameterCount(2, para1, para2, para3, para4))
     111            _measureFunction = new GeometricMeasure(beta,Rcutoff); //geometric_cutoff_measure requires 2 parameters, beta and Rcutoff
     112         else {
     113            std::cerr << "geometric_cutoff_measure has 2 parameters (beta,Rcutoff)" << std::endl;
     114            exit(1); }
    113115         break;
    114116      default:
    115117         assert(false);
    116118         break;
    117    }
    118    return NULL;
    119 }
    120 
    121 // Convert from AxesMode enum to AxesDefinition
    122 // This returns a pointer that will be claimed by a SharedPtr
    123 AxesDefinition* Njettiness::createAxesDef(Njettiness::AxesMode axes_mode) const {
    124    
     119   }   
     120
     121   // Choose which AxesFinder from user input.
     122   // Uses setOnePassAxesFinder helpful function to use beta and Rcutoff values about (if needed)
    125123   switch (axes_mode) {
    126124      case wta_kt_axes:
    127          return new WTA_KT_Axes();
     125         _axesFinder = new AxesFinderFromWTA_KT();
     126         break;
    128127      case wta_ca_axes:
    129          return new WTA_CA_Axes();
     128         _axesFinder = new AxesFinderFromWTA_CA();
     129         break;
    130130      case kt_axes:
    131          return new KT_Axes();
     131         _axesFinder = new AxesFinderFromKT();
     132         break;
    132133      case ca_axes:
    133          return new CA_Axes();
     134         _axesFinder = new AxesFinderFromCA();
     135         break;
    134136      case antikt_0p2_axes:
    135          return new AntiKT_Axes(0.2);
     137         _axesFinder = new AxesFinderFromAntiKT(0.2);     
     138         break;
    136139      case onepass_wta_kt_axes:
    137          return new OnePass_WTA_KT_Axes();
     140         setOnePassAxesFinder(measure_mode, new AxesFinderFromWTA_KT(), beta, Rcutoff);
     141         break;
    138142      case onepass_wta_ca_axes:
    139          return new OnePass_WTA_CA_Axes();
     143         setOnePassAxesFinder(measure_mode, new AxesFinderFromWTA_CA(), beta, Rcutoff);
     144         break;
    140145      case onepass_kt_axes:
    141          return new OnePass_KT_Axes();
     146         setOnePassAxesFinder(measure_mode, new AxesFinderFromKT(), beta, Rcutoff);
     147         break;
    142148      case onepass_ca_axes:
    143          return new OnePass_CA_Axes();
     149         setOnePassAxesFinder(measure_mode, new AxesFinderFromCA(), beta, Rcutoff);
     150         break;
    144151      case onepass_antikt_0p2_axes:
    145          return new OnePass_AntiKT_Axes(0.2);
     152         setOnePassAxesFinder(measure_mode, new AxesFinderFromAntiKT(0.2), beta, Rcutoff);
     153         break;
    146154      case onepass_manual_axes:
    147          return new OnePass_Manual_Axes();
    148       case min_axes:
    149          return new MultiPass_Axes(100);
     155         setOnePassAxesFinder(measure_mode, new AxesFinderFromUserInput(), beta, Rcutoff);
     156         break;
     157      case min_axes: //full minimization is not defined for geometric_measure.
     158         if (measure_mode == normalized_measure || measure_mode == unnormalized_measure || measure_mode == normalized_cutoff_measure || measure_mode == unnormalized_cutoff_measure)
     159            //Defaults to 100 iteration to find minimum
     160            _axesFinder = new AxesFinderFromKmeansMinimization(new AxesFinderFromKT(), beta, Rcutoff, 100);
     161         else {
     162            std::cerr << "Multi-pass minimization only set up for normalized_measure, unnormalized_measure, normalized_cutoff_measure, unnormalized_cutoff_measure." << std::endl;
     163            exit(1);
     164         }
     165         break;
    150166      case manual_axes:
    151          return new Manual_Axes();
     167         _axesFinder = new AxesFinderFromUserInput();
     168         break;
     169// These options have been commented out because they have not been fully tested
     170//      case wta2_kt_axes: // option for alpha = 2 added
     171//         _axesFinder = new AxesFinderFromWTA2_KT();
     172//         break;
     173//      case wta2_ca_axes: // option for alpha = 2 added
     174//         _axesFinder = new AxesFinderFromWTA2_CA();
     175//         break;
     176//      case onepass_wta2_kt_axes: // option for alpha = 2 added
     177//         setOnePassAxesFinder(measure_mode, new AxesFinderFromWTA2_KT(), beta, Rcutoff);
     178//         break;
     179//      case onepass_wta2_ca_axes: // option for alpha = 2 added
     180//         setOnePassAxesFinder(measure_mode, new AxesFinderFromWTA2_CA(), beta, Rcutoff);
     181//         break;
    152182      default:
    153183         assert(false);
    154          return NULL;
    155    }
    156 }
    157 
    158    
    159 // Parsing needed for constructor to set AxesFinder and MeasureFunction
    160 // All of the parameter handling is here, and checking that number of parameters is correct.
    161 void Njettiness::setMeasureFunctionAndAxesFinder() {
    162    // Get the correct MeasureFunction and AxesFinders
    163    _measureFunction.reset(_measure_def->createMeasureFunction());
    164    _startingAxesFinder.reset(_axes_def->createStartingAxesFinder(*_measure_def));
    165    _finishingAxesFinder.reset(_axes_def->createFinishingAxesFinder(*_measure_def));
     184         break;
     185      }   
     186
    166187}
    167188
    168189// setAxes for Manual mode
    169 void Njettiness::setAxes(const std::vector<fastjet::PseudoJet> & myAxes) {
    170    if (_axes_def->supportsManualAxes()) {
     190void Njettiness::setAxes(std::vector<fastjet::PseudoJet> myAxes) {
     191   if (_current_axes_mode == manual_axes || _current_axes_mode == onepass_manual_axes) {
    171192      _currentAxes = myAxes;
    172    } else {
    173       throw Error("You can only use setAxes for manual AxesDefinitions");
     193   }
     194   else {
     195      std::cerr << "You can only use setAxes if using manual_axes or onepass_manual_axes measure mode" << std::endl;
     196      exit(1);
    174197   }
    175198}
     
    177200// Calculates and returns all TauComponents that user would want.
    178201// This information is stored in _current_tau_components for later access as well.
    179 TauComponents Njettiness::getTauComponents(unsigned n_jets, const std::vector<fastjet::PseudoJet> & inputJets) const {
     202TauComponents Njettiness::getTauComponents(unsigned n_jets, const std::vector<fastjet::PseudoJet> & inputJets) {
    180203   if (inputJets.size() <= n_jets) {  //if not enough particles, return zero
    181204      _currentAxes = inputJets;
     
    183206      _current_tau_components = TauComponents();
    184207      _seedAxes = _currentAxes;
    185       _currentJets = _currentAxes;
    186       _currentBeam = PseudoJet(0.0,0.0,0.0,0.0);
    187208   } else {
    188 
    189       _seedAxes = _startingAxesFinder->getAxes(n_jets,inputJets,_currentAxes); //sets starting point for minimization
    190       if (_finishingAxesFinder) {
    191          _currentAxes = _finishingAxesFinder->getAxes(n_jets,inputJets,_seedAxes);
    192       } else {
    193          _currentAxes = _seedAxes;
    194       }
    195      
    196       // Find partition and store information
    197       // (jet information in _currentJets, beam in _currentBeam)
    198       _currentJets = _measureFunction->get_partition(inputJets,_currentAxes,&_currentBeam);
    199      
    200       // Find tau value and store information
    201       _current_tau_components = _measureFunction->result_from_partition(_currentJets, _currentAxes,&_currentBeam);  // sets current Tau Values
     209      _currentAxes = _axesFinder->getAxes(n_jets,inputJets,_currentAxes); // sets current Axes
     210      _seedAxes = _axesFinder->seedAxes(); // sets seed Axes (if one pass minimization was used)
     211      _current_tau_components = _measureFunction->result(inputJets, _currentAxes);  // sets current Tau Values
    202212   }
    203213   return _current_tau_components;
     
    209219// Each vector element is a list of ints corresponding to the indices in
    210220// particles of the particles belonging to that jet.
    211 std::vector<std::list<int> > Njettiness::getPartitionList(const std::vector<fastjet::PseudoJet> & particles) const {
    212    // core code is in MeasureFunction
    213    return _measureFunction->get_partition_list(particles,_currentAxes);
    214 }
    215 
    216    
     221// TODO:  Consider moving to MeasureFunction
     222std::vector<std::list<int> > Njettiness::getPartition(const std::vector<fastjet::PseudoJet> & particles) {
     223   std::vector<std::list<int> > partitions(_currentAxes.size());
     224
     225   for (unsigned i = 0; i < particles.size(); i++) {
     226     
     227      int j_min = -1;
     228      // find minimum distance
     229      double minR = std::numeric_limits<double>::max();  //large number
     230      for (unsigned j = 0; j < _currentAxes.size(); j++) {
     231         double tempR = _measureFunction->jet_distance_squared(particles[i],_currentAxes[j]); // delta R distance
     232         if (tempR < minR) {
     233            minR = tempR;
     234            j_min = j;
     235         }
     236      }
     237      if (_measureFunction->do_cluster(particles[i],_currentAxes[j_min])) partitions[j_min].push_back(i);
     238   }
     239   return partitions;
     240}
     241
     242// Having found axes, assign each particle in particles to an axis, and return a set of jets.
     243// Each jet is the sum of particles closest to an axis (Njet = Naxes).
     244// TODO:  Consider moving to MeasureFunction
     245std::vector<fastjet::PseudoJet> Njettiness::getJets(const std::vector<fastjet::PseudoJet> & particles) {
     246   
     247   std::vector<fastjet::PseudoJet> jets(_currentAxes.size());
     248
     249   std::vector<std::list<int> > partition = getPartition(particles);
     250   for (unsigned j = 0; j < partition.size(); ++j) {
     251      std::list<int>::const_iterator it, itE;
     252      for (it = partition[j].begin(), itE = partition[j].end(); it != itE; ++it) {
     253         jets[j] += particles[*it];
     254      }
     255   }
     256   return jets;
     257}
     258
    217259} // namespace contrib
    218260
  • external/fastjet/contribs/Nsubjettiness/Njettiness.hh

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: Njettiness.hh 670 2014-06-06 01:24:42Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    2625#define __FASTJET_CONTRIB_NJETTINESS_HH__
    2726
    28 
    2927#include "MeasureFunction.hh"
    3028#include "AxesFinder.hh"
    31 #include "NjettinessDefinition.hh"
    3229
    3330#include "fastjet/PseudoJet.hh"
    34 #include "fastjet/SharedPtr.hh"
    35 #include <fastjet/LimitedWarning.hh>
    36 
    3731#include <cmath>
    3832#include <vector>
    3933#include <list>
    4034
     35
    4136FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
    4237
    4338namespace contrib {
    44    
     39
    4540///////
    4641//
     
    5954   
    6055   // The various axes choices available to the user
    61    // It is recommended to use AxesDefinition instead of these.
    6256   enum AxesMode {
    6357      kt_axes,             // exclusive kt axes
     
    8478   // "normalized_cutoff_measure" was the default in v1.0 of Nsubjettiness
    8579   // "unnormalized_measure" is now the recommended default usage
    86    // But it is recommended to use MeasureDefinition instead of these.
    8780   enum MeasureMode {
    8881      normalized_measure,           //default normalized measure
     
    9487   };
    9588
    96    // Main constructor that uses AxesMode and MeasureDefinition to specify measure
     89private:
     90   // The chosen axes/measure modes
     91   AxesFinder* _axesFinder;  // The chosen axes
     92   MeasureFunction* _measureFunction; // The chosen measure
     93
     94   // Enum information so functions can specify output based on specific options, primarily for setAxes
     95   AxesMode _current_axes_mode;
     96   MeasureMode _current_measure_mode;
     97   
     98   // Information about the current information
     99   TauComponents _current_tau_components; //automatically set to have components of 0; these values will be set by the getTau function call
     100   std::vector<fastjet::PseudoJet> _currentAxes;
     101   std::vector<fastjet::PseudoJet> _seedAxes; // axes used prior to minimization (if applicable)
     102   
     103   // Needed for compilation of non C++11 users
     104   bool isnan(double para) { return para != para; }
     105
     106   // Helpful function to check to make sure input has correct number of parameters
     107   bool correctParameterCount(int n, double para1, double para2, double para3, double para4){
     108      int numpara;
     109      if (!isnan(para1) && !isnan(para2) && !isnan(para3) && !isnan(para4)) numpara = 4;
     110      else if (!isnan(para1) && !isnan(para2) && !isnan(para3) && isnan(para4)) numpara = 3;
     111      else if (!isnan(para1) && !isnan(para2) && isnan(para3) && isnan(para4)) numpara = 2;
     112      else if (!isnan(para1) && isnan(para2) && isnan(para3) && isnan(para4)) numpara = 1;
     113      else numpara = 0;
     114      return n == numpara;
     115   }
     116
     117   // Helper function to set onepass_axes depending on input measure_mode and startingFinder
     118   void setOnePassAxesFinder(MeasureMode measure_mode, AxesFinder* startingFinder, double para1, double Rcutoff);
     119 
     120   // created separate function to set MeasureFunction and AxesFinder in order to keep constructor cleaner.
     121   void setMeasureFunctionandAxesFinder(AxesMode axes_mode, MeasureMode measure_mode, double para1, double para2, double para3, double para4);
     122
     123public:
     124
     125
     126   // Main constructor which takes axes/measure information, and possible parameters.
    97127   // Unlike Nsubjettiness or NjettinessPlugin, the value N is not chosen
    98    Njettiness(const AxesDefinition & axes_def, const MeasureDefinition & measure_def);
    99 
    100    // Intermediate constructor (needed to enable v1.0.3 backwards compatibility?)
    101    Njettiness(AxesMode axes_mode, const MeasureDefinition & measure_def);
    102 
    103    // Alternative constructor which takes axes/measure information as enums with measure parameters
    104    // This version is not recommended
    105128   Njettiness(AxesMode axes_mode,
    106129              MeasureMode measure_mode,
    107               int num_para,
    108               double para1 = std::numeric_limits<double>::quiet_NaN(),
    109               double para2 = std::numeric_limits<double>::quiet_NaN(),
    110               double para3 = std::numeric_limits<double>::quiet_NaN())
    111    : _axes_def(createAxesDef(axes_mode)), _measure_def(createMeasureDef(measure_mode, num_para, para1, para2, para3)) {
    112       setMeasureFunctionAndAxesFinder();  // call helper function to do the hard work
     130              double para1 = NAN,
     131              double para2 = NAN,
     132              double para3 = NAN,
     133              double para4 = NAN)
     134   : _current_axes_mode(axes_mode),
     135   _current_measure_mode(measure_mode) {
     136      setMeasureFunctionandAxesFinder(axes_mode, measure_mode, para1, para2, para3, para4);  // call helper function to do the hard work
    113137   }
    114138
    115    // destructor
    116    ~Njettiness() {};
     139   ~Njettiness() {
     140      // clean house
     141      delete _measureFunction;
     142      delete _axesFinder;
     143   }
    117144   
    118145   // setAxes for Manual mode
    119    void setAxes(const std::vector<fastjet::PseudoJet> & myAxes);
     146   void setAxes(std::vector<fastjet::PseudoJet> myAxes);
    120147   
    121148   // Calculates and returns all TauComponents that user would want.
    122149   // This information is stored in _current_tau_components for later access as well.
    123    TauComponents getTauComponents(unsigned n_jets, const std::vector<fastjet::PseudoJet> & inputJets) const;
     150   TauComponents getTauComponents(unsigned n_jets, const std::vector<fastjet::PseudoJet> & inputJets);
    124151
    125152   // Calculates the value of N-subjettiness,
    126153   // but only returns the tau value from _current_tau_components
    127    double getTau(unsigned n_jets, const std::vector<fastjet::PseudoJet> & inputJets) const {
     154   double getTau(unsigned n_jets, const std::vector<fastjet::PseudoJet> & inputJets) {
    128155      return getTauComponents(n_jets, inputJets).tau();
    129156   }
     157   
     158   // returns enum information
     159   MeasureMode currentMeasureMode() { return _current_measure_mode;}
     160   AxesMode currentAxesMode() { return _current_axes_mode;}
    130161
    131162   // Return all relevant information about tau components
    132    TauComponents currentTauComponents() const {return _current_tau_components;}
     163   TauComponents currentTauComponents() {return _current_tau_components;}
     164   
    133165   // Return axes found by getTauComponents.
    134    std::vector<fastjet::PseudoJet> currentAxes() const { return _currentAxes;}
     166   std::vector<fastjet::PseudoJet> currentAxes() { return _currentAxes;}
    135167   // Return seedAxes used if onepass minimization (otherwise, same as currentAxes)
    136    std::vector<fastjet::PseudoJet> seedAxes() const { return _seedAxes;}
    137    // Return jet partition found by getTauComponents.
    138    std::vector<fastjet::PseudoJet> currentJets() const {return _currentJets;}
    139    // Return beam partition found by getTauComponents.
    140    fastjet::PseudoJet currentBeam() const {return _currentBeam;}
     168   std::vector<fastjet::PseudoJet> seedAxes() { return _seedAxes;}
    141169   
    142170   // partition inputs by Voronoi (each vector stores indices corresponding to inputJets)
    143    std::vector<std::list<int> > getPartitionList(const std::vector<fastjet::PseudoJet> & inputJets) const;
     171   std::vector<std::list<int> > getPartition(const std::vector<fastjet::PseudoJet> & inputJets);
    144172
    145 private:
    146    
    147    // Information about Axes and Measures to be Used
    148    // Implemented as SharedPtrs to avoid memory management headaches
    149    SharedPtr<const AxesDefinition> _axes_def;
    150    SharedPtr<const MeasureDefinition> _measure_def;
    151    
    152    // The chosen axes/measure mode workers
    153    // Implemented as SharedPtrs to avoid memory management headaches
    154    // TODO: make into a SharedPtr<const AxesFinder>?
    155    SharedPtr<MeasureFunction> _measureFunction;  // The chosen measure
    156    SharedPtr<AxesFinder> _startingAxesFinder;    // The initial axes finder
    157    SharedPtr<AxesFinder> _finishingAxesFinder;   // A possible minimization step
    158    
    159    // Information about the current information
    160    // Defined as mutables, so user should be aware that these change when getTau is called.
    161    mutable TauComponents _current_tau_components; //automatically set to have components of 0; these values will be set by the getTau function call
    162    mutable std::vector<fastjet::PseudoJet> _currentAxes; //axes found after minimization
    163    mutable std::vector<fastjet::PseudoJet> _seedAxes; // axes used prior to minimization (if applicable)
    164    mutable std::vector<fastjet::PseudoJet> _currentJets; //partitioning information
    165    mutable fastjet::PseudoJet _currentBeam; //return beam, if requested
    166    
    167    // created separate function to set MeasureFunction and AxesFinder in order to keep constructor cleaner.
    168    void setMeasureFunctionAndAxesFinder();
    169    
    170    // Convert old style enums into new style MeasureDefinition
    171    AxesDefinition* createAxesDef(AxesMode axes_mode) const;
    172    
    173    // Convert old style enums into new style MeasureDefinition
    174    MeasureDefinition* createMeasureDef(MeasureMode measure_mode, int num_para, double para1, double para2, double para3) const;
     173   // partition inputs by Voronoi
     174   std::vector<fastjet::PseudoJet> getJets(const std::vector<fastjet::PseudoJet> & inputJets);
    175175
    176176};
    177    
     177
    178178} // namespace contrib
    179179
  • external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.cc

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: NjettinessPlugin.cc 663 2014-06-03 21:26:41Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    3029
    3130
     31// Constructor with same arguments as Nsubjettiness.
     32NjettinessPlugin::NjettinessPlugin(int N, Njettiness::AxesMode axes_mode, Njettiness::MeasureMode measure_mode, double para1, double para2, double para3, double para4)
     33  : _N(N), _njettinessFinder(axes_mode, measure_mode, para1, para2, para3, para4) {}
     34
     35// Old constructor for compatibility
     36NjettinessPlugin::NjettinessPlugin(int N, Njettiness::AxesMode mode, double beta, double R0, double Rcutoff)
     37   : _N(N), _njettinessFinder(mode, Njettiness::normalized_cutoff_measure, beta, R0, Rcutoff) {}
    3238
    3339std::string NjettinessPlugin::description() const {return "N-jettiness jet finder";}
    3440
    35 
    3641// Clusters the particles according to the Njettiness jet algorithm
    37 // Apologies for the complication with this code, but we need to make
    38 // a fake jet clustering tree.  The partitioning is done by getPartitionList
     42// TODO: this code should be revisited to see if if can be made more clear.
    3943void NjettinessPlugin::run_clustering(ClusterSequence& cs) const
    4044{
    4145   std::vector<fastjet::PseudoJet> particles = cs.jets();
    42 
    43    // HACK: remove area information from particles (in case this is called by
    44    // a ClusterSequenceArea.  Will be fixed in a future FastJet release)
    45    for (unsigned i = 0; i < particles.size(); i++) {
    46       particles[i].set_structure_shared_ptr(SharedPtr<PseudoJetStructureBase>());
    47    }
    48    
    49    
    5046   _njettinessFinder.getTau(_N, particles);
    51 
    52    std::vector<std::list<int> > partition = _njettinessFinder.getPartitionList(particles);
     47   std::vector<std::list<int> > partition = _njettinessFinder.getPartition(particles);
    5348
    5449   std::vector<fastjet::PseudoJet> jet_indices_for_extras;
    5550
    5651   // output clusterings for each jet
    57    for (size_t i0 = 0; i0 < partition.size(); ++i0) {
    58       size_t i = partition.size() - 1 - i0; // reversed order of reading to match axes order
     52   for (size_t i = 0; i < partition.size(); ++i) {
    5953      std::list<int>& indices = partition[i];
    6054      if (indices.size() == 0) continue;
     
    7670   }
    7771
    78    //HACK:  Re-reverse order of reading to match CS order
    79    reverse(jet_indices_for_extras.begin(),jet_indices_for_extras.end());
    80 
    8172   NjettinessExtras * extras = new NjettinessExtras(_njettinessFinder.currentTauComponents(),jet_indices_for_extras,_njettinessFinder.currentAxes());
    8273   cs.plugin_associate_extras(std::auto_ptr<ClusterSequence::Extras>(extras));
  • external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh

    r37deb3b rba7fc1e  
     1// $Id$
     2//
    13//  Nsubjettiness Package
    24//  Questions/Comments?  jthaler@jthaler.net
     
    57//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    68//
    7 //  $Id: NjettinessPlugin.hh 671 2014-06-10 17:47:52Z jthaler $
    89//----------------------------------------------------------------------
    910// This file is part of FastJet contrib.
     
    4849// to similar information
    4950class NjettinessExtras : public ClusterSequence::Extras {
     51   private:
    5052   
     53      TauComponents _tau_components;
     54      std::vector<fastjet::PseudoJet> _jets;
     55      std::vector<fastjet::PseudoJet> _axes;
     56     
     57      int labelOf(const fastjet::PseudoJet& jet) const {
     58         int thisJet = -1;
     59         for (unsigned int i = 0; i < _jets.size(); i++) {
     60            if (_jets[i].cluster_hist_index() == jet.cluster_hist_index()) {
     61               thisJet = i;
     62               break;
     63            }
     64         }
     65         return thisJet;
     66      }
     67     
    5168   public:
    5269      NjettinessExtras(TauComponents tau_components, std::vector<fastjet::PseudoJet> jets, std::vector<fastjet::PseudoJet> axes) : _tau_components(tau_components), _jets(jets), _axes(axes) {}
     
    5774      std::vector<fastjet::PseudoJet> axes() const {return _axes;}
    5875     
    59       double totalTau(const fastjet::PseudoJet& /*jet*/) const {
     76      double totalTau(const fastjet::PseudoJet& jet) const {
    6077         return _tau_components.tau();
    6178      }
    62      
    6379      double subTau(const fastjet::PseudoJet& jet) const {
    64          if (labelOf(jet) == -1) return std::numeric_limits<double>::quiet_NaN(); // nonsense
     80         if (labelOf(jet) == -1) return NAN;
    6581         return _tau_components.jet_pieces()[labelOf(jet)];
    6682      }
     
    7793         return (labelOf(jet) >= 0);
    7894      }
    79    
    80 private:
    81    
    82    TauComponents _tau_components;
    83    std::vector<fastjet::PseudoJet> _jets;
    84    std::vector<fastjet::PseudoJet> _axes;
    85    
    86    int labelOf(const fastjet::PseudoJet& jet) const {
    87       int thisJet = -1;
    88       for (unsigned int i = 0; i < _jets.size(); i++) {
    89          if (_jets[i].cluster_hist_index() == jet.cluster_hist_index()) {
    90             thisJet = i;
    91             break;
    92          }
    93       }
    94       return thisJet;
    95    }
     95
    9696};
    9797
     
    122122 * onepass_wta_kt_axes  : one-pass minimization seeded by wta_kt
    123123 *
    124  * For the UnnormalizedMeasure(beta), N-jettiness is defined as:
     124 * For the unnormalized_measure, N-jettiness is defined as:
    125125 *
    126126 * tau_N = Sum_{all particles i} p_T^i min((DR_i1)^beta, (DR_i2)^beta, ...)
     
    129129 *   and jet j.
    130130 *
    131  * The NormalizedMeausure include an extra parameter R0, and the various cutoff
     131 * The normalized_meausure include an extra parameter R0, and the various cutoff
    132132 * measures include an Rcutoff, which effectively defines an angular cutoff
    133133 * similar in effect to a cone-jet radius.
     
    138138public:
    139139
    140    // Constructor with same arguments as Nsubjettiness.
    141140   NjettinessPlugin(int N,
    142                     const AxesDefinition & axes_def,
    143                     const MeasureDefinition & measure_def)
    144    : _njettinessFinder(axes_def, measure_def), _N(N) {}
    145    
    146    
    147    // Alternative constructors that define the measure via enums and parameters
    148    // These constructors are likely be removed
    149    NjettinessPlugin(int N,
    150                  Njettiness::AxesMode axes_mode,
    151                  Njettiness::MeasureMode measure_mode)
    152    : _njettinessFinder(axes_mode, measure_mode, 0), _N(N) {}
    153    
    154    
    155    NjettinessPlugin(int N,
    156                  Njettiness::AxesMode axes_mode,
    157                  Njettiness::MeasureMode measure_mode,
    158                  double para1)
    159    : _njettinessFinder(axes_mode, measure_mode, 1, para1), _N(N) {}
    160    
    161    
    162    NjettinessPlugin(int N,
    163                  Njettiness::AxesMode axes_mode,
    164                  Njettiness::MeasureMode measure_mode,
    165                  double para1,
    166                  double para2)
    167    : _njettinessFinder(axes_mode, measure_mode, 2, para1, para2), _N(N) {}
    168    
    169    
    170    NjettinessPlugin(int N,
    171                  Njettiness::AxesMode axes_mode,
    172                  Njettiness::MeasureMode measure_mode,
    173                  double para1,
    174                  double para2,
    175                  double para3)
    176    : _njettinessFinder(axes_mode, measure_mode, 3, para1, para2, para3), _N(N) {}
    177 
     141                    Njettiness::AxesMode axes_mode,
     142                    Njettiness::MeasureMode measure_mode,
     143                    double para1 = NAN,
     144                    double para2 = NAN,
     145                    double para3 = NAN,
     146                    double para4 = NAN);
    178147
    179148   // Old constructor for backwards compatibility with v1.0,
    180    // where NormalizedCutoffMeasure was the only option
     149   // where normalized_cutoff_measure was the only option
    181150   NjettinessPlugin(int N,
    182151                    Njettiness::AxesMode mode,
    183152                    double beta,
    184153                    double R0,
    185                     double Rcutoff=std::numeric_limits<double>::max())
    186    : _njettinessFinder(mode, NormalizedCutoffMeasure(beta, R0, Rcutoff)), _N(N) {}
    187 
     154                    double Rcutoff=std::numeric_limits<double>::max());
    188155
    189156
     
    197164private:
    198165
    199    Njettiness _njettinessFinder;
    200166   int _N;
     167   mutable Njettiness _njettinessFinder; // TODO:  should muck with this so run_clustering can be const without this mutable
    201168
    202169};
  • external/fastjet/contribs/Nsubjettiness/Nsubjettiness.cc

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: Nsubjettiness.cc 597 2014-04-16 23:07:55Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
  • external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: Nsubjettiness.hh 670 2014-06-06 01:24:42Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    3433#include <climits>
    3534
     35
    3636FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
    3737
     
    4949public:
    5050
    51    
    52    // Main constructor, which takes N, the AxesDefiniation, and the MeasureDefinition.
    53    // The Definitions are given in NjettinessDefinition.hh
    54    //
    55    // The recommended AxesDefinitions are (more are available as listed in the README
    56    // and defined in NjettinessDefinition.hh):
    57    //   KT_Axes             : exclusive kt axes
    58    //   WTA_KT_Axes         : exclusive kt with winner-take-all recombination
    59    //   OnePass_KT_Axes     : one-pass minimization from kt starting point
    60    //   OnePass_WTA_KT_Axes : one-pass min. from wta_kt starting point
    61    //
    62    // The recommended measure definitions are (with the corresponding parameters)
    63    //   NormalizedMeasure(beta,R0)
    64    //      :  This was the original N-subjettiness measure (dimensionless)
    65    //   UnnormalizedMeasure(beta)
    66    //      :  This is the new recommended default, same as above but without
    67    //      :  the normalization factor, and hence has units of GeV
    68    //   NormalizedCutoffMeasure(beta,R0,Rcutoff)
    69    //      :  Same as normalized_measure, but cuts off at Rcutoff
    70    //   UnnormalizedCutoffMeasure(beta,Rcutoff)
    71    //      :  Same as unnormalized_measure, but cuts off at Rcutoff
    72    Nsubjettiness(int N,
    73                  const AxesDefinition& axes_def,
    74                  const MeasureDefinition& measure_def)
    75    : _njettinessFinder(axes_def,measure_def), _N(N) {}
    76    
    77    
    78    // Alternative constructors that define the measure via enums and parameters
    79    // These constructors are likely be removed
    80    // Zero parameter arguments
    81    // (Currently, no measure uses this)
    82    Nsubjettiness(int N,
    83                  Njettiness::AxesMode axes_mode,
    84                  Njettiness::MeasureMode measure_mode)
    85    : _njettinessFinder(axes_mode, measure_mode, 0), _N(N) {}
    86 
    87    // One parameter argument
    88    // (for unnormalized_measure, para1=beta)
     51   // Main constructor, which takes N, axes/measure modes,
     52   // and up to four parameters for parameters (i.e. beta, Rcutoff, etc depending on measure)
    8953   Nsubjettiness(int N,
    9054                 Njettiness::AxesMode axes_mode,
    9155                 Njettiness::MeasureMode measure_mode,
    92                  double para1)
    93    : _njettinessFinder(axes_mode, measure_mode, 1, para1), _N(N) {}
    94 
    95    // Two parameter arguments
    96    // (for normalized_measure, para1=beta, para2=R0)
    97    // (for unnormalized_cutoff_measure, para1=beta, para2=Rcutoff)
    98    Nsubjettiness(int N,
    99                  Njettiness::AxesMode axes_mode,
    100                  Njettiness::MeasureMode measure_mode,
    101                  double para1,
    102                  double para2)
    103    : _njettinessFinder(axes_mode, measure_mode, 2, para1, para2), _N(N) {}
    104 
    105    // Three parameter arguments
    106    // (for unnormalized_cutoff_measure, para1=beta, para2=R0, para3=Rcutoff)
    107    Nsubjettiness(int N,
    108                  Njettiness::AxesMode axes_mode,
    109                  Njettiness::MeasureMode measure_mode,
    110                  double para1,
    111                  double para2,
    112                  double para3)
    113    : _njettinessFinder(axes_mode, measure_mode, 3, para1, para2, para3), _N(N) {}
     56                 double para1 = NAN,
     57                 double para2 = NAN,
     58                 double para3 = NAN,
     59                 double para4 = NAN)
     60   : _njettinessFinder(axes_mode, measure_mode, para1, para2, para3, para4), _N(N) {}
    11461
    11562   // Old constructor for backwards compatibility with v1.0,
     
    12067                 double R0,
    12168                 double Rcutoff=std::numeric_limits<double>::max())
    122    : _njettinessFinder(axes_mode, NormalizedCutoffMeasure(beta,R0,Rcutoff)), _N(N) {}
    123    
     69   : _njettinessFinder(axes_mode, Njettiness::normalized_cutoff_measure, beta, R0, Rcutoff), _N(N) {}
     70
     71
    12472   /// returns tau_N, measured on the constituents of this jet
    12573   double result(const PseudoJet& jet) const;
     
    13886   }
    13987   
    140    /// returns subjet regions found by result() calculation (these have valid constituents)
    141    /// Note that the axes and the subjets are not the same
    142    std::vector<fastjet::PseudoJet> currentSubjets() const {
    143       return _njettinessFinder.currentJets();
    144    }
    145 
    146    /// returns components of tau_N without recalculating anything
    147    TauComponents currentTauComponents() const {
    148       return _njettinessFinder.currentTauComponents();
    149    }
    150    
    15188   // To set axes for manual use
    152    void setAxes(const std::vector<fastjet::PseudoJet> & myAxes) {
     89   void setAxes(std::vector<fastjet::PseudoJet> myAxes) {
    15390      // Cross check that manual axes are being used is in Njettiness
    15491        _njettinessFinder.setAxes(myAxes);
     
    15895private:
    15996   
    160    Njettiness _njettinessFinder; // TODO:  should muck with this so result can be const without this mutable
     97   mutable Njettiness _njettinessFinder; // TODO:  should muck with this so result can be const without this mutable
    16198   int _N;
    16299
     
    175112   NsubjettinessRatio(int N,
    176113                      int M,
    177                       const AxesDefinition & axes_def,
    178                       const MeasureDefinition & measure_def)
    179    : _nsub_numerator(N,axes_def,measure_def),
    180    _nsub_denominator(M,axes_def,measure_def) {}
    181    
    182    // Alternative constructor with enums and parameters
    183    // Again, likely to be removed
    184    NsubjettinessRatio(int N,
    185                       int M,
    186                       Njettiness::AxesMode axes_mode,
    187                       Njettiness::MeasureMode measure_mode)
    188    : _nsub_numerator(N, axes_mode, measure_mode),
    189    _nsub_denominator(M, axes_mode, measure_mode) {}
    190 
    191    
    192    NsubjettinessRatio(int N,
    193                       int M,
    194114                      Njettiness::AxesMode axes_mode,
    195115                      Njettiness::MeasureMode measure_mode,
    196                       double para1)
    197    : _nsub_numerator(N, axes_mode, measure_mode, para1),
    198    _nsub_denominator(M, axes_mode, measure_mode, para1) {}
     116                      double para1 = NAN,
     117                      double para2 = NAN,
     118                      double para3 = NAN,
     119                      double para4 = NAN)
     120   : _nsub_numerator(N, axes_mode, measure_mode, para1, para2, para3, para4),
     121   _nsub_denominator(M, axes_mode, measure_mode, para1, para2, para3, para4) {}
    199122
    200    NsubjettinessRatio(int N,
    201                       int M,
    202                       Njettiness::AxesMode axes_mode,
    203                       Njettiness::MeasureMode measure_mode,
    204                       double para1,
    205                       double para2)
    206    : _nsub_numerator(N, axes_mode, measure_mode, para1, para2),
    207    _nsub_denominator(M, axes_mode, measure_mode, para1, para2) {}
    208    
    209    NsubjettinessRatio(int N,
    210                       int M,
    211                       Njettiness::AxesMode axes_mode,
    212                       Njettiness::MeasureMode measure_mode,
    213                       double para1,
    214                       double para2,
    215                       double para3)
    216    : _nsub_numerator(N, axes_mode, measure_mode, para1, para2, para3),
    217    _nsub_denominator(M, axes_mode, measure_mode, para1, para2, para3) {}
    218 
    219    //returns tau_N/tau_M based off the input jet using result function from Nsubjettiness
     123   //returns tau_N/tau_M based off the input jet using result function from Nsubjettiness
    220124   double result(const PseudoJet& jet) const;
    221125
  • external/fastjet/contribs/Nsubjettiness/VERSION

    r37deb3b rba7fc1e  
    1 2.1.0
     11.1.0-beta4
  • external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.cc

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: WinnerTakeAllRecombiner.cc 597 2014-04-16 23:07:55Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    3433
    3534// recombine pa and pb by creating pab with energy of the sum of particle energies in the direction of the harder particle
     35
    3636// updated recombiner to use more general form of a metric equal to E*(pT/E)^(alpha), which reduces to pT*cosh(rap)^(1-alpha)
    3737// alpha is specified by the user. The default is alpha = 1, which is the typical behavior. alpha = 2 provides a metric which more
  • external/fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh

    r37deb3b rba7fc1e  
    55//  Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason
    66//
    7 //  $Id: WinnerTakeAllRecombiner.hh 670 2014-06-06 01:24:42Z jthaler $
    87//----------------------------------------------------------------------
    98// This file is part of FastJet contrib.
     
    5150   
    5251   /// recombine pa and pb and put result into pab
    53    virtual void recombine(const fastjet::PseudoJet & pa,
    54                           const fastjet::PseudoJet & pb,
    55                           fastjet::PseudoJet & pab) const;
     52   virtual void recombine(const fastjet::PseudoJet & pa, const fastjet::PseudoJet & pb, fastjet::PseudoJet & pab) const;
    5653
    5754private:
  • external/fastjet/internal/ClosestPair2D.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClosestPair2D.hh 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: ClosestPair2D.hh 2577 2011-09-13 15:11:38Z salam $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLOSESTPAIR2D__HH__
  • external/fastjet/internal/ClosestPair2DBase.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ClosestPair2DBase.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: ClosestPair2DBase.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_CLOSESTPAIR2DBASE__HH__
  • external/fastjet/internal/ClusterSequence_N2.icc

    r37deb3b rba7fc1e  
    44#include "fastjet/ClusterSequence.hh"
    55
    6 //FJSTARTHEADER
     6//STARTHEADER
    77// $Id: ClusterSequence_N2.cc 1351 2009-01-09 18:03:03Z salam $
    88//
    9 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     9// Copyright (c) 2005-2009, Matteo Cacciari, Gavin Salam and Gregory Soyez
    1010//
    1111//----------------------------------------------------------------------
     
    1818//
    1919//  The algorithms that underlie FastJet have required considerable
    20 //  development. They are described in the original FastJet paper,
    21 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     20//  development and are described in hep-ph/0512210. If you use
    2221//  FastJet as part of work towards a scientific publication, please
    23 //  quote the version you use and include a citation to the manual and
    24 //  optionally also to hep-ph/0512210.
     22//  include a citation to the FastJet paper.
    2523//
    2624//  FastJet is distributed in the hope that it will be useful,
     
    3028//
    3129//  You should have received a copy of the GNU General Public License
    32 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
     30//  along with FastJet; if not, write to the Free Software
     31//  Foundation, Inc.:
     32//      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    3333//----------------------------------------------------------------------
    34 //FJENDHEADER
     34//ENDHEADER
    3535
    3636//----------------------------------------------------------------------
  • external/fastjet/internal/Dnn2piCylinder.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Dnn2piCylinder.hh 3442 2014-07-24 07:20:49Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: Dnn2piCylinder.hh 2577 2011-09-13 15:11:38Z salam $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    7573  /// Returns the index of  the nearest neighbour of point labelled
    7674  /// by ii (assumes ii is valid)
    77   int NearestNeighbourIndex(const int ii) const ;
     75  int NearestNeighbourIndex(const int & ii) const ;
    7876
    7977  /// Returns the distance to the nearest neighbour of point labelled
    8078  /// by index ii (assumes ii is valid)
    81   double NearestNeighbourDistance(const int ii) const ;
     79  double NearestNeighbourDistance(const int & ii) const ;
    8280
    8381  /// Returns true iff the given index corresponds to a point that
    8482  /// exists in the DNN structure (meaning that it has been added, and
    8583  /// not removed in the meantime)
    86   bool Valid(const int index) const;
     84  bool Valid(const int & index) const;
    8785
    8886  void RemoveAndAddPoints(const std::vector<int> & indices_to_remove,
     
    218216/// initialised the class with instructions to ignore this problem the
    219217/// program will detect and ignore it, or crash.
    220 inline int Dnn2piCylinder::NearestNeighbourIndex(const int current) const {
     218inline int Dnn2piCylinder::NearestNeighbourIndex(const int & current) const {
    221219  int main_index = _mirror_info[current].main_index;
    222220  int mirror_index = _mirror_info[current].mirror_index;
     
    243241}
    244242
    245 inline double Dnn2piCylinder::NearestNeighbourDistance(const int current) const {
     243inline double Dnn2piCylinder::NearestNeighbourDistance(const int & current) const {
    246244  int main_index = _mirror_info[current].main_index;
    247245  int mirror_index = _mirror_info[current].mirror_index;
     
    258256}
    259257
    260 inline bool Dnn2piCylinder::Valid(const int index) const {
     258inline bool Dnn2piCylinder::Valid(const int & index) const {
    261259  return (_DNN->Valid(_mirror_info[index].main_index));
    262260}
  • external/fastjet/internal/Dnn3piCylinder.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Dnn3piCylinder.hh 3442 2014-07-24 07:20:49Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: Dnn3piCylinder.hh 2577 2011-09-13 15:11:38Z salam $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    7270  /// Returns the index of  the nearest neighbour of point labelled
    7371  /// by ii (assumes ii is valid)
    74   int NearestNeighbourIndex(const int ii) const ;
     72  int NearestNeighbourIndex(const int & ii) const ;
    7573
    7674  /// Returns the distance to the nearest neighbour of point labelled
    7775  /// by index ii (assumes ii is valid)
    78   double NearestNeighbourDistance(const int ii) const ;
     76  double NearestNeighbourDistance(const int & ii) const ;
    7977
    8078  /// Returns true iff the given index corresponds to a point that
    8179  /// exists in the DNN structure (meaning that it has been added, and
    8280  /// not removed in the meantime)
    83   bool Valid(const int index) const;
     81  bool Valid(const int & index) const;
    8482
    8583  void RemoveAndAddPoints(const std::vector<int> & indices_to_remove,
     
    206204/// initialised the class with instructions to ignore this problem the
    207205/// program will detect and ignore it, or crash.
    208 inline int Dnn3piCylinder::NearestNeighbourIndex(const int current) const {
     206inline int Dnn3piCylinder::NearestNeighbourIndex(const int & current) const {
    209207  int main_index = _mirror_info[current].main_index;
    210208  int mirror_index = _mirror_info[current].mirror_index;
     
    231229}
    232230
    233 inline double Dnn3piCylinder::NearestNeighbourDistance(const int current) const {
     231inline double Dnn3piCylinder::NearestNeighbourDistance(const int & current) const {
    234232  int main_index = _mirror_info[current].main_index;
    235233  int mirror_index = _mirror_info[current].mirror_index;
     
    246244}
    247245
    248 inline bool Dnn3piCylinder::Valid(const int index) const {
     246inline bool Dnn3piCylinder::Valid(const int & index) const {
    249247  return (_DNN->Valid(_mirror_info[index].main_index));
    250248}
  • external/fastjet/internal/Dnn4piCylinder.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Dnn4piCylinder.hh 3442 2014-07-24 07:20:49Z salam $
     1//STARTHEADER
     2// $Id: Dnn4piCylinder.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    5957  /// Returns the index of  the nearest neighbour of point labelled
    6058  /// by ii (assumes ii is valid)
    61   int NearestNeighbourIndex(const int ii) const ;
     59  int NearestNeighbourIndex(const int & ii) const ;
    6260
    6361  /// Returns the distance to the nearest neighbour of point labelled
    6462  /// by index ii (assumes ii is valid)
    65   double NearestNeighbourDistance(const int ii) const ;
     63  double NearestNeighbourDistance(const int & ii) const ;
    6664
    6765  /// Returns true iff the given index corresponds to a point that
    6866  /// exists in the DNN structure (meaning that it has been added, and
    6967  /// not removed in the meantime)
    70   bool Valid(const int index) const;
     68  bool Valid(const int & index) const;
    7169
    7270  void RemoveAndAddPoints(const std::vector<int> & indices_to_remove,
     
    10098// functions defined above
    10199
    102 inline int Dnn4piCylinder::NearestNeighbourIndex(const int current) const {
     100inline int Dnn4piCylinder::NearestNeighbourIndex(const int & current) const {
    103101  return (_DNN1->NearestNeighbourDistance(current) <
    104102          _DNN2->NearestNeighbourDistance(current)) ?
     
    107105}
    108106
    109 inline double Dnn4piCylinder::NearestNeighbourDistance(const int current) const {
     107inline double Dnn4piCylinder::NearestNeighbourDistance(const int & current) const {
    110108  return (_DNN1->NearestNeighbourDistance(current) <
    111109          _DNN2->NearestNeighbourDistance(current)) ?
     
    114112}
    115113
    116 inline bool Dnn4piCylinder::Valid(const int index) const {
     114inline bool Dnn4piCylinder::Valid(const int & index) const {
    117115  return (_DNN1->Valid(index) && _DNN2->Valid(index));
    118116}
  • external/fastjet/internal/DnnPlane.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: DnnPlane.hh 3442 2014-07-24 07:20:49Z salam $
     1//STARTHEADER
     2// $Id: DnnPlane.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    4644/// class derived from DynamicNearestNeighbours that provides an
    4745/// implementation for the Euclidean plane
    48 ///
    49 /// This class that uses CGAL Delaunay triangulation for most of the
    50 /// work (it allows for easy and efficient removal and addition of
    51 /// points and circulation over a point's neighbours). The treatment
    52 /// of coincident points is not supported by CGAL and is implemented
    53 /// according to the method specified in
    54 /// issue-tracker/2012-02-CGAL-coincident/METHOD
    5546/// \endif
    5647class DnnPlane : public DynamicNearestNeighbours {
     
    6657  /// Returns the index of  the nearest neighbour of point labelled
    6758  /// by ii (assumes ii is valid)
    68   int NearestNeighbourIndex(const int ii) const ;
     59  int NearestNeighbourIndex(const int & ii) const ;
    6960
    7061  /// Returns the distance to the nearest neighbour of point labelled
    7162  /// by index ii (assumes ii is valid)
    72   double NearestNeighbourDistance(const int ii) const ;
     63  double NearestNeighbourDistance(const int & ii) const ;
    7364
    7465  /// Returns true iff the given index corresponds to a point that
    7566  /// exists in the DNN structure (meaning that it has been added, and
    7667  /// not removed in the meantime)
    77   bool Valid(const int index) const;
     68  bool Valid(const int & index) const;
    7869
    7970  void RemoveAndAddPoints(const std::vector<int> & indices_to_remove,
     
    8980  double phi(const int i) const;
    9081
    91 private:
     82 private:
    9283
    9384  /// Structure containing a vertex_handle and cached information on
     
    9788    double NNdistance;
    9889    int NNindex;
    99     int coincidence;  // ==vertex->info.val() if no coincidence
    100                       // points to the coinciding SV in case of coincidence
    10190    // later on for cylinder put a second vertex?
    10291  };
     
    10695  bool _verbose;
    10796
    108   //static const bool _crash_on_coincidence = true;
    109   static const bool _crash_on_coincidence = false;
     97  static const bool _crash_on_coincidence = true;
     98  //static const bool _crash_on_coincidence = false;
    11099
    111100  Triangulation _TR; /// CGAL object for dealing with triangulations
     
    122111  /// Determines the index and distance of the nearest neighbour to
    123112  /// point j and puts the information into the _supervertex entry for j
    124   void _SetNearest(const int j);
     113  void _SetNearest(const int & j);
    125114
    126115  //----------------------------------------------------------------------
     
    134123  /// Note that j is NOT pushed onto indices_of_updated_neighbours --
    135124  /// if you want it there, put it there yourself.
    136   void _SetAndUpdateNearest(const int j,
     125  void _SetAndUpdateNearest(const int & j,
    137126                            std::vector<int> & indices_of_updated_neighbours);
    138127
    139128  /// given a vertex_handle returned by CGAL on insertion of a new
    140   /// points, returns the coinciding vertex's value if it turns out
    141   /// that it corresponds to a vertex that we already knew about
    142   /// (usually because two points coincide)
    143   int _CheckIfVertexPresent(const Vertex_handle & vertex,
    144                             const int its_index);
     129  /// points, crash if it turns out that it corresponds to a vertex
     130  /// that we already knew about (usually because two points coincide)
     131  void _CrashIfVertexPresent(const Vertex_handle & vertex,
     132                             const int & its_index);
    145133
    146   //----------------------------------------------------------------------
    147   /// if the distance between 'pref' and 'candidate' is smaller (or
    148   /// equal) than the one between 'pref' and 'near', return true and
    149   /// set 'mindist' to that distance. Note that it is assumed that
    150   /// 'mindist' is the euclidian distance between 'pref' and 'near'
    151   ///
    152   /// Note that the 'near' point is passed through its vertex rather
    153   /// than as a point. This allows us to handle cases where we have no min
    154   /// yet (near is the infinite vertex)
    155   inline bool _is_closer_to(const Point &pref,
    156                             const Point &candidate,
    157                             const Vertex_handle &near,
    158                             double & dist,
    159                             double & mindist){
    160     dist = _euclid_distance(pref, candidate);
    161     return _is_closer_to_with_hint(pref, candidate, near, dist, mindist);
    162   }
    163 
    164   /// same as '_is_closer_to' except that 'dist' already contains the
    165   /// distance between 'pref' and 'candidate'
    166   inline bool _is_closer_to_with_hint(const Point &pref,
    167                                       const Point &candidate,
    168                                       const Vertex_handle &near,
    169                                       const double & dist,
    170                                       double & mindist){
    171    
    172     // check if 'dist', the pre-computed distance between 'candidate'
    173     // and 'pref' is smaller than the distance between 'pref' and its
    174     // currently registered nearest neighbour 'near' (and update
    175     // things if it is)
    176     //
    177     // Interestingly enough, it has to be pointed out that the use of
    178     // 'abs' instead of 'std::abs' returns wrong results (apparently
    179     // ints without any compiler warning)
    180     //
    181     // The (near != NULL) test is there for one single reason: when
    182     // checking that a newly inserted point is not closer than a
    183     // previous NN, if that distance comparison involves a "nearly
    184     // degenerate" distance we need to access near->point. But
    185     // sometimes, in the course of RemoveAndAddPoints, its previous NN
    186     // has been deleted and its vertex (corresponding to 'near') set
    187     // to NULL. This is not a problem as all points having a deleted
    188     // point as NN will have their NN explicitly recomputed at the end
    189     // of RemoveAndAddPoints so here we should just make sure there is
    190     // no crash... that's done by checking (near != NULL)
    191     if ((std::abs(dist-mindist)<DISTANCE_FOR_CGAL_CHECKS) &&
    192         (near != NULL) &&
    193         (_euclid_distance(candidate, near->point())<DISTANCE_FOR_CGAL_CHECKS)){
    194       // we're in a situation where there might be a rounding issue,
    195       // use CGAL's distance computation to get it right
    196       //
    197       // Note that in the test right above,
    198       // (abs(dist-mindist)<1e-12) guarantees that the current
    199       // nearest point is not the infinite vertex and thus
    200       // nearest->point() is not ill-defined
    201       if (_verbose) std::cout << "using CGAL's distance ordering" << std::endl;
    202       if (CGAL::compare_distance_to_point(pref, candidate, near->point())!=CGAL::LARGER){
    203         mindist = dist;
    204         return true;
    205       }
    206     } else if (dist <= mindist) {
    207       // Note that the use of a <= in the above expression (instead of
    208       // a strict ordering <) is important in one case: when checking
    209       // if a new point is the new NN of one of the points in its
    210       // neighbourhood, in case of distances being ==, we are sure
    211       // that 'candidate' is in a cell adjacent to 'pref' while it may
    212       // no longer be the case for 'near'
    213       mindist = dist;
    214       return true;
    215     }
    216    
    217     return false;
    218   }
    219 
    220   /// if a distance between a point and 2 others is smaller than this
    221   /// and the distance between the two points is also smaller than this
    222   /// then use CGAL to compare the distances.
    223   static const double DISTANCE_FOR_CGAL_CHECKS; 
    224  
    225134};
    226135
     
    229138// functions defined above
    230139
    231 inline int DnnPlane::NearestNeighbourIndex(const int ii) const {
     140inline int DnnPlane::NearestNeighbourIndex(const int & ii) const {
    232141  return _supervertex[ii].NNindex;}
    233142
    234 inline double DnnPlane::NearestNeighbourDistance(const int ii) const {
     143inline double DnnPlane::NearestNeighbourDistance(const int & ii) const {
    235144  return _supervertex[ii].NNdistance;}
    236145
    237 inline bool DnnPlane::Valid(const int index) const {
     146inline bool DnnPlane::Valid(const int & index) const {
    238147  if (index >= 0 && index < static_cast<int>(_supervertex.size())) {
    239148    return (_supervertex[index].vertex != NULL);} else {return false;} }
  • external/fastjet/internal/DynamicNearestNeighbours.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: DynamicNearestNeighbours.hh 3619 2014-08-13 14:17:19Z salam $
     1//STARTHEADER
     2// $Id: DynamicNearestNeighbours.hh 2687 2011-11-14 11:17:51Z soyez $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    3937#include<cassert>
    4038#include "fastjet/internal/numconsts.hh"
    41 #include "fastjet/Error.hh"
    4239
    4340FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     
    7168/// Nearest Neighbours code
    7269/// \endif
    73 class DnnError : public Error {
     70class DnnError {
    7471public:
    7572  // constructors
    76   //DnnError() {}
    77   DnnError(const std::string & message_in) : Error(message_in) {}
     73  DnnError() {;};
     74  DnnError(const std::string & message_in) {
     75    _message = message_in; std::cerr << message_in << std::endl;};
     76
     77  std::string message() const {return _message;};
     78
     79private:
     80  std::string _message;
    7881};
    7982
     
    109112  /// Returns the index of the nearest neighbour of point labelled
    110113  /// by ii (assumes ii is valid)
    111   virtual int NearestNeighbourIndex(const int ii) const = 0;
     114  virtual int NearestNeighbourIndex(const int & ii) const = 0;
    112115
    113116  /// Returns the distance to the nearest neighbour of point labelled
    114117  /// by index ii (assumes ii is valid)
    115   virtual double NearestNeighbourDistance(const int ii) const = 0;
     118  virtual double NearestNeighbourDistance(const int & ii) const = 0;
    116119
    117120  /// Returns true iff the given index corresponds to a point that
    118121  /// exists in the DNN structure (meaning that it has been added, and
    119122  /// not removed in the meantime)
    120   virtual bool Valid(const int index) const = 0;
     123  virtual bool Valid(const int & index) const = 0;
    121124
    122125  /// remove the points labelled by the std::vector indices_to_remove, and
     
    138141  /// Remove the point labelled by index and return the list of
    139142  /// points whose nearest neighbours have changed in the process
    140   inline void RemovePoint (const int index,
     143  inline void RemovePoint (const int & index,
    141144                           std::vector<int> & indices_of_updated_neighbours) {
    142145    std::vector<int> indices_added;
     
    155158  /// point).
    156159  inline void RemoveCombinedAddCombination(
    157                         const int index1, const int index2,
     160                        const int & index1, const int & index2,
    158161                        const EtaPhi & newpoint,
    159162                        int & index3,
  • external/fastjet/internal/IsBase.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: IsBase.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: IsBase.hh 3071 2013-04-01 12:52:46Z cacciari $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_INTERNAL_IS_BASE_HH__
  • external/fastjet/internal/LimitedWarning.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_INTERNALLIMITEDWARNING_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: LimitedWarning.hh 3433 2014-07-23 08:17:03Z salam $
     4//STARTHEADER
     5// $Id: LimitedWarning.hh 2577 2011-09-13 15:11:38Z salam $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432
  • external/fastjet/internal/MinHeap.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: MinHeap.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: MinHeap.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_MINHEAP__HH__
     
    5250  /// expansion to a maximum size max_size;
    5351  MinHeap (const std::vector<double> & values, unsigned int max_size) :
    54     _heap(max_size) {initialise(values);}
    55 
    56   /// do the minimal setup for a MinHeap that can reach max_size;
    57   /// initialisation must be performed later with the actual values.
    58   MinHeap (unsigned int max_size) : _heap(max_size) {}
     52    _heap(max_size) {_initialise(values);};
    5953
    6054  /// constructor in which the the maximum size is the size of the values array
    6155  MinHeap (const std::vector<double> & values) :
    62     _heap(values.size()) {initialise(values);}
    63 
    64   /// initialise the heap with the supplied values. Should only be called if
    65   /// the constructor did not supply values.
    66   void initialise(const std::vector<double> & values);
    67 
     56    _heap(values.size()) {_initialise(values);};
     57 
    6858  /// return the location of the minimal value on the heap
    6959  inline unsigned int minloc() const {
    70     return (_heap[0].minloc) - &(_heap[0]);}
     60    return (_heap[0].minloc) - &(_heap[0]);};
    7161 
    7262  /// return the minimal value on the heap
    73   inline double       minval() const {return _heap[0].minloc->value;}
     63  inline double       minval() const {return _heap[0].minloc->value;};
    7464
    75   inline double operator[](int i) const {return _heap[i].value;}
     65  inline double operator[](int i) const {return _heap[i].value;};
    7666
    7767  /// remove the value at the specified location (i.e. replace it with
     
    9282  std::vector<ValueLoc> _heap;
    9383
     84  void _initialise(const std::vector<double> & values);
    9485
    9586
  • external/fastjet/internal/SearchTree.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: SearchTree.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: SearchTree.hh 3107 2013-05-03 15:47:47Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    190188public:
    191189
    192   // so that it can access our _node object;
     190  // so that it can access out _node object;
    193191  // note: "class U" needed for clang (v1.1 branches/release_27) compilation
    194   // 2014-07-22: as reported by Torbjorn Sjostrand,
    195   // the next line was giving a warning with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
    196   // (dependent nested name specifier 'SearchTree<U>::' for friend class declaration is not supported)
    197   // Just commenting it out, things still seem to work; same with a template of type T
    198   //template<class U> friend class SearchTree<U>::const_circulator;
    199   friend class SearchTree<T>::const_circulator;
     192  template<class U> friend class SearchTree<U>::const_circulator;
    200193  friend class SearchTree<T>;
    201194
  • external/fastjet/internal/Triangulation.hh

    r37deb3b rba7fc1e  
    33#define __FASTJET_TRIANGULATION__
    44
    5 //FJSTARTHEADER
    6 // $Id: Triangulation.hh 3433 2014-07-23 08:17:03Z salam $
     5//STARTHEADER
     6// $Id: Triangulation.hh 2595 2011-09-23 09:05:04Z salam $
    77//
    8 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     8// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    99//
    1010//----------------------------------------------------------------------
     
    1717//
    1818//  The algorithms that underlie FastJet have required considerable
    19 //  development. They are described in the original FastJet paper,
    20 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     19//  development and are described in hep-ph/0512210. If you use
    2120//  FastJet as part of work towards a scientific publication, please
    22 //  quote the version you use and include a citation to the manual and
    23 //  optionally also to hep-ph/0512210.
     21//  include a citation to the FastJet paper.
    2422//
    2523//  FastJet is distributed in the hope that it will be useful,
     
    3129//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3230//----------------------------------------------------------------------
    33 //FJENDHEADER
     31//ENDHEADER
    3432
    3533
  • external/fastjet/internal/Voronoi.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET__VORONOI_H__
    33
    4 //FJSTARTHEADER
    5 // $Id: Voronoi.hh 3433 2014-07-23 08:17:03Z salam $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: Voronoi.hh 2686 2011-11-14 09:28:22Z soyez $
     6//
     7// Copyright (c) 1994 by AT&T Bell Laboratories (see below)
     8//
    89//
    910//----------------------------------------------------------------------
    10 // This file is part of FastJet.
    11 //
    12 //  FastJet is free software; you can redistribute it and/or modify
    13 //  it under the terms of the GNU General Public License as published by
    14 //  the Free Software Foundation; either version 2 of the License, or
    15 //  (at your option) any later version.
    16 //
    17 //  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    20 //  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
    23 //
    24 //  FastJet is distributed in the hope that it will be useful,
    25 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
    26 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    27 //  GNU General Public License for more details.
    28 //
    29 //  You should have received a copy of the GNU General Public License
    30 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
     11// This file is included as part of FastJet but was mostly written by
     12// S. Fortune in C, put into C++ with memory management by S
     13// O'Sullivan, and with further interface and memeory management
     14// modifications by Gregory Soyez.
     15//
     16// Permission to use, copy, modify, and distribute this software for
     17// any purpose without fee is hereby granted, provided that this
     18// entire notice is included in all copies of any software which is or
     19// includes a copy or modification of this software and in all copies
     20// of the supporting documentation for such software. THIS SOFTWARE IS
     21// BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY.
     22// IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE ANY REPRESENTATION
     23// OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
     24// SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
     25//
    3126//----------------------------------------------------------------------
    32 //FJENDHEADER
     27//ENDHEADER
    3328
    3429
  • external/fastjet/internal/base.hh

    r37deb3b rba7fc1e  
    11
    2 //FJSTARTHEADER
    3 // $Id: base.hh 3433 2014-07-23 08:17:03Z salam $
     2//STARTHEADER
     3// $Id: base.hh 2717 2011-11-17 14:15:46Z salam $
    44//
    5 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     5// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    66//
    77//----------------------------------------------------------------------
     
    1414//
    1515//  The algorithms that underlie FastJet have required considerable
    16 //  development. They are described in the original FastJet paper,
    17 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     16//  development and are described in hep-ph/0512210. If you use
    1817//  FastJet as part of work towards a scientific publication, please
    19 //  quote the version you use and include a citation to the manual and
    20 //  optionally also to hep-ph/0512210.
     18//  include a citation to the FastJet paper.
    2119//
    2220//  FastJet is distributed in the hope that it will be useful,
     
    2826//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2927//----------------------------------------------------------------------
    30 //FJENDHEADER
     28//ENDHEADER
    3129
    3230#ifndef __FASTJET_FASTJET_BASE_HH__
  • external/fastjet/internal/numconsts.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: numconsts.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: numconsts.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/plugins/ATLASCone/ATLASConePlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ATLASConePlugin.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129// fastjet stuff
  • external/fastjet/plugins/ATLASCone/fastjet/ATLASConePlugin.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: ATLASConePlugin.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: ATLASConePlugin.hh 2758 2011-11-24 08:31:58Z soyez $
    33//
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129// Note on the implementation:
  • external/fastjet/plugins/CDFCones/CDFJetCluPlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CDFJetCluPlugin.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/CDFJetCluPlugin.hh"
  • external/fastjet/plugins/CDFCones/CDFMidPointPlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CDFMidPointPlugin.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/CDFMidPointPlugin.hh"
  • external/fastjet/plugins/CDFCones/JetCluAlgorithm.cc

    r37deb3b rba7fc1e  
    1111// History of changes compared to the original JetCluAlgorithm.cc file
    1212//
    13 // 2014-08-13 Matteo Cacciari and Gavin Salam
    14 //        * commented out towers variable in JetCluAlgorithm::buildPreClusters
    15 //          interface to avoid compiler warning
    16 //
    1713// 2011-11-14  Gregory Soyez  <soyez@fastjet.fr>
    1814//
     
    5955}
    6056
    61 // MC+GPS 2014-08-13, commented out the towers variable to avoid an
    62 // unused variable warning
    63 void JetCluAlgorithm::buildPreClusters(std::vector<Cluster>& seedTowers, std::vector<PhysicsTower>& /*towers*/,
     57void JetCluAlgorithm::buildPreClusters(std::vector<Cluster>& seedTowers, std::vector<PhysicsTower>& towers,
    6458                                       std::vector<Cluster>& preClusters)
    6559{
  • external/fastjet/plugins/CDFCones/MidPointAlgorithm.cc

    r37deb3b rba7fc1e  
    1111// History of changes compared to the original MidPointAlgorithm.cc file
    1212//
    13 // 2014-08-13 Matteo Cacciari and Gavin Salam
    14 //        * changed a number of int -> unsigned (and in one case
    15 //          added explicit conversion to int) to eliminate
    16 //          long-standing compiler warnings
    17 //
    1813// 2009-01-17  Gregory Soyez  <soyez@fastjet.fr>
    1914//
     
    7368  std::vector< std::vector<bool> > distanceOK;
    7469  distanceOK.resize(stableCones.size() - 1);
    75   // MC+GPS 2014-08-13, replaced int with unsigned
    76   for(unsigned nCluster1 = 1; nCluster1 < stableCones.size(); nCluster1++){
     70  for(int nCluster1 = 1; nCluster1 < stableCones.size(); nCluster1++){
    7771    distanceOK[nCluster1 - 1].resize(nCluster1);
    7872    double cluster1Rapidity = stableCones[nCluster1].fourVector.y();
    7973    double cluster1Phi      = stableCones[nCluster1].fourVector.phi();
    80     // MC+GPS 2014-08-13, replaced int with unsigned
    81     for(unsigned nCluster2 = 0; nCluster2 < nCluster1; nCluster2++){
     74    for(int nCluster2 = 0; nCluster2 < nCluster1; nCluster2++){
    8275      double cluster2Rapidity = stableCones[nCluster2].fourVector.y();
    8376      double cluster2Phi      = stableCones[nCluster2].fourVector.phi();
     
    10194  // Loop over all combinations. Calculate MidPoint. Make midPointClusters.
    10295  bool reduceConeSize = false;
    103   // MC+GPS 2014-08-13, replaced int with unsigned
    104   for(unsigned iPair = 0; iPair < pairs.size(); iPair++){
     96  for(int iPair = 0; iPair < pairs.size(); iPair++){
    10597    // Calculate rapidity, phi and pT of MidPoint.
    10698    LorentzVector midPoint(0,0,0,0);
    107     // MC+GPS 2014-08-13, replaced int with unsigned
    108     for(unsigned iPairMember = 0; iPairMember < pairs[iPair].size(); iPairMember++)
     99    for(int iPairMember = 0; iPairMember < pairs[iPair].size(); iPairMember++)
    109100      midPoint.add(stableCones[pairs[iPair][iPairMember]].fourVector);
    110101    iterateCone(midPoint.y(),midPoint.phi(),midPoint.pt(),towers,stableCones,reduceConeSize);
     
    183174  if(testPair.size())
    184175    nextClusterStart = testPair.back() + 1;
    185   // MC+GPS 2014-08-13, replaced int nextCluster with unsigned
    186   for(unsigned nextCluster = nextClusterStart; nextCluster <= distanceOK.size(); nextCluster++){
     176  for(int nextCluster = nextClusterStart; nextCluster <= distanceOK.size(); nextCluster++){
    187177    // Is new SeedCone less than 2*_coneRadius apart from all clusters in testPair?
    188178    bool addCluster = true;
    189     // MC+GPS 2014-08-13, replaced int iCluster with unsigned
    190     for(unsigned iCluster = 0; iCluster < testPair.size() && addCluster; iCluster++)
     179    for(int iCluster = 0; iCluster < testPair.size() && addCluster; iCluster++)
    191180      if(!distanceOK[nextCluster - 1][testPair[iCluster]])
    192181        addCluster = false;
     
    198187        pairs.push_back(testPair);
    199188      // If not bigger than allowed, find more clusters within 2*_coneRadius.
    200       // GPS+MC 2014-08-13, replaced testPair.size() with int(testPair.size())
    201       if(int(testPair.size()) < maxClustersInPair)
     189      if(testPair.size() < maxClustersInPair)
    202190        addClustersToPairs(testPair,pairs,distanceOK,maxClustersInPair);
    203191      // All combinations containing testPair found. Remove last element.
  • external/fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CDFJetCluPlugin.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: CDFJetCluPlugin.hh 2758 2011-11-24 08:31:58Z soyez $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __CDFJETCLUPLUGIN_HH__
  • external/fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CDFMidPointPlugin.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: CDFMidPointPlugin.hh 2758 2011-11-24 08:31:58Z soyez $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __CDFMIDPOINTPLUGIN_HH__
  • external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CMSIterativeConePlugin.cc 1504 2009-04-10 13:39:48Z salam $
    3 //
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     5// Copyright (c) ????-????, CMS [for the iterative-cone code itself]
    56//
    67//----------------------------------------------------------------------
    7 // This file is part of FastJet.
    8 //
    9 //  FastJet is free software; you can redistribute it and/or modify
    10 //  it under the terms of the GNU General Public License as published by
    11 //  the Free Software Foundation; either version 2 of the License, or
    12 //  (at your option) any later version.
    13 //
    14 //  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
    17 //  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
    20 //
    21 //  FastJet is distributed in the hope that it will be useful,
    22 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
    23 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    24 //  GNU General Public License for more details.
    25 //
    26 //  You should have received a copy of the GNU General Public License
    27 //  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
     8// This file is part of FastJet. It contains code that has been
     9// obtained from the CMS collaboration, revision 1.14 of the
     10// CMSIterativeConeAlgorithm.cc file in CMSSW, see
     11//   http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/RecoJets/JetAlgorithms/src/CMSIterativeConeAlgorithm.cc?hideattic=0&revision=1.14&view=markup
     12//
     13// Permission has been granted by the CMS collaboration to release it
     14// in FastJet under the terms of the GNU Public License(v2) (see the
     15// COPYING file in the main FastJet directory for details).
     16// Changes from the original file are listed below.
     17//
     18// FastJet is free software; you can redistribute it and/or modify
     19// it under the terms of the GNU General Public License as published by
     20// the Free Software Foundation; either version 2 of the License, or
     21// (at your option) any later version.
     22//
     23// The algorithms that underlie FastJet have required considerable
     24// development and are described in hep-ph/0512210. If you use
     25// FastJet as part of work towards a scientific publication, please
     26// include a citation to the FastJet paper.
     27//
     28// FastJet is distributed in the hope that it will be useful,
     29// but WITHOUT ANY WARRANTY; without even the implied warranty of
     30// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     31// GNU General Public License for more details.
     32//
     33// You should have received a copy of the GNU General Public License
     34// along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2835//----------------------------------------------------------------------
    29 //FJENDHEADER
     36//ENDHEADER
    3037
    3138// List of changes compared to the original CMS code (revision 1.14 of
  • external/fastjet/plugins/CMSIterativeCone/fastjet/CMSIterativeConePlugin.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
     1//STARTHEADER
    22// $Id: CMSIterativeConePlugin.hh 1508 2009-04-10 22:46:49Z soyez $
    33//
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __CMSITERATIVECONEPLUGIN_HH__
  • external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: D0RunIBaseConePlugin.cc 1779 2010-10-25 10:32:59Z soyez $
    3 //
    4 // Copyright (c) 2009-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2009-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129// D0 stuff
  • external/fastjet/plugins/D0RunICone/fastjet/D0RunIBaseConePlugin.hh

    r37deb3b rba7fc1e  
    22#define __D0RUNIBASECONEPLUGIN_HH__
    33
    4 //FJSTARTHEADER
     4//STARTHEADER
    55// $Id: D0RunIBaseConePlugin.hh 1778 2010-10-25 10:02:58Z soyez $
    66//
    7 // Copyright (c) 2009-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2009-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include "fastjet/JetDefinition.hh"
  • external/fastjet/plugins/D0RunICone/fastjet/D0RunIConePlugin.hh

    r37deb3b rba7fc1e  
    22#define __D0RUNICONEPLUGIN_HH__
    33
    4 //FJSTARTHEADER
     4//STARTHEADER
    55// $Id: D0RunIConePlugin.hh 1778 2010-10-25 10:02:58Z soyez $
    66//
    7 // Copyright (c) 2009-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2009-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen)
    3532#include "D0RunIBaseConePlugin.hh"
    3633
  • external/fastjet/plugins/D0RunICone/fastjet/D0RunIpre96ConePlugin.hh

    r37deb3b rba7fc1e  
    22#define __D0RUNIPRE96CONEPLUGIN_HH__
    33
    4 //FJSTARTHEADER
     4//STARTHEADER
    55// $Id: D0RunIpre96ConePlugin.hh 1778 2010-10-25 10:02:58Z soyez $
    66//
    7 // Copyright (c) 2009-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2009-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    34 #include "fastjet/internal/base.hh" // namespace macros (include explicitly to help Doxygen)
    3532#include "D0RunIBaseConePlugin.hh"
    3633
  • external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: D0RunIIConePlugin.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/D0RunIIConePlugin.hh"
  • external/fastjet/plugins/D0RunIICone/ILConeAlgorithm.hpp

    r37deb3b rba7fc1e  
    4949//
    5050// 2012-06-12  Gregory Soyez  <soyez@fastjet.fr>
     51//
    5152//        * Replaced addItem(...) by this->addItem(...) to allow
    5253//          compilation with gcc 4.7 which no longer performs
  • external/fastjet/plugins/D0RunIICone/fastjet/D0RunIIConePlugin.hh

    r37deb3b rba7fc1e  
    22#define __D0RUNIICONEPLUGIN_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: D0RunIIConePlugin.hh 3433 2014-07-23 08:17:03Z salam $
     4//STARTHEADER
     5// $Id: D0RunIIConePlugin.hh 2761 2011-11-24 13:54:05Z soyez $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include "fastjet/JetDefinition.hh"
  • external/fastjet/plugins/EECambridge/EECambridgePlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: EECambridgePlugin.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129// fastjet stuff
  • external/fastjet/plugins/EECambridge/fastjet/EECambridgePlugin.hh

    r37deb3b rba7fc1e  
    22#define __EECAMBRIDGEPLUGIN_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: EECambridgePlugin.hh 3433 2014-07-23 08:17:03Z salam $
     4//STARTHEADER
     5// $Id: EECambridgePlugin.hh 2692 2011-11-14 16:27:44Z soyez $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2009, Matteo Cacciari, Gavin Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432
     
    8482  virtual bool exclusive_sequence_meaningful() const {return true;}
    8583
    86   /// returns true because this plugin is intended for spherical
    87   /// geometries (i.e. it's an e+e- algorithm).
    88   virtual bool is_spherical() const {return true;}
    89 
    9084private:
    9185  double _ycut;
  • external/fastjet/plugins/GridJet/GridJetPlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: GridJetPlugin.cc 2268 2011-06-20 15:12:26Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2011, Matteo Cacciari, Gavin Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129// fastjet stuff
     
    4543                              double requested_grid_spacing,
    4644                              const JetDefinition & post_jet_def) :
    47 #ifdef FASTJET_GRIDJET_USEFJGRID
    48   RectangularGrid(ymax, requested_grid_spacing), _post_jet_def(post_jet_def) {
    49 }
    50 #else
    5145  _ymin(-ymax), _ymax(ymax),
    5246  _requested_grid_spacing(requested_grid_spacing) ,
     
    5549  setup_grid();
    5650}
    57 #endif
    5851
    59 #ifdef FASTJET_GRIDJET_USEFJGRID
    60 GridJetPlugin::GridJetPlugin (const RectangularGrid & grid,
    61                               const JetDefinition & post_jet_def) :
    62   RectangularGrid(grid), _post_jet_def(post_jet_def) {
    63   if (!RectangularGrid::is_initialised())
    64     throw Error("attempt to construct GridJetPlugin with uninitialised RectangularGrid");
    65 }
    66 #endif // FASTJET_GRIDJET_USEFJGRID
    67 
    68 #ifndef FASTJET_GRIDJET_USEFJGRID
    6952void GridJetPlugin::setup_grid() {
    7053  // since we've exchanged the arguments of the constructor,
     
    8669}
    8770
     71
    8872//----------------------------------------------------------------------
    89 int GridJetPlugin::tile_index(const PseudoJet & p) const {
     73string GridJetPlugin::description () const {
     74  ostringstream desc;
     75  desc << "GridJetPlugin plugin with ymax = " << _ymax << ", dy = " << _dy << ", dphi = " << _dphi << " (requested grid spacing was " << _requested_grid_spacing << ")";
     76  if (_post_jet_def.jet_algorithm() != undefined_jet_algorithm) {
     77    desc << ", followed by " << _post_jet_def.description();
     78  }
     79  return desc.str();
     80}
     81
     82
     83//----------------------------------------------------------------------
     84double GridJetPlugin::R() const {return sqrt(_dy*_dphi/pi);}
     85
     86
     87//----------------------------------------------------------------------
     88int GridJetPlugin::igrid(const PseudoJet & p) const {
    9089  // directly taking int does not work for values between -1 and 0
    9190  // so use floor instead
     
    109108  return igrid_res;
    110109}
    111 #endif // not FASTJET_GRIDJET_USEFJGRID
    112 
    113 
    114 //----------------------------------------------------------------------
    115 string GridJetPlugin::description () const {
    116   ostringstream desc;
    117   desc << "GridJetPlugin plugin with ";
    118 #ifndef FASTJET_GRIDJET_USEFJGRID
    119   desc << "ymax = " << _ymax << ", dy = " << _dy << ", dphi = " << _dphi << " (requested grid spacing was " << _requested_grid_spacing << ")";
    120 #else
    121   desc << RectangularGrid::description();
    122 #endif
    123   if (_post_jet_def.jet_algorithm() != undefined_jet_algorithm) {
    124     desc << ", followed by " << _post_jet_def.description();
    125   }
    126   return desc.str();
    127 }
    128 
    129 
    130 //----------------------------------------------------------------------
    131 double GridJetPlugin::R() const {return sqrt(drap()*dphi()/pi);}
    132110
    133111
     
    139117  //  * a number >= 0 will mean that particle indicated by the index
    140118  //    is currently the jet on the grid
    141   vector<int> grid(n_tiles(), -1);
     119  vector<int> grid(_ntotal, -1);
    142120 
    143121  int nparticles = cs.jets().size();
     
    148126  // combine particles with whatever is in the grid
    149127  for (int i = 0; i < nparticles; i++) {
    150     int igrd = tile_index(cs.jets()[i]);
     128    int igrd = igrid(cs.jets()[i]);
    151129    //cout << i << " " << cs.jets()[i].rap() << " " << cs.jets()[i].phi()
    152130    //   << " " << igrd << " " << grid.size() << " " << _ntotal << endl;
    153131    if (igrd < 0) continue;
    154     assert(igrd <= n_tiles());
     132    assert(igrd <= _ntotal);
    155133    if (grid[igrd] == -1) {
    156134      grid[igrd] = i; // jet index of initial particle i is i
     
    167145    // make the final jets via iB recombinations
    168146    for (unsigned igrd = 0; igrd < grid.size(); igrd++) {
    169       if (grid[igrd] != -1 && tile_is_good(igrd))
    170                    cs.plugin_record_iB_recombination(grid[igrd], dij_or_diB);
     147      if (grid[igrd] != -1) cs.plugin_record_iB_recombination(grid[igrd],
     148                                                              dij_or_diB);
    171149    }
    172150  } else {
  • external/fastjet/plugins/GridJet/fastjet/GridJetPlugin.hh

    r37deb3b rba7fc1e  
    1 #ifndef __FASTJET_GRIDJETPLUGIN_HH__
    2 #define __FASTJET_GRIDJETPLUGIN_HH__
     1#ifndef __GRIDJETPLUGIN_HH__
     2#define __GRIDJETPLUGIN_HH__
    33
    4 //FJSTARTHEADER
     4//STARTHEADER
    55// $Id: GridJetPlugin.hh 2267 2011-06-20 15:10:23Z salam $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2011, Matteo Cacciari, Gavin Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432
    3533#include "fastjet/JetDefinition.hh"
    36 
    37 // makes it easy to switch back and forth between use of
    38 // RectangularGrid or not; this got enabled in FJ3.1
    39 #define FASTJET_GRIDJET_USEFJGRID
    40 
    41 #ifdef FASTJET_GRIDJET_USEFJGRID
    42 #include "fastjet/RectangularGrid.hh"
    43 #endif
    4434
    4535FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     
    5949/// but is rather provided for comparison purposes with the
    6050/// GridMedianBackgroundEstimator (which is even faster).
    61 class GridJetPlugin : public JetDefinition::Plugin
    62 #ifdef FASTJET_GRIDJET_USEFJGRID
    63                                       , RectangularGrid
    64 #endif
    65 {
     51class GridJetPlugin : public JetDefinition::Plugin {
    6652public:
    67   /// Basic constructor for the GridJetPlugin Plugin class.
     53  /// Main constructor for the GridJetPlugin Plugin class.
    6854  ///
    6955  /// \param ymax           The maximal rapidity extent of the grid
     
    7662                 const JetDefinition & post_jet_def = JetDefinition());
    7763
    78 #ifdef FASTJET_GRIDJET_USEFJGRID
    79   /// Constructor for the GridJetPlugin Plugin class that allows
    80   /// full control over the underlying grid. New in FastJet 3.1.
    81   ///
    82   /// \param grid           The maximal rapidity extent of the grid
    83   /// \param post_jet_def   if present, and not == JetDefinition()
    84   ///                       (which has undefined_jet_algorithm), then
    85   ///                       run the post_jet_def on the result of the grid
    86   ///                       clustering.
    87   GridJetPlugin (const RectangularGrid & grid,
    88                  const JetDefinition & post_jet_def = JetDefinition());
    89 #endif // FASTJET_GRIDJET_USEFJGRID
    90 
    91  
    92 
    93   // /// copy constructor
    94   // GridJetPlugin (const GridJetPlugin & plugin) {
    95   //   *this = plugin;
    96   // }
     64  /// copy constructor
     65  GridJetPlugin (const GridJetPlugin & plugin) {
     66    *this = plugin;
     67  }
    9768
    9869  // the things that are required by base class
     
    10475  virtual double R() const;
    10576
    106   // As of FastJet 3.1 the following functions become available through
    107   // the underlying RectangularGrid class.
    108 #ifndef FASTJET_GRIDJET_USEFJGRID
    10977  /// returns the actual rapidity spacing of the grid
    11078  double drap()   const {return _dy;}
     
    11583  /// returns the maximum rapidity of the grid
    11684  double rapmax() const {return _ymax;}
    117 #endif
    11885
    11986private:
    12087
    121 #ifndef FASTJET_GRIDJET_USEFJGRID
    12288  void setup_grid();
    12389
    124   int n_tiles() const {return _ntotal;}
    125   int n_good_tiles() const {return _ntotal;}
    126 
    127   int tile_index(const PseudoJet & p) const;
    128   bool tile_is_good(int /* itile */) const {return true;}
     90  int igrid(const PseudoJet & p) const;
    12991
    13092  double _ymin, _ymax, _dy, _dphi, _requested_grid_spacing;
    13193  int _ny, _nphi, _ntotal;
    132 #endif
    13394
    13495  JetDefinition _post_jet_def;
     
    13899FASTJET_END_NAMESPACE        // defined in fastjet/internal/base.hh
    139100
    140 #endif // __FASTJET_GRIDJETPLUGIN_HH__
     101#endif // __GRIDJETPLUGIN_HH__
    141102
  • external/fastjet/plugins/Jade/JadePlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: JadePlugin.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129// fastjet stuff
  • external/fastjet/plugins/Jade/fastjet/JadePlugin.hh

    r37deb3b rba7fc1e  
    22#define __JADEPLUGIN_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: JadePlugin.hh 3433 2014-07-23 08:17:03Z salam $
     4//STARTHEADER
     5// $Id: JadePlugin.hh 2577 2011-09-13 15:11:38Z salam $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2009, Matteo Cacciari, Gavin Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include "fastjet/JetDefinition.hh"
  • external/fastjet/plugins/NestedDefs/NestedDefsPlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: NestedDefsPlugin.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129// TODO
  • external/fastjet/plugins/NestedDefs/fastjet/NestedDefsPlugin.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: NestedDefsPlugin.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: NestedDefsPlugin.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __NESTEDALGSPLUGIN_HH__
  • external/fastjet/plugins/SISCone/SISConePlugin.cc

    r37deb3b rba7fc1e  
    2121                      four_vector.E);
    2222}
    23 
    24 //======================================================================
    25 // wrap-up around siscone's user-defined scales
    26 namespace siscone_plugin_internal{
    27   /// @ingroup internal
    28   /// \class SISConeUserScale
    29   /// class that makes the transition between the internal SISCone
    30   /// user-defined scale choice (using SISCone's Cjet) and
    31   /// user-defined scale choices in the plugn above (using FastJet's
    32   /// PseudoJets)
    33   class SISConeUserScale  : public siscone::Csplit_merge::Cuser_scale_base{
    34   public:
    35     /// ctor takes the "fastjet-style" user-defined scale as well as a
    36     /// reference to the current cluster sequence (to access the
    37     /// particles if needed)
    38     SISConeUserScale(const SISConePlugin::UserScaleBase *user_scale,
    39                      const ClusterSequence &cs)
    40       : _user_scale(user_scale), _cs(cs){}
    41 
    42     /// returns the scale associated to a given jet
    43     virtual double operator()(const siscone::Cjet &jet) const{
    44       return _user_scale->result(_build_PJ_from_Cjet(jet));
    45     }
    46 
    47     /// returns true id the scasle associated to jet a is larger than
    48     /// the scale associated to jet b
    49     virtual bool is_larger(const siscone::Cjet &a, const siscone::Cjet &b) const{
    50       return _user_scale->is_larger(_build_PJ_from_Cjet(a), _build_PJ_from_Cjet(b));
    51     }
    52 
    53   private:
    54     /// constructs a PseudoJet from a siscone::Cjet
    55     ///
    56     /// Note that it is tempting to overload the PseudoJet ctor. This
    57     /// would not work because down the line we need to access the
    58     /// original PseudoJet through the ClusterSequence and therefore
    59     /// the PseudoJet structure needs to be aware of the
    60     /// ClusterSequence.
    61     PseudoJet _build_PJ_from_Cjet(const siscone::Cjet &jet) const{
    62       PseudoJet j(jet.v.px, jet.v.py, jet.v.pz, jet.v.E);
    63       j.set_structure_shared_ptr(SharedPtr<PseudoJetStructureBase>(
    64                                    new SISConePlugin::UserScaleBaseStructureType<siscone::Cjet>(jet,_cs)));     
    65       return j;
    66     }
    67 
    68     const SISConePlugin::UserScaleBase *_user_scale;
    69     const ClusterSequence & _cs;
    70   };
    71 }
    72 
    73 // end of the internal material
    74 //======================================================================
    7523
    7624
     
    9745  desc << "SISCone jet algorithm with " ;
    9846  desc << "cone_radius = "       << cone_radius        () << ", ";
    99   if (_progressive_removal)
    100     desc << "progressive-removal mode, ";
    101   else 
    102     desc << "overlap_threshold = " << overlap_threshold  () << ", ";
     47  desc << "overlap_threshold = " << overlap_threshold  () << ", ";
    10348  desc << "n_pass_max = "        << n_pass_max         () << ", ";
    10449  desc << "protojet_ptmin = "    << protojet_ptmin()      << ", ";
    105   if (_progressive_removal && _user_scale) {
    106     desc << "using a user-defined scale for ordering of stable cones";
    107     string user_scale_desc = _user_scale->description();
    108     if (user_scale_desc != "") desc << " (" << user_scale_desc << ")";
    109   } else {
    110     desc <<  sm_scale_string;
    111   }
    112   if (!_progressive_removal){
    113     desc << ", caching turned "      << (caching() ? on : off);
    114     desc << ", SM stop scale = "     << _split_merge_stopping_scale;
    115   }
     50  desc <<  sm_scale_string                                << ", ";
     51  desc << "caching turned "      << (caching() ? on : off);
     52  desc << ", SM stop scale = "     << _split_merge_stopping_scale;
    11653
    11754  // add a note to the description if we use the pt-weighted splitting
     
    14885  bool new_siscone = true; // by default we'll be running it
    14986
    150   if (caching() && !_progressive_removal) {
     87  if (caching()) {
    15188
    15289    // Establish if we have a cached run with the same R, npass and
     
    201138    // run the jet finding
    202139    //cout << "plg sms: " << split_merge_scale() << endl;
    203     if (_progressive_removal){
    204       // handle the optional user-defined scale choice
    205       SharedPtr<siscone_plugin_internal::SISConeUserScale> internal_scale;
    206       if (_user_scale){
    207         internal_scale.reset(new siscone_plugin_internal::SISConeUserScale(_user_scale, clust_seq));
    208         siscone->set_user_scale(internal_scale.get());
    209       }
    210       siscone->compute_jets_progressive_removal(siscone_momenta, cone_radius(),
    211                                                 n_pass_max(), protojet_or_ghost_ptmin(),
    212                                                 Esplit_merge_scale(split_merge_scale()));
    213     } else {
    214       siscone->compute_jets(siscone_momenta, cone_radius(), overlap_threshold(),
    215                             n_pass_max(), protojet_or_ghost_ptmin(),
    216                             Esplit_merge_scale(split_merge_scale()));
    217     }
     140    siscone->compute_jets(siscone_momenta, cone_radius(), overlap_threshold(),
     141                          n_pass_max(), protojet_or_ghost_ptmin(),
     142                          Esplit_merge_scale(split_merge_scale()));
    218143  } else {
    219144    // rerun the jet finding
     
    230155  SISConeExtras * extras = new SISConeExtras(n);
    231156
    232   // the ordering in which the inclusive jets are transfered here is
    233   // deliberate and ensures that when a user asks for
    234   // inclusive_jets(), they are provided in the order in which SISCone
    235   // created them.
    236157  for (int ijet = njet-1; ijet >= 0; ijet--) {
    237158    const Cjet & jet = siscone->jets[ijet]; // shorthand
     
    286207
    287208  // give the extras object to the cluster sequence.
    288   //
    289   // As of v3.1 of FastJet, extras are automatically owned (as
    290   // SharedPtr) by the ClusterSequence and auto_ptr is deprecated. So
    291   // we can use a simple pointer here
    292   //clust_seq.plugin_associate_extras(std::auto_ptr<ClusterSequence::Extras>(extras));
    293   clust_seq.plugin_associate_extras(extras);
     209  clust_seq.plugin_associate_extras(std::auto_ptr<ClusterSequence::Extras>(extras));
    294210}
    295211
     
    299215}
    300216
    301 // //======================================================================
    302 // // material to handle user-defined scales
    303 //
    304 // //--------------------------------------------------
    305 // // SISCone structure type
    306 //
    307 // // the textual descripotion
    308 // std::string SISConePlugin::UserScaleBase::StructureType::description() const{
    309 //   return "PseudoJet wrapping a siscone::Cjet stable cone";
    310 // }
    311 //
    312 // // retrieve the constituents
    313 // //
    314 // // if you simply need to iterate over the constituents, it will be
    315 // // faster to access them via constituent(i)
    316 // vector<PseudoJet> SISConePlugin::UserScaleBase::StructureType::constituents(const PseudoJet &) const{
    317 //   vector<PseudoJet> constits;
    318 //   constits.reserve(_jet.n);
    319 //   for (unsigned int i=0; i<(unsigned int)_jet.n;i++)
    320 //     constits.push_back(constituent(i));
    321 //   return constits;
    322 // }
    323 //
    324 // // returns the number of constituents
    325 // unsigned int SISConePlugin::UserScaleBase::StructureType::size() const{
    326 //   return _jet.n;
    327 // }
    328 //
    329 // // returns the index (in the original particle list) of the ith
    330 // // constituent
    331 // int SISConePlugin::UserScaleBase::StructureType::constituent_index(unsigned int i) const{
    332 //   return _jet.contents[i];
    333 // }
    334 //
    335 // // returns the ith constituent (as a PseusoJet)
    336 // const PseudoJet & SISConePlugin::UserScaleBase::StructureType::constituent(unsigned int i) const{
    337 //   return _cs.jets()[_jet.contents[i]];
    338 // }
    339 //
    340 // // returns the scalar pt of this stable cone
    341 // double SISConePlugin::UserScaleBase::StructureType::pt_tilde() const{
    342 //   return _jet.pt_tilde;
    343 // }
    344 //
    345 // // returns the sm_var2 (signed ordering variable squared) for this stable cone
    346 // double SISConePlugin::UserScaleBase::StructureType::ordering_var2() const{
    347 //   return _jet.sm_var2;
    348 // }
    349 
    350 
    351217FASTJET_END_NAMESPACE      // defined in fastjet/internal/base.hh
  • external/fastjet/plugins/SISCone/area.cc

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 149                                                          $//
    25 // $Date:: 2007-03-15 00:13:58 +0100 (Thu, 15 Mar 2007)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/area.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 149                                                          $//
    25 // $Date:: 2007-03-15 00:13:58 +0100 (Thu, 15 Mar 2007)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/circulator.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 103                                                          $//
    25 // $Date:: 2007-02-18 17:07:34 +0100 (Sun, 18 Feb 2007)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/config.h

    r37deb3b rba7fc1e  
    4949
    5050/* Define to the full name and version of this package. */
    51 #define PACKAGE_STRING "SISCone 3.0.0"
     51#define PACKAGE_STRING "SISCone 2.0.6"
    5252
    5353/* Define to the one symbol short name of this package. */
     
    5858
    5959/* Define to the version of this package. */
    60 #define PACKAGE_VERSION "3.0.0"
     60#define PACKAGE_VERSION "2.0.6"
    6161
    6262/* Define to 1 if you have the ANSI C header files. */
     
    6464
    6565/* Version number of package */
    66 #define VERSION "3.0.0"
     66#define VERSION "2.0.6"
  • external/fastjet/plugins/SISCone/defines.h

    r37deb3b rba7fc1e  
    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::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/fastjet/SISConeBasePlugin.hh

    r37deb3b rba7fc1e  
    4343  SISConeBasePlugin (){
    4444    _use_jet_def_recombiner = false;
    45     set_progressive_removal(false);
    4645  }
    4746
     
    5049    *this = plugin;
    5150  }
    52 
    53   /// set whether to use SISCone with progressive removal instead of
    54   /// the default split_merge step.
    55   ///
    56   /// If progressive removal is enabled, the following SISCone
    57   /// variables are not used:
    58   ///
    59   /// - overlap_threshold
    60   /// - caching
    61   /// - split_merge_stopping_scale
    62   ///
    63   /// The split_merge_scale choice is reinterpreted as the ordering
    64   /// variable for progressive removal. It is also possible for the
    65   /// user to supply his/her own function for the scale that orders
    66   /// progressive removal, with set_user_scale(...)
    67   void set_progressive_removal(bool progressive_removal_in=true){
    68     _progressive_removal = progressive_removal_in;
    69   }
    70 
    71   /// returns true if progressive_removal is enabled
    72   bool progressive_removal() const{ return _progressive_removal;}
    7351
    7452  /// the cone radius
     
    127105  }
    128106
    129   // user-defined scale for progressive removal
    130   //------------------------------------------------------------
    131 
    132   /// \class UserScaleBase
    133   /// base class for user-defined ordering of stable cones (used for
    134   /// prorgessive removal)
    135   ///
    136   /// derived classes have to implement the () operator that returns
    137   /// the scale associated with a given jet.
    138   ///
    139   /// It is also highly recommended to implement the is_larger()
    140   /// method whenever possible, in order to avoid rounding issues
    141   /// known to lead to possible infrared unsafeties.
    142   ///
    143   /// The jets that are passed to this class will carry the structure
    144   /// of type SISConePlugin::StructureType which allows to retreive
    145   /// easily the following information:
    146   ///
    147   ///   vector<PseudoJet> constituents = jet.constituents();
    148   ///   unsigned int n_constituents = jet.structure_of<SISConePlugin::UserScaleBase>().size();
    149   ///   int index = jet.structure_of<SISConePlugin::UserScaleBase>().constituent_index(index i);
    150   ///   const PseudoJet & p = jet.structure_of<SISConePlugin::UserScaleBase>().constituent(index i);
    151   ///   double scalar_pt = jet.structure_of<SISConePlugin::UserScaleBase>().pt_tilde();
    152   ///
    153   /// see SISConePlugin::StructureType below for further details
    154   class UserScaleBase : public FunctionOfPseudoJet<double>{
    155   public:
    156     /// empty virtual dtor
    157     virtual ~UserScaleBase(){}
    158 
    159     /// returns the scale associated with a given jet
    160     ///
    161     /// "progressive removal" iteratively removes the stable cone with
    162     /// the largest scale
    163     virtual double result(const PseudoJet & jet) const = 0;
    164 
    165     /// returns true when the scale associated with jet a is larger than
    166     /// the scale associated with jet b
    167     ///
    168     /// By default this does a simple direct comparison but it can be
    169     /// overloaded for higher precision [recommended if possible]
    170     virtual bool is_larger(const PseudoJet & a, const PseudoJet & b) const;
    171 
    172     class StructureType; // defined below
    173   };
    174 
    175   // template class derived from UserScaleBase::StryctureType that
    176   // works for both SISCone jet classes
    177   // implemented below
    178   template<class Tjet>
    179   class UserScaleBaseStructureType;
    180 
    181   /// set a user-defined scale for stable-cone ordering in
    182   /// progressive removal
    183   void set_user_scale(const UserScaleBase *user_scale_in){ _user_scale = user_scale_in;}
    184 
    185   /// returns the user-defined scale in use (0 if none)
    186   const UserScaleBase * user_scale() const{ return _user_scale;}
    187 
    188 
    189107  // the things that one MUST overload required by base class
    190108  //---------------------------------------------------------
     
    202120  double _split_merge_stopping_scale;
    203121  bool   _use_jet_def_recombiner;
    204   bool   _progressive_removal;
    205122
    206123  mutable double _ghost_sep_scale;
     
    209126  /// call the re-clustering itself
    210127  virtual void reset_stored_plugin() const =0;
    211 
    212   const UserScaleBase * _user_scale;
    213128
    214129};
     
    270185inline SISConeBaseExtras::~SISConeBaseExtras(){}
    271186
    272 //----------------------------------------------------------------------
    273 // implementation of the structure type associated with the UserScaleBase class
    274 
    275 /// \class SISConeBasePlugin::UserScaleBase::StructureType
    276 /// the structure that allows to store the information contained
    277 /// into a siscone::Cjet (built internally in SISCone from a stable
    278 /// cone) into a PseudoJet
    279 class SISConeBasePlugin::UserScaleBase::StructureType : public PseudoJetStructureBase {
    280 public:
    281   /// base ctor (constructed from a ClusterSequence tin order to have
    282   /// access to the initial particles
    283   StructureType(const ClusterSequence &cs)
    284     : _cs(cs){}
    285 
    286   /// empty virtual dtor
    287   virtual ~StructureType(){}
    288  
    289   //--------------------------------------------------
    290   // members inherited from the base class
    291   /// the textual descripotion
    292   virtual std::string description() const{
    293     return "PseudoJet wrapping a siscone jet from a stable cone";
    294   }
    295 
    296   /// this structure has constituents
    297   virtual bool has_constituents() const {return true;}
    298 
    299   /// retrieve the constituents
    300   ///
    301   /// if you simply need to iterate over the constituents, it will be
    302   /// faster to access them via constituent(i)
    303   virtual std::vector<PseudoJet> constituents(const PseudoJet & /*reference*/) const{
    304     std::vector<PseudoJet> constits;
    305     constits.reserve(size());
    306     for (unsigned int i=0; i<size();i++)
    307       constits.push_back(constituent(i));
    308     return constits;
    309   }
    310  
    311   //--------------------------------------------------
    312   // additional information relevant for this structure
    313 
    314   /// returns the number of constituents
    315   virtual unsigned int size() const = 0;
    316 
    317   /// returns the index (in the original particle list) of the ith
    318   /// constituent
    319   virtual int constituent_index(unsigned int i) const = 0;
    320 
    321   /// returns the ith constituent (as a PseusoJet)
    322   const PseudoJet & constituent(unsigned int i) const{
    323     return _cs.jets()[constituent_index(i)];
    324   }
    325 
    326   // /// returns the scalar pt of this stable cone
    327   // virtual double pt_tilde() const = 0;
    328 
    329   /// returns the sm_var2 (signed ordering variable squared) for this stable cone
    330   virtual double ordering_var2() const = 0;
    331 
    332 protected:
    333   const ClusterSequence &_cs; ///< a reference to the CS (for access to the particles)
    334 };
    335 
    336 
    337 ///@ingroup internal
    338 /// template class derived from UserScaleBase::StryctureType that
    339 /// works for both SISCone jet classes
    340 /// implemented below
    341 template<class Tjet>
    342 class SISConeBasePlugin::UserScaleBaseStructureType : public UserScaleBase::StructureType{
    343 public:
    344   UserScaleBaseStructureType(const Tjet &jet, const ClusterSequence &cs)
    345     : UserScaleBase::StructureType(cs), _jet(jet){}
    346 
    347   /// empty virtual dtor
    348   virtual ~UserScaleBaseStructureType(){}
    349 
    350   //--------------------------------------------------
    351   // additional information relevant for this structure
    352 
    353   /// returns the number of constituents
    354   virtual unsigned int size() const{
    355     return _jet.n;
    356   }
    357 
    358   /// returns the index (in the original particle list) of the ith
    359   /// constituent
    360   virtual int constituent_index(unsigned int i) const{
    361     return _jet.contents[i];
    362   }
    363 
    364   // /// returns the scalar pt of this stable cone
    365   // virtual double pt_tilde() const{
    366   //   return _jet.pt_tilde;
    367   // }
    368 
    369   /// returns the sm_var2 (signed ordering variable squared) for this stable cone
    370   virtual double ordering_var2() const{
    371     return _jet.sm_var2;
    372   }
    373 
    374 protected:
    375   const Tjet &_jet; ///< a reference to the internal jet in SISCone
    376 };
    377 
    378187
    379188FASTJET_END_NAMESPACE        // defined in fastjet/internal/base.hh
  • external/fastjet/plugins/SISCone/fastjet/SISConePlugin.hh

    r37deb3b rba7fc1e  
    77namespace siscone{
    88  class Csiscone;
    9   class Cjet;
    109}
    1110
     
    7574  /// enum for the different split-merge scale choices;
    7675  /// Note that order _must_ be the same as in siscone
    77   enum SplitMergeScale {
    78     SM_pt,     ///< transverse momentum (E-scheme), IR unsafe
    79     SM_Et,     ///< transverse energy (E-scheme), not long. boost invariant
    80                ///< original run-II choice [may not be implemented]
    81     SM_mt,     ///< transverse mass (E-scheme), IR safe except
    82                ///< in decays of two identical narrow heavy particles
    83     SM_pttilde ///< pt-scheme pt = \sum_{i in jet} |p_{ti}|, should
    84                ///< be IR safe in all cases
     76  enum SplitMergeScale {SM_pt,     ///< transverse momentum (E-scheme), IR unsafe
     77                        SM_Et,     ///< transverse energy (E-scheme), not long. boost invariant
     78                                   ///< original run-II choice [may not be implemented]
     79                        SM_mt,     ///< transverse mass (E-scheme), IR safe except
     80                                   ///< in decays of two identical narrow heavy particles
     81                        SM_pttilde ///< pt-scheme pt = \sum_{i in jet} |p_{ti}|, should
     82                                   ///< be IR safe in all cases
    8583  };
    8684
     
    110108    _split_merge_stopping_scale = split_merge_stopping_scale_in;
    111109    _ghost_sep_scale       = 0.0;
    112     _use_pt_weighted_splitting = false;
    113     _user_scale = 0;}
     110    _use_pt_weighted_splitting = false;}
    114111
    115112
     
    128125    _split_merge_stopping_scale = 0.0;
    129126    _split_merge_scale     = split_merge_on_transverse_mass_in ? SM_mt : SM_pttilde;
    130     _ghost_sep_scale       = 0.0;
    131     _user_scale = 0;}
     127    _ghost_sep_scale       = 0.0;}
    132128 
    133129  /// backwards compatible constructor for the SISCone Plugin class
     
    145141    _split_merge_stopping_scale = 0.0;
    146142    _ghost_sep_scale       = 0.0;
    147     _use_pt_weighted_splitting = false;
    148     _user_scale = 0;}
     143    _use_pt_weighted_splitting = false;}
    149144
    150145  /// minimum pt for a protojet to be considered in the split-merge step
     
    196191};
    197192
    198 
    199 /////\class SISConePlugin::UserScaleBase::StructureType
    200 ///// the structure that allows to store the information contained
    201 ///// into a siscone::Cjet (built internally in SISCone from a stable
    202 ///// cone) into a PseudoJet
    203 //class SISConePlugin::UserScaleBase::StructureType : public PseudoJetStructureBase {
    204 //public:
    205 //  StructureType(const siscone::Cjet & jet, const ClusterSequence &cs)
    206 //    : _jet(jet), _cs(cs){}
    207 //
    208 //  //--------------------------------------------------
    209 //  // members inherited from the base class
    210 //  /// the textual descripotion
    211 //  virtual std::string description() const;
    212 //
    213 //  /// this structure has constituents
    214 //  virtual bool has_constituents() const {return true;}
    215 //
    216 //  /// retrieve the constituents
    217 //  ///
    218 //  /// if you simply need to iterate over the constituents, it will be
    219 //  /// faster to access them via constituent(i)
    220 //  virtual std::vector<PseudoJet> constituents(const PseudoJet & /*reference*/) const;
    221 //
    222 //  //--------------------------------------------------
    223 //  // additional information relevant for this structure
    224 //
    225 //  /// returns the number of constituents
    226 //  unsigned int size() const;
    227 //
    228 //  /// returns the index (in the original particle list) of the ith
    229 //  /// constituent
    230 //  int constituent_index(unsigned int i) const;
    231 //
    232 //  /// returns the ith constituent (as a PseusoJet)
    233 //  const PseudoJet & constituent(unsigned int i) const;
    234 //
    235 //  /// returns the scalar pt of this stable cone
    236 //  double pt_tilde() const;
    237 //
    238 //  /// returns the sm_var2 (signed ordering variable squared) for this stable cone
    239 //  double ordering_var2() const;
    240 //
    241 //protected:
    242 //  const siscone::Cjet &_jet;  ///< a dreference to the internal jet in SISCone
    243 //  const ClusterSequence &_cs; ///< a reference to the CS (for access to the particles)
    244 //};
    245193
    246194//======================================================================
  • external/fastjet/plugins/SISCone/fastjet/SISConeSphericalPlugin.hh

    r37deb3b rba7fc1e  
    152152  virtual void run_clustering(ClusterSequence &) const ;
    153153
    154   /// returns true because this plugin is intended for spherical
    155   /// geometries (i.e. it's an e+e- algorithm).
    156   virtual bool is_spherical() const {return true;}
    157 
    158154protected:
    159155  virtual void reset_stored_plugin() const;
  • external/fastjet/plugins/SISCone/geom_2d.cc

    r37deb3b rba7fc1e  
    2121// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2222//                                                                           //
    23 // $Revision:: 171                                                          $//
    24 // $Date:: 2007-06-19 16:26:05 +0200 (Tue, 19 Jun 2007)                     $//
     23// $Revision::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
  • external/fastjet/plugins/SISCone/geom_2d.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 268                                                          $//
    25 // $Date:: 2009-03-12 21:24:16 +0100 (Thu, 12 Mar 2009)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/hash.cc

    r37deb3b rba7fc1e  
    2121// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2222//                                                                           //
    23 // $Revision:: 225                                                          $//
    24 // $Date:: 2008-05-20 16:59:47 +0200 (Tue, 20 May 2008)                     $//
     23// $Revision::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
  • external/fastjet/plugins/SISCone/hash.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 224                                                          $//
    25 // $Date:: 2008-05-16 19:58:30 +0200 (Fri, 16 May 2008)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/momentum.cc

    r37deb3b rba7fc1e  
    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::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
  • external/fastjet/plugins/SISCone/momentum.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 163                                                          $//
    25 // $Date:: 2007-04-26 22:31:02 +0200 (Thu, 26 Apr 2007)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/protocones.cc

    r37deb3b rba7fc1e  
    2121// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2222//                                                                           //
    23 // $Revision:: 322                                                          $//
    24 // $Date:: 2011-11-15 10:12:36 +0100 (Tue, 15 Nov 2011)                     $//
     23// $Revision::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
  • external/fastjet/plugins/SISCone/protocones.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 224                                                          $//
    25 // $Date:: 2008-05-16 19:58:30 +0200 (Fri, 16 May 2008)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/quadtree.cc

    r37deb3b rba7fc1e  
    2121// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2222//                                                                           //
    23 // $Revision:: 320                                                          $//
    24 // $Date:: 2011-11-15 09:54:50 +0100 (Tue, 15 Nov 2011)                     $//
     23// $Revision::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
  • external/fastjet/plugins/SISCone/quadtree.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 123                                                          $//
    25 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/reference.cc

    r37deb3b rba7fc1e  
    2121// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2222//                                                                           //
    23 // $Revision:: 311                                                          $//
    24 // $Date:: 2011-10-05 23:27:09 +0200 (Wed, 05 Oct 2011)                     $//
     23// $Revision::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
  • external/fastjet/plugins/SISCone/reference.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 123                                                          $//
    25 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/siscone.cc

    r37deb3b rba7fc1e  
    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::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
     
    2929//#else
    3030//#define PACKAGE_NAME "SISCone"
    31 //#define VERSION "3.0.0"
     31//#define VERSION "2.0.6"
    3232//#warning "No config.h file available, using preset values"
    3333//#endif
     
    8787                           int _n_pass_max, double _ptmin,
    8888                           Esplit_merge_scale _split_merge_scale){
    89   _initialise_if_needed();
     89  // initialise random number generator
     90  if (!init_done){
     91    // initialise random number generator
     92    ranlux_init();
     93
     94    // do not do this again
     95    init_done=true;
     96
     97    // print the banner
     98    if (_banner_ostr != 0){
     99      (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
     100      (*_banner_ostr) << "#                    SISCone   version " << setw(28) << left << siscone_version() << "o" << endl;
     101      (*_banner_ostr) << "#              http://projects.hepforge.org/siscone                o" << endl;
     102      (*_banner_ostr) << "#                                                                  o" << endl;
     103      (*_banner_ostr) << "# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm   o" << endl;
     104      (*_banner_ostr) << "# SISCone was written by Gavin Salam and Gregory Soyez             o" << endl;
     105      (*_banner_ostr) << "# It is released under the terms of the GNU General Public License o" << endl;
     106      (*_banner_ostr) << "#                                                                  o" << endl;
     107      (*_banner_ostr) << "# A description of the algorithm is available in the publication   o" << endl;
     108      (*_banner_ostr) << "# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)].                   o" << endl;
     109      (*_banner_ostr) << "# Please cite it if you use SISCone.                               o" << endl;
     110      (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
     111      (*_banner_ostr) << endl;
     112
     113      _banner_ostr->flush();
     114    }
     115  }
    90116
    91117  // run some general safety tests (NB: f will be checked in split-merge)
     
    148174}
    149175
    150 
    151 /*
    152  * compute the jets from a given particle set doing multiple passes
    153  * such pass N looks for jets among all particles not put into jets
    154  * during previous passes.
    155  *  - _particles   list of particles
    156  *  - _radius      cone radius
    157  *  - _n_pass_max  maximum number of runs
    158  *  - _ptmin       minimum pT of the protojets
    159  *  - _ordering_scale    the ordering scale to decide which stable
    160  *                       cone is removed
    161  * return the number of jets found.
    162  **********************************************************************/
    163 int Csiscone::compute_jets_progressive_removal(vector<Cmomentum> &_particles, double _radius,
    164                                                int _n_pass_max, double _ptmin,
    165                                                Esplit_merge_scale _ordering_scale){
    166   _initialise_if_needed();
    167 
    168   // run some general safety tests (NB: f will be checked in split-merge)
    169   if (_radius <= 0.0 || _radius >= 0.5*M_PI) {
    170     ostringstream message;
    171     message << "Illegal value for cone radius, R = " << _radius
    172             << " (legal values are 0<R<pi/2)";
    173     throw Csiscone_error(message.str());
    174   }
    175 
    176   ptcomparison.split_merge_scale = _ordering_scale;
    177   partial_clear(); // make sure some things are initialised properly
    178 
    179   // init the split_merge algorithm with the initial list of particles
    180   // this initialises particle list p_left of remaining particles to deal with
    181   //
    182   // this stores the "processed" particles in p_uncol_hard
    183   init_particles(_particles);
    184   jets.clear();
    185 
    186   bool unclustered_left;
    187   rerun_allowed = false;
    188   protocones_list.clear();
    189 
    190   do{
    191     //cout << n_left << " particle left" << endl;
    192 
    193     // initialise stable_cone finder
    194     // here we use the list of remaining particles
    195     // AFTER COLLINEAR CLUSTERING !!!!!!
    196     Cstable_cones::init(p_uncol_hard);
    197 
    198     // get stable cones (stored in 'protocones')
    199     unclustered_left = get_stable_cones(_radius);
    200 
    201     // add the hardest stable cone to the list of jets
    202     if (add_hardest_protocone_to_jets(&protocones, R2, _ptmin)) break;
    203  
    204     _n_pass_max--;
    205   } while ((unclustered_left) && (n_left>0) && (_n_pass_max!=0));
    206 
    207   // split & merge
    208   return jets.size();
    209 }
    210 
    211 
    212176/*
    213177 * recompute the jets with a different overlap parameter.
     
    241205
    242206
    243 // ensure things are initialised
    244 void Csiscone::_initialise_if_needed(){
    245   // initialise random number generator
    246   if (init_done) return;
    247 
    248   // initialise random number generator
    249   ranlux_init();
    250 
    251   // do not do this again
    252   init_done=true;
    253 
    254   // print the banner
    255   if (_banner_ostr != 0){
    256     (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
    257     (*_banner_ostr) << "#                    SISCone   version " << setw(28) << left << siscone_version() << "o" << endl;
    258     (*_banner_ostr) << "#              http://projects.hepforge.org/siscone                o" << endl;
    259     (*_banner_ostr) << "#                                                                  o" << endl;
    260     (*_banner_ostr) << "# This is SISCone: the Seedless Infrared Safe Cone Jet Algorithm   o" << endl;
    261     (*_banner_ostr) << "# SISCone was written by Gavin Salam and Gregory Soyez             o" << endl;
    262     (*_banner_ostr) << "# It is released under the terms of the GNU General Public License o" << endl;
    263     (*_banner_ostr) << "#                                                                  o" << endl;
    264     (*_banner_ostr) << "# A description of the algorithm is available in the publication   o" << endl;
    265     (*_banner_ostr) << "# JHEP 05 (2007) 086 [arXiv:0704.0292 (hep-ph)].                   o" << endl;
    266     (*_banner_ostr) << "# Please cite it if you use SISCone.                               o" << endl;
    267     (*_banner_ostr) << "#ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" << endl;
    268     (*_banner_ostr) << endl;
    269 
    270     _banner_ostr->flush();
    271   }
    272 }
    273207
    274208// finally, a bunch of functions to access to
  • external/fastjet/plugins/SISCone/siscone.h

    r37deb3b rba7fc1e  
    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::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
     
    7979
    8080  /**
    81    * compute the jets from a given particle set.
    82    * We are doing multiple passes such pass n_pass looks for jets among
    83    * all particles not put into jets during previous passes.
    84    * By default the number of passes is infinite (0).
    85    * \param _particles   list of particles
    86    * \param _radius      cone radius
    87    * \param _n_pass_max  maximum number of passes (0=full search)
    88    * \param _ptmin       minimum pT of the protojets
    89    * \param _ordering_scale    the ordering scale to decide which stable
    90    *                           cone is removed
    91    *
    92    * Note that the Csplit_merge::SM_var2_hardest_cut_off cut is not
    93    * used in the progressive removal variant.
    94    *
    95    * \return the number of jets found.
    96    */
    97   int compute_jets_progressive_removal(std::vector<Cmomentum> &_particles, double _radius,
    98                                        int _n_pass_max=0, double _ptmin=0.0,
    99                                        Esplit_merge_scale _ordering_scale=SM_pttilde);
    100 
    101   /**
    10281   * recompute the jets with a different overlap parameter.
    10382   * we use the same particles and R as in the preceeding call.
     
    11493                     Esplit_merge_scale _split_merge_scale=SM_pttilde);
    11594
    116   /// list of protocones found pass-by-pass (not filled by compute_jets_progressive_removal)
     95  /// list of protocones found pass-by-pass
    11796  std::vector<std::vector<Cmomentum> > protocones_list;
    11897
     
    146125  bool rerun_allowed;         ///< is recompute_jets allowed ?
    147126  static std::ostream * _banner_ostr; ///< stream to use for banners
    148 
    149   /// ensure things are initialised
    150   void _initialise_if_needed();
    151 
    152127};
    153128
  • external/fastjet/plugins/SISCone/siscone_error.cc

    r37deb3b rba7fc1e  
    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::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
  • external/fastjet/plugins/SISCone/siscone_error.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 327                                                          $//
    25 // $Date:: 2011-11-25 15:19:39 +0100 (Fri, 25 Nov 2011)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/SISCone/split_merge.cc

    r37deb3b rba7fc1e  
    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::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
     
    2828#include "siscone_error.h"
    2929#include "momentum.h"
     30#include <math.h>
    3031#include <limits>   // for max
    3132#include <iostream>
     
    3334#include <sstream>
    3435#include <cassert>
    35 #include <cmath>
    3636
    3737namespace siscone{
     
    229229#endif
    230230#endif
    231   _user_scale = NULL;
    232231  indices = NULL;
    233232
     
    238237
    239238  // no hardest cut (col-unsafe)
    240   SM_var2_hardest_cut_off = -numeric_limits<double>::max();
     239  SM_var2_hardest_cut_off = -1.0;
    241240
    242241  // no pt cutoff for the particles to put in p_uncol_hard
     
    556555}
    557556
    558 
    559 /*
    560  * remove the hardest protocone and declare it a a jet
    561  *  - protocones  list of protocones (initial jet candidates)
    562  *  - R2          cone radius (squared)
    563  *  - ptmin       minimal pT allowed for jets
    564  * return 0 on success, 1 on error
    565  *
    566  * The list of remaining particles (and the uncollinear-hard ones)
    567  * is updated.
    568  */
    569 int Csplit_merge::add_hardest_protocone_to_jets(std::vector<Cmomentum> *protocones, double R2, double ptmin){
    570 
    571   int i;
    572   Cmomentum *c;
    573   Cmomentum *v;
    574   double eta, phi;
    575   double dx, dy;
    576   double R;
    577   Cjet jet, jet_candidate;
    578   bool found_jet = false;
    579 
    580   if (protocones->size()==0)
    581     return 1;
    582 
    583   pt_min2 = ptmin*ptmin;
    584   R = sqrt(R2);
    585 
    586   // browse protocones
    587   // for each of them, build the list of particles in them
    588   for (vector<Cmomentum>::iterator p_it = protocones->begin();p_it != protocones->end();p_it++){
    589     // initialise variables
    590     c = &(*p_it);
    591 
    592     // note: cones have been tested => their (eta,phi) coordinates are computed
    593     eta = c->eta;
    594     phi = c->phi;
    595 
    596     // NOTE: this is common to this method and add_protocones, so it
    597     // could be moved into a 'build_jet_from_protocone' method
    598     //
    599     // browse particles to create cone contents
    600     jet_candidate.v = Cmomentum();
    601     jet_candidate.pt_tilde=0;
    602     jet_candidate.contents.clear();
    603     for (i=0;i<n_left;i++){
    604       v = &(p_remain[i]);
    605       // for security, avoid including particles with infinite rapidity)
    606       // NO NEEDED ANYMORE SINCE REMOVED FROM p_remain FROM THE BEGINNING
    607       //if (fabs(v->pz)!=v->E){
    608       dx = eta - v->eta;
    609       dy = fabs(phi - v->phi);
    610       if (dy>M_PI)
    611         dy -= twopi;
    612       if (dx*dx+dy*dy<R2){
    613         jet_candidate.contents.push_back(v->parent_index);
    614         jet_candidate.v+= *v;
    615         jet_candidate.pt_tilde+= pt[v->parent_index];
    616         v->index=0;
    617       }
    618     }
    619     jet_candidate.n=jet_candidate.contents.size();
    620 
    621     // set the momentum in protocones
    622     // (it was only known through eta and phi up to now)
    623     *c = jet_candidate.v;
    624     c->eta = eta; // restore exact original coords
    625     c->phi = phi; // to avoid rounding error inconsistencies
    626 
    627     // set the jet range
    628     jet_candidate.range=Ceta_phi_range(eta,phi,R);
    629 
    630     // check that the protojet has large enough pt
    631     if (jet_candidate.v.perp2()<pt_min2)
    632       continue;
    633 
    634     // assign the split-merge (or progressive-removal) squared scale variable
    635     if (_user_scale) {
    636       // sm_var2 is the signed square of the user scale returned
    637       // for the jet candidate
    638       jet_candidate.sm_var2 = (*_user_scale)(jet_candidate);
    639       jet_candidate.sm_var2 *= abs(jet_candidate.sm_var2);
    640     } else {
    641       jet_candidate.sm_var2 = get_sm_var2(jet_candidate.v, jet_candidate.pt_tilde);
    642     }
    643 
    644     // now check if it is possibly the hardest
    645     if ((! found_jet) ||
    646         (_user_scale ? _user_scale->is_larger(jet_candidate, jet)
    647                      : ptcomparison(jet_candidate, jet))){
    648       jet = jet_candidate;
    649       found_jet = true;
    650     }
    651   }
    652 
    653   // make sure at least one of the jets has passed the selection
    654   if (!found_jet) return 1; 
    655  
    656   // add the jet to the list of jets
    657   jets.push_back(jet);
    658   jets[jets.size()-1].v.build_etaphi();
    659 
    660 #ifdef DEBUG_SPLIT_MERGE
    661   cout << "PR-Jet " << jets.size() << " [size " << next_jet.contents.size() << "]:";
    662 #endif
    663    
    664   // update the list of what particles are left
    665   int p_remain_index = 0;
    666   int contents_index = 0;
    667   //sort(next_jet.contents.begin(),next_jet.contents.end());
    668   for (int index=0;index<n_left;index++){
    669     if ((contents_index<(int) jet.contents.size()) &&
    670         (p_remain[index].parent_index == jet.contents[contents_index])){
    671       // this particle belongs to the newly found jet
    672       // set pass in initial list
    673       particles[p_remain[index].parent_index].index = n_pass;
    674 #ifdef DEBUG_SPLIT_MERGE
    675       cout << " " << jet.contents[contents_index];
    676 #endif
    677       contents_index++;
    678     } else {
    679       // this particle still has to be clustered
    680       p_remain[p_remain_index] = p_remain[index];
    681       p_remain[p_remain_index].parent_index = p_remain[index].parent_index;
    682       p_remain[p_remain_index].index=1;
    683       p_remain_index++;
    684     }
    685   }
    686   p_remain.resize(n_left-jet.contents.size());
    687   n_left = p_remain.size();
    688   jets[jets.size()-1].pass = particles[jet.contents[0]].index;
    689 
    690   // increase the pass index
    691   n_pass++;
    692 
    693 #ifdef DEBUG_SPLIT_MERGE
    694   cout << endl;
    695 #endif
    696 
    697   // male sure the list of uncol_hard particles (used for the next
    698   // stable cone finding) is updated [could probably be more
    699   // efficient]
    700   merge_collinear_and_remove_soft();
    701  
    702   return 0;
    703 }
    704557
    705558/*
  • external/fastjet/plugins/SISCone/split_merge.h

    r37deb3b rba7fc1e  
    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::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
     
    141141  /// the split-merge process i.e. the variable we use for
    142142  ///  1. ordering jet candidates;
    143   ///  2. computing the overlap fraction of two candidates.
     143  ///  2. computing te overlap fraction of two candidates.
    144144  /// The default value uses pttile (p-scheme pt). Other alternatives are
    145145  /// pt, mt=sqrt(pt^2+m^2)=sqrt(E^2-pz^2) or Et.
     
    151151  ///   the default value i.e.  to use pt only for the purpose of
    152152  ///   investigating the IR issue
    153   /// - using Et is safe but does not respect boost invariance
     153  /// - using Et is safe but do not respect boost invariance
    154154  /// - using mt solves the IR unsafety issues with the pt variable
    155155  ///   for QCD jets but the IR unsafety remains for nack-to-back
     
    234234  int full_clear();
    235235
    236   ///////////////////////////////////////
    237   // user-defined stable-cone ordering //
    238   ///////////////////////////////////////
    239 
    240   /// \class Cuser_scale_base
    241   /// base class for user-defined ordering of stable cones
    242   ///
    243   /// derived classes have to implement the () operator that returns
    244   /// the scale associated with a given jet.
    245   class Cuser_scale_base{
    246   public:
    247     /// empty virtual dtor
    248     virtual ~Cuser_scale_base(){}
    249 
    250     /// the scale associated with a given jet
    251     ///
    252     /// "progressive removal" iteratively removes the stable cone with
    253     /// the largest scale
    254     virtual double operator()(const Cjet & jet) const = 0;
    255 
    256     /// returns true when the scale associated with jet a is larger than
    257     /// the scale associated with jet b
    258     ///
    259     /// By default this does a simple direct comparison but it can be
    260     /// overloaded for higher precision [recommended if possible]
    261     ///
    262     /// This function assumes that a.sm_var2 and b.sm_var2 have been
    263     /// correctly initialised with the signed squared output of
    264     /// operator(), as is by default the case when is_larger is called
    265     /// from within siscone.
    266     virtual bool is_larger(const Cjet & a, const Cjet & b) const{
    267       return (a.sm_var2 > b.sm_var2);
    268     }
    269   };
    270 
    271   /// associate a user-defined scale to order the stable cones
    272   ///
    273   /// Note that this is only used in "progressive-removal mode",
    274   /// e.g. in add_hardest_protocone_to_jets().
    275   void set_user_scale(const Cuser_scale_base * user_scale_in){
    276     _user_scale = user_scale_in;
    277   }
    278 
    279   /// return the user-defined scale (NULL if none)
    280   const Cuser_scale_base * user_scale() const { return _user_scale; }
    281 
    282236
    283237  /////////////////////////////////
     
    302256   */
    303257  int add_protocones(std::vector<Cmomentum> *protocones, double R2, double ptmin=0.0);
    304 
    305   /**
    306    * remove the hardest protocone and declare it a jet
    307    * \param protocones  list of protocones (initial jet candidates)
    308    * \param R2          cone radius (squared)
    309    * \param ptmin       minimal pT allowed for jets
    310    * \return 0 on success, 1 on error
    311    *
    312    * The list of remaining particles (and the uncollinear-hard ones)
    313    * is updated.
    314    */
    315   int add_hardest_protocone_to_jets(std::vector<Cmomentum> *protocones, double R2, double ptmin=0.0);
    316258
    317259  /**
     
    372314  Csplit_merge_ptcomparison ptcomparison;
    373315
    374   /// stop split--merge or progressive-removal when the squared SM_var
    375   /// of the hardest protojet is below this cut-off. Note that this is
    376   /// a signed square (ie SM_var*|SM_var|) to be able to handle
    377   /// negative values.
    378   ///
     316  /// stop split--merge when the SM_var of the hardest protojet
     317  /// is below this cut-off.
     318  /// This is not collinear-safe so you should not use this
     319  /// variable unless you really know what you are doing
    379320  /// Note that the cut-off is set on the variable squared.
    380321  double SM_var2_hardest_cut_off;
     
    383324  /// this is meant to allow removing soft particles in the
    384325  /// stable-cone search.
    385   ///
    386   /// This is not collinear-safe so you should not use this
    387   /// variable unless you really know what you are doing
    388   /// Note that the cut-off is set on the variable squared.
    389326  double stable_cone_soft_pt2_cutoff;
    390327
     
    453390  bool use_pt_weighted_splitting;
    454391
    455   /// use a user-defined scale to order the stable cones and jet
    456   /// candidates
    457   const Cuser_scale_base *_user_scale;
    458 
    459392#ifdef ALLOW_MERGE_IDENTICAL_PROTOCONES
    460393  /// checkxor for the candidates (to avoid having twice the same contents)
  • external/fastjet/plugins/SISCone/vicinity.cc

    r37deb3b rba7fc1e  
    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::                                                              $//
     24// $Date::                                                                  $//
    2525///////////////////////////////////////////////////////////////////////////////
    2626
  • external/fastjet/plugins/SISCone/vicinity.h

    r37deb3b rba7fc1e  
    2222// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
    2323//                                                                           //
    24 // $Revision:: 123                                                          $//
    25 // $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)                     $//
     24// $Revision::                                                              $//
     25// $Date::                                                                  $//
    2626///////////////////////////////////////////////////////////////////////////////
    2727
  • external/fastjet/plugins/TrackJet/TrackJetPlugin.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: TrackJetPlugin.cc 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
    7 // This file is part of FastJet.
     7// This file is part of FastJet. It contains code that has been
     8// obtained from the Rivet project by Leif Lonnblad, Andy Buckley and
     9// Jon Butterworth. See http://www.hepforge.org/downloads/rivet.
     10// Rivet is free software released under the terms of the GNU Public
     11// License(v2).
     12// Changes from the original file are listed below.
    813//
    914//  FastJet is free software; you can redistribute it and/or modify
     
    1318//
    1419//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     20//  development and are described in hep-ph/0512210. If you use
    1721//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     22//  include a citation to the FastJet paper.
    2023//
    2124//  FastJet is distributed in the hope that it will be useful,
     
    2730//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2831//----------------------------------------------------------------------
    29 //FJENDHEADER
     32//ENDHEADER
    3033
    3134// History of changes from the original TrackJet.cc file in Rivet <=1.1.2
  • external/fastjet/plugins/TrackJet/fastjet/TrackJetPlugin.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: TrackJetPlugin.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: TrackJetPlugin.hh 2758 2011-11-24 08:31:58Z soyez $
    33//
    4 // Copyright (c) 2007-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2007-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __TRACKJETPLUGIN_HH__
  • external/fastjet/tools/BackgroundEstimatorBase.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: BackgroundEstimatorBase.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
  • external/fastjet/tools/BackgroundEstimatorBase.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_BACKGROUND_ESTIMATOR_BASE_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: BackgroundEstimatorBase.hh 3516 2014-08-01 14:07:58Z salam $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: BackgroundEstimatorBase.hh 2689 2011-11-14 14:51:06Z soyez $
     6//
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include <fastjet/ClusterSequenceAreaBase.hh>
     
    4543///
    4644/// Abstract base class that provides the basic interface for classes
    47 /// that estimate levels of background radiation in hadron and
     45/// that estimate levels of background radiation in hadrion and
    4846/// heavy-ion collider events.
     47///
    4948///
    5049class BackgroundEstimatorBase {
     
    10099  /// determination of sigma
    101100  virtual bool has_sigma() {return false;}
    102 
    103   //----------------------------------------------------------------
    104   // now do the same thing for rho_m and sigma_m
    105 
    106   /// returns rho_m, the purely longitudinal, particle-mass-induced
    107   /// component of the background density per unit area
    108   virtual double rho_m() const{
    109     throw Error("rho_m() not supported for this Background Estimator");
    110   }
    111 
    112   /// returns sigma_m, a measure of the fluctuations in the purely
    113   /// longitudinal, particle-mass-induced component of the background
    114   /// density per unit area; must be multipled by sqrt(area) to get
    115   /// fluctuations for a region of a given area.
    116   virtual double sigma_m() const {
    117     throw Error("sigma_m() not supported for this Background Estimator");
    118   }
    119 
    120   /// Returns rho_m locally at the jet position. As for rho(jet), it is non-const.
    121   virtual double rho_m(const PseudoJet & /*jet*/){
    122     throw Error("rho_m(jet) not supported for this Background Estimator");
    123   }
    124 
    125   /// Returns sigma_m locally at the jet position. As for rho(jet), it is non-const.
    126   virtual double sigma_m(const PseudoJet & /*jet*/) {
    127     throw Error("sigma_m(jet) not supported for this Background Estimator");
    128   }
    129 
    130   /// Returns true if this background estimator has support for
    131   /// determination of rho_m.
    132   ///
    133   /// Note that support for sigma_m is automatic is one has sigma and
    134   /// rho_m support.
    135   virtual bool has_rho_m() const {return false;}
    136   //\}
    137 
     101  //\}
     102 
    138103
    139104  /// @name configuring the behaviour
     
    149114  /// The BackgroundRescalingYPolynomial class can be used to get a
    150115  /// rescaling that depends just on rapidity.
    151   ///
    152   /// There is currently no support for different rescaling classes
    153   /// for rho and rho_m determinations.
    154116  virtual void set_rescaling_class(const FunctionOfPseudoJet<double> * rescaling_class_in) { _rescaling_class = rescaling_class_in; }
    155117
  • external/fastjet/tools/Boost.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Boost.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: Boost.hh 2689 2011-11-14 14:51:06Z soyez $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_TOOL_BOOST_HH__
  • external/fastjet/tools/CASubJetTagger.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CASubJetTagger.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include <fastjet/tools/CASubJetTagger.hh>
  • external/fastjet/tools/CASubJetTagger.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: CASubJetTagger.hh 3433 2014-07-23 08:17:03Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id: CASubJetTagger.hh 2616 2011-09-30 18:03:40Z salam $
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __CASUBJET_TAGGER_HH__
  • external/fastjet/tools/Filter.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Filter.cc 3633 2014-08-15 13:23:52Z soyez $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/tools/Filter.hh"
    32 #include "fastjet/tools/Recluster.hh"
    3330#include <fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh>
    3431#include <cassert>
     
    4845// class description
    4946string Filter::description() const {
    50   if (!_initialised){
    51     return "uninitialised Filter";
    52   }
    53 
    5447  ostringstream ostr;
    5548  ostr << "Filter with subjet_def = ";
     
    8073// by the filtering
    8174PseudoJet Filter::result(const PseudoJet &jet) const {
    82   if (!_initialised){
    83     //Q: do we throw or do we return an empty PJ?
    84     throw Error("uninitialised Filter");
    85   }
    86 
    8775  // start by getting the list of subjets (including a list of sanity
    8876  // checks)
     
    9078  //     _set_filtered_elements_cafilt)
    9179  vector<PseudoJet> subjets;
    92   //JetDefinition subjet_def;
    93   bool ca_optimised = _set_filtered_elements(jet, subjets);
    94 
    95   // apply subtraction if needed:
    96   if (_subtractor){
    97     subjets = (*_subtractor)(subjets);
    98   } else if (_rho!=0){
    99     if (subjets.size()>0){
    100       const ClusterSequenceAreaBase *csab = subjets[0].validated_csab();
    101       for (unsigned int i=0;i<subjets.size();i++){
    102         subjets[i]=csab->subtracted_jet(subjets[i], _rho);
    103       }
    104     }
    105   }
     80  JetDefinition subjet_def;
     81  bool discard_area;
     82  // NB: on return, subjet_def is set to the jet definition actually
     83  //     used (so that we can make use of its recombination scheme
     84  //     when joining the jets to be kept).
     85  _set_filtered_elements(jet, subjets, subjet_def, discard_area);
    10686
    10787  // now build the vector of kept and rejected subjets
     
    11494
    11595  // gather the info under the form of a PseudoJet
    116   return _finalise(jet, kept, rejected, ca_optimised);
     96  return _finalise(jet, kept, rejected, subjet_def, discard_area);
    11797}
    11898
    11999
    120100// sets filtered_elements to be all the subjets on which filtering will work
    121 //
    122 // return true when the subjets have been optained using teh optimised
    123 // method for C/A
    124 bool Filter::_set_filtered_elements(const PseudoJet & jet,
    125                                     vector<PseudoJet> & filtered_elements) const {
    126   // create the recluster instance
    127   Recluster recluster;
    128   if ((_Rfilt>=0) || (_Rfiltfunc))
    129     recluster = Recluster(cambridge_algorithm, (_Rfiltfunc) ? (*_Rfiltfunc)(jet) : _Rfilt, Recluster::keep_all);
    130   else
    131     recluster = Recluster(_subjet_def, false, Recluster::keep_all);
    132 
    133   // get the subjets
    134   //JetDefinition subjet_def;
    135   return recluster.get_new_jets_and_def(jet, filtered_elements);
    136 }
     101void Filter::_set_filtered_elements(const PseudoJet & jet,
     102                                    vector<PseudoJet> & filtered_elements,
     103                                    JetDefinition & subjet_def,
     104                                    bool & discard_area) const {
     105  // sanity checks
     106  //-------------------------------------------------------------------
     107  // make sure that the jet has constituents
     108  if (! jet.has_constituents())
     109    throw Error("Filter can only be applied on jets having constituents");
     110
     111  // for a whole variety of checks, we shall need the "recursive"
     112  // pieces of the jet (the jet itself or recursing down to its most
     113  // fundamental pieces).
     114  // So we do compute these once and for all
     115  vector<PseudoJet> all_pieces; //.clear();
     116  if ((!_get_all_pieces(jet, all_pieces)) || (all_pieces.size()==0))
     117    throw Error("Attempt to filter a jet that has no associated ClusterSequence or is not a superposition of jets associated with a ClusterSequence");
     118 
     119  // if the filter uses subtraction, make sure we have a CS that supports area and has
     120  // explicit ghosts
     121  if (_uses_subtraction()) {
     122    if (!jet.has_area())   
     123      throw Error("Attempt to filter and subtract (non-zero rho or subtractor) without area info for the original jet");
     124
     125    if (!_check_explicit_ghosts(all_pieces))
     126      throw Error("Attempt to filter and subtract (non-zero rho or subtractor) without explicit ghosts");
     127  }
     128
     129  // if we're dealing with a dynamic determination of the filtering
     130  // radius, do it now
     131  if ((_Rfilt>=0) || (_Rfiltfunc)){
     132    double Rfilt = (_Rfiltfunc) ? (*_Rfiltfunc)(jet) : _Rfilt;
     133    const JetDefinition::Recombiner * common_recombiner = _get_common_recombiner(all_pieces);
     134    if (common_recombiner) {
     135      if (typeid(*common_recombiner) == typeid(JetDefinition::DefaultRecombiner)) {
     136        RecombinationScheme scheme =
     137          static_cast<const JetDefinition::DefaultRecombiner *>(common_recombiner)->scheme();
     138        subjet_def = JetDefinition(cambridge_algorithm, Rfilt, scheme);
     139      } else {
     140        subjet_def = JetDefinition(cambridge_algorithm, Rfilt, common_recombiner);
     141      }
     142    } else {
     143      subjet_def = JetDefinition(cambridge_algorithm, Rfilt);
     144    }
     145  } else {
     146    subjet_def = _subjet_def;
     147  }
     148
     149  // get the jet definition to be use and whether we can apply our
     150  // simplified C/A+C/A filter
     151  //
     152  // we apply C/A clustering iff
     153  //  - the request subjet_def is C/A
     154  //  - the jet is either directly coming from C/A or if it is a
     155  //    superposition of C/A jets
     156  //  - the pieces agree with the recombination scheme of subjet_def
     157  //------------------------------------------------------------------
     158  bool simple_cafilt = _check_ca(all_pieces);
     159
     160  // extract the subjets
     161  //-------------------------------------------------------------------
     162  discard_area = false;
     163  if (simple_cafilt){
     164    // first make sure that 'filtered_elements' is empty
     165    filtered_elements.clear();
     166    _set_filtered_elements_cafilt(jet, filtered_elements, subjet_def.R());
     167    // in the following case, areas can be erroneous and will be discarded
     168    discard_area = (!_uses_subtraction()) && (jet.has_area()) && (!_check_explicit_ghosts(all_pieces));
     169  } else {
     170    // here we'll simply recluster the jets.
     171    //
     172    // To include an area support we need
     173    //  - the jet to have an area
     174    //  - subtraction requested or explicit ghosts
     175    bool do_areas = (jet.has_area()) && ((_uses_subtraction()) || (_check_explicit_ghosts(all_pieces)));
     176    _set_filtered_elements_generic(jet, filtered_elements, subjet_def, do_areas);
     177  }
     178
     179  // order the filtered elements in pt
     180  filtered_elements = sorted_by_pt(filtered_elements);
     181}
     182
     183// set the filtered elements in the simple case of C/A+C/A
     184//
     185// WATCH OUT: this could be recursively called, so filtered elements
     186//            of 'jet' are APPENDED to 'filtered_elements'
     187void Filter::_set_filtered_elements_cafilt(const PseudoJet & jet,
     188                                           vector<PseudoJet> & filtered_elements,
     189                                           double Rfilt) const{
     190  // we know that the jet is either a C/A jet or a superposition of
     191  // such pieces
     192  if (jet.has_associated_cluster_sequence()){
     193    // just extract the exclusive subjets of 'jet'
     194    const ClusterSequence *cs = jet.associated_cluster_sequence();
     195    vector<PseudoJet> local_fe;
     196
     197    double dcut = Rfilt / cs->jet_def().R();
     198    if (dcut>=1.0){
     199      local_fe.push_back(jet);
     200    } else {
     201      dcut *= dcut;
     202      local_fe = jet.exclusive_subjets(dcut);
     203    }
     204
     205    // subtract the jets if needed
     206    // Note that this one would work on pieces!!
     207    //-----------------------------------------------------------------
     208    if (_uses_subtraction()){
     209      const ClusterSequenceAreaBase * csab = jet.validated_csab();
     210      for (unsigned int i=0;i<local_fe.size();i++) {
     211        if (_subtractor) {
     212          local_fe[i] = (*_subtractor)(local_fe[i]);
     213        } else {
     214          local_fe[i] = csab->subtracted_jet(local_fe[i], _rho);
     215        }
     216      }
     217    }
     218
     219    copy(local_fe.begin(), local_fe.end(), back_inserter(filtered_elements));
     220    return;
     221  }
     222
     223  // just recurse into the pieces
     224  const vector<PseudoJet> & pieces = jet.pieces();
     225  for (vector<PseudoJet>::const_iterator it = pieces.begin();
     226       it!=pieces.end(); it++)
     227    _set_filtered_elements_cafilt(*it, filtered_elements, Rfilt);
     228}
     229
     230
     231// set the filtered elements in the generic re-clustering case (wo
     232// subtraction)
     233void Filter::_set_filtered_elements_generic(const PseudoJet & jet,
     234                                            vector<PseudoJet> & filtered_elements,
     235                                            const JetDefinition & subjet_def,
     236                                            bool do_areas) const{
     237  // create a new, internal, ClusterSequence from the jet constituents
     238  // get the subjets directly from there
     239  //
     240  // If the jet has area support then we separate the ghosts from the
     241  // "regular" particles so the subjets will also have area
     242  // support. Note that we do this regardless of whether rho is zero
     243  // or not.
     244  //
     245  // Note that to be able to separate the ghosts, one needs explicit
     246  // ghosts!!
     247  // ---------------------------------------------------------------
     248  if (do_areas){
     249    vector<PseudoJet> all_constituents = jet.constituents();
     250    vector<PseudoJet> regular_constituents, ghosts; 
     251
     252    for (vector<PseudoJet>::iterator it = all_constituents.begin();
     253         it != all_constituents.end(); it++){
     254      if (it->is_pure_ghost())
     255        ghosts.push_back(*it);
     256      else
     257        regular_constituents.push_back(*it);
     258    }
     259
     260    // figure out the ghost area from the 1st ghost (if none, any value
     261    // would probably do as the area will be 0 and subtraction will have
     262    // no effect!)
     263    double ghost_area = (ghosts.size()) ? ghosts[0].area() : 0.01;
     264    ClusterSequenceActiveAreaExplicitGhosts * csa
     265      = new ClusterSequenceActiveAreaExplicitGhosts(regular_constituents,
     266                                                    subjet_def,
     267                                                    ghosts, ghost_area);
     268
     269    // get the subjets: we use the subtracted or unsubtracted ones
     270    // depending on rho or _subtractor being non-zero
     271    if (_uses_subtraction()) {
     272      if (_subtractor) {
     273        filtered_elements = (*_subtractor)(csa->inclusive_jets());
     274      } else {
     275        filtered_elements = csa->subtracted_jets(_rho);
     276      }
     277    } else {
     278      filtered_elements = csa->inclusive_jets();
     279    }
     280
     281    // allow the cs to be deleted when it's no longer used
     282    csa->delete_self_when_unused();
     283  } else {
     284    ClusterSequence * cs = new ClusterSequence(jet.constituents(), subjet_def);
     285    filtered_elements = cs->inclusive_jets();
     286    // allow the cs to be deleted when it's no longer used
     287    cs->delete_self_when_unused();
     288  }
     289}
     290
    137291
    138292// gather the information about what is kept and rejected under the
     
    141295                            vector<PseudoJet> & kept,
    142296                            vector<PseudoJet> & rejected,
    143                             bool ca_optimisation_used) const {
    144   PseudoJet filtered_jet;
    145 
    146   if (kept.size()+rejected.size()>0){
    147     // figure out which recombiner to use
    148     const JetDefinition::Recombiner &rec = (kept.size()>0)
    149       ? *(kept[0].associated_cs()->jet_def().recombiner())
    150       : *(rejected[0].associated_cs()->jet_def().recombiner());
    151 
    152     // create an appropriate structure and transfer the info to it
    153     filtered_jet = join<StructureType>(kept, rec);
    154   } else {
    155     filtered_jet = join<StructureType>(kept);
    156   }
     297                            const JetDefinition & subjet_def,
     298                            const bool discard_area) const {
     299  // figure out which recombiner to use
     300  const JetDefinition::Recombiner &rec = *(subjet_def.recombiner());
     301
     302  // create an appropriate structure and transfer the info to it
     303  PseudoJet filtered_jet = join<StructureType>(kept, rec);
    157304  StructureType *fs = (StructureType*) filtered_jet.structure_non_const_ptr();
     305//  fs->_original_jet = jet;
    158306  fs->_rejected = rejected;
     307
     308  if (discard_area){
     309    // safety check: make sure there is an area to discard!!!
     310    assert(fs->_area_4vector_ptr);
     311    delete fs->_area_4vector_ptr;
     312    fs->_area_4vector_ptr=0;
     313  }
    159314 
    160   // if we've used C/A optimisation, we need to get rid of the area
    161   // information if it comes from a non-explicit-ghost clustering.
    162   // (because in that case it can be erroneous due the lack of
    163   // information about empty areas)
    164   if ((ca_optimisation_used) && (kept.size()+rejected.size()>0)){
    165     bool has_non_explicit_ghost_area = (kept.size()>0)
    166       ? (kept[0].has_area()     && kept[0].validated_csab()->has_explicit_ghosts())
    167       : (rejected[0].has_area() && rejected[0].validated_csab()->has_explicit_ghosts());
    168     if (has_non_explicit_ghost_area)
    169       fs->discard_area();
    170   }
    171 
    172315  return filtered_jet;
    173316}
    174317
     318// various checks
     319//----------------------------------------------------------------------
     320
     321// get the pieces down to the fundamental pieces
     322//
     323// Note that this just checks that there is an associated CS to the
     324// fundamental pieces, not that it is still valid
     325bool Filter::_get_all_pieces(const PseudoJet &jet, vector<PseudoJet> &all_pieces) const{
     326  if (jet.has_associated_cluster_sequence()){
     327    all_pieces.push_back(jet);
     328    return true;
     329  }
     330
     331  if (jet.has_pieces()){
     332    const vector<PseudoJet> pieces = jet.pieces();
     333    for (vector<PseudoJet>::const_iterator it=pieces.begin(); it!=pieces.end(); it++)
     334      if (!_get_all_pieces(*it, all_pieces)) return false;
     335    return true;
     336  }
     337
     338  return false;
     339}
     340
     341// get the common recombiner to all pieces (NULL if none)
     342//
     343// Note that if the jet has an associated cluster sequence that is no
     344// longer valid, an error will be thrown (needed since it could be the
     345// 1st check called after the enumeration of the pieces)
     346const JetDefinition::Recombiner* Filter::_get_common_recombiner(const vector<PseudoJet> &all_pieces) const{
     347  const JetDefinition & jd_ref = all_pieces[0].validated_cs()->jet_def();
     348  for (unsigned int i=1; i<all_pieces.size(); i++)
     349    if (!all_pieces[i].validated_cs()->jet_def().has_same_recombiner(jd_ref)) return NULL;
     350
     351  return jd_ref.recombiner();
     352}
     353
     354// check if the jet (or all its pieces) have explicit ghosts
     355// (assuming the jet has area support
     356//
     357// Note that if the jet has an associated cluster sequence that is no
     358// longer valid, an error will be thrown (needed since it could be the
     359// 1st check called after the enumeration of the pieces)
     360bool Filter::_check_explicit_ghosts(const vector<PseudoJet> &all_pieces) const{
     361  for (vector<PseudoJet>::const_iterator it=all_pieces.begin(); it!=all_pieces.end(); it++)
     362    if (! it->validated_csab()->has_explicit_ghosts()) return false;
     363  return true;
     364}
     365
     366// check if one can apply the simplification for C/A subjets
     367//
     368// This includes:
     369//  - the subjet definition asks for C/A subjets
     370//  - all the pieces share the same CS
     371//  - that CS is C/A with the same recombiner as the subjet def
     372//  - the filtering radius is not larger than any of the pairwise
     373//    distance between the pieces
     374//
     375// Note that if the jet has an associated cluster sequence that is no
     376// longer valid, an error will be thrown (needed since it could be the
     377// 1st check called after the enumeration of the pieces)
     378bool Filter::_check_ca(const vector<PseudoJet> &all_pieces) const{
     379  if (_subjet_def.jet_algorithm() != cambridge_algorithm) return false;
     380
     381  // check that the 1st of all the pieces (we're sure there is at
     382  // least one) is coming from a C/A clustering. Then check that all
     383  // the following pieces share the same ClusterSequence
     384  const ClusterSequence * cs_ref = all_pieces[0].validated_cs();
     385  if (cs_ref->jet_def().jet_algorithm() != cambridge_algorithm) return false;
     386  for (unsigned int i=1; i<all_pieces.size(); i++)
     387    if (all_pieces[i].validated_cs() != cs_ref) return false;
     388
     389  // check that the 1st peice has the same recombiner as the one used
     390  // for the subjet clustering
     391  // Note that since they share the same CS, checking the 2st one is enough
     392  if (!cs_ref->jet_def().has_same_recombiner(_subjet_def)) return false;
     393
     394  // we also have to make sure that the filtering radius is not larger
     395  // than any of the inter-pieces distance
     396  double Rfilt2 = _subjet_def.R();
     397  Rfilt2 *= Rfilt2;
     398  for (unsigned int i=0; i<all_pieces.size()-1; i++){
     399    for (unsigned int j=i+1; j<all_pieces.size(); j++){
     400      if (all_pieces[i].squared_distance(all_pieces[j]) <  Rfilt2) return false;
     401    }
     402  }
     403
     404  return true;
     405}
     406
     407//----------------------------------------------------------------------
     408// FilterInterface implementation
     409//----------------------------------------------------------------------
     410
    175411
    176412FASTJET_END_NAMESPACE      // defined in fastjet/internal/base.hh
  • external/fastjet/tools/Filter.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_TOOLS_FILTER_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: Filter.hh 3494 2014-07-30 20:38:48Z soyez $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: Filter.hh 2694 2011-11-14 22:27:51Z salam $
     6//
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include <fastjet/ClusterSequence.hh>
     
    10098  /// Note: this is just for derived classes
    10199  ///       a Filter initialised through this constructor will not work!
    102   Filter() : _Rfiltfunc(0), _initialised(false){};
     100  Filter() : _Rfiltfunc(0){};
    103101
    104102  /// define a filter that decomposes a jet into subjets using a
     
    115113  /// ghosts
    116114  Filter(JetDefinition subjet_def, Selector selector, double rho = 0.0) :
    117     _subjet_def(subjet_def), _Rfiltfunc(0), _Rfilt(-1), _selector(selector), _rho(rho), _subtractor(0), _initialised(true) {}
     115    _subjet_def(subjet_def), _Rfiltfunc(0), _Rfilt(-1), _selector(selector), _rho(rho), _subtractor(0) {}
    118116
    119117  /// Same as the full constructor (see above) but just specifying the radius
     
    123121  ///  \param Rfilt   the filtering radius
    124122  Filter(double Rfilt, Selector selector, double rho = 0.0) :
    125     _Rfiltfunc(0), _Rfilt(Rfilt), _selector(selector), _rho(rho), _subtractor(0), _initialised(true) {
     123    _Rfiltfunc(0), _Rfilt(Rfilt), _selector(selector), _rho(rho), _subtractor(0) {
    126124    if (_Rfilt<0)
    127125      throw Error("Attempt to create a Filter with a negative filtering radius");
     
    135133  ///  \param Rfilt_func   the filtering radius function of a PseudoJet
    136134  Filter(FunctionOfPseudoJet<double> *Rfilt_func, Selector selector, double rho = 0.0) :
    137     _Rfiltfunc(Rfilt_func), _Rfilt(-1), _selector(selector), _rho(rho), _subtractor(0), _initialised(true) {}
     135    _Rfiltfunc(Rfilt_func), _Rfilt(-1), _selector(selector), _rho(rho), _subtractor(0) {}
    138136
    139137  /// default dtor
     
    142140  /// Set a subtractor that is applied to all individual subjets before
    143141  /// deciding which ones to keep. It takes precedence over a non-zero rho.
    144   void set_subtractor(const FunctionOfPseudoJet<PseudoJet> * subtractor) {_subtractor = subtractor;}
     142  void set_subtractor(const Transformer * subtractor) {_subtractor = subtractor;}
    145143
    146144  /// runs the filtering and sets kept and rejected to be the jets of interest
     
    161159  /// It also sets the subjet_def to be used in joining things (the bit of
    162160  /// subjet def that is of interest for later is the recombiner).
    163   ///
    164   /// this returns true if teh optimisation trick for C/A reclustering has been used
    165   bool _set_filtered_elements(const PseudoJet & jet,
    166                               std::vector<PseudoJet> & filtered_elements) const;
     161  void _set_filtered_elements(const PseudoJet & jet,
     162                              std::vector<PseudoJet> & filtered_elements,
     163                              JetDefinition & subjet_def,
     164                              bool & discard_area) const;
    167165 
     166  /// set the filtered elements in the simple case of C/A+C/A
     167  void _set_filtered_elements_cafilt(const PseudoJet & jet,
     168                                     std::vector<PseudoJet> & filtered_elements,
     169                                     double Rfilt) const;
     170
     171  /// set the filtered elements in the generic re-clustering case
     172  void _set_filtered_elements_generic(const PseudoJet & jet,
     173                                      std::vector<PseudoJet> & filtered_elements,
     174                                      const JetDefinition & subjet_def,
     175                                      bool do_areas) const;
     176
    168177  /// gather the information about what is kept and rejected under the
    169178  /// form of a PseudoJet with a special ClusterSequenceInfo
    170   ///
    171   /// The last argument (ca_optimisation_used) should be true if the
    172   /// optimisation trick for C/A reclustering has been used (in which
    173   /// case some extra tests have to be run for non-explicit-ghost
    174   /// areas)
    175179  PseudoJet _finalise(const PseudoJet & jet,
    176180                      std::vector<PseudoJet> & kept,
    177181                      std::vector<PseudoJet> & rejected,
    178                       bool ca_optimisation_used) const;
     182                      const JetDefinition & subjet_def,
     183                      const bool discard_area) const;
     184
     185  // a series of checks
     186  //--------------------------------------------------------------------
     187  /// get the pieces down to the fundamental pieces
     188  bool _get_all_pieces(const PseudoJet &jet, std::vector<PseudoJet> &all_pieces) const;
     189
     190  /// get the common recombiner to all pieces (NULL if none)
     191  const JetDefinition::Recombiner* _get_common_recombiner(const std::vector<PseudoJet> &all_pieces) const;
     192
     193  /// check if one can apply the simplified trick for C/A subjets
     194  bool _check_ca(const std::vector<PseudoJet> &all_pieces) const;
     195
     196  /// check if the jet (or all its pieces) have explicit ghosts
     197  /// (assuming the jet has area support
     198  ///
     199  /// Note that if the jet has an associated cluster sequence that is no
     200  /// longer valid, an error will be thrown
     201  bool _check_explicit_ghosts(const std::vector<PseudoJet> &all_pieces) const;
    179202
    180203  bool _uses_subtraction() const {return (_subtractor || _rho != 0);}
     
    186209  Selector _selector;  ///< the subjet selection criterium
    187210  double _rho;                 ///< the background density (used for subtraction when possible)
    188   const FunctionOfPseudoJet<PseudoJet> * _subtractor; ///< for subtracting bkgd density from subjets
    189 
    190   bool _initialised;    ///< true when the Filter has been properly intialised
     211  const Transformer * _subtractor; ///< for subtracting bkgd density from subjets
    191212};
    192213
  • external/fastjet/tools/GridMedianBackgroundEstimator.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: GridMedianBackgroundEstimator.cc 3555 2014-08-11 09:56:35Z salam $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129
     
    3432
    3533FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
    36 
    3734
    3835//----------------------------------------------------------------------
     
    4239// of the specified particles.
    4340void GridMedianBackgroundEstimator::set_particles(const vector<PseudoJet> & particles) {
    44   vector<double> scalar_pt(n_tiles(), 0.0);
    45 
    46 #ifdef FASTJET_GMBGE_USEFJGRID
    47   assert(all_tiles_equal_area());
    48   //assert(n_good_tiles() == n_tiles()); // not needed now that we have an implementation
    49 #endif
    50 
    51   // check if we need to compute only rho or both rho and rho_m
    52   if (_enable_rho_m){
    53     // both rho and rho_m
    54     //
    55     // this requires a few other variables
    56     vector<double> scalar_dt(n_tiles(), 0.0);
    57     double pt, dt;
    58     for (unsigned i = 0; i < particles.size(); i++) {
    59       int j = tile_index(particles[i]);
    60       if (j >= 0){
    61         pt = particles[i].pt();
    62         dt = particles[i].mt() - pt;
    63         if (_rescaling_class == 0){
    64           scalar_pt[j] += pt;
    65           scalar_dt[j] += dt;
    66         } else {
    67           double r = (*_rescaling_class)(particles[i]);
    68           scalar_pt[j] += pt/r;
    69           scalar_dt[j] += dt/r;
    70         }
    71       }
    72     }
    73     // sort things for _percentile
    74     sort(scalar_dt.begin(), scalar_dt.end());
    75 
    76     // compute rho_m and sigma_m (see comment below for the
    77     // normaliosation of sigma)
    78     double p50 = _percentile(scalar_dt, 0.5);
    79     _rho_m   = p50 / mean_tile_area();
    80     _sigma_m = (p50-_percentile(scalar_dt, (1.0-0.6827)/2.0))/sqrt(mean_tile_area());
    81   } else {
    82     // only rho
    83     //fill(_scalar_pt.begin(), _scalar_pt.end(), 0.0);
    84     for (unsigned i = 0; i < particles.size(); i++) {
    85       int j = tile_index(particles[i]);
    86       if (j >= 0){
    87         if (_rescaling_class == 0){
    88           scalar_pt[j] += particles[i].pt();
    89         } else {
    90           scalar_pt[j] += particles[i].pt()/(*_rescaling_class)(particles[i]);
    91         }
    92       }
     41  fill(_scalar_pt.begin(), _scalar_pt.end(), 0.0);
     42  for (unsigned i = 0; i < particles.size(); i++) {
     43    int j = igrid(particles[i]);
     44    if (j >= 0){
     45      if (_rescaling_class == 0)
     46        _scalar_pt[j] += particles[i].perp();
     47      else
     48        _scalar_pt[j] += particles[i].perp()/(*_rescaling_class)(particles[i]);
    9349    }
    9450  }
    95 
    96   // if there are some "bad" tiles, then we need to exclude them from
    97   // the calculation of the median. We'll do this by condensing the
    98   // scalar_pt vector down to just the values for the tiles that are
    99   // good.
    100   //
    101   // tested answers look right in "issue" 2014-08-08-testing-rect-grid
    102   if (n_good_tiles() != n_tiles()) {
    103     int newn = 0;
    104     for (unsigned i = 0; i < scalar_pt.size(); i++) {
    105       if (tile_is_good(i)) {
    106         // clang gets confused with the SharedPtr swap if we don't
    107         // have std:: here
    108         std::swap(scalar_pt[i],scalar_pt[newn]);
    109         newn++;
    110       }
    111     }
    112     scalar_pt.resize(newn);
    113   }
    114 
    115   // in all cases, carry on with the computation of rho
    116   //
    117   // first sort
    118   sort(scalar_pt.begin(), scalar_pt.end());
    119 
    120   // then compute rho
    121   //
    122   // watch out: by definition, our sigma is the standard deviation of
    123   // the pt density multiplied by the square root of the cell area
    124   double p50 = _percentile(scalar_pt, 0.5);
    125   _rho   = p50 / mean_tile_area();
    126   _sigma = (p50-_percentile(scalar_pt, (1.0-0.6827)/2.0))/sqrt(mean_tile_area());
     51  sort(_scalar_pt.begin(), _scalar_pt.end());
    12752
    12853  _has_particles = true;
     
    13661double GridMedianBackgroundEstimator::rho() const {
    13762  verify_particles_set();
    138   return _rho;
     63  return _percentile(_scalar_pt, 0.5) / _cell_area;
    13964}
    14065
     
    14671double GridMedianBackgroundEstimator::sigma() const{
    14772  verify_particles_set();
    148   return _sigma;
     73  // watch out: by definition, our sigma is the standard deviation of
     74  // the pt density multiplied by the square root of the cell area
     75  return (_percentile(_scalar_pt, 0.5) -
     76          _percentile(_scalar_pt, (1.0-0.6827)/2.0)
     77          )/sqrt(_cell_area);
    14978}
    15079
     
    15685// determination.
    15786double GridMedianBackgroundEstimator::rho(const PseudoJet & jet)  {
    158   //verify_particles_set();
     87  verify_particles_set();
    15988  double rescaling = (_rescaling_class == 0) ? 1.0 : (*_rescaling_class)(jet);
    16089  return rescaling*rho();
     
    16695// the position of a given jet. As for rho(jet), it is non-const.
    16796double GridMedianBackgroundEstimator::sigma(const PseudoJet & jet){
    168   //verify_particles_set();
     97  verify_particles_set();
    16998  double rescaling = (_rescaling_class == 0) ? 1.0 : (*_rescaling_class)(jet);
    17099  return rescaling*sigma();
    171 }
    172 
    173 //----------------------------------------------------------------------
    174 // returns rho_m (particle-masses contribution to the 4-vector density)
    175 double GridMedianBackgroundEstimator::rho_m() const {
    176   if (! _enable_rho_m){
    177     throw Error("GridMediamBackgroundEstimator: rho_m requested but rho_m calculation has been disabled.");
    178   }
    179   verify_particles_set();
    180   return _rho_m;
    181 }
    182 
    183 
    184 //----------------------------------------------------------------------
    185 // returns sigma_m (particle-masses contribution to the 4-vector
    186 // density); must be multipled by sqrt(area) to get fluctuations
    187 // for a region of a given area.
    188 double GridMedianBackgroundEstimator::sigma_m() const{
    189   if (! _enable_rho_m){
    190     throw Error("GridMediamBackgroundEstimator: sigma_m requested but rho_m/sigma_m calculation has been disabled.");
    191   }
    192   verify_particles_set();
    193   return _sigma_m;
    194 }
    195 
    196 //----------------------------------------------------------------------
    197 // returns rho_m locally at the position of a given jet. As for
    198 // rho(jet), it is non-const.
    199 double GridMedianBackgroundEstimator::rho_m(const PseudoJet & jet)  {
    200   //verify_particles_set();
    201   double rescaling = (_rescaling_class == 0) ? 1.0 : (*_rescaling_class)(jet);
    202   return rescaling*rho_m();
    203 }
    204 
    205 
    206 //----------------------------------------------------------------------
    207 // returns sigma_m locally at the position of a given jet. As for
    208 // rho(jet), it is non-const.
    209 double GridMedianBackgroundEstimator::sigma_m(const PseudoJet & jet){
    210   //verify_particles_set();
    211   double rescaling = (_rescaling_class == 0) ? 1.0 : (*_rescaling_class)(jet);
    212   return rescaling*sigma_m();
    213100}
    214101
     
    225112string GridMedianBackgroundEstimator::description() const {
    226113  ostringstream desc;
    227 #ifdef FASTJET_GMBGE_USEFJGRID
    228   desc << "GridMedianBackgroundEstimator, with " << RectangularGrid::description();
    229 #else
    230114  desc << "GridMedianBackgroundEstimator, with grid extension |y| < " << _ymax
    231        << ", and grid cells of size dy x dphi = " << _dy << " x " << _dphi
    232        << " (requested size = " << _requested_grid_spacing << ")";
    233 #endif
     115       << " and requested grid spacing = " << _requested_grid_spacing;
    234116  return desc.str();
    235117}       
     
    262144
    263145
    264 #ifndef FASTJET_GMBGE_USEFJGRID
    265146//----------------------------------------------------------------------
    266147// protected material
     
    287168
    288169  _ntotal = _nphi * _ny;
    289   //_scalar_pt.resize(_ntotal);
    290   _tile_area = _dy * _dphi;
    291 }
    292 
    293 
    294 //----------------------------------------------------------------------
    295 // retrieve the grid tile index for a given PseudoJet
    296 int GridMedianBackgroundEstimator::tile_index(const PseudoJet & p) const {
     170  _scalar_pt.resize(_ntotal);
     171  _cell_area = _dy * _dphi;
     172}
     173
     174
     175//----------------------------------------------------------------------
     176// retrieve the grid cell index for a given PseudoJet
     177int GridMedianBackgroundEstimator::igrid(const PseudoJet & p) const {
    297178  // directly taking int does not work for values between -1 and 0
    298179  // so use floor instead
     
    312193  if (iphi == _nphi) iphi = 0; // just in case of rounding errors
    313194
    314   int index_res = iy*_nphi + iphi;
    315   assert (index_res >= 0 && index_res < _ny*_nphi);
    316   return index_res;
    317 }
    318 #endif // FASTJET_GMBGE_USEFJGRID
    319 
     195  int igrid_res = iy*_nphi + iphi;
     196  assert (igrid_res >= 0 && igrid_res < _ny*_nphi);
     197  return igrid_res;
     198}
    320199
    321200
  • external/fastjet/tools/GridMedianBackgroundEstimator.hh

    r37deb3b rba7fc1e  
    22#define __GRID_MEDIAN_BACKGROUND_ESTIMATOR_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: GridMedianBackgroundEstimator.hh 3610 2014-08-13 09:49:28Z salam $
     4//STARTHEADER
     5// $Id: GridMedianBackgroundEstimator.hh 2580 2011-09-13 17:25:43Z salam $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432
    3533#include "fastjet/tools/BackgroundEstimatorBase.hh"
    36 
    37 // if defined then we'll use the RectangularGrid class
    38 //
    39 // (For FastJet 3.2, maybe remove the symbol and simply clean up the
    40 // code below to use exclusively the RectangularGrid)
    41 #define FASTJET_GMBGE_USEFJGRID
    42 
    43 #ifdef FASTJET_GMBGE_USEFJGRID
    44 #include "fastjet/RectangularGrid.hh"
    45 #endif
    46 
    47 
    4834
    4935FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
     
    7561///   rho() [Without rescaling, they are identical]
    7662///
    77 class GridMedianBackgroundEstimator : public BackgroundEstimatorBase
    78 #ifdef FASTJET_GMBGE_USEFJGRID
    79                                                                     , RectangularGrid
    80 #endif
    81 {
    82 
     63class GridMedianBackgroundEstimator : public BackgroundEstimatorBase {
    8364public:
    8465  /// @name  constructors and destructors
    8566  //\{
    86 #ifdef FASTJET_GMBGE_USEFJGRID
    8767  //----------------------------------------------------------------
    8868  ///   \param ymax   maximal absolute rapidity extent of the grid
     
    9171  ///             periodicity in azimuthal angle (size, not area)
    9272  GridMedianBackgroundEstimator(double ymax, double requested_grid_spacing) :
    93     RectangularGrid(ymax, requested_grid_spacing),
    94     _has_particles(false), _enable_rho_m(true) {}
    95 
    96   //----------------------------------------------------------------
    97   /// Constructor based on a user's fully specified RectangularGrid
    98   GridMedianBackgroundEstimator(const RectangularGrid & grid) :
    99     RectangularGrid(grid),
    100     _has_particles(false), _enable_rho_m(true) {
    101     if (!RectangularGrid::is_initialised())
    102       throw Error("attempt to construct GridMedianBackgroundEstimator with uninitialised RectangularGrid");
    103   }   
    104 
    105 #else  // alternative in old framework where we didn't have the rectangular grid
    106   GridMedianBackgroundEstimator(double ymax, double requested_grid_spacing) :
    10773    _ymin(-ymax), _ymax(ymax),
    10874    _requested_grid_spacing(requested_grid_spacing),
    109     _has_particles(false), _enable_rho_m(true)
    110   {
    111      setup_grid();
    112   }
    113 #endif // FASTJET_GMBGE_USEFJGRID
    114 
     75    _has_particles(false){setup_grid();}
    11576  //\}
    11677
     
    12384  /// of the specified particles.
    12485  void set_particles(const std::vector<PseudoJet> & particles);
    125 
    126   /// determine whether the automatic calculation of rho_m and sigma_m
    127   /// is enabled (by default true)
    128   void set_compute_rho_m(bool enable){ _enable_rho_m = enable;}
    12986
    13087  //\}
     
    157114  bool has_sigma() {return true;}
    158115
    159   //-----------------------------------------------------------------
    160   /// Returns rho_m, the purely longitudinal, particle-mass-induced
    161   /// component of the background density per unit area
    162   double rho_m() const;
    163 
    164   /// returns sigma_m, a measure of the fluctuations in the purely
    165   /// longitudinal, particle-mass-induced component of the background
    166   /// density per unit area; must be multipled by sqrt(area) to get
    167   /// fluctuations for a region of a given area.
    168   double sigma_m() const;
    169 
    170   /// Returns rho_m locally at the jet position. As for rho(jet), it is non-const.
    171   double rho_m(const PseudoJet & jet);
    172 
    173   /// Returns sigma_m locally at the jet position. As for rho(jet), it is non-const.
    174   double sigma_m(const PseudoJet & jet);
    175 
    176   /// Returns true if this background estimator has support for
    177   /// determination of rho_m.
    178   ///
    179   /// Note that support for sigma_m is automatic is one has sigma and
    180   /// rho_m support.
    181   bool has_rho_m() const {return _enable_rho_m;}
    182 
    183 
    184116  /// returns the area of the grid cells (all identical, but
    185117  /// referred to as "mean" area for uniformity with JetMedianBGE).
    186   double mean_area() const {return mean_tile_area();}
     118  double mean_area() const {return _cell_area;}
    187119  //\}
    188120
     
    202134  /// Note that this has to be called BEFORE any attempt to do an
    203135  /// actual computation
    204   ///
    205   /// The same profile will be used for both pt and mt (this is
    206   /// probabaly a good approximation since the particle density
    207   /// changes is what dominates the rapidity profile)
    208136  virtual void set_rescaling_class(const FunctionOfPseudoJet<double> * rescaling_class);
    209137
     
    221149
    222150private:
    223 
    224 #ifndef FASTJET_GMBGE_USEFJGRID
    225 
    226151  /// configure the grid
    227152  void setup_grid();
    228153
    229154  /// retrieve the grid cell index for a given PseudoJet
    230   int tile_index(const PseudoJet & p) const;
    231 
    232   // information about the grid
    233   double _ymin, _ymax, _dy, _dphi, _requested_grid_spacing, _tile_area;
    234   int _ny, _nphi, _ntotal;
    235 
    236   int n_tiles() const {return _ntotal;}
    237   int n_good_tiles() const {return n_tiles();}
    238   int tile_is_good(int /* itile */) const {return true;}
    239 
    240   double mean_tile_area() const {return _tile_area;}
    241 #endif // FASTJET_GMBGE_USEFJGRID
    242 
     155  int igrid(const PseudoJet & p) const;
    243156
    244157  /// verify that particles have been set and throw an error if not
    245158  void verify_particles_set() const;
    246159
     160  // information about the grid
     161  double _ymin, _ymax, _dy, _dphi, _requested_grid_spacing, _cell_area;
     162  int _ny, _nphi, _ntotal;
     163
    247164  // information abotu the event
    248   //std::vector<double> _scalar_pt;
    249   double _rho, _sigma, _rho_m, _sigma_m;
     165  std::vector<double> _scalar_pt;
    250166  bool _has_particles;
    251   bool _enable_rho_m;
    252167
    253   // various warnings to inform people of potential dangers
     168  // various warnings to let people aware of potential dangers
    254169  LimitedWarning _warning_rho_of_jet;
    255170  LimitedWarning _warning_rescaling;
  • external/fastjet/tools/JHTopTagger.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: JHTopTagger.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include <fastjet/tools/JHTopTagger.hh>
  • external/fastjet/tools/JHTopTagger.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_JH_TOP_TAGGER_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: JHTopTagger.hh 3433 2014-07-23 08:17:03Z salam $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: JHTopTagger.hh 2689 2011-11-14 14:51:06Z soyez $
     6//
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432
  • external/fastjet/tools/JetMedianBackgroundEstimator.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: JetMedianBackgroundEstimator.cc 3517 2014-08-01 14:23:13Z soyez $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/tools/JetMedianBackgroundEstimator.hh"
     
    3331#include <fastjet/ClusterSequenceStructure.hh>
    3432#include <iostream>
    35 #include <sstream>
    3633
    3734FASTJET_BEGIN_NAMESPACE     // defined in fastjet/internal/base.hh
     
    4037
    4138double BackgroundJetScalarPtDensity::result(const PseudoJet & jet) const {
    42   // do not include the ghosts in the list of constituents to have a
    43   // correct behaviour when _pt_power is <= 0
    44   std::vector<PseudoJet> constituents = (!SelectorIsPureGhost())(jet.constituents());
     39  std::vector<PseudoJet> constituents = jet.constituents();
    4540  double scalar_pt = 0;
    4641  for (unsigned i = 0; i < constituents.size(); i++) {
     
    4843  }
    4944  return scalar_pt / jet.area();
    50 }
    51 
    52 
    53 std::string BackgroundJetScalarPtDensity::description() const {
    54   ostringstream oss;
    55   oss << "BackgroundScalarJetPtDensity";
    56   if (_pt_power != 1.0) oss << " with pt_power = " << _pt_power;
    57   return oss.str();
    5845}
    5946
     
    8572                                         const JetDefinition &jet_def,
    8673                                         const AreaDefinition &area_def)
    87   : _rho_range(rho_range), _jet_def(jet_def), _area_def(area_def){
     74  : _rho_range(rho_range), _jet_def(jet_def), _area_def(area_def) {
    8875
    8976  // initialise things decently
     
    274261
    275262//----------------------------------------------------------------------
    276 // returns rho_m (particle-masses contribution to the 4-vector density)
    277 double JetMedianBackgroundEstimator::rho_m() const {
    278   if (! has_rho_m()){
    279     throw Error("JetMediamBackgroundEstimator: rho_m requested but rho_m calculation is disabled (either eplicitly or due to the presence of a jet density class).");
    280   }
    281   if (_rho_range.takes_reference())
    282     throw Error("The background estimation is obtained from a selector that takes a reference jet. rho(PseudoJet) should be used in that case");
    283   _recompute_if_needed();
    284   return _rho_m;
    285 }
    286 
    287 
    288 //----------------------------------------------------------------------
    289 // returns sigma_m (particle-masses contribution to the 4-vector
    290 // density); must be multipled by sqrt(area) to get fluctuations
    291 // for a region of a given area.
    292 double JetMedianBackgroundEstimator::sigma_m() const{
    293   if (! has_rho_m()){
    294     throw Error("JetMediamBackgroundEstimator: sigma_m requested but rho_m/sigma_m calculation is disabled (either explicitly or due to the presence of a jet density class).");
    295   }
    296   if (_rho_range.takes_reference())
    297     throw Error("The background estimation is obtained from a selector that takes a reference jet. rho(PseudoJet) should be used in that case");
    298   _recompute_if_needed();
    299   return _sigma_m;
    300 }
    301 
    302 //----------------------------------------------------------------------
    303 // returns rho_m locally at the position of a given jet. As for
    304 // rho(jet), it is non-const.
    305 double JetMedianBackgroundEstimator::rho_m(const PseudoJet & jet)  {
    306   _recompute_if_needed(jet);
    307   double our_rho = _rho_m;
    308   if (_rescaling_class != 0) {
    309     our_rho *= (*_rescaling_class)(jet);
    310   }
    311   return our_rho;
    312 }
    313 
    314 
    315 //----------------------------------------------------------------------
    316 // returns sigma_m locally at the position of a given jet. As for
    317 // rho(jet), it is non-const.
    318 double JetMedianBackgroundEstimator::sigma_m(const PseudoJet & jet){
    319   _recompute_if_needed(jet);
    320   double our_sigma = _sigma_m;
    321   if (_rescaling_class != 0) {
    322     our_sigma *= (*_rescaling_class)(jet);
    323   }
    324   return our_sigma;
    325 }
    326 
    327 //----------------------------------------------------------------------
    328263// configuring behaviour
    329264//----------------------------------------------------------------------
     
    336271  set_provide_fj2_sigma(false);
    337272
    338   _enable_rho_m = true;
    339 
    340273  // reset the computed values
    341274  _rho = _sigma = 0.0;
    342   _rho_m = _sigma_m = 0.0;
    343275  _n_jets_used = _n_empty_jets = 0;
    344276  _empty_area = _mean_area = 0.0;
     
    357289// is used (as occurs also if this function is not called).
    358290void JetMedianBackgroundEstimator::set_jet_density_class(const FunctionOfPseudoJet<double> * jet_density_class_in) {
    359   _warnings_preliminary.warn("JetMedianBackgroundEstimator::set_jet_density_class: density classes are still preliminary in FastJet 3.1. Their interface may differ in future releases (without guaranteeing backward compatibility). Note that since FastJet 3.1, rho_m and sigma_m are accessible direclty in JetMedianBackgroundEstimator and GridMedianBackgroundEstimator(with no need for a density class).");
     291  _warnings_preliminary.warn("JetMedianBackgroundEstimator::set_jet_density_class: density classes are still preliminary in FastJet 3.0. Their interface may differ in future releases (without guaranteeing backward compatibility).");
    360292  _jet_density_class = jet_density_class_in;
    361293  _uptodate = false;
     
    406338  // fill the vector of pt/area (or the quantity from the jet density class)
    407339  //  - in the range
    408   vector<double> vector_for_median_pt;
    409   vector<double> vector_for_median_dt;
     340  vector<double> vector_for_median;
    410341  double total_area  = 0.0;
    411342  _n_jets_used = 0;
     
    415346
    416347  // compute the pt/area for the selected jets
    417   double median_input_pt, median_input_dt=0.0;
    418   BackgroundJetPtMDensity m_density;
    419   bool do_rho_m = has_rho_m();
    420348  for (unsigned i = 0; i < selected_jets.size(); i++) {
    421349    const PseudoJet & current_jet = selected_jets[i];
    422350
    423351    double this_area = (_use_area_4vector) ? current_jet.area_4vector().perp() : current_jet.area();
     352
    424353    if (this_area>0){
    425       // for the pt component, we either use pt or the user-provided
    426       // density class
     354      double median_input;
    427355      if (_jet_density_class == 0) {
    428         median_input_pt = current_jet.perp()/this_area;
     356        median_input = current_jet.perp()/this_area;
    429357      } else {
    430         median_input_pt = (*_jet_density_class)(current_jet);
     358        median_input = (*_jet_density_class)(current_jet);
    431359      }
    432 
    433       // handle the rho_m part if requested
    434       // note that we're using the scalar area as a normalisation inside the
    435       // density class!
    436       if (do_rho_m)
    437         median_input_dt = m_density(current_jet);
    438    
    439       // perform rescaling if needed
    440360      if (_rescaling_class != 0) {
    441         double resc = (*_rescaling_class)(current_jet);;
    442         median_input_pt /= resc;
    443         median_input_dt /= resc;
     361        median_input /= (*_rescaling_class)(current_jet);
    444362      }
    445      
    446       // store the result for future computation of the median
    447       vector_for_median_pt.push_back(median_input_pt);
    448       if (do_rho_m)
    449         vector_for_median_dt.push_back(median_input_dt);
    450 
     363      vector_for_median.push_back(median_input);
    451364      total_area  += this_area;
    452365      _n_jets_used++;
     
    454367      _warnings_zero_area.warn("JetMedianBackgroundEstimator::_compute(...): discarded jet with zero area. Zero-area jets may be due to (i) too large a ghost area (ii) a jet being outside the ghost range (iii) the computation not being done using an appropriate algorithm (kt;C/A).");
    455368    }
     369     
    456370  }
    457371 
    458372  // there is nothing inside our region, so answer will always be zero
    459   if (vector_for_median_pt.size() == 0) {
     373  if (vector_for_median.size() == 0) {
    460374    _rho        = 0.0;
    461375    _sigma      = 0.0;
    462     _rho_m      = 0.0;
    463     _sigma_m    = 0.0;
    464376    _mean_area  = 0.0;
    465377    return;
     
    480392
    481393  double stand_dev;
    482   _median_and_stddev(vector_for_median_pt, _n_empty_jets, _rho, stand_dev,
     394  _median_and_stddev(vector_for_median, _n_empty_jets, _rho, stand_dev,
    483395                     _provide_fj2_sigma);
    484396
     
    486398  _mean_area  = total_area / total_njets;
    487399  _sigma      = stand_dev * sqrt(_mean_area);
    488 
    489   // compute the rho_m part now
    490   if (do_rho_m){
    491     _median_and_stddev(vector_for_median_dt, _n_empty_jets, _rho_m, stand_dev,
    492                        _provide_fj2_sigma);
    493     _sigma_m = stand_dev * sqrt(_mean_area);
    494   }
    495400
    496401  // record that the computation has been performed 
     
    534439
    535440
     441
    536442FASTJET_END_NAMESPACE
    537443
  • external/fastjet/tools/JetMedianBackgroundEstimator.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_BACKGROUND_ESTIMATOR_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: JetMedianBackgroundEstimator.hh 3517 2014-08-01 14:23:13Z soyez $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: JetMedianBackgroundEstimator.hh 2689 2011-11-14 14:51:06Z soyez $
     6//
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include <fastjet/ClusterSequenceAreaBase.hh>
     
    123121  ///
    124122  JetMedianBackgroundEstimator(const Selector &rho_range = SelectorIdentity())
    125     : _rho_range(rho_range), _jet_def(JetDefinition()),
    126       _enable_rho_m(true){ reset(); }
     123    : _rho_range(rho_range), _jet_def(JetDefinition()) { reset(); }
    127124 
    128125
     
    171168  }
    172169
    173   /// determine whether the automatic calculation of rho_m and sigma_m
    174   /// is enabled (by default true)
    175   void set_compute_rho_m(bool enable){ _enable_rho_m = enable;}
    176 
    177170  //\}
    178171
     
    208201  virtual bool has_sigma() {return true;}
    209202
    210   //----------------------------------------------------------------
    211   // now do the same thing for rho_m and sigma_m
    212 
    213   /// returns rho_m, the purely longitudinal, particle-mass-induced
    214   /// component of the background density per unit area
    215   virtual double rho_m() const;
    216 
    217   /// returns sigma_m, a measure of the fluctuations in the purely
    218   /// longitudinal, particle-mass-induced component of the background
    219   /// density per unit area; must be multipled by sqrt(area) to get
    220   /// fluctuations for a region of a given area.
    221   virtual double sigma_m() const;
    222 
    223   /// Returns rho_m locally at the jet position. As for rho(jet), it is non-const.
    224   virtual double rho_m(const PseudoJet & /*jet*/);
    225 
    226   /// Returns sigma_m locally at the jet position. As for rho(jet), it is non-const.
    227   virtual double sigma_m(const PseudoJet & /*jet*/);
    228 
    229   /// Returns true if this background estimator has support for
    230   /// determination of rho_m.
    231   ///
    232   /// In te presence of a density class, support for rho_m is
    233   /// automatically disabled
    234   ///
    235   /// Note that support for sigma_m is automatic is one has sigma and
    236   /// rho_m support.
    237   virtual bool has_rho_m() const {return _enable_rho_m && (_jet_density_class == 0);}
    238203  //\}
    239204 
     
    243208  /// Returns the mean area of the jets used to actually compute the
    244209  /// background properties in the last call of rho() or sigma()
    245   /// If the configuration has changed in the meantime, throw an error.
    246210  double mean_area() const{
    247     if (!_uptodate)
    248       throw Error("JetMedianBackgroundEstimator::mean_area(): one may not retrieve information about the last call to rho() or sigma() when the configuration has changed in the meantime.");
    249     //_recompute_if_needed();
     211    _recompute_if_needed();
    250212    return _mean_area;
    251213  }
     
    253215  /// returns the number of jets used to actually compute the
    254216  /// background properties in the last call of rho() or sigma()
    255   /// If the configuration has changed in the meantime, throw an error.
    256217  unsigned int n_jets_used() const{
    257     if (!_uptodate)
    258       throw Error("JetMedianBackgroundEstimator::n_jets_used(): one may not retrieve information about the last call to rho() or sigma() when the configuration has changed in the meantime.");
    259     //_recompute_if_needed();
     218    _recompute_if_needed();
    260219    return _n_jets_used;
    261   }
    262 
    263   /// returns the jets used to actually compute the background
    264   /// properties
    265   std::vector<PseudoJet> jets_used() const{
    266     if (!_uptodate) throw Error("JetMedianBackgroundEstimator::n_jets_used(): one may not retrieve information about the last call to rho() or sigma() when the configuration has changed in the meantime.");
    267     _check_csa_alive();
    268     std::vector<PseudoJet> tmp_jets = _rho_range(_included_jets);
    269     std::vector<PseudoJet> used_jets;
    270     for (unsigned int i=0; i<tmp_jets.size(); i++){
    271       if (tmp_jets[i].area()>0) used_jets.push_back(tmp_jets[i]);
    272     }
    273     return used_jets;
    274220  }
    275221
     
    277223  /// the selector) that is not occupied by jets. The value is that
    278224  /// for the last call of rho() or sigma()
    279   /// If the configuration has changed in the meantime, throw an error.
    280225  ///
    281226  /// The answer is defined to be zero if the area calculation
     
    289234  /// call to the ClusterSequenceAreaBase function.
    290235  double empty_area() const{
    291     if (!_uptodate)
    292       throw Error("JetMedianBackgroundEstimator::empty_area(): one may not retrieve information about the last call to rho() or sigma() when the configuration has changed in the meantime.");
    293     //_recompute_if_needed();
     236    _recompute_if_needed();
    294237    return _empty_area;
    295238  }
     
    298241  /// background properties. The value is that for the last call of
    299242  /// rho() or sigma().
    300   /// If the configuration has changed in the meantime, throw an error.
    301243  ///
    302244  /// If the area has explicit ghosts the result is zero; for active
     
    308250  /// call to the ClusterSequenceAreaBase function.
    309251  double n_empty_jets() const{
    310     if (!_uptodate)
    311       throw Error("JetMedianBackgroundEstimator::n_empty_jets(): one may not retrieve information about the last call to rho() or sigma() when the configuration has changed in the meantime.");
    312     //_recompute_if_needed();
     252    _recompute_if_needed();
    313253    return _n_empty_jets;
    314254  }
     
    421361  /// Issue a warning otherwise
    422362  void _check_jet_alg_good_for_median() const;
    423 
     363 
    424364  // the basic parameters of this class (passed through the variou ctors)
    425365  Selector _rho_range;                   ///< range to compute the background in
     
    428368  std::vector<PseudoJet> _included_jets; ///< jets to be used
    429369 
    430   // the tunable parameters of the class
     370  // the tunable aprameters of the class
    431371  bool _use_area_4vector;
    432372  bool _provide_fj2_sigma;
    433373  const FunctionOfPseudoJet<double> * _jet_density_class;
    434374  //SharedPtr<BackgroundRescalingBase> _rescaling_class_sharedptr;
    435   bool _enable_rho_m;
    436375 
    437376  // the actual results of the computation
    438377  mutable double _rho;               ///< background estimated density per unit area
    439378  mutable double _sigma;             ///< background estimated fluctuations
    440   mutable double _rho_m;             ///< "mass" background estimated density per unit area
    441   mutable double _sigma_m;           ///< "mass" background estimated fluctuations
    442379  mutable double _mean_area;         ///< mean area of the jets used to estimate the background
    443380  mutable unsigned int _n_jets_used; ///< number of jets used to estimate the background
     
    492429  virtual double result(const PseudoJet & jet) const;
    493430
    494   virtual std::string description() const;
     431  virtual std::string description() const {return "BackgroundScalarJetPtDensity";}
    495432
    496433private:
  • external/fastjet/tools/MassDropTagger.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: MassDropTagger.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include <fastjet/tools/MassDropTagger.hh>
  • external/fastjet/tools/MassDropTagger.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: MassDropTagger.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: MassDropTagger.hh 2731 2011-11-21 12:15:21Z soyez $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_MASS_DROP_TAGGER_HH__
  • external/fastjet/tools/Pruner.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Pruner.cc 3481 2014-07-29 17:24:12Z soyez $
    3 //
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     1//STARTHEADER
     2// $Id$
     3//
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/tools/Pruner.hh"
     
    4947//----------------------------------------------------------------------
    5048// alternative (dynamic) ctor
    51 //  \param jet_def     the jet definition for the internal clustering
     49//  \param jet_def the jet definition for the internal clustering
    5250//  \param zcut_dyn    dynamic pt-fraction cut in the pruning
    5351//  \param Rcut_dyn    dynamic angular distance cut in the pruning
    5452Pruner::Pruner(const JetDefinition &jet_def,
    55          const FunctionOfPseudoJet<double> *zcut_dyn,
    56          const FunctionOfPseudoJet<double> *Rcut_dyn)
     53         FunctionOfPseudoJet<double> *zcut_dyn,
     54         FunctionOfPseudoJet<double> *Rcut_dyn)
    5755  : _jet_def(jet_def), _zcut(0), _Rcut_factor(0),
    5856    _zcut_dyn(zcut_dyn), _Rcut_dyn(Rcut_dyn), _get_recombiner_from_jet(false)  {
     
    7674  double zcut = (_zcut_dyn) ? (*_zcut_dyn)(jet) : _zcut;
    7775  PruningPlugin * pruning_plugin;
    78 
    7976  // for some constructors, we get the recombiner from the
    80   // input jet -- some acrobatics are needed
     77  // input jet -- some acrobatics are needed (see plans for FJ3.1
     78  // for a hopefully better solution).
    8179  if (_get_recombiner_from_jet) {
    82     JetDefinition jet_def = _jet_def;
    83 
    84     // if all the pieces have a shared recombiner, we'll use that
    85     // one. Otherwise, use the one from _jet_def as a fallback.
    86     JetDefinition jet_def_for_recombiner;
    87     if (_check_common_recombiner(jet, jet_def_for_recombiner)){
    88       jet_def.set_recombiner(jet_def_for_recombiner);
    89     }
    90     pruning_plugin = new PruningPlugin(jet_def, zcut, Rcut);
     80    const JetDefinition::Recombiner * common_recombiner =
     81                                              _get_common_recombiner(jet);
     82    if (common_recombiner) {
     83      JetDefinition jet_def = _jet_def;
     84      if (typeid(*common_recombiner) == typeid(JetDefinition::DefaultRecombiner)) {
     85        RecombinationScheme scheme =
     86          static_cast<const JetDefinition::DefaultRecombiner *>(common_recombiner)->scheme();
     87        jet_def.set_recombination_scheme(scheme);
     88      } else {
     89        jet_def.set_recombiner(common_recombiner);
     90      }
     91      pruning_plugin = new PruningPlugin(jet_def, zcut, Rcut);
     92    } else {
     93      // if there wasn't a common recombiner, we just use the default
     94      // recombiner that was in _jet_def
     95      pruning_plugin = new PruningPlugin(_jet_def, zcut, Rcut);
     96    }
    9197  } else {
    9298    pruning_plugin = new PruningPlugin(_jet_def, zcut, Rcut);
     
    116122  PseudoJet result_local = SelectorNHardest(1)(cs->inclusive_jets())[0];
    117123  PrunerStructure * s = new PrunerStructure(result_local);
    118   s->_Rcut = Rcut;
    119   s->_zcut = zcut;
    120124  result_local.set_structure_shared_ptr(SharedPtr<PseudoJetStructureBase>(s));
    121125 
     
    151155}
    152156
    153 // see if there is a common recombiner among the pieces; if there is
    154 // return true and set jet_def_for_recombiner so that the recombiner
    155 // can be taken from that JetDefinition. Otherwise, return
    156 // false. 'assigned' is initially false; when true, each time we meet
    157 // a new jet definition, we'll check it shares the same recombiner as
    158 // jet_def_for_recombiner.
    159 bool Pruner::_check_common_recombiner(const PseudoJet &jet,
    160                                       JetDefinition &jet_def_for_recombiner,
    161                                       bool assigned) const{
    162   if (jet.has_associated_cluster_sequence()){
    163     // if the jet def for recombination has already been assigned, check if we have the same
    164     if (assigned)
    165       return jet.validated_cs()->jet_def().has_same_recombiner(jet_def_for_recombiner);
    166 
    167     // otherwise, assign it.
    168     jet_def_for_recombiner = jet.validated_cs()->jet_def();
    169     assigned = true;
    170     return true;
    171   }
     157// see if there is a common recombiner among the pieces; if there
     158// is return a pointer to it; otherwise, return NULL.
     159//
     160// NB: this way of doing things is not ideal, because quite some work
     161//     is needed to get a correct handling of the final recombiner
     162//     (e.g. default v. non-default). In future add
     163//     set_recombiner(jet_def) to JetDefinition, maybe also add
     164//     an invalid_scheme to the default recombiner and then
     165//     do all the work below directly with a JetDefinition directly
     166//     together with JD::has_same_recombiner(...)
     167const JetDefinition::Recombiner * Pruner::_get_common_recombiner(const PseudoJet &jet) const{
     168  if (jet.has_associated_cluster_sequence())
     169    return jet.validated_cs()->jet_def().recombiner();
    172170
    173171  // if the jet has pieces, recurse in the pieces
    174172  if (jet.has_pieces()){
    175173    vector<PseudoJet> pieces = jet.pieces();
    176     if (pieces.size() == 0) return false;
    177     for (unsigned int i=0;i<pieces.size(); i++)
    178       if (!_check_common_recombiner(pieces[i], jet_def_for_recombiner, assigned)) return false;
     174    if (pieces.size() == 0) return 0;
     175    const JetDefinition::Recombiner * reco = _get_common_recombiner(pieces[0]);
     176    for (unsigned int i=1;i<pieces.size(); i++)
     177      if (_get_common_recombiner(pieces[i]) != reco) return 0;
    179178    // never returned false, so we're OK.
    180     return true;
     179    return reco;
    181180  }
    182181
    183182  // return false for any other (unknown) structure
    184   return false;
     183  return 0;
    185184}
    186185
  • external/fastjet/tools/Pruner.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_TOOLS_PRUNER_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: Pruner.hh 3481 2014-07-29 17:24:12Z soyez $
    6 //
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4//STARTHEADER
     5// $Id: Pruner.hh 2616 2011-09-30 18:03:40Z salam $
     6//
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include "fastjet/ClusterSequence.hh"
     
    4543class PruningRecombiner;
    4644class PruningPlugin;
    47 
    48 // This tells third-party code that the pruner structure
    49 // stores Rcut info; the alternative is for the user to
    50 // get the information from the version number
    51 #define FASTJET_PRUNER_STRUCTURE_STORES_RCUT
    5245
    5346//----------------------------------------------------------------------
     
    142135  ///  \param Rcut_dyn    dynamic angular distance cut in the pruning
    143136  Pruner(const JetDefinition &jet_def,
    144          const FunctionOfPseudoJet<double> *zcut_dyn,
    145          const FunctionOfPseudoJet<double> *Rcut_dyn);
     137         FunctionOfPseudoJet<double> *zcut_dyn,
     138         FunctionOfPseudoJet<double> *Rcut_dyn);
    146139
    147140  /// action on a single jet
     
    159152  bool _check_explicit_ghosts(const PseudoJet &jet) const;
    160153
    161   /// see if there is a common recombiner among the pieces; if there
    162   /// is return true and set jet_def_for_recombiner so that the
    163   /// recombiner can be taken from that JetDefinition. Otherwise,
    164   /// return false. 'assigned' is initially false; when true, each
    165   /// time we meet a new jet definition, we'll check it shares the
    166   /// same recombiner as jet_def_for_recombiner.
    167   bool _check_common_recombiner(const PseudoJet &jet,
    168                                 JetDefinition &jet_def_for_recombiner,
    169                                 bool assigned=false) const;
     154  /// return a pointer to a "common" recombiner if there is one,
     155  /// alternatively a null pointer.
     156  const JetDefinition::Recombiner * _get_common_recombiner(const PseudoJet &jet) const;
    170157
    171158  JetDefinition _jet_def; ///< the internal jet definition
    172159  double _zcut;           ///< the pt-fraction cut
    173160  double _Rcut_factor;    ///< the angular separation cut factor
    174   const FunctionOfPseudoJet<double> *_zcut_dyn; ///< dynamic zcut
    175   const FunctionOfPseudoJet<double> *_Rcut_dyn; ///< dynamic Rcut
     161  FunctionOfPseudoJet<double> *_zcut_dyn; ///< dynamic zcut
     162  FunctionOfPseudoJet<double> *_Rcut_dyn; ///< dynamic Rcut
    176163  bool   _get_recombiner_from_jet; ///< true for minimal constructor,
    177164                                   ///< causes recombiner to be set equal
     
    207194  std::vector<PseudoJet> extra_jets() const;
    208195
    209   /// return the value of Rcut that was used for this specific pruning.
    210   double Rcut() const {return _Rcut;}
    211 
    212   /// return the value of Rcut that was used for this specific pruning.
    213   double zcut() const {return _zcut;}
    214 
    215196protected:
    216197  friend class Pruner; ///< to allow setting the internal information
    217 
    218 private:
    219   double _Rcut, _zcut;
    220198};
    221199
  • external/fastjet/tools/RestFrameNSubjettinessTagger.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: RestFrameNSubjettinessTagger.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include <fastjet/tools/RestFrameNSubjettinessTagger.hh>
  • external/fastjet/tools/RestFrameNSubjettinessTagger.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_RESTFRAMENSUBJETTINESS_TAGGER_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: RestFrameNSubjettinessTagger.hh 3433 2014-07-23 08:17:03Z salam $
     4//STARTHEADER
     5// $Id: RestFrameNSubjettinessTagger.hh 2689 2011-11-14 14:51:06Z soyez $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include <fastjet/PseudoJet.hh>
  • external/fastjet/tools/Subtractor.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Subtractor.cc 3670 2014-09-08 14:17:59Z soyez $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include "fastjet/tools/Subtractor.hh"
     
    4038
    4139
    42 //----------------------------------------------------------------------
    43 // ctor
    4440Subtractor::Subtractor(double rho) : _bge(0), _rho(rho) {
    45   if (_rho<0.0) throw Error("Subtractor(rho) was passed a negative rho value; rho should be >= 0");
    46   set_defaults();
     41  assert(_rho>0.0);
    4742}
    4843
    49 //----------------------------------------------------------------------
    50 // ctor
    51 Subtractor::Subtractor(double rho, double rho_m) : _bge(0), _rho(rho) {
    52   if (_rho<0.0) throw Error("Subtractor(rho, rho_m) was passed a negative rho value; rho should be >= 0");
    53   if (rho_m<0.0) throw Error("Subtractor(rho, rho_m) was passed a negative rho_m value; rho_m should be >= 0");
    54   set_defaults();
    55   _rho_m = rho_m;
    56   set_use_rho_m(true);
    57 }
    58 
    59 //----------------------------------------------------------------------
    60 void Subtractor::set_defaults(){
    61   _rho_m = _invalid_rho;
    62   _use_rho_m = false; // likely to change in future releases!!
    63   _safe_mass = false; // likely to change in future releases!!
    64 
    65   _sel_known_vertex = Selector();
    66   _sel_leading_vertex = Selector();
    67 }
    68 
    69 //----------------------------------------------------------------------
    70 // perform the subtraction of a given jet
    7144PseudoJet Subtractor::result(const PseudoJet & jet) const {
    7245  if (!jet.has_area()){
    73     throw Error("Subtractor::result(...): Trying to subtract a jet without area support");
     46    throw Error("Trying to subtract a jet without area support");
     47  }
     48 
     49  double rho;
     50  if (_bge != 0) {
     51    rho = _bge->rho(jet);
     52  } else if (_rho != _invalid_rho) {
     53    rho = _rho;
     54  } else {
     55    throw Error("default Subtractor does not have any information about the background, which is needed to perform the subtraction");
    7456  }
    7557
    76   PseudoJet known_lv, known_pu;
    77   PseudoJet unknown = jet;
    78   if (_sel_known_vertex.worker()){
    79     // separate the jet constituents in 3 groups:
    80     //   unknown vertex
    81     //   known vertex, leading vertex
    82     //   known vertex, non-leading vertex (PU)
    83     vector<PseudoJet> constits_unknown, constits_known;
    84     _sel_known_vertex.sift(jet.constituents(),
    85                            constits_known,
    86                            constits_unknown);
    87     vector<PseudoJet> constits_known_lv, constits_known_pu;
    88     _sel_leading_vertex.sift(constits_known,
    89                              constits_known_lv,
    90                              constits_known_pu);
    91 
    92     // For the parts related to the known vertices (LV or PU), we just
    93     // sum the 4-momenta. For the unknown part, we assign it the full
    94     // jet area.
    95     known_lv = (constits_known_lv.size()!=0)
    96       ? SelectorIdentity().sum(constits_known_lv) : 0.0*jet;
    97     known_pu = (constits_known_pu.size()!=0)
    98       ? SelectorIdentity().sum(constits_known_pu) : 0.0*jet;
    99     if (constits_unknown.size()==0){
    100       // no need for any form of subtraction!
    101       PseudoJet subtracted_jet = jet;
    102       subtracted_jet.reset_momentum(known_lv);
    103       return subtracted_jet;
    104     }
    105     unknown = jet; // that keeps all info including area
    106     unknown.reset_momentum(SelectorIdentity().sum(constits_unknown));
    107   } else {
    108     known_lv = jet; // ensures correct rap-phi!
    109     known_lv *= 0.0;
    110     known_pu = known_lv;
    111   }
    112 
    113   // prepare for the subtraction and compute the 4-vector to be
    114   // subtracted
    11558  PseudoJet subtracted_jet = jet;
    116   PseudoJet to_subtract = known_pu + _amount_to_subtract(unknown);
    117 
    118   // sanity check for the transverse momentum
    119   if (to_subtract.pt2() < jet.pt2() ) {
     59  PseudoJet area4vect = jet.area_4vector();
     60  // sanity check
     61  if (rho*area4vect.perp() < jet.perp() ) {
    12062    // this subtraction should retain the jet's structural
    12163    // information
    122     subtracted_jet -= to_subtract;
     64    subtracted_jet -= rho*area4vect;
    12365  } else {
    124     // this sets the jet's momentum while maintaining all of the jet's
    125     // structural information
    126     subtracted_jet.reset_momentum(known_lv);
    127     return subtracted_jet;
     66    // this sets the jet's momentum to zero while
     67    // maintaining all of the jet's structural information
     68    subtracted_jet *= 0;
    12869  }
    129 
    130   // make sure that in the end the pt is at least the one known to
    131   // come from the leading vertex
    132   if (subtracted_jet.pt2() < known_lv.pt2()){
    133     subtracted_jet.reset_momentum(known_lv);
    134     return subtracted_jet;
    135   }
    136 
    137   // sanity check for the mass (if needed)
    138   if ((_safe_mass) && (subtracted_jet.m2() < known_lv.m2())){
    139     // in this case, we keep pt and phi as obtained from the
    140     // subtraction above and take rap and m from the part that comes
    141     // from the leading vertex (or the original jet if nothing comes
    142     // from the leading vertex)
    143     subtracted_jet.reset_momentum(PtYPhiM(subtracted_jet.pt(),
    144                                           known_lv.rap(),
    145                                           subtracted_jet.phi(),
    146                                           known_lv.m()));
    147   }
    148 
    14970  return subtracted_jet;
    15071}
     
    15374std::string Subtractor::description() const{
    15475  if (_bge != 0) {
    155     string desc = "Subtractor that uses the following background estimator to determine rho: "+_bge->description();
    156     if (use_rho_m()) desc += "; including the rho_m correction";
    157     if (safe_mass()) desc += "; including mass safety tests";
    158     if (_sel_known_vertex.worker()){
    159       desc += "; using known vertex selection: "+_sel_known_vertex.description()+" and leading vertex selection: "+_sel_leading_vertex.description();
    160     }
    161     return desc;
     76    return "Subtractor that uses the following background estimator to determine rho: "+_bge->description();
    16277  } else if (_rho != _invalid_rho) {
    16378    ostringstream ostr;
    16479    ostr << "Subtractor that uses a fixed value of rho = " << _rho;
    165     if (use_rho_m()) ostr << " and rho_m = " << _rho_m;
    16680    return ostr.str();
    16781  } else {
     
    17084}
    17185
    172 //----------------------------------------------------------------------
    173 // compute the 4-vector that should be subtracted from the given
    174 // jet
    175 PseudoJet Subtractor::_amount_to_subtract(const PseudoJet &jet) const{
    176   // the "transverse momentum" part
    177   double rho;
    178   if (_bge != 0) {
    179     rho = _bge->rho(jet);
    180   } else if (_rho != _invalid_rho) {
    181     rho = _rho;
    182   } else {
    183     throw Error("Subtractor::_amount_to_subtract(...): default Subtractor does not have any information about the background, needed to perform the subtraction");
    184   }
    185 
    186   PseudoJet area = jet.area_4vector();
    187   PseudoJet to_subtract = rho*area;
    188 
    189   double const rho_m_warning_threshold = 1e-5;
    190 
    191   // add an optional contribution from the unknown particles masses
    192   if (_use_rho_m) {
    193     double rho_m;
    194    
    195     if (_bge != 0) {
    196       if (!_bge->has_rho_m()) throw Error("Subtractor::_amount_to_subtract(...): requested subtraction with rho_m from a background estimator, but the estimator does not have rho_m support");
    197       rho_m = _bge->rho_m(jet);
    198     } else if (_rho_m != _invalid_rho) {
    199       rho_m = _rho_m;
    200     } else {
    201       throw Error("Subtractor::_amount_to_subtract(...): default Subtractor does not have any information about the background rho_m, needed to perform the rho_m subtraction");
    202     }
    203     to_subtract += rho_m * PseudoJet(0.0, 0.0, area.pz(), area.E());
    204   } else if (_bge &&
    205              _bge->has_rho_m() &&
    206              _bge->rho_m(jet) > rho_m_warning_threshold * rho) {
    207     _unused_rho_m_warning.warn("Subtractor::_amount_to_subtract(...): Background estimator indicates non-zero rho_m, but use_rho_m()==false in subtractor; consider calling set_use_rho_m(true) to include the rho_m information");
    208   }
    209 
    210   return to_subtract;
    211 }
    212 
    213 
    21486FASTJET_END_NAMESPACE
  • external/fastjet/tools/Subtractor.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Subtractor.hh 3670 2014-09-08 14:17:59Z soyez $
     1//STARTHEADER
     2// $Id: Subtractor.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_TOOLS_SUBTRACTOR_HH__
    3230#define __FASTJET_TOOLS_SUBTRACTOR_HH__
    3331
    34 #include "fastjet/internal/base.hh"     // namespace macros (include explicitly to help Doxygen)
    3532#include "fastjet/tools/Transformer.hh" // to derive Subtractor from Transformer
    3633#include "fastjet/tools/BackgroundEstimatorBase.hh" // used as a ctor argument
     
    6461  /// define a subtractor based on a BackgroundEstimator
    6562  Subtractor(BackgroundEstimatorBase * bge) :
    66     _bge(bge), _rho(-1.0) { set_defaults(); }
     63    _bge(bge), _rho(-1.0) {}
    6764
    6865  /// define a subtractor that uses a fixed value of rho, the background
     
    7067  Subtractor(double rho);
    7168
    72   /// define a subtractor that uses a fixed value of rho and rho_m;
    73   /// both must be >= 0;
    74   Subtractor(double rho, double rho_m);
    75 
    7669  /// default constructor
    77   Subtractor() : _bge(0), _rho(_invalid_rho) { set_defaults(); }
     70  Subtractor() : _bge(0), _rho(_invalid_rho) {}
    7871
    7972  /// default dtor
    8073  virtual ~Subtractor(){};
    81 
    82   /// @name configuring the behaviour
    83   //\{
    84   //----------------------------------------------------------------
    85 
    86   /// reset all parameters to default values
    87   ///
    88   /// Note: by default, the rho_m term is not included and the safety
    89   /// test for the mass is not done. This is mostly for backwards
    90   /// compatibility with FastJet 3.0 and is highly likely to change in
    91   /// a future release of FastJet
    92   void set_defaults();
    93 
    94   /// when 'use_rho_m' is true, include in the subtraction the
    95   /// correction from rho_m, the purely longitudinal,
    96   /// particle-mass-induced component of the background density per
    97   /// unit area
    98   ///
    99   /// Note: this will be switched off by default (for backwards
    100   /// compatibility with FastJet 3.0) but is highly likely to change
    101   /// in a future release of FastJet
    102   void set_use_rho_m(bool use_rho_m_in = true){
    103     if (_bge == 0  && _rho_m < 0) {
    104       throw Error("Subtractor: rho_m support works only for Subtractors constructed with a background estimator or an explicit rho_m value");
    105     }
    106     _use_rho_m=use_rho_m_in;
    107   }
    108  
    109   /// returns whether or not the rho_m component is used
    110   bool use_rho_m() const{ return _use_rho_m;}
    111 
    112   /// when 'safe_mass' is true, ensure that the mass of the subtracted
    113   /// 4-vector remain positive
    114   ///
    115   /// when true, if the subtracted mass is negative, we return a
    116   /// 4-vector with 0 mass, pt and phi from the subtracted 4-vector
    117   /// and the rapidity of the original, unsubtracted jet.
    118   ///
    119   /// Note: this will be switched off by default (for backwards
    120   /// compatibility with FastJet 3.0) but is highly likely to change
    121   /// in a future release of FastJet
    122   void set_safe_mass(bool safe_mass_in=true){ _safe_mass=safe_mass_in;}
    123 
    124   /// returns whether or not safety tests on the mass are included
    125   bool safe_mass() const{ return _safe_mass;}
    126 
    127   /// This is mostly intended for cherge-hadron-subtracted type of
    128   /// events where we wich to use vertex information to improve the
    129   /// subtraction.
    130   ///
    131   /// Given the following parameters:
    132   ///   \param sel_known_vertex    selects the particles with a
    133   ///                              known vertex origin
    134   ///   \param sel_leading_vertex  amongst the particles with a
    135   ///                              known vertex origin, select those
    136   ///                              coming from the leading vertex
    137   /// Momentum identified as coming from the leading vertex will be
    138   /// kept, momentum identified as coming from a non-leading vertex
    139   /// will be eliminated and a regular area-median subtraction will be
    140   /// applied on the 4-vector sum of the particles with unknown vertex
    141   /// origin.
    142   ///
    143   /// When this is set, we shall ensure that the pt of the subtracted
    144   /// 4-vector is at least the pt of the particles that are known to
    145   /// come from the leading vertex (if it fails, subtraction returns
    146   /// the component that is known to come from the leading vertex ---
    147   /// or, the original unsubtracted jet if it contains no particles
    148   /// from the leading vertex).  Furthermore, when safe_mass() is on, we
    149   /// also impose a similar constraint on the mass of the subtracted
    150   /// 4-vector (if the test fails, the longitudinal part of the
    151   /// subtracted 4-vector is taken from the component that is known to
    152   /// come from the leading vertex).
    153   void set_known_selectors(const Selector &sel_known_vertex,
    154                            const Selector &sel_leading_vertex){
    155     _sel_known_vertex   = sel_known_vertex;
    156     _sel_leading_vertex = sel_leading_vertex;
    157   }
    158 
    159   //\}
    160 
    161   /// @name description and action
    162   //\{
    163   //----------------------------------------------------------------
    16474
    16575  /// returns a jet that's subtracted
     
    17282  virtual std::string description() const;
    17383
    174   //\}
    17584protected:
    176   /// compute the 4-vector that should be subtracted from the given
    177   /// jet
    178   PseudoJet _amount_to_subtract(const PseudoJet &jet) const;
    17985
    18086  /// the tool used to estimate the background
    18187  /// if has to be mutable in case its underlying selector takes a reference jet
    18288  mutable BackgroundEstimatorBase * _bge;
    183   /// the fixed value of rho and/or rho_m to use if the user has selected that option
    184   double _rho, _rho_m;
    185 
    186   // configuration parameters/flags
    187   bool _use_rho_m;   ///< include the rho_m correction
    188   bool _safe_mass;   ///< ensures that the subtracted mass is +ve
    189 
    190   Selector _sel_known_vertex;   ///< selects the particles with a
    191                                 ///< known vertex origin
    192   Selector _sel_leading_vertex; ///< amongst the particles with a
    193                                 ///< known vertex origin, select those
    194                                 ///< coming from the leading vertex
     89  /// the fixed value of rho to use if the user has selected that option
     90  double _rho;
    19591
    19692  /// a value of rho that is used as a default to label that the stored
     
    20298  // that's not allowed in an include file.
    20399  static const double _invalid_rho;
    204 
    205   mutable LimitedWarning _unused_rho_m_warning;
    206100};
    207101
  • external/fastjet/tools/TopTaggerBase.cc

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: TopTaggerBase.cc 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id$
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#include <fastjet/tools/TopTaggerBase.hh>
  • external/fastjet/tools/TopTaggerBase.hh

    r37deb3b rba7fc1e  
    22#define __FASTJET_TOP_TAGGER_BASE_HH__
    33
    4 //FJSTARTHEADER
    5 // $Id: TopTaggerBase.hh 3433 2014-07-23 08:17:03Z salam $
     4//STARTHEADER
     5// $Id: TopTaggerBase.hh 2689 2011-11-14 14:51:06Z soyez $
    66//
    7 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     7// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    88//
    99//----------------------------------------------------------------------
     
    1616//
    1717//  The algorithms that underlie FastJet have required considerable
    18 //  development. They are described in the original FastJet paper,
    19 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     18//  development and are described in hep-ph/0512210. If you use
    2019//  FastJet as part of work towards a scientific publication, please
    21 //  quote the version you use and include a citation to the manual and
    22 //  optionally also to hep-ph/0512210.
     20//  include a citation to the FastJet paper.
    2321//
    2422//  FastJet is distributed in the hope that it will be useful,
     
    3028//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    3129//----------------------------------------------------------------------
    32 //FJENDHEADER
     30//ENDHEADER
    3331
    3432#include <fastjet/internal/base.hh>
  • external/fastjet/tools/Transformer.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: Transformer.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: Transformer.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_TRANSFORMER_HH__
  • external/fastjet/version.hh

    r37deb3b rba7fc1e  
    1 //FJSTARTHEADER
    2 // $Id: version.hh 3433 2014-07-23 08:17:03Z salam $
     1//STARTHEADER
     2// $Id: version.hh 2577 2011-09-13 15:11:38Z salam $
    33//
    4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
     4// Copyright (c) 2005-2011, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
    55//
    66//----------------------------------------------------------------------
     
    1313//
    1414//  The algorithms that underlie FastJet have required considerable
    15 //  development. They are described in the original FastJet paper,
    16 //  hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
     15//  development and are described in hep-ph/0512210. If you use
    1716//  FastJet as part of work towards a scientific publication, please
    18 //  quote the version you use and include a citation to the manual and
    19 //  optionally also to hep-ph/0512210.
     17//  include a citation to the FastJet paper.
    2018//
    2119//  FastJet is distributed in the hope that it will be useful,
     
    2725//  along with FastJet. If not, see <http://www.gnu.org/licenses/>.
    2826//----------------------------------------------------------------------
    29 //FJENDHEADER
     27//ENDHEADER
    3028
    3129#ifndef __FASTJET_VERSION_HH__
  • modules/BTagging.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class BTagging
  • modules/BTagging.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef BTagging_h
    202#define BTagging_h
  • modules/Calorimeter.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class Calorimeter
     
    153135  }
    154136*/
    155 
    156   // read min E value for towers to be saved
    157   fEcalEnergyMin = GetDouble("EcalTowerMinEnergy", 0.0);
    158   fHcalEnergyMin = GetDouble("HcalTowerMinEnergy", 0.0);
    159  
    160   fEcalSigmaMin  = GetDouble("EcalTowerMinSignificance", 0.0);
    161   fHcalSigmaMin  = GetDouble("HcalTowerMinSignificance", 0.0);
    162 
    163  
    164137  // read resolution formulas
    165138  fECalResolutionFormula->Compile(GetString("ECalResolutionFormula", "0"));
     
    441414
    442415  if(!fTower) return;
    443 //  cout<<"----------------------"<<endl;
    444 //  cout<<"Finalize Tower"<<endl;
    445 //  cout<<""<<endl;
    446 
    447416
    448417  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
     
    461430  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    462431  hcalTime = (fTowerHCalWeightTime < 1.0E-09 ) ? 0 : fTowerHCalTime/fTowerHCalWeightTime;
    463 
    464  
    465   ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
    466   hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
    467 
    468   ecalEnergy = (ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*ecalSigma) ? 0 : ecalEnergy;
    469   hcalEnergy = (hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*hcalSigma) ? 0 : hcalEnergy;
    470432
    471433  energy = ecalEnergy + hcalEnergy;
     
    491453  fTower->Edges[3] = fTowerEdges[3];
    492454
    493   if( energy > 0.0 )
     455
     456  // fill calorimeter towers
     457  if(energy > 0.0)
    494458  {
    495459    if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
     
    511475
    512476  ecalEnergy -= fTrackECalEnergy;
    513   if(ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;
     477  if(ecalEnergy < 0.0) ecalEnergy = 0.0;
    514478
    515479  hcalEnergy -= fTrackHCalEnergy;
    516   if(hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0;
     480  if(hcalEnergy < 0.0) hcalEnergy = 0.0;
    517481
    518482  energy = ecalEnergy + hcalEnergy;
    519483
     484 
     485  // save ECAL and/or HCAL energy excess as an energy flow tower
    520486  if(ecalEnergy > 0.0)
    521487  {
     
    531497    fEFlowPhotonOutputArray->Add(tower);
    532498  }
     499
    533500  if(hcalEnergy > 0.0)
    534501  {
  • modules/Calorimeter.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef Calorimeter_h
    202#define Calorimeter_h
     
    7254  Int_t fTowerTrackHits, fTowerPhotonHits;
    7355
    74   Double_t fEcalEnergyMin;
    75   Double_t fHcalEnergyMin;
    76  
    77   Double_t fEcalSigmaMin;
    78   Double_t fHcalSigmaMin;
    79 
    8056  TFractionMap fFractionMap; //!
    8157  TBinMap fBinMap; //!
  • modules/Cloner.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class Clone
  • modules/Cloner.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef Clone_h
    202#define Clone_h
  • modules/ConstituentFilter.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class ConstituentFilter
  • modules/ConstituentFilter.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef ConstituentFilter_h
    202#define ConstituentFilter_h
  • modules/Delphes.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class Delphes
  • modules/Delphes.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef Delphes_h
    202#define Delphes_h
  • modules/Efficiency.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class Efficiency
  • modules/Efficiency.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef Efficiency_h
    202#define Efficiency_h
  • modules/EnergyScale.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class EnergyScale
  • modules/EnergyScale.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef EnergyScale_h
    202#define EnergyScale_h
  • modules/EnergySmearing.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class EnergySmearing
  • modules/EnergySmearing.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef EnergySmearing_h
    202#define EnergySmearing_h
  • modules/ExampleModule.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class ExampleModule
  • modules/ExampleModule.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef ExampleModule_h
    202#define ExampleModule_h
  • modules/FastJetFinder.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class FastJetFinder
     
    241223  Candidate *candidate, *constituent;
    242224  TLorentzVector momentum;
    243  
    244   TLorentzVector constmomentum;
    245  
    246225  Double_t deta, dphi, detaMax, dphiMax;
    247226  Double_t time, weightTime, avTime;
     
    307286  for(itOutputList = outputList.begin(); itOutputList != outputList.end(); ++itOutputList)
    308287  {
    309     jet = *itOutputList;
    310     if(fJetAlgorithm == 7) jet = join(jet.constituents());
    311    
    312     momentum.SetPxPyPzE(jet.px(), jet.py(), jet.pz(), jet.E());
    313    
     288    momentum.SetPxPyPzE(itOutputList->px(), itOutputList->py(), itOutputList->pz(), itOutputList->E());
    314289    area.reset(0.0, 0.0, 0.0, 0.0);
    315290    if(fAreaDefinition) area = itOutputList->area_4vector();
     
    322297    inputList.clear();
    323298    inputList = sequence->constituents(*itOutputList);
    324 
    325     constmomentum.SetPxPyPzE(0.0,0.0,0.0,0.0);;
    326299
    327300    for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList)
    328301    {
    329302      constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index()));
    330 
    331       constmomentum += constituent->Momentum;
    332303
    333304      deta = TMath::Abs(momentum.Eta() - constituent->Momentum.Eta());
  • modules/FastJetFinder.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef FastJetFinder_h
    202#define FastJetFinder_h
  • modules/Hector.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class Hector
  • modules/Hector.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef Hector_h
    202#define Hector_h
  • modules/IdentificationMap.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class IdentificationMap
  • modules/IdentificationMap.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef IdentificationMap_h
    202#define IdentificationMap_h
  • modules/ImpactParameterSmearing.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191/** \class ImpactParameterSmearing
    202 *
  • modules/ImpactParameterSmearing.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef ImpactParameterSmearing_h
    202#define ImpactParameterSmearing_h
  • modules/Isolation.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class Isolation
  • modules/Isolation.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef Isolation_h
    202#define Isolation_h
  • modules/JetPileUpSubtractor.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class JetPileUpSubtractor
  • modules/JetPileUpSubtractor.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef JetPileUpSubtractor_h
    202#define JetPileUpSubtractor_h
  • modules/LeptonDressing.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class LeptonDressing
  • modules/LeptonDressing.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef LeptonDressing_h
    202#define LeptonDressing_h
  • modules/Merger.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class Merger
  • modules/Merger.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef Merger_h
    202#define Merger_h
  • modules/ModulesLinkDef.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class
     
    3315
    3416#include "modules/FastJetFinder.h"
    35 #include "modules/FastJetGridMedianEstimator.h"
    3617#include "modules/ParticlePropagator.h"
    3718#include "modules/Efficiency.h"
     
    5839#include "modules/ConstituentFilter.h"
    5940#include "modules/StatusPidFilter.h"
    60 #include "modules/PdgCodeFilter.h"
    6141#include "modules/Cloner.h"
    6242#include "modules/Weighter.h"
     
    7353
    7454#pragma link C++ class FastJetFinder+;
    75 #pragma link C++ class FastJetGridMedianEstimator+;
    7655#pragma link C++ class ParticlePropagator+;
    7756#pragma link C++ class Efficiency+;
     
    9877#pragma link C++ class ConstituentFilter+;
    9978#pragma link C++ class StatusPidFilter+;
    100 #pragma link C++ class PdgCodeFilter+;
    10179#pragma link C++ class Cloner+;
    10280#pragma link C++ class Weighter+;
  • modules/MomentumSmearing.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class MomentumSmearing
  • modules/MomentumSmearing.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef MomentumSmearing_h
    202#define MomentumSmearing_h
  • modules/ParticlePropagator.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class ParticlePropagator
     
    158140    if(TMath::Abs(q) < 1.0E-9 || TMath::Abs(fBz) < 1.0E-9)
    159141    {
    160       // solve pt2*t^2 + 2*(px*x + py*y)*t - (fRadius2 - x*x - y*y) = 0
     142      // solve pt2*t^2 + 2*(px*x + py*y)*t + (fRadius2 - x*x - y*y) = 0
    161143      tmp = px*y - py*x;
    162144      discr2 = pt2*fRadius2 - tmp*tmp;
  • modules/ParticlePropagator.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef ParticlePropagator_h
    202#define ParticlePropagator_h
  • modules/PileUpJetID.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191/** \class PileUpJetID
    202 *
  • modules/PileUpJetID.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef PileUpJetID_h
    202#define PileUpJetID_h
  • modules/PileUpMerger.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191/** \class PileUpMerger
    202 *
  • modules/PileUpMerger.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef PileUpMerger_h
    202#define PileUpMerger_h
  • modules/PileUpMergerPythia8.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191/** \class PileUpMergerPythia8
    202 *
     
    132114    dphi = gRandom->Uniform(-TMath::Pi(), TMath::Pi());
    133115
    134     for(i = 1; i < fPythia->event.size(); ++i)
     116    for(i = 0; i < fPythia->event.size(); ++i)
    135117    {
    136118      Pythia8::Particle &particle = fPythia->event[i];
  • modules/PileUpMergerPythia8.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef PileUpMergerPythia8_h
    202#define PileUpMergerPythia8_h
  • modules/Pythia8LinkDef.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class
  • modules/SimpleCalorimeter.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class SimpleCalorimeter
     
    147129  }
    148130*/
    149 
    150   // read min E value for towers to be saved
    151   fEnergyMin = GetDouble("TowerMinEnergy", 0.0);
    152   fSigmaMin  = GetDouble("TowerMinSignificance", 0.0);
    153  
    154131  // read resolution formulas
    155132  fResolutionFormula->Compile(GetString("ResolutionFormula", "0"));
     
    407384  time = (fTowerWeightTime < 1.0E-09 ) ? 0 : fTowerTime/fTowerWeightTime;
    408385
    409   sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy);
    410  
    411   energy = (energy < fEnergyMin || energy < fSigmaMin*sigma) ? 0 : energy;
    412  
    413386  eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
    414387  phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
     
    432405  // fill energy flow candidates
    433406  energy -= fTrackEnergy;
    434   if(energy < fEnergyMin || energy < fSigmaMin*fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy)) energy = 0.0;
     407  if(energy < 0.0) energy = 0.0;
    435408   
    436409  // save energy excess as an energy flow tower
  • modules/SimpleCalorimeter.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef SimpleCalorimeter_h
    202#define SimpleCalorimeter_h
     
    7254  Int_t fTowerTrackHits, fTowerPhotonHits;
    7355
    74   Double_t fEnergyMin;
    75   Double_t fSigmaMin;
    76 
    7756  TFractionMap fFractionMap; //!
    7857  TBinMap fBinMap; //!
  • modules/StatusPidFilter.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191/** \class StatusPidFilter
    202 *
  • modules/StatusPidFilter.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191//------------------------------------------------------------------------------
    202
  • modules/TauTagging.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class TauTagging
  • modules/TauTagging.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef TauTagging_h
    202#define TauTagging_h
  • modules/TimeSmearing.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class TimeSmearing
  • modules/TimeSmearing.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef TimeSmearing_h
    202#define TimeSmearing_h
  • modules/TrackCountingBTagging.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class TrackCountingBTagging
  • modules/TrackCountingBTagging.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef TrackCountingBTagging_h
    202#define TrackCountingBTagging_h
  • modules/TrackPileUpSubtractor.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class TrackPileUpSubtractor
  • modules/TrackPileUpSubtractor.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef TrackPileUpSubtractor_h
    202#define TrackPileUpSubtractor_h
  • modules/TreeWriter.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class TreeWriter
  • modules/TreeWriter.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef TreeWriter_h
    202#define TreeWriter_h
  • modules/UniqueObjectFinder.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class UniqueObjectFinder
  • modules/UniqueObjectFinder.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef UniqueObjectFinder_h
    202#define UniqueObjectFinder_h
  • modules/Weighter.cc

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class Weighter
  • modules/Weighter.h

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#ifndef Weighter_h
    202#define Weighter_h
  • readers/DelphesCMSFWLite.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <algorithm>
    202#include <stdexcept>
  • readers/DelphesHepMC.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
  • readers/DelphesLHEF.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
  • readers/DelphesProMC.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
     
    4729#include "ExRootAnalysis/ExRootProgressBar.h"
    4830
    49 #include "ProMC.pb.h"
    50 #include "ProMCBook.h"
    51 #include "ProMCHeader.pb.h"
     31#include "ProMC/ProMC.pb.h"
     32#include "ProMC/ProMCBook.h"
     33#include "ProMC/ProMCHeader.pb.h"
    5234
    5335using namespace std;
     
    5537//---------------------------------------------------------------------------
    5638
    57 void ConvertInput(ProMCEvent &event, double momentumUnit, double positionUnit,
    58   ExRootTreeBranch *branch, DelphesFactory *factory,
    59   TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray,
    60   TObjArray *partonOutputArray, TStopwatch *readStopWatch, TStopwatch *procStopWatch)
     39void ConvertInput(ProMCEvent &event, ExRootTreeBranch *branch, DelphesFactory *factory,
     40  TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray,
     41  TStopwatch *readStopWatch, TStopwatch *procStopWatch)
    6142{
    6243  Int_t i;
     
    10889    pid = mutableParticles->pdg_id(i);
    10990    status = mutableParticles->status(i);
    110 
    111     px = mutableParticles->px(i)/momentumUnit;
    112     py = mutableParticles->py(i)/momentumUnit;
    113     pz = mutableParticles->pz(i)/momentumUnit;
    114     mass = mutableParticles->mass(i)/momentumUnit;
    115     x = mutableParticles->x(i)/positionUnit;
    116     y = mutableParticles->y(i)/positionUnit;
    117     z = mutableParticles->z(i)/positionUnit;
    118     t = mutableParticles->t(i)/positionUnit;
     91    px = mutableParticles->px(i); py = mutableParticles->py(i); pz = mutableParticles->pz(i); mass = mutableParticles->mass(i);
     92    x = mutableParticles->x(i); y = mutableParticles->y(i); z = mutableParticles->z(i); t = mutableParticles->t(i);
    11993
    12094    candidate = factory->NewCandidate();
     
    180154  Int_t i;
    181155  Long64_t eventCounter, numberOfEvents;
    182   double momentumUnit = 1.0, positionUnit = 1.0;
    183156
    184157  if(argc < 4)
     
    232205
    233206      inputFile = new ProMCBook(argv[i], "r");
    234 
    235       ProMCHeader header = inputFile->getHeader();
    236 
    237       momentumUnit = static_cast<double>(header.momentumunit());
    238       positionUnit = static_cast<double>(header.lengthunit());
    239 
    240 
    241207
    242208      if(inputFile == NULL)
     
    264230
    265231        procStopWatch.Start();
    266         ConvertInput(event, momentumUnit, positionUnit,
    267           branchEvent, factory,
    268           allParticleOutputArray, stableParticleOutputArray,
    269           partonOutputArray, &readStopWatch, &procStopWatch);
     232        ConvertInput(event, branchEvent, factory,
     233          allParticleOutputArray, stableParticleOutputArray, partonOutputArray,
     234          &readStopWatch, &procStopWatch);
    270235        modularDelphes->ProcessTask();
    271236        procStopWatch.Stop();
  • readers/DelphesProMC.py

    r37deb3b rba7fc1e  
    134134################################################################################
    135135
    136 if len(sys.argv) < 4:
     136if len(sys.argv) < 2:
    137137  print " Usage: DelphesProMC.py config_file output_file input_file(s)"
    138138  sys.exit(1)
  • readers/DelphesPythia8.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
     
    8971  pdg = TDatabasePDG::Instance();
    9072
    91   for(i = 1; i < pythia->event.size(); ++i)
     73  for(i = 0; i < pythia->event.size(); ++i)
    9274  {
    9375    Pythia8::Particle &particle = pythia->event[i];
  • readers/DelphesSTDHEP.cpp

    r37deb3b rba7fc1e  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191#include <stdexcept>
    202#include <iostream>
Note: See TracChangeset for help on using the changeset viewer.