MarlinTPC  1.2.0
InterTrackDistanceProcessor.h
1 /*
2  * InterTrackDistanceProcessor.h
3  *
4  * Created on: October 2nd, 2013
5  * Author: amunnich
6  */
7 
8 #ifndef INTERTRACKDISTANCEPROCESSOR_H
9 #define INTERTRACKDISTANCEPROCESSOR_H
10 
11 #include <marlin/Processor.h>
12 #include <lcio.h>
13 #include "EVENT/Track.h"
14 
15 // Aida
16 #ifdef MARLIN_USE_AIDA
17 //AIDA
18 #include <marlin/AIDAProcessor.h>
19 #endif
20 
21 //GEAR
22 #include "gear/TPCParameters.h"
23 
24 #include "TH1F.h"
25 #include "TH2.h"
26 #include "TNtuple.h"
27 
28 
29 namespace marlintpc
30 {
34  class InterTrackDistanceProcessor : public marlin::Processor
35  {
36  public:
37 
38  virtual Processor* newProcessor() { return new InterTrackDistanceProcessor; }
39 
41 
42  virtual void init();
43 
44  virtual void processRunHeader(lcio::LCRunHeader* run);
45 
46  virtual void processEvent(lcio::LCEvent* evt);
47 
48  virtual void check(lcio::LCEvent* evt);
49 
50  virtual void end();
51 
52  std::vector< std::pair<int,double> > Get_RPhiDistVec(){return _RPhiDistVec;};
53  std::vector< std::pair<int,double> > Get_ZDistVec(){return _ZDistVec;};
54  void SetInputColName(std::string name){_inputColName=name;};
55  std::pair<double,double> Get_PhiIntersection(lcio::Track *track, int module, int row){return phiIntersection(track, module, row);};
56 
57  protected:
58  std::string _inputColName;
59 
60 
61  private:
62  void DoubleTrackProductionEfficiency(std::vector<lcio::Track *> trackVec);
63  std::pair<double,double> phiIntersection(lcio::Track *track, int module, int row);
64  double zIntersection(lcio::Track *track, int module, int row);
65  const gear::TPCParameters* _GearParameters;
66 
67  TH2F * _histoInterTrackrphiDistance;
68  TH2F * _histoInterTrackZDistance;
69  TH2F * _histoInterTrackDistance;
70  TH1F * _histoDoubleTrackEfficiency;
71 
73  int _NumRowsWithMergedTracks;
74  float _MaxDistBetweenMergedTracks;
75  int _NumRowsWithSeparatedTracks;
76  float _MinDistBetweenSeparatedTracks;
77 
78  float _Max_Z_DistBetweenMergedTracks;
79  float _Min_Z_DistBetweenSeparatedTracks;
80 
81  int _eff_counter;
82  int _all_counter;
83 
84  float _histogramMinDistance;
85  float _histogramMaxDistance;
86  IntVec _moduleList;
87 
88  std::vector< std::pair<int,double> > _RPhiDistVec;
89  std::vector< std::pair<int,double> > _ZDistVec;
90 
91  };
92 }
93 
94 #endif //INTERTRACKDISTANCEPROCESSOR_H
std::string _inputColName
Name of the input collection with tracks.
Definition: InterTrackDistanceProcessor.h:55
Marlin processor which plots the minimal inter-track distance per event and row in a histogram...
Definition: InterTrackDistanceProcessor.h:34