/[PAMELA software]/DarthVader/TrackerLevel2/inc/TrkLevel2.h
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/inc/TrkLevel2.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Fri May 19 13:15:52 2006 UTC revision 1.4 by pam-fi, Fri Jun 30 09:48:15 2006 UTC
# Line 8  Line 8 
8  #include <TObject.h>  #include <TObject.h>
9  #include <TObjArray.h>  #include <TObjArray.h>
10  #include <TClonesArray.h>  #include <TClonesArray.h>
11    
12  #include <TrkStruct.h>  #include <TrkStruct.h>
13    
14    // z-coordinate of track state-vector reference-plane
15    #define ZINI 23.5  
16    // upper and lower (mechanical) z-coordinate of the tracker
17    #define ZTRKUP 22.29
18    #define ZTRKDW -22.22
19    
20    
21  /**  /**
22   * \brief Class to describe, by points, a particle trajectory in the apparatus.   * \brief Class to describe, by points, a particle trajectory in the apparatus.
23   *   *
# Line 26  class Trajectory : public TObject{ Line 34  class Trajectory : public TObject{
34      float* x;   ///< x coordinates      float* x;   ///< x coordinates
35      float* y;   ///< y coordinates      float* y;   ///< y coordinates
36      float* z;   ///< z coordinates      float* z;   ///< z coordinates
37        float* thx; ///< x projected angle
38        float* thy; ///< y projected angle
39        float* tl;  ///< track length
40    
41      Trajectory(){npoint=1; x = new float; y = new float; z = new float; return;};      Trajectory();
42      Trajectory(int n);      Trajectory(int n);
43      Trajectory(int n, float* pz);      Trajectory(int n, float* pz);
44      void Dump();      void Dump();
45    
46        float GetLength(){float l=0; for(int i=0; i<npoint;i++)l=l+tl[i]; return l;};
47        float GetLength(int,int);
48    
49      ClassDef(Trajectory,1);      ClassDef(Trajectory,1);
50    
51  };  };
# Line 47  class TrkTrack : public TObject { Line 61  class TrkTrack : public TObject {
61    
62  private:  private:
63    
64        int   seqno;           ///<stored track sequential number
65        int   image;           ///<sequential number of track-image
66    
67  public:  public:
68    
69    
70      float al[5];           ///<TRACK STATE VECTOR      float al[5];           ///<TRACK STATE VECTOR
71      float coval[5][5];     ///<covariance matrix      float coval[5][5];     ///<covariance matrix
72      int   xgood[6];        ///<mask of included x planes      int   xgood[6];        ///<mask of included x planes
# Line 66  public: Line 84  public:
84      float ayv[6];          ///<calculated angles (deg) on y view      float ayv[6];          ///<calculated angles (deg) on y view
85      float dedx_x[6];       ///<signal in MIP (scaled to 300 micrometer)      float dedx_x[6];       ///<signal in MIP (scaled to 300 micrometer)
86      float dedx_y[6];       ///<signal in MIP (scaled to 300 micrometer)      float dedx_y[6];       ///<signal in MIP (scaled to 300 micrometer)
87      int   image;           ///<flag to tag track-images  
88    
89      TrkTrack();      TrkTrack();
90      TrkTrack(const TrkTrack&);      TrkTrack(const TrkTrack&);
91    
92      void Dump();      void Dump();
93    
94        Int_t  GetSeqNo(){return seqno;}        ///< Returns the track sequential number
95        Int_t  GetImageSeqNo(){return image;}   ///< Returns the track image sequential number
96      Bool_t HasImage(){return !(image==-1);} ///< Returns true if the track has an image      Bool_t HasImage(){return !(image==-1);} ///< Returns true if the track has an image
97          int DoTrack(Trajectory* t);                     ///< Evaluates the trajectory in the apparatus.      int DoTrack(Trajectory* t);                         ///< Evaluates the trajectory in the apparatus.
98          float BdL(){return 0;};                                 ///< Evaluates the integral of B*dL along the track.      int DoTrack2(Trajectory* t);                        ///< Evaluates the trajectory in the apparatus.
99        float BdL(){return 0;};                                     ///< Evaluates the integral of B*dL along the track.
100      Int_t GetNX(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=xgood[i]; return n;};      Int_t GetNX(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=xgood[i]; return n;};
101      Int_t GetNY(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=ygood[i]; return n;};      Int_t GetNY(){Int_t n=0; for(Int_t i=0; i<6; i++)n+=ygood[i]; return n;};
102        Int_t GetNtot(){return GetNX()+GetNY();};
103      Float_t GetRigidity();      Float_t GetRigidity();
104      Float_t GetDeflection();      Float_t GetDeflection();
105      Float_t GetDEDX();      Float_t GetDEDX();
106    
107      TrkTrack* GetTrkTrack(){return this;};      TrkTrack* GetTrkTrack(){return this;};
108    
109        friend class TrkLevel2;
110    
111      ClassDef(TrkTrack,1);      ClassDef(TrkTrack,1);
112    
113  };  };
# Line 107  public: Line 131  public:
131    
132      void Dump();      void Dump();
133    
134        friend class TrkLevel2;
135    
136      ClassDef(TrkSinglet,1);      ClassDef(TrkSinglet,1);
137    
138  };  };
# Line 140  class TrkLevel2 : public TObject { Line 166  class TrkLevel2 : public TObject {
166      TrkLevel2();      TrkLevel2();
167  //    TrkLevel2(cTrkLevel2 *);  //    TrkLevel2(cTrkLevel2 *);
168    
169      int ntrk(){return Track->GetEntries();}     ///< number of stored track      int ntrk() {return Track->GetEntries();}     ///< number of stored track
170      int nclsx(){return SingletX->GetEntries();} ///< number of x singlets      int nclsx(){return SingletX->GetEntries();} ///< number of x singlets
171      int nclsy(){return SingletY->GetEntries();} ///< number of y singlets      int nclsy(){return SingletY->GetEntries();} ///< number of y singlets
172    
173      void Dump();      void Dump();
174      void FillCommonVar(cTrkLevel2 *);      void FillCommonVar(cTrkLevel2 *);
175      void Clear();      void Clear();
176          void LoadField(TString);      void LoadField(TString);
177    
178      TrkTrack *GetStoredTrack(int i);      TrkTrack     *GetStoredTrack(int i);
179      TClonesArray *GetTracks();        Int_t         GetSeqNo(Int_t i)  {return (((TrkTrack *)Track->At(i))->seqno);}; ///< Returns track sequential number
180        TClonesArray *GetTracks_Chi2Sorted();
181      int GetNTracks(){return this->GetTracks()->GetEntries();}      TClonesArray *GetTracks_NFitSorted();
182      TrkTrack* GetTrack(int i);      TClonesArray *GetTracks();
183    
184    //    int       GetNTracks(){return this->GetTracks()->GetEntries();}
185            Int_t     GetNTracks();
186            TrkTrack* GetTrack(int i);
187      TrkTrack* GetTrackImage(int i);      TrkTrack* GetTrackImage(int i);
188    
189      TrkLevel2* GetTrkLevel2(){return this;}      TrkLevel2*    GetTrkLevel2(){return this;}
190        TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array
191        
192      ClassDef(TrkLevel2,1);      ClassDef(TrkLevel2,1);
193    
194  };  };
195    
196    
197    
   
198  #endif  #endif

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23