X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFGeometry.cxx;h=77a4479759b81c1fe54ad793f2e5da5dabe349ca;hb=1afb990632992830c51016c8f066f86db9a90b4c;hp=68f8ff400222769be28e8d414f02d16c9afbbfc4;hpb=0ef21f598fd5d65fb5a8766f7a1f02093cbce56e;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFGeometry.cxx b/TOF/AliTOFGeometry.cxx index 68f8ff40022..77a4479759b 100644 --- a/TOF/AliTOFGeometry.cxx +++ b/TOF/AliTOFGeometry.cxx @@ -15,6 +15,21 @@ /* $Log$ +Revision 1.20.1 2007/05/19 decaro + Added the following methods: + GetVolumeIndices(Int_t index, Int_t *det), to get + the volume indices (sector, plate, strip, padz, padx, + stored respectively in det[0], det[1], det[2], det[3], det[4]) + from the calibration channel index; + NStrip(Int_t nPlate), to get the strips number + per each kind of TOF module. + +Revision 1.20 2007/10/08 17:52:55 decaro +hole region in front of PHOS detector: update of sectors' numbers + +Revision 1.19 2007/10/04 14:05:09 zampolli +AliTOFGeometryV5 becoming AliTOFGeometry + Revision 1.18 2007/02/19 18:55:26 decaro Added getter methods for volume path (for Event Display) @@ -100,10 +115,14 @@ Revision 0.01 2003/12/04 S.Arcelli /////////////////////////////////////////////////////////////////////////////// #include "TGeoManager.h" -#include "AliTOFGeometry.h" +//#include "TGeoMatrix.h" +#include "TMath.h" + #include "AliLog.h" #include "AliConst.h" +#include "AliTOFGeometry.h" + extern TGeoManager *gGeoManager; ClassImp(AliTOFGeometry) @@ -113,9 +132,9 @@ const Float_t AliTOFGeometry::fgkZlenB = 146.5; // length (cm) of the B mo const Float_t AliTOFGeometry::fgkZlenC = 170.45; // length (cm) of the C module const Float_t AliTOFGeometry::fgkMaxhZtof = 370.6; // Max half z-size of TOF (cm) -const Float_t AliTOFGeometry::fgkxTOF = 371.-0.01;// Inner radius of the TOF for Reconstruction (cm) -const Float_t AliTOFGeometry::fgkRmin = 370.-0.01;// Inner radius of the TOF (cm) -const Float_t AliTOFGeometry::fgkRmax = 399.-0.01;// Outer radius of the TOF (cm) +const Float_t AliTOFGeometry::fgkxTOF = 372.00;// Inner radius of the TOF for Reconstruction (cm) +const Float_t AliTOFGeometry::fgkRmin = 371.00;// Inner radius of the TOF (cm) +const Float_t AliTOFGeometry::fgkRmax = 400.05;// Outer radius of the TOF (cm) const Int_t AliTOFGeometry::fgkTimeDiff = 25000; // Min signal separation (ps) const Float_t AliTOFGeometry::fgkXPad = 2.5; // Pad size in the x direction (cm) @@ -183,7 +202,7 @@ const Float_t AliTOFGeometry::fgkDistances[kNPlates][kMaxNstrip]= { }; //_____________________________________________________________________________ AliTOFGeometry::AliTOFGeometry(): - fHoles(0) + fHoles(1) { // // AliTOFGeometry default constructor @@ -450,7 +469,7 @@ void AliTOFGeometry::GetVolumePath(Int_t *ind, Char_t *path ) { if( iplate==4) icopy=istrip+NStripC()+2*NStripB()+NStripA(); icopy++; sprintf(string2,"FTOA_0/FLTA_0/FSTR_%i",icopy); - if(fHoles && (sector==11 || sector==12)){ + if(fHoles && (sector==13 || sector==14 || sector==15)){ if(iplate<2) sprintf(string2,"FTOB_0/FLTB_0/FSTR_%i",icopy); if(iplate>2) sprintf(string2,"FTOC_0/FLTC_0/FSTR_%i",icopy); } @@ -496,7 +515,7 @@ void AliTOFGeometry::GetVolumePath(Int_t sector, Int_t plate, Int_t strip, Char_ if(plate==4) icopy=strip+NStripC()+2*NStripB()+NStripA(); icopy++; sprintf(string2,"FTOA_0/FLTA_0/FSTR_%i",icopy); - if(fHoles && (sector==11 || sector==12)) { + if(fHoles && (sector==13 || sector==14 || sector==15)){ if(plate<2) sprintf(string2,"FTOB_0/FLTB_0/FSTR_%i",icopy); if(plate>2) sprintf(string2,"FTOC_0/FLTC_0/FSTR_%i",icopy); } @@ -1802,6 +1821,70 @@ Int_t AliTOFGeometry::GetIndex(Int_t *detId) ipadx; return idet; } +//_____________________________________________________________________________ + +void AliTOFGeometry::GetVolumeIndices(Int_t index, Int_t *detId) +{ + // + // Retrieve volume indices from the calibration channel index + // + + detId[0] = index/NpadXStrip()/NStripXSector(); + + Int_t dummyStripPerModule = + ( index - ( NStripXSector()*NpadXStrip()*detId[0]) ) / NpadXStrip(); + if (dummyStripPerModule=kNStripC && dummyStripPerModule=kNStripC+kNStripB && dummyStripPerModule=kNStripC+kNStripB+kNStripA && dummyStripPerModule=kNStripC+kNStripB+kNStripA+kNStripB && dummyStripPerModule