#include <TVector.h>
#include <TGeometry.h>
#include <TNode.h>
-#include <TObjectTable.h>
#include <TBRIK.h>
#include <TPGON.h>
-#include "GParticle.h"
#include "AliTRD.h"
#include "AliRun.h"
-#include <iostream.h>
-#include <fstream.h>
-#include "TGeant3.h"
+#include "AliMC.h"
+#include "AliConst.h"
ClassImp(AliTRD)
//
// Default constructor
//
- fIshunt = 0;
+ fIshunt = 0;
+ fGasMix = 0;
+ fSensSelect = 0;
+ fSensPlane = 0;
+ fSensChamber = 0;
+ fSensSector = 0;
}
//_____________________________________________________________________________
fHits = new TClonesArray("AliTRDhit", 405);
- fIshunt = 0;
+ fIshunt = 0;
+ fGasMix = 0;
+ fSensSelect = 0;
+ fSensPlane = 0;
+ fSensChamber = 0;
+ fSensSector = 0;
SetMarkerColor(kWhite);
}
TNode *Node, *Top;
TPGON *pgon;
const Int_t kColorTRD = 46;
- //
+
// Find the top node alice
Top=gAlice->GetGeometry()->GetNode("alice");
- //
- pgon = new TPGON("S_TRD","TRD","void",0,360,18,2);
- pgon->DefineSection(0,-351.2,285.335,355.686);
- pgon->DefineSection(1, 351.2,285.335,355.686);
+
+ pgon = new TPGON("S_TRD","TRD","void",0,360,nsect,4);
+ Float_t ff = TMath::Cos(kDegrad * 180 / nsect);
+ Float_t rrmin = rmin / ff;
+ Float_t rrmax = rmax / ff;
+ pgon->DefineSection(0,-zmax1,rrmax,rrmax);
+ pgon->DefineSection(1,-zmax2,rrmin,rrmax);
+ pgon->DefineSection(2, zmax2,rrmin,rrmax);
+ pgon->DefineSection(3, zmax1,rrmax,rrmax);
Top->cd();
Node = new TNode("TRD","TRD","S_TRD",0,0,0,"");
Node->SetLineColor(kColorTRD);
fNodes->Add(Node);
+
}
//_____________________________________________________________________________
void AliTRD::CreateMaterials()
{
+
//
// Create the materials for the TRD
// Origin Y.Foka
Int_t ISXFLD = gAlice->Field()->Integ();
Float_t SXMGMX = gAlice->Field()->Max();
- // --- For polyethilene (CH2)
- Float_t ape[2] = { 12.,1. };
- Float_t zpe[2] = { 6.,1. };
- Float_t wpe[2] = { .33,.67 };
- Float_t dpe = .95;
- // --- For mylar (C5H4O2)
- Float_t amy[3] = { 12.,1.,16. };
- Float_t zmy[3] = { 6.,1.,8. };
- Float_t wmy[3] = { 5.,4.,2. };
+ // For polyethilene (CH2)
+ Float_t ape[2] = { 12., 1. };
+ Float_t zpe[2] = { 6., 1. };
+ Float_t wpe[2] = { 1., 2. };
+ Float_t dpe = 0.95;
+
+ // For mylar (C5H4O2)
+ Float_t amy[3] = { 12., 1., 16. };
+ Float_t zmy[3] = { 6., 1., 8. };
+ Float_t wmy[3] = { 5., 4., 2. };
Float_t dmy = 1.39;
- // --- For CO2
- Float_t aco[2] = { 12.,16. };
- Float_t zco[2] = { 6.,8. };
- Float_t wco[2] = { 1.,2. };
- Float_t dco = .001977;
- // --- For Xe/CO2-gas-mixture
- // --- Xe-content of the gas-mixture (90% / 10%)
- Float_t fxe = .9;
+
+ // For CO2
+ Float_t aco[2] = { 12., 16. };
+ Float_t zco[2] = { 6., 8. };
+ Float_t wco[2] = { 1., 2. };
+ Float_t dco = 0.001977;
+
+ // For water
+ Float_t awa[2] = { 1., 16. };
+ Float_t zwa[2] = { 1., 8. };
+ Float_t wwa[2] = { 2., 1. };
+ Float_t dwa = 1.0;
+
+ // For isobutane (C4H10)
+ Float_t ais[2] = { 12., 1. };
+ Float_t zis[2] = { 6., 1. };
+ Float_t wis[2] = { 4., 10. };
+ Float_t dis = 0.00267;
+
+ // For Xe/CO2-gas-mixture
+ // Xe-content of the Xe/CO2-mixture (90% / 10%)
+ Float_t fxc = .90;
+ // Xe-content of the Xe/Isobutane-mixture (97% / 3%)
+ Float_t fxi = .97;
Float_t dxe = .005858;
- // --- General tracking parameter
+ // General tracking parameter
Float_t tmaxfd = -10.;
Float_t stemax = -1e10;
- Float_t deemax = -.1;
- Float_t epsil = 1e-4;
- Float_t stmin = -.001;
+ Float_t deemax = -0.1;
+ Float_t epsil = 1e-4;
+ Float_t stmin = -0.001;
Float_t absl, radl, d, buf[1];
Float_t agm[2], dgm, zgm[2], wgm[2];
- Int_t nbuf;
+ Int_t nbuf;
+ //////////////////////////////////////////////////////////////////////////
// Define Materials
-
- // ***********************************************************************
- AliMaterial(1, "Al $", 26.98, 13., 2.7, 8.9, 37.2);
- AliMaterial(2, "Air$", 14.61, 7.3, .001205, 30420., 67500);
- AliMaterial(4, "Xe $", 131.29, 54., dxe, 1447.59, 0);
- AliMaterial(5, "Cu $", 63.54, 29., 8.96, 1.43, 14.8);
- AliMaterial(6, "C $", 12.01, 6., 2.265, 18.8, 74.4);
- // --- Mixtures
- AliMixture(3, "Polyethilene$", ape, zpe, dpe, -2, wpe);
- AliMixture(7, "Mylar$", amy, zmy, dmy, -3, wmy);
- AliMixture(8, "CO2$", aco, zco, dco, -2, wco);
+ //////////////////////////////////////////////////////////////////////////
+
+ AliMaterial( 1, "Al $", 26.98, 13.0, 2.7 , 8.9 , 37.2);
+ AliMaterial( 2, "Air$", 14.61, 7.3, 0.001205, 30420.0 , 67500.0);
+ AliMaterial( 4, "Xe $", 131.29, 54.0, dxe , 1447.59, 0.0);
+ AliMaterial( 5, "Cu $", 63.54, 29.0, 8.96 , 1.43, 14.8);
+ AliMaterial( 6, "C $", 12.01, 6.0, 2.265 , 18.8 , 74.4);
+ AliMaterial(12, "G10$", 20.00, 10.0, 1.7 , 19.4 , 999.0);
+
+ // Mixtures
+ AliMixture(3, "Polyethilene$", ape, zpe, dpe, -2, wpe);
+ AliMixture(7, "Mylar$", amy, zmy, dmy, -3, wmy);
+ AliMixture(8, "CO2$", aco, zco, dco, -2, wco);
+ AliMixture(9, "Isobutane$", ais, zis, dis, -2, wis);
+ AliMixture(13, "Water$" , awa, zwa, dwa, -2, wwa);
+
+ // Gas mixtures
char namate[21];
- // --- Get properties of Xe
+ // Xe/CO2-mixture
+ // Get properties of Xe
pMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
- // --- Get properties of CO2
+ // Get properties of CO2
pMC->Gfmate((*fIdmate)[8], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
- // --- Create gas mixture
- wgm[0] = fxe;
- wgm[1] = 1. - fxe;
+ // Create gas mixture
+ wgm[0] = fxc;
+ wgm[1] = 1. - fxc;
dgm = wgm[0] * dxe + wgm[1] * dco;
- AliMixture(9, "Gas mixture$", agm, zgm, dgm, 2, wgm);
- // ***********************************************************************
-
+ AliMixture(10, "Gas mixture 1$", agm, zgm, dgm, 2, wgm);
+ // Xe/Isobutane-mixture
+ // Get properties of Xe
+ pMC->Gfmate((*fIdmate)[4], namate, agm[0], zgm[0], d, radl, absl, buf, nbuf);
+ // Get properties of Isobutane
+ pMC->Gfmate((*fIdmate)[9], namate, agm[1], zgm[1], d, radl, absl, buf, nbuf);
+ // Create gas mixture
+ wgm[0] = fxi;
+ wgm[1] = 1. - fxi;
+ dgm = wgm[0] * dxe + wgm[1] * dis;
+ AliMixture(11, "Gas mixture 2$", agm, zgm, dgm, 2, wgm);
+
+ //////////////////////////////////////////////////////////////////////////
// Tracking Media Parameters
-
- // ***********************************************************************
- // --- Al Frame
- AliMedium(1301, "Al Frame$", 1, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Air
- AliMedium(1302, "Air$", 2, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Polyethilene
- AliMedium(1303, "Radiator$", 3, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Xe
- AliMedium(1304, "Xe$", 4, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Cu pads
- AliMedium(1305, "Padplane$", 5, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Fee + cables
- AliMedium(1306, "Readout$", 1, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- C frame
- AliMedium(1307, "C Frame$", 6, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Mylar foils
- AliMedium(1308, "Mylar$", 7, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Gas-mixture
- AliMedium(1309, "Gas-mix$", 9, 1, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Nomex-honeycomb (use carbon for the time being)
- AliMedium(1310, "Nomex$", 6, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Kapton foils (use Mylar for the time being)
- AliMedium(1311, "Kapton$", 7, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
- // --- Gas-filling of the radiator
- AliMedium(1312, "CO2$", 8, 0, ISXFLD, SXMGMX, tmaxfd, stemax, deemax, epsil, stmin);
+ //////////////////////////////////////////////////////////////////////////
+
+ // Al Frame
+ AliMedium(1301, "Al Frame$", 1, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // Air
+ AliMedium(1302, "Air$", 2, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // Polyethilene
+ AliMedium(1303, "Radiator$", 3, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // Xe
+ AliMedium(1304, "Xe$", 4, 1, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // Cu pads
+ AliMedium(1305, "Padplane$", 5, 1, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // Fee + cables
+ AliMedium(1306, "Readout$", 1, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // C frame
+ AliMedium(1307, "C Frame$", 6, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // Mylar foils
+ AliMedium(1308, "Mylar$", 7, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ if (fGasMix == 1) {
+ // Gas-mixture (Xe/CO2)
+ AliMedium(1309, "Gas-mix$", 10, 1, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ }
+ else {
+ // Gas-mixture (Xe/Isobutane)
+ AliMedium(1309, "Gas-mix$", 11, 1, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ }
+ // Nomex-honeycomb (use carbon for the time being)
+ AliMedium(1310, "Nomex$", 6, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // Kapton foils (use Mylar for the time being)
+ AliMedium(1311, "Kapton$", 7, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // Gas-filling of the radiator
+ AliMedium(1312, "CO2$", 8, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // G10-plates
+ AliMedium(1313, "G10-plates$",12, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+ // Cooling water
+ AliMedium(1314, "Water$", 13, 0, ISXFLD, SXMGMX
+ , tmaxfd, stemax, deemax, epsil, stmin);
+
}
//_____________________________________________________________________________
printf(" TRD_INIT ");
for(i=0;i<35;i++) printf("*");
printf("\n");
- //
+
// Here the TRD initialisation code (if any!)
+ if (fGasMix == 1)
+ printf(" Gas Mixture: 90%% Xe + 10%% CO2\n");
+ else
+ printf(" Gas Mixture: 97%% Xe + 3%% Isobutane\n");
+ if (fSensPlane)
+ printf(" Only plane %d is sensitive\n",fSensPlane);
+ if (fSensChamber)
+ printf(" Only chamber %d is sensitive\n",fSensChamber);
+ if (fSensSector)
+ printf(" Only sector %d is sensitive\n",fSensSector);
+
for(i=0;i<80;i++) printf("*");
printf("\n");
}
+//_____________________________________________________________________________
+void AliTRD::SetGasMix(Int_t imix = 0)
+{
+
+ if ((imix < 0) || (imix > 1)) {
+ printf("Wrong input value: %d\n",imix);
+ printf("Use standard setting\n");
+ fGasMix = 0;
+ return;
+ }
+
+ fGasMix = imix;
+
+}
+
+//_____________________________________________________________________________
+void AliTRD::SetSensPlane(Int_t iplane = 0)
+{
+
+ if ((iplane < 0) || (iplane > 6)) {
+ printf("Wrong input value: %d\n",iplane);
+ printf("Use standard setting\n");
+ fSensPlane = 0;
+ fSensSelect = 0;
+ return;
+ }
+
+ fSensSelect = 1;
+ fSensPlane = iplane;
+
+}
+
+//_____________________________________________________________________________
+void AliTRD::SetSensChamber(Int_t ichamber = 0)
+{
+
+ if ((ichamber < 0) || (ichamber > 5)) {
+ printf("Wrong input value: %d\n",ichamber);
+ printf("Use standard setting\n");
+ fSensChamber = 0;
+ fSensSelect = 0;
+ return;
+ }
+
+ fSensSelect = 1;
+ fSensChamber = ichamber;
+
+}
+
+//_____________________________________________________________________________
+void AliTRD::SetSensSector(Int_t isector = 0)
+{
+
+ if ((isector < 0) || (isector > 18)) {
+ printf("Wrong input value: %d\n",isector);
+ printf("Use standard setting\n");
+ fSensSector = 0;
+ fSensSelect = 0;
+ return;
+ }
+
+ fSensSelect = 1;
+ fSensSector = isector;
+
+}
+
ClassImp(AliTRDhit)
//_____________________________________________________________________________
#ifndef TRD_H
#define TRD_H
////////////////////////////////////////////////
-// Manager and hits classes for set:TRD //
+// Manager and hits classes for set: TRD //
////////////////////////////////////////////////
#include "AliDetector.h"
class AliTRD : public AliDetector {
+protected:
+
+ Int_t fGasMix; // Gas mixture. 0: Xe/Isobutane 1: Xe/CO2
+ Int_t fSensSelect; // Switch to select only parts of the detector
+ Int_t fSensPlane; // Sensitive detector plane
+ Int_t fSensChamber; // Sensitive detector chamber
+ Int_t fSensSector; // Sensitive detector sector
+
public:
AliTRD();
AliTRD(const char *name, const char *title);
virtual ~AliTRD() {}
virtual void AddHit(Int_t, Int_t*, Float_t*);
virtual void BuildGeometry();
- virtual void CreateGeometry() {}
virtual void CreateMaterials();
Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void Init();
virtual Int_t IsVersion() const =0;
virtual void StepManager()=0;
- virtual void DrawModule() {}
-
- ClassDef(AliTRD,1) // Transition Radiation Detector base class
+ virtual void SetGasMix(Int_t imix = 0);
+ virtual void SetSensPlane(Int_t iplane = 0);
+ virtual void SetSensChamber(Int_t ichamber = 0);
+ virtual void SetSensSector(Int_t isector = 0);
+
+ ClassDef(AliTRD,1) // Transition Radiation Detector base class
};
-const Int_t nsect = 18; //Number of sectors in the full detector
-const Int_t nmodul = 6; //Number of modules in each sector
-const Float_t rmin = 281; //r-Coordinates of the TRD-frame
-const Float_t rmax = 350.282;
-const Float_t zmax1 = 351.2; //z-Coordinates of the TRD-frame
-const Float_t zmax2 = 292.35;
-const Float_t alframe = 1.0; //Thickness of the aluminium of the support frame
-const Float_t alfram1 = 1.0;
-const Float_t alfram2 = 0.5;
-const Float_t inframe = 3.0; //Thickness of the interior of the support frame
-const Float_t ccframe = 1.0; //Thickness of the carbon chamber frame
-const Float_t pethick = 0.15; //Thickness of the PE-layer in the radiator
-const Float_t pezpos = 0.; //z-position of the PE-layer in the radiator
-const Float_t rathick = 6.23; //Thickness of the radiator
-const Float_t razpos = -2.6585; //z-position of the radiator
-const Float_t mythick = 0.005; //Thickness of the mylar-layer
-const Float_t myzpos = 0.459; //z-position of the mylar-layer
-const Float_t xethick = 3.6; //Thickness of the Xe/C02-layer
-const Float_t xezpos = 2.2615; //z-position of the Xe/C02-layer
-const Float_t cuthick = 0.002; //Thickness of the Cu-layer (Pads)
-const Float_t cuzpos = 4.0625; //z-position of the Cu-layer (Pads)
-const Float_t kathick = 0.01; //Thickness of the kapton-layer
-const Float_t kazpos = 4.0695; //z-position of the kapton-layer
-const Float_t nothick = 0.05; //Thickness of the NOMEX-layer
-const Float_t nozpos = 4.8235; //z-position of the NOMEX-layer
-const Float_t rothick = 0.018; //Thickness of the readout-layer
-const Float_t rozpos = 5.2; //z-position of the readout-layer
-
+////////////////////////////////////////////////
+// Geometry parameter
+////////////////////////////////////////////////
+
+const Int_t nsect = 18; // Number of sectors in the full detector
+const Int_t nmodul = 6; // Number of modules in each sector
+const Int_t ncham = 6; // Number of different chambers
+const Int_t narmsec = 5; // Number of sectors in one arm (geometry 1)
+
+const Float_t rmin = 294.0; // r-dimensions of the TRD-frame
+const Float_t rmax = 368.0;
+
+const Float_t zmax1 = 378.35; // z-dimensions of the TRD-frame
+const Float_t zmax2 = 302.0;
+
+const Float_t zleni = 110.0; // z-dimension of the inner chamber
+const Float_t zlenn = 156.0; // z-dimension of the neighbouring chambers
+const Float_t zleno = 156.0; // z-dimension of the outer chambers
+
+const Float_t widpl1 = 99.6; // rphi-dimension of the innermost plane
+
+const Float_t alframe = 1.0; // Thickness of the aluminium of the support frame
+const Float_t ccframe = 1.0; // Thickness of the carbon chamber frame
+
+// Thicknesses of the the material layers
+const Float_t sethick = 0.02; // Radiator seal
+const Float_t rathick = 4.2; // Radiator
+const Float_t pethick = 0.20; // PE-layer in the radiator
+const Float_t mythick = 0.005; // Mylar-layer
+const Float_t xethick = 3.5; // Gas mixture
+const Float_t cuthick = 0.001; // Pad plane
+const Float_t suthick = 0.06; // HEXCEL+G10 support structure (= 0.31% X0)
+const Float_t fethick = 0.0044; // FEE + signal lines (= 0.31% X0)
+const Float_t cothick = 0.02; // PE of the cooling device
+const Float_t wathick = 0.01; // Cooling water
+
+// Position of the material layers
+const Float_t sezpos = -5.657; // Radiator seal
+const Float_t razpos = -3.557; // Radiator
+const Float_t pezpos = 0.0; // PE-layer in the radiator
+const Float_t myzpos = -1.4545; // Mylar-layer
+const Float_t xezpos = 0.298; // Gas mixture
+const Float_t cuzpos = 2.047; // Pad plane
+const Float_t suzpos = 3.046; // HEXCEL+G10 support structure
+const Float_t fezpos = 4.0482; // FEE + signal lines
+const Float_t cozpos = 4.1504; // PE of the cooling devices
+const Float_t wazpos = 4.3004; // Cooling water
+
+////////////////////////////////////////////////
+// Parameter for the energy loss calculation
+////////////////////////////////////////////////
+
+const Float_t kPoti = 12.1; // First ionization potential (eV)
+const Float_t kEend = 50000.0; // Maximum energy (50 keV);
+
//_____________________________________________________________________________
class AliTRDhit : public AliHit {
#include <TMath.h>
#include <TRandom.h>
#include <TVector.h>
-#include <TGeometry.h>
-#include <TNode.h>
-#include <TBRIK.h>
-#include <TPGON.h>
-#include "GParticle.h"
#include "AliTRDv0.h"
#include "AliRun.h"
#include "AliMC.h"
//
// Standard constructor for Transition Radiation Detector version 0
//
- fIdSens1 = fIdSens2 = 0;
+ fIdSens1 = fIdSens2 = fIdSens3 = 0;
}
//_____________________________________________________________________________
// Create the GEANT geometry for the Transition Radiation Detector
// --- The coarse geometry of the TRD, that can be used for background
// studies. This version covers the full azimuth.
- // -- Author : Nick van Eijndhoven (CERN) 24/09/90
+ // --- Author : Christoph Blume (GSI) 17/5/99
+ //
+ // --- Volume names :
+ // TRD --> Mother TRD volume (Al)
+ // UTRS --> Sectors of the sub-detector (Al)
+ // UTRI --> Inner part of the detector frame (Air)
+ // UTCI(N,O) --> Frames of the inner, neighbouring and outer chambers (C)
+ // UTII(N,O) --> Inner part of the chambers (Air)
+ // UTMI(N,O) --> Modules in the chambers (Air)
+ // UT0I(N,O) --> Radiator seal (G10)
+ // UT1I(N,O) --> Radiator (CO2)
+ // UT2I(N,O) --> Polyethylene of radiator (PE)
+ // UT3I(N,O) --> Entrance window (Mylar)
+ // UT4I(N,O) --> Gas volume (sensitive) (Xe/Isobutane)
+ // UT5I(N,O) --> Pad plane (Cu)
+ // UT6I(N,O) --> Support structure (G10)
+ // UT7I(N,O) --> FEE + signal lines (Cu)
+ // UT8I(N,O) --> Polyethylene of cooling device (PE)
+ // UT9I(N,O) --> Cooling water (Water)
//
//Begin_Html
/*
//End_Html
Float_t xpos, ypos, zpos, f;
- Int_t idmat[2];
- Float_t widma, theoc, widmi;
- Float_t tanzr;
- Float_t par_ic[4], par_oc[11], par_mo[10], par_fr[4];
-
+ Int_t idmat[2];
+
+ const Int_t nparmo = 10;
+ const Int_t nparfr = 4;
+ const Int_t nparic = 4;
+ const Int_t nparnc = 4;
+ const Int_t nparoc = 11;
+
+ Float_t par_mo[nparmo];
+ Float_t par_fr[nparfr];
+ Float_t par_ic[nparic];
+ Float_t par_nc[nparnc];
+ Float_t par_oc[nparoc];
+
Int_t *idtmed = gAlice->Idtmed();
- // --- Name Conventions :
- // TRD --> Mother TRD volume (Al)
- // UTRS --> Sectors of the sub-detector (Al)
- // UTFI(O) --> Inner part of the detector frame (Air)
- // UTCI(O) --> Frames of the inner and outer chambers (C)
- // UTII(O) --> Inner part of the chambers (Air)
- // UTMI(O) --> Modules in the chambers (Air)
- // UT1I(O) --> Radiator layer (CO2)
- // UT2I(O) --> Polyethylene layer (PE)
- // UT3I(O) --> Mylar layer (Mylar)
- // UT4I(O) --> Xe/C02 layer (Xe/C02)
- // UT5I(O) --> Cu layer (pads/sensitive) (Cu)
- // UT6I(O) --> Kapton layer (Kapton)
- // UT7I(O) --> NOMEX layer (C)
- // UT8I(O) --> Readout layer (Al)
-
- // --- Contains geometry information
-
- // --- Number of sectors in the full detector
- // --- Number of modules in each sector
- // --- z-Coordinates of the TRD-frame
- // --- r-Coordinates of the TRD-frame
- // --- Thickness of the aluminium of the support frame
- // --- Thickness of the interior of the support frame
- // --- Thickness of the carbon chamber frame
- // --- Thickness and z-position of the PE-layer in the radiator
- // --- Thickness and z-position of the radiator
- // --- Thickness and z-position of the mylar-layer
- // --- Thickness and z-position of the Xe/C02-layer
- // --- Thickness and z-position of the Cu-layer (Pads)
- // --- Thickness and z-position of the kapton-layer
- // --- Thickness and z-position of the NOMEX-layer
- // Simple C-layer for the time being
- // --- Thickness and z-position of the readout-layer
- // --- Parameter for the arrays
-
AliMC* pMC = AliMC::GetMC();
-
- //************************************************************************
-
+
+ //////////////////////////////////////////////////////////////////////////
// Definition of Volumes
+ //////////////////////////////////////////////////////////////////////////
- //************************************************************************
-
- //phisec = 360./nsect; //The phi-angle of the sectors
- widmi = rmin*TMath::Sin(kPI/nsect);
- widma = rmax*TMath::Sin(kPI/nsect);
- // --- Definition of the Mother volume for the TRD (Al)
- par_mo[0] = 0.;
+ // Definition of the mother volume for the TRD (Al)
+ par_mo[0] = 0.;
par_mo[1] = 360.;
par_mo[2] = nsect;
par_mo[3] = 2.;
par_mo[4] = -zmax1;
par_mo[5] = rmin;
par_mo[6] = rmax;
- par_mo[7] = zmax1;
+ par_mo[7] = zmax1;
par_mo[8] = rmin;
par_mo[9] = rmax;
- pMC->Gsvolu("TRD ", "PGON", idtmed[1300], par_mo, 10);
- pMC->Gsdvn("UTRS", "TRD ", 18, 2);
- // --- Definition of the inner part of the detector frame (Air)
- par_fr[0] = widmi;
- par_fr[1] = widma;
- par_fr[2] = zmax1/4 - alfram2/2;
- par_fr[3] = (rmax-rmin)/2;
- pMC->Gsvolu("UTFI", "TRD1", idtmed[1301], par_fr, 4);
- pMC->Gsvolu("UTFO", "TRD1", idtmed[1301], par_fr, 4);
- // --- Calculate the shape-parameter for the outer chambers
- tanzr = (zmax1-zmax2)/(rmax-rmin);
- theoc = -kRaddeg*TMath::ATan(tanzr/2);
- // --- The carbon frame of the outer chambers
- par_oc[0] = (rmax-rmin)/2;
- par_oc[1] = theoc;
- par_oc[2] = 90.;
- par_oc[3] = zmax2/2 -zmax1/4 -alfram2/2;
- par_oc[4] = widmi - (inframe+alfram1)/2;
- par_oc[5] = widmi - (inframe+alfram1)/2;
- par_oc[6] = 0.;
- par_oc[7] = zmax1/4 -alfram2/2;
- par_oc[8] = widma - (inframe+alfram1)/2;
- par_oc[9] = widma - (inframe+alfram1)/2;
+ pMC->Gsvolu("TRD ", "PGON", idtmed[1301-1], par_mo, nparmo);
+ pMC->Gsdvn("UTRS", "TRD ", nsect, 2);
+
+ // The minimal width of a sector in rphi-direction
+ Float_t widmi = rmin * TMath::Sin(kPI/nsect);
+ // The maximal width of a sector in rphi-direction
+ Float_t widma = rmax * TMath::Sin(kPI/nsect);
+ // The total thickness of the spaceframe (Al + Air)
+ Float_t frame = widmi - (widpl1 / 2);
+
+ // Definition of the inner part of the detector frame (Air)
+ par_fr[0] = widmi - alframe / 2.;
+ par_fr[1] = widma - alframe / 2.;
+ par_fr[2] = zmax1;
+ par_fr[3] = (rmax - rmin) / 2;
+ pMC->Gsvolu("UTRI", "TRD1", idtmed[1302-1], par_fr, nparfr);
+
+ //
+ // The outer chambers
+ //
+
+ // Calculate some shape-parameter
+ Float_t tanzr = (zmax1 - zmax2) / (rmax - rmin);
+ Float_t theoc = -kRaddeg * TMath::ATan(tanzr / 2);
+
+ // The carbon frame (C)
+ par_oc[0] = (rmax - rmin) / 2;
+ par_oc[1] = theoc;
+ par_oc[2] = 90.;
+ par_oc[3] = (zmax2 - zlenn - zleni/2) / 2;
+ par_oc[4] = widmi - frame;
+ par_oc[5] = widmi - frame;
+ par_oc[6] = 0.;
+ par_oc[7] = (zmax1 - zlenn - zleni/2) / 2;
+ par_oc[8] = widma - frame;
+ par_oc[9] = widma - frame;
par_oc[10] = 0.;
- pMC->Gsvolu("UTCO", "TRAP", idtmed[1306], par_oc, 11);
- // --- The inner part of the outer chambers (Air)
+ pMC->Gsvolu("UTCO", "TRAP", idtmed[1307-1], par_oc, nparoc);
+
+ // The inner part (Air)
par_oc[3] -= ccframe;
par_oc[4] -= ccframe;
- par_oc[5] -= ccframe;
+ par_oc[5] -= ccframe;
par_oc[7] -= ccframe;
par_oc[8] -= ccframe;
par_oc[9] -= ccframe;
- pMC->Gsvolu("UTIO", "TRAP", idtmed[1301], par_oc, 11);
- // --- Definition of the six modules within each outer chamber
+ pMC->Gsvolu("UTIO", "TRAP", idtmed[1302-1], par_oc, nparoc);
+
+ // Definition of the six modules within each chamber
pMC->Gsdvn("UTMO", "UTIO", nmodul, 3);
- // --- Definition of the layers of each outer chamber
- par_oc[1] = theoc;
- par_oc[2] = 90.;
- par_oc[3] = -1.;
- par_oc[4] = -1.;
- par_oc[5] = -1.;
- par_oc[6] = 0.;
- par_oc[7] = -1.;
- par_oc[8] = -1.;
- par_oc[9] = -1.;
- par_oc[10] = 0.;
- // --- Radiator layer
- par_oc[0] = rathick/2;
- pMC->Gsvolu("UT1O", "TRAP", idtmed[1311], par_oc, 11);
- // --- Polyethylene layer
- par_oc[0] = pethick/2;
- pMC->Gsvolu("UT2O", "TRAP", idtmed[1302], par_oc, 11);
- // --- Mylar layer
- par_oc[0] = mythick/2;
- pMC->Gsvolu("UT3O", "TRAP", idtmed[1307], par_oc, 11);
- // --- Xe/CO2 layer
- par_oc[0] = xethick/2;
- pMC->Gsvolu("UT4O", "TRAP", idtmed[1308], par_oc, 11);
- // --- Cu layer
- par_oc[0] = cuthick/2;
- pMC->Gsvolu("UT5O", "TRAP", idtmed[1304], par_oc, 11);
- // --- Kapton layer
- par_oc[0] = kathick/2;
- pMC->Gsvolu("UT6O", "TRAP", idtmed[1310], par_oc, 11);
- // --- NOMEX layer
- par_oc[0] = nothick/2;
- pMC->Gsvolu("UT7O", "TRAP", idtmed[1309], par_oc, 11);
- // --- Read out layer
- par_oc[0] = rothick/2;
- pMC->Gsvolu("UT8O", "TRAP", idtmed[1305], par_oc, 11);
- // --- The carbon frame of the inner chambers
- par_ic[0] = widmi - (inframe+alfram1)/2;
- par_ic[1] = widma - (inframe+alfram1)/2;
- par_ic[2] = zmax1/4 - alfram2/2;
- par_ic[3] = (rmax-rmin)/2;
- pMC->Gsvolu("UTCI", "TRD1", idtmed[1306], par_ic, 4);
- // --- The inner part of the inner chambers (Air)
+
+ // Definition of the layers of each chamber
+ par_oc[1] = theoc;
+ par_oc[2] = 90.;
+ par_oc[3] = -1.;
+ par_oc[4] = -1.;
+ par_oc[5] = -1.;
+ par_oc[6] = 0.;
+ par_oc[7] = -1.;
+ par_oc[8] = -1.;
+ par_oc[9] = -1.;
+ par_oc[10] = 0.;
+ // G10 layer (radiator layer)
+ par_oc[0] = sethick / 2;
+ pMC->Gsvolu("UT0O", "TRAP", idtmed[1313-1], par_oc, nparoc);
+ // CO2 layer (radiator)
+ par_oc[0] = rathick / 2;
+ pMC->Gsvolu("UT1O", "TRAP", idtmed[1312-1], par_oc, nparoc);
+ // PE layer (radiator)
+ par_oc[0] = pethick / 2;
+ pMC->Gsvolu("UT2O", "TRAP", idtmed[1303-1], par_oc, nparoc);
+ // Mylar layer (entrance window + HV cathode)
+ par_oc[0] = mythick / 2;
+ pMC->Gsvolu("UT3O", "TRAP", idtmed[1308-1], par_oc, nparoc);
+ // Xe/Isobutane layer (gasvolume)
+ par_oc[0] = xethick / 2;
+ pMC->Gsvolu("UT4O", "TRAP", idtmed[1309-1], par_oc, nparoc);
+ // Cu layer (pad plane)
+ par_oc[0] = cuthick / 2;
+ pMC->Gsvolu("UT5O", "TRAP", idtmed[1305-1], par_oc, nparoc);
+ // G10 layer (support structure)
+ par_oc[0] = suthick / 2;
+ pMC->Gsvolu("UT6O", "TRAP", idtmed[1313-1], par_oc, nparoc);
+ // Cu layer (FEE + signal lines)
+ par_oc[0] = fethick / 2;
+ pMC->Gsvolu("UT7O", "TRAP", idtmed[1305-1], par_oc, nparoc);
+ // PE layer (cooling devices)
+ par_oc[0] = cothick / 2;
+ pMC->Gsvolu("UT8O", "TRAP", idtmed[1303-1], par_oc, nparoc);
+ // Water layer (cooling)
+ par_oc[0] = wathick / 2;
+ pMC->Gsvolu("UT9O", "TRAP", idtmed[1314-1], par_oc, nparoc);
+
+ //
+ // The neighbouring chambers
+ //
+
+ // The carbon frame (C)
+ par_nc[0] = widmi - frame;
+ par_nc[1] = widma - frame;
+ par_nc[2] = zlenn / 2;
+ par_nc[3] = (rmax - rmin) / 2;
+ pMC->Gsvolu("UTCN", "TRD1", idtmed[1307-1], par_nc, nparnc);
+
+ // The inner part (Air)
+ par_nc[0] -= ccframe;
+ par_nc[1] -= ccframe;
+ par_nc[2] -= ccframe;
+ pMC->Gsvolu("UTIN", "TRD1", idtmed[1302-1], par_nc, nparnc);
+
+ // Definition of the six modules within each outer chamber
+ pMC->Gsdvn("UTMN", "UTIN", nmodul, 3);
+
+ // Definition of the layers of each chamber
+ par_nc[0] = -1.;
+ par_nc[1] = -1.;
+ par_nc[2] = -1.;
+ // G10 layer (radiator layer)
+ par_nc[3] = sethick / 2;
+ pMC->Gsvolu("UT0N", "TRD1", idtmed[1313-1], par_nc, nparnc);
+ // CO2 layer (radiator)
+ par_nc[3] = rathick / 2;
+ pMC->Gsvolu("UT1N", "TRD1", idtmed[1312-1], par_nc, nparnc);
+ // PE layer (radiator)
+ par_nc[3] = pethick / 2;
+ pMC->Gsvolu("UT2N", "TRD1", idtmed[1303-1], par_nc, nparnc);
+ // Mylar layer (entrance window + HV cathode)
+ par_nc[3] = mythick / 2;
+ pMC->Gsvolu("UT3N", "TRD1", idtmed[1308-1], par_nc, nparnc);
+ // Xe/Isobutane layer (gasvolume)
+ par_nc[3] = xethick / 2;
+ pMC->Gsvolu("UT4N", "TRD1", idtmed[1309-1], par_nc, nparnc);
+ // Cu layer (pad plane)
+ par_nc[3] = cuthick / 2;
+ pMC->Gsvolu("UT5N", "TRD1", idtmed[1305-1], par_nc, nparnc);
+ // G10 layer (support structure)
+ par_nc[3] = suthick / 2;
+ pMC->Gsvolu("UT6N", "TRD1", idtmed[1313-1], par_nc, nparnc);
+ // Cu layer (FEE + signal lines)
+ par_nc[3] = fethick / 2;
+ pMC->Gsvolu("UT7N", "TRD1", idtmed[1305-1], par_nc, nparnc);
+ // PE layer (cooling devices)
+ par_nc[3] = cothick / 2;
+ pMC->Gsvolu("UT8N", "TRD1", idtmed[1303-1], par_nc, nparnc);
+ // Water layer (cooling)
+ par_nc[3] = wathick / 2;
+ pMC->Gsvolu("UT9N", "TRD1", idtmed[1314-1], par_nc, nparnc);
+
+ //
+ // The inner chamber
+ //
+
+ // The carbon frame (C)
+ par_ic[0] = widmi - frame;
+ par_ic[1] = widma - frame;
+ par_ic[2] = zleni / 2;
+ par_ic[3] = (rmax - rmin) / 2;
+ pMC->Gsvolu("UTCI", "TRD1", idtmed[1307-1], par_ic, nparic);
+
+ // The inner part (Air)
par_ic[0] -= ccframe;
par_ic[1] -= ccframe;
par_ic[2] -= ccframe;
- pMC->Gsvolu("UTII", "TRD1", idtmed[1301], par_ic, 4);
- // --- Definition of the six modules within each outer chamber
+ pMC->Gsvolu("UTII", "TRD1", idtmed[1302-1], par_ic, nparic);
+
+ // Definition of the six modules within each outer chamber
pMC->Gsdvn("UTMI", "UTII", nmodul, 3);
- // --- Definition of the layers of each inner chamber
+
+ // Definition of the layers of each inner chamber
par_ic[0] = -1.;
par_ic[1] = -1.;
par_ic[2] = -1.;
- // --- Radiator layer
- par_ic[3] = rathick/2;
- pMC->Gsvolu("UT1I", "TRD1", idtmed[1311], par_ic, 4);
- // --- Polyethylene layer
- par_ic[3] = pethick/2;
- pMC->Gsvolu("UT2I", "TRD1", idtmed[1302], par_ic, 4);
- // --- Mylar layer
- par_ic[3] = mythick/2;
- pMC->Gsvolu("UT3I", "TRD1", idtmed[1307], par_ic, 4);
- // --- Xe/CO2 layer
- par_ic[3] = xethick/2;
- pMC->Gsvolu("UT4I", "TRD1", idtmed[1308], par_ic, 4);
- // --- Cu layer
- par_ic[3] = cuthick/2;
- pMC->Gsvolu("UT5I", "TRD1", idtmed[1304], par_ic, 4);
- // --- Kapton layer
- par_ic[3] = kathick/2;
- pMC->Gsvolu("UT6I", "TRD1", idtmed[1310], par_ic, 4);
- // --- NOMEX layer
- par_ic[3] = nothick/2;
- pMC->Gsvolu("UT7I", "TRD1", idtmed[1309], par_ic, 4);
- // --- Read out layer
- par_ic[3] = rothick/2;
- pMC->Gsvolu("UT8I", "TRD1", idtmed[1305], par_ic, 4);
- //************************************************************************
-
- // Positioning of Volumes
-
- //************************************************************************
- // --- The rotation matrices
- AliMatrix(idmat[0], 90., 90., 180., 0., 90., 0.);
- AliMatrix(idmat[1], 90., 90., 0., 0., 90., 0.);
- // --- Position of the layers in a TRD module
+ // G10 layer (radiator layer)
+ par_ic[3] = sethick / 2;
+ pMC->Gsvolu("UT0I", "TRD1", idtmed[1313-1], par_ic, nparic);
+ // CO2 layer (radiator)
+ par_ic[3] = rathick / 2;
+ pMC->Gsvolu("UT1I", "TRD1", idtmed[1312-1], par_ic, nparic);
+ // PE layer (radiator)
+ par_ic[3] = pethick / 2;
+ pMC->Gsvolu("UT2I", "TRD1", idtmed[1303-1], par_ic, nparic);
+ // Mylar layer (entrance window + HV cathode)
+ par_ic[3] = mythick / 2;
+ pMC->Gsvolu("UT3I", "TRD1", idtmed[1308-1], par_ic, nparic);
+ // Xe/Isobutane layer (gasvolume)
+ par_ic[3] = xethick / 2;
+ pMC->Gsvolu("UT4I", "TRD1", idtmed[1309-1], par_ic, nparic);
+ // Cu layer (pad plane)
+ par_ic[3] = cuthick / 2;
+ pMC->Gsvolu("UT5I", "TRD1", idtmed[1305-1], par_ic, nparic);
+ // G10 layer (support structure)
+ par_ic[3] = suthick / 2;
+ pMC->Gsvolu("UT6I", "TRD1", idtmed[1313-1], par_ic, nparic);
+ // Cu layer (FEE + signal lines)
+ par_ic[3] = fethick / 2;
+ pMC->Gsvolu("UT7I", "TRD1", idtmed[1305-1], par_ic, nparic);
+ // PE layer (cooling devices)
+ par_ic[3] = cothick / 2;
+ pMC->Gsvolu("UT8I", "TRD1", idtmed[1303-1], par_ic, nparic);
+ // Water layer (cooling)
+ par_ic[3] = wathick / 2;
+ pMC->Gsvolu("UT9I", "TRD1", idtmed[1314-1], par_ic, nparic);
+
+ //////////////////////////////////////////////////////////////////////////
+ // Positioning of Volumes
+ //////////////////////////////////////////////////////////////////////////
+
+ // The rotation matrices
+ AliMatrix(idmat[0], 90., 90., 180., 0., 90., 0.);
+ AliMatrix(idmat[1], 90., 180., 90., 270., 0., 0.);
+
+ // Position of the layers in a TRD module
f = TMath::Tan(theoc * kDegrad);
- pMC->Gspos("UT8O", 1, "UTMO", 0., f*rozpos, rozpos, 0, "ONLY");
- pMC->Gspos("UT7O", 1, "UTMO", 0., f*nozpos, nozpos, 0, "ONLY");
- pMC->Gspos("UT6O", 1, "UTMO", 0., f*kazpos, kazpos, 0, "ONLY");
+ pMC->Gspos("UT9O", 1, "UTMO", 0., f*wazpos, wazpos, 0, "ONLY");
+ pMC->Gspos("UT8O", 1, "UTMO", 0., f*cozpos, cozpos, 0, "ONLY");
+ pMC->Gspos("UT7O", 1, "UTMO", 0., f*fezpos, fezpos, 0, "ONLY");
+ pMC->Gspos("UT6O", 1, "UTMO", 0., f*suzpos, suzpos, 0, "ONLY");
pMC->Gspos("UT5O", 1, "UTMO", 0., f*cuzpos, cuzpos, 0, "ONLY");
pMC->Gspos("UT4O", 1, "UTMO", 0., f*xezpos, xezpos, 0, "ONLY");
pMC->Gspos("UT3O", 1, "UTMO", 0., f*myzpos, myzpos, 0, "ONLY");
pMC->Gspos("UT1O", 1, "UTMO", 0., f*razpos, razpos, 0, "ONLY");
+ pMC->Gspos("UT0O", 1, "UTMO", 0., f*sezpos, sezpos, 0, "ONLY");
pMC->Gspos("UT2O", 1, "UT1O", 0., f*pezpos, pezpos, 0, "ONLY");
- pMC->Gspos("UT8I", 1, "UTMI", 0., 0., rozpos, 0, "ONLY");
- pMC->Gspos("UT7I", 1, "UTMI", 0., 0., nozpos, 0, "ONLY");
- pMC->Gspos("UT6I", 1, "UTMI", 0., 0., kazpos, 0, "ONLY");
- pMC->Gspos("UT5I", 1, "UTMI", 0., 0., cuzpos, 0, "ONLY");
- pMC->Gspos("UT4I", 1, "UTMI", 0., 0., xezpos, 0, "ONLY");
- pMC->Gspos("UT3I", 1, "UTMI", 0., 0., myzpos, 0, "ONLY");
- pMC->Gspos("UT1I", 1, "UTMI", 0., 0., razpos, 0, "ONLY");
- pMC->Gspos("UT2I", 1, "UT1I", 0., 0., pezpos, 0, "ONLY");
- // --- Position of the inner part of the chambers
- pMC->Gspos("UTII", 1, "UTCI", 0., 0., 0., 0, "ONLY");
- pMC->Gspos("UTIO", 1, "UTCO", 0., 0., 0., 0, "ONLY");
- // --- Position of the chambers in the support frame
+
+ pMC->Gspos("UT9N", 1, "UTMN", 0., 0., wazpos, 0, "ONLY");
+ pMC->Gspos("UT8N", 1, "UTMN", 0., 0., cozpos, 0, "ONLY");
+ pMC->Gspos("UT7N", 1, "UTMN", 0., 0., fezpos, 0, "ONLY");
+ pMC->Gspos("UT6N", 1, "UTMN", 0., 0., suzpos, 0, "ONLY");
+ pMC->Gspos("UT5N", 1, "UTMN", 0., 0., cuzpos, 0, "ONLY");
+ pMC->Gspos("UT4N", 1, "UTMN", 0., 0., xezpos, 0, "ONLY");
+ pMC->Gspos("UT3N", 1, "UTMN", 0., 0., myzpos, 0, "ONLY");
+ pMC->Gspos("UT1N", 1, "UTMN", 0., 0., razpos, 0, "ONLY");
+ pMC->Gspos("UT0N", 1, "UTMN", 0., 0., sezpos, 0, "ONLY");
+ pMC->Gspos("UT2N", 1, "UT1N", 0., 0., pezpos, 0, "ONLY");
+
+ pMC->Gspos("UT9I", 1, "UTMI", 0., 0., wazpos, 0, "ONLY");
+ pMC->Gspos("UT8I", 1, "UTMI", 0., 0., cozpos, 0, "ONLY");
+ pMC->Gspos("UT7I", 1, "UTMI", 0., 0., fezpos, 0, "ONLY");
+ pMC->Gspos("UT6I", 1, "UTMI", 0., 0., suzpos, 0, "ONLY");
+ pMC->Gspos("UT5I", 1, "UTMI", 0., 0., cuzpos, 0, "ONLY");
+ pMC->Gspos("UT4I", 1, "UTMI", 0., 0., xezpos, 0, "ONLY");
+ pMC->Gspos("UT3I", 1, "UTMI", 0., 0., myzpos, 0, "ONLY");
+ pMC->Gspos("UT1I", 1, "UTMI", 0., 0., razpos, 0, "ONLY");
+ pMC->Gspos("UT0I", 1, "UTMI", 0., 0., sezpos, 0, "ONLY");
+ pMC->Gspos("UT2I", 1, "UT1I", 0., 0., pezpos, 0, "ONLY");
+
+ // Position of the inner part of the chambers
+ xpos = 0.;
+ ypos = 0.;
+ zpos = 0.;
+ pMC->Gspos("UTII", 1, "UTCI", xpos, ypos, zpos, 0, "ONLY");
+ pMC->Gspos("UTIN", 1, "UTCN", xpos, ypos, zpos, 0, "ONLY");
+ pMC->Gspos("UTIO", 1, "UTCO", xpos, ypos, zpos, 0, "ONLY");
+
+ // Position of the chambers in the support frame
+ xpos = 0.;
+ ypos = ((zmax1 + zmax2) / 2 + zlenn + zleni / 2) / 2;
+ zpos = 0.;
+ pMC->Gspos("UTCO", 1, "UTRI", xpos, ypos, zpos, idmat[1], "ONLY");
+ pMC->Gspos("UTCO", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
xpos = 0.;
- ypos = (zmax1-zmax2)/4;
+ ypos = (zlenn + zleni) / 2;
zpos = 0.;
- pMC->Gspos("UTCO", 1, "UTFO", xpos, ypos, zpos, 0, "ONLY");
+ pMC->Gspos("UTCN", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
+ pMC->Gspos("UTCN", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
xpos = 0.;
ypos = 0.;
zpos = 0.;
- pMC->Gspos("UTCI", 1, "UTFI", xpos, ypos, zpos, 0, "ONLY");
- // --- Position of the frame in the sectors of the mother volume
- xpos = (rmax+rmin)/2;
+ pMC->Gspos("UTCI", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
+
+ // Position of the inner part of the detector frame
+ xpos = (rmax + rmin) / 2;
ypos = 0.;
- zpos = zmax1*3/4;
- pMC->Gspos("UTFO", 1, "UTRS", xpos, ypos, zpos, idmat[0], "ONLY");
- pMC->Gspos("UTFO", 2, "UTRS", xpos, ypos,-zpos, idmat[1], "ONLY");
- xpos = (rmax+rmin)/2;
+ zpos = 0.;
+ pMC->Gspos("UTRI", 1, "UTRS", xpos, ypos, zpos, idmat[0], "ONLY");
+
+ // Position of the TRD mother volume in the ALICE experiment
+ xpos = 0.;
ypos = 0.;
- zpos = zmax1/4;
- pMC->Gspos("UTFI", 1, "UTRS", xpos, ypos, zpos, idmat[0], "ONLY");
- pMC->Gspos("UTFI", 2, "UTRS", xpos, ypos,-zpos, idmat[1], "ONLY");
- // --- Position of TRD mother volume in ALICE experiment
- pMC->Gspos("TRD ", 1, "ALIC", 0., 0., 0., 0, "ONLY");
+ zpos = 0.;
+ pMC->Gspos("TRD ", 1, "ALIC", xpos, ypos, zpos, 0, "ONLY");
+
}
//_____________________________________________________________________________
void AliTRDv0::DrawModule()
{
+
//
// Draw a shaded view of the Transition Radiation Detector version 0
//
pMC->Gsatt("ALIC","SEEN",0);
//
// Set the volumes visible
- pMC->Gsatt("TRD","SEEN",0);
+ pMC->Gsatt("TRD" ,"SEEN",0);
pMC->Gsatt("UTRS","SEEN",0);
- pMC->Gsatt("UTFI","SEEN",0);
- pMC->Gsatt("UTFO","SEEN",0);
+ pMC->Gsatt("UTRI","SEEN",0);
pMC->Gsatt("UTCO","SEEN",0);
pMC->Gsatt("UTIO","SEEN",0);
pMC->Gsatt("UTMO","SEEN",0);
- pMC->Gsatt("UT1O","SEEN",1);
- pMC->Gsatt("UT4O","SEEN",1);
+ pMC->Gsatt("UTCN","SEEN",0);
+ pMC->Gsatt("UTIN","SEEN",0);
+ pMC->Gsatt("UTMN","SEEN",0);
pMC->Gsatt("UTCI","SEEN",0);
pMC->Gsatt("UTII","SEEN",0);
pMC->Gsatt("UTMI","SEEN",0);
+ pMC->Gsatt("UT1O","SEEN",1);
+ pMC->Gsatt("UT4O","SEEN",1);
+ pMC->Gsatt("UT1N","SEEN",1);
+ pMC->Gsatt("UT4N","SEEN",1);
pMC->Gsatt("UT1I","SEEN",1);
pMC->Gsatt("UT4I","SEEN",1);
//
pMC->Gdraw("alic", 40, 30, 0, 12, 9.4, .021, .021);
pMC->Gdhead(1111, "Transition Radiation Detector Version 0");
pMC->Gdman(18, 4, "MAN");
+
}
//_____________________________________________________________________________
//
// Create materials for the Transition Radiation Detector
//
- printf("TRD: Fast simulation with coarse geometry\n");
AliTRD::CreateMaterials();
}
AliTRD::Init();
AliMC* pMC = AliMC::GetMC();
//
- // Retrieve the numeric identifier of the sensitive planes
- fIdSens1 = pMC->VolId("UT5I");
- fIdSens2 = pMC->VolId("UT5O");
+ // Retrieve the numeric identifier of the sensitive volumes (gas volume)
+ fIdSens1 = pMC->VolId("UT4I");
+ fIdSens2 = pMC->VolId("UT4N");
+ fIdSens3 = pMC->VolId("UT4O");
}
//_____________________________________________________________________________
AliMC* pMC = AliMC::GetMC();
// Use only charged tracks and count them only once per volume
- if(pMC->TrackCharge() && pMC->TrackEntering()) {
+ if (pMC->TrackCharge() && pMC->TrackExiting()) {
// Check on sensitive volume
idSens = pMC->CurrentVol(0,icSens);
- if ((idSens == fIdSens1) || (idSens == fIdSens2)) {
+ if ((idSens == fIdSens1) ||
+ (idSens == fIdSens2) ||
+ (idSens == fIdSens3)) {
// The sector number
pMC->CurrentVolOff(5,0,icopy);
vol[0] = icopy;
- // The chamber number
- pMC->CurrentVolOff(4,0,icopy);
- if (idSens == fIdSens2)
- vol[1] = (icopy - 1) * 3 + 1;
- else
- vol[1] = icopy + 1;
+ // The chamber number
+ // 1: outer left
+ // 2: neighbouring left
+ // 3: inner
+ // 4: neighbouring right
+ // 5: outer right
+ pMC->CurrentVolOff(3,0,icopy);
+ if (idSens == fIdSens3)
+ vol[1] = 4 * icopy - 3;
+ else if (idSens == fIdSens2)
+ vol[1] = 2 * icopy;
+ else
+ vol[1] = 3;
// The plane number
pMC->CurrentVolOff(1,0,icopy);
vol[2] = icopy;
-
- pMC->TrackPosition(hits);
- hits[3] = 0;
-
- new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+
+ if (fSensSelect) {
+ Int_t addthishit = 1;
+ if ((fSensPlane) && (vol[2] != fSensPlane )) addthishit = 0;
+ if ((fSensChamber) && (vol[1] != fSensChamber)) addthishit = 0;
+ if ((fSensSector) && (vol[0] != fSensSector )) addthishit = 0;
+ if (addthishit) {
+ pMC->TrackPosition(hits);
+ hits[3] = 0;
+ new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ }
+ }
+ else {
+ pMC->TrackPosition(hits);
+ hits[3] = 0;
+ new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ }
+
}
+
}
+
}
protected:
Int_t fIdSens1; // 1st sensitive volume identifier
Int_t fIdSens2; // 2nd sensitive volume identifier
+ Int_t fIdSens3; // 3rd sensitive volume identifier
- ClassDef(AliTRDv0,1) // Transition Radiation Detector version 0
+ ClassDef(AliTRDv0,1) // Transition Radiation Detector version 0
};
#endif
///////////////////////////////////////////////////////////////////////////////
// //
-// Transition Radiation Detector version 1 -- detailed simulation //
+// Transition Radiation Detector version 1 -- coarse simulation //
+// This version has two detector arms, leaving the space in front of the //
+// HMPID and PHOS empty //
// //
//Begin_Html
/*
#include <TMath.h>
#include <TRandom.h>
#include <TVector.h>
-#include <TGeometry.h>
-#include <TNode.h>
-#include <TPGON.h>
-#include "GParticle.h"
#include "AliTRDv1.h"
#include "AliRun.h"
-#include "AliConst.h"
#include "AliMC.h"
+#include "AliConst.h"
ClassImp(AliTRDv1)
// --- The coarse geometry of the TRD, that can be used for background
// studies. This version leaves the space in front of the PHOS and
// HMPID empty.
- // -- Author : Nick van Eijndhoven (CERN) 24/09/90
+ // --- Author : Christoph Blume (GSI) 18/5/99
+ //
+ // --- Volume names :
+ // TRD --> Mother TRD volume (Air)
+ // UTRD --> The detector arms (Al)
+ // UTRS --> Sectors of the sub-detector (Al)
+ // UTRI --> Inner part of the detector frame (Air)
+ // UTCI(N,O) --> Frames of the inner, neighbouring and outer chambers (C)
+ // UTII(N,O) --> Inner part of the chambers (Air)
+ // UTMI(N,O) --> Modules in the chambers (Air)
+ // UT0I(N,O) --> Radiator seal (G10)
+ // UT1I(N,O) --> Radiator (CO2)
+ // UT2I(N,O) --> Polyethylene of radiator (PE)
+ // UT3I(N,O) --> Entrance window (Mylar)
+ // UT4I(N,O) --> Gas volume (sensitive) (Xe/Isobutane)
+ // UT5I(N,O) --> Pad plane (Cu)
+ // UT6I(N,O) --> Support structure (G10)
+ // UT7I(N,O) --> FEE + signal lines (Cu)
+ // UT8I(N,O) --> Polyethylene of cooling device (PE)
+ // UT9I(N,O) --> Cooling water (Water)
//
//Begin_Html
/*
//End_Html
Float_t xpos, ypos, zpos, f;
- Int_t idmat[5];
- Float_t widma, theoc, widmi, tanzr;
- Float_t par_ic[4], par_oc[11], phisec, par_mo[10], par_fr[4], par_su[10];
+ Int_t idmat[5];
+
+ const Int_t nparmo = 10;
+ const Int_t nparar = 10;
+ const Int_t nparfr = 4;
+ const Int_t nparic = 4;
+ const Int_t nparnc = 4;
+ const Int_t nparoc = 11;
+
+ Float_t par_mo[nparmo];
+ Float_t par_ar[nparar];
+ Float_t par_fr[nparfr];
+ Float_t par_ic[nparic];
+ Float_t par_nc[nparnc];
+ Float_t par_oc[nparoc];
Int_t *idtmed = gAlice->Idtmed();
- // --- Name Conventions :
- // TRD --> Mother TRD volume (Air)
- // UTRL(S) --> Long (short) subdetector-type (Al)
- // UTSL(S) --> Sectors of a subdetector (Al)
- // UTFI(O/S) --> Inner part of the detector frame (Air)
- // UTCI(O/S) --> Frames of the inner and outer chambers (C)
- // UTII(O/S) --> Inner part of the chambers (Air)
- // UTMI(O/S) --> Modules in the chambers (Air)
- // UT1I(O/S) --> Radiator layer (CO2)
- // UT2I(O/S) --> Polyethylene layer (PE)
- // UT3I(O/S) --> Mylar layer (Mylar)
- // UT4I(O/S) --> Xe/C02 layer (Xe/C02)
- // UT5I(O/S) --> Cu layer (pads/sensitive) (Cu)
- // UT6I(O/S) --> Kapton layer (Kapton)
- // UT7I(O/S) --> NOMEX layer (C)
- // UT8I(O/S) --> Readout layer (Al)
-
- // --- Contains geometry information
-
- // --- Number of sectors in the full detector
- // --- Number of modules in each sector
- // --- z-Coordinates of the TRD-frame
- // --- r-Coordinates of the TRD-frame
- // --- Thickness of the aluminium of the support frame
- // --- Thickness of the interior of the support frame
- // --- Thickness of the carbon chamber frame
- // --- Thickness and z-position of the PE-layer in the radiator
- // --- Thickness and z-position of the radiator
- // --- Thickness and z-position of the mylar-layer
- // --- Thickness and z-position of the Xe/C02-layer
- // --- Thickness and z-position of the Cu-layer (Pads)
- // --- Thickness and z-position of the kapton-layer
- // --- Thickness and z-position of the NOMEX-layer
- // Simple C-layer for the time being
- // --- Thickness and z-position of the readout-layer
- // --- Parameter for the arrays
- // --- Number of subdetector-types
- //--- Number of sectors in the first subdetector-type (full theta coverage)
- //--- Number of sectors in the second subdetector-type (with hole for PHOS)
- //************************************************************************
-
- // Definition of Volumes
-
- //************************************************************************
-
- const Int_t nsec1 = 5; //Number of sectors in the first subdetector-type
- const Int_t nsec2 = 5; //Number of sectors in the second subdetector-type
-
AliMC* pMC = AliMC::GetMC();
- phisec = 360./nsect; //The phi-angle of the sectors
- widmi = rmin*TMath::Sin(kPI/nsect);
- widma = rmax*TMath::Sin(kPI/nsect);
- // --- Definition of the Mother volume for the TRD (Al)
- par_mo[0] = 0.;
+ //////////////////////////////////////////////////////////////////////////
+ // Definition of Volumes
+ //////////////////////////////////////////////////////////////////////////
+
+ // Definition of the mother volume for the TRD (Air)
+ par_mo[0] = 0.;
par_mo[1] = 360.;
par_mo[2] = nsect;
par_mo[3] = 2.;
par_mo[4] = -zmax1;
par_mo[5] = rmin;
par_mo[6] = rmax;
- par_mo[7] = zmax1;
+ par_mo[7] = zmax1;
par_mo[8] = rmin;
par_mo[9] = rmax;
- pMC->Gsvolu("TRD ", "PGON", idtmed[1301], par_mo, 10);
- // --- Definition of the 1st subdetector-type (full theta-coverage) (Al)
- par_su[0] = 120.;
- par_su[1] = nsec1*phisec;
- par_su[2] = nsec1;
- par_su[3] = 2.;
- par_su[4] = -zmax1;
- par_su[5] = rmin;
- par_su[6] = rmax;
- par_su[7] = 0.;
- par_su[8] = rmin;
- par_su[9] = rmax;
- pMC->Gsvolu("UTRL", "PGON", idtmed[1300], par_su, 10);
- pMC->Gsdvn("UTSL", "UTRL", nsec1, 2);
- // --- Definition of the 2nd subdetector-type (hole for PHOS)
- par_su[0] = 220.;
- par_su[1] = nsec2*phisec;
- par_su[2] = nsec2;
- par_su[3] = 2.;
- par_su[4] = -zmax1;
- par_su[5] = rmin;
- par_su[6] = rmax;
- par_su[7] = -zmax1/2;
- par_su[8] = rmin;
- par_su[9] = rmax;
- pMC->Gsvolu("UTRS", "PGON", idtmed[1300], par_su, 10);
- pMC->Gsdvn("UTSS", "UTRS", nsec2, 2);
- // --- Definition of the inner part of the detector frame (Air)
- par_fr[0] = widmi;
- par_fr[1] = widma;
- par_fr[2] = zmax1/4 - alfram2/2;
- par_fr[3] = (rmax-rmin)/2;
- pMC->Gsvolu("UTFI", "TRD1", idtmed[1301], par_fr, 4);
- pMC->Gsvolu("UTFO", "TRD1", idtmed[1301], par_fr, 4);
- pMC->Gsvolu("UTFS", "TRD1", idtmed[1301], par_fr, 4);
- // --- Calculate the shape-parameter for the outer chambers
- tanzr = (zmax1-zmax2)/(rmax-rmin);
- theoc = -kRaddeg*TMath::ATan(tanzr / 2.);
- // --- The carbon frame of the outer chambers
- par_oc[0] = (rmax-rmin)/2;
- par_oc[1] = theoc;
- par_oc[2] = 90.;
- par_oc[3] = zmax2/2 - zmax1/4 -alfram2/2;
- par_oc[4] = widmi - (inframe+alfram1)/2;
- par_oc[5] = widmi - (inframe+alfram1)/2;
- par_oc[6] = 0.;
- par_oc[7] = zmax1/4 - alfram2/2;
- par_oc[8] = widma - (inframe+alfram1)/2;
- par_oc[9] = widma - (inframe+alfram1)/2;
+ pMC->Gsvolu("TRD ", "PGON", idtmed[1302-1], par_mo, nparmo);
+
+ Float_t phisec = 360. / nsect;
+ // Definition of the two detector arms (Al)
+ par_ar[0] = 120.;
+ par_ar[1] = narmsec * phisec;
+ par_ar[2] = narmsec;
+ par_ar[3] = 2.;
+ par_ar[4] = -zmax1;
+ par_ar[5] = rmin;
+ par_ar[6] = rmax;
+ par_ar[7] = zmax1;
+ par_ar[8] = rmin;
+ par_ar[9] = rmax;
+ pMC->Gsvolu("UTRD", "PGON", idtmed[1301-1], par_ar, nparar);
+ pMC->Gsdvn("UTRS", "UTRD", narmsec, 2);
+
+ // The minimal width of a sector in rphi-direction
+ Float_t widmi = rmin * TMath::Sin(kPI/nsect);
+ // The maximal width of a sector in rphi-direction
+ Float_t widma = rmax * TMath::Sin(kPI/nsect);
+ // The total thickness of the spaceframe (Al + Air)
+ Float_t frame = widmi - (widpl1 / 2);
+
+ // Definition of the inner part of the detector frame (Air)
+ par_fr[0] = widmi - alframe / 2;
+ par_fr[1] = widma - alframe / 2;
+ par_fr[2] = zmax1;
+ par_fr[3] = (rmax - rmin) / 2;
+ pMC->Gsvolu("UTRI", "TRD1", idtmed[1302-1], par_fr, nparfr);
+
+ //
+ // The outer chambers
+ //
+
+ // Calculate some shape-parameter
+ Float_t tanzr = (zmax1 - zmax2) / (rmax - rmin);
+ Float_t theoc = -kRaddeg * TMath::ATan(tanzr / 2);
+
+ // The carbon frame (C)
+ par_oc[0] = (rmax - rmin) / 2;
+ par_oc[1] = theoc;
+ par_oc[2] = 90.;
+ par_oc[3] = (zmax2 - zlenn - zleni/2) / 2;
+ par_oc[4] = widmi - frame;
+ par_oc[5] = widmi - frame;
+ par_oc[6] = 0.;
+ par_oc[7] = (zmax1 - zlenn - zleni/2) / 2;
+ par_oc[8] = widma - frame;
+ par_oc[9] = widma - frame;
par_oc[10] = 0.;
- pMC->Gsvolu("UTCO", "TRAP", idtmed[1306], par_oc, 11);
- // --- The inner part of the outer chambers (Air)
+ pMC->Gsvolu("UTCO", "TRAP", idtmed[1307-1], par_oc, nparoc);
+
+ // The inner part (Air)
par_oc[3] -= ccframe;
par_oc[4] -= ccframe;
- par_oc[5] -= ccframe;
+ par_oc[5] -= ccframe;
par_oc[7] -= ccframe;
par_oc[8] -= ccframe;
par_oc[9] -= ccframe;
- pMC->Gsvolu("UTIO", "TRAP", idtmed[1301], par_oc, 11);
- // --- Definition of the six modules within each outer chamber
+ pMC->Gsvolu("UTIO", "TRAP", idtmed[1302-1], par_oc, nparoc);
+
+ // Definition of the six modules within each chamber
pMC->Gsdvn("UTMO", "UTIO", nmodul, 3);
- // --- Definition of the layers of each outer chamber
- par_oc[1] = theoc;
- par_oc[2] = 90.;
- par_oc[3] = -1.;
- par_oc[4] = -1.;
- par_oc[5] = -1.;
- par_oc[6] = 0.;
- par_oc[7] = -1.;
- par_oc[8] = -1.;
- par_oc[9] = -1.;
- par_oc[10] = 0.;
- // --- Radiator layer
- par_oc[0] = rathick/2;
- pMC->Gsvolu("UT1O", "TRAP", idtmed[1311], par_oc, 11);
- // --- Polyethylene layer
- par_oc[0] = pethick/2;
- pMC->Gsvolu("UT2O", "TRAP", idtmed[1302], par_oc, 11);
- // --- Mylar layer
- par_oc[0] = mythick/2;
- pMC->Gsvolu("UT3O", "TRAP", idtmed[1307], par_oc, 11);
- // --- Xe/CO2 layer
- par_oc[0] = xethick/2;
- pMC->Gsvolu("UT4O", "TRAP", idtmed[1308], par_oc, 11);
- // --- Cu layer
- par_oc[0] = cuthick/2;
- pMC->Gsvolu("UT5O", "TRAP", idtmed[1304], par_oc, 11);
- // --- Kapton layer
- par_oc[0] = kathick/2;
- pMC->Gsvolu("UT6O", "TRAP", idtmed[1310], par_oc, 11);
- // --- NOMEX layer
- par_oc[0] = nothick/2;
- pMC->Gsvolu("UT7O", "TRAP", idtmed[1309], par_oc, 11);
- // --- Read out layer
- par_oc[0] = rothick/2;
- pMC->Gsvolu("UT8O", "TRAP", idtmed[1305], par_oc, 11);
- // --- The carbon frame of the chambers in the short sectors
- par_oc[0] = (rmax-rmin)/2;
- par_oc[1] = theoc;
- par_oc[2] = 90.;
- par_oc[3] = zmax2/2 - zmax1/4 -alfram2/2;
- par_oc[4] = widmi - (inframe+alfram1)/2;
- par_oc[5] = widmi - (inframe+alfram1)/2;
- par_oc[6] = 0.;
- par_oc[7] = zmax1/4 - alfram2/2;
- par_oc[8] = widma - (inframe+alfram1)/2;
- par_oc[9] = widma - (inframe+alfram1)/2;
- par_oc[10] = 0.;
- pMC->Gsvolu("UTCS", "TRAP", idtmed[1306], par_oc, 11);
- // --- The inner part of the chambers in the short sectors (Air)
- par_oc[3] -= ccframe;
- par_oc[4] -= ccframe;
- par_oc[5] -= ccframe;
- par_oc[7] -= ccframe;
- par_oc[8] -= ccframe;
- par_oc[9] -= ccframe;
- pMC->Gsvolu("UTIS", "TRAP", idtmed[1301], par_oc, 11);
- //--- Definition of the six modules within each chamber of the short sectors
- pMC->Gsdvn("UTMS", "UTIS", 6, 3);
- // --- Definition of the layers of each chamber in the short sectors
- par_oc[1] = theoc;
- par_oc[2] = 90.;
- par_oc[3] = -1.;
- par_oc[4] = -1.;
- par_oc[5] = -1.;
- par_oc[6] = 0.;
- par_oc[7] = -1.;
- par_oc[8] = -1.;
- par_oc[9] = -1.;
- par_oc[10] = 0.;
- // --- Radiator layer
- par_oc[0] = rathick/2;
- pMC->Gsvolu("UT1S", "TRAP", idtmed[1311], par_oc, 11);
- // --- Polyethylene layer
- par_oc[0] = pethick/2;
- pMC->Gsvolu("UT2S", "TRAP", idtmed[1302], par_oc, 11);
- // --- Mylar layer
- par_oc[0] = mythick/2;
- pMC->Gsvolu("UT3S", "TRAP", idtmed[1307], par_oc, 11);
- // --- Xe/CO2 layer
- par_oc[0] = xethick/2;
- pMC->Gsvolu("UT4S", "TRAP", idtmed[1308], par_oc, 11);
- // --- Cu layer
- par_oc[0] = cuthick/2;
- pMC->Gsvolu("UT5S", "TRAP", idtmed[1304], par_oc, 11);
- // --- Kapton layer
- par_oc[0] = kathick/2;
- pMC->Gsvolu("UT6S", "TRAP", idtmed[1310], par_oc, 11);
- // --- NOMEX layer
- par_oc[0] = nothick/2;
- pMC->Gsvolu("UT7S", "TRAP", idtmed[1309], par_oc, 11);
- // --- Read out layer
- par_oc[0] = rothick/2;
- pMC->Gsvolu("UT8S", "TRAP", idtmed[1305], par_oc, 11);
- // --- The carbon frame of the inner chambers
- par_ic[0] = widmi - (inframe+alfram1)/2;
- par_ic[1] = widma - (inframe+alfram1)/2;
- par_ic[2] = zmax1/4 - alfram2/2;
- par_ic[3] = (rmax-rmin)/2;
- pMC->Gsvolu("UTCI", "TRD1", idtmed[1306], par_ic, 4);
- // --- The inner part of the inner chambers (Air)
+
+ // Definition of the layers of each chamber
+ par_oc[1] = theoc;
+ par_oc[2] = 90.;
+ par_oc[3] = -1.;
+ par_oc[4] = -1.;
+ par_oc[5] = -1.;
+ par_oc[6] = 0.;
+ par_oc[7] = -1.;
+ par_oc[8] = -1.;
+ par_oc[9] = -1.;
+ par_oc[10] = 0.;
+ // G10 layer (radiator layer)
+ par_oc[0] = sethick / 2;
+ pMC->Gsvolu("UT0O", "TRAP", idtmed[1313-1], par_oc, nparoc);
+ // CO2 layer (radiator)
+ par_oc[0] = rathick / 2;
+ pMC->Gsvolu("UT1O", "TRAP", idtmed[1312-1], par_oc, nparoc);
+ // PE layer (radiator)
+ par_oc[0] = pethick / 2;
+ pMC->Gsvolu("UT2O", "TRAP", idtmed[1303-1], par_oc, nparoc);
+ // Mylar layer (entrance window + HV cathode)
+ par_oc[0] = mythick / 2;
+ pMC->Gsvolu("UT3O", "TRAP", idtmed[1308-1], par_oc, nparoc);
+ // Xe/Isobutane layer (gasvolume)
+ par_oc[0] = xethick / 2;
+ pMC->Gsvolu("UT4O", "TRAP", idtmed[1309-1], par_oc, nparoc);
+ // Cu layer (pad plane)
+ par_oc[0] = cuthick / 2;
+ pMC->Gsvolu("UT5O", "TRAP", idtmed[1305-1], par_oc, nparoc);
+ // G10 layer (support structure)
+ par_oc[0] = suthick / 2;
+ pMC->Gsvolu("UT6O", "TRAP", idtmed[1313-1], par_oc, nparoc);
+ // Cu layer (FEE + signal lines)
+ par_oc[0] = fethick / 2;
+ pMC->Gsvolu("UT7O", "TRAP", idtmed[1305-1], par_oc, nparoc);
+ // PE layer (cooling devices)
+ par_oc[0] = cothick / 2;
+ pMC->Gsvolu("UT8O", "TRAP", idtmed[1303-1], par_oc, nparoc);
+ // Water layer (cooling)
+ par_oc[0] = wathick / 2;
+ pMC->Gsvolu("UT9O", "TRAP", idtmed[1314-1], par_oc, nparoc);
+
+ //
+ // The neighbouring chambers
+ //
+
+ // The carbon frame (C)
+ par_nc[0] = widmi - frame;
+ par_nc[1] = widma - frame;
+ par_nc[2] = zlenn / 2;
+ par_nc[3] = (rmax - rmin) / 2;
+ pMC->Gsvolu("UTCN", "TRD1", idtmed[1307-1], par_nc, nparnc);
+
+ // The inner part (Air)
+ par_nc[0] -= ccframe;
+ par_nc[1] -= ccframe;
+ par_nc[2] -= ccframe;
+ pMC->Gsvolu("UTIN", "TRD1", idtmed[1302-1], par_nc, nparnc);
+
+ // Definition of the six modules within each outer chamber
+ pMC->Gsdvn("UTMN", "UTIN", nmodul, 3);
+
+ // Definition of the layers of each chamber
+ par_nc[0] = -1.;
+ par_nc[1] = -1.;
+ par_nc[2] = -1.;
+ // G10 layer (radiator layer)
+ par_nc[3] = sethick / 2;
+ pMC->Gsvolu("UT0N", "TRD1", idtmed[1313-1], par_nc, nparnc);
+ // CO2 layer (radiator)
+ par_nc[3] = rathick / 2;
+ pMC->Gsvolu("UT1N", "TRD1", idtmed[1312-1], par_nc, nparnc);
+ // PE layer (radiator)
+ par_nc[3] = pethick / 2;
+ pMC->Gsvolu("UT2N", "TRD1", idtmed[1303-1], par_nc, nparnc);
+ // Mylar layer (entrance window + HV cathode)
+ par_nc[3] = mythick / 2;
+ pMC->Gsvolu("UT3N", "TRD1", idtmed[1308-1], par_nc, nparnc);
+ // Xe/Isobutane layer (gasvolume)
+ par_nc[3] = xethick / 2;
+ pMC->Gsvolu("UT4N", "TRD1", idtmed[1309-1], par_nc, nparnc);
+ // Cu layer (pad plane)
+ par_nc[3] = cuthick / 2;
+ pMC->Gsvolu("UT5N", "TRD1", idtmed[1305-1], par_nc, nparnc);
+ // G10 layer (support structure)
+ par_nc[3] = suthick / 2;
+ pMC->Gsvolu("UT6N", "TRD1", idtmed[1313-1], par_nc, nparnc);
+ // Cu layer (FEE + signal lines)
+ par_nc[3] = fethick / 2;
+ pMC->Gsvolu("UT7N", "TRD1", idtmed[1305-1], par_nc, nparnc);
+ // PE layer (cooling devices)
+ par_nc[3] = cothick / 2;
+ pMC->Gsvolu("UT8N", "TRD1", idtmed[1303-1], par_nc, nparnc);
+ // Water layer (cooling)
+ par_nc[3] = wathick / 2;
+ pMC->Gsvolu("UT9N", "TRD1", idtmed[1314-1], par_nc, nparnc);
+
+ //
+ // The inner chamber
+ //
+
+ // The carbon frame (C)
+ par_ic[0] = widmi - frame;
+ par_ic[1] = widma - frame;
+ par_ic[2] = zleni / 2;
+ par_ic[3] = (rmax - rmin) / 2;
+ pMC->Gsvolu("UTCI", "TRD1", idtmed[1307-1], par_ic, nparic);
+
+ // The inner part (Air)
par_ic[0] -= ccframe;
par_ic[1] -= ccframe;
par_ic[2] -= ccframe;
- pMC->Gsvolu("UTII", "TRD1", idtmed[1301], par_ic, 4);
- // --- Definition of the six modules within each outer chamber
+ pMC->Gsvolu("UTII", "TRD1", idtmed[1302-1], par_ic, nparic);
+
+ // Definition of the six modules within each outer chamber
pMC->Gsdvn("UTMI", "UTII", nmodul, 3);
- // --- Definition of the layers of each inner chamber
+
+ // Definition of the layers of each inner chamber
par_ic[0] = -1.;
par_ic[1] = -1.;
par_ic[2] = -1.;
- // --- Radiator layer
- par_ic[3] = rathick/2;
- pMC->Gsvolu("UT1I", "TRD1", idtmed[1311], par_ic, 4);
- // --- Polyethylene layer
- par_ic[3] = pethick/2;
- pMC->Gsvolu("UT2I", "TRD1", idtmed[1302], par_ic, 4);
- // --- Mylar layer
- par_ic[3] = mythick/2;
- pMC->Gsvolu("UT3I", "TRD1", idtmed[1307], par_ic, 4);
- // --- Xe/CO2 layer
- par_ic[3] = xethick/2;
- pMC->Gsvolu("UT4I", "TRD1", idtmed[1308], par_ic, 4);
- // --- Cu layer
- par_ic[3] = cuthick/2;
- pMC->Gsvolu("UT5I", "TRD1", idtmed[1304], par_ic, 4);
- // --- Kapton layer
- par_ic[3] = kathick/2;
- pMC->Gsvolu("UT6I", "TRD1", idtmed[1310], par_ic, 4);
- // --- NOMEX layer
- par_ic[3] = nothick/2;
- pMC->Gsvolu("UT7I", "TRD1", idtmed[1309], par_ic, 4);
- // --- Read out layer
- par_ic[3] = rothick/2;
- pMC->Gsvolu("UT8I", "TRD1", idtmed[1305], par_ic, 4);
- //************************************************************************
-
+ // G10 layer (radiator layer)
+ par_ic[3] = sethick / 2;
+ pMC->Gsvolu("UT0I", "TRD1", idtmed[1313-1], par_ic, nparic);
+ // CO2 layer (radiator)
+ par_ic[3] = rathick / 2;
+ pMC->Gsvolu("UT1I", "TRD1", idtmed[1312-1], par_ic, nparic);
+ // PE layer (radiator)
+ par_ic[3] = pethick / 2;
+ pMC->Gsvolu("UT2I", "TRD1", idtmed[1303-1], par_ic, nparic);
+ // Mylar layer (entrance window + HV cathode)
+ par_ic[3] = mythick / 2;
+ pMC->Gsvolu("UT3I", "TRD1", idtmed[1308-1], par_ic, nparic);
+ // Xe/Isobutane layer (gasvolume)
+ par_ic[3] = xethick / 2;
+ pMC->Gsvolu("UT4I", "TRD1", idtmed[1309-1], par_ic, nparic);
+ // Cu layer (pad plane)
+ par_ic[3] = cuthick / 2;
+ pMC->Gsvolu("UT5I", "TRD1", idtmed[1305-1], par_ic, nparic);
+ // G10 layer (support structure)
+ par_ic[3] = suthick / 2;
+ pMC->Gsvolu("UT6I", "TRD1", idtmed[1313-1], par_ic, nparic);
+ // Cu layer (FEE + signal lines)
+ par_ic[3] = fethick / 2;
+ pMC->Gsvolu("UT7I", "TRD1", idtmed[1305-1], par_ic, nparic);
+ // PE layer (cooling devices)
+ par_ic[3] = cothick / 2;
+ pMC->Gsvolu("UT8I", "TRD1", idtmed[1303-1], par_ic, nparic);
+ // Water layer (cooling)
+ par_ic[3] = wathick / 2;
+ pMC->Gsvolu("UT9I", "TRD1", idtmed[1314-1], par_ic, nparic);
+
+ //////////////////////////////////////////////////////////////////////////
// Positioning of Volumes
-
- //************************************************************************
- // --- The rotation matrices
- AliMatrix(idmat[0], 90., 180., 90., 90., 0., 0.);
- AliMatrix(idmat[1], 90., 0., 90., 90., 180., 0.);
- AliMatrix(idmat[2], 90., 180., 90., 90., 180., 0.);
- AliMatrix(idmat[3], 90., 90., 180., 0., 90., 0.);
- AliMatrix(idmat[4], 90., 90., 0., 0., 90., 0.);
- // --- Position of the layers in a TRD module
+ //////////////////////////////////////////////////////////////////////////
+
+ // The rotation matrices
+ AliMatrix(idmat[0], 90., 180., 90., 90., 0., 0.);
+ AliMatrix(idmat[1], 90., 90., 180., 0., 90., 0.);
+ AliMatrix(idmat[2], 90., 180., 90., 270., 0., 0.);
+
+ // Position of the layers in a TRD module
f = TMath::Tan(theoc * kDegrad);
- pMC->Gspos("UT8O", 1, "UTMO", 0., f*rozpos, rozpos, 0, "ONLY");
- pMC->Gspos("UT7O", 1, "UTMO", 0., f*nozpos, nozpos, 0, "ONLY");
- pMC->Gspos("UT6O", 1, "UTMO", 0., f*kazpos, kazpos, 0, "ONLY");
+ pMC->Gspos("UT9O", 1, "UTMO", 0., f*wazpos, wazpos, 0, "ONLY");
+ pMC->Gspos("UT8O", 1, "UTMO", 0., f*cozpos, cozpos, 0, "ONLY");
+ pMC->Gspos("UT7O", 1, "UTMO", 0., f*fezpos, fezpos, 0, "ONLY");
+ pMC->Gspos("UT6O", 1, "UTMO", 0., f*suzpos, suzpos, 0, "ONLY");
pMC->Gspos("UT5O", 1, "UTMO", 0., f*cuzpos, cuzpos, 0, "ONLY");
pMC->Gspos("UT4O", 1, "UTMO", 0., f*xezpos, xezpos, 0, "ONLY");
pMC->Gspos("UT3O", 1, "UTMO", 0., f*myzpos, myzpos, 0, "ONLY");
pMC->Gspos("UT1O", 1, "UTMO", 0., f*razpos, razpos, 0, "ONLY");
+ pMC->Gspos("UT0O", 1, "UTMO", 0., f*sezpos, sezpos, 0, "ONLY");
pMC->Gspos("UT2O", 1, "UT1O", 0., f*pezpos, pezpos, 0, "ONLY");
-
- pMC->Gspos("UT8S", 1, "UTMS", 0., f*rozpos, rozpos, 0, "ONLY");
- pMC->Gspos("UT7S", 1, "UTMS", 0., f*nozpos, nozpos, 0, "ONLY");
- pMC->Gspos("UT6S", 1, "UTMS", 0., f*kazpos, kazpos, 0, "ONLY");
- pMC->Gspos("UT5S", 1, "UTMS", 0., f*cuzpos, cuzpos, 0, "ONLY");
- pMC->Gspos("UT4S", 1, "UTMS", 0., f*xezpos, xezpos, 0, "ONLY");
- pMC->Gspos("UT3S", 1, "UTMS", 0., f*myzpos, myzpos, 0, "ONLY");
- pMC->Gspos("UT1S", 1, "UTMS", 0., f*razpos, razpos, 0, "ONLY");
- pMC->Gspos("UT2S", 1, "UT1S", 0., f*pezpos, pezpos, 0, "ONLY");
-
- pMC->Gspos("UT8I", 1, "UTMI", 0., 0., rozpos, 0, "ONLY");
- pMC->Gspos("UT7I", 1, "UTMI", 0., 0., nozpos, 0, "ONLY");
- pMC->Gspos("UT6I", 1, "UTMI", 0., 0., kazpos, 0, "ONLY");
- pMC->Gspos("UT5I", 1, "UTMI", 0., 0., cuzpos, 0, "ONLY");
- pMC->Gspos("UT4I", 1, "UTMI", 0., 0., xezpos, 0, "ONLY");
- pMC->Gspos("UT3I", 1, "UTMI", 0., 0., myzpos, 0, "ONLY");
- pMC->Gspos("UT1I", 1, "UTMI", 0., 0., razpos, 0, "ONLY");
- pMC->Gspos("UT2I", 1, "UT1I", 0., 0., pezpos, 0, "ONLY");
- // --- Position of the inner part of the chambers
- pMC->Gspos("UTII", 1, "UTCI", 0., 0., 0., 0, "ONLY");
- pMC->Gspos("UTIO", 1, "UTCO", 0., 0., 0., 0, "ONLY");
- pMC->Gspos("UTIS", 1, "UTCS", 0., 0., 0., 0, "ONLY");
- // --- Position of the chambers in the support frame
+
+ pMC->Gspos("UT9N", 1, "UTMN", 0., 0., wazpos, 0, "ONLY");
+ pMC->Gspos("UT8N", 1, "UTMN", 0., 0., cozpos, 0, "ONLY");
+ pMC->Gspos("UT7N", 1, "UTMN", 0., 0., fezpos, 0, "ONLY");
+ pMC->Gspos("UT6N", 1, "UTMN", 0., 0., suzpos, 0, "ONLY");
+ pMC->Gspos("UT5N", 1, "UTMN", 0., 0., cuzpos, 0, "ONLY");
+ pMC->Gspos("UT4N", 1, "UTMN", 0., 0., xezpos, 0, "ONLY");
+ pMC->Gspos("UT3N", 1, "UTMN", 0., 0., myzpos, 0, "ONLY");
+ pMC->Gspos("UT1N", 1, "UTMN", 0., 0., razpos, 0, "ONLY");
+ pMC->Gspos("UT0N", 1, "UTMN", 0., 0., sezpos, 0, "ONLY");
+ pMC->Gspos("UT2N", 1, "UT1N", 0., 0., pezpos, 0, "ONLY");
+
+ pMC->Gspos("UT9I", 1, "UTMI", 0., 0., wazpos, 0, "ONLY");
+ pMC->Gspos("UT8I", 1, "UTMI", 0., 0., cozpos, 0, "ONLY");
+ pMC->Gspos("UT7I", 1, "UTMI", 0., 0., fezpos, 0, "ONLY");
+ pMC->Gspos("UT6I", 1, "UTMI", 0., 0., suzpos, 0, "ONLY");
+ pMC->Gspos("UT5I", 1, "UTMI", 0., 0., cuzpos, 0, "ONLY");
+ pMC->Gspos("UT4I", 1, "UTMI", 0., 0., xezpos, 0, "ONLY");
+ pMC->Gspos("UT3I", 1, "UTMI", 0., 0., myzpos, 0, "ONLY");
+ pMC->Gspos("UT1I", 1, "UTMI", 0., 0., razpos, 0, "ONLY");
+ pMC->Gspos("UT0I", 1, "UTMI", 0., 0., sezpos, 0, "ONLY");
+ pMC->Gspos("UT2I", 1, "UT1I", 0., 0., pezpos, 0, "ONLY");
+
+ // Position of the inner part of the chambers
xpos = 0.;
- ypos = (zmax1-zmax2)/4;
+ ypos = 0.;
zpos = 0.;
- pMC->Gspos("UTCO", 1, "UTFO", xpos, ypos, zpos, 0, "ONLY");
+ pMC->Gspos("UTII", 1, "UTCI", xpos, ypos, zpos, 0, "ONLY");
+ pMC->Gspos("UTIN", 1, "UTCN", xpos, ypos, zpos, 0, "ONLY");
+ pMC->Gspos("UTIO", 1, "UTCO", xpos, ypos, zpos, 0, "ONLY");
+
+ // Position of the chambers in the support frame
xpos = 0.;
- ypos = (zmax1-zmax2)/4;
+ ypos = ((zmax1 + zmax2) / 2 + zlenn + zleni / 2) / 2;
zpos = 0.;
- pMC->Gspos("UTCS", 1, "UTFS", xpos, ypos, zpos, 0, "ONLY");
+ pMC->Gspos("UTCO", 1, "UTRI", xpos, ypos, zpos, idmat[2], "ONLY");
+ pMC->Gspos("UTCO", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
+ xpos = 0.;
+ ypos = (zlenn + zleni) / 2;
+ zpos = 0.;
+ pMC->Gspos("UTCN", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
+ pMC->Gspos("UTCN", 2, "UTRI", xpos,-ypos, zpos, 0 , "ONLY");
+ xpos = 0.;
+ ypos = 0.;
+ zpos = 0.;
+ pMC->Gspos("UTCI", 1, "UTRI", xpos, ypos, zpos, 0 , "ONLY");
+
+ // Position of the inner part of the detector frame
+ xpos = (rmax + rmin) / 2;
+ ypos = 0.;
+ zpos = 0.;
+ pMC->Gspos("UTRI", 1, "UTRS", xpos, ypos, zpos, idmat[1], "ONLY");
+
+ // Position of the two arms of the detector
xpos = 0.;
ypos = 0.;
zpos = 0.;
- pMC->Gspos("UTCI", 1, "UTFI", xpos, ypos, zpos, 0, "ONLY");
- // --- Position of the inner part of the frame in the sectors
- xpos = (rmax+rmin)/2;
- ypos = 0;
- zpos = -zmax1*3/4;
- pMC->Gspos("UTFO", 1, "UTSL", xpos, ypos, zpos, idmat[4], "ONLY");
- xpos = (rmax+rmin)/2;
- ypos = 0;
- zpos = -zmax1*3/4;
- pMC->Gspos("UTFS", 1, "UTSS", xpos, ypos, zpos, idmat[4], "ONLY");
- xpos = (rmax+rmin)/2;
+ pMC->Gspos("UTRD", 1, "TRD ", xpos, ypos, zpos, 0, "ONLY");
+ pMC->Gspos("UTRD", 2, "TRD ", xpos, ypos, zpos, idmat[0], "ONLY");
+
+ // Position of TRD mother volume in ALICE experiment
+ xpos = 0.;
ypos = 0.;
- zpos = -zmax1/4;
- pMC->Gspos("UTFI", 1, "UTSL", xpos, ypos, zpos, idmat[4], "ONLY");
- // --- Position of the subdetectors in the mother volume
- pMC->Gspos("UTRL", 1, "TRD ", 0., 0., 0., 0, "ONLY");
- pMC->Gspos("UTRL", 2, "TRD ", 0., 0., 0., idmat[0], "ONLY");
- pMC->Gspos("UTRL", 3, "TRD ", 0., 0., 0., idmat[1], "ONLY");
- pMC->Gspos("UTRL", 4, "TRD ", 0., 0., 0., idmat[2], "ONLY");
- pMC->Gspos("UTRS", 1, "TRD ", 0., 0., 0., 0, "ONLY");
- pMC->Gspos("UTRS", 2, "TRD ", 0., 0., 0., idmat[1], "ONLY");
- // --- Position of TRD mother volume in ALICE experiment
- pMC->Gspos("TRD ", 1, "ALIC", 0., 0., 0., 0, "ONLY");
+ zpos = 0.;
+ pMC->Gspos("TRD ", 1, "ALIC", xpos, ypos, zpos, 0, "ONLY");
+
}
//_____________________________________________________________________________
pMC->Gsatt("ALIC","SEEN",0);
//
// Set the volumes visible
- pMC->Gsatt("TRD","SEEN",0);
- pMC->Gsatt("UTRL","SEEN",0);
- pMC->Gsatt("UTSL","SEEN",0);
+ pMC->Gsatt("TRD" ,"SEEN",0);
+ pMC->Gsatt("UTRD","SEEN",0);
pMC->Gsatt("UTRS","SEEN",0);
- pMC->Gsatt("UTSS","SEEN",0);
- pMC->Gsatt("UTFI","SEEN",0);
- pMC->Gsatt("UTFO","SEEN",0);
- pMC->Gsatt("UTFS","SEEN",0);
+ pMC->Gsatt("UTRI","SEEN",0);
pMC->Gsatt("UTCO","SEEN",0);
pMC->Gsatt("UTIO","SEEN",0);
pMC->Gsatt("UTMO","SEEN",0);
- pMC->Gsatt("UT1O","SEEN",1);
- pMC->Gsatt("UT4O","SEEN",1);
- pMC->Gsatt("UTCS","SEEN",0);
- pMC->Gsatt("UTIS","SEEN",0);
- pMC->Gsatt("UTMS","SEEN",0);
- pMC->Gsatt("UT1S","SEEN",1);
- pMC->Gsatt("UT4S","SEEN",1);
+ pMC->Gsatt("UTCN","SEEN",0);
+ pMC->Gsatt("UTIN","SEEN",0);
+ pMC->Gsatt("UTMN","SEEN",0);
pMC->Gsatt("UTCI","SEEN",0);
pMC->Gsatt("UTII","SEEN",0);
pMC->Gsatt("UTMI","SEEN",0);
+ pMC->Gsatt("UT1O","SEEN",1);
+ pMC->Gsatt("UT4O","SEEN",1);
+ pMC->Gsatt("UT1N","SEEN",1);
+ pMC->Gsatt("UT4N","SEEN",1);
pMC->Gsatt("UT1I","SEEN",1);
pMC->Gsatt("UT4I","SEEN",1);
//
//
// Create materials for the Transition Radiation Detector version 1
//
- printf("TRD: Fast simulation with coarse geometry\n");
- AliTRD::CreateMaterials();
+ AliTRD::CreateMaterials();
}
//_____________________________________________________________________________
//
AliTRD::Init();
AliMC* pMC = AliMC::GetMC();
- fIdSens1 = pMC->VolId("UT5I");
- fIdSens2 = pMC->VolId("UT5O");
- fIdSens3 = pMC->VolId("UT5S");
+
+ // Retrieve the numeric identifier of the sensitive volumes (gas volume)
+ fIdSens1 = pMC->VolId("UT4I");
+ fIdSens2 = pMC->VolId("UT4N");
+ fIdSens3 = pMC->VolId("UT4O");
}
//_____________________________________________________________________________
void AliTRDv1::StepManager()
{
//
- // Called at every step in the Transition Radiation Detector
+ // Procedure called at every step in the TRD
//
+
Int_t vol[3];
- Int_t icopy1, icopy5, icopy6, idSens, icSens;
+ Int_t icopy1, icopy2;
+ Int_t idSens, icSens;
Float_t hits[4];
AliMC* pMC = AliMC::GetMC();
// Use only charged tracks and count them only once per volume
- if(pMC->TrackCharge() && pMC->TrackEntering()) {
+ if (pMC->TrackCharge() && pMC->TrackExiting()) {
// Check on sensitive volume
idSens = pMC->CurrentVol(0,icSens);
- // Long sectors
- if ((idSens == fIdSens1) || (idSens == fIdSens2)) {
-
- pMC->CurrentVolOff(1,0,icopy1);
- pMC->CurrentVolOff(5,0,icopy5);
- pMC->CurrentVolOff(6,0,icopy6);
+ // Check on sensitive volume
+ idSens = pMC->CurrentVol(0,icSens);
+ if ((idSens == fIdSens1) ||
+ (idSens == fIdSens2) ||
+ (idSens == fIdSens3)) {
// The sector number
- if ((icopy6 == 1) || (icopy6 == 3))
- vol[0] = icopy5;
- else
- vol[0] = 16 - icopy5;
+ pMC->CurrentVolOff(5,0,icopy1);
+ pMC->CurrentVolOff(6,0,icopy2);
+ if (icopy2 == 1)
+ vol[0] = icopy1;
+ else
+ vol[0] = 6 - icopy1 + 5;
- // The chamber number
- if (idSens == fIdSens2) {
- if (icopy6 < 3)
- vol[1] = 4;
- else
- vol[1] = 1;
- }
- else {
- if (icopy6 < 3)
- vol[1] = 3;
- else
- vol[1] = 2;
- }
+ // The chamber number
+ // 1: outer left
+ // 2: neighbouring left
+ // 3: inner
+ // 4: neighbouring right
+ // 5: outer right
+ pMC->CurrentVolOff(3,0,icopy1);
+ if (idSens == fIdSens3)
+ vol[1] = 4 * icopy1 - 3;
+ else if (idSens == fIdSens2)
+ vol[1] = 2 * icopy1;
+ else
+ vol[1] = 3;
// The plane number
- vol[2] = icopy1;
-
- pMC->TrackPosition(hits);
- hits[3] = 0;
-
- new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
-
- }
- // Short sectors
- else if (idSens == fIdSens3) {
-
pMC->CurrentVolOff(1,0,icopy1);
- pMC->CurrentVolOff(5,0,icopy5);
- pMC->CurrentVolOff(6,0,icopy6);
-
- // The sector number
- vol[0] = icopy5 + 5;
-
- // The chamber number
- if (icopy6 == 1)
- vol[1] = 4;
- else
- vol[1] = 1;
-
- // The plane number
vol[2] = icopy1;
-
- pMC->TrackPosition(hits);
- hits[3] = 0;
-
- new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
-
- }
+
+ if (fSensSelect) {
+ Int_t addthishit = 1;
+ if ((fSensPlane) && (vol[2] != fSensPlane )) addthishit = 0;
+ if ((fSensChamber) && (vol[1] != fSensChamber)) addthishit = 0;
+ if ((fSensSector) && (vol[0] != fSensSector )) addthishit = 0;
+ if (addthishit) {
+ pMC->TrackPosition(hits);
+ hits[3] = 0;
+ new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ }
+ }
+ else {
+ pMC->TrackPosition(hits);
+ hits[3] = 0;
+ new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ }
+
+ }
+
}
+
}
Int_t fIdSens2; // 2nd sensitive volume identifier
Int_t fIdSens3; // 3rd sensitive volume identifier
- ClassDef(AliTRDv1,1) // Transition Radiation Detector version 1
+ ClassDef(AliTRDv1,1) // Transition Radiation Detector version 1
};
#endif
///////////////////////////////////////////////////////////////////////////////
#include <TMath.h>
-#include <TRandom.h>
#include <TVector.h>
-#include <TGeometry.h>
-#include <TNode.h>
-#include <TPGON.h>
-#include "GParticle.h"
#include "AliTRDv2.h"
#include "AliRun.h"
-#include "AliConst.h"
#include "AliMC.h"
+#include "AliConst.h"
ClassImp(AliTRDv2)
//
// Standard constructor for Transition Radiation Detector version 2
//
- fIdSenO1 = fIdSenO2 = fIdSenO3 = fIdSenO4 = fIdSenO5 = fIdSenO6 = 0;
- fIdSenI1 = fIdSenI2 = fIdSenI3 = fIdSenI4 = fIdSenI5 = fIdSenI6 = 0;
+ for (Int_t icham = 0; icham < ncham; ++icham) {
+ fIdSensI[icham] = 0;
+ fIdSensN[icham] = 0;
+ fIdSensO[icham] = 0;
+ }
+ fDeltaE = NULL;
+
SetBufferSize(128000);
}
+
+AliTRDv2::~AliTRDv2()
+{
+ if (fDeltaE) delete fDeltaE;
+}
//_____________________________________________________________________________
void AliTRDv2::CreateGeometry()
//
// Create geometry for the Transition Radiation Detector version 2
// This version covers the full azimuth.
+ // --- Author : Christoph Blume (GSI) 20/5/99
+ //
+ // --- Volume names :
+ // TRD --> Mother TRD volume (Al)
+ // UTRS --> Sectors of the sub-detector (Al)
+ // UTRI --> Inner part of the detector frame (Air)
+ // The chambers
+ // UCI1-6 --> The frame of the inner chambers (C)
+ // UCN1-6 --> The frame of the neighbouring chambers (C)
+ // UCO1-6 --> The frame of the outer chambers (C)
+ // UII1-6 --> The inner part of the inner chambers (Air)
+ // UIN1-6 --> The inner part of the neighbouring chambers (Air)
+ // UIO1-6 --> The inner part of the outer chambers (Air)
+ // The layers inside a chamber
+ // UT0I(N,O) --> Radiator seal (G10)
+ // UT1I(N,O) --> Radiator (CO2)
+ // UT2I(N,O) --> Polyethylene of radiator (PE)
+ // UT3I(N,O) --> Entrance window (Mylar)
+ // UXI(N,O)1-6 --> Gas volume (sensitive) (Xe/Isobutane)
+ // UT5I(N,O) --> Pad plane (Cu)
+ // UT6I(N,O) --> Support structure (G10)
+ // UT7I(N,O) --> FEE + signal lines (Cu)
+ // UT8I(N,O) --> Polyethylene of cooling device (PE)
+ // UT9I(N,O) --> Cooling water (Water)
//
//Begin_Html
/*
<img src="gif/AliTRDv2Tree.gif">
*/
//End_Html
+
+ Float_t xpos, ypos, zpos;
+ Int_t idmat[2];
+ const Int_t nparmo = 10;
+ const Int_t nparfr = 4;
+ const Int_t nparch = 3;
+ const Int_t nparic = 4;
+ const Int_t nparnc = 4;
+ const Int_t nparoc = 11;
- // --- Name Conventions :
-
- // The mother volume and the support structure
- // TRD --> Mother TRD volume (Air)
- // UTRS --> The sectors of the detector (Air)
- // UTSP --> The aluminum part of the support structure (Al)
- // UTII(O) --> The inner parts of the support structure (Air)
-
- // The chambers
- // UCI1-6 --> The frame of the inner chambers (C)
- // UCO1-6 --> The frame of the outer chambers (C)
- // UII1-6 --> The inner part of the inner chambers (Air)
- // UIO1-6 --> The inner part of the outer chambers (Air)
-
- // The layers inside a chamber
- // UT1I(O) --> Radiator layer (CO2)
- // UT2I(O) --> Polyethylene layer (PE)
- // UT3I(O) --> Mylar layer (Mylar)
- // UXI1-6 --> Xe/C02 layer in the inner chambers (Xe/C02)
- // UXO1-6 --> Xe/C02 layer in the outer chambers (Xe/C02)
- // UT5I(O) --> Cu layer (pads/sensitive) (Cu)
- // UT6I(O) --> Kapton layer (Kapton)
- // UT7I(O) --> NOMEX layer (C)
- // UT8I(O) --> Readout layer (Al)
-
-
- // --- Contains geometry information
-
- // --- Number of sectors in the full detector
- // --- Number of modules in each sector
- // --- z-Coordinates of the TRD-frame
- // --- r-Coordinates of the TRD-frame
- // --- Thickness of the aluminium of the support frame
- // --- Thickness of the interior of the support frame
- // --- Thickness of the carbon chamber frame
- // --- Thickness and z-position of the PE-layer in the radiator
- // --- Thickness and z-position of the radiator
- // --- Thickness and z-position of the mylar-layer
- // --- Thickness and z-position of the Xe/C02-layer
- // --- Thickness and z-position of the Cu-layer (Pads)
- // --- Thickness and z-position of the kapton-layer
- // --- Thickness and z-position of the NOMEX-layer
- // Simple C-layer for the time being
- // --- Thickness and z-position of the readout-layer
- // --- Parameter for the arrays
- // --- Number of different chambers
- // --- Number of rotation matrices
+ Float_t par_mo[nparmo];
+ Float_t par_fr[nparfr];
+ Float_t par_ch[nparch];
+ Float_t par_ic[nparic];
+ Float_t par_nc[nparnc];
+ Float_t par_oc[nparoc];
- AliMC* pMC = AliMC::GetMC();
-
- Float_t xpos, ypos, zpos;
- Int_t icham;
- Int_t idmat[2];
- Float_t widma, widmi;
- Float_t lendifc, widdifc, heightc;
- Float_t par_ic[3], par_oc[3], par_mo[10], par_sp[4], par_ch[3];
-
Int_t *idtmed = gAlice->Idtmed();
- //************************************************************************
-
+ AliMC* pMC = AliMC::GetMC();
+
+ //////////////////////////////////////////////////////////////////////////
// Definition of Volumes
+ //////////////////////////////////////////////////////////////////////////
- //************************************************************************
-
- const Int_t ncham = 6; //Number of different chambers
-
- widmi = rmin*TMath::Sin(kPI/nsect);
- widma = rmax*TMath::Sin(kPI/nsect);
- // --- Some parameter for the chambers
- lendifc = (zmax1-zmax2)/nmodul;
- heightc = (rmax-rmin)/nmodul;
- widdifc = (widma - widmi)/nmodul;
- // --- Definition of the Mother volume for the TRD (Air)
- par_mo[0] = 0.;
+ // Definition of the mother volume for the TRD (Al)
+ par_mo[0] = 0.;
par_mo[1] = 360.;
par_mo[2] = nsect;
par_mo[3] = 2.;
par_mo[4] = -zmax1;
par_mo[5] = rmin;
par_mo[6] = rmax;
- par_mo[7] = zmax1;
+ par_mo[7] = zmax1;
par_mo[8] = rmin;
par_mo[9] = rmax;
- pMC->Gsvolu("TRD ", "PGON", idtmed[1301], par_mo, 10);
- // --- Divide the mother volume into sectors
+ pMC->Gsvolu("TRD ", "PGON", idtmed[1301-1], par_mo, nparmo);
pMC->Gsdvn("UTRS", "TRD ", nsect, 2);
- // --- Definition of the aluminum part of the support structure (Al)
- par_sp[0] = widmi - inframe/2;
- par_sp[1] = widma - inframe/2;
- par_sp[2] = zmax1/2;
- par_sp[3] = (rmax-rmin)/2;
- pMC->Gsvolu("UTSP", "TRD1", idtmed[1300], par_sp, 4);
- // --- Definition of the inner part of the support structure (Air)
- par_sp[0] = widmi - inframe/2 - alfram1/2;
- par_sp[1] = widma - inframe/2 - alfram1/2;
- par_sp[2] = zmax1/4 -alfram2/2;
- par_sp[3] = (rmax-rmin)/2;
- pMC->Gsvolu("UTII", "TRD1", idtmed[1301], par_sp, 4);
- pMC->Gsvolu("UTIO", "TRD1", idtmed[1301], par_sp, 4);
- // --- Definition of the chambers
- char ctagc[5], ctagi[5], ctagx[5];
- for (icham = 1; icham <= ncham; ++icham) {
- // --- Carbon frame of the inner chambers (C)
- par_ch[0] = widmi + (icham-1) * widdifc - (inframe+alfram1)/2;
- par_ch[1] = zmax1/4 -alfram2/2;
- par_ch[2] = heightc/2.;
+
+ // The minimal width of a sector in rphi-direction
+ Float_t widmi = rmin * TMath::Sin(kPI/nsect);
+ // The maximal width of a sector in rphi-direction
+ Float_t widma = rmax * TMath::Sin(kPI/nsect);
+ // The total thickness of the spaceframe (Al + Air)
+ Float_t frame = widmi - (widpl1 / 2);
+
+ // Definition of the inner part of the detector frame (Air)
+ par_fr[0] = widmi - alframe / 2.;
+ par_fr[1] = widma - alframe / 2.;
+ par_fr[2] = zmax1;
+ par_fr[3] = (rmax - rmin) / 2;
+ pMC->Gsvolu("UTRI", "TRD1", idtmed[1302-1], par_fr, nparfr);
+
+ // Some parameter for the chambers
+ Float_t lendifc = (zmax1 - zmax2) / nmodul;
+ Float_t heightc = (rmax - rmin ) / nmodul;
+ Float_t widdifc = (widma - widmi) / nmodul;
+
+ // Definition of the chambers
+ Char_t ctagc[5], ctagi[5];
+ for (Int_t icham = 1; icham <= ncham; ++icham) {
+
+ // Carbon frame of the inner chambers (C)
+ par_ch[0] = widmi + (icham-1) * widdifc - frame;
+ par_ch[1] = zleni / 2.;
+ par_ch[2] = heightc / 2.;
sprintf(ctagc,"UCI%1d",icham);
- pMC->Gsvolu(ctagc, "BOX ", idtmed[1306], par_ch, 3);
- // --- Inner part of the inner chambers (Air)
+ pMC->Gsvolu(ctagc, "BOX ", idtmed[1307-1], par_ch, nparch);
+ // Inner part of the inner chambers (Air)
par_ch[0] -= ccframe;
par_ch[1] -= ccframe;
- sprintf(ctagi,"UII%1d",icham);
- pMC->Gsvolu(ctagi, "BOX ", idtmed[1301], par_ch, 3);
- // --- Carbon frame of the outer chambers (C)
- par_ch[0] = widmi + (icham - 1) * widdifc - 2.;
- par_ch[1] = (icham - 6) * lendifc / 2. + zmax1/4 -alfram2/2;
+ sprintf(ctagc,"UII%1d",icham);
+ pMC->Gsvolu(ctagc, "BOX ", idtmed[1302-1], par_ch, nparch);
+
+ // Carbon frame of the neighbouring chambers (C)
+ par_ch[0] = widmi + (icham-1) * widdifc - frame;
+ par_ch[1] = zlenn / 2.;
+ par_ch[2] = heightc / 2.;
+ sprintf(ctagc,"UCN%1d",icham);
+ pMC->Gsvolu(ctagc, "BOX ", idtmed[1307-1], par_ch, nparch);
+ // Inner part of the neighbouring chambers (Air)
+ par_ch[0] -= ccframe;
+ par_ch[1] -= ccframe;
+ sprintf(ctagc,"UIN%1d",icham);
+ pMC->Gsvolu(ctagc, "BOX ", idtmed[1302-1], par_ch, nparch);
+
+ // Carbon frame of the outer chambers (C)
+ par_ch[0] = widmi + (icham-1) * widdifc - frame;
+ par_ch[1] = (icham - 6) * lendifc / 2. + zleno / 2.;
par_ch[2] = heightc / 2.;
sprintf(ctagc,"UCO%1d",icham);
- pMC->Gsvolu(ctagc, "BOX ", idtmed[1306], par_ch, 3);
- // --- Inner part of the outer chambers (Air)
+ pMC->Gsvolu(ctagc, "BOX ", idtmed[1307-1], par_ch, nparch);
+ // Inner part of the outer chambers (Air)
par_ch[0] -= ccframe;
par_ch[1] -= ccframe;
- sprintf(ctagi,"UIO%1d",icham);
- pMC->Gsvolu(ctagi, "BOX ", idtmed[1301], par_ch, 3);
+ sprintf(ctagc,"UIO%1d",icham);
+ pMC->Gsvolu(ctagc, "BOX ", idtmed[1302-1], par_ch, nparch);
+
}
- // --- Definition of the layers in each inner chamber
+
+ // Definition of the layers in each inner chamber
par_ic[0] = -1.;
par_ic[1] = -1.;
- // --- Radiator layer
- par_ic[2] = rathick/2;;
- pMC->Gsvolu("UT1I", "BOX ", idtmed[1311], par_ic, 3);
- // --- Polyethylene layer
- par_ic[2] = pethick/2;
- pMC->Gsvolu("UT2I", "BOX ", idtmed[1302], par_ic, 3);
- // --- Mylar layer
- par_ic[2] = mythick/2;
- pMC->Gsvolu("UT3I", "BOX ", idtmed[1307], par_ic, 3);
- // --- Xe/CO2 layer
- par_ic[2] = 1.8;
- for (icham = 1; icham <= 6; ++icham) {
- sprintf(ctagx,"UXI%1d",icham);
- pMC->Gsvolu(ctagx, "BOX ", idtmed[1308], par_ic, 3);
+ // G10 layer (radiator layer)
+ par_ic[2] = sethick / 2;
+ pMC->Gsvolu("UT0I", "BOX ", idtmed[1313-1], par_ic, nparic);
+ // CO2 layer (radiator)
+ par_ic[2] = rathick / 2;
+ pMC->Gsvolu("UT1I", "BOX ", idtmed[1312-1], par_ic, nparic);
+ // PE layer (radiator)
+ par_ic[2] = pethick / 2;
+ pMC->Gsvolu("UT2I", "BOX ", idtmed[1303-1], par_ic, nparic);
+ // Mylar layer (entrance window + HV cathode)
+ par_ic[2] = mythick / 2;
+ pMC->Gsvolu("UT3I", "BOX ", idtmed[1308-1], par_ic, nparic);
+ // Xe/Isobutane layer (gasvolume)
+ par_ic[2] = xethick / 2.;
+ for (Int_t icham = 1; icham <= 6; ++icham) {
+ sprintf(ctagc,"UXI%1d",icham);
+ pMC->Gsvolu(ctagc, "BOX ", idtmed[1309-1], par_ic, nparic);
}
- // --- Cu layer
- par_ic[2] = cuthick/2;
- pMC->Gsvolu("UT5I", "BOX ", idtmed[1304], par_ic, 3);
- // --- Kapton layer
- par_ic[2] = kathick/2;
- pMC->Gsvolu("UT6I", "BOX ", idtmed[1310], par_ic, 3);
- // --- NOMEX layer
- par_ic[2] = nothick/2;
- pMC->Gsvolu("UT7I", "BOX ", idtmed[1309], par_ic, 3);
- // --- Read out layer
- par_ic[2] = rothick/2;
- pMC->Gsvolu("UT8I", "BOX ", idtmed[1305], par_ic, 3);
- // --- Definition of the layers in each outer chamber
+ // Cu layer (pad plane)
+ par_ic[2] = cuthick / 2;
+ pMC->Gsvolu("UT5I", "BOX ", idtmed[1305-1], par_ic, nparic);
+ // G10 layer (support structure)
+ par_ic[2] = suthick / 2;
+ pMC->Gsvolu("UT6I", "BOX ", idtmed[1313-1], par_ic, nparic);
+ // Cu layer (FEE + signal lines)
+ par_ic[2] = fethick / 2;
+ pMC->Gsvolu("UT7I", "BOX ", idtmed[1305-1], par_ic, nparic);
+ // PE layer (cooling devices)
+ par_ic[2] = cothick / 2;
+ pMC->Gsvolu("UT8I", "BOX ", idtmed[1303-1], par_ic, nparic);
+ // Water layer (cooling)
+ par_ic[2] = wathick / 2;
+ pMC->Gsvolu("UT9I", "BOX ", idtmed[1314-1], par_ic, nparic);
+
+ // Definition of the layers in each neighbouring chamber
+ par_nc[0] = -1.;
+ par_nc[1] = -1.;
+ // G10 layer (radiator layer)
+ par_nc[2] = sethick / 2;
+ pMC->Gsvolu("UT0N", "BOX ", idtmed[1313-1], par_nc, nparnc);
+ // CO2 layer (radiator)
+ par_nc[2] = rathick / 2;
+ pMC->Gsvolu("UT1N", "BOX ", idtmed[1312-1], par_nc, nparnc);
+ // PE layer (radiator)
+ par_nc[2] = pethick / 2;
+ pMC->Gsvolu("UT2N", "BOX ", idtmed[1303-1], par_nc, nparnc);
+ // Mylar layer (entrance window + HV cathode)
+ par_nc[2] = mythick / 2;
+ pMC->Gsvolu("UT3N", "BOX ", idtmed[1308-1], par_nc, nparnc);
+ // Xe/Isobutane layer (gasvolume)
+ par_nc[2] = xethick / 2.;
+ for (Int_t icham = 1; icham <= 6; ++icham) {
+ sprintf(ctagc,"UXN%1d",icham);
+ pMC->Gsvolu(ctagc, "BOX ", idtmed[1309-1], par_nc, nparnc);
+ }
+ // Cu layer (pad plane)
+ par_nc[2] = cuthick / 2;
+ pMC->Gsvolu("UT5N", "BOX ", idtmed[1305-1], par_nc, nparnc);
+ // G10 layer (support structure)
+ par_nc[2] = suthick / 2;
+ pMC->Gsvolu("UT6N", "BOX ", idtmed[1313-1], par_nc, nparnc);
+ // Cu layer (FEE + signal lines)
+ par_nc[2] = fethick / 2;
+ pMC->Gsvolu("UT7N", "BOX ", idtmed[1305-1], par_nc, nparnc);
+ // PE layer (cooling devices)
+ par_nc[2] = cothick / 2;
+ pMC->Gsvolu("UT8N", "BOX ", idtmed[1303-1], par_nc, nparnc);
+ // Water layer (cooling)
+ par_nc[2] = wathick / 2;
+ pMC->Gsvolu("UT9N", "BOX ", idtmed[1314-1], par_nc, nparnc);
+
+ // Definition of the layers in each outer chamber
par_oc[0] = -1.;
par_oc[1] = -1.;
- // --- Radiator layer
- par_oc[2] = rathick/2;;
- pMC->Gsvolu("UT1O", "BOX ", idtmed[1311], par_oc, 3);
- // --- Polyethylene layer
- par_oc[2] = pethick/2;
- pMC->Gsvolu("UT2O", "BOX ", idtmed[1302], par_oc, 3);
- // --- Mylar layer
- par_oc[2] = mythick/2;
- pMC->Gsvolu("UT3O", "BOX ", idtmed[1307], par_oc, 3);
- // --- Xe/CO2 layer
- par_oc[2] = xethick/2;
- for (icham = 1; icham <= ncham; ++icham) {
- sprintf(ctagx,"UXO%1d",icham);
- pMC->Gsvolu(ctagx, "BOX ", idtmed[1308], par_oc, 3);
+ // G10 layer (radiator layer)
+ par_oc[2] = sethick / 2;
+ pMC->Gsvolu("UT0O", "BOX ", idtmed[1313-1], par_oc, nparoc);
+ // CO2 layer (radiator)
+ par_oc[2] = rathick / 2;
+ pMC->Gsvolu("UT1O", "BOX ", idtmed[1312-1], par_oc, nparoc);
+ // PE layer (radiator)
+ par_oc[2] = pethick / 2;
+ pMC->Gsvolu("UT2O", "BOX ", idtmed[1303-1], par_oc, nparoc);
+ // Mylar layer (entrance window + HV cathode)
+ par_oc[2] = mythick / 2;
+ pMC->Gsvolu("UT3O", "BOX ", idtmed[1308-1], par_oc, nparoc);
+ // Xe/Isobutane layer (gasvolume)
+ par_oc[2] = xethick / 2.;
+ for (Int_t icham = 1; icham <= 6; ++icham) {
+ sprintf(ctagc,"UXO%1d",icham);
+ pMC->Gsvolu(ctagc, "BOX ", idtmed[1309-1], par_oc, nparoc);
}
- // --- Cu layer
- par_oc[2] = cuthick/2;
- pMC->Gsvolu("UT5O", "BOX ", idtmed[1304], par_oc, 3);
- // --- Kapton layer
- par_oc[2] = kathick/2;
- pMC->Gsvolu("UT6O", "BOX ", idtmed[1310], par_oc, 3);
- // --- NOMEX layer
- par_oc[2] = nothick/2;
- pMC->Gsvolu("UT7O", "BOX ", idtmed[1309], par_oc, 3);
- // --- Read out layer
- par_oc[2] = rothick/2;
- pMC->Gsvolu("UT8O", "BOX ", idtmed[1305], par_oc, 3);
- //*************************************************************************
-
- // Positioning of Volumes
-
- //************************************************************************
- // --- The rotation matrices
- AliMatrix(idmat[0], 90., 90., 180., 0., 90., 0.);
- AliMatrix(idmat[1], 90., 90., 0., 0., 90., 0.);
- // --- Position of the layers in a chamber
- for (icham = 1; icham <= ncham; ++icham) {
- // --- The inner chambers
+ // Cu layer (pad plane)
+ par_oc[2] = cuthick / 2;
+ pMC->Gsvolu("UT5O", "BOX ", idtmed[1305-1], par_oc, nparoc);
+ // G10 layer (support structure)
+ par_oc[2] = suthick / 2;
+ pMC->Gsvolu("UT6O", "BOX ", idtmed[1313-1], par_oc, nparoc);
+ // Cu layer (FEE + signal lines)
+ par_oc[2] = fethick / 2;
+ pMC->Gsvolu("UT7O", "BOX ", idtmed[1305-1], par_oc, nparoc);
+ // PE layer (cooling devices)
+ par_oc[2] = cothick / 2;
+ pMC->Gsvolu("UT8O", "BOX ", idtmed[1303-1], par_oc, nparoc);
+ // Water layer (cooling)
+ par_oc[2] = wathick / 2;
+ pMC->Gsvolu("UT9O", "BOX ", idtmed[1314-1], par_oc, nparoc);
+
+ //////////////////////////////////////////////////////////////////////////
+ // Positioning of Volumes
+ //////////////////////////////////////////////////////////////////////////
+
+ // The rotation matrices
+ AliMatrix(idmat[0], 90., 90., 180., 0., 90., 0.);
+ AliMatrix(idmat[1], 90., 90., 0., 0., 90., 0.);
+
+ // Position of the layers in a chamber
+ pMC->Gspos("UT2I", 1, "UT1I", 0., 0., pezpos, 0, "ONLY");
+ pMC->Gspos("UT2N", 1, "UT1N", 0., 0., pezpos, 0, "ONLY");
+ pMC->Gspos("UT2O", 1, "UT1O", 0., 0., pezpos, 0, "ONLY");
+ for (Int_t icham = 1; icham <= ncham; ++icham) {
+ // The inner chambers
sprintf(ctagi,"UII%1d",icham);
- sprintf(ctagx,"UXI%1d",icham);
- pMC->Gspos("UT8I", icham, ctagi, 0., 0., rozpos, 0, "ONLY");
- pMC->Gspos("UT7I", icham, ctagi, 0., 0., nozpos, 0, "ONLY");
- pMC->Gspos("UT6I", icham, ctagi, 0., 0., kazpos, 0, "ONLY");
+ sprintf(ctagc,"UXI%1d",icham);
+ pMC->Gspos("UT9I", icham, ctagi, 0., 0., wazpos, 0, "ONLY");
+ pMC->Gspos("UT8I", icham, ctagi, 0., 0., cozpos, 0, "ONLY");
+ pMC->Gspos("UT7I", icham, ctagi, 0., 0., fezpos, 0, "ONLY");
+ pMC->Gspos("UT6I", icham, ctagi, 0., 0., suzpos, 0, "ONLY");
pMC->Gspos("UT5I", icham, ctagi, 0., 0., cuzpos, 0, "ONLY");
- pMC->Gspos(ctagx, 1, ctagi, 0., 0., xezpos, 0, "ONLY");
+ pMC->Gspos(ctagc , 1, ctagi, 0., 0., xezpos, 0, "ONLY");
pMC->Gspos("UT3I", icham, ctagi, 0., 0., myzpos, 0, "ONLY");
pMC->Gspos("UT1I", icham, ctagi, 0., 0., razpos, 0, "ONLY");
- // --- The outer chambers
- sprintf(ctagi,"UIO%d",icham);
- sprintf(ctagx,"UXO%d",icham);
- pMC->Gspos("UT8O", icham, ctagi, 0., 0., rozpos, 0, "ONLY");
- pMC->Gspos("UT7O", icham, ctagi, 0., 0., nozpos, 0, "ONLY");
- pMC->Gspos("UT6O", icham, ctagi, 0., 0., kazpos, 0, "ONLY");
+ pMC->Gspos("UT0I", icham, ctagi, 0., 0., sezpos, 0, "ONLY");
+ // The neighbouring chambers
+ sprintf(ctagi,"UIN%1d",icham);
+ sprintf(ctagc,"UXN%1d",icham);
+ pMC->Gspos("UT9N", icham, ctagi, 0., 0., wazpos, 0, "ONLY");
+ pMC->Gspos("UT8N", icham, ctagi, 0., 0., cozpos, 0, "ONLY");
+ pMC->Gspos("UT7N", icham, ctagi, 0., 0., fezpos, 0, "ONLY");
+ pMC->Gspos("UT6N", icham, ctagi, 0., 0., suzpos, 0, "ONLY");
+ pMC->Gspos("UT5N", icham, ctagi, 0., 0., cuzpos, 0, "ONLY");
+ pMC->Gspos(ctagc , 1, ctagi, 0., 0., xezpos, 0, "ONLY");
+ pMC->Gspos("UT3N", icham, ctagi, 0., 0., myzpos, 0, "ONLY");
+ pMC->Gspos("UT1N", icham, ctagi, 0., 0., razpos, 0, "ONLY");
+ pMC->Gspos("UT0N", icham, ctagi, 0., 0., sezpos, 0, "ONLY");
+ // The outer chambers
+ sprintf(ctagi,"UIO%1d",icham);
+ sprintf(ctagc,"UXO%1d",icham);
+ pMC->Gspos("UT9O", icham, ctagi, 0., 0., wazpos, 0, "ONLY");
+ pMC->Gspos("UT8O", icham, ctagi, 0., 0., cozpos, 0, "ONLY");
+ pMC->Gspos("UT7O", icham, ctagi, 0., 0., fezpos, 0, "ONLY");
+ pMC->Gspos("UT6O", icham, ctagi, 0., 0., suzpos, 0, "ONLY");
pMC->Gspos("UT5O", icham, ctagi, 0., 0., cuzpos, 0, "ONLY");
- pMC->Gspos(ctagx, 1, ctagi, 0., 0., xezpos, 0, "ONLY");
+ pMC->Gspos(ctagc , 1, ctagi, 0., 0., xezpos, 0, "ONLY");
pMC->Gspos("UT3O", icham, ctagi, 0., 0., myzpos, 0, "ONLY");
pMC->Gspos("UT1O", icham, ctagi, 0., 0., razpos, 0, "ONLY");
+ pMC->Gspos("UT0O", icham, ctagi, 0., 0., sezpos, 0, "ONLY");
}
- pMC->Gspos("UT2I", 1, "UT1I", 0., 0., 0., 0, "ONLY");
- pMC->Gspos("UT2O", 1, "UT1O", 0., 0., 0., 0, "ONLY");
- // --- Position of the inner part of the chambers in the carbon-frames
- for (icham = 1; icham <= ncham; ++icham) {
- // --- The inner chambers
+
+ // Position of the inner part of the chambers in the carbon-frames
+ for (Int_t icham = 1; icham <= ncham; ++icham) {
+ xpos = 0.;
+ ypos = 0.;
+ zpos = 0.;
+ // The inner chambers
sprintf(ctagi,"UII%1d",icham);
sprintf(ctagc,"UCI%1d",icham);
- pMC->Gspos(ctagi, 1, ctagc, 0., 0., 0., 0, "ONLY");
- // --- The outer chambers
+ pMC->Gspos(ctagi, 1, ctagc, xpos, ypos, zpos, 0, "ONLY");
+ // The neighbouring chambers
+ sprintf(ctagi,"UIN%1d",icham);
+ sprintf(ctagc,"UCN%1d",icham);
+ pMC->Gspos(ctagi, 1, ctagc, xpos, ypos, zpos, 0, "ONLY");
+ // The outer chambers
sprintf(ctagi,"UIO%1d",icham);
sprintf(ctagc,"UCO%1d",icham);
- pMC->Gspos(ctagi, 1, ctagc, 0., 0., 0., 0, "ONLY");
+ pMC->Gspos(ctagi, 1, ctagc, xpos, ypos, zpos, 0, "ONLY");
}
- // --- Position of the chambers in the full TRD-setup
- for (icham = 1; icham <= ncham; ++icham) {
- // --- The inner chambers
+
+ // Position of the chambers in the full TRD-setup
+ for (Int_t icham = 1; icham <= ncham; ++icham) {
+ // The inner chambers
xpos = 0.;
ypos = 0.;
- zpos = (icham - .5) * heightc - (rmax-rmin)/2;
+ zpos = (icham-0.5) * heightc - (rmax - rmin) / 2;
sprintf(ctagc,"UCI%1d",icham);
- pMC->Gspos(ctagc, 1, "UTII", xpos, ypos, zpos, 0, "ONLY");
- // --- The outer chambers
+ pMC->Gspos(ctagc, 1, "UTRI", xpos, ypos, zpos, 0, "ONLY");
+ // The neighbouring chambers
xpos = 0.;
- ypos = 0. - (icham - 6) * lendifc / 2.;
- zpos = (icham - .5) * heightc - (rmax-rmin)/2;
+ ypos = (zleni + zlenn) / 2.;
+ zpos = (icham-0.5) * heightc - (rmax - rmin) / 2;
+ sprintf(ctagc,"UCN%1d",icham);
+ pMC->Gspos(ctagc, 1, "UTRI", xpos, ypos, zpos, 0, "ONLY");
+ ypos = -ypos;
+ sprintf(ctagc,"UCN%1d",icham);
+ pMC->Gspos(ctagc, 2, "UTRI", xpos, ypos, zpos, 0, "ONLY");
+ // The outer chambers
+ xpos = 0.;
+ ypos = (zleni / 2. + zlenn + zmax2 + (icham-1) * lendifc) / 2.;
+ zpos = (icham-0.5) * heightc - (rmax-rmin)/2;
+ sprintf(ctagc,"UCO%1d",icham);
+ pMC->Gspos(ctagc, 1, "UTRI", xpos, ypos, zpos, 0, "ONLY");
+ ypos = -ypos;
sprintf(ctagc,"UCO%1d",icham);
- pMC->Gspos(ctagc, 1, "UTIO", xpos, ypos, zpos, 0, "ONLY");
+ pMC->Gspos(ctagc, 2, "UTRI", xpos, ypos, zpos, 0, "ONLY");
}
- // --- Position of the inner parts of the support frame
- xpos = 0.;
- ypos = zmax1/4;
+
+ // Position of the inner part of the detector frame
+ xpos = (rmax + rmin) / 2;
+ ypos = 0.;
zpos = 0.;
- pMC->Gspos("UTIO", 1, "UTSP", xpos,-ypos, zpos, 0, "ONLY");
- pMC->Gspos("UTII", 1, "UTSP", xpos, ypos, zpos, 0, "ONLY");
- // --- Position of the support frame in the TRD-sectors
- xpos = (rmax+rmin)/2;
+ pMC->Gspos("UTRI", 1, "UTRS", xpos, ypos, zpos, idmat[0], "ONLY");
+
+ // Position of the TRD mother volume in the ALICE experiment
+ xpos = 0.;
ypos = 0.;
- zpos = zmax1/2;
- pMC->Gspos("UTSP", 1, "UTRS", xpos, ypos, zpos, idmat[0], "ONLY");
- pMC->Gspos("UTSP", 2, "UTRS", xpos, ypos,-zpos, idmat[1], "ONLY");
- // --- Position of TRD mother volume in ALICE experiment
- pMC->Gspos("TRD ", 1, "ALIC", 0., 0., 0., 0, "ONLY");
+ zpos = 0.;
+ pMC->Gspos("TRD ", 1, "ALIC", xpos, ypos, zpos, 0, "ONLY");
+
}
//_____________________________________________________________________________
// Set everything unseen
pMC->Gsatt("*", "seen", -1);
- //
+
// Set ALIC mother transparent
pMC->Gsatt("ALIC","SEEN",0);
- //
+
// Set the volumes visible
- pMC->Gsatt("TRD","SEEN",0);
+ pMC->Gsatt("TRD ","SEEN",0);
pMC->Gsatt("UTRS","SEEN",0);
- pMC->Gsatt("UTSP","SEEN",0);
- pMC->Gsatt("UTII","SEEN",0);
- pMC->Gsatt("UTIO","SEEN",0);
- pMC->Gsatt("UCI1","SEEN",0);
- pMC->Gsatt("UII1","SEEN",0);
- pMC->Gsatt("UCO1","SEEN",0);
- pMC->Gsatt("UIO1","SEEN",0);
- pMC->Gsatt("UCI2","SEEN",0);
- pMC->Gsatt("UII2","SEEN",0);
- pMC->Gsatt("UCO2","SEEN",0);
- pMC->Gsatt("UIO2","SEEN",0);
- pMC->Gsatt("UCI3","SEEN",0);
- pMC->Gsatt("UII3","SEEN",0);
- pMC->Gsatt("UCO3","SEEN",0);
- pMC->Gsatt("UIO3","SEEN",0);
- pMC->Gsatt("UCI4","SEEN",0);
- pMC->Gsatt("UII4","SEEN",0);
- pMC->Gsatt("UCO4","SEEN",0);
- pMC->Gsatt("UIO4","SEEN",0);
- pMC->Gsatt("UCI5","SEEN",0);
- pMC->Gsatt("UII5","SEEN",0);
- pMC->Gsatt("UCO5","SEEN",0);
- pMC->Gsatt("UIO5","SEEN",0);
- pMC->Gsatt("UCI6","SEEN",0);
- pMC->Gsatt("UII6","SEEN",0);
- pMC->Gsatt("UCO6","SEEN",0);
- pMC->Gsatt("UIO6","SEEN",0);
+ pMC->Gsatt("UTRI","SEEN",0);
+ Char_t ctag[5];
+ for (Int_t icham = 0; icham < ncham; ++icham) {
+ sprintf(ctag,"UCI%1d",icham+1);
+ pMC->Gsatt(ctag,"SEEN",0);
+ sprintf(ctag,"UCN%1d",icham+1);
+ pMC->Gsatt(ctag,"SEEN",0);
+ sprintf(ctag,"UCO%1d",icham+1);
+ pMC->Gsatt(ctag,"SEEN",0);
+ sprintf(ctag,"UII%1d",icham+1);
+ pMC->Gsatt(ctag,"SEEN",0);
+ sprintf(ctag,"UIN%1d",icham+1);
+ pMC->Gsatt(ctag,"SEEN",0);
+ sprintf(ctag,"UIO%1d",icham+1);
+ pMC->Gsatt(ctag,"SEEN",0);
+ sprintf(ctag,"UXI%1d",icham+1);
+ pMC->Gsatt(ctag,"SEEN",1);
+ sprintf(ctag,"UXN%1d",icham+1);
+ pMC->Gsatt(ctag,"SEEN",1);
+ sprintf(ctag,"UXO%1d",icham+1);
+ pMC->Gsatt(ctag,"SEEN",1);
+ }
pMC->Gsatt("UT1I","SEEN",1);
- pMC->Gsatt("UXI1","SEEN",1);
- pMC->Gsatt("UXI2","SEEN",1);
- pMC->Gsatt("UXI3","SEEN",1);
- pMC->Gsatt("UXI4","SEEN",1);
- pMC->Gsatt("UXI5","SEEN",1);
- pMC->Gsatt("UXI6","SEEN",1);
+ pMC->Gsatt("UT1N","SEEN",1);
pMC->Gsatt("UT1O","SEEN",1);
- pMC->Gsatt("UXO1","SEEN",1);
- pMC->Gsatt("UXO2","SEEN",1);
- pMC->Gsatt("UXO3","SEEN",1);
- pMC->Gsatt("UXO4","SEEN",1);
- pMC->Gsatt("UXO5","SEEN",1);
- pMC->Gsatt("UXO6","SEEN",1);
- //
+
pMC->Gdopt("hide", "on");
pMC->Gdopt("shad", "on");
pMC->Gsatt("*", "fill", 7);
//
// Create materials for the Transition Radiation Detector version 2
//
- printf("TRD: Slow simulation with fine geometry\n");
AliTRD::CreateMaterials();
}
//
// Initialise Transition Radiation Detector after geometry has been built
//
+
+ // First ionization potential (eV) for the gas mixture (90% Xe + 10% CO2)
+ const Float_t kPoti = 12.1;
+ // Maximum energy (50 keV);
+ const Float_t kEend = 50000.0;
+
AliTRD::Init();
+
AliMC* pMC = AliMC::GetMC();
- fIdSenI1 = pMC->VolId("UXI1");
- fIdSenI2 = pMC->VolId("UXI2");
- fIdSenI3 = pMC->VolId("UXI3");
- fIdSenI4 = pMC->VolId("UXI4");
- fIdSenI5 = pMC->VolId("UXI5");
- fIdSenI6 = pMC->VolId("UXI6");
-
- fIdSenO1 = pMC->VolId("UXO1");
- fIdSenO2 = pMC->VolId("UXO2");
- fIdSenO3 = pMC->VolId("UXO3");
- fIdSenO4 = pMC->VolId("UXO4");
- fIdSenO5 = pMC->VolId("UXO5");
- fIdSenO6 = pMC->VolId("UXO6");
+
+ // Get the sensitive volumes
+ Char_t ctag[5];
+ for (Int_t icham = 0; icham < ncham; ++icham) {
+ sprintf(ctag,"UXI%1d",icham+1);
+ fIdSensI[icham] = pMC->VolId(ctag);
+ sprintf(ctag,"UXN%1d",icham+1);
+ fIdSensN[icham] = pMC->VolId(ctag);
+ sprintf(ctag,"UXO%1d",icham+1);
+ fIdSensO[icham] = pMC->VolId(ctag);
+ }
+
+ Float_t Poti = TMath::Log(kPoti);
+ Float_t Eend = TMath::Log(kEend);
+
+ // Ermilova distribution for the delta-ray spectrum
+ fDeltaE = new TF1("deltae",Ermilova,Poti,Eend,0);
+
}
//_____________________________________________________________________________
//
// Called at every step in the Transition Radiation Detector version 2
//
- Int_t idSens, icSens;
+
+ Int_t idSens, icSens, id;
Int_t iPla, iCha, iSec;
Int_t iOut;
Int_t vol[3];
Int_t iPid;
-
- const Float_t kBig = 1.0E+12;
-
+
+ const Double_t kBig = 1.0E+12;
+
+ Float_t hits[4];
+ Float_t mom[4];
Float_t random[1];
Float_t charge;
- Float_t betaGamma, pp;
Float_t aMass;
- Float_t eLos, qTot;
- Float_t hits[4];
- Float_t mom[4];
- Float_t pTot;
-
+
+ Double_t pTot;
+ Double_t qTot;
+ Double_t eDelta;
+ Double_t betaGamma, pp;
+
TClonesArray &lhits = *fHits;
-
+
AliMC* pMC = AliMC::GetMC();
-
+
// Ionization energy
- // taken from: Ionization Measurements in High Energy Physics, Springer
- const Double_t kWion = 23.0E-9;
+ const Float_t kWion = 22.04;
// Maximum energy for e+ e- g for the step-size calculation
- const Float_t kPTotMax = 0.002;
+ const Float_t kPTotMax = 0.002;
// Plateau value of the energy-loss for electron in xenon
// taken from: Allison + Comb, Ann. Rev. Nucl. Sci. (1980), 30, 253
- const Float_t kPlateau = 1.70;
+ //const Double_t kPlateau = 1.70;
+ // the averaged value (26/3/99)
+ const Float_t kPlateau = 1.55;
// dN1/dx|min for the gas mixture (90% Xe + 10% CO2)
- // taken from: Ionization Measurements in High Energy Physics, Springer
- const Float_t kPrim = 43.68;
-
+ const Float_t kPrim = 48.0;
+ // First ionization potential (eV) for the gas mixture (90% Xe + 10% CO2)
+ const Float_t kPoti = 12.1;
+
// Set the maximum step size to a very large number for all
// neutral particles and those outside the driftvolume
pMC->SetMaxStep(kBig);
-
+
// Use only charged tracks
if (( pMC->TrackCharge() ) &&
(!pMC->TrackStop() ) &&
(!pMC->TrackDisappear())) {
-
+
// Find the sensitive volume
idSens = pMC->CurrentVol(0,icSens);
iPla = 0;
iOut = 0;
- if (idSens == fIdSenI1) iPla = 1;
- else if (idSens == fIdSenI2) iPla = 2;
- else if (idSens == fIdSenI3) iPla = 3;
- else if (idSens == fIdSenI4) iPla = 4;
- else if (idSens == fIdSenI5) iPla = 5;
- else if (idSens == fIdSenI6) iPla = 6;
- else if (idSens == fIdSenO1) {
- iPla = 1;
- iOut = 1; }
- else if (idSens == fIdSenO2) {
- iPla = 2;
- iOut = 1; }
- else if (idSens == fIdSenO3) {
- iPla = 3;
- iOut = 1; }
- else if (idSens == fIdSenO4) {
- iPla = 4;
- iOut = 1; }
- else if (idSens == fIdSenO5) {
- iPla = 5;
- iOut = 1; }
- else if (idSens == fIdSenO6) {
- iPla = 6;
- iOut = 1; }
-
+ for (Int_t icham = 0; icham < ncham; ++icham) {
+ if (idSens == fIdSensI[icham]) {
+ iOut = 0;
+ iPla = icham + 1;
+ }
+ if (idSens == fIdSensN[icham]) {
+ iOut = 1;
+ iPla = icham + 1;
+ }
+ if (idSens == fIdSensO[icham]) {
+ iOut = 2;
+ iPla = icham + 1;
+ }
+ }
+
// Inside a sensitive volume?
if (iPla) {
-
- // Calculate the energy loss
- // ((1/E^2.0) distribution for the fluctuations)
- pMC->Rndm(random,1);
- eLos = Eloss(random[0]);
-
- // The amount of charge created
- qTot = (Float_t) ((Int_t) (eLos / kWion) + 1);
-
+
+ // Calculate the energy of the delta-electrons
+ eDelta = TMath::Exp(fDeltaE->GetRandom()) - kPoti;
+ eDelta = TMath::Max(eDelta,0.0);
+
+ // The number of secondary electrons created
+ qTot = (Double_t) ((Int_t) (eDelta / kWion) + 1);
+
// The sector number
- pMC->CurrentVolOff(5,0,iSec);
-
+ id = pMC->CurrentVolOff(4,0,iSec);
+
// The chamber number
- pMC->CurrentVolOff(4,0,iCha);
- if (iOut)
- iCha = (iCha - 1) * 3 + 1;
- else
- iCha = iCha + 1;
-
+ // 1: outer left
+ // 2: neighbouring left
+ // 3: inner
+ // 4: neighbouring right
+ // 5: outer right
+ id = pMC->CurrentVolOff(2,0,iCha);
+ if (iCha == 1)
+ iCha = 3 + iOut;
+ else
+ iCha = 3 - iOut;
+
vol[0] = iSec;
vol[1] = iCha;
vol[2] = iPla;
- pMC->TrackPosition(hits);
- hits[3] = qTot;
-
- // Add the hit
- new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
-
- pMC->TrackMomentum(mom);
- pTot = mom[3];
+ // Check on selected volumes
+ Int_t addthishit = 1;
+ if (fSensSelect) {
+ if ((fSensPlane) && (vol[2] != fSensPlane )) addthishit = 0;
+ if ((fSensChamber) && (vol[1] != fSensChamber)) addthishit = 0;
+ if ((fSensSector) && (vol[0] != fSensSector )) addthishit = 0;
+ }
+
+ if (addthishit) {
+
+ // Add this hit
+ pMC->TrackPosition(hits);
+ hits[3] = qTot;
+ new(lhits[fNhits++]) AliTRDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+
+ // The energy loss according to Bethe Bloch
+ pMC->TrackMomentum(mom);
+ pTot = mom[3];
+ iPid = pMC->TrackPid();
+ if ( (iPid > 3) ||
+ ((iPid <= 3) && (pTot < kPTotMax))) {
+ aMass = pMC->TrackMass();
+ betaGamma = pTot / aMass;
+ pp = kPrim * BetheBloch(betaGamma);
+ // Take charge > 1 into account
+ charge = pMC->TrackCharge();
+ if (TMath::Abs(charge) > 1) pp = pp * charge*charge;
+ }
+ // Electrons above 20 Mev/c are at the plateau
+ else {
+ pp = kPrim * kPlateau;
+ }
- // New step size for electrons only if momentum is small enough
- iPid = pMC->TrackPid();
- if ( (iPid > 3) ||
- ((iPid <= 3) && (pTot < kPTotMax))) {
- aMass = pMC->TrackMass();
- betaGamma = pTot / aMass;
- pp = kPrim * BetheBloch(betaGamma);
- // Take charge > 1 into account
- charge = pMC->TrackCharge();
- if (TMath::Abs(charge) > 1) pp = pp * charge*charge;
+ // Calculate the maximum step size for the next tracking step
+ if (pp > 0) {
+ do
+ pMC->Rndm(random,1);
+ while ((random[0] == 1.) || (random[0] == 0.));
+ pMC->SetMaxStep( - TMath::Log(random[0]) / pp);
+ }
+
}
- // Electrons above 20 Mev/c are at the plateau
else {
- pp = kPrim * kPlateau;
+ // set step size to maximal value
+ pMC->SetMaxStep(kBig);
}
-
- // Calculate the maximum step size for the next tracking step
- do
- pMC->Rndm(random,1);
- while ((random[0] == 1.) || (random[0] == 0.));
- pMC->SetMaxStep( - TMath::Log(random[0]) / pp);
-
+
}
+
+ }
+
+}
+
+//_____________________________________________________________________________
+Double_t AliTRDv2::BetheBloch(Double_t bg)
+{
+ //
+ // Parametrization of the Bethe-Bloch-curve
+ // The parametrization is the same as for the TPC and is taken from Lehrhaus.
+ //
+
+ // The parameters have been adjusted to Xe-data found in:
+ // Allison & Cobb, Ann. Rev. Nucl. Sci. (1980), 30, 253
+ //const Double_t kP1 = 0.76176E-1;
+ //const Double_t kP2 = 10.632;
+ //const Double_t kP3 = 3.17983E-6;
+ //const Double_t kP4 = 1.8631;
+ //const Double_t kP5 = 1.9479;
+
+ // This parameters have been adjusted to averaged values from GEANT
+ const Double_t kP1 = 7.17960e-02;
+ const Double_t kP2 = 8.54196;
+ const Double_t kP3 = 1.38065e-06;
+ const Double_t kP4 = 5.30972;
+ const Double_t kP5 = 2.83798;
+
+ if (bg > 0) {
+ Double_t yy = bg / TMath::Sqrt(1. + bg*bg);
+ Double_t aa = TMath::Power(yy,kP4);
+ Double_t bb = TMath::Power((1./bg),kP5);
+ bb = TMath::Log(kP3 + bb);
+ return ((kP2 - aa - bb)*kP1 / aa);
}
+ else
+ return 0;
+
+}
+
+//_____________________________________________________________________________
+Double_t Ermilova(Double_t *x, Double_t *par)
+{
+ //
+ // Calculates the delta-ray energy distribution according to Ermilova
+ // Logarithmic scale !
+ //
+
+ Double_t energy;
+ Double_t dpos;
+ Double_t dnde;
+
+ Int_t pos1, pos2;
+
+ const Int_t nV = 31;
+
+ Float_t vxe[nV] = { 2.3026, 2.9957, 3.4012, 3.6889, 3.9120
+ , 4.0943, 4.2485, 4.3820, 4.4998, 4.6052
+ , 4.7005, 5.0752, 5.2983, 5.7038, 5.9915
+ , 6.2146, 6.5221, 6.9078, 7.3132, 7.6009
+ , 8.0064, 8.5172, 8.6995, 8.9872, 9.2103
+ , 9.4727, 9.9035,10.3735,10.5966,10.8198
+ ,11.5129 };
+
+ Float_t vye[nV] = { 80.0 , 31.0 , 23.3 , 21.1 , 21.0
+ , 20.9 , 20.8 , 20.0 , 16.0 , 11.0
+ , 8.0 , 6.0 , 5.2 , 4.6 , 4.0
+ , 3.5 , 3.0 , 1.4 , 0.67 , 0.44
+ , 0.3 , 0.18 , 0.12 , 0.08 , 0.056
+ , 0.04 , 0.023, 0.015, 0.011, 0.01
+ , 0.004 };
+
+ energy = x[0];
+
+ // Find the position
+ pos1 = pos2 = 0;
+ dpos = 0;
+ do {
+ dpos = energy - vxe[pos2++];
+ }
+ while (dpos > 0);
+ pos2--;
+ if (pos2 > nV) pos2 = nV;
+ pos1 = pos2 - 1;
+
+ // Differentiate between the sampling points
+ dnde = (vye[pos1] - vye[pos2]) / (vxe[pos2] - vxe[pos1]);
+
+ return dnde;
+
}
// Manager and hits classes for set:TRD version 2 //
////////////////////////////////////////////////////////
+#include <TF1.h>
#include "AliTRD.h"
+// Energy spectrum of the delta-rays
+Double_t Ermilova(Double_t *x, Double_t *par);
+
class AliTRDv2 : public AliTRD {
public:
AliTRDv2() {}
AliTRDv2(const char *name, const char *title);
- virtual ~AliTRDv2() {}
+ virtual ~AliTRDv2();
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual Int_t IsVersion() const {return 2;}
virtual void DrawModule();
protected:
- Int_t fIdSenO1; // Sensitive volume identifier for outer chambers
- Int_t fIdSenO2; // Sensitive volume identifier for outer chambers
- Int_t fIdSenO3; // Sensitive volume identifier for outer chambers
- Int_t fIdSenO4; // Sensitive volume identifier for outer chambers
- Int_t fIdSenO5; // Sensitive volume identifier for outer chambers
- Int_t fIdSenO6; // Sensitive volume identifier for outer chambers
- Int_t fIdSenI1; // Sensitive volume identifier for inner chambers
- Int_t fIdSenI2; // Sensitive volume identifier for inner chambers
- Int_t fIdSenI3; // Sensitive volume identifier for inner chambers
- Int_t fIdSenI4; // Sensitive volume identifier for inner chambers
- Int_t fIdSenI5; // Sensitive volume identifier for inner chambers
- Int_t fIdSenI6; // Sensitive volume identifier for inner chambers
-
+ Int_t fIdSensI[ncham]; // Sensitive volume identifier (inner chambers)
+ Int_t fIdSensN[ncham]; // Sensitive volume identifier (neighbouring chambers)
+ Int_t fIdSensO[ncham]; // Sensitive volume identifier (outer chambers)
+
private:
- // Inline functions for AliTRDv2
-
- inline Float_t Eloss(Float_t rndm)
- {
- //
- // Calculates the energy loss
- // 1/E^2. distribution for the fluctuations
- //
- // Exponent of the distribution for the energy loss
- // 2.0 is the apropriate value for Argon, 2.2 would be for Neon,
- // and how about Xenon? We take the Argon value for the time being.
- const Float_t kEexp = 2.0;
- // First ionization potential for the gas mixture (90% Xe + 10% CO2)
- // taken from: Ionization Measurements in High Energy Physics, Springer
- const Float_t kPoti = 12.3E-9;
- // Maximum energy (10 keV);
- const Float_t kEend = 10.0E-6;
-
- Float_t ex = 1. - kEexp;
- Float_t xpot = TMath::Power(kPoti,ex);
- Float_t xend = TMath::Power(kEend,ex);
- Float_t elos = (1. - rndm)*xpot + rndm*xend;
-
- return(TMath::Power(elos,(1./ex)) - kPoti);
-
- }
-
- inline Float_t BetheBloch(Float_t xx)
- {
- //
- // Parametrization of the Bethe-Bloch-curve
- // The parametrization is the same as for the TPC and is taken from
- // Lehrhaus.
- // The parameters have been adjusted to Xe-data found in:
- // Allison & Cobb, Ann. Rev. Nucl. Sci. (1980), 30, 253
- //
- const Float_t kP1 = 0.76176E-1;
- const Float_t kP2 = 10.632;
- const Float_t kP3 = 3.17983E-6;
- const Float_t kP4 = 1.8631;
- const Float_t kP5 = 1.9479;
-
- Float_t yy = xx / TMath::Sqrt(1. + xx*xx);
- Float_t aa = TMath::Power(yy,kP4);
- Float_t bb = TMath::Power((1./xx),kP5);
- bb = TMath::Log(kP3 + bb);
-
- return((kP2 - aa - bb)*kP1 / aa);
-
- }
+ virtual Double_t BetheBloch(Double_t bg);
+
+ TF1 *fDeltaE; // Energy distribution of the delta-electrons
- ClassDef(AliTRDv2,1) // Transition Radiation Detector version 2
+ ClassDef(AliTRDv2,1) // Transition Radiation Detector version 2
};
#endif
//void DrawTRD()
{
- gMC->Gsatt("*", "seen", -1);
- gMC->Gsatt("alic", "seen", 0);
- gROOT->Macro("ViewTRD.C");
- gMC->Gdopt("hide", "on");
- gMC->Gdopt("shad", "on");
- gMC->Gsatt("*", "fill", 7);
- gMC->SetClipBox(".");
- gMC->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 2000);
- gMC->DefaultRange();
- gMC->Gdraw("alic", 40, 30, 0, 12, 9.4, .021, .021);
- gMC->Gdhead(1111, "Transition Radiation Detector");
- gMC->Gdman(18, 4, "MAN");
+ geant3->Gsatt("*", "seen", -1);
+ geant3->Gsatt("alic", "seen", 0);
+ AliTRD *TRD = gAlice->GetDetector("TRD");
+ if (TRD->IsVersion() == 0)
+ gROOT->Macro("ViewTRD0.C");
+ else if (TRD->IsVersion() == 1)
+ gROOT->Macro("ViewTRD1.C");
+ else if (TRD->IsVersion() == 2)
+ gROOT->Macro("ViewTRD2.C");
+ geant3->Gdopt("hide", "on");
+ geant3->Gdopt("shad", "on");
+ geant3->Gsatt("*", "fill", 7);
+ geant3->SetClipBox(".");
+ geant3->SetClipBox("*", 0, 2000, -2000, 2000, -2000, 2000);
+ geant3->DefaultRange();
+ geant3->Gdraw("alic", 40, 30, 0, 12, 9.4, .020, .020);
+ geant3->Gdhead(1111, "Transition Radiation Detector");
+ geant3->Gdman(18, 4, "MAN");
}