52 #ifndef LArG4_LArVoxelReadout_h 
   53 #define LArG4_LArVoxelReadout_h 
   59 #include "Geant4/G4PVPlacement.hh" 
   60 #include "Geant4/G4VSensitiveDetector.hh" 
   62 #include "art/Framework/Services/Registry/ServiceHandle.h" 
   68   class DetectorClocksData;
 
   69   class DetectorPropertiesData;
 
   73 class G4HCofThisEvent;
 
   74 class G4TouchableHistory;
 
   78   class HepRandomEngine;
 
  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)
 
  195     void SetSingleTPC(
unsigned int cryostat, 
unsigned int tpc);
 
  207     virtual void clear();
 
  212     virtual G4bool 
ProcessHits(G4Step*, G4TouchableHistory*);
 
  230     std::vector<sim::SimChannel> 
GetSimChannels(
unsigned short cryo, 
unsigned short tpc) 
const;
 
  321                                   G4ThreeVector stepMidPoint,
 
  322                                   const double simTime,
 
  324                                   unsigned short int cryostat,
 
  325                                   unsigned short int tpc,
 
  329     Has(std::vector<unsigned short int> v, 
unsigned short int tpc)
 const 
  332         if (c == tpc) 
return true;
 
  352     art::ServiceHandle<sim::LArG4Parameters const>
 
  373 #endif // LArG4_LArVoxelReadout_h 
CLHEP::HepRandomEngine * propGen
Random engine for charge propagation. 
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. 
const ChannelMap_t & GetSimChannelMap() const 
Returns the accumulated channel -> SimChannel map for the single TPC. 
LArVoxelReadout(std::string const &name)
Constructor. Can detect which TPC to cover by the name. 
void Setup(Setup_t const &setupData)
Reads all the configuration elements from setupData 
int fMinNumberOfElCluster
void SetRandomEngines(CLHEP::HepRandomEngine *pPropGen)
Sets the random generators to be used. 
detinfo::DetectorClocksData const * fClockData
unsigned short int Cryostat
double fLongitudinalDiffusion
bool bSingleTPC
true if this readout is associated with a single TPC 
ID_t ID
Physical Volume identificator. 
void ProcessStep(G4Step *)
geo::Point_t RecoverOffPlaneDeposit(geo::Point_t const &pos, geo::PlaneGeo const &plane) const 
Returns the point on the specified plane closest to position. 
void SetSingleTPC(unsigned int cryostat, unsigned int tpc)
Associates this readout to one specific TPC. 
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. 
void DriftIonizationElectrons(detinfo::DetectorClocksData const &clockData, G4ThreeVector stepMidPoint, const double simTime, int trackID, unsigned short int cryostat, unsigned short int tpc, int origTrackID)
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
std::vector< sim::SimChannel > GetSimChannels() const 
Creates a list with the accumulated information for the single TPC. 
detinfo::DetectorPropertiesData const * fDetProp
G4PVPlacementWithID< TPCID_t > G4PVPlacementInTPC
A physical volume with a TPC ID. 
bool Has(std::vector< unsigned short int > v, unsigned short int tpc) const 
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *)
std::vector< std::vector< ChannelMap_t > > fChannelMaps
Maps of cryostat, tpc to channel data. 
Simple structure holding a TPC and cryostat number. 
virtual void EndOfEvent(G4HCofThisEvent *)
double fOffPlaneMargin
Charge deposited within this many [cm] from the plane is lead onto it. 
void SetDiscoverTPC()
Sets this readout to discover the TPC of each processed hit. 
virtual ~G4PVPlacementWithID()
Virtual destructor: does nothing more. 
void SetClockData(detinfo::DetectorClocksData const *const clockData) noexcept
double offPlaneMargin
Margin for charge recovery (see LArVoxelReadout). 
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. 
CLHEP::HepRandomEngine * fPropGen
random engine for charge propagation 
object containing MC truth information necessary for making RawDigits and doing back tracking ...
virtual void Initialize(G4HCofThisEvent *)
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 
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