/[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.10 by pam-fi, Wed Oct 11 06:53:01 2006 UTC revision 1.18 by pam-fi, Fri Feb 16 14:56:00 2007 UTC
# Line 11  Line 11 
11  #include <TRefArray.h>  #include <TRefArray.h>
12  #include <TRef.h>  #include <TRef.h>
13    
14  #include <TrkStruct.h>  //#include <TrkStruct.h>
15    #include <TrkParams.h>
16  #include <TrkLevel1.h>  #include <TrkLevel1.h>
17    
18  // z-coordinate of track state-vector reference-plane  // z-coordinate of track state-vector reference-plane
# Line 55  class Trajectory : public TObject{ Line 56  class Trajectory : public TObject{
56      Trajectory();      Trajectory();
57      Trajectory(int n);      Trajectory(int n);
58      Trajectory(int n, float* pz);      Trajectory(int n, float* pz);
59        ~Trajectory(){Delete();};
60      void Dump();      void Dump();
61        void Delete();
62    
63        int DoTrack2(float* al);
64      float GetLength(){float l=0; for(int i=0; i<npoint;i++)l=l+tl[i]; return l;};      float GetLength(){float l=0; for(int i=0; i<npoint;i++)l=l+tl[i]; return l;};
65      float GetLength(int,int);      float GetLength(int,int);
66    
# Line 81  private: Line 85  private:
85                    
86  public:  public:
87    
88  //      TRef clx[6];      TRefArray *clx;
89  //      TRef cly[6];      TRefArray *cly;
         TRefArray *clx;  
         TRefArray *cly;  
90    
91      float al[5];           ///<TRACK STATE VECTOR      float al[5];           ///<TRACK STATE VECTOR
92      float coval[5][5];     ///<covariance matrix      float coval[5][5];     ///<covariance matrix
# Line 96  public: Line 98  public:
98      float resx[6];         ///<spatial resolution on X view      float resx[6];         ///<spatial resolution on X view
99      float resy[6];         ///<spatial resolution on y view      float resy[6];         ///<spatial resolution on y view
100      float chi2;            ///<chi2      float chi2;            ///<chi2
101          int   nstep;           ///<n. step      int   nstep;           ///<n. step
102          float xv[6];           ///<calculated x coordinates      float xv[6];           ///<calculated x coordinates
103      float yv[6];           ///<calculated y coordinates      float yv[6];           ///<calculated y coordinates
104      float zv[6];           ///<calculated z coordinates      float zv[6];           ///<calculated z coordinates
105      float axv[6];          ///<calculated angles (deg) on x view      float axv[6];          ///<calculated angles (deg) on x view
# Line 105  public: Line 107  public:
107      float dedx_x[6];       ///<signal in MIP (scaled to 300 micrometer)      float dedx_x[6];       ///<signal in MIP (scaled to 300 micrometer)
108      float dedx_y[6];       ///<signal in MIP (scaled to 300 micrometer)      float dedx_y[6];       ///<signal in MIP (scaled to 300 micrometer)
109    
   
110      TrkTrack();      TrkTrack();
111      TrkTrack(const TrkTrack&);      TrkTrack(const TrkTrack&);
112    
113          ~TrkTrack(){Delete();};      ~TrkTrack(){ Delete(); };
114                    
115      void Dump();      void Dump();
116          void Clear();      void Clear();
117          void Delete();      void Clear(Option_t *option){Clear();};
118                void Delete();
119        void Copy(TrkTrack&);
120    //    void Set();
121    
122      Int_t  GetSeqNo(){return seqno;}        ///< Returns the track sequential number      Int_t  GetSeqNo(){return seqno;}        ///< Returns the track sequential number
123      Int_t  GetImageSeqNo(){return image;}   ///< Returns the track image sequential number      Int_t  GetImageSeqNo(){return image;}   ///< Returns the track image sequential number
124      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
# Line 127  public: Line 131  public:
131      Float_t GetRigidity();      Float_t GetRigidity();
132      Float_t GetDeflection();      Float_t GetDeflection();
133      Float_t GetDEDX();      Float_t GetDEDX();
134          Float_t GetDEDX(Int_t ip){if( !(xgood[ip]+ygood[ip]) ) return 0; return (dedx_x[ip]+dedx_y[ip])/(xgood[ip]+ygood[ip]);};      Float_t GetDEDX(Int_t ip){if( !(xgood[ip]+ygood[ip]) ) return 0; return (dedx_x[ip]+dedx_y[ip])/(xgood[ip]+ygood[ip]);};
135          // sono un'imbecille... assegno xm e ym anche quando si tratta di un singolo      // sono un'imbecille... assegno xm e ym anche quando si tratta di un singolo
136          // non posso quindi usare xm e ym per dire se una vista e` inclusa nel fit o no      // non posso quindi usare xm e ym per dire se una vista e` inclusa nel fit o no
137  /*      Bool_t XGood(int ip){ return xm[ip] != -100.;};  /*      Bool_t XGood(int ip){ return xm[ip] != -100.;};
138          Bool_t YGood(int ip){ return ym[ip] != -100.;};*/          Bool_t YGood(int ip){ return ym[ip] != -100.;};*/
139          Bool_t XGood(int ip){ return xgood[ip]==1;};      Bool_t XGood(int ip){ return xgood[ip]==1;};
140          Bool_t YGood(int ip){ return ygood[ip]==1;};      Bool_t YGood(int ip){ return ygood[ip]==1;};
141            
142          TrkCluster *GetClusterX(int ip){TrkCluster *pt = (TrkCluster*)(clx->At(ip)); return pt;};      void SetMeasure(double *xmeas, double *ymeas, double *zmeas);
143          TrkCluster *GetClusterY(int ip){TrkCluster *pt = (TrkCluster*)(cly->At(ip)); return pt;};      void SetResolution(double *rx, double *ry);
144                void SetGood(int *xg, int *yg);
145        void LoadField(TString s);
146        void Fit(double pfixed, int& fail, int iprint);
147        void FitReset();
148    
149        void FillMiniStruct(cMini2track&);
150        void SetFromMiniStruct(cMini2track*);
151        
152        TrkCluster *GetClusterX(int ip){TrkCluster *pt = (TrkCluster*)(clx->At(ip)); return pt;};
153        TrkCluster *GetClusterY(int ip){TrkCluster *pt = (TrkCluster*)(cly->At(ip)); return pt;};
154        
155      TrkTrack* GetTrkTrack(){return this;};      TrkTrack* GetTrkTrack(){return this;};
156    
157      friend class TrkLevel2;      friend class TrkLevel2;
# Line 157  private: Line 171  private:
171    
172  public:  public:
173                    
174          TRef cls;      TRef cls;
175    
176      int plane;       ///<plane      int plane;       ///<plane
177      float coord[2];  ///<coordinate (on sensor 1 and 2)      float coord[2];  ///<coordinate (on sensor 1 and 2)
# Line 165  public: Line 179  public:
179    
180      TrkSinglet();      TrkSinglet();
181      TrkSinglet(const TrkSinglet&);      TrkSinglet(const TrkSinglet&);
182        ~TrkSinglet(){Delete();};
183    
184      void Dump();      void Dump();
185        void Clear();
186        void Clear(Option_t *option){Clear();};
187        void Delete(){Clear();};
188                    
189          TrkCluster *GetCluster(){TrkCluster *pt = (TrkCluster*)cls.GetObject(); return pt;};      TrkCluster *GetCluster(){TrkCluster *pt = (TrkCluster*)cls.GetObject(); return pt;};
190    
191      friend class TrkLevel2;      friend class TrkLevel2;
192    
# Line 190  public: Line 208  public:
208  class TrkLevel2 : public TObject {  class TrkLevel2 : public TObject {
209    
210   private:   private:
211            
 //      TRefArray    *PhysicalTrack;  ///< physical tracks (no image) -  
           
212   public:   public:
213    
214          Int_t         good[12];       ///< event status      Int_t         good[12];       ///< event status
 //      Int_t good2;  
 //    Int_t crc[12];  
215    
216      TClonesArray *Track;        ///< fitted tracks      TClonesArray *Track;        ///< fitted tracks
217      TClonesArray *SingletX;     ///< x singlets      TClonesArray *SingletX;     ///< x singlets
# Line 205  class TrkLevel2 : public TObject { Line 219  class TrkLevel2 : public TObject {
219    
220      TrkLevel2();      TrkLevel2();
221  //    TrkLevel2(cTrkLevel2 *);  //    TrkLevel2(cTrkLevel2 *);
222          ~TrkLevel2(){Delete();};      ~TrkLevel2(){Delete();};
223                    
224          void Clear();      void Clear();
225          void Delete();      void Clear(Option_t *option){Clear();};
226                void Delete();
227          int ntrk() {return Track->GetEntries();}    ///< number of stored track      void Set();
228        
229        int ntrk() {return Track->GetEntries();}    ///< number of stored track
230      int nclsx(){return SingletX->GetEntries();} ///< number of x singlets      int nclsx(){return SingletX->GetEntries();} ///< number of x singlets
231      int nclsy(){return SingletY->GetEntries();} ///< number of y singlets      int nclsy(){return SingletY->GetEntries();} ///< number of y singlets
232    
233      void Dump();      void Dump();
234      void SetFromLevel2Struct(cTrkLevel2 *);      void SetFromLevel2Struct(cTrkLevel2 *, TrkLevel1 *);
235          void SetFromLevel2Struct(cTrkLevel2 *, TrkLevel1 *);      void SetFromLevel2Struct(cTrkLevel2 *s2){ SetFromLevel2Struct(s2, NULL);          };
236          void GetLevel2Struct(cTrkLevel2 *) const;      void SetFromLevel2Struct(TrkLevel1 *l1) { SetFromLevel2Struct(&level2event_, l1); };    
237        void SetFromLevel2Struct()              { SetFromLevel2Struct(&level2event_);     };    
238        void GetLevel2Struct(cTrkLevel2 *) const;
239      void LoadField(TString);      void LoadField(TString);
240        float GetBX(float*);
241        float GetBY(float*);
242        float GetBZ(float*);
243      Float_t GetZTrk(Int_t);      Float_t GetZTrk(Int_t);
244      Float_t GetXTrkLeft(){return XTRKL;};      Float_t GetXTrkLeft(){return XTRKL;};
245      Float_t GetXTrkRight(){return XTRKR;};      Float_t GetXTrkRight(){return XTRKR;};
# Line 233  class TrkLevel2 : public TObject { Line 254  class TrkLevel2 : public TObject {
254  //    TClonesArray *GetTracks_Chi2Sorted();  //    TClonesArray *GetTracks_Chi2Sorted();
255  //    TClonesArray *GetTracks_NFitSorted();  //    TClonesArray *GetTracks_NFitSorted();
256  //    TClonesArray *GetTracks();  //    TClonesArray *GetTracks();
257          TRefArray *GetTracks_NFitSorted();      TRefArray *GetTracks_NFitSorted();
258          TRefArray *GetTracks(){return this->GetTracks_NFitSorted();};      TRefArray *GetTracks(){return this->GetTracks_NFitSorted();};
259        
260  //    int       GetNTracks(){return this->GetTracks()->GetEntries();}  //    int       GetNTracks(){return this->GetTracks()->GetEntries();}
261          Int_t     GetNTracks();      Int_t     GetNTracks();
262          TrkTrack* GetTrack(int i);      TrkTrack* GetTrack(int i);
263      TrkTrack* GetTrackImage(int i);      TrkTrack* GetTrackImage(int i);
264        
265      TrkLevel2*    GetTrkLevel2(){return this;}      TrkLevel2*    GetTrkLevel2(){return this;}
266      TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array      TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array
267            

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.23