All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
AnalyseSidEdxProcessor.h
Go to the documentation of this file.
1 /*
2  * AnalyseSidEdxProcessor.h
3  *
4  * Created on: Dec 15, 2016
5  * Author: strahinja
6  */
7 
8 #ifndef INCLUDE_ANALYSESIDEDXPROCESSOR_H_
9 #define INCLUDE_ANALYSESIDEDXPROCESSOR_H_
10 
11 
12 #include <string>
13 
14 #include "marlin/Processor.h"
15 
16 #include "lcio.h"
17 #include <TTree.h>
18 #include <TFile.h>
19 
20 using namespace lcio ;
21 using namespace marlin ;
22 
23 
24 /** AnalyseSidEdxProcessor for marlin.
25  *
26  * Reads Si tracker dEdx data from the .slcio file
27  * and stores them in a root file for analysis.
28  *
29  * @author S. Lukic, Vinca, Belgrade
30  * December 2016
31  */
32 
33 class AnalyseSidEdxProcessor : public Processor {
34 
35  public:
36  virtual Processor* newProcessor() { return new AnalyseSidEdxProcessor ; }
37 
40 
41  AnalyseSidEdxProcessor& operator=(const AnalyseSidEdxProcessor&) = delete ;
42 
43  /** Called at the begin of the job before anything is read.
44  * Use to initialize the processor, e.g. book histograms.
45  */
46  virtual void init() ;
47 
48  /** Called for every run.
49  * Really?
50  */
51  virtual void processRunHeader( LCRunHeader* run ) ;
52 
53  /** Called for every event - the working horse.
54  */
55  virtual void processEvent( LCEvent * evt ) ;
56 
57  virtual void check( LCEvent * evt ) ;
58 
59  /** Called after data processing for clean up.
60  */
61  virtual void end() ;
62 
63  protected:
64 
65  /*** Steerable parameters ***/
66  std::string m_rootFileName{};
67  std::string m_trackColName{};
68  std::string m_linkColName{};
69  StringVec m_trkHitCollNames{};
70 
71  TFile* rootfile{};
72  TTree* tree{};
73 
74  /** ROOT output **/
75  FloatVec pMC{}, thetaMC{};
76  FloatVec eTrack{}, dEdxTrack{}, dEdxError{}, eEvt{};
77  FloatVec vxMag{}, m{}; // Vertex vector magnitude and mass of the associated particle
78  FloatVec nTrkHits{}, nTrkRelatedParticles{};
79  FloatVec zTrackHit{}, xTrackHit{}, yTrackHit{}, eTrackHit{}, typeTrackHit{};
80  FloatVec zHit{}, xHit{}, yHit{}, eHit{}, typeHit{};
81  int nTracks{};
82 
83  int lastRunHeaderProcessed{};
84 } ;
85 
86 
87 
88 
89 #endif /* INCLUDE_ANALYSESIDEDXPROCESSOR_H_ */
static const float m
AnalyseSidEdxProcessor for marlin.
virtual Processor * newProcessor()
std::vector< std::string > StringVec
Definition: SiStripClus.h:56