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 
134 private:
135 
136  enum {kFlagDcaz = 1, kFlagCTBMatch = 2, kFlagBEMCMatch = 4, kFlagCrossMembrane = 8};
137 
138  bool accept(StTrack*) const; // track filter
139  void fillBemcHits(StEvent *);
140  Int_t matchTrack2BEMC(const StTrack *);
141  Int_t checkCrossMembrane(const StTrack *);
142  void calculateRanks();
143  Int_t findSeeds();
144 
145  virtual void UseVertexConstraint() {}
146 
147  virtual double CalcChi2DCAs(const StThreeVectorD &vtx);
148 
149  bool mUseITTF; // Use only tracks with ITTF encoded method
150  bool mUseOldBEMCRank; // Use old BEMC rank calculation (Cu+Cu production)
151  bool mLowerSplitVtxRank;// Use lower rank for split vertices
152  UInt_t mFlagBase; // ITTF track flag
153  bool mRequireCTB; // Set maker to use CTB
154  UInt_t mMinNumberOfFitPointsOnTrack;
155  Float_t mDcaZMax;
156  Double_t mRImpactMax; // Max distance between helix and nominal beamline (0,0,z)
157  Int_t mMinTrack; // Min number of tracks
158  Float_t mZMin; // Min z of possible vertex positions
159  Float_t mZMax; // Max z of possible vertex positions
160 
161  enum {maxSeed=500};
162 
164  Int_t mNSeed;
165 
166  Float_t mSeedZ[maxSeed];
167  Int_t mBemcHit[120][20][2]; // modules, eta, sub
168  static std::vector<StPhysicalHelixD> mHelices;
169  static std::vector<UShort_t> mHelixFlags;
170  static std::vector<Double_t> mZImpact;
171  static Bool_t requireCTB;
172  static Int_t nCTBHits;
173  Int_t mStatusMin; // Minuit status flag
174  StThreeVectorD mExternalSeed;
175  Bool_t mExternalSeedPresent;
176  StPrimaryVertex *mBestVtx; // pointer to best vertex of this event
177  Float_t mBestRank; // store rank of best vertex
178  Float_t mCTBSum;
179 };
void setPrintLevel(Int_t=0)
Use mMinuit print level.