--- DarthVader/TrackerLevel2/inc/TrkLevel2.h 2006/05/19 13:15:52 1.1.1.1 +++ DarthVader/TrackerLevel2/inc/TrkLevel2.h 2007/03/15 12:17:09 1.20 @@ -8,7 +8,30 @@ #include #include #include -#include +#include +#include + +//#include +#include +#include + +// z-coordinate of track state-vector reference-plane +#define ZINI 23.5 +// upper and lower (mechanical) z-coordinate of the tracker +//#define ZTRKUP 22.29 +//#define ZTRKDW -22.22 +// (mechanical) z-coordinate of the tracker planes +#define ZTRK6 -22.23 +#define ZTRK5 -13.32 +#define ZTRK4 -4.42 +#define ZTRK3 4.48 +#define ZTRK2 13.38 +#define ZTRK1 22.28 +// (mechanical) x/y-coordinates of magnet cavity +#define XTRKL -8.1 +#define XTRKR 8.1 +#define YTRKL -6.6 +#define YTRKR 6.6 /** * \brief Class to describe, by points, a particle trajectory in the apparatus. @@ -26,13 +49,22 @@ float* x; ///< x coordinates float* y; ///< y coordinates float* z; ///< z coordinates + float* thx; ///< x projected angle + float* thy; ///< y projected angle + float* tl; ///< track length - Trajectory(){npoint=1; x = new float; y = new float; z = new float; return;}; + Trajectory(); Trajectory(int n); Trajectory(int n, float* pz); + ~Trajectory(){Delete();}; void Dump(); + void Delete(); + + int DoTrack2(float* al); + float GetLength(){float l=0; for(int i=0; i 0;}; + Bool_t YGood(int ip){ return ygood[ip]> 0;}; + + + void SetMeasure(double *xmeas, double *ymeas, double *zmeas); + void SetResolution(double *rx, double *ry); + void SetGood(int *xg, int *yg); + void LoadField(TString s); + void Fit(double pfixed, int& fail, int iprint); + void FitReset(); + void SetTrackingMode(int trackmode); + + void FillMiniStruct(cMini2track&); + void SetFromMiniStruct(cMini2track*); + + TrkCluster *GetClusterX(int ip); + TrkCluster *GetClusterY(int ip); + + Int_t GetClusterX_ID(int ip){return xgood[ip];}; + Int_t GetClusterY_ID(int ip){return ygood[ip];}; + TrkTrack* GetTrkTrack(){return this;}; - ClassDef(TrkTrack,1); + friend class TrkLevel2; + + ClassDef(TrkTrack,2); }; /** @@ -95,8 +172,11 @@ class TrkSinglet : public TObject { private: + public: + + TRef cls; int plane; ///GetEntries();} ///< number of stored track + ~TrkLevel2(){Delete();}; + + void Clear(); + void Clear(Option_t *option){Clear();}; + void Delete(); + void Set(); + + int ntrk() {return Track->GetEntries();} ///< number of stored track int nclsx(){return SingletX->GetEntries();} ///< number of x singlets int nclsy(){return SingletY->GetEntries();} ///< number of y singlets void Dump(); - void FillCommonVar(cTrkLevel2 *); - void Clear(); - void LoadField(TString); - - TrkTrack *GetStoredTrack(int i); - TClonesArray *GetTracks(); - - int GetNTracks(){return this->GetTracks()->GetEntries();} + void SetFromLevel2Struct(cTrkLevel2 *, TrkLevel1 *); + void SetFromLevel2Struct(cTrkLevel2 *s2){ SetFromLevel2Struct(s2, NULL); }; + void SetFromLevel2Struct(TrkLevel1 *l1) { SetFromLevel2Struct(&level2event_, l1); }; + void SetFromLevel2Struct() { SetFromLevel2Struct(&level2event_); }; + void GetLevel2Struct(cTrkLevel2 *) const; + void LoadField(TString); + float GetBX(float*); + float GetBY(float*); + float GetBZ(float*); + Float_t GetZTrk(Int_t); + Float_t GetXTrkLeft(){return XTRKL;}; + Float_t GetXTrkRight(){return XTRKR;}; + Float_t GetYTrkLeft(){return YTRKL;}; + Float_t GetYTrkRight(){return YTRKR;}; + + TrkSinglet *GetSingletX(int); + TrkSinglet *GetSingletY(int); + + TrkTrack *GetStoredTrack(int i); + Int_t GetSeqNo(Int_t i) {return (((TrkTrack *)Track->At(i))->seqno);}; ///< Returns track sequential number +// TClonesArray *GetTracks_Chi2Sorted(); +// TClonesArray *GetTracks_NFitSorted(); +// TClonesArray *GetTracks(); + TRefArray *GetTracks_NFitSorted(); + TRefArray *GetTracks(){return this->GetTracks_NFitSorted();}; + +// int GetNTracks(){return this->GetTracks()->GetEntries();} + Int_t GetNTracks(); TrkTrack* GetTrack(int i); TrkTrack* GetTrackImage(int i); - - TrkLevel2* GetTrkLevel2(){return this;} - - ClassDef(TrkLevel2,1); + + TrkLevel2* GetTrkLevel2(){return this;} + TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array + + ClassDef(TrkLevel2,2); }; - - - #endif