MyMarlinTPC  170316
RowBasedFastHoughTransformationProcessor.h
Go to the documentation of this file.
1 #ifndef ROWBASEDFASTHOUGHTRANSFORMATIONPROCESSOR_H
2 #define ROWBASEDFASTHOUGHTRANSFORMATIONPROCESSOR_H
3 
5 
6 #include <marlin/Processor.h>
7 #include <marlin/Global.h>
8 #include <lcio.h>
9 #include <string>
10 
11 #include <gear/TPCModule.h>
12 
13 // LCIO:
14 #include "EVENT/TrackerHit.h"
15 
16 #include "TFile.h"
17 #include "TTree.h"
18 #include "TMath.h"
19 #include "TVectorD.h"
20 #include "TMatrixD.h"
21 #include "TMatrixDSym.h"
22 
30 namespace marlintpc {
32 
92 class RowBasedFastHoughTransformationProcessor: public marlin::Processor {
93  public:
94 
95  virtual Processor* newProcessor() {
97  }
98 
100 
101  virtual void init();
102 
103  virtual void processRunHeader(EVENT::LCRunHeader* run);
104 
105  virtual void processEvent(EVENT::LCEvent* evt);
106 
107  virtual void check(EVENT::LCEvent* evt);
108 
109  virtual void end();
110 
111  protected:
112  /* the place for protected and private member data and functions */
113  std::string _inputColName;
114  std::string _outputColName;
116  bool _useXY;
117  bool _useXZ;
118  double _centerXY;
119  double _rangeXY;
120  double _centerXZ;
121  double _rangeXZ;
122  int _minRow;
123  float _fracRow;
125  int _maxCube;
126  int _minLevel;
127  int _maxLevel;
128  float _effCut;
129  float _purCut;
131  double _unusedCut;
132  int _maxGap;
134  bool _refAtPCA;
136 
137  private:
139  double _Bzc;
140  double _Xcenter;
141  double _Ycenter;
142 };
143 
144 typedef std::vector<int> intListType;
145 typedef std::vector<double> doubleListType;
146 typedef std::vector<doubleListType> directionsType;
148 
155  public:
156  rb_HyperPlane(int, rb_Hit*, directionsType&, double = 0.75);
157  void print() const;
158  int getScaleBits() const;
159  int getRow() const;
160  rb_Hit* getHit() const;
161  intListType getCut() const;
162  int getCut(int) const;
163  std::vector<intListType> getSteps() const;
164  int getStep(int, int) const;
165 
166  private:
169  intListType _cut;
170  std::vector<intListType> _steps;
171 };
172 
173 typedef std::vector<rb_HyperPlane*> hyperPlaneListType;
174 
175 int nCube;
176 
178 
184  public:
185  rb_HyperCube(unsigned int*, hyperPlaneListType&, intListType&, unsigned int = 0);
186  void print() const;
187  hitListType divide(int, int, int, int, float, float);
188 
189  private:
190  unsigned int _setup[2];
191  std::vector<rb_HyperPlane*> _planes;
192  intListType _distances;
193  int _level;
194  int _numChild;
195  unsigned int _dimension;
196 };
197 
198 } // namespace marlintpc
199 #endif // ROWBASEDFASTHOUGHTRANSFORMATIONPROCESSOR_H
std::vector< rb_HyperPlane * > _planes
list of hyperplanes
std::vector< double > doubleListType
double _bfieldScaleFactor
scale factor for magnetic field (default: 1.0)
unsigned int _dimension
(measurement) dimension (1 or 2)
int _scaleBits
number of scale bits (2^(_scaleBits) = 1.0)
double _unusedCut
Chi2 cut for matching unused hits in XY and Z.
std::vector< intListType > _steps
steps (distance to childs projected on normal)
std::vector< rb_Hit * > hitListType
std::vector< rb_HyperPlane * > hyperPlaneListType
int _maxGap
Cut for (row) distance to segment for matching unused hits in XY and Z.
intListType _cut
distance cut for maximal component
std::vector< doubleListType > directionsType