From 2a941f4e098ff79a7f285b70f2ffd3b33e176064 Mon Sep 17 00:00:00 2001 From: hristov Date: Mon, 5 Feb 2001 14:49:32 +0000 Subject: [PATCH] Compare() declared const (R.Brun) --- ITS/AliITSHuffman.cxx | 2 +- ITS/AliITSHuffman.h | 2 +- ITS/AliITSRecPoint.h | 2 +- MUON/AliMUONHitForRec.cxx | 5 ++++- MUON/AliMUONHitForRec.h | 2 +- MUON/AliMUONRawCluster.cxx | 5 ++++- MUON/AliMUONRawCluster.h | 2 +- MUON/AliMUONSegment.cxx | 20 +++++++++++++++++++- MUON/AliMUONSegment.h | 2 +- MUON/AliMUONTrackHit.cxx | 8 +++++++- MUON/AliMUONTrackHit.h | 2 +- PHOS/AliPHOSCpvRecPoint.cxx | 2 +- PHOS/AliPHOSCpvRecPoint.h | 2 +- PHOS/AliPHOSEmcRecPoint.cxx | 2 +- PHOS/AliPHOSEmcRecPoint.h | 2 +- PHOS/AliPHOSLink.cxx | 2 +- PHOS/AliPHOSLink.h | 2 +- PHOS/AliPHOSPpsdRecPoint.cxx | 2 +- PHOS/AliPHOSPpsdRecPoint.h | 2 +- PHOS/AliPHOSRecPoint.h | 2 +- RICH/AliRICHRawCluster.cxx | 6 +++++- RICH/AliRICHRawCluster.h | 2 +- STEER/AliKalmanTrack.cxx | 2 +- STEER/AliKalmanTrack.h | 2 +- TRD/AliTRDtrack.cxx | 5 ++++- TRD/AliTRDtrack.h | 2 +- 26 files changed, 63 insertions(+), 26 deletions(-) diff --git a/ITS/AliITSHuffman.cxx b/ITS/AliITSHuffman.cxx index 644e67e8567..5e3b5a20b63 100644 --- a/ITS/AliITSHuffman.cxx +++ b/ITS/AliITSHuffman.cxx @@ -61,7 +61,7 @@ AliITSHNode& } //____________________________________________ -Int_t AliITSHNode::Compare(TObject *obj) +Int_t AliITSHNode::Compare(const TObject *obj) const { // function called by Sort method of TObjArray diff --git a/ITS/AliITSHuffman.h b/ITS/AliITSHuffman.h index 9259899ed6c..b0948dc0ed0 100644 --- a/ITS/AliITSHuffman.h +++ b/ITS/AliITSHuffman.h @@ -29,7 +29,7 @@ class AliITSHNode: public TObject { // is sortable return kTRUE; } - Int_t Compare(TObject *obj); + Int_t Compare(const TObject *obj) const; ClassDef(AliITSHNode,1) //HuffT node object for set:ITS diff --git a/ITS/AliITSRecPoint.h b/ITS/AliITSRecPoint.h index eb169606f6f..5a4c537378f 100644 --- a/ITS/AliITSRecPoint.h +++ b/ITS/AliITSRecPoint.h @@ -35,7 +35,7 @@ class AliITSRecPoint : public TObject { fQ=-fQ; } Int_t IsUsed() const {return (fQ<0) ? 1 : 0;} // checks Use condision - Int_t Compare(TObject *o) { + Int_t Compare(const TObject *o) const { //to be defined return 0; } diff --git a/MUON/AliMUONHitForRec.cxx b/MUON/AliMUONHitForRec.cxx index e1a4fc035aa..b9bdcde1007 100644 --- a/MUON/AliMUONHitForRec.cxx +++ b/MUON/AliMUONHitForRec.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.5 2001/01/26 21:46:33 morsch +Use access functions to MUONHit, ... data members. + Revision 1.4 2000/10/02 21:28:09 fca Removal of useless dependecies via forward declarations @@ -119,7 +122,7 @@ AliMUONHitForRec & AliMUONHitForRec::operator=(const AliMUONHitForRec& MUONHitFo return *this; } //__________________________________________________________________________ -Int_t AliMUONHitForRec::Compare(TObject* Hit) +Int_t AliMUONHitForRec::Compare(const TObject* Hit) const { // "Compare" function to sort with increasing chamber number. // Returns -1 (0, +1) if ChamberNumber of current HitForRec diff --git a/MUON/AliMUONHitForRec.h b/MUON/AliMUONHitForRec.h index 98deca7b047..c193b70322a 100644 --- a/MUON/AliMUONHitForRec.h +++ b/MUON/AliMUONHitForRec.h @@ -61,7 +61,7 @@ class AliMUONHitForRec : public TObject { // What is necessary for sorting TClonesArray's; sufficient too ???? Bool_t IsSortable() const { return kTRUE; } - Int_t Compare(TObject* HitForRec); // "Compare" function for sorting + Int_t Compare(const TObject* HitForRec) const; // "Compare" function for sorting protected: private: Double_t fBendingCoor; // coordinate (cm) in bending plane diff --git a/MUON/AliMUONRawCluster.cxx b/MUON/AliMUONRawCluster.cxx index 35a60df2f64..3715fdffe0f 100644 --- a/MUON/AliMUONRawCluster.cxx +++ b/MUON/AliMUONRawCluster.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.2 2000/06/15 07:58:48 morsch +Code from MUON-dev joined + Revision 1.1.2.1 2000/06/09 22:04:50 morsch Was before in DataStructures.cxx @@ -48,7 +51,7 @@ AliMUONRawCluster::AliMUONRawCluster() { fNcluster[0]=fNcluster[1]=-1; } -Int_t AliMUONRawCluster::Compare(TObject *obj) +Int_t AliMUONRawCluster::Compare(const TObject *obj) const { /* AliMUONRawCluster *raw=(AliMUONRawCluster *)obj; diff --git a/MUON/AliMUONRawCluster.h b/MUON/AliMUONRawCluster.h index c3769bdc632..c9842b5614c 100644 --- a/MUON/AliMUONRawCluster.h +++ b/MUON/AliMUONRawCluster.h @@ -34,7 +34,7 @@ public: 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(TObject *obj); + 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, diff --git a/MUON/AliMUONSegment.cxx b/MUON/AliMUONSegment.cxx index fcf369a5750..aff7f4a82b1 100644 --- a/MUON/AliMUONSegment.cxx +++ b/MUON/AliMUONSegment.cxx @@ -15,6 +15,24 @@ /* $Log$ +Revision 1.5 2001/01/08 11:01:02 gosset +Modifications used for addendum to Dimuon TDR (JP Cussonneau): +*. MaxBendingMomentum to make both a segment and a track (default 500) +*. MaxChi2 per degree of freedom to make a track (default 100) +*. MinBendingMomentum used also to make a track + and not only a segment (default 3) +*. wider roads for track search in stations 1 to 3 +*. extrapolation to actual Z instead of Z(chamber) in FollowTracks +*. in track fit: + - limits on parameters X and Y (+/-500) + - covariance matrices in double precision + - normalization of covariance matrices before inversion + - suppression of Minuit printouts +*. correction against memory leak (delete extrapHit) in FollowTracks +*. RMax to 10 degrees with Z(chamber) instead of fixed values; + RMin and Rmax cuts suppressed in NewHitForRecFromGEANT, + because useless with realistic geometry + Revision 1.4 2000/06/30 10:15:48 gosset Changes to EventReconstructor...: precision fit with multiple Coulomb scattering; @@ -105,7 +123,7 @@ AliMUONSegment & AliMUONSegment::operator=(const AliMUONSegment& MUONSegment) } //__________________________________________________________________________ -Int_t AliMUONSegment::Compare(TObject* Segment) +Int_t AliMUONSegment::Compare(const TObject* Segment) const { // "Compare" function to sort with increasing absolute value // of the "impact parameter" in bending plane. diff --git a/MUON/AliMUONSegment.h b/MUON/AliMUONSegment.h index e4c242fe8a3..ffd0233d583 100644 --- a/MUON/AliMUONSegment.h +++ b/MUON/AliMUONSegment.h @@ -79,7 +79,7 @@ class AliMUONSegment : public TObject { // What is necessary for sorting TClonesArray's; sufficient too ???? Bool_t IsSortable() const { return kTRUE; } - Int_t Compare(TObject* Segment); // "Compare" function for sorting + Int_t Compare(const TObject* Segment) const; // "Compare" function for sorting protected: private: AliMUONHitForRec* fHitForRecPtr1; // pointer to HitForRec in first chamber diff --git a/MUON/AliMUONTrackHit.cxx b/MUON/AliMUONTrackHit.cxx index e0a7f786379..ef569b7ba87 100644 --- a/MUON/AliMUONTrackHit.cxx +++ b/MUON/AliMUONTrackHit.cxx @@ -15,6 +15,12 @@ /* $Log$ +Revision 1.5 2000/07/20 12:45:27 gosset +New "EventReconstructor..." structure, + hopefully more adapted to tree/streamer. +"AliMUONEventReconstructor::RemoveDoubleTracks" + to keep only one track among similar ones. + Revision 1.4 2000/07/18 16:04:06 gosset AliMUONEventReconstructor package: * a few minor modifications and more comments @@ -115,7 +121,7 @@ AliMUONTrackHit::~AliMUONTrackHit() } //__________________________________________________________________________ -Int_t AliMUONTrackHit::Compare(TObject* TrackHit) +Int_t AliMUONTrackHit::Compare(const TObject* TrackHit) const { // "Compare" function to sort with increasing Z. // Returns -1 (0, +1) if Z of current TrackHit diff --git a/MUON/AliMUONTrackHit.h b/MUON/AliMUONTrackHit.h index f373791c452..92ffa7ec023 100644 --- a/MUON/AliMUONTrackHit.h +++ b/MUON/AliMUONTrackHit.h @@ -35,7 +35,7 @@ class AliMUONTrackHit : public TObject { Bool_t IsSortable () const { // necessary for sorting TClonesArray of TrackHit's return kTRUE; } - Int_t Compare(TObject* TrackHit); // "Compare" function for sorting + Int_t Compare(const TObject* TrackHit) const; // "Compare" function for sorting protected: private: diff --git a/PHOS/AliPHOSCpvRecPoint.cxx b/PHOS/AliPHOSCpvRecPoint.cxx index a83bf9c1c72..123cdcd1a00 100644 --- a/PHOS/AliPHOSCpvRecPoint.cxx +++ b/PHOS/AliPHOSCpvRecPoint.cxx @@ -129,7 +129,7 @@ Bool_t AliPHOSCpvRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * d } //____________________________________________________________________________ -Int_t AliPHOSCpvRecPoint::Compare(TObject * obj) +Int_t AliPHOSCpvRecPoint::Compare(const TObject * obj) const { // Compares two RecPoints according to their position in the PHOS modules diff --git a/PHOS/AliPHOSCpvRecPoint.h b/PHOS/AliPHOSCpvRecPoint.h index 1feea029294..325cf4edc58 100644 --- a/PHOS/AliPHOSCpvRecPoint.h +++ b/PHOS/AliPHOSCpvRecPoint.h @@ -41,7 +41,7 @@ public: virtual ~AliPHOSCpvRecPoint() ; virtual void AddDigit(AliPHOSDigit & digit, Float_t Energy) ; // add a digit to the digits list - Int_t Compare(TObject * obj) ; // method for sorting + Int_t Compare(const TObject * obj) const; // method for sorting Float_t GetDelta (){ // gets the fDelta data member diff --git a/PHOS/AliPHOSEmcRecPoint.cxx b/PHOS/AliPHOSEmcRecPoint.cxx index bc06a2efd6b..ea030666273 100644 --- a/PHOS/AliPHOSEmcRecPoint.cxx +++ b/PHOS/AliPHOSEmcRecPoint.cxx @@ -128,7 +128,7 @@ Bool_t AliPHOSEmcRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * d } //____________________________________________________________________________ -Int_t AliPHOSEmcRecPoint::Compare(TObject * obj) +Int_t AliPHOSEmcRecPoint::Compare(const TObject * obj) const { // Compares two RecPoints according to their position in the PHOS modules diff --git a/PHOS/AliPHOSEmcRecPoint.h b/PHOS/AliPHOSEmcRecPoint.h index 27217a37282..620f86f50e9 100644 --- a/PHOS/AliPHOSEmcRecPoint.h +++ b/PHOS/AliPHOSEmcRecPoint.h @@ -41,7 +41,7 @@ public: virtual ~AliPHOSEmcRecPoint() ; virtual void AddDigit(AliPHOSDigit & digit, Float_t Energy) ; // add a digit to the digits list - Int_t Compare(TObject * obj) ; // method for sorting + Int_t Compare(const TObject * obj) const; // method for sorting Float_t CoreEnergy() ; Float_t GetDelta (){ diff --git a/PHOS/AliPHOSLink.cxx b/PHOS/AliPHOSLink.cxx index 5774371c56d..56c7aad3f5b 100644 --- a/PHOS/AliPHOSLink.cxx +++ b/PHOS/AliPHOSLink.cxx @@ -41,7 +41,7 @@ ClassImp(AliPHOSLink) } //____________________________________________________________________________ -Int_t AliPHOSLink::Compare(TObject * obj) +Int_t AliPHOSLink::Compare(const TObject * obj) const { // Compare according to the distance between EMC and PPSD RecPoints in a track segment diff --git a/PHOS/AliPHOSLink.h b/PHOS/AliPHOSLink.h index d0b54036a28..e17576f8968 100644 --- a/PHOS/AliPHOSLink.h +++ b/PHOS/AliPHOSLink.h @@ -27,7 +27,7 @@ public: virtual ~AliPHOSLink(){ // dtor } - Int_t Compare(TObject * obj) ; + Int_t Compare(const TObject * obj) const; Int_t GetEmc(void) { // returns the index of EMC return fEmcN; diff --git a/PHOS/AliPHOSPpsdRecPoint.cxx b/PHOS/AliPHOSPpsdRecPoint.cxx index a1484cf4f3d..40e0e558c82 100644 --- a/PHOS/AliPHOSPpsdRecPoint.cxx +++ b/PHOS/AliPHOSPpsdRecPoint.cxx @@ -80,7 +80,7 @@ void AliPHOSPpsdRecPoint::AddDigit(AliPHOSDigit & digit, Float_t Energy) } //____________________________________________________________________________ -Int_t AliPHOSPpsdRecPoint::Compare(TObject * obj) +Int_t AliPHOSPpsdRecPoint::Compare(const TObject * obj) const { // Compares according to the position diff --git a/PHOS/AliPHOSPpsdRecPoint.h b/PHOS/AliPHOSPpsdRecPoint.h index 3df80b71cb4..69165f86608 100644 --- a/PHOS/AliPHOSPpsdRecPoint.h +++ b/PHOS/AliPHOSPpsdRecPoint.h @@ -29,7 +29,7 @@ public: // dtor } virtual void AddDigit(AliPHOSDigit & digit, Float_t Energy) ; - Int_t Compare(TObject * obj) ; // method to sort clusters + Int_t Compare(const TObject * obj) const; // method to sort clusters Float_t GetDelta(void) { // returns the parameter used for sorting diff --git a/PHOS/AliPHOSRecPoint.h b/PHOS/AliPHOSRecPoint.h index 3927b2ed313..0a86afc013b 100644 --- a/PHOS/AliPHOSRecPoint.h +++ b/PHOS/AliPHOSRecPoint.h @@ -45,7 +45,7 @@ class AliPHOSRecPoint : public AliRecPoint { assert(0==1) ; } virtual void AddDigit(AliPHOSDigit & digit, Float_t Energy) = 0 ; - virtual Int_t Compare(TObject * obj) { + virtual Int_t Compare(const TObject * obj) const { // check why this is done assert(0==1) ; return 1 ; } diff --git a/RICH/AliRICHRawCluster.cxx b/RICH/AliRICHRawCluster.cxx index 402070fd5ff..7ef582c9ab9 100644 --- a/RICH/AliRICHRawCluster.cxx +++ b/RICH/AliRICHRawCluster.cxx @@ -15,6 +15,10 @@ /* $Log$ + Revision 1.2 2000/10/02 15:51:49 jbarbosa + Fixed forward declarations. + Moved constructor into implementation file. + Revision 1.1 2000/06/12 15:27:26 jbarbosa Cleaned up version. @@ -43,7 +47,7 @@ AliRICHRawCluster :: AliRICHRawCluster() fNcluster[0]=fNcluster[1]=-1; } -Int_t AliRICHRawCluster::Compare(TObject *obj) +Int_t AliRICHRawCluster::Compare(const TObject *obj) const { // Compare two clusters diff --git a/RICH/AliRICHRawCluster.h b/RICH/AliRICHRawCluster.h index 907abd577a5..a94a9e7cf7c 100644 --- a/RICH/AliRICHRawCluster.h +++ b/RICH/AliRICHRawCluster.h @@ -34,7 +34,7 @@ public: Float_t GetRadius() {return TMath::Sqrt(fX*fX+fY*fY);} Bool_t IsSortable() const {return kTRUE;} - Int_t Compare(TObject *obj); + Int_t Compare(const TObject *obj) const; Int_t PhysicsContribution(); static Int_t BinarySearch(Float_t r, TArrayF coord, 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); diff --git a/STEER/AliKalmanTrack.cxx b/STEER/AliKalmanTrack.cxx index ee4400de1b1..f552202c183 100644 --- a/STEER/AliKalmanTrack.cxx +++ b/STEER/AliKalmanTrack.cxx @@ -46,7 +46,7 @@ AliKalmanTrack::AliKalmanTrack(const AliKalmanTrack& t) { } //_____________________________________________________________________________ -Int_t AliKalmanTrack::Compare(TObject *o) { +Int_t AliKalmanTrack::Compare(const TObject *o) const { //----------------------------------------------------------------- // This function compares tracks according to the their curvature //----------------------------------------------------------------- diff --git a/STEER/AliKalmanTrack.h b/STEER/AliKalmanTrack.h index 04e038a06d7..1c637d5b2c7 100644 --- a/STEER/AliKalmanTrack.h +++ b/STEER/AliKalmanTrack.h @@ -19,7 +19,7 @@ public: AliKalmanTrack() {fN=0; fChi2=0; fLab=-3141593;} AliKalmanTrack(const AliKalmanTrack& t); virtual ~AliKalmanTrack() {} - Int_t Compare(TObject *o); + Int_t Compare(const TObject *o) const; void SetLabel(Int_t lab) {fLab=lab;} Double_t GetPredictedChi2(const AliCluster *cluster) const; diff --git a/TRD/AliTRDtrack.cxx b/TRD/AliTRDtrack.cxx index 07dcc1d320a..57ebd5eb32c 100644 --- a/TRD/AliTRDtrack.cxx +++ b/TRD/AliTRDtrack.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.4 2000/12/08 16:07:02 cblume +Update of the tracking by Sergei + Revision 1.3 2000/10/15 23:40:01 cblume Remove AliTRDconst @@ -100,7 +103,7 @@ void AliTRDtrack::GetCovariance(Double_t cc[15]) const { } //_____________________________________________________________________________ -Int_t AliTRDtrack::Compare(TObject *o) { +Int_t AliTRDtrack::Compare(const TObject *o) const { // Compares tracks according to their Y2 diff --git a/TRD/AliTRDtrack.h b/TRD/AliTRDtrack.h index e30c03566c5..17ac8f15960 100644 --- a/TRD/AliTRDtrack.h +++ b/TRD/AliTRDtrack.h @@ -19,7 +19,7 @@ public: const Double_t cc[15], Double_t xr, Double_t alpha); AliTRDtrack(const AliTRDtrack& t); - Int_t Compare(TObject *o); + Int_t Compare(const TObject *o) const; Double_t GetAlpha() const {return fAlpha;} Double_t GetC() const {return fC;} -- 2.39.3