MarlinTPC  1.2.0
SimpleHelixGeneralBrokenLineInterfaceProcessor.h
1 #ifndef SIMPLEHELIXGENERALBROKENLINEINTERFACEPROCESSOR_H
2 #define SIMPLEHELIXGENERALBROKENLINEINTERFACEPROCESSOR_H
3 
4 #include "SimpleHelixTrackModel.h"
5 #include "GeneralBrokenLineInterfaceHelpers.h"
6 
7 #include <marlin/Processor.h>
8 #include <marlin/Global.h>
9 
10 #include <lcio.h>
11 #include <string>
12 
13 // GBL:
14 #include "GblTrajectory.h"
15 #include "MilleBinary.h"
16 
17 // LCIO:
18 #include <EVENT/Track.h>
19 #include "EVENT/TrackerHit.h"
20 
21 #include "TFile.h"
22 #include "TTree.h"
23 #include "TMath.h"
24 
25 namespace marlintpc {
26 
27 typedef std::pair<int, double> indexArcPair;
28 typedef std::pair<double, double> arcVarPair;
29 
31 
80 class SimpleHelixGeneralBrokenLineInterfaceProcessor: public marlin::Processor {
81  public:
82 
83  virtual Processor* newProcessor() {
85  }
86 
88 
89  virtual void init();
90 
91  virtual void processRunHeader(EVENT::LCRunHeader* run);
92 
93  virtual void processEvent(EVENT::LCEvent* evt);
94 
95  virtual void check(EVENT::LCEvent* evt);
96 
97  virtual void end();
98  protected:
99  std::string _inputCollectionName;
103  std::string _fitOptions;
112 
113  private:
114  gbl::GblTrajectory* _trajectory;
115  gbl::MilleBinary* _milleBinary;
116  bool _curvature;
117  std::vector<unsigned int> _theLabels;
118  TVectorD* _correctionVector;
119  TMatrixDSym* _covarianceMatrix;
120  int _ndf;
121  double _chisquare;
122  double _lostweight;
123  double _refPointS;
124  unsigned int _refPointIndex;
125  double _Xcenter;
126  double _Ycenter;
127 
128  void calcLineSeed(const std::vector<TrackerHit*>, const double*, double &, double &, double &, double &, double &) const;
129 };
130 
131 } // namespace marlintpc
132 #endif // SimpleHelixGENERALBROKENLINEINTERFACEPROCESSOR_H
int _milleMinHits
defines minimum number of hits on track for output to Millepede binary file
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:106
std::string _outputTrackCollectionName
Name of the output track collection.
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:100
bool _outputIsPersistent
whether the output is to be stored or not (default: true)
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:102
double _defaultMomentum
default momentum for multiple scattering (for Bfield off, GeV) (default: 10.)
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:111
bool _writeMillepedeOut
selects output to Millepede-II binary file
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:104
Using GBL with a simple helix.
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:80
int _milleCalcMethod
defines which parameter should be calculated for Millepede-II binary file
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:105
bool _encodedModuleID
Module ID is encoded in CellID0.
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:108
std::string _fileNameMillepedeFile
name of Millepede-II binary file
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:107
double _bfieldScaleFactor
scale factor for magnetic field (default: 1.0)
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:101
std::string _fitOptions
list of iterations with 'h' Huber, 't' Tukey or 'c' Cauchy down-weighting
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:103
std::string _inputCollectionName
Name of the input collection – track seeds.
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:99
double _x0PerUnitLength
X0 per unit length (TPC gas as homogeneous scatterer) (default: 0.)
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:109
bool _thickScatterer
selects thick (otherwise thin) scatterers for multiple scattering (default: false) ...
Definition: SimpleHelixGeneralBrokenLineInterfaceProcessor.h:110