StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtStraightTrackMaker.h
1 #ifndef _ST_FGT_STRAIGHT_TRACK_MAKER_
3 #define _ST_FGT_STRAIGHT_TRACK_MAKER_
4 
5 
6 #include "StMaker.h"
7 //#include "StFgtQaMaker.h"
8 #include <TH2D.h>
9 #include <TROOT.h>
10 #include <TStyle.h>
11 #include <TCanvas.h>
12 #include <TFile.h>
13 #include <TF1.h>
14 #include "StFgtGeneralBase.h"
15 #include "StFgtGenAVEMaker.h"
16 //#include "StRoot/StEvent/StFgtCollection.h"
17 
18 
19 class StFgtCollection;
20 
22  public:
23  void SetEffDisk(Int_t disk);
24  StFgtStraightTrackMaker(const Char_t* name="FgtStraightTrackMaker");
25  pair<Double_t,Double_t> findCluChargeSize(Int_t iD,Char_t layer, Double_t ordinate);
26  virtual ~StFgtStraightTrackMaker();
27  Int_t Init();
28  Int_t Make();
29  Int_t Finish();
30  void setUseChargeMatch(Bool_t use=true);
31  // Bool_t checkPulse(StFgtHit* pClus);
32  vector<AVTrack>& getTracks();
33  void setTrackDcaCut(Float_t dca);
34  void setTrackZVtxCuts(Float_t minZVtx, Float_t maxZVtx);
35  void setMinNumFitPoints(Int_t numFP);
36  void addMultiplePoints(Bool_t addMult);
37  void setMaxClusters(Int_t maxC);
38 
39  void setMaxDist2(Float_t d);
40  void setFitWithVertex(Bool_t f);
41  void setRefitWithVertex(Bool_t f);
42  void setMaxPhiDiff(Float_t pd);
43 
44  virtual const char *GetCVS() const
45  {static const char cvs[]="Tag $Name: $ $Id: StFgtStraightTrackMaker.h,v 1.7 2014/08/06 11:43:10 jeromel Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
46  protected:
47  Bool_t isCosmic;
48 
49 
50  Float_t maxChi2;
51  Float_t dcaCut;
52  Float_t vertexCutPos;
53  Float_t vertexCutNeg;
54 
55  Float_t maxPhiDiff;//for points belonging to same track
56  Int_t maxClusters; //per disk
57 
58  Bool_t doFitWithVertex;
59  Bool_t doRefitWithVertex;
60  Bool_t doAddMultiplePoints;
61  Bool_t isMuDst;
62  Float_t maxDist2;
63  Int_t minNumFitPoints;
64 
65  Int_t m_effDisk;
66  vector<generalCluster>** pClusters;
67  vector<generalStrip>* pStrips;
68  vector<vector<AVPoint>* > vvPoints;
69  vector<TH2D*> v_hClusP;
70  vector<TH2D*> v_hClusR;
71  Bool_t useChargeMatch;
72  Short_t getQuadFromCoo(Double_t x, Double_t y);
73 
74  bool trackQCuts(AVTrack& trk);
75 
76  pair<Double_t,Double_t> getChargeRatio(Float_t r, Float_t phi, Int_t iD, Int_t iq);
77 
78 
79  Bool_t getTrack(vector<AVPoint>& points, Double_t ipZ);
80  pair<double,double> getDca( vector<AVTrack>::iterator it);
81  vector<AVTrack> m_tracks;
82  // for accessing the data
83  StFgtCollection *mFgtCollectionPtr;
84  Double_t getRPhiRatio(vector<generalCluster>::iterator hitIterBegin, vector<generalCluster>::iterator hitIterEnd);
85  Double_t findClosestPoint(float mx, float bx, float my, float by, double xE, double yE, Int_t iD);
86 
87  // for knowing what & how to plot
88 
89 
90  // threshold, in units of # sigma above average
91  Float_t mPedThres;
92  // Double_t getRPhiRatio(StSPtrVecFgtHitConstIterator hitIterBegin, StSPtrVecFgtHitConstIterator hitIterEnd);
93  // Double_t getRPhiRatio();
94 
95  int pulseCounterP;
96  int pulseCounterR;
97 
98  int pulseCounterTP;
99  int pulseCounterTR;
100 
101  int runningEvtNr;
102  int hitCounter;
103  int hitCounterR;
104  //THD2**
105  private:
106  ClassDef(StFgtStraightTrackMaker,1);
107 
108 };
109 
110 inline void StFgtStraightTrackMaker::setTrackDcaCut(Float_t dca)
111 {
112  dcaCut=dca;
113 };
114 inline void StFgtStraightTrackMaker::setTrackZVtxCuts(Float_t minZVtx, Float_t maxZVtx)
115 {
116  vertexCutPos=maxZVtx;
117  vertexCutNeg=minZVtx;
118 };
119 
120 inline void StFgtStraightTrackMaker::setMaxPhiDiff(Float_t pd)
121 {
122  maxPhiDiff=pd;
123 };
124 
125 inline void StFgtStraightTrackMaker::SetEffDisk(Int_t disk)
126  {
127  m_effDisk=disk;
128  }
129 inline void StFgtStraightTrackMaker::setUseChargeMatch(Bool_t use){useChargeMatch=use;};
130 inline vector<AVTrack>& StFgtStraightTrackMaker::getTracks(){return m_tracks;};
131 
132 
133 
134 inline void StFgtStraightTrackMaker::setMinNumFitPoints(Int_t numFP)
135 {
136  minNumFitPoints=numFP;
137 }
138 inline void StFgtStraightTrackMaker::addMultiplePoints(Bool_t addMult)
139 {
140  doAddMultiplePoints=addMult;
141 }
142 inline void StFgtStraightTrackMaker::setMaxClusters(Int_t maxC)
143 {
144  maxClusters=maxC;
145 }
146 
147 inline void StFgtStraightTrackMaker::setMaxDist2(Float_t d)
148 {
149  maxDist2=d;
150 }
151 inline void StFgtStraightTrackMaker::setFitWithVertex(Bool_t f)
152 {
153  doFitWithVertex=f;
154 }
155 inline void StFgtStraightTrackMaker::setRefitWithVertex(Bool_t f)
156 {
157  doRefitWithVertex=f;
158 }
159 
160 #endif
161 
Double_t findClosestPoint(float mx, float bx, float my, float by, double xE, double yE, Int_t iD)
pair< double, double > getDca(vector< AVTrack >::iterator it)
Short_t getQuadFromCoo(Double_t x, Double_t y)
this is too naive..., assumes non-rotated quads
Bool_t getTrack(vector< AVPoint > &points, Double_t ipZ)