Go to the documentation of this file.00001 #ifndef SimMuon_DTDigitizer_h
00002 #define SimMuon_DTDigitizer_h
00003
00014 #include "FWCore/Framework/interface/EDProducer.h"
00015
00016 #include "DataFormats/DTDigi/interface/DTDigiCollection.h"
00017 #include "SimDataFormats/DigiSimLinks/interface/DTDigiSimLinkCollection.h"
00018 #include "DataFormats/MuonDetId/interface/DTWireId.h"
00019
00020 #include "DataFormats/GeometryVector/interface/LocalVector.h"
00021
00022 #include <vector>
00023
00024 namespace CLHEP {
00025 class RandGaussQ;
00026 class RandFlat;
00027 }
00028
00029 class DTLayer;
00030 class PSimHit;
00031 class DTWireType;
00032 class DTBaseDigiSync;
00033 class DTTopology;
00034 class DTDigiSyncBase;
00035
00036
00037 namespace edm {class ParameterSet; class Event; class EventSetup;}
00038
00039 class DTDigitizer : public edm::EDProducer {
00040
00041 public:
00042
00043 explicit DTDigitizer(const edm::ParameterSet&);
00044 ~DTDigitizer();
00045 virtual void produce(edm::Event&, const edm::EventSetup&);
00046
00047 private:
00048 typedef std::pair<const PSimHit*,float> hitAndT;
00049 typedef std::vector<hitAndT> TDContainer;
00050
00051 typedef std::map<DTWireId, std::vector<const PSimHit*> > DTWireIdMap;
00052 typedef DTWireIdMap::iterator DTWireIdMapIter;
00053 typedef DTWireIdMap::const_iterator DTWireIdMapConstIter;
00054
00055
00056 struct hitLessT {
00057 bool operator()(const hitAndT & h1, const hitAndT & h2) {
00058 if (h1.second < h2.second) return true;
00059 return false;
00060 }
00061 };
00062
00063
00064
00065 std::pair<float,bool> computeTime(const DTLayer* layer,const DTWireId &wireId,
00066 const PSimHit *hit,
00067 const LocalVector &BLoc);
00068
00069
00070
00071
00072 std::pair<float,bool> driftTimeFromParametrization(float x, float alpha, float By,
00073 float Bz) const;
00074
00075
00076
00077 std::pair<float,bool> driftTimeFromTimeMap() const;
00078
00079
00080
00081 float externalDelays(const DTLayer* layer,
00082 const DTWireId &wireId,
00083 const PSimHit *hit) const;
00084
00085
00086
00087 void storeDigis(DTWireId &wireId,
00088 TDContainer &hits,
00089 DTDigiCollection &output, DTDigiSimLinkCollection &outputLinks);
00090
00091
00092 void dumpHit(const PSimHit * hit, float xEntry, float xExit, const DTTopology &topo);
00093
00094
00095 float asymGausSmear(double mean, double sigmaLeft, double sigmaRight) const;
00096
00097
00098 friend class DTDigitizerAnalysis;
00099
00100
00101 double vPropWire;
00102 float deadTime;
00103 float smearing;
00104 bool debug;
00105 bool interpolate;
00106 bool onlyMuHits;
00107
00108 std::string syncName;
00109 DTDigiSyncBase *theSync;
00110
00111 std::string geometryType;
00112
00113
00114 bool IdealModel;
00115 float theConstVDrift;
00116
00117
00118 CLHEP::RandGaussQ* theGaussianDistribution;
00119 CLHEP::RandFlat* theFlatDistribution;
00120
00121
00122 bool MultipleLinks;
00123 float LinksTimeWindow;
00124
00125
00126 std::string collection_for_XF;
00127
00128 };
00129 #endif