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

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.23