Fork me on GitHub

Ignore:
Timestamp:
Dec 11, 2014, 3:46:57 PM (10 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
a8782e8
Parents:
27eb358
Message:

move all cards from examples to cards directory, add ExternalFastJetBasic, rename StandaloneHepMC to ExternalFastJetHepMC

File:
1 moved

Legend:

Unmodified
Added
Removed
  • examples/ExternalFastJetHepMC.cpp

    r27eb358 r8e602e5  
    4646#include "fastjet/JetDefinition.hh"
    4747#include "fastjet/ClusterSequence.hh"
    48 #include "fastjet/Selector.hh"
    49 #include "fastjet/ClusterSequenceArea.hh"
    50 #include "fastjet/tools/JetMedianBackgroundEstimator.hh"
    51 
    52 #include "fastjet/plugins/SISCone/fastjet/SISConePlugin.hh"
    53 #include "fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh"
    54 #include "fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh"
    55 
    56 #include "fastjet/contribs/Nsubjettiness/Nsubjettiness.hh"
    57 #include "fastjet/contribs/Nsubjettiness/Njettiness.hh"
    58 #include "fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh"
    59 #include "fastjet/contribs/Nsubjettiness/WinnerTakeAllRecombiner.hh"
     48
     49// #include "fastjet/contrib/Nsubjettiness.hh"
     50// #include "fastjet/contrib/Njettiness.hh"
     51// #include "fastjet/contrib/NjettinessPlugin.hh"
     52// #include "fastjet/contrib/WinnerTakeAllRecombiner.hh"
    6053
    6154using namespace std;
    6255using namespace fastjet;
    63 using namespace fastjet::contrib;
     56// using namespace fastjet::contrib;
    6457
    6558//---------------------------------------------------------------------------
     
    7669int main(int argc, char *argv[])
    7770{
    78   char appName[] = "StandaloneHepMC";
     71  char appName[] = "ExternalFastJetHepMC";
    7972  stringstream message;
    8073  FILE *inputFile = 0;
     
    9386
    9487  JetDefinition *definition = 0;
    95   JetDefinition::Recombiner *recomb = 0;
     88//  JetDefinition::Recombiner *recomb = 0;
    9689  vector<PseudoJet> inputList, outputList;
    9790  PseudoJet jet;
     
    145138
    146139    ClusterSequence::print_banner();
    147     recomb = new WinnerTakeAllRecombiner();
    148     definition = new JetDefinition(antikt_algorithm, 0.5, recomb, Best);
     140//    recomb = new WinnerTakeAllRecombiner();
     141//    definition = new JetDefinition(antikt_algorithm, 0.5, recomb, Best);
     142    definition = new JetDefinition(antikt_algorithm, 0.5);
    149143
    150144    inputArray = modularDelphes->ImportArray("Calorimeter/towers");
     
    213207            ClusterSequence sequence(inputList, *definition);
    214208            outputList.clear();
    215             outputList = sorted_by_pt(sequence.inclusive_jets(10.0));
     209            outputList = sorted_by_pt(sequence.inclusive_jets(0.0));
     210
     211            // tell the user what was done
     212            //  - the description of the algorithm used
     213            //  - show the inclusive jets as
     214            //      {index, rapidity, phi, pt}
     215            //----------------------------------------------------------
     216            if(eventCounter == skipEvents + 1)
     217            {
     218              cout << "Ran " << definition->description() << endl;
     219
     220              // label the columns
     221              printf("%5s %15s %15s %15s\n","jet #", "rapidity", "phi", "pt");
     222
     223              // print out the details for each jet
     224              for (unsigned int i = 0; i < outputList.size(); i++) {
     225                printf("%5u %15.8f %15.8f %15.8f\n",
     226                       i, outputList[i].rap(), outputList[i].phi(),
     227                       outputList[i].perp());
     228              }
     229            }
    216230          }
    217231
     
    230244
    231245    cout << "** Exiting..." << endl;
     246
     247    delete definition;
     248//    delete recomb;
    232249
    233250    delete reader;
Note: See TracChangeset for help on using the changeset viewer.