ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/VertexFit/interface/MultiVertexFitter.h
(Generate patch)

Comparing UserCode/MitCommon/VertexFit/interface/MultiVertexFitter.h (file contents):
Revision 1.5 by loizides, Fri Mar 20 13:33:03 2009 UTC vs.
Revision 1.7 by loizides, Mon Oct 12 21:39:20 2009 UTC

# Line 63 | Line 63
63   //
64   //                                   AddTrack was modified to implement this feature.
65   //   Jul 18, 2008  Christoph Paus    Works for CMS and any other type of Helix fitting.
66 + //
67 + //   (This class was taken from CDF and does therefore not follow our coding conventions.)
68   //--------------------------------------------------------------------------------------------------
69  
70   #ifndef MITCOMMON_VERTEXFIT_MULTIVERTEXFITTER_H
# Line 94 | Line 96 | extern "C" {
96  
97   namespace mithep {
98    class MultiVertexFitter {
97
99      public:
100  
101        //--------------------------------------------------------------------------------------------
# Line 144 | Line 145 | namespace mithep {
145        //
146        // Incidentally this is the ordering used in the CDF experiment.
147        //--------------------------------------------------------------------------------------------
148 <      bool addTrack             (const HepVector &pars, const HepSymMatrix &cov, int trackid,
149 <                                 float mass, vertexNumber jv);
148 >      bool addTrack             (const CLHEP::HepVector &pars, const CLHEP::HepSymMatrix &cov,
149 >                                 int trackid, float mass, vertexNumber jv);
150  
151        bool addTrack             (const TVectorD &pars, const TMatrixDSym &cov, int trackid,
152                                   double mass, vertexNumber jv);
# Line 160 | Line 161 | namespace mithep {
161        bool massConstrain        (int ntrk, const int trkIds[], float mass);
162  
163        void setPrimaryVertex     (float xv, float yv, float zv);
164 <      void setPrimaryVertex     (Hep3Vector pv);
165 <      bool setPrimaryVertexError(const HepSymMatrix &xverr);
164 >      void setPrimaryVertex     (CLHEP::Hep3Vector pv);
165 >      bool setPrimaryVertexError(const CLHEP::HepSymMatrix &xverr);
166        void setPrimaryVertexError(const float xverr[3][3]);
167  
168        bool fit                  ();
# Line 198 | Line 199 | namespace mithep {
199        // For help email: Joao Guimaraes  guima@huhepl.harvard.edu, Franco Bedeschi bed@fnal.gov
200        // See more information in the ctvmft.f
201        // -------------------------------------------------------------------------------------------
202 <      bool beamlineConstraint(float xb, float yb, HepSymMatrix berr,float xzbslope,float yzbslope);
203 <      bool beamlineConstraint(Hep3Vector pv, HepSymMatrix berr, float xzbslope, float yzbslope);
202 >      bool                beamlineConstraint(float xb, float yb, CLHEP::HepSymMatrix berr,
203 >                                             float xzbslope,float yzbslope);
204 >      bool                beamlineConstraint(CLHEP::Hep3Vector pv, CLHEP::HepSymMatrix berr,
205 >                                             float xzbslope, float yzbslope);
206  
207        //--------------------------------------------------------------------------------------------
208        // Accessors
209        //--------------------------------------------------------------------------------------------
210  
211 <      void             setBField  (double bField) { _bField = bField; }
212 <      double           bField     () const { return _bField; }
213 <      void             setExcuse  ();
214 <      void             setNoExcuse();
211 >      void                setBField  (double bField) { _bField = bField; }
212 >      double              bField     () const { return _bField; }
213 >      void                setExcuse  ();
214 >      void                setNoExcuse();
215  
216 <      std::string      expert     () const;                // name/email of MultiVertexFitter expert
217 <      int              status     () const;                // return status of fit
216 >      std::string         expert     () const;            // name/email of MultiVertexFitter expert
217 >      int                 status     () const;            // return status of fit
218        // overall fit quality paramters
219 <      int              ndof       () const;                // number of degrees of freedom
220 <      float            prob       () const;                // return probability of chi-square
221 <      float            chisq      () const;                // return chi-square of fit
222 <      float            chisq      (const int trkId) const;
223 <      float            chisq_rphi () const;
224 <      float            chisq_rphi (const int trkId) const;
225 <      float            chisq_z    () const;
226 <      float            chisq_z    (const int trkId) const;
227 <      float            chisq_rphiz() const;
228 <      float            chisq_rphiz(const int trkId) const;
219 >      int                 ndof       () const;            // number of degrees of freedom
220 >      float               prob       () const;            // return probability of chi-square
221 >      float               chisq      () const;            // return chi-square of fit
222 >      float               chisq      (const int trkId) const;
223 >      float               chisq_rphi () const;
224 >      float               chisq_rphi (const int trkId) const;
225 >      float               chisq_z    () const;
226 >      float               chisq_z    (const int trkId) const;
227 >      float               chisq_rphiz() const;
228 >      float               chisq_rphiz(const int trkId) const;
229  
230        // return fit track four momentum
231 <      //HepLorentzVector getTrackP4 (const int trkId) const;
229 <      FourVector       getTrackP4 (const int trkId) const;
231 >      FourVector          getTrackP4 (const int trkId) const;
232  
231      //// return fit track parameters
232      //Helix            getHelix   (const int trkId) const;
233        // return fit mass and get error
234 <      float            getMass    (int ntrk, const int trkIds[], float& dmass) const;
234 >      float               getMass    (int ntrk, const int trkIds[], float& dmass) const;
235  
236        // return decay length
237 <      float            getDecayLength(vertexNumber nv, vertexNumber mv, const Hep3Vector& dir,
238 <                                      float& dlerr) const;
239 <      float            getDecayLength(vertexNumber nv, vertexNumber mv, const ThreeVector& dir,
240 <                                      float& dlerr) const;                                      
241 <      float            getZDecayLength(vertexNumber nv, vertexNumber mv,
242 <                                      const Hep3Vector& dir, float& dlerr) const;  
243 <      float            getZDecayLength(vertexNumber nv, vertexNumber mv,
244 <                                      const ThreeVector& dir, float& dlerr) const;                  
245 <      float            getImpactPar(vertexNumber prdV, vertexNumber dcyV,
246 <                                      const Hep3Vector &v, float &dxyerr) const;    
247 <      float            getImpactPar(vertexNumber prdV, vertexNumber dcyV,
248 <                                      const ThreeVector &v, float &dxyerr) const;                  
249 <      float            get_dr(vertexNumber nv, vertexNumber mv, float& drerr) const;
250 <      float            get_dz(vertexNumber nv, vertexNumber mv, float& dzerr) const;
237 >      float               getDecayLength(vertexNumber nv, vertexNumber mv,
238 >                                         const CLHEP::Hep3Vector& dir, float& dlerr) const;
239 >      float               getDecayLength(vertexNumber nv, vertexNumber mv, const ThreeVector& dir,
240 >                                         float& dlerr) const;                                      
241 >      float               getZDecayLength(vertexNumber nv, vertexNumber mv,
242 >                                          const CLHEP::Hep3Vector& dir, float& dlerr) const;  
243 >      float               getZDecayLength(vertexNumber nv, vertexNumber mv,
244 >                                          const ThreeVector& dir, float& dlerr) const;
245 >      float               getImpactPar(vertexNumber prdV, vertexNumber dcyV,
246 >                                       const CLHEP::Hep3Vector &v, float &dxyerr) const;    
247 >      float               getImpactPar(vertexNumber prdV, vertexNumber dcyV,
248 >                                       const ThreeVector &v, float &dxyerr) const;                  
249 >      float               get_dr(vertexNumber nv, vertexNumber mv, float& drerr) const;
250 >      float               get_dz(vertexNumber nv, vertexNumber mv, float& dzerr) const;
251        // return location of vertex
252 <      Hep3Vector       getVertexHep(vertexNumber nv) const;
253 <      ThreeVector      getVertex(vertexNumber nv) const;
254 <      // return error matrix element.
255 <      ThreeSymMatrix   getErrorMatrix(vertexNumber nv) const;
256 <      double           getErrorMatrixHep(int j, int k) const;
257 <      HepSymMatrix     getErrorMatrixHep(vertexNumber nv) const;
258 <      HepSymMatrix     getErrorMatrixHep(const int trkId) const;
259 <      void             getPosMomErr  (HepMatrix& errors) const;
260 <      int              vOff          (vertexNumber jv) const;
261 <      int              tOff          (const int trkId) const;
262 <      int              pOff          (int lp) const;
263 <      int              cOff          (int lc) const;
264 <      int              mOff          () const;
265 <      double           VMat          (int i, int j) const;
266 <      float            getPtError    (const int trkId) const;
267 <      MultiVertexFitter::vertexNumber
268 <      allocateVertexNumber();
269 <      void             resetAllocatedVertexNumber();
252 >      CLHEP::Hep3Vector   getVertexHep(vertexNumber nv) const;
253 >      ThreeVector         getVertex(vertexNumber nv) const;
254 >      // return error matrix element
255 >      ThreeSymMatrix      getErrorMatrix(vertexNumber nv) const;
256 >      double              getErrorMatrixHep(int j, int k) const;
257 >      CLHEP::HepSymMatrix getErrorMatrixHep(vertexNumber nv) const;
258 >      CLHEP::HepSymMatrix getErrorMatrixHep(const int trkId) const;
259 >      void                getPosMomErr  (CLHEP::HepMatrix& errors) const;
260 >      int                 vOff          (vertexNumber jv) const;
261 >      int                 tOff          (const int trkId) const;
262 >      int                 pOff          (int lp) const;
263 >      int                 cOff          (int lc) const;
264 >      int                 mOff          () const;
265 >      double              VMat          (int i, int j) const;
266 >      float               getPtError    (const int trkId) const;
267 >      MultiVertexFitter::vertexNumber
268 >                          allocateVertexNumber();
269 >      void                resetAllocatedVertexNumber();
270  
271        // Accessors for getting information relative to ijk errors get the error code from the three
272        // ijk indexes into the argument variables
273 <      void             getIJKErr(int& err0, int& err1, int& err2) const;
273 >      void                getIJKErr(int& err0, int& err1, int& err2) const;
274        // Return each error code from the three ijk indexes
275 <      int              getIJKErr0() const;
276 <      int              getIJKErr1() const;
277 <      int              getIJKErr2() const;
275 >      int                 getIJKErr0() const;
276 >      int                 getIJKErr1() const;
277 >      int                 getIJKErr2() const;
278  
279        // Get track-id of the track causing a fatal error as indicated by the corresponding ijk error
280 <      int              getErrTrackId() const;
280 >      int                 getErrTrackId() const;
281  
282        // Set new track reference point
283 <      void             setTrackReferencePoint(const ThreeVector &ref);
283 >      void                setTrackReferencePoint(const ThreeVector &ref);
284  
285        //--------------------------------------------------------------------------------------------
286        // Overload operators
# Line 391 | Line 391 | namespace mithep {
391        TRKPRM   _trkprm;
392        TRKPRM*  _trkprm_com;
393  
394      //--------------------------------------------------------------------------------------------
395      // Private functions used by class
396      //--------------------------------------------------------------------------------------------
397
394      private:
395 +      double             _bField;                       // B field in Tesla
396  
397 <      // Moves reference point of track parameters and errors to _referencePoint
398 <      //void moveReferencePoint(HepVector &v, HepSymMatrix &m);
399 <      // Moves reference point of track parameters and errors to _referencePoint.  Additionally
400 <      //checks if track has already been moved by examining it's "derived" link
401 <      //void moveReferencePoint(const CdfTrack *trk, HepVector &v, HepSymMatrix &m);
405 <
406 <      //--------------------------------------------------------------------------------------------
407 <      // Data members of class
408 <      //--------------------------------------------------------------------------------------------
409 <      double      _bField;                        // B field in Tesla
410 <
411 <      int         _currentAllocatedVertexNumber;  // index to enum vertexNumber
412 <      ThreeVector _referencePoint;                // reference point of track
413 <      Hep3Vector  _primaryVertex;                 // primary vertex relative to _referencePoint
414 <      Hep3Vector  _cdfPrimaryVertex;              // primary vertex in CDF coordinate system
415 <      bool        _extrapolateTrackErrors;        // extrapolate track errors to _referencePoint
397 >      int                _currentAllocatedVertexNumber; // index to enum vertexNumber
398 >      ThreeVector        _referencePoint;               // reference point of track
399 >      CLHEP::Hep3Vector  _primaryVertex;                // primary vertex rel. to _referencePoint
400 >      CLHEP::Hep3Vector  _cdfPrimaryVertex;             // primary vertex in CDF coordinate system
401 >      bool               _extrapolateTrackErrors;       // extrapolate track errors _referencePoint
402    };
403   }
404  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines