/[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.7 by pam-fi, Fri Aug 4 08:18:05 2006 UTC revision 1.13 by pam-fi, Tue Nov 14 16:20:53 2006 UTC
# Line 9  Line 9 
9  #include <TObjArray.h>  #include <TObjArray.h>
10  #include <TClonesArray.h>  #include <TClonesArray.h>
11  #include <TRefArray.h>  #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 55  class Trajectory : public TObject{ Line 57  class Trajectory : public TObject{
57      Trajectory(int n, float* pz);      Trajectory(int n, float* pz);
58      void Dump();      void Dump();
59    
60        int DoTrack2(float* al);
61      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;};
62      float GetLength(int,int);      float GetLength(int,int);
63    
64      ClassDef(Trajectory,1);      ClassDef(Trajectory,2);
65    
66  };  };
67  /**  /**
# Line 76  private: Line 79  private:
79      int   seqno;           ///<stored track sequential number      int   seqno;           ///<stored track sequential number
80      int   image;           ///<sequential number of track-image      int   image;           ///<sequential number of track-image
81    
82            
83  public:  public:
84    
85    //      TRef clx[6];
86    //      TRef cly[6];
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 89  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 101  public: Line 110  public:
110      TrkTrack();      TrkTrack();
111      TrkTrack(const TrkTrack&);      TrkTrack(const TrkTrack&);
112    
113        ~TrkTrack(){Delete();};
114            
115      void Dump();      void Dump();
116        void Clear();
117        void Delete();
118            
119      Int_t  GetSeqNo(){return seqno;}        ///< Returns the track sequential number      Int_t  GetSeqNo(){return seqno;}        ///< Returns the track sequential number
120      Int_t  GetImageSeqNo(){return image;}   ///< Returns the track image sequential number      Int_t  GetImageSeqNo(){return image;}   ///< Returns the track image sequential number
121      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 115  public: Line 128  public:
128      Float_t GetRigidity();      Float_t GetRigidity();
129      Float_t GetDeflection();      Float_t GetDeflection();
130      Float_t GetDEDX();      Float_t GetDEDX();
131        Float_t GetDEDX(Int_t ip){if( !(xgood[ip]+ygood[ip]) ) return 0; return (dedx_x[ip]+dedx_y[ip])/(xgood[ip]+ygood[ip]);};
132        // sono un'imbecille... assegno xm e ym anche quando si tratta di un singolo
133        // non posso quindi usare xm e ym per dire se una vista e` inclusa nel fit o no
134    /*      Bool_t XGood(int ip){ return xm[ip] != -100.;};
135            Bool_t YGood(int ip){ return ym[ip] != -100.;};*/
136        Bool_t XGood(int ip){ return xgood[ip]==1;};
137        Bool_t YGood(int ip){ return ygood[ip]==1;};
138    
139        void SetMeasure(double *xmeas, double *ymeas, double *zmeas);
140        void SetResolution(double *rx, double *ry);
141        void SetGood(int *xg, int *yg);
142        void LoadField(TString s);
143        void Fit(double pfixed, int& fail, int iprint);
144        void FitReset();
145        
146        TrkCluster *GetClusterX(int ip){TrkCluster *pt = (TrkCluster*)(clx->At(ip)); return pt;};
147        TrkCluster *GetClusterY(int ip){TrkCluster *pt = (TrkCluster*)(cly->At(ip)); return pt;};
148        
149      TrkTrack* GetTrkTrack(){return this;};      TrkTrack* GetTrkTrack(){return this;};
150    
151      friend class TrkLevel2;      friend class TrkLevel2;
152    
153      ClassDef(TrkTrack,1);      ClassDef(TrkTrack,2);
154    
155  };  };
156  /**  /**
# Line 131  public: Line 161  public:
161  class TrkSinglet : public TObject {  class TrkSinglet : public TObject {
162    
163  private:  private:
164            
165    
166  public:  public:
167            
168            TRef cls;
169    
170      int plane;       ///<plane      int plane;       ///<plane
171      float coord[2];  ///<coordinate (on sensor 1 and 2)      float coord[2];  ///<coordinate (on sensor 1 and 2)
# Line 142  public: Line 175  public:
175      TrkSinglet(const TrkSinglet&);      TrkSinglet(const TrkSinglet&);
176    
177      void Dump();      void Dump();
178            
179        TrkCluster *GetCluster(){TrkCluster *pt = (TrkCluster*)cls.GetObject(); return pt;};
180    
181      friend class TrkLevel2;      friend class TrkLevel2;
182    
183      ClassDef(TrkSinglet,1);      ClassDef(TrkSinglet,2);
184    
185  };  };
186    
# Line 168  class TrkLevel2 : public TObject { Line 203  class TrkLevel2 : public TObject {
203                    
204   public:   public:
205    
206      Int_t good2;          Int_t         good[12];       ///< event status
207      Int_t crc[12];  //      Int_t good2;
208    //    Int_t crc[12];
209    
210      TClonesArray *Track;        ///< fitted tracks      TClonesArray *Track;        ///< fitted tracks
211      TClonesArray *SingletX;     ///< x singlets      TClonesArray *SingletX;     ///< x singlets
# Line 177  class TrkLevel2 : public TObject { Line 213  class TrkLevel2 : public TObject {
213    
214      TrkLevel2();      TrkLevel2();
215  //    TrkLevel2(cTrkLevel2 *);  //    TrkLevel2(cTrkLevel2 *);
216        ~TrkLevel2(){Delete();};
217            
218        void Clear();
219        void Delete();
220        
221      int ntrk() {return Track->GetEntries();}    ///< number of stored track      int ntrk() {return Track->GetEntries();}    ///< number of stored track
222      int nclsx(){return SingletX->GetEntries();} ///< number of x singlets      int nclsx(){return SingletX->GetEntries();} ///< number of x singlets
223      int nclsy(){return SingletY->GetEntries();} ///< number of y singlets      int nclsy(){return SingletY->GetEntries();} ///< number of y singlets
224    
225      void Dump();      void Dump();
226      void SetFromLevel2Struct(cTrkLevel2 *);      void SetFromLevel2Struct(cTrkLevel2 *);
227        void SetFromLevel2Struct(cTrkLevel2 *, TrkLevel1 *);
228      void GetLevel2Struct(cTrkLevel2 *) const;      void GetLevel2Struct(cTrkLevel2 *) const;
     void Clear();  
229      void LoadField(TString);      void LoadField(TString);
230      Float_t GetZTrk(Int_t);      Float_t GetZTrk(Int_t);
231      Float_t GetXTrkLeft(){return XTRKL;};      Float_t GetXTrkLeft(){return XTRKL;};
# Line 201  class TrkLevel2 : public TObject { Line 241  class TrkLevel2 : public TObject {
241  //    TClonesArray *GetTracks_Chi2Sorted();  //    TClonesArray *GetTracks_Chi2Sorted();
242  //    TClonesArray *GetTracks_NFitSorted();  //    TClonesArray *GetTracks_NFitSorted();
243  //    TClonesArray *GetTracks();  //    TClonesArray *GetTracks();
244          TRefArray *GetTracks_NFitSorted();      TRefArray *GetTracks_NFitSorted();
245          TRefArray *GetTracks(){return this->GetTracks_NFitSorted();};      TRefArray *GetTracks(){return this->GetTracks_NFitSorted();};
246        
247  //    int       GetNTracks(){return this->GetTracks()->GetEntries();}  //    int       GetNTracks(){return this->GetTracks()->GetEntries();}
248          Int_t     GetNTracks();      Int_t     GetNTracks();
249          TrkTrack* GetTrack(int i);      TrkTrack* GetTrack(int i);
250      TrkTrack* GetTrackImage(int i);      TrkTrack* GetTrackImage(int i);
251        
252      TrkLevel2*    GetTrkLevel2(){return this;}      TrkLevel2*    GetTrkLevel2(){return this;}
253      TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array      TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array
254            
255      ClassDef(TrkLevel2,1);      ClassDef(TrkLevel2,2);
256    
257  };  };
258    
   
   
259  #endif  #endif

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

  ViewVC Help
Powered by ViewVC 1.1.23