All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
EvaluateTauFinder.h
Go to the documentation of this file.
1 #ifndef EvaluateTauFinder_h
2 #define EvaluateTauFinder_h 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include <string>
7 #include "TTree.h"
8 #include "TNtuple.h"
9 #include "TH1D.h"
10 #include "TFile.h"
11 #include "TMath.h"
12 #include "TSystem.h"
13 #include <EVENT/MCParticle.h>
14 #include <EVENT/ReconstructedParticle.h>
15 #include "UTIL/LCRelationNavigator.h"
16 
17 using namespace lcio ;
18 using namespace marlin ;
19 
20 struct MyParticle;
21 
22 /** Evaluation processor for TauFinder
23  *
24  * @author A. Muennich, CERN
25  */
26 
27 class EvaluateTauFinder : public Processor {
28 
29  public:
30 
31  virtual Processor* newProcessor() { return new EvaluateTauFinder ; }
32 
33 
35  EvaluateTauFinder(const EvaluateTauFinder&) = delete;
36  EvaluateTauFinder& operator=(const EvaluateTauFinder&) = delete;
37 
38  /** Called at the begin of the job before anything is read.
39  * Use to initialize the processor, e.g. book histograms.
40  */
41  virtual void init() ;
42 
43  /** Called for every run.
44  */
45  virtual void processRunHeader( LCRunHeader* run ) ;
46 
47  /** Called for every event - the working horse.
48  */
49  virtual void processEvent( LCEvent * evt ) ;
50 
51 
52  virtual void check( LCEvent * evt ) ;
53 
54 
55  /** Called after data processing for clean up.
56  */
57  virtual void end() ;
58  virtual void LoopDaughters(MCParticle *particle,double &Evis,double &ptvis,double &pvis);
59  virtual void LoopDaughtersRelation(MCParticle *particle,LCRelationNavigator* relationNavigatorTau ,
60  LCRelationNavigator* relationNavigatorMC ,bool &ralToTau);
61 
62  protected:
63 
64  /** Input collection name.
65  */
66  std::string _colNameMC{}, _colNameTrack{};
67  std::string _colNameMCTruth{}, _incol{}, _colNamePFORecLink{};
68  std::string _colNameMCRecLink{},_colNameTracksRecLink{}, _colNameTauRecLink{};
69  std::string _OutputFile_Signal{};
70  int _nRun=-1;
71  int _nEvt=-1;
72 
73  double _ntot_rec=0.0;
74  double _ntot_mc=0.0;
75  double _ntau_correct=0.0;
76  double _dEsum=0.0;
77  double _dEsumsq=0.0;
78  int _ndE=0.0;
79 
80  float _bField=0.0;
81  TFile *rootfile=NULL;
82  TNtuple *leptons=NULL;
83  TNtuple *tautuple=NULL;
84  TNtuple *mcmisstuple=NULL;
85  TNtuple *taumatchtuple=NULL;
86  TNtuple *tauexacttuple=NULL;
87  TNtuple *evtuple=NULL;
88  TNtuple *faketuple=NULL;
89  TNtuple *topofaketuple=NULL;
90 } ;
91 
92 #endif
93 
94 
95 
virtual Processor * newProcessor()
Evaluation processor for TauFinder.