All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
MCTruthJetEnergy.h
Go to the documentation of this file.
1 #ifndef MCTruthJetEnergy_h
2 #define MCTruthJetEnergy_h 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 
7 #ifdef MARLIN_USE_AIDA
8  #include <vector>
9  #include <AIDA/AIDA.h>
10 #endif
11 
12 #include <string>
13 
14 using namespace lcio ;
15 using namespace marlin ;
16 
17 
18 /** Calculates the true jet energy from MCParticles. Sums up the
19  * energy from all MCParticles that had the largest contribution
20  * to at least one of the ReconstructedParticles in the jet.
21  *
22  * <h4>Input - Prerequisites</h4>
23  * jet collections
24  * MCParticle collection
25  * LCRelation(ReconstructedParticle,MCParticle)
26  *
27  * <h4>Output</h4>
28  * collection parameter 'MCTruthJetEnergies'
29  *
30  * @param JetCollectionNames Name of the jet collections
31  * @param MCTruthRelationName of the mc truth relation
32  *
33  * @author M.Beckmann, F.Gaede, DESY
34  * @version $Id$
35  */
36 
37 class MCTruthJetEnergy : public Processor {
38 
39  public:
40 
41  MCTruthJetEnergy(const MCTruthJetEnergy&) = delete;
42  MCTruthJetEnergy& operator=(const MCTruthJetEnergy&) = delete;
43 
44  virtual Processor* newProcessor() { return new MCTruthJetEnergy ; }
45 
46 
48 
49  /** Called at the begin of the job before anything is read.
50  * Use to initialize the processor, e.g. book histograms.
51  */
52  virtual void init() ;
53 
54  /** Called for every run.
55  */
56  virtual void processRunHeader( LCRunHeader* run ) ;
57 
58  /** Called for every event - the working horse.
59  */
60  virtual void processEvent( LCEvent * evt ) ;
61 
62 
63  virtual void check( LCEvent * evt ) ;
64 
65 
66  /** Called after data processing for clean up.
67  */
68  virtual void end() ;
69 
70 
71  protected:
72 
73  /** Input collection name.
74  */
75  StringVec _jetcolNames{};
76  std::string _relName{};
77 
78  int _nRun{};
79  int _nEvt{};
80 
81 // float jetenergy, mcjetenergy;
82 // int njetparticles;
83 
84 #ifdef MARLIN_USE_AIDA
85  std::vector< AIDA::IHistogram1D* > _jetEnergyHists{};
86  std::vector< AIDA::IHistogram1D* > _jetEnergyResHists{};
87  AIDA::IHistogram2D* _jetEnergyTruthReco{};
88 #endif
89 
90 } ;
91 
92 #endif
Calculates the true jet energy from MCParticles.
virtual Processor * newProcessor()
std::vector< std::string > StringVec
Definition: SiStripClus.h:56