/*
$Log$
+Revision 1.28 2001/05/16 14:57:17 alibrary
+New files for folders and Stack
+
+Revision 1.27 2001/04/06 11:24:43 morsch
+Dependency on implementations of AliSegmentation and AliMUONResponse moved to AliMUONFactory class.
+Static method Build() builds the MUON system out of chambers, segmentation and response.
+
+Revision 1.26 2001/03/17 10:07:20 morsch
+Correct inconsistent variable name / method name / comments.
+
Revision 1.25 2001/03/16 15:32:06 morsch
Corrections of overlap with beam shield and dipole (A. de Falco)
#include "AliMUONPadHit.h"
#include "AliMUONConstants.h"
#include "AliMUONTriggerCircuit.h"
+#include "AliMUONFactory.h"
ClassImp(AliMUONv1)
: AliMUON(name,title)
{
// Constructor
+ AliMUONFactory::Build(this, title);
}
//___________________________________________
tpar[0] = iChamber->RInner()-dframep;
tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi);
tpar[2] = dstation/5;
- gMC->Gsvolu("C05M", "TUBE", idAir, tpar, 3);
- gMC->Gsvolu("C06M", "TUBE", idAir, tpar, 3);
- gMC->Gspos("C05M", 1, "ALIC", 0., 0., zpos1 , 0, "MANY");
- gMC->Gspos("C06M", 1, "ALIC", 0., 0., zpos2 , 0, "MANY");
-
+
+ char *slats5Mother = "C05M";
+ char *slats6Mother = "C06M";
+ Float_t zoffs5 = 0;
+ Float_t zoffs6 = 0;
+
+ if (gMC->VolId("DDIP")) {
+ slats5Mother="DDIP";
+ slats6Mother="DDIP";
+
+ zoffs5 = zpos1;
+ zoffs6 = zpos2;
+ }
+ else {
+ gMC->Gsvolu("C05M", "TUBE", idAir, tpar, 3);
+ gMC->Gsvolu("C06M", "TUBE", idAir, tpar, 3);
+ gMC->Gspos("C05M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY");
+ gMC->Gspos("C06M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY");
+ }
+
// volumes for slat geometry (xx=5,..,10 chamber id):
// Sxx0 Sxx1 Sxx2 Sxx3 --> Slat Mother volumes
// SxxG --> Sensitive volume (gas)
Float_t zSlat = (i%2 ==0)? -spar[2] : spar[2];
sprintf(volNam5,"S05%d",i);
gMC->Gsvolu(volNam5,"BOX",slatMaterial,spar2,3);
- gMC->Gspos(volNam5, i*4+1,"C05M", xSlat32, ySlat31, zSlat+2.*dzCh3, 0, "ONLY");
- gMC->Gspos(volNam5, i*4+2,"C05M",-xSlat32, ySlat31, zSlat-2.*dzCh3, 0, "ONLY");
+ gMC->Gspos(volNam5, i*4+1,slats5Mother, xSlat32, ySlat31, zoffs5+zSlat+2.*dzCh3, 0, "ONLY");
+ gMC->Gspos(volNam5, i*4+2,slats5Mother,-xSlat32, ySlat31, zoffs5+zSlat-2.*dzCh3, 0, "ONLY");
if (i>0) {
- gMC->Gspos(volNam5, i*4+3,"C05M", xSlat32, ySlat32, zSlat+2.*dzCh3, 0, "ONLY");
- gMC->Gspos(volNam5, i*4+4,"C05M",-xSlat32, ySlat32, zSlat-2.*dzCh3, 0, "ONLY");
+ gMC->Gspos(volNam5, i*4+3,slats5Mother, xSlat32, ySlat32, zoffs5+zSlat+2.*dzCh3, 0, "ONLY");
+ gMC->Gspos(volNam5, i*4+4,slats5Mother,-xSlat32, ySlat32, zoffs5+zSlat-2.*dzCh3, 0, "ONLY");
}
sprintf(volNam6,"S06%d",i);
gMC->Gsvolu(volNam6,"BOX",slatMaterial,spar,3);
- gMC->Gspos(volNam6, i*4+1,"C06M", xSlat3, ySlat31, zSlat+2.*dzCh3, 0, "ONLY");
- gMC->Gspos(volNam6, i*4+2,"C06M",-xSlat3, ySlat31, zSlat-2.*dzCh3, 0, "ONLY");
+ gMC->Gspos(volNam6, i*4+1,slats6Mother, xSlat3, ySlat31, zoffs6+zSlat+2.*dzCh3, 0, "ONLY");
+ gMC->Gspos(volNam6, i*4+2,slats6Mother,-xSlat3, ySlat31, zoffs6+zSlat-2.*dzCh3, 0, "ONLY");
if (i>0) {
- gMC->Gspos(volNam6, i*4+3,"C06M", xSlat3, ySlat32, zSlat+2.*dzCh3, 0, "ONLY");
- gMC->Gspos(volNam6, i*4+4,"C06M",-xSlat3, ySlat32, zSlat-2.*dzCh3, 0, "ONLY");
+ gMC->Gspos(volNam6, i*4+3,slats6Mother, xSlat3, ySlat32, zoffs6+zSlat+2.*dzCh3, 0, "ONLY");
+ gMC->Gspos(volNam6, i*4+4,slats6Mother,-xSlat3, ySlat32, zoffs6+zSlat-2.*dzCh3, 0, "ONLY");
}
}
Float_t xvol=(pcbLength+xdiv)/2.+1.999;
Float_t yvol=ydiv + dydiv/2.;
//printf ("y ll = %f y ur = %f \n",yvol - divpar[1], yvol + divpar[1]);
- gMC->Gsposp("S05G",imax+4*idiv+1,"C05M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3);
- gMC->Gsposp("S06G",imax+4*idiv+1,"C06M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3);
- gMC->Gsposp("S05G",imax+4*idiv+2,"C05M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3);
- gMC->Gsposp("S06G",imax+4*idiv+2,"C06M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3);
- gMC->Gsposp("S05G",imax+4*idiv+3,"C05M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3);
- gMC->Gsposp("S06G",imax+4*idiv+3,"C06M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3);
- gMC->Gsposp("S05G",imax+4*idiv+4,"C05M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3);
- gMC->Gsposp("S06G",imax+4*idiv+4,"C06M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S05G",imax+4*idiv+1,slats5Mother, xvol, yvol, zoffs5+z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S06G",imax+4*idiv+1,slats6Mother, xvol, yvol, zoffs6+z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S05G",imax+4*idiv+2,slats5Mother, xvol,-yvol, zoffs5+z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S06G",imax+4*idiv+2,slats6Mother, xvol,-yvol, zoffs6+z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S05G",imax+4*idiv+3,slats5Mother,-xvol, yvol, zoffs5+z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S06G",imax+4*idiv+3,slats6Mother,-xvol, yvol, zoffs6+z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S05G",imax+4*idiv+4,slats5Mother,-xvol,-yvol, zoffs5+z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S06G",imax+4*idiv+4,slats6Mother,-xvol,-yvol, zoffs6+z1-z2, 0, "ONLY",divpar,3);
}
}
-
if (stations[3]) {
//********************************************************************
// Mother volume
tpar[0] = iChamber->RInner()-dframep;
tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi);
- tpar[2] = dstation/5;
+ tpar[2] = dstation/4;
gMC->Gsvolu("C07M", "TUBE", idAir, tpar, 3);
gMC->Gsvolu("C08M", "TUBE", idAir, tpar, 3);
for (i = 0; i<nSlats4; i++){
slatLength4[i] = pcbLength * nPCB4[i] + 2. * dSlatLength;
xSlat4 = slatLength4[i]/2. - vFrameLength/2. + xpos4[i];
- if (i==1 || i==0) slatLength4[i] -= 2. *dSlatLength; // frame out in PCB with circular border
+ if (i==1) slatLength4[i] -= 2. *dSlatLength; // frame out in PCB with circular border
ySlat4 = sensHeight * i - yOverlap *i;
spar[0] = slatLength4[i]/2.;
// Initialize Tracking Chambers
//
- printf("\n\n\n Start Init for version 1 - CPC chamber type\n\n\n");
+ if(fDebug) printf("\n%s: Start Init for version 1 - CPC chamber type\n\n",ClassName());
Int_t i;
for (i=0; i<AliMUONConstants::NCh(); i++) {
( (AliMUONChamber*) (*fChambers)[i])->Init();
((AliMUONChamber*)(*fChambers)[12])->SetGid(gMC->VolId("CG3A"));
((AliMUONChamber*)(*fChambers)[13])->SetGid(gMC->VolId("CG4A"));
- printf("\n\n\n Finished Init for version 0 - CPC chamber type\n\n\n");
+ if(fDebug) printf("\n%s: Finished Init for version 1 - CPC chamber type\n",ClassName());
//cp
- printf("\n\n\n Start Init for Trigger Circuits\n\n\n");
+ if(fDebug) printf("\n%s: Start Init for Trigger Circuits\n",ClassName());
for (i=0; i<AliMUONConstants::NTriggerCircuit(); i++) {
( (AliMUONTriggerCircuit*) (*fTriggerCircuits)[i])->Init(i);
}
- printf(" Finished Init for Trigger Circuits\n\n\n");
+ if(fDebug) printf("%s: Finished Init for Trigger Circuits\n",ClassName());
//cp
}