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;
73 class G4HCofThisEvent;
74 class G4TouchableHistory;
78 class HepRandomEngine;
85 unsigned short int Cryostat,
TPC;
106 template <
class IDTYPE>
115 const G4String& pName,
116 G4LogicalVolume* pLogical,
117 G4VPhysicalVolume* pMother,
120 G4bool pSurfChk =
false,
122 : G4PVPlacement(Transform3D, pName, pLogical, pMother, pMany, pCopyNo, pSurfChk), ID(id)
179 CLHEP::HepRandomEngine* propGen =
nullptr;
182 double offPlaneMargin = 0.0;
192 void Setup(
Setup_t const& setupData);
195 void SetSingleTPC(
unsigned int cryostat,
unsigned int tpc);
198 void SetDiscoverTPC();
204 virtual void EndOfEvent(G4HCofThisEvent*);
207 virtual void clear();
212 virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
216 virtual void DrawAll();
224 void ClearSimChannels();
227 std::vector<sim::SimChannel> GetSimChannels()
const;
230 std::vector<sim::SimChannel> GetSimChannels(
unsigned short cryo,
unsigned short tpc)
const;
234 const ChannelMap_t& GetSimChannelMap()
const;
235 ChannelMap_t& GetSimChannelMap();
240 const ChannelMap_t& GetSimChannelMap(
unsigned short cryo,
unsigned short tpc)
const;
241 ChannelMap_t& GetSimChannelMap(
unsigned short cryo,
unsigned short tpc);
253 fClockData = clockData;
274 fOffPlaneMargin =
std::max(margin, 0.0);
278 void SetRandomEngines(CLHEP::HepRandomEngine* pPropGen);
321 G4ThreeVector stepMidPoint,
322 const double simTime,
324 unsigned short int cryostat,
325 unsigned short int tpc);
328 Has(std::vector<unsigned short int> v,
unsigned short int tpc)
const 331 if (
c == tpc)
return true;
338 double fDriftVelocity[3];
347 double fOffPlaneMargin = 0.0;
357 CLHEP::HepRandomEngine* fPropGen =
nullptr;
363 void ProcessStep(G4Step*);
372 #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
art framework interface to geometry description
double fLongitudinalDiffusion
bool bSingleTPC
true if this readout is associated with a single TPC
ID_t ID
Physical Volume identificator.
bool operator<(ProductInfo const &a, ProductInfo const &b)
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.
General LArSoft Utilities.
static int max(int a, int b)
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.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
virtual ~G4PVPlacementWithID()
Virtual destructor: does nothing more.
void SetClockData(detinfo::DetectorClocksData const *const clockData) noexcept
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.
G4PVPlacementWithID(const G4Transform3D &Transform3D, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother, G4bool pMany, G4int pCopyNo, G4bool pSurfChk=false, ID_t id=ID_t())
Constructor.
Definitions of geometry vector data types.
Transports energy depositions from GEANT4 to TPC channels.
vector< vector< double > > clear
void SetPropertiesData(detinfo::DetectorPropertiesData const *const detProp) noexcept