#include "AliTPCRF1D.h"
+
ClassImp(AliTPC)
//_____________________________________________________________________________
TTUBS *tubs;
Int_t i;
const int kColorTPC=19;
- char name[5], title[20];
+ char name[5], title[25];
const Double_t kDegrad=TMath::Pi()/180;
- const Double_t loAng=30;
- const Double_t hiAng=15;
- const Int_t nLo = Int_t (360/loAng+0.5);
- const Int_t nHi = Int_t (360/hiAng+0.5);
+ const Double_t kRaddeg=180./TMath::Pi();
+
+ AliTPCParam * fTPCParam = &(fDigParam->GetParam());
+
+ Float_t InnerOpenAngle = fTPCParam->GetInnerAngle();
+ Float_t OuterOpenAngle = fTPCParam->GetOuterAngle();
+
+ Float_t InnerAngleShift = fTPCParam->GetInnerAngleShift();
+ Float_t OuterAngleShift = fTPCParam->GetOuterAngleShift();
+
+ Int_t nLo = fTPCParam->GetNInnerSector()/2;
+ Int_t nHi = fTPCParam->GetNOuterSector()/2;
+
+ const Double_t loAng = (Double_t)TMath::Nint(InnerOpenAngle*kRaddeg);
+ const Double_t hiAng = (Double_t)TMath::Nint(OuterOpenAngle*kRaddeg);
+ const Double_t loAngSh = (Double_t)TMath::Nint(InnerAngleShift*kRaddeg);
+ const Double_t hiAngSh = (Double_t)TMath::Nint(OuterAngleShift*kRaddeg);
+
+
const Double_t loCorr = 1/TMath::Cos(0.5*loAng*kDegrad);
const Double_t hiCorr = 1/TMath::Cos(0.5*hiAng*kDegrad);
+
+ Double_t rl,ru;
+
+
//
// Get ALICE top node
- Top=gAlice->GetGeometry()->GetNode("alice");
//
- // Inner sectors
+
+ Top=gAlice->GetGeometry()->GetNode("alice");
+
+ // inner sectors
+
+ rl = fTPCParam->GetInSecLowEdge();
+ ru = fTPCParam->GetInSecUpEdge();
+
+
for(i=0;i<nLo;i++) {
sprintf(name,"LS%2.2d",i);
- sprintf(title,"TPC low sector %d",i);
- tubs = new TTUBS(name,title,"void",88*loCorr,136*loCorr,250,loAng*(i-0.5),loAng*(i+0.5));
+ name[4]='\0';
+ sprintf(title,"TPC low sector %3d",i);
+ title[24]='\0';
+
+ tubs = new TTUBS(name,title,"void",rl*loCorr,ru*loCorr,250.,
+ loAng*(i-0.5)+loAngSh,loAng*(i+0.5)+loAngSh);
tubs->SetNumberOfDivisions(1);
Top->cd();
Node = new TNode(name,title,name,0,0,0,"");
Node->SetLineColor(kColorTPC);
fNodes->Add(Node);
}
+
// Outer sectors
+
+ rl = fTPCParam->GetOuSecLowEdge();
+ ru = fTPCParam->GetOuSecUpEdge();
+
for(i=0;i<nHi;i++) {
sprintf(name,"US%2.2d",i);
+ name[4]='\0';
sprintf(title,"TPC upper sector %d",i);
- tubs = new TTUBS(name,title,"void",142*hiCorr,250*hiCorr,250,hiAng*(i-0.5),hiAng*(i+0.5));
+ title[24]='\0';
+ tubs = new TTUBS(name,title,"void",rl*hiCorr,ru*hiCorr,250,
+ hiAng*(i-0.5)+hiAngSh,hiAng*(i+0.5)+hiAngSh);
tubs->SetNumberOfDivisions(1);
Top->cd();
Node = new TNode(name,title,name,0,0,0,"");
Node->SetLineColor(kColorTPC);
fNodes->Add(Node);
}
-}
+}
+
+
+
//_____________________________________________________________________________
Int_t AliTPC::DistancetoPrimitive(Int_t , Int_t )
{
//-----------------------------------------------------------------
// Origin: Marek Kowalski IFJ, Krakow, Marek.Kowalski@ifj.edu.pl
//-----------------------------------------------------------------
-
+
Int_t ISXFLD=gAlice->Field()->Integ();
Float_t SXMGMX=gAlice->Field()->Max();
+
+ Float_t amat[5]; // atomic numbers
+ Float_t zmat[5]; // z
+ Float_t wmat[5]; // proportions
+
+ Float_t density;
+
+ // ********************* Gases *******************
+
+ //--------------------------------------------------------------
+ // pure gases
+ //--------------------------------------------------------------
+
+ // Ne
+
+
+ Float_t a_ne = 20.18;
+ Float_t z_ne = 10.;
- Float_t absl, radl, a, d, z;
- Float_t dg;
- Float_t x0ne;
- Float_t buf[1];
- Int_t nbuf;
+ density = 0.0009;
+
+ AliMaterial(20,"Ne",a_ne,z_ne,density,999.,999.);
+
+ // Ar
+
+ Float_t a_ar = 39.948;
+ Float_t z_ar = 18.;
+
+ density = 0.001782;
+
+ AliMaterial(21,"Ar",a_ar,z_ar,density,999.,999.);
+
+ Float_t a_pure[2];
- // --- Methane (CH4) ---
- Float_t am[2] = { 12.,1. };
- Float_t zm[2] = { 6.,1. };
- Float_t wm[2] = { 1.,4. };
- Float_t dm = 7.17e-4;
- // --- The Neon CO2 90/10 mixture ---
- Float_t ag[2] = { 20.18 };
- Float_t zg[2] = { 10. };
- Float_t wg[2] = { .8,.2 };
- Float_t dne = 9e-4; // --- Neon density in g/cm3 ---
-
- // --- 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;
- // --- CO2 ---
- Float_t ac[2] = { 12.,16. };
- Float_t zc[2] = { 6.,8. };
- Float_t wc[2] = { 1.,2. };
- Float_t dc = .001977;
- // --- Carbon density and radiation length ---
- Float_t densc = 2.265;
- Float_t radlc = 18.8;
- // --- Silicon ---
- Float_t asi = 28.09;
- Float_t zsi = 14.;
- Float_t desi = 2.33;
- Float_t radsi = 9.36;
-
- // --- Define the various materials for GEANT ---
- AliMaterial(0, "Al $", 26.98, 13., 2.7, 8.9, 37.2);
- x0ne = 28.94 / dne;
- AliMaterial(1, "Ne $", 20.18, 10., dne, x0ne, 999.);
-
- // -- Methane, defined by the proportions of atoms
-
- AliMixture(2, "Methane$", am, zm, dm, -2, wm);
-
- // --- CO2, defined by the proportion of atoms
-
- AliMixture(7, "CO2$", ac, zc, dc, -2, wc);
-
- // -- Get A,Z etc. for CO2
+ a_pure[0] = a_ne;
+ a_pure[1] = a_ar;
+
+ //--------------------------------------------------------------
+ // gases - compounds
+ //--------------------------------------------------------------
+
+ Float_t amol[3];
+
+ // CO2
+
+ amat[0]=12.011;
+ amat[1]=15.9994;
+
+ zmat[0]=6.;
+ zmat[1]=8.;
+
+ wmat[0]=1.;
+ wmat[1]=2.;
+
+ density=0.001977;
+
+ amol[0] = amat[0]*wmat[0]+amat[1]*wmat[1];
+
+ AliMixture(10,"CO2",amat,zmat,density,-2,wmat);
+
+ // CF4
+
+ amat[0]=12.011;
+ amat[1]=18.998;
+
+ zmat[0]=6.;
+ zmat[1]=9.;
+
+ wmat[0]=1.;
+ wmat[1]=4.;
+
+ density=0.003034;
+
+ amol[1] = amat[0]*wmat[0]+amat[1]*wmat[1];
+
+ AliMixture(11,"CF4",amat,zmat,density,-2,wmat);
+
+ // CH4
+
+ amat[0]=12.011;
+ amat[1]=1.;
+
+ zmat[0]=6.;
+ zmat[1]=1.;
+
+ wmat[0]=1.;
+ wmat[1]=4.;
+
+ density=0.000717;
+
+ amol[2] = amat[0]*wmat[0]+amat[1]*wmat[1];
+
+ AliMixture(12,"CH4",amat,zmat,density,-2,wmat);
+
+ //----------------------------------------------------------------
+ // gases - mixtures, ID >= 20 pure gases, <= 10 ID < 20 -compounds
+ //----------------------------------------------------------------
+
char namate[21];
- gMC->Gfmate((*fIdmate)[7], namate, a, z, d, radl, absl, buf, nbuf);
- ag[1] = a;
- zg[1] = z;
- dg = dne * .9 + dc * .1;
-
- // -- Create Ne/CO2 90/10 mixture
-
- AliMixture(3, "Gas-mixt $", ag, zg, dg, 2, wg);
- AliMixture(4, "Gas-mixt $", ag, zg, dg, 2, wg);
-
- AliMaterial(5, "G10$", 20., 10., 1.7, 19.4, 999.);
- AliMixture(6, "Mylar$", amy, zmy, dmy, -3, wmy);
-
- a = ac[0];
- z = zc[0];
- AliMaterial(8, "Carbon", a, z, densc, radlc, 999.);
-
- AliMaterial(9, "Silicon", asi, zsi, desi, radsi, 999.);
- AliMaterial(99, "Air$", 14.61, 7.3, .001205, 30420., 67500.);
-
- AliMedium(0, "Al wall$", 0, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
- AliMedium(2, "Gas mix1$", 3, 0, ISXFLD, SXMGMX, 10., .01,.1, .001, .01);
- AliMedium(3, "Gas mix2$", 3, 0, ISXFLD, SXMGMX, 10., .01,.1, .001, .01);
- AliMedium(4, "Gas mix3$", 4, 1, ISXFLD, SXMGMX, 10., .01,.1, .001, .01);
- AliMedium(5, "G10 pln$", 5, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1 );
- AliMedium(6, "Mylar $", 6, 0, ISXFLD, SXMGMX, 10., .01,.1, .001, .01);
- AliMedium(7, "CO2 $", 7, 0, ISXFLD, SXMGMX, 10., .01,.1, .01, .01);
- AliMedium(8, "Carbon $", 8, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1 );
- AliMedium(9, "Silicon$", 9, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1 );
- AliMedium(99, "Air gap$", 99, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1 );
+
+ density = 0.;
+ Float_t am=0;
+ Int_t nc;
+
+ Float_t a,z,rho,absl,X0,buf[1];
+ Int_t nbuf;
+
+ for(nc = 0;nc<fNoComp;nc++)
+ {
+
+ // retrive material constants
+
+ gMC->Gfmate((*fIdmate)[fMixtComp[nc]],namate,a,z,rho,X0,absl,buf,nbuf);
+
+ amat[nc] = a;
+ zmat[nc] = z;
+
+ Int_t nnc = (fMixtComp[nc]>=20) ? fMixtComp[nc]%20 : fMixtComp[nc]%10;
+
+ am += fMixtProp[nc]*((fMixtComp[nc]>=20) ? a_pure[nnc] : amol[nnc]);
+ density += fMixtProp[nc]*rho; // density of the mixture
+
+ }
+
+ // mixture proportions by weight!
+
+ for(nc = 0;nc<fNoComp;nc++)
+ {
+
+ Int_t nnc = (fMixtComp[nc]>=20) ? fMixtComp[nc]%20 : fMixtComp[nc]%10;
+
+ wmat[nc] = fMixtProp[nc]*((fMixtComp[nc]>=20) ? a_pure[nnc] : amol[nnc])/am;
+
+ }
+
+ AliMixture(31,"Drift gas 1",amat,zmat,density,fNoComp,wmat);
+ AliMixture(32,"Drift gas 2",amat,zmat,density,fNoComp,wmat);
+ AliMixture(33,"Drift gas 3",amat,zmat,density,fNoComp,wmat);
+
+ AliMedium(2, "Drift gas 1", 31, 0, ISXFLD, SXMGMX, 10., 999.,.1, .001, .001);
+ AliMedium(3, "Drift gas 2", 32, 0, ISXFLD, SXMGMX, 10., 999.,.1, .001, .001);
+ AliMedium(4, "Drift gas 3", 33, 1, ISXFLD, SXMGMX, 10., 999.,.1, .001, .001);
+
+ // Air
+
+ AliMaterial(24, "Air", 14.61, 7.3, .001205, 30420., 67500.);
+
+ AliMedium(24, "Air", 24, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
+
+ //----------------------------------------------------------------------
+ // solid materials
+ //----------------------------------------------------------------------
+
+ // Al
+
+ AliMaterial(30, "Al", 26.98, 13., 2.7, 8.9, 37.2);
+
+ AliMedium(0, "Al",30, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
+
+ // Si
+
+ AliMaterial(31, "Si", 28.086, 14.,2.33, 9.36, 999.);
+
+ AliMedium(7, "Al",31, 0, ISXFLD, SXMGMX, 10., .1, .1, .1, .1);
+
+
+ // Mylar C5H4O2
+
+ amat[0]=12.011;
+ amat[1]=1.;
+ amat[2]=15.9994;
+
+ zmat[0]=6.;
+ zmat[1]=1.;
+ zmat[2]=8.;
+
+ wmat[0]=5.;
+ wmat[1]=4.;
+ wmat[2]=2.;
+
+ density = 1.39;
+
+ AliMixture(32, "Mylar",amat,zmat,density,-3,wmat);
+
+ AliMedium(5, "Mylar",32, 0, ISXFLD, SXMGMX, 10., .1, .1, .001, .01);
+
+
+
+
+ // Carbon (normal)
+
+ AliMaterial(33,"C normal",12.011,6.,2.265,18.8,999.);
+
+ AliMedium(6,"C normal",33,0, ISXFLD, SXMGMX, 10., .1, .1, .001, .01);
+
+ // G10 for inner and outr field cage
+ // G10 is 60% SiO2 + 40% epoxy, right now I use A and Z for SiO2
+
+ Float_t rhoFactor;
+
+ amat[0]=28.086;
+ amat[1]=15.9994;
+
+ zmat[0]=14.;
+ zmat[1]=8.;
+
+ wmat[0]=1.;
+ wmat[1]=2.;
+
+ density = 1.7;
+
+
+ AliMixture(34,"G10 aux.",amat,zmat,density,-2,wmat);
+
+
+ gMC->Gfmate((*fIdmate)[34],namate,a,z,rho,X0,absl,buf,nbuf);
+
+ Float_t thickX0 = 0.0052; // field cage in X0 units
+
+ Float_t thick = 2.; // in cm
+
+ X0=19.4; // G10
+
+ rhoFactor = X0*thickX0/thick;
+ density = rho*rhoFactor;
+
+ AliMaterial(35,"G10-fc",a,z,density,999.,999.);
+
+ AliMedium(8,"G10-fc",35,0, ISXFLD, SXMGMX, 10., .1, .1, .001, .01);
+
+ thickX0 = 0.0027; // inner vessel (eta <0.9)
+ thick=0.5;
+ rhoFactor = X0*thickX0/thick;
+ density = rho*rhoFactor;
+
+ AliMaterial(36,"G10-iv",a,z,density,999.,999.);
+
+ AliMedium(9,"G10-iv",36,0, ISXFLD, SXMGMX, 10., .1, .1, .001, .01);
+
+ // Carbon fibre
+
+ gMC->Gfmate((*fIdmate)[33],namate,a,z,rho,X0,absl,buf,nbuf);
+
+ thickX0 = 0.0133; // outer vessel
+ thick=3.0;
+ rhoFactor = X0*thickX0/thick;
+ density = rho*rhoFactor;
+
+
+ AliMaterial(37,"C-ov",a,z,density,999.,999.);
+
+ AliMedium(10,"C-ov",37,0, ISXFLD, SXMGMX, 10., .1, .1, .001, .01);
+
+ thickX0=0.015; // inner vessel (cone, eta > 0.9)
+ thick=1.5;
+ rhoFactor = X0*thickX0/thick;
+ density = rho*rhoFactor;
+
+ AliMaterial(38,"C-ivc",a,z,density,999.,999.);
+
+ AliMedium(11,"C-ivc",38,0, ISXFLD, SXMGMX, 10., .1, .1, .001, .01);
+
+ //
+
+ AliMedium(12,"CO2",10,0, ISXFLD, SXMGMX, 10., 999.,.1, .001, .001);
+
+
+
}
//_____________________________________________________________________________
xyz[2]=tpcHit->fQ; // q
xyz[3]=sigma_rphi; // fSigmaY2
xyz[4]=sigma_z; // fSigmaZ2
-
- //find row number
- //MI we must change
- Int_t row = fTPCParam->GetPadRow(sector,xprim) ;
+
// and finally add the cluster
- Int_t tracks[5]={tpcHit->fTrack, -1, -1, sector, row+1};
+ Int_t tracks[5]={tpcHit->fTrack, -1, -1, sector, tpcHit->fPadRow};
AddCluster(xyz,tracks);
} // end of loop over hits
// Sectors 1-24 are lower sectors, 1-12 z>0, 13-24 z<0
// Sectors 25-72 are upper sectors, 25-48 z>0, 49-72 z<0
//----
- for(Int_t isec=1;isec<fNsectors+1;isec++) Hits2DigitsSector(isec);
+ for(Int_t isec=0;isec<fNsectors;isec++) Hits2DigitsSector(isec);
}
// and a single track signal
//
- TMatrix *m1 = new TMatrix(1,n_of_pads[iFlag],1,MAXTPCTBK); // integrated
- TMatrix *m2 = new TMatrix(1,n_of_pads[iFlag],1,MAXTPCTBK); // single
+ TMatrix *m1 = new TMatrix(0,n_of_pads[iFlag]-1,0,MAXTPCTBK-1); // integrated
+ TMatrix *m2 = new TMatrix(0,n_of_pads[iFlag]-1,0,MAXTPCTBK-1); // single
//
// Cross talk from the neighbouring pad-rows
//
- TMatrix *m3 = new TMatrix(1,n_of_pads[iFlag],1,MAXTPCTBK); // cross-talk
+ TMatrix *m3 = new TMatrix(0,n_of_pads[iFlag]-1,0,MAXTPCTBK-1); // cross-talk
TMatrix &Cross = *m3;
Int_t digits[5];
- for(Int_t ip=1;ip<n_of_pads[iFlag]+1;ip++){
- for(Int_t it=1;it<MAXTPCTBK+1;it++){
+ for(Int_t ip=0;ip<n_of_pads[iFlag];ip++){
+ for(Int_t it=0;it<MAXTPCTBK;it++){
Float_t q = Total(ip,it);
- Int_t gi =(it-1)*n_of_pads[iFlag]+ip-1; // global index
+ Int_t gi =it*n_of_pads[iFlag]+ip; // global index
q = gRandom->Gaus(q,fTPCParam->GetNoise()); // apply noise
q *= (q_el*1.e15); // convert to fC
}
digits[0]=isec;
- digits[1]=irow+1;
+ digits[1]=irow;
digits[2]=ip;
digits[3]=it;
digits[4]= (Int_t)q;
Float_t label = v(0);
- Int_t CentralPad = (np+1)/2;
+ Int_t CentralPad = (np-1)/2;
Int_t PadNumber;
Int_t nElectrons = (tv->GetNrows()-1)/4;
Float_t range=((np-1)/2 + 0.5)*fTPCParam->GetPadPitchWidth(); // pad range
- range -= 0.5; // dead zone, 5mm from the edge, according to H.G. Fischer
+ range -= 0.5; // dead zone, 5mm from the edge, according to H.G. Fischer
+
Float_t IneffFactor = 0.5; // inefficiency in the gain close to the edge, as above
PadNumber=CentralPad;
}
else if (absy < range){
- PadNumber=(Int_t) ((absy-0.5*fTPCParam->GetPadPitchWidth())/fTPCParam->GetPadPitchWidth() +1.);
+ PadNumber=(Int_t) ((absy-0.5*fTPCParam->GetPadPitchWidth())/fTPCParam->GetPadPitchWidth());
PadNumber=(Int_t) (TMath::Sign((Float_t)PadNumber, y)+CentralPad);
}
else continue; // electron out of pad-range , lost at the sector edge
PadSignal[i] *= fTPCParam->GetPadCoupling();
}
- Int_t LeftPad = TMath::Max(1,PadNumber-3);
- Int_t RightPad = TMath::Min(np,PadNumber+3);
+ Int_t LeftPad = TMath::Max(0,PadNumber-3);
+ Int_t RightPad = TMath::Min(np-1,PadNumber+3);
Int_t pmin=LeftPad-PadNumber+3; // lower index of the pad_signal vector
Int_t pmax=RightPad-PadNumber+3; // upper index
- Float_t z_drift = (z_end-z)*zwidthm1;
+ Float_t z_drift = z*zwidthm1;
Float_t z_offset = z_drift-(Int_t)z_drift;
//distance to the centre of nearest time bin (in time bin units)
- Int_t FirstBucket = (Int_t)z_drift+1;
+ Int_t FirstBucket = (Int_t)z_drift;
// loop over time bins (4 bins is enough - 3 sigma truncated Gaussian)
Int_t TrueTime = FirstBucket+i2; // current time bucket
Float_t dz = (Float_t(i2)+z_offset)*zwidth;
Float_t ampl = fRF->GetRF(dz);
- if( (TrueTime>MAXTPCTBK) ) break; // beyond the time range
+ if( (TrueTime>MAXTPCTBK-1) ) break; // beyond the time range
IndexRange[2]=TMath::Min(IndexRange[2],TrueTime); // min time
IndexRange[3]=TMath::Max(IndexRange[3],TrueTime); // max time
for(Int_t ip=IndexRange[0];ip<IndexRange[1]+1;ip++){
- Int_t GlobalIndex = (it-1)*np+ip-1; // GlobalIndex starts from 0!
+ Int_t GlobalIndex = it*np+ip; // GlobalIndex starts from 0!
if(!pList[GlobalIndex]){
TVector *tv;
TMatrix &signal = *m;
- Int_t CentralPad = (nPadsSignal+1)/2;
+ Int_t CentralPad = (nPadsSignal-1)/2;
Float_t PadSignal[7]; // signal from a single electron
// Loop over tracks
for(Int_t nt=0;nt<ntracks;nt++){
PadNumber=CentralPad;
}
else if (absy < range){
- PadNumber=(Int_t) ((absy-0.5*fTPCParam->GetPadPitchWidth())/fTPCParam->GetPadPitchWidth() +1.);
+ PadNumber=(Int_t) ((absy-0.5*fTPCParam->GetPadPitchWidth())/fTPCParam->GetPadPitchWidth());
PadNumber=(Int_t) (TMath::Sign((Float_t)PadNumber, y)+CentralPad);
}
else continue; // electron out of sense wire range, lost at the sector edge
}
// real pad range
- Int_t LeftPad = TMath::Max(1,PadNumber-3);
- Int_t RightPad = TMath::Min(nPadsSignal,PadNumber+3);
+ Int_t LeftPad = TMath::Max(0,PadNumber-3);
+ Int_t RightPad = TMath::Min(nPadsSignal-1,PadNumber+3);
Int_t pmin=LeftPad-PadNumber+3; // lower index of the pad_signal vector
Int_t pmax=RightPad-PadNumber+3; // upper index
- Float_t z_drift = (z_end-z)*zwidthm1;
+ Float_t z_drift = z*zwidthm1;
Float_t z_offset = z_drift-(Int_t)z_drift;
//distance to the centre of nearest time bin (in time bin units)
- Int_t FirstBucket = (Int_t)z_drift+1;
+ Int_t FirstBucket = (Int_t)z_drift;
// MI check it --time offset
for (Int_t i2=0;i2<4;i2++){
Int_t TrueTime = FirstBucket+i2; // current time bucket
Float_t dz = (Float_t(i2)+z_offset)*zwidth;
Float_t ampl = fRF->GetRF(dz);
- if((TrueTime>MAXTPCTBK)) break; // beyond the time range
+ if((TrueTime>MAXTPCTBK-1)) break; // beyond the time range
// loop over pads, from pmin to pmax
for(Int_t i3=pmin;i3<pmax+1;i3++){
Int_t TruePad = LeftPad+i3-pmin;
- if(TruePad<nPadsDiff+1 || TruePad > nPadsSignal-nPadsDiff) continue;
+ if(TruePad<nPadsDiff || TruePad > nPadsSignal-nPadsDiff-1) continue;
TruePad -= nPadsDiff;
signal(TruePad,TrueTime)+=(PadSignal[i3]*ampl); // not converted to charge!
fSide = side;
}
+//____________________________________________________________________________
+void AliTPC::SetGasMixt(Int_t nc,Int_t c1,Int_t c2,Int_t c3,Float_t p1,
+ Float_t p2,Float_t p3)
+{
+ fNoComp = nc;
+
+ fMixtComp[0]=c1;
+ fMixtComp[1]=c2;
+ fMixtComp[2]=c3;
+
+ fMixtProp[0]=p1;
+ fMixtProp[1]=p2;
+ fMixtProp[2]=p3;
+
+
+}
//_____________________________________________________________________________
void AliTPC::Streamer(TBuffer &R__b)
{
//MK changes
Float_t fSide; // selects left(-1), right(+1), or both(0) sides of the TPC
+ Int_t fNoComp; // number of a drift gas components
+ Int_t fMixtComp[3]; // drift gas components
+ Float_t fMixtProp[3]; // mixture proportions
+
+ //
TClonesArray *fClusters; // List of clusters for all sectors
TClonesArray *fTracks; // List of reconstructed tracks
//MK changes
virtual void SetSide(Float_t side);
+ virtual void SetGasMixt(Int_t nc,Int_t c1,Int_t c2,Int_t c3,Float_t p1,
+ Float_t p2,Float_t p3);
+
virtual void StepManager()=0;
virtual void DrawDetector() {}
AliTPCD* GetDigParam() {return fDigParam;} //MI change8
{
// Dynamically link some shared libs
- if (gClassTable->GetID("AliRun") < 0) {
- gROOT->LoadMacro("loadlibs.C");
- loadlibs();
- }
+ if (gClassTable->GetID("AliRun") < 0) {
+ gROOT->LoadMacro("loadlibs.C");
+ loadlibs();
+ }
//names of trees
const char * inFile = "galice.root";
param.SetDiffL(0.022);
param.SetNoise(500);
param.SetGasGain(1.e4);
- param.SetChipGain(24);
+ param.SetChipGain(24);
+ param.SetSectorAngles(40.,0.,20.,10.);
+ param.SetInnerRadiusLow(83.7);
+ param.SetInnerRadiusUp(132.9);
+ param.SetOuterRadiusLow(146.9);
+ param.SetOuterRadiusUp(249.4);
param.Update();
//Set z (time) response function
prf.Dump();
printf("**********Digit object dump end********************\n");
- TPC->Hits2DigitsSector(1);
+ TPC->Hits2DigitsSector(0);
file->cd();
///////////////////////////////////////////////////////////////////////
// Manager and of geomety classes for set: TPC //
// //
+// !sectors are numbered from 0 //
+// !pad rows are numbered from 0 //
+//
+// 12.6. changed z relative
// Origin: Marian Ivanov, Uni. of Bratislava, ivanov@fmph.uniba.sk //
// //
///////////////////////////////////////////////////////////////////////
-// MI change global variables for geometry
-// declaration of the global static variable
-// of AliTPCParam objects
#include <iostream.h>
#include <TMath.h>
-//#include <TObject.h>
-#include "AliTPCParam.h"
-//some old TPC parameters in AliTPCSecGeo.h
+#include <TObject.h>
#include "AliTPCSecGeo.h"
+#include <AliTPCParam.h>
ClassImp(AliTPCParam)
+const static Int_t kMaxRows=600;
+
+
// default values
+const static Int_t kMaxTBin =512;
-const Float_t kInnerRadiusLow = 89.45;
-const Float_t kOuterRadiusLow = 143.725;
-const Float_t kInnerRadiusUp = 134.55;
-const Float_t kOuterRadiusUp = 248.275;
-const Float_t kPadPitchLength = 2.05;
-const Float_t kPadPitchWidth = 0.35;
-const Float_t kPadLength = 2.05;
-const Float_t kPadWidth = 0.35;
-// Number of wires per pad and wire-wire pitch
-const Int_t knWires = 5;
-const Float_t kDiffT = 2.2e-2;
-const Float_t kDiffL = 2.2e-2;
-const Float_t kDriftV =2.85e6;
+const static Float_t kInnerRadiusLow = 89.45;
+const static Float_t kOuterRadiusLow = 143.725;
+const static Float_t kInnerRadiusUp = 134.55;
+const static Float_t kOuterRadiusUp = 248.275;
-const Float_t kOmegaTau = 0.145;
-const Float_t kAttCoef = 250.;
-const Float_t kOxyCont = 5.e-6;
+const static Float_t kInnerAngle = 0.523598775; // 30 degrees
+const static Float_t kInnerAngleShift = 0;
+const static Float_t kOuterAngle = 0.261799387; // 15 degrees
+const static Float_t kOuterAngleShift = 0;
+const static Float_t kPadPitchLength = 2.05;
+const static Float_t kPadPitchWidth = 0.35;
+const static Float_t kPadLength = 2.05;
+const static Float_t kPadWidth = 0.35;
+
+// Number of wires per pad and wire-wire pitch
+const static Int_t knWires = 5;
+const static Float_t kDiffT = 2.2e-2;
+const static Float_t kDiffL = 2.2e-2;
+const static Float_t kDriftV =2.85e6;
+const static Float_t kOmegaTau = 0.145;
+const static Float_t kAttCoef = 250.;
+const static Float_t kOxyCont = 5.e-6;
-const Float_t kChipGain = 24;
-const Float_t kGasGain = 1e4;
-const Float_t kTSample = 2.e-7; //TSAMPLE
-const Float_t kTFWHM = 2.5e-7; //fwhm of charge distribution
+
+const static Float_t kChipGain = 24;
+const static Float_t kGasGain = 1e4;
+const static Float_t kTSample = 2.e-7; //TSAMPLE
+const static Float_t kTFWHM = 2.5e-7; //fwhm of charge distribution
-const Float_t kNoise = 500; //default noise = 1000 el
-const Int_t kZeroSup=5;
-const Float_t kPadCoupling=0.5;
+const static Float_t kNoise = 500; //default noise = 1000 el
+const static Int_t kZeroSup=5;
+const static Float_t kPadCoupling=0.5;
//
-const Float_t kEdgeSectorSpace = 5.26;
+const static Float_t kEdgeSectorSpace = 1.15;
+const static Float_t kDegtoRad = 0.01745329251994;
+const static Float_t kRadtoDeg = 57.29577951309;
}
+void AliTPCParam::SetSectorAngles(Float_t innerangle, Float_t innershift, Float_t outerangle,
+ Float_t outershift, Bool_t inDegree)
+{
+ //
+ // set opening angles
+ fInnerAngle = innerangle; //opening angle of Inner sector
+ fInnerAngleShift = innershift; //shift of first inner sector center to the 0
+ fOuterAngle = outerangle; //opening angle of outer sector
+ fOuterAngleShift = outershift; //shift of first sector center to the 0
+ if (inDegree==kTRUE){
+ fInnerAngle *=kDegtoRad;
+ fInnerAngleShift *=kDegtoRad;
+ fOuterAngle *=kDegtoRad;
+ fOuterAngleShift *=kDegtoRad;
+ }
+}
+
+
void AliTPCParam::CRXYZtoXYZ(Float_t *xyz,
const Int_t §or, const Int_t & padrow, Int_t option) const
{
//transform relative coordinates to absolute
Bool_t rel = ( (option&2)!=0);
Float_t row_first;
- row_first = (sector<25) ? fPadRowLow[0] : fPadRowUp[0];
- if (rel==kTRUE) //if we have
+ row_first = (sector<=fNInnerSector) ? fPadRowLow[0] : fPadRowUp[0];
+ if (rel==kTRUE) //if the position is relative to pad row
{
xyz[0]+=row_first;
xyz[0]+=(Int_t) padrow*fPadPitchLength;
}
- if (sector<25)
- if ( sector>12) xyz[2]*=-1.;
+
+ xyz[2]=z_end-xyz[2];
+ if (sector<fNInnerSector)
+ if ( sector>=(fNInnerSector>>1)) xyz[2]*=-1.;
else
- if (sector>48) xyz[2]*=-1;
+ if ( (sector-fNInnerSector) > (fNOuterSector>>1) ) xyz[2]*=-1;
+
Float_t x1=xyz[0];
Float_t y1=xyz[1];
Float_t cos,sin;
AdjustAngles(sector,cos,sin);
- xyz[0]=x1*cos - y1*sin;
- xyz[1]=x1*sin + y1*cos;
+ xyz[0]= x1*cos - y1*sin;
+ xyz[1]= x1*sin + y1*cos;
}
void AliTPCParam::XYZtoCRXYZ(Float_t *xyz,
if (xyz[0]<0) angle=TMath::Pi()-angle;
if ( (xyz[0]>0) && (xyz[1]<0) ) angle=2*TMath::Pi()+angle;
}
- //transform global position to the position relative to the sector padrow
- //fistly calculate xyz[0] "polomer for lover sector
- sector=Int_t(angle/alpha_low)+1;
+ //transform global position to the position relative to the sector padrow
+ //fistly calculate xyz[0] radius for lover sector
+ //bacause in this moment we dont know in which sector we are
+ sector=Int_t((angle-fInnerAngleShift)/fInnerAngle);
Float_t x1;
Float_t y1;
//firstly we suppose that we are in inner sector
y1=-xyz[0]*sin + xyz[1]*cos;
if (x1>fOuterRadiusLow)
{
- sector=Int_t(angle/alpha_up)+25;
+ sector=Int_t((angle-fOuterAngleShift)/fOuterAngle)+fNInnerSector;
AdjustAngles(sector,cos,sin);
x1=xyz[0]*cos + xyz[1]*sin;
y1=-xyz[0]*sin + xyz[1]*cos;
- if (xyz[2]<0) sector+=24;
+ if (xyz[2]<0) sector+=(fNOuterSector>>1);
}
else
- if (xyz[2]<0) sector+=12;
- if (xyz[2]<0) xyz[2]=-xyz[2];
+ if (xyz[2]<0) sector+=(fNInnerSector>>1);
+
if (x1<fOuterRadiusLow)
padrow =Int_t( (x1-fPadRowLow[0])/fPadPitchLength+0.5);
else
x1-=padrow*fPadPitchLength+fPadRowUp[0];
xyz[0]=x1;
xyz[1]=y1;
- }
+ xyz[2]=z_end-TMath::Abs(xyz[2]);
+ } //endif we don't have information about sector
else{
//if we have information about sector
Float_t cos,sin;
x1=xyz[0]*cos + xyz[1]*sin;
y1=-xyz[0]*sin + xyz[1]*cos;
//calculate pad row number
- if (sector<25) {
+ if (sector<fNInnerSector) {
padrow =Int_t( (x1-fPadRowLow[0])/fPadPitchLength+1.5)-1;
- if ( sector>12) xyz[2]=-xyz[2];
}
else {
padrow =Int_t( (x1-fPadRowUp[0])/fPadPitchLength+1.5)-1;
- if (sector>48) xyz[2]=-xyz[2];
}
//if we store relative position calculate position relative to pad row
if (rel==kTRUE){
- if (sector<25)
+ if (sector<fNInnerSector)
x1-=padrow*fPadPitchLength+fPadRowLow[0];
else
x1-=padrow*fPadPitchLength+fPadRowUp[0];
}
xyz[0]=x1;
xyz[1]=y1;
+ xyz[2]=z_end-TMath::Abs(xyz[2]);
}
}
Int_t sector, Int_t padrow)
{
//transform position in cm to position in time slices and pads
- Float_t nofpads = (sector < 25) ? fnPadsLow[padrow] : fnPadsUp[padrow];
+ Float_t nofpads = GetNPads(sector,padrow);
Float_t padc=(nofpads+1)/2; // this is the "central" pad for a row
pad = y/(fPadPitchWidth)+padc;
- time=(z_end-z)/(fDriftV*fTSample);
- // cout<<y<<" "<<z<<" "<<time<<" "<<pad<<" "<<
- // sector<<" "<<padrow<<"\n";
+ time=z/fZWidth;
}
void AliTPCParam::CRTimePadtoYZ(Float_t &y, Float_t &z,
const Float_t &time, const Float_t &pad,
Int_t sector, Int_t padrow)
{
//transform position in time slices and pads to cm
- Float_t nofpads = (sector < 25) ? fnPadsLow[padrow] : fnPadsUp[padrow];
+ Float_t nofpads = GetNPads(sector,padrow);
Float_t padc=(nofpads+1)/2; // this is the "central" pad for a row
y=(pad-padc)*fPadPitchWidth;
- z=z_end-time*(fDriftV*fTSample);
- // cout<<y<<" "<<z<<" "<<time<<" "<<pad<<" "<<
- // sector<<" "<<padrow<<"\n";
+ z=time*fZWidth;
}
Int_t AliTPCParam::GetWire(Float_t & x)
//give index of the given sector and pad row
//no control if the sectors and rows are reasonable !!!
//
- if (sector<25) return (sector-1)*fnRowLow+row;
- return (24*fnRowLow)+(sector-25)*fnRowUp+row;
+ if (sector<fNInnerSector) return sector*fnRowLow+row;
+ return (fNInnerSector*fnRowLow)+(sector-fNInnerSector)*fnRowUp+row;
}
Bool_t AliTPCParam::AdjustSectorRow(Int_t index, Int_t & sector, Int_t &row)
//if index is reasonable return true else return false
//
if ( (index<0) || (index>fNtRows)) return kFALSE;
- Int_t outindex = 24*fnRowLow;
+ Int_t outindex = fNInnerSector*fnRowLow;
if (index<outindex) {
sector = index/fnRowLow;
row = index - sector*fnRowLow;
- sector++;
return kTRUE;
}
index-= outindex;
sector = index/fnRowUp;
row = index - sector*fnRowUp;
- sector++;
return kTRUE;
}
{
//set default TPC param
fbStatus = kFALSE;
- //set radius parameters
+ //set sector parameters
fInnerRadiusLow = kInnerRadiusLow;
fOuterRadiusLow = kOuterRadiusLow;
fInnerRadiusUp = kInnerRadiusUp;
- fOuterRadiusUp = kOuterRadiusUp;
+ fOuterRadiusUp = kOuterRadiusUp;
+ SetSectorAngles(kInnerAngle,kInnerAngleShift, kOuterAngle, kOuterAngleShift);
// set default pad size and shape
fPadPitchLength = kPadPitchLength;
fPadPitchWidth = kPadPitchWidth;
fPadCoupling= kPadCoupling;
fTSample =kTSample;
fTSigma =kTFWHM/2.35;
- fDriftV=kDriftV;
- //calculate sin and cosine of rotations angle
- for (Int_t i=1; i<80; i++)
- {
- Float_t angle;
- if(i < 25){
- angle = (i < 13) ? (i-1)*alpha_low : (i-13)*alpha_low;
- }
- else {
- angle = (i < 49) ? (i-25)*alpha_up : (i-49)*alpha_up;
- }
- fRotAngle[i]=TMath::Cos(angle);
- fRotAngle[100+i]=TMath::Sin(angle);
- }
+ fDriftV=kDriftV;
+ fMaxTBin = kMaxTBin;
fbStatus = Update();
}
void AliTPCParam::AdjustAngles(Int_t isec, Float_t &cos, Float_t &sin) const
{
+ //
//set cosinus and sinus of rotation angles for sector isec
- cos=fRotAngle[isec];
- sin=fRotAngle[100+isec];
+ //
+ cos=fRotAngle[isec*2];
+ sin=fRotAngle[isec*2+1];
}
Bool_t AliTPCParam::Update()
{
+ //
+ // update some calculated parameter which must be updated after changing "base"
+ // parameters
+ // for example we can change size of pads and according this recalculate number
+ // of pad rows, number of of pads in given row ....
+ //
fbStatus = kFALSE;
- Int_t i;
+
+ Int_t i,j; //loop variables because HP
+ //-----------------Sector section------------------------------------------
+ //calclulate number of sectors
+ fNInnerSector = Int_t(4*TMath::Pi()/fInnerAngle+0.2); // number of inner sectors - factor 0.2 to don't
+ //be influnced by inprecision
+ if (fNInnerSector%2) return kFALSE;
+ fNOuterSector = Int_t(4*TMath::Pi()/fOuterAngle+0.2);
+ if (fNOuterSector%2) return kFALSE;
+ fNSector = fNInnerSector+fNOuterSector;
+ //calculate sin and cosine of rotations angle
+ //sectors angles numbering from 0
+ j=fNInnerSector;
+ Float_t angle = fInnerAngleShift;
+ for (i=0; i<fNInnerSector*2; i+=2, j+=2 , angle +=fInnerAngle){
+ fRotAngle[i]=TMath::Cos(angle);
+ fRotAngle[i+1]=TMath::Sin(angle);
+ fRotAngle[j] = fRotAngle[i];
+ fRotAngle[j+1] = fRotAngle[i+1];
+ }
+ angle = fOuterAngleShift;
+ j=(fNInnerSector+fNOuterSector/2)*2;
+ for (i=fNInnerSector*2; i<fNSector*2; i+=2,j+=2, angle +=fOuterAngle){
+ fRotAngle[i]=TMath::Cos(angle);
+ fRotAngle[i+1]=TMath::Sin(angle);
+ fRotAngle[j] = fRotAngle[i];
+ fRotAngle[j+1] = fRotAngle[i+1];
+ }
+
+
+ //----------------PAD section------------------------------------
//recalculate and check some geometric parameters
if (0.001>fPadPitchLength){
cout<<"ERROR !!! Small pad pitch length \n"<<flush;
return kFALSE;
}
-
if (fPadPitchLength<fPadLength) {
cout<<"ERROR !!! Pitch length smaller then length of pad \n"<<flush;
return kFALSE;
}
-
fnRowUp = Int_t((0.01+fOuterRadiusUp-fOuterRadiusLow)/fPadPitchLength)+1;
if ( kMaxRows<fnRowUp) fnRowUp = kMaxRows;
if (1>fnRowUp) return kFALSE;
for (i = 0;i<fnRowUp;i++)
{
Float_t x = fOuterRadiusLow +fPadPitchLength*(Float_t)i;
- Float_t y = (x-0.5*fPadPitchLength)*2.*tan(alpha_up/2)-kEdgeSectorSpace;
+ //Float_t y = x*2*tan(alpha_up/2)-kEdgeSectorSpace;
+ Float_t y = (x-0.5*fPadPitchLength)*tan(fOuterAngle/2)-kEdgeSectorSpace
+ -fPadPitchWidth/2.;
fPadRowUp[i] = x;
- fnPadsUp[i] = (Int_t)(y/fPadPitchWidth) ;
- if ((fnPadsUp[i]%2) == 0) fnPadsUp[i]-=1;
+ fnPadsUp[i] = 1+2*(Int_t)(y/fPadPitchWidth) ;
+
}
// adjust lower sectors pad row positions and pad numbers
for (i = 0;i<fnRowLow;i++)
{
Float_t x = fInnerRadiusLow +fPadPitchLength*(Float_t)i;
- Float_t y = (x-0.5*fPadPitchLength)*2.*tan(alpha_low/2)-kEdgeSectorSpace;
+ // Float_t y = x*2*tan(alpha_low/2)-kEdgeSectorSpace;
+ Float_t y = (x-0.5*fPadPitchLength)*tan(fInnerAngle/2)-kEdgeSectorSpace
+ -fPadPitchWidth/2.;
fPadRowLow[i] = x;
- fnPadsLow[i] = (Int_t)(y/fPadPitchWidth) ;
- if ((fnPadsLow[i]%2) == 0) fnPadsLow[i]-=1;
+ fnPadsLow[i] = 1+2*(Int_t)(y/fPadPitchWidth) ;
+
}
//that variable are not writen to the file there are calculated
//
fWWPitch= fPadPitchLength/Float_t(fnWires);
fZWidth = fTSample*fDriftV;
- fNtRows = 24*fnRowLow+48*fnRowUp;
-
+ fNtRows = fNInnerSector*fnRowLow+fNOuterSector*fnRowUp;
fbStatus = kTRUE;
return kTRUE;
}
Version_t R__v = R__b.ReadVersion(); if (R__v) { }
TObject::Streamer(R__b);
if (R__v < 2) return;
-
+ //sector parameters
R__b >> fInnerRadiusLow;
R__b >> fInnerRadiusUp;
R__b >> fOuterRadiusLow;
R__b >> fOuterRadiusUp;
-
+ R__b >> fInnerAngle;
+ R__b >> fInnerAngleShift;
+ R__b >> fOuterAngle;
+ R__b >> fOuterAngleShift;
+ //pad parameters
R__b >> fPadPitchLength;
R__b >> fPadPitchWidth;
R__b >> fPadLength;
R__b >> fPadWidth;
R__b >> fnWires;
-
+ //gas parameters
R__b >>fDiffT;
R__b >>fDiffL;
R__b >>fGasGain;
R__b >>fOxyCont;
R__b >>fAttCoef;
-
R__b >>fPadCoupling;
R__b >>fZeroSup;
R__b >>fNoise;
R__b >>fTSample;
R__b >>fTSigma;
//
- fWWPitch= fPadPitchLength/Float_t(fnWires);
- fZWidth = fTSample*fDriftV;
- fNtRows = 24*fnRowLow+48*fnRowUp;
Update();
} else {
R__b.WriteVersion(AliTPCParam::IsA());
R__b << fInnerRadiusUp;
R__b << fOuterRadiusLow;
R__b << fOuterRadiusUp;
+ R__b << fInnerAngle;
+ R__b << fInnerAngleShift;
+ R__b << fOuterAngle;
+ R__b << fOuterAngleShift;
R__b << fPadPitchLength;
R__b << fPadPitchWidth;
////////////////////////////////////////////////
// Manager class for TPC parameters //
////////////////////////////////////////////////
-#include"TObject.h"
-const Int_t kMaxRows=600;
+#include "TObject.h"
+
+// the last things from AliTPCSecGeo
+//const Float_t z_end = 250.;
+//const Float_t alpha_low=0.523598775; // 30 degrees
+//const Float_t alpha_up=0.261799387; // 15 degrees
+//const Float_t q_el = 1.602e-19; // elementary charge
+//const Float_t adc_sat = 1023; // dynamic range (10 bits)
+//const Float_t dyn_range = 2000.; // output dynamic range (mV)
+
+
class AliTPCParam : public TObject {
//////////////////////////////////////////////////////
//set cosinus and sinus of rotation angles for sector isec
Int_t GetNRowLow() const; //get the number of pad rows in low sector
Int_t GetNRowUp() const; //get the number of pad rows in up sector
- Int_t GetNRow(Int_t isec) {return ((isec<25) ? fnRowLow:fnRowUp);}
+ Int_t GetNRow(Int_t isec) {return ((isec<fNInnerSector) ? fnRowLow:fnRowUp);}
//get the nuber of pad row in given sector
Float_t GetPadRowRadiiLow(Int_t irow) const; //get the pad row (irow) radii
Float_t GetPadRowRadiiUp(Int_t irow) const; //get the pad row (irow) radii
Float_t GetPadRowRadii(Int_t isec,Int_t irow) const {
- return ( (isec < 25) ?GetPadRowRadiiLow(irow):GetPadRowRadiiUp(irow));}
+ return ( (isec < fNInnerSector) ?GetPadRowRadiiLow(irow):GetPadRowRadiiUp(irow));}
//retrun raii of the pad row irow in sector i
Int_t GetNPadsLow(Int_t irow) const; //get the number of pads in row irow
Int_t GetNPadsUp(Int_t irow) const; //get the number of pads in row irow
Int_t GetNPads(Int_t isector,Int_t irow){
- return ( (isector < 25) ?GetNPadsLow(irow) : GetNPadsUp(irow));}
+ return ( (isector < fNInnerSector) ?GetNPadsLow(irow) : GetNPadsUp(irow));}
//get the number of pads in given sector and row
// Int_t GetNPads(Int_t isector, Int_t irow) const;
//get the number of pads in sector isector and row irow
void SetOuterRadiusLow(Float_t OuterRadiusLow ){ fOuterRadiusLow=OuterRadiusLow;}
void SetInnerRadiusUp(Float_t InnerRadiusUp){ fInnerRadiusUp= InnerRadiusUp;}
void SetOuterRadiusUp(Float_t OuterRadiusUp){ fOuterRadiusUp= OuterRadiusUp;}
+
+ void SetSectorAngles(Float_t innerangle, Float_t innershift, Float_t outerangle,
+ Float_t outershift,Bool_t inDegree=kTRUE);
+
+ void SetInSecLowEdge(Float_t isle){fInSecLowEdge=isle;}
+ void SetInSecUpEdge(Float_t isue){fInSecUpEdge=isue;}
+ void SetOuSecLowEdge(Float_t osle){fOuSecLowEdge=osle;}
+ void SetOuSecUpEdge(Float_t osue){fOuSecUpEdge=osue;}
+
+ void SetEdge(Float_t edge){fEdge = edge;}
+ void SetDeadZone(Float_t zone){fDeadZone = zone;}
+
void SetPadPitchLength(Float_t PadPitchLength){ fPadPitchLength=PadPitchLength;}
void SetPadPitchWidth(Float_t PadPitchWidth){ fPadPitchWidth = PadPitchWidth;}
Float_t GetInnerRadiusUp(){return fInnerRadiusUp;}
Float_t GetOuterRadiusUp(){return fOuterRadiusUp;}
+ Float_t GetInnerAngle(){return fInnerAngle;}
+ Float_t GetInnerAngleShift(){return fInnerAngleShift;}
+ Float_t GetOuterAngle(){return fOuterAngle;}
+ Float_t GetOuterAngleShift(){return fOuterAngleShift;}
+ Int_t GetNInnerSector(){return fNInnerSector;}
+ Int_t GetNOuterSector(){return fNOuterSector;}
+ Int_t GetNSector(){return fNSector;}
+
+ Float_t GetInSecLowEdge(){return fInSecLowEdge;}
+ Float_t GetInSecUpEdge(){return fInSecUpEdge;}
+ Float_t GetOuSecLowEdge(){return fOuSecLowEdge;}
+ Float_t GetOuSecUpEdge(){return fOuSecUpEdge;}
+
+ Float_t GetEdge(){return fEdge;}
+ Float_t GetDeadZone(){return fDeadZone;}
+
Float_t GetPadPitchLength(){return fPadPitchLength;}
Float_t GetPadPitchWidth(){return fPadPitchWidth;}
Float_t GetPadLength(){return fPadLength;}
Int_t GetNWires(){return fnWires;}
Float_t GetWWPitch(){return fWWPitch;}
Int_t GetZeroSup(){return fZeroSup;}
-
+ Int_t GetMaxTBin(){return fMaxTBin;}
private :
Bool_t fbStatus; //indicates consistency of the data
Float_t fInnerRadiusUp; // upper radius of inner sector
Float_t fOuterRadiusUp; // upper radius of outer sector
+ Float_t fInnerAngle; //opening angle of Inner sector
+ Float_t fInnerAngleShift; //shift of first inner sector center to the 0
+ Float_t fOuterAngle; //opening angle of outer sector
+ Float_t fOuterAngleShift; //shift of first sector center to the 0
+
+ Int_t fNInnerSector; //!number of inner sectors
+ Int_t fNOuterSector; //!number of outer sectors
+ Int_t fNSector; //! total number of sectors
+
+ Float_t fInSecLowEdge; // inner sector lower edge
+ Float_t fInSecUpEdge; // inner sector upper edge
+ Float_t fOuSecLowEdge; // outer sector lower edge
+ Float_t fOuSecUpEdge; // outer sector upper edge
+
+ Float_t fEdge; // thickness of the sector edge
+ Float_t fDeadZone; // dead zone due to the sector mounting etc.
+
+ //---------------------------------------------------------------------
+ // ALICE TPC pad parameters
+ //--------------------------------------------------------------------
Float_t fPadPitchLength; //pad pitch length
Float_t fPadPitchWidth; //pad pitch width
Float_t fPadLength; //pad length
Float_t fTSample; // sampling time
Float_t fZWidth; //derived value calculated using TSample and driftw
Float_t fTSigma; // width of the Preamp/Shaper function
+ Int_t fMaxTBin; //maximum time bin number
//--------------------------------------------------------
//
Int_t fNtRows; //total number of rows in TPC
};
+/////////////////////////////////////////////////////////////////////////////
+//
+//---------------------------------------------------------------------
+// ALICE TPC Cluster Parameters
+//--------------------------------------------------------------------
+//
+//
+// Sigma rphi
+/*const Float_t a_rphi=0.41818e-2;
+const Float_t b_rphi=0.17460e-4;
+const Float_t c_rphi=0.30993e-2;
+const Float_t d_rphi=0.41061e-3;
+// Sigma z
+const Float_t a_z=0.39614e-2;
+const Float_t b_z=0.22443e-4;
+const Float_t c_z=0.51504e-1;
+// Cluster width in rphi
+const Float_t ac_rphi=0.18322;
+const Float_t bc_rphi=0.59551e-3;
+const Float_t cc_rphi=0.60952e-1;
+// Cluster width in z
+const Float_t ac_z=0.19081;
+const Float_t bc_z=0.55938e-3;
+const Float_t cc_z=0.30428;
+*/
#include "AliMC.h"
#include "AliConst.h"
+#include "AliTPCParam.h"
+#include "AliTPCD.h"
+
ClassImp(AliTPCv0)
//_____________________________________________________________________________
*/
//End_Html
- Int_t *idtmed = fIdtmed->GetArray()-399;
+ AliTPCParam * fTPCParam = &(fDigParam->GetParam());
- Float_t tana, rlsl, wlsl, rssl, rlsu, wssl, wlsu,
- rssu, wssu, alpha, x, y, sec_thick;
-
- Float_t x1, z0, z1, x2, theta1, theta2, theta3, dm[21];
- Int_t il, iu;
- Float_t z_side;
+ Int_t *idtmed = fIdtmed->GetArray();
+
+ Float_t dm[21];
Int_t idrotm[100];
-
- Float_t x0l, x0u;
- Int_t idr;
- //Float_t thl, thu;
- Float_t opl, opu, phi1, phi2, phi3;
-
+
+ Int_t nRotMat = 0;
+
+
// ----------------------------------------------------
- // FIELD CAGE WITH ENDCAPS - CARBON FIBER
+ // FIELD CAGE WITH ENDCAPS - G10
// THIS IS ALSO A TPC MOTHER VOLUME
// ----------------------------------------------------
+
dm[0] = 76.;
dm[1] = 278.;
dm[2] = 275.;
-
- gMC->Gsvolu("TPC ", "TUBE", idtmed[407], dm, 3);
- // -------------------------------------------------------
- // drift gas Ne/CO2 (90/10 volume) - nonsensitive
- // field cage thickness = 0.52% X0
- // ----------------------------------------------------
- dm[0] = 76.+0.09776;
- dm[1] = 257.;
+
+ gMC->Gsvolu("TPC ", "TUBE", idtmed[8], dm, 3);
+
+ //-----------------------------------------------------
+ // Endcap cover c-fibre 0.86% X0
+ //-----------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
+ dm[2] = 0.95;
+
+ gMC->Gsvolu("TPEC","TUBE",idtmed[10],dm,3);
+
+ //-----------------------------------------------------
+ // Drift gas , leave 2 cm at the outer radius
+ // and inner raddius
+ //-----------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
dm[2] = 250.;
- gMC->Gsvolu("TGAS", "TUBE", idtmed[402], dm, 3);
- // ------------------------------------------------------
- // "side" gas volume (the same as drift gas)
- // here the readout chambers are positioned
- // ------------------------------------------------------
- dm[2] = 0.5*(275.-250.);
- z_side = dm[2];
-
- gMC->Gsvolu("TPSG", "TUBE", idtmed[401], dm, 3);
- // ------------------------------------------------------
- // HV midplane - 20 microns of mylar
- // -----------------------------------------------------
- dm[2] = .001;
-
- gMC->Gsvolu("TPHV", "TUBE", idtmed[405], dm, 3);
-
- // ====================================================
- // lower and upper readout chambers
- // ====================================================
- // sectros opening angles in degrees
- // ---------------------------------------------------
- opl = 30.;
- opu = 15.;
- //thl = TMath::Tan(opl * .5 * kDegrad);
- //thu = TMath::Tan(opu * .5 * kDegrad);
- // ---------------------------------------------------
- // S and L-sectors radii
- // ---------------------------------------------------
- rssl = 88.;
- rssu = 136.;
- rlsl = 142.;
- rlsu = 250.;
- // --------------------------------------------------
- // Sectors widths
- // --------------------------------------------------
- wssl = 46.5;
- wssu = 72.2;
- wlsl = 37.;
- wlsu = 65.4;
- // ---------------------------------------------------
- // Sector thickness 25% of X0 (Al)
- // ---------------------------------------------------
- sec_thick = 2.225;
- // ---------------------------------------------------
- // S-sectors readout chambers (lower sectors)
- // ---------------------------------------------------
- dm[0] = wssl * .5;
- dm[1] = wssu * .5;
- dm[2] = sec_thick * .5;
- dm[3] = (rssu - rssl) * .5;
-
- x0l = rssl + dm[3];
-
- gMC->Gsvolu("TRCS", "TRD1", idtmed[399], dm, 4);
- // ---------------------------------------------------
- // L-sectors readout chambers (upper sectors)
- // ---------------------------------------------------
- dm[0] = wlsl * .5;
- dm[1] = wlsu * .5;
- dm[2] = sec_thick * .5;
- dm[3] = (rlsu - rlsl) * .5;
-
- x0u = rlsl + dm[3];
-
- gMC->Gsvolu("TRCL", "TRD1", idtmed[399], dm, 4);
- // ----------------------------------------------------
- // positioning of the S-sector readout chambers
- // rotation matices 1-12
- // ----------------------------------------------------
- z1 = -z_side + sec_thick * .5;
+ gMC->Gsvolu("TGAS", "TUBE", idtmed[3], dm, 3);
+
+
+ //------------------------------------------------------
+ // membrane holder - carbon fiber
+ //------------------------------------------------------
+
+
+ gMC->Gsvolu("TPMH","TUBE",idtmed[6],dm,0);
+
+ dm[0] = 252.;
+ dm[1] = 258.;
+ dm[2] = 0.2;
- for (il = 1; il <= 12; ++il) {
- phi1 = (il - 1) * opl + 270.;
- if (phi1 > 360.) {
- phi1 += -360.;
- }
+ gMC->Gsposp("TPMH",1,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
+
+ dm[0] = 78.;
+ dm[2] = 82.;
+ dm[2] = 0.1;
+
+ gMC->Gsposp("TPMH",2,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
+
+ //----------------------------------------------------------
+ // HV membrane - 25 microns of mylar
+ //----------------------------------------------------------
+
+ dm[0] = 82.;
+ dm[1] = 252.;
+ dm[2] = 0.00125;
+
+ gMC->Gsvolu("TPHV","TUBE",idtmed[5],dm,3);
+
+ gMC->Gspos("TPHV",1,"TGAS",0.,0.,0.,0,"ONLY");
+
+ gMC->Gspos("TGAS",1,"TPC ",0.,0.,0.,0,"ONLY");
+
+ //----------------------------------------------------------
+ // "side" gas volume, the same as the drift gas
+ // the readout chambers are placed there.
+ //----------------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
+ dm[2] = 0.5*(275. - 250.);
+
+ gMC->Gsvolu("TPSG", "TUBE", idtmed[2], dm, 3);
+
+ Float_t z_side = dm[2]; // 1/2 of the side gas thickness
+
+ //-----------------------------------------------------------
+ // Readout chambers , 25% of X0, I use Al as the material
+ //-----------------------------------------------------------
+
+ Float_t InnerOpenAngle = fTPCParam->GetInnerAngle();
+ Float_t OuterOpenAngle = fTPCParam->GetOuterAngle();
+
+ Float_t InnerAngleShift = fTPCParam->GetInnerAngleShift();
+ Float_t OuterAngleShift = fTPCParam->GetOuterAngleShift();
+
+
+ Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
+ Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
+
+
+ Float_t InSecLowEdge = fTPCParam->GetInSecLowEdge();
+ Float_t InSecUpEdge = fTPCParam->GetInSecUpEdge();
+
+ Float_t OuSecLowEdge = fTPCParam->GetOuSecLowEdge();
+ Float_t OuSecUpEdge = fTPCParam->GetOuSecUpEdge();
+
+ Float_t SecThick = 2.225; // Al
+
+ Float_t edge = fTPCParam->GetEdge();
+
+ // S (Inner) sectors
+
+ dm[0] = InSecLowEdge*TMath::Tan(0.5*InnerOpenAngle)-edge;
+ dm[1] = InSecUpEdge*TMath::Tan(0.5*InnerOpenAngle)-edge;
+ dm[2] = SecThick;
+ dm[3] = 0.5*(InSecUpEdge-InSecLowEdge);
+
+ Float_t xCenterS = InSecLowEdge+dm[3];
+
+ gMC->Gsvolu("TRCS", "TRD1", idtmed[0], dm, 4);
+
+ // L (Outer) sectors
+
+ dm[0] = OuSecLowEdge*TMath::Tan(0.5*OuterOpenAngle)-edge;
+ dm[1] = OuSecUpEdge*TMath::Tan(0.5*OuterOpenAngle)-edge;
+ dm[2] = SecThick;
+ dm[3] = 0.5*(OuSecUpEdge-OuSecLowEdge);
+
+ Float_t xCenterL = OuSecLowEdge+dm[3];
+
+ gMC->Gsvolu("TRCL", "TRD1", idtmed[0], dm, 4);
+
+ Float_t z1 = -z_side + SecThick*0.5;
+
+ //------------------------------------------------------------------
+ // Positioning of the S-sector readout chambers
+ //------------------------------------------------------------------
+
+ Int_t ns;
+ Float_t theta1,theta2,theta3;
+ Float_t phi1,phi2,phi3;
+ Float_t alpha;
+ Float_t x,y;
+
+ for(ns=0;ns<nInnerSector;ns++){
+
+ phi1 = ns * InnerOpenAngle + 270.*kDegrad + InnerAngleShift;
+ phi1 *= kRaddeg; // in degrees
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+
+ if (phi1 > 360.) phi1 -= 360.;
+
theta1 = 90.;
phi2 = 90.;
theta2 = 180.;
- phi3 = (il - 1) * opl;
+ phi3 = ns * InnerOpenAngle + InnerAngleShift;
+ phi3 *= kRaddeg; // in degrees
+
+ phi3 = (Float_t)TMath::Nint(phi3);
+
+ if(phi3 > 360.) phi3 -= 360.;
+
theta3 = 90.;
+
+ alpha = phi3*kDegrad;
+
+ x = xCenterS * TMath::Cos(alpha);
+ y = xCenterS * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+ gMC->Gspos("TRCS", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
+
+ nRotMat++;
+
+ }
- idr = il;
+ //-------------------------------------------------------------------
+ // Positioning of the L-sectors readout chambers
+ //-------------------------------------------------------------------
- alpha = (il - 1) * opl * kDegrad;
- x = x0l * TMath::Cos(alpha);
- y = x0l * TMath::Sin(alpha);
+ for(ns=0;ns<nOuterSector;ns++){
+ phi1 = ns * OuterOpenAngle + 270.*kDegrad + OuterAngleShift;
+ phi1 *= kRaddeg; // in degrees
+
+ phi1 = (Float_t)TMath::Nint(phi1);
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TRCS", il, "TPSG", x, y, z1, idrotm[idr], "ONLY");
- }
- // ----------------------------------------------------
- // positioning of the L-sector readout chambers
- // rotation matices 13-36
- // ----------------------------------------------------
- for (iu = 1; iu <= 24; ++iu) {
- phi1 = (iu - 1) * opu + 270.;
- if (phi1 > 360.) {
- phi1 += -360.;
- }
+
+ if (phi1 > 360.) phi1 -= 360.;
+
theta1 = 90.;
phi2 = 90.;
theta2 = 180.;
- phi3 = (iu - 1) * opu;
+ phi3 = ns * OuterOpenAngle+OuterAngleShift;
+ phi3 *= kRaddeg; // in degrees
+
+ phi3 = (Float_t)TMath::Nint(phi3);
+
+
+ if(phi3 > 360.) phi3 -= 360.;
+
theta3 = 90.;
-
- idr = iu + 12;
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
-
- alpha = (iu - 1) * opu * kDegrad;
- x = x0u * TMath::Cos(alpha);
- y = x0u * TMath::Sin(alpha);
-
- gMC->Gspos("TRCL", iu, "TPSG", x, y, z1, idrotm[idr], "ONLY");
+
+ alpha = phi3*kDegrad;
+
+ x = xCenterL * TMath::Cos(alpha);
+ y = xCenterL * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+
+ gMC->Gspos("TRCL", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
+
+ nRotMat++;
+
}
- // --------------------------------------------------------
- // Spoke wheel structures
- // --------------------------------------------------------
- gMC->Gsvolu("TSWS", "TUBE", idtmed[399], dm, 0);
-
- z0 = -z_side + 2.;
-
- dm[0] = 82.;
- dm[1] = 86.;
- dm[2] = 1.;
-
- gMC->Gsposp("TSWS", 1, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- dm[0] = 253.;
- dm[1] = 257.;
-
- gMC->Gsposp("TSWS", 2, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- dm[0] = 140.9;
- dm[1] = 141.9;
-
- gMC->Gsposp("TSWS", 3, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- // -------------------------------------------------------
- // this volumes are to avoid overlaping
- // -------------------------------------------------------
- z0 = 253.;
-
- dm[0] = 76.;
- dm[1] = 76.+0.09776;
-
- gMC->Gsposp("TSWS", 4, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 5, "TPC ", 0, 0, -z0,0, "ONLY", dm, 3);
-
- z0 += 21.;
-
- gMC->Gsposp("TSWS", 6, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 7, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
-
- dm[0] = 257.;
- dm[1] = 257.+0.09776;
- dm[2] = 11.5;
-
- z0 = 263.5;
-
- gMC->Gsposp("TSWS", 8, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 9, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
+
+ Float_t z0 = z_side - 0.95;
+
+ gMC->Gspos("TPEC",1,"TPSG",0.,0.,z0,0,"ONLY");
+
// ==========================================================
// wheels
// ==========================================================
+
+ //
+ // auxilary structures
+ //
+
+
+ gMC->Gsvolu("TPWI","TUBE",idtmed[24],dm,0); // "air"
+
// ----------------------------------------------------------
// Large wheel -> positioned in the TPC
// ----------------------------------------------------------
- dm[0] = 257.+0.09776;
+
+
+ z0 = 263.5; // TPC length - 1/2 spoke wheel width
+
+ dm[0] = 258.;
dm[1] = 278.;
dm[2] = 11.5;
- gMC->Gsvolu("TPW1", "TUBE", idtmed[399], dm, 3);
- dm[0] = 259.;
+ gMC->Gsvolu("TPWL", "TUBE", idtmed[0], dm, 3);
+
+ dm[0] = dm[0]+2.;
+ dm[1] = 278.;
+ dm[2] = dm[2]-2.;
+
+ gMC->Gsposp("TPWI",1,"TPWL",0.,0.,0.,0,"ONLY",dm,3);
+
+ gMC->Gspos("TPWL", 1, "TPC ", 0, 0, z0, 0, "ONLY");
+ gMC->Gspos("TPWL", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
+
+ //
+ // Outer vessel + CO2 HV degrader
+ //
+
+ dm[0] = 260.;
+ dm[1] = 278.;
+ dm[2] = 252.;
+
+ gMC->Gsvolu("TPCO","TUBE",idtmed[12],dm,3);
+
+ dm[0] = 275.;
dm[1] = 278.;
- dm[2] = 9.5;
-
- gMC->Gsvolu("TPW2", "TUBE", idtmed[498], dm, 3);
-
- gMC->Gspos("TPW2", 1, "TPW1", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TPW1", 1, "TPC ", 0, 0, z0, 0, "ONLY");
- gMC->Gspos("TPW1", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
- // -----------------------------------------------------------
- // Small wheel -> positioned in the TPSG
- // -----------------------------------------------------------
- dm[0] = 76.+0.09776;
+ gMC->Gsvolu("TPOV","TUBE",idtmed[10],dm,3);
+
+ gMC->Gspos("TPOV",1,"TPCO",0.,0.,0.,0,"ONLY");
+
+
+ // G10 plugs
+
+ dm[0] = 258.;
+ dm[1] = 260.;
+ dm[2] = 1.;
+
+ gMC->Gsvolu("TPG1","TUBE",idtmed[8],dm,3);
+ gMC->Gspos("TPG1",1,"TPCO",0.,0.,251.,0,"ONLY");
+ gMC->Gspos("TPG1",2,"TPCO",0.,0.,-251.,0,"ONLY");
+
+ gMC->Gspos("TPCO",1,"TPC ",0.,0.,0.,0,"ONLY");
+
+
+ //----------------------------------------------------------
+ // Small wheel -> positioned in "side gas
+ //----------------------------------------------------------
+
+ dm[0] = 78.;
dm[1] = 82.;
dm[2] = 11.5;
+
+ gMC->Gsvolu("TPWS", "TUBE", idtmed[0], dm, 3);
+
+ dm[0] = 78.;
+ dm[1] = dm[1]-2;
+ dm[2] = dm[2]-2.;
+
+ gMC->Gsvolu("TPW1", "TUBE", idtmed[2], dm, 3);
- gMC->Gsvolu("TPW3", "TUBE", idtmed[399], dm, 3);
-
- dm[0] = 76.+0.09776;
- dm[1] = 80.;
+ gMC->Gspos("TPW1", 1, "TPWS", 0., 0., 0., 0, "ONLY");
+
+ z0 = 1.; // spoke wheel is shifted w.r.t. center of the "side gas"
+
+ gMC->Gspos("TPWS", 1, "TPSG", 0, 0, z0, 0, "ONLY");
+
+
+ // to avoid overlaps
+
+ dm[0] = 76.;
+ dm[1] = 78.;
+ dm[2] = 11.5;
+
+ gMC->Gsvolu("TPS1","TUBE",idtmed[0],dm,3);
+
dm[2] = 9.5;
+
+ gMC->Gsvolu("TPS2","TUBE",idtmed[24],dm,3);
+
+ gMC->Gspos("TPS2",1,"TPS1",0.,0.,0.,0,"ONLY");
+
+ z0= 263.5;
- gMC->Gsvolu("TPW4", "TUBE", idtmed[401], dm, 3);
-
- gMC->Gspos("TPW4", 1, "TPW3", 0, 0, 0, 0, "ONLY");
-
- z0 = 1.;
-
- gMC->Gspos("TPW3", 1, "TPSG", 0, 0, z0, 0, "ONLY");
- // ---------------------------------------------------------
- // spokes, inner and outer, also the inner ring
- // ---------------------------------------------------------
- dm[0] = 0.5*(135.9-82.1);
- dm[1] = 3.;
+ gMC->Gspos("TPS1",1,"TPC ",0.,0.,z0,0,"ONLY");
+ gMC->Gspos("TPS1",2,"TPC ",0.,0.,-z0,0,"ONLY");
+
+ // G10 plug
+
+ dm[0] = 76.;
+ dm[2] = 78.;
+ dm[3] = 1.;
+
+ gMC->Gsvolu("TPG2","TUBE",idtmed[8],dm,3);
+
+ z0 = 251.;
+
+ gMC->Gspos("TPG2",1,"TPC ",0.,0.,z0,0,"ONLY");
+ gMC->Gspos("TPG2",2,"TPC ",0.,0.,-z0,0,"ONLY");
+
+
+ //---------------------------------------------------------
+ // central wheel 6 (radial direction) x 4 (along z) cm2
+ //---------------------------------------------------------
+
+ dm[0] = 140.;
+ dm[1] = 146.;
dm[2] = 2.;
-
- x1 = dm[0] + 82.;
-
- gMC->Gsvolu("TSPI", "BOX ", idtmed[399], dm, 3);
-
- dm[1] = 2.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSP1", "BOX ", idtmed[498], dm, 3);
- gMC->Gspos("TSP1", 1, "TSPI", 0, 0, 0, 0, "ONLY");
-
- dm[0] = 0.5*(256.9-142.1);
+ gMC->Gsvolu("TPWC","TUBE",idtmed[0],dm,3);
+
+ dm[0] = dm[0] + 2.;
+ dm[1] = dm[1] - 2.;
+ dm[2] = dm[2] - 1.;
+
+ gMC->Gsposp("TPWI",2,"TPWC",0.,0.,0.,0,"ONLY",dm,3);
+
+ z0 = z_side - 1.9 - 2.;
+
+ gMC->Gspos("TPWC",1,"TPSG",0.,0.,z0,0,"ONLY");
+
+ //
+
+ gMC->Gsvolu("TPSE","BOX ",idtmed[24],dm,0); // "empty" part of the spoke
+
+
+ //---------------------------------------------------------
+ // inner spokes (nSectorInner)
+ //---------------------------------------------------------
+
+ dm[0] = 0.5*(139.9-82.1);
dm[1] = 3.;
dm[2] = 2.;
-
- x2 = dm[0] + 142.;
-
- gMC->Gsvolu("TSPO", "BOX ", idtmed[399], dm, 3);
-
- dm[1] = 2.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSP2", "BOX ", idtmed[498], dm, 3);
-
- gMC->Gspos("TSP2", 1, "TSPO", 0, 0, 0, 0, "ONLY");
- // --------------------------------------------------------
- dm[0] = 136.;
- dm[1] = 142.;
- dm[2] = 2.;
-
- gMC->Gsvolu("TSWH", "TUBE", idtmed[399], dm, 3);
-
- dm[0] = 137.;
- dm[1] = 141.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSW1", "TUBE", idtmed[498], dm, 3);
-
- gMC->Gspos("TSW1", 1, "TSWH", 0, 0, 0, 0, "ONLY");
-
- z0 = z_side - .16168 - 2.;
- // --------------------------------------------------------
- gMC->Gspos("TSWH", 1, "TPSG", 0, 0, z0, 0, "ONLY");
- // -------------------------------------------------------
- // posiioning of the inner spokes
- // -------------------------------------------------------
- for (il = 1; il <= 6; ++il) {
- phi1 = opl * .5 + (il - 1) * 2. * opl;
- theta1 = 90.;
- phi2 = opl * .5 + 90. + (il - 1) * 2. * opl;
- if (phi2 > 360.) {
- phi2 += -360.;
- }
- theta2 = 90.;
- phi3 = 0.;
- theta3 = 0.;
-
+
+ Float_t x1 = dm[0]+82.;
+
+ gMC->Gsvolu("TPSI","BOX",idtmed[0],dm,3);
+
+ dm[1] = dm[1]-1.;
+ dm[2] = dm[2]-1.;
+
+ gMC->Gsposp("TPSE",1,"TPSI",0.,0.,0.,0,"ONLY",dm,3);
+
+ for(ns=0;ns<nInnerSector;ns++){
+
+ phi1 = 0.5*InnerOpenAngle + ns*InnerOpenAngle + InnerAngleShift;
+ theta1=90.;
+ phi1 *=kRaddeg;
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+
+ phi2 = phi1+90.;
+ if(phi2>360.) phi2 -= 360.;
+ theta2=90.;
+ phi3=0.;
+ theta3=0.;
+
alpha = phi1 * kDegrad;
x = x1 * TMath::Cos(alpha);
- y = x1 * TMath::Sin(alpha);
-
- idr = il + 36;
-
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TSPI", il, "TPSG", x, y, z0, idrotm[idr], "ONLY");
-
+ y = x1 * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
+
+ gMC->Gspos("TPSI",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
}
-
- for (iu = 1; iu <= 12; ++iu) {
- phi1 = opu * .5 + (iu - 1) * 2. * opu;
- theta1 = 90.;
- phi2 = opu * .5 + 90. + (iu - 1) * 2. * opu;
- if (phi2 > 360.) {
- phi2 += -360.;
- }
- theta2 = 90.;
- phi3 = 0.;
- theta3 = 0.;
-
+
+ //-------------------------------------------------------------
+ // outer spokes (nSectorOuter)
+ //-------------------------------------------------------------
+
+ dm[0] = 0.5*(257.9-146.1);
+ dm[1] = 3.;
+ dm[2] = 2.;
+
+ x1 = dm[0] + 146.;
+
+ gMC->Gsvolu("TPSO","BOX ",idtmed[0],dm,3);
+
+ dm[1] = dm[1] - 1.;
+ dm[2] = dm[2] - 1.;
+
+ gMC->Gsposp("TPSE",2,"TPSO",0.,0.,0.,0,"ONLY",dm,3);
+
+ for(ns=0;ns<nOuterSector;ns++){
+
+ phi1 = 0.5*OuterOpenAngle + ns*OuterOpenAngle + OuterAngleShift;
+ theta1=90.;
+ phi1 *=kRaddeg;
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+
+ phi2 = phi1+90.;
+ if(phi2>360.) phi2 -= 360.;
+ theta2=90.;
+ phi3=0.;
+ theta3=0.;
+
alpha = phi1 * kDegrad;
- x = x2 * TMath::Cos(alpha);
- y = x2 * TMath::Sin(alpha);
-
- idr = iu + 42;
-
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TSPO", iu, "TPSG", x, y, z0, idrotm[idr], "ONLY");
- }
- // --------------------------------------------------------
- // endcap cover (C, 0.86% X0)
- // --------------------------------------------------------
- dm[0] = 76.+0.09776;
- dm[1] = 257.;
- dm[2] = 0.16168*0.5;
-
- gMC->Gsvolu("TCOV", "TUBE", idtmed[407], dm, 3);
+ x = x1 * TMath::Cos(alpha);
+ y = x1 * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
+
+ gMC->Gspos("TPSO",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
+ }
- z0 = z_side - dm[2];
+
- gMC->Gspos("TCOV", 1, "TPSG", 0, 0, z0, 0, "ONLY");
// --------------------------------------------------------
// put the readout chambers into the TPC
// --------------------------------------------------------
+
theta1 = 90.;
phi1 = 0.;
theta2 = 90.;
theta3 = 180.;
phi3 = 0.;
- AliMatrix(idrotm[55], theta1, phi1, theta2, phi2, theta3, phi3);
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
z0 = z_side + 250.;
gMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
- gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[55], "ONLY");
- // ---------------------------------------------------------
- // outer gas insulation (CO2)
- // ---------------------------------------------------------
- dm[0] = 257.+0.09776;
- dm[1] = 278.-0.25004;
- dm[2] = 275.-23.;
-
- gMC->Gsvolu("TPOI", "TUBE", idtmed[406], dm, 3);
-
- gMC->Gspos("TPHV", 1, "TGAS", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TGAS", 1, "TPC ", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TPOI", 1, "TPC ", 0, 0, 0, 0, "ONLY");
+ gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[nRotMat], "ONLY");
gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
- // ======================================================
- // all volumes below are positioned in ALIC
- // ======================================================
- // ------------------------------------------------------
- // the last parts of the smaller wheel (TSWS)
- // ------------------------------------------------------
- dm[0] = 74.;
- dm[1] = 76.;
- dm[2] = 1.;
-
- z0 = 253.;
-
- gMC->Gsposp("TSWS", 10, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 11, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
-
- dm[0] = 70.;
-
- z0 += 21.;
-
- gMC->Gsposp("TSWS", 12, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 13, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
- // ----------------------------------------------------
- // Inner vessel (PCON)
- // This volume is to be positioned directly in ALIC
- // ----------------------------------------------------
+
+ //----------------------------------------------------
+ // Inner vessel and HV degrader
+ //----------------------------------------------------
+
dm[0] = 0.;
dm[1] = 360.;
dm[2] = 4.;
dm[3] = -250.;
- dm[4] = 75.;
+ dm[4] = 74.4;
dm[5] = 76.;
-
+
dm[6] = -64.5;
dm[7] = 50.;
dm[8] = 76.;
-
- dm[9] = 64.5;
+
+ dm[9] = -64.5;
dm[10] = 50.;
dm[11] = 76.;
-
+
dm[12] = 250.;
- dm[13] = 75.;
+ dm[13] = 74.4;
dm[14] = 76.;
-
- gMC->Gsvolu("TPIV", "PCON", idtmed[407], dm, 15);
- // --------------------------------------------------------
- // fill the inner vessel with CO2, (HV kDegrader)
- // cone parts have different thickness
- // than the central barrel, according to the TP
- // --------------------------------------------------------
- tana = 75./185.5;
-
+
+ gMC->Gsvolu("TPVD", "PCON", idtmed[12], dm, 15); // CO2
+
+ // cone parts
+
dm[0] = 0.;
dm[1] = 360.;
- dm[2] = 6.;
-
- dm[3] = -(250.-0.2162);
- dm[4] = (185.5-0.2126)*tana+0.2126;
- dm[5] = 76-0.001;
-
- dm[6] = -64.5;
- dm[7] = 50.+0.2162;
- dm[8] = 76-0.001;
-
- dm[9] = -64.5;
- dm[10] = 50+0.05076;
- dm[11] = 76-0.001;
-
- dm[12] = 64.5;
- dm[13] = 50+0.05076;
- dm[14] = 76-0.001;
-
- dm[15] = 64.5;
- dm[16] = 50.+0.2162;
- dm[17] = 76-0.001;
-
- dm[18] = (250.-0.2162);
- dm[19] = (185.5-0.2126)*tana+0.2126;
- dm[20] = 76-0.001;
-
- gMC->Gsvolu("TPVD", "PCON", idtmed[406], dm, 21);
+ dm[2] = 2.;
+
+ dm[3] = 64.5;
+ dm[4] = 50.;
+ dm[5] = 51.6;
+
+ dm[6] = 250.;
+ dm[7] = 74.4;
+ dm[8] = 76.;
+
+
+ gMC->Gsvolu("TIVC","PCON",idtmed[11],dm,9); // C-fibre
+
+ gMC->Gspos("TIVC",1,"TPVD",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("TIVC",2,"TPVD",0.,0.,0.,idrotm[nRotMat],"ONLY");
+
+ // barrel part
+
+ dm[0] = 50.;
+ dm[1] = 50.5;
+ dm[2] = 32.25;
+
+ gMC->Gsvolu("TIVB","TUBE",idtmed[9],dm,3);
+
+ gMC->Gspos("TIVB",1,"TPVD",0.,0.,0.,0,"ONLY");
+
+ gMC->Gspos("TPVD",1,"ALIC",0.,0.,0.,0,"ONLY");
+
- gMC->Gspos("TPVD", 1, "TPIV", 0, 0, 0, 0, "ONLY");
+
- gMC->Gspos("TPIV", 1, "ALIC", 0, 0, 0, 0, "ONLY");
+
// ---------------------------------------------------
// volumes ordering
// ---------------------------------------------------
gMC->Gsord("TPSG", 6);
-}
+
+} // end of function
+
//_____________________________________________________________________________
void AliTPCv0::CreateMaterials()
gMC->Gsatt("TGAS","SEEN",0);
gMC->Gsatt("TPSG","SEEN",0);
gMC->Gsatt("TPHV","SEEN",1);
+ gMC->Gsatt("TPMH","SEEN",1);
+ gMC->Gsatt("TPEC","SEEN",0);
gMC->Gsatt("TRCS","SEEN",1);
gMC->Gsatt("TRCL","SEEN",1);
- gMC->Gsatt("TSWS","SEEN",1);
+ gMC->Gsatt("TPWL","SEEN",1);
+ gMC->Gsatt("TPWI","SEEN",1);
+ gMC->Gsatt("TPWS","SEEN",1);
gMC->Gsatt("TPW1","SEEN",1);
- gMC->Gsatt("TPW2","SEEN",1);
- gMC->Gsatt("TPW3","SEEN",1);
- gMC->Gsatt("TPW4","SEEN",1);
- gMC->Gsatt("TSPI","SEEN",1);
- gMC->Gsatt("TSP1","SEEN",0);
- gMC->Gsatt("TSPO","SEEN",1);
- gMC->Gsatt("TSP2","SEEN",0);
- gMC->Gsatt("TSWH","SEEN",1);
- gMC->Gsatt("TSW1","SEEN",1);
- gMC->Gsatt("TPOI","SEEN",1);
- gMC->Gsatt("TPIV","SEEN",1);
+ gMC->Gsatt("TPS1","SEEN",1);
+ gMC->Gsatt("TPS2","SEEN",1);
+ gMC->Gsatt("TPG1","SEEN",1);
+ gMC->Gsatt("TPG2","SEEN",1);
+ gMC->Gsatt("TPWC","SEEN",1);
+ gMC->Gsatt("TPSI","SEEN",1);
+ gMC->Gsatt("TPSO","SEEN",1);
+ gMC->Gsatt("TPCO","SEEN",1);
+ gMC->Gsatt("TPOV","SEEN",1);
gMC->Gsatt("TPVD","SEEN",1);
//
gMC->Gdopt("hide", "on");
*/
//End_Html
- Int_t *idtmed = fIdtmed->GetArray()-399;
+ AliTPCParam * fTPCParam = &(fDigParam->GetParam());
+ Int_t *idtmed = fIdtmed->GetArray();
- AliTPCParam * fTPCParam = &(fDigParam->GetParam());
-
- Float_t tana, rlsl, wlsl, rssl, rlsu, wssl, wlsu,
- rssu, wssu, alpha, x, y, z, sec_thick;
-
- Float_t r1, r2, x1, z0, z1, x2, theta1, theta2, theta3, dm[21];
- Int_t il, iu;
- Float_t z_side, zz;
+ Float_t dm[21];
Int_t idrotm[100];
-
- Float_t x0l, x0u;
- Int_t idr;
- Float_t thl;
- Int_t ils;
- Float_t opl;
- Int_t iss;
- Float_t thu, opu, phi1, phi2, phi3;
-
+
+ Int_t nRotMat = 0;
+
+
// ----------------------------------------------------
- // FIELD CAGE WITH ENDCAPS - CARBON FIBER
+ // FIELD CAGE WITH ENDCAPS - G10
// THIS IS ALSO A TPC MOTHER VOLUME
// ----------------------------------------------------
+
dm[0] = 76.;
dm[1] = 278.;
dm[2] = 275.;
-
- gMC->Gsvolu("TPC ", "TUBE", idtmed[407], dm, 3);
-
- // -------------------------------------------------------
- // drift gas Ne/CO2 (90/10 volume) - nonsensitive
- // field cage thickness = 0.52% X0
- // ----------------------------------------------------
-
- //Begin_Html
- /*
- <img src="picts/spec_tgas1.gif">
- */
- //End_Html
-
- dm[0] = 76.+0.09776;
- dm[1] = 257.;
+
+ gMC->Gsvolu("TPC ", "TUBE", idtmed[8], dm, 3);
+
+ //-----------------------------------------------------
+ // Endcap cover c-fibre 0.86% X0
+ //-----------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
+ dm[2] = 0.95;
+
+ gMC->Gsvolu("TPEC","TUBE",idtmed[10],dm,3);
+
+ //-----------------------------------------------------
+ // Drift gas , leave 2 cm at the outer radius
+ // and inner raddius
+ //-----------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
dm[2] = 250.;
-
- gMC->Gsvolu("TGAS", "TUBE", idtmed[402], dm, 3);
-
- // ------------------------------------------------------
- // "side" gas volume (the same as drift gas),
- // here the readout chambers are positioned
- // ------------------------------------------------------
-
- //Begin_Html
- /*
- <img src="picts/spec_tpsg1.gif">
- */
- //End_Html
-
- dm[2] = 12.5;
- z_side = dm[2];
-
- gMC->Gsvolu("TPSG", "TUBE", idtmed[401], dm, 3);
- // ------------------------------------------------------
- // HV midplane - 20 microns of mylar
- // -----------------------------------------------------
- dm[2] = .001;
-
- gMC->Gsvolu("TPHV", "TUBE", idtmed[405], dm, 3);
-
- // ====================================================
- // lower and upper readout chambers
- // ====================================================
- // sectors opening angles in degrees
- // ---------------------------------------------------
- opl = 30.;
- opu = 15.;
- thl = TMath::Tan(opl * .5 * kDegrad);
- thu = TMath::Tan(opu * .5 * kDegrad);
- // ---------------------------------------------------
- // S and L-sectors radii
- // ---------------------------------------------------
- rssl = 88.;
- rssu = 136.;
- rlsl = 142.;
- rlsu = 250.;
- // --------------------------------------------------
- // Sectors widths
- // --------------------------------------------------
- wssl = 46.5;
- wssu = 72.2;
- wlsl = 37.;
- wlsu = 65.4;
- // ---------------------------------------------------
- // Sector thickness 25% of X0 (Al)
- // ---------------------------------------------------
- sec_thick = 2.225;
- // ---------------------------------------------------
- // S-sectors (lower sectors)
- // ---------------------------------------------------
- dm[0] = wssl * .5;
- dm[1] = wssu * .5;
- dm[2] = sec_thick * .5;
- dm[3] = (rssu - rssl) * .5;
-
- x0l = rssl + dm[3];
-
- //Begin_Html
- /*
- <img src="picts/spec_trcs1.gif">
- */
- //End_Html
-
-
- gMC->Gsvolu("TRCS", "TRD1", idtmed[399], dm, 4);
- // -----------------------------------------------------
- // S-sectors --> "gas sectors"
- // -----------------------------------------------------
-
- //Begin_Html
- /*
- <img src="picts/spec_tsga1.gif">
- */
- //End_Html
- dm[2] = (250.-0.001)/2.;
- gMC->Gsvolu("TSGA", "TRD1", idtmed[402], dm, 4);
- // ---------------------------------------------------
- // L-sectors (upper sectors)
- // ---------------------------------------------------
- dm[0] = wlsl * .5;
- dm[1] = wlsu * .5;
- dm[2] = sec_thick * .5;
- dm[3] = (rlsu - rlsl) * .5;
-
- x0u = rlsl + dm[3];
-
- gMC->Gsvolu("TRCL", "TRD1", idtmed[399], dm, 4);
- // -----------------------------------------------------
- // L-sectors - "gas sectors"
- // -----------------------------------------------------
- dm[2] = (250.-0.001)/2.;
- gMC->Gsvolu("TLGA", "TRD1", idtmed[402], dm, 4);
- // -----------------------------------------------------
- // thin sensitive strips (100 microns) placed at a center
- // of each pad row in the "drift gas sector"
- // -----------------------------------------------------
- gMC->Gsvolu("TSST", "TRD1", idtmed[403], dm, 0);
-
- dm[3] = .005;
- z0 = rssl + (rssu - rssl) * .5;
+ gMC->Gsvolu("TGAS", "TUBE", idtmed[3], dm, 3);
+
+
+ //------------------------------------------------------
+ // membrane holder - carbon fiber
+ //------------------------------------------------------
+
+
+ gMC->Gsvolu("TPMH","TUBE",idtmed[6],dm,0);
+
+ dm[0] = 252.;
+ dm[1] = 258.;
+ dm[2] = 0.2;
+
+ gMC->Gsposp("TPMH",1,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
+
+ dm[0] = 78.;
+ dm[2] = 82.;
+ dm[2] = 0.1;
+
+ gMC->Gsposp("TPMH",2,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
+
+ //----------------------------------------------------------
+ // HV membrane - 25 microns of mylar
+ //----------------------------------------------------------
+
+ dm[0] = 82.;
+ dm[1] = 252.;
+ dm[2] = 0.00125;
+
+ gMC->Gsvolu("TPHV","TUBE",idtmed[5],dm,3);
+
+ gMC->Gspos("TPHV",1,"TGAS",0.,0.,0.,0,"ONLY");
+
+ gMC->Gspos("TGAS",1,"TPC ",0.,0.,0.,0,"ONLY");
+
+ //----------------------------------------------------------
+ // "side" gas volume, the same as the drift gas
+ // the readout chambers are placed there.
+ //----------------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
+ dm[2] = 0.5*(275. - 250.);
+
+ gMC->Gsvolu("TPSG", "TUBE", idtmed[2], dm, 3);
+
+ Float_t z_side = dm[2]; // 1/2 of the side gas thickness
+
+ //-----------------------------------------------------------
+ // Readout chambers , 25% of X0, I use Al as the material
+ //-----------------------------------------------------------
+
+ Float_t InnerOpenAngle = fTPCParam->GetInnerAngle();
+ Float_t OuterOpenAngle = fTPCParam->GetOuterAngle();
+
+ Float_t InnerAngleShift = fTPCParam->GetInnerAngleShift();
+ Float_t OuterAngleShift = fTPCParam->GetOuterAngleShift();
+
+
+ Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
+ Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
+
+
+ Float_t InSecLowEdge = fTPCParam->GetInSecLowEdge();
+ Float_t InSecUpEdge = fTPCParam->GetInSecUpEdge();
+
+ Float_t OuSecLowEdge = fTPCParam->GetOuSecLowEdge();
+ Float_t OuSecUpEdge = fTPCParam->GetOuSecUpEdge();
+
+ Float_t SecThick = 2.225; // Al
+
+ Float_t edge = fTPCParam->GetEdge();
+
+ // S (Inner) sectors
+
+ dm[0] = InSecLowEdge*TMath::Tan(0.5*InnerOpenAngle)-edge;
+ dm[1] = InSecUpEdge*TMath::Tan(0.5*InnerOpenAngle)-edge;
+ dm[2] = 0.5*SecThick;
+ dm[3] = 0.5*(InSecUpEdge-InSecLowEdge);
+
+ Float_t xCenterS = InSecLowEdge+dm[3];
+
+ gMC->Gsvolu("TRCS", "TRD1", idtmed[0], dm, 4);
+
+ // L (Outer) sectors
+
+ dm[0] = OuSecLowEdge*TMath::Tan(0.5*OuterOpenAngle)-edge;
+ dm[1] = OuSecUpEdge*TMath::Tan(0.5*OuterOpenAngle)-edge;
+ dm[2] = 0.5*SecThick;
+ dm[3] = 0.5*(OuSecUpEdge-OuSecLowEdge);
+
+ Float_t xCenterL = OuSecLowEdge+dm[3];
+
+ gMC->Gsvolu("TRCL", "TRD1", idtmed[0], dm, 4);
+
+ Float_t z1 = -z_side + SecThick*0.5;
+
+ //------------------------------------------------------------------
+ // S sectors - "gas sectors" (TRD1)
+ //------------------------------------------------------------------
+
+ dm[0] = InSecLowEdge*TMath::Tan(0.5*InnerOpenAngle)-0.01;
+ dm[1] = InSecUpEdge*TMath::Tan(0.5*InnerOpenAngle)-0.01;
+ dm[2] = 0.5*(250. - 0.001);
+ dm[3] = 0.5*(InSecUpEdge-InSecLowEdge);
+
+ gMC->Gsvolu("TSGA", "TRD1", idtmed[3], dm, 4); // nonsensitive
+
+ //------------------------------------------------------------------
+ // sensitive strips - "pad rows"
+ //------------------------------------------------------------------
+
+ Int_t ns;
+ Float_t r1,r2,zz;
+
+ Float_t StripThick = 0.01; // 100 microns
+ Float_t dead = fTPCParam->GetDeadZone();
+
+ gMC->Gsvolu("TSST", "TRD1", idtmed[4], dm, 0);
+
+ dm[2] = 0.5*(250. - 0.002);
+ dm[3] = 0.5 * StripThick;
+
- for (iss = 0; iss < fTPCParam->GetNRowLow(); ++iss) {
- r1 = fTPCParam->GetPadRowRadiiLow(iss);
- r2 = r1 + dm[3] * 2.;
- dm[0] = r1 * thl - 2.63;
- dm[1] = r2 * thl - 2.63;
+ // S-sector
- zz = -z0 + r1+dm[3];
+ for (ns = 0; ns < fTPCParam->GetNRowLow(); ns++) {
+
+ r1 = fTPCParam->GetPadRowRadiiLow(ns);
+ r2 = r1 + StripThick;
+ dm[0] = r1 * TMath::Tan(0.5*InnerOpenAngle) - dead;
+ dm[1] = r2 * TMath::Tan(0.5*InnerOpenAngle) - dead;
+
+ zz = -InSecLowEdge -0.5*(InSecUpEdge-InSecLowEdge);
+ zz += r1;
+ zz += dm[3];
+
+ gMC->Gsposp("TSST", ns+1, "TSGA", 0., 0., zz, 0, "ONLY", dm, 4);
+
- gMC->Gsposp("TSST", iss+1, "TSGA", 0, 0, zz, 0, "ONLY", dm, 4);
}
- // -----------------------------------------------------
- // thin sensitive strips (100 microns) placed at a center
- // of each pad row in the "drift gas sector"
- // -----------------------------------------------------
- gMC->Gsvolu("TLST", "TRD1", idtmed[403], dm, 0);
- z0 = rlsl+ (rlsu - rlsl) * .5;
-
- for (ils = 0; ils < fTPCParam->GetNRowUp(); ++ils) {
- r1 = fTPCParam->GetPadRowRadiiUp(ils);
- r2 = r1 + dm[3] * 2.;
- dm[0] = r1 * thu - 2.63;
- dm[1] = r2 * thu - 2.63;
+ //-----------------------------------------------------------------
+ // L sectors - "gas sectors" (PGON to avoid overlaps)
+ //-----------------------------------------------------------------
+
+ dm[0] = 360.*kDegrad - 0.5*OuterOpenAngle;
+ dm[0] *= kRaddeg;
+ dm[0] = (Float_t)TMath::Nint(dm[0]);
+
+ dm[1] = OuterOpenAngle*kRaddeg;
+ dm[1] = (Float_t)TMath::Nint(dm[1]);
+
+ dm[2] = 1.;
+ dm[3] = 4.;
+
+ dm[4] = 0.002;
+ dm[5] = OuSecLowEdge;
+ dm[6] = 252.*TMath::Cos(0.5*OuterOpenAngle)-0.002;
+
+ dm[7] = dm[4]+0.2;
+ dm[8] = dm[5];
+ dm[9] = dm[6];
+
+ dm[10] = dm[7];
+ dm[11] = OuSecLowEdge;
+ dm[12] = OuSecUpEdge;
+
+ dm[13] = 250.;
+ dm[14] = dm[11];
+ dm[15] = dm[12];
+
+ gMC->Gsvolu("TLGA","PGON",idtmed[3],dm,16);
+
+ //------------------------------------------------------------------
+ // sensitive strips - "pad rows"
+ //------------------------------------------------------------------
+
+ Float_t rmax = dm[6];
+
+ // L-sectors
+
+ gMC->Gsvolu("TLST", "PGON", idtmed[4], dm, 0);
+
+ dm[0] = 360.*kDegrad - 0.5*OuterOpenAngle;
+ dm[0] *= kRaddeg;
+ dm[0] = (Float_t)TMath::Nint(dm[0]);
+
+ dm[1] = OuterOpenAngle*kRaddeg;
+ dm[1] = (Float_t)TMath::Nint(dm[1]);
+
+ dm[2] = 1.;
+ dm[3] = 2.;
+
+ dm[7] = 250.;
+
+ Float_t xx = dead/TMath::Tan(0.5*OuterOpenAngle);
+
+ for(ns=0;ns<fTPCParam->GetNRowUp();ns++){
+
+ r1 = fTPCParam->GetPadRowRadiiUp(ns)-xx;
+ r2 = r1 + StripThick;
- zz = -z0 + r1 +dm[3];
+ dm[5] = r1;
+ dm[6] = r2;
+
+ dm[8] = r1;
+ dm[9] = r2;
+
+ if(r2+xx < rmax){
+ dm[4] = 0.002;
+ }
+ else{
+ dm[4] = 0.202;
+ }
+
+ gMC->Gsposp("TLST",ns+1,"TLGA",xx,0.,0.,0,"ONLY",dm,10);
- gMC->Gsposp("TLST", ils+1, "TLGA", 0, 0, zz, 0, "ONLY", dm, 4);
}
- // ------------------------------------------------
- // positioning of lower sectors (1-12)*2
- // rotation matrices 1-12
- // ------------------------------------------------
- z = (250.+0.001)/2.;
- z1 = -z_side + sec_thick * .5;
- for (il = 0; il < 12; ++il) {
- phi1 = il * opl + 270;
- if (phi1 > 360.) {
- phi1 += -360;
- }
+ //------------------------------------------------------------------
+ // Positioning of the S-sector readout chambers
+ //------------------------------------------------------------------
+
+ Float_t zs = 0.5*(250.+0.002);
+
+ Float_t theta1,theta2,theta3;
+ Float_t phi1,phi2,phi3;
+ Float_t alpha;
+ Float_t x,y;
+
+ for(ns=0;ns<nInnerSector;ns++){
+
+ phi1 = ns * InnerOpenAngle + 270.*kDegrad + InnerAngleShift;
+ phi1 *= kRaddeg; // in degrees
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+
+ if (phi1 > 360.) phi1 -= 360.;
+
theta1 = 90.;
phi2 = 90.;
theta2 = 180.;
- phi3 = il * opl;
+ phi3 = ns * InnerOpenAngle + InnerAngleShift;
+ phi3 *= kRaddeg; // in degrees
+
+ phi3 = (Float_t)TMath::Nint(phi3);
+
+ if(phi3 > 360.) phi3 -= 360.;
+
theta3 = 90.;
+
+ alpha = phi3*kDegrad;
+
+ x = xCenterS * TMath::Cos(alpha);
+ y = xCenterS * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+ gMC->Gspos("TRCS", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
+
+ gMC->Gspos("TSGA",ns+1,"TGAS",x,y,zs,idrotm[nRotMat], "ONLY");
+ gMC->Gspos("TSGA",ns+1+nInnerSector,"TGAS",x,y,-zs,idrotm[nRotMat], "ONLY");
+
+ nRotMat++;
+
+ }
- idr = il+1;
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
+ //-------------------------------------------------------------------
+ // Positioning of the L-sectors readout chambers
+ //-------------------------------------------------------------------
- alpha = il * opl * kDegrad;
- x = x0l * TMath::Cos(alpha);
- y = x0l * TMath::Sin(alpha);
+ for(ns=0;ns<nOuterSector;ns++){
+ phi1 = ns * OuterOpenAngle + 270.*kDegrad + OuterAngleShift;
+ phi1 *= kRaddeg; // in degrees
- gMC->Gspos("TSGA", il+1, "TGAS", x, y, z, idrotm[idr], "ONLY");
- gMC->Gspos("TSGA", il+13,"TGAS", x, y, -z, idrotm[idr], "ONLY");
- gMC->Gspos("TRCS", il+1, "TPSG", x, y, z1, idrotm[idr], "ONLY");
+ phi1 = (Float_t)TMath::Nint(phi1);
- }
- // ----------------------------------------------------
- // positioning of upper sectors (1-24)*2
- // rotation matrices 13-36
- // ----------------------------------------------------
- for (iu = 1; iu <= 24; ++iu) {
- phi1 = (iu - 1) * opu + 270.;
- if (phi1 > 360.) {
- phi1 += -360.;
- }
+
+ if (phi1 > 360.) phi1 -= 360.;
+
theta1 = 90.;
phi2 = 90.;
theta2 = 180.;
- phi3 = (iu - 1) * opu;
+ phi3 = ns * OuterOpenAngle+OuterAngleShift;
+ phi3 *= kRaddeg; // in degrees
+
+ phi3 = (Float_t)TMath::Nint(phi3);
+
+
+ if(phi3 > 360.) phi3 -= 360.;
+
theta3 = 90.;
-
- idr = iu + 12;
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
-
- alpha = (iu - 1) * opu * kDegrad;
- x = x0u * TMath::Cos(alpha);
- y = x0u * TMath::Sin(alpha);
-
- gMC->Gspos("TLGA", iu, "TGAS", x, y, z, idrotm[idr], "ONLY");
- gMC->Gspos("TLGA", iu+24, "TGAS", x, y, -z, idrotm[idr], "ONLY");
-
- gMC->Gspos("TRCL", iu, "TPSG", x, y, z1, idrotm[idr], "ONLY");
+
+ alpha = phi3*kDegrad;
+
+ x = xCenterL * TMath::Cos(alpha);
+ y = xCenterL * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+
+ gMC->Gspos("TRCL", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
+
+ nRotMat++;
+
}
- // --------------------------------------------------------
- // Spoke wheel structures
- // --------------------------------------------------------
- gMC->Gsvolu("TSWS", "TUBE", idtmed[399], dm, 0);
- z0 = -z_side + 2.;
-
- dm[0] = 82.;
- dm[1] = 86.;
- dm[2] = 1.;
-
- gMC->Gsposp("TSWS", 1, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- dm[0] = 253.;
- dm[1] = 257.;
-
- gMC->Gsposp("TSWS", 2, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- dm[0] = 140.9;
- dm[1] = 141.9;
-
- gMC->Gsposp("TSWS", 3, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- // -------------------------------------------------------
- // this volumes are to avoid overlaping
- // -------------------------------------------------------
- z0 = 253.;
-
- dm[0] = 76.;
- dm[1] = 76.+0.09776;
-
- gMC->Gsposp("TSWS", 4, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 5, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
-
- z0 += 21.;
-
- gMC->Gsposp("TSWS", 6, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 7, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
-
- dm[0] = 257.;
- dm[1] = 257.+0.09776;
- dm[2] = 11.5;
-
- z0 = 263.5;
+ //-------------------------------------------------------------------
+ // Positioning of the L-sectors (gas sectors)
+ //-------------------------------------------------------------------
+
+ for(ns=0;ns<nOuterSector;ns++){
+
+ phi1 = ns*OuterOpenAngle + OuterAngleShift;
+ phi1 *= kRaddeg;
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+ if(phi1>360.) phi1 -= 360.;
+
+ theta1 = 90.;
+
+ phi2 = 90. + phi1;
+ if(phi2>360.) phi2 -= 360.;
+
+ theta2 = 90.;
+
+ phi3 = 0.;
+ theta3 = 0.;
+
+ alpha = phi1*kDegrad;
+
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+
+ gMC->Gspos("TLGA",ns+1,"TGAS" ,0.,0.,0.,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
+ // reflection !!
+
+ phi3 = 0.;
+ theta3 = 180.;
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+ gMC->Gspos("TLGA",ns+1+nOuterSector,"TGAS" ,0.,0.,0.,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+ }
- gMC->Gsposp("TSWS", 8, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 9, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
+ Float_t z0 = z_side - 0.95;
+
+ gMC->Gspos("TPEC",1,"TPSG",0.,0.,z0,0,"ONLY");
+
// ==========================================================
// wheels
// ==========================================================
+
+ //
+ // auxilary structures
+ //
+
+
+ gMC->Gsvolu("TPWI","TUBE",idtmed[24],dm,0); // "air"
+
// ----------------------------------------------------------
// Large wheel -> positioned in the TPC
// ----------------------------------------------------------
- dm[0] = 257.+0.09776;
+
+
+ z0 = 263.5; // TPC length - 1/2 spoke wheel width
+
+ dm[0] = 258.;
dm[1] = 278.;
dm[2] = 11.5;
- gMC->Gsvolu("TPW1", "TUBE", idtmed[399], dm, 3);
- dm[0] = 259.;
+ gMC->Gsvolu("TPWL", "TUBE", idtmed[0], dm, 3);
+
+ dm[0] = dm[0]+2.;
+ dm[1] = 278.;
+ dm[2] = dm[2]-2.;
+
+ gMC->Gsposp("TPWI",1,"TPWL",0.,0.,0.,0,"ONLY",dm,3);
+
+ gMC->Gspos("TPWL", 1, "TPC ", 0, 0, z0, 0, "ONLY");
+ gMC->Gspos("TPWL", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
+
+ //
+ // Outer vessel + CO2 HV degrader
+ //
+
+ dm[0] = 260.;
+ dm[1] = 278.;
+ dm[2] = 252.;
+
+ gMC->Gsvolu("TPCO","TUBE",idtmed[12],dm,3);
+
+ dm[0] = 275.;
dm[1] = 278.;
- dm[2] = 9.5;
-
- gMC->Gsvolu("TPW2", "TUBE", idtmed[498], dm, 3);
-
- gMC->Gspos("TPW2", 1, "TPW1", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TPW1", 1, "TPC ", 0, 0, z0, 0, "ONLY");
- gMC->Gspos("TPW1", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
- // -----------------------------------------------------------
- // Small wheel -> positioned in the TPSG
- // -----------------------------------------------------------
- dm[0] = 76.+0.09776;
+ gMC->Gsvolu("TPOV","TUBE",idtmed[10],dm,3);
+
+ gMC->Gspos("TPOV",1,"TPCO",0.,0.,0.,0,"ONLY");
+
+
+ // G10 plugs
+
+ dm[0] = 258.;
+ dm[1] = 260.;
+ dm[2] = 1.;
+
+ gMC->Gsvolu("TPG1","TUBE",idtmed[8],dm,3);
+ gMC->Gspos("TPG1",1,"TPCO",0.,0.,251.,0,"ONLY");
+ gMC->Gspos("TPG1",2,"TPCO",0.,0.,-251.,0,"ONLY");
+
+ gMC->Gspos("TPCO",1,"TPC ",0.,0.,0.,0,"ONLY");
+
+
+ //----------------------------------------------------------
+ // Small wheel -> positioned in "side gas
+ //----------------------------------------------------------
+
+ dm[0] = 78.;
dm[1] = 82.;
dm[2] = 11.5;
+
+ gMC->Gsvolu("TPWS", "TUBE", idtmed[0], dm, 3);
+
+ dm[0] = 78.;
+ dm[1] = dm[1]-2;
+ dm[2] = dm[2]-2.;
+
+ gMC->Gsvolu("TPW1", "TUBE", idtmed[2], dm, 3);
- gMC->Gsvolu("TPW3", "TUBE", idtmed[399], dm, 3);
-
- dm[0] = 76.+0.09776;
- dm[1] = 80.;
+ gMC->Gspos("TPW1", 1, "TPWS", 0., 0., 0., 0, "ONLY");
+
+ z0 = 1.; // spoke wheel is shifted w.r.t. center of the "side gas"
+
+ gMC->Gspos("TPWS", 1, "TPSG", 0, 0, z0, 0, "ONLY");
+
+
+ // to avoid overlaps
+
+ dm[0] = 76.;
+ dm[1] = 78.;
+ dm[2] = 11.5;
+
+ gMC->Gsvolu("TPS1","TUBE",idtmed[0],dm,3);
+
dm[2] = 9.5;
+
+ gMC->Gsvolu("TPS2","TUBE",idtmed[24],dm,3);
+
+ gMC->Gspos("TPS2",1,"TPS1",0.,0.,0.,0,"ONLY");
+
+ z0= 263.5;
- gMC->Gsvolu("TPW4", "TUBE", idtmed[401], dm, 3);
-
- gMC->Gspos("TPW4", 1, "TPW3", 0, 0, 0, 0, "ONLY");
-
- z0 = 1.;
-
- gMC->Gspos("TPW3", 1, "TPSG", 0, 0, z0, 0, "ONLY");
- // ---------------------------------------------------------
- // spokes, inner and outer, also the inner ring
- // ---------------------------------------------------------
-
- //Begin_Html
- /*
- <img src="picts/spec_tspo1.gif">
- */
- //End_Html
-
- dm[0] = 0.5*(135.9-82.1);
- dm[1] = 3.;
+ gMC->Gspos("TPS1",1,"TPC ",0.,0.,z0,0,"ONLY");
+ gMC->Gspos("TPS1",2,"TPC ",0.,0.,-z0,0,"ONLY");
+
+ // G10 plug
+
+ dm[0] = 76.;
+ dm[2] = 78.;
+ dm[3] = 1.;
+
+ gMC->Gsvolu("TPG2","TUBE",idtmed[8],dm,3);
+
+ z0 = 251.;
+
+ gMC->Gspos("TPG2",1,"TPC ",0.,0.,z0,0,"ONLY");
+ gMC->Gspos("TPG2",2,"TPC ",0.,0.,-z0,0,"ONLY");
+
+
+ //---------------------------------------------------------
+ // central wheel 6 (radial direction) x 4 (along z) cm2
+ //---------------------------------------------------------
+
+ dm[0] = 140.;
+ dm[1] = 146.;
dm[2] = 2.;
-
- x1 = dm[0] + 82.;
-
- gMC->Gsvolu("TSPI", "BOX ", idtmed[399], dm, 3);
-
- dm[1] = 2.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSP1", "BOX ", idtmed[498], dm, 3);
-
- gMC->Gspos("TSP1", 1, "TSPI", 0, 0, 0, 0, "ONLY");
-
- dm[0] = 0.5*(256.9-142.1);
+
+ gMC->Gsvolu("TPWC","TUBE",idtmed[0],dm,3);
+
+ dm[0] = dm[0] + 2.;
+ dm[1] = dm[1] - 2.;
+ dm[2] = dm[2] - 1.;
+
+ gMC->Gsposp("TPWI",2,"TPWC",0.,0.,0.,0,"ONLY",dm,3);
+
+ z0 = z_side - 1.9 - 2.;
+
+ gMC->Gspos("TPWC",1,"TPSG",0.,0.,z0,0,"ONLY");
+
+ //
+
+ gMC->Gsvolu("TPSE","BOX ",idtmed[24],dm,0); // "empty" part of the spoke
+
+
+ //---------------------------------------------------------
+ // inner spokes (nSectorInner)
+ //---------------------------------------------------------
+
+ dm[0] = 0.5*(139.9-82.1);
dm[1] = 3.;
dm[2] = 2.;
-
- x2 = dm[0] + 142.;
-
- gMC->Gsvolu("TSPO", "BOX ", idtmed[399], dm, 3);
-
- dm[1] = 2.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSP2", "BOX ", idtmed[498], dm, 3);
-
- gMC->Gspos("TSP2", 1, "TSPO", 0, 0, 0, 0, "ONLY");
- // --------------------------------------------------------
- dm[0] = 136.;
- dm[1] = 142.;
- dm[2] = 2.;
-
- gMC->Gsvolu("TSWH", "TUBE", idtmed[399], dm, 3);
-
- dm[0] = 137.;
- dm[1] = 141.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSW1", "TUBE", idtmed[498], dm, 3);
-
- gMC->Gspos("TSW1", 1, "TSWH", 0, 0, 0, 0, "ONLY");
-
- z0 = z_side - .16168 - 2.;
- // --------------------------------------------------------
- gMC->Gspos("TSWH", 1, "TPSG", 0, 0, z0, 0, "ONLY");
- // -------------------------------------------------------
- // posiioning of the inner spokes
- // -------------------------------------------------------
- for (il = 1; il <= 6; ++il) {
- phi1 = opl * .5 + (il - 1) * 2. * opl;
- theta1 = 90.;
- phi2 = opl * .5 + 90. + (il - 1) * 2. * opl;
- if (phi2 > 360.) {
- phi2 += -360.;
- }
- theta2 = 90.;
- phi3 = 0.;
- theta3 = 0.;
-
+
+ Float_t x1 = dm[0]+82.;
+
+ gMC->Gsvolu("TPSI","BOX",idtmed[0],dm,3);
+
+ dm[1] = dm[1]-1.;
+ dm[2] = dm[2]-1.;
+
+ gMC->Gsposp("TPSE",1,"TPSI",0.,0.,0.,0,"ONLY",dm,3);
+
+ for(ns=0;ns<nInnerSector;ns++){
+
+ phi1 = 0.5*InnerOpenAngle + ns*InnerOpenAngle + InnerAngleShift;
+ theta1=90.;
+ phi1 *=kRaddeg;
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+ if(phi1>360.) phi1 -= 360.;
+
+ phi2 = phi1+90.;
+ if(phi2>360.) phi2 -= 360.;
+ theta2=90.;
+ phi3=0.;
+ theta3=0.;
+
alpha = phi1 * kDegrad;
x = x1 * TMath::Cos(alpha);
- y = x1 * TMath::Sin(alpha);
-
- idr = il + 36;
-
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TSPI", il, "TPSG", x, y, z0, idrotm[idr], "ONLY");
+ y = x1 * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
+
+ gMC->Gspos("TPSI",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
}
-
- for (iu = 1; iu <= 12; ++iu) {
- phi1 = opu * .5 + (iu - 1) * 2. * opu;
- theta1 = 90.;
- phi2 = opu * .5 + 90. + (iu - 1) * 2. * opu;
- if (phi2 > 360.) {
- phi2 += -360.;
- }
- theta2 = 90.;
- phi3 = 0.;
- theta3 = 0.;
-
+
+ //-------------------------------------------------------------
+ // outer spokes (nSectorOuter)
+ //-------------------------------------------------------------
+
+ dm[0] = 0.5*(257.9-146.1);
+ dm[1] = 3.;
+ dm[2] = 2.;
+
+ x1 = dm[0] + 146.;
+
+ gMC->Gsvolu("TPSO","BOX ",idtmed[0],dm,3);
+
+ dm[1] = dm[1] - 1.;
+ dm[2] = dm[2] - 1.;
+
+ gMC->Gsposp("TPSE",2,"TPSO",0.,0.,0.,0,"ONLY",dm,3);
+
+ for(ns=0;ns<nOuterSector;ns++){
+
+ phi1 = 0.5*OuterOpenAngle + ns*OuterOpenAngle + OuterAngleShift;
+ theta1=90.;
+ phi1 *=kRaddeg;
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+ if(phi1>360.) phi1 -= 360.;
+
+ phi2 = phi1+90.;
+ if(phi2>360.) phi2 -= 360.;
+ theta2=90.;
+ phi3=0.;
+ theta3=0.;
+
alpha = phi1 * kDegrad;
- x = x2 * TMath::Cos(alpha);
- y = x2 * TMath::Sin(alpha);
-
- idr = iu + 42;
-
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TSPO", iu, "TPSG", x, y, z0, idrotm[idr], "ONLY");
- }
- // --------------------------------------------------------
- // endcap cover (C, 0.86% X0)
- // --------------------------------------------------------
- dm[0] = 76.+0.09776;
- dm[1] = 257.;
- dm[2] = 0.16168*0.5;
-
- gMC->Gsvolu("TCOV", "TUBE", idtmed[407], dm, 3);
+ x = x1 * TMath::Cos(alpha);
+ y = x1 * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
+
+ gMC->Gspos("TPSO",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
+ }
- z0 = z_side - dm[2];
+
- gMC->Gspos("TCOV", 1, "TPSG", 0, 0, z0, 0, "ONLY");
// --------------------------------------------------------
// put the readout chambers into the TPC
// --------------------------------------------------------
+
theta1 = 90.;
phi1 = 0.;
theta2 = 90.;
theta3 = 180.;
phi3 = 0.;
- AliMatrix(idrotm[55], theta1, phi1, theta2, phi2, theta3, phi3);
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
z0 = z_side + 250.;
gMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
- gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[55], "ONLY");
- // ---------------------------------------------------------
- // outer gas insulation (CO2)
- // ---------------------------------------------------------
- dm[0] = 257.+0.09776;
- dm[1] = 278.-0.25004;
- dm[2] = 275.-23.;
-
- gMC->Gsvolu("TPOI", "TUBE", idtmed[406], dm, 3);
-
- gMC->Gspos("TPHV", 1, "TGAS", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TGAS", 1, "TPC ", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TPOI", 1, "TPC ", 0, 0, 0, 0, "ONLY");
+ gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[nRotMat], "ONLY");
gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
- // ======================================================
- // all volumes below are positioned in ALIC
- // ======================================================
- // ------------------------------------------------------
- // the last parts of the smaller wheel (TSWS)
- // ------------------------------------------------------
- dm[0] = 74.;
- dm[1] = 76.;
- dm[2] = 1.;
- z0 = 253.;
-
- gMC->Gsposp("TSWS", 10, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 11, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
-
- dm[0] = 70.;
-
- z0 += 21.;
-
- gMC->Gsposp("TSWS", 12, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 13, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
- // ----------------------------------------------------
- // Inner vessel (PCON)
- // This volume is to be positioned directly in ALIC
- // ----------------------------------------------------
+ //----------------------------------------------------
+ // Inner vessel and HV degrader
+ //----------------------------------------------------
- //Begin_Html
- /*
- <img src="picts/spec_tpiv1.gif">
- */
- //End_Html
-
dm[0] = 0.;
dm[1] = 360.;
dm[2] = 4.;
dm[3] = -250.;
- dm[4] = 75.;
+ dm[4] = 74.4;
dm[5] = 76.;
-
+
dm[6] = -64.5;
dm[7] = 50.;
dm[8] = 76.;
-
- dm[9] = 64.5;
+
+ dm[9] = -64.5;
dm[10] = 50.;
dm[11] = 76.;
-
+
dm[12] = 250.;
- dm[13] = 75.;
+ dm[13] = 74.4;
dm[14] = 76.;
-
- gMC->Gsvolu("TPIV", "PCON", idtmed[407], dm, 15);
- // --------------------------------------------------------
- // fill the inner vessel with CO2, (HV kDegrader)
- // cone parts have different thickness
- // than the central barrel, according to the TP
- // --------------------------------------------------------
- tana = 75./185.5;
+
+ gMC->Gsvolu("TPVD", "PCON", idtmed[12], dm, 15); // CO2
+
+ // cone parts
dm[0] = 0.;
dm[1] = 360.;
- dm[2] = 6.;
-
- dm[3] = -(250.-0.2162);
- dm[4] = (185.5-0.2126)*tana+0.2126;
- dm[5] = 76-0.001;
-
- dm[6] = -64.5;
- dm[7] = 50.+0.2162;
- dm[8] = 76-0.001;
-
- dm[9] = -64.5;
- dm[10] = 50+0.05076;
- dm[11] = 76-0.001;
-
- dm[12] = 64.5;
- dm[13] = 50+0.05076;
- dm[14] = 76-0.001;
-
- dm[15] = 64.5;
- dm[16] = 50.+0.2162;
- dm[17] = 76-0.001;
-
- dm[18] = (250.-0.2162);
- dm[19] = (185.5-0.2126)*tana+0.2126;
- dm[20] = 76-0.001;
+ dm[2] = 2.;
+
+ dm[3] = 64.5;
+ dm[4] = 50.;
+ dm[5] = 51.6;
+
+ dm[6] = 250.;
+ dm[7] = 74.4;
+ dm[8] = 76.;
+
+
+ gMC->Gsvolu("TIVC","PCON",idtmed[11],dm,9); // C-fibre
+
+ gMC->Gspos("TIVC",1,"TPVD",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("TIVC",2,"TPVD",0.,0.,0.,idrotm[nRotMat],"ONLY");
+
+ // barrel part
+
+ dm[0] = 50.;
+ dm[1] = 50.5;
+ dm[2] = 32.25;
+
+ gMC->Gsvolu("TIVB","TUBE",idtmed[9],dm,3);
+
+ gMC->Gspos("TIVB",1,"TPVD",0.,0.,0.,0,"ONLY");
+
+ gMC->Gspos("TPVD",1,"ALIC",0.,0.,0.,0,"ONLY");
+
- gMC->Gsvolu("TPVD", "PCON", idtmed[406], dm, 21);
+
- gMC->Gspos("TPVD", 1, "TPIV", 0, 0, 0, 0, "ONLY");
-
- gMC->Gspos("TPIV", 1, "ALIC", 0, 0, 0, 0, "ONLY");
+
// ---------------------------------------------------
// volumes ordering
// ---------------------------------------------------
gMC->Gsord("TGAS", 6);
gMC->Gsord("TPSG", 6);
gMC->Gsord("TSGA", 3);
- gMC->Gsord("TLGA", 3);
-}
+ gMC->Gsord("TLGA", 2);
+
+} // end of function
+
//_____________________________________________________________________________
void AliTPCv1::DrawDetector()
gMC->Gsatt("TGAS","SEEN",0);
gMC->Gsatt("TPSG","SEEN",0);
gMC->Gsatt("TPHV","SEEN",1);
+ gMC->Gsatt("TPMH","SEEN",1);
+ gMC->Gsatt("TPEC","SEEN",0);
gMC->Gsatt("TRCS","SEEN",1);
gMC->Gsatt("TRCL","SEEN",1);
- gMC->Gsatt("TSST","SEEN",1);
- gMC->Gsatt("TLST","SEEN",1);
- gMC->Gsatt("TSWS","SEEN",1);
+ gMC->Gsatt("TPWL","SEEN",1);
+ gMC->Gsatt("TPWI","SEEN",1);
+ gMC->Gsatt("TPWS","SEEN",1);
gMC->Gsatt("TPW1","SEEN",1);
- gMC->Gsatt("TPW2","SEEN",1);
- gMC->Gsatt("TPW3","SEEN",1);
- gMC->Gsatt("TPW4","SEEN",1);
- gMC->Gsatt("TSPI","SEEN",1);
- gMC->Gsatt("TSP1","SEEN",0);
- gMC->Gsatt("TSPO","SEEN",1);
- gMC->Gsatt("TSP2","SEEN",0);
- gMC->Gsatt("TSWH","SEEN",1);
- gMC->Gsatt("TSW1","SEEN",1);
- gMC->Gsatt("TCOV","SEEN",0);
- gMC->Gsatt("TPOI","SEEN",1);
- gMC->Gsatt("TPIV","SEEN",1);
+ gMC->Gsatt("TPS1","SEEN",1);
+ gMC->Gsatt("TPS2","SEEN",1);
+ gMC->Gsatt("TPG1","SEEN",1);
+ gMC->Gsatt("TPG2","SEEN",1);
+ gMC->Gsatt("TPWC","SEEN",1);
+ gMC->Gsatt("TPSI","SEEN",1);
+ gMC->Gsatt("TPSO","SEEN",1);
+ gMC->Gsatt("TPCO","SEEN",1);
+ gMC->Gsatt("TPOV","SEEN",1);
gMC->Gsatt("TPVD","SEEN",1);
//
gMC->Gdopt("hide", "on");
// Initialises TPC detector after it has been created
//
- fIdSens1=gMC->VolId("TLST");
- fIdSens2=gMC->VolId("TSST");
+ fIdSens1=gMC->VolId("TLST"); // L-sector
+ fIdSens2=gMC->VolId("TSST"); // S-sector
printf("TPC version 1 initialized\n");
}
TLorentzVector p;
TClonesArray &lhits = *fHits;
+ AliTPCParam *fTPCParam = &(fDigParam->GetParam());
+
//
+
if(gMC->TrackCharge() && gMC->IsTrackEntering()) {
//
// Only entering charged tracks
+ //
if((id=gMC->CurrentVolID(copy))==fIdSens1) {
- vol[1]=copy+23;
+
+ // L
+
+ vol[1]=copy-1; // row
id=gMC->CurrentVolOffID(1,copy);
- vol[0]=copy+24;
+ vol[0]=copy+fTPCParam->GetNInnerSector()-1; // sector
} else if(id==fIdSens2) {
- vol[1]=copy;
- id=gMC->CurrentVolOffID(1,copy);
- vol[0]=copy;
+
+ // S
+
+ vol[1]=copy-1; // row
+ id=gMC->CurrentVolOffID(1,copy); // sector
+ vol[0]=copy-1;
} else return;
+
gMC->TrackPosition(p);
for(i=0;i<3;++i) hits[i]=p[i];
hits[3]=0;
new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
}
}
+
+
+
*/
//End_Html
- Int_t *idtmed = fIdtmed->GetArray()-399;
-
AliTPCParam * fTPCParam = &(fDigParam->GetParam());
- Float_t tana;
- Int_t isll;
- Float_t rlsl, wlsl, rssl, rlsu, wssl, wlsu, rssu, wssu;
- Int_t i;
- Float_t alpha, x, y, z, sec_thick;
-
- Float_t r1, r2, x1, z0, z1, x2, theta1, theta2, theta3, dm[21];
- Int_t il, iu;
- Float_t z_side, zz;
+ Int_t *idtmed = fIdtmed->GetArray();
+
+ Float_t dm[21];
Int_t idrotm[100];
-
- Float_t x0l, x0u;
- Int_t idr;
- Float_t thl, opl;
- Int_t ils, iss;
- Float_t thu, opu;
- Int_t ifl1 = 0, ifl2 = 0;
- Float_t phi1, phi2, phi3;
+
+ Int_t nRotMat = 0;
+
+ Int_t i,ifl1,ifl2;
+
+ Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
+ Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
// ---------------------------------------------------
// sector specification check
ifl1 = 0;
for (i = 0; i < 6; ++i) {
- if (fSecLows[i] > 0 && fSecLows[i] <25) {
+ if (fSecLows[i] >= 0 && fSecLows[i] < 2*nInnerSector) {
ifl1 = 1;
printf("*** SECTOR %d selected\n",fSecLows[i]);
}
ifl2 = 0;
for (i = 0; i < 12; ++i) {
- if (fSecUps[i] > 24 && fSecUps[i] < 73) {
+ if (fSecUps[i] > 2*nInnerSector-1 &&
+ fSecUps[i] < 2*(nInnerSector+nOuterSector)) {
ifl2 = 1;
printf("*** SECTOR %d selected\n",fSecUps[i]);
}
printf("!!! PROGRAM STOPPED !!!\n");
exit(1);
}
+
// ----------------------------------------------------
- // FIELD CAGE WITH ENDCAPS - CARBON FIBER
+ // FIELD CAGE WITH ENDCAPS - G10
// THIS IS ALSO A TPC MOTHER VOLUME
// ----------------------------------------------------
+
dm[0] = 76.;
dm[1] = 278.;
dm[2] = 275.;
-
- gMC->Gsvolu("TPC ", "TUBE", idtmed[407], dm, 3);
- // -------------------------------------------------------
- // drift gas Ne/CO2 (90/10 volume) - nonsensitive
- // field cage thickness = 0.52% X0
- // ----------------------------------------------------
- dm[0] = 76.+0.09776;
- dm[1] = 257.;
+
+ gMC->Gsvolu("TPC ", "TUBE", idtmed[8], dm, 3);
+
+ //-----------------------------------------------------
+ // Endcap cover c-fibre 0.86% X0
+ //-----------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
+ dm[2] = 0.95;
+
+ gMC->Gsvolu("TPEC","TUBE",idtmed[10],dm,3);
+
+ //-----------------------------------------------------
+ // Drift gas , leave 2 cm at the outer radius
+ // and inner raddius
+ //-----------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
dm[2] = 250.;
-
- gMC->Gsvolu("TGAS", "TUBE", idtmed[402], dm, 3);
- // ------------------------------------------------------
- // "side" gas volume (the same as drift gas),
- // here the readout chambers are positioned
- // ------------------------------------------------------
- dm[2] = 0.5*(275.-250.);
- z_side = dm[2];
-
- gMC->Gsvolu("TPSG", "TUBE", idtmed[401], dm, 3);
- // ------------------------------------------------------
- // HV midplane - 20 microns of mylar
- // -----------------------------------------------------
- dm[2] = .001;
-
- gMC->Gsvolu("TPHV", "TUBE", idtmed[405], dm, 3);
-
- // ====================================================
- // lower and upper readout chambers
- // ====================================================
- // sectros opening angles in degrees
- // ---------------------------------------------------
- opl = 30.;
- opu = 15.;
- thl = TMath::Tan(opl * .5 * kDegrad);
- thu = TMath::Tan(opu * .5 * kDegrad);
- // ---------------------------------------------------
- // S and L-sectors radii
- // ---------------------------------------------------
- rssl = 88.;
- rssu = 136.;
- rlsl = 142.;
- rlsu = 250.;
- // --------------------------------------------------
- // Sectors widths
- // --------------------------------------------------
- wssl = 46.5;
- wssu = 72.2;
- wlsl = 37.;
- wlsu = 65.4;
- // ---------------------------------------------------
- // Sector thickness 25% of X0 (Al)
- // ---------------------------------------------------
- sec_thick = 2.225;
- // ---------------------------------------------------
- // S-sectors (lower sectors)
- // ---------------------------------------------------
- dm[0] = wssl * .5;
- dm[1] = wssu * .5;
- dm[2] = sec_thick * .5;
- dm[3] = (rssu - rssl) * .5;
-
- x0l = rssl + dm[3];
-
- gMC->Gsvolu("TRCS", "TRD1", idtmed[399], dm, 4);
- // -----------------------------------------------------
- // S-sectors --> "gas sectors" - sensitive
- // -----------------------------------------------------
- dm[2] = (250.-0.001)/2.;
- gMC->Gsvolu("TSGA", "TRD1", idtmed[403], dm, 4);
+
+ gMC->Gsvolu("TGAS", "TUBE", idtmed[3], dm, 3);
+
+ //------------------------------------------------------
+ // membrane holder - carbon fiber
+ //------------------------------------------------------
+
+
+ gMC->Gsvolu("TPMH","TUBE",idtmed[6],dm,0);
+
+ dm[0] = 252.;
+ dm[1] = 258.;
+ dm[2] = 0.2;
+
+ gMC->Gsposp("TPMH",1,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
+
+ dm[0] = 78.;
+ dm[2] = 82.;
+ dm[2] = 0.1;
+
+ gMC->Gsposp("TPMH",2,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
+
+ //----------------------------------------------------------
+ // HV membrane - 25 microns of mylar
+ //----------------------------------------------------------
+
+ dm[0] = 82.;
+ dm[1] = 252.;
+ dm[2] = 0.00125;
+
+ gMC->Gsvolu("TPHV","TUBE",idtmed[5],dm,3);
+
+ gMC->Gspos("TPHV",1,"TGAS",0.,0.,0.,0,"ONLY");
+
+ gMC->Gspos("TGAS",1,"TPC ",0.,0.,0.,0,"ONLY");
+
+ //----------------------------------------------------------
+ // "side" gas volume, the same as the drift gas
+ // the readout chambers are placed there.
+ //----------------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
+ dm[2] = 0.5*(275. - 250.);
+
+ gMC->Gsvolu("TPSG", "TUBE", idtmed[2], dm, 3);
+
+ Float_t z_side = dm[2]; // 1/2 of the side gas thickness
+
+ //-----------------------------------------------------------
+ // Readout chambers , 25% of X0, I use Al as the material
+ //-----------------------------------------------------------
+
+ Float_t InnerOpenAngle = fTPCParam->GetInnerAngle();
+ Float_t OuterOpenAngle = fTPCParam->GetOuterAngle();
+
+ Float_t InnerAngleShift = fTPCParam->GetInnerAngleShift();
+ Float_t OuterAngleShift = fTPCParam->GetOuterAngleShift();
+
+ Float_t InSecLowEdge = fTPCParam->GetInSecLowEdge();
+ Float_t InSecUpEdge = fTPCParam->GetInSecUpEdge();
+
+ Float_t OuSecLowEdge = fTPCParam->GetOuSecLowEdge();
+ Float_t OuSecUpEdge = fTPCParam->GetOuSecUpEdge();
+
+
+ Float_t SecThick = 2.225; // Al
+
+ Float_t edge = fTPCParam->GetEdge();
+
+ // S (Inner) sectors
+
+ dm[0] = InSecLowEdge*TMath::Tan(0.5*InnerOpenAngle)-edge;
+ dm[1] = InSecUpEdge*TMath::Tan(0.5*InnerOpenAngle)-edge;
+ dm[2] = 0.5*SecThick;
+ dm[3] = 0.5*(InSecUpEdge-InSecLowEdge);
+
+ Float_t xCenterS = InSecLowEdge+dm[3];
+
+ gMC->Gsvolu("TRCS", "TRD1", idtmed[0], dm, 4);
+
+ // L (Outer) sectors
+
+ dm[0] = OuSecLowEdge*TMath::Tan(0.5*OuterOpenAngle)-edge;
+ dm[1] = OuSecUpEdge*TMath::Tan(0.5*OuterOpenAngle)-edge;
+ dm[2] = 0.5*SecThick;
+ dm[3] = 0.5*(OuSecUpEdge-OuSecLowEdge);
+
+ Float_t xCenterL = OuSecLowEdge+dm[3];
+
+ gMC->Gsvolu("TRCL", "TRD1", idtmed[0], dm, 4);
+
+ Float_t z1 = -z_side + SecThick*0.5;
+
+ //------------------------------------------------------------------
+ // S sectors - "gas sectors" (TRD1)
+ //------------------------------------------------------------------
+
+ dm[0] = InSecLowEdge*TMath::Tan(0.5*InnerOpenAngle)-0.01;
+ dm[1] = InSecUpEdge*TMath::Tan(0.5*InnerOpenAngle)-0.01;
+ dm[2] = 0.5*(250. - 0.001);
+ dm[3] = 0.5*(InSecUpEdge-InSecLowEdge);
+
+ gMC->Gsvolu("TSGA", "TRD1", idtmed[4], dm, 4); // sensitive
+
// -------------------------------------------------------------
// Only for the debugging purpose and resolution calculation
// Sensitive strips at the pad-row center
// -------------------------------------------------------------
- if (fSens >= 0) {
- gMC->Gsvolu("TSST", "TRD1", idtmed[403], dm, 0);
- dm[3] = .005;
-
- z0 = rssl + (rssu - rssl) * .5;
+
+ Int_t ns;
+
+ if(fSens>=0){
+
+ Float_t r1,r2,zz;
+
+ Float_t StripThick = 0.01; // 100 microns
+ Float_t dead = fTPCParam->GetDeadZone();
+
+ gMC->Gsvolu("TSST", "TRD1", idtmed[4], dm, 0);
+
+ dm[2] = 0.5*(250. - 0.002);
+ dm[3] = 0.5 * StripThick;
+
+
+ for (ns = 0; ns < fTPCParam->GetNRowLow(); ns++) {
+
+ r1 = fTPCParam->GetPadRowRadiiLow(ns);
+ r2 = r1 + StripThick;
+ dm[0] = r1 * TMath::Tan(0.5*InnerOpenAngle) - dead;
+ dm[1] = r2 * TMath::Tan(0.5*InnerOpenAngle) - dead;
+
+ zz = -InSecLowEdge -0.5*(InSecUpEdge-InSecLowEdge);
+ zz += r1;
+ zz += dm[3];
+
+ gMC->Gsposp("TSST", ns+1, "TSGA", 0., 0., zz, 0, "ONLY", dm, 4);
+
- for (iss = 0; iss < fTPCParam->GetNRowLow(); ++iss) {
- r1 = fTPCParam->GetPadRowRadiiLow(iss);
- r2 = r1 + dm[3] * 2.;
- dm[0] = r1 * thl - 2.63;
- dm[1] = r2 * thl - 2.63;
-
- zz = -z0 + r1 +dm[3];
+ }
+
+ gMC->Gsord("TSGA", 3);
+
+ } // if strips selected
+
+
+ //-----------------------------------------------------------------
+ // L sectors - "gas sectors" (PGON to avoid overlaps)
+ //-----------------------------------------------------------------
+
+ dm[0] = 360.*kDegrad - 0.5*OuterOpenAngle;
+ dm[0] *= kRaddeg;
+ dm[0] = (Float_t)TMath::Nint(dm[0]);
+
+ dm[1] = OuterOpenAngle*kRaddeg;
+ dm[1] = (Float_t)TMath::Nint(dm[1]);
+
+ dm[2] = 1.;
+ dm[3] = 4.;
+
+ dm[4] = 0.002;
+ dm[5] = OuSecLowEdge;
+ dm[6] = 252.*TMath::Cos(0.5*OuterOpenAngle)-0.002;
+
+ dm[7] = dm[4]+0.2;
+ dm[8] = dm[5];
+ dm[9] = dm[6];
+
+ dm[10] = dm[7];
+ dm[11] = OuSecLowEdge;
+ dm[12] = OuSecUpEdge;
+
+ dm[13] = 250.;
+ dm[14] = dm[11];
+ dm[15] = dm[12];
+
+ gMC->Gsvolu("TLGA","PGON",idtmed[4],dm,16);
- gMC->Gsposp("TSST", iss+1, "TSGA", 0, 0, zz, 0, "ONLY", dm, 4);
- }
- gMC->Gsord("TSGA", 3);
- }
- // ---------------------------------------------------
- // L-sectors (upper sectors)
- // ---------------------------------------------------
- dm[0] = wlsl * .5;
- dm[1] = wlsu * .5;
- dm[2] = sec_thick * .5;
- dm[3] = (rlsu - rlsl) * .5;
-
- x0u = rlsl + dm[3];
-
- gMC->Gsvolu("TRCL", "TRD1", idtmed[399], dm, 4);
- // -----------------------------------------------------
- // L-sectors - "gas sectors" - sensitive!
- // -----------------------------------------------------
- dm[2] = (250.-0.001)/2.;
- gMC->Gsvolu("TLGA", "TRD1", idtmed[403], dm, 4);
- // -------------------------------------------------------------
- // Only for the debugging purpose and resolution calculation
- // Sensitive strips at the pad-row center
- // -------------------------------------------------------------
if (fSens >= 0) {
- gMC->Gsvolu("TLST", "TRD1", idtmed[403], dm, 0);
- dm[3] = .005;
+ Float_t rmax = dm[6];
+ Float_t r1,r2;
+ Float_t dead = fTPCParam->GetDeadZone();
- z0 = rlsl+ (rlsu - rlsl) * .5;
-
- for (ils = 0; ils <fTPCParam->GetNRowUp(); ++ils) {
- r1 = fTPCParam->GetPadRowRadiiUp(ils);
- r2 = r1 + dm[3] * 2.;
- dm[0] = r1 * thu - 2.63;
- dm[1] = r2 * thu - 2.63;
+ Float_t StripThick = 0.01; // 100 microns
- zz = -z0 + r1 +dm[3];
+ gMC->Gsvolu("TLST", "PGON", idtmed[4], dm, 0);
+
+ dm[0] = 360.*kDegrad - 0.5*OuterOpenAngle;
+ dm[0] *= kRaddeg;
+ dm[0] = (Float_t)TMath::Nint(dm[0]);
+
+ dm[1] = OuterOpenAngle*kRaddeg;
+ dm[1] = (Float_t)TMath::Nint(dm[1]);
- gMC->Gsposp("TLST", ils+1, "TLGA", 0, 0, zz, 0, "ONLY", dm, 4);
- }
- gMC->Gsord("TLGA", 3);
- }
- // ******************************************************
- // ------------------------------------------------
- // positioning of lower sectors (1-12)*2
- // rotation matrices 1-12
-
- // the isec_al flag allows to select all (<0) or
- // only a few (up to 6) sectors
- // ------------------------------------------------
- z = (250.+0.001)/2.;
- z1 = -z_side + sec_thick * .5;
-
- for (il = 1; il <= 12; ++il) {
- phi1 = (il - 1) * opl + 270.;
- if (phi1 > 360.) {
- phi1 += -360.;
- }
- theta1 = 90.;
- phi2 = 90.;
- theta2 = 180.;
- phi3 = (il - 1) * opl;
- theta3 = 90.;
-
- idr = il;
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
-
- alpha = (il - 1) * opl * kDegrad;
- x = x0l * TMath::Cos(alpha);
- y = x0l * TMath::Sin(alpha);
-
- if (fSecAL < 0) {
- // -----------------------------------------------------------
- // position ALL lower sectors
- // -----------------------------------------------------------
- gMC->Gspos("TSGA", il, "TGAS", x, y, z, idrotm[idr], "ONLY");
- gMC->Gspos("TSGA",il+12 , "TGAS", x, y, -z, idrotm[idr], "ONLY");
- } else {
- // -----------------------------------------------------------
- // position selected lower sectors
- // -----------------------------------------------------------
- for (isll = 1; isll <= 6; ++isll) {
- if (fSecLows[isll - 1] == il) {
- gMC->Gspos("TSGA", il, "TGAS", x, y, z, idrotm[idr], "ONLY");
- } else if (fSecLows[isll - 1] == il + 12) {
- gMC->Gspos("TSGA",il+12 , "TGAS", x, y, -z, idrotm[idr],"ONLY");
- }
- }
- }
-
- gMC->Gspos("TRCS", il, "TPSG", x, y, z1, idrotm[idr], "ONLY");
-
- }
- // ----------------------------------------------------
- // positioning of upper sectors (1-24)*2
- // rotation matrices 13-36
- // the isec_au flag allows to select all (<0) or
- // only a few (up to 12) sectors
- // ----------------------------------------------------
- for (iu = 1; iu <= 24; ++iu) {
- phi1 = (iu - 1) * opu + 270.;
- if (phi1 > 360.) {
- phi1 += -360.;
- }
- theta1 = 90.;
- phi2 = 90.;
- theta2 = 180.;
- phi3 = (iu - 1) * opu;
- theta3 = 90.;
-
- idr = iu + 12;
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
-
- alpha = (iu - 1) * opu * kDegrad;
- x = x0u * TMath::Cos(alpha);
- y = x0u * TMath::Sin(alpha);
-
- if (fSecAU < 0) {
- // -------------------------------------------------------------
- // position ALL upper sectors
- // -------------------------------------------------------------
- gMC->Gspos("TLGA", iu, "TGAS", x, y, z, idrotm[idr], "ONLY");
- gMC->Gspos("TLGA",iu+24 , "TGAS", x, y, -z, idrotm[idr], "ONLY");
- } else {
- // -------------------------------------------------------------
- // position selected upper sectors
- // -------------------------------------------------------------
- for (isll = 1; isll <= 12; ++isll) {
- if (fSecUps[isll - 1] == iu + 24) {
- gMC->Gspos("TLGA", iu, "TGAS", x, y, z, idrotm[idr], "ONLY");
- } else if (fSecUps[isll - 1] == iu + 48) {
- gMC->Gspos("TLGA",iu+24 , "TGAS", x, y, -z, idrotm[idr],"ONLY");
- }
- }
- }
-
- gMC->Gspos("TRCL", iu, "TPSG", x, y, z1, idrotm[idr], "ONLY");
- }
- // --------------------------------------------------------
- // Spoke wheel structures
- // --------------------------------------------------------
- gMC->Gsvolu("TSWS", "TUBE", idtmed[399], dm, 0);
-
- z0 = -z_side + 2.;
-
- dm[0] = 82.;
- dm[1] = 86.;
- dm[2] = 1.;
-
- gMC->Gsposp("TSWS", 1, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- dm[0] = 253.;
- dm[1] = 257.;
-
- gMC->Gsposp("TSWS", 2, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- dm[0] = 140.9;
- dm[1] = 141.9;
-
- gMC->Gsposp("TSWS", 3, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- // -------------------------------------------------------
- // this volumes are to avoid overlaping
- // -------------------------------------------------------
- z0 = 253.;
-
- dm[0] = 76.;
- dm[1] = 76.+0.09776;
-
- gMC->Gsposp("TSWS", 4, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 5, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
-
- z0 += 21.;
-
- gMC->Gsposp("TSWS", 6, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 7, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
-
- dm[0] = 257.;
- dm[1] = 257.+0.09776;
- dm[2] = 11.5;
-
- z0 = 263.5;
-
- gMC->Gsposp("TSWS", 8, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 9, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
- // ==========================================================
- // wheels
- // ==========================================================
- // ----------------------------------------------------------
- // Large wheel -> positioned in the TPC
- // ----------------------------------------------------------
- dm[0] = 257.+0.09776;
- dm[1] = 278.;
- dm[2] = 11.5;
- gMC->Gsvolu("TPW1", "TUBE", idtmed[399], dm, 3);
-
- dm[0] = 259.;
- dm[1] = 278.;
- dm[2] = 9.5;
-
- gMC->Gsvolu("TPW2", "TUBE", idtmed[498], dm, 3);
-
- gMC->Gspos("TPW2", 1, "TPW1", 0, 0, 0, 0, "ONLY");
-
- gMC->Gspos("TPW1", 1, "TPC ", 0, 0, z0, 0, "ONLY");
- gMC->Gspos("TPW1", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
- // -----------------------------------------------------------
- // Small wheel -> positioned in the TPSG
- // -----------------------------------------------------------
- dm[0] = 76.+0.09776;
- dm[1] = 82.;
- dm[2] = 11.5;
-
- gMC->Gsvolu("TPW3", "TUBE", idtmed[399], dm, 3);
-
- dm[0] = 76.+0.09776;
- dm[1] = 80.;
- dm[2] = 9.5;
-
- gMC->Gsvolu("TPW4", "TUBE", idtmed[401], dm, 3);
-
- gMC->Gspos("TPW4", 1, "TPW3", 0, 0, 0, 0, "ONLY");
-
- z0 = 1.;
-
- gMC->Gspos("TPW3", 1, "TPSG", 0, 0, z0, 0, "ONLY");
- // ---------------------------------------------------------
- // spokes, inner and outer, also the inner ring
- // ---------------------------------------------------------
- dm[0] = 0.5*(135.9-82.1);
- dm[1] = 3.;
- dm[2] = 2.;
-
- x1 = dm[0] + 82.;
-
- gMC->Gsvolu("TSPI", "BOX ", idtmed[399], dm, 3);
-
- dm[1] = 2.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSP1", "BOX ", idtmed[498], dm, 3);
-
- gMC->Gspos("TSP1", 1, "TSPI", 0, 0, 0, 0, "ONLY");
-
- dm[0] = 0.5*(256.9-142.1);
- dm[1] = 3.;
- dm[2] = 2.;
-
- x2 = dm[0] + 142.;
-
- gMC->Gsvolu("TSPO", "BOX ", idtmed[399], dm, 3);
-
- dm[1] = 2.;
dm[2] = 1.;
-
- gMC->Gsvolu("TSP2", "BOX ", idtmed[498], dm, 3);
+ dm[3] = 2.;
- gMC->Gspos("TSP2", 1, "TSPO", 0, 0, 0, 0, "ONLY");
- // --------------------------------------------------------
- dm[0] = 136.;
- dm[1] = 142.;
- dm[2] = 2.;
+ dm[7] = 250.;
- gMC->Gsvolu("TSWH", "TUBE", idtmed[399], dm, 3);
+ Float_t xx = dead/TMath::Tan(0.5*OuterOpenAngle);
- dm[0] = 137.;
- dm[1] = 141.;
- dm[2] = 1.;
+ for(ns=0;ns<fTPCParam->GetNRowUp();ns++){
- gMC->Gsvolu("TSW1", "TUBE", idtmed[498], dm, 3);
-
- gMC->Gspos("TSW1", 1, "TSWH", 0, 0, 0, 0, "ONLY");
-
- z0 = z_side - .16168 - 2.;
- // --------------------------------------------------------
- gMC->Gspos("TSWH", 1, "TPSG", 0, 0, z0, 0, "ONLY");
- // -------------------------------------------------------
- // posiioning of the inner spokes
- // -------------------------------------------------------
- for (il = 1; il <= 6; ++il) {
- phi1 = opl * .5 + (il - 1) * 2. * opl;
- theta1 = 90.;
- phi2 = opl * .5 + 90. + (il - 1) * 2. * opl;
- if (phi2 > 360.) {
- phi2 += -360.;
+ r1 = fTPCParam->GetPadRowRadiiUp(ns)-xx;
+ r2 = r1 + StripThick;
+
+ dm[5] = r1;
+ dm[6] = r2;
+
+ dm[8] = r1;
+ dm[9] = r2;
+
+ if(r2+xx < rmax){
+ dm[4] = 0.002;
}
- theta2 = 90.;
- phi3 = 0.;
- theta3 = 0.;
-
- alpha = phi1 * kDegrad;
- x = x1 * TMath::Cos(alpha);
- y = x1 * TMath::Sin(alpha);
-
- idr = il + 36;
+ else{
+ dm[4] = 0.202;
+ }
+
+ gMC->Gsposp("TLST",ns+1,"TLGA",xx,0.,0.,0,"ONLY",dm,10);
+
+ }
+
+ gMC->Gsord("TLGA", 2);
+
+ } // if strips selected
+
+ //------------------------------------------------------------------
+ // Positioning of the S-sector readout chambers
+ //------------------------------------------------------------------
+
+ Float_t zs = 0.5*(250.+0.002);
+
+ Float_t theta1,theta2,theta3;
+ Float_t phi1,phi2,phi3;
+ Float_t alpha;
+ Float_t x,y;
+
+ for(ns=0;ns<nInnerSector;ns++){
+
+ phi1 = ns * InnerOpenAngle + 270.*kDegrad + InnerAngleShift;
+ phi1 *= kRaddeg; // in degrees
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+
+ if (phi1 > 360.) phi1 -= 360.;
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TSPI", il, "TPSG", x, y, z0, idrotm[idr], "ONLY");
+ theta1 = 90.;
+ phi2 = 90.;
+ theta2 = 180.;
+ phi3 = ns * InnerOpenAngle + InnerAngleShift;
+ phi3 *= kRaddeg; // in degrees
+
+ phi3 = (Float_t)TMath::Nint(phi3);
+ if(phi3 > 360.) phi3 -= 360.;
+
+ theta3 = 90.;
+
+ alpha = phi3*kDegrad;
+
+ x = xCenterS * TMath::Cos(alpha);
+ y = xCenterS * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+ gMC->Gspos("TRCS", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
+
+ if(fSecAL < 0){
+
+ //---------------------------------------------------------------
+ // position all sectors
+ //---------------------------------------------------------------
+
+ gMC->Gspos("TSGA",ns+1,"TGAS",x,y,zs,idrotm[nRotMat], "ONLY");
+ gMC->Gspos("TSGA",ns+1+nInnerSector,"TGAS",x,y,-zs,idrotm[nRotMat], "ONLY");
}
-
- for (iu = 1; iu <= 12; ++iu) {
- phi1 = opu * .5 + (iu - 1) * 2. * opu;
- theta1 = 90.;
- phi2 = opu * .5 + 90. + (iu - 1) * 2. * opu;
- if (phi2 > 360.) {
- phi2 += -360.;
+
+ else{
+
+ //---------------------------------------------------------------
+ // position selected sectors
+ //---------------------------------------------------------------
+
+ for(Int_t sel=0;sel<6;sel++){
+
+ if(fSecLows[sel] == ns){
+ gMC->Gspos("TSGA", ns+1, "TGAS", x, y, zs, idrotm[nRotMat], "ONLY");
+ }
+ else if(fSecLows[sel] == ns+nInnerSector){
+ gMC->
+ Gspos("TSGA",ns+1+nInnerSector,"TGAS", x, y,-zs,idrotm[nRotMat],"ONLY");
+ }
}
- theta2 = 90.;
- phi3 = 0.;
- theta3 = 0.;
-
- alpha = phi1 * kDegrad;
- x = x2 * TMath::Cos(alpha);
- y = x2 * TMath::Sin(alpha);
-
- idr = iu + 42;
-
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TSPO", iu, "TPSG", x, y, z0, idrotm[idr], "ONLY");
}
- // --------------------------------------------------------
- // endcap cover (C, 0.86% X0)
- // --------------------------------------------------------
- dm[0] = 76.+0.09776;
- dm[1] = 257.;
- dm[2] = 0.16168*0.5;
+
+ nRotMat++;
+
+ }
- gMC->Gsvolu("TCOV", "TUBE", idtmed[407], dm, 3);
+ //-------------------------------------------------------------------
+ // Positioning of the L-sectors readout chambers
+ //-------------------------------------------------------------------
- z0 = z_side - dm[2];
+ for(ns=0;ns<nOuterSector;ns++){
+ phi1 = ns * OuterOpenAngle + 270.*kDegrad + OuterAngleShift;
+ phi1 *= kRaddeg; // in degrees
+
+ phi1 = (Float_t)TMath::Nint(phi1);
- gMC->Gspos("TCOV", 1, "TPSG", 0, 0, z0, 0, "ONLY");
- // --------------------------------------------------------
- // put the readout chambers into the TPC
- // --------------------------------------------------------
+
+ if (phi1 > 360.) phi1 -= 360.;
+
theta1 = 90.;
- phi1 = 0.;
- theta2 = 90.;
- phi2 = 270.;
- theta3 = 180.;
- phi3 = 0.;
+ phi2 = 90.;
+ theta2 = 180.;
+ phi3 = ns * OuterOpenAngle+OuterAngleShift;
+ phi3 *= kRaddeg; // in degrees
- AliMatrix(idrotm[55], theta1, phi1, theta2, phi2, theta3, phi3);
-
- z0 = z_side + 250.;
-
- gMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
- gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[55], "ONLY");
- // ---------------------------------------------------------
- // outer gas insulation (CO2)
- // ---------------------------------------------------------
- dm[0] = 257.+0.09776;
- dm[1] = 278.-0.25004;
- dm[2] = 275.-23.;
-
- gMC->Gsvolu("TPOI", "TUBE", idtmed[406], dm, 3);
-
- gMC->Gspos("TPHV", 1, "TGAS", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TGAS", 1, "TPC ", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TPOI", 1, "TPC ", 0, 0, 0, 0, "ONLY");
-
- gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
- // ======================================================
- // all volumes below are positioned in ALIC
- // ======================================================
- // ------------------------------------------------------
- // the last parts of the smaller wheel (TSWS)
- // ------------------------------------------------------
- dm[0] = 74.;
- dm[1] = 76.;
- dm[2] = 1.;
-
- z0 = 253.;
-
- gMC->Gsposp("TSWS", 10, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 11, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
+ phi3 = (Float_t)TMath::Nint(phi3);
- dm[0] = 70.;
-
- z0 += 21.;
-
- gMC->Gsposp("TSWS", 12, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 13, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
- // ----------------------------------------------------
- // Inner vessel (PCON)
- // This volume is to be positioned directly in ALIC
- // ----------------------------------------------------
- dm[0] = 0.;
- dm[1] = 360.;
- dm[2] = 4.;
-
- dm[3] = -250.;
- dm[4] = 75.;
- dm[5] = 76.;
-
- dm[6] = -64.5;
- dm[7] = 50.;
- dm[8] = 76.;
-
- dm[9] = 64.5;
- dm[10] = 50.;
- dm[11] = 76.;
-
- dm[12] = 250.;
- dm[13] = 75.;
- dm[14] = 76.;
-
- gMC->Gsvolu("TPIV", "PCON", idtmed[407], dm, 15);
- // --------------------------------------------------------
- // fill the inner vessel with CO2, (HV kDegrader)
- // cone parts have different thickness
- // than the central barrel, according to the TP
- // --------------------------------------------------------
- tana = 75./185.5;
-
- dm[0] = 0.;
- dm[1] = 360.;
- dm[2] = 6.;
-
- dm[3] = -(250.-0.2162);
- dm[4] = (185.5-0.2126)*tana+0.2126;
- dm[5] = 76-0.001;
-
- dm[6] = -64.5;
- dm[7] = 50.+0.2162;
- dm[8] = 76-0.001;
-
- dm[9] = -64.5;
- dm[10] = 50+0.05076;
- dm[11] = 76-0.001;
-
- dm[12] = 64.5;
- dm[13] = 50+0.05076;
- dm[14] = 76-0.001;
-
- dm[15] = 64.5;
- dm[16] = 50.+0.2162;
- dm[17] = 76-0.001;
-
- dm[18] = (250.-0.2162);
- dm[19] = (185.5-0.2126)*tana+0.2126;
- dm[20] = 76-0.001;
-
- gMC->Gsvolu("TPVD", "PCON", idtmed[406], dm, 21);
-
- gMC->Gspos("TPVD", 1, "TPIV", 0, 0, 0, 0, "ONLY");
+
+ if(phi3 > 360.) phi3 -= 360.;
+
+ theta3 = 90.;
+
+ alpha = phi3*kDegrad;
+
+ x = xCenterL * TMath::Cos(alpha);
+ y = xCenterL * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+
+ gMC->Gspos("TRCL", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
+
+ nRotMat++;
+
+ }
+
+ //-------------------------------------------------------------------
+ // Positioning of the L-sectors (gas sectors)
+ //-------------------------------------------------------------------
+
+ for(ns=0;ns<nOuterSector;ns++){
+
+ phi1 = ns*OuterOpenAngle + OuterAngleShift;
+ phi1 *= kRaddeg;
- gMC->Gspos("TPIV", 1, "ALIC", 0, 0, 0, 0, "ONLY");
- // ---------------------------------------------------
- // volumes ordering
- // ---------------------------------------------------
- gMC->Gsord("TGAS", 6);
- gMC->Gsord("TPSG", 6);
-}
+ phi1 = (Float_t)TMath::Nint(phi1);
+ if(phi1>360.) phi1 -= 360.;
+
+ theta1 = 90.;
+
+ phi2 = 90. + phi1;
+ if(phi2>360.) phi2 -= 360.;
+
+ theta2 = 90.;
+
+ phi3 = 0.;
+ theta3 = 0.;
+
+ if(fSecAU < 0) {
+
+ //--------------------------------------------------------------
+ // position all sectors
+ //--------------------------------------------------------------
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+ gMC->Gspos("TLGA",ns+1,"TGAS" ,0.,0.,0.,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
+ // reflection !!
+
+ phi3 = 0.;
+ theta3 = 180.;
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+ gMC->Gspos("TLGA",ns+1+nOuterSector,"TGAS" ,0.,0.,0.,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+ }
+
+ else{
+
+ //---------------------------------------------------------------
+ // position selected sectors
+ //---------------------------------------------------------------
+
+ for(Int_t sel=0;sel<12;sel++){
+
+ if(fSecUps[sel] == ns+2*nInnerSector){
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+ gMC->Gspos("TLGA",ns+1,"TGAS" ,0.,0.,0.,idrotm[nRotMat],"ONLY");
+ nRotMat++;
+
+ }
+ else if(fSecUps[sel] == ns+2*nInnerSector+nOuterSector){
+
+ // reflection
+
+ phi3 = 0.;
+ theta3 = 180.;
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+ gMC->
+ Gspos("TLGA",ns+1+nOuterSector,"TGAS" ,0.,0.,0.,idrotm[nRotMat],"ONLY");
+ nRotMat++;
+
+ }
+
+ }
+
+ }
+
+ }
+
+ Float_t z0 = z_side - 0.95;
+
+ gMC->Gspos("TPEC",1,"TPSG",0.,0.,z0,0,"ONLY");
+
+ // ==========================================================
+ // wheels
+ // ==========================================================
+
+ //
+ // auxilary structures
+ //
+
+
+ gMC->Gsvolu("TPWI","TUBE",idtmed[24],dm,0); // "air"
+
+ // ----------------------------------------------------------
+ // Large wheel -> positioned in the TPC
+ // ----------------------------------------------------------
+
+
+ z0 = 263.5; // TPC length - 1/2 spoke wheel width
+
+ dm[0] = 258.;
+ dm[1] = 278.;
+ dm[2] = 11.5;
+
+ gMC->Gsvolu("TPWL", "TUBE", idtmed[0], dm, 3);
+
+ dm[0] = dm[0]+2.;
+ dm[1] = 278.;
+ dm[2] = dm[2]-2.;
+
+ gMC->Gsposp("TPWI",1,"TPWL",0.,0.,0.,0,"ONLY",dm,3);
+
+ gMC->Gspos("TPWL", 1, "TPC ", 0, 0, z0, 0, "ONLY");
+ gMC->Gspos("TPWL", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
+
+ //
+ // Outer vessel + CO2 HV degrader
+ //
+
+ dm[0] = 260.;
+ dm[1] = 278.;
+ dm[2] = 252.;
+
+ gMC->Gsvolu("TPCO","TUBE",idtmed[12],dm,3);
+
+ dm[0] = 275.;
+ dm[1] = 278.;
+
+ gMC->Gsvolu("TPOV","TUBE",idtmed[10],dm,3);
+
+ gMC->Gspos("TPOV",1,"TPCO",0.,0.,0.,0,"ONLY");
+
+
+ // G10 plugs
+
+ dm[0] = 258.;
+ dm[1] = 260.;
+ dm[2] = 1.;
+
+ gMC->Gsvolu("TPG1","TUBE",idtmed[8],dm,3);
+ gMC->Gspos("TPG1",1,"TPCO",0.,0.,251.,0,"ONLY");
+ gMC->Gspos("TPG1",2,"TPCO",0.,0.,-251.,0,"ONLY");
+
+ gMC->Gspos("TPCO",1,"TPC ",0.,0.,0.,0,"ONLY");
+
+
+ //----------------------------------------------------------
+ // Small wheel -> positioned in "side gas
+ //----------------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 82.;
+ dm[2] = 11.5;
+
+ gMC->Gsvolu("TPWS", "TUBE", idtmed[0], dm, 3);
+
+ dm[0] = 78.;
+ dm[1] = dm[1]-2;
+ dm[2] = dm[2]-2.;
+
+ gMC->Gsvolu("TPW1", "TUBE", idtmed[2], dm, 3);
+
+ gMC->Gspos("TPW1", 1, "TPWS", 0., 0., 0., 0, "ONLY");
+
+ z0 = 1.; // spoke wheel is shifted w.r.t. center of the "side gas"
+
+ gMC->Gspos("TPWS", 1, "TPSG", 0, 0, z0, 0, "ONLY");
+
+
+ // to avoid overlaps
+
+ dm[0] = 76.;
+ dm[1] = 78.;
+ dm[2] = 11.5;
+
+ gMC->Gsvolu("TPS1","TUBE",idtmed[0],dm,3);
+
+ dm[2] = 9.5;
+
+ gMC->Gsvolu("TPS2","TUBE",idtmed[24],dm,3);
+
+ gMC->Gspos("TPS2",1,"TPS1",0.,0.,0.,0,"ONLY");
+
+ z0= 263.5;
+
+ gMC->Gspos("TPS1",1,"TPC ",0.,0.,z0,0,"ONLY");
+ gMC->Gspos("TPS1",2,"TPC ",0.,0.,-z0,0,"ONLY");
+
+ // G10 plug
+
+ dm[0] = 76.;
+ dm[2] = 78.;
+ dm[3] = 1.;
+
+ gMC->Gsvolu("TPG2","TUBE",idtmed[8],dm,3);
+
+ z0 = 251.;
+
+ gMC->Gspos("TPG2",1,"TPC ",0.,0.,z0,0,"ONLY");
+ gMC->Gspos("TPG2",2,"TPC ",0.,0.,-z0,0,"ONLY");
+
+
+ //---------------------------------------------------------
+ // central wheel 6 (radial direction) x 4 (along z) cm2
+ //---------------------------------------------------------
+
+ dm[0] = 140.;
+ dm[1] = 146.;
+ dm[2] = 2.;
+
+ gMC->Gsvolu("TPWC","TUBE",idtmed[0],dm,3);
+
+ dm[0] = dm[0] + 2.;
+ dm[1] = dm[1] - 2.;
+ dm[2] = dm[2] - 1.;
+
+ gMC->Gsposp("TPWI",2,"TPWC",0.,0.,0.,0,"ONLY",dm,3);
+
+ z0 = z_side - 1.9 - 2.;
+
+ gMC->Gspos("TPWC",1,"TPSG",0.,0.,z0,0,"ONLY");
+
+ //
+
+ gMC->Gsvolu("TPSE","BOX ",idtmed[24],dm,0); // "empty" part of the spoke
+
+
+ //---------------------------------------------------------
+ // inner spokes (nSectorInner)
+ //---------------------------------------------------------
+
+ dm[0] = 0.5*(139.9-82.1);
+ dm[1] = 3.;
+ dm[2] = 2.;
+
+ Float_t x1 = dm[0]+82.;
+
+ gMC->Gsvolu("TPSI","BOX",idtmed[0],dm,3);
+
+ dm[1] = dm[1]-1.;
+ dm[2] = dm[2]-1.;
+
+ gMC->Gsposp("TPSE",1,"TPSI",0.,0.,0.,0,"ONLY",dm,3);
+
+ for(ns=0;ns<nInnerSector;ns++){
+
+ phi1 = 0.5*InnerOpenAngle + ns*InnerOpenAngle + InnerAngleShift;
+ theta1=90.;
+ phi1 *=kRaddeg;
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+ if(phi1>360.) phi1 -= 360.;
+
+ phi2 = phi1+90.;
+ if(phi2>360.) phi2 -= 360.;
+ theta2=90.;
+ phi3=0.;
+ theta3=0.;
+
+ alpha = phi1 * kDegrad;
+ x = x1 * TMath::Cos(alpha);
+ y = x1 * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
+
+ gMC->Gspos("TPSI",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
+ }
+
+ //-------------------------------------------------------------
+ // outer spokes (nSectorOuter)
+ //-------------------------------------------------------------
+
+ dm[0] = 0.5*(257.9-146.1);
+ dm[1] = 3.;
+ dm[2] = 2.;
+
+ x1 = dm[0] + 146.;
+
+ gMC->Gsvolu("TPSO","BOX ",idtmed[0],dm,3);
+
+ dm[1] = dm[1] - 1.;
+ dm[2] = dm[2] - 1.;
+
+ gMC->Gsposp("TPSE",2,"TPSO",0.,0.,0.,0,"ONLY",dm,3);
+
+ for(ns=0;ns<nOuterSector;ns++){
+
+ phi1 = 0.5*OuterOpenAngle + ns*OuterOpenAngle + OuterAngleShift;
+ theta1=90.;
+ phi1 *=kRaddeg;
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+ if(phi1>360.) phi1 -= 360.;
+
+ phi2 = phi1+90.;
+ if(phi2>360.) phi2 -= 360.;
+ theta2=90.;
+ phi3=0.;
+ theta3=0.;
+
+ alpha = phi1 * kDegrad;
+ x = x1 * TMath::Cos(alpha);
+ y = x1 * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
+
+ gMC->Gspos("TPSO",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
+ }
+
+
+
+ // --------------------------------------------------------
+ // put the readout chambers into the TPC
+ // --------------------------------------------------------
+
+ theta1 = 90.;
+ phi1 = 0.;
+ theta2 = 90.;
+ phi2 = 270.;
+ theta3 = 180.;
+ phi3 = 0.;
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+ z0 = z_side + 250.;
+
+ gMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
+ gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[nRotMat], "ONLY");
+
+ gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
+
+ //----------------------------------------------------
+ // Inner vessel and HV degrader
+ //----------------------------------------------------
+
+ dm[0] = 0.;
+ dm[1] = 360.;
+ dm[2] = 4.;
+
+ dm[3] = -250.;
+ dm[4] = 74.4;
+ dm[5] = 76.;
+
+ dm[6] = -64.5;
+ dm[7] = 50.;
+ dm[8] = 76.;
+
+ dm[9] = -64.5;
+ dm[10] = 50.;
+ dm[11] = 76.;
+
+ dm[12] = 250.;
+ dm[13] = 74.4;
+ dm[14] = 76.;
+
+ gMC->Gsvolu("TPVD", "PCON", idtmed[12], dm, 15); // CO2
+
+ // cone parts
+
+ dm[0] = 0.;
+ dm[1] = 360.;
+ dm[2] = 2.;
+
+ dm[3] = 64.5;
+ dm[4] = 50.;
+ dm[5] = 51.6;
+
+ dm[6] = 250.;
+ dm[7] = 74.4;
+ dm[8] = 76.;
+
+
+ gMC->Gsvolu("TIVC","PCON",idtmed[11],dm,9); // C-fibre
+
+ gMC->Gspos("TIVC",1,"TPVD",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("TIVC",2,"TPVD",0.,0.,0.,idrotm[nRotMat],"ONLY");
+
+ // barrel part
+
+ dm[0] = 50.;
+ dm[1] = 50.5;
+ dm[2] = 32.25;
+
+ gMC->Gsvolu("TIVB","TUBE",idtmed[9],dm,3);
+
+ gMC->Gspos("TIVB",1,"TPVD",0.,0.,0.,0,"ONLY");
+
+ gMC->Gspos("TPVD",1,"ALIC",0.,0.,0.,0,"ONLY");
+
+
+ // ---------------------------------------------------
+ // volumes ordering
+ // ---------------------------------------------------
+
+ gMC->Gsord("TGAS", 6);
+ gMC->Gsord("TPSG", 6);
+
+
+
+} // end of function
//_____________________________________________________________________________
void AliTPCv2::DrawDetector()
gMC->Gsatt("TGAS","SEEN",0);
gMC->Gsatt("TPSG","SEEN",0);
gMC->Gsatt("TPHV","SEEN",1);
+ gMC->Gsatt("TPMH","SEEN",1);
+ gMC->Gsatt("TPEC","SEEN",0);
gMC->Gsatt("TRCS","SEEN",1);
gMC->Gsatt("TRCL","SEEN",1);
- gMC->Gsatt("TSWS","SEEN",1);
+ gMC->Gsatt("TPWL","SEEN",1);
+ gMC->Gsatt("TPWI","SEEN",1);
+ gMC->Gsatt("TPWS","SEEN",1);
gMC->Gsatt("TPW1","SEEN",1);
- gMC->Gsatt("TPW3","SEEN",1);
- gMC->Gsatt("TSPI","SEEN",1);
- gMC->Gsatt("TSPO","SEEN",1);
- gMC->Gsatt("TSWH","SEEN",1);
- gMC->Gsatt("TPOI","SEEN",1);
- gMC->Gsatt("TPIV","SEEN",1);
+ gMC->Gsatt("TPS1","SEEN",1);
+ gMC->Gsatt("TPS2","SEEN",1);
+ gMC->Gsatt("TPG1","SEEN",1);
+ gMC->Gsatt("TPG2","SEEN",1);
+ gMC->Gsatt("TPWC","SEEN",1);
+ gMC->Gsatt("TPSI","SEEN",1);
+ gMC->Gsatt("TPSO","SEEN",1);
+ gMC->Gsatt("TPCO","SEEN",1);
+ gMC->Gsatt("TPOV","SEEN",1);
gMC->Gsatt("TPVD","SEEN",1);
//
gMC->Gdopt("hide", "on");
Int_t vol[2];
TClonesArray &lhits = *fHits;
TLorentzVector pos;
+
+ AliTPCParam *fTPCParam = &(fDigParam->GetParam());
vol[1]=0;
if(id == fIdSens1)
{
- vol[0] = copy + 24; // L-sector number
+ vol[0] = copy + fTPCParam->GetNInnerSector()-1; // L-sector number
}
else if(id == fIdSens2)
{
- vol[0] = copy; // S-sector number
+ vol[0] = copy-1; // S-sector number
}
else if(id == fIdSens3 && gMC->IsTrackEntering())
{
- vol[1] = copy; // row number
+ vol[1] = copy-1; // row number
id = gMC->CurrentVolOffID(1,copy);
- vol[0] = copy; // sector number (S-sector)
+ vol[0] = copy-1; // sector number (S-sector)
gMC->TrackPosition(pos);
hits[0]=pos[0];
}
else if(id == fIdSens4 && gMC->IsTrackEntering())
{
- vol[1] = copy; // row number
+ vol[1] = copy-1; // row number
id = gMC->CurrentVolOffID(1,copy);
- vol[0] = copy+24; // sector number (L-sector)
+ vol[0] = copy+fTPCParam->GetNInnerSector()-1; // sector number (L-sector)
gMC->TrackPosition(pos);
hits[0]=pos[0];
#include "AliTPCv3.h"
#include "AliRun.h"
#include "AliConst.h"
+#include "AliTPCD.h"
+#include"AliTPCParam.h"
ClassImp(AliTPCv3)
void AliTPCv3::CreateGeometry()
{
//
- // Create the geometry of Time Projection Chamber version 3
+ // Creation of the TPC coarse geometry (version 0)
+ // Origin Marek Kowalski Crakow
//
//Begin_Html
/*
- <img src="picts/AliTPCv3.gif">
+ <img src="picts/AliTPCv0.gif">
*/
//End_Html
//Begin_Html
/*
- <img src="picts/AliTPCv3Tree.gif">
+ <img src="picts/AliTPCv0Tree.gif">
*/
//End_Html
- Int_t *idtmed = fIdtmed->GetArray()-399;
+ AliTPCParam * fTPCParam = &(fDigParam->GetParam());
- Float_t tana, rlsl, wlsl, rssl, rlsu, wssl, wlsu,
- rssu, wssu, alpha, x, y, sec_thick;
-
- Float_t x1, z0, z1, x2, theta1, theta2, theta3, dm[21];
- Int_t il, iu;
- Float_t z_side;
+ Int_t *idtmed = fIdtmed->GetArray();
+
+ Float_t dm[21];
Int_t idrotm[100];
-
- Float_t x0l, x0u;
- Int_t idr;
- //Float_t thl, thu;
- Float_t opl, opu, phi1, phi2, phi3;
-
+
+ Int_t nRotMat = 0;
+
+
// ----------------------------------------------------
- // FIELD CAGE WITH ENDCAPS - CARBON FIBER
+ // FIELD CAGE WITH ENDCAPS - G10
// THIS IS ALSO A TPC MOTHER VOLUME
// ----------------------------------------------------
+
dm[0] = 76.;
dm[1] = 278.;
dm[2] = 275.;
-
- gMC->Gsvolu("TPC ", "TUBE", idtmed[407], dm, 3);
- // -------------------------------------------------------
- // drift gas Ne/CO2 (90/10 volume) - sensitive
- // field cage thickness = 0.52% X0
- // ----------------------------------------------------
- dm[0] = 76.+0.09776;
- dm[1] = 257.;
+
+ gMC->Gsvolu("TPC ", "TUBE", idtmed[8], dm, 3);
+
+ //-----------------------------------------------------
+ // Endcap cover c-fibre 0.86% X0
+ //-----------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
+ dm[2] = 0.95;
+
+ gMC->Gsvolu("TPEC","TUBE",idtmed[10],dm,3);
+
+ //-----------------------------------------------------
+ // Drift gas , leave 2 cm at the outer radius
+ // and inner raddius
+ //-----------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
dm[2] = 250.;
- gMC->Gsvolu("TGAS", "TUBE", idtmed[403], dm, 3);
- // ------------------------------------------------------
- // "side" gas volume (the same as drift gas)
- // here the readout chambers are positioned
- // ------------------------------------------------------
- dm[2] = 0.5*(275.-250.);
- z_side = dm[2];
-
- gMC->Gsvolu("TPSG", "TUBE", idtmed[401], dm, 3);
- // ------------------------------------------------------
- // HV midplane - 20 microns of mylar
- // -----------------------------------------------------
- dm[2] = .001;
-
- gMC->Gsvolu("TPHV", "TUBE", idtmed[405], dm, 3);
-
- // ====================================================
- // lower and upper readout chambers
- // ====================================================
- // sectros opening angles in degrees
- // ---------------------------------------------------
- opl = 30.;
- opu = 15.;
- //thl = TMath::Tan(opl * .5 * kDegrad);
- //thu = TMath::Tan(opu * .5 * kDegrad);
- // ---------------------------------------------------
- // S and L-sectors radii
- // ---------------------------------------------------
- rssl = 88.;
- rssu = 136.;
- rlsl = 142.;
- rlsu = 250.;
- // --------------------------------------------------
- // Sectors widths
- // --------------------------------------------------
- wssl = 46.5;
- wssu = 72.2;
- wlsl = 37.;
- wlsu = 65.4;
- // ---------------------------------------------------
- // Sector thickness 25% of X0 (Al)
- // ---------------------------------------------------
- sec_thick = 2.225;
- // ---------------------------------------------------
- // S-sectors readout chambers (lower sectors)
- // ---------------------------------------------------
- dm[0] = wssl * .5;
- dm[1] = wssu * .5;
- dm[2] = sec_thick * .5;
- dm[3] = (rssu - rssl) * .5;
-
- x0l = rssl + dm[3];
-
- gMC->Gsvolu("TRCS", "TRD1", idtmed[399], dm, 4);
- // ---------------------------------------------------
- // L-sectors readout chambers (upper sectors)
- // ---------------------------------------------------
- dm[0] = wlsl * .5;
- dm[1] = wlsu * .5;
- dm[2] = sec_thick * .5;
- dm[3] = (rlsu - rlsl) * .5;
-
- x0u = rlsl + dm[3];
-
- gMC->Gsvolu("TRCL", "TRD1", idtmed[399], dm, 4);
- // ----------------------------------------------------
- // positioning of the S-sector readout chambers
- // rotation matices 1-12
- // ----------------------------------------------------
- z1 = -z_side + sec_thick * .5;
+ gMC->Gsvolu("TGAS", "TUBE", idtmed[4], dm, 3);
- for (il = 1; il <= 12; ++il) {
- phi1 = (il - 1) * opl + 270.;
- if (phi1 > 360.) {
- phi1 += -360.;
- }
+
+ //------------------------------------------------------
+ // membrane holder - carbon fiber
+ //------------------------------------------------------
+
+
+ gMC->Gsvolu("TPMH","TUBE",idtmed[6],dm,0);
+
+ dm[0] = 252.;
+ dm[1] = 258.;
+ dm[2] = 0.2;
+
+ gMC->Gsposp("TPMH",1,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
+
+ dm[0] = 78.;
+ dm[2] = 82.;
+ dm[2] = 0.1;
+
+ gMC->Gsposp("TPMH",2,"TGAS",0.,0.,0.,0,"ONLY",dm,3);
+
+ //----------------------------------------------------------
+ // HV membrane - 25 microns of mylar
+ //----------------------------------------------------------
+
+ dm[0] = 82.;
+ dm[1] = 252.;
+ dm[2] = 0.00125;
+
+ gMC->Gsvolu("TPHV","TUBE",idtmed[5],dm,3);
+
+ gMC->Gspos("TPHV",1,"TGAS",0.,0.,0.,0,"ONLY");
+
+ gMC->Gspos("TGAS",1,"TPC ",0.,0.,0.,0,"ONLY");
+
+ //----------------------------------------------------------
+ // "side" gas volume, the same as the drift gas
+ // the readout chambers are placed there.
+ //----------------------------------------------------------
+
+ dm[0] = 78.;
+ dm[1] = 258.;
+ dm[2] = 0.5*(275. - 250.);
+
+ gMC->Gsvolu("TPSG", "TUBE", idtmed[2], dm, 3);
+
+ Float_t z_side = dm[2]; // 1/2 of the side gas thickness
+
+ //-----------------------------------------------------------
+ // Readout chambers , 25% of X0, I use Al as the material
+ //-----------------------------------------------------------
+
+ Float_t InnerOpenAngle = fTPCParam->GetInnerAngle();
+ Float_t OuterOpenAngle = fTPCParam->GetOuterAngle();
+
+ Float_t InnerAngleShift = fTPCParam->GetInnerAngleShift();
+ Float_t OuterAngleShift = fTPCParam->GetOuterAngleShift();
+
+
+ Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
+ Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
+
+
+ Float_t InSecLowEdge = fTPCParam->GetInSecLowEdge();
+ Float_t InSecUpEdge = fTPCParam->GetInSecUpEdge();
+
+ Float_t OuSecLowEdge = fTPCParam->GetOuSecLowEdge();
+ Float_t OuSecUpEdge = fTPCParam->GetOuSecUpEdge();
+
+ Float_t SecThick = 2.225; // Al
+
+ Float_t edge = fTPCParam->GetEdge();
+
+ // S (Inner) sectors
+
+ dm[0] = InSecLowEdge*TMath::Tan(0.5*InnerOpenAngle)-edge;
+ dm[1] = InSecUpEdge*TMath::Tan(0.5*InnerOpenAngle)-edge;
+ dm[2] = SecThick;
+ dm[3] = 0.5*(InSecUpEdge-InSecLowEdge);
+
+ Float_t xCenterS = InSecLowEdge+dm[3];
+
+ gMC->Gsvolu("TRCS", "TRD1", idtmed[0], dm, 4);
+
+ // L (Outer) sectors
+
+ dm[0] = OuSecLowEdge*TMath::Tan(0.5*OuterOpenAngle)-edge;
+ dm[1] = OuSecUpEdge*TMath::Tan(0.5*OuterOpenAngle)-edge;
+ dm[2] = SecThick;
+ dm[3] = 0.5*(OuSecUpEdge-OuSecLowEdge);
+
+ Float_t xCenterL = OuSecLowEdge+dm[3];
+
+ gMC->Gsvolu("TRCL", "TRD1", idtmed[0], dm, 4);
+
+ Float_t z1 = -z_side + SecThick*0.5;
+
+ //------------------------------------------------------------------
+ // Positioning of the S-sector readout chambers
+ //------------------------------------------------------------------
+
+ Int_t ns;
+ Float_t theta1,theta2,theta3;
+ Float_t phi1,phi2,phi3;
+ Float_t alpha;
+ Float_t x,y;
+
+ for(ns=0;ns<nInnerSector;ns++){
+
+ phi1 = ns * InnerOpenAngle + 270.*kDegrad + InnerAngleShift;
+ phi1 *= kRaddeg; // in degrees
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+
+ if (phi1 > 360.) phi1 -= 360.;
+
theta1 = 90.;
phi2 = 90.;
theta2 = 180.;
- phi3 = (il - 1) * opl;
+ phi3 = ns * InnerOpenAngle + InnerAngleShift;
+ phi3 *= kRaddeg; // in degrees
+
+ phi3 = (Float_t)TMath::Nint(phi3);
+
+ if(phi3 > 360.) phi3 -= 360.;
+
theta3 = 90.;
+
+ alpha = phi3*kDegrad;
+
+ x = xCenterS * TMath::Cos(alpha);
+ y = xCenterS * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+ gMC->Gspos("TRCS", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
+
+ nRotMat++;
+
+ }
- idr = il;
+ //-------------------------------------------------------------------
+ // Positioning of the L-sectors readout chambers
+ //-------------------------------------------------------------------
- alpha = (il - 1) * opl * kDegrad;
- x = x0l * TMath::Cos(alpha);
- y = x0l * TMath::Sin(alpha);
+ for(ns=0;ns<nOuterSector;ns++){
+ phi1 = ns * OuterOpenAngle + 270.*kDegrad + OuterAngleShift;
+ phi1 *= kRaddeg; // in degrees
+
+ phi1 = (Float_t)TMath::Nint(phi1);
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TRCS", il, "TPSG", x, y, z1, idrotm[idr], "ONLY");
- }
- // ----------------------------------------------------
- // positioning of the L-sector readout chambers
- // rotation matices 13-36
- // ----------------------------------------------------
- for (iu = 1; iu <= 24; ++iu) {
- phi1 = (iu - 1) * opu + 270.;
- if (phi1 > 360.) {
- phi1 += -360.;
- }
+
+ if (phi1 > 360.) phi1 -= 360.;
+
theta1 = 90.;
phi2 = 90.;
theta2 = 180.;
- phi3 = (iu - 1) * opu;
+ phi3 = ns * OuterOpenAngle+OuterAngleShift;
+ phi3 *= kRaddeg; // in degrees
+
+ phi3 = (Float_t)TMath::Nint(phi3);
+
+
+ if(phi3 > 360.) phi3 -= 360.;
+
theta3 = 90.;
-
- idr = iu + 12;
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
-
- alpha = (iu - 1) * opu * kDegrad;
- x = x0u * TMath::Cos(alpha);
- y = x0u * TMath::Sin(alpha);
-
- gMC->Gspos("TRCL", iu, "TPSG", x, y, z1, idrotm[idr], "ONLY");
+
+ alpha = phi3*kDegrad;
+
+ x = xCenterL * TMath::Cos(alpha);
+ y = xCenterL * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
+
+
+ gMC->Gspos("TRCL", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY");
+
+ nRotMat++;
+
}
- // --------------------------------------------------------
- // Spoke wheel structures
- // --------------------------------------------------------
- gMC->Gsvolu("TSWS", "TUBE", idtmed[399], dm, 0);
-
- z0 = -z_side + 2.;
-
- dm[0] = 82.;
- dm[1] = 86.;
- dm[2] = 1.;
-
- gMC->Gsposp("TSWS", 1, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- dm[0] = 253.;
- dm[1] = 257.;
-
- gMC->Gsposp("TSWS", 2, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- dm[0] = 140.9;
- dm[1] = 141.9;
-
- gMC->Gsposp("TSWS", 3, "TPSG", 0, 0, z0, 0, "ONLY", dm, 3);
-
- // -------------------------------------------------------
- // this volumes are to avoid overlaping
- // -------------------------------------------------------
- z0 = 253.;
-
- dm[0] = 76.;
- dm[1] = 76.+0.09776;
-
- gMC->Gsposp("TSWS", 4, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 5, "TPC ", 0, 0, -z0,0, "ONLY", dm, 3);
-
- z0 += 21.;
-
- gMC->Gsposp("TSWS", 6, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 7, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
-
- dm[0] = 257.;
- dm[1] = 257.+0.09776;
- dm[2] = 11.5;
-
- z0 = 263.5;
-
- gMC->Gsposp("TSWS", 8, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 9, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
+
+ Float_t z0 = z_side - 0.95;
+
+ gMC->Gspos("TPEC",1,"TPSG",0.,0.,z0,0,"ONLY");
+
// ==========================================================
// wheels
// ==========================================================
+
+ //
+ // auxilary structures
+ //
+
+
+ gMC->Gsvolu("TPWI","TUBE",idtmed[24],dm,0); // "air"
+
// ----------------------------------------------------------
// Large wheel -> positioned in the TPC
// ----------------------------------------------------------
- dm[0] = 257.+0.09776;
+
+
+ z0 = 263.5; // TPC length - 1/2 spoke wheel width
+
+ dm[0] = 258.;
dm[1] = 278.;
dm[2] = 11.5;
- gMC->Gsvolu("TPW1", "TUBE", idtmed[399], dm, 3);
- dm[0] = 259.;
+ gMC->Gsvolu("TPWL", "TUBE", idtmed[0], dm, 3);
+
+ dm[0] = dm[0]+2.;
+ dm[1] = 278.;
+ dm[2] = dm[2]-2.;
+
+ gMC->Gsposp("TPWI",1,"TPWL",0.,0.,0.,0,"ONLY",dm,3);
+
+ gMC->Gspos("TPWL", 1, "TPC ", 0, 0, z0, 0, "ONLY");
+ gMC->Gspos("TPWL", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
+
+ //
+ // Outer vessel + CO2 HV degrader
+ //
+
+ dm[0] = 260.;
+ dm[1] = 278.;
+ dm[2] = 252.;
+
+ gMC->Gsvolu("TPCO","TUBE",idtmed[12],dm,3);
+
+ dm[0] = 275.;
dm[1] = 278.;
- dm[2] = 9.5;
-
- gMC->Gsvolu("TPW2", "TUBE", idtmed[498], dm, 3);
-
- gMC->Gspos("TPW2", 1, "TPW1", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TPW1", 1, "TPC ", 0, 0, z0, 0, "ONLY");
- gMC->Gspos("TPW1", 2, "TPC ", 0, 0, -z0, 0, "ONLY");
- // -----------------------------------------------------------
- // Small wheel -> positioned in the TPSG
- // -----------------------------------------------------------
- dm[0] = 76.+0.09776;
+ gMC->Gsvolu("TPOV","TUBE",idtmed[10],dm,3);
+
+ gMC->Gspos("TPOV",1,"TPCO",0.,0.,0.,0,"ONLY");
+
+
+ // G10 plugs
+
+ dm[0] = 258.;
+ dm[1] = 260.;
+ dm[2] = 1.;
+
+ gMC->Gsvolu("TPG1","TUBE",idtmed[8],dm,3);
+ gMC->Gspos("TPG1",1,"TPCO",0.,0.,251.,0,"ONLY");
+ gMC->Gspos("TPG1",2,"TPCO",0.,0.,-251.,0,"ONLY");
+
+ gMC->Gspos("TPCO",1,"TPC ",0.,0.,0.,0,"ONLY");
+
+
+ //----------------------------------------------------------
+ // Small wheel -> positioned in "side gas
+ //----------------------------------------------------------
+
+ dm[0] = 78.;
dm[1] = 82.;
dm[2] = 11.5;
+
+ gMC->Gsvolu("TPWS", "TUBE", idtmed[0], dm, 3);
+
+ dm[0] = 78.;
+ dm[1] = dm[1]-2;
+ dm[2] = dm[2]-2.;
+
+ gMC->Gsvolu("TPW1", "TUBE", idtmed[2], dm, 3);
- gMC->Gsvolu("TPW3", "TUBE", idtmed[399], dm, 3);
-
- dm[0] = 76.+0.09776;
- dm[1] = 80.;
+ gMC->Gspos("TPW1", 1, "TPWS", 0., 0., 0., 0, "ONLY");
+
+ z0 = 1.; // spoke wheel is shifted w.r.t. center of the "side gas"
+
+ gMC->Gspos("TPWS", 1, "TPSG", 0, 0, z0, 0, "ONLY");
+
+
+ // to avoid overlaps
+
+ dm[0] = 76.;
+ dm[1] = 78.;
+ dm[2] = 11.5;
+
+ gMC->Gsvolu("TPS1","TUBE",idtmed[0],dm,3);
+
dm[2] = 9.5;
+
+ gMC->Gsvolu("TPS2","TUBE",idtmed[24],dm,3);
+
+ gMC->Gspos("TPS2",1,"TPS1",0.,0.,0.,0,"ONLY");
+
+ z0= 263.5;
- gMC->Gsvolu("TPW4", "TUBE", idtmed[401], dm, 3);
-
- gMC->Gspos("TPW4", 1, "TPW3", 0, 0, 0, 0, "ONLY");
-
- z0 = 1.;
-
- gMC->Gspos("TPW3", 1, "TPSG", 0, 0, z0, 0, "ONLY");
- // ---------------------------------------------------------
- // spokes, inner and outer, also the inner ring
- // ---------------------------------------------------------
- dm[0] = 0.5*(135.9-82.1);
- dm[1] = 3.;
+ gMC->Gspos("TPS1",1,"TPC ",0.,0.,z0,0,"ONLY");
+ gMC->Gspos("TPS1",2,"TPC ",0.,0.,-z0,0,"ONLY");
+
+ // G10 plug
+
+ dm[0] = 76.;
+ dm[2] = 78.;
+ dm[3] = 1.;
+
+ gMC->Gsvolu("TPG2","TUBE",idtmed[8],dm,3);
+
+ z0 = 251.;
+
+ gMC->Gspos("TPG2",1,"TPC ",0.,0.,z0,0,"ONLY");
+ gMC->Gspos("TPG2",2,"TPC ",0.,0.,-z0,0,"ONLY");
+
+
+ //---------------------------------------------------------
+ // central wheel 6 (radial direction) x 4 (along z) cm2
+ //---------------------------------------------------------
+
+ dm[0] = 140.;
+ dm[1] = 146.;
dm[2] = 2.;
-
- x1 = dm[0] + 82.;
-
- gMC->Gsvolu("TSPI", "BOX ", idtmed[399], dm, 3);
-
- dm[1] = 2.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSP1", "BOX ", idtmed[498], dm, 3);
- gMC->Gspos("TSP1", 1, "TSPI", 0, 0, 0, 0, "ONLY");
-
- dm[0] = 0.5*(256.9-142.1);
+ gMC->Gsvolu("TPWC","TUBE",idtmed[0],dm,3);
+
+ dm[0] = dm[0] + 2.;
+ dm[1] = dm[1] - 2.;
+ dm[2] = dm[2] - 1.;
+
+ gMC->Gsposp("TPWI",2,"TPWC",0.,0.,0.,0,"ONLY",dm,3);
+
+ z0 = z_side - 1.9 - 2.;
+
+ gMC->Gspos("TPWC",1,"TPSG",0.,0.,z0,0,"ONLY");
+
+ //
+
+ gMC->Gsvolu("TPSE","BOX ",idtmed[24],dm,0); // "empty" part of the spoke
+
+
+ //---------------------------------------------------------
+ // inner spokes (nSectorInner)
+ //---------------------------------------------------------
+
+ dm[0] = 0.5*(139.9-82.1);
dm[1] = 3.;
dm[2] = 2.;
-
- x2 = dm[0] + 142.;
-
- gMC->Gsvolu("TSPO", "BOX ", idtmed[399], dm, 3);
-
- dm[1] = 2.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSP2", "BOX ", idtmed[498], dm, 3);
-
- gMC->Gspos("TSP2", 1, "TSPO", 0, 0, 0, 0, "ONLY");
- // --------------------------------------------------------
- dm[0] = 136.;
- dm[1] = 142.;
- dm[2] = 2.;
-
- gMC->Gsvolu("TSWH", "TUBE", idtmed[399], dm, 3);
-
- dm[0] = 137.;
- dm[1] = 141.;
- dm[2] = 1.;
-
- gMC->Gsvolu("TSW1", "TUBE", idtmed[498], dm, 3);
-
- gMC->Gspos("TSW1", 1, "TSWH", 0, 0, 0, 0, "ONLY");
-
- z0 = z_side - .16168 - 2.;
- // --------------------------------------------------------
- gMC->Gspos("TSWH", 1, "TPSG", 0, 0, z0, 0, "ONLY");
- // -------------------------------------------------------
- // posiioning of the inner spokes
- // -------------------------------------------------------
- for (il = 1; il <= 6; ++il) {
- phi1 = opl * .5 + (il - 1) * 2. * opl;
- theta1 = 90.;
- phi2 = opl * .5 + 90. + (il - 1) * 2. * opl;
- if (phi2 > 360.) {
- phi2 += -360.;
- }
- theta2 = 90.;
- phi3 = 0.;
- theta3 = 0.;
-
+
+ Float_t x1 = dm[0]+82.;
+
+ gMC->Gsvolu("TPSI","BOX",idtmed[0],dm,3);
+
+ dm[1] = dm[1]-1.;
+ dm[2] = dm[2]-1.;
+
+ gMC->Gsposp("TPSE",1,"TPSI",0.,0.,0.,0,"ONLY",dm,3);
+
+ for(ns=0;ns<nInnerSector;ns++){
+
+ phi1 = 0.5*InnerOpenAngle + ns*InnerOpenAngle + InnerAngleShift;
+ theta1=90.;
+ phi1 *=kRaddeg;
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+
+ phi2 = phi1+90.;
+ if(phi2>360.) phi2 -= 360.;
+ theta2=90.;
+ phi3=0.;
+ theta3=0.;
+
alpha = phi1 * kDegrad;
x = x1 * TMath::Cos(alpha);
- y = x1 * TMath::Sin(alpha);
-
- idr = il + 36;
-
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TSPI", il, "TPSG", x, y, z0, idrotm[idr], "ONLY");
-
+ y = x1 * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
+
+ gMC->Gspos("TPSI",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
}
-
- for (iu = 1; iu <= 12; ++iu) {
- phi1 = opu * .5 + (iu - 1) * 2. * opu;
- theta1 = 90.;
- phi2 = opu * .5 + 90. + (iu - 1) * 2. * opu;
- if (phi2 > 360.) {
- phi2 += -360.;
- }
- theta2 = 90.;
- phi3 = 0.;
- theta3 = 0.;
-
+
+ //-------------------------------------------------------------
+ // outer spokes (nSectorOuter)
+ //-------------------------------------------------------------
+
+ dm[0] = 0.5*(257.9-146.1);
+ dm[1] = 3.;
+ dm[2] = 2.;
+
+ x1 = dm[0] + 146.;
+
+ gMC->Gsvolu("TPSO","BOX ",idtmed[0],dm,3);
+
+ dm[1] = dm[1] - 1.;
+ dm[2] = dm[2] - 1.;
+
+ gMC->Gsposp("TPSE",2,"TPSO",0.,0.,0.,0,"ONLY",dm,3);
+
+ for(ns=0;ns<nOuterSector;ns++){
+
+ phi1 = 0.5*OuterOpenAngle + ns*OuterOpenAngle + OuterAngleShift;
+ theta1=90.;
+ phi1 *=kRaddeg;
+
+ phi1 = (Float_t)TMath::Nint(phi1);
+
+ phi2 = phi1+90.;
+ if(phi2>360.) phi2 -= 360.;
+ theta2=90.;
+ phi3=0.;
+ theta3=0.;
+
alpha = phi1 * kDegrad;
- x = x2 * TMath::Cos(alpha);
- y = x2 * TMath::Sin(alpha);
-
- idr = iu + 42;
-
- AliMatrix(idrotm[idr], theta1, phi1, theta2, phi2, theta3, phi3);
- gMC->Gspos("TSPO", iu, "TPSG", x, y, z0, idrotm[idr], "ONLY");
- }
- // --------------------------------------------------------
- // endcap cover (C, 0.86% X0)
- // --------------------------------------------------------
- dm[0] = 76.+0.09776;
- dm[1] = 257.;
- dm[2] = 0.16168*0.5;
-
- gMC->Gsvolu("TCOV", "TUBE", idtmed[407], dm, 3);
+ x = x1 * TMath::Cos(alpha);
+ y = x1 * TMath::Sin(alpha);
+
+ AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3);
+
+ gMC->Gspos("TPSO",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY");
+
+ nRotMat++;
+
+ }
- z0 = z_side - dm[2];
+
- gMC->Gspos("TCOV", 1, "TPSG", 0, 0, z0, 0, "ONLY");
// --------------------------------------------------------
// put the readout chambers into the TPC
// --------------------------------------------------------
+
theta1 = 90.;
phi1 = 0.;
theta2 = 90.;
theta3 = 180.;
phi3 = 0.;
- AliMatrix(idrotm[55], theta1, phi1, theta2, phi2, theta3, phi3);
+ AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
z0 = z_side + 250.;
gMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY");
- gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[55], "ONLY");
- // ---------------------------------------------------------
- // outer gas insulation (CO2)
- // ---------------------------------------------------------
- dm[0] = 257.+0.09776;
- dm[1] = 278.-0.25004;
- dm[2] = 275.-23.;
-
- gMC->Gsvolu("TPOI", "TUBE", idtmed[406], dm, 3);
-
- gMC->Gspos("TPHV", 1, "TGAS", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TGAS", 1, "TPC ", 0, 0, 0, 0, "ONLY");
- gMC->Gspos("TPOI", 1, "TPC ", 0, 0, 0, 0, "ONLY");
+ gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[nRotMat], "ONLY");
gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
- // ======================================================
- // all volumes below are positioned in ALIC
- // ======================================================
- // ------------------------------------------------------
- // the last parts of the smaller wheel (TSWS)
- // ------------------------------------------------------
- dm[0] = 74.;
- dm[1] = 76.;
- dm[2] = 1.;
-
- z0 = 253.;
-
- gMC->Gsposp("TSWS", 10, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 11, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
-
- dm[0] = 70.;
-
- z0 += 21.;
-
- gMC->Gsposp("TSWS", 12, "TPC ", 0, 0, z0, 0, "ONLY", dm, 3);
- gMC->Gsposp("TSWS", 13, "TPC ", 0, 0, -z0, 0, "ONLY", dm, 3);
- // ----------------------------------------------------
- // Inner vessel (PCON)
- // This volume is to be positioned directly in ALIC
- // ----------------------------------------------------
+
+ //----------------------------------------------------
+ // Inner vessel and HV degrader
+ //----------------------------------------------------
+
dm[0] = 0.;
dm[1] = 360.;
dm[2] = 4.;
dm[3] = -250.;
- dm[4] = 75.;
+ dm[4] = 74.4;
dm[5] = 76.;
-
+
dm[6] = -64.5;
dm[7] = 50.;
dm[8] = 76.;
-
- dm[9] = 64.5;
+
+ dm[9] = -64.5;
dm[10] = 50.;
dm[11] = 76.;
-
+
dm[12] = 250.;
- dm[13] = 75.;
+ dm[13] = 74.4;
dm[14] = 76.;
-
- gMC->Gsvolu("TPIV", "PCON", idtmed[407], dm, 15);
- // --------------------------------------------------------
- // fill the inner vessel with CO2, (HV kDegrader)
- // cone parts have different thickness
- // than the central barrel, according to the TP
- // --------------------------------------------------------
- tana = 75./185.5;
-
+
+ gMC->Gsvolu("TPVD", "PCON", idtmed[12], dm, 15); // CO2
+
+ // cone parts
+
dm[0] = 0.;
dm[1] = 360.;
- dm[2] = 6.;
-
- dm[3] = -(250.-0.2162);
- dm[4] = (185.5-0.2126)*tana+0.2126;
- dm[5] = 76-0.001;
-
- dm[6] = -64.5;
- dm[7] = 50.+0.2162;
- dm[8] = 76-0.001;
-
- dm[9] = -64.5;
- dm[10] = 50+0.05076;
- dm[11] = 76-0.001;
-
- dm[12] = 64.5;
- dm[13] = 50+0.05076;
- dm[14] = 76-0.001;
-
- dm[15] = 64.5;
- dm[16] = 50.+0.2162;
- dm[17] = 76-0.001;
-
- dm[18] = (250.-0.2162);
- dm[19] = (185.5-0.2126)*tana+0.2126;
- dm[20] = 76-0.001;
-
- gMC->Gsvolu("TPVD", "PCON", idtmed[406], dm, 21);
+ dm[2] = 2.;
+
+ dm[3] = 64.5;
+ dm[4] = 50.;
+ dm[5] = 51.6;
+
+ dm[6] = 250.;
+ dm[7] = 74.4;
+ dm[8] = 76.;
+
+
+ gMC->Gsvolu("TIVC","PCON",idtmed[11],dm,9); // C-fibre
+
+ gMC->Gspos("TIVC",1,"TPVD",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("TIVC",2,"TPVD",0.,0.,0.,idrotm[nRotMat],"ONLY");
+
+ // barrel part
+
+ dm[0] = 50.;
+ dm[1] = 50.5;
+ dm[2] = 32.25;
+
+ gMC->Gsvolu("TIVB","TUBE",idtmed[9],dm,3);
+
+ gMC->Gspos("TIVB",1,"TPVD",0.,0.,0.,0,"ONLY");
+
+ gMC->Gspos("TPVD",1,"ALIC",0.,0.,0.,0,"ONLY");
+
- gMC->Gspos("TPVD", 1, "TPIV", 0, 0, 0, 0, "ONLY");
+
- gMC->Gspos("TPIV", 1, "ALIC", 0, 0, 0, 0, "ONLY");
+
// ---------------------------------------------------
// volumes ordering
// ---------------------------------------------------
gMC->Gsord("TPSG", 6);
-}
+
+} // end of function
+
//_____________________________________________________________________________
gMC->Gsatt("TGAS","SEEN",0);
gMC->Gsatt("TPSG","SEEN",0);
gMC->Gsatt("TPHV","SEEN",1);
+ gMC->Gsatt("TPMH","SEEN",1);
+ gMC->Gsatt("TPEC","SEEN",0);
gMC->Gsatt("TRCS","SEEN",1);
gMC->Gsatt("TRCL","SEEN",1);
- gMC->Gsatt("TSWS","SEEN",1);
+ gMC->Gsatt("TPWL","SEEN",1);
+ gMC->Gsatt("TPWI","SEEN",1);
+ gMC->Gsatt("TPWS","SEEN",1);
gMC->Gsatt("TPW1","SEEN",1);
- gMC->Gsatt("TPW2","SEEN",1);
- gMC->Gsatt("TPW3","SEEN",1);
- gMC->Gsatt("TPW4","SEEN",1);
- gMC->Gsatt("TSPI","SEEN",1);
- gMC->Gsatt("TSP1","SEEN",0);
- gMC->Gsatt("TSPO","SEEN",1);
- gMC->Gsatt("TSP2","SEEN",0);
- gMC->Gsatt("TSWH","SEEN",1);
- gMC->Gsatt("TSW1","SEEN",1);
- gMC->Gsatt("TPOI","SEEN",1);
- gMC->Gsatt("TPIV","SEEN",1);
+ gMC->Gsatt("TPS1","SEEN",1);
+ gMC->Gsatt("TPS2","SEEN",1);
+ gMC->Gsatt("TPG1","SEEN",1);
+ gMC->Gsatt("TPG2","SEEN",1);
+ gMC->Gsatt("TPWC","SEEN",1);
+ gMC->Gsatt("TPSI","SEEN",1);
+ gMC->Gsatt("TPSO","SEEN",1);
+ gMC->Gsatt("TPCO","SEEN",1);
+ gMC->Gsatt("TPOV","SEEN",1);
gMC->Gsatt("TPVD","SEEN",1);
//
gMC->Gdopt("hide", "on");
#pragma link C++ class AliTPCPRF2D-;
-//Marian Ivanov objects - doesn't go to oficial version
-#pragma link C++ class AliArrayI; //MI change 18.5.1999 - maybe better to change it in Root
-#pragma link C++ class AliArrayS; //MI change 18.5.1999 - maybe better to change it in Root
-
-#pragma link C++ class AliSegment;
-#pragma link C++ class AliSegmentArray;
-#pragma link C++ class AliDigits;
-#pragma link C++ class AliSimDigits;
-
-#pragma link C++ class AliTPCDigitsH-;
-#pragma link C++ class AliClusterFinder-;
-#pragma link C++ class AliCluster;
-#pragma link C++ class THit;
-#pragma link C++ class THitPAngle;
-#pragma link C++ class AliTPCup-;
-#pragma link C++ class AliH2F;
-#pragma link C++ class AliTPCClustersRow;
-#pragma link C++ class AliTPCClustersArray;
-
#endif
//void ViewTPC()
{
- gMC->Gsatt("TPC ","seen",0);
- gMC->Gsatt("TGAS","seen",0);
- gMC->Gsatt("TPSG","seen",0);
- gMC->Gsatt("TPHV","seen",1);
- gMC->Gsatt("TRCS","seen",1);
- gMC->Gsatt("TSGA","seen",-1);
- gMC->Gsatt("TRCL","seen",1);
- gMC->Gsatt("TLGA","seen",-1);
- gMC->Gsatt("TSWS","seen",1);
- gMC->Gsatt("TPW1","seen",1);
- gMC->Gsatt("TPW2","seen",1);
- gMC->Gsatt("TPW3","seen",1);
- gMC->Gsatt("TPW4","seen",1);
- gMC->Gsatt("TSPI","seen",1);
- gMC->Gsatt("TSP1","seen",0);
- gMC->Gsatt("TSPO","seen",1);
- gMC->Gsatt("TSP2","seen",0);
- gMC->Gsatt("TSWH","seen",1);
- gMC->Gsatt("TSW1","seen",0);
- gMC->Gsatt("TCOV","seen",0);
- gMC->Gsatt("TPOI","seen",1);
- gMC->Gsatt("TPIV","seen",1);
- gMC->Gsatt("TPVD","seen",1);
+ gMC->Gsatt("TPC","SEEN",0);
+ gMC->Gsatt("TGAS","SEEN",0);
+ gMC->Gsatt("TPSG","SEEN",0);
+ gMC->Gsatt("TPHV","SEEN",1);
+ gMC->Gsatt("TPMH","SEEN",1);
+ gMC->Gsatt("TPEC","SEEN",0);
+ gMC->Gsatt("TRCS","SEEN",1);
+ gMC->Gsatt("TRCL","SEEN",1);
+ gMC->Gsatt("TPWL","SEEN",1);
+ gMC->Gsatt("TPWI","SEEN",1);
+ gMC->Gsatt("TPWS","SEEN",1);
+ gMC->Gsatt("TPW1","SEEN",1);
+ gMC->Gsatt("TPS1","SEEN",1);
+ gMC->Gsatt("TPS2","SEEN",1);
+ gMC->Gsatt("TPG1","SEEN",1);
+ gMC->Gsatt("TPG2","SEEN",1);
+ gMC->Gsatt("TPWC","SEEN",1);
+ gMC->Gsatt("TPSI","SEEN",1);
+ gMC->Gsatt("TPSO","SEEN",1);
+ gMC->Gsatt("TPCO","SEEN",1);
+ gMC->Gsatt("TPOV","SEEN",1);
+ gMC->Gsatt("TPVD","SEEN",1);
+ gMC->Gsatt("TLGA","SEEN",-1);
+ gMC->Gsatt("TSGA","SEEN",-1);
}