/[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.1.1 by mocchiut, Fri May 19 13:15:52 2006 UTC revision 1.7 by pam-fi, Fri Aug 4 08:18:05 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    #include <TRefArray.h>
12    
13  #include <TrkStruct.h>  #include <TrkStruct.h>
14    
15    // z-coordinate of track state-vector reference-plane
16    #define ZINI 23.5  
17    // upper and lower (mechanical) z-coordinate of the tracker
18    //#define ZTRKUP 22.29
19    //#define ZTRKDW -22.22
20    // (mechanical) z-coordinate of the tracker planes
21    #define ZTRK6 -22.23
22    #define ZTRK5 -13.32
23    #define ZTRK4 -4.42
24    #define ZTRK3 4.48
25    #define ZTRK2 13.38
26    #define ZTRK1 22.28
27    // (mechanical) x/y-coordinates of magnet cavity
28    #define XTRKL -8.1
29    #define XTRKR  8.1
30    #define YTRKL -6.6
31    #define YTRKR  6.6
32    
33  /**  /**
34   * \brief Class to describe, by points, a particle trajectory in the apparatus.   * \brief Class to describe, by points, a particle trajectory in the apparatus.
35   *   *
# Line 26  class Trajectory : public TObject{ Line 46  class Trajectory : public TObject{
46      float* x;   ///< x coordinates      float* x;   ///< x coordinates
47      float* y;   ///< y coordinates      float* y;   ///< y coordinates
48      float* z;   ///< z coordinates      float* z;   ///< z coordinates
49        float* thx; ///< x projected angle
50        float* thy; ///< y projected angle
51        float* tl;  ///< track length
52    
53      Trajectory(){npoint=1; x = new float; y = new float; z = new float; return;};      Trajectory();
54      Trajectory(int n);      Trajectory(int n);
55      Trajectory(int n, float* pz);      Trajectory(int n, float* pz);
56      void Dump();      void Dump();
57    
58        float GetLength(){float l=0; for(int i=0; i<npoint;i++)l=l+tl[i]; return l;};
59        float GetLength(int,int);
60    
61      ClassDef(Trajectory,1);      ClassDef(Trajectory,1);
62    
63  };  };
# Line 47  class TrkTrack : public TObject { Line 73  class TrkTrack : public TObject {
73    
74  private:  private:
75    
76        int   seqno;           ///<stored track sequential number
77        int   image;           ///<sequential number of track-image
78    
79  public:  public:
80    
81    
82      float al[5];           ///<TRACK STATE VECTOR      float al[5];           ///<TRACK STATE VECTOR
83      float coval[5][5];     ///<covariance matrix      float coval[5][5];     ///<covariance matrix
84      int   xgood[6];        ///<mask of included x planes      int   xgood[6];        ///<mask of included x planes
# Line 66  public: Line 96  public:
96      float ayv[6];          ///<calculated angles (deg) on y view      float ayv[6];          ///<calculated angles (deg) on y view
97      float dedx_x[6];       ///<signal in MIP (scaled to 300 micrometer)      float dedx_x[6];       ///<signal in MIP (scaled to 300 micrometer)
98      float dedx_y[6];       ///<signal in MIP (scaled to 300 micrometer)      float dedx_y[6];       ///<signal in MIP (scaled to 300 micrometer)
99      int   image;           ///<flag to tag track-images  
100    
101      TrkTrack();      TrkTrack();
102      TrkTrack(const TrkTrack&);      TrkTrack(const TrkTrack&);
103    
104      void Dump();      void Dump();
105    
106        Int_t  GetSeqNo(){return seqno;}        ///< Returns the track sequential number
107        Int_t  GetImageSeqNo(){return image;}   ///< Returns the track image sequential number
108      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
109          int DoTrack(Trajectory* t);                     ///< Evaluates the trajectory in the apparatus.      int DoTrack(Trajectory* t);                         ///< Evaluates the trajectory in the apparatus.
110          float BdL(){return 0;};                                 ///< Evaluates the integral of B*dL along the track.      int DoTrack2(Trajectory* t);                        ///< Evaluates the trajectory in the apparatus.
111        float BdL(){return 0;};                                     ///< Evaluates the integral of B*dL along the track.
112      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;};
113      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;};
114        Int_t GetNtot(){return GetNX()+GetNY();};
115      Float_t GetRigidity();      Float_t GetRigidity();
116      Float_t GetDeflection();      Float_t GetDeflection();
117      Float_t GetDEDX();      Float_t GetDEDX();
118    
119      TrkTrack* GetTrkTrack(){return this;};      TrkTrack* GetTrkTrack(){return this;};
120    
121        friend class TrkLevel2;
122    
123      ClassDef(TrkTrack,1);      ClassDef(TrkTrack,1);
124    
125  };  };
# Line 107  public: Line 143  public:
143    
144      void Dump();      void Dump();
145    
146        friend class TrkLevel2;
147    
148      ClassDef(TrkSinglet,1);      ClassDef(TrkSinglet,1);
149    
150  };  };
# Line 125  public: Line 163  public:
163  class TrkLevel2 : public TObject {  class TrkLevel2 : public TObject {
164    
165   private:   private:
166            
167    //      TRefArray    *PhysicalTrack;  ///< physical tracks (no image) -
168            
169   public:   public:
170    
   
   
171      Int_t good2;      Int_t good2;
172      Int_t crc[12];      Int_t crc[12];
173    
# Line 140  class TrkLevel2 : public TObject { Line 178  class TrkLevel2 : public TObject {
178      TrkLevel2();      TrkLevel2();
179  //    TrkLevel2(cTrkLevel2 *);  //    TrkLevel2(cTrkLevel2 *);
180    
181      int ntrk(){return Track->GetEntries();}     ///< number of stored track      int ntrk() {return Track->GetEntries();}    ///< number of stored track
182      int nclsx(){return SingletX->GetEntries();} ///< number of x singlets      int nclsx(){return SingletX->GetEntries();} ///< number of x singlets
183      int nclsy(){return SingletY->GetEntries();} ///< number of y singlets      int nclsy(){return SingletY->GetEntries();} ///< number of y singlets
184    
185      void Dump();      void Dump();
186      void FillCommonVar(cTrkLevel2 *);      void SetFromLevel2Struct(cTrkLevel2 *);
187        void GetLevel2Struct(cTrkLevel2 *) const;
188      void Clear();      void Clear();
189          void LoadField(TString);      void LoadField(TString);
190        Float_t GetZTrk(Int_t);
191      TrkTrack *GetStoredTrack(int i);      Float_t GetXTrkLeft(){return XTRKL;};
192      TClonesArray *GetTracks();        Float_t GetXTrkRight(){return XTRKR;};
193        Float_t GetYTrkLeft(){return YTRKL;};
194      int GetNTracks(){return this->GetTracks()->GetEntries();}      Float_t GetYTrkRight(){return YTRKR;};
195      TrkTrack* GetTrack(int i);      
196        TrkSinglet   *GetSingletX(int);
197        TrkSinglet   *GetSingletY(int);
198        
199        TrkTrack     *GetStoredTrack(int i);
200        Int_t         GetSeqNo(Int_t i)  {return (((TrkTrack *)Track->At(i))->seqno);}; ///< Returns track sequential number
201    //    TClonesArray *GetTracks_Chi2Sorted();
202    //    TClonesArray *GetTracks_NFitSorted();
203    //    TClonesArray *GetTracks();
204            TRefArray *GetTracks_NFitSorted();
205            TRefArray *GetTracks(){return this->GetTracks_NFitSorted();};
206    
207    //    int       GetNTracks(){return this->GetTracks()->GetEntries();}
208            Int_t     GetNTracks();
209            TrkTrack* GetTrack(int i);
210      TrkTrack* GetTrackImage(int i);      TrkTrack* GetTrackImage(int i);
211    
212      TrkLevel2* GetTrkLevel2(){return this;}      TrkLevel2*    GetTrkLevel2(){return this;}
213        TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array
214        
215      ClassDef(TrkLevel2,1);      ClassDef(TrkLevel2,1);
216    
217  };  };
218    
219    
220    
   
221  #endif  #endif

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23