00001 #ifndef SiStripDigitizerAlgorithm_h
00002 #define SiStripDigitizerAlgorithm_h
00003
00010 #include <string>
00011
00012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00013
00014 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00015 #include "SimTracker/SiStripDigitizer/interface/SiTrivialDigitalConverter.h"
00016 #include "SimTracker/SiStripDigitizer/interface/SiGaussianTailNoiseAdder.h"
00017 #include "SimTracker/SiStripDigitizer/interface/SiHitDigitizer.h"
00018 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00019 #include "DataFormats/DetId/interface/DetId.h"
00020 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
00021 #include "Geometry/CommonTopologies/interface/StripTopology.h"
00022 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00023 #include "SimGeneral/NoiseGenerators/interface/GaussianTailNoiseGenerator.h"
00024 #include "DataFormats/Common/interface/DetSet.h"
00025 #include "DataFormats/SiStripDigi/interface/SiStripDigi.h"
00026 #include "DataFormats/SiStripDigi/interface/SiStripRawDigi.h"
00027 #include "SimDataFormats/TrackerDigiSimLink/interface/StripDigiSimLink.h"
00028 #include "CondFormats/SiStripObjects/interface/SiStripNoises.h"
00029 #include "CondFormats/SiStripObjects/interface/SiStripPedestals.h"
00030 #include "CondFormats/SiStripObjects/interface/SiStripThreshold.h"
00031 #include "CalibFormats/SiStripObjects/interface/SiStripGain.h"
00032 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00033 #include "CommonTools/SiStripZeroSuppression/interface/SiStripFedZeroSuppression.h"
00034
00035 namespace CLHEP {
00036 class HepRandomEngine;
00037 }
00038
00039 class SiStripDigitizerAlgorithm
00040 {
00041 public:
00042
00043 typedef SiDigitalConverter::DigitalVecType DigitalVecType;
00044 typedef SiDigitalConverter::DigitalRawVecType DigitalRawVecType;
00045 typedef SiPileUpSignals::signal_map_type signal_map_type;
00046 typedef SiPileUpSignals::HitToDigisMapType HitToDigisMapType;
00047 typedef SiPileUpSignals::HitCounterToDigisMapType HitCounterToDigisMapType;
00048 typedef std::map< int, float, std::less<int> > hit_map_type;
00049 typedef float Amplitude;
00050
00051
00052 std::vector<StripDigiSimLink> link_coll;
00053 std::vector<StripDigiSimLink> make_link(){ return link_coll;}
00054
00055
00056 SiStripDigitizerAlgorithm(const edm::ParameterSet& conf, CLHEP::HepRandomEngine&);
00057
00058 ~SiStripDigitizerAlgorithm();
00059
00060
00061
00062
00063 void run(edm::DetSet<SiStripDigi>&,edm::DetSet<SiStripRawDigi>&,const std::vector<std::pair<PSimHit, int > > &, StripGeomDetUnit *,GlobalVector,
00064 float , edm::ESHandle<SiStripGain> &,edm::ESHandle<SiStripThreshold> &, edm::ESHandle<SiStripNoises> &, edm::ESHandle<SiStripPedestals> &);
00065
00066 void setParticleDataTable(const ParticleDataTable * pdt);
00067
00068 private:
00069 edm::ParameterSet conf_;
00070
00071 float theElectronPerADC;
00072 float theThreshold;
00073 bool peakMode;
00074 bool noise;
00075 int theFedAlgo;
00076 bool zeroSuppression;
00077 float theTOFCutForPeak;
00078 float theTOFCutForDeconvolution;
00079 float tofCut;
00080
00081
00082 SiHitDigitizer* theSiHitDigitizer;
00083 SiPileUpSignals* theSiPileUpSignals;
00084 SiGaussianTailNoiseAdder* theSiNoiseAdder;
00085 SiTrivialDigitalConverter* theSiDigitalConverter;
00086 SiStripFedZeroSuppression* theSiZeroSuppress;
00087
00088 int numStrips;
00089 int strip;
00090 float noiseRMS;
00091 float pedValue;
00092 float cosmicShift;
00093
00094 void push_link(const DigitalVecType&,
00095 const HitToDigisMapType&,
00096 const HitCounterToDigisMapType&,
00097 const SiPileUpSignals::signal_map_type&,
00098 unsigned int);
00099
00100 void push_link_raw(const DigitalRawVecType&,
00101 const HitToDigisMapType&,
00102 const HitCounterToDigisMapType&,
00103 const SiPileUpSignals::signal_map_type&,
00104 unsigned int);
00105
00106 void push_link(const DigitalVecType&,
00107 const HitToDigisMapType&,
00108 const HitCounterToDigisMapType&,
00109 const std::vector<double>&,
00110 unsigned int);
00111
00112 void push_link_raw(const DigitalRawVecType&,
00113 const HitToDigisMapType&,
00114 const HitCounterToDigisMapType&,
00115 const std::vector<double>&,
00116 unsigned int);
00117
00118 CLHEP::HepRandomEngine& rndEngine;
00119
00120 DigitalVecType digis;
00121 DigitalRawVecType rawdigis;
00122 };
00123
00124 #endif