/[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.2 - (hide annotations) (download)
Wed Jun 4 07:57:01 2014 UTC (10 years, 6 months ago) by pam-ts
Branch: MAIN
Changes since 1.1: +139 -50 lines
File MIME type: text/plain
New tracking algorythm implementation (extended to up to 2 calorimeter planes and with level1 cleaning for nuclei)

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     ExtTrack( TrkTrack& t){ Set(t); }
93     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     void Set( TrkTrack& t){Set(t,0);}; ///< Set from TrkTrack object
110     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    
148     Int_t GetClusterX_Multiplicity(int ip);
149     Int_t GetClusterY_Multiplicity(int ip);
150     Int_t GetClusterX_MaxStrip(int ip);
151     Int_t GetClusterY_MaxStrip(int ip);
152    
153     Float_t GetRigidity();
154    
155     ClassDef(ExtTrack,1);
156 pam-fi 1.1
157     };
158    
159     #endif

  ViewVC Help
Powered by ViewVC 1.1.23