--- DarthVader/TrackerLevel2/inc/TrkLevel2.h 2008/10/22 15:17:32 1.37 +++ DarthVader/TrackerLevel2/inc/TrkLevel2.h 2014/10/15 08:45:51 1.47 @@ -15,14 +15,14 @@ #include // z-coordinate of track state-vector reference-plane -#define ZINI 23.5 +#define ZINI 23.5 ///< z-coordinate of track state-vector reference-plane. // (mechanical) z-coordinate of the tracker planes -#define ZTRK6 -22.22 -#define ZTRK5 -13.31 -#define ZTRK4 -4.41 -#define ZTRK3 4.49 -#define ZTRK2 13.39 -#define ZTRK1 22.29 +#define ZTRK6 -22.23 //-22.22 //Aprile 2014... trovata differenza con mech_pos.dat +#define ZTRK5 -13.32 //-13.31 // ...speriamo bene... no comment +#define ZTRK4 -4.42//-4.41 +#define ZTRK3 4.48//4.49 +#define ZTRK2 13.38//13.39 +#define ZTRK1 22.28//22.29 // magnet cavity dimensions #define ZMAGNHIGH 21.83 #define ZMAGNLOW -21.83 @@ -67,12 +67,17 @@ Trajectory(); Trajectory(int n); Trajectory(int n, float* pz); - ~Trajectory(){Delete();}; + ~Trajectory(){Delete();} void Dump(); void Delete(); - int DoTrack2(float* al); - float GetLength(){float l=0; for(int i=0; i0 ? 1./sqrt(coval[4][4]) : 0.); }; Float_t GetEffectiveAngle(int ip, int iv); @@ -180,7 +200,7 @@ void SetGood(int *xg, int *yg); void LoadField(TString s); void Fit(double pfixed, int& fail, int iprint, int froml1); - void Fit(double pfixed, int& fail, int iprint){ Fit(pfixed,fail,iprint,0); }; + void Fit(double pfixed, int& fail, int iprint){ Fit(pfixed,fail,iprint,0); } void FitReset(); void SetTrackingMode(int trackmode); void SetPrecisionFactor(double fact); @@ -188,42 +208,47 @@ void SetDeltaB(int id, double db); Bool_t IsInsideCavity(float); - Bool_t IsInsideCavity(){ return IsInsideCavity(0.); }; - Bool_t IsInsideAcceptance(); + Bool_t IsInsideCavity(){ return IsInsideCavity(0.); } + Bool_t IsInsideAcceptance(float); + Bool_t IsInsideAcceptance(){ return IsInsideAcceptance(0.); } + Bool_t IsInsideGFSurface(const char*,float); + Bool_t IsInsideGFSurface(const char* surf){ return IsInsideGFSurface(surf,0.); } Bool_t EvaluateClusterPositions(); void FillMiniStruct(cMini2track&); void SetFromMiniStruct(cMini2track*); + void FillMiniStruct(){ extern cMini2track track_; FillMiniStruct(track_); }; + void SetFromMiniStruct(){extern cMini2track track_; SetFromMiniStruct(&track_);}; 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 ResetXGoo(int ip){ xgood[ip]=0; }; - void ResetYGood(int ip){ ygood[ip]=0; }; + 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); */ void SetXGood(int ip, int clid, int il, int is, bool bad); void SetYGood(int ip, int clid, int il, int is, bool bad); - void SetXGood(int ip, int clid, int il, int is){ SetXGood(ip,clid,il,is,false); }; - void SetYGood(int ip, int clid, int il, int is){ SetYGood(ip,clid,il,is,false); }; + void SetXGood(int ip, int clid, int il, int is){ SetXGood(ip,clid,il,is,false); } + void SetYGood(int ip, int clid, int il, int is){ SetYGood(ip,clid,il,is,false); } - Bool_t BadClusterX(int ip){ return IsBad(ip,0); }; - Bool_t BadClusterY(int ip){ return IsBad(ip,1); }; + 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_Multiplicity(int ip){ return (Int_t)(multmaxx[ip]/10000); }; - Int_t GetClusterY_Multiplicity(int ip){ return (Int_t)(multmaxy[ip]/10000); }; - Int_t GetClusterX_MaxStrip(int ip){ return (Int_t)(multmaxx[ip]%10000); }; - Int_t GetClusterY_MaxStrip(int ip){ return (Int_t)(multmaxy[ip]%10000); }; - Float_t GetClusterX_Seed(int ip){ return seedx[ip]; }; - Float_t GetClusterY_Seed(int ip){ return seedy[ip]; }; + Bool_t SaturatedClusterX(int ip){ return IsSaturated(ip,0); } + Bool_t SaturatedClusterY(int ip){ return IsSaturated(ip,1); } + + Int_t GetClusterX_Multiplicity(int ip){ return (Int_t)(multmaxx[ip]/10000); } + Int_t GetClusterY_Multiplicity(int ip){ return (Int_t)(multmaxy[ip]/10000); } + Int_t GetClusterX_MaxStrip(int ip){ return (Int_t)(multmaxx[ip]%10000); } + Int_t GetClusterY_MaxStrip(int ip){ return (Int_t)(multmaxy[ip]%10000); } + Float_t GetClusterX_Seed(int ip){ return seedx[ip]; } + Float_t GetClusterY_Seed(int ip){ return seedy[ip]; } /* Float_t GetClusterX_oordinatePU(int ip); */ /* Float_t GetClusterY_CoordinatePU(int ip); */ @@ -234,18 +259,18 @@ Int_t GetNColumns(); Float_t GetDEDX_max(int ip, int iv); - Float_t GetDEDX_max(int iv){ return GetDEDX_max(-1,iv); }; - Float_t GetDEDX_max(){ return GetDEDX_max(-1,-1); }; + Float_t GetDEDX_max(int iv){ return GetDEDX_max(-1,iv); } + Float_t GetDEDX_max(){ return GetDEDX_max(-1,-1); } Float_t GetDEDX_min(int ip, int iv); - Float_t GetDEDX_min(int iv){ return GetDEDX_min(-1,iv); }; - Float_t GetDEDX_min(){ return GetDEDX_min(-1,-1); }; + Float_t GetDEDX_min(int iv){ return GetDEDX_min(-1,iv); } + Float_t GetDEDX_min(){ return GetDEDX_min(-1,-1); } Float_t GetResidual_max(int ip, int iv); - Float_t GetResidual_max(int iv){ return GetResidual_max(-1,iv); }; - Float_t GetResidual_max(){ return GetResidual_max(-1,-1); }; + Float_t GetResidual_max(int iv){ return GetResidual_max(-1,iv); } + Float_t GetResidual_max(){ return GetResidual_max(-1,-1); } Float_t GetResidual_av(int ip, int iv); - Float_t GetResidual_av(int iv){ return GetResidual_av(-1,iv); }; - Float_t GetResidual_av(){ return GetResidual_av(-1,-1); }; + Float_t GetResidual_av(int iv){ return GetResidual_av(-1,iv); } + Float_t GetResidual_av(){ return GetResidual_av(-1,-1); } Int_t GetClusterX_Multiplicity_max(); Int_t GetClusterX_Multiplicity_min(); @@ -255,11 +280,11 @@ Float_t GetClusterX_Seed_min(); Float_t GetClusterY_Seed_min(); - TrkTrack* GetTrkTrack(){return this;}; + TrkTrack* GetTrkTrack(){return this;} friend class TrkLevel2; - ClassDef(TrkTrack,5); + ClassDef(TrkTrack,6); }; /** @@ -281,18 +306,18 @@ TrkSinglet(); TrkSinglet(const TrkSinglet&); - ~TrkSinglet(){Delete();}; + ~TrkSinglet(){Delete();} void Dump(); void Clear(); - void Clear(Option_t *option){Clear();}; + void Clear(Option_t *option){Clear();} void Delete(){Clear();}; Float_t GetSignal(){return fabs(sgnl);} - Bool_t IsSaturated(){return (sgnl<0); }; + Bool_t IsSaturated(){return (sgnl<0); } - Bool_t IsBad() { return multmax<=0; }; - Int_t GetCluster_Multiplicity(){ return (Int_t)(abs(multmax)/10000); }; - Int_t GetCluster_MaxStrip() { return (Int_t)(abs(multmax)%10000); }; + Bool_t IsBad() { return multmax<=0; } + Int_t GetCluster_Multiplicity(){ return (Int_t)(abs(multmax)/10000); } + Int_t GetCluster_MaxStrip() { return (Int_t)(abs(multmax)%10000); } friend class TrkLevel2; @@ -373,13 +398,16 @@ TrkLevel2(); // TrkLevel2(cTrkLevel2 *); - ~TrkLevel2(){Delete();}; + ~TrkLevel2(){Delete();} void Clear(); - void Clear(Option_t *option){Clear();}; + void Clear(Option_t *option){Clear();} void Delete(); void Set(); - int UnpackError(){ for(int i=0; i<12; i++)if(StatusCheck(i,0x12))return 1; return 0;}; + void SetTrackArray(TClonesArray *track);///GetEntries();} ///< number of stored track int nclsx(){return SingletX->GetEntries();} ///< number of x singlets @@ -387,19 +415,19 @@ void Dump(); void SetFromLevel2Struct(cTrkLevel2 *, TrkLevel1 *); - void SetFromLevel2Struct(cTrkLevel2 *s2){ SetFromLevel2Struct(s2, NULL); }; - void SetFromLevel2Struct(TrkLevel1 *l1) { SetFromLevel2Struct(&level2event_, l1); }; - void SetFromLevel2Struct() { SetFromLevel2Struct(&level2event_); }; + 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* v){return TrkParams::GetBX(v);};///< Bx (kGauss) - float GetBY(float* v){return TrkParams::GetBY(v);};///< By (kGauss) - float GetBZ(float* v){return TrkParams::GetBZ(v);};///< Bz (kGauss) + float GetBX(float* v){return TrkParams::GetBX(v);} ///< Bx (kGauss) + float GetBY(float* v){return TrkParams::GetBY(v);} ///< By (kGauss) + float GetBZ(float* v){return TrkParams::GetBZ(v);} ///< Bz (kGauss) Float_t GetZTrk(Int_t); - Float_t GetXTrkLeft(){return XMAGNLOW;}; - Float_t GetXTrkRight(){return XMAGNHIGH;}; - Float_t GetYTrkLeft(){return YMAGNLOW;}; - Float_t GetYTrkRight(){return YMAGNHIGH;}; + Float_t GetXTrkLeft(){return XMAGNLOW;} + Float_t GetXTrkRight(){return XMAGNHIGH;} + Float_t GetYTrkLeft(){return YMAGNLOW;} + Float_t GetYTrkRight(){return YMAGNHIGH;} Bool_t IsMaskedVK(int,int); Bool_t GetVKMask(int,int); @@ -409,22 +437,20 @@ TrkSinglet *GetSingletY(int); TrkTrack *GetStoredTrack(int i); - Int_t GetSeqNo(Int_t i) {return (((TrkTrack *)Track->At(i))->seqno);}; ///< Returns track sequential number + Int_t GetSeqNo(Int_t i) {return (((TrkTrack *)Track->At(i))->seqno);} ///< Returns track sequential number TRefArray *GetTracks_NFitSorted(); - TRefArray *GetTracks(){return this->GetTracks_NFitSorted();}; + TRefArray *GetTracks(){return this->GetTracks_NFitSorted();} Int_t GetNTracks(); TrkTrack* GetTrack(int i); TrkTrack* GetTrackImage(int i); - TrkLevel2* GetTrkLevel2(){return this;} - TClonesArray* GetTrackArray(){return Track;};///< returns pointer to the track array - + TrkLevel2* GetTrkLevel2(){return this;} void StatusDump(int view); Bool_t StatusCheck(int view, int flagmask); - ClassDef(TrkLevel2,3); + ClassDef(TrkLevel2,4); };