--- DarthVader/TrackerLevel2/inc/TrkLevel2.h 2007/03/29 17:06:39 1.23 +++ DarthVader/TrackerLevel2/inc/TrkLevel2.h 2007/05/14 11:03:04 1.25 @@ -11,15 +11,11 @@ #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 @@ -73,6 +69,14 @@ * A track is defined by the measured coordinates associated to it, the * track status vector, plus other quantities. * A track may have an "image", due to the ambiguity in the y view. + * + * Cluster flags: xgood[6], ygood[6] + * + * xgood/ygood = +/- 0lsccccccc + * | |||------- ID (1-7483647) of the included cluster + * | ||-------- sensor number (1,2 - increasing y) + * | |--------- ladder number (1,2,3 - increasing x) + * |------------- does-not/does include bad strips */ // ================================================================== class TrkTrack : public TObject { @@ -81,23 +85,20 @@ int seqno; /// 0;}; - Bool_t YGood(int ip){ return ygood[ip]> 0;}; - + Float_t GetDEDX(int); + Float_t GetDEDX(int,int); + Int_t GetLeverArmX(); + Int_t GetLeverArmY(); 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 Fit(double pfixed, int& fail, int iprint, int froml1); + void Fit(double pfixed, int& fail, int iprint){ Fit(pfixed,fail,iprint,0); }; void FitReset(); void SetTrackingMode(int trackmode); void SetPrecisionFactor(double fact); void SetStepMin(int istepmin); + void EvaluateClusterPositions(); + void FillMiniStruct(cMini2track&); void SetFromMiniStruct(cMini2track*); - TrkCluster *GetClusterX(int ip); - TrkCluster *GetClusterY(int ip); + Int_t GetClusterX_ID(int ip); + Int_t GetClusterY_ID(int ip); + Int_t GetLadder(int ip); + Int_t GetSensor(int ip); + Bool_t XGood(int ip){ return GetClusterX_ID(ip)!=-1; }; + Bool_t YGood(int ip){ return GetClusterY_ID(ip)!=-1; }; + void ResetXGood(int ip){ xgood[ip]=0; }; + void ResetYGood(int ip){ ygood[ip]=0; }; + void SetXGood(int ip, int clid, int is); + void SetYGood(int ip, int clid, int is); + + Bool_t BadClusterX(int ip){ return IsBad(ip,0); }; + Bool_t BadClusterY(int ip){ return IsBad(ip,1); }; + + Bool_t SaturatedClusterX(int ip){ return IsSaturated(ip,0); }; + Bool_t SaturatedClusterY(int ip){ return IsSaturated(ip,1); }; - Int_t GetClusterX_ID(int ip){return xgood[ip];}; - Int_t GetClusterY_ID(int ip){return ygood[ip];}; - TrkTrack* GetTrkTrack(){return this;}; friend class TrkLevel2; - ClassDef(TrkTrack,2); + ClassDef(TrkTrack,3); }; /** @@ -179,11 +194,9 @@ public: - TRef cls; - int plane; ///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); @@ -273,7 +289,7 @@ TrkLevel2* GetTrkLevel2(){return this;} TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array - ClassDef(TrkLevel2,2); + ClassDef(TrkLevel2,3); };