Go to the documentation of this file.00001
00007 #ifndef SiStripDigitizer_h
00008 #define SiStripDigitizer_h
00009
00010 #include <map>
00011 #include <memory>
00012 #include <string>
00013 #include <vector>
00014
00015 #include "SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h"
00016 #include "FWCore/Framework/interface/ESHandle.h"
00017
00018 namespace CLHEP {
00019 class HepRandomEngine;
00020 }
00021
00022 namespace edm {
00023 class EDProducer;
00024 class Event;
00025 class EventSetup;
00026 class ParameterSet;
00027 template<typename T> class Handle;
00028 }
00029
00030 class MagneticField;
00031 class PileUpEventPrincipal;
00032 class PSimHit;
00033 class SiStripDigitizerAlgorithm;
00034 class StripGeomDetUnit;
00035 class TrackerGeometry;
00036
00037 class SiStripDigitizer : public DigiAccumulatorMixMod {
00038 public:
00039 explicit SiStripDigitizer(const edm::ParameterSet& conf, edm::EDProducer& mixMod);
00040
00041 virtual ~SiStripDigitizer();
00042
00043 virtual void initializeEvent(edm::Event const& e, edm::EventSetup const& c);
00044 virtual void accumulate(edm::Event const& e, edm::EventSetup const& c);
00045 virtual void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c);
00046 virtual void finalizeEvent(edm::Event& e, edm::EventSetup const& c);
00047
00048 private:
00049 void accumulateStripHits(edm::Handle<std::vector<PSimHit> >);
00050
00051 typedef std::vector<std::string> vstring;
00052 typedef std::map<unsigned int, std::vector<std::pair<const PSimHit*, int> >,std::less<unsigned int> > simhit_map;
00053 typedef simhit_map::iterator simhit_map_iterator;
00054
00055 const std::string gainLabel;
00056 const std::string hitsProducer;
00057 const vstring trackerContainers;
00058 const std::string ZSDigi;
00059 const std::string SCDigi;
00060 const std::string VRDigi;
00061 const std::string PRDigi;
00062 const std::string geometryType;
00063 const bool useConfFromDB;
00064 const bool zeroSuppression;
00065
00066 std::unique_ptr<SiStripDigitizerAlgorithm> theDigiAlgo;
00067 std::map<uint32_t, std::vector<int> > theDetIdList;
00068 edm::ESHandle<TrackerGeometry> pDD;
00069 edm::ESHandle<MagneticField> pSetup;
00070 std::map<unsigned int, StripGeomDetUnit*> detectorUnits;
00071
00072 CLHEP::HepRandomEngine* rndEngine;
00073 };
00074
00075 #endif