CMS 3D CMS Logo

SiHitDigitizer.h
Go to the documentation of this file.
1 #ifndef _TRACKER_SiHitDigitizer_H_
2 #define _TRACKER_SiHitDigitizer_H_
3 
5 
11 #include "SiChargeDivider.h"
12 #include "SiInduceChargeOnStrips.h"
14 
16 
17 #include <map>
18 #include <memory>
19 
20 class TrackerTopology;
21 
22 class SiStripDetType;
23 
24 namespace CLHEP {
25  class HepRandomEngine;
26 }
27 
32 public:
33  SiHitDigitizer(const edm::ParameterSet& conf);
34 
35  ~SiHitDigitizer();
36 
37  void setChargeDivider(SiChargeDivider* cd) { theSiChargeDivider.reset(cd); }
38 
39  void setChargeCollectionDrifter(SiChargeCollectionDrifter* cd) { theSiChargeCollectionDrifter.reset(cd); }
40 
41  void setInduceChargeOnStrips(SiInduceChargeOnStrips* cd) { theSiInduceChargeOnStrips.reset(cd); }
42 
43  void setParticleDataTable(const ParticleDataTable* pdt) { theSiChargeDivider->setParticleDataTable(pdt); }
44 
45  void processHit(const PSimHit*,
46  const StripGeomDetUnit&,
48  float,
49  std::vector<float>&,
50  size_t&,
51  size_t&,
52  const TrackerTopology* tTopo,
53  CLHEP::HepRandomEngine*);
54 
55 private:
56  const double depletionVoltage;
57  const double chargeMobility;
58  std::unique_ptr<SiChargeDivider> theSiChargeDivider;
59  std::unique_ptr<SiChargeCollectionDrifter> theSiChargeCollectionDrifter;
60  std::unique_ptr<const SiInduceChargeOnStrips> theSiInduceChargeOnStrips;
61 
63 
64  LocalVector DriftDirection(const StripGeomDetUnit* _detp, GlobalVector _bfield, float langle) {
65  LocalVector Bfield = Frame(_detp->surface().position(), _detp->surface().rotation()).toLocal(_bfield);
66  return LocalVector(-langle * Bfield.y(), langle * Bfield.x(), 1.);
67  }
68 };
69 
70 #endif
Local3DVector LocalVector
Definition: LocalVector.h:12
LocalVector DriftDirection(const StripGeomDetUnit *_detp, GlobalVector _bfield, float langle)
HepPDT::ParticleDataTable ParticleDataTable
const double chargeMobility
T y() const
Definition: PV3DBase.h:63
const double depletionVoltage
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
void setParticleDataTable(const ParticleDataTable *pdt)
std::unique_ptr< const SiInduceChargeOnStrips > theSiInduceChargeOnStrips
std::unique_ptr< SiChargeCollectionDrifter > theSiChargeCollectionDrifter
void setInduceChargeOnStrips(SiInduceChargeOnStrips *cd)
const RotationType & rotation() const
T x() const
Definition: PV3DBase.h:62
const PositionType & position() const
void setChargeDivider(SiChargeDivider *cd)
GloballyPositioned< double > Frame
void setChargeCollectionDrifter(SiChargeCollectionDrifter *cd)
std::unique_ptr< SiChargeDivider > theSiChargeDivider