/*
$Log$
+Revision 1.19 2001/03/12 17:47:25 hristov
+Changes needed on Sun with CC 5.0
+
Revision 1.18 2001/01/26 19:57:42 hristov
Major upgrade of AliRoot code
SetMarkerSize(0.4);
// General Geometrical Parameters
- fNTof = 18;
- fRmax = 399.0;//cm
+ fNTof = 18; // number of sectors
+ fRmax = 399.0;//cm
fRmin = 370.0;//cm
- fZlenC = 177.5;//cm
- fZlenB = 141.0;//cm
- fZlenA = 106.0;//cm
- fZtof = 370.5;//cm
+ fZlenC = 177.5;//cm length of module C
+ fZlenB = 141.0;//cm length of module B
+ fZlenA = 106.0;//cm length of module A
+ fZtof = 370.5;//cm total semi-length of TOF detector
// Strip Parameters
fStripLn = 122.0;//cm Strip Length
fNpadX = 48; // Number of pads in a strip along the X direction
fNpadZ = 2; // Number of pads in a strip along the Z direction
fPadXStr = fNpadX*fNpadZ; //Number of pads per strip
- fNStripA = 0;
- fNStripB = 0;
- fNStripC = 0;
+ fNStripA = 15; // number of strips in A type module
+ fNStripB = 19; // number of strips in B type module
+ fNStripC = 20; // number of strips in C type module
// Physical performances
fTimeRes = 100.;//ps
const Double_t kPi=TMath::Pi();
const Double_t kDegrad=kPi/180.;
//
- Float_t xTof, yTof, Wall;
+ Float_t xTof, yTof, wall;
// frame inbetween TOF modules
- Wall = 4.;//cm
+ wall = 4.;//cm
// Sizes of TOF module with its support etc..
- xTof = 2.*(fRmin*TMath::Tan(10*kDegrad)-Wall/2-.5);
+ xTof = 2.*(fRmin*TMath::Tan(10*kDegrad)-wall/2-.5);
yTof = fRmax-fRmin;
// TOF module internal definitions
// Defines TOF materials for all versions
// Authors : Maxim Martemianov, Boris Zagreev (ITEP)
// 18/09/98
+ // Revision: F. Pierella 5-3-2001
+ // Bologna University
//
- Int_t ISXFLD = gAlice->Field()->Integ();
- Float_t SXMGMX = gAlice->Field()->Max();
+ Int_t isxfld = gAlice->Field()->Integ();
+ Float_t sxmgmx = gAlice->Field()->Max();
//
//--- Quartz (SiO2)
Float_t aq[2] = { 28.0855,15.9994 };
Float_t wq[2] = { 1.,2. };
Float_t dq = 2.20;
Int_t nq = -2;
- // --- Freon
- Float_t afre[2] = {12.011,18.9984032 };
- Float_t zfre[2] = { 6., 9.};
- Float_t wfre[2] = { 5.,12.};
- Float_t densfre = 1.5;
- Int_t nfre = -2;
+ // --- Freon C2F4H2 (TOF-TDR pagg.)
+ // Geant Manual CONS110-1, pag. 43 (Geant, Detector Description and Simulation Tool)
+ Float_t afre[3] = {12.011,18.998,1.007};
+ Float_t zfre[3] = { 6., 9., 1.};
+ Float_t wfre[3] = { 2., 4., 2.};
+ Float_t densfre = 0.00375;
+// http://www.fi.infn.it/sezione/prevprot/gas/freon.html
+ Int_t nfre = -3;
+/*
+ //-- Isobutane quencher C4H10 (5% in the sensitive mixture)
+ Float_t aiso[2] = {12.011,1.007};
+ Float_t ziso[2] = { 6., 1.};
+ Float_t wiso[2] = { 4., 10.};
+ Float_t densiso = .......; // (g/cm3) density
+ Int_t nfre = -2; // < 0 i.e. proportion by number of atoms of each kind
+ //-- SF6 (5% in the sensitive mixture)
+ Float_t asf[3] = {32.066,18.998};
+ Float_t zsf[3] = { 16., 9.};
+ Float_t wsf[3] = { 1., 6.};
+ Float_t denssf = .....; // (g/cm3) density
+ Int_t nfre = -2; // < 0 i.e. proportion by number of atoms of each kind
+*/
// --- CO2
Float_t ac[2] = {12.,16.};
Float_t zc[2] = { 6., 8.};
Float_t wmy[3] = { 5., 4., 2. };
Float_t dmy = 1.39;
Int_t nmy = -3;
- // For polyethilene (CH2) for honeycomb!!!!
+ // For polyethilene (CH2) - honeycomb -
Float_t ape[2] = { 12., 1. };
Float_t zpe[2] = { 6., 1. };
Float_t wpe[2] = { 1., 2. };
deemax = -.3; // Maximum fractional energy loss, DLS
stmin = -.8;
- AliMedium( 1, "Air$" , 1, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium( 2, "Cu $" , 2, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium( 3, "C $" , 3, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium( 4, "Pol$" , 4, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium( 5, "G10$" , 5, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium( 6, "DME$" , 6, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium( 7, "CO2$" , 7, 0, ISXFLD, SXMGMX, 10., -.01, -.1, .01, -.01);
- AliMedium( 8,"ALUMINA$", 8, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium( 9,"Al Frame$",9, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium(10, "DME-S$", 6, 1, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium(11, "C-TRD$", 10, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium(12, "Myl$" , 11, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium(13, "Fre$" , 12, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium(14, "Fre-S$", 12, 1, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium(15, "Glass$", 13, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
- AliMedium(16, "Water$", 14, 0, ISXFLD, SXMGMX, 10., stemax, deemax, epsil, stmin);
+ AliMedium( 1, "Air$" , 1, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium( 2, "Cu $" , 2, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium( 3, "C $" , 3, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium( 4, "Pol$" , 4, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium( 5, "G10$" , 5, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium( 6, "DME$" , 6, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium( 7, "CO2$" , 7, 0, isxfld, sxmgmx, 10., -.01, -.1, .01, -.01);
+ AliMedium( 8,"ALUMINA$", 8, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium( 9,"Al Frame$",9, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium(10, "DME-S$", 6, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium(11, "C-TRD$", 10, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium(12, "Myl$" , 11, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium(13, "Fre$" , 12, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium(14, "Fre-S$", 12, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium(15, "Glass$", 13, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
+ AliMedium(16, "Water$", 14, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin);
}
//_____________________________________________________________________________
//____________________________________________________________________________
void AliTOF::MakeBranch(Option_t* option, char *file)
-//
-// Initializes the Branches of the TOF inside the
-// trees written for each event.
-// AliDetector::MakeBranch initializes just the
-// Branch inside TreeH. Here we add the branch in
-// TreeD.
-//
{
+ //
+ // Initializes the Branches of the TOF inside the
+ // trees written for each event.
+ // AliDetector::MakeBranch initializes just the
+ // Branch inside TreeH. Here we add the branch in
+ // TreeD.
+ //
AliDetector::MakeBranch(option,file);
//____________________________________________________________________________
void AliTOF::Hits2Digits(Int_t evNumber)
+{
//
// Starting from the Hits Tree (TreeH), this
// function writes the Digits Tree (TreeD) storing
//
// Called by the macro H2D.C
//
-{
+
AliTOFhit* currentHit;
- TTree *TD, *TH;
+ TTree *tD, *tH;
Int_t tracks[3];
Int_t vol[5];
Float_t digit[2];
- TClonesArray* TOFhits=this->Hits();
+ TClonesArray* tofhits=this->Hits();
Int_t nparticles = gAlice->GetNtrack();
if (nparticles <= 0) return;
- TD = gAlice->TreeD();
- TH = gAlice->TreeH();
- Int_t ntracks =(Int_t) TH->GetEntries();
+ tD = gAlice->TreeD();
+ tH = gAlice->TreeH();
+ Int_t ntracks =(Int_t) tH->GetEntries();
Int_t nbytes, nhits;
- TRandom *rnd = new TRandom();
+ TRandom* rnd = new TRandom();
for (Int_t ntk=0; ntk<ntracks; ntk++){
- nbytes = TH->GetEvent(ntk);
- nhits = TOFhits->GetEntriesFast();
+ nbytes = tH->GetEvent(ntk);
+ nhits = tofhits->GetEntriesFast();
for (Int_t hit=0; hit<nhits; hit++){
- currentHit = (AliTOFhit*)(TOFhits->At(hit));
+ currentHit = (AliTOFhit*)(tofhits->At(hit));
vol[0] = currentHit->GetSector();
vol[1] = currentHit->GetPlate();
- vol[2] = currentHit->GetPad_x();
- vol[3] = currentHit->GetPad_z();
+ vol[2] = currentHit->GetPadx();
+ vol[3] = currentHit->GetPadz();
vol[4] = currentHit->GetStrip();
- Float_t IdealTime = currentHit->GetTof();
- Float_t TDCTime = rnd->Gaus(IdealTime, fTimeRes);
- digit[0] = TDCTime;
+ Float_t idealtime = currentHit->GetTof();
+ Float_t tdctime = rnd->Gaus(idealtime, fTimeRes);
+ digit[0] = tdctime;
- Float_t IdealCharge = currentHit->GetEdep();
- Float_t ADCcharge = rnd->Gaus(IdealCharge, fChrgRes);
- digit[1] = ADCcharge;
+ Float_t idealcharge = currentHit->GetEdep();
+ Float_t adccharge = rnd->Gaus(idealcharge, fChrgRes);
+ digit[1] = adccharge;
- Int_t Track = currentHit -> GetTrack();
- tracks[0] = Track;
+ Int_t tracknum = currentHit -> GetTrack();
+ tracks[0] = tracknum;
tracks[1] = 0;
tracks[2] = 0;
- Bool_t Overlap = CheckOverlap(vol, digit, Track);
- if(!Overlap) AddDigit(tracks, vol, digit);
+ Bool_t overlap = CheckOverlap(vol, digit, tracknum);
+ if(!overlap) AddDigit(tracks, vol, digit);
}
}
- TD->Fill();
- TD->Write();
+ delete rnd;
+ rnd = 0;
+ tD->Fill();
+ tD->Write();
}
//___________________________________________________________________________
Bool_t AliTOF::CheckOverlap(Int_t* vol, Float_t* digit,Int_t Track)
+{
//
// Checks if 2 or more hits belong to the same pad.
// In this case the data assigned to the digit object
//
// Called only by Hits2Digits.
//
-{
- Bool_t Overlap = 0;
+
+ Bool_t overlap = 0;
Int_t vol2[5];
for (Int_t ndig=0; ndig<fNdigits; ndig++){
AliTOFdigit* currentDigit = (AliTOFdigit*)(fDigits->UncheckedAt(ndig));
currentDigit->GetLocation(vol2);
- Bool_t Idem=1;
+ Bool_t idem=1;
for (Int_t i=0;i<=4;i++){
- if (vol[i]!=vol2[i]) Idem=0;}
- if (Idem){
- Float_t TDC2 = digit[0];
- Float_t TDC1 = currentDigit->GetTdc();
- if (TDC1>TDC2){
- currentDigit->SetTdc(TDC2);
+ if (vol[i]!=vol2[i]) idem=0;}
+ if (idem){
+ Float_t tdc2 = digit[0];
+ Float_t tdc1 = currentDigit->GetTdc();
+ if (tdc1>tdc2){
+ currentDigit->SetTdc(tdc2);
currentDigit->SetAdc(digit[1]);
}
currentDigit->AddTrack(Track);
- Overlap = 1;
+ overlap = 1;
}
}
- return Overlap;
+ return overlap;
}
//____________________________________________________________________________
void AliTOF::Digits2Raw(Int_t evNumber)
+{
//
// Starting from digits, writes the
// Raw Data objects, i.e. a
// TClonesArray of 18 AliTOFRawSector objects
//
-{
- TTree* TD;
+ TTree* tD;
Int_t nparticles = gAlice->GetEvent(evNumber);
if (nparticles <= 0) return;
- TD = gAlice->TreeD();
+ tD = gAlice->TreeD();
- TClonesArray* TOFdigits = this->Digits();
- Int_t ndigits = TOFdigits->GetEntriesFast();
+ TClonesArray* tofdigits = this->Digits();
+ Int_t ndigits = tofdigits->GetEntriesFast();
- TClonesArray* Raw = new TClonesArray("AliTOFRawSector",fNTof+2);
+ TClonesArray* rawsectors = new TClonesArray("AliTOFRawSector",fNTof+2);
for (Int_t isect=1;isect<=fNTof;isect++){
- AliTOFRawSector* currentSector = (AliTOFRawSector*)Raw->UncheckedAt(isect);
- TClonesArray* RocData = (TClonesArray*)currentSector->GetRocData();
+ AliTOFRawSector* currentSector = (AliTOFRawSector*)rawsectors->UncheckedAt(isect);
+ TClonesArray* rocData = (TClonesArray*)currentSector->GetRocData();
for (Int_t digit=0; digit<ndigits; digit++){
- AliTOFdigit* currentDigit = (AliTOFdigit*)TOFdigits->UncheckedAt(digit);
+ AliTOFdigit* currentDigit = (AliTOFdigit*)tofdigits->UncheckedAt(digit);
Int_t sector = currentDigit->GetSector();
if (sector==isect){
- Int_t Pad = currentDigit -> GetTotPad();
- Int_t Roc = (Int_t)(Pad/fNPadXRoc)-1;
- if (Roc>=fNRoc) printf("Wrong n. of ROC ! Roc = %i",Roc);
- Int_t PadRoc = (Int_t) Pad%fNPadXRoc;
- Int_t Fec = (Int_t)(PadRoc/fNFec)-1;
- Int_t Tdc = (Int_t)(PadRoc%fNFec)-1;
- Float_t Time = currentDigit->GetTdc();
- Float_t Charge = currentDigit->GetAdc();
- AliTOFRoc* currentROC = (AliTOFRoc*)RocData->UncheckedAt(Roc);
- Int_t Error = 0;
- currentROC->AddItem(Fec, Tdc, Error, Charge, Time);
+ Int_t pad = currentDigit -> GetTotPad();
+ Int_t roc = (Int_t)(pad/fNPadXRoc)-1;
+ if (roc>=fNRoc) printf("Wrong n. of ROC ! Roc = %i",roc);
+ Int_t padRoc = (Int_t) pad%fNPadXRoc;
+ Int_t fec = (Int_t)(padRoc/fNFec)-1;
+ Int_t tdc = (Int_t)(padRoc%fNFec)-1;
+ Float_t time = currentDigit->GetTdc();
+ Float_t charge = currentDigit->GetAdc();
+ AliTOFRoc* currentROC = (AliTOFRoc*)rocData->UncheckedAt(roc);
+ Int_t error = 0;
+ currentROC->AddItem(fec, tdc, error, charge, time);
}
}
- UInt_t TotSize=16,RocSize=0;
- UInt_t RocHead[14],RocChek[14];
- UInt_t GlobalCheckSum=0;
+ UInt_t totSize=16,rocSize=0;
+ UInt_t rocHead[14],rocChek[14];
+ UInt_t globalCheckSum=0;
for (UInt_t iRoc = 1; iRoc<(UInt_t)fNRoc; iRoc++){
- AliTOFRoc* currentRoc = (AliTOFRoc*)RocData->UncheckedAt(iRoc);
- RocSize = currentRoc->Items*2+1;
- TotSize += RocSize*4;
- if (RocSize>=TMath::Power(2,16)) RocSize=0;
- RocHead[iRoc] = iRoc<<28;
- RocHead[iRoc] += RocSize;
- RocChek[iRoc] = currentRoc->GetCheckSum();
- Int_t HeadCheck = currentRoc->BitCount(RocHead[iRoc]);
- GlobalCheckSum += HeadCheck;
- GlobalCheckSum += RocChek[iRoc];
+ AliTOFRoc* currentRoc = (AliTOFRoc*)rocData->UncheckedAt(iRoc);
+ rocSize = currentRoc->GetItems()*2+1;
+ totSize += rocSize*4;
+ if (rocSize>=TMath::Power(2,16)) rocSize=0;
+ rocHead[iRoc] = iRoc<<28;
+ rocHead[iRoc] += rocSize;
+ rocChek[iRoc] = currentRoc->GetCheckSum();
+ Int_t headCheck = currentRoc->BitCount(rocHead[iRoc]);
+ globalCheckSum += headCheck;
+ globalCheckSum += rocChek[iRoc];
}
- AliTOFRoc* DummyRoc = new AliTOFRoc();
- TotSize *= 4;
- if (TotSize>=TMath::Power(2,24)) TotSize=0;
- UInt_t Header = TotSize;
- UInt_t SectId = ((UInt_t)isect)<<24;
- Header += SectId;
- GlobalCheckSum += DummyRoc->BitCount(Header);
- currentSector->SetGlobalCS(GlobalCheckSum);
- currentSector->SetHeader(Header);
+ AliTOFRoc* dummyRoc = new AliTOFRoc();
+ totSize *= 4;
+ if (totSize>=TMath::Power(2,24)) totSize=0;
+ UInt_t header = totSize;
+ UInt_t sectId = ((UInt_t)isect)<<24;
+ header += sectId;
+ globalCheckSum += dummyRoc->BitCount(header);
+ currentSector->SetGlobalCS(globalCheckSum);
+ currentSector->SetHeader(header);
}
}
//____________________________________________________________________________
void AliTOF::Raw2Digits(Int_t evNumber)
+{
//
// Converts Raw Data objects into digits objects.
// We schematize the raw data with a
// TClonesArray of 18 AliTOFRawSector objects
//
-{
- TTree *TD;
+
+ TTree *tD;
Int_t vol[5];
Int_t tracks[3];
Float_t digit[2];
Int_t nparticles = gAlice->GetEvent(evNumber);
if (nparticles <= 0) return;
- TD = gAlice->TreeD();
+ tD = gAlice->TreeD();
- TClonesArray* Raw = new TClonesArray("AliTOFRawSector",fNTof+2);
+ TClonesArray* rawsectors = new TClonesArray("AliTOFRawSector",fNTof+2);
for(Int_t nSec=1; nSec<=fNTof; nSec++){
- AliTOFRawSector* currentSector = (AliTOFRawSector*)Raw->UncheckedAt(nSec);
- TClonesArray* RocData = (TClonesArray*)currentSector->GetRocData();
+ AliTOFRawSector* currentSector = (AliTOFRawSector*)rawsectors->UncheckedAt(nSec);
+ TClonesArray* rocData = (TClonesArray*)currentSector->GetRocData();
for(Int_t nRoc=1; nRoc<=14; nRoc++){
- AliTOFRoc* currentRoc = (AliTOFRoc*)RocData->UncheckedAt(nRoc);
+ AliTOFRoc* currentRoc = (AliTOFRoc*)rocData->UncheckedAt(nRoc);
Int_t currentItems = currentRoc->GetItems();
for(Int_t item=1; item<currentItems; item++){
Int_t nPad = currentRoc->GetTotPad(item);
break;
}
vol[2] = nStrip;
- Int_t Pad = nPad%fPadXStr;
- if (Pad==0) Pad=fPadXStr;
+ Int_t pad = nPad%fPadXStr;
+ if (pad==0) pad=fPadXStr;
Int_t nPadX=0, nPadZ=0;
- (Pad>fNpadX)? nPadX -= fNpadX : nPadX = Pad ;
+ (pad>fNpadX)? nPadX -= fNpadX : nPadX = pad ;
vol[3] = nPadX;
- (Pad>fNpadX)? nPadZ = 2 : nPadZ = 1 ;
+ (pad>fNpadX)? nPadZ = 2 : nPadZ = 1 ;
vol[4] = nPadZ;
UInt_t error=0;
- Float_t TDC = currentRoc->GetTime(item,error);
- if (!error) digit[0]=TDC;
+ Float_t tdc = currentRoc->GetTime(item,error);
+ if (!error) digit[0]=tdc;
digit[1] = currentRoc->GetCharge(item);
AddDigit(tracks,vol,digit);
}
}
}
- TD->Fill();
- TD->Write();
+ tD->Fill();
+ tD->Write();
}
/******************************************************************************/
ClassImp(AliTOFhit)
+
+//____________________________________________________________________________
+AliTOFhit::AliTOFhit(const AliTOFhit & hit)
+{
+ //
+ // copy ctor for AliTOFhit object
+ //
+ fTrack = hit.fTrack;
+ fX = hit.fX;
+ fY = hit.fY;
+ fZ = hit.fZ;
+ fSector = hit.fSector;
+ fPlate = hit.fPlate;
+ fStrip = hit.fStrip;
+ fPadx = hit.fPadx;
+ fPadz = hit.fPadz;
+ fPx = hit.fPx;
+ fPy = hit.fPy;
+ fPz = hit.fPz;
+ fPmom = hit.fPmom;
+ fTof = hit.fTof;
+ fDx = hit.fDx;
+ fDy = hit.fDy;
+ fDz = hit.fDz;
+ fIncA = hit.fIncA;
+ fEdep = hit.fEdep;
+
+}
//______________________________________________________________________________
AliTOFhit::AliTOFhit(Int_t shunt, Int_t track, Int_t *vol,
Float_t *hits)
:AliHit(shunt, track)
+{
//
// Constructor of hit object
//
-{
- //
- // Store a TOF hit
- // _______________
//
// Hit Volume
//
fSector= vol[0];
fPlate = vol[1];
fStrip = vol[2];
- fPad_x = vol[3];
- fPad_z = vol[4];
+ fPadx = vol[3];
+ fPadz = vol[4];
//
- //Position
+ //Position of the hit
fX = hits[0];
fY = hits[1];
fZ = hits[2];
//
- // Momentum
+ // Momentum components of the particle in the ALICE frame when hit is produced
fPx = hits[3];
fPy = hits[4];
fPz = hits[5];
fPmom= hits[6];
//
- // Time Of Flight
+ // Time Of Flight for the particle that produces hit
fTof = hits[7]; //TOF[s]
//
// Other Data
//______________________________________________________________________________
AliTOFdigit::AliTOFdigit(Int_t *tracks, Int_t *vol,Float_t *digit)
:AliDigit(tracks)
+{
//
// Constructor of digit object
//
-{
+
fSector = vol[0];
fPlate = vol[1];
fStrip = vol[2];
- fPad_x = vol[3];
- fPad_z = vol[4];
+ fPadx = vol[3];
+ fPadz = vol[4];
fTdc = digit[0];
fAdc = digit[1];
}
+//____________________________________________________________________________
+AliTOFdigit::AliTOFdigit(const AliTOFdigit & digit)
+{
+ //
+ // copy ctor for AliTOFdigit object
+ //
+
+ Int_t i ;
+ for ( i = 0; i < 3 ; i++)
+ fTracks[i] = digit.fTracks[i] ;
+ fSector = digit.fSector;
+ fPlate = digit.fPlate;
+ fStrip = digit.fStrip;
+ fPadx = digit.fPadx;
+ fPadz = digit.fPadz;
+ fTdc = digit.fTdc;
+ fAdc = digit.fAdc;
+
+}
+
//______________________________________________________________________________
void AliTOFdigit::GetLocation(Int_t *Loc)
+{
//
// Get the cohordinates of the digit
// in terms of Sector - Plate - Strip - Pad
//
-{
+
Loc[0]=fSector;
Loc[1]=fPlate;
Loc[2]=fStrip;
- Loc[3]=fPad_x;
- Loc[4]=fPad_z;
+ Loc[3]=fPadx;
+ Loc[4]=fPadz;
}
//______________________________________________________________________________
Int_t AliTOFdigit::GetTotPad()
+{
//
// Get the "total" index of the pad inside a Sector
// starting from the digits data.
//
-{
- AliTOF* TOF;
+
+ AliTOF* tof;
if(gAlice){
- TOF =(AliTOF*) gAlice->GetDetector("TOF");
+ tof =(AliTOF*) gAlice->GetDetector("TOF");
}else{
printf("AliTOFdigit::GetTotPad - No AliRun object present, exiting");
return 0;
}
- Int_t Pad = fPad_x+TOF->fNpadX*(fPad_z-1);
- Int_t Before=0;
+ Int_t pad = fPadx+tof->GetNpadX()*(fPadz-1);
+ Int_t before=0;
switch(fPlate){
- case 1: Before = 0;
+ case 1: before = 0;
break;
- case 2: Before = TOF->fNStripC;
+ case 2: before = tof->GetNStripC();
break;
- case 3: Before = TOF->fNStripB + TOF->fNStripC;
+ case 3: before = tof->GetNStripB() + tof->GetNStripC();
break;
- case 4: Before = TOF->fNStripA + TOF->fNStripB + TOF->fNStripC;
+ case 4: before = tof->GetNStripA() + tof->GetNStripB() + tof->GetNStripC();
break;
- case 5: Before = TOF->fNStripA + 2*TOF->fNStripB + TOF->fNStripC;
+ case 5: before = tof->GetNStripA() + 2*tof->GetNStripB() + tof->GetNStripC();
break;
}
- Int_t Strip = fStrip+Before;
- Int_t PadTot = TOF->fPadXStr*(Strip-1)+Pad;
- return PadTot;
+ Int_t strip = fStrip+before;
+ Int_t padTot = tof->GetPadXStr()*(strip-1)+pad;
+ return padTot;
}
//______________________________________________________________________________
void AliTOFdigit::AddTrack(Int_t track)
+{
//
// Add a track to the digit
//
-{
+
if (fTracks[1]==0){
fTracks[1] = track;
}else if (fTracks[2]==0){
-#ifndef TOF_H
-#define TOF_H
+////////////////////////////////////////////////
+// //
+// Manager, hit and digit classes for TOF //
+// Interfaces:
+// AliTOF //
+// AliTOFhit //
+// AliTOFdigit //
+////////////////////////////////////////////////
+
+#ifndef ALITOF_H
+#define ALITOF_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
-////////////////////////////////////////////////
-// Manager and hits classes for set: TOF //
-////////////////////////////////////////////////
#include "TObject.h"
class TFile;
#include "AliDetector.h"
#include "AliHit.h"
#include "AliDigit.h"
-#include "AliTOFD.h"
+//#include "AliTOFD.h"
class AliTOF : public AliDetector {
-protected:
- Int_t fIdSens;
-
-public:
- Int_t fNTof;
- Float_t fRmax;
- Float_t fRmin;
- Float_t fZlenA;
- Float_t fZlenB;
- Float_t fZlenC;
- Float_t fZtof;
-
- Float_t fStripLn;
- Float_t fSpace;
- Float_t fDeadBndZ;
- Float_t fDeadBndX;
- Float_t fXpad;
- Float_t fZpad;
- Float_t fGapA;
- Float_t fGapB;
- Float_t fOverSpc;
- Int_t fNpadX;
- Int_t fNpadZ;
- Int_t fPadXStr;
-
- Int_t fNStripA;
- Int_t fNStripB;
- Int_t fNStripC;
-
- Float_t fTimeRes;
- Float_t fChrgRes;
-
- Int_t fPadXSector;
- Int_t fNRoc;
- Int_t fNFec;
- Int_t fNTdc;
- Int_t fNPadXRoc;
-
-
public:
AliTOF();
AliTOF(const char *name, const char *title);
virtual ~AliTOF() {}
+// getters for AliTOF object status
+ Int_t GetNStripA() const {return fNStripA;}
+ Int_t GetNStripB() const {return fNStripB;}
+ Int_t GetNStripC() const {return fNStripC;}
+ Int_t GetNpadX() const {return fNpadX;}
+ Int_t GetNpadZ() const {return fNpadZ;}
+ Int_t GetPadXStr() const {return fPadXStr;}
+
virtual void AddHit(Int_t track, Int_t* vol, Float_t* hits);
- virtual void AddDigit(Int_t*, Int_t*, Float_t*);
+ virtual void AddDigit(Int_t* tracks, Int_t* vol, Float_t* digits);
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual void Init();
- virtual void MakeBranch(Option_t*, char *file=0);
+ virtual void MakeBranch(Option_t* option, char *file=0);
virtual void FinishEvent();
virtual Int_t IsVersion() const =0;
Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void StepManager()=0;
- virtual void TOFpc(Float_t, Float_t, Float_t,
- Float_t, Float_t,Float_t) {}
+ virtual void TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC,
+ Float_t zlenB, Float_t zlenA, Float_t ztof0){}
virtual void DrawModule();
virtual void SDigits2Digits();
void Hits2Digits(Int_t evNumber=0);
void Digits2Raw (Int_t evNumber=0);
void Raw2Digits (Int_t evNumber=0);
+
+protected:
+ Int_t fNTof; // number of TOF sectors
+ Float_t fRmax; // upper bound for radial extension of TOF detector
+ Float_t fRmin; // lower bound for radial extension of TOF detector
+ Float_t fZlenA; // length along z-axis of type A module
+ Float_t fZlenB; // length along z-axis of type B module
+ Float_t fZlenC; // length along z-axis of type C module
+ Float_t fZtof; // total semi-length of TOF detector
+
+ Float_t fStripLn; // Strip Length
+ Float_t fSpace; // Space Beetween the strip and the bottom of the plate
+ Float_t fDeadBndZ; // Dead Boundaries of a Strip along Z direction (width)
+ Float_t fDeadBndX; // Dead Boundaries of a Strip along X direction (length)
+ Float_t fXpad; // X size of a pad
+ Float_t fZpad; // Z size of a pad
+ Float_t fGapA; // Gap beetween tilted strip in A-type plate
+ Float_t fGapB; // Gap beetween tilted strip in B-type plate
+ Float_t fOverSpc; // Space available for sensitive layers in radial direction
+ Int_t fNpadX; // Number of pads in a strip along the X direction
+ Int_t fNpadZ; // Number of pads in a strip along the Z direction
+ Int_t fPadXStr; // Number of pads per strip
+
+ Int_t fNStripA; // number of strips in A type module
+ Int_t fNStripB; // number of strips in B type module
+ Int_t fNStripC; // number of strips in C type module
+
+ Float_t fTimeRes; // time resolution of the TOF
+ Float_t fChrgRes; // charge resolution of ADC
+
+ Int_t fPadXSector; // number of pads per sector
+ Int_t fNRoc; // number of ROC
+ Int_t fNFec; // number of FEC
+ Int_t fNTdc; // number of TDC
+ Int_t fNPadXRoc; // number of pads for each ROC
+ Int_t fIdSens; // the unique numeric identifier for sensitive volume FPAD
private:
- Bool_t CheckOverlap(Int_t*, Float_t*, Int_t);
+ Bool_t CheckOverlap(Int_t* vol, Float_t* digit, Int_t Track);
ClassDef(AliTOF,1) // Time Of Flight base class
};
//___________________________________________
class AliTOFhit : public AliHit {
+
public:
+ AliTOFhit() {}
+ AliTOFhit(Int_t shunt, Int_t track, Int_t* vol,
+ Float_t *hits);
+ AliTOFhit(const AliTOFhit & hit) ;
+ virtual ~AliTOFhit() {}
+ // getters for AliTOFhit object
+ Int_t GetSector() const {return fSector;}
+ Int_t GetPlate() const {return fPlate;}
+ Int_t GetPadx() const {return fPadx;}
+ Int_t GetPadz() const {return fPadz;}
+ Int_t GetStrip() const {return fStrip;}
+ Float_t GetTof() const {return fTof;}
+ Float_t GetMom() const {return fPmom;}
+ Float_t GetDx() const {return fDx;}
+ Float_t GetDz() const {return fDz;}
+ Float_t GetIncA() const {return fIncA;}
+ Float_t GetEdep() const {return fEdep;}
+
+protected:
Int_t fSector; // number of sector
Int_t fPlate; // number of plate
Int_t fStrip; // number of strip
- Int_t fPad_x; // number of pad along x
- Int_t fPad_z; // number of pad along z
+ Int_t fPadx; // number of pad along x
+ Int_t fPadz; // number of pad along z
+// X, Y and Z coordinates of the hit are defined on mother class
+// AliHit
Float_t fPx; // px in TOF
Float_t fPy; // py in TOF
Float_t fPz; // pz in TOF
Float_t fDy; // y of impact point in pad r.s.
Float_t fDz; // z of impact point in pad r.s.
Float_t fIncA; // Incidence angle
- Float_t fEdep; // Energy lost in tof layer
-
-public:
- AliTOFhit() {}
- AliTOFhit(Int_t shunt, Int_t track, Int_t* vol,
- Float_t *hits);
- virtual ~AliTOFhit() {}
-
- inline Int_t GetSector() {return fSector;}
- inline Int_t GetPlate() {return fPlate;}
- inline Int_t GetPad_x() {return fPad_x;}
- inline Int_t GetPad_z() {return fPad_z;}
- inline Int_t GetStrip() {return (Int_t)(fPad_z*0.5);}
- inline Float_t GetTof() {return fTof;}
- inline Float_t GetMom() {return fPmom;}
- inline Float_t GetDx() {return fDx;}
- inline Float_t GetDz() {return fDz;}
- inline Float_t GetIncA() {return fIncA;}
- inline Float_t GetEdep() {return fEdep;}
+ Float_t fEdep; // Energy lost in TOF sensitive layer
ClassDef(AliTOFhit,1) // Hits for Time Of Flight
};
class AliTOFdigit : public AliDigit {
- public:
- Int_t fSector;
- Int_t fPlate;
- Int_t fStrip;
- Int_t fPad_x;
- Int_t fPad_z;
- Float_t fTdc;
- Float_t fAdc;
-
public:
AliTOFdigit(){}
- AliTOFdigit(Int_t*, Int_t*, Float_t*);
+ AliTOFdigit(Int_t* tracks, Int_t* vol, Float_t* digit);
+ AliTOFdigit(const AliTOFdigit & digit) ;
virtual ~AliTOFdigit(){}
- void GetLocation(Int_t*);
+ void GetLocation(Int_t* Loc);
Int_t GetTotPad();
- void AddTrack(Int_t);
+ void AddTrack(Int_t track);
+ // getters for AliTOFdigit object
+ Float_t GetTdc() const {return fTdc;}
+ Float_t GetAdc() const {return fAdc;}
+ Int_t GetSector() const {return fSector;}
+ // setters for AliTOFdigit object
+ void SetTdc(Float_t TDC){fTdc = TDC;}
+ void SetAdc(Float_t ADC){fAdc = ADC;}
- inline Float_t GetTdc() {return fTdc;}
- inline Float_t GetAdc() {return fAdc;}
- inline Int_t GetSector() {return fSector;}
- inline void SetTdc(Float_t TDC){fTdc = TDC;}
- inline void SetAdc(Float_t ADC){fAdc = ADC;}
+protected:
+ Int_t fSector; // number of sector
+ Int_t fPlate; // number of plate
+ Int_t fStrip; // number of strip
+ Int_t fPadx; // number of pad along x
+ Int_t fPadz; // number of pad along z
+ Float_t fTdc; // tdc values for digit
+ Float_t fAdc; // adc values for digit
ClassDef(AliTOFdigit,2) // Digits for Time Of Flight
};
-#endif
+#endif /* ALITOF_H */
/*
$Log$
+Revision 1.3 2000/10/02 21:28:17 fca
+Removal of useless dependecies via forward declarations
+
Revision 1.2 2000/05/18 14:33:01 vicinanz
Modified to be full HP compliant
// The class represents a ROC in the TARODA system
//
{
- Items = 0;
- Size = 0;
+ fItems = 0;
+ fSize = 0;
}
//______________________________________________________________________________
//______________________________________________________________________________
Int_t AliTOFRoc::AddItem(Int_t Fec, Int_t Tdc, Int_t Error,
Float_t Charge, Float_t Time)
+{
//
// Adds an item (i.e. the charge, the TOF and the
// cohordinates of a hit pad) to the ROC class.
//
-{
- Items++;
- SetCharge(Items,Fec,Tdc,Charge);
- SetTime (Items,Error,Time);
- return Items;
+
+ fItems++;
+ SetCharge(fItems,Fec,Tdc,Charge);
+ SetTime (fItems,Error,Time);
+ return fItems;
}
//______________________________________________________________________________
// Calculate the header line of the ROC in the raw data file
//
{
- Header = NRoc<<28;
- Header += Size;
+ fHeader = fNRoc<<28;
+ fHeader += fSize;
}
//______________________________________________________________________________
void AliTOFRoc::SetTime(UInt_t Item, UInt_t Error, Float_t RealTime)
+{
//
// Calculate the raw data line relative to the TDC
// output of a pad in the current ROC.
//
-{
- UInt_t Itime;
- Itime = (UInt_t)(RealTime/50.);
- if (Itime >= TMath::Power(2,24)) Itime = 2^24-1;
+
+ UInt_t itime;
+ itime = (UInt_t)(RealTime/50.);
+ if (itime >= TMath::Power(2,24)) itime = 2^24-1;
Error <<= 24;
- TimeRow[Item]= Error+Itime;
+ fTimeRow[Item]= Error+itime;
}
//______________________________________________________________________________
void AliTOFRoc::SetCharge(UInt_t Item, UInt_t Fec, UInt_t Tdc, Float_t RealCharge)
+{
//
// Calculate the raw data line relative to the ADC
// output of a pad in the current ROC.
//
-{
- UInt_t ICharge;
- if (NRoc>=TMath::Power(2,4)) NRoc = 0;
- NRoc <<= 28;
+
+ UInt_t iCharge;
+ if (fNRoc>=TMath::Power(2,4)) fNRoc = 0;
+ fNRoc <<= 28;
if (Fec >=TMath::Power(2,6)) Fec = 0;
Fec <<= 22;
if (Tdc >=TMath::Power(2,6)) Tdc = 0;
Tdc <<= 16;
- ICharge = (UInt_t)(RealCharge/50.);
- if(ICharge>=TMath::Power(2,16)) ICharge = (UInt_t)TMath::Power(2,16)-1;
- ChrgRow[Item] = ICharge+NRoc+Fec+Tdc;
+ iCharge = (UInt_t)(RealCharge/50.);
+ if(iCharge>=TMath::Power(2,16)) iCharge = (UInt_t)TMath::Power(2,16)-1;
+ fChrgRow[Item] = iCharge+fNRoc+Fec+Tdc;
}
//______________________________________________________________________________
// Writes the raw data line relative to the TDC
//
{
- ChrgRow[Item]=tir;
+ fChrgRow[Item]=tir;
}
//______________________________________________________________________________
// Writes the raw data line relative to the ADC
//
{
- ChrgRow[Item]=chr;
+ fChrgRow[Item]=chr;
}
//______________________________________________________________________________
Float_t AliTOFRoc::GetCharge(Int_t Item)
+{
//
// Reads the effective value of the charge starting
// from the line of the raw data
//
-{
- UInt_t Charge = ChrgRow[Item]&0x0000ffff;
- Float_t ACharge = (Float_t)Charge*50.;
- return ACharge;
+
+ UInt_t icharge = fChrgRow[Item]&0x0000ffff;
+ Float_t charge = (Float_t)icharge*50.;
+ return charge;
}
//______________________________________________________________________________
Float_t AliTOFRoc::GetTime(Int_t Item, UInt_t& Error)
+{
//
// Reads the effective value of the time of flight starting
// from the line of the raw data
//
-{
- UInt_t Time = TimeRow[Item]&0x00ffffff;
- Float_t ATime = (Float_t)Time*50.;
- Error = TimeRow[Item]>>24;
- return ATime;
+
+ UInt_t itime = fTimeRow[Item]&0x00ffffff;
+ Float_t time = (Float_t)itime*50.;
+ Error = fTimeRow[Item]>>24;
+ return time;
}
//______________________________________________________________________________
Int_t AliTOFRoc::GetTotPad(Int_t Item)
+{
//
// Reads the cohordinates of the pad starting
// from the line of the raw data
//
-{
- UInt_t NRoc = (ChrgRow[Item]&0xf0000000)>>28;
- UInt_t NFec = (ChrgRow[Item]&0x0fc00000)>>22;
- UInt_t NTdc = (ChrgRow[Item]&0x003f0000)>>16;
- UInt_t Pad = NRoc*32*32+NFec*32+NTdc;
- return Pad;
+
+ UInt_t nRoc = (fChrgRow[Item]&0xf0000000)>>28;
+ UInt_t nFec = (fChrgRow[Item]&0x0fc00000)>>22;
+ UInt_t nTdc = (fChrgRow[Item]&0x003f0000)>>16;
+ UInt_t pad = nRoc*32*32+nFec*32+nTdc;
+ return pad;
}
//______________________________________________________________________________
UInt_t AliTOFRoc::GetCheckSum()
+{
//
// Calculate the checksum word of the current ROC
//
-{
- UInt_t CheckSum=0;
- for(Int_t i=0; i<Items; i++){
- CheckSum += BitCount(GetChrgRow(i));
- CheckSum += BitCount(GetTimeRow(i));
+
+ UInt_t checkSum=0;
+ for(Int_t i=0; i<fItems; i++){
+ checkSum += BitCount(GetChrgRow(i));
+ checkSum += BitCount(GetTimeRow(i));
}
- return CheckSum;
+ return checkSum;
}
//______________________________________________________________________________
UInt_t AliTOFRoc::BitCount(UInt_t x)
+{
//
// Count the "1" bit in the current word
//
-{
+
UInt_t count=0;
for (count=0; x!=0; x>>=1){
if(x&0x00000001) count++;
//______________________________________________________________________________
UInt_t AliTOFRoc::SetSize()
+{
//
// Reads the size of data from current ROC starting
// from the header line of the raw data
//
-{
- Size = Header&0x0000ffff;
- Items = (Size-4)/4;
- return Size;
+
+ fSize = fHeader&0x0000ffff;
+ fItems = (fSize-4)/4;
+ return fSize;
}
//______________________________________________________________________________
AliTOFRawSector::AliTOFRawSector()
+{
//
// Constructor of AliTOFRawSector class
// Each sector is in effect a
// TClonesArray of 14 AliTOFRoc Objects
//
-{
fRocData = new TClonesArray("AliTOFRoc",14);
}
//______________________________________________________________________________
AliTOFRawSector::~AliTOFRawSector()
{
- delete fRocData;
+// destructor of the AliTOFRawSector object
+// Here we delete the 14 AliTOFRoc istances
+//
+ if (fRocData) {
+ fRocData->Delete() ;
+ delete fRocData;
+ fRocData = 0;
+ }
}
//______________________________________________________________________________
void AliTOFRawSector::WriteSector()
+{
//
// Starting from the raw data objects writes a binary file
// similar to real raw data.
//
-{
+
FILE *rawfile;
rawfile = fopen("rawdata.dat","w");
// fprintf(rawfile,Header);
Int_t nRoc;
-
+
+// loop on all AliTOFRoc Headers to set them
for(nRoc=1; nRoc<=14; nRoc++){
AliTOFRoc* currentRoc = (AliTOFRoc*)fRocData->UncheckedAt(nRoc);
currentRoc->SetHeader();
- // UInt_t RocHeader = currentRoc->Header;
+ // UInt_t RocHeader = currentRoc->fHeader;
// fprintf(rawfile,RocHeader);
}
for(nRoc=1; nRoc<=14; nRoc++){
AliTOFRoc* currentRoc = (AliTOFRoc*)fRocData->UncheckedAt(nRoc);
- Int_t rocItems = currentRoc->Items;
+ Int_t rocItems = currentRoc->GetItems();
for(Int_t nItem=1; nItem<=rocItems;nItem++){
// UInt_t TimeRow = currentRoc->GetTimeRow(nItem);
//______________________________________________________________________________
void AliTOFRawSector::ReadSector()
+{
//
// Starting from raw data initialize and write the
// Raw Data objects
//(i.e. a TClonesArray of 18 AliTOFRawSector)
//
-{
+
FILE *rawfile;
rawfile = fopen("rawdata.dat","r");
+// fscanf(rawfile,Header);
// fscanf(rawfile,Header);
Int_t nRoc;
for(nRoc=1; nRoc<=14; nRoc++){
AliTOFRoc* currentRoc = (AliTOFRoc*)fRocData->UncheckedAt(nRoc);
- UInt_t RocHeader;
- // fscanf(rawfile,RocHeader);
- currentRoc->SetHeader(RocHeader);
+ UInt_t rocHeader;
+ fscanf(rawfile,"%u",&rocHeader);
+ currentRoc->SetHeader(rocHeader);
}
- // UInt_t SCMWord;
-// fscanf(rawfile,SCMWord);
+// UInt_t SCMWord;
+// fscanf(rawfile,"%u",SCMWord);
for(nRoc=1; nRoc<=14; nRoc++){
AliTOFRoc* currentRoc = (AliTOFRoc*)fRocData->UncheckedAt(nRoc);
// Int_t Size = currentRoc->SetSize();
- Int_t nItems = currentRoc->Items;
+ Int_t nItems = currentRoc->GetItems();
for(Int_t nrow=0; nrow<=nItems; nrow++){
UInt_t charRow,timeRow;
-// fscanf(rawfile, charRow);
+ fscanf(rawfile,"%u",&charRow);
currentRoc->SetTime(nrow, charRow);
-// fscanf(rawfile, timeRow);
+ fscanf(rawfile,"%u",&timeRow);
currentRoc->SetTime(nrow, timeRow);
}
- // Int_t FinalWord;
-// fscanf(rawfile,FinalWord);
+ Int_t FinalWord;
+ fscanf(rawfile,"%d",&FinalWord);
}
// fscanf(rawfile,GlobalCheckSum);
}
-#ifndef TOFD_H
-#define TOFD_H
+#ifndef ALITOFD_H
+#define ALITOFD_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
class AliTOFRoc : public TObject {
public:
- Int_t Items;
- Int_t Size;
- Int_t NRoc;
- UInt_t Header;
+ AliTOFRoc();
+ virtual ~AliTOFRoc();
+ Int_t AddItem (Int_t Fec, Int_t Tdc, Int_t Error, Float_t Charge, Float_t Time);
+// Int_t AddItem (Int_t, UInt_t);
+// setters for AliTOFRoc object
+ void SetHeader();
+ void SetTime (UInt_t Item, UInt_t Error, Float_t RealTime);
+ void SetTime (UInt_t Item, UInt_t tir);
+ void SetCharge(UInt_t Item, UInt_t Fec,UInt_t Tdc,Float_t RealCharge);
+ void SetCharge(UInt_t Item, UInt_t chr);
+// getters for AliTOFRoc object
+ Float_t GetTime (Int_t Item,UInt_t& Error);
+ Float_t GetCharge(Int_t Item);
+ Int_t GetTotPad(Int_t Item);
+ UInt_t GetCheckSum();
+ UInt_t BitCount (UInt_t x);
+ UInt_t SetSize ();
+ Int_t GetSize() const {return fItems*8+4;}
+ Int_t GetItems() const {return fItems;}
+ UInt_t GetChrgRow(Int_t i) const {return fChrgRow[i];}
+ UInt_t GetTimeRow(Int_t i) const {return fTimeRow[i];}
+ void SetHeader(UInt_t head){fHeader=head;}
+
+ protected:
+ Int_t fItems; // number of items
+ Int_t fSize; // size
+ Int_t fNRoc; // Roc number
+ UInt_t fHeader; // Roc header number
+
/* class ChargeRow
{
public:
UInt_t TdcID:6;
Int_t ChADC:16;
}Charge[1024];
-
+
class TimeRow
{
public:
Int_t TDC :24;
}Time[1024];
*/
- UInt_t ChrgRow[1024];
- UInt_t TimeRow[1024];
+ UInt_t fChrgRow[1024]; // adc values
+ UInt_t fTimeRow[1024]; // tdc values
+
+
- public:
- AliTOFRoc();
- virtual ~AliTOFRoc();
- Int_t AddItem (Int_t, Int_t, Int_t, Float_t, Float_t);
-// Int_t AddItem (Int_t, UInt_t);
- void SetHeader();
- void SetTime (UInt_t, UInt_t, Float_t);
- void SetTime (UInt_t, UInt_t);
- void SetCharge(UInt_t, UInt_t,UInt_t,Float_t);
- void SetCharge(UInt_t, UInt_t);
- Float_t GetTime (Int_t,UInt_t&);
- Float_t GetCharge(Int_t);
- Int_t GetTotPad(Int_t);
- UInt_t GetCheckSum();
- UInt_t BitCount (UInt_t);
- UInt_t SetSize ();
-
- inline Int_t GetSize() {return Items*8+4;}
- inline Int_t GetItems() {return Items;}
- inline UInt_t GetChrgRow(Int_t i){return ChrgRow[i];}
- inline UInt_t GetTimeRow(Int_t i){return TimeRow[i];}
- inline void SetHeader(UInt_t head){Header=head;}
ClassDef(AliTOFRoc,2)
};
//_______________________________________________________
class AliTOFRawDigit : public TObject{
-
-public:
- Int_t fTreeD;
- Int_t fRawDigits;
public:
AliTOFRawDigit();
virtual ~AliTOFRawDigit(){};
+
+protected:
+ Int_t fTreeD; // class under construction
+ Int_t fRawDigits; // class under construction
+
ClassDef(AliTOFRawDigit,2)
};
//_______________________________________________________
class AliTOFRawSector : public TObject{
- public:
- TClonesArray *fRocData;
- UInt_t Header;
- UInt_t GlobalCheckSum;
-
public:
AliTOFRawSector();
virtual ~AliTOFRawSector();
void WriteSector();
void ReadSector();
- inline TClonesArray *GetRocData() {return fRocData;}
- inline void SetGlobalCS(UInt_t gcs){GlobalCheckSum=gcs;}
- inline void SetHeader (UInt_t hdr){Header = hdr;}
+ TClonesArray* GetRocData() const {return fRocData;}
+ void SetGlobalCS(UInt_t gcs){fGlobalCheckSum=gcs;}
+ void SetHeader (UInt_t hdr){fHeader = hdr;}
+
+ protected:
+ TClonesArray* fRocData; // pointer to the TClonesArray of Roc Data
+ UInt_t fHeader; // RawSector header number
+ UInt_t fGlobalCheckSum; // check flag
+
ClassDef(AliTOFRawSector,2)
};
-#endif
+#endif /* ALITOFD_H */
/*
$Log$
+Revision 1.18 2000/12/04 08:48:20 alibrary
+Fixing problems in the HEAD
+
Revision 1.17 2000/10/02 21:28:17 fca
Removal of useless dependecies via forward declarations
//
// University of Salerno - Italy
//
+// Fabrizio Pierella
+// University of Bologna - Italy
+//
//
//Begin_Html
/*
//
// Check that FRAME is there otherwise we have no place where to
// put TOF
- AliModule* FRAME=gAlice->GetModule("FRAME");
- if(!FRAME) {
+ AliModule* frame=gAlice->GetModule("FRAME");
+ if(!frame) {
Error("Ctor","TOF needs FRAME to be present\n");
exit(1);
} else
- if(FRAME->IsVersion()!=1) {
+ if(frame->IsVersion()!=1) {
Error("Ctor","FRAME version 1 needed with this version of TOF\n");
exit(1);
}
// Standard constructor
//
}
+
+//____________________________________________________________________________
+AliTOFv0::~AliTOFv0()
+{
+ // destructor
+
+ if ( fHits) {
+ fHits->Delete() ;
+ delete fHits ;
+ fHits = 0 ;
+ }
+/*
+ if ( fSDigits) {
+ fSDigits->Delete() ;
+ delete fSDigits ;
+ fSDigits = 0 ;
+ }
+*/
+ if ( fDigits) {
+ fDigits->Delete() ;
+ delete fDigits ;
+ fDigits = 0 ;
+ }
+
+}
//_____________________________________________________________________________
void AliTOFv0::BuildGeometry()
{
// Build TOF ROOT geometry for the ALICE event viewver
//
- TNode *Node, *Top;
+ TNode *node, *top;
const int kColorTOF = 27;
// Find top TNODE
- Top = gAlice->GetGeometry()->GetNode("alice");
+ top = gAlice->GetGeometry()->GetNode("alice");
// Position the different copies
- const Float_t rTof =(fRmax+fRmin)/2;
- const Float_t hTof = fRmax-fRmin;
- const Int_t fNTof = 18;
+ const Float_t krTof =(fRmax+fRmin)/2;
+ const Float_t khTof = fRmax-fRmin;
+ const Int_t kNTof = fNTof;
const Float_t kPi = TMath::Pi();
- const Float_t angle = 2*kPi/fNTof;
+ const Float_t kangle = 2*kPi/kNTof;
Float_t ang;
// Define TOF basic volume
- char NodeName0[6], NodeName1[6], NodeName2[6];
- char NodeName3[6], NodeName4[6], RotMatNum[6];
+ char nodeName0[7], nodeName1[7], nodeName2[7];
+ char nodeName3[7], nodeName4[7], rotMatNum[7];
new TBRIK("S_TOF_C","TOF box","void",
- 120*0.5,hTof*0.5,fZlenC*0.5);
+ 120*0.5,khTof*0.5,fZlenC*0.5);
new TBRIK("S_TOF_B","TOF box","void",
- 120*0.5,hTof*0.5,fZlenB*0.5);
+ 120*0.5,khTof*0.5,fZlenB*0.5);
new TBRIK("S_TOF_A","TOF box","void",
- 120*0.5,hTof*0.5,fZlenA*0.5);
+ 120*0.5,khTof*0.5,fZlenA*0.5);
- for (Int_t NodeNum=1;NodeNum<19;NodeNum++){
+ for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
- if (NodeNum<10) {
- sprintf(RotMatNum,"rot50%i",NodeNum);
- sprintf(NodeName0,"FTO00%i",NodeNum);
- sprintf(NodeName1,"FTO10%i",NodeNum);
- sprintf(NodeName2,"FTO20%i",NodeNum);
- sprintf(NodeName3,"FTO30%i",NodeNum);
- sprintf(NodeName4,"FTO40%i",NodeNum);
+ if (nodeNum<10) {
+ sprintf(rotMatNum,"rot50%i",nodeNum);
+ sprintf(nodeName0,"FTO00%i",nodeNum);
+ sprintf(nodeName1,"FTO10%i",nodeNum);
+ sprintf(nodeName2,"FTO20%i",nodeNum);
+ sprintf(nodeName3,"FTO30%i",nodeNum);
+ sprintf(nodeName4,"FTO40%i",nodeNum);
}
- if (NodeNum>9) {
- sprintf(RotMatNum,"rot5%i",NodeNum);
- sprintf(NodeName0,"FTO0%i",NodeNum);
- sprintf(NodeName1,"FTO1%i",NodeNum);
- sprintf(NodeName2,"FTO2%i",NodeNum);
- sprintf(NodeName3,"FTO3%i",NodeNum);
- sprintf(NodeName4,"FTO4%i",NodeNum);
+ if (nodeNum>9) {
+ sprintf(rotMatNum,"rot5%i",nodeNum);
+ sprintf(nodeName0,"FTO0%i",nodeNum);
+ sprintf(nodeName1,"FTO1%i",nodeNum);
+ sprintf(nodeName2,"FTO2%i",nodeNum);
+ sprintf(nodeName3,"FTO3%i",nodeNum);
+ sprintf(nodeName4,"FTO4%i",nodeNum);
}
- new TRotMatrix(RotMatNum,RotMatNum,90,-20*NodeNum,90,90-20*NodeNum,0,0);
- ang = (4.5-NodeNum) * angle;
-
- Top->cd();
- Node = new TNode(NodeName0,NodeName0,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName1,NodeName1,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName2,NodeName2,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName3,NodeName3,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName4,NodeName4,"S_TOF_A",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),0.,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
+ new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+ ang = (4.5-nodeNum) * kangle;
+
+ top->cd();
+ node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
}
}
// xFLT, yFLT, zFLT - sizes of TOF modules (large)
Float_t ycoor, zcoor;
- Float_t par[10];
+ Float_t par[3];
Int_t *idtmed = fIdtmed->GetArray()-499;
Int_t idrotm[100];
Int_t nrot = 0;
- Float_t Radius = fRmin+2.;//cm
+ Float_t radius = fRmin+2.;//cm
par[0] = xtof * 0.5;
par[1] = ytof * 0.5;
Float_t yPad = 0.505;//cm
-// Large not sensitive volumes with CO2
+// Large not sensitive volumes with Insensitive Freon
par[0] = xFLT*0.5;
- par[1] = yFLT*0.5;
-
+ par[1] = yFLT*0.5;
+
cout <<"************************* TOF geometry **************************"<<endl;
-
+
par[2] = (zFLTA *0.5);
- gMC->Gsvolu("FLTA", "BOX ", idtmed[506], par, 3); // CO2
- gMC->Gspos ("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY");
-
+ gMC->Gsvolu("FLTA", "BOX ", idtmed[512], par, 3); // Insensitive Freon
+ gMC->Gspos("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY");
+
par[2] = (zFLTB * 0.5);
- gMC->Gsvolu("FLTB", "BOX ", idtmed[506], par, 3); // CO2
- gMC->Gspos ("FLTB", 0, "FTOB", 0., 0., 0., 0, "ONLY");
+ gMC->Gsvolu("FLTB", "BOX ", idtmed[512], par, 3); // Insensitive Freon
+ gMC->Gspos("FLTB", 0, "FTOB", 0., 0., 0., 0, "ONLY");
- par[2] = (zFLTC * 0.5);
- gMC->Gsvolu("FLTC", "BOX ", idtmed[506], par, 3); // CO2
- gMC->Gspos ("FLTC", 0, "FTOC", 0., 0., 0., 0, "ONLY");
+ par[2] = (zFLTC * 0.5);
+ gMC->Gsvolu("FLTC", "BOX ", idtmed[512], par, 3); // Insensitive Freon
+ gMC->Gspos("FLTC", 0, "FTOC", 0., 0., 0., 0, "ONLY");
-////////// Layers before detector ////////////////////
-
-// MYlar layer in front 1.0 mm thick at the beginning
- par[0] = -1;
+////////// Layers of Aluminum before and after detector //////////
+////////// Aluminum Box for Modules (2.0 mm thickness) /////////
+////////// lateral walls not simulated
+ par[0] = xFLT*0.5;
par[1] = 0.1;//cm
- par[2] = -1;
ycoor = -yFLT/2 + par[1];
- gMC->Gsvolu("FMYA", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYB", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYC", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
-
-// honeycomb (special Polyethilene Layer of 1cm)
- ycoor = ycoor + par[1];
- par[0] = -1;
- par[1] = 0.5;//cm
- par[2] = -1;
- ycoor = ycoor + par[1];
- gMC->Gsvolu("FPLA", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLB", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLC", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTA *0.5);
+ gMC->Gsvolu("FALA", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos("FALA", 1, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos("FALA", 2, "FLTA", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FALB", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos("FALB", 1, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos("FALB", 2, "FLTB", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FALC", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos("FALC", 1, "FLTC", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos("FALC", 2, "FLTC", 0.,-ycoor, 0., 0, "ONLY");
///////////////// Detector itself //////////////////////
- const Float_t StripWidth = 10.0;//cm
- const Float_t DeadBound = 1.5;//cm non-sensitive between the pad edge
+ Float_t stripWidth = 10.0;//cm
+ const Float_t kdeadBound = 1.5;//cm non-sensitive between the pad edge
//and the boundary of the strip
- const Int_t nx = 48; // number of pads along x
- const Int_t nz = 2; // number of pads along z
- const Float_t Space= 5.5; //cm distance from the front plate of the box
+ const Int_t knx = 48; // number of pads along x
+ const Int_t knz = 2; // number of pads along z
+ const Float_t kspace= 5.5; //cm distance from the front plate of the box
Float_t zSenStrip;
- zSenStrip = StripWidth-2*DeadBound;//cm
+ zSenStrip = stripWidth-2*kdeadBound;//cm
par[0] = xFLT/2;
par[1] = yPad/2;
- par[2] = StripWidth/2.;
+ par[2] = stripWidth/2.;
+
+// new description for strip volume
+// -- all constants are expressed in cm
+ // heigth of different layers
+ const Float_t khhony = 1. ; // heigth of HONY Layer
+ const Float_t khpcby = 0.15 ; // heigth of PCB Layer
+ const Float_t khmyly = 0.035 ; // heigth of MYLAR Layer
+ const Float_t khgraphy = 0.02 ; // heigth of GRAPHITE Layer
+ const Float_t khglasseiy = 0.32; // 2.2 Ext. Glass + 1. Semi Int. Glass (mm)
+ const Float_t khsensmy = 0.11 ; // heigth of Sensitive Freon Mixture
+ const Float_t kwsensmz = 2*3.5 ; // cm
+ const Float_t klsensmx = 48*2.5; // cm
+ const Float_t kwpadz = 3.5; // cm z dimension of the FPAD volume
+ const Float_t klpadx = 2.5; // cm x dimension of the FPAD volume
+
+ // heigth of the FSTR Volume (the strip volume)
+ const Float_t khstripy = 2*(khhony+khpcby+khmyly+khgraphy+khglasseiy)+khsensmy;
+ // width of the FSTR Volume (the strip volume)
+ const Float_t kwstripz = 10.;
+ // length of the FSTR Volume (the strip volume)
+ const Float_t klstripx = 122.;
- // glass layer of detector STRip
- gMC->Gsvolu("FSTR","BOX",idtmed[514],par,3);
-
- // Non-Sesitive Freon boundaries
- par[0] = xFLT*0.5;
- par[1] = 0.110*0.5;//cm
- par[2] = -1;
- gMC->Gsvolu("FNSF","BOX",idtmed[512],par,3);
- gMC->Gspos ("FNSF",0,"FSTR",0.,0.,0.,0,"ONLY");
-
- // MYlar for Internal non-sesitive boundaries
- par[1] = 0.025;//cm
- gMC->Gsvolu("FMYI","BOX",idtmed[510],par,3);
- gMC->Gspos ("FMYI",0,"FNSF",0.,0.,0.,0,"ONLY");
-
- // MYlar eXternal layers
- par[1] = 0.035*0.5;//cm
- ycoor = -yPad*0.5+par[1];
- gMC->Gsvolu("FMYX","BOX",idtmed[510],par,3);
- gMC->Gspos ("FMYX",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FMYX",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
- ycoor += par[1];
-
- // GRaphyte Layers
- par[1] = 0.003*0.5;
- ycoor += par[1];
- gMC->Gsvolu("FGRL","BOX",idtmed[502],par,3);
- gMC->Gspos ("FGRL",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FGRL",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
-
- // freon sensitive layer (Chlorine-Fluorine-Carbon)
- par[0] = -1;
- par[1] = 0.110*0.5;
- par[2] = zSenStrip*0.5;
- gMC->Gsvolu("FCFC","BOX",idtmed[513],par,3);
- gMC->Gspos ("FCFC",0,"FNSF",0.,0.,0.,0,"ONLY");
+ Float_t parfp[3]={klstripx*0.5,khstripy*0.5,kwstripz*0.5};
+// coordinates of the strip center in the strip reference frame; used for positioning
+// internal strip volumes
+ Float_t posfp[3]={0.,0.,0.};
- // Pad definition x & z
- gMC->Gsdvn("FLZ","FCFC", nz, 3);
- gMC->Gsdvn("FLX","FLZ" , nx, 1);
-
- // MRPC PAD itself
- par[0] = -1;
- par[1] = -1;
- par[2] = -1;
- gMC->Gsvolu("FPAD", "BOX ", idtmed[513], par, 3);
- gMC->Gspos ("FPAD", 0, "FLX", 0., 0., 0., 0, "ONLY");
+ // FSTR volume definition and filling this volume with non sensitive Gas Mixture
+ gMC->Gsvolu("FSTR","BOX",idtmed[512],parfp,3);
+ //-- HONY Layer definition
+// parfp[0] = -1;
+ parfp[1] = khhony*0.5;
+// parfp[2] = -1;
+ gMC->Gsvolu("FHON","BOX",idtmed[503],parfp,3);
+ // positioning 2 HONY Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+parfp[1];
+ gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- PCB Layer definition
+ parfp[1] = khpcby*0.5;
+ gMC->Gsvolu("FPCB","BOX",idtmed[504],parfp,3);
+ // positioning 2 PCB Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+khhony+parfp[1];
+ gMC->Gspos("FPCB",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FPCB",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- MYLAR Layer definition
+ parfp[1] = khmyly*0.5;
+ gMC->Gsvolu("FMYL","BOX",idtmed[511],parfp,3);
+ // positioning 2 MYLAR Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1];
+ gMC->Gspos("FMYL",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FMYL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Graphite Layer definition
+ parfp[1] = khgraphy*0.5;
+ gMC->Gsvolu("FGRP","BOX",idtmed[502],parfp,3);
+ // positioning 2 Graphite Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+parfp[1];
+ gMC->Gspos("FGRP",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGRP",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Glass (EXT. +Semi INT.) Layer definition
+ parfp[1] = khglasseiy*0.5;
+ gMC->Gsvolu("FGLA","BOX",idtmed[514],parfp,3);
+ // positioning 2 Glass Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+khgraphy+parfp[1];
+ gMC->Gspos("FGLA",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGLA",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Sensitive Mixture Layer definition
+ parfp[0] = klsensmx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwsensmz*0.5;
+ gMC->Gsvolu("FSEN","BOX",idtmed[513],parfp,3);
+ // positioning the sensitive gas Layer on FSTR volume
+ gMC->Gspos("FSEN",0,"FSTR",0.,0.,0.,0,"ONLY");
+
+ // dividing FSEN along z in knz=2 and along x in knx=48
+ gMC->Gsdvn("FSEZ","FSEN",knz,3);
+ gMC->Gsdvn("FSEX","FSEZ",knx,1);
+
+ // FPAD volume definition
+ parfp[0] = klpadx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwpadz*0.5;
+ gMC->Gsvolu("FPAD","BOX",idtmed[513],parfp,3);
+ // positioning the FPAD volumes on previous divisions
+ gMC->Gspos("FPAD",0,"FSEX",0.,0.,0.,0,"ONLY");
//// Positioning the Strips (FSTR) in the FLT volumes /////
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t Gap = 4.; //cm distance between the strip axis
+ Float_t gap = 4.; //cm distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Float_t last;
Int_t i=1,j=1;
nrot = 0;
zcoor = 0;
- ycoor = -14.5 + Space ; //2 cm over front plate
+ ycoor = -14.5 + kspace ; //2 cm over front plate
AliMatrix (idrotm[0], 90., 0.,90.,90.,0., 90.);
gMC->Gspos("FSTR",j,"FLTA",0.,ycoor, 0.,idrotm[0],"ONLY");
zcoor -= zSenStrip;
j++;
- Int_t UpDown = -1; // UpDown=-1 -> Upper strip
- // UpDown=+1 -> Lower strip
+ Int_t upDown = -1; // upDown=-1 -> Upper strip
+ // upDown=+1 -> Lower strip
do{
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
j += 2;
- UpDown*= -1; // Alternate strips
+ upDown*= -1; // Alternate strips
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- } while (zcoor-(StripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
+ } while (zcoor-(stripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
zcoor = zcoor+(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)+
+ upDown*gap*TMath::Tan(ang)+
(zSenStrip/2)/TMath::Cos(ang);
- Gap = 6.;
+ gap = 6.;
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
- ycoor = -29./2.+ Space;//2 cm over front plate
+ ycoor = -29./2.+ kspace;//2 cm over front plate
// Plate B
nrot = 0;
i=1;
- UpDown *= -1;
+ upDown *= -1;
zpos = zcoor - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang)-0.5/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -29.*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -29.*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
i++;
- UpDown*=-1;
+ upDown*=-1;
do {
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -29.*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -29.*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
- UpDown*=-1;
+ upDown*=-1;
i++;
} while (TMath::Abs(ang*kRaddeg)<22.5);//till we reach a tilting angle of 22.5 degrees
- ycoor = -29.*0.5+ Space ; //2 cm over front plate
+ ycoor = -29.*0.5+ kspace ; //2 cm over front plate
do {
i++;
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
zcoor = zpos+(zFLTB/2+zFLTA/2+db);
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
zpos = zpos - zSenStrip/TMath::Cos(ang);
- last = StripWidth*TMath::Cos(ang)/2.;
+ last = stripWidth*TMath::Cos(ang)/2.;
} while (zpos>-t+zFLTC+db);
// Plate C
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)-
- Gap*TMath::Tan(ang)-
+ gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
nrot = 0;
i=0;
- ycoor= -29.*0.5+Space+Gap;
+ ycoor= -29.*0.5+kspace+gap;
do {
i++;
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
zcoor = zpos+(zFLTC*0.5+zFLTB+zFLTA*0.5+db*2);
gMC->Gspos("FSTR",i, "FLTC", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
zpos = zpos - zSenStrip/TMath::Cos(ang);
- last = StripWidth*TMath::Cos(ang)*0.5;
+ last = stripWidth*TMath::Cos(ang)*0.5;
} while (zpos>-t+last);
-////////// Layers after detector /////////////////
+////////// Layers after strips /////////////////
+// honeycomb (Polyethilene) Layer after (1.2cm)
-// honeycomb (Polyethilene) Layer after (3cm)
+ Float_t overSpace = fOverSpc;//cm
- Float_t OverSpace = 15.30;//cm
-
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 0.6;
- par[2] = -1;
- ycoor = -yFLT/2 + OverSpace + par[1];
+ par[2] = (zFLTA *0.5);
+ ycoor = -yFLT/2 + overSpace + par[1];
gMC->Gsvolu("FPEA", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FPEB", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FPEC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// Electronics (Cu) after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 1.43*0.05*0.5; // 5% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FECA", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FECB", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FECC", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// cooling WAter after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 36.1*0.02*0.5; // 2% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FWAA", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FWAB", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FWAC", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+// frame of Air
+ ycoor += par[1];
+ par[0] = xFLT*0.5;
+ par[1] = (yFLT/2-ycoor-0.2)*0.5; // Aluminum layer considered (0.2 cm)
+ par[2] = (zFLTA *0.5);
+ ycoor += par[1];
+ gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+/* fp
//Back Plate honycomb (2cm)
par[0] = -1;
par[1] = 2 *0.5;
gMC->Gspos ("FBPB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
gMC->Gsvolu("FBPC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FBPC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+fp */
}
//_____________________________________________________________________________
// Procedure called at each step in the Time Of Flight
//
Float_t hits[8],rho,phi,phid,z;
- Int_t sector, plate, pad_x, pad_z, strip;
- Int_t copy, pad_z_id, pad_x_id, strip_id, i;
+ Int_t sector, plate, padx, padz, strip;
+ Int_t copy, padzid, padxid, stripid, i;
Int_t vol[4];
Int_t *idtmed = fIdtmed->GetArray()-499;
TLorentzVector mom, pos;
{
// getting information about hit volumes
- pad_z_id=gMC->CurrentVolOffID(2,copy);
- pad_z=copy;
+ padzid=gMC->CurrentVolOffID(2,copy);
+ padz=copy;
- pad_x_id=gMC->CurrentVolOffID(1,copy);
- pad_x=copy;
+ padxid=gMC->CurrentVolOffID(1,copy);
+ padx=copy;
- strip_id=gMC->CurrentVolOffID(5,copy);
+ stripid=gMC->CurrentVolOffID(4,copy);
strip=copy;
- pad_z = (strip-1)*2+pad_z;
+ padz = (strip-1)*2+padz;
gMC->TrackPosition(pos);
gMC->TrackMomentum(mom);
if (z> limB) plate = 1;
if (z<-limB) plate = 5;
- if (plate==3) pad_z -= 2;
+ if (plate==3) padz -= 2;
phid = phi*kRaddeg;
sector = Int_t (phid/20.);
vol[0] = sector;
vol[1] = plate;
- vol[2] = pad_x;
- vol[3] = pad_z;
+ vol[2] = padx;
+ vol[3] = padz;
Int_t track = gAlice->CurrentTrack();
AliTOF::AddHit(track,vol, hits);
}
}
+
+
+
+
+
+
-#ifndef TOFv0_H
-#define TOFv0_H
+//_________________________________________________________________________
+// Implementation version v0 of TOF Manager class
+// NO HOLES i.e. FULL COVERAGE
+// NB: for this version no hits are defined
+//*--
+//*-- Authors: Pierella, Seganti, Vicinanza (Bologna and Salerno University)
+
+#ifndef ALITOFv0_H
+#define ALITOFv0_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
-///////////////////////////////////////////////////////
-// Manager and hits classes for set:TOF version 0 //
-///////////////////////////////////////////////////////
-
#include "AliTOF.h"
#include "AliHit.h"
class AliTOFv0 : public AliTOF {
-
-private:
- Int_t fIdFTOA;
- Int_t fIdFTOB;
- Int_t fIdFTOC;
- Int_t fIdFLTA;
- Int_t fIdFLTB;
- Int_t fIdFLTC;
public:
AliTOFv0();
AliTOFv0(const char *name, const char *title);
- virtual ~AliTOFv0() {}
+ virtual ~AliTOFv0(void) ;
virtual void BuildGeometry();
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual void Init();
virtual Int_t IsVersion() const {return 0;}
- virtual void TOFpc(Float_t,Float_t,Float_t,Float_t,Float_t,Float_t);
+ virtual void TOFpc(Float_t xtof,Float_t ytof,Float_t zlenC,Float_t zlenB,
+ Float_t zlenA,Float_t ztof0);
virtual void StepManager();
virtual void DrawModule();
-
+
+private:
+ Int_t fIdFTOA; // FTOA volume identifier (outer plate A)
+ Int_t fIdFTOB; // FTOB volume identifier (outer plate B)
+ Int_t fIdFTOC; // FTOC volume identifier (outer plate C)
+ Int_t fIdFLTA; // FLTA volume identifier (inner plate A)
+ Int_t fIdFLTB; // FLTB volume identifier (inner plate B)
+ Int_t fIdFLTC; // FLTC volume identifier (inner plate C)
+
ClassDef(AliTOFv0,1) //Time Of Flight version 0
};
-#endif
+#endif /* ALITOFv0_H */
/*
$Log$
+Revision 1.19 2000/12/04 08:48:20 alibrary
+Fixing problems in the HEAD
+
Revision 1.18 2000/10/02 21:28:17 fca
Removal of useless dependecies via forward declarations
//
// University of Salerno - Italy
//
+// Fabrizio Pierella
+// University of Bologna - Italy
+//
//
//Begin_Html
/*
//
// Check that FRAME is there otherwise we have no place where to
// put TOF
- AliModule* FRAME=gAlice->GetModule("FRAME");
- if(!FRAME) {
+ AliModule* frame=gAlice->GetModule("FRAME");
+ if(!frame) {
Error("Ctor","TOF needs FRAME to be present\n");
exit(1);
} else
- if(FRAME->IsVersion()!=1) {
+ if(frame->IsVersion()!=1) {
Error("Ctor","FRAME version 1 needed with this version of TOF\n");
exit(1);
}
+}
+
+//____________________________________________________________________________
+AliTOFv1::~AliTOFv1()
+{
+ // destructor
+
+ if ( fHits) {
+ fHits->Delete() ;
+ delete fHits ;
+ fHits = 0 ;
+ }
+/*
+ if ( fSDigits) {
+ fSDigits->Delete() ;
+ delete fSDigits ;
+ fSDigits = 0 ;
+ }
+*/
+ if ( fDigits) {
+ fDigits->Delete() ;
+ delete fDigits ;
+ fDigits = 0 ;
+ }
+
}
//_____________________________________________________________________________
//
// Build TOF ROOT geometry for the ALICE event display
//
- TNode *Node, *Top;
+ TNode *node, *top;
const int kColorTOF = 27;
// Find top TNODE
- Top = gAlice->GetGeometry()->GetNode("alice");
+ top = gAlice->GetGeometry()->GetNode("alice");
// Position the different copies
- const Float_t rTof =(fRmax+fRmin)/2;
- const Float_t hTof = fRmax-fRmin;
- const Int_t fNTof = 18;
+ const Float_t krTof =(fRmax+fRmin)/2;
+ const Float_t khTof = fRmax-fRmin;
+ const Int_t kNTof = fNTof;
const Float_t kPi = TMath::Pi();
- const Float_t angle = 2*kPi/fNTof;
+ const Float_t kangle = 2*kPi/kNTof;
Float_t ang;
// Define TOF basic volume
- char NodeName0[7], NodeName1[7], NodeName2[7];
- char NodeName3[7], NodeName4[7], RotMatNum[7];
+ char nodeName0[7], nodeName1[7], nodeName2[7];
+ char nodeName3[7], nodeName4[7], rotMatNum[7];
new TBRIK("S_TOF_C","TOF box","void",
- 120*0.5,hTof*0.5,fZlenC*0.5);
+ 120*0.5,khTof*0.5,fZlenC*0.5);
new TBRIK("S_TOF_B","TOF box","void",
- 120*0.5,hTof*0.5,fZlenB*0.5);
+ 120*0.5,khTof*0.5,fZlenB*0.5);
new TBRIK("S_TOF_A","TOF box","void",
- 120*0.5,hTof*0.5,fZlenA*0.5);
+ 120*0.5,khTof*0.5,fZlenA*0.5);
- for (Int_t NodeNum=1;NodeNum<19;NodeNum++){
+ for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
- if (NodeNum<10) {
- sprintf(RotMatNum,"rot50%i",NodeNum);
- sprintf(NodeName0,"FTO00%i",NodeNum);
- sprintf(NodeName1,"FTO10%i",NodeNum);
- sprintf(NodeName2,"FTO20%i",NodeNum);
- sprintf(NodeName3,"FTO30%i",NodeNum);
- sprintf(NodeName4,"FTO40%i",NodeNum);
+ if (nodeNum<10) {
+ sprintf(rotMatNum,"rot50%i",nodeNum);
+ sprintf(nodeName0,"FTO00%i",nodeNum);
+ sprintf(nodeName1,"FTO10%i",nodeNum);
+ sprintf(nodeName2,"FTO20%i",nodeNum);
+ sprintf(nodeName3,"FTO30%i",nodeNum);
+ sprintf(nodeName4,"FTO40%i",nodeNum);
}
- if (NodeNum>9) {
- sprintf(RotMatNum,"rot5%i",NodeNum);
- sprintf(NodeName0,"FTO0%i",NodeNum);
- sprintf(NodeName1,"FTO1%i",NodeNum);
- sprintf(NodeName2,"FTO2%i",NodeNum);
- sprintf(NodeName3,"FTO3%i",NodeNum);
- sprintf(NodeName4,"FTO4%i",NodeNum);
+ if (nodeNum>9) {
+ sprintf(rotMatNum,"rot5%i",nodeNum);
+ sprintf(nodeName0,"FTO0%i",nodeNum);
+ sprintf(nodeName1,"FTO1%i",nodeNum);
+ sprintf(nodeName2,"FTO2%i",nodeNum);
+ sprintf(nodeName3,"FTO3%i",nodeNum);
+ sprintf(nodeName4,"FTO4%i",nodeNum);
}
- new TRotMatrix(RotMatNum,RotMatNum,90,-20*NodeNum,90,90-20*NodeNum,0,0);
- ang = (4.5-NodeNum) * angle;
-
- Top->cd();
- Node = new TNode(NodeName0,NodeName0,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName1,NodeName1,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName2,NodeName2,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName3,NodeName3,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
-if (NodeNum<8 || NodeNum>12) {
- Top->cd();
- Node = new TNode(NodeName4,NodeName4,"S_TOF_A",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),0.,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
+ new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+ ang = (4.5-nodeNum) * kangle;
+
+ top->cd();
+ node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+if (nodeNum<8 || nodeNum>12) {
+ top->cd();
+ node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
} // Modules A which are not to be installed for PHOS holes.
- }
-}
-
+ } // end loop on nodeNum
+}
//_____________________________________________________________________________
void AliTOFv1::CreateGeometry()
// xFLT, yFLT, zFLT - sizes of TOF modules (large)
Float_t ycoor, zcoor;
- Float_t par[10];
+ Float_t par[3];
Int_t *idtmed = fIdtmed->GetArray()-499;
Int_t idrotm[100];
Int_t nrot = 0;
Float_t hTof = fRmax-fRmin;
- Float_t Radius = fRmin+2.;//cm
+ Float_t radius = fRmin+2.;//cm
par[0] = xtof * 0.5;
par[1] = ytof * 0.5;
Float_t yPad = 0.505;//cm
-// Large not sensitive volumes with CO2
+// Large not sensitive volumes with Insensitive Freon
par[0] = xFLT*0.5;
par[1] = yFLT*0.5;
-
+
cout <<"************************* TOF geometry **************************"<<endl;
-
+
par[2] = (zFLTA *0.5);
- gMC->Gsvolu("FLTA", "BOX ", idtmed[506], par, 3); // CO2
+ gMC->Gsvolu("FLTA", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY");
-
+
par[2] = (zFLTB * 0.5);
- gMC->Gsvolu("FLTB", "BOX ", idtmed[506], par, 3); // CO2
+ gMC->Gsvolu("FLTB", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTB", 0, "FTOB", 0., 0., 0., 0, "ONLY");
-
- par[2] = (zFLTC * 0.5);
- gMC->Gsvolu("FLTC", "BOX ", idtmed[506], par, 3); // CO2
+
+ par[2] = (zFLTC * 0.5);
+ gMC->Gsvolu("FLTC", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTC", 0, "FTOC", 0., 0., 0., 0, "ONLY");
-
-////////// Layers before detector ////////////////////
-
-// MYlar layer in front 1.0 mm thick at the beginning
- par[0] = -1;
+
+////////// Layers of Aluminum before and after detector //////////
+////////// Aluminum Box for Modules (2.0 mm thickness) /////////
+////////// lateral walls not simulated
+ par[0] = xFLT*0.5;
par[1] = 0.1;//cm
- par[2] = -1;
ycoor = -yFLT/2 + par[1];
- gMC->Gsvolu("FMYA", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYB", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYC", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
-
-// honeycomb (special Polyethilene Layer of 1cm)
- ycoor = ycoor + par[1];
- par[0] = -1;
- par[1] = 0.5;//cm
- par[2] = -1;
- ycoor = ycoor + par[1];
- gMC->Gsvolu("FPLA", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLB", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLC", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
-
+ par[2] = (zFLTA *0.5);
+ gMC->Gsvolu("FALA", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALA", 1, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALA", 2, "FLTA", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FALB", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALB", 1, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALB", 2, "FLTB", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FALC", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALC", 1, "FLTC", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALC", 2, "FLTC", 0.,-ycoor, 0., 0, "ONLY");
+
///////////////// Detector itself //////////////////////
- const Float_t DeadBound = fDeadBndZ; //cm non-sensitive between the pad edge
+ const Float_t kdeadBound = fDeadBndZ; //cm non-sensitive between the pad edge
//and the boundary of the strip
- const Int_t nx = fNpadX; // number of pads along x
- const Int_t nz = fNpadZ; // number of pads along z
- const Float_t Space = fSpace; //cm distance from the front plate of the box
+ const Int_t knx = fNpadX; // number of pads along x
+ const Int_t knz = fNpadZ; // number of pads along z
+ const Float_t kspace = fSpace; //cm distance from the front plate of the box
Float_t zSenStrip = fZpad*fNpadZ;//cm
- Float_t StripWidth = zSenStrip + 2*DeadBound;
+ Float_t stripWidth = zSenStrip + 2*kdeadBound;
par[0] = xFLT*0.5;
par[1] = yPad*0.5;
- par[2] = StripWidth*0.5;
+ par[2] = stripWidth*0.5;
- // glass layer of detector STRip
- gMC->Gsvolu("FSTR","BOX",idtmed[514],par,3);
-
- // Non-Sesitive Freon boundaries
- par[0] = xFLT*0.5;
- par[1] = 0.110*0.5;//cm
- par[2] = -1;
- gMC->Gsvolu("FNSF","BOX",idtmed[512],par,3);
- gMC->Gspos ("FNSF",0,"FSTR",0.,0.,0.,0,"ONLY");
-
- // MYlar for Internal non-sesitive boundaries
-// par[1] = 0.025;//cm
-// gMC->Gsvolu("FMYI","BOX",idtmed[510],par,3);
-// gMC->Gspos ("FMYI",0,"FNSF",0.,0.,0.,0,"MANY");
-
- // MYlar eXternal layers
- par[1] = 0.035*0.5;//cm
- ycoor = -yPad*0.5+par[1];
- gMC->Gsvolu("FMYX","BOX",idtmed[510],par,3);
- gMC->Gspos ("FMYX",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FMYX",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
- ycoor += par[1];
-
- // GRaphyte Layers
- par[1] = 0.003*0.5;
- ycoor += par[1];
- gMC->Gsvolu("FGRL","BOX",idtmed[502],par,3);
- gMC->Gspos ("FGRL",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FGRL",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
-
- // freon sensitive layer (Chlorine-Fluorine-Carbon)
- par[0] = xFST*0.5;
- par[1] = 0.110*0.5;
- par[2] = zSenStrip*0.5;
- gMC->Gsvolu("FCFC","BOX",idtmed[513],par,3);
- gMC->Gspos ("FCFC",0,"FNSF",0.,0.,0.,0,"ONLY");
+// new description for strip volume
+// -- all constants are expressed in cm
+// heigth of different layers
+ const Float_t khhony = 1. ; // heigth of HONY Layer
+ const Float_t khpcby = 0.15 ; // heigth of PCB Layer
+ const Float_t khmyly = 0.035 ; // heigth of MYLAR Layer
+ const Float_t khgraphy = 0.02 ; // heigth of GRAPHITE Layer
+ const Float_t khglasseiy = 0.32; // 2.2 Ext. Glass + 1. Semi Int. Glass (mm)
+ const Float_t khsensmy = 0.11 ; // heigth of Sensitive Freon Mixture
+ const Float_t kwsensmz = 2*3.5 ; // cm
+ const Float_t klsensmx = 48*2.5; // cm
+ const Float_t kwpadz = 3.5; // cm z dimension of the FPAD volume
+ const Float_t klpadx = 2.5; // cm x dimension of the FPAD volume
+
+ // heigth of the FSTR Volume (the strip volume)
+ const Float_t khstripy = 2*(khhony+khpcby+khmyly+khgraphy+khglasseiy)+khsensmy;
+ // width of the FSTR Volume (the strip volume)
+ const Float_t kwstripz = 10.;
+ // length of the FSTR Volume (the strip volume)
+ const Float_t klstripx = 122.;
+
+ Float_t parfp[3]={klstripx*0.5,khstripy*0.5,kwstripz*0.5};
+// coordinates of the strip center in the strip reference frame; used for positioning
+// internal strip volumes
+ Float_t posfp[3]={0.,0.,0.};
+
+ // FSTR volume definition and filling this volume with non sensitive Gas Mixture
+ gMC->Gsvolu("FSTR","BOX",idtmed[512],parfp,3);
+ //-- HONY Layer definition
+// parfp[0] = -1;
+ parfp[1] = khhony*0.5;
+// parfp[2] = -1;
+ gMC->Gsvolu("FHON","BOX",idtmed[503],parfp,3);
+ // positioning 2 HONY Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+parfp[1];
+ gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- PCB Layer definition
+ parfp[1] = khpcby*0.5;
+ gMC->Gsvolu("FPCB","BOX",idtmed[504],parfp,3);
+ // positioning 2 PCB Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+khhony+parfp[1];
+ gMC->Gspos("FPCB",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FPCB",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- MYLAR Layer definition
+ parfp[1] = khmyly*0.5;
+ gMC->Gsvolu("FMYL","BOX",idtmed[511],parfp,3);
+ // positioning 2 MYLAR Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1];
+ gMC->Gspos("FMYL",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FMYL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Graphite Layer definition
+ parfp[1] = khgraphy*0.5;
+ gMC->Gsvolu("FGRP","BOX",idtmed[502],parfp,3);
+ // positioning 2 Graphite Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+parfp[1];
+ gMC->Gspos("FGRP",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGRP",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Glass (EXT. +Semi INT.) Layer definition
+ parfp[1] = khglasseiy*0.5;
+ gMC->Gsvolu("FGLA","BOX",idtmed[514],parfp,3);
+ // positioning 2 Glass Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+khgraphy+parfp[1];
+ gMC->Gspos("FGLA",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGLA",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Sensitive Mixture Layer definition
+ parfp[0] = klsensmx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwsensmz*0.5;
+ gMC->Gsvolu("FSEN","BOX",idtmed[513],parfp,3);
+ // positioning the sensitive gas Layer on FSTR volume
+ gMC->Gspos("FSEN",0,"FSTR",0.,0.,0.,0,"ONLY");
+
+ // dividing FSEN along z in knz=2 and along x in knx=48
+ gMC->Gsdvn("FSEZ","FSEN",knz,3);
+ gMC->Gsdvn("FSEX","FSEZ",knx,1);
+
+ // FPAD volume definition
+ parfp[0] = klpadx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwpadz*0.5;
+ gMC->Gsvolu("FPAD","BOX",idtmed[513],parfp,3);
+ // positioning the FPAD volumes on previous divisions
+ gMC->Gspos("FPAD",0,"FSEX",0.,0.,0.,0,"ONLY");
- // Pad definition x & z
- gMC->Gsdvn("FLZ","FCFC", nz, 3);
- gMC->Gsdvn("FLX","FLZ" , nx, 1);
-
- // MRPC PAD itself
- par[0] = -1;
- par[1] = -1;
- par[2] = -1;
- gMC->Gsvolu("FPAD", "BOX ", idtmed[513], par, 3);
- gMC->Gspos ("FPAD", 0, "FLX", 0., 0., 0., 0, "ONLY");
-
//// Positioning the Strips (FSTR) in the FLT volumes /////
// Plate A (Central)
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t Gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA; //cm distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
nrot = 0;
zcoor = 0;
- ycoor = -14.5 + Space ; //2 cm over front plate
+ ycoor = -14.5 + kspace ; //2 cm over front plate
AliMatrix (idrotm[0], 90., 0.,90.,90.,0., 90.);
gMC->Gspos("FSTR",j,"FLTA",0.,ycoor, 0.,idrotm[0],"ONLY");
zcoor -= zSenStrip;
j++;
- Int_t UpDown = -1; // UpDown=-1 -> Upper strip
- // UpDown=+1 -> Lower strip
+ Int_t upDown = -1; // upDown=-1 -> Upper strip
+ // upDown=+1 -> Lower strip
do{
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
j += 2;
- UpDown*= -1; // Alternate strips
+ upDown*= -1; // Alternate strips
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- } while (zcoor-(StripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
+ } while (zcoor-(stripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
zcoor = zcoor+(zSenStrip/2)/TMath::Cos(ang)+
- UpDown*Gap*TMath::Tan(ang)+
+ upDown*gap*TMath::Tan(ang)+
(zSenStrip/2)/TMath::Cos(ang);
- Gap = fGapB;
+ gap = fGapB;
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
printf("%f, St. %2i, Pl.3 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
- ycoor = -hTof/2.+ Space;//2 cm over front plate
+ ycoor = -hTof/2.+ kspace;//2 cm over front plate
// Plate B
nrot = 0;
i=1;
- UpDown = 1;
- Float_t DeadRegion = 1.0;//cm
+ upDown = 1;
+ Float_t deadRegion = 1.0;//cm
zpos = zcoor - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang)-
- DeadRegion/TMath::Cos(ang);
+ deadRegion/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
i++;
- UpDown*=-1;
+ upDown*=-1;
do {
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
printf("%f, St. %2i, Pl.4 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
- UpDown*=-1;
+ upDown*=-1;
i++;
} while (TMath::Abs(ang*kRaddeg)<22.5);
//till we reach a tilting angle of 22.5 degrees
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
do {
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
i++;
- } while (zpos-StripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
+ } while (zpos-stripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
// Plate C
zpos = zpos + zSenStrip/TMath::Cos(ang);
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)+
- Gap*TMath::Tan(ang)-
+ gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+Space+Gap;
+ ycoor= -hTof*0.5+kspace+gap;
do {
i++;
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
zpos = zpos - zSenStrip/TMath::Cos(ang);
- } while (zpos-StripWidth*TMath::Cos(ang)*0.5>-t);
-
+ } while (zpos-stripWidth*TMath::Cos(ang)*0.5>-t);
-////////// Layers after detector /////////////////
-// honeycomb (Polyethilene) Layer after (3cm)
+////////// Layers after strips /////////////////
+// honeycomb (Polyethilene) Layer after (1.2cm)
- Float_t OverSpace = fOverSpc;//cm
+ Float_t overSpace = fOverSpc;//cm
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 0.6;
- par[2] = -1;
- ycoor = -yFLT/2 + OverSpace + par[1];
+ par[2] = (zFLTA *0.5);
+ ycoor = -yFLT/2 + overSpace + par[1];
gMC->Gsvolu("FPEA", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FPEB", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FPEC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// Electronics (Cu) after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 1.43*0.05*0.5; // 5% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FECA", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FECB", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FECC", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// cooling WAter after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 36.1*0.02*0.5; // 2% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FWAA", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FWAB", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FWAC", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+// frame of Air
+ ycoor += par[1];
+ par[0] = xFLT*0.5;
+ par[1] = (yFLT/2-ycoor-0.2)*0.5; // Aluminum layer considered (0.2 cm)
+ par[2] = (zFLTA *0.5);
+ ycoor += par[1];
+ gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+/* fp
//Back Plate honycomb (2cm)
par[0] = -1;
par[1] = 2 *0.5;
gMC->Gspos ("FBPB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
gMC->Gsvolu("FBPC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FBPC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+fp */
}
//_____________________________________________________________________________
Float_t xm[3],pm[3],xpad[3],ppad[3];
Float_t hits[13],phi,phid,z;
Int_t vol[5];
- Int_t sector, plate, pad_x, pad_z, strip;
- Int_t copy, pad_z_id, pad_x_id, strip_id, i;
+ Int_t sector, plate, padx, padz, strip;
+ Int_t copy, padzid, padxid, stripid, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
- Float_t IncidenceAngle;
+ Float_t incidenceAngle;
if(gMC->GetMedium()==idtmed[513] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
{
// getting information about hit volumes
- pad_z_id=gMC->CurrentVolOffID(2,copy);
- pad_z=copy;
+ padzid=gMC->CurrentVolOffID(2,copy);
+ padz=copy;
- pad_x_id=gMC->CurrentVolOffID(1,copy);
- pad_x=copy;
+ padxid=gMC->CurrentVolOffID(1,copy);
+ padx=copy;
- strip_id=gMC->CurrentVolOffID(5,copy);
+ stripid=gMC->CurrentVolOffID(4,copy);
strip=copy;
gMC->TrackPosition(pos);
gMC->TrackMomentum(mom);
// Double_t NormPos=1./pos.Rho();
- Double_t NormMom=1./mom.Rho();
+ Double_t normMom=1./mom.Rho();
// getting the cohordinates in pad ref system
xm[0] = (Float_t)pos.X();
xm[1] = (Float_t)pos.Y();
xm[2] = (Float_t)pos.Z();
- pm[0] = (Float_t)mom.X()*NormMom;
- pm[1] = (Float_t)mom.Y()*NormMom;
- pm[2] = (Float_t)mom.Z()*NormMom;
+ pm[0] = (Float_t)mom.X()*normMom;
+ pm[1] = (Float_t)mom.Y()*normMom;
+ pm[2] = (Float_t)mom.Z()*normMom;
gMC->Gmtod(xm,xpad,1);
gMC->Gmtod(pm,ppad,2);
- IncidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
+ incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
z = pos[2];
hits[8] = xpad[0];
hits[9] = xpad[1];
hits[10]= xpad[2];
- hits[11]= IncidenceAngle;
+ hits[11]= incidenceAngle;
hits[12]= gMC->Edep();
vol[0]= sector;
vol[1]= plate;
vol[2]= strip;
- vol[3]= pad_x;
- vol[4]= pad_z;
+ vol[3]= padx;
+ vol[4]= padz;
AddHit(gAlice->CurrentTrack(),vol, hits);
}
-#ifndef TOFv1_H
-#define TOFv1_H
+//_________________________________________________________________________
+// Implementation version v1 of TOF Manager class
+// HOLES ONLY FOR PHOS DETECTOR
+//
+//*--
+//*-- Authors: Pierella, Seganti, Vicinanza (Bologna and Salerno University)
+
+#ifndef ALITOFv1_H
+#define ALITOFv1_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
-///////////////////////////////////////////////////////
-// Manager and hits classes for set:TOF version 1 //
-///////////////////////////////////////////////////////
-
#include "AliTOF.h"
#include "AliHit.h"
-
+
class AliTOFv1 : public AliTOF {
-
-private:
- Int_t fIdFTOA;
- Int_t fIdFTOB; // First sensitive volume identifier
- Int_t fIdFTOC; // Second sensitive volume identifier
- Int_t fIdFLTA; // Third sensitive volume identifier
- Int_t fIdFLTB; // Fourth sensitive volume identifier
- Int_t fIdFLTC; // Fifth sensitive volume identifier
public:
AliTOFv1();
AliTOFv1(const char *name, const char *title);
- virtual ~AliTOFv1() {}
+ virtual ~AliTOFv1(void) ;
virtual void BuildGeometry();
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual void Init();
virtual Int_t IsVersion() const {return 1;}
- virtual void TOFpc(Float_t,Float_t,Float_t,Float_t,Float_t,Float_t);
+ virtual void TOFpc(Float_t xtof,Float_t ytof,Float_t zlenC,Float_t zlenB,
+ Float_t zlenA,Float_t ztof0);
virtual void StepManager();
virtual void DrawModule();
-
+
+private:
+ Int_t fIdFTOA; // FTOA volume identifier (outer plate A)
+ Int_t fIdFTOB; // FTOB volume identifier (outer plate B)
+ Int_t fIdFTOC; // FTOC volume identifier (outer plate C)
+ Int_t fIdFLTA; // FLTA volume identifier (inner plate A)
+ Int_t fIdFLTB; // FLTB volume identifier (inner plate B)
+ Int_t fIdFLTC; // FLTC volume identifier (inner plate C)
+
ClassDef(AliTOFv1,1) //Time Of Flight version 1
};
-#endif
+#endif /* ALITOFv1_H */
/*
$Log$
+Revision 1.18 2000/12/04 08:48:20 alibrary
+Fixing problems in the HEAD
+
Revision 1.17 2000/10/02 21:28:17 fca
Removal of useless dependecies via forward declarations
//
// University of Salerno - Italy
//
+// Fabrizio Pierella
+// University of Bologna - Italy
+//
//
//Begin_Html
/*
//
// Check that FRAME is there otherwise we have no place where to
// put TOF
- AliModule* FRAME=gAlice->GetModule("FRAME");
- if(!FRAME) {
+ AliModule* frame=gAlice->GetModule("FRAME");
+ if(!frame) {
Error("Ctor","TOF needs FRAME to be present\n");
exit(1);
} else
- if(FRAME->IsVersion()!=1) {
+ if(frame->IsVersion()!=1) {
Error("Ctor","FRAME version 1 needed with this version of TOF\n");
exit(1);
}
}
+//____________________________________________________________________________
+AliTOFv2::~AliTOFv2()
+{
+ // destructor
+
+ if ( fHits) {
+ fHits->Delete() ;
+ delete fHits ;
+ fHits = 0 ;
+ }
+/*
+ if ( fSDigits) {
+ fSDigits->Delete() ;
+ delete fSDigits ;
+ fSDigits = 0 ;
+ }
+*/
+ if ( fDigits) {
+ fDigits->Delete() ;
+ delete fDigits ;
+ fDigits = 0 ;
+ }
+
+}
+
//_____________________________________________________________________________
void AliTOFv2::BuildGeometry()
{
//
// Build TOF ROOT geometry for the ALICE event display
//
- TNode *Node, *Top;
+ TNode *node, *top;
const int kColorTOF = 27;
// Find top TNODE
- Top = gAlice->GetGeometry()->GetNode("alice");
+ top = gAlice->GetGeometry()->GetNode("alice");
// Position the different copies
- const Float_t rTof =(fRmax+fRmin)/2;
- const Float_t hTof = fRmax-fRmin;
- const Int_t fNTof = 18;
+ const Float_t krTof =(fRmax+fRmin)/2;
+ const Float_t khTof = fRmax-fRmin;
+ const Int_t kNTof = fNTof;
const Float_t kPi = TMath::Pi();
- const Float_t angle = 2*kPi/fNTof;
+ const Float_t kangle = 2*kPi/kNTof;
Float_t ang;
// Define TOF basic volume
- char NodeName0[6], NodeName1[6], NodeName2[6];
- char NodeName3[6], NodeName4[6], RotMatNum[6];
+ char nodeName0[6], nodeName1[6], nodeName2[6];
+ char nodeName3[6], nodeName4[6], rotMatNum[6];
new TBRIK("S_TOF_C","TOF box","void",
- 120*0.5,hTof*0.5,fZlenC*0.5);
+ 120*0.5,khTof*0.5,fZlenC*0.5);
new TBRIK("S_TOF_B","TOF box","void",
- 120*0.5,hTof*0.5,fZlenB*0.5);
+ 120*0.5,khTof*0.5,fZlenB*0.5);
new TBRIK("S_TOF_A","TOF box","void",
- 120*0.5,hTof*0.5,fZlenA*0.5);
+ 120*0.5,khTof*0.5,fZlenA*0.5);
- for (Int_t NodeNum=1;NodeNum<19;NodeNum++){
+ for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
- if (NodeNum<10) {
- sprintf(RotMatNum,"rot50%i",NodeNum);
- sprintf(NodeName0,"FTO00%i",NodeNum);
- sprintf(NodeName1,"FTO10%i",NodeNum);
- sprintf(NodeName2,"FTO20%i",NodeNum);
- sprintf(NodeName3,"FTO30%i",NodeNum);
- sprintf(NodeName4,"FTO40%i",NodeNum);
+ if (nodeNum<10) {
+ sprintf(rotMatNum,"rot50%i",nodeNum);
+ sprintf(nodeName0,"FTO00%i",nodeNum);
+ sprintf(nodeName1,"FTO10%i",nodeNum);
+ sprintf(nodeName2,"FTO20%i",nodeNum);
+ sprintf(nodeName3,"FTO30%i",nodeNum);
+ sprintf(nodeName4,"FTO40%i",nodeNum);
}
- if (NodeNum>9) {
- sprintf(RotMatNum,"rot5%i",NodeNum);
- sprintf(NodeName0,"FTO0%i",NodeNum);
- sprintf(NodeName1,"FTO1%i",NodeNum);
- sprintf(NodeName2,"FTO2%i",NodeNum);
- sprintf(NodeName3,"FTO3%i",NodeNum);
- sprintf(NodeName4,"FTO4%i",NodeNum);
+ if (nodeNum>9) {
+ sprintf(rotMatNum,"rot5%i",nodeNum);
+ sprintf(nodeName0,"FTO0%i",nodeNum);
+ sprintf(nodeName1,"FTO1%i",nodeNum);
+ sprintf(nodeName2,"FTO2%i",nodeNum);
+ sprintf(nodeName3,"FTO3%i",nodeNum);
+ sprintf(nodeName4,"FTO4%i",nodeNum);
}
- new TRotMatrix(RotMatNum,RotMatNum,90,-20*NodeNum,90,90-20*NodeNum,0,0);
- ang = (4.5-NodeNum) * angle;
-
- Top->cd();
- Node = new TNode(NodeName0,NodeName0,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName1,NodeName1,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-if (NodeNum !=1 && NodeNum!=2 && NodeNum !=18)
+ new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+ ang = (4.5-nodeNum) * kangle;
+
+ top->cd();
+ node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+if (nodeNum !=1 && nodeNum!=2 && nodeNum !=18)
{
- Top->cd();
- Node = new TNode(NodeName2,NodeName2,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName3,NodeName3,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
+ top->cd();
+ node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
} // Holes for RICH detector
-if ((NodeNum<8 || NodeNum>12) && NodeNum !=1 && NodeNum!=2 && NodeNum
-!=18)
+if ((nodeNum<8 || nodeNum>12) && nodeNum !=1 && nodeNum!=2 && nodeNum !=18)
{
- Top->cd();
- Node = new TNode(NodeName4,NodeName4,"S_TOF_A",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),0.,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
+ top->cd();
+ node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
} // Holes for PHOS detector (+ Holes for RICH detector, central part)
- }
+ } // end loop on nodeNum
}
-
//_____________________________________________________________________________
void AliTOFv2::CreateGeometry()
// xFLT, yFLT, zFLT - sizes of TOF modules (large)
Float_t ycoor, zcoor;
- Float_t par[10];
+ Float_t par[3];
Int_t *idtmed = fIdtmed->GetArray()-499;
Int_t idrotm[100];
Int_t nrot = 0;
Float_t hTof = fRmax-fRmin;
- Float_t Radius = fRmin+2.;//cm
+ Float_t radius = fRmin+2.;//cm
par[0] = xtof * 0.5;
par[1] = ytof * 0.5;
Float_t yPad = 0.505;//cm
-// Large not sensitive volumes with CO2
+// Large not sensitive volumes with Insensitive Freon
par[0] = xFLT*0.5;
par[1] = yFLT*0.5;
-
+
cout <<"************************* TOF geometry **************************"<<endl;
par[2] = (zFLTA *0.5);
- gMC->Gsvolu("FLTA", "BOX ", idtmed[506], par, 3); // CO2
+ gMC->Gsvolu("FLTA", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY");
par[2] = (zFLTB * 0.5);
- gMC->Gsvolu("FLTB", "BOX ", idtmed[506], par, 3); // CO2
+ gMC->Gsvolu("FLTB", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTB", 0, "FTOB", 0., 0., 0., 0, "ONLY");
- par[2] = (zFLTC * 0.5);
- gMC->Gsvolu("FLTC", "BOX ", idtmed[506], par, 3); // CO2
+ par[2] = (zFLTC * 0.5);
+ gMC->Gsvolu("FLTC", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTC", 0, "FTOC", 0., 0., 0., 0, "ONLY");
-////////// Layers before detector ////////////////////
-
-// MYlar layer in front 1.0 mm thick at the beginning
- par[0] = -1;
+////////// Layers of Aluminum before and after detector //////////
+////////// Aluminum Box for Modules (2.0 mm thickness) /////////
+////////// lateral walls not simulated
+ par[0] = xFLT*0.5;
par[1] = 0.1;//cm
- par[2] = -1;
ycoor = -yFLT/2 + par[1];
- gMC->Gsvolu("FMYA", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYB", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYC", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
-
-// honeycomb (special Polyethilene Layer of 1cm)
- ycoor = ycoor + par[1];
- par[0] = -1;
- par[1] = 0.5;//cm
- par[2] = -1;
- ycoor = ycoor + par[1];
- gMC->Gsvolu("FPLA", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLB", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLC", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
-
+ par[2] = (zFLTA *0.5);
+ gMC->Gsvolu("FALA", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALA", 1, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALA", 2, "FLTA", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FALB", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALB", 1, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALB", 2, "FLTB", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FALC", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALC", 1, "FLTC", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALC", 2, "FLTC", 0.,-ycoor, 0., 0, "ONLY");
+
///////////////// Detector itself //////////////////////
- const Float_t DeadBound = fDeadBndZ; //cm non-sensitive between the pad edge
+ const Float_t kdeadBound = fDeadBndZ; //cm non-sensitive between the pad edge
//and the boundary of the strip
- const Int_t nx = fNpadX; // number of pads along x
- const Int_t nz = fNpadZ; // number of pads along z
- const Float_t Space = fSpace; //cm distance from the front plate of the box
+ const Int_t knx = fNpadX; // number of pads along x
+ const Int_t knz = fNpadZ; // number of pads along z
+ const Float_t kspace = fSpace; //cm distance from the front plate of the box
Float_t zSenStrip = fZpad*fNpadZ;//cm
- Float_t StripWidth = zSenStrip + 2*DeadBound;
+ Float_t stripWidth = zSenStrip + 2*kdeadBound;
par[0] = xFLT*0.5;
par[1] = yPad*0.5;
- par[2] = StripWidth*0.5;
+ par[2] = stripWidth*0.5;
- // glass layer of detector STRip
- gMC->Gsvolu("FSTR","BOX",idtmed[514],par,3);
-
- // Non-Sesitive Freon boundaries
- par[0] = xFLT*0.5;
- par[1] = 0.110*0.5;//cm
- par[2] = -1;
- gMC->Gsvolu("FNSF","BOX",idtmed[512],par,3);
- gMC->Gspos ("FNSF",0,"FSTR",0.,0.,0.,0,"ONLY");
-
- // MYlar for Internal non-sesitive boundaries
-// par[1] = 0.025;//cm
-// gMC->Gsvolu("FMYI","BOX",idtmed[510],par,3);
-// gMC->Gspos ("FMYI",0,"FNSF",0.,0.,0.,0,"MANY");
-
- // MYlar eXternal layers
- par[1] = 0.035*0.5;//cm
- ycoor = -yPad*0.5+par[1];
- gMC->Gsvolu("FMYX","BOX",idtmed[510],par,3);
- gMC->Gspos ("FMYX",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FMYX",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
- ycoor += par[1];
-
- // GRaphyte Layers
- par[1] = 0.003*0.5;
- ycoor += par[1];
- gMC->Gsvolu("FGRL","BOX",idtmed[502],par,3);
- gMC->Gspos ("FGRL",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FGRL",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
-
- // freon sensitive layer (Chlorine-Fluorine-Carbon)
- par[0] = xFST*0.5;
- par[1] = 0.110*0.5;
- par[2] = zSenStrip*0.5;
- gMC->Gsvolu("FCFC","BOX",idtmed[513],par,3);
- gMC->Gspos ("FCFC",0,"FNSF",0.,0.,0.,0,"ONLY");
+// new description for strip volume
+// -- all constants are expressed in cm
+// heigth of different layers
+ const Float_t khhony = 1. ; // heigth of HONY Layer
+ const Float_t khpcby = 0.15 ; // heigth of PCB Layer
+ const Float_t khmyly = 0.035 ; // heigth of MYLAR Layer
+ const Float_t khgraphy = 0.02 ; // heigth of GRAPHITE Layer
+ const Float_t khglasseiy = 0.32; // 2.2 Ext. Glass + 1. Semi Int. Glass (mm)
+ const Float_t khsensmy = 0.11 ; // heigth of Sensitive Freon Mixture
+ const Float_t kwsensmz = 2*3.5 ; // cm
+ const Float_t klsensmx = 48*2.5; // cm
+ const Float_t kwpadz = 3.5; // cm z dimension of the FPAD volume
+ const Float_t klpadx = 2.5; // cm x dimension of the FPAD volume
+
+ // heigth of the FSTR Volume (the strip volume)
+ const Float_t khstripy = 2*(khhony+khpcby+khmyly+khgraphy+khglasseiy)+khsensmy;
+ // width of the FSTR Volume (the strip volume)
+ const Float_t kwstripz = 10.;
+ // length of the FSTR Volume (the strip volume)
+ const Float_t klstripx = 122.;
+
+ Float_t parfp[3]={klstripx*0.5,khstripy*0.5,kwstripz*0.5};
+// coordinates of the strip center in the strip reference frame; used for positioning
+// internal strip volumes
+ Float_t posfp[3]={0.,0.,0.};
+
+ // FSTR volume definition and filling this volume with non sensitive Gas Mixture
+ gMC->Gsvolu("FSTR","BOX",idtmed[512],parfp,3);
+ //-- HONY Layer definition
+// parfp[0] = -1;
+ parfp[1] = khhony*0.5;
+// parfp[2] = -1;
+ gMC->Gsvolu("FHON","BOX",idtmed[503],parfp,3);
+ // positioning 2 HONY Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+parfp[1];
+ gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- PCB Layer definition
+ parfp[1] = khpcby*0.5;
+ gMC->Gsvolu("FPCB","BOX",idtmed[504],parfp,3);
+ // positioning 2 PCB Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+khhony+parfp[1];
+ gMC->Gspos("FPCB",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FPCB",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- MYLAR Layer definition
+ parfp[1] = khmyly*0.5;
+ gMC->Gsvolu("FMYL","BOX",idtmed[511],parfp,3);
+ // positioning 2 MYLAR Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1];
+ gMC->Gspos("FMYL",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FMYL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Graphite Layer definition
+ parfp[1] = khgraphy*0.5;
+ gMC->Gsvolu("FGRP","BOX",idtmed[502],parfp,3);
+ // positioning 2 Graphite Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+parfp[1];
+ gMC->Gspos("FGRP",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGRP",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Glass (EXT. +Semi INT.) Layer definition
+ parfp[1] = khglasseiy*0.5;
+ gMC->Gsvolu("FGLA","BOX",idtmed[514],parfp,3);
+ // positioning 2 Glass Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+khgraphy+parfp[1];
+ gMC->Gspos("FGLA",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGLA",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Sensitive Mixture Layer definition
+ parfp[0] = klsensmx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwsensmz*0.5;
+ gMC->Gsvolu("FSEN","BOX",idtmed[513],parfp,3);
+ // positioning the sensitive gas Layer on FSTR volume
+ gMC->Gspos("FSEN",0,"FSTR",0.,0.,0.,0,"ONLY");
+
+ // dividing FSEN along z in knz=2 and along x in knx=48
+ gMC->Gsdvn("FSEZ","FSEN",knz,3);
+ gMC->Gsdvn("FSEX","FSEZ",knx,1);
+
+ // FPAD volume definition
+ parfp[0] = klpadx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwpadz*0.5;
+ gMC->Gsvolu("FPAD","BOX",idtmed[513],parfp,3);
+ // positioning the FPAD volumes on previous divisions
+ gMC->Gspos("FPAD",0,"FSEX",0.,0.,0.,0,"ONLY");
- // Pad definition x & z
- gMC->Gsdvn("FLZ","FCFC", nz, 3);
- gMC->Gsdvn("FLX","FLZ" , nx, 1);
-
- // MRPC PAD itself
- par[0] = -1;
- par[1] = -1;
- par[2] = -1;
- gMC->Gsvolu("FPAD", "BOX ", idtmed[513], par, 3);
- gMC->Gspos ("FPAD", 0, "FLX", 0., 0., 0., 0, "ONLY");
-
//// Positioning the Strips (FSTR) in the FLT volumes /////
// Plate A (Central)
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t Gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA; //cm distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
nrot = 0;
zcoor = 0;
- ycoor = -14.5 + Space ; //2 cm over front plate
+ ycoor = -14.5 + kspace ; //2 cm over front plate
AliMatrix (idrotm[0], 90., 0.,90.,90.,0., 90.);
gMC->Gspos("FSTR",j,"FLTA",0.,ycoor, 0.,idrotm[0],"ONLY");
zcoor -= zSenStrip;
j++;
- Int_t UpDown = -1; // UpDown=-1 -> Upper strip
- // UpDown=+1 -> Lower strip
+ Int_t upDown = -1; // upDown=-1 -> Upper strip
+ // upDown=+1 -> Lower strip
do{
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
j += 2;
- UpDown*= -1; // Alternate strips
+ upDown*= -1; // Alternate strips
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- } while (zcoor-(StripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
+ } while (zcoor-(stripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
zcoor = zcoor+(zSenStrip/2)/TMath::Cos(ang)+
- UpDown*Gap*TMath::Tan(ang)+
+ upDown*gap*TMath::Tan(ang)+
(zSenStrip/2)/TMath::Cos(ang);
- Gap = fGapB;
+ gap = fGapB;
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
printf("%f, St. %2i, Pl.3 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
- ycoor = -hTof/2.+ Space;//2 cm over front plate
+ ycoor = -hTof/2.+ kspace;//2 cm over front plate
// Plate B
nrot = 0;
i=1;
- UpDown = 1;
- Float_t DeadRegion = 1.0;//cm
+ upDown = 1;
+ Float_t deadRegion = 1.0;//cm
zpos = zcoor - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang)-
- DeadRegion/TMath::Cos(ang);
+ deadRegion/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
i++;
- UpDown*=-1;
+ upDown*=-1;
do {
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
printf("%f, St. %2i, Pl.4 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
- UpDown*=-1;
+ upDown*=-1;
i++;
} while (TMath::Abs(ang*kRaddeg)<22.5);
//till we reach a tilting angle of 22.5 degrees
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
do {
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
i++;
- } while (zpos-StripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
+ } while (zpos-stripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
// Plate C
zpos = zpos + zSenStrip/TMath::Cos(ang);
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)+
- Gap*TMath::Tan(ang)-
+ gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+Space+Gap;
+ ycoor= -hTof*0.5+kspace+gap;
do {
i++;
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
zpos = zpos - zSenStrip/TMath::Cos(ang);
- } while (zpos-StripWidth*TMath::Cos(ang)*0.5>-t);
+ } while (zpos-stripWidth*TMath::Cos(ang)*0.5>-t);
-////////// Layers after detector /////////////////
+////////// Layers after strips /////////////////
+// honeycomb (Polyethilene) Layer after (1.2cm)
-// honeycomb (Polyethilene) Layer after (3cm)
+ Float_t overSpace = fOverSpc;//cm
- Float_t OverSpace = fOverSpc;//cm
-
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 0.6;
- par[2] = -1;
- ycoor = -yFLT/2 + OverSpace + par[1];
+ par[2] = (zFLTA *0.5);
+ ycoor = -yFLT/2 + overSpace + par[1];
gMC->Gsvolu("FPEA", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FPEB", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FPEC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// Electronics (Cu) after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 1.43*0.05*0.5; // 5% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FECA", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FECB", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FECC", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// cooling WAter after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 36.1*0.02*0.5; // 2% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FWAA", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FWAB", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FWAC", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+// frame of Air
+ ycoor += par[1];
+ par[0] = xFLT*0.5;
+ par[1] = (yFLT/2-ycoor-0.2)*0.5; // Aluminum layer considered (0.2 cm)
+ par[2] = (zFLTA *0.5);
+ ycoor += par[1];
+ gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+/* fp
//Back Plate honycomb (2cm)
par[0] = -1;
par[1] = 2 *0.5;
gMC->Gspos ("FBPB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
gMC->Gsvolu("FBPC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FBPC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+fp */
}
//_____________________________________________________________________________
Float_t xm[3],pm[3],xpad[3],ppad[3];
Float_t hits[13],phi,phid,z;
Int_t vol[5];
- Int_t sector, plate, pad_x, pad_z, strip;
- Int_t copy, pad_z_id, pad_x_id, strip_id, i;
+ Int_t sector, plate, padx, padz, strip;
+ Int_t copy, padzid, padxid, stripid, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
- Float_t IncidenceAngle;
+ Float_t incidenceAngle;
if(gMC->GetMedium()==idtmed[513] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
{
// getting information about hit volumes
- pad_z_id=gMC->CurrentVolOffID(2,copy);
- pad_z=copy;
+ padzid=gMC->CurrentVolOffID(2,copy);
+ padz=copy;
- pad_x_id=gMC->CurrentVolOffID(1,copy);
- pad_x=copy;
+ padxid=gMC->CurrentVolOffID(1,copy);
+ padx=copy;
- strip_id=gMC->CurrentVolOffID(5,copy);
+ stripid=gMC->CurrentVolOffID(4,copy);
strip=copy;
gMC->TrackPosition(pos);
gMC->TrackMomentum(mom);
// Double_t NormPos=1./pos.Rho();
- Double_t NormMom=1./mom.Rho();
+ Double_t normMom=1./mom.Rho();
// getting the cohordinates in pad ref system
xm[0] = (Float_t)pos.X();
xm[1] = (Float_t)pos.Y();
xm[2] = (Float_t)pos.Z();
- pm[0] = (Float_t)mom.X()*NormMom;
- pm[1] = (Float_t)mom.Y()*NormMom;
- pm[2] = (Float_t)mom.Z()*NormMom;
+ pm[0] = (Float_t)mom.X()*normMom;
+ pm[1] = (Float_t)mom.Y()*normMom;
+ pm[2] = (Float_t)mom.Z()*normMom;
gMC->Gmtod(xm,xpad,1);
gMC->Gmtod(pm,ppad,2);
- IncidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
+ incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
z = pos[2];
hits[8] = xpad[0];
hits[9] = xpad[1];
hits[10]= xpad[2];
- hits[11]= IncidenceAngle;
+ hits[11]= incidenceAngle;
hits[12]= gMC->Edep();
vol[0]= sector;
vol[1]= plate;
vol[2]= strip;
- vol[3]= pad_x;
- vol[4]= pad_z;
+ vol[3]= padx;
+ vol[4]= padz;
AddHit(gAlice->CurrentTrack(),vol, hits);
}
-#ifndef TOFv2_H
-#define TOFv2_H
+//_________________________________________________________________________
+// Implementation version v2 of TOF Manager class
+// HOLES FOR PHOS AND HMPID (RICH) DETECTOR
+//
+//*--
+//*-- Authors: Pierella, Seganti, Vicinanza (Bologna and Salerno University)
+
+#ifndef ALITOFv2_H
+#define ALITOFv2_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
-
-///////////////////////////////////////////////////////
-// Manager and hits classes for set:TOF version 2 //
-///////////////////////////////////////////////////////
#include "AliTOF.h"
#include "AliHit.h"
class AliTOFv2 : public AliTOF {
-
-private:
- Int_t fIdFTOA;
- Int_t fIdFTOB;
- Int_t fIdFTOC;
- Int_t fIdFLTA;
- Int_t fIdFLTB;
- Int_t fIdFLTC;
public:
AliTOFv2();
AliTOFv2(const char *name, const char *title);
- virtual ~AliTOFv2() {}
+ virtual ~AliTOFv2(void) ;
virtual void BuildGeometry();
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual void Init();
virtual Int_t IsVersion() const {return 2;}
- virtual void TOFpc(Float_t,Float_t,Float_t,Float_t,Float_t,Float_t);
+ virtual void TOFpc(Float_t xtof,Float_t ytof,Float_t zlenC,Float_t zlenB,
+ Float_t zlenA,Float_t ztof0);
virtual void StepManager();
virtual void DrawModule();
-
+
+private:
+ Int_t fIdFTOA; // FTOA volume identifier (outer plate A)
+ Int_t fIdFTOB; // FTOB volume identifier (outer plate B)
+ Int_t fIdFTOC; // FTOC volume identifier (outer plate C)
+ Int_t fIdFLTA; // FLTA volume identifier (inner plate A)
+ Int_t fIdFLTB; // FLTB volume identifier (inner plate B)
+ Int_t fIdFLTC; // FLTC volume identifier (inner plate C)
+
ClassDef(AliTOFv2,1) //Time Of Flight version 2
};
-#endif
+#endif /* ALITOFv2_H */
/*
$Log$
+Revision 1.18 2000/12/04 08:48:20 alibrary
+Fixing problems in the HEAD
+
Revision 1.17 2000/10/02 21:28:17 fca
Removal of useless dependecies via forward declarations
//
// University of Salerno - Italy
//
+// Fabrizio Pierella
+// University of Bologna - Italy
+//
//
//Begin_Html
/*
//
// Check that FRAME is there otherwise we have no place where to
// put TOF
- AliModule* FRAME=gAlice->GetModule("FRAME");
- if(!FRAME) {
+ AliModule* frame=gAlice->GetModule("FRAME");
+ if(!frame) {
Error("Ctor","TOF needs FRAME to be present\n");
exit(1);
} else
- if(FRAME->IsVersion()!=1) {
+ if(frame->IsVersion()!=1) {
Error("Ctor","FRAME version 1 needed with this version of TOF\n");
exit(1);
}
}
+//____________________________________________________________________________
+AliTOFv3::~AliTOFv3()
+{
+ // destructor
+
+ if ( fHits) {
+ fHits->Delete() ;
+ delete fHits ;
+ fHits = 0 ;
+ }
+/*
+ if ( fSDigits) {
+ fSDigits->Delete() ;
+ delete fSDigits ;
+ fSDigits = 0 ;
+ }
+*/
+ if ( fDigits) {
+ fDigits->Delete() ;
+ delete fDigits ;
+ fDigits = 0 ;
+ }
+
+}
+
//_____________________________________________________________________________
void AliTOFv3::BuildGeometry()
{
//
// Build TOF ROOT geometry for the ALICE event display
//
- TNode *Node, *Top;
+ TNode *node, *top;
const int kColorTOF = 27;
// Find top TNODE
- Top = gAlice->GetGeometry()->GetNode("alice");
+ top = gAlice->GetGeometry()->GetNode("alice");
// Position the different copies
- const Float_t rTof =(fRmax+fRmin)/2;
- const Float_t hTof = fRmax-fRmin;
- const Int_t fNTof = 18;
+ const Float_t krTof =(fRmax+fRmin)/2;
+ const Float_t khTof = fRmax-fRmin;
+ const Int_t kNTof = fNTof;
const Float_t kPi = TMath::Pi();
- const Float_t angle = 2*kPi/fNTof;
+ const Float_t kangle = 2*kPi/kNTof;
Float_t ang;
// Define TOF basic volume
- char NodeName0[6], NodeName1[6], NodeName2[6];
- char NodeName3[6], NodeName4[6], RotMatNum[6];
+ char nodeName0[7], nodeName1[7], nodeName2[7];
+ char nodeName3[7], nodeName4[7], rotMatNum[7];
new TBRIK("S_TOF_C","TOF box","void",
- 120*0.5,hTof*0.5,fZlenC*0.5);
+ 120*0.5,khTof*0.5,fZlenC*0.5);
new TBRIK("S_TOF_B","TOF box","void",
- 120*0.5,hTof*0.5,fZlenB*0.5);
+ 120*0.5,khTof*0.5,fZlenB*0.5);
new TBRIK("S_TOF_A","TOF box","void",
- 120*0.5,hTof*0.5,fZlenA*0.5);
+ 120*0.5,khTof*0.5,fZlenA*0.5);
- for (Int_t NodeNum=1;NodeNum<19;NodeNum++){
+ for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
- if (NodeNum<10) {
- sprintf(RotMatNum,"rot50%i",NodeNum);
- sprintf(NodeName0,"FTO00%i",NodeNum);
- sprintf(NodeName1,"FTO10%i",NodeNum);
- sprintf(NodeName2,"FTO20%i",NodeNum);
- sprintf(NodeName3,"FTO30%i",NodeNum);
- sprintf(NodeName4,"FTO40%i",NodeNum);
+ if (nodeNum<10) {
+ sprintf(rotMatNum,"rot50%i",nodeNum);
+ sprintf(nodeName0,"FTO00%i",nodeNum);
+ sprintf(nodeName1,"FTO10%i",nodeNum);
+ sprintf(nodeName2,"FTO20%i",nodeNum);
+ sprintf(nodeName3,"FTO30%i",nodeNum);
+ sprintf(nodeName4,"FTO40%i",nodeNum);
}
- if (NodeNum>9) {
- sprintf(RotMatNum,"rot5%i",NodeNum);
- sprintf(NodeName0,"FTO0%i",NodeNum);
- sprintf(NodeName1,"FTO1%i",NodeNum);
- sprintf(NodeName2,"FTO2%i",NodeNum);
- sprintf(NodeName3,"FTO3%i",NodeNum);
- sprintf(NodeName4,"FTO4%i",NodeNum);
+ if (nodeNum>9) {
+ sprintf(rotMatNum,"rot5%i",nodeNum);
+ sprintf(nodeName0,"FTO0%i",nodeNum);
+ sprintf(nodeName1,"FTO1%i",nodeNum);
+ sprintf(nodeName2,"FTO2%i",nodeNum);
+ sprintf(nodeName3,"FTO3%i",nodeNum);
+ sprintf(nodeName4,"FTO4%i",nodeNum);
}
- new TRotMatrix(RotMatNum,RotMatNum,90,-20*NodeNum,90,90-20*NodeNum,0,0);
- ang = (4.5-NodeNum) * angle;
-
- Top->cd();
- Node = new TNode(NodeName0,NodeName0,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName1,NodeName1,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-if (NodeNum !=1 && NodeNum!=2 && NodeNum !=18)
+ new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+ ang = (4.5-nodeNum) * kangle;
+
+ top->cd();
+ node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+if (nodeNum !=1 && nodeNum!=2 && nodeNum !=18)
{
- Top->cd();
- Node = new TNode(NodeName2,NodeName2,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName3,NodeName3,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
+ top->cd();
+ node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
} // Holes for RICH detector
-if (NodeNum !=1 && NodeNum !=2 && NodeNum !=18)
+if (nodeNum !=1 && nodeNum !=2 && nodeNum !=18)
{
- Top->cd();
- Node = new TNode(NodeName4,NodeName4,"S_TOF_A",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),0.,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
+ top->cd();
+ node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
} // Holes for RICH detector, central part
}
}
// xFLT, yFLT, zFLT - sizes of TOF modules (large)
Float_t ycoor, zcoor;
- Float_t par[10];
+ Float_t par[3];
Int_t *idtmed = fIdtmed->GetArray()-499;
Int_t idrotm[100];
Int_t nrot = 0;
Float_t hTof = fRmax-fRmin;
- Float_t Radius = fRmin+2.;//cm
+ Float_t radius = fRmin+2.;//cm
par[0] = xtof * 0.5;
par[1] = ytof * 0.5;
Float_t yPad = 0.505;//cm
-// Large not sensitive volumes with CO2
+// Large not sensitive volumes with Insensitive Freon
par[0] = xFLT*0.5;
par[1] = yFLT*0.5;
-
+
cout <<"************************* TOF geometry **************************"<<endl;
par[2] = (zFLTA *0.5);
- gMC->Gsvolu("FLTA", "BOX ", idtmed[506], par, 3); // CO2
+ gMC->Gsvolu("FLTA", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY");
par[2] = (zFLTB * 0.5);
- gMC->Gsvolu("FLTB", "BOX ", idtmed[506], par, 3); // CO2
+ gMC->Gsvolu("FLTB", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTB", 0, "FTOB", 0., 0., 0., 0, "ONLY");
- par[2] = (zFLTC * 0.5);
- gMC->Gsvolu("FLTC", "BOX ", idtmed[506], par, 3); // CO2
+ par[2] = (zFLTC * 0.5);
+ gMC->Gsvolu("FLTC", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTC", 0, "FTOC", 0., 0., 0., 0, "ONLY");
-////////// Layers before detector ////////////////////
-
-// MYlar layer in front 1.0 mm thick at the beginning
- par[0] = -1;
+////////// Layers of Aluminum before and after detector //////////
+////////// Aluminum Box for Modules (2.0 mm thickness) /////////
+////////// lateral walls not simulated
+ par[0] = xFLT*0.5;
par[1] = 0.1;//cm
- par[2] = -1;
ycoor = -yFLT/2 + par[1];
- gMC->Gsvolu("FMYA", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYB", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYC", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
-
-// honeycomb (special Polyethilene Layer of 1cm)
- ycoor = ycoor + par[1];
- par[0] = -1;
- par[1] = 0.5;//cm
- par[2] = -1;
- ycoor = ycoor + par[1];
- gMC->Gsvolu("FPLA", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLB", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLC", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
-
+ par[2] = (zFLTA *0.5);
+ gMC->Gsvolu("FALA", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALA", 1, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALA", 2, "FLTA", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FALB", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALB", 1, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALB", 2, "FLTB", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FALC", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALC", 1, "FLTC", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALC", 2, "FLTC", 0.,-ycoor, 0., 0, "ONLY");
+
///////////////// Detector itself //////////////////////
- const Float_t DeadBound = fDeadBndZ; //cm non-sensitive between the pad edge
+ const Float_t kdeadBound = fDeadBndZ; //cm non-sensitive between the pad edge
//and the boundary of the strip
- const Int_t nx = fNpadX; // number of pads along x
- const Int_t nz = fNpadZ; // number of pads along z
- const Float_t Space = fSpace; //cm distance from the front plate of the box
+ const Int_t knx = fNpadX; // number of pads along x
+ const Int_t knz = fNpadZ; // number of pads along z
+ const Float_t kspace = fSpace; //cm distance from the front plate of the box
Float_t zSenStrip = fZpad*fNpadZ;//cm
- Float_t StripWidth = zSenStrip + 2*DeadBound;
+ Float_t stripWidth = zSenStrip + 2*kdeadBound;
par[0] = xFLT*0.5;
par[1] = yPad*0.5;
- par[2] = StripWidth*0.5;
+ par[2] = stripWidth*0.5;
- // glass layer of detector STRip
- gMC->Gsvolu("FSTR","BOX",idtmed[514],par,3);
-
- // Non-Sesitive Freon boundaries
- par[0] = xFLT*0.5;
- par[1] = 0.110*0.5;//cm
- par[2] = -1;
- gMC->Gsvolu("FNSF","BOX",idtmed[512],par,3);
- gMC->Gspos ("FNSF",0,"FSTR",0.,0.,0.,0,"ONLY");
-
- // MYlar for Internal non-sesitive boundaries
-// par[1] = 0.025;//cm
-// gMC->Gsvolu("FMYI","BOX",idtmed[510],par,3);
-// gMC->Gspos ("FMYI",0,"FNSF",0.,0.,0.,0,"MANY");
-
- // MYlar eXternal layers
- par[1] = 0.035*0.5;//cm
- ycoor = -yPad*0.5+par[1];
- gMC->Gsvolu("FMYX","BOX",idtmed[510],par,3);
- gMC->Gspos ("FMYX",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FMYX",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
- ycoor += par[1];
-
- // GRaphyte Layers
- par[1] = 0.003*0.5;
- ycoor += par[1];
- gMC->Gsvolu("FGRL","BOX",idtmed[502],par,3);
- gMC->Gspos ("FGRL",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FGRL",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
-
- // freon sensitive layer (Chlorine-Fluorine-Carbon)
- par[0] = xFST*0.5;
- par[1] = 0.110*0.5;
- par[2] = zSenStrip*0.5;
- gMC->Gsvolu("FCFC","BOX",idtmed[513],par,3);
- gMC->Gspos ("FCFC",0,"FNSF",0.,0.,0.,0,"ONLY");
+// new description for strip volume
+// -- all constants are expressed in cm
+// heigth of different layers
+ const Float_t khhony = 1. ; // heigth of HONY Layer
+ const Float_t khpcby = 0.15 ; // heigth of PCB Layer
+ const Float_t khmyly = 0.035 ; // heigth of MYLAR Layer
+ const Float_t khgraphy = 0.02 ; // heigth of GRAPHITE Layer
+ const Float_t khglasseiy = 0.32; // 2.2 Ext. Glass + 1. Semi Int. Glass (mm)
+ const Float_t khsensmy = 0.11 ; // heigth of Sensitive Freon Mixture
+ const Float_t kwsensmz = 2*3.5 ; // cm
+ const Float_t klsensmx = 48*2.5; // cm
+ const Float_t kwpadz = 3.5; // cm z dimension of the FPAD volume
+ const Float_t klpadx = 2.5; // cm x dimension of the FPAD volume
+
+ // heigth of the FSTR Volume (the strip volume)
+ const Float_t khstripy = 2*(khhony+khpcby+khmyly+khgraphy+khglasseiy)+khsensmy;
+ // width of the FSTR Volume (the strip volume)
+ const Float_t kwstripz = 10.;
+ // length of the FSTR Volume (the strip volume)
+ const Float_t klstripx = 122.;
+
+ Float_t parfp[3]={klstripx*0.5,khstripy*0.5,kwstripz*0.5};
+// coordinates of the strip center in the strip reference frame; used for positioning
+// internal strip volumes
+ Float_t posfp[3]={0.,0.,0.};
+
+ // FSTR volume definition and filling this volume with non sensitive Gas Mixture
+ gMC->Gsvolu("FSTR","BOX",idtmed[512],parfp,3);
+ //-- HONY Layer definition
+// parfp[0] = -1;
+ parfp[1] = khhony*0.5;
+// parfp[2] = -1;
+ gMC->Gsvolu("FHON","BOX",idtmed[503],parfp,3);
+ // positioning 2 HONY Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+parfp[1];
+ gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- PCB Layer definition
+ parfp[1] = khpcby*0.5;
+ gMC->Gsvolu("FPCB","BOX",idtmed[504],parfp,3);
+ // positioning 2 PCB Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+khhony+parfp[1];
+ gMC->Gspos("FPCB",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FPCB",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- MYLAR Layer definition
+ parfp[1] = khmyly*0.5;
+ gMC->Gsvolu("FMYL","BOX",idtmed[511],parfp,3);
+ // positioning 2 MYLAR Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1];
+ gMC->Gspos("FMYL",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FMYL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Graphite Layer definition
+ parfp[1] = khgraphy*0.5;
+ gMC->Gsvolu("FGRP","BOX",idtmed[502],parfp,3);
+ // positioning 2 Graphite Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+parfp[1];
+ gMC->Gspos("FGRP",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGRP",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Glass (EXT. +Semi INT.) Layer definition
+ parfp[1] = khglasseiy*0.5;
+ gMC->Gsvolu("FGLA","BOX",idtmed[514],parfp,3);
+ // positioning 2 Glass Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+khgraphy+parfp[1];
+ gMC->Gspos("FGLA",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGLA",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Sensitive Mixture Layer definition
+ parfp[0] = klsensmx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwsensmz*0.5;
+ gMC->Gsvolu("FSEN","BOX",idtmed[513],parfp,3);
+ // positioning the sensitive gas Layer on FSTR volume
+ gMC->Gspos("FSEN",0,"FSTR",0.,0.,0.,0,"ONLY");
+
+ // dividing FSEN along z in knz=2 and along x in knx=48
+ gMC->Gsdvn("FSEZ","FSEN",knz,3);
+ gMC->Gsdvn("FSEX","FSEZ",knx,1);
+
+ // FPAD volume definition
+ parfp[0] = klpadx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwpadz*0.5;
+ gMC->Gsvolu("FPAD","BOX",idtmed[513],parfp,3);
+ // positioning the FPAD volumes on previous divisions
+ gMC->Gspos("FPAD",0,"FSEX",0.,0.,0.,0,"ONLY");
- // Pad definition x & z
- gMC->Gsdvn("FLZ","FCFC", nz, 3);
- gMC->Gsdvn("FLX","FLZ" , nx, 1);
-
- // MRPC PAD itself
- par[0] = -1;
- par[1] = -1;
- par[2] = -1;
- gMC->Gsvolu("FPAD", "BOX ", idtmed[513], par, 3);
- gMC->Gspos ("FPAD", 0, "FLX", 0., 0., 0., 0, "ONLY");
-
//// Positioning the Strips (FSTR) in the FLT volumes /////
// Plate A (Central)
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t Gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA; //cm distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
nrot = 0;
zcoor = 0;
- ycoor = -14.5 + Space ; //2 cm over front plate
+ ycoor = -14.5 + kspace ; //2 cm over front plate
AliMatrix (idrotm[0], 90., 0.,90.,90.,0., 90.);
gMC->Gspos("FSTR",j,"FLTA",0.,ycoor, 0.,idrotm[0],"ONLY");
zcoor -= zSenStrip;
j++;
- Int_t UpDown = -1; // UpDown=-1 -> Upper strip
- // UpDown=+1 -> Lower strip
+ Int_t upDown = -1; // upDown=-1 -> Upper strip
+ // upDown=+1 -> Lower strip
do{
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
j += 2;
- UpDown*= -1; // Alternate strips
+ upDown*= -1; // Alternate strips
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- } while (zcoor-(StripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
+ } while (zcoor-(stripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
zcoor = zcoor+(zSenStrip/2)/TMath::Cos(ang)+
- UpDown*Gap*TMath::Tan(ang)+
+ upDown*gap*TMath::Tan(ang)+
(zSenStrip/2)/TMath::Cos(ang);
- Gap = fGapB;
+ gap = fGapB;
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
printf("%f, St. %2i, Pl.3 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
- ycoor = -hTof/2.+ Space;//2 cm over front plate
+ ycoor = -hTof/2.+ kspace;//2 cm over front plate
// Plate B
nrot = 0;
i=1;
- UpDown = 1;
- Float_t DeadRegion = 1.0;//cm
+ upDown = 1;
+ Float_t deadRegion = 1.0;//cm
zpos = zcoor - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang)-
- DeadRegion/TMath::Cos(ang);
+ deadRegion/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
i++;
- UpDown*=-1;
+ upDown*=-1;
do {
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
printf("%f, St. %2i, Pl.4 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
- UpDown*=-1;
+ upDown*=-1;
i++;
} while (TMath::Abs(ang*kRaddeg)<22.5);
//till we reach a tilting angle of 22.5 degrees
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
do {
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
i++;
- } while (zpos-StripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
+ } while (zpos-stripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
// Plate C
zpos = zpos + zSenStrip/TMath::Cos(ang);
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)+
- Gap*TMath::Tan(ang)-
+ gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+Space+Gap;
+ ycoor= -hTof*0.5+kspace+gap;
do {
i++;
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
zpos = zpos - zSenStrip/TMath::Cos(ang);
- } while (zpos-StripWidth*TMath::Cos(ang)*0.5>-t);
+ } while (zpos-stripWidth*TMath::Cos(ang)*0.5>-t);
-////////// Layers after detector /////////////////
+////////// Layers after strips /////////////////
+// honeycomb (Polyethilene) Layer after (1.2cm)
-// honeycomb (Polyethilene) Layer after (3cm)
+ Float_t overSpace = fOverSpc;//cm
- Float_t OverSpace = fOverSpc;//cm
-
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 0.6;
- par[2] = -1;
- ycoor = -yFLT/2 + OverSpace + par[1];
+ par[2] = (zFLTA *0.5);
+ ycoor = -yFLT/2 + overSpace + par[1];
gMC->Gsvolu("FPEA", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FPEB", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FPEC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// Electronics (Cu) after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 1.43*0.05*0.5; // 5% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FECA", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FECB", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FECC", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// cooling WAter after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 36.1*0.02*0.5; // 2% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FWAA", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FWAB", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FWAC", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+// frame of Air
+ ycoor += par[1];
+ par[0] = xFLT*0.5;
+ par[1] = (yFLT/2-ycoor-0.2)*0.5; // Aluminum layer considered (0.2 cm)
+ par[2] = (zFLTA *0.5);
+ ycoor += par[1];
+ gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+/* fp
//Back Plate honycomb (2cm)
par[0] = -1;
par[1] = 2 *0.5;
gMC->Gspos ("FBPB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
gMC->Gsvolu("FBPC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FBPC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+fp */
}
//_____________________________________________________________________________
Float_t xm[3],pm[3],xpad[3],ppad[3];
Float_t hits[13],phi,phid,z;
Int_t vol[5];
- Int_t sector, plate, pad_x, pad_z, strip;
- Int_t copy, pad_z_id, pad_x_id, strip_id, i;
+ Int_t sector, plate, padx, padz, strip;
+ Int_t copy, padzid, padxid, stripid, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
- Float_t IncidenceAngle;
+ Float_t incidenceAngle;
if(gMC->GetMedium()==idtmed[513] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
{
// getting information about hit volumes
- pad_z_id=gMC->CurrentVolOffID(2,copy);
- pad_z=copy;
+ padzid=gMC->CurrentVolOffID(2,copy);
+ padz=copy;
- pad_x_id=gMC->CurrentVolOffID(1,copy);
- pad_x=copy;
+ padxid=gMC->CurrentVolOffID(1,copy);
+ padx=copy;
- strip_id=gMC->CurrentVolOffID(5,copy);
+ stripid=gMC->CurrentVolOffID(4,copy);
strip=copy;
gMC->TrackPosition(pos);
gMC->TrackMomentum(mom);
// Double_t NormPos=1./pos.Rho();
- Double_t NormMom=1./mom.Rho();
+ Double_t normMom=1./mom.Rho();
// getting the cohordinates in pad ref system
xm[0] = (Float_t)pos.X();
xm[1] = (Float_t)pos.Y();
xm[2] = (Float_t)pos.Z();
- pm[0] = (Float_t)mom.X()*NormMom;
- pm[1] = (Float_t)mom.Y()*NormMom;
- pm[2] = (Float_t)mom.Z()*NormMom;
+ pm[0] = (Float_t)mom.X()*normMom;
+ pm[1] = (Float_t)mom.Y()*normMom;
+ pm[2] = (Float_t)mom.Z()*normMom;
gMC->Gmtod(xm,xpad,1);
gMC->Gmtod(pm,ppad,2);
- IncidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
+ incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
z = pos[2];
hits[8] = xpad[0];
hits[9] = xpad[1];
hits[10]= xpad[2];
- hits[11]= IncidenceAngle;
+ hits[11]= incidenceAngle;
hits[12]= gMC->Edep();
vol[0]= sector;
vol[1]= plate;
vol[2]= strip;
- vol[3]= pad_x;
- vol[4]= pad_z;
+ vol[3]= padx;
+ vol[4]= padz;
AddHit(gAlice->CurrentTrack(),vol, hits);
}
-#ifndef TOFv3_H
-#define TOFv3_H
+//_________________________________________________________________________
+// Implementation version v3 of TOF Manager class
+// HOLES ONLY FOR HMPID (RICH) DETECTOR
+//
+//*--
+//*-- Authors: Pierella, Seganti, Vicinanza (Bologna and Salerno University)
+
+#ifndef ALITOFv3_H
+#define ALITOFv3_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
-
-///////////////////////////////////////////////////////
-// Manager and hits classes for set:TOF version 3 //
-///////////////////////////////////////////////////////
#include "AliTOF.h"
#include "AliHit.h"
class AliTOFv3 : public AliTOF {
-
-private:
- Int_t fIdFTOA;
- Int_t fIdFTOB;
- Int_t fIdFTOC;
- Int_t fIdFLTA;
- Int_t fIdFLTB;
- Int_t fIdFLTC;
public:
AliTOFv3();
AliTOFv3(const char *name, const char *title);
- virtual ~AliTOFv3() {}
+ virtual ~AliTOFv3(void) ;
virtual void BuildGeometry();
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual void Init();
virtual Int_t IsVersion() const {return 3;}
- virtual void TOFpc(Float_t,Float_t,Float_t,Float_t,Float_t,Float_t);
+ virtual void TOFpc(Float_t xtof,Float_t ytof,Float_t zlenC,Float_t zlenB,
+ Float_t zlenA,Float_t ztof0);
virtual void StepManager();
virtual void DrawModule();
-
+
+private:
+ Int_t fIdFTOA; // FTOA volume identifier (outer plate A)
+ Int_t fIdFTOB; // FTOB volume identifier (outer plate B)
+ Int_t fIdFTOC; // FTOC volume identifier (outer plate C)
+ Int_t fIdFLTA; // FLTA volume identifier (inner plate A)
+ Int_t fIdFLTB; // FLTB volume identifier (inner plate B)
+ Int_t fIdFLTC; // FLTC volume identifier (inner plate C)
+
ClassDef(AliTOFv3,1) //Time Of Flight version 3
};
-#endif
+#endif /* ALITOFv3_H */
/*
$Log$
+Revision 1.8 2000/12/04 08:48:20 alibrary
+Fixing problems in the HEAD
+
Revision 1.7 2000/10/02 21:28:17 fca
Removal of useless dependecies via forward declarations
//
// University of Salerno - Italy
//
+// Fabrizio Pierella
+// University of Bologna - Italy
+//
//
//Begin_Html
/*
//
// Check that FRAME is there otherwise we have no place where to
// put TOF
- AliModule* FRAME=gAlice->GetModule("FRAME");
- if(!FRAME) {
+ AliModule* frame=gAlice->GetModule("FRAME");
+ if(!frame) {
Error("Ctor","TOF needs FRAME to be present\n");
exit(1);
} else
- if(FRAME->IsVersion()!=1) {
+ if(frame->IsVersion()!=1) {
Error("Ctor","FRAME version 1 needed with this version of TOF\n");
exit(1);
}
}
+//____________________________________________________________________________
+AliTOFv4::~AliTOFv4()
+{
+ // destructor
+
+ if ( fHits) {
+ fHits->Delete() ;
+ delete fHits ;
+ fHits = 0 ;
+ }
+/*
+ if ( fSDigits) {
+ fSDigits->Delete() ;
+ delete fSDigits ;
+ fSDigits = 0 ;
+ }
+*/
+ if ( fDigits) {
+ fDigits->Delete() ;
+ delete fDigits ;
+ fDigits = 0 ;
+ }
+
+}
+
//_____________________________________________________________________________
void AliTOFv4::BuildGeometry()
{
//
// Build TOF ROOT geometry for the ALICE event display
//
- TNode *Node, *Top;
+ TNode *node, *top;
const int kColorTOF = 27;
// Find top TNODE
- Top = gAlice->GetGeometry()->GetNode("alice");
+ top = gAlice->GetGeometry()->GetNode("alice");
// Position the different copies
- const Float_t rTof =(fRmax+fRmin)/2;
- const Float_t hTof = fRmax-fRmin;
- const Int_t fNTof = 18;
+ const Float_t krTof =(fRmax+fRmin)/2;
+ const Float_t khTof = fRmax-fRmin;
+ const Int_t kNTof = fNTof;
const Float_t kPi = TMath::Pi();
- const Float_t angle = 2*kPi/fNTof;
+ const Float_t kangle = 2*kPi/kNTof;
Float_t ang;
// Define TOF basic volume
- char NodeName0[6], NodeName1[6], NodeName2[6];
- char NodeName3[6], NodeName4[6], RotMatNum[6];
+ char nodeName0[7], nodeName1[7], nodeName2[7];
+ char nodeName3[7], nodeName4[7], rotMatNum[7];
new TBRIK("S_TOF_C","TOF box","void",
- 120*0.5,hTof*0.5,fZlenC*0.5);
+ 120*0.5,khTof*0.5,fZlenC*0.5);
new TBRIK("S_TOF_B","TOF box","void",
- 120*0.5,hTof*0.5,fZlenB*0.5);
+ 120*0.5,khTof*0.5,fZlenB*0.5);
new TBRIK("S_TOF_A","TOF box","void",
- 120*0.5,hTof*0.5,fZlenA*0.5);
+ 120*0.5,khTof*0.5,fZlenA*0.5);
- for (Int_t NodeNum=1;NodeNum<19;NodeNum++){
+ for (Int_t nodeNum=1;nodeNum<19;nodeNum++){
- if (NodeNum<10) {
- sprintf(RotMatNum,"rot50%i",NodeNum);
- sprintf(NodeName0,"FTO00%i",NodeNum);
- sprintf(NodeName1,"FTO10%i",NodeNum);
- sprintf(NodeName2,"FTO20%i",NodeNum);
- sprintf(NodeName3,"FTO30%i",NodeNum);
- sprintf(NodeName4,"FTO40%i",NodeNum);
+ if (nodeNum<10) {
+ sprintf(rotMatNum,"rot50%i",nodeNum);
+ sprintf(nodeName0,"FTO00%i",nodeNum);
+ sprintf(nodeName1,"FTO10%i",nodeNum);
+ sprintf(nodeName2,"FTO20%i",nodeNum);
+ sprintf(nodeName3,"FTO30%i",nodeNum);
+ sprintf(nodeName4,"FTO40%i",nodeNum);
}
- if (NodeNum>9) {
- sprintf(RotMatNum,"rot5%i",NodeNum);
- sprintf(NodeName0,"FTO0%i",NodeNum);
- sprintf(NodeName1,"FTO1%i",NodeNum);
- sprintf(NodeName2,"FTO2%i",NodeNum);
- sprintf(NodeName3,"FTO3%i",NodeNum);
- sprintf(NodeName4,"FTO4%i",NodeNum);
+ if (nodeNum>9) {
+ sprintf(rotMatNum,"rot5%i",nodeNum);
+ sprintf(nodeName0,"FTO0%i",nodeNum);
+ sprintf(nodeName1,"FTO1%i",nodeNum);
+ sprintf(nodeName2,"FTO2%i",nodeNum);
+ sprintf(nodeName3,"FTO3%i",nodeNum);
+ sprintf(nodeName4,"FTO4%i",nodeNum);
}
- new TRotMatrix(RotMatNum,RotMatNum,90,-20*NodeNum,90,90-20*NodeNum,0,0);
- ang = (4.5-NodeNum) * angle;
-
- Top->cd();
- Node = new TNode(NodeName0,NodeName0,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName1,NodeName1,"S_TOF_C",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-299.15,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName2,NodeName2,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName3,NodeName3,"S_TOF_B",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),-146.45,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
-
- Top->cd();
- Node = new TNode(NodeName4,NodeName4,"S_TOF_A",rTof*TMath::Cos(ang),rTof*TMath::Sin(ang),0.,RotMatNum);
- Node->SetLineColor(kColorTOF);
- fNodes->Add(Node);
- }
+ new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0);
+ ang = (4.5-nodeNum) * kangle;
+
+ top->cd();
+ node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-299.15,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-146.45,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+
+ top->cd();
+ node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),0.,rotMatNum);
+ node->SetLineColor(kColorTOF);
+ fNodes->Add(node);
+ } // end loop on nodeNum
}
// xFLT, yFLT, zFLT - sizes of TOF modules (large)
Float_t ycoor, zcoor;
- Float_t par[10];
+ Float_t par[3];
Int_t *idtmed = fIdtmed->GetArray()-499;
Int_t idrotm[100];
Int_t nrot = 0;
Float_t hTof = fRmax-fRmin;
- Float_t Radius = fRmin+2.;//cm
+ Float_t radius = fRmin+2.;//cm
par[0] = xtof * 0.5;
par[1] = ytof * 0.5;
Float_t yPad = 0.505;//cm
-// Large not sensitive volumes with CO2
+// Large not sensitive volumes with Insensitive Freon
par[0] = xFLT*0.5;
par[1] = yFLT*0.5;
-
+
cout <<"************************* TOF geometry **************************"<<endl;
-
+
par[2] = (zFLTA *0.5);
- gMC->Gsvolu("FLTA", "BOX ", idtmed[506], par, 3); // CO2
+ gMC->Gsvolu("FLTA", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY");
par[2] = (zFLTB * 0.5);
- gMC->Gsvolu("FLTB", "BOX ", idtmed[506], par, 3); // CO2
+ gMC->Gsvolu("FLTB", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTB", 0, "FTOB", 0., 0., 0., 0, "ONLY");
- par[2] = (zFLTC * 0.5);
- gMC->Gsvolu("FLTC", "BOX ", idtmed[506], par, 3); // CO2
+ par[2] = (zFLTC * 0.5);
+ gMC->Gsvolu("FLTC", "BOX ", idtmed[512], par, 3); // Insensitive Freon
gMC->Gspos ("FLTC", 0, "FTOC", 0., 0., 0., 0, "ONLY");
-
-////////// Layers before detector ////////////////////
-
-// MYlar layer in front 1.0 mm thick at the beginning
- par[0] = -1;
+
+////////// Layers of Aluminum before and after detector //////////
+////////// Aluminum Box for Modules (2.0 mm thickness) /////////
+////////// lateral walls not simulated
+ par[0] = xFLT*0.5;
par[1] = 0.1;//cm
- par[2] = -1;
ycoor = -yFLT/2 + par[1];
- gMC->Gsvolu("FMYA", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYB", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FMYC", "BOX ", idtmed[508], par, 3); // Alluminium
- gMC->Gspos ("FMYC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
-
-// honeycomb (special Polyethilene Layer of 1cm)
- ycoor = ycoor + par[1];
- par[0] = -1;
- par[1] = 0.5;//cm
- par[2] = -1;
- ycoor = ycoor + par[1];
- gMC->Gsvolu("FPLA", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLB", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
- gMC->Gsvolu("FPLC", "BOX ", idtmed[503], par, 3); // Hony
- gMC->Gspos ("FPLC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
-
+ par[2] = (zFLTA *0.5);
+ gMC->Gsvolu("FALA", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALA", 1, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALA", 2, "FLTA", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FALB", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALB", 1, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALB", 2, "FLTB", 0.,-ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FALC", "BOX ", idtmed[508], par, 3); // Alluminium
+ gMC->Gspos ("FALC", 1, "FLTC", 0., ycoor, 0., 0, "ONLY");
+ gMC->Gspos ("FALC", 2, "FLTC", 0.,-ycoor, 0., 0, "ONLY");
+
///////////////// Detector itself //////////////////////
- const Float_t DeadBound = fDeadBndZ; //cm non-sensitive between the pad edge
+ const Float_t kdeadBound = fDeadBndZ; //cm non-sensitive between the pad edge
//and the boundary of the strip
- const Int_t nx = fNpadX; // number of pads along x
- const Int_t nz = fNpadZ; // number of pads along z
- const Float_t Space = fSpace; //cm distance from the front plate of the box
+ const Int_t knx = fNpadX; // number of pads along x
+ const Int_t knz = fNpadZ; // number of pads along z
+ const Float_t kspace = fSpace; //cm distance from the front plate of the box
Float_t zSenStrip = fZpad*fNpadZ;//cm
- Float_t StripWidth = zSenStrip + 2*DeadBound;
+ Float_t stripWidth = zSenStrip + 2*kdeadBound;
par[0] = xFLT*0.5;
par[1] = yPad*0.5;
- par[2] = StripWidth*0.5;
+ par[2] = stripWidth*0.5;
- // glass layer of detector STRip
- gMC->Gsvolu("FSTR","BOX",idtmed[514],par,3);
-
- // Non-Sesitive Freon boundaries
- par[0] = xFLT*0.5;
- par[1] = 0.110*0.5;//cm
- par[2] = -1;
- gMC->Gsvolu("FNSF","BOX",idtmed[512],par,3);
- gMC->Gspos ("FNSF",0,"FSTR",0.,0.,0.,0,"ONLY");
-
- // MYlar for Internal non-sesitive boundaries
-// par[1] = 0.025;//cm
-// gMC->Gsvolu("FMYI","BOX",idtmed[510],par,3);
-// gMC->Gspos ("FMYI",0,"FNSF",0.,0.,0.,0,"MANY");
-
- // MYlar eXternal layers
- par[1] = 0.035*0.5;//cm
- ycoor = -yPad*0.5+par[1];
- gMC->Gsvolu("FMYX","BOX",idtmed[510],par,3);
- gMC->Gspos ("FMYX",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FMYX",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
- ycoor += par[1];
-
- // GRaphyte Layers
- par[1] = 0.003*0.5;
- ycoor += par[1];
- gMC->Gsvolu("FGRL","BOX",idtmed[502],par,3);
- gMC->Gspos ("FGRL",1,"FSTR",0.,ycoor,0.,0,"ONLY");
- gMC->Gspos ("FGRL",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
-
- // freon sensitive layer (Chlorine-Fluorine-Carbon)
- par[0] = xFST*0.5;
- par[1] = 0.110*0.5;
- par[2] = zSenStrip*0.5;
- gMC->Gsvolu("FCFC","BOX",idtmed[513],par,3);
- gMC->Gspos ("FCFC",0,"FNSF",0.,0.,0.,0,"ONLY");
+// new description for strip volume
+// -- all constants are expressed in cm
+// heigth of different layers
+ const Float_t khhony = 1. ; // heigth of HONY Layer
+ const Float_t khpcby = 0.15 ; // heigth of PCB Layer
+ const Float_t khmyly = 0.035 ; // heigth of MYLAR Layer
+ const Float_t khgraphy = 0.02 ; // heigth of GRAPHITE Layer
+ const Float_t khglasseiy = 0.32; // 2.2 Ext. Glass + 1. Semi Int. Glass (mm)
+ const Float_t khsensmy = 0.11 ; // heigth of Sensitive Freon Mixture
+ const Float_t kwsensmz = 2*3.5 ; // cm
+ const Float_t klsensmx = 48*2.5; // cm
+ const Float_t kwpadz = 3.5; // cm z dimension of the FPAD volume
+ const Float_t klpadx = 2.5; // cm x dimension of the FPAD volume
+
+ // heigth of the FSTR Volume (the strip volume)
+ const Float_t khstripy = 2*(khhony+khpcby+khmyly+khgraphy+khglasseiy)+khsensmy;
+ // width of the FSTR Volume (the strip volume)
+ const Float_t kwstripz = 10.;
+ // length of the FSTR Volume (the strip volume)
+ const Float_t klstripx = 122.;
+
+ Float_t parfp[3]={klstripx*0.5,khstripy*0.5,kwstripz*0.5};
+// coordinates of the strip center in the strip reference frame; used for positioning
+// internal strip volumes
+ Float_t posfp[3]={0.,0.,0.};
+
+ // FSTR volume definition and filling this volume with non sensitive Gas Mixture
+ gMC->Gsvolu("FSTR","BOX",idtmed[512],parfp,3);
+ //-- HONY Layer definition
+// parfp[0] = -1;
+ parfp[1] = khhony*0.5;
+// parfp[2] = -1;
+ gMC->Gsvolu("FHON","BOX",idtmed[503],parfp,3);
+ // positioning 2 HONY Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+parfp[1];
+ gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- PCB Layer definition
+ parfp[1] = khpcby*0.5;
+ gMC->Gsvolu("FPCB","BOX",idtmed[504],parfp,3);
+ // positioning 2 PCB Layers on FSTR volume
+ posfp[1]=-khstripy*0.5+khhony+parfp[1];
+ gMC->Gspos("FPCB",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FPCB",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- MYLAR Layer definition
+ parfp[1] = khmyly*0.5;
+ gMC->Gsvolu("FMYL","BOX",idtmed[511],parfp,3);
+ // positioning 2 MYLAR Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1];
+ gMC->Gspos("FMYL",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FMYL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Graphite Layer definition
+ parfp[1] = khgraphy*0.5;
+ gMC->Gsvolu("FGRP","BOX",idtmed[502],parfp,3);
+ // positioning 2 Graphite Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+parfp[1];
+ gMC->Gspos("FGRP",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGRP",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Glass (EXT. +Semi INT.) Layer definition
+ parfp[1] = khglasseiy*0.5;
+ gMC->Gsvolu("FGLA","BOX",idtmed[514],parfp,3);
+ // positioning 2 Glass Layers on FSTR volume
+ posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+khgraphy+parfp[1];
+ gMC->Gspos("FGLA",1,"FSTR",0., posfp[1],0.,0,"ONLY");
+ gMC->Gspos("FGLA",2,"FSTR",0.,-posfp[1],0.,0,"ONLY");
+
+ //-- Sensitive Mixture Layer definition
+ parfp[0] = klsensmx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwsensmz*0.5;
+ gMC->Gsvolu("FSEN","BOX",idtmed[513],parfp,3);
+ // positioning the sensitive gas Layer on FSTR volume
+ gMC->Gspos("FSEN",0,"FSTR",0.,0.,0.,0,"ONLY");
+
+ // dividing FSEN along z in knz=2 and along x in knx=48
+ gMC->Gsdvn("FSEZ","FSEN",knz,3);
+ gMC->Gsdvn("FSEX","FSEZ",knx,1);
+
+ // FPAD volume definition
+ parfp[0] = klpadx*0.5;
+ parfp[1] = khsensmy*0.5;
+ parfp[2] = kwpadz*0.5;
+ gMC->Gsvolu("FPAD","BOX",idtmed[513],parfp,3);
+ // positioning the FPAD volumes on previous divisions
+ gMC->Gspos("FPAD",0,"FSEX",0.,0.,0.,0,"ONLY");
- // Pad definition x & z
- gMC->Gsdvn("FLZ","FCFC", nz, 3);
- gMC->Gsdvn("FLX","FLZ" , nx, 1);
-
- // MRPC PAD itself
- par[0] = -1;
- par[1] = -1;
- par[2] = -1;
- gMC->Gsvolu("FPAD", "BOX ", idtmed[513], par, 3);
- gMC->Gspos ("FPAD", 0, "FLX", 0., 0., 0., 0, "ONLY");
-
//// Positioning the Strips (FSTR) in the FLT volumes /////
// Plate A (Central)
Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel
- Float_t Gap = fGapA; //cm distance between the strip axis
+ Float_t gap = fGapA; //cm distance between the strip axis
Float_t zpos = 0;
Float_t ang = 0;
Int_t i=1,j=1;
nrot = 0;
zcoor = 0;
- ycoor = -14.5 + Space ; //2 cm over front plate
+ ycoor = -14.5 + kspace ; //2 cm over front plate
AliMatrix (idrotm[0], 90., 0.,90.,90.,0., 90.);
gMC->Gspos("FSTR",j,"FLTA",0.,ycoor, 0.,idrotm[0],"ONLY");
zcoor -= zSenStrip;
j++;
- Int_t UpDown = -1; // UpDown=-1 -> Upper strip
- // UpDown=+1 -> Lower strip
+ Int_t upDown = -1; // upDown=-1 -> Upper strip
+ // upDown=+1 -> Lower strip
do{
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
j += 2;
- UpDown*= -1; // Alternate strips
+ upDown*= -1; // Alternate strips
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- } while (zcoor-(StripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
+ } while (zcoor-(stripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2);
zcoor = zcoor+(zSenStrip/2)/TMath::Cos(ang)+
- UpDown*Gap*TMath::Tan(ang)+
+ upDown*gap*TMath::Tan(ang)+
(zSenStrip/2)/TMath::Cos(ang);
- Gap = fGapB;
+ gap = fGapB;
zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zcoor/Radius);
+ ang = atan(zcoor/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.);
ang /= kRaddeg;
- ycoor = -14.5+ Space; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -14.5+ kspace; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
printf("%f, St. %2i, Pl.3 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
- ycoor = -hTof/2.+ Space;//2 cm over front plate
+ ycoor = -hTof/2.+ kspace;//2 cm over front plate
// Plate B
nrot = 0;
i=1;
- UpDown = 1;
- Float_t DeadRegion = 1.0;//cm
+ upDown = 1;
+ Float_t deadRegion = 1.0;//cm
zpos = zcoor - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang)-
- DeadRegion/TMath::Cos(ang);
+ deadRegion/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
i++;
- UpDown*=-1;
+ upDown*=-1;
do {
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)-
- UpDown*Gap*TMath::Tan(ang)-
+ upDown*gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
- ycoor += (1-(UpDown+1)/2)*Gap;
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
+ ycoor += (1-(upDown+1)/2)*gap;
zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB
gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
printf("%f, St. %2i, Pl.4 ",ang*kRaddeg,i);
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
- UpDown*=-1;
+ upDown*=-1;
i++;
} while (TMath::Abs(ang*kRaddeg)<22.5);
//till we reach a tilting angle of 22.5 degrees
- ycoor = -hTof*0.5+ Space ; //2 cm over front plate
+ ycoor = -hTof*0.5+ kspace ; //2 cm over front plate
zpos = zpos - zSenStrip/TMath::Cos(ang);
do {
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
i++;
- } while (zpos-StripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
+ } while (zpos-stripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db);
// Plate C
zpos = zpos + zSenStrip/TMath::Cos(ang);
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)+
- Gap*TMath::Tan(ang)-
+ gap*TMath::Tan(ang)-
(zSenStrip/2)/TMath::Cos(ang);
nrot = 0;
i=0;
- ycoor= -hTof*0.5+Space+Gap;
+ ycoor= -hTof*0.5+kspace+gap;
do {
i++;
- ang = atan(zpos/Radius);
+ ang = atan(zpos/radius);
ang *= kRaddeg;
AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ang /= kRaddeg;
printf("y = %f, z = %f, zpos = %f \n",ycoor,zcoor,zpos);
zpos = zpos - zSenStrip/TMath::Cos(ang);
- } while (zpos-StripWidth*TMath::Cos(ang)*0.5>-t);
-
+ } while (zpos-stripWidth*TMath::Cos(ang)*0.5>-t);
-////////// Layers after detector /////////////////
-// honeycomb (Polyethilene) Layer after (3cm)
+////////// Layers after strips /////////////////
+// honeycomb (Polyethilene) Layer after (1.2cm)
- Float_t OverSpace = fOverSpc;//cm
+ Float_t overSpace = fOverSpc;//cm
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 0.6;
- par[2] = -1;
- ycoor = -yFLT/2 + OverSpace + par[1];
+ par[2] = (zFLTA *0.5);
+ ycoor = -yFLT/2 + overSpace + par[1];
gMC->Gsvolu("FPEA", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FPEB", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FPEC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FPEC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// Electronics (Cu) after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 1.43*0.05*0.5; // 5% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FECA", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FECB", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FECC", "BOX ", idtmed[501], par, 3); // Cu
gMC->Gspos ("FECC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
// cooling WAter after
ycoor += par[1];
- par[0] = -1;
+ par[0] = xFLT*0.5;
par[1] = 36.1*0.02*0.5; // 2% of X0
- par[2] = -1;
+ par[2] = (zFLTA *0.5);
ycoor += par[1];
gMC->Gsvolu("FWAA", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
gMC->Gsvolu("FWAB", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
gMC->Gsvolu("FWAC", "BOX ", idtmed[515], par, 3); // Water
gMC->Gspos ("FWAC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+// frame of Air
+ ycoor += par[1];
+ par[0] = xFLT*0.5;
+ par[1] = (yFLT/2-ycoor-0.2)*0.5; // Aluminum layer considered (0.2 cm)
+ par[2] = (zFLTA *0.5);
+ ycoor += par[1];
+ gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTB *0.5);
+ gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
+ par[2] = (zFLTC *0.5);
+ gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air
+ gMC->Gspos ("FAIC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+/* fp
//Back Plate honycomb (2cm)
par[0] = -1;
par[1] = 2 *0.5;
gMC->Gspos ("FBPB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY");
gMC->Gsvolu("FBPC", "BOX ", idtmed[503], par, 3); // Hony
gMC->Gspos ("FBPC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY");
+fp */
}
//_____________________________________________________________________________
Float_t xm[3],pm[3],xpad[3],ppad[3];
Float_t hits[13],phi,phid,z;
Int_t vol[5];
- Int_t sector, plate, pad_x, pad_z, strip;
- Int_t copy, pad_z_id, pad_x_id, strip_id, i;
+ Int_t sector, plate, padx, padz, strip;
+ Int_t copy, padzid, padxid, stripid, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
- Float_t IncidenceAngle;
+ Float_t incidenceAngle;
if(gMC->GetMedium()==idtmed[513] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
{
// getting information about hit volumes
- pad_z_id=gMC->CurrentVolOffID(2,copy);
- pad_z=copy;
+ padzid=gMC->CurrentVolOffID(2,copy);
+ padz=copy;
- pad_x_id=gMC->CurrentVolOffID(1,copy);
- pad_x=copy;
+ padxid=gMC->CurrentVolOffID(1,copy);
+ padx=copy;
- strip_id=gMC->CurrentVolOffID(5,copy);
+ stripid=gMC->CurrentVolOffID(4,copy);
strip=copy;
gMC->TrackPosition(pos);
gMC->TrackMomentum(mom);
// Double_t NormPos=1./pos.Rho();
- Double_t NormMom=1./mom.Rho();
+ Double_t normMom=1./mom.Rho();
// getting the cohordinates in pad ref system
xm[0] = (Float_t)pos.X();
xm[1] = (Float_t)pos.Y();
xm[2] = (Float_t)pos.Z();
- pm[0] = (Float_t)mom.X()*NormMom;
- pm[1] = (Float_t)mom.Y()*NormMom;
- pm[2] = (Float_t)mom.Z()*NormMom;
+ pm[0] = (Float_t)mom.X()*normMom;
+ pm[1] = (Float_t)mom.Y()*normMom;
+ pm[2] = (Float_t)mom.Z()*normMom;
gMC->Gmtod(xm,xpad,1);
gMC->Gmtod(pm,ppad,2);
- IncidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
+ incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
z = pos[2];
hits[8] = xpad[0];
hits[9] = xpad[1];
hits[10]= xpad[2];
- hits[11]= IncidenceAngle;
+ hits[11]= incidenceAngle;
hits[12]= gMC->Edep();
vol[0]= sector;
vol[1]= plate;
vol[2]= strip;
- vol[3]= pad_x;
- vol[4]= pad_z;
+ vol[3]= padx;
+ vol[4]= padz;
AddHit(gAlice->CurrentTrack(),vol, hits);
}
-#ifndef TOFv4_H
-#define TOFv4_H
+//_________________________________________________________________________
+// Implementation version v4 of TOF Manager class
+// FULL COVERAGE VERSION i.e. NO HOLES FOR PHOS AND HMPID (RICH) ARE DEFINED
+//
+//*--
+//*-- Authors: Pierella, Seganti, Vicinanza (Bologna and Salerno University)
+
+#ifndef ALITOFv4_H
+#define ALITOFv4_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
-
-///////////////////////////////////////////////////////
-// Manager and hits classes for set:TOF version 4 //
-///////////////////////////////////////////////////////
#include "AliTOF.h"
#include "AliHit.h"
class AliTOFv4 : public AliTOF {
-private:
- Int_t fIdFTOA;
- Int_t fIdFTOB;
- Int_t fIdFTOC;
- Int_t fIdFLTA;
- Int_t fIdFLTB;
- Int_t fIdFLTC;
-
public:
AliTOFv4();
AliTOFv4(const char *name, const char *title);
- virtual ~AliTOFv4() {}
+ virtual ~AliTOFv4(void) ;
virtual void BuildGeometry();
virtual void CreateGeometry();
virtual void CreateMaterials();
virtual void Init();
virtual Int_t IsVersion() const {return 4;}
- virtual void TOFpc(Float_t,Float_t,Float_t,Float_t,Float_t,Float_t);
+ virtual void TOFpc(Float_t xtof,Float_t ytof,Float_t zlenC,Float_t zlenB,
+ Float_t zlenA,Float_t ztof0);
virtual void StepManager();
virtual void DrawModule();
-
+
+private:
+ Int_t fIdFTOA; // FTOA volume identifier (outer plate A)
+ Int_t fIdFTOB; // FTOB volume identifier (outer plate B)
+ Int_t fIdFTOC; // FTOC volume identifier (outer plate C)
+ Int_t fIdFLTA; // FLTA volume identifier (inner plate A)
+ Int_t fIdFLTB; // FLTB volume identifier (inner plate B)
+ Int_t fIdFLTC; // FLTC volume identifier (inner plate C)
+
ClassDef(AliTOFv4,1) //Time Of Flight version 4
};
-#endif
+#endif /* ALITOFv4_H */
--- /dev/null
+void TOFquickanal(Int_t evNumber=0)
+{
+/////////////////////////////////////////////////////////////////////////
+// This macro is a small example of a ROOT macro
+// illustrating how to read the output of GALICE
+// and fill some histograms concerning the TOF Hit Tree.
+//
+// Root > .L TOFquickanal.C //this loads the macro in memory
+// Root > TOFquickanal(); //by default process first event
+// Root > TOFquickanal(2); //process third event
+//Begin_Html
+/*
+<img src="picts/TOFquickanal.gif">
+*/
+//End_Html
+//
+// Author: F. Pierella , Bologna University 12-04-2001
+/////////////////////////////////////////////////////////////////////////
+
+// Dynamically link some shared libs
+ if (gClassTable->GetID("AliRun") < 0) {
+ gROOT->LoadMacro("loadlibs.C");
+ loadlibs();
+ }
+
+ // Connect the Root Galice file containing Geometry, Kine and Hits
+ TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
+ if (!file) file = new TFile("galice.root");
+
+ // Get AliRun object from file or create it if not on file
+ if (!gAlice) {
+ gAlice = (AliRun*)file->Get("gAlice");
+ if (gAlice) printf("AliRun object found on file\n");
+ if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
+ }
+
+ // Import the Kine and Hits Trees for the event evNumber in the file
+ Int_t nparticles = gAlice->GetEvent(evNumber);
+ if (nparticles <= 0) return;
+
+ Float_t tof,tofmom,incangle;
+ Double_t xcoor,ycoor,zcoor,radius,prodmom,prodthe,prodphi;
+ Int_t nbytes = 0;
+ Int_t j,hit,ipart;
+ Int_t nhits;
+ TParticle *particle;
+
+
+ // Get pointers to Alice detectors and Hits containers
+ AliDetector *TOF = gAlice->GetDetector("TOF");
+
+ Int_t ntracks = gAlice->TreeH()->GetEntries();
+
+ //=======> Create histograms
+ //---> Time of Flight for Primary Particles (ns)
+ TH1F *htofprim = new TH1F("htofprim","Time of Flight for Primary Particles",100,0.,100.);
+ //--->Time of Flight for Secondary Particles (ns)
+ TH1F *htofsec = new TH1F("htofsec","Time of Flight for Secondary Particles",100,0.,100.);
+
+ //---> r (radius) coordinate of production in the ALICE frame for secondary particles that produce at
+ // least one TOF-hit (cm) - cylindrical coordinate system assumed, primary plus secondary-
+ TH1F *hradius = new TH1F("hradius","r (radius) coordinate at the production vertex for secondary particles with at least one TOF-Hit",50,0.,500.);
+
+ //---> Momentum of primary particles that produce (at least) one TOF-hit when the hit
+ // is produced (Gev/c)
+ TH1F *htofmom = new TH1F("htofmom","Momentum of primary particles when the Hit is produced",50,0.,5.);
+
+ //---> Momentum of primary particles that produce (at least) one TOF-hit at the production vertex
+ // (Gev/c)
+ TH1F *hprodmom = new TH1F("hprodmom","Momentum of primary particles (with at least one TOF hit) at the production ",50,0.,5.);
+
+ //---> Theta of production for primary particles that produce (at least) one TOF-hit (deg)
+ TH1F *hprodthe = new TH1F("hprodthe","Theta of primary particles (with at least one TOF hit) at the production ",90,0.,180.);
+
+ //---> Phi of production for primary particles that produce (at least) one TOF-hit (deg)
+ TH1F *hprodphi = new TH1F("hprodphi","Phi of primary particles (with at least one TOF hit) at the production ",180,-180.,180.);
+
+ //---> z Coordinate of the TOF Hit (z beam axis) - primary plus secondary - (cm)
+ TH1F *hzcoor = new TH1F("hzcoor","z Coordinate of the TOF Hit",800,-400.,400.);
+
+ //---> Incidence Angle of the particle on the pad (or strip) (deg) - primary plus secondary -
+ TH1F *hincangle = new TH1F("hincangle","Incidence Angle of the particle on the strip",90,0.,180.);
+
+ AliTOFhit *tofHit;
+
+ // Start loop on tracks in the hits containers
+ for (Int_t track=0; track<ntracks;track++) {
+
+// printf("Track #%d\n",track);
+ if(TOF) {
+ // ======>Histogram TOF
+ for(tofHit=(AliTOFhit*)TOF->FirstHit(track); tofHit; tofHit=(AliTOFhit*)TOF->NextHit()) {
+
+ tof = tofHit->GetTof();
+ tof *= 1.E+09; // conversion from s to ns
+ tofmom = tofHit->GetMom();
+
+ ipart = tofHit->GetTrack();
+ particle = gAlice->Particle(ipart);
+
+ if (particle->GetFirstMother() < 0) {
+ htofprim->Fill(tof);
+ htofmom->Fill(tofmom);
+ } else {
+ htofsec->Fill(tof);
+ };
+
+ zcoor = tofHit->Z();
+ hzcoor->Fill(zcoor);
+
+ incangle= tofHit->GetIncA();
+ hincangle->Fill(incangle);
+
+ xcoor =particle->Vx();
+ ycoor =particle->Vy();
+ radius = TMath::Sqrt(xcoor*xcoor+ycoor*ycoor);
+ if (particle->GetFirstMother() >= 0) hradius->Fill(radius);
+
+ prodmom=particle->P();
+ if (prodmom!=0.) {
+ Double_t dummy = (particle->Pz())/prodmom;
+ prodthe = TMath::ACos(dummy);
+ prodthe *=57.29578; // conversion from rad to deg
+ if (particle->GetFirstMother() < 0) hprodthe->Fill(prodthe);
+ } // theta at production vertex
+
+ if (particle->GetFirstMother() < 0) {
+ hprodmom->Fill(prodmom);
+ Double_t dummypx=particle->Px();
+ Double_t dummypy=particle->Py();
+ prodphi = TMath::ATan2(dummypy,dummypx);
+ prodphi *=57.29578; // conversion from rad to deg
+ hprodphi->Fill(prodphi);
+ } // phi at production vertex
+
+ } // close if(TOF)
+ } // close loop on TOF-hits
+ } // close loop on tracks in the hits containers
+
+
+
+//Create canvas, set the view range, show histograms
+ TCanvas *c1 = new TCanvas("c1","Alice TOF hits quick analysis",400,10,600,700);
+ c1->cd();
+ hprodmom->Draw();
+
+ TCanvas *c2 = new TCanvas("c2","Alice TOF hits quick analysis",400,10,600,700);
+ c2->cd();
+ hprodthe->Draw();
+
+ TCanvas *c3 = new TCanvas("c3","Alice TOF hits quick analysis",400,10,600,700);
+ c3->cd();
+ hprodphi->Draw();
+
+ TCanvas *c4 = new TCanvas("c4","Alice TOF hits quick analysis",400,10,600,700);
+ c4->cd();
+ hzcoor->Draw();
+
+ TCanvas *c5 = new TCanvas("c5","Alice TOF hits quick analysis",400,10,600,700);
+ c5->cd();
+ hradius->Draw();
+
+ TCanvas *c6 = new TCanvas("c6","Alice TOF hits quick analysis",400,10,600,700);
+ c6->cd();
+ htofprim->Draw();
+
+ TCanvas *c7 = new TCanvas("c7","Alice TOF hits quick analysis",400,10,600,700);
+ c7->cd();
+ htofsec->Draw();
+
+
+ TCanvas *c8 = new TCanvas("c8","Alice TOF hits quick analysis",400,10,600,700);
+ c8->cd();
+ htofmom->Draw();
+
+ TCanvas *c9 = new TCanvas("c9","Alice TOF hits quick analysis",400,10,600,700);
+ c9->cd();
+ hincangle->Draw();
+
+}
hTOFprim->Draw();
// hTOFprim->Draw("same");
c1->Print("tofanal.ps");
+ delete c1;
+ c1 = 0;
}