MarlinTPC  1.2.0
GeneralBrokenLineInterfaceHelpers.h
1 #ifndef GENERALBROKENLINEINTERFACEHELPERS_H
2 #define GENERALBROKENLINEINTERFACEHELPERS_H
3 
4 #include "SimpleHelixTrackModel.h"
5 
6 #include <marlin/Processor.h>
7 #include <marlin/Global.h>
8 
9 #include <lcio.h>
10 #include <string>
11 
12 // GBL:
13 #include "GblTrajectory.h"
14 #include "MilleBinary.h"
15 
16 // LCIO:
17 #include <EVENT/Track.h>
18 #include "EVENT/TrackerHit.h"
19 
20 #include "TFile.h"
21 #include "TTree.h"
22 #include "TMath.h"
23 
24 namespace marlintpc {
25 
27 class gblHelperHit {
28  public:
29  gblHelperHit(const EVENT::TrackerHit&, const simpleHelix&, const bool, const bool, const int, const double);
30  gblHelperHit(const double);
31 
34  return _l2M;
35  }
36 
38  TVectorD getResiduals() const {
39  return _res;
40  }
41 
43  TMatrixDSym getPrecision() const {
44  return _prec;
45  }
46 
48  double getS() const {
49  return _s;
50  }
51 
53  double getPhi() const {
54  return _seedPhi;
55  }
56 
58  double getEScaled() const {
59  return _eScaled;
60  }
61 
63  bool isMeasurement() const {
64  return _isMeas;
65  }
66 
68  bool isValid() const {
69  return _isValid;
70  }
71 
72  // access global derivatives for Millepede-II
73  unsigned int getNumGlobals() const;
74  std::vector<int> getGlobalLabels() const;
75  const TMatrixD& getGlobalDerivatives() const;
76 
77  private:
78  const bool _isMeas;
79  double _hitPhi;
80  bool _isValid;
81  double _seedPhi;
82  double _seedLambda;
83  double _xyPred;
84  double _zPred;
85  double _s;
86  double _eScaled;
87  TMatrixD _l2M;
88  TMatrixD _getL2M();
89  TVectorD _res;
90  TVectorD _getRes();
91  TMatrixDSym _prec;
92  TMatrixDSym _getPrec(FloatVec);
93  double _calcLocalPhi(const EVENT::TrackerHit&, const bool, const double);
94  double _calcEScaled(const EVENT::TrackerHit&);
95  // global derivatives for Millepede-II
96  unsigned int _numGlobals;
97  std::vector<int> _globalLab;
98  TMatrixD _globalDer;
99 };
100 
103  public:
105  unsigned int getNumGlobals() const;
106  std::vector<int> getGlobalLabels() const;
107  const TMatrixD& getGlobalDerivatives() const;
108  void calcModuleAlignment(const EVENT::TrackerHit& aHit, const TVectorD& tdir);
109  void calcTrackDistortions(const EVENT::TrackerHit& aHit);
110  void calcHitCharge(const EVENT::TrackerHit& aHit);
111  void calcDr(const EVENT::TrackerHit& aHit, double phi);
112 
113  private:
114  unsigned int _numDer;
115  std::vector<int> _globalLab;
116  TMatrixD _globalDer;
117 };
118 
121  public:
122  trackerAlcaSelector(const EVENT::Track&, const int);
123  const bool isSelected() const;
124 
125  private:
126  bool _selectionFlag;
127 };
128 
129 } // namespace marlintpc
130 #endif // GENERALBROKENLINEINTERFACEHELPERS_H
Simple Helix.
Definition: SimpleHelixTrackModel.h:23
Helper hit.
Definition: GeneralBrokenLineInterfaceHelpers.h:27
bool isValid() const
Get flag for valid prediction.
Definition: GeneralBrokenLineInterfaceHelpers.h:68
double getS() const
Get arc-length.
Definition: GeneralBrokenLineInterfaceHelpers.h:48
User defined class to select tracks for Millepede-II.
Definition: GeneralBrokenLineInterfaceHelpers.h:120
TVectorD getResiduals() const
Get residuals.
Definition: GeneralBrokenLineInterfaceHelpers.h:38
double getEScaled() const
Get scaled Edep.
Definition: GeneralBrokenLineInterfaceHelpers.h:58
bool isMeasurement() const
Get measurement flag.
Definition: GeneralBrokenLineInterfaceHelpers.h:63
TMatrixD getLocalToMeasurementProjection() const
Get projection from local to measurement system.
Definition: GeneralBrokenLineInterfaceHelpers.h:33
User defined class to calculate global derivatives for Millepede-II.
Definition: GeneralBrokenLineInterfaceHelpers.h:102
TMatrixDSym getPrecision() const
Get precision.
Definition: GeneralBrokenLineInterfaceHelpers.h:43
double getPhi() const
Get phi (direction )of seed track.
Definition: GeneralBrokenLineInterfaceHelpers.h:53