X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFGeometryV4.cxx;h=2c15d098e3920c8095d1ef974019442fa704c191;hb=7b81ffe5914c56fc73e9adb41a70396723905863;hp=434619dc5d1e70b37078aa5941bf897a27713dfa;hpb=7aeeaf386766e22f97e34cd5ec1d0f2e2c8b839f;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFGeometryV4.cxx b/TOF/AliTOFGeometryV4.cxx index 434619dc5d1..2c15d098e39 100644 --- a/TOF/AliTOFGeometryV4.cxx +++ b/TOF/AliTOFGeometryV4.cxx @@ -15,6 +15,12 @@ /* $Log$ +Revision 1.5 2006/04/20 22:30:50 hristov +Coding conventions (Annalisa) + +Revision 1.4 2006/04/16 22:29:05 hristov +Coding conventions (Annalisa) + Revision 1.3 2006/03/12 14:38:13 arcelli Changes for TOF Reconstruction using TGeo @@ -35,20 +41,21 @@ Revision 0.1 2005/07/19 A. De Caro according to the PPR TOF geometry */ -#include -#include /////////////////////////////////////////////////////////////////////////////// // // // TOF Geometry class (PPR version) // // // /////////////////////////////////////////////////////////////////////////////// -#include "AliLog.h" +#include "TGeoManager.h" + #include "AliConst.h" +#include "AliLog.h" -#include "AliTOFGeometry.h" #include "AliTOFGeometryV4.h" +extern TGeoManager *gGeoManager; + ClassImp(AliTOFGeometryV4) @@ -836,6 +843,99 @@ void AliTOFGeometryV4::GetVolumePath(Int_t *ind, Char_t *path ) { } +//_____________________________________________________________________________ +void AliTOFGeometryV4::GetVolumePath(Int_t sector, Char_t *path ) { + //-------------------------------------------------------------------- + // This function returns the colume path of a given sector + //-------------------------------------------------------------------- + Char_t string[100]; + + Int_t icopy=-1; + + if(sector<3){ + icopy=sector+1; + sprintf(string,"/ALIC_1/B077_1/B075_%i/BTO3_1",icopy); + } + else if(sector<11){ + // icopy=sector-2; + icopy=sector+3; + sprintf(string,"/ALIC_1/B077_1/B071_%i/BTO1_1",icopy); + } + else if(sector==11 || sector==12){ + icopy=sector-10; + sprintf(string,"/ALIC_1/B077_1/B074_%i/BTO2_1",icopy); + } + else { + // icopy=sector-4; + icopy=sector-12; + sprintf(string,"/ALIC_1/B077_1/B071_%i/BTO1_1",icopy); + } + + sprintf(path,"%s",string); + +} +//_____________________________________________________________________________ +void AliTOFGeometryV4::GetVolumePath(Int_t sector, Int_t plate, Int_t strip, Char_t *path ) { + //-------------------------------------------------------------------- + // This function returns the colume path of a given strip + //-------------------------------------------------------------------- + Char_t string1[100]; + Char_t string2[100]; + Char_t string3[100]; + Int_t nstrB = NStripB(); + Int_t nstrC = NStripC(); + + Int_t icopy=-1; + + if(sector<3){ + icopy=sector+1; + sprintf(string1,"/ALIC_1/B077_1/B075_%i/BTO3_1",icopy); + } + else if(sector<11){ + // icopy=sector-2; + icopy=sector+3; + sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1",icopy); + } + else if(sector==11 || sector==12){ + icopy=sector-10; + sprintf(string1,"/ALIC_1/B077_1/B074_%i/BTO2_1",icopy); + } + else { + // icopy=sector-4; + icopy=sector-12; + sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1",icopy); + } + + if( plate ==0){ + sprintf(string2,"FTOC_1/FLTC_0"); + icopy = nstrC - strip; + sprintf(string3,"FSTR_%i",icopy); + } + else if( plate ==1){ + sprintf(string2,"FTOB_1/FLTB_0"); + icopy = nstrB - strip; + sprintf(string3,"FSTR_%i",icopy); + } + else if( plate ==2){ + sprintf(string2,"FTOA_0/FLTA_0"); + icopy = strip+1; + sprintf(string3,"FSTR_%i",icopy); + } + else if( plate ==3){ + sprintf(string2,"FTOB_2/FLTB_0"); + icopy = strip+1; + sprintf(string3,"FSTR_%i",icopy); + } + else if( plate ==4){ + sprintf(string2,"FTOC_2/FLTC_0"); + icopy = strip+1; + sprintf(string3,"FSTR_%i",icopy); + } + + sprintf(path,"%s/%s/%s/FSEN_0",string1,string2,string3); + +} + //_____________________________________________________________________________ void AliTOFGeometryV4::GetPos(Int_t *det, Float_t *pos) {