| Message: Multiple Layer Detectors. How to declare sensitive in the READOUT_GEOMETRY? | Not Logged In (login) |
|
Dear Experts/Geant4 Users,
I am working on a project using 3 or 5 Layers of scintillator bars. Each Layer has a Horizontal and Vertical ReadOut Planes, and each plane is composed of many scintillator bars with dimension 1 cm x 2 cm x 240 cm. The situation is similar to the one reported in the forum: http://hypernews.slac.stanford.edu:5090/HyperNews/geant4/get/geometry/115/2.html Since each layer is separated by some distance, the concept of parameterisation may applied on the Layer Placements, while the concept of replication is useful within the specific planes. I wrote a code below for the X-read out of the HORIZONTAL plane only.
//----------------- // The X-READOUT //-----------------
G4VSolid * oneXRO_Box
= new G4Box("oneXRO_Box",firstLength/2,AbsThick/2,AbsHeight/2);
G4LogicalVolume * oneXRO_Box_log
= new G4LogicalVolume(oneXRO_Box,Vacuum,"oneXRO_L",0,0,0);
G4VPhysicalVolume * oneXRO_Box_phys =
new G4PVPlacement(0,
G4ThreeVector(0.0*cm,AbsThick/2,0.0*cm),
oneXRO_Box_log,
"oneXRO_P",
logicChamber,false,0);
G4Box* solidAbsX = new G4Box("AbsX", //its name
AbsWidth/2,AbsThick/2,AbsHeight/2); //its size
G4LogicalVolume* logicAbsX
= new G4LogicalVolume(solidAbsX, //its solid
Scinti, //its material
"logAbsX"); //its name
G4double nXDivNs = int(firstLength/AbsWidth);
//G4VPhysicalVolume * physiAbsReplicasX =
new G4PVReplica("physicalAbsReplicasX",
logicAbsX,
oneXRO_Box_phys,
kXAxis,nXDivNs,AbsWidth);
//-----------------
// The Y-READOUT
//-----------------
etc.....
======================================================================== Questions: (1) How do we write/declare these Layers/Planes as sensitive in the detector construction? I mean, should I write two separate SD files? (e.g, xReadOutSD.{hh,cc} and yReadOutSD.{hh,cc}). Is there other way of doing this? (2) Since I need a read out geometry, I wrote/modify the codes above for the READOUTGeometry for BOTH X- & Y- readouts. How do we declare the two planes as sensitive? Is the ff. OK?
myDummySD *dummySD = new myDummySD; ROlogicAbsX->SetSensitiveDetector(dummySD); ROlogicAbsY->SetSensitiveDetector(dummySD); return ROWorldPhys; where ROlogicAbsX/ROlogicAbsY is the logical component of a single scintillator bar, which will be replicated. (3) Is there other ways of constructing this detector? THANK YOU. Kalitan
|
|
to: |