33 #include "B2TrackerSD.hh"
63 fLogicTarget(NULL), fLogicChamber(NULL),
64 fTargetMaterial(NULL), fChamberMaterial(NULL),
130 G4double worldLength = 1.2 * (2*targetLength + trackerLength);
132 G4double targetRadius = 0.5*targetLength;
133 targetLength = 0.5*targetLength;
134 G4double trackerSize = 0.5*trackerLength;
142 G4cout <<
"Computed tolerance = "
148 worldLength/2,worldLength/2,worldLength/2);
173 =
new G4Tubs(
"target",0.,targetRadius,targetLength,0.*
deg,360.*
deg);
185 G4cout <<
"Target is " << 2*targetLength/
cm <<
" cm of "
193 =
new G4Tubs(
"tracker",0,trackerSize,trackerSize, 0.*
deg, 360.*
deg);
217 <<
"\nThe chambers are " << chamberWidth/
cm <<
" cm of "
219 << chamberSpacing/
cm <<
" cm" <<
G4endl;
221 G4double firstPosition = -trackerSize + chamberSpacing;
222 G4double firstLength = trackerLength/10;
223 G4double lastLength = trackerLength;
225 G4double halfWidth = 0.5*chamberWidth;
226 G4double rmaxFirst = 0.5 * firstLength;
231 if (chamberSpacing < chamberWidth) {
232 G4Exception(
"B2aDetectorConstruction::DefineVolumes()",
240 G4double Zposition = firstPosition + copyNo * chamberSpacing;
241 G4double rmax = rmaxFirst + copyNo * rmaxIncr;
244 =
new G4Tubs(
"Chamber_solid", 0, rmax, halfWidth, 0.*
deg, 360.*
deg);
269 G4double maxStep = 0.5*chamberWidth;
292 G4String trackerChamberSDname =
"B2/TrackerChamberSD";
294 "TrackerHitsCollection");
320 if ( pttoMaterial ) {
323 G4cout <<
"\n----> The target is made of " << materialName <<
G4endl;
325 G4cout <<
"\n--> WARNING from SetTargetMaterial : "
326 << materialName <<
" not found" <<
G4endl;
341 if ( pttoMaterial ) {
347 G4cout <<
"\n----> The chambers are made of " << materialName <<
G4endl;
349 G4cout <<
"\n--> WARNING from SetChamberMaterial : "
350 << materialName <<
" not found" <<
G4endl;
void SetVerboseLevel(G4int verboseLevel)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
virtual void SetMaxAllowedStep(G4double ustepMax)
G4Material * fTargetMaterial
Definition of the B2aDetectorMessenger class.
CLHEP::Hep3Vector G4ThreeVector
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
const G4String & GetName() const
void SetUserLimits(G4UserLimits *pULimits)
G4double GetSurfaceTolerance() const
static G4MaterialTable * GetMaterialTable()
G4LogicalVolume * fLogicTarget
void SetTargetMaterial(G4String)
virtual void ConstructSDandField()
B2aDetectorConstruction()
void SetChamberMaterial(G4String)
void SetWorldMaximumExtent(G4double worldExtent)
static G4NistManager * Instance()
G4Material * fChamberMaterial
B2Tracker sensitive detector class.
void SetCheckOverlaps(G4bool)
Messenger class that defines commands for B2aDetectorConstruction.
G4GLOB_DLL std::ostream G4cout
virtual ~B2aDetectorConstruction()
G4UserLimits * fStepLimit
Definition of the B2aDetectorConstruction class.
static G4GeometryManager * GetInstance()
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4VPhysicalVolume * Construct()
G4LogicalVolume ** fLogicChamber
static G4ThreadLocal G4GlobalMagFieldMessenger * fMagFieldMessenger
B2aDetectorMessenger * fMessenger
void SetMaxStep(G4double)
void SetMaterial(G4Material *pMaterial)
void SetVisAttributes(const G4VisAttributes *pVA)
static G4GeometryTolerance * GetInstance()
G4VPhysicalVolume * DefineVolumes()