MarlinTPC  1.2.0
HitDistancesProcessor.h
1 #ifndef HIT_DISTANCES_PROCESSOR_H
2 #define HIT_DISTANCES_PROCESSOR_H 1
3 
4 #define N_1D_HISTOS_HIT_DISTANCES_PROCESSOR 1
5 #define N_2D_HISTOS_HIT_DISTANCES_PROCESSOR 0
6 
7 #include <CLHEP/Vector/ThreeVector.h>
8 
9 //C++
10 #include <iostream>
11 #include <cmath>
12 #include <algorithm>
13 
14 //LCIO
15 #include "marlin/Processor.h"
16 #include <vector>
17 
18 #include <EVENT/TrackerHit.h>
19 #include <lcio.h>
20 #include <IMPL/LCCollectionVec.h>
21 #include <EVENT/Track.h>
22 #include <EVENT/TrackerHit.h>
23 
24 #include "ZBinTemplateProcessor.h"
25 
26 // Aida
27 //#ifdef MARLIN_USE_AIDA // the whole processor does not make sense without aida
28 #include <AIDA/AIDA.h>
29 #include <marlin/AIDAProcessor.h>
30 #include <AIDA/IHistogramFactory.h>
31 #include <AIDA/IHistogram1D.h>
32 // endif
33 
34 //marlin
35 #include <marlin/Global.h>
36 
37 
38 namespace marlintpc
39 {
40 
65  class HitDistancesProcessor : public ZBinTemplateProcessor<N_1D_HISTOS_HIT_DISTANCES_PROCESSOR, N_2D_HISTOS_HIT_DISTANCES_PROCESSOR>{
66 
67  public:
68 
69  virtual Processor* newProcessor() { return new HitDistancesProcessor ; }
70 
72 
73  virtual ~HitDistancesProcessor();
74 
75  virtual void init();
76 
77  virtual void processRunHeader(lcio::LCRunHeader* run ) ;
78 
79  virtual void processEvent(lcio::LCEvent * evt ) ;
80 
81 
82  protected:
83 
84  std::string _tracksColName ;
85  std::string _hitsColName ;
86 
90  static const unsigned int _distanceIndex;
91 
92 // /// The index of the template parameter for the tracksPerEvent histos
93 // static const unsigned int _stracksPerEventHistosIndex;
94 
98  AIDA::IHistogram1D * _distanceHisto;
99 
100 
101  double _maxDistance;
102  };
103 }
104 
105 #endif // HIT_DISTANCES_PROCESSOR_H
std::string _tracksColName
the name of the input tracks collection
Definition: HitDistancesProcessor.h:84
double _maxDistance
Maximum value in _distanceHisto.
Definition: HitDistancesProcessor.h:101
static const unsigned int _distanceIndex
The index of the template parameter for the hitsPerTrack histos We want to have these values divided ...
Definition: HitDistancesProcessor.h:90
virtual Processor * newProcessor()
The newProcessor() function does not make sense for this template class, so it throws an lcio::Except...
Definition: HitDistancesProcessor.h:69
AIDA::IHistogram1D * _distanceHisto
For the following histograms a z binning does not make sense.
Definition: HitDistancesProcessor.h:98
A template to create processors wich create 1D or 2D distribution histograms, one histogram per z bin...
Definition: ZBinTemplateProcessor.h:76
Measures distances between two hits in a event.
Definition: HitDistancesProcessor.h:65
std::string _hitsColName
the name of the input hits collection
Definition: HitDistancesProcessor.h:85
virtual void init()
Register the AIDA histograms at the AIDAProcessor.
Definition: HitDistancesProcessor.cc:49