34 #include "B2MagneticField.hh"
35 #include "B2TrackerSD.hh"
64 fLogicTarget(NULL), fLogicChamber(NULL),
65 fTargetMaterial(NULL), fChamberMaterial(NULL),
90 return DefineVolumes();
95 void B2bDetectorConstruction::DefineMaterials()
101 G4bool fromIsotopes =
false;
124 G4int NbOfChambers = 5;
130 G4double trackerLength = (NbOfChambers+1)*chamberSpacing;
132 G4double worldLength = 1.2 * (2*targetLength + trackerLength);
134 G4double targetRadius = 0.5*targetLength;
135 targetLength = 0.5*targetLength;
136 G4double trackerSize = 0.5*trackerLength;
144 G4cout <<
"Computed tolerance = "
150 worldLength/2,worldLength/2,worldLength/2);
175 =
new G4Tubs(
"target",0.,targetRadius,targetLength,0.*
deg,360.*
deg);
187 G4cout <<
"Target is " << 2*targetLength/
cm <<
" cm of "
195 =
new G4Tubs(
"tracker",0,trackerSize,trackerSize, 0.*
deg, 360.*
deg);
217 G4double firstPosition = -trackerSize + chamberSpacing;
218 G4double firstLength = trackerLength/10;
219 G4double lastLength = trackerLength;
240 G4cout <<
"There are " << NbOfChambers <<
" chambers in the tracker region. "
241 <<
"\nThe chambers are " << chamberWidth/
cm <<
" cm of "
242 << fChamberMaterial->
GetName() <<
"\nThe distance between chamber is "
243 << chamberSpacing/
cm <<
" cm" <<
G4endl;
247 G4String trackerChamberSDname =
"B2/TrackerChamberSD";
249 "TrackerHitsCollection");
270 G4double maxStep = 0.5*chamberWidth;
292 G4bool fromIsotopes =
false;
297 if (fTargetMaterial != pttoMaterial) {
298 if ( pttoMaterial ) {
299 fTargetMaterial = pttoMaterial;
300 if (fLogicTarget) fLogicTarget->
SetMaterial(fTargetMaterial);
301 G4cout <<
"\n----> The target is made of " << materialName <<
G4endl;
303 G4cout <<
"\n--> WARNING from SetTargetMaterial : "
304 << materialName <<
" not found" <<
G4endl;
314 G4bool fromIsotopes =
false;
319 if (fChamberMaterial != pttoMaterial) {
320 if ( pttoMaterial ) {
321 fChamberMaterial = pttoMaterial;
322 if (fLogicChamber) fLogicChamber->
SetMaterial(fChamberMaterial);
323 G4cout <<
"\n----> The chambers are made of " << materialName <<
G4endl;
325 G4cout <<
"\n--> WARNING from SetChamberMaterial : "
326 << materialName <<
" not found" <<
G4endl;