From: loizides Date: Wed, 16 Jun 2004 11:25:06 +0000 (+0000) Subject: Code violations. X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=47e75a3e1eb3b28e1f3a885bcdab3fd364bd1695;p=u%2Fmrichter%2FAliRoot.git Code violations. --- diff --git a/HLT/src/AliL3ConfMapPoint.cxx b/HLT/src/AliL3ConfMapPoint.cxx index 09e22b68133..97543017b6b 100644 --- a/HLT/src/AliL3ConfMapPoint.cxx +++ b/HLT/src/AliL3ConfMapPoint.cxx @@ -76,9 +76,9 @@ void AliL3ConfMapPoint::Reset() //Reset this point. SetUsage(kFALSE); SetS(0); - nextRowHit = 0; - nextVolumeHit=0; - nextTrackHit=0; + fNextRowHit = 0; + fNextVolumeHit=0; + fNextTrackHit=0; } void AliL3ConfMapPoint::Setup(AliL3Vertex *vertex) @@ -97,36 +97,36 @@ void AliL3ConfMapPoint::Setup(AliL3Vertex *vertex) return; } -void AliL3ConfMapPoint::SetIntPoint(const Double_t in_x,const Double_t in_y,const Double_t in_z, - const Double_t in_x_err,const Double_t in_y_err,const Double_t in_z_err) +void AliL3ConfMapPoint::SetIntPoint(const Double_t inx,const Double_t iny,const Double_t inz, + const Double_t inxerr,const Double_t inyerr,const Double_t inzerr) { // Defines a new interaction point. This point is needed to calculate // the conformal coordinates. - SetXt(in_x); - SetYt(in_y); - SetZt(in_z); - SetXterr(in_x_err); - SetYterr(in_y_err); - SetZterr(in_z_err); + SetXt(inx); + SetYt(iny); + SetZt(inz); + SetXterr(inxerr); + SetYterr(inyerr); + SetZterr(inzerr); return; } -void AliL3ConfMapPoint::SetAllCoord(const AliL3ConfMapPoint *preceding_hit) +void AliL3ConfMapPoint::SetAllCoord(const AliL3ConfMapPoint *precedinghit) { // Sets the interaction point, the shifted coordinates, and the conformal mapping coordinates. // These values are calculated from the interaction point of the given cluster which should be a // already found cluster on the same track. - if (this == preceding_hit) { - SetIntPoint(preceding_hit->GetX(), preceding_hit->GetY(), preceding_hit->GetZ(), - preceding_hit->GetXerr(), preceding_hit->GetYerr(), preceding_hit->GetZerr()); + if (this == precedinghit) { + SetIntPoint(precedinghit->GetX(), precedinghit->GetY(), precedinghit->GetZ(), + precedinghit->GetXerr(), precedinghit->GetYerr(), precedinghit->GetZerr()); } else { - SetIntPoint(preceding_hit->GetXt(), preceding_hit->GetYt(), preceding_hit->GetZt(), - preceding_hit->GetXterr(), preceding_hit->GetYterr(), preceding_hit->GetZterr()); + SetIntPoint(precedinghit->GetXt(), precedinghit->GetYt(), precedinghit->GetZt(), + precedinghit->GetXterr(), precedinghit->GetYterr(), precedinghit->GetZterr()); } SetShiftedCoord(); diff --git a/HLT/src/AliL3ConfMapPoint.h b/HLT/src/AliL3ConfMapPoint.h index eec4de2de0f..44a73529c1a 100644 --- a/HLT/src/AliL3ConfMapPoint.h +++ b/HLT/src/AliL3ConfMapPoint.h @@ -1,7 +1,7 @@ // @(#) $Id$ -#ifndef ALIL3_ConfMapPoint -#define ALIL3_ConfMapPoint +#ifndef ALIL3ConfMapPointH +#define ALIL3ConfMapPointH #include "AliL3RootTypes.h" @@ -63,6 +63,15 @@ class AliL3ConfMapPoint { Double_t fPhi; // angle phi Double_t fEta; // pseudorapidity + AliL3ConfMapPoint *fNextVolumeHit; //! + AliL3ConfMapPoint *fNextRowHit; //! + AliL3ConfMapPoint *fNextTrackHit; //! Linked chain of points in a track + Short_t fPhiIndex; //phi index + Short_t fEtaIndex; //eta index + Double_t fXYChi2; //xy chi + Double_t fSZChi2; //z chi + Int_t fMCTrackID[3]; //MClabel of tracks, may overlap + static Bool_t fgDontMap; //flag to switch off mapping public: @@ -71,19 +80,8 @@ class AliL3ConfMapPoint { virtual ~AliL3ConfMapPoint(); void Reset(); - Bool_t ReadHits(AliL3SpacePointData* hits ); //! - - AliL3ConfMapPoint *nextVolumeHit; //! - AliL3ConfMapPoint *nextRowHit; //! + Bool_t ReadHits(AliL3SpacePointData* hits ); - AliL3ConfMapPoint *nextTrackHit; //! Linked chain of points in a track - Short_t phiIndex; //phi index - Short_t etaIndex; //eta index - - Double_t xyChi2; //xy chi - Double_t szChi2; //z chi - Int_t fMCTrackID[3]; //MClabel of tracks, may overlap - // getter Double_t GetX() const {return fx;} Double_t GetY() const {return fy;} @@ -98,8 +96,6 @@ class AliL3ConfMapPoint { Double_t GetZWeight() const {return fWz;} Float_t GetS() const {return fs;} - //AliL3ConfMapTrack *GetTrack(TClonesArray *tracks) const; - Bool_t GetUsage() const {return fUsed;} Double_t GetPhi() const {return fPhi;} Double_t GetEta() const {return fEta;} @@ -109,75 +105,87 @@ class AliL3ConfMapPoint { Double_t GetXprimeerr() const {return fXprimeerr;} Double_t GetYprimeerr() const {return fYprimeerr;} - Double_t GetXt() const { return fXt; } - Double_t GetYt() const { return fYt; } - Double_t GetZt() const { return fZt; } - Double_t GetXterr() const { return fXterr; } - Double_t GetYterr() const { return fYterr; } - Double_t GetZterr() const { return fZterr; } + Double_t GetXt() const {return fXt;} + Double_t GetYt() const {return fYt;} + Double_t GetZt() const {return fZt;} + Double_t GetXterr() const {return fXterr;} + Double_t GetYterr() const {return fYterr;} + Double_t GetZterr() const {return fZterr;} - Double_t GetXv() const { return fXv; } - Double_t GetYv() const { return fYv; } - Double_t GetZv() const { return fZv; } - Double_t GetXverr() const { return fXverr; } - Double_t GetYverr() const { return fYverr; } - Double_t GetZverr() const { return fZverr; } + Double_t GetXv() const {return fXv;} + Double_t GetYv() const {return fYv;} + Double_t GetZv() const {return fZv;} + Double_t GetXverr() const {return fXverr;} + Double_t GetYverr() const {return fYverr;} + Double_t GetZverr() const {return fZverr;} Int_t GetHitNumber() const {return fHitNumber;} Int_t GetNextHitNumber() const {return fNextHitNumber;} Int_t GetTrackNumber() const {return fTrackNumber;} //Int_t const *GetMCTrackID() const {return fMCTrackID;} + AliL3ConfMapPoint* GetNextVolumeHit(){return fNextVolumeHit;} + AliL3ConfMapPoint* GetNextRowHit(){return fNextRowHit;} + AliL3ConfMapPoint* GetNextTrackHit(){return fNextTrackHit;} + Short_t GetPhiIndex() const {return fPhiIndex;} + Short_t GetEtaIndex() const {return fEtaIndex;} + Double_t GetXYChi2() const {return fXYChi2;} + Double_t GetSZChi2() const {return fSZChi2;} + //Int_t fMCTrackID[3]; //MClabel of tracks, may overlap + // setter + void SetNextVolumeHit(AliL3ConfMapPoint* p){fNextVolumeHit=p;} + void SetNextRowHit(AliL3ConfMapPoint* p){fNextRowHit=p;} + void SetNextTrackHit(AliL3ConfMapPoint* p){fNextTrackHit=p;} + + void SetPhiIndex(Short_t p){fPhiIndex=p;} + void SetEtaIndex(Short_t p){fEtaIndex=p;} + void SetXYChi2(Double_t d) {fXYChi2=d;} + void SetSZChi2(Double_t d) {fSZChi2=d;} + static void SetDontMap(Bool_t b){fgDontMap=b;} - void SetX(Double_t f) {fx=f;} - void SetY(Double_t f) {fy=f;} - void SetZ(Double_t f) {fz=f;} - void SetXerr(Double_t f) {fxerr=f;} - void SetYerr(Double_t f) {fyerr=f;} - void SetZerr(Double_t f) {fzerr=f;} - void SetPadRow(Int_t f) {fPadrow=f;} - void SetSector(Int_t f) {fSector=f;} - void SetMCTrackID(Int_t f,Int_t g,Int_t h) {fMCTrackID[0] = f; fMCTrackID[1]=g; fMCTrackID[2]=h;} - - void SetXYWeight(Float_t f) {fWxy = f;} - void SetZWeight(Float_t f) {fWz = f;} - void SetS(Float_t f) {fs = f;} - - void SetUsage(Bool_t f) {fUsed=f;} - - void SetPhi(Double_t f) { fPhi = f; } - void SetEta(Double_t f) { fEta = f; } - - void SetXprime(Double_t f) { fXprime = f; } - void SetYprime(Double_t f) { fYprime = f; } - void SetXprimeerr(Double_t f) { fXprimeerr = f; } - void SetYprimeerr(Double_t f) { fYprimeerr = f; } - - void SetXt(Double_t f) { fXt = f; } - void SetYt(Double_t f) { fYt = f; } - void SetZt(Double_t f) { fZt = f; } - void SetXterr(Double_t f) { fXterr = f; } - void SetYterr(Double_t f) { fYterr = f; } - void SetZterr(Double_t f) { fZterr = f; } - - void SetXv(Double_t f) { fXv = f; } - void SetYv(Double_t f) { fYv = f; } - void SetZv(Double_t f) { fZv = f; } - void SetXverr(Double_t f) { fXverr = f; } - void SetYverr(Double_t f) { fYverr = f; } - void SetZverr(Double_t f) { fZverr = f; } - - void SetHitNumber(Int_t f) {fHitNumber=f;} - void SetTrackNumber(Int_t f) {fTrackNumber=f;} - void SetNextHitNumber(Int_t f) {fNextHitNumber=f;} + void SetX(Double_t f){fx=f;} + void SetY(Double_t f){fy=f;} + void SetZ(Double_t f){fz=f;} + void SetXerr(Double_t f){fxerr=f;} + void SetYerr(Double_t f){fyerr=f;} + void SetZerr(Double_t f){fzerr=f;} + void SetPadRow(Int_t f){fPadrow=f;} + void SetSector(Int_t f){fSector=f;} + void SetMCTrackID(Int_t f,Int_t g,Int_t h){fMCTrackID[0] = f; fMCTrackID[1]=g; fMCTrackID[2]=h;} + + void SetXYWeight(Float_t f){fWxy = f;} + void SetZWeight(Float_t f){fWz = f;} + void SetS(Float_t f){fs = f;} + void SetUsage(Bool_t f){fUsed=f;} + void SetPhi(Double_t f ){fPhi = f;} + void SetEta(Double_t f){fEta = f;} + void SetXprime(Double_t f){fXprime = f;} + void SetYprime(Double_t f){fYprime = f;} + void SetXprimeerr(Double_t f){fXprimeerr = f;} + void SetYprimeerr(Double_t f){fYprimeerr = f;} + void SetXt(Double_t f){fXt = f;} + void SetYt(Double_t f){fYt = f;} + void SetZt(Double_t f){fZt = f;} + void SetXterr(Double_t f){fXterr = f;} + void SetYterr(Double_t f){fYterr = f;} + void SetZterr(Double_t f){fZterr = f;} + void SetXv(Double_t f){fXv = f;} + void SetYv(Double_t f){fYv = f;} + void SetZv(Double_t f){fZv = f;} + void SetXverr(Double_t f){fXverr = f;} + void SetYverr(Double_t f){fYverr = f;} + void SetZverr(Double_t f){fZverr = f;} + void SetHitNumber(Int_t f){fHitNumber=f;} + void SetTrackNumber(Int_t f){fTrackNumber=f;} + void SetNextHitNumber(Int_t f){fNextHitNumber=f;} void Setup(AliL3Vertex *vertex);// does the usual setup in the right order - void SetAngles();// calculate spherical angles and set values - void SetIntPoint(const Double_t in_x = 0.,const Double_t in_y = 0., - const Double_t in_z = 0.,const Double_t in_x_err = 0., - const Double_t in_y_err = 0., const Double_t in_z_err = 0.); + void SetAngles(); // calculate spherical angles and set values + void SetIntPoint(const Double_t inx = 0.,const Double_t iny = 0., + const Double_t inz = 0.,const Double_t inxerr = 0., + const Double_t inyerr = 0., const Double_t inzerr = 0.); //-> set interaction point void SetShiftedCoord();// set shifted coordinates void SetAllCoord(const AliL3ConfMapPoint *hit);// set conformal mapping coordinates in respect to given hit diff --git a/HLT/src/AliL3ConfMapTrack.cxx b/HLT/src/AliL3ConfMapTrack.cxx index 1de688efbff..341baec0fc2 100644 --- a/HLT/src/AliL3ConfMapTrack.cxx +++ b/HLT/src/AliL3ConfMapTrack.cxx @@ -48,8 +48,8 @@ void AliL3ConfMapTrack::DeleteCandidate() while(curHit != 0) { - nextHit = (AliL3ConfMapPoint*)curHit->nextTrackHit; - curHit->nextTrackHit = 0; + nextHit = (AliL3ConfMapPoint*)curHit->GetNextTrackHit(); + curHit->SetNextTrackHit(0); curHit = nextHit; } @@ -125,7 +125,7 @@ void AliL3ConfMapTrack::UpdateParam(AliL3ConfMapPoint *thisHit) if(GetNHits()==1) fFirstHit = thisHit; else - ((AliL3ConfMapPoint*)fLastHit)->nextTrackHit = thisHit; + ((AliL3ConfMapPoint*)fLastHit)->SetNextTrackHit(thisHit); fLastHit = thisHit; diff --git a/HLT/src/AliL3ConfMapTrack.h b/HLT/src/AliL3ConfMapTrack.h index ec303329f11..199f5574718 100644 --- a/HLT/src/AliL3ConfMapTrack.h +++ b/HLT/src/AliL3ConfMapTrack.h @@ -24,7 +24,7 @@ class AliL3ConfMapTrack :public AliL3Track { void DeleteCandidate(); void StartLoop() {fCurrentHit = fFirstHit;} - void GetNextHit() {fCurrentHit = ((AliL3ConfMapPoint*)fCurrentHit)->nextTrackHit;} + void GetNextHit() {fCurrentHit = ((AliL3ConfMapPoint*)fCurrentHit)->GetNextTrackHit();} Int_t LoopDone() const {return fCurrentHit != 0;} // setter diff --git a/HLT/src/AliL3ConfMapper.cxx b/HLT/src/AliL3ConfMapper.cxx index e9f167e1b8e..3c71ae54162 100644 --- a/HLT/src/AliL3ConfMapper.cxx +++ b/HLT/src/AliL3ConfMapper.cxx @@ -192,17 +192,17 @@ void AliL3ConfMapper::SetPointers() continue; //Get indexes: - thisHit->phiIndex=(Int_t)((thisHit->GetPhi()-fPhiMin)/phiSlice +1); + thisHit->SetPhiIndex((Int_t)((thisHit->GetPhi()-fPhiMin)/phiSlice +1)); - if(thisHit->phiIndex<1 || thisHit->phiIndex>fNumPhiSegment) + if(thisHit->GetPhiIndex()<1 || thisHit->GetPhiIndex()>fNumPhiSegment) { //cout << "Phiindex: " << thisHit->phiIndex << " " << thisHit->GetPhi() << endl; fPhiHitsOutOfRange++; continue; } - thisHit->etaIndex=(Int_t)((thisHit->GetEta()-fEtaMin)/etaSlice + 1); - if(thisHit->etaIndex<1 || thisHit->etaIndex>fNumEtaSegment) + thisHit->SetEtaIndex((Int_t)((thisHit->GetEta()-fEtaMin)/etaSlice + 1)); + if(thisHit->GetEtaIndex()<1 || thisHit->GetEtaIndex()>fNumEtaSegment) { //cout << "Etaindex: " << thisHit->etaIndex << " " << thisHit->GetEta() << endl; fEtaHitsOutOfRange++; @@ -210,12 +210,13 @@ void AliL3ConfMapper::SetPointers() } localcounter++; - volumeIndex = (localrow-fRowMin)*fNumPhiEtaSegmentPlusOne+thisHit->phiIndex*fNumEtaSegmentPlusOne+thisHit->etaIndex; + volumeIndex = (localrow-fRowMin)*fNumPhiEtaSegmentPlusOne + + thisHit->GetPhiIndex()*fNumEtaSegmentPlusOne+thisHit->GetEtaIndex(); if(fVolume[volumeIndex].first == NULL) fVolume[volumeIndex].first = (void *)thisHit; else - ((AliL3ConfMapPoint *)fVolume[volumeIndex].last)->nextVolumeHit=thisHit; + ((AliL3ConfMapPoint *)fVolume[volumeIndex].last)->SetNextVolumeHit(thisHit); fVolume[volumeIndex].last = (void *)thisHit; @@ -223,7 +224,7 @@ void AliL3ConfMapper::SetPointers() if(fRow[(localrow-fRowMin)].first == NULL) fRow[(localrow-fRowMin)].first = (void *)thisHit; else - ((AliL3ConfMapPoint *)(fRow[(localrow-fRowMin)].last))->nextRowHit = thisHit; + ((AliL3ConfMapPoint *)(fRow[(localrow-fRowMin)].last))->SetNextRowHit(thisHit); fRow[(localrow-fRowMin)].last = (void *)thisHit; } @@ -403,7 +404,7 @@ void AliL3ConfMapper::ClusterLoop() if(fRow[(rowsegm-fRowMin)].first && ((AliL3ConfMapPoint*)fRow[(rowsegm-fRowMin)].first)->GetPadRow() < fRowMin + 1) break; - for(hit = (AliL3ConfMapPoint*)fRow[(rowsegm-fRowMin)].first; hit!=0; hit=hit->nextRowHit) + for(hit = (AliL3ConfMapPoint*)fRow[(rowsegm-fRowMin)].first; hit!=0; hit=hit->GetNextRowHit()) { if(hit->GetUsage() == true) continue; @@ -510,13 +511,12 @@ void AliL3ConfMapper::CreateTrack(AliL3ConfMapPoint *hit) //keep total chi: Double_t lxyChi2 = track->GetChiSq1()-track->GetChiSq2(); xyChi2 += lxyChi2; - closesthit->xyChi2 = lxyChi2; + closesthit->SetXYChi2(lxyChi2); //update track length: - //track->fLength = closesthit->GetS(); track->SetLength(closesthit->GetS()); szChi2 += track->GetChiSq2(); - closesthit->szChi2 = track->GetChiSq2(); + closesthit->SetSZChi2(track->GetChiSq2()); track->UpdateParam(closesthit); trackhitnumber[track->GetNumberOfPoints()-1] = closesthit->GetHitNumber(); @@ -615,7 +615,7 @@ AliL3ConfMapPoint *AliL3ConfMapper::GetNextNeighbor(AliL3ConfMapPoint *starthit, //loop over subsegments, in the order defined above. for(Int_t i=0; i<9; i++) { - subphisegm = starthit->phiIndex + loopphi[i]; + subphisegm = starthit->GetPhiIndex() + loopphi[i]; if(subphisegm < 0 || subphisegm >= fNumPhiSegment) continue; @@ -628,7 +628,7 @@ AliL3ConfMapPoint *AliL3ConfMapper::GetNextNeighbor(AliL3ConfMapPoint *starthit, */ //loop over sub eta segments - subetasegm = starthit->etaIndex + loopeta[i]; + subetasegm = starthit->GetEtaIndex() + loopeta[i]; if(subetasegm < 0 || subetasegm >=fNumEtaSegment) continue;//segment exceeds bounds->skip it @@ -644,7 +644,7 @@ AliL3ConfMapPoint *AliL3ConfMapper::GetNextNeighbor(AliL3ConfMapPoint *starthit, } for(hit = (AliL3ConfMapPoint*)fVolume[volumeIndex].first; - hit!=0; hit = hit->nextVolumeHit) + hit!=0; hit = hit->GetNextVolumeHit()) { if(!hit->GetUsage())