//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Temporary class PLUG_CALORIMETER2 (to avoid clashes with class in Calor) // Will be removed soon when new geometry is fully functional //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //------------------------------------------------------------------------------ // description of CDF plug calorimeter (PLUG_CALORIMETER class) // ------------------------------------------------------------ // CDF plug calorimeter consists of 2 PLUG's // // revision history: // ----------------- // *0001 Feb 23 1997 P.Murat: add Used flag (use GNU linker from now!) // *0002 Feb 27 1997 M.Shapiro, P.Murat: introduce detector set name // *0003 Mar 14 1997 P.Murat: new hangling of tracking medii // *0004 Oct 20 1997 J.Lamoureux: changed the PCAL class to PLUG_CALORIMETER // *0005 Jan 13 1998 P.Murat: compile with KCC // *0006 Mar 20 1998 J.Lamoureux: Use Level hook // *0007 Feb 02 1999 J. Mayer: Detailed geometry implemented // *0008 Mar 09 1999 J. Mayer: Added preshower detector to porridge model // *0009 Mar 15 1999 J. Mayer: Added separate geometry for GeomLevel=0,1,2 // *0010 Jun 04 1999 J, Mayer: Added showermax detector to GeomLevel=1 //------------------------------------------------------------------------------ #include #include #include #include "geant_i/TGeant3.h" #include "inc/misc.hh" #include "Calor/Plug_calorimeter2.hh" #include "Calor/PlugGeometry.hh" #include "Geometry/CdfGeometry.hh" #include "Geometry/TCdfGeometryManager.hh" static PLUG_CALORIMETER2* gPlug; PEM_VOLUME2::PEM_VOLUME2() { } PEM_VOLUME2::~PEM_VOLUME2() { } int PEM_VOLUME2::initGeometry(int geomLevel, PLUG2* mother) { TCdfGeometryManager* gm = TCdfGeometryManager::Instance(); TGeant3* gnt = TGeant3::Instance(); float coord[3] = {0.0, 0.0, 0.0}; char tname[] = "...."; tname[3] = mother->Number()+48; char sname[] = "...."; sname[3] = mother->Number()+48; char name[] = "...."; name[3] = mother->Number()+48; char cname[] = "PEM."; cname[3] = mother->Number()+48; char cnama[] = "PEA."; cnama[3] = mother->Number()+48; char cnamb[] = "PEB."; cnamb[3] = mother->Number()+48; char mname[] = "PLG."; mname[3] = mother->Number()+48; GeomLevel = geomLevel; //////////////////////////////////////////////////////////////////////// // GeomLevel = 0 - the default geometry for QFL //////////////////////////////////////////////////////////////////////// if (GeomLevel==0) { G3_PCON::init(cname, TGeant3::kPcon, gPlug->TmedPem(), PEM_DIMENSIONS, PEM_DETECTOR_TYPE, mother->volume(), PEM_POSITION, PEM_ROTATION, "ONLY", PEM_DETECTOR_SET); } //////////////////////////////////////////////////////////////////////// // GeomLevel = 1 - the default geometry for GFLASH //////////////////////////////////////////////////////////////////////// if (GeomLevel==1) { G3_PCON::init(cnama, TGeant3::kPcon, gPlug->TmedPem(), PEM_DIMENSIONS_A, PEM_DETECTOR_TYPE, mother->volume(), PEM_POSITION, PEM_ROTATION, "ONLY", PEM_DETECTOR_SET); G3_PCON::init(cnamb, TGeant3::kPcon, gPlug->TmedPem(), PEM_DIMENSIONS_B, PEM_DETECTOR_TYPE, mother->volume(), PEM_POSITION, PEM_ROTATION, "ONLY", PEM_DETECTOR_SET); int i = 0; float PEM_ACTIVE_LAYER[3]; for (int j = 0; j < 3; j++) { PEM_ACTIVE_LAYER[j] = PEM_ACTIVE[i][j]; } /////////////////////////// // Preshower Detector // /////////////////////////// // define the Preshower "super-volume" sname[0] = 69; // "E" sname[1] = 65; // "A" sname[2] = 65 + i; // super-volume identifier PemActiveSuperLayer[i].init(sname,TGeant3::kTube, gPlug->TmedPlugAir(), PEM_ACTIVE_LAYER, PEM_DETECTOR_TYPE); coord[2] = PLUG_ZMIN + PEM_ACTIVE_Z[i]; gnt -> Gspos(sname, 1, mname, coord[0], coord[1], coord[2], 0, "ONLY"); // inside the super-volume goes two layers of inactive plastic // sandwiching a layer of scintillator // Inactive Layer "1" name[0] = 69; // "E" name[1] = 66; // "B" name[2] = 65 + i; // super-volume location PEM_ACTIVE_LAYER[2] = 0.085; // plastic layer "1" is 1.7 mm thick PemActivePlasticA[i].init(name,TGeant3::kTube, gPlug->TmedPlugPlast(), PEM_ACTIVE_LAYER, PEM_DETECTOR_TYPE); coord[2] = -0.54; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); // Inactive Layer "2" name[0] = 69; // "E" name[1] = 67; // "C" name[2] = 65 + i; // super-volume location PEM_ACTIVE_LAYER[2] = 0.04; // plastic layer "2" is 0.8 mm thick PemActivePlasticB[i].init(name,TGeant3::kTube, gPlug->TmedPlugPlast(), PEM_ACTIVE_LAYER, PEM_DETECTOR_TYPE); coord[2] = 0.585; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); // Scintillator Layer name[0] = 69; // "E" name[1] = 68; // "D" name[2] = 65 + i; // super-volume location PEM_ACTIVE_LAYER[2] = 0.5; // preshower tiles are 10.0 mm thick PemActiveScint[i].init(name,TGeant3::kTube, gPlug->TmedPlugPSDScint(), PEM_ACTIVE_LAYER, PEM_DETECTOR_TYPE); coord[2] = 0.045; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); /////////////////////////// // Showermax Detector 1 // /////////////////////////// sname[0] = 69; // "E" sname[1] = 77; // "M" sname[2] = 65; // super-volume identifier PemSmaxSuperLayer.init(sname,TGeant3::kTube, gPlug->TmedPlugSMDScint(), PEM_SHOWER_SCINT, PEM_DETECTOR_TYPE); coord[2] = 184.8; gnt -> Gspos(sname, 1, mname, coord[0], coord[1], coord[2], 0, "ONLY"); /////////////////////////// // Showermax Detector 2 // /////////////////////////// sname[0] = 69; // "E" sname[1] = 78; // "M" sname[2] = 65; // super-volume identifier PemSmaxSuperLayer.init(sname,TGeant3::kTube, gPlug->TmedPlugSMDScint(), PEM_SHOWER_SCINT, PEM_DETECTOR_TYPE); coord[2] = 184.8 + 0.6; gnt -> Gspos(sname, 1, mname, coord[0], coord[1], coord[2], 0, "ONLY"); } //////////////////////////////////////////////////////////////////////// // GeomLevel = 2 - the detailed GEANT geometry //////////////////////////////////////////////////////////////////////// if (GeomLevel==2) { // First position the PEM* containment volume G3_PCON::init(cname, TGeant3::kPcon, gm->TmedAir(), PEM_DIMENSIONS, PEM_DETECTOR_TYPE, mother->volume(), PEM_POSITION, PEM_ROTATION, "ONLY", PEM_DETECTOR_SET); // PEM iron support cone tname[0] = 69; // "E" tname[1] = 90; // "Z" tname[2] = 90; // "Z" PemSupportCone.init(tname,TGeant3::kPcon, gPlug->TmedPlugIron(), PEM_CONE_DIMS, PEM_DETECTOR_TYPE); coord[2] = PLUG_ZMIN; gnt -> Gspos(tname, 1, cname, coord[0], coord[1], coord[2], 0, "ONLY"); // PEM Active Layers for (int i = 0; i < 23; i++) { float PEM_ACTIVE_LAYER[3]; for (int j = 0; j < 3; j++) { PEM_ACTIVE_LAYER[j] = PEM_ACTIVE[i][j]; } // start defining active "super-volumes" sname[0] = 69; // "E" sname[1] = 65; // "A" sname[2] = 65 + i; // super-volume identifier PemActiveSuperLayer[i].init(sname,TGeant3::kTube, gPlug->TmedPlugAir(), PEM_ACTIVE_LAYER, PEM_DETECTOR_TYPE); coord[2] = PLUG_ZMIN + PEM_ACTIVE_Z[i]; gnt -> Gspos(sname, 1, cname, coord[0], coord[1], coord[2], 0, "ONLY"); // inside each super-volume goes two layers of inactive plastic // sandwiching a layer of scintillator // Inactive Layer "1" name[0] = 69; // "E" name[1] = 66; // "B" name[2] = 65 + i; // super-volume location PEM_ACTIVE_LAYER[2] = 0.085; // plastic layer "1" is 1.7 mm thick PemActivePlasticA[i].init(name,TGeant3::kTube, gPlug->TmedPlugPlast(), PEM_ACTIVE_LAYER, PEM_DETECTOR_TYPE); if (i == 0) coord[2] = -0.54; else coord[2] = -0.24; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); // Inactive Layer "2" name[0] = 69; // "E" name[1] = 67; // "C" name[2] = 65 + i; // super-volume location PEM_ACTIVE_LAYER[2] = 0.04; // plastic layer "2" is 0.8 mm thick PemActivePlasticB[i].init(name,TGeant3::kTube, gPlug->TmedPlugPlast(), PEM_ACTIVE_LAYER, PEM_DETECTOR_TYPE); if (i == 0) coord[2] = 0.585; else coord[2] = 0.285; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); // Scintillator Layer name[0] = 69; // "E" name[1] = 68; // "D" name[2] = 65 + i; // super-volume location if (i == 0){ PEM_ACTIVE_LAYER[2] = 0.5; // preshower tiles are 10.0 mm thick PemActiveScint[i].init(name,TGeant3::kTube, gPlug->TmedPlugPSDScint(), PEM_ACTIVE_LAYER, PEM_DETECTOR_TYPE); } else{ PEM_ACTIVE_LAYER[2] = 0.2; // Scintillator tiles are 4.0 mm thick PemActiveScint[i].init(name,TGeant3::kTube, gPlug->TmedPlugEMScint(), PEM_ACTIVE_LAYER, PEM_DETECTOR_TYPE); } coord[2] = 0.045; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); } // end of active layers of PEM // // PEM Absorber Layers // for (int i = 1; i < 23; i++) { float PEM_ABSORB_LAYER[3]; for (int j = 0; j < 3; j++) { PEM_ABSORB_LAYER[j] = PEM_ABSORB[i][j]; } // start defining passive "super-volumes" sname[0] = 69; // "E" sname[1] = 69; // "E" sname[2] = 65 + i; // super-volume identifier coord[2] = PLUG_ZMIN + PEM_ABSORB_Z[i]; if (i == 0) { PemAbsorbSuperLayer[i].init(sname,TGeant3::kTube, gPlug->TmedPlugInox(), PEM_ABSORB_LAYER, PEM_DETECTOR_TYPE); gnt -> Gspos(sname, 1, cname, coord[0], coord[1], coord[2], 0, "ONLY"); } else { PemAbsorbSuperLayer[i].init(sname,TGeant3::kTube, gPlug->TmedPlugAir(), PEM_ABSORB_LAYER, PEM_DETECTOR_TYPE); gnt -> Gspos(sname, 1, cname, coord[0], coord[1], coord[2], 0, "ONLY"); // inside each super-volume goes two layers of stainless steel // sandwiching a layer of lead // Stainless Steel Layer "1" and "2" name[0] = 69; // "E" name[1] = 70; // "F" name[2] = 65 + i; // super-volume location PEM_ABSORB_LAYER[2] = 0.025; // stainless steel layers are 0.5mm thick PemAbsorbInoxA[i].init(name,TGeant3::kTube, gPlug->TmedPlugInox(), PEM_ABSORB_LAYER, PEM_DETECTOR_TYPE); coord[2] = -0.25; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); name[0] = 69; // "E" name[1] = 71; // "G" name[2] = 65 + i; // super-volume location PemAbsorbInoxB[i].init(name,TGeant3::kTube, gPlug->TmedPlugInox(), PEM_ABSORB_LAYER, PEM_DETECTOR_TYPE); coord[2] = 0.25; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); name[0] = 69; // "E" name[1] = 72; // "H" name[2] = 65 + i; // super-volume location PEM_ABSORB_LAYER[2] = 0.225; // lead layers are 4.5mm thick PemAbsorbLead[i].init(name,TGeant3::kTube, gPlug->TmedPlugLead(), PEM_ABSORB_LAYER, PEM_DETECTOR_TYPE); coord[2] = 0.0; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); } } // end of absorber layers of PEM // Showermax Detector sname[0] = 69; // "E" sname[1] = 77; // "M" sname[2] = 65; // super-volume identifier PemSmaxSuperLayer.init(sname,TGeant3::kTube, gPlug->TmedPlugAir(), PEM_SHOWER_MAX, PEM_DETECTOR_TYPE); coord[2] = PLUG_ZMIN + 12.2455; gnt -> Gspos(sname, 1, cname, coord[0], coord[1], coord[2], 0, "ONLY"); name[0] = 69; // "E" name[1] = 77; // "M" name[2] = 66; // "B" - lexan cover number 1 PemSmaxLexanA.init(name,TGeant3::kTube, gPlug->TmedPlugLexan(), PEM_SHOWER_LEX, PEM_DETECTOR_TYPE); coord[2] = -0.75875; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); name[0] = 69; // "E" name[1] = 77; // "M" name[2] = 67; // "B" - lexan cover number 2 PemSmaxLexanB.init(name,TGeant3::kTube, gPlug->TmedPlugLexan(), PEM_SHOWER_LEX, PEM_DETECTOR_TYPE); coord[2] = 0.75875; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); name[0] = 69; // "E" name[1] = 77; // "M" name[2] = 68; // "D" - Scintillator layer PemSmaxScint.init(name,TGeant3::kTube, gPlug->TmedPlugSMDScint(), PEM_SHOWER_LEX, PEM_DETECTOR_TYPE); coord[2] = 0.0; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); } return 1; } PHA_VOLUME2::PHA_VOLUME2() { } PHA_VOLUME2::~PHA_VOLUME2() { } int PHA_VOLUME2::initGeometry(int geomLevel, PLUG2* mother) { TCdfGeometryManager* gm = TCdfGeometryManager::Instance(); TGeant3* gnt = TGeant3::Instance(); float coord[3] = {0.0, 0.0, 0.0}; char sname[] = "...."; sname[3] = mother->Number()+48; char name[] = "...."; name[3] = mother->Number()+48; char cname[] = "PHA."; cname[3] = mother->Number()+48; GeomLevel = geomLevel; //////////////////////////////////////////////////////////////////////// // GeomLevel = 0 - the default geometry for QFL // GeomLevel = 1 - the default geometry for GFLASH //////////////////////////////////////////////////////////////////////// if (GeomLevel==0 || GeomLevel==1) { G3_PCON::init(cname, TGeant3::kPcon, gPlug->TmedPha(), PHA_DIMENSIONS, PHA_DETECTOR_TYPE, mother->volume(), PHA_POSITION, PHA_ROTATION, "ONLY", PHA_DETECTOR_SET); } //////////////////////////////////////////////////////////////////////// // GeomLevel = 2 - the detailed GEANT geometry //////////////////////////////////////////////////////////////////////// if (GeomLevel==2) { G3_PCON::init(cname, TGeant3::kPcon, gm->TmedAir(), PHA_DIMENSIONS, PHA_DETECTOR_TYPE, mother->volume(), PHA_POSITION, PHA_ROTATION, "ONLY", PHA_DETECTOR_SET); // PHA Active Layers for (int i = 0; i < 22; i++) { float PHA_ACTIVE_LAYER[3]; for (int j = 0; j < 3; j++) { PHA_ACTIVE_LAYER[j] = PHA_ACTIVE[i][j]; } // start defining active "super-volumes" sname[0] = 72; // "H" sname[1] = 65; // "A" sname[2] = 65 + i; // super-volume identifier PhaActiveSuperLayer[i].init(sname,TGeant3::kTube, gPlug->TmedPlugAir(), PHA_ACTIVE_LAYER, PHA_DETECTOR_TYPE); coord[2] = PLUG_ZMIN + PHA_ACTIVE_Z[i]; gnt -> Gspos(sname, 1, cname, coord[0], coord[1], coord[2], 0, "ONLY"); // inside each super-volume goes two layers of aluminum, one layer // of inactive plastic and a layer of scintillator. // Aluminum Layer 1 name[0] = 72; // "H" name[1] = 66; // "B" name[2] = 65 + i; // super-volume location PHA_ACTIVE_LAYER[2] = 0.1143; // Al layer "1" is 2.286 mm thick PhaActiveAluminumA[i].init(name,TGeant3::kTube, gPlug->TmedPlugAl(), PHA_ACTIVE_LAYER, PHA_DETECTOR_TYPE); coord[2] = -0.5705; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); // Aluminum Layer "2" name[0] = 72; // "H" name[1] = 67; // "C" name[2] = 65 + i; // super-volume location PHA_ACTIVE_LAYER[2] = 0.08; // Al layer "2" is 1.6 mm thick PhaActiveAluminumB[i].init(name,TGeant3::kTube, gPlug->TmedPlugAl(), PHA_ACTIVE_LAYER, PHA_DETECTOR_TYPE); coord[2] = 0.6048; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); // Inactive Plastic Layer name[0] = 72; // "H" name[1] = 68; // "D" name[2] = 65 + i; // super-volume location PHA_ACTIVE_LAYER[2] = 0.1905; // inactive plastic layer is 3.81 mm thick PhaActivePlastic[i].init(name,TGeant3::kTube, gPlug->TmedPlugPlast(), PHA_ACTIVE_LAYER, PHA_DETECTOR_TYPE); coord[2] = -0.2657; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); // Scintillator Layer name[0] = 72; // "H" name[1] = 69; // "E" name[2] = 65 + i; // super-volume location PHA_ACTIVE_LAYER[2] = 0.3; // Scintillator tiles are 6.0 mm thick PhaActiveScint[i].init(name,TGeant3::kTube, gPlug->TmedPlugHAScint(), PHA_ACTIVE_LAYER, PHA_DETECTOR_TYPE); coord[2] = 0.2248; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); } // end of active layers of PHA // // PHA Absorber Layers // for (int i = 0; i < 23; i++) { float PHA_ABSORB_LAYER[5]; for (int j = 0; j < 5; j++) { PHA_ABSORB_LAYER[j] = PHA_ABSORB[i][j]; } // start defining passive "super-volumes" sname[0] = 72; // "H" sname[1] = 70; // "F" sname[2] = 65 + i; // super-volume identifier PhaAbsorbSuperLayer[i].init(sname,TGeant3::kCone, gPlug->TmedPlugAir(), PHA_ABSORB_LAYER, PHA_DETECTOR_TYPE); coord[2] = PLUG_ZMIN + PHA_ABSORB_Z[i]; gnt -> Gspos(sname, 1, cname, coord[0], coord[1], coord[2], 0, "ONLY"); if (i == 0 || i == 1) { name[0] = 72; // "H" name[1] = 71; // "G" name[2] = 65 + i; // super-volume number PhaAbsorbMaterial[i].init(name,TGeant3::kCone, gPlug->TmedPlugInox(), PHA_ABSORB_LAYER, PHA_DETECTOR_TYPE); coord[2] = 0.0; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); } else { name[0] = 72; // "H" name[1] = 71; // "G" name[2] = 65 + i; // super-volume number PHA_ABSORB_LAYER[1] = ((PLUG_ZMIN + PHA_ABSORB_Z[i])-PHA_ABSORB_LAYER[0])* tan(10.0*3.1415/180.0); PHA_ABSORB_LAYER[3] = ((PLUG_ZMIN + PHA_ABSORB_Z[i])+PHA_ABSORB_LAYER[0])* tan(10.0*3.1415/180.0); PhaAbsorbMaterial[i].init(name,TGeant3::kCone, gPlug->TmedPlugIron(), PHA_ABSORB_LAYER, PHA_DETECTOR_TYPE); coord[2] = 0.0; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); name[0] = 72; // "H" name[1] = 72; // "H" name[2] = 65 + i; // super-volume number PHA_ABSORB_LAYER[1] = PHA_ABSORB[i][1]; PHA_ABSORB_LAYER[3] = PHA_ABSORB[i][3]; PHA_ABSORB_LAYER[2] = ((PLUG_ZMIN + PHA_ABSORB_Z[i])-PHA_ABSORB_LAYER[0])* tan(10.0*3.1415/180.0); PHA_ABSORB_LAYER[4] = ((PLUG_ZMIN + PHA_ABSORB_Z[i])+PHA_ABSORB_LAYER[0])* tan(10.0*3.1415/180.0); PhaAbsorbMaterial[i].init(name,TGeant3::kCone, gPlug->TmedPlugInox(), PHA_ABSORB_LAYER, PHA_DETECTOR_TYPE); coord[2] = 0.0; gnt -> Gspos(name, 1, sname, coord[0], coord[1], coord[2], 0, "ONLY"); } } // end of absorber layers of PHA } return 1; } PLUG2::PLUG2() { } PLUG2::~PLUG2() { } //------------------------------------------------------------------------------ // define 2 plugs as separate objects (not just as GEANT copies) to use this // description in the reconstruction - we definitely need 2 separate objects // until we describe te single calorimeter object, consisting of central // calorimeter and both plugs ... //------------------------------------------------------------------------------ int PLUG2::initGeometry( int geomLevel ) { char name[] = "PLG."; char steel_name[] = "PST."; TCdfGeometryManager* gm = TCdfGeometryManager::Instance(); // initialize PLG* containment volume name[3] = 48+fNumber; G3_PCON::init(name, TGeant3::kPcon, gm->TmedAir(), PLUG_DIMENSIONS, fNumber+1, gCdfDetector.volume(), PLUG_POSITION[fNumber], PLUG_ROTATION[fNumber], "ONLY", PLUG_DETECTOR_SET); // Put the Plug subvolumes inside // First, place the stainless steel // front plate inside PLG* steel_name[3] = 48+fNumber; SteelVolume.init(steel_name, TGeant3::kTube, gPlug->TmedPlugInox(), PST_DIMENSIONS, PLUG_DETECTOR_TYPE, this->volume(), PST_POSITION, PST_ROTATION, "ONLY", PST_DETECTOR_SET); // insert PEM and PHA parts PemVolume.initGeometry(geomLevel,this); PhaVolume.initGeometry(geomLevel,this); // all done return 1; } //------------------------------------------------------------------------------ // ********** class PLUG_CALORIMETER2 ********** //------------------------------------------------------------------------------ PLUG_CALORIMETER2::PLUG_CALORIMETER2() : POBJECT ("PLUG",_POBJECT_TYPE_DETECTOR_,1) { Used = 1; } //------------------------------------------------------------------------------ // global initialization routine //------------------------------------------------------------------------------ int PLUG_CALORIMETER2::init(int geomLevel) { // initialize geometry initGeometry(geomLevel); // initialize more if needed... // all done return 1; } //------------------------------------------------------------------------------ // level = 0 : use include files to initialize geometry // level = 1 : read information from the database (not implemented yet) //------------------------------------------------------------------------------ int PLUG_CALORIMETER2::initGeometry(int geomLevel) { // create materials and tmed's anyway // may want to move it later on float par[10]; float precision; int np = 0; int call_geant = G3_VOLUME::CallGeant; if (! Used) { G3_VOLUME::CallGeant = 0; } TCdfGeometryManager* gm = TCdfGeometryManager::Instance(); gPlug = this; // create materials used by detailed Plug geometry // Stainless Steel - Standard 18-8, 304LN. Elemental fractions by weight: Fe(71%), // Cr(19%), Ni(10%) float plug_inox_a[3] = { 52.00, 58.69, 55.85 }; float plug_inox_z[3] = { 24.0 , 28.0 , 26.0 }; float plug_inox_w[3] = { 0.19, 0.10, 0.71 }; fMaterialPlugInox = gm->AddMaterial("Plug Stainless", plug_inox_a, plug_inox_z, 8.044, 3, plug_inox_w); // Polystyrene plastic scintillator - C6H5CH=CH2 float plug_scint_a[2] = { 12.01, 1.0 }; float plug_scint_z[2] = { 6.0 , 1.0 }; float plug_scint_w[2] = { 1.0 , 1.0 }; fMaterialPlugScint = gm->AddMaterial("Plug Scintillator", plug_scint_a, plug_scint_z, 1.032, -2, plug_scint_w); // Inactive spacer plastic (polystyrene) - C6H5CH=CH2 float plug_plast_a[2] = { 12.01, 1.0 }; float plug_plast_z[2] = { 6.0 , 1.0 }; float plug_plast_w[2] = { 1.0 , 1.0 }; fMaterialPlugPlast = gm->AddMaterial("Plug Inactive Plastic", plug_plast_a, plug_plast_z, 1.032, -2, plug_plast_w); //LEXAN - (C16H14O3)n float plug_lexan_a[3] = { 12.01, 1.0, 16.0 }; float plug_lexan_z[3] = { 6.0 , 1.0, 8.0 }; float plug_lexan_w[3] = { 16.0 , 14.0, 3.0 }; fMaterialPlugLexan = gm->AddMaterial("Plug Showermax Lexan", plug_lexan_a, plug_lexan_z, 1.200, -3, plug_lexan_w); // old mixture definitions // fMaterialPem = gm->AddMaterial("PEM_Stuff",146., 59.0, 4.21, 2.17, 41.40, par,0); // fMaterialPha = gm->AddMaterial("PHA_Stuff",54.0, 25.0, 6.00, 2.38, 22.86, par,0); // Updated (23/12/98) mixture definitions // Plug EM mix of materials float apemmix[5] = { 11.154, 11.154, 55.85 , 14.6 , 207.20 }; float zpemmix[5] = { 5.615 , 5.615 , 26.0 , 7.3 , 82.00 }; float wpemmix[5] = { 6.19244E-02, 5.15521E-02, .1203086, 3.48025E-05, .76618}; float dpem = 4.4; // Density fMaterialPem = gm->AddMaterial("PEM_Mix",apemmix,zpemmix,dpem,5,wpemmix); // Plug HAD mix of materials float aphamix[5] = { 11.154, 11.154, 26.98 , 14.6 , 55.44 }; float zphamix[5] = { 5.615 , 5.615 , 13.0 , 7.3 , 25.84 }; float wphamix[5] = { 1.44313E-02, 9.16387E-03, 2.44787E-02, 2.01367E-05, .951906}; float dpha = 5.86639; // Density fMaterialPha = gm->AddMaterial("PHA_Mix",aphamix,zphamix,dpha,5,wphamix); fMaterialMst = gm->AddMaterial("PLUG misc.steel", 55.85, 26., 5.24667, 1.17333, 14.18, par,0); //------------------------------------------------------------------------------ // plug tracking media //------------------------------------------------------------------------------ precision = (BOUNDARY_PRECISION < 10.) ? BOUNDARY_PRECISION : 10.; // containment volume gm->AddTrackingMedium(fTmedPlug, "Plug_Contain", TGeant3::kAir, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); // plug steel precision = (BOUNDARY_PRECISION < 10.) ? BOUNDARY_PRECISION : 10.; gm->AddTrackingMedium(fTmedPst, "Plug_Steel_Contain", TGeant3::kIron, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); // PEM (averaged) precision = (BOUNDARY_PRECISION < 10.) ? BOUNDARY_PRECISION : 10.; gm->AddTrackingMedium(fTmedPem, "Plug_EM_Contain", fMaterialPem, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); // PHA (averaged) precision = (BOUNDARY_PRECISION < 10.) ? BOUNDARY_PRECISION : 10.; gm->AddTrackingMedium(fTmedPha, "Plug_HAD_Contain", fMaterialPha, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); // used by Jim Bellinger gm->AddTrackingMedium(fTmedMst, "PLUG misc. steel", fMaterialMst, TGeant3::kPassiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); // tracking media for the detailed Plug // geometry precision = 0.05; gm->AddTrackingMedium(fTmedPlugAir, "PLUG Air", TGeant3::kAir, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugLead, "PLUG Lead", TGeant3::kLead, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugInox, "PLUG Stainless", fMaterialPlugInox, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugEMScint, "PLUG EM Scintillator", fMaterialPlugScint, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugHAScint, "PLUG HA Scintillator", fMaterialPlugScint, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugPSDScint, "PLUG PSD Scintillator", fMaterialPlugScint, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugSMDScint, "PLUG SMD Scintillator", fMaterialPlugScint, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugPlast, "PLUG Inactive Plastic", fMaterialPlugPlast, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugAl, "PLUG Aluminum", TGeant3::kAluminum, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugIron, "PLUG Iron", TGeant3::kIron, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); gm->AddTrackingMedium(fTmedPlugLexan, "PLUG Lexan", fMaterialPlugLexan, TGeant3::kSensitiveVolume, TGeant3::kNoMagneticField, CDF_MAG_FIELD, TGeant3::kAuto, TGeant3::kAuto, TGeant3::kAuto, precision, TGeant3::kAuto,par,np); for (int i=0; i<2; i++) { Module[i].SetNumber(i); if ( this->Used ) Module[i].initGeometry(geomLevel); } // all done // restore CallGeant flag on exit G3_VOLUME::CallGeant = call_geant; // 0 means successfull return return 0; }