Int_t sector = modnum/nStripSec;
Char_t string1[100];
Char_t string2[100];
-
Int_t icopy=-1;
+ if(sector<13){
+ icopy=sector+5;}
+ else{ icopy=sector-13;}
- if(sector<3){
- icopy=sector+1;
- sprintf(string1,"/ALIC_1/B077_1/B075_%i/BTO3_1/FTOA_0/FLTA_0",icopy);
- }
- else if(sector<11){
- icopy=sector+3;
- sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1/FTOA_0/FLTA_0",icopy);
- }
- else if(sector==11 || sector==12){
- icopy=sector-10;
- sprintf(string1,"/ALIC_1/B077_1/B074_%i/BTO2_1/FTOA_0/FLTA_0",icopy);
- }
- else {
- icopy=sector-12;
- sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1/FTOA_0/FLTA_0",icopy);
- }
+ sprintf(string1,"/ALIC_1/B077_1/BSEGMO%i_1/BTOF%i_1/FTOA_0/FLTA_0",sector,sector);
Int_t strInSec=modnum%nStripSec;
icopy= strInSec;
}
+//____________________________________________________________________________
+void AliTOF::SetTOFSectors(Int_t *sectors){
+ for(Int_t isec=0;isec<18;isec++){
+ fTOFSectors[isec]=sectors[isec];
+ }
+}
+//____________________________________________________________________________
+void AliTOF::GetTOFSectors(Int_t *sectors) const {
+
+ for(Int_t isec=0;isec<18;isec++){
+ sectors[isec]=fTOFSectors[isec];
+ }
+}
//_____________________________________________________________________________
AliTOF::AliTOF(const AliTOF &source)
:AliDetector()
TClonesArray *ReconParticles() const {return fReconParticles;}
void RecreateSDigitsArray();
void CreateSDigitsArray();
+ virtual void SetTOFSectors(Int_t *sectors);
+ virtual void GetTOFSectors(Int_t *sectors) const;
AliTOFGeometry *GetGeometry() const { return fTOFGeometry; };
// Trigger
Int_t fIdSens; // The unique identifier for sensitive volume FPAD
Bool_t fTZero; // Flag indicating if T0 is used
+ Int_t fTOFSectors[18]; // Selecting TOF Sectors to be simulated
AliTOFGeometry *fTOFGeometry; //The TOF Geometry parameters
private:
/*
$Log$
+Revision 1.7 2006/04/27 13:13:29 hristov
+Moving the destructor to the implementation file
+
Revision 1.6 2006/04/20 22:30:49 hristov
Coding conventions (Annalisa)
Float_t dx, dy, dz; // shifts
Float_t dpsi, dtheta, dphi; // angular displacements
TRandom *rnd = new TRandom(1567);
-
- TString path;
- const char *sSM71="/ALIC_1/B077_1/B071_"; //1-13
- const char *sm71="/BTO1_1";
- const char *sSM74="/ALIC_1/B077_1/B074_"; //1-2
- const char *sm74="/BTO2_1";
- const char *sSM75="/ALIC_1/B077_1/B075_"; //1-3
- const char *sm75="/BTO3_1";
-
-
- Int_t nSM71 = 13, nSM74=2, nSM75=3;
+
+ Int_t nSMTOF = 18;
AliAlignObj::ELayerID iLayer = AliAlignObj::kInvalidLayer;
UShort_t iIndex=0; //dummy volume index
// AliAlignObj::ELayerID iLayer = AliAlignObj::kTOF;
// Int_t iIndex=1; //dummy volume index
UShort_t dvoluid = AliAlignObj::LayerToVolUID(iLayer,iIndex); //dummy volume identity
Int_t i;
- for (i = 1; i<=nSM71 ; i++) {
-
- dx = (rnd->Gaus(0.,1.))*tr[0]/nSM71;
- dy = (rnd->Gaus(0.,1.))*tr[1]/nSM71;
- dz = (rnd->Gaus(0.,1.))*tr[2]/nSM71;
- dpsi = rot[0]/nSM71;
- dtheta = rot[1]/nSM71;
- dphi = rot[2]/nSM71;
-
- path = sSM71;
- path += i;
- path += sm71;
- AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi);
- fTOFAlignObjArray->Add(o);
- }
-
- for (i = 1; i<=nSM74 ; i++) {
-
- dx = (rnd->Gaus(0.,1.))*tr[0]/nSM74;
- dy = (rnd->Gaus(0.,1.))*tr[1]/nSM74;
- dz = (rnd->Gaus(0.,1.))*tr[2]/nSM74;
- dpsi = rot[0]/nSM74;
- dtheta = rot[1]/nSM74;
- dphi = rot[2]/nSM74;
-
- path = sSM74;
- path += i;
- path += sm74;
+ for (i = 0; i<nSMTOF ; i++) {
+ Char_t path[100];
+ sprintf(path,"/ALIC_1/B077_1/BSEGMO%i_1/BTOF%i_1",i,i);
+
+ dx = (rnd->Gaus(0.,1.))*tr[0];
+ dy = (rnd->Gaus(0.,1.))*tr[1];
+ dz = (rnd->Gaus(0.,1.))*tr[2];
+ dpsi = rot[0];
+ dtheta = rot[1];
+ dphi = rot[2];
AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi);
fTOFAlignObjArray->Add(o);
}
- for (i = 1; i<=nSM75; i++) {
-
- dx = (rnd->Gaus(0.,1.))*tr[0]/nSM75;
- dy = (rnd->Gaus(0.,1.))*tr[1]/nSM75;
- dz = (rnd->Gaus(0.,1.))*tr[2]/nSM75;
- dpsi = rot[0]/nSM75;
- dtheta = rot[1]/nSM75;
- dphi = rot[2]/nSM75;
-
- path = sSM75;
- path += i;
- path += sm75;
- AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi);
- fTOFAlignObjArray->Add(o);
- }
fNTOFAlignObj=fTOFAlignObjArray->GetEntries();
AliInfo(Form("Number of Alignable Volumes: %d",fNTOFAlignObj));
delete rnd;
fTOFAlignObjArray = new TObjArray(kMaxAlignObj);
Float_t dx, dy, dz; // shifts
Float_t dpsi, dtheta, dphi; // angular displacements
- TString path;
- const char *sSM71="/ALIC_1/B077_1/B071_"; //1-13
- const char *sm71="/BTO1_1";
- const char *sSM74="/ALIC_1/B077_1/B074_"; //1-2
- const char *sm74="/BTO2_1";
- const char *sSM75="/ALIC_1/B077_1/B075_"; //1-3
- const char *sm75="/BTO3_1";
- Int_t nSM71 = 13, nSM74=2, nSM75=3;
+ Int_t nSMTOF = 18;
AliAlignObj::ELayerID iLayer = AliAlignObj::kInvalidLayer;
UShort_t iIndex=0; //dummy volume index
// AliAlignObj::ELayerID iLayer = AliAlignObj::kTOF;
// Int_t iIndex=1; //dummy volume index
UShort_t dvoluid = AliAlignObj::LayerToVolUID(iLayer,iIndex); //dummy volume identity
Int_t i;
- for (i = 1; i<=nSM71 ; i++) {
-
- dx = tr[0]/nSM71;
- dy = tr[1]/nSM71;
- dz = tr[2]/nSM71;
- dpsi = rot[0]/nSM71;
- dtheta = rot[1]/nSM71;
- dphi = rot[2]/nSM71;
-
- path = sSM71;
- path += i;
- path += sm71;
- AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi);
- fTOFAlignObjArray->Add(o);
- }
-
- for (i = 1; i<=nSM74 ; i++) {
-
- dx = tr[0]/nSM74;
- dy = tr[1]/nSM74;
- dz = tr[2]/nSM74;
- dpsi = rot[0]/nSM74;
- dtheta = rot[1]/nSM74;
- dphi = rot[2]/nSM74;
-
- path = sSM74;
- path += i;
- path += sm74;
- AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi);
- fTOFAlignObjArray->Add(o);
- }
-
- for (i = 1; i<=nSM75; i++) {
-
- dx = tr[0]/nSM75;
- dy = tr[1]/nSM75;
- dz = tr[2]/nSM75;
- dpsi = rot[0]/nSM75;
- dtheta = rot[1]/nSM75;
- dphi = rot[2]/nSM75;
+ for (i = 0; i<nSMTOF ; i++) {
+
+ Char_t path[100];
+ sprintf(path,"/ALIC_1/B077_1/BSEGMO%i_1/BTOF%i_1",i,i);
+ dx = tr[0];
+ dy = tr[1];
+ dz = tr[2];
+ dpsi = rot[0];
+ dtheta = rot[1];
+ dphi = rot[2];
- path = sSM75;
- path += i;
- path += sm75;
AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi);
fTOFAlignObjArray->Add(o);
}
/*
$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)
Char_t string3[100];
Int_t icopy=-1;
-
- if(sector<3){
- icopy=sector+1;
- sprintf(string1,"/ALIC_1/B077_1/B075_%i/BTO3_1/FTOA_0/FLTA_0",icopy);
- }
- else if(sector<11){
- icopy=sector+3;
- sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1/FTOA_0/FLTA_0",icopy);
- }
- else if(sector==11 || sector==12){
- icopy=sector-10;
- sprintf(string1,"/ALIC_1/B077_1/B074_%i/BTO2_1/FTOA_0/FLTA_0",icopy);
- if(fHoles)sprintf(string1,"/ALIC_1/B077_1/B074_%i/BTO2_1",icopy);
- }
- else {
- icopy=sector-12;
- sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1/FTOA_0/FLTA_0",icopy);
- }
+
+ if(sector<13){
+ icopy=sector+5;}
+ else{ icopy=sector-13;}
+ sprintf(string1,"/ALIC_1/B077_1/BSEGMO%i_1/BTOF%i_1/FTOA_0/FLTA_0",icopy,icopy);
Int_t iplate=ind[1];
Int_t istrip=ind[2];
/*
$Log$
+Revision 1.8 2006/04/20 22:30:50 hristov
+Coding conventions (Annalisa)
+
Revision 1.7 2006/04/16 22:29:05 hristov
Coding conventions (Annalisa)
xcoor = 0.;
ycoor = 0.;
zcoor = 0.;
- gMC->Gspos("FTOA", 0, "BTO1", xcoor, ycoor, zcoor, idrotm[0], "ONLY");
- gMC->Gspos("FTOA", 0, "BTO3", xcoor, ycoor, zcoor, idrotm[0], "ONLY");
-
- if (fTOFHoles) {
- xcoor = 0.;
- ycoor = (zlenA*0.5 + kInterCentrModBorder1)*0.5;
- zcoor = 0.;
- gMC->Gspos("FTOB", 0, "BTO2", xcoor, ycoor, zcoor, idrotm[0], "ONLY");
- gMC->Gspos("FTOC", 0, "BTO2", xcoor,-ycoor, zcoor, idrotm[0], "ONLY");
+ for(Int_t isec=0;isec<18;isec++){
+ if(fTOFSectors[isec]==-1)continue;
+ char name[6];
+ sprintf(name, "BTOF%d",isec);
+ if (fTOFHoles && (isec==16||isec==17)) {
+ xcoor = 0.;
+ ycoor = (zlenA*0.5 + kInterCentrModBorder1)*0.5;
+ zcoor = 0.;
+ gMC->Gspos("FTOB", 0, name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
+ gMC->Gspos("FTOC", 0, name, xcoor,-ycoor, zcoor, idrotm[0], "ONLY");
+ }
+ else gMC->Gspos("FTOA", 0,name, xcoor, ycoor, zcoor, idrotm[0], "ONLY");
}
- else gMC->Gspos("FTOA", 0, "BTO2", xcoor, ycoor, zcoor, idrotm[0], "ONLY");
-
// Large not sensitive volumes with Insensitive Freon (FLTA, FLTB and FLTC)
-
+
Float_t xFLT, yFLT, zFLTA;
xFLT = xtof - kModuleWallThickness*2.;
Int_t *idtmed = fIdtmed->GetArray()-499;
Float_t incidenceAngle;
- const char * path71 = "B071";
- const char * path75 = "B075";
- const char * path74 = "B074";
const char* volpath;
Int_t index = 0;
strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA() - fTOFGeometry->NStripB();
}
- volpath=gMC->CurrentVolOffName(8);
- index=gMC->CurrentVolOffID(8,copy);
- index=copy;
-
+ volpath=gMC->CurrentVolOffName(7);
+ index=atoi(&volpath[4]);
sector=-1;
- if(strcmp(path71,volpath)==0 && index <6) sector=12+index;
- if(strcmp(path71,volpath)==0 && index >=6) sector=index-3;
- if(strcmp(path75,volpath)==0) sector=index-1;
- if(strcmp(path74,volpath)==0) sector=10+index;
-
+
+ if(index<5){
+ sector=index+13;
+ }
+ else{
+ sector=index-5;
+ }
+
for(i=0;i<3;++i) {
hits[i] = pos[i];
hits[i+3] = pm[i];