42 #ifndef LArG4_LArVoxelReadout_h 43 #define LArG4_LArVoxelReadout_h 49 #include "Geant4/G4VSensitiveDetector.hh" 50 #include "Geant4/G4PVPlacement.hh" 51 #include "Geant4/globals.hh" 64 class G4TouchableHistory;
66 namespace CLHEP {
class HEPRandomEngine; }
72 unsigned short int Cryostat,
TPC;
76 || ((Cryostat == than.
Cryostat) && (TPC < than.
TPC));
93 template <
class IDTYPE>
102 G4LogicalVolume* pLogical, G4VPhysicalVolume* pMother,
103 G4bool pMany, G4int pCopyNo, G4bool pSurfChk =
false,
107 (Transform3D, pName, pLogical, pMother, pMany, pCopyNo, pSurfChk),
167 CLHEP::HepRandomEngine* propGen =
nullptr;
170 double offPlaneMargin = 0.0;
179 (std::string
const& name,
unsigned int cryostat,
unsigned int tpc);
185 void Setup(
Setup_t const& setupData);
188 void SetSingleTPC(
unsigned int cryostat,
unsigned int tpc);
191 void SetDiscoverTPC();
200 virtual void clear();
205 virtual G4bool ProcessHits( G4Step*, G4TouchableHistory* );
209 virtual void DrawAll();
210 virtual void PrintAll();
217 void ClearSimChannels();
220 std::vector<sim::SimChannel> GetSimChannels()
const;
223 std::vector<sim::SimChannel> GetSimChannels
224 (
unsigned short cryo,
unsigned short tpc)
const;
227 const ChannelMap_t& GetSimChannelMap()
const;
229 ChannelMap_t& GetSimChannelMap();
233 const ChannelMap_t& GetSimChannelMap
235 (
unsigned short cryo,
unsigned short tpc)
const;
236 ChannelMap_t& GetSimChannelMap(
unsigned short cryo,
unsigned short tpc);
252 { fOffPlaneMargin =
std::max(margin, 0.0); }
255 void SetRandomEngines(CLHEP::HepRandomEngine* pPropGen);
299 void DriftIonizationElectrons(G4ThreeVector stepMidPoint,
300 const double simTime,
302 unsigned short int cryostat,
unsigned short int tpc);
304 bool Has(std::vector<unsigned short int> v,
unsigned short int tpc)
const 306 for (
auto c: v)
if (c == tpc)
return true;
313 double fDriftVelocity[3];
325 double fOffPlaneMargin = 0.0;
334 CLHEP::HepRandomEngine* fPropGen =
nullptr;
339 void ProcessStep(G4Step*);
348 #endif // LArG4_LArVoxelReadout_h Store parameters for running LArG4.
unsigned int fTPC
which TPC this LArVoxelReadout corresponds to
double fTransverseDiffusion
Collection of what it takes to set a LArVoxelReadout up.
A G4PVPlacement with an additional identificator.
bool operator<(CryostatID const &a, CryostatID const &b)
Order cryostats with increasing ID.
art::ServiceHandle< sim::LArG4Parameters > fLgpHandle
Handle to the LArG4 parameters service.
int fMinNumberOfElCluster
art::ServiceHandle< geo::Geometry > fGeoHandle
Handle to the Geometry service.
unsigned short int Cryostat
double fLongitudinalDiffusion
bool bSingleTPC
true if this readout is associated with a single TPC
ID_t ID
Physical Volume identificator.
std::map< unsigned int, sim::SimChannel > ChannelMap_t
Type of map channel -> sim::SimChannel.
double fElectronClusterSize
std::vector< unsigned short int > fSkipWireSignalInTPCs
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
G4PVPlacementWithID< TPCID_t > G4PVPlacementInTPC
A physical volume with a TPC ID.
bool Has(std::vector< unsigned short int > v, unsigned short int tpc) const
std::vector< std::vector< ChannelMap_t > > fChannelMaps
Maps of cryostat, tpc to channel data.
Simple structure holding a TPC and cryostat number.
virtual ~G4PVPlacementWithID()
Virtual destructor: does nothing more.
unsigned int fCstat
and in which cryostat (if bSingleTPC is true)
void SetOffPlaneChargeRecoveryMargin(double margin)
Sets the margin for recovery of charge drifted off-plane.
Singleton to access a unified treatment of ionization and scintillation in LAr.
object containing MC truth information necessary for making RawDigits and doing back tracking ...
G4PVPlacementWithID(const G4Transform3D &Transform3D, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother, G4bool pMany, G4int pCopyNo, G4bool pSurfChk=false, ID_t id=ID_t())
Constructor.
::detinfo::ElecClock fClock
TPC electronics clock.
Transports energy depositions from GEANT4 to TPC channels.
Class representing the time measured by an electronics clock.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
art framework interface to geometry description
Encapsulate the construction of a single detector plane.