Changeset 14ae668 in git for examples/ExternalFastJetBasic.cpp
- Timestamp:
- Dec 12, 2014, 1:54:46 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 3d10d1f
- Parents:
- a8782e8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/ExternalFastJetBasic.cpp
ra8782e8 r14ae668 19 19 /* 20 20 21 First, you need to set DELPHES_DIR, FASTJET_DIR and ROOT_DIR: 21 22 ######################################################################## 23 24 25 This simple example shows how to use Delphes with an external fastjet installation. 26 Events are specified via the multidimentionnal array "EVENTS" (for an example reading 27 an hepmc file see ExternalFastJetHepMC.cpp). 28 29 In order to run this example you first, you need to set the paths to your Delphes, FastJet 30 and ROOT installations (DELPHES_DIR, FASTJET_DIR and ROOT_DIR): 22 31 23 32 DELPHES_DIR=<path to Delphes installation> … … 25 34 ROOT_DIR=<path to ROOT installation> 26 35 27 Then run the following commands to build ExternalFastJetBasic:36 Then run the following commands to build the executable: 28 37 29 38 DELPHES_LIB="-L$DELPHES_DIR -lDelphesNoFastJet" … … 38 47 LDFLAGS="$FASTJET_LIB $ROOT_LIB $DELPHES_LIB" 39 48 40 g++ $CXXFLAGS $LDFLAGS ExternalFastJetBasic.cpp -o ExternalFastJetBasic 49 g++ $CXXFLAGS $LDFLAGS examples/ExternalFastJetBasic.cpp -o examples/ExternalFastJetBasic 50 51 Then run from the main Delphes dir: 52 53 ./examples/ExternalFastJetBasic cards/delphes_card_CMS_NoFastJet.tcl 54 55 56 ######################################################################## 57 41 58 42 59 */ … … 95 112 //--------------------------------------------------------------------------- 96 113 114 115 // this function converts input event array into Delphes candidates (defined below) 116 97 117 void ConvertInput(Int_t event, DelphesFactory *factory, TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray); 118 119 120 //---------------------------------------------------------------------------------------------------------------------------- 98 121 99 122 int main(int argc, char *argv[]) … … 149 172 modularDelphes->InitTask(); 150 173 174 175 // fastjet definition 151 176 ClusterSequence::print_banner(); 152 177 definition = new JetDefinition(antikt_algorithm, 0.5); 153 154 inputArray = modularDelphes->ImportArray("Calorimeter/towers"); 178 179 // Define your input candidates to fastjet (by default particle-flow objects). 180 // If you want pure calorimeter towers change "EFlowMerger/eflow" into "Calorimeter/towers": 181 182 inputArray = modularDelphes->ImportArray("EFlowMerger/eflow"); 183 155 184 inputIterator = inputArray->MakeIterator(); 156 185 … … 159 188 { 160 189 modularDelphes->Clear(); 190 191 // convert EVENT input array into Delphes internal format 161 192 ConvertInput(event, factory, allParticleOutputArray, stableParticleOutputArray, partonOutputArray); 193 194 // run Delphes reconstruction 162 195 modularDelphes->ProcessTask(); 163 196 164 197 inputList.clear(); 165 198 inputIterator->Reset(); 199 200 201 // pass delphes candidates to fastjet clustering 166 202 while((candidate = static_cast<Candidate*>(inputIterator->Next()))) 167 203 { … … 170 206 inputList.push_back(jet); 171 207 } 208 209 // run clustering 172 210 ClusterSequence sequence(inputList, *definition); 173 211 outputList.clear(); … … 204 242 } 205 243 } 244 245 246 // ------------------------------------------------------------------------------------------------------------------------------------ 206 247 207 248 void ConvertInput(Int_t event, DelphesFactory *factory, TObjArray *allParticleOutputArray, TObjArray *stableParticleOutputArray, TObjArray *partonOutputArray)
Note:
See TracChangeset
for help on using the changeset viewer.