/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors are mentioned in the code where appropriate. *
#include "AliITS.h"
#include "AliITSDetTypeSim.h"
#include "AliITSgeom.h"
-#include "AliITSgeomSDD.h"
-#include "AliITSgeomSPD.h"
-#include "AliITSgeomSSD.h"
#include "AliITShit.h"
#include "AliITSCalibrationSDD.h"
#include "AliITSsegmentationSDD.h"
#include "AliITSv11GeometrySDD.h"
#include "AliITSv11GeometrySSD.h"
#include "AliITSv11GeometrySupport.h"
+#include "AliGeomManager.h"
ClassImp(AliITSv11Hybrid)
}
//______________________________________________________________________
-void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t yShift,
+void AliITSv11Hybrid::SetT2Lmatrix(Int_t uid, Double_t yShift,
Bool_t yFlip, Bool_t yRot180)
const {
//
// This function is used in AddAlignableVolumes()
- TGeoPNEntry *alignableEntry = gGeoManager->GetAlignableEntry(name);
- const char *path = alignableEntry->GetTitle();
-
- if (!gGeoManager->cd(path))
- AliFatal(Form("Volume path %s not valid!",path));
- TGeoHMatrix* globMatrix = gGeoManager->GetCurrentMatrix();
+ TGeoPNEntry *alignableEntry = gGeoManager->GetAlignableEntryByUID(uid);
+ TGeoHMatrix* globMatrix = alignableEntry->GetGlobalOrig();
Double_t *gtrans = globMatrix->GetTranslation(), rotMatrix[9];
memcpy(&rotMatrix[0], globMatrix->GetRotationMatrix(), 9*sizeof(Double_t));
rotMatrix[3]= 1; rotMatrix[4]= 0; rotMatrix[5]= 0;
rotMatrix[6]= 0; rotMatrix[7]= 0; rotMatrix[8]=-1;
if (yFlip) rotMatrix[3] = -1; // flipping in y (for SPD1)
+ if (yFlip) rotMatrix[1] = -1; // flipping in y (for SPD1)
if (yRot180) { // rotation of pi around the axis perpendicular to the wafer
if (yFlip) matLtoT->SetDx( -xShift ); // flipping in y (for SPD1)
return;
}
+ AliGeomManager::ELayerID layerId;
+ Int_t modUID, modnum;
+
if( !gGeoManager->SetAlignableEntry("ITS","ALIC_1/ITSV_1") )
AliFatal(Form("Unable to set alignable entry ! %s :: %s",
"ITS","ALIC_1/ITSV_1"));
TString strEntryName4;
//===== SPD layers =====
+
if (AliITSInitGeometry::SPDIsTGeoNative()) { // new SPD geometry
TString str0 = "ALIC_1/ITSV_1/ITSSPD_1/ITSSPDCarbonFiberSectorV_";
TString halfStave;
TString module;
+ layerId = AliGeomManager::kSPD1;
+ modnum = 0;
+
for(Int_t cSect = 0; cSect<10; cSect++) {
sector = str0;
for(Int_t cLad=0; cLad<2; cLad++) {
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
module = halfStave;
module += str2;
module += cLad+cHS*2+1;
strEntryName4 = strEntryName3;
strEntryName4 += strLadder;
strEntryName4 += cLad+cHS*2;
- if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),
- module.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),module.Data(),modUID))
AliFatal(Form("New lay 1: Unable to set alignable entry 4! %s::%s",
strEntryName4.Data(),module.Data()));
- SetT2Lmatrix(strEntryName4.Data(), 0.0081, kTRUE, kTRUE);
+ SetT2Lmatrix(modUID, 0.0081, kTRUE, kTRUE);
// 0.0081 is the shift between the centers of alignable
// and sensitive volumes. It is directly extracted from
// the new SPD geometry
} // end for cStave
} // end for cSect
+ layerId = AliGeomManager::kSPD2;
+ modnum = 0;
str1 = "/ITSSPDSensitiveVirtualvolumeM0_1/ITSSPDlay2-Stave_";
str2 = "/ITSSPDlay2-Ladder_";
for(Int_t cLad=0; cLad<2; cLad++) {
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
module = halfStave;
module += str2;
module += cLad+cHS*2 +1;
strEntryName4 = strEntryName3;
strEntryName4 += strLadder;
strEntryName4 += cLad+cHS*2;
- if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),
- module.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),module.Data(),modUID))
AliFatal(Form("New lay 2: Unable to set alignable entry 4! %s::%s",
strEntryName4.Data(),module.Data()));
- SetT2Lmatrix(strEntryName4.Data(), -0.0081, kFALSE);
+ SetT2Lmatrix(modUID, -0.0081, kFALSE);
} // end for cLad
} // end for cHS
} // end for cStave
TString halfStave;
TString module;
+ layerId = AliGeomManager::kSPD1;
+ modnum = 0;
+
for(Int_t cSect = 0; cSect<10; cSect++) {
sector = str0;
for(Int_t cLadder = 0; cLadder<2; cLadder++) {
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
module = halfStave;
module += str2;
module += cLadder+cHS*2+1;
strEntryName4 += strLadder;
strEntryName4 += cLadder+cHS*2;
//printf("%s == %s\n",strEntryName4.Data(),module.Data());
- if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),
- module.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),module.Data(),modUID))
AliFatal(Form("Old lay 1: Unable to set alignable entry 4! %s::%s",
- strEntryName4.Data(),module.Data()));
+ strEntryName4.Data(),module.Data()));
- SetT2Lmatrix(strEntryName4.Data(), -fChip1*0.0001/2., kTRUE);
+ SetT2Lmatrix(modUID, -fChip1*0.0001/2., kTRUE);
} // end for cLadder
} // end for cHS
} // end for cStave
} // end for cSect
+ layerId = AliGeomManager::kSPD2;
+ modnum = 0;
+
str1Bis = "/L2H-STAVE";
str1 = "/I20B_";
str2 = "/I1D7_";
for(Int_t cLad =0; cLad<2; cLad++) {
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
module = halfStave;
module += str2;
module += cLad+cHS*2+1;
strEntryName4 += strLadder;
strEntryName4 += cLad+cHS*2;
//printf("%s == %s\n",strEntryName4.Data(),module.Data());
- if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),
- module.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName4.Data(),module.Data(),modUID))
AliFatal(Form("Old lay2: Unable to set alignable entry 4! %s::%s",
strEntryName4.Data(),module.Data()));
- SetT2Lmatrix(strEntryName4.Data(), -fChip2*0.0001/2., kFALSE);
+ SetT2Lmatrix(modUID, -fChip2*0.0001/2., kFALSE);
} // end for cLad
} // end for cHS
} // end for cStave
//===== SDD layers =====
if (AliITSInitGeometry::SDDIsTGeoNative()) { // new SDD geometry
+ layerId = AliGeomManager::kSDD1;
+ modnum = 0;
TString str0 = "/ALIC_1/ITSV_1/ITSsddLayer3_1/ITSsddLadd_"; // SDD layer1
TString str1 = "/ITSsddSensor3_";
TString str2 = "/ITSsddWafer3_1";
for(Int_t c2 =0; c2<6; c2++) {
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
wafer = ladder;
wafer += str1;
wafer += c2;
strEntryName2 += strSensor;
strEntryName2 += c2;
//printf("%s == %s\n",strEntryName2.Data(),wafer.Data());
- if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
strEntryName2.Data(),wafer.Data()));
if(c1 != 2) {
- SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE, c2>=3);
+ SetT2Lmatrix(modUID, 0, kFALSE, c2>=3);
} else {// for ladder 2, mounted with a pi rot around y
- SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE, c2<3);
+ SetT2Lmatrix(modUID, 0, kFALSE, c2<3);
}
}
}
+ layerId = AliGeomManager::kSDD2;
+ modnum = 0;
str0 = "/ALIC_1/ITSV_1/ITSsddLayer4_1/ITSsddLadd_"; // SDD layer2
str1 = "/ITSsddSensor4_";
str2 = "/ITSsddWafer4_1";
for(Int_t c2 =0; c2<8; c2++) {
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
wafer = ladder;
wafer += str1;
wafer += c2;
strEntryName2 += strSensor;
strEntryName2 += c2;
//printf("%s == %s\n",strEntryName2.Data(),wafer.Data());
- if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
strEntryName2.Data(),wafer.Data()));
- SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE, c2>=4);
+ SetT2Lmatrix(modUID, 0, kFALSE, c2>=4);
}
}
} else { // else old SDD geometry
+ layerId = AliGeomManager::kSDD1;
+ modnum = 0;
+
TString str0 = "ALIC_1/ITSV_1/ITSD_1/IT34_1/I004_";
TString str1 = "/I302_";
for(Int_t c2 =1; c2<=6; c2++){
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
wafer = ladder;
wafer += str1;
wafer += c2; // one wafer
strEntryName2 = strEntryName1;
strEntryName2 += strSensor;
strEntryName2 += (c2-1);
- if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
strEntryName2.Data(),wafer.Data()));
- SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE);
+ SetT2Lmatrix(modUID, 0, kFALSE);
}
}
+ layerId = AliGeomManager::kSDD2;
+ modnum = 0;
str0 = "ALIC_1/ITSV_1/ITSD_1/IT34_1/I005_";
str1 = "/I402_";
for(Int_t c2 =1; c2<=8; c2++){
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
wafer = ladder;
wafer += str1;
wafer += c2; // one wafer
strEntryName2 = strEntryName1;
strEntryName2 += strSensor;
strEntryName2 += (c2-1);
- if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
AliFatal(Form("Unable to set alignable entry 2! %s,%s",
strEntryName2.Data(),wafer.Data()));
- SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE);
+ SetT2Lmatrix(modUID, 0, kFALSE);
}
}
} // end SDD
//===== SSD layers =====
if (AliITSInitGeometry::SSDIsTGeoNative()) { // new SSD geometry
+ layerId = AliGeomManager::kSSD1;
+ modnum = 0;
TString str0 = "/ALIC_1/ITSV_1/ITSssdLayer5_1/ITSssdLay5Ladd_";//SSD layer1
TString str1 = "/ITSssdSensor5_";
TString str2 = "";
for(Int_t c2 =0; c2<22; c2++) {
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
wafer = ladder;
wafer += str1;
wafer += c2;
strEntryName2 += strSensor;
strEntryName2 += c2;
//printf("%s == %s\n",strEntryName2.Data(),wafer.Data());
- if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
strEntryName2.Data(),wafer.Data()));
- SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE, kFALSE);
+ SetT2Lmatrix(modUID, 0, kFALSE, kFALSE);
}
}
+ layerId = AliGeomManager::kSSD2;
+ modnum = 0;
str0 = "/ALIC_1/ITSV_1/ITSssdLayer6_1/ITSssdLay6Ladd_"; // SSD layer2
str1 = "/ITSssdSensor6_";
str2 = "";
for(Int_t c2 =0; c2<25; c2++) {
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
wafer = ladder;
wafer += str1;
wafer += c2;
strEntryName2 += strSensor;
strEntryName2 += c2;
//printf("%s == %s\n",strEntryName2.Data(),wafer.Data());
- if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
strEntryName2.Data(),wafer.Data()));
- SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE, kFALSE);
+ SetT2Lmatrix(modUID, 0, kFALSE, kFALSE);
}
}
} else { // else old SSD geometry
+
+ layerId = AliGeomManager::kSSD1;
+ modnum = 0;
TString str0 = "ALIC_1/ITSV_1/ITSD_1/IT56_1/I565_";
TString str1 = "/I562_";
TString ladder;
for(Int_t c2 = 1; c2<=22; c2++){
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
wafer = ladder;
wafer += str1;
wafer += c2; // one wafer
strEntryName2 = strEntryName1;
strEntryName2 += strSensor;
strEntryName2 += (c2-1);
- if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
strEntryName2.Data(),wafer.Data()));
- SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE);
+ SetT2Lmatrix(modUID, 0, kFALSE);
}
}
+ layerId = AliGeomManager::kSSD2;
+ modnum = 0;
str0 = "ALIC_1/ITSV_1/ITSD_1/IT56_1/I569_";
str1 = "/I566_";
for(Int_t c2 = 1; c2<=25; c2++){
+ modUID = AliGeomManager::LayerToVolUID(layerId,modnum++);
wafer = ladder;
wafer += str1;
wafer += c2; // one wafer
strEntryName2 = strEntryName1;
strEntryName2 += strSensor;
strEntryName2 += (c2-1);
- if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
+ if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data(),modUID))
AliFatal(Form("Unable to set alignable entry 2! %s :: %s",
strEntryName2.Data(),wafer.Data()));
- SetT2Lmatrix(strEntryName2.Data(), 0, kFALSE);
+ SetT2Lmatrix(modUID, 0, kFALSE);
}
}
} // end SSD geometry
CreateOldGeometry();
TGeoVolume *vITS = geoManager->GetVolume("ITSV");
- TGeoVolume *vITSD = geoManager->GetVolume("ITSD");
const Char_t *cvsDate="$Date$";
if (AliITSInitGeometry::SDDIsTGeoNative()) {
fSDDgeom->Layer3(vITS);
fSDDgeom->Layer4(vITS);
- fSDDgeom->ForwardLayer3(vITSD);
- fSDDgeom->ForwardLayer4(vITSD);
+ fSDDgeom->ForwardLayer3(vITS);
+ fSDDgeom->ForwardLayer4(vITS);
}
if (AliITSInitGeometry::SSDIsTGeoNative()) {
if (AliITSInitGeometry::ServicesAreTGeoNative()) {
fSDDgeom->SDDCables(vITS);
+ fSSDgeom->SSDCables(vITS);
}
}
//======================================================================
//TGeoVolumeAssembly *dITS = new TGeoVolumeAssembly("ITSD");
+ if (! AliITSInitGeometry::SPDshieldIsTGeoNative() ||
+ ! AliITSInitGeometry::SPDIsTGeoNative() ||
+ ! AliITSInitGeometry::SDDIsTGeoNative() ||
+ ! AliITSInitGeometry::SSDIsTGeoNative() ||
+ ! AliITSInitGeometry::SDDconeIsTGeoNative() ||
+ ! AliITSInitGeometry::SSDconeIsTGeoNative() ) {
new TGeoVolumeAssembly("ITSD");
gMC->Gspos("ITSD", 1, "ITSV", 0., 0., 0., idrotm[199], "ONLY");
-
+ }
// --- Define SPD (option 'b') volumes ----------------------------
gMC->Gspos("I2CC", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
gMC->Gspos("I2CC", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");
- } // Move this graph down as you implement services in TGeo - M.S. 19mar08
// --- DEFINE PATCH PANELS AT THE END OF THE ITS CONES
// UPPER PART
gMC->Gspos("IPA2", 1, "ITSV", 0., 0., 95.25, 0, "ONLY");
gMC->Gspos("IPA2", 2, "ITSV", 0., 0., -95.25, idrotm[200], "ONLY");
+ } // Move this graph down as you implement services in TGeo - M.S. 28may08
+
// --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - COPPER PART
// UPPER PART
- dgh[0] = (ztpc-97.5)/2.;
+ dgh[0] = (ztpc-97.5-2.3)/2.;
dgh[1] = 46.2;
dgh[2] = 46.2+1.0;
dgh[3] = 62.3;
dgh[5] = 12.;
dgh[6] = 168.;
gMC->Gsvolu("ICU1", "CONS", idtmed[213], dgh, 7);
- gMC->Gspos("ICU1", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");
+ // gMC->Gspos("ICU1", 1, "ITSV", 0., 0.,97.5+dgh[0], 0, "ONLY");
+ gMC->Gspos("ICU1", 1, "ITSV", 0., 0.,-(97.5+dgh[0]+4.6), idrotm[199], "ONLY");
// --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - COPPER PART
// LOWER PART
- dgh[0] = (ztpc-97.5)/2.;
+ dgh[0] = (ztpc-97.5-2.3)/2.;
dgh[1] = 46.2;
dgh[2] = 46.2+1.0;
dgh[3] = 62.3;
dgh[5] = 192.;
dgh[6] = 348.;
gMC->Gsvolu("ICU2", "CONS", idtmed[213], dgh, 7);
- gMC->Gspos("ICU2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");
+ // gMC->Gspos("ICU2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");
+ gMC->Gspos("ICU2", 1, "ITSV", 0., 0., -(97.5+dgh[0]+4.6), idrotm[199], "ONLY");
// -- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - CARBON PART
// UPPER PART
- dgh[0] = (ztpc-97.5)/2.;
+ dgh[0] = (ztpc-97.5-2.3)/2.;
dgh[1] = 46.2+1.0;
dgh[2] = 46.2+1.0+1.5;
dgh[3] = 62.3+1.0;
dgh[5] = 12.;
dgh[6] = 168.;
gMC->Gsvolu("ICC1", "CONS", idtmed[225], dgh, 7);
- gMC->Gspos("ICC1", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");
+ // gMC->Gspos("ICC1", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");
+ gMC->Gspos("ICC1", 1, "ITSV", 0., 0., -(97.5+dgh[0]+4.6), idrotm[199], "ONLY");
// --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - CARBON PART
// LOWER PART
- dgh[0] = (ztpc-97.5)/2.;
+ dgh[0] = (ztpc-97.5-2.3)/2.;
dgh[1] = 46.2+1.0;
dgh[2] = 46.2+1.0+1.5;
dgh[3] = 62.3+1.0;
dgh[5] = 192.;
dgh[6] = 348.;
gMC->Gsvolu("ICC2", "CONS", idtmed[225], dgh, 7);
- gMC->Gspos("ICC2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");
+ // gMC->Gspos("ICC2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");
+ gMC->Gspos("ICC2", 1, "ITSV", 0., 0., -(97.5+dgh[0]+4.6), idrotm[199], "ONLY");
// -- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - COPPER PART
// UPPER PART
- dgh[0] = 62.;
+ dgh[0] = 62.2;
dgh[1] = 74.5;
dgh[2] = 0.5;
dgh[3] = 12.;
dgh[4] = 168.;
gMC->Gsvolu("ICU3", "TUBS", idtmed[213], dgh, 5);
- gMC->Gspos("ICU3", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY");
+ // gMC->Gspos("ICU3", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY");
+ gMC->Gspos("ICU3", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]+1.), idrotm[199], "ONLY");
// -- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - COPPER PART
// LOWER PART
- dgh[0] = 62.;
+ dgh[0] = 62.2;
dgh[1] = 74.5;
dgh[2] = 0.5;
dgh[3] = 192.;
dgh[4] = 348.;
gMC->Gsvolu("ICU4", "TUBS", idtmed[213], dgh, 5);
- gMC->Gspos("ICU4", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY");
+ // gMC->Gspos("ICU4", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY");
+ gMC->Gspos("ICU4", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]+1.), idrotm[199], "ONLY");
// -- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - CARBON PART
// UPPER PART
- dgh[0] = 62.1;
+ dgh[0] = 64.8;
dgh[1] = 74.5;
dgh[2] = 0.75;
dgh[3] = 12.;
dgh[4] = 168.;
gMC->Gsvolu("ICC3", "TUBS", idtmed[225], dgh, 5);
- gMC->Gspos("ICC3", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");
+ // gMC->Gspos("ICC3", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");
+ gMC->Gspos("ICC3", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), idrotm[199], "ONLY");
// -- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - CARBON PART
// LOWER PART
- dgh[0] = 62.1;
+ dgh[0] = 64.8;
dgh[1] = 74.5;
dgh[2] = 0.75;
dgh[3] = 192.;
dgh[4] = 348.;
gMC->Gsvolu("ICC4", "TUBS", idtmed[225], dgh, 5);
- gMC->Gspos("ICC4", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");
+ // gMC->Gspos("ICC4", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");
+ gMC->Gspos("ICC4", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), idrotm[199], "ONLY");
// --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
// THE ABSORBER - COPPER PART - UPPER PART
-
+
dgh[0] = 46.;
dgh[1] = 46.+1.0;
- dgh[2] = (ztpc-97.5+1.5)/2.;
+// dgh[2] = (ztpc-97.5+1.5-2.5)/2.;
+ dgh[2] = (186.6 - 101.1)/2.;
dgh[3] = 12.;
dgh[4] = 168.;
gMC->Gsvolu("ICU5", "TUBS", idtmed[213], dgh, 5);
- gMC->Gspos("ICU5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
-
+ // gMC->Gspos("ICU5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
+ gMC->Gspos("ICU5", 1, "ITSV", 0., 0., -(-101.1-dgh[2]), idrotm[199], "ONLY");
+
+ dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+ dgh[1] = 64.0;
+ dgh[2] = 64.0+1.0;
+ dgh[3] = 46.;
+ dgh[4] = 46.+1.0;
+ dgh[5] = 12.;
+ dgh[6] = 168.;
+ gMC->Gsvolu("ICU9", "CONS", idtmed[213], dgh, 7);
+ gMC->Gspos("ICU9", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
// --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
// THE ABSORBER - COPPER PART - LOWER PART
dgh[0] = 46.;
dgh[1] = 46.+1.0;
- dgh[2] = (ztpc-97.5+1.5)/2.;
+// dgh[2] = (ztpc-97.5+1.5-2.5)/2.;
+ dgh[2] = (186.6 - 101.1)/2.;
dgh[3] = 192.;
dgh[4] = 348.;
gMC->Gsvolu("ICU6", "TUBS", idtmed[213], dgh, 5);
- gMC->Gspos("ICU6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
-
+ // gMC->Gspos("ICU6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
+ gMC->Gspos("ICU6", 1, "ITSV", 0., 0., -(-101.1-dgh[2]), idrotm[199], "ONLY");
+
+ dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+ dgh[1] = 64.0;
+ dgh[2] = 64.0+1.0;
+ dgh[3] = 46.;
+ dgh[4] = 46.+1.0;
+ dgh[5] = 192.;
+ dgh[6] = 348.;
+ gMC->Gsvolu("ICU0", "CONS", idtmed[213], dgh, 7);
+ gMC->Gspos("ICU0", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
// --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
// THE ABSORBER - CARBON PART - UPPER PART
dgh[0] = 46.+1.0;
dgh[1] = 46.+1.0+1.5;
- dgh[2] = (ztpc-97.5)/2.;
+// dgh[2] = (ztpc-97.5)/2.;
+ dgh[2] = (186.6 - 101.1)/2.;
dgh[3] = 12.;
dgh[4] = 168.;
gMC->Gsvolu("ICC5", "TUBS", idtmed[225], dgh, 5);
- gMC->Gspos("ICC5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
-
+ // gMC->Gspos("ICC5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
+ gMC->Gspos("ICC5", 1, "ITSV", 0., 0., -(-101.1-dgh[2]), idrotm[199], "ONLY");
+
+ dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+ dgh[1] = 64.0+1.0;
+ dgh[2] = 64.0+1.0+1.5;
+ dgh[3] = 46.+1.0;
+ dgh[4] = 46.+1.0+1.5;
+ dgh[5] = 12.;
+ dgh[6] = 168.;
+ gMC->Gsvolu("ICC9", "CONS", idtmed[225], dgh, 7);
+ gMC->Gspos("ICC9", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
+
// --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
// THE ABSORBER - CARBON PART - LOWER PART
dgh[0] = 46.+1.0;
dgh[1] = 46.+1.0+1.5;
- dgh[2] = (ztpc-97.5)/2.;
+// dgh[2] = (ztpc-97.5)/2.;
+ dgh[2] = (186.6 - 101.1)/2.;
dgh[3] = 192.;
dgh[4] = 348.;
gMC->Gsvolu("ICC6", "TUBS", idtmed[225], dgh, 5);
- gMC->Gspos("ICC6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
+ // gMC->Gspos("ICC6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");
+ gMC->Gspos("ICC6", 1, "ITSV", 0., 0., -(-101.1-dgh[2]), idrotm[199], "ONLY");
+
+ dgh[0] = (ztpc - 1.0 - 186.6)/2.;
+ dgh[1] = 64.0+1.0;
+ dgh[2] = 64.0+1.0+1.5;
+ dgh[3] = 46.+1.0;
+ dgh[4] = 46.+1.0+1.5;
+ dgh[5] = 192.;
+ dgh[6] = 348.;
+ gMC->Gsvolu("ICC0", "CONS", idtmed[225], dgh, 7);
+ gMC->Gspos("ICC0", 1, "ITSV", 0., 0., -(-186.6-dgh[0]), idrotm[199], "ONLY");
// --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
// COPPER PART - UPPER PART
- dgh[0] = 46.;
+ dgh[0] = 64.0;
dgh[1] = 74.5;
dgh[2] = 0.5;
dgh[3] = 12.;
dgh[4] = 168.;
gMC->Gsvolu("ICU7", "TUBS", idtmed[213], dgh, 5);
- gMC->Gspos("ICU7", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]), 0, "ONLY");
+ gMC->Gspos("ICU7", 1, "ITSV", 0., 0., (ztpc+1.5+dgh[2]), idrotm[199], "ONLY");
// --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
// COPPER PART - LOWER PART
- dgh[0] = 46.;
+ dgh[0] = 64.0;
dgh[1] = 74.5;
dgh[2] = 0.5;
dgh[3] = 192.;
dgh[4] = 348.;
gMC->Gsvolu("ICU8", "TUBS", idtmed[213], dgh, 5);
- gMC->Gspos("ICU8", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]), 0, "ONLY");
+ gMC->Gspos("ICU8", 1, "ITSV", 0., 0., (ztpc+1.5+dgh[2]), idrotm[199], "ONLY");
// --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
// CARBON PART - UPPER PART
- dgh[0] = 46.+1.0;
+ dgh[0] = 64.0+1.0;
dgh[1] = 74.5;
dgh[2] = 0.75;
dgh[3] = 12.;
dgh[4] = 168.;
gMC->Gsvolu("ICC7", "TUBS", idtmed[225], dgh, 5);
- gMC->Gspos("ICC7", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), 0, "ONLY");
+ gMC->Gspos("ICC7", 1, "ITSV", 0., 0., (ztpc+dgh[2]), idrotm[199], "ONLY");
// --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
// CARBON PART - LOWER PART
- dgh[0] = 46.+1.0;
+ dgh[0] = 64.0+1.0;
dgh[1] = 74.5;
dgh[2] = 0.75;
dgh[3] = 192.;
dgh[4] = 348.;
gMC->Gsvolu("ICC8", "TUBS", idtmed[225], dgh, 5);
- gMC->Gspos("ICC8", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), 0, "ONLY");
+ gMC->Gspos("ICC8", 1, "ITSV", 0., 0., (ztpc+dgh[2]), idrotm[199], "ONLY");
+
+
// --- DEFINE HOOK TO THE TPC ON OTHER SIDE W.R.T. THE ABSORBER - UPPER PART
- dgh[0] = 74.5;
- dgh[1] = 79.5;
+ dgh[0] = 74.7;
+ dgh[1] = 75.3;
dgh[2] = 2.5;
dgh[3] = 12.;
dgh[4] = 168.;
gMC->Gsvolu("IHK1", "TUBS", idtmed[264], dgh, 5);
- gMC->Gspos("IHK1", 1, "ITSV", 0., 0., -ztpc-dgh[2], 0, "ONLY");
+ gMC->Gspos("IHK1", 1, "ITSV", 0., 0., -(-ztpc-dgh[2]), idrotm[199], "ONLY");
// --- DEFINE HOOK TO THE TPC ON OTHER SIDE W.R.T. THE ABSORBER - LOWER PART
- dgh[0] = 74.5;
- dgh[1] = 79.5;
+ dgh[0] = 74.7;
+ dgh[1] = 75.3;
dgh[2] = 2.5;
dgh[3] = 192.;
dgh[4] = 348.;
gMC->Gsvolu("IHK2", "TUBS", idtmed[264], dgh, 5);
- gMC->Gspos("IHK2", 1, "ITSV", 0., 0., -ztpc-dgh[2], 0, "ONLY");
+ gMC->Gspos("IHK2", 1, "ITSV", 0., 0., -(-ztpc-dgh[2]), idrotm[199], "ONLY");
// }
dgh[1] = 8.;
dgh[2] = 190.;
gMC->Gsvolu("IRA1", "BOX ", idtmed[268], dgh, 3);
- gMC->Gspos("IRA1", 1, "ITSV", 53.5, 0., -69.5, 0, "ONLY");
+ gMC->Gspos("IRA1", 1, "ITSV", 53.5, 0., 69.5, idrotm[199], "ONLY");
gMC->Gsvolu("IRA2", "BOX ", idtmed[268], dgh, 3);
- gMC->Gspos("IRA2", 1, "ITSV", -53.5, 0., -69.5, 0, "ONLY");
+ gMC->Gspos("IRA2", 1, "ITSV", -53.5, 0., 69.5, idrotm[199], "ONLY");
dgh[0] = 2.-0.5;// 0.5 was determined in such a way that the aluminum area is 20.9 cm^2
dgh[1] = 8.-0.5;// 0.5 was determined in such a way that the aluminum area is 20.9 cm^2
dgh[1] = 3.;
dgh[2] = 5.;// 5. comes from the fact that the volume has to be 567.6/2 cm^3
gMC->Gsvolu("ISR1", "TUBE", idtmed[284], dgh, 3);
- gMC->Gspos("ISR1", 1, "ITSV", 53.4292, 10.7053, 79.75, 0, "ONLY");
- gMC->Gspos("ISR1", 2, "ITSV", 53.4292, -10.7053, 79.75, 0, "ONLY");
- gMC->Gspos("ISR1", 3, "ITSV", -53.4292, 10.7053, 79.75, 0, "ONLY");
- gMC->Gspos("ISR1", 4, "ITSV", -53.4292, -10.7053, 79.75, 0, "ONLY");
- gMC->Gspos("ISR1", 5, "ITSV", 53.4292, 10.7053, -79.75, 0, "ONLY");
- gMC->Gspos("ISR1", 6, "ITSV", 53.4292, -10.7053, -79.75, 0, "ONLY");
- gMC->Gspos("ISR1", 7, "ITSV", -53.4292, 10.7053, -79.75, 0, "ONLY");
- gMC->Gspos("ISR1", 8, "ITSV", -53.4292, -10.7053, -79.75, 0, "ONLY");
+ gMC->Gspos("ISR1", 1, "ITSV", 53.4292, 10.7053, -79.75,idrotm[199],"ONLY");
+ gMC->Gspos("ISR1", 2, "ITSV", 53.4292, -10.7053, -79.75,idrotm[199],"ONLY");
+ gMC->Gspos("ISR1", 3, "ITSV", -53.4292, 10.7053, -79.75,idrotm[199],"ONLY");
+ gMC->Gspos("ISR1", 4, "ITSV", -53.4292, -10.7053, -79.75,idrotm[199],"ONLY");
+ gMC->Gspos("ISR1", 5, "ITSV", 53.4292, 10.7053, 79.75,idrotm[199],"ONLY");
+ gMC->Gspos("ISR1", 6, "ITSV", 53.4292, -10.7053, 79.75,idrotm[199],"ONLY");
+ gMC->Gspos("ISR1", 7, "ITSV", -53.4292, 10.7053, 79.75,idrotm[199],"ONLY");
+ gMC->Gspos("ISR1", 8, "ITSV", -53.4292, -10.7053, 79.75,idrotm[199],"ONLY");
// --- DEFINE SUPPORTS FOR RAILS ATTACHED TO THE ABSORBER
dgh[1] = 12.;
dgh[2] = 5.;
gMC->Gsvolu("ISR2", "BOX ", idtmed[210], dgh, 3);
- gMC->Gspos("ISR2", 1, "ITSV", -53.5, 0., -125.5, idrotm[199], "ONLY");
+ gMC->Gspos("ISR2", 1, "ITSV", -53.5, 0., 125.5, 0, "ONLY");
gMC->Gsvolu("ISR3", "BOX ", idtmed[210], dgh, 3);
- gMC->Gspos("ISR3", 1, "ITSV", 53.5, 0., -125.5, idrotm[199], "ONLY");
+ gMC->Gspos("ISR3", 1, "ITSV", 53.5, 0., 125.5, 0, "ONLY");
dgh[0] = 5.-2.;
dgh[1] = 12.-2.;
dgh[1] = 5.;
dgh[2] = 2.;
gMC->Gsvolu("ISR6", "TUBE", idtmed[210], dgh, 3);
- gMC->Gspos("ISR6", 1, "ITSV", 0., 54., -77., idrotm[199], "ONLY");
- gMC->Gspos("ISR6", 2, "ITSV", 0., 54., 77., idrotm[199], "ONLY");
- gMC->Gspos("ISR6", 3, "ITSV", 0., -54., 77., idrotm[199], "ONLY");
+ gMC->Gspos("ISR6", 1, "ITSV", 0., 54., 77., 0, "ONLY");
+ gMC->Gspos("ISR6", 2, "ITSV", 0., 54., -77., 0, "ONLY");
+ gMC->Gspos("ISR6", 3, "ITSV", 0., -54., -77., 0, "ONLY");
}
// Return:
// none.
- const Float_t kconv = 1.0e+04; // convert cm to microns
-
if(!fDetTypeSim){
Warning("SetDefaults","Error fDetTypeSim not defined");
return;
}
- AliITSgeomSPD *s0;
- AliITSgeomSDD *s1;
- AliITSgeomSSD *s2;
- Int_t i;
- Float_t bx[256],bz[280];
-
fDetTypeSim->SetDefaults();
- //SPD
- s0 = (AliITSgeomSPD*) GetITSgeom()->GetShape(kSPD);
- // Get shape info. Do it this way for now.
- //AliITSCalibrationSPD* resp0=new AliITSCalibrationSPD();
- AliITSsegmentationSPD* seg0 =
- (AliITSsegmentationSPD*)fDetTypeSim->GetSegmentationModel(0);
- seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSPD
- s0->GetDz()*2.*kconv, // for now.
- s0->GetDy()*2.*kconv); // x,z,y full width in microns.
- seg0->SetNPads(256,160);// Number of Bins in x and z
- for(i=000;i<256;i++) bx[i] = 50.0; // in x all are 50 microns.
- for(i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below
- for(i=160;i<280;i++) bz[i] = 0.0; // Outside of detector.
- bz[ 31] = bz[ 32] = 625.0; // first chip boundry
- bz[ 63] = bz[ 64] = 625.0; // first chip boundry
- bz[ 95] = bz[ 96] = 625.0; // first chip boundry
- bz[127] = bz[128] = 625.0; // first chip boundry
- bz[160] = 425.0; // Set so that there is no zero pixel size for fNz.
- seg0->SetBinSize(bx,bz); // Based on AliITSgeomSPD for now.
- SetSegmentationModel(kSPD,seg0);
- // set digit and raw cluster classes to be used
- const char *kData0=(fDetTypeSim->GetCalibrationModel(
- GetITSgeom()->GetStartSPD()))->DataType();
- if (strstr(kData0,"real")) fDetTypeSim->SetDigitClassName(kSPD,
- "AliITSdigit");
- else fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD");
- // SDD
- s1 = (AliITSgeomSDD*) GetITSgeom()->GetShape(kSDD);
- // Get shape info. Do it this way for now.
-
- //AliITSCalibrationSDD* resp1=new AliITSCalibrationSDD("simulated");
- AliITSsegmentationSDD* seg1 =
- (AliITSsegmentationSDD*)fDetTypeSim->GetSegmentationModel(1);
- seg1->SetDetSize(s1->GetDx()*kconv, // base this on AliITSgeomSDD
- s1->GetDz()*2.*kconv, // for now.
- s1->GetDy()*2.*kconv); // x,z,y full width in microns.
- seg1->SetNPads(256,256);// Use AliITSgeomSDD for now
- SetSegmentationModel(kSDD,seg1);
- const char *kData1=(fDetTypeSim->GetCalibrationModel(
- GetITSgeom()->GetStartSDD()))->DataType();
- AliITSCalibrationSDD* rsp =
- (AliITSCalibrationSDD*)fDetTypeSim->GetCalibrationModel(
- GetITSgeom()->GetStartSDD());
- const char *kopt=rsp->GetZeroSuppOption();
- if((!strstr(kopt,"ZS")) || strstr(kData1,"real") ){
- fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigit");
- } else fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigitSDD");
- // SSD Layer 5
-
- s2 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);
- // Get shape info. Do it this way for now.
-
-
- //SetCalibrationModel(GetITSgeom()->GetStartSSD(),
- // new AliITSCalibrationSSD("simulated"));
- AliITSsegmentationSSD* seg2 =
- (AliITSsegmentationSSD*)fDetTypeSim->GetSegmentationModel(2);
- seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD
- s2->GetDz()*2.*kconv, // for now.
- s2->GetDy()*2.*kconv); // x,z,y full width in microns.
- seg2->SetPadSize(95.,0.); // strip x pitch in microns
- seg2->SetNPads(768,0); // number of strips on each side.
- seg2->SetAngles(0.0075,0.0275); // strip angels rad P and N side.
- seg2->SetAnglesLay5(0.0075,0.0275); // strip angels rad P and N side.
- seg2->SetAnglesLay6(0.0275,0.0075); // strip angels rad P and N side.
- SetSegmentationModel(kSSD,seg2);
- const char *kData2=(fDetTypeSim->GetCalibrationModel(
- GetITSgeom()->GetStartSSD()))->DataType();
- if(strstr(kData2,"real") ) fDetTypeSim->SetDigitClassName(kSSD,
- "AliITSdigit");
- else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD");
+
if(fgkNTYPES>3){
Warning("SetDefaults",
"Only the four basic detector types are initialised!");