MarlinFastJet  0.3.0
FastJetProcessor.h
1 /*
2  * FastJetProcessor.h
3  *
4  * Created on: 25.05.2010
5  * Author: Lars Weuste (MPP Munich) - weuste@mpp.mpg.de
6  * iterative inclusive algorithm based on design by Marco Battaglia (CERN) - Marco.Battaglia@cern.ch
7  */
8 
9 #ifndef FASTJETPROCESSOR_H_
10 #define FASTJETPROCESSOR_H_
11 
12 #include "EClusterMode.h"
13 
14 #include "marlin/Processor.h"
15 #include "marlin/VerbosityLevels.h"
16 #include "EVENT/LCCollection.h"
17 #include "EVENT/ReconstructedParticle.h"
18 #include "IMPL/LCCollectionVec.h"
19 #include "LCIOSTLTypes.h"
20 
21 #include <fastjet/PseudoJet.hh>
22 #include <fastjet/JetDefinition.hh>
23 
24 #include <vector>
25 #include <string>
26 
27  //Forward Declaration
28  class FastJetUtil;
29 typedef std::vector< fastjet::PseudoJet > PseudoJetList;
30 
31 
32 
33 class FastJetProcessor : marlin::Processor {
34 public:
36  virtual ~FastJetProcessor();
37 
38 
39  virtual Processor* newProcessor() {
40  return new FastJetProcessor();
41  }
42 
46  virtual void init();
47 
50  virtual void processRunHeader(LCRunHeader* ){};
51 
54  virtual void processEvent(LCEvent * evt);
55 
56  virtual void check(LCEvent * ) {};
57 
60  virtual void end();
61 
62  friend class FastJetUtil;
63 
64 private:
65 
66  // the LC Collection names for input/output
67  std::string _lcParticleInName;
68  std::string _lcParticleOutName;
69  std::string _lcJetOutName;
70 
71  EVENT::ReconstructedParticle* getRecPar(fastjet::PseudoJet& fj, const PseudoJetList& constituents);
72 
73  LCCollection* _reconstructedPars;
74 
75  int _statsFoundJets;
76  int _statsNrEvents;
77  int _statsNrSkippedEmptyEvents;
78  int _statsNrSkippedFixedNrJets;
79  int _statsNrSkippedMaxIterations;
80  bool _storeParticlesInJets;
81 
82  FastJetUtil* _fju;
83 
84 private:
86  FastJetProcessor& operator=(const FastJetProcessor&) { return *this; }
87 
88 };
89 
90 std::ostream& operator<<(std::ostream& out, EClusterMode& m);
91 
92 #endif /* FASTJETPROCESSOR_H_ */
virtual void end()
Called after data processing for clean up.
Definition: FastJetUtil.h:66
virtual void init()
Called at the begin of the job before anything is read.
virtual void processRunHeader(LCRunHeader *)
Called for every run.
Definition: FastJetProcessor.h:50
virtual void processEvent(LCEvent *evt)
Called for every event - the working horse.
Definition: FastJetProcessor.h:33