ElectronDriftAlg.h
Go to the documentation of this file.
1 //
2 // ElectronDriftAlg.h
3 //
4 // Algorithm base class for drifting electrons in an electric field
5 //
6 // Created by Brian Rebel on 11/18/16.
7 // Copyright © 2016 Brian Rebel. All rights reserved.
8 //
9 
10 #ifndef GAR_READOUTSIMULATION_ElectronDriftAlg_h
11 #define GAR_READOUTSIMULATION_ElectronDriftAlg_h
12 
13 #include <vector>
14 
15 #include "CLHEP/Random/RandGauss.h"
16 
17 
18 namespace fhicl {
19  class ParameterSet;
20 }
21 
22 namespace gar {
23 
24  namespace sdp{
25  class EnergyDeposit;
26  }
27 
28  namespace rosim{
29 
31 
32  public:
33 
35 
36  void Reset(std::vector<double> & xPos,
37  std::vector<double> & yPos,
38  std::vector<double> & zPos,
39  std::vector<double> & time,
40  std::vector<int > & size);
41 
42  std::vector<double> const& ClusterXPos() const { return fClusterXPos; }
43  std::vector<double> const& ClusterYPos() const { return fClusterYPos; }
44  std::vector<double> const& ClusterZPos() const { return fClusterZPos; }
45  std::vector<double> const& ClusterTime() const { return fClusterTime; }
46  std::vector<int > const& ClusterSize() const { return fClusterSize; }
47 
48  private:
49 
50  std::vector<double> fClusterXPos; ///< x positions of each cluster drifted
51  std::vector<double> fClusterYPos; ///< y positions of each cluster drifted
52  std::vector<double> fClusterZPos; ///< z positions of each cluster drifted
53  std::vector<double> fClusterTime; ///< arrival time of each cluster drifted
54  std::vector<int > fClusterSize; ///< size of each cluster drifted
55 
56  };
57 
59 
60  public:
61 
62  ElectronDriftAlg(CLHEP::HepRandomEngine & engine,
63  fhicl::ParameterSet const& pset);
64  virtual ~ElectronDriftAlg();
65 
66  // The user must call IonizationAndScintillation::Instance()->Reset(dep)
67  // from within the implementation of this method in the derived class
68  virtual void DriftElectronsToReadout(gar::sdp::EnergyDeposit const& dep,
69  gar::rosim::ElectronDriftInfo & driftInfo) = 0;
70 
71  protected:
72 
73  double fDriftVelocity; ///< electron drift velocity
74  double fInverseVelocity; ///< stored for computational convenience
75  double fLifetimeCorrection; ///< electron lifetime correction in negative ms
76  double fLongitudinalDiffusion; ///< diffusion along the drift in microns/sqrt(cm)
77  double fLongDiffConst; ///< stored for computational convenience in sqrt(cm)
78  double fTransverseDiffusion; ///< diffusion transverse to the drift in microns/sqrt(cm)
79  double fTransDiffConst; ///< stored for computational convenience in sqrt(cm)
80  double fFanoFactor; ///< Fano factor
81  CLHEP::HepRandomEngine& fEngine; ///< random number engine
82  };
83 
84  }
85 } // gar
86 
87 #endif /* GAR_READOUTSIMULATION_ElectronDriftAlg_h */
double fInverseVelocity
stored for computational convenience
double fFanoFactor
Fano factor.
std::vector< double > const & ClusterZPos() const
double fLongitudinalDiffusion
diffusion along the drift in microns/sqrt(cm)
std::vector< double > const & ClusterYPos() const
double fLongDiffConst
stored for computational convenience in sqrt(cm)
std::vector< double > const & ClusterXPos() const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
std::vector< double > fClusterXPos
x positions of each cluster drifted
CLHEP::HepRandomEngine & fEngine
random number engine
std::vector< double > fClusterYPos
y positions of each cluster drifted
std::vector< double > fClusterTime
arrival time of each cluster drifted
double fLifetimeCorrection
electron lifetime correction in negative ms
std::vector< int > fClusterSize
size of each cluster drifted
std::vector< double > fClusterZPos
z positions of each cluster drifted
General GArSoft Utilities.
double fTransDiffConst
stored for computational convenience in sqrt(cm)
double fDriftVelocity
electron drift velocity
std::vector< double > const & ClusterTime() const
std::vector< int > const & ClusterSize() const
double fTransverseDiffusion
diffusion transverse to the drift in microns/sqrt(cm)