MarlinTrkProcessors  2.4.1
SpacePointBuilder.h
1 #ifndef SpacePointBuilder_h
2 #define SpacePointBuilder_h 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include <string>
7 #include <EVENT/TrackerHit.h>
8 #include <EVENT/TrackerHitPlane.h>
9 #include <IMPL/TrackerHitImpl.h>
10 
11 #include "CLHEP/Vector/ThreeVector.h"
12 
13 
14 using namespace lcio ;
15 using namespace marlin ;
16 
17 
18 
19 
20 
56 class SpacePointBuilder : public Processor {
57 
58  public:
59 
60  virtual Processor* newProcessor() { return new SpacePointBuilder ; }
61 
62 
64 
68  virtual void init() ;
69 
72  virtual void processRunHeader( LCRunHeader* run ) ;
73 
76  virtual void processEvent( LCEvent * evt ) ;
77 
78 
79  virtual void check( LCEvent * evt ) ;
80 
81 
84  virtual void end() ;
85 
86 
87 
88 
89  protected:
90 
91 
92 
95  std::string _TrackerHitCollection;
96 
100 
104 
107  std::string _relColName;
108 
114  static int calculateXingPoint( double x1, double y1, float ex1, float ey1, double x2, double y2, float ex2, float ey2, double& x, double& y );
115 
138  static int calculatePointBetweenTwoLines(
139  const CLHEP::Hep3Vector& P1,
140  const CLHEP::Hep3Vector& V1,
141  const CLHEP::Hep3Vector& P2,
142  const CLHEP::Hep3Vector& V2,
143  CLHEP::Hep3Vector& point );
144 
145 
146 
158  static int calculatePointBetweenTwoLines_UsingVertex(
159  const CLHEP::Hep3Vector& PA,
160  const CLHEP::Hep3Vector& PB,
161  const CLHEP::Hep3Vector& PC,
162  const CLHEP::Hep3Vector& PD,
163  const CLHEP::Hep3Vector& Vertex,
164  CLHEP::Hep3Vector& point);
165 
166 
168  TrackerHitImpl* createSpacePoint( TrackerHitPlane* a , TrackerHitPlane* b, double stripLength );
169 
170 // TrackerHitImpl* createSpacePointOld( TrackerHitPlane* a , TrackerHitPlane* b );
171 
177  std::vector< int > getCellID0sAtBack( int cellID0 );
178 
179  std::vector< int > getCellID0sAtBackOfFTD( int cellID0 );
180 
181  std::vector< int > getCellID0sAtBackOfSET( int cellID0 );
182 
183  std::vector< int > getCellID0sAtBackOfSIT( int cellID0 );
184 
185 
187  std::string getCellID0Info( int cellID0 );
188 
189 
190  int _nRun ;
191  int _nEvt ;
192 
193  unsigned _nOutOfBoundary;
194  unsigned _nStripsTooParallel;
195  unsigned _nPlanesNotParallel;
196 
197  float _nominal_vertex_x;
198  float _nominal_vertex_y;
199  float _nominal_vertex_z;
200 
201  CLHEP::Hep3Vector _nominal_vertex;
202 
203  float _striplength_tolerance;
204 
205 } ;
206 
207 #endif
208 
209 
210 
std::string _relColName
Output relations collection name.
Definition: SpacePointBuilder.h:107
std::string _TrackerHitCollection
Input collection name.
Definition: SpacePointBuilder.h:95
================= FTD Space Point Builder =================
Definition: SpacePointBuilder.h:56
std::string _TrackerHitSimHitRelCollection
Input relation collection name.
Definition: SpacePointBuilder.h:99
std::string _SpacePointsCollection
Output collection name.
Definition: SpacePointBuilder.h:103