From 3afdba215827a61954a8135efc327c729661805c Mon Sep 17 00:00:00 2001 From: martinez Date: Thu, 8 Apr 2004 09:56:37 +0000 Subject: [PATCH] Removing coding convention violations mainly due to public data member --- MUON/AliMUONRawCluster.cxx | 118 ++++++++++++++++++++++++++++++++++--- MUON/AliMUONRawCluster.h | 47 +++++++++++---- 2 files changed, 145 insertions(+), 20 deletions(-) diff --git a/MUON/AliMUONRawCluster.cxx b/MUON/AliMUONRawCluster.cxx index 293afc4d70b..843e2f3501e 100644 --- a/MUON/AliMUONRawCluster.cxx +++ b/MUON/AliMUONRawCluster.cxx @@ -15,8 +15,12 @@ /* $Id$ */ +// Class for the MUON RecPoint +// It contains the propeorties of the physics cluters found in the tracking chambers +// RawCluster contains also the information from the both cathode of the chambers. + + #include "AliMUONRawCluster.h" -#include #include ClassImp(AliMUONRawCluster); @@ -43,7 +47,7 @@ AliMUONRawCluster::AliMUONRawCluster() { fNcluster[0]=fNcluster[1]=-1; fGhost=0; } - +//____________________________________________________ Int_t AliMUONRawCluster::Compare(const TObject *obj) const { /* @@ -62,9 +66,8 @@ Int_t AliMUONRawCluster::Compare(const TObject *obj) const else return 0; } - -Int_t AliMUONRawCluster:: -BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto) +//____________________________________________________ +Int_t AliMUONRawCluster::BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto) { // Find object using a binary search. Array must first have been sorted. // Search can be limited by setting upto to desired index. @@ -77,7 +80,7 @@ BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto) } return low; } - +//____________________________________________________ void AliMUONRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Float_t *yarray,Float_t *qarray, Int_t ntr) { // @@ -138,8 +141,8 @@ void AliMUONRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Floa } - -Int_t AliMUONRawCluster::PhysicsContribution() +//____________________________________________________ +Int_t AliMUONRawCluster::PhysicsContribution() const { // Evaluate physics contribution to cluster Int_t iPhys=0; @@ -159,6 +162,8 @@ Int_t AliMUONRawCluster::PhysicsContribution() } } + + //____________________________________________________ void AliMUONRawCluster::DumpIndex(void) { @@ -171,3 +176,100 @@ void AliMUONRawCluster::DumpIndex(void) printf("\n"); } } + +//____________________________________________________ +Int_t AliMUONRawCluster::AddCharge(Int_t i, Int_t Q) +{ + if (i==0 || i==1) { + fQ[i]+=Q; + return 1; + } + else return 0; +} +//____________________________________________________ +Int_t AliMUONRawCluster::AddX(Int_t i, Float_t X) +{ + if (i==0 || i==1) { + fX[i]+=X; + return 1; + } + else return 0; +} +//____________________________________________________ +Int_t AliMUONRawCluster::AddY(Int_t i, Float_t Y) +{ + if (i==0 || i==1) { + fY[i]+=Y; + return 1; + } + else return 0; +} +//____________________________________________________ +Int_t AliMUONRawCluster::AddZ(Int_t i, Float_t Z) +{ + if (i==0 || i==1) { + fZ[i]+=Z; + return 1; + } + else return 0; +} +//____________________________________________________ +Int_t AliMUONRawCluster::GetCharge(Int_t i) const +{ + if (i==0 || i==1) return fQ[i]; + else return 99999; +} +//____________________________________________________ +Float_t AliMUONRawCluster::GetX(Int_t i) const +{ + if (i==0 || i==1) return fX[i]; + else return 99999.; +} +//____________________________________________________ +Float_t AliMUONRawCluster::GetY(Int_t i) const +{ + if (i==0 || i==1) return fY[i]; + else return 99999.; +} +//____________________________________________________ +Float_t AliMUONRawCluster::GetZ(Int_t i) const +{ + if (i==0 || i==1) return fZ[i]; + else return 99999.; +} +//____________________________________________________ +Int_t AliMUONRawCluster::SetCharge(Int_t i, Int_t Q) +{ + if (i==0 || i==1) { + fQ[i]=Q; + return 1; + } + else return 0; +} +//____________________________________________________ +Int_t AliMUONRawCluster::SetX(Int_t i, Float_t X) +{ + if (i==0 || i==1) { + fX[i]=X; + return 1; + } + else return 0; +} +//____________________________________________________ +Int_t AliMUONRawCluster::SetY(Int_t i, Float_t Y) +{ + if (i==0 || i==1) { + fY[i]=Y; + return 1; + } + else return 0; +} +//____________________________________________________ +Int_t AliMUONRawCluster::SetZ(Int_t i, Float_t Z) +{ + if (i==0 || i==1) { + fZ[i]=Z; + return 1; + } + else return 0; +} diff --git a/MUON/AliMUONRawCluster.h b/MUON/AliMUONRawCluster.h index 67c1951e5cd..70546dc96e0 100644 --- a/MUON/AliMUONRawCluster.h +++ b/MUON/AliMUONRawCluster.h @@ -6,19 +6,52 @@ /* $Id$ */ +// Class for the MUON RecPoint +// It contains the propeorties of the physics cluters found in the tracking chambers +// RawCluster contains also the information from the both cathode of the chambers. + + class TArrayF; #include #include // because of inline funtion GetRadius class AliMUONRawCluster : public TObject { + public: + AliMUONRawCluster(); + virtual ~AliMUONRawCluster() { } + Float_t GetRadius(Int_t i) {return TMath::Sqrt(fX[i]*fX[i]+fY[i]*fY[i]);} + Bool_t IsSortable() const {return kTRUE;} + Int_t Compare(const TObject *obj) const; + Int_t PhysicsContribution() const; + static Int_t BinarySearch(Float_t r, TArrayF ccord, Int_t from, Int_t upto); + static void SortMin(Int_t *idx,Float_t *xdarray, Float_t *xarray, Float_t *yarray, Float_t *qarray,Int_t ntr); + void DumpIndex(); - Int_t fTracks[3]; //labels of overlapped tracks + Int_t AddCharge(Int_t i, Int_t Q); + Int_t AddX(Int_t i, Float_t X); + Int_t AddY(Int_t i, Float_t Y); + Int_t AddZ(Int_t i, Float_t Z); + + Int_t GetCharge(Int_t i) const; + Float_t GetX(Int_t i) const; + Float_t GetY(Int_t i) const; + Float_t GetZ(Int_t i) const; + + Int_t SetCharge(Int_t i,Int_t Q); + Int_t SetX(Int_t i, Float_t X); + Int_t SetY(Int_t i, Float_t Y); + Int_t SetZ(Int_t i, Float_t Z); + +private: Int_t fQ[2] ; // Q of cluster (in ADC counts) Float_t fX[2] ; // X of cluster Float_t fY[2] ; // Y of cluster Float_t fZ[2] ; // Z of cluster + +public: + Int_t fTracks[3]; //labels of overlapped tracks Int_t fPeakSignal[2]; // Peak signal Int_t fIndexMap[50][2]; // indeces of digits Int_t fOffsetMap[50][2]; // Emmanuel special @@ -33,17 +66,7 @@ public: // 1 both (true and ghost) satify // charge chi2 compatibility // 2 none give satisfactory chi2 - public: - AliMUONRawCluster(); - virtual ~AliMUONRawCluster() {} - Float_t GetRadius(Int_t i) {return TMath::Sqrt(fX[i]*fX[i]+fY[i]*fY[i]);} - Bool_t IsSortable() const {return kTRUE;} - Int_t Compare(const TObject *obj) const; - Int_t PhysicsContribution(); - static Int_t BinarySearch(Float_t r, TArrayF ccord, Int_t from, Int_t upto); - static void SortMin(Int_t *idx,Float_t *xdarray, Float_t *xarray, - Float_t *yarray, Float_t *qarray,Int_t ntr); - void DumpIndex(); + ClassDef(AliMUONRawCluster,1) //Cluster class for MUON }; -- 2.43.0