StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StiKalmanTrackFinderParameters.h
1 #ifndef StiKalmanTrackFinderParameters_h
2 #define StiKalmanTrackFinderParameters_h
3 #include <string.h>
4 #include "TChair.h"
5 #include "tables/St_KalmanTrackFinderParameters_Table.h"
6 
8  public:
9  static StiKalmanTrackFinderParameters* instance();
10  KalmanTrackFinderParameters_st *Struct(Int_t i = 0) {return ((St_KalmanTrackFinderParameters*) Table())->GetTable()+i;}
11  UInt_t getNumRows() {return GetNRows();}
12  Int_t useMcAsRec(Int_t i = 0) {return Struct(i)->useMcAsRec;}
13  Int_t useTrackFilter(Int_t i = 0) {return Struct(i)->useTrackFilter;}
14  Int_t elossCalculated(Int_t i = 0) {return Struct(i)->elossCalculated;}
15  Int_t mcsCalculated(Int_t i = 0) {return Struct(i)->mcsCalculated;}
16  // Double_t field(Int_t i = 0) {return Struct(i)->field;}
17  Int_t maxNullCount(Int_t i = 0) {return Struct(i)->maxNullCount;}
18  Int_t maxContigNullCount(Int_t i = 0) {return Struct(i)->maxContigNullCount;}
19  Int_t minCountForReset(Int_t i = 0) {return Struct(i)->minCountForReset;}
20  Int_t HitRegions(Int_t i = 0) {return Struct(i)->mHitRegions;}
21  Int_t HitWeights(Int_t i = 0) {return Struct(i)->mHitWeights;}
22  Double_t maxChi2Vertex(Int_t i = 0) {return Struct(i)->maxChi2Vertex;}
23  Double_t massHypothesis(Int_t i = 0) {return Struct(i)->massHypothesis;}
24  Double_t maxDca2dZeroXY(Int_t i = 0) {return Struct(i)->maxDca2dZeroXY;}
25  Double_t maxDca3dVertex(Int_t i = 0) {return Struct(i)->maxDca3dVertex;}
26  Double_t getMassHypothesis() {return massHypothesis();}
27  Int_t maxContiguousNullCount() {return maxContigNullCount();}
28  Int_t minContiguousHitCountForNullReset() {return minCountForReset();}
29  void setHitRegions(Int_t rs) {
30  Int_t i=0;
31  for (i=0;rs&&i<4;i++) {mHitRegions[i]=rs%100; rs/=100;}
32  mHitRegions[i]=10000;
33  }
34  void setHitWeights(Int_t ws) {
35  Int_t i=0;
36  for (i=0;ws&&i<4;i++) {mHitWeights[i]=ws%100; ws/=100;}
37  mHitWeights[i]=0;
38  }
39  Int_t hitWeight(Int_t rxy) const {
40  if (rxy>50) return 0;
41  Int_t i=0; for (i=0;rxy>mHitRegions[i]&&i<4;i++) {}
42  return mHitWeights[i];
43  }
44  Int_t sumWeight() const {return 20;}
45 
46  protected:
47  StiKalmanTrackFinderParameters(St_KalmanTrackFinderParameters *table=0) :
48  TChair(table) {
49  memset(mBeg,0,mEnd-mBeg+1);
50  setHitRegions(HitRegions());
51  setHitWeights(HitWeights());
52  }
53  virtual ~StiKalmanTrackFinderParameters() {fgInstance = 0;}
54  Char_t mBeg[1];
55  Int_t mHitRegions[5]; //20,50 means 0<svtHit<20, 20<ssdHit<50
56  Int_t mHitWeights[5]; //Coeffs of nhits. sum must be >=20
57  Char_t mEnd[1];
58  private:
59  static StiKalmanTrackFinderParameters* fgInstance;
60  ClassDefineChair(StiKalmanTrackFinderParameters,St_KalmanTrackFinderParameters, KalmanTrackFinderParameters_st )
61  ClassDef(StiKalmanTrackFinderParameters,1) //C++ TChair for KalmanTrackFinderParameters table class
62 };
63 #endif
Definition: TChair.h:27