///////////////////////////////////////////////////////////////////////
// //
// AliZDCv3 --- new ZDC geometry //
-// with the both ZDC set geometry implemented //
+// with both ZDC arms geometry implemented //
// //
///////////////////////////////////////////////////////////////////////
#include "stdio.h"
// --- ROOT system
-#include <TBRIK.h>
#include <TMath.h>
-#include <TNode.h>
#include <TRandom.h>
#include <TSystem.h>
#include <TTree.h>
#include <TVirtualMC.h>
#include <TGeoManager.h>
#include <TGeoMatrix.h>
+#include <TGeoTube.h>
#include <TGeoCone.h>
#include <TGeoShape.h>
+#include <TGeoScaledShape.h>
#include <TGeoCompositeShape.h>
#include <TParticle.h>
// --- AliRoot classes
+#include "AliLog.h"
#include "AliConst.h"
#include "AliMagF.h"
#include "AliRun.h"
fMedSensGR(0),
fMedSensPI(0),
fMedSensTDI(0),
+ fMedSensVColl(0),
+ fMedSensLumi(0),
fNalfan(0),
fNalfap(0),
fNben(0),
fZEMLength(0),
fpLostITC(0),
fpLostD1C(0),
+ fpcVCollC(0),
fpDetectedC(0),
fnDetectedC(0),
- fnLumiC(0),
fpLostITA(0),
fpLostD1A(0),
fpLostTDI(0),
+ fpcVCollA(0),
fpDetectedA(0),
fnDetectedA(0),
- fnLumiA(0),
- fnTrou(0)
+ fVCollSideCAperture(7./2.),
+ fVCollSideCCentreY(0.),
+ fVCollSideAAperture(7./2.),
+ fVCollSideACentreY(0.),
+ fLumiLength(15.)
{
//
// Default constructor for Zero Degree Calorimeter
//
-
+ for(Int_t i=0; i<3; i++){
+ fDimZN[i] = fDimZP[i] = 0.;
+ fPosZNC[i] = fPosZNA[i] = fPosZPC[i]= fPosZPA[i] = fPosZEM[i] = 0.;
+ fFibZN[i] = fFibZP[i] = 0.;
+ }
}
//_____________________________________________________________________________
fMedSensGR(0),
fMedSensPI(0),
fMedSensTDI(0),
+ fMedSensVColl(0),
+ fMedSensLumi(0),
fNalfan(90),
fNalfap(90),
fNben(18),
fZEMLength(0),
fpLostITC(0),
fpLostD1C(0),
+ fpcVCollC(0),
fpDetectedC(0),
fnDetectedC(0),
- fnLumiC(0),
fpLostITA(0),
fpLostD1A(0),
fpLostTDI(0),
+ fpcVCollA(0),
fpDetectedA(0),
- fnDetectedA(0),
- fnLumiA(0),
- fnTrou(0)
+ fnDetectedA(0),
+ fVCollSideCAperture(7./2.),
+ fVCollSideCCentreY(0.),
+ fVCollSideAAperture(7./2.),
+ fVCollSideACentreY(0.),
+ fLumiLength(15.)
{
//
// Standard constructor for Zero Degree Calorimeter
}
//
// Parameters for hadronic calorimeters geometry
+ // Positions updated after post-installation measurements
fDimZN[0] = 3.52;
fDimZN[1] = 3.52;
fDimZN[2] = 50.;
fDimZP[1] = 6.;
fDimZP[2] = 75.;
fPosZNC[0] = 0.;
- fPosZNC[1] = 1.2;
- fPosZNC[2] = -11600.;
- fPosZPC[0] = 23.9;
+ fPosZNC[1] = 0.;
+ fPosZNC[2] = -11397.3;
+ fPosZPC[0] = 24.35;
fPosZPC[1] = 0.;
- fPosZPC[2] = -11600.;
+ fPosZPC[2] = -11389.3;
fPosZNA[0] = 0.;
- fPosZNA[1] = 1.2;
- fPosZNA[2] = 11620.;
- fPosZPA[0] = 24.;
+ fPosZNA[1] = 0.;
+ fPosZNA[2] = 11395.8;
+ fPosZPA[0] = 24.35;
fPosZPA[1] = 0.;
- fPosZPA[2] = 11620.;
+ fPosZPA[2] = 11387.8;
fFibZN[0] = 0.;
fFibZN[1] = 0.01825;
fFibZN[2] = 50.;
// Create the beam line elements
//
- Float_t zc, zq, zd1, zd2, zql, zd2l;
- Float_t conpar[9], tubpar[3], tubspar[5], boxpar[3];
- Int_t im1, im2;
+ Double_t zd1, zd2, zCorrDip, zInnTrip, zD1, zD2;
+ Double_t conpar[9], tubpar[3], tubspar[5], boxpar[3];
+
+ //-- rotation matrices for the legs
+ Int_t irotpipe1, irotpipe2;
+ gMC->Matrix(irotpipe1,90.-1.0027,0.,90.,90.,1.0027,180.);
+ gMC->Matrix(irotpipe2,90.+1.0027,0.,90.,90.,1.0027,0.);
+
//
Int_t *idtmed = fIdtmed->GetArray();
gMC->Gspos("ZDCC", 1, "ALIC", 0., 0., 0., 0, "ONLY");
- // -- FIRST SECTION OF THE BEAM PIPE (from compensator dipole to
- // the beginning of D1)
+ // -- BEAM PIPE from compensator dipole to the beginning of D1)
tubpar[0] = 6.3/2.;
tubpar[1] = 6.7/2.;
// From beginning of ZDC volumes to beginning of D1
gMC->Gsvolu("QT01", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT01 TUBE pipe from z = %f to z= %f (D1 beg.)\n",-zd1,-2*tubpar[2]-zd1);
-
- //-- SECOND SECTION OF THE BEAM PIPE (from the end of D1 to the
- // beginning of D2)
+ //printf(" QT01 TUBE pipe from z = %1.2f to z= %1.2f (D1 beg.)\n",-zd1,-2*tubpar[2]-zd1);
- //-- FROM MAGNETIC BEGINNING OF D1 TO MAGNETIC END OF D1 + 13.5 cm
- //-- Cylindrical pipe (r = 3.47) + conical flare
+ //-- BEAM PIPE from the end of D1 to the beginning of D2)
+ //-- FROM MAGNETIC BEGINNING OF D1 TO MAGNETIC END OF D1
+ //-- Cylindrical pipe (r = 3.47) + conical flare
// -> Beginning of D1
zd1 += 2.*tubpar[2];
- tubpar[0] = 3.47;
- tubpar[1] = 3.47+0.2;
- tubpar[2] = 958.5/2.;
+ tubpar[0] = 6.94/2.;
+ tubpar[1] = 7.34/2.;
+ tubpar[2] = (6909.8-zd1)/2.;
gMC->Gsvolu("QT02", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT02", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT02 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
+ //printf(" QT02 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
zd1 += 2.*tubpar[2];
- conpar[0] = 25./2.;
- conpar[1] = 10./2.;
- conpar[2] = 10.4/2.;
- conpar[3] = 6.44/2.;
- conpar[4] = 6.84/2.;
+ tubpar[0] = 9./2.;
+ tubpar[1] = 9.6/2.;
+ tubpar[2] = (7022.8-zd1)/2.;
+ gMC->Gsvolu("QT03", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QT03", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
+ // Ch.debug
+ //printf(" QT03 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+
+ zd1 += 2.*tubpar[2];
+
+ conpar[0] = 39.2/2.;
+ conpar[1] = 18./2.;
+ conpar[2] = 18.6/2.;
+ conpar[3] = 9./2.;
+ conpar[4] = 9.6/2.;
gMC->Gsvolu("QC01", "CONE", idtmed[7], conpar, 5);
gMC->Gspos("QC01", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QC01 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1);
-
- zd1 += 2.*conpar[0];
+ //printf(" QC01 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
- tubpar[0] = 10./2.;
- tubpar[1] = 10.4/2.;
- tubpar[2] = 50./2.;
- gMC->Gsvolu("QT03", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QT03", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
+ zd1 += conpar[0] * 2.;
+
+ // ******************************************************
+ // N.B.-> according to last vacuum layout
+ // private communication by D. Macina, mail 27/1/2009
+ // ******************************************************
+ // 2nd section of VCTCQ+VAMTF+TCTVB+VAMTF+TCLIA+VAMTF+1st part of VCTCP
+ Float_t totLength1 = 160.8 + 78. + 148. + 78. + 148. + 78. + 9.3;
+ //
+ tubpar[0] = 18.6/2.;
+ tubpar[1] = 7.6/2.;
+ tubpar[2] = totLength1/2.;
+// gMC->Gsvolu("QE01", "ELTU", idtmed[7], tubpar, 3);
+ // temporary replace with a scaled tube (AG)
+ TGeoTube *tubeQE01 = new TGeoTube(0.,tubpar[0],tubpar[2]);
+ TGeoScale *scaleQE01 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.);
+ TGeoScaledShape *sshapeQE01 = new TGeoScaledShape(tubeQE01, scaleQE01);
+ new TGeoVolume("QE01", sshapeQE01, gGeoManager->GetMedium(idtmed[7]));
+
+ tubpar[0] = 18.0/2.;
+ tubpar[1] = 7.0/2.;
+ tubpar[2] = totLength1/2.;
+// gMC->Gsvolu("QE02", "ELTU", idtmed[10], tubpar, 3);
+ // temporary replace with a scaled tube (AG)
+ TGeoTube *tubeQE02 = new TGeoTube(0.,tubpar[0],tubpar[2]);
+ TGeoScale *scaleQE02 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.);
+ TGeoScaledShape *sshapeQE02 = new TGeoScaledShape(tubeQE02, scaleQE02);
+ new TGeoVolume("QE02", sshapeQE02, gGeoManager->GetMedium(idtmed[10]));
+
+ gMC->Gspos("QE01", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
+ gMC->Gspos("QE02", 1, "QE01", 0., 0., 0., 0, "ONLY");
// Ch.debug
- //printf("\n QT03 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
+ //printf(" QE01 ELTU from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+
+ // Vertical collimator jaws (defined ONLY if fVCollAperture<3.5!)
+ if(fVCollSideCAperture<3.5){
+ boxpar[0] = 5.4/2.;
+ boxpar[1] = (3.5-fVCollSideCAperture-fVCollSideCCentreY-0.7)/2.;
+ if(boxpar[1]<0.) boxpar[1]=0.;
+ boxpar[2] = 124.4/2.;
+ printf("\n AliZDCv3 -> Setting SideC VCollimator jaw: aperture %1.2f center %1.2f mod.thickness %1.3f\n\n",
+ 2*fVCollSideCAperture,fVCollSideCCentreY,2*boxpar[1]);
+ gMC->Gsvolu("QCVC" , "BOX ", idtmed[13], boxpar, 3);
+ gMC->Gspos("QCVC", 1, "QE02", -boxpar[0], fVCollSideCAperture+fVCollSideCCentreY+boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY");
+ gMC->Gspos("QCVC", 2, "QE02", -boxpar[0], -fVCollSideCAperture+fVCollSideCCentreY-boxpar[1], -totLength1/2.+160.8+78.+148./2., 0, "ONLY");
+ }
+
+ zd1 += tubpar[2] * 2.;
- zd1 += tubpar[2]*2.;
+ // 2nd part of VCTCP
+ conpar[0] = 31.5/2.;
+ conpar[1] = 21.27/2.;
+ conpar[2] = 21.87/2.;
+ conpar[3] = 18.0/2.;
+ conpar[4] = 18.6/2.;
+ gMC->Gsvolu("QC02", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QC02", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
+ // Ch.debug
+ //printf(" QC02 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
- tubpar[0] = 10./2.;
- tubpar[1] = 10.4/2.;
- tubpar[2] = 10./2.;
+ zd1 += conpar[0] * 2.;
+
+ // 3rd section of VCTCP+VCDWC+VMLGB
+ Float_t totLenght2 = 9.2 + 530.5+40.;
+ tubpar[0] = 21.2/2.;
+ tubpar[1] = 21.9/2.;
+ tubpar[2] = totLenght2/2.;
gMC->Gsvolu("QT04", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT04", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT04 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
+ //printf(" QT04 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
zd1 += tubpar[2] * 2.;
- tubpar[0] = 10./2.;
- tubpar[1] = 10.4/2.;
- tubpar[2] = 3.16/2.;
+ // First part of VCTCD
+ // skewed transition cone from ID=212.7 mm to ID=797 mm
+ conpar[0] = 121./2.;
+ conpar[1] = 79.7/2.;
+ conpar[2] = 81.3/2.;
+ conpar[3] = 21.27/2.;
+ conpar[4] = 21.87/2.;
+ gMC->Gsvolu("QC03", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QC03", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
+ // Ch.debug
+ //printf(" QC03 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
+
+ zd1 += 2.*conpar[0];
+
+ // VCDGB + 1st part of VCTCH
+ tubpar[0] = 79.7/2.;
+ tubpar[1] = 81.3/2.;
+ tubpar[2] = (5*475.2+97.)/2.;
gMC->Gsvolu("QT05", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT05", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT05 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
+ //printf(" QT05 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
- zd1 += tubpar[2] * 2.;
+ zd1 += 2.*tubpar[2];
+
+ // 2nd part of VCTCH
+ // Transition from ID=797 mm to ID=196 mm:
+ // in order to simulate the thin window opened in the transition cone
+ // we divide the transition cone in three cones:
+ // (1) 8 mm thick (2) 3 mm thick (3) the third 8 mm thick
- tubpar[0] = 10.0/2.;
- tubpar[1] = 10.4/2;
- tubpar[2] = 190./2.;
- gMC->Gsvolu("QT06", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QT06", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
+ // (1) 8 mm thick
+ conpar[0] = 9.09/2.; // 15 degree
+ conpar[1] = 74.82868/2.;
+ conpar[2] = 76.42868/2.; // thickness 8 mm
+ conpar[3] = 79.7/2.;
+ conpar[4] = 81.3/2.; // thickness 8 mm
+ gMC->Gsvolu("QC04", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QC04", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT06 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
-
- zd1 += tubpar[2] * 2.;
+ //printf(" QC04 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
+
+ zd1 += 2.*conpar[0];
+
+ // (2) 3 mm thick
+ conpar[0] = 96.2/2.; // 15 degree
+ conpar[1] = 23.19588/2.;
+ conpar[2] = 23.79588/2.; // thickness 3 mm
+ conpar[3] = 74.82868/2.;
+ conpar[4] = 75.42868/2.; // thickness 3 mm
+ gMC->Gsvolu("QC05", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QC05", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
+ // Ch.debug
+ //printf(" QC05 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
+
+ zd1 += 2.*conpar[0];
- conpar[0] = 30./2.;
- conpar[1] = 20.6/2.;
- conpar[2] = 21./2.;
- conpar[3] = 10./2.;
- conpar[4] = 10.4/2.;
- gMC->Gsvolu("QC02", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QC02", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
+ // (3) 8 mm thick
+ conpar[0] = 6.71/2.; // 15 degree
+ conpar[1] = 19.6/2.;
+ conpar[2] = 21.2/2.;// thickness 8 mm
+ conpar[3] = 23.19588/2.;
+ conpar[4] = 24.79588/2.;// thickness 8 mm
+ gMC->Gsvolu("QC06", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QC06", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QC02 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1);
+ //printf(" QC06 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
+
+ zd1 += 2.*conpar[0];
- zd1 += conpar[0] * 2.;
+ // VMZAR (5 volumes)
+ tubpar[0] = 20.2/2.;
+ tubpar[1] = 20.6/2.;
+ tubpar[2] = 2.15/2.;
+ gMC->Gsvolu("QT06", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QT06", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
+ // Ch.debug
+ //printf(" QT06 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+
+ zd1 += 2.*tubpar[2];
- tubpar[0] = 20.6/2.;
- tubpar[1] = 21./2.;
- tubpar[2] = 450./2.;
+ conpar[0] = 6.9/2.;
+ conpar[1] = 23.9/2.;
+ conpar[2] = 24.3/2.;
+ conpar[3] = 20.2/2.;
+ conpar[4] = 20.6/2.;
+ gMC->Gsvolu("QC07", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QC07", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
+ // Ch.debug
+ //printf(" QC07 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
+
+ zd1 += 2.*conpar[0];
+
+ tubpar[0] = 23.9/2.;
+ tubpar[1] = 25.5/2.;
+ tubpar[2] = 17.0/2.;
gMC->Gsvolu("QT07", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT07", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT07 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
-
- zd1 += tubpar[2] * 2.;
+ //printf(" QT07 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+
+ zd1 += 2.*tubpar[2];
- conpar[0] = 13.6/2.;
- conpar[1] = 25.4/2.;
- conpar[2] = 25.8/2.;
- conpar[3] = 20.6/2.;
- conpar[4] = 21./2.;
- gMC->Gsvolu("QC03", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QC03", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
+ conpar[0] = 6.9/2.;
+ conpar[1] = 20.2/2.;
+ conpar[2] = 20.6/2.;
+ conpar[3] = 23.9/2.;
+ conpar[4] = 24.3/2.;
+ gMC->Gsvolu("QC08", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QC08", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QC03 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1);
-
- zd1 += conpar[0] * 2.;
+ //printf(" QC08 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
+
+ zd1 += 2.*conpar[0];
- tubpar[0] = 25.4/2.;
- tubpar[1] = 25.8/2.;
- tubpar[2] = 205.8/2.;
+ tubpar[0] = 20.2/2.;
+ tubpar[1] = 20.6/2.;
+ tubpar[2] = 2.15/2.;
gMC->Gsvolu("QT08", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT08", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT08 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
-
- zd1 += tubpar[2] * 2.;
+ //printf(" QT08 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+
+ zd1 += 2.*tubpar[2];
- tubpar[0] = 50./2.;
- tubpar[1] = 50.4/2.;
- // QT09 is 10 cm longer to accomodate TDI
- tubpar[2] = 515.4/2.;
+ // Flange (ID=196 mm)(last part of VMZAR and first part of VCTYB)
+ tubpar[0] = 19.6/2.;
+ tubpar[1] = 25.3/2.;
+ tubpar[2] = 4.9/2.;
gMC->Gsvolu("QT09", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT09", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT09 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
-
- zd1 += tubpar[2] * 2.;
+ //printf(" QT09 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+
+ zd1 += 2.*tubpar[2];
+ // Ch.debug
+ //printf(" Beginning of VCTYB volume @ z = %1.2f \n",-zd1);
- tubpar[0] = 50./2.;
- tubpar[1] = 50.4/2.;
- // QT10 is 10 cm shorter
- tubpar[2] = 690./2.;
+ // simulation of the trousers (VCTYB)
+ tubpar[0] = 19.6/2.;
+ tubpar[1] = 20.0/2.;
+ tubpar[2] = 3.9/2.;
gMC->Gsvolu("QT10", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT10", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT10 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
-
- zd1 += tubpar[2] * 2.;
+ //printf(" QT10 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+
+ zd1 += 2.*tubpar[2];
+
+ // transition cone from ID=196. to ID=216.6
+ conpar[0] = 32.55/2.;
+ conpar[1] = 21.66/2.;
+ conpar[2] = 22.06/2.;
+ conpar[3] = 19.6/2.;
+ conpar[4] = 20.0/2.;
+ gMC->Gsvolu("QC09", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QC09", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
+ // Ch.debug
+ //printf(" QC09 CONE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-zd1);
+
+ zd1 += 2.*conpar[0];
- tubpar[0] = 50./2.;
- tubpar[1] = 50.4/2.;
- tubpar[2] = 778.5/2.;
+ // tube
+ tubpar[0] = 21.66/2.;
+ tubpar[1] = 22.06/2.;
+ tubpar[2] = 28.6/2.;
gMC->Gsvolu("QT11", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QT11", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT11 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
+ //printf(" QT11 TUBE pipe from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+
+ zd1 += 2.*tubpar[2];
+ // Ch.debug
+ //printf(" Beginning of recombination chamber @ z = %f \n",-zd1);
+
+ // --------------------------------------------------------
+ // RECOMBINATION CHAMBER IMPLEMENTED USING TGeo CLASSES!!!!
+ // author: Chiara (August 2008)
+ // --------------------------------------------------------
+ // TRANSFORMATION MATRICES
+ // Combi transformation:
+ Double_t dx = -3.970000;
+ Double_t dy = 0.000000;
+ Double_t dz = 0.0;
+ // Rotation:
+ Double_t thx = 84.989100; Double_t phx = 180.000000;
+ Double_t thy = 90.000000; Double_t phy = 90.000000;
+ Double_t thz = 185.010900; Double_t phz = 0.000000;
+ TGeoRotation *rotMatrix1c = new TGeoRotation("c",thx,phx,thy,phy,thz,phz);
+ // Combi transformation:
+ dx = -3.970000;
+ dy = 0.000000;
+ dz = 0.0;
+ TGeoCombiTrans *rotMatrix2c = new TGeoCombiTrans("ZDCC_c1", dx,dy,dz,rotMatrix1c);
+ rotMatrix2c->RegisterYourself();
+ // Combi transformation:
+ dx = 3.970000;
+ dy = 0.000000;
+ dz = 0.0;
+ // Rotation:
+ thx = 95.010900; phx = 180.000000;
+ thy = 90.000000; phy = 90.000000;
+ thz = 180.-5.010900; phz = 0.000000;
+ TGeoRotation *rotMatrix3c = new TGeoRotation("",thx,phx,thy,phy,thz,phz);
+ TGeoCombiTrans *rotMatrix4c = new TGeoCombiTrans("ZDCC_c2", dx,dy,dz,rotMatrix3c);
+ rotMatrix4c->RegisterYourself();
+
+ // VOLUMES DEFINITION
+ // Volume: ZDCC
+ TGeoVolume *pZDCC = gGeoManager->GetVolume("ZDCC");
- zd1 += tubpar[2] * 2.;
+ conpar[0] = (90.1-0.95-0.26-0.0085)/2.;
+ conpar[1] = 0.0/2.;
+ conpar[2] = 21.6/2.;
+ conpar[3] = 0.0/2.;
+ conpar[4] = 5.8/2.;
+ new TGeoCone("QCLext", conpar[0],conpar[1],conpar[2],conpar[3],conpar[4]);
- conpar[0] = 14.18/2.;
- conpar[1] = 55./2.;
- conpar[2] = 55.4/2.;
- conpar[3] = 50./2.;
- conpar[4] = 50.4/2.;
- gMC->Gsvolu("QC04", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QC04", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
- // Ch.debug
- //printf("\n QC04 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1);
+ conpar[0] = (90.1-0.95-0.26-0.0085)/2.;
+ conpar[1] = 0.0/2.;
+ conpar[2] = 21.2/2.;
+ conpar[3] = 0.0/2.;
+ conpar[4] = 5.4/2.;
+ new TGeoCone("QCLint", conpar[0],conpar[1],conpar[2],conpar[3],conpar[4]);
+
+ // Outer trousers
+ TGeoCompositeShape *pOutTrousersC = new TGeoCompositeShape("outTrousersC", "QCLext:ZDCC_c1+QCLext:ZDCC_c2");
- zd1 += conpar[0] * 2.;
+ // Volume: QCLext
+ TGeoMedium *medZDCFe = gGeoManager->GetMedium("ZDC_ZIRONT");
+ TGeoVolume *pQCLext = new TGeoVolume("QCLext",pOutTrousersC, medZDCFe);
+ pQCLext->SetLineColor(kGreen);
+ pQCLext->SetVisLeaves(kTRUE);
+ //
+ TGeoTranslation *tr1c = new TGeoTranslation(0., 0., (Double_t) -conpar[0]-0.95-zd1);
+ //printf(" Recombination chamber from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-0.95-zd1);
+ //
+ pZDCC->AddNode(pQCLext, 1, tr1c);
+ // Inner trousers
+ TGeoCompositeShape *pIntTrousersC = new TGeoCompositeShape("intTrousersC", "QCLint:ZDCC_c1+QCLint:ZDCC_c2");
+ // Volume: QCLint
+ TGeoMedium *medZDCvoid = gGeoManager->GetMedium("ZDC_ZVOID");
+ TGeoVolume *pQCLint = new TGeoVolume("QCLint",pIntTrousersC, medZDCvoid);
+ pQCLint->SetLineColor(kTeal);
+ pQCLint->SetVisLeaves(kTRUE);
+ pQCLext->AddNode(pQCLint, 1);
+
+ zd1 += 90.1;
+ Double_t offset = 0.5;
+ zd1 = zd1+offset;
- tubpar[0] = 55./2.;
- tubpar[1] = 55.4/2.;
- tubpar[2] = 730./2.;
+ // second section : 2 tubes (ID = 54. OD = 58.)
+ tubpar[0] = 5.4/2.;
+ tubpar[1] = 5.8/2.;
+ tubpar[2] = 40.0/2.;
gMC->Gsvolu("QT12", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QT12", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
+ gMC->Gspos("QT12", 1, "ZDCC", -15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY");
+ gMC->Gspos("QT12", 2, "ZDCC", 15.8/2., 0., -tubpar[2]-zd1, 0, "ONLY");
// Ch.debug
- //printf("\n QT12 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
-
- zd1 += tubpar[2] * 2.;
+ //printf(" QT12 TUBE from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
- conpar[0] = 36.86/2.;
- conpar[1] = 68./2.;
- conpar[2] = 68.4/2.;
- conpar[3] = 55./2.;
- conpar[4] = 55.4/2.;
- gMC->Gsvolu("QC05", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QC05", 1, "ZDCC", 0., 0., -conpar[0]-zd1, 0, "ONLY");
- // Ch.debug
- //printf("\n QC05 CONE pipe from z = %f to z= %f\n",-zd1,-2*conpar[0]-zd1);
+ zd1 += 2.*tubpar[2];
- zd1 += conpar[0] * 2.;
+ // transition x2zdc to recombination chamber : skewed cone
+ conpar[0] = (10.-0.2-offset)/2.;
+ conpar[1] = 5.4/2.;
+ conpar[2] = 5.8/2.;
+ conpar[3] = 6.3/2.;
+ conpar[4] = 7.0/2.;
+ gMC->Gsvolu("QC10", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QC10", 1, "ZDCC", -7.9-0.175, 0., -conpar[0]-0.1-zd1, irotpipe1, "ONLY");
+ gMC->Gspos("QC10", 2, "ZDCC", 7.9+0.175, 0., -conpar[0]-0.1-zd1, irotpipe2, "ONLY");
+ //printf(" QC10 CONE from z = %1.2f to z= %1.2f\n",-zd1,-2*conpar[0]-0.2-zd1);
+
+ zd1 += 2.*conpar[0]+0.2;
- tubpar[0] = 68./2.;
- tubpar[1] = 68.4/2.;
- tubpar[2] = 927.3/2.;
+ // 2 tubes (ID = 63 mm OD=70 mm)
+ tubpar[0] = 6.3/2.;
+ tubpar[1] = 7.0/2.;
+ tubpar[2] = 639.8/2.;
gMC->Gsvolu("QT13", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QT13", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
- // Ch.debug
- //printf("\n QT13 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
-
- zd1 += tubpar[2] * 2.;
-
- tubpar[0] = 0./2.;
- tubpar[1] = 68.4/2.;
- tubpar[2] = 0.2/2.;
- gMC->Gsvolu("QT14", "TUBE", idtmed[8], tubpar, 3);
- gMC->Gspos("QT14", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
- // Ch.debug
- //printf("\n QT14 TUBE pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
-
- zd1 += tubpar[2] * 2.;
-
- tubpar[0] = 0./2.;
- tubpar[1] = 6.4/2.;
- tubpar[2] = 0.2/2.;
- gMC->Gsvolu("QT15", "TUBE", idtmed[11], tubpar, 3);
- //-- Position QT15 inside QT14
- gMC->Gspos("QT15", 1, "QT14", -7.7, 0., 0., 0, "ONLY");
-
- gMC->Gsvolu("QT16", "TUBE", idtmed[11], tubpar, 3);
- //-- Position QT16 inside QT14
- gMC->Gspos("QT16", 1, "QT14", 7.7, 0., 0., 0, "ONLY");
-
-
- //-- BEAM PIPE BETWEEN END OF CONICAL PIPE AND BEGINNING OF D2
-
- tubpar[0] = 6.4/2.;
- tubpar[1] = 6.8/2.;
- tubpar[2] = 680.8/2.;
- gMC->Gsvolu("QT17", "TUBE", idtmed[7], tubpar, 3);
-
- tubpar[0] = 6.4/2.;
- tubpar[1] = 6.8/2.;
- tubpar[2] = 680.8/2.;
- gMC->Gsvolu("QT18", "TUBE", idtmed[7], tubpar, 3);
-
- // -- ROTATE PIPES
- Float_t angle = 0.143*kDegrad; // Rotation angle
-
- //AliMatrix(im1, 90.+0.143, 0., 90., 90., 0.143, 0.); // x<0
- gMC->Matrix(im1, 90.+0.143, 0., 90., 90., 0.143, 0.); // x<0
- gMC->Gspos("QT17", 1, "ZDCC", TMath::Sin(angle) * 680.8/ 2. - 9.4,
- 0., -tubpar[2]-zd1, im1, "ONLY");
- //printf("\n QT17-18 pipe from z = %f to z= %f\n",-zd1,-2*tubpar[2]-zd1);
-
- //AliMatrix(im2, 90.-0.143, 0., 90., 90., 0.143, 180.); // x>0 (ZP)
- gMC->Matrix(im2, 90.-0.143, 0., 90., 90., 0.143, 180.); // x>0 (ZP)
- gMC->Gspos("QT18", 1, "ZDCC", 9.7 - TMath::Sin(angle) * 680.8 / 2.,
- 0., -tubpar[2]-zd1, im2, "ONLY");
+ gMC->Gspos("QT13", 1, "ZDCC", -16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY");
+ gMC->Gspos("QT13", 2, "ZDCC", 16.5/2., 0., -tubpar[2]-zd1, 0, "ONLY");
+ //printf(" QT13 TUBE from z = %1.2f to z= %1.2f\n",-zd1,-2*tubpar[2]-zd1);
+
+ zd1 += 2.*tubpar[2];
+ //printf(" END OF SIDE C BEAM PIPE DEFINITION @ z = %f\n",-zd1);
+
// -- Luminometer (Cu box) in front of ZN - side C
boxpar[0] = 8.0/2.;
boxpar[1] = 8.0/2.;
- boxpar[2] = 15./2.;
- gMC->Gsvolu("QLUC", "BOX ", idtmed[6], boxpar, 3);
+ boxpar[2] = fLumiLength/2.;
+ gMC->Gsvolu("QLUC", "BOX ", idtmed[9], boxpar, 3);
gMC->Gspos("QLUC", 1, "ZDCC", 0., 0., fPosZNC[2]+66.+boxpar[2], 0, "ONLY");
- //printf("\n QLUC LUMINOMETER from z = %f to z= %f\n", fPosZNC[2]+66., fPosZNC[2]+66.+2*boxpar[2]);
+ //printf(" QLUC LUMINOMETER from z = %1.2f to z= %1.2f\n", fPosZNC[2]+66., fPosZNC[2]+66.+2*boxpar[2]);
// -- END OF BEAM PIPE VOLUME DEFINITION FOR SIDE C (RB26 SIDE)
// ----------------------------------------------------------------
///////////////////////////////////////////////////////////////
// Rotation Matrices definition
- Int_t irotpipe2, irotpipe1;
- //Int_t irotpipe5, irotpipe6
- Int_t irotpipe7, irotpipe8;
- //-- rotation matrices for the tilted tube before and after the TDI
- gMC->Matrix(irotpipe2,90.+6.3025,0.,90.,90.,6.3025,0.);
+ Int_t irotpipe3, irotpipe4, irotpipe5;
//-- rotation matrices for the tilted cone after the TDI to recenter vacuum chamber
- gMC->Matrix(irotpipe1,90.-2.2918,0.,90.,90.,2.2918,180.);
- //-- rotation matrices for the legs
- /*gMC->Matrix(irotpipe5,90.-5.0109,0.,90.,90.,5.0109,180.);
- gMC->Matrix(irotpipe6,90.+5.0109,0.,90.,90.,5.0109,0.);*/
- gMC->Matrix(irotpipe7,90.-1.0027,0.,90.,90.,1.0027,180.);
- gMC->Matrix(irotpipe8,90.+1.0027,0.,90.,90.,1.0027,0.);
+ gMC->Matrix(irotpipe3,90.-1.8934,0.,90.,90.,1.8934,180.);
+ //-- rotation matrices for the tilted tube before and after the TDI
+ gMC->Matrix(irotpipe4,90.-3.8,0.,90.,90.,3.8,180.);
+ //-- rotation matrix for the tilted cone after the TDI
+ gMC->Matrix(irotpipe5,90.+9.8,0.,90.,90.,9.8,0.);
// -- Mother of the ZDCs (Vacuum PCON)
zd2 = 1910.22;// zd2 initial value
gMC->Gsvolu("ZDCA", "PCON", idtmed[10], conpar, 9);
gMC->Gspos("ZDCA", 1, "ALIC", 0., 0., 0., 0, "ONLY");
+ // To avoid overlaps 1 micron are left between certain volumes!
+ Double_t dxNoOverlap = 0.0;
+ //zd2 += dxNoOverlap;
+
// BEAM PIPE from 19.10 m to inner triplet beginning (22.965 m)
tubpar[0] = 6.0/2.;
tubpar[1] = 6.4/2.;
- tubpar[2] = (386.5 - 0.22)/2.;
+ tubpar[2] = 386.28/2. - dxNoOverlap;
gMC->Gsvolu("QA01", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QA01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf("\n QA01 TUBE from z = %f to z= %f (Inner triplet beg.)\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA01 TUBE centred in %f from z = %1.2f to z= %1.2f (IT begin)\n",tubpar[2]+zd2,zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
// beginning of D1)
tubpar[0] = 6.3/2.;
tubpar[1] = 6.7/2.;
- tubpar[2] = 3541.8/2.;
+ tubpar[2] = 3541.8/2. - dxNoOverlap;
gMC->Gsvolu("QA02", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QA02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf("\n QA02 TUBE from z = %f to z= %f (D1 beg.)\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA02 TUBE from z = %1.2f to z= %1.2f (D1 begin)\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
// 1) 80.1 cm still with ID = 6.75 radial beam screen
// 2) 2.5 cm conical section from ID = 6.75 to ID = 8.0 cm
// 3) 43.9 cm straight section (tube) with ID = 8.0 cm
- //
- //printf("\n Beginning of D1 at z= %f\n",zd2);
tubpar[0] = 6.75/2.;
tubpar[1] = 7.15/2.;
gMC->Gsvolu("QA03", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QA03", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf("\n QA03 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA03 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
conpar[4] = 8.4/2.;
gMC->Gsvolu("QA04", "CONE", idtmed[7], conpar, 5);
gMC->Gspos("QA04", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" QA04 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ //printf(" QA04 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
tubpar[0] = 8.0/2.;
tubpar[1] = 8.4/2.;
- tubpar[2] = 43.9/2.;
+ tubpar[2] = (43.9+20.+28.5+28.5)/2.;
gMC->Gsvolu("QA05", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QA05", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf("\n QA05 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
- zd2 += 2.*tubpar[2];
-
- // Bellow (ID=80 mm) - length = 0.2 m - VMAA
- tubpar[0] = 8.0/2.;
- tubpar[1] = 8.4/2.;
- tubpar[2] = 20./2.;
- gMC->Gsvolu("QA06", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA06", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA06 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
- zd2 += 2.*tubpar[2];
-
- // Beam Position Monitor (ID=80 mm) Cu - BPMSX
- tubpar[0] = 8.0/2.;
- tubpar[1] = 8.4/2.;
- tubpar[2] = 28.5/2.;
- gMC->Gsvolu("QA07", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA07", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA07 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
- zd2 += 2.*tubpar[2];
-
- // First section of VAEHI (tube ID=80mm)
- tubpar[0] = 8.0/2.;
- tubpar[1] = 8.4/2.;
- tubpar[2] = 28.5/2.;
- gMC->Gsvolu("QAV1", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QAV1", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QAV1 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA05 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
conpar[2] = 8.4/2.;
conpar[3] = 9.8/2.;
conpar[4] = 10.2/2.;
- gMC->Gsvolu("QAV2", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QAV2", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" QAV2 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ gMC->Gsvolu("QAV1", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QAV1", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
+ //printf(" QAV1 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
conpar[2] = 10.2/2.;
conpar[3] = 9.0/2.;
conpar[4] = 9.4/2.;
- gMC->Gsvolu("QAV3", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QAV3", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" QAV3 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ gMC->Gsvolu("QAV2", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QAV2", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
+ //printf(" QAV2 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
tubpar[0] = 9.0/2.;
tubpar[1] = 9.4/2.;
tubpar[2] = 31.0/2.;
- gMC->Gsvolu("QAV4", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QAV4", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gsvolu("QAV3", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QAV3", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" QAV4 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QAV3 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
conpar[4] = 13.0/2.;
gMC->Gsvolu("Q01T", "CONE", idtmed[7], conpar, 5);
gMC->Gspos("Q01T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" Q01T CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ //printf(" Q01T CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
gMC->Gsvolu("Q02T", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("Q02T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" Q02T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" Q02T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
conpar[4] = 14.2/2.;
gMC->Gsvolu("Q03T", "CONE", idtmed[7], conpar, 5);
gMC->Gspos("Q03T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" Q03T CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ //printf(" Q03T CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
gMC->Gsvolu("Q04T", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("Q04T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" Q04T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" Q04T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
gMC->Gsvolu("Q05T", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("Q05T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" Q05T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" Q05T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
gMC->Gsvolu("Q06T", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("Q06T", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" Q06T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" Q06T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
conpar[4] = 18.4/2.;
gMC->Gsvolu("Q07T", "CONE", idtmed[7], conpar, 5);
gMC->Gspos("Q07T", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" Q07T CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ //printf(" Q07T CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
// Upper section : one single phi segment of a tube
// 5 parameters for tubs: inner radius = 0.,
- // outer radius = 7.5 cm, half length = 50 cm
+ // outer radius = 7. cm, half length = 50 cm
// phi1 = 0., phi2 = 180.
tubspar[0] = 0.0/2.;
- tubspar[1] = 15.0/2.;
+ tubspar[1] = 14.0/2.;
tubspar[2] = 100.0/2.;
tubspar[3] = 0.;
tubspar[4] = 180.;
gMC->Gsvolu("Q08T", "TUBS", idtmed[7], tubspar, 5);
// Ch.debug
- //printf("\n upper part : one single phi segment of a tube (Q08T)\n");
+ //printf(" upper part : one single phi segment of a tube (Q08T)\n");
// rectangular beam pipe inside TCDD upper section (Vacuum)
boxpar[0] = 7.0/2.;
- boxpar[1] = 2.5/2.;
+ boxpar[1] = 2.2/2.;
boxpar[2] = 100./2.;
gMC->Gsvolu("Q09T", "BOX ", idtmed[10], boxpar, 3);
// positioning vacuum box in the upper section of TCDD
- gMC->Gspos("Q09T", 1, "Q08T", 0., 1.25, 0., 0, "ONLY");
+ gMC->Gspos("Q09T", 1, "Q08T", 0., 1.1, 0., 0, "ONLY");
// lower section : one single phi segment of a tube
tubspar[0] = 0.0/2.;
- tubspar[1] = 15.0/2.;
+ tubspar[1] = 14.0/2.;
tubspar[2] = 100.0/2.;
tubspar[3] = 180.;
tubspar[4] = 360.;
gMC->Gsvolu("Q10T", "TUBS", idtmed[7], tubspar, 5);
// rectangular beam pipe inside TCDD lower section (Vacuum)
boxpar[0] = 7.0/2.;
- boxpar[1] = 2.5/2.;
+ boxpar[1] = 2.2/2.;
boxpar[2] = 100./2.;
gMC->Gsvolu("Q11T", "BOX ", idtmed[10], boxpar, 3);
// positioning vacuum box in the lower section of TCDD
- gMC->Gspos("Q11T", 1, "Q10T", 0., -1.25, 0., 0, "ONLY");
+ gMC->Gspos("Q11T", 1, "Q10T", 0., -1.1, 0., 0, "ONLY");
- // positioning TCDD elements in ZDC2, (inside TCDD volume)
- gMC->Gspos("Q08T", 1, "ZDCA", 0., 2.5, -100+zd2, 0, "ONLY");
- gMC->Gspos("Q10T", 1, "ZDCA", 0., -2.5, -100+zd2, 0, "ONLY");
+ // positioning TCDD elements in ZDCA, (inside TCDD volume)
+ gMC->Gspos("Q08T", 1, "ZDCA", 0., 2., -100.+zd2, 0, "ONLY");
+ gMC->Gspos("Q10T", 1, "ZDCA", 0., -2., -100.+zd2, 0, "ONLY");
// RF screen
boxpar[0] = 0.2/2.;
- boxpar[1] = 5.0/2.;
+ boxpar[1] = 4.0/2.;
boxpar[2] = 100./2.;
gMC->Gsvolu("Q12T", "BOX ", idtmed[7], boxpar, 3);
// positioning RF screen at both sides of TCDD
- gMC->Gspos("Q12T", 1, "ZDCA", tubspar[1]+boxpar[0], 0., -100+zd2, 0, "ONLY");
- gMC->Gspos("Q12T", 2, "ZDCA", -tubspar[1]-boxpar[0], 0., -100+zd2, 0, "ONLY");
+ gMC->Gspos("Q12T", 1, "ZDCA", tubspar[1]+boxpar[0], 0., -100.+zd2, 0, "ONLY");
+ gMC->Gspos("Q12T", 2, "ZDCA", -tubspar[1]-boxpar[0], 0., -100.+zd2, 0, "ONLY");
//---------------------------- TCDD end ---------------------------------------
- // Bellow (ID=80 mm) - length = 0.3 m - VMAAB
- tubpar[0] = 8.0/2.;
- tubpar[1] = 8.4/2.;
- tubpar[2] = 30.0/2.;
- gMC->Gsvolu("QA08", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA08", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA08 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
- zd2 += 2.*tubpar[2];
+ // The following elliptical tube 180 mm x 70 mm
+ // (obtained positioning the void QA09 in QA08)
+ // represents VMTSA (780 mm) + space reserved to the TCTVB (1480 mm)+
+ // VMTSA (780 mm) + first part of VCTCP (93 mm)
+
+ tubpar[0] = 18.4/2.;
+ tubpar[1] = 7.4/2.;
+ tubpar[2] = 313.3/2.;
+// gMC->Gsvolu("QA06", "ELTU", idtmed[7], tubpar, 3);
+ // temporary replace with a scaled tube (AG)
+ TGeoTube *tubeQA06 = new TGeoTube(0.,tubpar[0],tubpar[2]);
+ TGeoScale *scaleQA06 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.);
+ TGeoScaledShape *sshapeQA06 = new TGeoScaledShape(tubeQA06, scaleQA06);
+ new TGeoVolume("QA06", sshapeQA06, gGeoManager->GetMedium(idtmed[7]));
+ //printf(" QA06 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
+
+ tubpar[0] = 18.0/2.;
+ tubpar[1] = 7.0/2.;
+ tubpar[2] = 313.3/2.;
+// gMC->Gsvolu("QA07", "ELTU", idtmed[10], tubpar, 3);
+ // temporary replace with a scaled tube (AG)
+ TGeoTube *tubeQA07 = new TGeoTube(0.,tubpar[0],tubpar[2]);
+ TGeoScale *scaleQA07 = new TGeoScale(1., tubpar[1]/tubpar[0], 1.);
+ TGeoScaledShape *sshapeQA07 = new TGeoScaledShape(tubeQA07, scaleQA07);
+ new TGeoVolume("QA07", sshapeQA07, gGeoManager->GetMedium(idtmed[10]));
+ //printf(" QA07 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
+ gMC->Gspos("QA06", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gspos("QA07", 1, "QA06", 0., 0., 0., 0, "ONLY");
+
+ // Vertical collimator jaws (defined ONLY if fVCollAperture<3.5!)
+ if(fVCollSideAAperture<3.5){
+ boxpar[0] = 5.4/2.;
+ boxpar[1] = (3.5-fVCollSideAAperture-fVCollSideACentreY-0.7)/2.;
+ if(boxpar[1]<0.) boxpar[1]=0.;
+ boxpar[2] = 124.4/2.;
+ gMC->Gsvolu("QCVA" , "BOX ", idtmed[13], boxpar, 3);
+ gMC->Gspos("QCVA", 1, "QA07", -boxpar[0], fVCollSideAAperture+fVCollSideACentreY+boxpar[1], -313.3/2.+78.+148./2., 0, "ONLY");
+ gMC->Gspos("QCVA", 2, "QA07", -boxpar[0], -fVCollSideAAperture+fVCollSideACentreY-boxpar[1], -313.3/2.+78.+148./2., 0, "ONLY");
+ }
- // Flange (ID=80 mm) Cu (first section of VCTCE)
- tubpar[0] = 8.0/2.;
- tubpar[1] = 8.4/2.;
- tubpar[2] = 2.0/2.;
- gMC->Gsvolu("QA09", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA09", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA09 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
zd2 += 2.*tubpar[2];
-
- // transition cone from ID=80 to ID=212 (second section of VCTCE)
- conpar[0] = 25.0/2.;
- conpar[1] = 8.0/2.;
- conpar[2] = 8.4/2.;
- conpar[3] = 21.2/2.;
- conpar[4] = 21.8/2.;
- gMC->Gsvolu("QA10", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QA10", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" QA10 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+
+ // VCTCP second part: transition cone from ID=180 to ID=212.7
+ conpar[0] = 31.5/2.;
+ conpar[1] = 18.0/2.;
+ conpar[2] = 18.6/2.;
+ conpar[3] = 21.27/2.;
+ conpar[4] = 21.87/2.;
+ gMC->Gsvolu("QA08", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA08", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
+ // Ch.debug
+ //printf(" QA08 CONE from z = %Third part of VCTCR: tube (ID=196 mm) f to z = %f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
- // tube (ID=212 mm) Cu (third section of VCTCE)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = 403.54/2.;
- gMC->Gsvolu("QA11", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA11", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA11 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
- zd2 += 2.*tubpar[2];
-
- // bellow (ID=212 mm) (VMBGA)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = 40.0/2.;
- gMC->Gsvolu("QA12", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA12", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA12 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ // Tube ID 212.7 mm
+ // Represents VCTCP third part (92 mm) + VCDWB (765 mm) + VMBGA (400 mm) +
+ // VCDWE (300 mm) + VMBGA (400 mm)
+ tubpar[0] = 21.27/2.;
+ tubpar[1] = 21.87/2.;
+ tubpar[2] = 195.7/2.;
+ gMC->Gsvolu("QA09", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA09", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ //printf(" QA09 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
-
- // TDI valve assembly (ID=212 mm)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = 30.0/2.;
- gMC->Gsvolu("QA13", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA13", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA13 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
- zd2 += 2.*tubpar[2];
-
- // bellow (ID=212 mm) (VMBGA)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = 40.0/2.;
- gMC->Gsvolu("QA14", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA14", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA14 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
- zd2 += 2.*tubpar[2];
-
- // skewed transition piece (ID=212 mm) (before TDI)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = (20.0-2.41)/2.;
- gMC->Gsvolu("QA15", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA15", 1, "ZDCA", 1.10446, 0., tubpar[2]+2.41/2.+zd2, irotpipe2, "ONLY");
- // Ch.debug
- //printf(" QA15 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+2.41+zd2);
+ // skewed transition piece (ID=212.7 mm to 332 mm) (before TDI)
+ conpar[0] = (50.0-0.73-1.13)/2.;
+ conpar[1] = 21.27/2.;
+ conpar[2] = 21.87/2.;
+ conpar[3] = 33.2/2.;
+ conpar[4] = 33.8/2.;
+ gMC->Gsvolu("QA10", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA10", 1, "ZDCA", -1.66, 0., conpar[0]+0.73+zd2, irotpipe4, "ONLY");
+ // Ch.debug
+ //printf(" QA10 skewed CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+0.73+1.13+zd2);
- zd2 += 2.*tubpar[2]+2.41;
+ zd2 += 2.*conpar[0]+0.73+1.13;
// Vacuum chamber containing TDI
tubpar[0] = 0.;
gMC->Gsvolu("Q13T", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("Q13T", 1, "Q13TM", 0., 0., 0., 0, "ONLY");
// Ch.debug
- //printf(" Q13T TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" Q13T TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
gMC->Gspos("QTD5", 1, "Q13TM", -3.8+10.6, 0., 0., 0, "ONLY");
//---------------- END DEFINING TDI INSIDE Q13T -------------------------------
- // skewed transition piece (ID=212 mm) (after TDI)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = (20.0-2.41)/2.;
- gMC->Gsvolu("QA16", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA16", 1, "ZDCA", 1.10446+2.2, 0., tubpar[2]+2.41/2.+zd2, irotpipe2, "ONLY");
- // Ch.debug
- //printf(" QA16 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+2.41+zd2);
-
- zd2 += 2.*tubpar[2]+2.41;
-
- // bellow (ID=212 mm) (VMBGA)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = 40.0/2.;
- gMC->Gsvolu("QA17", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA17", 1, "ZDCA", 4.4, 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA17 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ // VCTCG skewed transition piece (ID=332 mm to 212.7 mm) (after TDI)
+ conpar[0] = (50.0-2.92-1.89)/2.;
+ conpar[1] = 33.2/2.;
+ conpar[2] = 33.8/2.;
+ conpar[3] = 21.27/2.;
+ conpar[4] = 21.87/2.;
+ gMC->Gsvolu("QA11", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA11", 1, "ZDCA", 4.32-3.8, 0., conpar[0]+2.92+zd2, irotpipe5, "ONLY");
+ // Ch.debug
+ //printf(" QA11 skewed CONE from z = %f to z =%f\n",zd2,2*conpar[0]+2.92+1.89+zd2);
- zd2 += 2.*tubpar[2];
+ zd2 += 2.*conpar[0]+2.92+1.89;
- // TDI valve assembly (ID=212 mm)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = 30.0/2.;
- gMC->Gsvolu("QA18", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA18", 1, "ZDCA", 4.4, 0., tubpar[2]+zd2, 0, "ONLY");
+ // The following tube ID 212.7 mm
+ // represents VMBGA (400 mm) + VCDWE (300 mm) + VMBGA (400 mm) +
+ // BTVTS (600 mm) + VMLGB (400 mm)
+ tubpar[0] = 21.27/2.;
+ tubpar[1] = 21.87/2.;
+ tubpar[2] = 210.0/2.;
+ gMC->Gsvolu("QA12", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA12", 1, "ZDCA", 4., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" QA18 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA12 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
- // bellow (ID=212 mm) (VMBGA)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = 40.0/2.;
- gMC->Gsvolu("QA19", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA19", 1, "ZDCA", 4.4, 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA19 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
- zd2 += 2.*tubpar[2];
-
- // vacuum chamber (ID=212 mm) (BTVST)
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = 50.0/2.;
- gMC->Gsvolu("QA20", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA20", 1, "ZDCA", 4.4, 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA20 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
- zd2 += 2.*tubpar[2];
-
- // bellow (ID=212 mm) (VMBGA) repeated 3 times
- tubpar[0] = 21.2/2.;
- tubpar[1] = 21.8/2.;
- tubpar[2] = 120.0/2.;
- gMC->Gsvolu("QA21", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA21", 1, "ZDCA", 4.4, 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA21 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
-
- zd2 += 2.*tubpar[2];
-
- // skewed transition cone from ID=212 mm to ID=797 mm SS for the moment
- conpar[0] = (110.0-0.44-1.63)/2.;
- conpar[1] = 21.2/2.;
- conpar[2] = 21.8/2.;
+ // First part of VCTCC
+ // skewed transition cone from ID=212.7 mm to ID=797 mm
+ conpar[0] = (121.0-0.37-1.35)/2.;
+ conpar[1] = 21.27/2.;
+ conpar[2] = 21.87/2.;
conpar[3] = 79.7/2.;
conpar[4] = 81.3/2.;
- gMC->Gsvolu("QA22", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QA22", 1, "ZDCA", 4.4-2.201, 0., conpar[0]+0.44+zd2, irotpipe1, "ONLY");
- //printf(" QA22 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+0.44+1.63+zd2);
+ gMC->Gsvolu("QA13", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA13", 1, "ZDCA", 4.-2., 0., conpar[0]+0.37+zd2, irotpipe3, "ONLY");
+ // Ch.debug
+ //printf(" QA13 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+0.37+1.35+zd2);
- zd2 += 2.*conpar[0]+0.44+1.63;
+ zd2 += 2.*conpar[0]+0.37+1.35;
- // beam pipe (ID=797 mm) SS
+ // The following tube ID 797 mm --- (volume QA16)
+ // represents the second part of VCTCC (4272 mm) +
+ // 4 x VCDGA (4 x 4272 mm) +
+ // the first part of VCTCR (850 mm)
tubpar[0] = 79.7/2.;
tubpar[1] = 81.3/2.;
- tubpar[2] = 2393.05/2.;
- gMC->Gsvolu("QA23", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA23", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA23 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ tubpar[2] = 2221./2.;
+ gMC->Gsvolu("QA14", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA14", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ // Ch.debug
+ //printf(" QA14 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
-
- // Transition from ID=797 mm to ID=196 mm SS for the moment:
- //
+
+ // Second part of VCTCR
+ // Transition from ID=797 mm to ID=196 mm:
// in order to simulate the thin window opened in the transition cone
// we divide the transition cone in three cones:
- // the first 8 mm thick
- // the second 3 mm thick
- // the third 8 mm thick
- //
- // First section
+ // (1) 8 mm thick (2) 3 mm thick (3) the third 8 mm thick
+
+ // (1) 8 mm thick
conpar[0] = 9.09/2.; // 15 degree
conpar[1] = 79.7/2.;
conpar[2] = 81.3/2.; // thickness 8 mm
conpar[3] = 74.82868/2.;
conpar[4] = 76.42868/2.; // thickness 8 mm
- gMC->Gsvolu("Q24A", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("Q24A", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" Q24A CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ gMC->Gsvolu("QA15", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA15", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
+ //printf(" QA15 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
- // Second section
+ // (2) 3 mm thick
conpar[0] = 96.2/2.; // 15 degree
conpar[1] = 74.82868/2.;
conpar[2] = 75.42868/2.; // thickness 3 mm
conpar[3] = 23.19588/2.;
conpar[4] = 23.79588/2.; // thickness 3 mm
- gMC->Gsvolu("QA25", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QA25", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" QA25 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ gMC->Gsvolu("QA16", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA16", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
+ //printf(" QA16 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
- // Third section
+ // (3) 8 mm thick
conpar[0] = 6.71/2.; // 15 degree
conpar[1] = 23.19588/2.;
conpar[2] = 24.79588/2.;// thickness 8 mm
conpar[3] = 19.6/2.;
conpar[4] = 21.2/2.;// thickness 8 mm
- gMC->Gsvolu("QA26", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QA26", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
- //printf(" QA26 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ gMC->Gsvolu("QA17", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA17", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
+ //printf(" QA19 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
-
- // beam pipe (ID=196 mm)
+
+ // Third part of VCTCR: tube (ID=196 mm)
tubpar[0] = 19.6/2.;
tubpar[1] = 21.2/2.;
tubpar[2] = 9.55/2.;
- gMC->Gsvolu("QA27", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA27", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA27 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ gMC->Gsvolu("QA18", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA18", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ // Ch.debug
+ //printf(" QA18 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
- // Flange (ID=196 mm)
+ // Flange (ID=196 mm) (last part of VCTCR and first part of VMZAR)
tubpar[0] = 19.6/2.;
tubpar[1] = 25.3/2.;
tubpar[2] = 4.9/2.;
gMC->Gsvolu("QF01", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QF01", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QF01 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ // Ch.debug
+ //printf(" QF01 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
- // Special Warm Module (made by 5 volumes)
+ // VMZAR (5 volumes)
tubpar[0] = 20.2/2.;
tubpar[1] = 20.6/2.;
tubpar[2] = 2.15/2.;
- gMC->Gsvolu("QA28", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA28", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QA28 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ gMC->Gsvolu("QA19", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA19", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ // Ch.debug
+ //printf(" QA19 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
conpar[2] = 20.6/2.;
conpar[3] = 23.9/2.;
conpar[4] = 24.3/2.;
- gMC->Gsvolu("QA29", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QA29", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
+ gMC->Gsvolu("QA20", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA20", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" QA29 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ //printf(" QA20 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
tubpar[0] = 23.9/2.;
tubpar[1] = 25.5/2.;
tubpar[2] = 17.0/2.;
- gMC->Gsvolu("QA30", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA30", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gsvolu("QA21", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA21", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" QA30 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA21 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
conpar[2] = 24.3/2.;
conpar[3] = 20.2/2.;
conpar[4] = 20.6/2.;
- gMC->Gsvolu("QA31", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QA31", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
+ gMC->Gsvolu("QA22", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA22", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" QA31 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ //printf(" QA22 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
tubpar[0] = 20.2/2.;
tubpar[1] = 20.6/2.;
tubpar[2] = 2.15/2.;
- gMC->Gsvolu("QA32", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA32", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gsvolu("QA23", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA23", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" QA32 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA23 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
- // Flange (ID=196 mm)
+ // Flange (ID=196 mm)(last part of VMZAR and first part of VCTYD)
tubpar[0] = 19.6/2.;
tubpar[1] = 25.3/2.;
tubpar[2] = 4.9/2.;
gMC->Gsvolu("QF02", "TUBE", idtmed[7], tubpar, 3);
gMC->Gspos("QF02", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- // Ch.debug
- //printf(" QF02 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ // Ch.debug
+ //printf(" QF02 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
- // simulation of the trousers (VCTYB)
- // (last design -mail 3/6/05)
- // pipe: a tube (ID = 196. OD = 200.)
+ // simulation of the trousers (VCTYB)
tubpar[0] = 19.6/2.;
tubpar[1] = 20.0/2.;
tubpar[2] = 3.9/2.;
- gMC->Gsvolu("QA33", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA33", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gsvolu("QA24", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA24", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" QA33 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA24 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
conpar[2] = 20.0/2.;
conpar[3] = 21.66/2.;
conpar[4] = 22.06/2.;
- gMC->Gsvolu("QA34", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QA34", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
+ gMC->Gsvolu("QA25", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA25", 1, "ZDCA", 0., 0., conpar[0]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" QA34 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+zd2);
+ //printf(" QA25 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+zd2);
zd2 += 2.*conpar[0];
tubpar[0] = 21.66/2.;
tubpar[1] = 22.06/2.;
tubpar[2] = 28.6/2.;
- gMC->Gsvolu("QA35", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA35", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gsvolu("QA26", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA26", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf("\n QA35 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA26 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
// --------------------------------------------------------
// TRANSFORMATION MATRICES
// Combi transformation:
- Double_t dx = -3.970000;
- Double_t dy = 0.000000;
- Double_t dz = 0.0;
+ dx = -3.970000;
+ dy = 0.000000;
+ dz = 0.0;
// Rotation:
- Double_t thx = 84.989100; Double_t phx = 0.000000;
- Double_t thy = 90.000000; Double_t phy = 90.000000;
- Double_t thz = 5.010900; Double_t phz = 180.000000;
+ thx = 84.989100; phx = 0.000000;
+ thy = 90.000000; phy = 90.000000;
+ thz = 5.010900; phz = 180.000000;
TGeoRotation *rotMatrix1 = new TGeoRotation("",thx,phx,thy,phy,thz,phz);
// Combi transformation:
dx = -3.970000;
dy = 0.000000;
dz = 0.0;
// Rotation:
- thx = 95.010900; phx = 0.000000;
- thy = 90.000000; phy = 90.000000;
+ thx = 95.010900; phx = 0.000000;
+ thy = 90.000000; phy = 90.000000;
thz = 5.010900; phz = 0.000000;
TGeoRotation *rotMatrix3 = new TGeoRotation("",thx,phx,thy,phy,thz,phz);
TGeoCombiTrans *rotMatrix4 = new TGeoCombiTrans("ZDC_c2", dx,dy,dz,rotMatrix3);
rotMatrix4->RegisterYourself();
-
+
+
// VOLUMES DEFINITION
// Volume: ZDCA
TGeoVolume *pZDCA = gGeoManager->GetVolume("ZDCA");
- //pZDCA->PrintNodes();
conpar[0] = (90.1-0.95-0.26)/2.;
conpar[1] = 0.0/2.;
conpar[2] = 21.6/2.;
conpar[3] = 0.0/2.;
conpar[4] = 5.8/2.;
- TGeoShape *pConeExt = new TGeoCone("QALext", conpar[0],conpar[1],conpar[2],conpar[3],conpar[4]);
+ new TGeoCone("QALext", conpar[0],conpar[1],conpar[2],conpar[3],conpar[4]);
conpar[0] = (90.1-0.95-0.26)/2.;
conpar[1] = 0.0/2.;
conpar[2] = 21.2/2.;
conpar[3] = 0.0/2.;
conpar[4] = 5.4/2.;
- TGeoShape *pConeInt = new TGeoCone("QALint", conpar[0],conpar[1],conpar[2],conpar[3],conpar[4]);
+ new TGeoCone("QALint", conpar[0],conpar[1],conpar[2],conpar[3],conpar[4]);
// Outer trousers
TGeoCompositeShape *pOutTrousers = new TGeoCompositeShape("outTrousers", "QALext:ZDC_c1+QALext:ZDC_c2");
// Volume: QALext
- TGeoMedium *medZDCFe = gGeoManager->GetMedium("ZDC_ZIRON");
+ //TGeoMedium *medZDCFe = gGeoManager->GetMedium("ZDC_ZIRON");
TGeoVolume *pQALext = new TGeoVolume("QALext",pOutTrousers, medZDCFe);
- pQALext->SetLineColor(5);
+ pQALext->SetLineColor(kBlue);
pQALext->SetVisLeaves(kTRUE);
//
TGeoTranslation *tr1 = new TGeoTranslation(0., 0., (Double_t) conpar[0]+0.95+zd2);
// Inner trousers
TGeoCompositeShape *pIntTrousers = new TGeoCompositeShape("intTrousers", "QALint:ZDC_c1+QALint:ZDC_c2");
// Volume: QALint
- TGeoMedium *medZDCvoid = gGeoManager->GetMedium("ZDC_ZVOID");
+ //TGeoMedium *medZDCvoid = gGeoManager->GetMedium("ZDC_ZVOID");
TGeoVolume *pQALint = new TGeoVolume("QALint",pIntTrousers, medZDCvoid);
- pQALint->SetLineColor(7);
+ pQALint->SetLineColor(kAzure);
pQALint->SetVisLeaves(kTRUE);
pQALext->AddNode(pQALint, 1);
tubpar[0] = 5.4/2.;
tubpar[1] = 5.8/2.;
tubpar[2] = 40.0/2.;
- gMC->Gsvolu("QA36", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA36", 1, "ZDCA", -15.8/2., 0., tubpar[2]+zd2, 0, "ONLY");
- gMC->Gspos("QA36", 2, "ZDCA", 15.8/2., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gsvolu("QA27", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA27", 1, "ZDCA", -15.8/2., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gspos("QA27", 2, "ZDCA", 15.8/2., 0., tubpar[2]+zd2, 0, "ONLY");
// Ch.debug
- //printf(" QA36 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ //printf(" QA27 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
-
+
// transition x2zdc to recombination chamber : skewed cone
- conpar[0] = (10.-0.2)/2.;
+ conpar[0] = (10.-1.)/2.;
conpar[1] = 5.4/2.;
conpar[2] = 5.8/2.;
conpar[3] = 6.3/2.;
conpar[4] = 7.0/2.;
- gMC->Gsvolu("QA37", "CONE", idtmed[7], conpar, 5);
- gMC->Gspos("QA37", 1, "ZDCA", -7.9-0.175, 0., conpar[0]+0.1+zd2, irotpipe7, "ONLY");
- gMC->Gspos("QA37", 2, "ZDCA", 7.9+0.175, 0., conpar[0]+0.1+zd2, irotpipe8, "ONLY");
- //printf(" QA37 CONE from z = %f to z= %f\n",zd2,2*conpar[0]+0.2+zd2);
+ gMC->Gsvolu("QA28", "CONE", idtmed[7], conpar, 5);
+ gMC->Gspos("QA28", 1, "ZDCA", -7.9-0.175, 0., conpar[0]+0.5+zd2, irotpipe1, "ONLY");
+ gMC->Gspos("QA28", 2, "ZDCA", 7.9+0.175, 0., conpar[0]+0.5+zd2, irotpipe2, "ONLY");
+ //printf(" QA28 CONE from z = %1.2f to z= %1.2f\n",zd2,2*conpar[0]+0.2+zd2);
- zd2 += 2.*conpar[0]+0.2;
+ zd2 += 2.*conpar[0]+1.;
// 2 tubes (ID = 63 mm OD=70 mm)
tubpar[0] = 6.3/2.;
tubpar[1] = 7.0/2.;
- tubpar[2] = 512.9/2.;
- gMC->Gsvolu("QA38", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("QA38", 1, "ZDCA", -16.5/2., 0., tubpar[2]+zd2, 0, "ONLY");
- gMC->Gspos("QA38", 2, "ZDCA", 16.5/2., 0., tubpar[2]+zd2, 0, "ONLY");
- //printf(" QA38 TUBE from z = %f to z= %f\n",zd2,2*tubpar[2]+zd2);
+ tubpar[2] = (342.5+498.3)/2.;
+ gMC->Gsvolu("QA29", "TUBE", idtmed[7], tubpar, 3);
+ gMC->Gspos("QA29", 1, "ZDCA", -16.5/2., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gspos("QA29", 2, "ZDCA", 16.5/2., 0., tubpar[2]+zd2, 0, "ONLY");
+ //printf(" QA29 TUBE from z = %1.2f to z= %1.2f\n",zd2,2*tubpar[2]+zd2);
zd2 += 2.*tubpar[2];
- //printf("\n END OF BEAM PIPE VOLUME DEFINITION AT z= %f\n",zd2);
// -- Luminometer (Cu box) in front of ZN - side A
boxpar[0] = 8.0/2.;
boxpar[1] = 8.0/2.;
- boxpar[2] = 15./2.;
- gMC->Gsvolu("QLUA", "BOX ", idtmed[7], boxpar, 3);
+ boxpar[2] = fLumiLength/2.;
+ gMC->Gsvolu("QLUA", "BOX ", idtmed[9], boxpar, 3);
gMC->Gspos("QLUA", 1, "ZDCA", 0., 0., fPosZNA[2]-66.-boxpar[2], 0, "ONLY");
- //printf("\n QLUC LUMINOMETER from z = %f to z= %f\n\n", fPosZNA[2]-66., fPosZNA[2]-66.-2*boxpar[2]);
+ //printf(" QLUA LUMINOMETER from z = %1.2f to z= %1.2f\n\n", fPosZNA[2]-66., fPosZNA[2]-66.-2*boxpar[2]);
+
+ //printf(" END OF BEAM PIPE VOLUME DEFINITION AT z = %f\n",zd2);
// ----------------------------------------------------------------
// SIDE C - RB26 (dimuon side)
// ***************************************************************
// -- COMPENSATOR DIPOLE (MBXW)
- zc = 1972.5;
+ zCorrDip = 1972.5;
// -- GAP (VACUUM WITH MAGNETIC FIELD)
tubpar[0] = 0.;
tubpar[2] = 153./2.;
gMC->Gsvolu("YMBX", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("MBXW", 1, "ZDCC", 0., 0., -tubpar[2]-zc, 0, "ONLY");
- gMC->Gspos("YMBX", 1, "ZDCC", 0., 0., -tubpar[2]-zc, 0, "ONLY");
+ gMC->Gspos("MBXW", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY");
+ gMC->Gspos("YMBX", 1, "ZDCC", 0., 0., -tubpar[2]-zCorrDip, 0, "ONLY");
// -- INNER TRIPLET
- zq = 2296.5;
+ zInnTrip = 2296.5;
// -- DEFINE MQXL AND MQX QUADRUPOLE ELEMENT
// -- MQXL
tubpar[2] = 637./2.;
gMC->Gsvolu("YMQL", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("MQXL", 1, "ZDCC", 0., 0., -tubpar[2]-zq, 0, "ONLY");
- gMC->Gspos("YMQL", 1, "ZDCC", 0., 0., -tubpar[2]-zq, 0, "ONLY");
+ gMC->Gspos("MQXL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY");
+ gMC->Gspos("YMQL", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip, 0, "ONLY");
- gMC->Gspos("MQXL", 2, "ZDCC", 0., 0., -tubpar[2]-zq-2400., 0, "ONLY");
- gMC->Gspos("YMQL", 2, "ZDCC", 0., 0., -tubpar[2]-zq-2400., 0, "ONLY");
+ gMC->Gspos("MQXL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY");
+ gMC->Gspos("YMQL", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-2400., 0, "ONLY");
// -- MQX
// -- GAP (VACUUM WITH MAGNETIC FIELD)
tubpar[2] = 550./2.;
gMC->Gsvolu("YMQ ", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("MQX ", 1, "ZDCC", 0., 0., -tubpar[2]-zq-908.5, 0, "ONLY");
- gMC->Gspos("YMQ ", 1, "ZDCC", 0., 0., -tubpar[2]-zq-908.5, 0, "ONLY");
+ gMC->Gspos("MQX ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY");
+ gMC->Gspos("YMQ ", 1, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-908.5, 0, "ONLY");
- gMC->Gspos("MQX ", 2, "ZDCC", 0., 0., -tubpar[2]-zq-1558.5, 0, "ONLY");
- gMC->Gspos("YMQ ", 2, "ZDCC", 0., 0., -tubpar[2]-zq-1558.5, 0, "ONLY");
+ gMC->Gspos("MQX ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY");
+ gMC->Gspos("YMQ ", 2, "ZDCC", 0., 0., -tubpar[2]-zInnTrip-1558.5, 0, "ONLY");
// -- SEPARATOR DIPOLE D1
- zd1 = 5838.3;
+ zD1 = 5838.3001;
// -- GAP (VACUUM WITH MAGNETIC FIELD)
tubpar[0] = 0.;
tubpar[2] = 945./2.;
gMC->Gsvolu("YD1 ", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("YD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
- gMC->Gspos("MD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zd1, 0, "ONLY");
+ gMC->Gspos("YD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY");
+ gMC->Gspos("MD1 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD1, 0, "ONLY");
// Ch debug
- //printf("\t **** D1 positioned! It goes from z = %1.2f to z = %1.2f cm\n",-zd1, -zd1-2*tubpar[2]);
+ //printf(" MD1 from z = %1.2f to z= %1.2f cm\n",-zD1, -zD1-2*tubpar[2]);
// -- DIPOLE D2
- // --- LHC optics v6.4
- zd2 = 12167.8;
-
+ zD2 = 12167.8;
// -- GAP (VACUUM WITH MAGNETIC FIELD)
tubpar[0] = 0.;
tubpar[1] = 7.5/2.;
tubpar[2] = 945./2.;
gMC->Gsvolu("YD2 ", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("YD2 ", 1, "ZDCC", 0., 0., -tubpar[2]-zd2, 0, "ONLY");
+ gMC->Gspos("YD2 ", 1, "ZDCC", 0., 0., -tubpar[2]-zD2, 0, "ONLY");
+ // Ch debug
+ //printf(" YD2 from z = %1.2f to z= %1.2f cm\n",-zD2, -zD2-2*tubpar[2]);
gMC->Gspos("MD2 ", 1, "YD2 ", -9.4, 0., 0., 0, "ONLY");
gMC->Gspos("MD2 ", 2, "YD2 ", 9.4, 0., 0., 0, "ONLY");
tubpar[1] = 3.;
tubpar[2] = 153./2.;
gMC->Gsvolu("MCBW", "TUBE", idtmed[11], tubpar, 3);
- gMC->Gspos("MCBW", 1, "ZDCA", 0., 0., tubpar[2]+1972.5, 0, "ONLY");
+ gMC->Gspos("MCBW", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY");
// -- YOKE
tubpar[0] = 4.5;
tubpar[1] = 55.;
tubpar[2] = 153./2.;
gMC->Gsvolu("YMCB", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("YMCB", 1, "ZDCA", 0., 0., tubpar[2]+1972.5, 0, "ONLY");
+ gMC->Gspos("YMCB", 1, "ZDCA", 0., 0., tubpar[2]+zCorrDip, 0, "ONLY");
// -- INNER TRIPLET
- zql = 2296.5;
-
// -- DEFINE MQX1 AND MQX2 QUADRUPOLE ELEMENT
// -- MQX1
// -- GAP (VACUUM WITH MAGNETIC FIELD)
gMC->Gsvolu("YMQ1", "TUBE", idtmed[7], tubpar, 3);
// -- Q1
- gMC->Gspos("MQX1", 1, "ZDCA", 0., 0., tubpar[2]+zql, 0, "ONLY");
- gMC->Gspos("YMQ1", 1, "ZDCA", 0., 0., tubpar[2]+zql, 0, "ONLY");
+ gMC->Gspos("MQX1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY");
+ gMC->Gspos("YMQ1", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip, 0, "ONLY");
// -- BEAM SCREEN FOR Q1
tubpar[0] = 4.78/2.;
gMC->Gspos("QBS2", 2, "MQX1", -1.9-boxpar[0], 0., 0., 0, "ONLY");
// -- Q3
- gMC->Gspos("MQX4", 1, "ZDCA", 0., 0., tubpar[2]+zql+2400., 0, "ONLY");
- gMC->Gspos("YMQ1", 2, "ZDCA", 0., 0., tubpar[2]+zql+2400., 0, "ONLY");
+ gMC->Gspos("MQX4", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY");
+ gMC->Gspos("YMQ1", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+2400., 0, "ONLY");
// -- BEAM SCREEN FOR Q3
tubpar[0] = 5.79/2.;
gMC->Gsvolu("QBS6", "BOX ", idtmed[6], boxpar, 3);
// -- Q2A
- gMC->Gspos("MQX2", 1, "ZDCA", 0., 0., tubpar[2]+zql+908.5, 0, "ONLY");
+ gMC->Gspos("MQX2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY");
gMC->Gspos("QBS5", 1, "MQX2", 0., 0., 0., 0, "ONLY");
gMC->Gspos("QBS6", 1, "MQX2", 2.405+boxpar[0], 0., 0., 0, "ONLY");
gMC->Gspos("QBS6", 2, "MQX2", -2.405-boxpar[0], 0., 0., 0, "ONLY");
- gMC->Gspos("YMQ2", 1, "ZDCA", 0., 0., tubpar[2]+zql+908.5, 0, "ONLY");
+ gMC->Gspos("YMQ2", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+908.5, 0, "ONLY");
// -- Q2B
- gMC->Gspos("MQX3", 1, "ZDCA", 0., 0., tubpar[2]+zql+1558.5, 0, "ONLY");
+ gMC->Gspos("MQX3", 1, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY");
gMC->Gspos("QBS5", 2, "MQX3", 0., 0., 0., 0, "ONLY");
gMC->Gspos("QBS6", 3, "MQX3", 2.405+boxpar[0], 0., 0., 0, "ONLY");
gMC->Gspos("QBS6", 4, "MQX3", -2.405-boxpar[0], 0., 0., 0, "ONLY");
- gMC->Gspos("YMQ2", 2, "ZDCA", 0., 0., tubpar[2]+zql+1558.5, 0, "ONLY");
+ gMC->Gspos("YMQ2", 2, "ZDCA", 0., 0., tubpar[2]+zInnTrip+1558.5, 0, "ONLY");
- // -- SEPARATOR DIPOLE D1
- zd2 = 5838.3;
-
+ // -- SEPARATOR DIPOLE D1
// -- GAP (VACUUM WITH MAGNETIC FIELD)
tubpar[0] = 0.;
tubpar[1] = 6.75/2.;//3.375
tubpar[2] = 945./2.;
gMC->Gsvolu("YD1L", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("YD1L", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
- gMC->Gspos("MD1L", 1, "ZDCA", 0., 0., tubpar[2]+zd2, 0, "ONLY");
+ gMC->Gspos("YD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY");
+ gMC->Gspos("MD1L", 1, "ZDCA", 0., 0., tubpar[2]+zD1, 0, "ONLY");
// -- DIPOLE D2
- // --- LHC optics v6.5
- zd2l = 12167.8;
-
// -- GAP (VACUUM WITH MAGNETIC FIELD)
tubpar[0] = 0.;
tubpar[1] = 7.5/2.; // this has to be checked
tubpar[2] = 945./2.;
gMC->Gsvolu("YD2L", "TUBE", idtmed[7], tubpar, 3);
- gMC->Gspos("YD2L", 1, "ZDCA", 0., 0., tubpar[2]+zd2l, 0, "ONLY");
+ gMC->Gspos("YD2L", 1, "ZDCA", 0., 0., tubpar[2]+zD2, 0, "ONLY");
gMC->Gspos("MD2L", 1, "YD2L", -9.4, 0., 0., 0, "ONLY");
gMC->Gspos("MD2L", 2, "YD2L", 9.4, 0., 0., 0, "ONLY");
gMC->Gsatt("QT11","SEEN",1);
gMC->Gsatt("QT12","SEEN",1);
gMC->Gsatt("QT13","SEEN",1);
- gMC->Gsatt("QT14","SEEN",1);
- gMC->Gsatt("QT15","SEEN",1);
- gMC->Gsatt("QT16","SEEN",1);
- gMC->Gsatt("QT17","SEEN",1);
- gMC->Gsatt("QT18","SEEN",1);
gMC->Gsatt("QC01","SEEN",1);
gMC->Gsatt("QC02","SEEN",1);
gMC->Gsatt("QC03","SEEN",1);
gMC->Gsatt("QC04","SEEN",1);
gMC->Gsatt("QC05","SEEN",1);
- gMC->Gsatt("QTD1","SEEN",1);
- gMC->Gsatt("QTD2","SEEN",1);
- gMC->Gsatt("QTD3","SEEN",1);
+ gMC->Gsatt("QC06","SEEN",1);
+ gMC->Gsatt("QC07","SEEN",1);
+ gMC->Gsatt("QC08","SEEN",1);
+ gMC->Gsatt("QC09","SEEN",1);
+ gMC->Gsatt("QC10","SEEN",1);
gMC->Gsatt("MQXL","SEEN",1);
gMC->Gsatt("YMQL","SEEN",1);
gMC->Gsatt("MQX ","SEEN",1);
gMC->Gsatt("ZEV1","SEEN",0);
gMC->Gsatt("ZES0","SEEN",0);
gMC->Gsatt("ZES1","SEEN",0);
-
//
- gMC->Gdopt("hide", "on");
- gMC->Gdopt("shad", "on");
- gMC->Gsatt("*", "fill", 7);
- gMC->SetClipBox(".");
- gMC->SetClipBox("*", 0, 100, -100, 100, 12000, 16000);
- gMC->DefaultRange();
- gMC->Gdraw("alic", 40, 30, 0, 488, 220, .07, .07);
- gMC->Gdhead(1111, "Zero Degree Calorimeter Version 3");
- gMC->Gdman(18, 4, "MAN");
}
//_____________________________________________________________________________
// --- Lead
ubuf[0] = 1.12;
- AliMaterial(5, "LEAD", 207.19, 82., 11.35, .56, 18.5, ubuf, 1);
+ AliMaterial(5, "LEAD", 207.19, 82., 11.35, .56, 0., ubuf, 1);
// --- Copper (energy loss taken into account)
ubuf[0] = 1.10;
AliMaterial(6, "COPP0", 63.54, 29., 8.96, 1.4, 0., ubuf, 1);
+
+ // --- Copper
+ ubuf[0] = 1.10;
+ AliMaterial(9, "COPP1", 63.54, 29., 8.96, 1.4, 0., ubuf, 1);
// --- Iron (energy loss taken into account)
ubuf[0] = 1.1;
// --- Iron (no energy loss)
ubuf[0] = 1.1;
AliMaterial(8, "IRON1", 55.85, 26., 7.87, 1.76, 0., ubuf, 1);
+
+ // --- Tatalum
+ ubuf[0] = 1.1;
+ AliMaterial(13, "TANT", 183.84, 74., 19.3, 0.35, 0., ubuf, 1);
// ---------------------------------------------------------
Float_t aResGas[3]={1.008,12.0107,15.9994};
// --- Fibers (SiO2) = 3 ;
// --- Fibers (SiO2) = 4 ;
// --- Lead = 5 ;
- // --- Copper (with energy loss)= 6 ;
- // --- Copper (with energy loss)= 13 ;
+ // --- Copper (with high thr.)= 6 ;
+ // --- Copper (with low thr.)= 9;
// --- Iron (with energy loss) = 7 ;
// --- Iron (without energy loss) = 8 ;
// --- Vacuum (no field) = 10
Float_t stmin = 0.01; // Min. value 4 max. step (cm)
Float_t stemax = 1.; // Max. step permitted (cm)
Float_t tmaxfd = 0.; // Maximum angle due to field (degrees)
+ Float_t tmaxfdv = 0.1; // Maximum angle due to field (degrees)
Float_t deemax = -1.; // Maximum fractional energy loss
Float_t nofieldm = 0.; // Max. field value (no field)
Float_t fieldm = 45.; // Max. field value (with field)
Int_t ifield =2; // IFIELD=2 -> magnetic field defined in AliMagFC.h
// *****************************************************
- AliMedium(1, "ZTANT", 1, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(1, "ZWALL", 1, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
AliMedium(2, "ZBRASS",2, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
AliMedium(3, "ZSIO2", 3, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
AliMedium(4, "ZQUAR", 3, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
AliMedium(6, "ZCOPP", 6, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
AliMedium(7, "ZIRON", 7, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
AliMedium(8, "ZIRONN",8, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(9, "ZCOPL", 6, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
AliMedium(10,"ZVOID",10, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
- AliMedium(12,"ZAIR", 12, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
- //
- AliMedium(11,"ZVOIM",11, isvol, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin);
-
+ AliMedium(11,"ZVOIM",11, isvol, ifield, fieldm, tmaxfdv, stemax, deemax, epsil, stmin);
+ AliMedium(12,"ZAIR", 12, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(13,"ZTANT",13, isvolActive, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
+ AliMedium(14, "ZIRONT", 7, isvol, inofld, nofieldm, tmaxfd, stemax, deemax, epsil, stmin);
}
{
InitTables();
Int_t *idtmed = fIdtmed->GetArray();
- Int_t i;
- // Thresholds for showering in the ZDCs
- i = 1; //tantalum
- gMC->Gstpar(idtmed[i], "CUTGAM", .001);
- gMC->Gstpar(idtmed[i], "CUTELE", .001);
- gMC->Gstpar(idtmed[i], "CUTNEU", .01);
- gMC->Gstpar(idtmed[i], "CUTHAD", .01);
- i = 2; //brass
- gMC->Gstpar(idtmed[i], "CUTGAM", .001);
- gMC->Gstpar(idtmed[i], "CUTELE", .001);
- gMC->Gstpar(idtmed[i], "CUTNEU", .01);
- gMC->Gstpar(idtmed[i], "CUTHAD", .01);
- i = 5; //lead
- gMC->Gstpar(idtmed[i], "CUTGAM", .001);
- gMC->Gstpar(idtmed[i], "CUTELE", .001);
- gMC->Gstpar(idtmed[i], "CUTNEU", .01);
- gMC->Gstpar(idtmed[i], "CUTHAD", .01);
-
- // Avoid too detailed showering in TDI
- i = 6; //copper
- gMC->Gstpar(idtmed[i], "CUTGAM", .1);
- gMC->Gstpar(idtmed[i], "CUTELE", .1);
- gMC->Gstpar(idtmed[i], "CUTNEU", 1.);
- gMC->Gstpar(idtmed[i], "CUTHAD", 1.);
-
- // Avoid too detailed showering along the beam line
- i = 7; //iron with energy loss (ZIRON)
- gMC->Gstpar(idtmed[i], "CUTGAM", .1);
- gMC->Gstpar(idtmed[i], "CUTELE", .1);
- gMC->Gstpar(idtmed[i], "CUTNEU", 1.);
- gMC->Gstpar(idtmed[i], "CUTHAD", 1.);
-
- // Avoid too detailed showering along the beam line
- i = 8; //iron with energy loss (ZIRONN)
- gMC->Gstpar(idtmed[i], "CUTGAM", .1);
- gMC->Gstpar(idtmed[i], "CUTELE", .1);
- gMC->Gstpar(idtmed[i], "CUTNEU", 1.);
- gMC->Gstpar(idtmed[i], "CUTHAD", 1.);
-
- // Avoid too detailed showering along the beam line
- i = 13; //iron with energy loss (ZIRONN)
- gMC->Gstpar(idtmed[i], "CUTGAM", 1.);
- gMC->Gstpar(idtmed[i], "CUTELE", 1.);
- gMC->Gstpar(idtmed[i], "CUTNEU", 1.);
- gMC->Gstpar(idtmed[i], "CUTHAD", 1.);
-
- // Avoid interaction in fibers (only energy loss allowed)
- i = 3; //fibers (ZSI02)
- gMC->Gstpar(idtmed[i], "DCAY", 0.);
- gMC->Gstpar(idtmed[i], "MULS", 0.);
- gMC->Gstpar(idtmed[i], "PFIS", 0.);
- gMC->Gstpar(idtmed[i], "MUNU", 0.);
- gMC->Gstpar(idtmed[i], "LOSS", 1.);
- gMC->Gstpar(idtmed[i], "PHOT", 0.);
- gMC->Gstpar(idtmed[i], "COMP", 0.);
- gMC->Gstpar(idtmed[i], "PAIR", 0.);
- gMC->Gstpar(idtmed[i], "BREM", 0.);
- gMC->Gstpar(idtmed[i], "DRAY", 0.);
- gMC->Gstpar(idtmed[i], "ANNI", 0.);
- gMC->Gstpar(idtmed[i], "HADR", 0.);
- i = 4; //fibers (ZQUAR)
- gMC->Gstpar(idtmed[i], "DCAY", 0.);
- gMC->Gstpar(idtmed[i], "MULS", 0.);
- gMC->Gstpar(idtmed[i], "PFIS", 0.);
- gMC->Gstpar(idtmed[i], "MUNU", 0.);
- gMC->Gstpar(idtmed[i], "LOSS", 1.);
- gMC->Gstpar(idtmed[i], "PHOT", 0.);
- gMC->Gstpar(idtmed[i], "COMP", 0.);
- gMC->Gstpar(idtmed[i], "PAIR", 0.);
- gMC->Gstpar(idtmed[i], "BREM", 0.);
- gMC->Gstpar(idtmed[i], "DRAY", 0.);
- gMC->Gstpar(idtmed[i], "ANNI", 0.);
- gMC->Gstpar(idtmed[i], "HADR", 0.);
-
- // Avoid interaction in void
- i = 11; //void with field
- gMC->Gstpar(idtmed[i], "DCAY", 0.);
- gMC->Gstpar(idtmed[i], "MULS", 0.);
- gMC->Gstpar(idtmed[i], "PFIS", 0.);
- gMC->Gstpar(idtmed[i], "MUNU", 0.);
- gMC->Gstpar(idtmed[i], "LOSS", 0.);
- gMC->Gstpar(idtmed[i], "PHOT", 0.);
- gMC->Gstpar(idtmed[i], "COMP", 0.);
- gMC->Gstpar(idtmed[i], "PAIR", 0.);
- gMC->Gstpar(idtmed[i], "BREM", 0.);
- gMC->Gstpar(idtmed[i], "DRAY", 0.);
- gMC->Gstpar(idtmed[i], "ANNI", 0.);
- gMC->Gstpar(idtmed[i], "HADR", 0.);
-
//
- fMedSensZN = idtmed[1]; // Sensitive volume: ZN passive material
- fMedSensZP = idtmed[2]; // Sensitive volume: ZP passive material
- fMedSensF1 = idtmed[3]; // Sensitive volume: fibres type 1
- fMedSensF2 = idtmed[4]; // Sensitive volume: fibres type 2
- fMedSensZEM = idtmed[5]; // Sensitive volume: ZEM passive material
- fMedSensTDI = idtmed[6]; // Sensitive volume: TDI Cu shield
- fMedSensPI = idtmed[7]; // Sensitive volume: beam pipes
- fMedSensGR = idtmed[12]; // Sensitive volume: air into the grooves
+ fMedSensZN = idtmed[1]; // Sensitive volume: ZN passive material
+ fMedSensZP = idtmed[2]; // Sensitive volume: ZP passive material
+ fMedSensF1 = idtmed[3]; // Sensitive volume: fibres type 1
+ fMedSensF2 = idtmed[4]; // Sensitive volume: fibres type 2
+ fMedSensZEM = idtmed[5]; // Sensitive volume: ZEM passive material
+ fMedSensTDI = idtmed[6]; // Sensitive volume: TDI Cu shield
+ fMedSensPI = idtmed[7]; // Sensitive volume: beam pipes
+ fMedSensLumi = idtmed[9]; // Sensitive volume: luminometer
+ fMedSensGR = idtmed[12]; // Sensitive volume: air into the grooves
+ fMedSensVColl = idtmed[13]; // Sensitive volume: collimator jaws
}
//_____________________________________________________________________________
//
Int_t k, j;
-
- char *lightfName1,*lightfName2,*lightfName3,*lightfName4,
- *lightfName5,*lightfName6,*lightfName7,*lightfName8;
- FILE *fp1, *fp2, *fp3, *fp4, *fp5, *fp6, *fp7, *fp8;
+ int read=1;
// --- Reading light tables for ZN
- lightfName1 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620362207s");
- if((fp1 = fopen(lightfName1,"r")) == NULL){
+ char *lightfName1 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620362207s");
+ FILE *fp1 = fopen(lightfName1,"r");
+ if(fp1 == NULL){
printf("Cannot open file fp1 \n");
return;
}
- lightfName2 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620362208s");
- if((fp2 = fopen(lightfName2,"r")) == NULL){
+ else{
+ for(k=0; k<fNalfan; k++){
+ for(j=0; j<fNben; j++){
+ read = fscanf(fp1,"%f",&fTablen[0][k][j]);
+ if(read==0) AliDebug(3, " Error in reading light table 1");
+ }
+ }
+ fclose(fp1);
+ }
+ char *lightfName2 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620362208s");
+ FILE *fp2 = fopen(lightfName2,"r");
+ if(fp2 == NULL){
printf("Cannot open file fp2 \n");
return;
}
- lightfName3 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620362209s");
- if((fp3 = fopen(lightfName3,"r")) == NULL){
+ else{
+ for(k=0; k<fNalfan; k++){
+ for(j=0; j<fNben; j++){
+ read = fscanf(fp2,"%f",&fTablen[1][k][j]);
+ if(read==0) AliDebug(3, " Error in reading light table 2");
+ }
+ }
+ fclose(fp2);
+ }
+ char *lightfName3 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620362209s");
+ FILE *fp3 = fopen(lightfName3,"r");
+ if(fp3 == NULL){
printf("Cannot open file fp3 \n");
return;
}
- lightfName4 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620362210s");
- if((fp4 = fopen(lightfName4,"r")) == NULL){
+ else{
+ for(k=0; k<fNalfan; k++){
+ for(j=0; j<fNben; j++){
+ read = fscanf(fp3,"%f",&fTablen[2][k][j]);
+ if(read==0) AliDebug(3, " Error in reading light table 3");
+ }
+ }
+ fclose(fp3);
+ }
+ char *lightfName4 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620362210s");
+ FILE *fp4 = fopen(lightfName4,"r");
+ if(fp4 == NULL){
printf("Cannot open file fp4 \n");
return;
}
-
- for(k=0; k<fNalfan; k++){
- for(j=0; j<fNben; j++){
- fscanf(fp1,"%f",&fTablen[0][k][j]);
- fscanf(fp2,"%f",&fTablen[1][k][j]);
- fscanf(fp3,"%f",&fTablen[2][k][j]);
- fscanf(fp4,"%f",&fTablen[3][k][j]);
- }
+ else{
+ for(k=0; k<fNalfan; k++){
+ for(j=0; j<fNben; j++){
+ read = fscanf(fp4,"%f",&fTablen[3][k][j]);
+ if(read==0) AliDebug(3, " Error in reading light table 4");
+ }
+ }
+ fclose(fp4);
}
- fclose(fp1);
- fclose(fp2);
- fclose(fp3);
- fclose(fp4);
-
+
// --- Reading light tables for ZP and ZEM
- lightfName5 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620552207s");
- if((fp5 = fopen(lightfName5,"r")) == NULL){
+ char *lightfName5 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620552207s");
+ FILE *fp5 = fopen(lightfName5,"r");
+ if(fp5 == NULL){
printf("Cannot open file fp5 \n");
return;
}
- lightfName6 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620552208s");
- if((fp6 = fopen(lightfName6,"r")) == NULL){
+ else{
+ for(k=0; k<fNalfap; k++){
+ for(j=0; j<fNbep; j++){
+ read = fscanf(fp5,"%f",&fTablep[0][k][j]);
+ if(read==0) AliDebug(3, " Error in reading light table 5");
+ }
+ }
+ fclose(fp5);
+ }
+ char *lightfName6 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620552208s");
+ FILE *fp6 = fopen(lightfName6,"r");
+ if(fp6 == NULL){
printf("Cannot open file fp6 \n");
return;
}
- lightfName7 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620552209s");
- if((fp7 = fopen(lightfName7,"r")) == NULL){
+ else{
+ for(k=0; k<fNalfap; k++){
+ for(j=0; j<fNbep; j++){
+ read = fscanf(fp6,"%f",&fTablep[1][k][j]);
+ if(read==0) AliDebug(3, " Error in reading light table 6");
+ }
+ }
+ fclose(fp6);
+ }
+ char *lightfName7 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620552209s");
+ FILE *fp7 = fopen(lightfName7,"r");
+ if(fp7 == NULL){
printf("Cannot open file fp7 \n");
return;
}
- lightfName8 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620552210s");
- if((fp8 = fopen(lightfName8,"r")) == NULL){
+ else{
+ for(k=0; k<fNalfap; k++){
+ for(j=0; j<fNbep; j++){
+ read = fscanf(fp7,"%f",&fTablep[2][k][j]);
+ if(read==0) AliDebug(3, " Error in reading light table 7");
+ }
+ }
+ fclose(fp7);
+ }
+ char *lightfName8 = gSystem->ExpandPathName("$ALICE_ROOT/ZDC/light22620552210s");
+ FILE *fp8 = fopen(lightfName8,"r");
+ if(fp8 == NULL){
printf("Cannot open file fp8 \n");
return;
}
-
- for(k=0; k<fNalfap; k++){
- for(j=0; j<fNbep; j++){
- fscanf(fp5,"%f",&fTablep[0][k][j]);
- fscanf(fp6,"%f",&fTablep[1][k][j]);
- fscanf(fp7,"%f",&fTablep[2][k][j]);
- fscanf(fp8,"%f",&fTablep[3][k][j]);
- }
+ else{
+ for(k=0; k<fNalfap; k++){
+ for(j=0; j<fNbep; j++){
+ read = fscanf(fp8,"%f",&fTablep[3][k][j]);
+ if(read==0) AliDebug(3, " Error in reading light table 8");
+ }
+ }
+ fclose(fp8);
}
- fclose(fp5);
- fclose(fp6);
- fclose(fp7);
- fclose(fp8);
+
}
//_____________________________________________________________________________
void AliZDCv3::StepManager()
// Routine called at every step in the Zero Degree Calorimeters
//
Int_t j, vol[2]={0,0}, ibeta=0, ialfa=0, ibe=0, nphe=0;
- Float_t hits[11], x[3], xdet[3], um[3], ud[3];
- Float_t m=0., ekin=0., destep=0., be=0., out=0.;
- // Parametrization for light guide uniformity
- // NEW!!! Light guide tilted @ 51 degrees
- Float_t guiPar[4]={0.31,-0.0006305,0.01337,0.8895};
- Double_t s[3], p[3];
+ Float_t hits[13], x[3], xdet[3]={999.,999.,999.}, um[3], ud[3];
+ Float_t destep=0., be=0., out=0.;
+ Double_t s[3], p[4];
const char *knamed;
//
- for(j=0;j<11;j++) hits[j]=-999.;
+ for(j=0;j<13;j++) hits[j]=-999.;
//
- // --- This part is for no shower developement in beam pipe and TDI
- // If particle interacts with beam pipe or TDI -> return
- if((gMC->CurrentMedium() == fMedSensPI) || (gMC->CurrentMedium() == fMedSensTDI)){
- // If option NoShower is set -> StopTrack
- if(fNoShower==1){
+ // --- This part is for no shower developement in beam pipe, TDI, VColl
+ // If particle interacts with beam pipe, TDI, VColl -> return
+ if(fNoShower==1 && ((gMC->CurrentMedium() == fMedSensPI) || (gMC->CurrentMedium() == fMedSensTDI) ||
+ (gMC->CurrentMedium() == fMedSensVColl || (gMC->CurrentMedium() == fMedSensLumi)))){
+
+ // If option NoShower is set -> StopTrack
+
+ Int_t ipr = 0;
gMC->TrackPosition(s[0],s[1],s[2]);
if(gMC->CurrentMedium() == fMedSensPI){
knamed = gMC->CurrentVolName();
if(!strncmp(knamed,"YMQ",3)){
if(s[2]<0) fpLostITC += 1;
else fpLostITA += 1;
+ ipr=1;
}
else if(!strncmp(knamed,"YD1",3)){
if(s[2]<0) fpLostD1C += 1;
else fpLostD1A += 1;
+ ipr=1;
}
- else if(!strncmp(knamed,"QAL",3)) fnTrou++;
}
else if(gMC->CurrentMedium() == fMedSensTDI){
knamed = gMC->CurrentVolName();
if(!strncmp(knamed,"MD1",3)){
if(s[2]<0) fpLostD1C += 1;
else fpLostD1A += 1;
+ ipr=1;
}
else if(!strncmp(knamed,"QTD",3)) fpLostTDI += 1;
- else if(!strncmp(knamed,"QLU",3)){
- if(s[2]<0) fnLumiC ++;
- else fnLumiA++;
- }
+ }
+ else if(gMC->CurrentMedium() == fMedSensVColl){
+ knamed = gMC->CurrentVolName();
+ if(!strncmp(knamed,"QCVC",4)) fpcVCollC++;
+ else if(!strncmp(knamed,"QCVA",4)) fpcVCollA++;
+ ipr=1;
}
//
//gMC->TrackMomentum(p[0], p[1], p[2], p[3]);
//printf("\t Particle: mass = %1.3f, E = %1.3f GeV, pz = %1.2f GeV -> stopped in volume %s\n",
// gMC->TrackMass(), p[3], p[2], gMC->CurrentVolName());
//
- printf("\n\t **********************************\n");
- printf("\t ********** Side C **********\n");
- printf("\t # of spectators in IT = %d\n",fpLostITC);
- printf("\t # of spectators in D1 = %d\n",fpLostD1C);
- printf("\t # of spectators in luminometer = %d\n",fnLumiC);
- printf("\t ********** Side A **********\n");
- printf("\t # of spectators in IT = %d\n",fpLostITA);
- printf("\t # of spectators in D1 = %d\n",fpLostD1A);
- printf("\t # of spectators in TDI = %d\n",fpLostTDI);
- printf("\t # of spectators in luminometer = %d\n",fnLumiA);
- printf("\t # of spectators in trousers = %d\n",fnTrou);
- printf("\t **********************************\n");
+ if(ipr!=0){
+ printf("\n\t **********************************\n");
+ printf("\t ********** Side C **********\n");
+ printf("\t # of particles in IT = %d\n",fpLostITC);
+ printf("\t # of particles in D1 = %d\n",fpLostD1C);
+ printf("\t # of particles in VColl = %d\n",fpcVCollC);
+ printf("\t ********** Side A **********\n");
+ printf("\t # of particles in IT = %d\n",fpLostITA);
+ printf("\t # of particles in D1 = %d\n",fpLostD1A);
+ printf("\t # of particles in TDI = %d\n",fpLostTDI);
+ printf("\t # of particles in VColl = %d\n",fpcVCollA);
+ printf("\t **********************************\n");
+ }
gMC->StopTrack();
- }
- return;
+ return;
}
-
if((gMC->CurrentMedium() == fMedSensZN) || (gMC->CurrentMedium() == fMedSensZP) ||
(gMC->CurrentMedium() == fMedSensGR) || (gMC->CurrentMedium() == fMedSensF1) ||
(gMC->CurrentMedium() == fMedSensF2) || (gMC->CurrentMedium() == fMedSensZEM)){
if(xdet[1]<=0.) vol[1]=2;
else vol[1]=4;
}
- if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
- printf("\n ZDC StepManager->ERROR in ZN!!! vol[1] = %d, xdet[0] = %f,"
- "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]);
}
else if(vol[0]==2){ //Quadrant in ZPC
// Calculating particle coordinates inside ZPC
- xdet[0] = x[0]-fPosZPA[0];
- xdet[1] = x[1]-fPosZPA[1];
+ xdet[0] = x[0]-fPosZPC[0];
+ xdet[1] = x[1]-fPosZPC[1];
if(xdet[0]>=fDimZP[0]) xdet[0]=fDimZP[0]-0.01;
if(xdet[0]<=-fDimZP[0]) xdet[0]=-fDimZP[0]+0.01;
// Calculating tower in ZP
break;
}
}
- if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
- printf(" ZDC StepManager->ERROR in ZP!!! vol[1] = %d, xdet[0] = %f,"
- "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]);
}
//
// Quadrant in ZEM: vol[1] = 1 -> particle in 1st ZEM (placed at x = 8.5 cm)
if(xdet[1]<=0.) vol[1]=2;
else vol[1]=4;
}
- if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
- printf("\n ZDC StepManager->ERROR in ZNA!!! vol[1] = %d, xdet[0] = %f,"
- "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]);
}
//
else if(vol[0]==5){ //Quadrant in ZPA
// Calculating particle coordinates inside ZPA
- xdet[0] = x[0]-fPosZPC[0];
- xdet[1] = x[1]-fPosZPC[1];
+ xdet[0] = x[0]-fPosZPA[0];
+ xdet[1] = x[1]-fPosZPA[1];
if(xdet[0]>=fDimZP[0]) xdet[0]=fDimZP[0]-0.01;
if(xdet[0]<=-fDimZP[0]) xdet[0]=-fDimZP[0]+0.01;
// Calculating tower in ZP
break;
}
}
- if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
- printf(" ZDC StepManager->ERROR in ZPA!!! vol[1] = %d, xdet[0] = %f,"
- "xdet[1] = %f\n",vol[1], xdet[0], xdet[1]);
}
+ if((vol[1]!=1) && (vol[1]!=2) && (vol[1]!=3) && (vol[1]!=4))
+ AliError(Form(" WRONG tower for det %d: tow %d with xdet=(%f, %f)\n",
+ vol[0], vol[1], xdet[0], xdet[1]));
+ // Ch. debug
+ //printf("\t *** det %d vol %d xdet(%f, %f)\n",vol[0], vol[1], xdet[0], xdet[1]);
- // Store impact point and kinetic energy of the ENTERING particle
+ // Store impact point and kinetic energy of the ENTERING particle
- if(gMC->IsTrackEntering()){
- //Particle energy
- gMC->TrackMomentum(p[0],p[1],p[2],p[3]);
- hits[3] = p[3];
- // Impact point on ZDC
+ if(gMC->IsTrackEntering()){
+ //Particle energy
+ gMC->TrackMomentum(p[0],p[1],p[2],p[3]);
+ hits[3] = p[3];
+
+ // Impact point on ZDC
+ // X takes into account the LHC x-axis sign
+ // which is opposite to positive x on detector front face
+ // for side A detectors (ZNA and ZPA)
+ if(vol[0]==4 || vol[0]==5){
+ hits[4] = -xdet[0];
+ }
+ else{
hits[4] = xdet[0];
- hits[5] = xdet[1];
- hits[6] = 0;
- hits[7] = 0;
- hits[8] = 0;
- hits[9] = 0;
- //
- Int_t curTrackN = gAlice->GetMCApp()->GetCurrentTrackNumber();
- TParticle *part = (gAlice->GetMCApp())->Particle(curTrackN);
- hits[10] = part->GetPdgCode();
- //printf("\t PDGCode = %d\n", part->GetPdgCode());
-
- AddHit(curTrackN, vol, hits);
-
- if(fNoShower==1){
- //printf("\t VolName %s -> det %d quad %d - x = %f, y = %f, z = %f\n",
- //knamed, vol[0], vol[1], x[0], x[1], x[2]);
- if(vol[0]==1){
- fnDetectedC += 1;
- printf("\n # of particles in ZNC = %d\n\n",fnDetectedC);
- }
- else if(vol[0]==2){
- fpDetectedC += 1;
- printf("\n # of particles in ZPC = %d\n\n",fpDetectedC);
- }
- else if(vol[0]==4){
- fnDetectedA += 1;
- printf("\n # of particles in ZNA = %d\n\n",fnDetectedA);
- }
- else if(vol[0]==5){
- fpDetectedA += 1;
- printf("\n # of particles in ZPA = %d\n\n",fpDetectedA);
- }
- //
- //printf("\t Particle: mass = %1.3f, E = %1.3f GeV, pz = %1.2f GeV -> stopped in volume %s\n",
- // gMC->TrackMass(), p[3], p[2], gMC->CurrentVolName());
- //
- gMC->StopTrack();
- return;
- }
}
-
- // Charged particles -> Energy loss
- if((destep=gMC->Edep())){
- if(gMC->IsTrackStop()){
- gMC->TrackMomentum(p[0],p[1],p[2],p[3]);
- m = gMC->TrackMass();
- ekin = p[3]-m;
- hits[9] = ekin;
- hits[7] = 0.;
- hits[8] = 0.;
- AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
- }
- else{
- hits[9] = destep;
- hits[7] = 0.;
- hits[8] = 0.;
- AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
- }
+ hits[5] = xdet[1];
+ hits[6] = 0;
+ hits[7] = 0;
+ hits[8] = 0;
+ hits[9] = 0;
+ //
+ Int_t curTrackN = gAlice->GetMCApp()->GetCurrentTrackNumber();
+ TParticle *part = gAlice->GetMCApp()->Particle(curTrackN);
+ hits[10] = part->GetPdgCode();
+ //printf("\t PDGCode = %d\n", part->GetPdgCode());
+ //
+ Int_t imo = part->GetFirstMother();
+ if(imo>0){
+ TParticle * pmot = gAlice->GetMCApp()->Particle(imo);
+ hits[11] = pmot->GetPdgCode();
}
+ else hits[11]=0;
+ //
+ hits[12] = 1.0e09*gMC->TrackTime(); // in ns!
+ //printf("\t TrackTime = %f\n", hits[12]);
+
+ AddHit(curTrackN, vol, hits);
+
+ if(fNoShower==1){
+ if(vol[0]==1){
+ fnDetectedC += 1;
+ if(fnDetectedC==1) printf(" ### Particle in ZNC\n\n");
+ }
+ else if(vol[0]==2){
+ fpDetectedC += 1;
+ if(fpDetectedC==1) printf(" ### Particle in ZPC\n\n");
+ }
+ else if(vol[0]==4){
+ fnDetectedA += 1;
+ if(fnDetectedA==1) printf(" ### Particle in ZNA\n\n");
+ }
+ else if(vol[0]==5){
+ fpDetectedA += 1;
+ if(fpDetectedA==1) printf(" ### Particle in ZPA\n\n");
+ }
+ //
+ //printf("\t Pc: x %1.2f y %1.2f z %1.2f E %1.2f GeV pz = %1.2f GeV in volume %s\n",
+ // x[0],x[1],x[3],p[3],p[2],gMC->CurrentVolName());
+ //
+ gMC->StopTrack();
+ return;
+ }
+ }
+
+ // Particle energy loss
+ if(gMC->Edep() != 0){
+ hits[9] = gMC->Edep();
+ hits[7] = 0.;
+ hits[8] = 0.;
+ AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
+ }
}
}
ibe = Int_t(be*1000.+1);
- //if((vol[0]==1)) radius = fFibZN[1];
- //else if((vol[0]==2)) radius = fFibZP[1];
-
+
//Looking into the light tables
Float_t charge = gMC->TrackCharge();
// z-coordinate from ZEM front face
// NB-> fPosZEM[2]+fZEMLength = -1000.+2*10.3 = 979.69 cm
Float_t z = -xalic[2]+fPosZEM[2]+2*fZEMLength-xalic[1];
-// z = xalic[2]-fPosZEM[2]-fZEMLength-xalic[1]*(TMath::Tan(45.*kDegrad));
-// printf("\n fPosZEM[2]+2*fZEMLength = %f", fPosZEM[2]+2*fZEMLength);
+ //z = xalic[2]-fPosZEM[2]-fZEMLength-xalic[1]*(TMath::Tan(45.*kDegrad));
+ //printf(" fPosZEM[2]+2*fZEMLength = %f", fPosZEM[2]+2*fZEMLength);
+ //
+ // Parametrization for light guide uniformity
+ // NEW!!! Light guide tilted @ 51 degrees
+ Float_t guiPar[4]={0.31,-0.0006305,0.01337,0.8895};
Float_t guiEff = guiPar[0]*(guiPar[1]*z*z+guiPar[2]*z+guiPar[3]);
out = out*guiEff;
nphe = gRandom->Poisson(out);
-// printf(" out*guiEff = %f nphe = %d", out, nphe);
+ //printf(" out*guiEff = %f nphe = %d", out, nphe);
if(vol[1] == 1){
hits[7] = 0;
hits[8] = nphe; //fLightPMC (ZEM1)