Go to the documentation of this file.00001 #ifndef _TRACKER_SiHitDigitizer_H_
00002 #define _TRACKER_SiHitDigitizer_H_
00003
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005
00006 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
00007 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00008 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00009 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00010 #include "SiChargeCollectionDrifter.h"
00011 #include "SiChargeDivider.h"
00012 #include "SiInduceChargeOnStrips.h"
00013 #include "SiPileUpSignals.h"
00014
00015 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00016
00017 #include <map>
00018 #include <memory>
00019
00020 class TrackerTopology;
00021
00022 namespace CLHEP {
00023 class HepRandomEngine;
00024 }
00025
00026 class SiStripDetType;
00030 class SiHitDigitizer {
00031 public:
00032
00033 SiHitDigitizer(const edm::ParameterSet& conf,CLHEP::HepRandomEngine&);
00034
00035 ~SiHitDigitizer();
00036
00037 void setChargeDivider(SiChargeDivider* cd) {
00038 theSiChargeDivider.reset(cd);
00039 }
00040
00041 void setChargeCollectionDrifter(SiChargeCollectionDrifter* cd) {
00042 theSiChargeCollectionDrifter.reset(cd);
00043 }
00044
00045 void setInduceChargeOnStrips(SiInduceChargeOnStrips* cd) {
00046 theSiInduceChargeOnStrips.reset(cd);
00047 }
00048
00049 void setParticleDataTable(const ParticleDataTable * pdt) {
00050 theSiChargeDivider->setParticleDataTable(pdt);
00051 }
00052
00053 void processHit(const PSimHit*, const StripGeomDetUnit&, GlobalVector,float,
00054 std::vector<float>&, size_t&, size_t&,
00055 const TrackerTopology *tTopo);
00056
00057 private:
00058 const double depletionVoltage;
00059 const double chargeMobility;
00060 std::unique_ptr<SiChargeDivider> theSiChargeDivider;
00061 std::unique_ptr<SiChargeCollectionDrifter> theSiChargeCollectionDrifter;
00062 std::unique_ptr<const SiInduceChargeOnStrips> theSiInduceChargeOnStrips;
00063
00064 typedef GloballyPositioned<double> Frame;
00065
00066 LocalVector DriftDirection(const StripGeomDetUnit* _detp, GlobalVector _bfield, float langle) {
00067 LocalVector Bfield=Frame(_detp->surface().position(),_detp->surface().rotation()).toLocal(_bfield);
00068 return LocalVector(-langle * Bfield.y(),langle * Bfield.x(),1.);
00069 }
00070
00071 };
00072
00073 #endif