X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=CRT%2FAliCRTv0.cxx;h=8408b10daa113112899da264cc239aac039a2626;hb=8018bb90c037954772393894de753d00b4f593f3;hp=935e1f4b0746e2664996ed5d01994b4832067e8f;hpb=e760b04ae9c7a48b2fd2d0b36dde035ab060ec5c;p=u%2Fmrichter%2FAliRoot.git diff --git a/CRT/AliCRTv0.cxx b/CRT/AliCRTv0.cxx index 935e1f4b074..8408b10daa1 100644 --- a/CRT/AliCRTv0.cxx +++ b/CRT/AliCRTv0.cxx @@ -13,43 +13,7 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.9 2002/10/23 06:47:56 alibrary -Introducing Riostream.h - -Revision 1.8 2002/10/14 14:55:34 hristov -Merging the VirtualMC branch to the main development branch (HEAD) - -Revision 1.4.2.4 2002/10/10 14:40:31 hristov -Updating VirtualMC to v3-09-02 - -Revision 1.7 2002/10/07 11:13:25 gamez -Access shafts added - -Revision 1.6 2002/07/26 06:21:12 gamez -CRT3 volume taken as sensitive volume - -Revision 1.5 2002/07/25 12:52:34 morsch -AddHit call only if hit has been defined. - -Revision 1.4 2002/07/12 12:57:29 gamez -Division of CRT1 corrected - -Revision 1.3.2.1 2002/07/12 12:32:50 gamez -Division of CRT1 corrected - -Revision 1.3 2002/07/10 15:57:04 gamez -CreateHall() removed, and new Molasse volumes - -Revision 1.2 2002/07/09 08:45:35 hristov -Old style include files needed on HP (aCC) - -Revision 1.1 2002/06/16 17:08:19 hristov -First version of CRT - - -*/ +/* $Id$ */ /////////////////////////////////////////////////////////////////////////////// // // @@ -81,57 +45,67 @@ First version of CRT // // /////////////////////////////////////////////////////////////////////////////// -#include +#include "AliCRTv0.h" #include #include #include -#include +#include #include "AliRun.h" -#include "AliMC.h" -#include "AliMagF.h" #include "AliConst.h" -#include "AliPDG.h" -#include "AliCRTv0.h" #include "AliCRTConstants.h" +#include "AliCRTModule.h" ClassImp(AliCRTv0) //_____________________________________________________________________________ -AliCRTv0::AliCRTv0() : AliCRT() +AliCRTv0::AliCRTv0() + : AliCRT() { // - // Default constructor for CRT v0 + // Default constructor // } //_____________________________________________________________________________ AliCRTv0::AliCRTv0(const char *name, const char *title) - : AliCRT(name,title) + : AliCRT(name, title) { // - // Standard constructor for CRT v0 + // Standard constructor // //Begin_Html /* */ //End_Html + SetMarkerColor(kRed); + SetMarkerStyle(kRed); + SetMarkerSize(0.4); } //_____________________________________________________________________________ AliCRTv0::AliCRTv0(const AliCRTv0& crt) + : AliCRT(crt) { // - // Copy ctor. + // Copy constructor // crt.Copy(*this); } //_____________________________________________________________________________ -AliCRTv0& AliCRTv0::operator= (const AliCRTv0& crt) +AliCRTv0::~AliCRTv0() +{ + // + // Default destructor + // +} + +//_____________________________________________________________________________ +AliCRTv0& AliCRTv0::operator=(const AliCRTv0& crt) { // // Asingment operator. @@ -154,10 +128,12 @@ void AliCRTv0::BuildGeometry() // Find the top node alice. top = gAlice->GetGeometry()->GetNode("alice"); + AliCRTConstants* crtConstants = AliCRTConstants::Instance(); + new TBRIK("S_CRT_A", "CRT box", "void", - AliCRTConstants::fgActiveAreaLenght/2., - AliCRTConstants::fgActiveAreaHeight/2., - AliCRTConstants::fgActiveAreaWidth/2.); + crtConstants->ActiveAreaLenght()/2., + crtConstants->ActiveAreaHeight()/2., + crtConstants->ActiveAreaWidth()/2.); new TRotMatrix("Left", "Left", 90., 315., 90., 45., 0., 337.5); @@ -167,7 +143,7 @@ void AliCRTv0::BuildGeometry() // // Put 4 modules on the top of the magnet - Float_t box = AliCRTConstants::fgCageWidth/2.; + Float_t box = crtConstants->CageWidth()/2.; top->cd(); node = new TNode("upper1", "upper1", "S_CRT_A", 0., 790., 3.*box, "Up"); node->SetLineColor(kColorCRT); @@ -235,7 +211,6 @@ void AliCRTv0::BuildGeometry() node->SetLineColor(kColorCRT); fNodes->Add(node); - } //_____________________________________________________________________________ @@ -244,476 +219,138 @@ void AliCRTv0::CreateGeometry() // // Create geometry for the CRT array // - Int_t idrotm[2499]; // The rotation matrix. - - Int_t * idtmed = fIdtmed->GetArray() - 1099 ; - - // - // Molasse - CreateMolasse(); - - // - // Scintillators + Int_t idrotm[2499]; // The rotation matrix. + Int_t* idtmed = fIdtmed->GetArray() - 1099; + AliCRTConstants* crtConstants = AliCRTConstants::Instance(); + + // Create the mother volume. + // This volume can be seen as the volume which ACORDE will ocupate + // above the upper face of the L3 magnet. Inside this volume the detectors + // aboce the magnet will be, then there will be two copies of this volume, + // one for each side. Float_t box[3]; - box[0] = AliCRTConstants::fgCageLenght/2.; // Half Length of the box along the X axis, cm. - box[1] = AliCRTConstants::fgCageHeight/2.; // Half Length of the box along the Y axis, cm. - box[2] = AliCRTConstants::fgCageWidth/2.; // Half Length of the box along the Z axis, cm. - - - // Define the Scintillators. as a big box. - Float_t scint[3]; - scint[0] = AliCRTConstants::fgActiveAreaLenght/2.; // Half Length in X - scint[1] = AliCRTConstants::fgActiveAreaHeight/2.; // Half Length in Y - scint[2] = AliCRTConstants::fgActiveAreaWidth/2.; // Half Length in Z - gMC->Gsvolu("CRT1", "BOX ", idtmed[1112], scint, 3); // Scintillators - - // - // Define the coordinates where the draw will begin. - // - - // - // -- X axis. - // we'll start dawing from the center. - Float_t initX = 0.; - - // - // -- Y axis - Float_t gapY = 30.; // 30 cms. above the barrel. - // For the height we staimate the from the center of the ceiling, - // if were a cilinder, must be about 280cm. - Float_t barrel = 790.; // Barrel radius. - Float_t height = barrel + gapY - 30.; - Float_t initY = height; - - // - // -- Z axis. - // we'll start dawing from the center. - - // - // Put 4 modules on the top of the magnet - Int_t step = 4; - for ( Int_t i = 1 ; i <= 4 ; i++ ) { - gMC->Gspos("CRT1", i, "ALIC", initX, initY, (i-step)*box[2], 0, "ONLY"); - step--; + //box[0] = 2*crtConstants->MagMinRadius()*TMath::Sin(kDegrad*22.5); + box[0] = crtConstants->MagMinRadius()*TMath::Sin(kDegrad*22.5); + box[1] = crtConstants->MagMaxRadius() - crtConstants->MagMinRadius(); + box[2] = crtConstants->MagnetLenght()/2; + gMC->Gsvolu("CRT1", "BOX", idtmed[1112], box, 3); + + // Check if the AliCRTModule instance have been set, otherwise + // use the default values + if ( !fModule ) { + Info("CreateGeometry", "Using default dimensions"); + fModule = new AliCRTModule("CRTmod", "Default module dimensions"); } - // Modules on the barrel sides. - // Because the openenig angle for each face is 22.5, and if we want to - // put the modules right in the middle - Float_t xtragap = 10.; - Float_t initXside = (height+xtragap)*TMath::Sin(2*22.5*kDegrad); //rigth side - Float_t initYside = (height+xtragap)*TMath::Cos(2*22.5*kDegrad); - - // Put 4 modules on the left side of the magnet - // The rotation matrix parameters, for the left side. - AliMatrix(idrotm[232], 90., 315., 90., 45., 0., 337.5); - Int_t stepl = 4; - for ( Int_t i = 1 ; i <= 4 ; i++ ) { - gMC->Gspos("CRT1", i+4, "ALIC", initXside, initYside, (i-stepl)*box[2], - idrotm[232], "ONLY"); - stepl--; - } + // The full module volume. + // This volume will be ocupied by all the material of the module + // the scintillators, the aluminium frame, etc. + box[0] = fModule->FrameLength()/2; + box[1] = fModule->FrameThickness()/2; + box[2] = fModule->FrameWidth()/2; + gMC->Gsvolu("CRT2", "BOX", idtmed[1114], box, 3); + + // The scintillators + box[0] = crtConstants->SinglePaletteLenght()/4; + box[1] = crtConstants->SinglePaletteHeight(); + box[2] = crtConstants->SinglePaletteWidth()/2; + gMC->Gsvolu("CRT3", "BOX", idtmed[1112], box, 3); + gMC->Gspos("CRT3", 1, "CRT2", 0, 2, 0, 0, "ONLY"); + + // The metallic frame + box[0] = fModule->FrameLength()/2; + box[1] = fModule->FrameThickness()/2; + box[2] = 2; + gMC->Gsvolu("CRT4", "BOX", idtmed[1108], box, 3); + gMC->Gspos("CRT4", 1, "CRT2", 0, 0, 13 - box[2], 0, "MANY"); + gMC->Gspos("CRT4", 2, "CRT2", 0, 0, -13 + box[2], 0, "MANY"); + + box[0] = 2; + box[1] = fModule->FrameThickness()/2; + box[2] = fModule->FrameWidth()/2; + gMC->Gsvolu("CRT5", "BOX", idtmed[1108], box, 3); + gMC->Gspos("CRT5", 1, "CRT2", 140 - box[0], 0, 0, 0, "MANY"); + gMC->Gspos("CRT5", 2, "CRT2", -140 + box[0], 0, 0, 0, "MANY"); + + // The support bars + box[0] = 2; + box[1] = fModule->FrameThickness()/2; + box[2] = 500; + gMC->Gsvolu("CRT6", "BOX", idtmed[1108], box, 3); + + // Now put into the volume CR11 all the above volumes. + // 20 scintillation modules + // 4 support bars + Int_t copyNumber = 0; + for ( Int_t k = 0; k < fModule->NumberOfRows(); k++ ) { + Float_t zCoordinate = k*fModule->ZGap() - 450; + gMC->Gspos("CRT2",++copyNumber,"CRT1",-150, 15, zCoordinate, 0, "MANY"); + gMC->Gspos("CRT2",++copyNumber,"CRT1",150, 15, zCoordinate, 0, "MANY"); - // Put 4 modules on the right side of the magnet - // The rotation matrix parameters for the right side. - AliMatrix(idrotm[231], 90., 45., 90., 315., 180., 202.5); - Int_t stepr = 4; - for ( Int_t i = 1 ; i <= 4 ; i++ ) { - gMC->Gspos("CRT1", i+8, "ALIC", -initXside, initYside, (i-stepr)*box[2], - idrotm[231], "ONLY"); - stepr--; } - // Divide the modules in 2 planes. - //gMC->Gsdvn("CRT2", "CRT1", 2, 2); - // Now divide each plane in 8 palettes - //gMC->Gsdvn("CRT3", "CRT2", 8, 3); - -} - -//_____________________________________________________________________________ -void AliCRTv0::CreateMolasse() -{ - Int_t idrotm[2499]; // The rotation matrix. - - Int_t * idtmed = fIdtmed->GetArray() - 1099 ; - - // - // Molasse - // + // Put the support bars + gMC->Gspos("CRT6", 1, "CRT1", -75, 5, 0, 0, "ONLY"); + gMC->Gspos("CRT6", 2, "CRT1", -225, 5, 0, 0, "ONLY"); + gMC->Gspos("CRT6", 3, "CRT1", 75, 5, 0, 0, "ONLY"); + gMC->Gspos("CRT6", 4, "CRT1", 225, 5, 0, 0, "ONLY"); - // Exactly above the hall - Float_t tspar[5]; - tspar[0] = 1170.; - tspar[1] = 1170. + 375.; - tspar[2] = (1900.+1150.)/2.+100.; - tspar[3] = 0.; - tspar[4] = 180.; - gMC->Gsvolu("CMO1", "TUBS", idtmed[1123], tspar, 5); - gMC->Gspos("CMO1", 1, "ALIC", 0., 500., 1900.-tspar[2]+400., 0, "MANY"); - - Float_t tbox[3]; - tbox[0] = 1250.; - tbox[1] = (4420. - 1670.)/2.; - tbox[2] = (1900.+1150.)/2. + 200.; - gMC->Gsvolu("CM12", "BOX", idtmed[1123], tbox, 3); - gMC->Gspos("CM12", 1, "ALIC", 0., 4420. -tbox[1], 1900.-tbox[2]+400., 0, "MANY"); - - AliMatrix(idrotm[2003], 0., 0., 90., 0., 90., 90.); - // Along the PM25 - Float_t tube[3]; - tube[0] = 455. + 100.; - tube[1] = 555. + 375.; - tube[2] = (5150. - 1166.)/2.; - gMC->Gsvolu("CMO2", "TUBE", idtmed[1123], tube, 3); - gMC->Gspos("CMO2", 1, "ALIC", -2100., 4420.-tube[2], 0., idrotm[2003], "MANY"); - - - // Along the PGC2 - tube[0] = 650.; - tube[1] = 2987.7; - tube[2] = (5150. - 690.)/2.; - gMC->Gsvolu("CMO3", "TUBE", idtmed[1123], tube, 3); - gMC->Gspos("CMO3", 1, "ALIC", 375., 4420.-tube[2], 1900.+2987.7, idrotm[2003], "MANY"); - // Behind the PGC2 up to the end of the M. volume. - tbox[0] = 12073.; - tbox[1] = 2575. + 95.; - tbox[2] = (12073. - 1900.-2987.7-650.)/2.; - gMC->Gsvolu("CMO7", "BOX", idtmed[1123], tbox, 3); - gMC->Gspos("CMO7", 1, "ALIC", 0., 4420.-tbox[1], 1900.+2987.7+650.+tbox[2], 0, "MANY"); - - // Along the PX24 , upper part. - tube[0] = 1250.; - tube[1] = 2300; - tube[2] = 2575. - 1300. + 95.; - gMC->Gsvolu("CMO4", "TUBE", idtmed[1123], tube, 3); - gMC->Gspos("CMO4", 1, "ALIC", 0., 404.+1300.+tube[2], -2300., idrotm[2003], "MANY"); - - // Along the PX24 , lower part - tspar[0] = 1250.; - tspar[1] = 2300; - tspar[2] = 1300.; - tspar[3] = kRaddeg*TMath::ASin(1070./1150.); - tspar[4] = 360. - tspar[3]; - gMC->Gsvolu("CMO5", "TUBS", idtmed[1123], tspar, 5); - gMC->Gspos("CMO5", 1, "ALIC", 0., 404., -2300., idrotm[2003], "MANY"); - // behind the PX24 - tbox[0] = 12073.; - tbox[1] = 2575. + 95.; - tbox[2] = 8523./2.; - gMC->Gsvolu("CMO6", "BOX", idtmed[1123], tbox, 3); - gMC->Gspos("CMO6", 1, "ALIC", 0., 4420.-tbox[1], -3550.-tbox[2], 0, "MANY"); - - - // On the right side of th hall - tbox[0] = (12073. - 1250.)/2.; - tbox[1] = 2575. + 95.; - tbox[2] = (8437.7+650.)/2.; - gMC->Gsvolu("CMO8", "BOX", idtmed[1123], tbox, 3); - gMC->Gspos("CMO8", 1, "ALIC", 1250.+tbox[0], 4420.-tbox[1], -3550.+tbox[2], 0, "MANY"); - - // on the left side of the hall, behind - tbox[0] = (12073. - 2755.)/2.; - tbox[1] = 2575. + 95.; - tbox[2] = (8437.7+650.)/2.; - gMC->Gsvolu("CMO9", "BOX", idtmed[1123], tbox, 3); - gMC->Gspos("CMO9", 1, "ALIC", -2755.-tbox[0], 4420.-tbox[1], -3550.+tbox[2], 0, "MANY"); - - - // Molasse betwen the PX24 & PM25 on the left side. - tbox[0] = (2755. - 1250.)/2.; - tbox[1] = 2575. + 95.; - tbox[2] = (3550. - 555.)/2.; - gMC->Gsvolu("CM10", "BOX", idtmed[1123], tbox, 3); - gMC->Gspos("CM10", 1, "ALIC", -1250.-tbox[0], 4420.-tbox[1], -tbox[2]-555., 0, "MANY"); - - - // Molasse betwen the PGC2 & PM25 on the left side. - tbox[0] = (2755. - 1250.)/2.; - tbox[1] = 2575. + 95.; - tbox[2] = (1900.+2987.7 - 555. + 650.)/2.; - gMC->Gsvolu("CM11", "BOX", idtmed[1123], tbox, 3); - gMC->Gspos("CM11", 1, "ALIC", -1250.-tbox[0], 4420.-tbox[1], 555.+tbox[2], 0, "MANY"); + // Now put a copy of CR11 on the 3 upper faces of the magnet + // In the right side side of the magnet + AliMatrix(idrotm[231], 90, 45, 90, 135, 0, 0); + // In the left side side of the magnet + AliMatrix(idrotm[232], 90, 315, 90, 45, 0, 0); + Float_t x = crtConstants->MagMinRadius()+10; + gMC->Gspos("CRT1", 1, "ALIC", 0, x, 0, 0, "MANY"); + gMC->Gspos("CRT1", 2, "ALIC", -x*TMath::Sin(kDegrad*45), x*TMath::Cos(kDegrad*45), 0, idrotm[231], "MANY"); + gMC->Gspos("CRT1", 3, "ALIC", x*TMath::Sin(kDegrad*45), x*TMath::Cos(kDegrad*45), 0, idrotm[232], "MANY"); } //_____________________________________________________________________________ -void AliCRTv0::CreateShafts() -{ - // - // - // - Int_t idrotm[2499]; // The rotation matrix. - - Int_t * idtmed = fIdtmed->GetArray() - 1099 ; - - // HAll ceiling - Float_t ptubs[5]; - ptubs[0] = 1070.; - ptubs[1] = 1170.; - ptubs[2] = 1900.; - ptubs[3] = 0.; - ptubs[4] = 180.; - gMC->Gsvolu("CHC1", "TUBS", idtmed[1116], ptubs, 5); - gMC->Gspos("CHC1", 1, "ALIC", 0., 500., 0., 0, "ONLY"); - - - // - // Acces shafts - // - AliMatrix(idrotm[2001], 0., 0., 90., 0., 90., 90.); - - // PX24 - ptubs[0] = 1150.; - ptubs[1] = 1250.; - ptubs[2] = 1300.; - ptubs[3] = kRaddeg*TMath::ASin(1070./ptubs[0]); - ptubs[4] = 360 - ptubs[3]; - gMC->Gsvolu("CSF1", "TUBS", idtmed[1116], ptubs, 5); - gMC->Gspos("CSF1", 1, "ALIC", 0., 404., -2300., idrotm[2001], "MANY"); - - Float_t ptube[3]; - ptube[0] = ptubs[0]; - ptube[1] = ptubs[1]; - ptube[2] = 2575. - ptubs[2] + 95.; - gMC->Gsvolu("CSF2", "TUBE", idtmed[1116], ptube, 3); - gMC->Gspos("CSF2", 1, "ALIC", 0., 404.+ptubs[2]+ptube[2], -2300., idrotm[2001], "MANY"); - - // Concrete walls along the shaft - Float_t pbox[3]; - pbox[0] = 585./2.; - pbox[1] = 2575. + 95.; - pbox[2] = 20.; - gMC->Gsvolu("CSW1", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW1", 1, "ALIC", -290-pbox[0], 404.-1300.+pbox[1], -3450.+210.*2, 0, "MANY"); - - // - pbox[0] = 750./2.; - pbox[1] = 2575. + 95.; - pbox[2] = 20.; - gMC->Gsvolu("CSW3", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW3", 1, "ALIC", 420.-290.+pbox[0], 404.-1300.+pbox[1], -3450.+210.*2, 0, "MANY"); - - // - pbox[0] = 60.; - pbox[1] = 2575. + 95.; - pbox[2] = 210.; - gMC->Gsvolu("CSW2", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSW2", 1, "ALIC", -290-pbox[0], 404.-1300.+pbox[1], -3450.+pbox[2], 0, "MANY"); - gMC->Gspos("CSW2", 2, "ALIC", 420.-290.+pbox[0], 404.-1300.+pbox[1], -3450.+pbox[2], 0, "MANY"); - - - // - pbox[0] = 1000.; - pbox[1] = 80.; - pbox[2] = 200.; - gMC->Gsvolu("CSP1", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSP1", 1, "ALIC", 0., 2600.-700., -1150-pbox[2], 0, "MANY"); - - // - pbox[0] = 340.8; - pbox[1] = 300./2.; - pbox[2] = 460./2.; - gMC->Gsvolu("CSP2", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSP2", 1, "ALIC", 0., 2950.-700., -3450+pbox[2], 0, "MANY"); - - // - pbox[0] = 600.; - pbox[1] = 150.; - pbox[2] = 75.; - gMC->Gsvolu("CSP3", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSP3", 1, "ALIC", 0., 2950.-700., -1150.-210.-pbox[2], 0, "MANY"); - - // - pbox[0] = 600.; - pbox[1] = 250.; - pbox[2] = 38.; - gMC->Gsvolu("CSP4", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSP4", 1, "ALIC", 0., 2950.-700.+155.+pbox[1], -1150.-210.-pbox[2], 0, "MANY"); - - - // Shielding plug - pbox[0] = 850.; - pbox[1] = 90.; - pbox[2] = 720.; - gMC->Gsvolu("CSP5", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSP5", 1, "ALIC", 0., 2950.-700., -3450.+460.+pbox[2], 0, "MANY"); - - // - pbox[0] = 80.; - pbox[1] = 150.; - pbox[2] = 720.; - gMC->Gsvolu("CSP6", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSP6", 1, "ALIC", 1150.-600., 2950.-700., -3450.+460.+pbox[2], 0, "MANY"); - gMC->Gspos("CSP6", 2, "ALIC", -1150.+600., 2950.-700., -3450.+460.+pbox[2], 0, "MANY"); - - - // - pbox[0] = 130.; - pbox[1] = 60.; - pbox[2] = 750.; - gMC->Gsvolu("CSP7", "BOX", idtmed[1116], pbox, 3); - gMC->Gspos("CSP7", 1, "ALIC", 850.+pbox[0], 2950.-700.+100., -3450.+460.+pbox[2], 0, "MANY"); - gMC->Gspos("CSP7", 2, "ALIC", -850.-pbox[0], 2950.-700.+100., -3450.+460.+pbox[2], 0, "MANY"); - - - // PM25 Acces Shaft - ptube[0] = 910./2.; - ptube[1] = ptube[0] + 100.; - ptube[2] = (5150. - 1166.)/2.; - gMC->Gsvolu("CSF3", "TUBE", idtmed[1116], ptube, 3); - gMC->Gspos("CSF3", 1, "ALIC", -2100., AliCRTConstants::fgDepth-ptube[2], 0., idrotm[2001], "MANY"); - - // PGC2 Access Shaft - ptube[0] = 1100./2.; - ptube[1] = ptube[0] + 100.; - ptube[2] = (5150. - 690.)/2.; - gMC->Gsvolu("CSF4", "TUBE", idtmed[1116], ptube, 3); - gMC->Gspos("CSF4", 1, "ALIC", 375., AliCRTConstants::fgDepth-ptube[2], 1900.+2987.7, idrotm[2001], "MANY"); - -} - -//_____________________________________________________________________________ - -void AliCRTv0::CreateMaterials() -{ - // Use the standard materials. - AliCRT::CreateMaterials(); -} - - -//_____________________________________________________________________________ -void AliCRTv0::DrawDetector() +void AliCRTv0::DrawDetector() const { // // Draw a shaded view of the L3 magnet // - cout << "AliCRTv0::DrawModule() : Drawing the module" << endl; - - gMC->Gsatt("*", "seen", -1); - gMC->Gsatt("alic", "seen", 0); - - gMC->Gsatt("ALIC","seen",0); - gMC->Gsatt("L3MO","seen",1); // L3 Magnet - gMC->Gsatt("CRT1","seen",1); // Scintillators - - // Draw the molasse volumes - gMC->Gsatt("CMO1","seen",0); // Exactly above the HALL - gMC->Gsatt("CMO2","seen",0); // Molasse, along the PM25 - gMC->Gsatt("CMO3","seen",0); // molasse along the PGC2 - gMC->Gsatt("CMO4","seen",0); // Molasse, behind the PX24 upper part - gMC->Gsatt("CMO5","seen",0); // molasse behind px24, lower part - gMC->Gsatt("CMO6","seen",0); // behind the PX24 - gMC->Gsatt("CMO7","seen",0); // behind the PGC2 - gMC->Gsatt("CMO8","seen",0); // on the right side. - gMC->Gsatt("CMO9","seen",0); // on the left side. - gMC->Gsatt("CM10","seen",0); // betwen PX24 & PM25. - gMC->Gsatt("CM11","seen",0); // betwen PGC2 & PM25. - gMC->Gsatt("CM12","seen",0); // box above the hall. - - gMC->Gdopt("hide", "on"); - gMC->Gdopt("edge","off"); - gMC->Gdopt("shad", "on"); - gMC->Gsatt("*", "fill", 7); - gMC->SetClipBox("ALIC", 0, 3000, -3000, 3000, -6000, 6000); - gMC->DefaultRange(); - gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .009, .009); - gMC->Gdhead(1111, "View of CRT(ACORDE)"); - gMC->Gdman(18, 4, "MAN"); - - -} - -//_____________________________________________________________________________ -void AliCRTv0::Init() -{ - // - // Initialise L3 magnet after it has been built - Int_t i; - // - if(fDebug) { - printf("\n%s: ",ClassName()); - for(i=0;i<35;i++) printf("*"); - printf(" CRTv0_INIT "); - for(i=0;i<35;i++) printf("*"); - printf("\n%s: ",ClassName()); - // - // Here the CRTv0 initialisation code (if any!) - for(i=0;i<80;i++) printf("*"); - printf("\n"); - } + Info("DrawDetector", "Drawing the module"); + + gMC->Gsatt("*", "seen", -1); + + gMC->Gsatt("ALIC","seen",0); + + gMC->Gsatt("L3MO","seen",0); // L3 Magnet, Mother + gMC->Gsatt("L3CO","seen",1); // Coils + gMC->Gsatt("L3C1","seen",1); // Coils + gMC->Gsatt("L3YO","seen",1); // Yoke + gMC->Gsatt("L3DO","seen",0); // return Yoke (DOOR) + gMC->Gsatt("L3FR","seen",1); // DOOR + gMC->Gsatt("L3IR","seen",0); // Inner layer + gMC->Gsatt("L3O1","seen",1); // Door opening + gMC->Gsatt("L3O2","seen",1); // Door opening + + gMC->Gsatt("CRT1", "seen", 0); // CRT Mother + gMC->Gsatt("CRT2", "seen", 0); // Module air box + gMC->Gsatt("CRT3", "seen", 1); // Scintillators + gMC->Gsatt("CRT3", "colo", 2); // Scintillators + gMC->Gsatt("CRT4", "seen", 1); // Aluminium frame (long bars) + gMC->Gsatt("CRT4", "colo", 3); // + gMC->Gsatt("CRT5", "seen", 1); // Aluminium frame (short bars) + gMC->Gsatt("CRT5", "colo", 3); // + gMC->Gsatt("CRT6", "seen", 1); // Module support + gMC->Gsatt("CRT6", "colo", 3); // + + gMC->Gdopt("hide", "on"); + gMC->Gdopt("edge","off"); + gMC->Gdopt("shad", "on"); + gMC->Gsatt("*", "fill", 7); + gMC->SetClipBox("ALIC", 0, 3000, -3000, 3000, -6000, 6000); + gMC->DefaultRange(); + //gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .009, .009); + gMC->Gdraw("alic", 30, 40, 0, -30, -60, .09, .09); + gMC->Gdhead(1111, "View of CRT(ACORDE)"); + gMC->Gdman(18, 4, "MAN"); } - -//_____________________________________________________________________________ -void AliCRTv0::StepManager() -{ - // - // Called for every step in the Cosmic Ray Trigger - // - static Int_t vol[5]; - Int_t copy; - Int_t ipart; - TLorentzVector pos; - TLorentzVector mom; - - static Float_t hits[14]; - Int_t tracknumber = gAlice->CurrentTrack(); - - static Float_t eloss; - static Float_t tlength; - Float_t theta; - Float_t phi; - - if ( !gMC->IsTrackAlive() ) return; - - if (gMC->IsNewTrack()) { - // Reset the deposited energy - eloss = 0.; - } - - eloss += gMC->Edep(); // Store the energy loss along the trajectory. - tlength += gMC->TrackStep(); - - if (gMC->IsTrackEntering() && (strcmp(gMC->CurrentVolName(),"CM12") == 0) ) { - - // Get current particle id (ipart), track position (pos) and momentum (mom) - gMC->TrackPosition(pos); - gMC->TrackMomentum(mom); - ipart = gMC->TrackPid(); - - Double_t tc = mom[0]*mom[0]+mom[1]*mom[1]; - Double_t pt = TMath::Sqrt(tc); - theta = Float_t(TMath::ATan2(pt,Double_t(mom[2])))*kRaddeg; - phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg; - - - vol[0] = gMC->CurrentVolOffID(1, vol[1]); - vol[2] = gMC->CurrentVolID(copy); - vol[3] = copy; - - hits[0] = 0.f; // (fnmou) - hits[1] = (Float_t)ipart; // (fId) - - hits[2] = pos[0]; // X coordinate (fX) - hits[3] = pos[1]; // Y coordinate (fY) - hits[4] = pos[2]; // Z coordinate (fZ) - hits[5] = mom[0]; // Px (fpxug) - hits[6] = mom[1]; // Py (fpyug) - hits[7] = mom[2]; // Pz (fpzug) - - hits[8] = gMC->GetMedium();//layer(flay) - hits[9] = theta; // arrival angle - hits[10] = phi; // - hits[11] = eloss; // Energy loss - hits[12] = tlength; // Trajectory lenght - hits[13] = (Float_t)tracknumber; - - AddHit(gAlice->CurrentTrack(),vol, hits); - - } - -} -