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

Annotation of /DarthVader/TrackerLevel2/inc/ExtTrack.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Wed Oct 15 08:45:51 2014 UTC (10 years, 1 month ago) by pam-ts
Branch: MAIN
CVS Tags: v10REDr01, v10RED
Changes since 1.5: +6 -4 lines
File MIME type: text/plain
*** empty log message ***

1 pam-fi 1.1 /**
2     * \file ExtTrack.h
3     * \author Elena Vannuccini
4     */
5     #ifndef exttrack_h
6     #define exttrack_h
7    
8     #include <TrkLevel2.h>
9 pam-ts 1.2 #include <TrkParams.h>
10    
11    
12     /**
13     * \brief Struct to pass mini2 track parameters to F77 routines
14     */
15     #define NPLANEMAX 56
16    
17     struct cMiniExtTrack {
18     double al[5];
19     double xm[NPLANEMAX],ym[NPLANEMAX],zm[NPLANEMAX];
20     double xm_a[NPLANEMAX],ym_a[NPLANEMAX],zm_a[NPLANEMAX];
21     double xm_b[NPLANEMAX],ym_b[NPLANEMAX],zm_b[NPLANEMAX];
22     double resx[NPLANEMAX],resy[NPLANEMAX];
23     double tailx[NPLANEMAX],taily[NPLANEMAX];
24     double xgood[NPLANEMAX],ygood[NPLANEMAX];
25     double dedxtrk_x[NPLANEMAX];
26     double dedxtrk_y[NPLANEMAX];
27     double zini;
28     double pfixed;
29     double chi2;
30     double xv[NPLANEMAX],yv[NPLANEMAX],zv[NPLANEMAX];
31     double axv[NPLANEMAX],ayv[NPLANEMAX];
32     double cov[5][5];
33     double fact;
34     int nstep;
35     int idcand;
36     int trackmode;
37     int istepmin;
38     int nplanes;
39    
40     };
41    
42     extern "C" {
43    
44     extern struct cMiniExtTrack exttrack_;
45     void miniext_(int*,int*,int*);
46     void guessext_();
47    
48     }
49    
50 pam-fi 1.1
51     class ExtTrack : public TObject {
52    
53     private:
54    
55     public:
56    
57    
58 pam-ts 1.2 float zini;
59     float al[5]; ///<TRACK STATE VECTOR
60     float coval[5][5]; ///<covariance matrix
61     float chi2;
62     int nstep;
63     int nplanes;
64     int* xgood ; //[nplanes]
65     int* ygood ; //[nplanes]
66     int* multmaxx; //[nplanes]
67     int* multmaxy; //[nplanes]
68     float* xm ; //[nplanes]
69     float* ym ; //[nplanes]
70     float* zm ; //[nplanes]
71     float* xma ; //[nplanes]
72     float* yma ; //[nplanes]
73     float* zma ; //[nplanes]
74     float* xmb ; //[nplanes]
75     float* ymb ; //[nplanes]
76     float* zmb ; //[nplanes]
77     float* resx ; //[nplanes]
78     float* resy ; //[nplanes]
79     float* xv ; //[nplanes]
80     float* yv ; //[nplanes]
81     float* zv ; //[nplanes]
82     float* axv ; //[nplanes]
83     float* ayv ; //[nplanes]
84     float* dedx_x ; //[nplanes]
85     float* dedx_y ; //[nplanes]
86    
87     float xGF[14]; ///<calculated x coordinates on GF reference planes
88     float yGF[14]; ///<calculated y coordinates on GF reference planes
89    
90     ExtTrack(int dim=0);
91    
92 pam-ts 1.4 ExtTrack( TrkTrack& t){SetDimension(6); Set(t); }
93 pam-ts 1.2 ExtTrack( const ExtTrack& );
94    
95     ~ExtTrack(){ Delete(); };
96    
97     void SetDimension(int dim); ///< Allocate vectors
98     void Clear(Option_t* option=""); ///< Deallocate vectors
99     void Delete(); ///< Deallocate vectors
100    
101     void Copy(ExtTrack&);
102    
103    
104     void SetMiniDefault(); ///< Set tracking alg. parameters (static)
105     void SetZ0(float zin){zini = zin; } ///< Set z-coord of reference plane
106    
107    
108     void Set( TrkTrack& t, int index); ///< Set from TrkTrack object
109 pam-ts 1.4 void Set( TrkTrack& t){ Set(t,0);}; ///< Set from TrkTrack object
110 pam-ts 1.2 void FillMiniStruct(cMiniExtTrack& track);
111     void SetFromMiniStruct(cMiniExtTrack *track);
112     void FillMiniStruct(){FillMiniStruct(exttrack_); };
113     void SetFromMiniStruct(){SetFromMiniStruct(&exttrack_);};
114    
115    
116     bool SetZ(int ip,float zmeas);
117     bool SetXY(int ip,float xmeas, float ymeas, float rx, float ry);
118     bool SetX(int ip,float xa, float xb, float ya, float yb, float res);
119     bool SetY(int ip,float xa, float xb, float ya, float yb, float res);
120     bool ResetXY(int ip);
121    
122     bool SetXGood(int ip,int icl_piu_uno=1, int il=-1, int is=-1 ); ///< same notation as TrkTrack
123     bool SetYGood(int ip,int icl_piu_uno=1, int il=-1, int is=-1 );///< same notation as TrkTrack
124    
125     void ResetFit(); ///<Reset fit variables
126     void ResetXY(); ///<Reset all measured-position variables
127     void Reset(){ ResetFit(); ResetXY(); } ///<Reset all variables
128    
129    
130    
131     void Dump();
132    
133    
134     void Fit(double pfixed, int& fail, int iprint);
135    
136     Bool_t XGood(int ip){ return GetClusterX_ID(ip)!=-1; };
137     Bool_t YGood(int ip){ return GetClusterY_ID(ip)!=-1; };
138     int GetClusterX_ID(int ip);
139     int GetClusterY_ID(int ip);
140     int GetLadder(int ip);
141     int GetSensor(int ip);
142    
143     int GetNX(){int n=0; for(int i=0; i<nplanes; i++)n+=(int)(XGood(i)); return n;};
144     int GetNY(){int n=0; for(int i=0; i<nplanes; i++)n+=(int)(YGood(i)); return n;};
145     int GetNXY(){int n=0; for(int i=0; i<nplanes; i++)n+=(int)(YGood(i)&&XGood(i)); return n;};
146     int GetNtot(){return GetNX()+GetNY();};
147 pam-ts 1.6 int GetNhit(){int n=0; for(int i=0; i<nplanes; i++)n+=(int)(YGood(i)||XGood(i)); return n;};
148 pam-ts 1.2
149 mocchiut 1.3 Float_t GetDEDX();
150     Float_t GetDEDX(int ip);
151     Float_t GetDEDX(int ip,int iv);
152    
153 pam-ts 1.2 Int_t GetClusterX_Multiplicity(int ip);
154     Int_t GetClusterY_Multiplicity(int ip);
155     Int_t GetClusterX_MaxStrip(int ip);
156     Int_t GetClusterY_MaxStrip(int ip);
157    
158     Float_t GetRigidity();
159 mocchiut 1.3 Float_t GetDeflection();
160 pam-ts 1.6 Float_t GetMDR(){return (coval[4][4]>0 ? 1./sqrt(coval[4][4]) : 0.); };
161 pam-ts 1.2
162 pam-ts 1.4 //dsa implementare
163     /* Bool_t IsSaturated(int,int); */
164     /* Bool_t IsSaturated(int); */
165     /* Bool_t IsSaturated(); */
166     /* Bool_t IsBad(int,int); */
167 pam-ts 1.6 Int_t GetLeverArmXY();
168     Int_t GetLeverArmX();
169     Int_t GetLeverArmY();
170 mocchiut 1.5 Float_t GetChi2X(); //EM
171     Float_t GetChi2Y(); //EM
172 pam-ts 1.4 /* Bool_t IsInsideCavity(float); */
173     /* Bool_t IsInsideCavity(){ return IsInsideCavity(0.); } */
174 mocchiut 1.5 Bool_t IsInsideAcceptance(float); // EM
175     Bool_t IsInsideAcceptance(){ return IsInsideAcceptance(0.); } //EM
176 pam-ts 1.4 /* Bool_t IsInsideGFSurface(const char*,float); */
177     /* Bool_t IsInsideGFSurface(const char* surf){ return IsInsideGFSurface(surf,0.); } */
178     /* Bool_t BadClusterX(int ip){ return IsBad(ip,0); } */
179     /* Bool_t BadClusterY(int ip){ return IsBad(ip,1); } */
180     /* Bool_t SaturatedClusterX(int ip){ return IsSaturated(ip,0); } */
181     /* Bool_t SaturatedClusterY(int ip){ return IsSaturated(ip,1); } */
182    
183    
184    
185    
186 pam-ts 1.6 ClassDef(ExtTrack,3);
187 pam-fi 1.1
188     };
189    
190     #endif

  ViewVC Help
Powered by ViewVC 1.1.23