StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMinuitVertexFinder.h
1 
93 #include <vector>
94 
95 #include "StGenericVertexMaker/StGenericVertexFinder.h"
96 #include "StarClassLibrary/StPhysicalHelixD.hh"
97 #include "StarClassLibrary/StThreeVectorD.hh"
98 
99 class StEvent;
100 class StTrack;
101 class TMinuit;
102 
103 
105 {
106 public:
107 
108  StMinuitVertexFinder(VertexFit_t fitMode=VertexFit_t::NoBeamline);
109 
110  // mandatory implementations
111  virtual ~StMinuitVertexFinder();
112  Int_t fit(StEvent*);
113  void printInfo(ostream& = cout) const;
114  virtual void InitRun(int run_number, const St_db_Maker* db_maker);
115  void Clear();
116 
117 
118  // Added, not part of base-class and used by the Minuit vertex finder
119  Int_t NCtbMatches(); // returns the number of tracks matched to CTB
120  void CTBforSeed(){ mRequireCTB = kTRUE;}
121  void NoCTBforSeed(){ mRequireCTB = kFALSE;}
122  void setExternalSeed(const StThreeVectorD&);
123 
124  void setPrintLevel(Int_t = 0);
125  Int_t statusMin() const {return mStatusMin;} // Minuit status flag
126  void DoUseITTF(){ mUseITTF = kTRUE; }
127  void DoNotUseITTF(){ mUseITTF = kFALSE;}
128  void useOldBEMCRank() { mUseOldBEMCRank = kTRUE; }
129  void lowerSplitVtxRank() { mLowerSplitVtxRank = kTRUE; }
130  void setFlagBase();
131  void SetFitPointsCut(Int_t fitpoints) {mMinNumberOfFitPointsOnTrack = fitpoints;}
132  void SetMinimumTracks(Int_t n) {mMinTrack = n;}
133  void SetFXT(bool fxt=kTRUE) { mFXT = fxt; }
134 
135 private:
136 
137  enum {kFlagDcaz = 1, kFlagCTBMatch = 2, kFlagBEMCMatch = 4, kFlagCrossMembrane = 8};
138 
139  bool accept(StTrack*) const; // track filter
140  void fillBemcHits(StEvent *);
141  Int_t matchTrack2BEMC(const StTrack *);
142  Int_t checkCrossMembrane(const StTrack *);
143  void calculateRanks();
144  Int_t findSeeds();
145 
146  virtual void UseVertexConstraint() {}
147 
148  virtual double CalcChi2DCAs(const StThreeVectorD &vtx);
149 
150  bool mUseITTF; // Use only tracks with ITTF encoded method
151  bool mUseOldBEMCRank; // Use old BEMC rank calculation (Cu+Cu production)
152  bool mLowerSplitVtxRank;// Use lower rank for split vertices
153  UInt_t mFlagBase; // ITTF track flag
154  bool mRequireCTB; // Set maker to use CTB
155  bool mFXT; // Switch on FXT mode
156  UInt_t mMinNumberOfFitPointsOnTrack;
157  Float_t mDcaZMax;
158  Double_t mRImpactMax; // Max distance between helix and nominal beamline (0,0,z)
159  Int_t mMinTrack; // Min number of tracks
160  Float_t mZMin; // Min z of possible vertex positions
161  Float_t mZMax; // Max z of possible vertex positions
162 
163  enum {maxSeed=500};
164 
166  Int_t mNSeed;
167 
168  Float_t mSeedZ[maxSeed];
169  Int_t mBemcHit[120][20][2]; // modules, eta, sub
170  static std::vector<StPhysicalHelixD> mHelices;
171  static std::vector<UShort_t> mHelixFlags;
172  static std::vector<Double_t> mZImpact;
173  static Bool_t requireCTB;
174  static Int_t nCTBHits;
175  Int_t mStatusMin; // Minuit status flag
176  StThreeVectorD mExternalSeed;
177  Bool_t mExternalSeedPresent;
178  StPrimaryVertex *mBestVtx; // pointer to best vertex of this event
179  Float_t mBestRank; // store rank of best vertex
180  Float_t mCTBSum;
181 };
void setPrintLevel(Int_t=0)
Use mMinuit print level.