52 #ifndef LArG4_LArVoxelReadout_h 53 #define LArG4_LArVoxelReadout_h 59 #include "Geant4/G4PVPlacement.hh" 60 #include "Geant4/G4VSensitiveDetector.hh" 68 class DetectorClocksData;
69 class DetectorPropertiesData;
74 class G4TouchableHistory;
78 class HepRandomEngine;
85 unsigned short int Cryostat,
TPC;
105 template <
class IDTYPE>
115 G4LogicalVolume* pLogical,
116 G4VPhysicalVolume* pMother,
119 G4bool pSurfChk =
false,
121 : G4PVPlacement(Transform3D, pName, pLogical, pMother, pMany, pCopyNo, pSurfChk), ID(id)
178 CLHEP::HepRandomEngine* propGen =
nullptr;
181 double offPlaneMargin = 0.0;
188 LArVoxelReadout(std::string
const& name,
unsigned int cryostat,
unsigned int tpc);
191 void Setup(
Setup_t const& setupData);
194 void SetSingleTPC(
unsigned int cryostat,
unsigned int tpc);
197 void SetDiscoverTPC();
206 virtual void clear();
211 virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
215 virtual void DrawAll();
223 void ClearSimChannels();
226 std::vector<sim::SimChannel> GetSimChannels()
const;
229 std::vector<sim::SimChannel> GetSimChannels(
unsigned short cryo,
unsigned short tpc)
const;
232 const ChannelMap_t& GetSimChannelMap()
const;
234 ChannelMap_t& GetSimChannelMap();
238 const ChannelMap_t& GetSimChannelMap(
unsigned short cryo,
unsigned short tpc)
const;
240 ChannelMap_t& GetSimChannelMap(
unsigned short cryo,
unsigned short tpc);
251 fClockData = clockData;
271 void SetRandomEngines(CLHEP::HepRandomEngine* pPropGen);
314 G4ThreeVector stepMidPoint,
315 const double simTime,
317 unsigned short int cryostat,
318 unsigned short int tpc,
321 bool Has(std::vector<unsigned short int> v,
unsigned short int tpc)
const 324 if (c == tpc)
return true;
331 double fDriftVelocity[3];
340 double fOffPlaneMargin = 0.0;
350 CLHEP::HepRandomEngine* fPropGen =
nullptr;
356 void ProcessStep(G4Step*);
365 #endif // LArG4_LArVoxelReadout_h void PrintAll(detinfo::DetectorPropertiesData const &detProp, std::string someText)
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.
art::ServiceHandle< sim::LArG4Parameters const > fLgpHandle
Handle to the LArG4 parameters service.
art::ServiceHandle< geo::Geometry const > fGeoHandle
Handle to the Geometry service.
int fMinNumberOfElCluster
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
Definitions of geometry vector data types.
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.
General LArSoft Utilities.
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.
void SetClockData(detinfo::DetectorClocksData const *const clockData) noexcept
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Contains all timing reference information for the detector.
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.
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.
Transports energy depositions from GEANT4 to TPC channels.
void SetPropertiesData(detinfo::DetectorPropertiesData const *const detProp) noexcept
bool operator<(const TPCID_t &than) const
art framework interface to geometry description