From 212bb69db3c3a13dcb341e32463f066c5bd8a22c Mon Sep 17 00:00:00 2001 From: martinez Date: Wed, 7 Jul 2004 16:28:10 +0000 Subject: [PATCH] New definition of name ofobject in TMap tables. Fixing conding convention violations --- MUON/AliMUONSegmentIndex.cxx | 25 +++- MUON/AliMUONSegmentIndex.h | 8 +- MUON/AliMUONSegmentManuIndex.cxx | 24 ++- MUON/AliMUONSegmentManuIndex.h | 5 +- MUON/AliMUONSegmentPosition.cxx | 31 +++- MUON/AliMUONSegmentPosition.h | 15 +- MUON/AliMUONSegmentationDetectionElement.cxx | 146 +++++++++++++++---- MUON/AliMUONSegmentationDetectionElement.h | 37 +++-- 8 files changed, 220 insertions(+), 71 deletions(-) diff --git a/MUON/AliMUONSegmentIndex.cxx b/MUON/AliMUONSegmentIndex.cxx index d3845c7fe4d..3e3ec094324 100644 --- a/MUON/AliMUONSegmentIndex.cxx +++ b/MUON/AliMUONSegmentIndex.cxx @@ -25,6 +25,8 @@ // Detailed information in Alice Technical Note xxxxxxxx (2004) //==================================================================== +#include + #include "AliMUONSegmentIndex.h" //___________________________________________ @@ -34,6 +36,7 @@ ClassImp(AliMUONSegmentIndex) //___________________________________________ AliMUONSegmentIndex::AliMUONSegmentIndex() : TNamed() { + // Constructor by default fChannelId = 0; fPadX = 0; fPadY = 0; @@ -42,10 +45,9 @@ AliMUONSegmentIndex::AliMUONSegmentIndex() : TNamed() //___________________________________________ AliMUONSegmentIndex::AliMUONSegmentIndex(const Int_t channelId, const Int_t padX, const Int_t padY, const Int_t cathode) : TNamed() { - char name[10]; - sprintf(name,"%d-%d",padX,padY); - fName = name; - fTitle = name; + // Constructor to be used + fName = Name(padX, padY, cathode).Data(); + fTitle = Name(padX, padY, cathode).Data(); fChannelId = channelId; fPadX = padX; fPadY = padY; @@ -54,16 +56,27 @@ AliMUONSegmentIndex::AliMUONSegmentIndex(const Int_t channelId, const Int_t padX //_______________________________________________ AliMUONSegmentIndex::~AliMUONSegmentIndex() { - + // Destructor } //___________________________________________ Int_t AliMUONSegmentIndex::Compare(const TObject *obj) const { + // Comparison of two AliMUONSegmentIndex objects AliMUONSegmentIndex * myobj = ( AliMUONSegmentIndex *) obj; return (fChannelId > myobj->GetChannelId()) ? 1 : -1; } +//___________________________________________ +TString AliMUONSegmentIndex::Name(Int_t padx, Int_t pady, Int_t cathode) +{ + // Definition of the name of the object + char name[15]; + sprintf(name,"%d-%d-%d",padx,pady,cathode); + return TString(name); +} + //___________________________________________ void AliMUONSegmentIndex::Print() const { - printf("%s id=%d ix=%d iy=%d cathode=%d\n",fName.Data(),fChannelId,fPadX,fPadY,fCathode); + // Printing information of AliMUONSegmentIndex + Info("Print", "Name=%s Id=%d PadX=%d PadY=%d Cathode=%d\n",fName.Data(),fChannelId,fPadX,fPadY,fCathode); } diff --git a/MUON/AliMUONSegmentIndex.h b/MUON/AliMUONSegmentIndex.h index 1060a82b995..01397d39376 100644 --- a/MUON/AliMUONSegmentIndex.h +++ b/MUON/AliMUONSegmentIndex.h @@ -16,6 +16,7 @@ //==================================================================== #include +#include class AliMUONSegmentIndex : public TNamed { public: @@ -30,13 +31,14 @@ class AliMUONSegmentIndex : public TNamed { Int_t GetPadY() const {return fPadX;} Int_t GetCathode() const {return fCathode;} + static TString Name(Int_t padx, Int_t pady, Int_t cathode) ; void Print() const; private: Int_t fChannelId; // Id of the channel within the detection element - Int_t fPadX; - Int_t fPadY; - Int_t fCathode; + Int_t fPadX; // pad index in the X direction + Int_t fPadY; // pad index in the y direction + Int_t fCathode; // cathode plane 0 bending 1 non bending ClassDef(AliMUONSegmentIndex,1) // Segmenation for MUON detection elements }; diff --git a/MUON/AliMUONSegmentManuIndex.cxx b/MUON/AliMUONSegmentManuIndex.cxx index 05a9cd317f4..038922d91d1 100644 --- a/MUON/AliMUONSegmentManuIndex.cxx +++ b/MUON/AliMUONSegmentManuIndex.cxx @@ -25,6 +25,7 @@ // Detailed information in Alice Technical Note xxxxxxxx (2004) //==================================================================== +#include #include "AliMUONSegmentManuIndex.h" @@ -35,6 +36,7 @@ ClassImp(AliMUONSegmentManuIndex) //___________________________________________ AliMUONSegmentManuIndex::AliMUONSegmentManuIndex() { + //Default constructor fChannelId= 0;; // Id of the channel within the detection element fManuId= 0;; // Manu id in the detection element fBusPatchId= 0;; // BusPatchId in the detection element up to 4 for slats @@ -43,10 +45,9 @@ AliMUONSegmentManuIndex::AliMUONSegmentManuIndex() //___________________________________________ AliMUONSegmentManuIndex::AliMUONSegmentManuIndex(const Int_t channelId, const Int_t manuId, const Int_t busPatchId, Int_t manuChannelId) : TNamed() { - char name[10]; - sprintf(name,"%d-%d",manuId,manuChannelId); - fName=name; - fTitle=name; + // Constructor to be used + fName = Name(manuId, manuChannelId).Data(); + fTitle= Name(manuId, manuChannelId).Data(); fChannelId = channelId; fManuId = manuId; fBusPatchId = busPatchId; @@ -55,16 +56,27 @@ AliMUONSegmentManuIndex::AliMUONSegmentManuIndex(const Int_t channelId, const In //_______________________________________________ AliMUONSegmentManuIndex::~AliMUONSegmentManuIndex() { - + // Destructor } //___________________________________________ Int_t AliMUONSegmentManuIndex::Compare(const TObject *obj) const { + // Comparison of two AliMUONSegmentManuIndex objects AliMUONSegmentManuIndex * myobj = ( AliMUONSegmentManuIndex *) obj; return (fChannelId > myobj->GetChannelId()) ? 1 : -1; } //___________________________________________ +TString AliMUONSegmentManuIndex::Name(Int_t manuid, Int_t manuchannel) +{ + // Definition of the name for TMap indexing + char name[15]; + Int_t absid = manuid*64 + manuchannel; + sprintf(name,"%d",absid); + return TString(name); +} +//___________________________________________ void AliMUONSegmentManuIndex::Print() const { - printf("%s id=%d ManuId=%d BusPatch=%d ManuChannelId=%d\n",fName.Data(),fChannelId,fManuId,fBusPatchId,fManuChannelId); + // Printing AliMUONSegmentManuIndex information + Info("Print","Name=%s Id=%d BusPatch=%d ManuId=%d ManuChannelId=%d\n",fName.Data(),fChannelId,fBusPatchId,fManuId,fManuChannelId); } diff --git a/MUON/AliMUONSegmentManuIndex.h b/MUON/AliMUONSegmentManuIndex.h index 6309b81e2ed..5a5633969d4 100644 --- a/MUON/AliMUONSegmentManuIndex.h +++ b/MUON/AliMUONSegmentManuIndex.h @@ -17,6 +17,7 @@ #include +class TString; class AliMUONSegmentManuIndex : public TNamed { public: @@ -31,8 +32,10 @@ class AliMUONSegmentManuIndex : public TNamed { Int_t GetManuId() const{return fManuId;} Int_t GetBusPatchId() const{return fBusPatchId;} Int_t GetManuChannelId() const{return fManuChannelId;} + + static TString Name(Int_t manuId, Int_t manuchannel); - void Print() const; + void Print() const; private: Int_t fChannelId; // Id of the channel within the detection element diff --git a/MUON/AliMUONSegmentPosition.cxx b/MUON/AliMUONSegmentPosition.cxx index 9f9a26e1623..4ffddf602c5 100644 --- a/MUON/AliMUONSegmentPosition.cxx +++ b/MUON/AliMUONSegmentPosition.cxx @@ -25,6 +25,8 @@ // Detailed information in Alice Technical Note xxxxxxxx (2004) //==================================================================== +#include + #include "AliMUONSegmentPosition.h" //___________________________________________ @@ -34,6 +36,7 @@ ClassImp(AliMUONSegmentPosition) //___________________________________________ AliMUONSegmentPosition::AliMUONSegmentPosition() : TNamed() { +//Default constructor fChannelId = 0; fX = 0.; fY = 0.; @@ -41,10 +44,9 @@ AliMUONSegmentPosition::AliMUONSegmentPosition() : TNamed() //___________________________________________ AliMUONSegmentPosition::AliMUONSegmentPosition(const Int_t channelId, const Float_t x, const Float_t y, const Int_t cathode) : TNamed() { - char name[10]; - sprintf(name,"%5.2f-%5.2f",x,y); - fName = name; - fTitle= name; + // Constructor to be used + fName = Name(x,y,cathode); + fTitle= Name(x,y,cathode); fChannelId = channelId; fX = x; fY = y; @@ -53,16 +55,33 @@ AliMUONSegmentPosition::AliMUONSegmentPosition(const Int_t channelId, const Floa //_______________________________________________ AliMUONSegmentPosition::~AliMUONSegmentPosition() { - + // Destructor } //___________________________________________ Int_t AliMUONSegmentPosition::Compare(const TObject *obj) const { + // Comparison of two AliMUONSegmentPosition objects AliMUONSegmentPosition * myobj = ( AliMUONSegmentPosition *) obj; return (fChannelId > myobj->GetChannelId()) ? 1 : -1; } //___________________________________________ +TString AliMUONSegmentPosition::Name(Float_t x, Float_t y, Int_t cathode) +{ + // Definition of the name of AliMUONSegmentPosition + // Our convention since the smaller pad pich is 5 mm is to choice a 3mm unit: + // So for a position pair x,y and cathode plane icathode the name will be: + // xp = TMath::Nint(x*10./3.); + // yp = TMath::Nint(y+10./3.); + // sprintf(name,"%d-%d-%d",xp,yp,cathode); + Int_t xp = TMath::Nint(x*10./3.); + Int_t yp = TMath::Nint(y*10./3.); + char name[15]; + sprintf(name,"%d-%d-%d",xp,yp,cathode); + return TString(name); +} +//___________________________________________ void AliMUONSegmentPosition::Print() const { - printf("%s id=%d x=%f y=%f cathode=%d\n",fName.Data(),fChannelId, fX, fY,fCathode); + // Printing AliMUONSegmentManuIndex information + Info("Print","Name=%s Id=%d X=%f Y=%f Cathode=%d\n",fName.Data(),fChannelId, fX, fY,fCathode); } diff --git a/MUON/AliMUONSegmentPosition.h b/MUON/AliMUONSegmentPosition.h index 7d2cc6afd2f..90a3f6a5c1b 100644 --- a/MUON/AliMUONSegmentPosition.h +++ b/MUON/AliMUONSegmentPosition.h @@ -15,7 +15,9 @@ // Detailed information in Alice Technical Note xxxxxxxx (2004) //==================================================================== + #include +#include class AliMUONSegmentPosition : public TNamed { @@ -30,12 +32,15 @@ class AliMUONSegmentPosition : public TNamed Float_t GetYlocal() const {return fY;} Int_t GetCathode() const {return fCathode;} - void Print() const; + + static TString Name(Float_t x, Float_t y, Int_t cathode) ; + void Print() const; + private: - Int_t fChannelId; // Id of the channel within the detection element - Float_t fX; - Float_t fY; - Int_t fCathode; + Int_t fChannelId; // Id of the channel within the detection element + Float_t fX; // Position X of the center of the segment (pad, strip, etc...) + Float_t fY; // Position Y of the center of the segment (pad, strip, etc...) + Int_t fCathode; // Cathode Side Bending 1 or non bending 0 ClassDef(AliMUONSegmentPosition,1) // Loal positions of segments diff --git a/MUON/AliMUONSegmentationDetectionElement.cxx b/MUON/AliMUONSegmentationDetectionElement.cxx index d110706b89d..ee10b58375a 100644 --- a/MUON/AliMUONSegmentationDetectionElement.cxx +++ b/MUON/AliMUONSegmentationDetectionElement.cxx @@ -39,7 +39,6 @@ #include "AliMUONSegmentPosition.h" #include "AliMUONSegmentIndex.h" - //___________________________________________ ClassImp(AliMUONSegmentationDetectionElement) @@ -56,11 +55,11 @@ const TString AliMUONSegmentationDetectionElement::fgkNonBendingExt = ".NonBendi AliMUONSegmentationDetectionElement::AliMUONSegmentationDetectionElement() : TObject() { + //Default constructor fMapManuIndexIndex= 0x0; fMapIndexManuIndex= 0x0; fMapIndexPosition= 0x0; - fXlocalSegmentPositions= 0x0; - fYlocalSegmentPositions= 0x0; + fMapPositionIndex=0X0; } @@ -70,8 +69,6 @@ AliMUONSegmentationDetectionElement::AliMUONSegmentationDetectionElement() : TOb // fMapManuIndexIndex= 0x0; // fMapIndexManuIndex= 0x0; // fMapIndexPosition= 0x0; -// fXlocalSegmentPositions= 0x0; -// fYlocalSegmentPositions= 0x0; // } //________________________________________________ @@ -83,16 +80,26 @@ AliMUONSegmentationDetectionElement::AliMUONSegmentationDetectionElement(const A } //_________________________________________________ AliMUONSegmentationDetectionElement::~AliMUONSegmentationDetectionElement(){ + //Class destructor fListOfIndexes->Delete(); fListOfManuIndexes->Delete(); fListOfPositions->Delete(); fMapManuIndexIndex->Clear(); fMapIndexManuIndex->Clear(); fMapIndexPosition->Clear(); + fMapPositionIndex->Clear(); +} + +//_________________________________________________ +AliMUONSegmentIndex * AliMUONSegmentationDetectionElement::GetIndex(Int_t manu, Int_t channel) const +{ + // Getting AliMUONSegmentIndex from ManuIndex + return GetIndex( AliMUONSegmentManuIndex::Name(manu, channel).Data() ) ; } //_________________________________________________ -AliMUONSegmentIndex * AliMUONSegmentationDetectionElement::GetIndex( const char * SegmentManuIndexName) +AliMUONSegmentIndex * AliMUONSegmentationDetectionElement::GetIndex( const char * SegmentManuIndexName) const { + // Getting AliMUONSegmentIndex from name of AliMUONSegmentManuIndex if (fMapManuIndexIndex) return (AliMUONSegmentIndex*) fMapManuIndexIndex->GetValue(SegmentManuIndexName); else { Warning("GetIndex","SegmentManuIndex %s out of DetectionElement Mapping %s", @@ -100,10 +107,16 @@ AliMUONSegmentIndex * AliMUONSegmentationDetectionElement::GetIndex( const char return 0x0; } } - //_________________________________________________ -AliMUONSegmentManuIndex * AliMUONSegmentationDetectionElement::GetManuIndex( const char * SegmentIndexName) +AliMUONSegmentManuIndex * AliMUONSegmentationDetectionElement::GetManuIndex(Int_t padx, Int_t pady, Int_t cathode ) const +{ + // Getting ManuIndex from Index + return GetManuIndex( AliMUONSegmentIndex::Name(padx, pady, cathode).Data() ); +} +//_________________________________________________ +AliMUONSegmentManuIndex * AliMUONSegmentationDetectionElement::GetManuIndex( const char * SegmentIndexName) const { + // Getting ManuIndex from manuname if (fMapIndexManuIndex) return (AliMUONSegmentManuIndex*) fMapIndexManuIndex->GetValue(SegmentIndexName); else { Warning("GetManuIndex","SegmentIndex %s out of Detection Element mapping %s", @@ -111,10 +124,16 @@ AliMUONSegmentManuIndex * AliMUONSegmentationDetectionElement::GetManuIndex( con return 0x0; } } - //_________________________________________________ -AliMUONSegmentPosition * AliMUONSegmentationDetectionElement::GetPosition( const char * SegmentIndexName) +AliMUONSegmentPosition * AliMUONSegmentationDetectionElement::GetPosition(Int_t padx, Int_t pady, Int_t cathode ) const +{ + //Getting position from index + return GetPosition( AliMUONSegmentIndex::Name(padx, pady, cathode).Data() ); +} +//_________________________________________________ +AliMUONSegmentPosition * AliMUONSegmentationDetectionElement::GetPosition( const char * SegmentIndexName) const { + // Getting position from indexname if (fMapIndexPosition) return (AliMUONSegmentPosition*) fMapIndexPosition->GetValue(SegmentIndexName); else { Warning("GetPosition","SegmentIndex %s out of DetectionElement mapping %s", @@ -122,10 +141,28 @@ AliMUONSegmentPosition * AliMUONSegmentationDetectionElement::GetPosition( cons return 0x0; } } +//_________________________________________________ +AliMUONSegmentIndex * AliMUONSegmentationDetectionElement::GetIndexFromPosition(Float_t x, Float_t y, Int_t cathode) const +{ + // Getting Index from position if position is a center pad position + return GetIndexFromPosition( AliMUONSegmentPosition::Name(x,y, cathode).Data() ); +} +//_________________________________________________ +AliMUONSegmentIndex * AliMUONSegmentationDetectionElement::GetIndexFromPosition( const char * PositionName) const +{ + // Getting index form positionname + if (fMapPositionIndex) return (AliMUONSegmentIndex*) fMapPositionIndex->GetValue(PositionName); + else { + Warning("GetIndexFromPosition","SegmentPosition %s out of DetectionElement Mapping %s", + PositionName,fDetectionElementType.Data()); + return 0x0; + } +} //_________________________________________________ -AliMUONSegmentManuIndex * AliMUONSegmentationDetectionElement::FindManuIndex(const char* ManuIndexName) +AliMUONSegmentManuIndex * AliMUONSegmentationDetectionElement::FindManuIndex( const char* ManuIndexName)const { + // Getting AliMUONSegmentManuIndex objecto from manu index if (fMapManuIndexIndex) return (AliMUONSegmentManuIndex*) fMapManuIndexIndex->FindObject(ManuIndexName); else { Warning("FindManuIndex","SegmentManuIndex %s out of DetectionElement mapping %s", @@ -135,33 +172,85 @@ AliMUONSegmentManuIndex * AliMUONSegmentationDetectionElement::FindManuIndex(con } //_________________________________________________ -AliMUONSegmentManuIndex * AliMUONSegmentationDetectionElement::FindIndex(const char* IndexName) +AliMUONSegmentIndex * AliMUONSegmentationDetectionElement::FindIndex(const char* IndexName) const { - if (fMapIndexPosition) return (AliMUONSegmentManuIndex *) fMapIndexPosition->FindObject(IndexName); + // Getting + if (fMapIndexPosition) return (AliMUONSegmentIndex *) fMapIndexPosition->FindObject(IndexName); else { Warning("FindIndex","SegmentIndex %s out of DetectionElement mapping %s", IndexName,fDetectionElementType.Data()); return 0x0; } } +//_________________________________________________ +AliMUONSegmentIndex * AliMUONSegmentationDetectionElement::FindIndexFromPosition(Float_t /*x*/, Float_t /*y*/, Int_t /*cathode*/ ) const +{ + // char * name = AliMUONSegmentPosition::Name(x,y); + +// if (GetIndexFromPosition( AliMUONSegmentPosition::Name(x,y)) ) +// return GetIndexFromPosition( AliMUONSegmentPosition::Name(x,y) ); + +// Float_t xl= ((Int_t) x*10 )/10.; +// Float_t yl= ((Int_t) y*10 )/10.; +// Int_t ix,iy, ixp; + +// for(ix=1; ix<4; ix++) { +// xl = ((Int_t) 0.5+10.*(x + ((Float_t) ix )*0.1))/10.; +// for(iy=-ix; iy-ix-1; ixp--) { +// xl = ((Int_t) 0.5+10.*(x + ((Float_t) ixp )*0.1))/10. ; +// printf("B %d and %d and %f and %f \n",ixp,ix, xl, yl); +// sprintf(name,"%5.1f-%5.1f",xl, yl); +// if (GetIndexFromPosition(name)) break; +// } +// if (GetIndexFromPosition(name)) break; + +// for(iy=ix-1; iy>-ix-1; iy--) { +// yl = ((Int_t) 0.5+10.*(y + ((Float_t) iy )*0.1))/10. ; +// printf("C %d and %d and %f and %f \n",-ix,iy,xl,yl); +// sprintf(name,"%5.1f-%5.1f",xl, yl); +// if (GetIndexFromPosition(name)) break; +// } +// if (GetIndexFromPosition(name)) break; + +// for(ixp=-ix+1; ixpDelete(); @@ -170,17 +259,15 @@ void AliMUONSegmentationDetectionElement::Init(const char * DetectionElementT fMapManuIndexIndex->Clear(); fMapIndexManuIndex->Clear(); fMapIndexPosition->Clear(); + fMapPositionIndex->Clear(); } - - - Int_t icathode; //Bendingplane icathode=0; - ReadingSegmentationMappingFile(fSegmentationMappingFile_Bending ,icathode); + ReadingSegmentationMappingFile(fSegmentationMappingFileBending ,icathode); //NonBendingplane icathode=1; - ReadingSegmentationMappingFile(fSegmentationMappingFile_NonBending,icathode); + ReadingSegmentationMappingFile(fSegmentationMappingFileNonBending,icathode); } //_______________________________________________________________ @@ -195,9 +282,7 @@ void AliMUONSegmentationDetectionElement::ReadingSegmentationMappingFile(TString Float_t x, y; while ( !in.eof()) { in >> id >> ix >> iy >> x >> y >> idmanu >> idchannel; - char name[10]; - sprintf(name,"%d%d",ix,iy); - printf("%s id=%d ix=%d iy=%d x=%f y=%f idmanu=%d and idchannel=%d\n",name,id, ix, iy, x, y,idmanu, idchannel); + printf("id=%d ix=%d iy=%d x=%f y=%f idmanu=%d and idchannel=%d\n",id, ix, iy, x, y,idmanu, idchannel); fListOfIndexes->AddAt( new AliMUONSegmentIndex(id,ix,iy,cathode), id); fListOfManuIndexes->AddAt( new AliMUONSegmentManuIndex(id,idmanu,0,idchannel), id);; @@ -210,6 +295,7 @@ void AliMUONSegmentationDetectionElement::ReadingSegmentationMappingFile(TString fMapManuIndexIndex->Add( fListOfManuIndexes->At(id), fListOfIndexes->At(id)); fMapIndexManuIndex->Add( fListOfIndexes->At(id), fListOfManuIndexes->At(id)); fMapIndexPosition->Add( fListOfIndexes->At(id), fListOfPositions->At(id)); + fMapPositionIndex->Add( fListOfPositions->At(id), fListOfIndexes->At(id) ); } } in.close(); diff --git a/MUON/AliMUONSegmentationDetectionElement.h b/MUON/AliMUONSegmentationDetectionElement.h index 1dc9f312b39..13b933b5b1c 100644 --- a/MUON/AliMUONSegmentationDetectionElement.h +++ b/MUON/AliMUONSegmentationDetectionElement.h @@ -38,16 +38,26 @@ class AliMUONSegmentationDetectionElement : public TObject { AliMUONSegmentationDetectionElement(); //AliMUONSegmentationDetectionElement(const char* ElementType=""); virtual ~AliMUONSegmentationDetectionElement(); + + // User functions + AliMUONSegmentIndex * GetIndex(Int_t manu, Int_t channel) const; + AliMUONSegmentIndex * GetIndexFromPosition(Float_t x, Float_t y, Int_t icathode) const; + AliMUONSegmentManuIndex * GetManuIndex( Int_t padx, Int_t pady, Int_t cathode) const ; + AliMUONSegmentPosition * GetPosition(Int_t padx, Int_t pady, Int_t cathode) const ; + - AliMUONSegmentIndex * GetIndex( const char * SegmentManuIndexName); - AliMUONSegmentManuIndex * GetManuIndex( const char * SegmentIndexName); - AliMUONSegmentPosition * GetPosition( const char * SegmentIndexName); + AliMUONSegmentIndex * GetIndex( const char * SegmentManuIndexName)const; + AliMUONSegmentIndex * GetIndexFromPosition( const char * PositionName)const; + AliMUONSegmentManuIndex * GetManuIndex( const char * SegmentIndexName) const; + AliMUONSegmentPosition * GetPosition( const char * SegmentIndexName) const; TObjArray * ListOfIndexes() {return fListOfIndexes;} TObjArray * ListOfManuIndexes() {return fListOfIndexes;} TObjArray * ListOfPositions() {return fListOfIndexes;} - AliMUONSegmentManuIndex * FindManuIndex(const char* ManuIndexName=""); - AliMUONSegmentManuIndex * FindIndex(const char* IndexName=""); + AliMUONSegmentManuIndex * FindManuIndex(const char* ManuIndexName="") const; + AliMUONSegmentIndex * FindIndex(const char* IndexName="") const; + + AliMUONSegmentIndex * FindIndexFromPosition(Float_t x, Float_t y, Int_t cathode) const; void Init(const char * DetectionElementType="slat220000N"); @@ -58,8 +68,8 @@ class AliMUONSegmentationDetectionElement : public TObject { private: // static data members - static const TString fgkDefaultTop; // - static const TString fgkStationDir; // + static const TString fgkDefaultTop; // Top directory of $Alice_ROOT/MUON/mapping + static const TString fgkStationDir; // Directory for station station1, station2, station345 static const TString fgkBendingDir; //bending plane directory static const TString fgkNonBendingDir; //non-bending plane directory static const TString fgkFileExt; // File extention @@ -68,16 +78,15 @@ class AliMUONSegmentationDetectionElement : public TObject { // data members TString fDetectionElementType; // Type of detection element St1Sector, slat220000N, etc .... - TString fSegmentationMappingFile_Bending; // Segmentation & mapping file for bending plane - TString fSegmentationMappingFile_NonBending; // Segmentation & mapping file for non bending plane - TObjArray * fListOfIndexes; - TObjArray * fListOfManuIndexes; - TObjArray * fListOfPositions; + TString fSegmentationMappingFileBending; // Segmentation & mapping file for bending plane + TString fSegmentationMappingFileNonBending; // Segmentation & mapping file for non bending plane + TObjArray * fListOfIndexes; // TObject Array fo AliMUONSegmentIndex + TObjArray * fListOfManuIndexes; // TObject Array fo AliMUONSegmentManuIndex + TObjArray * fListOfPositions; // TObject Array fo AliMUONSegmentPositions TMap * fMapManuIndexIndex; // Map with key ManuIndex and value = Index TMap * fMapIndexManuIndex;// Map with key ManuIndexIndex and value = ManuIndex TMap * fMapIndexPosition;// Map with key Index and value = Position - TArrayF * fXlocalSegmentPositions; // Array of posible values of Xlocal - TArrayF * fYlocalSegmentPositions;// Array of posible values of Ylocal + TMap * fMapPositionIndex;// Map with key Index and value = Position ClassDef(AliMUONSegmentationDetectionElement,1) // Segmentation for MUON detection elements -- 2.39.3