kalmanalignment is hosted by Hepforge, IPPP Durham
Kalman Alignment

/home/mweber/Dokumente/CMS/Alignment/kalmanalignment/trunk/event/AlignEvent.h

00001 #ifndef _AlignEvent_h
00002 #define _AlignEvent_h
00003 
00004 #include "TObject.h"
00005 #include "TClonesArray.h"
00006 #include "TVectorD.h"
00007 #include "TMatrixD.h"
00008 #include "TMatrixDSym.h"
00009 #include "TArrayI.h"
00010 
00011 class AlignInfo : public TObject {
00012   int fNAlignables; // number of alignables
00013   int fNParameters; // number of alignment parameters
00014   
00015  public:
00016   AlignInfo();
00017   AlignInfo(int nAlignables, int nParameters);
00018   int GetNAlignables() const { return fNAlignables; };
00019   int GetNParameters() const { return fNParameters; };
00020   virtual ~AlignInfo();  
00021   
00022   ClassDef(AlignInfo, 1); // Alignment Information
00023 };
00024 
00025 class AlignEvent {
00026 protected:
00027   int           fRun;          // run number
00028   int           fEvent;        // event number
00029   double        fChi2;         // chi^2 of track fit
00030   int           fNdof;         // number of degrees of freedom
00031   int           fTrackNumber;  // number of corresponding track
00032   TArrayI     * fIndex;                //->index of Alignables
00033   TVectorD    * fMeasurements;         //->measurements
00034   TMatrixDSym * fMeasuredCovariance;   //->covariance of measurements
00035   TMatrixD    * fTrackDerivatives;     //->track derivatives
00036   TMatrixD    * fAlignmentDerivatives; //->alignment derivatives
00037   TVectorD    * fTrackPrediction;      //->track prediction
00038 
00039  public:
00040   AlignEvent();
00041   virtual ~AlignEvent();
00042   void SetRun(int run) { fRun = run; };
00043   void SetEvent(int event) { fEvent = event; };
00044   void SetChi2(double chi2) { fChi2 = chi2; };
00045   void SetNdof(int ndof) { fNdof = ndof; };
00046   void SetTrackNumber(int number) { fTrackNumber = number; };
00047   int  GetRun() const { return fRun; };
00048   int  GetEvent() const { return fEvent; };
00049   double GetChi2() const { return fChi2; };
00050   int  GetNdof() const { return fNdof; };
00051   int  GetTrackNumber() const { return fTrackNumber; };
00052   // const getters for index, vectors, matrices
00053   const TArrayI     * GetIndex() const { return fIndex; };
00054   const TVectorD    * GetMeasurements() const { return fMeasurements; };
00055   const TMatrixDSym * GetMeasuredCovariance() const { return fMeasuredCovariance; };
00056   const TMatrixD    * GetTrackDerivatives() const { return fTrackDerivatives; };
00057   const TMatrixD    * GetAlignmentDerivatives() const { return fAlignmentDerivatives; };
00058   const TVectorD    * GetTrackPrediction() const { return fTrackPrediction; };
00059 
00060   // non-const getters for index, vectors, matrices to allow setting
00061   // without constructing
00062   TArrayI     * GetIndex() { return fIndex; };
00063   TVectorD    * GetMeasurements() { return fMeasurements; };
00064   TMatrixDSym * GetMeasuredCovariance() { return fMeasuredCovariance; };
00065   TMatrixD    * GetTrackDerivatives() { return fTrackDerivatives; };
00066   TMatrixD    * GetAlignmentDerivatives() { return fAlignmentDerivatives; };
00067   TVectorD    * GetTrackPrediction() { return fTrackPrediction; };
00068 
00069   ClassDef(AlignEvent, 1); // Alignment event
00070 };
00071 
00072 #endif