31 #include "B2bDetectorConstruction.hh"
32 #include "B2bDetectorMessenger.hh"
33 #include "B2bChamberParameterisation.hh"
34 #include "B2TrackerSD.hh"
66 fLogicTarget(NULL), fLogicChamber(NULL),
67 fTargetMaterial(NULL), fChamberMaterial(NULL),
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 "
243 << chamberSpacing/
cm <<
" cm" <<
G4endl;
262 G4double maxStep = 0.5*chamberWidth;
285 G4String trackerChamberSDname =
"B2/TrackerChamberSD";
287 "TrackerHitsCollection");
309 if ( pttoMaterial ) {
312 G4cout <<
"\n----> The target is made of " << materialName <<
G4endl;
314 G4cout <<
"\n--> WARNING from SetTargetMaterial : "
315 << materialName <<
" not found" <<
G4endl;
330 if ( pttoMaterial ) {
333 G4cout <<
"\n----> The chambers are made of " << materialName <<
G4endl;
335 G4cout <<
"\n--> WARNING from SetChamberMaterial : "
336 << materialName <<
" not found" <<
G4endl;
B2bDetectorConstruction()
CLHEP::Hep3Vector G4ThreeVector
G4LogicalVolume * fLogicChamber
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
static G4MaterialTable * GetMaterialTable()
void SetChamberMaterial(G4String)
static constexpr double mm
G4LogicalVolume * fLogicTarget
void AddNewDetector(G4VSensitiveDetector *aSD)
void SetVerboseLevel(G4int verboseLevel)
void SetMaxStep(G4double)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
G4Material * fTargetMaterial
G4Material * fChamberMaterial
B2bDetectorMessenger * fMessenger
const G4String & GetName() const
virtual ~B2bDetectorConstruction()
virtual void ConstructSDandField()
static constexpr double deg
G4UserLimits * fStepLimit
static G4GeometryManager * GetInstance()
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
virtual G4VPhysicalVolume * Construct()
void SetVisAttributes(const G4VisAttributes *pVA)
void SetTargetMaterial(G4String)
void SetWorldMaximumExtent(G4double worldExtent)
void SetUserLimits(G4UserLimits *pULimits)
static G4SDManager * GetSDMpointer()
static G4ThreadLocal G4GlobalMagFieldMessenger * fMagFieldMessenger
static constexpr double cm
G4GLOB_DLL std::ostream G4cout
void SetMaterial(G4Material *pMaterial)
G4VPhysicalVolume * DefineVolumes()
static G4GeometryTolerance * GetInstance()
virtual void SetMaxAllowedStep(G4double ustepMax)
G4double GetSurfaceTolerance() const
static G4NistManager * Instance()