* without fee, provided that the above copyright notice appears in all *
* copies and that both the copyright notice and this permission notice *
* appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpeateose. It is *
+ * about the suitability of this software for any purpeateose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
/*
$Log$
+Revision 1.29 2001/06/21 14:54:37 morsch
+Put volumes of station 3 into DIPO if present. (A. de Falco)
+
+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)
+
+Revision 1.24 2001/03/14 17:22:15 pcrochet
+Geometry of the trigger chambers : a vertical gap of has been introduced around x=0 according fig.3.27 of the TDR (P.Dupieux)
+
+Revision 1.23 2001/01/18 15:23:49 egangler
+Bug correction in StepManager :
+Now the systematic offset with angle is cured
+
+Revision 1.22 2001/01/17 21:01:21 hristov
+Unused variable removed
+
+Revision 1.21 2000/12/20 13:00:22 egangler
+
+Added charge correlation between cathods.
+In Config_slat.C, use
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); to set the RMS of
+ q1/q2 to 11 % (number from Alberto)
+ This is stored in AliMUONChamber fChargeCorrel member.
+ At generation time, when a tracks enters the volume,
+ AliMUONv1::StepManager calls
+ AliMUONChamber::ChargeCorrelationInit() to set the current value of
+ fCurrentCorrel which is then used at Disintegration level to scale
+ appropriately the PadHit charges.
+
+Revision 1.20 2000/12/04 17:48:23 gosset
+Modifications for stations 1 et 2 mainly:
+* station 1 with 4 mm gas gap and smaller cathode segmentation...
+* stations 1 and 2 with "grey" frame crosses
+* mean noise at 1.5 ADC channel
+* Ar-CO2 gas (80%+20%)
+
+Revision 1.19 2000/12/02 17:15:46 morsch
+Correction of dead zones in inner regions of stations 3-5
+Correction of length of slats 3 and 9 of station 4.
+
+Revision 1.17 2000/11/24 12:57:10 morsch
+New version of geometry for stations 3-5 "Slats" (A. de Falco)
+ - sensitive region at station 3 inner radius
+ - improved volume tree structure
+
+Revision 1.16 2000/11/08 13:01:40 morsch
+Chamber half-planes of stations 3-5 at different z-positions.
+
+Revision 1.15 2000/11/06 11:39:02 morsch
+Bug in StepManager() corrected.
+
+Revision 1.14 2000/11/06 09:16:50 morsch
+Avoid overlap of slat volumes.
+
+Revision 1.13 2000/10/26 07:33:44 morsch
+Correct x-position of slats in station 5.
+
+Revision 1.12 2000/10/25 19:55:35 morsch
+Switches for each station individually for debug and lego.
+
+Revision 1.11 2000/10/22 16:44:01 morsch
+Update of slat geometry for stations 3,4,5 (A. deFalco)
+
+Revision 1.10 2000/10/12 16:07:04 gosset
+StepManager:
+* SigGenCond only called for tracking chambers,
+ hence no more division by 0,
+ and may use last ALIROOT/dummies.C with exception handling;
+* "10" replaced by "AliMUONConstants::NTrackingCh()".
+
+Revision 1.9 2000/10/06 15:37:22 morsch
+Problems with variable redefinition in for-loop solved.
+Variable names starting with u-case letters changed to l-case.
+
+Revision 1.8 2000/10/06 09:06:31 morsch
+Include Slat chambers (stations 3-5) into geometry (A. de Falco)
+
Revision 1.7 2000/10/02 21:28:09 fca
Removal of useless dependecies via forward declarations
#include "AliMUONPadHit.h"
#include "AliMUONConstants.h"
#include "AliMUONTriggerCircuit.h"
+#include "AliMUONFactory.h"
ClassImp(AliMUONv1)
//___________________________________________
-AliMUONv1::AliMUONv1() : AliMUON()
+AliMUONv1::AliMUONv1()
{
// Constructor
- fChambers = 0;
}
//___________________________________________
: AliMUON(name,title)
{
// Constructor
+// this->SetDebug(2);
+ AliMUONFactory::Build(this, title);
}
//___________________________________________
//
Float_t bpar[3];
Float_t tpar[3];
- Float_t pgpar[10];
+// Float_t pgpar[10];
Float_t zpos1, zpos2, zfpos;
+ // Outer excess and inner recess for mother volume radius
+ // with respect to ROuter and RInner
Float_t dframep=.001; // Value for station 3 should be 6 ...
- Float_t dframep1=.001;
-// Bool_t frames=kTRUE;
- Bool_t frames=kFALSE;
+ // Width (RdPhi) of the frame crosses for stations 1 and 2 (cm)
+// Float_t dframep1=.001;
+ Float_t dframep1 = 11.0;
+// Bool_t frameCrosses=kFALSE;
+ Bool_t frameCrosses=kTRUE;
- Float_t dframez=0.9;
- Float_t dr;
+// Float_t dframez=0.9;
+ // Half of the total thickness of frame crosses (including DAlu)
+ // for each chamber in stations 1 and 2:
+ // 3% of X0 of composite material,
+ // but taken as Aluminium here, with same thickness in number of X0
+ Float_t dframez = 3. * 8.9 / 100;
+// Float_t dr;
Float_t dstation;
//
//
// pointer to the current chamber
// pointer to the current chamber
- Int_t idAlu1=idtmed[1103];
- Int_t idAlu2=idtmed[1104];
+ Int_t idAlu1=idtmed[1103]; // medium 4
+ Int_t idAlu2=idtmed[1104]; // medium 5
// Int_t idAlu1=idtmed[1100];
// Int_t idAlu2=idtmed[1100];
- Int_t idAir=idtmed[1100];
- Int_t idGas=idtmed[1105];
+ Int_t idAir=idtmed[1100]; // medium 1
+// Int_t idGas=idtmed[1105]; // medium 6 = Ar-isoC4H10 gas
+ Int_t idGas=idtmed[1108]; // medium 9 = Ar-CO2 gas (80%+20%)
AliMUONChamber *iChamber, *iChamber1, *iChamber2;
+ Int_t stations[5] = {1, 1, 1, 1, 1};
+
+ if (stations[0]) {
+
//********************************************************************
// Station 1 **
//********************************************************************
zpos1=iChamber1->Z();
zpos2=iChamber2->Z();
dstation = zpos2 - zpos1;
+ // DGas decreased from standard one (0.5)
+ iChamber->SetDGas(0.4); iChamber2->SetDGas(0.4);
+ // DAlu increased from standard one (3% of X0),
+ // because more electronics with smaller pads
+ iChamber->SetDAlu(3.5 * 8.9 / 100.); iChamber2->SetDAlu(3.5 * 8.9 / 100.);
zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2;
//
// Mother volume
- tpar[0] = iChamber->RInner()-dframep1;
- tpar[1] = (iChamber->ROuter()+dframep1)/TMath::Cos(phi);
- tpar[2] = dstation/4;
+ tpar[0] = iChamber->RInner()-dframep;
+ tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi);
+ tpar[2] = dstation/5;
gMC->Gsvolu("C01M", "TUBE", idAir, tpar, 3);
gMC->Gsvolu("C02M", "TUBE", idAir, tpar, 3);
gMC->Gspos("C01M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY");
gMC->Gspos("C02M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY");
-// Aluminium frames
-// Outer frames
- pgpar[0] = 360/12/2;
- pgpar[1] = 360.;
- pgpar[2] = 12.;
- pgpar[3] = 2;
- pgpar[4] = -dframez/2;
- pgpar[5] = iChamber->ROuter();
- pgpar[6] = pgpar[5]+dframep1;
- pgpar[7] = +dframez/2;
- pgpar[8] = pgpar[5];
- pgpar[9] = pgpar[6];
- gMC->Gsvolu("C01O", "PGON", idAlu1, pgpar, 10);
- gMC->Gsvolu("C02O", "PGON", idAlu1, pgpar, 10);
- gMC->Gspos("C01O",1,"C01M", 0.,0.,-zfpos, 0,"ONLY");
- gMC->Gspos("C01O",2,"C01M", 0.,0.,+zfpos, 0,"ONLY");
- gMC->Gspos("C02O",1,"C02M", 0.,0.,-zfpos, 0,"ONLY");
- gMC->Gspos("C02O",2,"C02M", 0.,0.,+zfpos, 0,"ONLY");
-//
-// Inner frame
- tpar[0]= iChamber->RInner()-dframep1;
- tpar[1]= iChamber->RInner();
- tpar[2]= dframez/2;
- gMC->Gsvolu("C01I", "TUBE", idAlu1, tpar, 3);
- gMC->Gsvolu("C02I", "TUBE", idAlu1, tpar, 3);
-
- gMC->Gspos("C01I",1,"C01M", 0.,0.,-zfpos, 0,"ONLY");
- gMC->Gspos("C01I",2,"C01M", 0.,0.,+zfpos, 0,"ONLY");
- gMC->Gspos("C02I",1,"C02M", 0.,0.,-zfpos, 0,"ONLY");
- gMC->Gspos("C02I",2,"C02M", 0.,0.,+zfpos, 0,"ONLY");
+// // Aluminium frames
+// // Outer frames
+// pgpar[0] = 360/12/2;
+// pgpar[1] = 360.;
+// pgpar[2] = 12.;
+// pgpar[3] = 2;
+// pgpar[4] = -dframez/2;
+// pgpar[5] = iChamber->ROuter();
+// pgpar[6] = pgpar[5]+dframep1;
+// pgpar[7] = +dframez/2;
+// pgpar[8] = pgpar[5];
+// pgpar[9] = pgpar[6];
+// gMC->Gsvolu("C01O", "PGON", idAlu1, pgpar, 10);
+// gMC->Gsvolu("C02O", "PGON", idAlu1, pgpar, 10);
+// gMC->Gspos("C01O",1,"C01M", 0.,0.,-zfpos, 0,"ONLY");
+// gMC->Gspos("C01O",2,"C01M", 0.,0.,+zfpos, 0,"ONLY");
+// gMC->Gspos("C02O",1,"C02M", 0.,0.,-zfpos, 0,"ONLY");
+// gMC->Gspos("C02O",2,"C02M", 0.,0.,+zfpos, 0,"ONLY");
+// //
+// // Inner frame
+// tpar[0]= iChamber->RInner()-dframep1;
+// tpar[1]= iChamber->RInner();
+// tpar[2]= dframez/2;
+// gMC->Gsvolu("C01I", "TUBE", idAlu1, tpar, 3);
+// gMC->Gsvolu("C02I", "TUBE", idAlu1, tpar, 3);
+
+// gMC->Gspos("C01I",1,"C01M", 0.,0.,-zfpos, 0,"ONLY");
+// gMC->Gspos("C01I",2,"C01M", 0.,0.,+zfpos, 0,"ONLY");
+// gMC->Gspos("C02I",1,"C02M", 0.,0.,-zfpos, 0,"ONLY");
+// gMC->Gspos("C02I",2,"C02M", 0.,0.,+zfpos, 0,"ONLY");
//
// Frame Crosses
- if (frames) {
-
- bpar[0] = (iChamber->ROuter() - iChamber->RInner())/2;
+ if (frameCrosses) {
+ // outside gas
+ // security for inside mother volume
+ bpar[0] = (iChamber->ROuter() - iChamber->RInner())
+ * TMath::Cos(TMath::ASin(dframep1 /
+ (iChamber->ROuter() - iChamber->RInner())))
+ / 2.0;
bpar[1] = dframep1/2;
- bpar[2] = dframez/2;
+ // total thickness will be (4 * bpar[2]) for each chamber,
+ // which has to be equal to (2 * dframez) - DAlu
+ bpar[2] = (2.0 * dframez - iChamber->DAlu()) / 4.0;
gMC->Gsvolu("C01B", "BOX", idAlu1, bpar, 3);
gMC->Gsvolu("C02B", "BOX", idAlu1, bpar, 3);
// Sensitive volumes
// tpar[2] = iChamber->DGas();
tpar[2] = iChamber->DGas()/2;
- gMC->Gsvolu("C01G", "TUBE", idtmed[1108], tpar, 3);
- gMC->Gsvolu("C02G", "TUBE", idtmed[1108], tpar, 3);
+ gMC->Gsvolu("C01G", "TUBE", idGas, tpar, 3);
+ gMC->Gsvolu("C02G", "TUBE", idGas, tpar, 3);
gMC->Gspos("C01G", 1, "C01A", 0., 0., 0., 0, "ONLY");
gMC->Gspos("C02G", 1, "C02A", 0., 0., 0., 0, "ONLY");
//
-// Frame Crosses to be placed inside gas
- if (frames) {
-
- dr = (iChamber->ROuter() - iChamber->RInner());
- bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2;
- bpar[1] = dframep1/2;
- bpar[2] = iChamber->DGas()/2;
- gMC->Gsvolu("C01F", "BOX", idAlu1, bpar, 3);
- gMC->Gsvolu("C02F", "BOX", idAlu1, bpar, 3);
+// Frame Crosses to be placed inside gas
+ // NONE: chambers are sensitive everywhere
+// if (frameCrosses) {
+
+// dr = (iChamber->ROuter() - iChamber->RInner());
+// bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2;
+// bpar[1] = dframep1/2;
+// bpar[2] = iChamber->DGas()/2;
+// gMC->Gsvolu("C01F", "BOX", idAlu1, bpar, 3);
+// gMC->Gsvolu("C02F", "BOX", idAlu1, bpar, 3);
- gMC->Gspos("C01F",1,"C01G", +iChamber->RInner()+bpar[0] , 0, 0,
- idrotm[1100],"ONLY");
- gMC->Gspos("C01F",2,"C01G", -iChamber->RInner()-bpar[0] , 0, 0,
- idrotm[1100],"ONLY");
- gMC->Gspos("C01F",3,"C01G", 0, +iChamber->RInner()+bpar[0] , 0,
- idrotm[1101],"ONLY");
- gMC->Gspos("C01F",4,"C01G", 0, -iChamber->RInner()-bpar[0] , 0,
- idrotm[1101],"ONLY");
+// gMC->Gspos("C01F",1,"C01G", +iChamber->RInner()+bpar[0] , 0, 0,
+// idrotm[1100],"ONLY");
+// gMC->Gspos("C01F",2,"C01G", -iChamber->RInner()-bpar[0] , 0, 0,
+// idrotm[1100],"ONLY");
+// gMC->Gspos("C01F",3,"C01G", 0, +iChamber->RInner()+bpar[0] , 0,
+// idrotm[1101],"ONLY");
+// gMC->Gspos("C01F",4,"C01G", 0, -iChamber->RInner()-bpar[0] , 0,
+// idrotm[1101],"ONLY");
- gMC->Gspos("C02F",1,"C02G", +iChamber->RInner()+bpar[0] , 0, 0,
- idrotm[1100],"ONLY");
- gMC->Gspos("C02F",2,"C02G", -iChamber->RInner()-bpar[0] , 0, 0,
- idrotm[1100],"ONLY");
- gMC->Gspos("C02F",3,"C02G", 0, +iChamber->RInner()+bpar[0] , 0,
- idrotm[1101],"ONLY");
- gMC->Gspos("C02F",4,"C02G", 0, -iChamber->RInner()-bpar[0] , 0,
- idrotm[1101],"ONLY");
+// gMC->Gspos("C02F",1,"C02G", +iChamber->RInner()+bpar[0] , 0, 0,
+// idrotm[1100],"ONLY");
+// gMC->Gspos("C02F",2,"C02G", -iChamber->RInner()-bpar[0] , 0, 0,
+// idrotm[1100],"ONLY");
+// gMC->Gspos("C02F",3,"C02G", 0, +iChamber->RInner()+bpar[0] , 0,
+// idrotm[1101],"ONLY");
+// gMC->Gspos("C02F",4,"C02G", 0, -iChamber->RInner()-bpar[0] , 0,
+// idrotm[1101],"ONLY");
+// }
}
-
+ if (stations[1]) {
+
//********************************************************************
// Station 2 **
//********************************************************************
zpos1=iChamber1->Z();
zpos2=iChamber2->Z();
dstation = zpos2 - zpos1;
+ // DGas and DAlu not changed from standard values
zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2;
//
// Mother volume
tpar[0] = iChamber->RInner()-dframep;
tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi);
- tpar[2] = dstation/4;
+ tpar[2] = dstation/5;
gMC->Gsvolu("C03M", "TUBE", idAir, tpar, 3);
gMC->Gsvolu("C04M", "TUBE", idAir, tpar, 3);
gMC->Gspos("C03M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY");
gMC->Gspos("C04M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY");
-// Aluminium frames
-// Outer frames
- pgpar[0] = 360/12/2;
- pgpar[1] = 360.;
- pgpar[2] = 12.;
- pgpar[3] = 2;
- pgpar[4] = -dframez/2;
- pgpar[5] = iChamber->ROuter();
- pgpar[6] = pgpar[5]+dframep;
- pgpar[7] = +dframez/2;
- pgpar[8] = pgpar[5];
- pgpar[9] = pgpar[6];
- gMC->Gsvolu("C03O", "PGON", idAlu1, pgpar, 10);
- gMC->Gsvolu("C04O", "PGON", idAlu1, pgpar, 10);
- gMC->Gspos("C03O",1,"C03M", 0.,0.,-zfpos, 0,"ONLY");
- gMC->Gspos("C03O",2,"C03M", 0.,0.,+zfpos, 0,"ONLY");
- gMC->Gspos("C04O",1,"C04M", 0.,0.,-zfpos, 0,"ONLY");
- gMC->Gspos("C04O",2,"C04M", 0.,0.,+zfpos, 0,"ONLY");
-//
-// Inner frame
- tpar[0]= iChamber->RInner()-dframep;
- tpar[1]= iChamber->RInner();
- tpar[2]= dframez/2;
- gMC->Gsvolu("C03I", "TUBE", idAlu1, tpar, 3);
- gMC->Gsvolu("C04I", "TUBE", idAlu1, tpar, 3);
-
- gMC->Gspos("C03I",1,"C03M", 0.,0.,-zfpos, 0,"ONLY");
- gMC->Gspos("C03I",2,"C03M", 0.,0.,+zfpos, 0,"ONLY");
- gMC->Gspos("C04I",1,"C04M", 0.,0.,-zfpos, 0,"ONLY");
- gMC->Gspos("C04I",2,"C04M", 0.,0.,+zfpos, 0,"ONLY");
+// // Aluminium frames
+// // Outer frames
+// pgpar[0] = 360/12/2;
+// pgpar[1] = 360.;
+// pgpar[2] = 12.;
+// pgpar[3] = 2;
+// pgpar[4] = -dframez/2;
+// pgpar[5] = iChamber->ROuter();
+// pgpar[6] = pgpar[5]+dframep;
+// pgpar[7] = +dframez/2;
+// pgpar[8] = pgpar[5];
+// pgpar[9] = pgpar[6];
+// gMC->Gsvolu("C03O", "PGON", idAlu1, pgpar, 10);
+// gMC->Gsvolu("C04O", "PGON", idAlu1, pgpar, 10);
+// gMC->Gspos("C03O",1,"C03M", 0.,0.,-zfpos, 0,"ONLY");
+// gMC->Gspos("C03O",2,"C03M", 0.,0.,+zfpos, 0,"ONLY");
+// gMC->Gspos("C04O",1,"C04M", 0.,0.,-zfpos, 0,"ONLY");
+// gMC->Gspos("C04O",2,"C04M", 0.,0.,+zfpos, 0,"ONLY");
+// //
+// // Inner frame
+// tpar[0]= iChamber->RInner()-dframep;
+// tpar[1]= iChamber->RInner();
+// tpar[2]= dframez/2;
+// gMC->Gsvolu("C03I", "TUBE", idAlu1, tpar, 3);
+// gMC->Gsvolu("C04I", "TUBE", idAlu1, tpar, 3);
+
+// gMC->Gspos("C03I",1,"C03M", 0.,0.,-zfpos, 0,"ONLY");
+// gMC->Gspos("C03I",2,"C03M", 0.,0.,+zfpos, 0,"ONLY");
+// gMC->Gspos("C04I",1,"C04M", 0.,0.,-zfpos, 0,"ONLY");
+// gMC->Gspos("C04I",2,"C04M", 0.,0.,+zfpos, 0,"ONLY");
//
// Frame Crosses
- if (frames) {
-
- bpar[0] = (iChamber->ROuter() - iChamber->RInner())/2;
- bpar[1] = dframep/2;
- bpar[2] = dframez/2;
+ if (frameCrosses) {
+ // outside gas
+ // security for inside mother volume
+ bpar[0] = (iChamber->ROuter() - iChamber->RInner())
+ * TMath::Cos(TMath::ASin(dframep1 /
+ (iChamber->ROuter() - iChamber->RInner())))
+ / 2.0;
+ bpar[1] = dframep1/2;
+ // total thickness will be (4 * bpar[2]) for each chamber,
+ // which has to be equal to (2 * dframez) - DAlu
+ bpar[2] = (2.0 * dframez - iChamber->DAlu()) / 4.0;
gMC->Gsvolu("C03B", "BOX", idAlu1, bpar, 3);
gMC->Gsvolu("C04B", "BOX", idAlu1, bpar, 3);
gMC->Gsvolu("C04G", "TUBE", idGas, tpar, 3);
gMC->Gspos("C03G", 1, "C03A", 0., 0., 0., 0, "ONLY");
gMC->Gspos("C04G", 1, "C04A", 0., 0., 0., 0, "ONLY");
-
- if (frames) {
//
// Frame Crosses to be placed inside gas
- dr = (iChamber->ROuter() - iChamber->RInner());
- bpar[0] = TMath::Sqrt(dr*dr-dframep*dframep/4)/2;
- bpar[1] = dframep/2;
- bpar[2] = iChamber->DGas()/2;
- gMC->Gsvolu("C03F", "BOX", idAlu1, bpar, 3);
- gMC->Gsvolu("C04F", "BOX", idAlu1, bpar, 3);
+ // NONE: chambers are sensitive everywhere
+// if (frameCrosses) {
+
+// dr = (iChamber->ROuter() - iChamber->RInner());
+// bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2;
+// bpar[1] = dframep1/2;
+// bpar[2] = iChamber->DGas()/2;
+// gMC->Gsvolu("C03F", "BOX", idAlu1, bpar, 3);
+// gMC->Gsvolu("C04F", "BOX", idAlu1, bpar, 3);
- gMC->Gspos("C03F",1,"C03G", +iChamber->RInner()+bpar[0] , 0, 0,
- idrotm[1100],"ONLY");
- gMC->Gspos("C03F",2,"C03G", -iChamber->RInner()-bpar[0] , 0, 0,
- idrotm[1100],"ONLY");
- gMC->Gspos("C03F",3,"C03G", 0, +iChamber->RInner()+bpar[0] , 0,
- idrotm[1101],"ONLY");
- gMC->Gspos("C03F",4,"C03G", 0, -iChamber->RInner()-bpar[0] , 0,
- idrotm[1101],"ONLY");
+// gMC->Gspos("C03F",1,"C03G", +iChamber->RInner()+bpar[0] , 0, 0,
+// idrotm[1100],"ONLY");
+// gMC->Gspos("C03F",2,"C03G", -iChamber->RInner()-bpar[0] , 0, 0,
+// idrotm[1100],"ONLY");
+// gMC->Gspos("C03F",3,"C03G", 0, +iChamber->RInner()+bpar[0] , 0,
+// idrotm[1101],"ONLY");
+// gMC->Gspos("C03F",4,"C03G", 0, -iChamber->RInner()-bpar[0] , 0,
+// idrotm[1101],"ONLY");
- gMC->Gspos("C04F",1,"C04G", +iChamber->RInner()+bpar[0] , 0, 0,
- idrotm[1100],"ONLY");
- gMC->Gspos("C04F",2,"C04G", -iChamber->RInner()-bpar[0] , 0, 0,
- idrotm[1100],"ONLY");
- gMC->Gspos("C04F",3,"C04G", 0, +iChamber->RInner()+bpar[0] , 0,
- idrotm[1101],"ONLY");
- gMC->Gspos("C04F",4,"C04G", 0, -iChamber->RInner()-bpar[0] , 0,
- idrotm[1101],"ONLY");
+// gMC->Gspos("C04F",1,"C04G", +iChamber->RInner()+bpar[0] , 0, 0,
+// idrotm[1100],"ONLY");
+// gMC->Gspos("C04F",2,"C04G", -iChamber->RInner()-bpar[0] , 0, 0,
+// idrotm[1100],"ONLY");
+// gMC->Gspos("C04F",3,"C04G", 0, +iChamber->RInner()+bpar[0] , 0,
+// idrotm[1101],"ONLY");
+// gMC->Gspos("C04F",4,"C04G", 0, -iChamber->RInner()-bpar[0] , 0,
+// idrotm[1101],"ONLY");
+// }
}
-
+ // define the id of tracking media:
+ Int_t idCopper = idtmed[1110];
+ Int_t idGlass = idtmed[1111];
+ Int_t idCarbon = idtmed[1112];
+ Int_t idRoha = idtmed[1113];
+
+ // sensitive area: 40*40 cm**2
+ const Float_t sensLength = 40.;
+ const Float_t sensHeight = 40.;
+ const Float_t sensWidth = 0.5; // according to TDR fig 2.120
+ const Int_t sensMaterial = idGas;
+ const Float_t yOverlap = 1.5;
+
+ // PCB dimensions in cm; width: 30 mum copper
+ const Float_t pcbLength = sensLength;
+ const Float_t pcbHeight = 60.;
+ const Float_t pcbWidth = 0.003;
+ const Int_t pcbMaterial = idCopper;
+
+ // Insulating material: 200 mum glass fiber glued to pcb
+ const Float_t insuLength = pcbLength;
+ const Float_t insuHeight = pcbHeight;
+ const Float_t insuWidth = 0.020;
+ const Int_t insuMaterial = idGlass;
+
+ // Carbon fiber panels: 200mum carbon/epoxy skin
+ const Float_t panelLength = sensLength;
+ const Float_t panelHeight = sensHeight;
+ const Float_t panelWidth = 0.020;
+ const Int_t panelMaterial = idCarbon;
+
+ // rohacell between the two carbon panels
+ const Float_t rohaLength = sensLength;
+ const Float_t rohaHeight = sensHeight;
+ const Float_t rohaWidth = 0.5;
+ const Int_t rohaMaterial = idRoha;
+
+ // Frame around the slat: 2 sticks along length,2 along height
+ // H: the horizontal ones
+ const Float_t hFrameLength = pcbLength;
+ const Float_t hFrameHeight = 1.5;
+ const Float_t hFrameWidth = sensWidth;
+ const Int_t hFrameMaterial = idGlass;
+
+ // V: the vertical ones
+ const Float_t vFrameLength = 4.0;
+ const Float_t vFrameHeight = sensHeight + hFrameHeight;
+ const Float_t vFrameWidth = sensWidth;
+ const Int_t vFrameMaterial = idGlass;
+
+ // B: the horizontal border filled with rohacell
+ const Float_t bFrameLength = hFrameLength;
+ const Float_t bFrameHeight = (pcbHeight - sensHeight)/2. - hFrameHeight;
+ const Float_t bFrameWidth = hFrameWidth;
+ const Int_t bFrameMaterial = idRoha;
+
+ // NULOC: 30 mum copper + 200 mum vetronite (same radiation length as 14mum copper)
+ const Float_t nulocLength = 2.5;
+ const Float_t nulocHeight = 7.5;
+ const Float_t nulocWidth = 0.0030 + 0.0014; // equivalent copper width of vetronite;
+ const Int_t nulocMaterial = idCopper;
+
+ const Float_t slatHeight = pcbHeight;
+ const Float_t slatWidth = sensWidth + 2.*(pcbWidth + insuWidth +
+ 2.* panelWidth + rohaWidth);
+ const Int_t slatMaterial = idAir;
+ const Float_t dSlatLength = vFrameLength; // border on left and right
+
+ Float_t spar[3];
+ Int_t i, j;
+
+ // the panel volume contains the rohacell
+
+ Float_t twidth = 2 * panelWidth + rohaWidth;
+ Float_t panelpar[3] = { panelLength/2., panelHeight/2., twidth/2. };
+ Float_t rohapar[3] = { rohaLength/2., rohaHeight/2., rohaWidth/2. };
+
+ // insulating material contains PCB-> gas-> 2 borders filled with rohacell
+
+ twidth = 2*(insuWidth + pcbWidth) + sensWidth;
+ Float_t insupar[3] = { insuLength/2., insuHeight/2., twidth/2. };
+ twidth -= 2 * insuWidth;
+ Float_t pcbpar[3] = { pcbLength/2., pcbHeight/2., twidth/2. };
+ Float_t senspar[3] = { sensLength/2., sensHeight/2., sensWidth/2. };
+ Float_t theight = 2*hFrameHeight + sensHeight;
+ Float_t hFramepar[3]={hFrameLength/2., theight/2., hFrameWidth/2.};
+ Float_t bFramepar[3]={bFrameLength/2., bFrameHeight/2., bFrameWidth/2.};
+ Float_t vFramepar[3]={vFrameLength/2., vFrameHeight/2., vFrameWidth/2.};
+ Float_t nulocpar[3]={nulocLength/2., nulocHeight/2., nulocWidth/2.};
+ Float_t xx;
+ Float_t xxmax = (bFrameLength - nulocLength)/2.;
+ Int_t index=0;
+
+ if (stations[2]) {
+
//********************************************************************
// Station 3 **
//********************************************************************
zpos2=iChamber2->Z();
dstation = zpos2 - zpos1;
- zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2;
+// zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; // not used any more
//
// Mother volume
tpar[0] = iChamber->RInner()-dframep;
tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi);
- tpar[2] = dstation/4;
- 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");
-
+ tpar[2] = dstation/5;
+
+ 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)
// SxxC --> Carbon panel
// SxxR --> Rohacell
// SxxH, SxxV --> Horizontal and Vertical frames (vetronite)
+ // SB5x --> Volumes for the 35 cm long PCB
+ // slat dimensions: slat is a MOTHER volume!!! made of air
- // define the id of tracking media:
- Int_t idCopper = idtmed[1110];
- Int_t idGlass = idtmed[1111];
- Int_t idCarbon = idtmed[1112];
- Int_t idRoha = idtmed[1113];
-
- const Int_t nSlats3 = 4; // number of slats per quadrant
- const Int_t nPCB3[nSlats3] = {4,4,3,2}; // n PCB per slat
-
- // sensitive area: 40*40 cm**2
- const Float_t SensLength = 40.;
- const Float_t SensHeight = 40.;
- const Float_t SensWidth = 0.5; // according to TDR fig 2.120
- const Int_t SensMaterial = idGas;
- const Float_t yOverlap = 1.5;
-
- // PCB dimensions in cm; width: 30 mum copper
- const Float_t PCBLength = SensLength;
- const Float_t PCBHeight = 60.;
- const Float_t PCBWidth = 0.003;
- const Int_t PCBMaterial = idCopper;
-
- // Insulating material: 200 mum glass fiber glued to pcb
- const Float_t InsuLength = PCBLength;
- const Float_t InsuHeight = PCBHeight;
- const Float_t InsuWidth = 0.020;
- const Int_t InsuMaterial = idGlass;
-
- // Carbon fiber panels: 200mum carbon/epoxy skin
- const Float_t PanelLength = SensLength;
- const Float_t PanelHeight = SensHeight;
- const Float_t PanelWidth = 0.020;
- const Int_t PanelMaterial = idCarbon;
+ // only for chamber 5: slat 1 has a PCB shorter by 5cm!
- // rohacell between the two carbon panels
- const Float_t RohaLength = SensLength;
- const Float_t RohaHeight = SensHeight;
- const Float_t RohaWidth = 0.5;
- const Int_t RohaMaterial = idRoha;
+ Float_t tlength = 35.;
+ Float_t panelpar2[3] = { tlength/2., panelpar[1], panelpar[2]};
+ Float_t rohapar2[3] = { tlength/2., rohapar[1], rohapar[2]};
+ Float_t insupar2[3] = { tlength/2., insupar[1], insupar[2]};
+ Float_t pcbpar2[3] = { tlength/2., pcbpar[1], pcbpar[2]};
+ Float_t senspar2[3] = { tlength/2., senspar[1], senspar[2]};
+ Float_t hFramepar2[3] = { tlength/2., hFramepar[1], hFramepar[2]};
+ Float_t bFramepar2[3] = { tlength/2., bFramepar[1], bFramepar[2]};
- // Frame around the slat: 2 sticks along length,2 along height
- // H: the horizontal ones
- const Float_t HFrameLength = PCBLength;
- const Float_t HFrameHeight = 1.5;
- const Float_t HFrameWidth = SensWidth;
- const Int_t HFrameMaterial = idGlass;
+ const Int_t nSlats3 = 5; // number of slats per quadrant
+ const Int_t nPCB3[nSlats3] = {3,3,4,3,2}; // n PCB per slat
+ const Float_t xpos3[nSlats3] = {31., 40., 0., 0., 0.};
+ Float_t slatLength3[nSlats3];
- // V: the vertical ones
- const Float_t VFrameLength = 4.0;
- const Float_t VFrameHeight = SensHeight + HFrameHeight;
- const Float_t VFrameWidth = SensWidth;
- const Int_t VFrameMaterial = idGlass;
+ // create and position the slat (mother) volumes
- // B: the horizontal border filled with rohacell
- const Float_t BFrameLength = HFrameLength;
- const Float_t BFrameHeight = (PCBHeight - SensHeight)/2. - HFrameHeight;
- const Float_t BFrameWidth = HFrameWidth;
- const Int_t BFrameMaterial = idRoha;
+ char volNam5[5];
+ char volNam6[5];
+ Float_t xSlat3;
+
+ Float_t spar2[3];
+ for (i = 0; i<nSlats3; i++){
+ slatLength3[i] = pcbLength * nPCB3[i] + 2. * dSlatLength;
+ xSlat3 = slatLength3[i]/2. - vFrameLength/2. + xpos3[i];
+ if (i==1 || i==0) slatLength3[i] -= 2. *dSlatLength; // frame out in PCB with circular border
+ Float_t ySlat31 = sensHeight * i - yOverlap * i;
+ Float_t ySlat32 = -sensHeight * i + yOverlap * i;
+ spar[0] = slatLength3[i]/2.;
+ spar[1] = slatHeight/2.;
+ spar[2] = slatWidth/2. * 1.01;
+ // take away 5 cm from the first slat in chamber 5
+ Float_t xSlat32 = 0;
+ if (i==1 || i==2) { // 1 pcb is shortened by 5cm
+ spar2[0] = spar[0]-5./2.;
+ xSlat32 = xSlat3 - 5/2.;
+ }
+ else {
+ spar2[0] = spar[0];
+ xSlat32 = xSlat3;
+ }
+ spar2[1] = spar[1];
+ spar2[2] = spar[2];
+ Float_t dzCh3=spar[2] * 1.01;
+ // zSlat to be checked (odd downstream or upstream?)
+ 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,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,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,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,slats6Mother, xSlat3, ySlat32, zoffs6+zSlat+2.*dzCh3, 0, "ONLY");
+ gMC->Gspos(volNam6, i*4+4,slats6Mother,-xSlat3, ySlat32, zoffs6+zSlat-2.*dzCh3, 0, "ONLY");
+ }
+ }
- // NULOC: 30 mum copper + 200 mum vetronite (same radiation length as 14mum copper)
- const Float_t NulocLength = 2.5;
- const Float_t NulocHeight = 7.5;
- const Float_t NulocWidth = 0.0030 + 0.0014; // equivalent copper width of vetronite;
- const Int_t NulocMaterial = idCopper;
+ // create the panel volume
+
+ gMC->Gsvolu("S05C","BOX",panelMaterial,panelpar,3);
+ gMC->Gsvolu("SB5C","BOX",panelMaterial,panelpar2,3);
+ gMC->Gsvolu("S06C","BOX",panelMaterial,panelpar,3);
- // Gassiplex package
- const Float_t GassiLength = 1.0;
- const Float_t GassiHeight = 1.0;
- const Float_t GassiWidth = 0.15; // check it !!!
- const Int_t GassiMaterial = idGlass;
+ // create the rohacell volume
- // slat dimensions: slat is a MOTHER volume!!! made of air
- Float_t SlatLength[nSlats3];
- const Float_t SlatHeight = PCBHeight;
- const Float_t SlatWidth = SensWidth + 2.*(PCBWidth + InsuWidth +
- 2.* PanelWidth + RohaWidth);
- const Int_t SlatMaterial = idAir;
- const Float_t dSlatLength = VFrameLength; // border on left and right
+ gMC->Gsvolu("S05R","BOX",rohaMaterial,rohapar,3);
+ gMC->Gsvolu("SB5R","BOX",rohaMaterial,rohapar2,3);
+ gMC->Gsvolu("S06R","BOX",rohaMaterial,rohapar,3);
- // create and position the slat (mother) volumes
- Float_t spar[3];
- char VolNam5[5];
- char VolNam6[5];
- Float_t xSlat[nSlats3];
- Float_t ySlat[nSlats3];
-
- for (Int_t i = 0; i<nSlats3; i++){
- SlatLength[i] = PCBLength * nPCB3[i] + 2. * dSlatLength;
- xSlat[i] = SlatLength[i]/2.;
- ySlat[i] = SensHeight * (i+0.5) - yOverlap * i;
- spar[0] = SlatLength[i]/2.;
- spar[1] = SlatHeight/2.;
- spar[2] = SlatWidth/2.;
- // zSlat to be checked (odd downstream or upstream?)
- Float_t zSlat = (i%2 ==0)? -SlatWidth/2. : SlatWidth/2.;
- sprintf(VolNam5,"S05%d",i);
- gMC->Gsvolu(VolNam5,"BOX",SlatMaterial,spar,3);
- gMC->Gspos(VolNam5, i*4+1,"C05M", xSlat[i], ySlat[i], zSlat, 0, "ONLY");
- gMC->Gspos(VolNam5, i*4+2,"C05M",-xSlat[i], ySlat[i], zSlat, 0, "ONLY");
- gMC->Gspos(VolNam5, i*4+3,"C05M", xSlat[i],-ySlat[i],-zSlat, 0, "ONLY");
- gMC->Gspos(VolNam5, i*4+4,"C05M",-xSlat[i],-ySlat[i],-zSlat, 0, "ONLY");
- sprintf(VolNam6,"S06%d",i);
- gMC->Gsvolu(VolNam6,"BOX",SlatMaterial,spar,3);
- gMC->Gspos(VolNam6, i*4+1,"C06M", xSlat[i], ySlat[i], zSlat, 0, "ONLY");
- gMC->Gspos(VolNam6, i*4+2,"C06M",-xSlat[i], ySlat[i], zSlat, 0, "ONLY");
- gMC->Gspos(VolNam6, i*4+3,"C06M", xSlat[i],-ySlat[i],-zSlat, 0, "ONLY");
- gMC->Gspos(VolNam6, i*4+4,"C06M",-xSlat[i],-ySlat[i],-zSlat, 0, "ONLY");
- }
+ // create the insulating material volume
- // create the sensitive volumes (subdivided as the PCBs),
- Float_t SensPar[3] = { SensLength/2., SensHeight/2., SensWidth/2. };
- gMC->Gsvolu("S05G","BOX",SensMaterial,SensPar,3);
- gMC->Gsvolu("S06G","BOX",SensMaterial,SensPar,3);
+ gMC->Gsvolu("S05I","BOX",insuMaterial,insupar,3);
+ gMC->Gsvolu("SB5I","BOX",insuMaterial,insupar2,3);
+ gMC->Gsvolu("S06I","BOX",insuMaterial,insupar,3);
// create the PCB volume
- Float_t PCBpar[3] = { PCBLength/2., PCBHeight/2., PCBWidth/2. };
- gMC->Gsvolu("S05P","BOX",PCBMaterial,PCBpar,3);
- gMC->Gsvolu("S06P","BOX",PCBMaterial,PCBpar,3);
-
- // create the insulating material volume
- Float_t Insupar[3] = { InsuLength/2., InsuHeight/2., InsuWidth/2. };
- gMC->Gsvolu("S05I","BOX",InsuMaterial,Insupar,3);
- gMC->Gsvolu("S06I","BOX",InsuMaterial,Insupar,3);
- // create the panel volume
- Float_t Panelpar[3] = { PanelLength/2., PanelHeight/2., PanelWidth/2. };
- gMC->Gsvolu("S05C","BOX",PanelMaterial,Panelpar,3);
- gMC->Gsvolu("S06C","BOX",PanelMaterial,Panelpar,3);
+ gMC->Gsvolu("S05P","BOX",pcbMaterial,pcbpar,3);
+ gMC->Gsvolu("SB5P","BOX",pcbMaterial,pcbpar2,3);
+ gMC->Gsvolu("S06P","BOX",pcbMaterial,pcbpar,3);
+
+ // create the sensitive volumes,
+ gMC->Gsvolu("S05G","BOX",sensMaterial,0,0);
+ gMC->Gsvolu("S06G","BOX",sensMaterial,0,0);
- // create the rohacell volume
- Float_t Rohapar[3] = { RohaLength/2., RohaHeight/2., RohaWidth/2. };
- gMC->Gsvolu("S05R","BOX",RohaMaterial,Rohapar,3);
- gMC->Gsvolu("S06R","BOX",RohaMaterial,Rohapar,3);
// create the vertical frame volume
- Float_t VFramepar[3]={VFrameLength/2., VFrameHeight/2., VFrameWidth/2.};
- gMC->Gsvolu("S05V","BOX",VFrameMaterial,VFramepar,3);
- gMC->Gsvolu("S06V","BOX",VFrameMaterial,VFramepar,3);
+
+ gMC->Gsvolu("S05V","BOX",vFrameMaterial,vFramepar,3);
+ gMC->Gsvolu("S06V","BOX",vFrameMaterial,vFramepar,3);
// create the horizontal frame volume
- Float_t HFramepar[3]={HFrameLength/2., HFrameHeight/2., HFrameWidth/2.};
- gMC->Gsvolu("S05H","BOX",HFrameMaterial,HFramepar,3);
- gMC->Gsvolu("S06H","BOX",HFrameMaterial,HFramepar,3);
+
+ gMC->Gsvolu("S05H","BOX",hFrameMaterial,hFramepar,3);
+ gMC->Gsvolu("SB5H","BOX",hFrameMaterial,hFramepar2,3);
+ gMC->Gsvolu("S06H","BOX",hFrameMaterial,hFramepar,3);
// create the horizontal border volume
- Float_t BFramepar[3]={BFrameLength/2., BFrameHeight/2., BFrameWidth/2.};
- gMC->Gsvolu("S05B","BOX",BFrameMaterial,BFramepar,3);
- gMC->Gsvolu("S06B","BOX",BFrameMaterial,BFramepar,3);
-
- Int_t index=0;
- for (Int_t i = 0; i<nSlats3; i++){
- sprintf(VolNam5,"S05%d",i);
- sprintf(VolNam6,"S06%d",i);
- Float_t xvframe = (SlatLength[i] - VFrameLength)/2.;
- gMC->Gspos("S05V",2*i-1,VolNam5, xvframe, 0., 0. , 0, "ONLY");
- gMC->Gspos("S05V",2*i ,VolNam5,-xvframe, 0., 0. , 0, "ONLY");
- gMC->Gspos("S06V",2*i-1,VolNam6, xvframe, 0., 0. , 0, "ONLY");
- gMC->Gspos("S06V",2*i ,VolNam6,-xvframe, 0., 0. , 0, "ONLY");
- for (Int_t j=0; j<nPCB3[i]; j++){
+
+ gMC->Gsvolu("S05B","BOX",bFrameMaterial,bFramepar,3);
+ gMC->Gsvolu("SB5B","BOX",bFrameMaterial,bFramepar2,3);
+ gMC->Gsvolu("S06B","BOX",bFrameMaterial,bFramepar,3);
+
+ index=0;
+ for (i = 0; i<nSlats3; i++){
+ sprintf(volNam5,"S05%d",i);
+ sprintf(volNam6,"S06%d",i);
+ Float_t xvFrame = (slatLength3[i] - vFrameLength)/2.;
+ Float_t xvFrame2 = xvFrame;
+ if ( i==1 || i ==2 ) xvFrame2 -= 5./2.;
+ // position the vertical frames
+ if (i!=1 && i!=0) {
+ gMC->Gspos("S05V",2*i-1,volNam5, xvFrame2, 0., 0. , 0, "ONLY");
+ gMC->Gspos("S05V",2*i ,volNam5,-xvFrame2, 0., 0. , 0, "ONLY");
+ gMC->Gspos("S06V",2*i-1,volNam6, xvFrame, 0., 0. , 0, "ONLY");
+ gMC->Gspos("S06V",2*i ,volNam6,-xvFrame, 0., 0. , 0, "ONLY");
+ }
+ // position the panels and the insulating material
+ for (j=0; j<nPCB3[i]; j++){
index++;
- Float_t xx = SensLength * (-nPCB3[i]/2.+j+.5);
- Float_t yy = 0.;
- Float_t zSens = 0.;
- gMC->Gspos("S05G",index,VolNam5, xx, yy, zSens , 0, "ONLY");
- gMC->Gspos("S06G",index,VolNam6, xx, yy, zSens , 0, "ONLY");
- Float_t zPCB = (SensWidth+PCBWidth)/2.;
- gMC->Gspos("S05P",2*index-1,VolNam5, xx, yy, zPCB , 0, "ONLY");
- gMC->Gspos("S05P",2*index ,VolNam5, xx, yy,-zPCB , 0, "ONLY");
- gMC->Gspos("S06P",2*index-1,VolNam6, xx, yy, zPCB , 0, "ONLY");
- gMC->Gspos("S06P",2*index ,VolNam6, xx, yy,-zPCB , 0, "ONLY");
- Float_t zInsu = (InsuWidth+PCBWidth)/2. + zPCB;
- gMC->Gspos("S05I",2*index-1,VolNam5, xx, yy, zInsu , 0, "ONLY");
- gMC->Gspos("S05I",2*index ,VolNam5, xx, yy,-zInsu , 0, "ONLY");
- gMC->Gspos("S06I",2*index-1,VolNam6, xx, yy, zInsu , 0, "ONLY");
- gMC->Gspos("S06I",2*index ,VolNam6, xx, yy,-zInsu , 0, "ONLY");
- Float_t zPanel1 = (InsuWidth+PanelWidth)/2. + zInsu;
- gMC->Gspos("S05C",4*index-3,VolNam5, xx, yy, zPanel1 , 0, "ONLY");
- gMC->Gspos("S05C",4*index-2,VolNam5, xx, yy,-zPanel1 , 0, "ONLY");
- gMC->Gspos("S06C",4*index-3,VolNam6, xx, yy, zPanel1 , 0, "ONLY");
- gMC->Gspos("S06C",4*index-2,VolNam6, xx, yy,-zPanel1 , 0, "ONLY");
- Float_t zRoha = (RohaWidth+PanelWidth)/2. + zPanel1;
- gMC->Gspos("S05R",2*index-1,VolNam5, xx, yy, zRoha , 0, "ONLY");
- gMC->Gspos("S05R",2*index ,VolNam5, xx, yy,-zRoha , 0, "ONLY");
- gMC->Gspos("S06R",2*index-1,VolNam6, xx, yy, zRoha , 0, "ONLY");
- gMC->Gspos("S06R",2*index ,VolNam6, xx, yy,-zRoha , 0, "ONLY");
- Float_t zPanel2 = (RohaWidth+PanelWidth)/2. + zRoha;
- gMC->Gspos("S05C",4*index-1,VolNam5, xx, yy, zPanel2 , 0, "ONLY");
- gMC->Gspos("S05C",4*index ,VolNam5, xx, yy,-zPanel2 , 0, "ONLY");
- gMC->Gspos("S06C",4*index-1,VolNam6, xx, yy, zPanel2 , 0, "ONLY");
- gMC->Gspos("S06C",4*index ,VolNam6, xx, yy,-zPanel2 , 0, "ONLY");
- Float_t yframe = (SensHeight + HFrameHeight)/2.;
- gMC->Gspos("S05H",2*index-1,VolNam5, xx, yframe, 0. , 0, "ONLY");
- gMC->Gspos("S05H",2*index ,VolNam5, xx,-yframe, 0. , 0, "ONLY");
- gMC->Gspos("S06H",2*index-1,VolNam6, xx, yframe, 0. , 0, "ONLY");
- gMC->Gspos("S06H",2*index ,VolNam6, xx,-yframe, 0. , 0, "ONLY");
- Float_t yborder = (BFrameHeight + HFrameHeight)/2. + yframe;
- gMC->Gspos("S05B",2*index-1,VolNam5, xx, yborder, 0. , 0, "ONLY");
- gMC->Gspos("S05B",2*index ,VolNam5, xx,-yborder, 0. , 0, "ONLY");
- gMC->Gspos("S06B",2*index-1,VolNam6, xx, yborder, 0. , 0, "ONLY");
- gMC->Gspos("S06B",2*index ,VolNam6, xx,-yborder, 0. , 0, "ONLY");
+ Float_t xx = sensLength * (-nPCB3[i]/2.+j+.5);
+ Float_t xx2 = xx + 5/2.;
+
+ Float_t zPanel = spar[2] - panelpar[2];
+ if ( (i==1 || i==2) && j == nPCB3[i]-1) { // 1 pcb is shortened by 5cm
+ gMC->Gspos("SB5C",2*index-1,volNam5, xx, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("SB5C",2*index ,volNam5, xx, 0.,-zPanel , 0, "ONLY");
+ gMC->Gspos("SB5I",index ,volNam5, xx, 0., 0 , 0, "ONLY");
+ }
+ else if ( (i==1 || i==2) && j < nPCB3[i]-1) {
+ gMC->Gspos("S05C",2*index-1,volNam5, xx2, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("S05C",2*index ,volNam5, xx2, 0.,-zPanel , 0, "ONLY");
+ gMC->Gspos("S05I",index ,volNam5, xx2, 0., 0 , 0, "ONLY");
+ }
+ else {
+ gMC->Gspos("S05C",2*index-1,volNam5, xx, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("S05C",2*index ,volNam5, xx, 0.,-zPanel , 0, "ONLY");
+ gMC->Gspos("S05I",index ,volNam5, xx, 0., 0 , 0, "ONLY");
+ }
+ gMC->Gspos("S06C",2*index-1,volNam6, xx, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("S06C",2*index ,volNam6, xx, 0.,-zPanel , 0, "ONLY");
+ gMC->Gspos("S06I",index,volNam6, xx, 0., 0 , 0, "ONLY");
}
}
+
+ // position the rohacell volume inside the panel volume
+ gMC->Gspos("S05R",1,"S05C",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("SB5R",1,"SB5C",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("S06R",1,"S06C",0.,0.,0.,0,"ONLY");
+
+ // position the PCB volume inside the insulating material volume
+ gMC->Gspos("S05P",1,"S05I",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("SB5P",1,"SB5I",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("S06P",1,"S06I",0.,0.,0.,0,"ONLY");
+ // position the horizontal frame volume inside the PCB volume
+ gMC->Gspos("S05H",1,"S05P",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("SB5H",1,"SB5P",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("S06H",1,"S06P",0.,0.,0.,0,"ONLY");
+ // position the sensitive volume inside the horizontal frame volume
+ gMC->Gsposp("S05G",1,"S05H",0.,0.,0.,0,"ONLY",senspar,3);
+ gMC->Gsposp("S05G",1,"SB5H",0.,0.,0.,0,"ONLY",senspar2,3);
+ gMC->Gsposp("S06G",1,"S06H",0.,0.,0.,0,"ONLY",senspar,3);
+ // position the border volumes inside the PCB volume
+ Float_t yborder = ( pcbHeight - bFrameHeight ) / 2.;
+ gMC->Gspos("S05B",1,"S05P",0., yborder,0.,0,"ONLY");
+ gMC->Gspos("S05B",2,"S05P",0.,-yborder,0.,0,"ONLY");
+ gMC->Gspos("SB5B",1,"SB5P",0., yborder,0.,0,"ONLY");
+ gMC->Gspos("SB5B",2,"SB5P",0.,-yborder,0.,0,"ONLY");
+ gMC->Gspos("S06B",1,"S06P",0., yborder,0.,0,"ONLY");
+ gMC->Gspos("S06B",2,"S06P",0.,-yborder,0.,0,"ONLY");
// create the NULOC volume and position it in the horizontal frame
- Float_t nulocpar[3]={NulocLength/2., NulocHeight/2., NulocWidth/2.};
- gMC->Gsvolu("S05N","BOX",NulocMaterial,nulocpar,3);
- gMC->Gsvolu("S06N","BOX",NulocMaterial,nulocpar,3);
- Float_t xxmax = (BFrameLength - NulocLength)/2.;
- index = 0;
- for (Float_t xx = -xxmax; xx<=xxmax; xx+=3*NulocLength) {
+ gMC->Gsvolu("S05N","BOX",nulocMaterial,nulocpar,3);
+ gMC->Gsvolu("S06N","BOX",nulocMaterial,nulocpar,3);
+ index = 0;
+ Float_t xxmax2 = xxmax - 5./2.;
+ for (xx = -xxmax; xx<=xxmax; xx+=2*nulocLength) {
index++;
- gMC->Gspos("S05N",2*index-1,"S05B", xx, 0.,-BFrameWidth/4., 0, "ONLY");
- gMC->Gspos("S05N",2*index ,"S05B", xx, 0., BFrameWidth/4., 0, "ONLY");
- gMC->Gspos("S06N",2*index-1,"S06B", xx, 0.,-BFrameWidth/4., 0, "ONLY");
- gMC->Gspos("S06N",2*index ,"S06B", xx, 0., BFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S05N",2*index-1,"S05B", xx, 0.,-bFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S05N",2*index ,"S05B", xx, 0., bFrameWidth/4., 0, "ONLY");
+ if (xx > -xxmax2 && xx< xxmax2) {
+ gMC->Gspos("S05N",2*index-1,"SB5B", xx, 0.,-bFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S05N",2*index ,"SB5B", xx, 0., bFrameWidth/4., 0, "ONLY");
+ }
+ gMC->Gspos("S06N",2*index-1,"S06B", xx, 0.,-bFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S06N",2*index ,"S06B", xx, 0., bFrameWidth/4., 0, "ONLY");
}
-
- // create the gassiplex volume
- Float_t gassipar[3]={GassiLength/2., GassiHeight/2., GassiWidth/2.};
- gMC->Gsvolu("S05E","BOX",GassiMaterial,gassipar,3);
- gMC->Gsvolu("S06E","BOX",GassiMaterial,gassipar,3);
-
-
- // position 4 gassiplex in the nuloc
-
- gMC->Gspos("S05E",1,"S05N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S05E",2,"S05N", 0., - NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S05E",3,"S05N", 0., NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S05E",4,"S05N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S06E",1,"S06N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S06E",2,"S06N", 0., - NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S06E",3,"S06N", 0., NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S06E",4,"S06N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY");
-
+
+ // position the volumes approximating the circular section of the pipe
+ Float_t yoffs = sensHeight/2. - yOverlap;
+ Float_t epsilon = 0.001;
+ Int_t ndiv=6;
+ Float_t divpar[3];
+ Double_t dydiv= sensHeight/ndiv;
+ Double_t ydiv = yoffs -dydiv;
+ Int_t imax=0;
+ imax = 1;
+ Float_t rmin = 33.;
+ Float_t z1 = spar[2], z2=2*spar[2]*1.01;
+ for (Int_t idiv=0;idiv<ndiv; idiv++){
+ ydiv+= dydiv;
+ Float_t xdiv = 0.;
+ if (ydiv<rmin) xdiv= rmin * TMath::Sin( TMath::ACos(ydiv/rmin) );
+ divpar[0] = (pcbLength-xdiv)/2.;
+ divpar[1] = dydiv/2. - epsilon;
+ divpar[2] = sensWidth/2.;
+ 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,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]) {
//********************************************************************
// Station 4 **
zpos1=iChamber1->Z();
zpos2=iChamber2->Z();
dstation = zpos2 - zpos1;
- zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2;
+// zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; // not used any more
//
// Mother volume
tpar[0] = iChamber->RInner()-dframep;
tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi);
- tpar[2] = 3.252;
+ tpar[2] = dstation/4;
gMC->Gsvolu("C07M", "TUBE", idAir, tpar, 3);
gMC->Gsvolu("C08M", "TUBE", idAir, tpar, 3);
gMC->Gspos("C08M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY");
- const Int_t nSlats4 = 7; // number of slats per quadrant
- const Int_t nPCB4[nSlats4] = {7,7,6,6,5,4,2}; // n PCB per slat
-
- // slat dimensions: slat is a MOTHER volume!!! made of air
- Float_t SlatLength4[nSlats4];
+ const Int_t nSlats4 = 6; // number of slats per quadrant
+ const Int_t nPCB4[nSlats4] = {4,4,5,5,4,3}; // n PCB per slat
+ const Float_t xpos4[nSlats4] = {38.5, 40., 0., 0., 0., 0.};
+ Float_t slatLength4[nSlats4];
// create and position the slat (mother) volumes
- char VolNam7[5];
- char VolNam8[5];
+ char volNam7[5];
+ char volNam8[5];
Float_t xSlat4;
- Float_t ySlat41, ySlat42;
-
+ Float_t ySlat4;
- for (Int_t i = 0; i<nSlats4; i++){
- SlatLength4[i] = PCBLength * nPCB4[i] + 2. * dSlatLength;
- xSlat4 = SlatLength4[i]/2.;
- if (i==0) xSlat4 += 30.;
-
- ySlat41 = SensHeight * (i+0.5) - yOverlap *i - yOverlap/2.;
- ySlat42 = -SensHeight * (i+0.5) + yOverlap *i + yOverlap/2.;
-
- spar[0] = SlatLength4[i]/2.;
- spar[1] = SlatHeight/2.;
- spar[2] = SlatWidth/2.;
- // zSlat to be checked (odd downstream or upstream?)
- Float_t zSlat = (i%2 ==0)? SlatWidth/2. : -SlatWidth/2.;
- sprintf(VolNam7,"S07%d",i);
- gMC->Gsvolu(VolNam7,"BOX",SlatMaterial,spar,3);
- gMC->Gspos(VolNam7, i*4+1,"C07M", xSlat4, ySlat41, -zSlat, 0, "ONLY");
- gMC->Gspos(VolNam7, i*4+2,"C07M",-xSlat4, ySlat41, -zSlat, 0, "ONLY");
- gMC->Gspos(VolNam7, i*4+3,"C07M", xSlat4, ySlat42, zSlat, 0, "ONLY");
- gMC->Gspos(VolNam7, i*4+4,"C07M",-xSlat4, ySlat42, zSlat, 0, "ONLY");
- sprintf(VolNam8,"S08%d",i);
- gMC->Gsvolu(VolNam8,"BOX",SlatMaterial,spar,3);
- gMC->Gspos(VolNam8, i*4+1,"C08M", xSlat4, ySlat41, -zSlat, 0, "ONLY");
- gMC->Gspos(VolNam8, i*4+2,"C08M",-xSlat4, ySlat41, -zSlat, 0, "ONLY");
- gMC->Gspos(VolNam8, i*4+3,"C08M", xSlat4, ySlat42, zSlat, 0, "ONLY");
- gMC->Gspos(VolNam8, i*4+4,"C08M",-xSlat4, ySlat42, zSlat, 0, "ONLY");
+ for (i = 0; i<nSlats4; i++){
+ slatLength4[i] = pcbLength * nPCB4[i] + 2. * dSlatLength;
+ xSlat4 = slatLength4[i]/2. - vFrameLength/2. + xpos4[i];
+ if (i==1) slatLength4[i] -= 2. *dSlatLength; // frame out in PCB with circular border
+ ySlat4 = sensHeight * i - yOverlap *i;
+
+ spar[0] = slatLength4[i]/2.;
+ spar[1] = slatHeight/2.;
+ spar[2] = slatWidth/2.*1.01;
+ Float_t dzCh4=spar[2]*1.01;
+ // zSlat to be checked (odd downstream or upstream?)
+ Float_t zSlat = (i%2 ==0)? spar[2] : -spar[2];
+ sprintf(volNam7,"S07%d",i);
+ gMC->Gsvolu(volNam7,"BOX",slatMaterial,spar,3);
+ gMC->Gspos(volNam7, i*4+1,"C07M", xSlat4, ySlat4, zSlat+2.*dzCh4, 0, "ONLY");
+ gMC->Gspos(volNam7, i*4+2,"C07M",-xSlat4, ySlat4, zSlat-2.*dzCh4, 0, "ONLY");
+ if (i>0) {
+ gMC->Gspos(volNam7, i*4+3,"C07M", xSlat4,-ySlat4, zSlat+2.*dzCh4, 0, "ONLY");
+ gMC->Gspos(volNam7, i*4+4,"C07M",-xSlat4,-ySlat4, zSlat-2.*dzCh4, 0, "ONLY");
+ }
+ sprintf(volNam8,"S08%d",i);
+ gMC->Gsvolu(volNam8,"BOX",slatMaterial,spar,3);
+ gMC->Gspos(volNam8, i*4+1,"C08M", xSlat4, ySlat4, zSlat+2.*dzCh4, 0, "ONLY");
+ gMC->Gspos(volNam8, i*4+2,"C08M",-xSlat4, ySlat4, zSlat-2.*dzCh4, 0, "ONLY");
+ if (i>0) {
+ gMC->Gspos(volNam8, i*4+3,"C08M", xSlat4,-ySlat4, zSlat+2.*dzCh4, 0, "ONLY");
+ gMC->Gspos(volNam8, i*4+4,"C08M",-xSlat4,-ySlat4, zSlat-2.*dzCh4, 0, "ONLY");
+ }
}
+
- // create the sensitive volumes (subdivided as the PCBs),
+ // create the panel volume
- gMC->Gsvolu("S07G","BOX",SensMaterial,SensPar,3);
- gMC->Gsvolu("S08G","BOX",SensMaterial,SensPar,3);
+ gMC->Gsvolu("S07C","BOX",panelMaterial,panelpar,3);
+ gMC->Gsvolu("S08C","BOX",panelMaterial,panelpar,3);
- // create the PCB volume
+ // create the rohacell volume
- gMC->Gsvolu("S07P","BOX",PCBMaterial,PCBpar,3);
- gMC->Gsvolu("S08P","BOX",PCBMaterial,PCBpar,3);
-
- // create the insulating material volume
+ gMC->Gsvolu("S07R","BOX",rohaMaterial,rohapar,3);
+ gMC->Gsvolu("S08R","BOX",rohaMaterial,rohapar,3);
- gMC->Gsvolu("S07I","BOX",InsuMaterial,Insupar,3);
- gMC->Gsvolu("S08I","BOX",InsuMaterial,Insupar,3);
+ // create the insulating material volume
- // create the panel volume
+ gMC->Gsvolu("S07I","BOX",insuMaterial,insupar,3);
+ gMC->Gsvolu("S08I","BOX",insuMaterial,insupar,3);
- gMC->Gsvolu("S07C","BOX",PanelMaterial,Panelpar,3);
- gMC->Gsvolu("S08C","BOX",PanelMaterial,Panelpar,3);
+ // create the PCB volume
- // create the rohacell volume
+ gMC->Gsvolu("S07P","BOX",pcbMaterial,pcbpar,3);
+ gMC->Gsvolu("S08P","BOX",pcbMaterial,pcbpar,3);
- gMC->Gsvolu("S07R","BOX",RohaMaterial,Rohapar,3);
- gMC->Gsvolu("S08R","BOX",RohaMaterial,Rohapar,3);
+ // create the sensitive volumes,
+
+ gMC->Gsvolu("S07G","BOX",sensMaterial,0,0);
+ gMC->Gsvolu("S08G","BOX",sensMaterial,0,0);
// create the vertical frame volume
- gMC->Gsvolu("S07V","BOX",VFrameMaterial,VFramepar,3);
- gMC->Gsvolu("S08V","BOX",VFrameMaterial,VFramepar,3);
+ gMC->Gsvolu("S07V","BOX",vFrameMaterial,vFramepar,3);
+ gMC->Gsvolu("S08V","BOX",vFrameMaterial,vFramepar,3);
// create the horizontal frame volume
- gMC->Gsvolu("S07H","BOX",HFrameMaterial,HFramepar,3);
- gMC->Gsvolu("S08H","BOX",HFrameMaterial,HFramepar,3);
+ gMC->Gsvolu("S07H","BOX",hFrameMaterial,hFramepar,3);
+ gMC->Gsvolu("S08H","BOX",hFrameMaterial,hFramepar,3);
// create the horizontal border volume
- gMC->Gsvolu("S07B","BOX",BFrameMaterial,BFramepar,3);
- gMC->Gsvolu("S08B","BOX",BFrameMaterial,BFramepar,3);
-
- for (Int_t i = 0; i<nSlats4; i++){
- sprintf(VolNam7,"S07%d",i);
- sprintf(VolNam8,"S08%d",i);
- Float_t xvframe = (SlatLength4[i] - VFrameLength)/2.;
- gMC->Gspos("S07V",2*i-1,VolNam7, xvframe, 0., 0. , 0, "ONLY");
- gMC->Gspos("S07V",2*i ,VolNam7,-xvframe, 0., 0. , 0, "ONLY");
- gMC->Gspos("S08V",2*i-1,VolNam8, xvframe, 0., 0. , 0, "ONLY");
- gMC->Gspos("S08V",2*i ,VolNam8,-xvframe, 0., 0. , 0, "ONLY");
- for (Int_t j=0; j<nPCB4[i]; j++){
+ gMC->Gsvolu("S07B","BOX",bFrameMaterial,bFramepar,3);
+ gMC->Gsvolu("S08B","BOX",bFrameMaterial,bFramepar,3);
+
+ index=0;
+ for (i = 0; i<nSlats4; i++){
+ sprintf(volNam7,"S07%d",i);
+ sprintf(volNam8,"S08%d",i);
+ Float_t xvFrame = (slatLength4[i] - vFrameLength)/2.;
+ // position the vertical frames
+ if (i!=1 && i!=0) {
+ gMC->Gspos("S07V",2*i-1,volNam7, xvFrame, 0., 0. , 0, "ONLY");
+ gMC->Gspos("S07V",2*i ,volNam7,-xvFrame, 0., 0. , 0, "ONLY");
+ gMC->Gspos("S08V",2*i-1,volNam8, xvFrame, 0., 0. , 0, "ONLY");
+ gMC->Gspos("S08V",2*i ,volNam8,-xvFrame, 0., 0. , 0, "ONLY");
+ }
+ // position the panels and the insulating material
+ for (j=0; j<nPCB4[i]; j++){
index++;
- Float_t xx = SensLength * (-nPCB4[i]/2.+j+.5);
- Float_t yy = 0.;
- Float_t zSens = 0.;
- gMC->Gspos("S07G",index,VolNam7, xx, yy, zSens , 0, "ONLY");
- gMC->Gspos("S08G",index,VolNam8, xx, yy, zSens , 0, "ONLY");
- Float_t zPCB = (SensWidth+PCBWidth)/2.;
- gMC->Gspos("S07P",2*index-1,VolNam7, xx, yy, zPCB , 0, "ONLY");
- gMC->Gspos("S07P",2*index ,VolNam7, xx, yy,-zPCB , 0, "ONLY");
- gMC->Gspos("S08P",2*index-1,VolNam8, xx, yy, zPCB , 0, "ONLY");
- gMC->Gspos("S08P",2*index ,VolNam8, xx, yy,-zPCB , 0, "ONLY");
- Float_t zInsu = (InsuWidth+PCBWidth)/2. + zPCB;
- gMC->Gspos("S07I",2*index-1,VolNam7, xx, yy, zInsu , 0, "ONLY");
- gMC->Gspos("S07I",2*index ,VolNam7, xx, yy,-zInsu , 0, "ONLY");
- gMC->Gspos("S08I",2*index-1,VolNam8, xx, yy, zInsu , 0, "ONLY");
- gMC->Gspos("S08I",2*index ,VolNam8, xx, yy,-zInsu , 0, "ONLY");
- Float_t zPanel1 = (InsuWidth+PanelWidth)/2. + zInsu;
- gMC->Gspos("S07C",4*index-3,VolNam7, xx, yy, zPanel1 , 0, "ONLY");
- gMC->Gspos("S07C",4*index-2,VolNam7, xx, yy,-zPanel1 , 0, "ONLY");
- gMC->Gspos("S08C",4*index-3,VolNam8, xx, yy, zPanel1 , 0, "ONLY");
- gMC->Gspos("S08C",4*index-2,VolNam8, xx, yy,-zPanel1 , 0, "ONLY");
- Float_t zRoha = (RohaWidth+PanelWidth)/2. + zPanel1;
- gMC->Gspos("S07R",2*index-1,VolNam7, xx, yy, zRoha , 0, "ONLY");
- gMC->Gspos("S07R",2*index ,VolNam7, xx, yy,-zRoha , 0, "ONLY");
- gMC->Gspos("S08R",2*index-1,VolNam8, xx, yy, zRoha , 0, "ONLY");
- gMC->Gspos("S08R",2*index ,VolNam8, xx, yy,-zRoha , 0, "ONLY");
- Float_t zPanel2 = (RohaWidth+PanelWidth)/2. + zRoha;
- gMC->Gspos("S07C",4*index-1,VolNam7, xx, yy, zPanel2 , 0, "ONLY");
- gMC->Gspos("S07C",4*index ,VolNam7, xx, yy,-zPanel2 , 0, "ONLY");
- gMC->Gspos("S08C",4*index-1,VolNam8, xx, yy, zPanel2 , 0, "ONLY");
- gMC->Gspos("S08C",4*index ,VolNam8, xx, yy,-zPanel2 , 0, "ONLY");
- Float_t yframe = (SensHeight + HFrameHeight)/2.;
- gMC->Gspos("S07H",2*index-1,VolNam7, xx, yframe, 0. , 0, "ONLY");
- gMC->Gspos("S07H",2*index ,VolNam7, xx,-yframe, 0. , 0, "ONLY");
- gMC->Gspos("S08H",2*index-1,VolNam8, xx, yframe, 0. , 0, "ONLY");
- gMC->Gspos("S08H",2*index ,VolNam8, xx,-yframe, 0. , 0, "ONLY");
- Float_t yborder = (BFrameHeight + HFrameHeight)/2. + yframe;
- gMC->Gspos("S07B",2*index-1,VolNam7, xx, yborder, 0. , 0, "ONLY");
- gMC->Gspos("S07B",2*index ,VolNam7, xx,-yborder, 0. , 0, "ONLY");
- gMC->Gspos("S08B",2*index-1,VolNam8, xx, yborder, 0. , 0, "ONLY");
- gMC->Gspos("S08B",2*index ,VolNam8, xx,-yborder, 0. , 0, "ONLY");
+ Float_t xx = sensLength * (-nPCB4[i]/2.+j+.5);
+
+ Float_t zPanel = spar[2] - panelpar[2];
+ gMC->Gspos("S07C",2*index-1,volNam7, xx, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("S07C",2*index ,volNam7, xx, 0.,-zPanel , 0, "ONLY");
+ gMC->Gspos("S08C",2*index-1,volNam8, xx, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("S08C",2*index ,volNam8, xx, 0.,-zPanel , 0, "ONLY");
+
+ gMC->Gspos("S07I",index,volNam7, xx, 0., 0 , 0, "ONLY");
+ gMC->Gspos("S08I",index,volNam8, xx, 0., 0 , 0, "ONLY");
}
}
- // create the NULOC volume and position it in the horizontal frame
-
- gMC->Gsvolu("S07N","BOX",NulocMaterial,nulocpar,3);
- gMC->Gsvolu("S08N","BOX",NulocMaterial,nulocpar,3);
+ // position the rohacell volume inside the panel volume
+ gMC->Gspos("S07R",1,"S07C",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("S08R",1,"S08C",0.,0.,0.,0,"ONLY");
+
+ // position the PCB volume inside the insulating material volume
+ gMC->Gspos("S07P",1,"S07I",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("S08P",1,"S08I",0.,0.,0.,0,"ONLY");
+ // position the horizontal frame volume inside the PCB volume
+ gMC->Gspos("S07H",1,"S07P",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("S08H",1,"S08P",0.,0.,0.,0,"ONLY");
+ // position the sensitive volume inside the horizontal frame volume
+ gMC->Gsposp("S07G",1,"S07H",0.,0.,0.,0,"ONLY",senspar,3);
+ gMC->Gsposp("S08G",1,"S08H",0.,0.,0.,0,"ONLY",senspar,3);
+ // position the border volumes inside the PCB volume
+ Float_t yborder = ( pcbHeight - bFrameHeight ) / 2.;
+ gMC->Gspos("S07B",1,"S07P",0., yborder,0.,0,"ONLY");
+ gMC->Gspos("S07B",2,"S07P",0.,-yborder,0.,0,"ONLY");
+ gMC->Gspos("S08B",1,"S08P",0., yborder,0.,0,"ONLY");
+ gMC->Gspos("S08B",2,"S08P",0.,-yborder,0.,0,"ONLY");
+ // create the NULOC volume and position it in the horizontal frame
- index = 0;
- for (Float_t xx = -xxmax; xx<=xxmax; xx+=3*NulocLength) {
+ gMC->Gsvolu("S07N","BOX",nulocMaterial,nulocpar,3);
+ gMC->Gsvolu("S08N","BOX",nulocMaterial,nulocpar,3);
+ index = 0;
+ for (xx = -xxmax; xx<=xxmax; xx+=2*nulocLength) {
index++;
- gMC->Gspos("S07N",2*index-1,"S07B", xx, 0.,-BFrameWidth/4., 0, "ONLY");
- gMC->Gspos("S07N",2*index ,"S07B", xx, 0., BFrameWidth/4., 0, "ONLY");
- gMC->Gspos("S08N",2*index-1,"S08B", xx, 0.,-BFrameWidth/4., 0, "ONLY");
- gMC->Gspos("S08N",2*index ,"S08B", xx, 0., BFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S07N",2*index-1,"S07B", xx, 0.,-bFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S07N",2*index ,"S07B", xx, 0., bFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S08N",2*index-1,"S08B", xx, 0.,-bFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S08N",2*index ,"S08B", xx, 0., bFrameWidth/4., 0, "ONLY");
}
- // create the gassiplex volume
+ // position the volumes approximating the circular section of the pipe
+ Float_t yoffs = sensHeight/2. - yOverlap;
+ Float_t epsilon = 0.001;
+ Int_t ndiv=6;
+ Float_t divpar[3];
+ Double_t dydiv= sensHeight/ndiv;
+ Double_t ydiv = yoffs -dydiv;
+ Int_t imax=0;
+ imax = 1;
+ Float_t rmin = 40.;
+ Float_t z1 = -spar[2], z2=2*spar[2]*1.01;
+ for (Int_t idiv=0;idiv<ndiv; idiv++){
+ ydiv+= dydiv;
+ Float_t xdiv = 0.;
+ if (ydiv<rmin) xdiv= rmin * TMath::Sin( TMath::ACos(ydiv/rmin) );
+ divpar[0] = (pcbLength-xdiv)/2.;
+ divpar[1] = dydiv/2. - epsilon;
+ divpar[2] = sensWidth/2.;
+ Float_t xvol=(pcbLength+xdiv)/2.+1.999;
+ Float_t yvol=ydiv + dydiv/2.;
+ gMC->Gsposp("S07G",imax+4*idiv+1,"C07M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S08G",imax+4*idiv+1,"C08M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S07G",imax+4*idiv+2,"C07M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S08G",imax+4*idiv+2,"C08M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S07G",imax+4*idiv+3,"C07M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S08G",imax+4*idiv+3,"C08M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S07G",imax+4*idiv+4,"C07M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S08G",imax+4*idiv+4,"C08M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3);
+ }
- gMC->Gsvolu("S07E","BOX",GassiMaterial,gassipar,3);
- gMC->Gsvolu("S08E","BOX",GassiMaterial,gassipar,3);
- // position 4 gassiplex in the nuloc
- gMC->Gspos("S07E",1,"S07N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S07E",2,"S07N", 0., - NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S07E",3,"S07N", 0., NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S07E",4,"S07N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S08E",1,"S08N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S08E",2,"S08N", 0., - NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S08E",3,"S08N", 0., NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S08E",4,"S08N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY");
+ }
+ if (stations[4]) {
+
//********************************************************************
// Station 5 **
zpos1=iChamber1->Z();
zpos2=iChamber2->Z();
dstation = zpos2 - zpos1;
- zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2;
+// zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; // not used any more
//
// Mother volume
tpar[0] = iChamber->RInner()-dframep;
tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi);
- tpar[2] = dstation/4;
+ tpar[2] = dstation/5.;
gMC->Gsvolu("C09M", "TUBE", idAir, tpar, 3);
gMC->Gsvolu("C10M", "TUBE", idAir, tpar, 3);
const Int_t nSlats5 = 7; // number of slats per quadrant
- const Int_t nPCB5[nSlats5] = {6,6,6,5,5,4,3}; // n PCB per slat
-
- // slat dimensions: slat is a MOTHER volume!!! made of air
- Float_t SlatLength5[nSlats5];
-//const Float_t SlatHeight = PCBHeight;
-// const Float_t SlatWidth = SensWidth + 2.*(PCBWidth + InsuWidth +
-// 2.* PanelWidth + RohaWidth);
-// const Int_t SlatMaterial = idAir;
-// const Float_t dSlatLength = VFrameLength; // border on left and right
-
- // create and position the slat (mother) volumes
-// Float_t spar[3];
- char VolNam9[5];
- char VolNam10[5];
- Float_t xSlat5[nSlats5];
- Float_t ySlat5[nSlats5];
-
- for (Int_t i = 0; i<nSlats5; i++){
- SlatLength5[i] = PCBLength * nPCB5[i] + 2. * dSlatLength;
- xSlat5[i] = SlatLength5[i]/2.;
- ySlat5[i] = SensHeight * (i+0.5) - yOverlap * i;
- spar[0] = SlatLength5[i]/2.;
- spar[1] = SlatHeight/2.;
- spar[2] = SlatWidth/2.;
+ const Int_t nPCB5[nSlats5] = {5,5,6,6,5,4,3}; // n PCB per slat
+ const Float_t xpos5[nSlats5] = {38.5, 40., 0., 0., 0., 0., 0.};
+ Float_t slatLength5[nSlats5];
+ char volNam9[5];
+ char volNam10[5];
+ Float_t xSlat5;
+ Float_t ySlat5;
+
+ for (i = 0; i<nSlats5; i++){
+ slatLength5[i] = pcbLength * nPCB5[i] + 2. * dSlatLength;
+ xSlat5 = slatLength5[i]/2. - vFrameLength/2. +xpos5[i];
+ if (i==1 || i==0) slatLength5[i] -= 2. *dSlatLength; // frame out in PCB with circular border
+ ySlat5 = sensHeight * i - yOverlap * i;
+ spar[0] = slatLength5[i]/2.;
+ spar[1] = slatHeight/2.;
+ spar[2] = slatWidth/2. * 1.01;
+ Float_t dzCh5=spar[2]*1.01;
// zSlat to be checked (odd downstream or upstream?)
- Float_t zSlat = (i%2 ==0)? -SlatWidth/2. : SlatWidth/2.;
- sprintf(VolNam9,"S09%d",i);
- gMC->Gsvolu(VolNam9,"BOX",SlatMaterial,spar,3);
- gMC->Gspos(VolNam9, i*4+1,"C09M", xSlat5[i], ySlat5[i], zSlat, 0, "ONLY");
- gMC->Gspos(VolNam9, i*4+2,"C09M",-xSlat5[i], ySlat5[i], zSlat, 0, "ONLY");
- gMC->Gspos(VolNam9, i*4+3,"C09M", xSlat5[i],-ySlat5[i],-zSlat, 0, "ONLY");
- gMC->Gspos(VolNam9, i*4+4,"C09M",-xSlat5[i],-ySlat5[i],-zSlat, 0, "ONLY");
- sprintf(VolNam10,"S10%d",i);
- gMC->Gsvolu(VolNam10,"BOX",SlatMaterial,spar,3);
- gMC->Gspos(VolNam10, i*4+1,"C10M", xSlat5[i], ySlat5[i], zSlat, 0, "ONLY");
- gMC->Gspos(VolNam10, i*4+2,"C10M",-xSlat5[i], ySlat5[i], zSlat, 0, "ONLY");
- gMC->Gspos(VolNam10, i*4+3,"C10M", xSlat5[i],-ySlat5[i],-zSlat, 0, "ONLY");
- gMC->Gspos(VolNam10, i*4+4,"C10M",-xSlat5[i],-ySlat5[i],-zSlat, 0, "ONLY");
+ Float_t zSlat = (i%2 ==0)? -spar[2] : spar[2];
+ sprintf(volNam9,"S09%d",i);
+ gMC->Gsvolu(volNam9,"BOX",slatMaterial,spar,3);
+ gMC->Gspos(volNam9, i*4+1,"C09M", xSlat5, ySlat5, zSlat+2.*dzCh5, 0, "ONLY");
+ gMC->Gspos(volNam9, i*4+2,"C09M",-xSlat5, ySlat5, zSlat-2.*dzCh5, 0, "ONLY");
+ if (i>0) {
+ gMC->Gspos(volNam9, i*4+3,"C09M", xSlat5,-ySlat5, zSlat+2.*dzCh5, 0, "ONLY");
+ gMC->Gspos(volNam9, i*4+4,"C09M",-xSlat5,-ySlat5, zSlat-2.*dzCh5, 0, "ONLY");
+ }
+ sprintf(volNam10,"S10%d",i);
+ gMC->Gsvolu(volNam10,"BOX",slatMaterial,spar,3);
+ gMC->Gspos(volNam10, i*4+1,"C10M", xSlat5, ySlat5, zSlat+2.*dzCh5, 0, "ONLY");
+ gMC->Gspos(volNam10, i*4+2,"C10M",-xSlat5, ySlat5, zSlat-2.*dzCh5, 0, "ONLY");
+ if (i>0) {
+ gMC->Gspos(volNam10, i*4+3,"C10M", xSlat5,-ySlat5, zSlat+2.*dzCh5, 0, "ONLY");
+ gMC->Gspos(volNam10, i*4+4,"C10M",-xSlat5,-ySlat5, zSlat-2.*dzCh5, 0, "ONLY");
+ }
}
- // create the sensitive volumes (subdivided as the PCBs),
-
- gMC->Gsvolu("S09G","BOX",SensMaterial,SensPar,3);
- gMC->Gsvolu("S10G","BOX",SensMaterial,SensPar,3);
-
- // create the PCB volume
-
- gMC->Gsvolu("S09P","BOX",PCBMaterial,PCBpar,3);
- gMC->Gsvolu("S10P","BOX",PCBMaterial,PCBpar,3);
+ // create the panel volume
+ gMC->Gsvolu("S09C","BOX",panelMaterial,panelpar,3);
+ gMC->Gsvolu("S10C","BOX",panelMaterial,panelpar,3);
+
+ // create the rohacell volume
+
+ gMC->Gsvolu("S09R","BOX",rohaMaterial,rohapar,3);
+ gMC->Gsvolu("S10R","BOX",rohaMaterial,rohapar,3);
+
// create the insulating material volume
-
- gMC->Gsvolu("S09I","BOX",InsuMaterial,Insupar,3);
- gMC->Gsvolu("S10I","BOX",InsuMaterial,Insupar,3);
- // create the panel volume
-
- gMC->Gsvolu("S09C","BOX",PanelMaterial,Panelpar,3);
- gMC->Gsvolu("S10C","BOX",PanelMaterial,Panelpar,3);
+ gMC->Gsvolu("S09I","BOX",insuMaterial,insupar,3);
+ gMC->Gsvolu("S10I","BOX",insuMaterial,insupar,3);
- // create the rohacell volume
-
- gMC->Gsvolu("S09R","BOX",RohaMaterial,Rohapar,3);
- gMC->Gsvolu("S10R","BOX",RohaMaterial,Rohapar,3);
+ // create the PCB volume
+
+ gMC->Gsvolu("S09P","BOX",pcbMaterial,pcbpar,3);
+ gMC->Gsvolu("S10P","BOX",pcbMaterial,pcbpar,3);
+
+ // create the sensitive volumes,
+
+ gMC->Gsvolu("S09G","BOX",sensMaterial,0,0);
+ gMC->Gsvolu("S10G","BOX",sensMaterial,0,0);
// create the vertical frame volume
-
- gMC->Gsvolu("S09V","BOX",VFrameMaterial,VFramepar,3);
- gMC->Gsvolu("S10V","BOX",VFrameMaterial,VFramepar,3);
+
+ gMC->Gsvolu("S09V","BOX",vFrameMaterial,vFramepar,3);
+ gMC->Gsvolu("S10V","BOX",vFrameMaterial,vFramepar,3);
// create the horizontal frame volume
-
- gMC->Gsvolu("S09H","BOX",HFrameMaterial,HFramepar,3);
- gMC->Gsvolu("S10H","BOX",HFrameMaterial,HFramepar,3);
- // create the horizontal border volume
+ gMC->Gsvolu("S09H","BOX",hFrameMaterial,hFramepar,3);
+ gMC->Gsvolu("S10H","BOX",hFrameMaterial,hFramepar,3);
- gMC->Gsvolu("S09B","BOX",BFrameMaterial,BFramepar,3);
- gMC->Gsvolu("S10B","BOX",BFrameMaterial,BFramepar,3);
+ // create the horizontal border volume
-
- for (Int_t i = 0; i<nSlats5; i++){
- sprintf(VolNam9,"S09%d",i);
- sprintf(VolNam10,"S10%d",i);
- Float_t xvframe = (SlatLength5[i] - VFrameLength)/2.;
- gMC->Gspos("S09V",2*i-1,VolNam9, xvframe, 0., 0. , 0, "ONLY");
- gMC->Gspos("S09V",2*i ,VolNam9,-xvframe, 0., 0. , 0, "ONLY");
- gMC->Gspos("S10V",2*i-1,VolNam10, xvframe, 0., 0. , 0, "ONLY");
- gMC->Gspos("S10V",2*i ,VolNam10,-xvframe, 0., 0. , 0, "ONLY");
- for (Int_t j=0; j<nPCB5[i]; j++){
+ gMC->Gsvolu("S09B","BOX",bFrameMaterial,bFramepar,3);
+ gMC->Gsvolu("S10B","BOX",bFrameMaterial,bFramepar,3);
+
+ index=0;
+ for (i = 0; i<nSlats5; i++){
+ sprintf(volNam9,"S09%d",i);
+ sprintf(volNam10,"S10%d",i);
+ Float_t xvFrame = (slatLength5[i] - vFrameLength)/2.;
+ // position the vertical frames
+ if (i!=1 && i!=0) {
+ gMC->Gspos("S09V",2*i-1,volNam9, xvFrame, 0., 0. , 0, "ONLY");
+ gMC->Gspos("S09V",2*i ,volNam9,-xvFrame, 0., 0. , 0, "ONLY");
+ gMC->Gspos("S10V",2*i-1,volNam10, xvFrame, 0., 0. , 0, "ONLY");
+ gMC->Gspos("S10V",2*i ,volNam10,-xvFrame, 0., 0. , 0, "ONLY");
+ }
+
+ // position the panels and the insulating material
+ for (j=0; j<nPCB5[i]; j++){
index++;
- Float_t xx = SensLength * (-nPCB5[i]/2.+j+.5);
- Float_t yy = 0.;
- Float_t zSens = 0.;
- gMC->Gspos("S09G",index,VolNam9, xx, yy, zSens , 0, "ONLY");
- gMC->Gspos("S10G",index,VolNam10, xx, yy, zSens , 0, "ONLY");
- Float_t zPCB = (SensWidth+PCBWidth)/2.;
- gMC->Gspos("S09P",2*index-1,VolNam9, xx, yy, zPCB , 0, "ONLY");
- gMC->Gspos("S09P",2*index ,VolNam9, xx, yy,-zPCB , 0, "ONLY");
- gMC->Gspos("S10P",2*index-1,VolNam10, xx, yy, zPCB , 0, "ONLY");
- gMC->Gspos("S10P",2*index ,VolNam10, xx, yy,-zPCB , 0, "ONLY");
- Float_t zInsu = (InsuWidth+PCBWidth)/2. + zPCB;
- gMC->Gspos("S09I",2*index-1,VolNam9, xx, yy, zInsu , 0, "ONLY");
- gMC->Gspos("S09I",2*index ,VolNam9, xx, yy,-zInsu , 0, "ONLY");
- gMC->Gspos("S10I",2*index-1,VolNam10, xx, yy, zInsu , 0, "ONLY");
- gMC->Gspos("S10I",2*index ,VolNam10, xx, yy,-zInsu , 0, "ONLY");
- Float_t zPanel1 = (InsuWidth+PanelWidth)/2. + zInsu;
- gMC->Gspos("S09C",4*index-3,VolNam9, xx, yy, zPanel1 , 0, "ONLY");
- gMC->Gspos("S09C",4*index-2,VolNam9, xx, yy,-zPanel1 , 0, "ONLY");
- gMC->Gspos("S10C",4*index-3,VolNam10, xx, yy, zPanel1 , 0, "ONLY");
- gMC->Gspos("S10C",4*index-2,VolNam10, xx, yy,-zPanel1 , 0, "ONLY");
- Float_t zRoha = (RohaWidth+PanelWidth)/2. + zPanel1;
- gMC->Gspos("S09R",2*index-1,VolNam9, xx, yy, zRoha , 0, "ONLY");
- gMC->Gspos("S09R",2*index ,VolNam9, xx, yy,-zRoha , 0, "ONLY");
- gMC->Gspos("S10R",2*index-1,VolNam10, xx, yy, zRoha , 0, "ONLY");
- gMC->Gspos("S10R",2*index ,VolNam10, xx, yy,-zRoha , 0, "ONLY");
- Float_t zPanel2 = (RohaWidth+PanelWidth)/2. + zRoha;
- gMC->Gspos("S09C",4*index-1,VolNam9, xx, yy, zPanel2 , 0, "ONLY");
- gMC->Gspos("S09C",4*index ,VolNam9, xx, yy,-zPanel2 , 0, "ONLY");
- gMC->Gspos("S10C",4*index-1,VolNam10, xx, yy, zPanel2 , 0, "ONLY");
- gMC->Gspos("S10C",4*index ,VolNam10, xx, yy,-zPanel2 , 0, "ONLY");
- Float_t yframe = (SensHeight + HFrameHeight)/2.;
- gMC->Gspos("S09H",2*index-1,VolNam9, xx, yframe, 0. , 0, "ONLY");
- gMC->Gspos("S09H",2*index ,VolNam9, xx,-yframe, 0. , 0, "ONLY");
- gMC->Gspos("S10H",2*index-1,VolNam10, xx, yframe, 0. , 0, "ONLY");
- gMC->Gspos("S10H",2*index ,VolNam10, xx,-yframe, 0. , 0, "ONLY");
- Float_t yborder = (BFrameHeight + HFrameHeight)/2. + yframe;
- gMC->Gspos("S09B",2*index-1,VolNam9, xx, yborder, 0. , 0, "ONLY");
- gMC->Gspos("S09B",2*index ,VolNam9, xx,-yborder, 0. , 0, "ONLY");
- gMC->Gspos("S10B",2*index-1,VolNam10, xx, yborder, 0. , 0, "ONLY");
- gMC->Gspos("S10B",2*index ,VolNam10, xx,-yborder, 0. , 0, "ONLY");
+ Float_t xx = sensLength * (-nPCB5[i]/2.+j+.5);
+
+ Float_t zPanel = spar[2] - panelpar[2];
+ gMC->Gspos("S09C",2*index-1,volNam9, xx, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("S09C",2*index ,volNam9, xx, 0.,-zPanel , 0, "ONLY");
+ gMC->Gspos("S10C",2*index-1,volNam10, xx, 0., zPanel , 0, "ONLY");
+ gMC->Gspos("S10C",2*index ,volNam10, xx, 0.,-zPanel , 0, "ONLY");
+
+ gMC->Gspos("S09I",index,volNam9, xx, 0., 0 , 0, "ONLY");
+ gMC->Gspos("S10I",index,volNam10, xx, 0., 0 , 0, "ONLY");
}
}
+ // position the rohacell volume inside the panel volume
+ gMC->Gspos("S09R",1,"S09C",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("S10R",1,"S10C",0.,0.,0.,0,"ONLY");
+
+ // position the PCB volume inside the insulating material volume
+ gMC->Gspos("S09P",1,"S09I",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("S10P",1,"S10I",0.,0.,0.,0,"ONLY");
+ // position the horizontal frame volume inside the PCB volume
+ gMC->Gspos("S09H",1,"S09P",0.,0.,0.,0,"ONLY");
+ gMC->Gspos("S10H",1,"S10P",0.,0.,0.,0,"ONLY");
+ // position the sensitive volume inside the horizontal frame volume
+ gMC->Gsposp("S09G",1,"S09H",0.,0.,0.,0,"ONLY",senspar,3);
+ gMC->Gsposp("S10G",1,"S10H",0.,0.,0.,0,"ONLY",senspar,3);
+ // position the border volumes inside the PCB volume
+ Float_t yborder = ( pcbHeight - bFrameHeight ) / 2.;
+ gMC->Gspos("S09B",1,"S09P",0., yborder,0.,0,"ONLY");
+ gMC->Gspos("S09B",2,"S09P",0.,-yborder,0.,0,"ONLY");
+ gMC->Gspos("S10B",1,"S10P",0., yborder,0.,0,"ONLY");
+ gMC->Gspos("S10B",2,"S10P",0.,-yborder,0.,0,"ONLY");
+
// create the NULOC volume and position it in the horizontal frame
-
- gMC->Gsvolu("S09N","BOX",NulocMaterial,nulocpar,3);
- gMC->Gsvolu("S10N","BOX",NulocMaterial,nulocpar,3);
-
- index = 0;
- for (Float_t xx = -xxmax; xx<=xxmax; xx+=3*NulocLength) {
+
+ gMC->Gsvolu("S09N","BOX",nulocMaterial,nulocpar,3);
+ gMC->Gsvolu("S10N","BOX",nulocMaterial,nulocpar,3);
+ index = 0;
+ for (xx = -xxmax; xx<=xxmax; xx+=2*nulocLength) {
index++;
- gMC->Gspos("S09N",2*index-1,"S09B", xx, 0.,-BFrameWidth/4., 0, "ONLY");
- gMC->Gspos("S09N",2*index ,"S09B", xx, 0., BFrameWidth/4., 0, "ONLY");
- gMC->Gspos("S10N",2*index-1,"S10B", xx, 0.,-BFrameWidth/4., 0, "ONLY");
- gMC->Gspos("S10N",2*index ,"S10B", xx, 0., BFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S09N",2*index-1,"S09B", xx, 0.,-bFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S09N",2*index ,"S09B", xx, 0., bFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S10N",2*index-1,"S10B", xx, 0.,-bFrameWidth/4., 0, "ONLY");
+ gMC->Gspos("S10N",2*index ,"S10B", xx, 0., bFrameWidth/4., 0, "ONLY");
+ }
+ // position the volumes approximating the circular section of the pipe
+ Float_t yoffs = sensHeight/2. - yOverlap;
+ Float_t epsilon = 0.001;
+ Int_t ndiv=6;
+ Float_t divpar[3];
+ Double_t dydiv= sensHeight/ndiv;
+ Double_t ydiv = yoffs -dydiv;
+ Int_t imax=0;
+ // for (Int_t islat=0; islat<nSlats3; islat++) imax += nPCB3[islat];
+ imax = 1;
+ Float_t rmin = 40.;
+ Float_t z1 = spar[2], z2=2*spar[2]*1.01;
+ for (Int_t idiv=0;idiv<ndiv; idiv++){
+ ydiv+= dydiv;
+ Float_t xdiv = 0.;
+ if (ydiv<rmin) xdiv= rmin * TMath::Sin( TMath::ACos(ydiv/rmin) );
+ divpar[0] = (pcbLength-xdiv)/2.;
+ divpar[1] = dydiv/2. - epsilon;
+ divpar[2] = sensWidth/2.;
+ Float_t xvol=(pcbLength+xdiv)/2. + 1.999;
+ Float_t yvol=ydiv + dydiv/2.;
+ gMC->Gsposp("S09G",imax+4*idiv+1,"C09M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S10G",imax+4*idiv+1,"C10M", xvol, yvol, z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S09G",imax+4*idiv+2,"C09M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S10G",imax+4*idiv+2,"C10M", xvol,-yvol, z1+z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S09G",imax+4*idiv+3,"C09M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S10G",imax+4*idiv+3,"C10M",-xvol, yvol, z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S09G",imax+4*idiv+4,"C09M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3);
+ gMC->Gsposp("S10G",imax+4*idiv+4,"C10M",-xvol,-yvol, z1-z2, 0, "ONLY",divpar,3);
}
- // create the gassiplex volume
-
- gMC->Gsvolu("S09E","BOX",GassiMaterial,gassipar,3);
- gMC->Gsvolu("S10E","BOX",GassiMaterial,gassipar,3);
-
-
- // position 4 gassiplex in the nuloc
-
- gMC->Gspos("S09E",1,"S09N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S09E",2,"S09N", 0., - NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S09E",3,"S09N", 0., NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S09E",4,"S09N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S10E",1,"S10N", 0., -3 * NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S10E",2,"S10N", 0., - NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S10E",3,"S10N", 0., NulocHeight/8., 0. , 0, "ONLY");
- gMC->Gspos("S10E",4,"S10N", 0., 3 * NulocHeight/8., 0. , 0, "ONLY");
-
+ }
+
///////////////////////////////////////
// GEOMETRY FOR THE TRIGGER CHAMBERS //
// Parameters of the Trigger Chambers
-
+// DP03-01 introduce dead zone of +/- 2 cm arround x=0 (as in TDR, fig3.27)
+ const Float_t kDXZERO=2.;
const Float_t kXMC1MIN=34.;
const Float_t kXMC1MED=51.;
const Float_t kXMC1MAX=272.;
const Float_t kYMC1MIN=34.;
const Float_t kYMC1MAX=51.;
const Float_t kRMIN1=50.;
- const Float_t kRMAX1=62.;
+// DP03-01 const Float_t kRMAX1=62.;
+ const Float_t kRMAX1=64.;
const Float_t kRMIN2=50.;
- const Float_t kRMAX2=66.;
+// DP03-01 const Float_t kRMAX2=66.;
+ const Float_t kRMAX2=68.;
// zposition of the middle of the gas gap in mother vol
const Float_t kZMCm=-3.6;
tpar[0] = -1.;
tpar[1] = -1.;
- const Float_t kXMC1A=kXMC1MED+(kXMC1MAX-kXMC1MED)/2.;
+// DP03-01 const Float_t kXMC1A=kXMC1MED+(kXMC1MAX-kXMC1MED)/2.;
+ const Float_t kXMC1A=kDXZERO+kXMC1MED+(kXMC1MAX-kXMC1MED)/2.;
const Float_t kYMC1Am=0.;
const Float_t kYMC1Ap=0.;
tpar[0] = (kXMC1MAX-kXMC1MIN)/2.;
tpar[1] = (kYMC1MAX-kYMC1MIN)/2.;
- const Float_t kXMC1B=kXMC1MIN+tpar[0];
+// DP03-01 const Float_t kXMC1B=kXMC1MIN+tpar[0];
+ const Float_t kXMC1B=kDXZERO+kXMC1MIN+tpar[0];
const Float_t kYMC1Bp=(y1msave+tpar1save)*zpm+tpar[1];
const Float_t kYMC1Bm=(y1psave+tpar1save)*zmp+tpar[1];
tpar[0] = kXMC1MAX/2;
tpar[1] = kYMC1MAX/2;
- const Float_t kXMC1C=tpar[0];
+
+// DP03-01 const Float_t kXMC1C=tpar[0];
+ const Float_t kXMC1C=kDXZERO+tpar[0];
// warning : same Z than type B
const Float_t kYMC1Cp=(y1psave+tpar1save)*1.+tpar[1];
const Float_t kYMC1Cm=(y1msave+tpar1save)*1.+tpar[1];
tpar[0] = kXMC1MAX/2.;
tpar[1] = kYMC1MIN;
- const Float_t kXMC1D=tpar[0];
+// DP03-01 const Float_t kXMC1D=tpar[0];
+ const Float_t kXMC1D=kDXZERO+tpar[0];
const Float_t kYMC1Dp=(y1msave+tpar1save)*zpm+tpar[1];
const Float_t kYMC1Dm=(y1psave+tpar1save)*zmp+tpar[1];
{
// *** DEFINITION OF AVAILABLE MUON MATERIALS ***
//
- // Ar-CO2 gas
+ // Ar-CO2 gas (80%+20%)
Float_t ag1[3] = { 39.95,12.01,16. };
Float_t zg1[3] = { 18.,6.,8. };
Float_t wg1[3] = { .8,.0667,.13333 };
// 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();
AliMC* gMC = AliMC::GetMC();
((AliMUONChamber*)(*fChambers)[0])->SetGid(gMC->VolId("C01G"));
((AliMUONChamber*)(*fChambers)[1])->SetGid(gMC->VolId("C02G"));
+
((AliMUONChamber*)(*fChambers)[2])->SetGid(gMC->VolId("C03G"));
((AliMUONChamber*)(*fChambers)[3])->SetGid(gMC->VolId("C04G"));
+
((AliMUONChamber*)(*fChambers)[4])->SetGid(gMC->VolId("S05G"));
((AliMUONChamber*)(*fChambers)[5])->SetGid(gMC->VolId("S06G"));
+
((AliMUONChamber*)(*fChambers)[6])->SetGid(gMC->VolId("S07G"));
((AliMUONChamber*)(*fChambers)[7])->SetGid(gMC->VolId("S08G"));
+
((AliMUONChamber*)(*fChambers)[8])->SetGid(gMC->VolId("S09G"));
((AliMUONChamber*)(*fChambers)[9])->SetGid(gMC->VolId("S10G"));
+
((AliMUONChamber*)(*fChambers)[10])->SetGid(gMC->VolId("CG1A"));
((AliMUONChamber*)(*fChambers)[11])->SetGid(gMC->VolId("CG2A"));
((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
}
TLorentzVector mom;
Float_t theta,phi;
Float_t destep, step;
-
+
static Float_t eloss, eloss2, xhit, yhit, zhit, tof, tlength;
- const Float_t kBig=1.e10;
- // modifs perso
+ const Float_t kBig = 1.e10;
static Float_t hits[15];
TClonesArray &lhits = *fHits;
//
- // Set maximum step size for gas
- // numed=gMC->GetMedium();
//
// Only charged tracks
if( !(gMC->TrackCharge()) ) return;
idvol=-1;
id=gMC->CurrentVolID(copy);
- for (Int_t i=1; i<=AliMUONConstants::NCh(); i++) {
+ for (Int_t i = 1; i <= AliMUONConstants::NCh(); i++) {
if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){
- vol[0]=i;
- idvol=i-1;
+ vol[0] = i;
+ idvol = i-1;
}
}
if (idvol == -1) return;
gMC->TrackMomentum(mom);
ipart = gMC->TrackPid();
- //Int_t ipart1 = gMC->IdFromPDG(ipart);
- //printf("ich, ipart %d %d \n",vol[0],ipart1);
//
// momentum loss and steplength in last step
Double_t tc = mom[0]*mom[0]+mom[1]*mom[1];
Double_t rt = TMath::Sqrt(tc);
Double_t pmom = TMath::Sqrt(tc+mom[2]*mom[2]);
- Double_t tx=mom[0]/pmom;
- Double_t ty=mom[1]/pmom;
- Double_t tz=mom[2]/pmom;
- Double_t s=((AliMUONChamber*)(*fChambers)[idvol])
+ Double_t tx = mom[0]/pmom;
+ Double_t ty = mom[1]/pmom;
+ Double_t tz = mom[2]/pmom;
+ Double_t s = ((AliMUONChamber*)(*fChambers)[idvol])
->ResponseModel()
->Pitch()/tz;
theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg;
phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg;
hits[0] = Float_t(ipart); // Geant3 particle type
- hits[1] = pos[0]+s*tx; // X-position for hit
- hits[2] = pos[1]+s*ty; // Y-position for hit
- hits[3] = pos[2]+s*tz; // Z-position for hit
+ hits[1] = pos[0]+s*tx; // X-position for hit
+ hits[2] = pos[1]+s*ty; // Y-position for hit
+ hits[3] = pos[2]+s*tz; // Z-position for hit
hits[4] = theta; // theta angle of incidence
hits[5] = phi; // phi angle of incidence
- hits[8] = (Float_t) fNPadHits; // first padhit
+ hits[8] = (Float_t) fNPadHits; // first padhit
hits[9] = -1; // last pad hit
-
- // modifs perso
- hits[10] = mom[3]; // hit momentum P
- hits[11] = mom[0]; // Px/P
- hits[12] = mom[1]; // Py/P
- hits[13] = mom[2]; // Pz/P
- // fin modifs perso
+ hits[10] = mom[3]; // hit momentum P
+ hits[11] = mom[0]; // Px
+ hits[12] = mom[1]; // Py
+ hits[13] = mom[2]; // Pz
tof=gMC->TrackTime();
- hits[14] = tof; // Time of flight
- // phi angle of incidence
- tlength = 0;
- eloss = 0;
- eloss2 = 0;
- xhit = pos[0];
- yhit = pos[1];
- zhit = pos[2];
+ hits[14] = tof; // Time of flight
+ tlength = 0;
+ eloss = 0;
+ eloss2 = 0;
+ xhit = pos[0];
+ yhit = pos[1];
+ zhit = pos[2];
+ Chamber(idvol).ChargeCorrelationInit();
// Only if not trigger chamber
- if(idvol<10) {
+ if(idvol < AliMUONConstants::NTrackingCh()) {
//
// Initialize hit position (cursor) in the segmentation model
((AliMUONChamber*) (*fChambers)[idvol])
Float_t globalPos[3] = {pos[0], pos[1], pos[2]};
gMC->Gmtod(globalPos,localPos,1);
- if(idvol<10) {
+ if(idvol < AliMUONConstants::NTrackingCh()) {
// tracking chambers
x0 = 0.5*(xhit+pos[0]);
y0 = 0.5*(yhit+pos[1]);
z0 = 0.5*(zhit+pos[2]);
- // z0 = localPos[2];
} else {
// trigger chambers
- x0=xhit;
- y0=yhit;
-// z0=yhit;
- z0=0.;
+ x0 = xhit;
+ y0 = yhit;
+ z0 = 0.;
}
if (eloss >0) MakePadHits(x0,y0,z0,eloss,tof,idvol);
- hits[6]=tlength;
- hits[7]=eloss2;
+ hits[6] = tlength; // track length
+ hits[7] = eloss2; // de/dx energy loss
+
if (fNPadHits > (Int_t)hits[8]) {
- hits[8]= hits[8]+1;
- hits[9]= (Float_t) fNPadHits;
+ hits[8] = hits[8]+1;
+ hits[9] = (Float_t) fNPadHits;
}
-
+//
+// new hit
+
new(lhits[fNhits++])
- AliMUONHit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ AliMUONHit(fIshunt, gAlice->CurrentTrack(), vol,hits);
eloss = 0;
//
// Check additional signal generation conditions
// defined by the segmentation
- // model (boundary crossing conditions)
+ // model (boundary crossing conditions)
+ // only for tracking chambers
} else if
- (((AliMUONChamber*) (*fChambers)[idvol])
- ->SigGenCond(pos[0], pos[1], pos[2]))
+ ((idvol < AliMUONConstants::NTrackingCh()) &&
+ ((AliMUONChamber*) (*fChambers)[idvol])->SigGenCond(pos[0], pos[1], pos[2]))
{
((AliMUONChamber*) (*fChambers)[idvol])
->SigGenInit(pos[0], pos[1], pos[2]);
Float_t globalPos[3] = {pos[0], pos[1], pos[2]};
gMC->Gmtod(globalPos,localPos,1);
+ eloss += destep;
- if (eloss > 0 && idvol < 10)
+ if (eloss > 0 && idvol < AliMUONConstants::NTrackingCh())
MakePadHits(0.5*(xhit+pos[0]),0.5*(yhit+pos[1]),pos[2],eloss,tof,idvol);
xhit = pos[0];
yhit = pos[1];
- zhit = pos[2];
- eloss = destep;
+ zhit = pos[2];
+ eloss = 0;
tlength += step ;
//
// nothing special happened, add up energy loss