CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiTrackerGaussianSmearingRecHitConverter.h
Go to the documentation of this file.
1 #ifndef FastSimulation_TrackingRecHitProducer_SiTrackerGaussianSmearingRecHitConverter_h
2 #define FastSimulation_TrackingRecHitProducer_SiTrackerGaussianSmearingRecHitConverter_h
3 
4 //---------------------------------------------------------------------------
9 //---------------------------------------------------------------------------
10 
11 // Framework
15 
16 // PSimHit
19 
20 // Data Formats
27 
28 // For Dead Channels
31 
32 // STL
33 #include <vector>
34 #include <map>
35 #include <string>
36 
37 class TFile;
38 class TH1F;
39 class TrackerGeometry;
42 
43 namespace edm {
44  class ParameterSet;
45  class Event;
46  class EventSetup;
47 }
48 
50 class TrackerTopology;
51 
53 {
54  public:
55  //--- Constructor, virtual destructor (just in case)
58 
59  //--- The top-level event method.
60  virtual void produce(edm::Event& e, const edm::EventSetup& c) override;
61 
62  // Begin Run
63  virtual void beginRun(edm::Run const& run, const edm::EventSetup & es) override;
64 
65  // void smearHits(MixCollection<PSimHit>& input,
67  // void smearHits(edm::Handle<std::vector<PSimHit> >& input,
68  std::map<unsigned, edm::OwnVector<SiTrackerGSRecHit2D> >& theRecHits,
69  std::map<unsigned, edm::OwnVector<FastTrackerCluster> >& theClusters,
70  const TrackerTopology *tTopo,
72 
73  void matchHits( std::map<unsigned, edm::OwnVector<SiTrackerGSRecHit2D> >& theRecHits,
74  std::map<unsigned, edm::OwnVector<SiTrackerGSMatchedRecHit2D> >& matchedMap);//,
75  // MixCollection<PSimHit>& simhits);
76  // const edm::PSimHitContainer& simhits);
77  // std::vector<PSimHit>& simhits);
78  // edm::Handle<std::vector<PSimHit> >& simhits);
79 
80  void loadRecHits(std::map<unsigned,edm::OwnVector<SiTrackerGSRecHit2D> >& theRecHits,
81  SiTrackerGSRecHit2DCollection& theRecHitCollection) const;
82 
84  SiTrackerGSMatchedRecHit2DCollection& theRecHitCollection) const;
85 
86  void loadClusters(std::map<unsigned,edm::OwnVector<FastTrackerCluster> >& theClusterMap,
87  FastTrackerClusterCollection& theClusterCollection) const;
88 
89  private:
90  //
91  bool gaussianSmearing(const PSimHit& simHit,
93  LocalError& error,
94  unsigned& alphaMult,
95  unsigned& betaMult,
96  const TrackerTopology *tTopo,
98  //
99  void loadPixelData();
100  //
101  void loadPixelData(TFile* pixelDataFile, unsigned int nMultiplicity, std::string histName,
102  std::vector<TH1F*>& theMultiplicityCumulativeProbabilities, bool bigPixels = false);
103  //
104  //
105  // parameters
106  // std::vector<edm::InputTag> trackerContainers;
110  double deltaRaysPCut; // GeV/c
111  bool trackingPSimHits; // in case it is true make RecHit = replica of PSimHit without errors (1 um)
112  //
115 
116 
117  // Vector with the list of dead modules
118  std::vector<SiPixelQuality::disabledModuleType> * disabledModules;
120 
121 
122  // Switch between old (ORCA) and new (CMSSW) pixel parameterization
126 
129  //
130  // Pixel
137  //
138  // multiplicity bins
140  // internal vector: bins ; external vector: multiplicity
145  // resolution bins
147  unsigned int resAlphaBarrel_binN;
149  unsigned int resBetaBarrel_binN;
151  unsigned int resAlphaForward_binN;
153  unsigned int resBetaForward_binN;
154  //
157  //
158  // Strips
159  // TIB
168  //
173  //
174  // TID
181  //
185  //
186  // TOB
199  //
206  //
207  // TEC
222  //
230  //
231  // valid for all the detectors
233  //
234  // typedef std::map<unsigned int, std::vector<PSimHit>,std::less<unsigned int> > simhit_map;
235 
236  // Pixel Error Parametrization (barrel)
238  // Pixel Error Parametrization (barrel)
240  // Si Strip Error parametrization (generic)
242 
243  // Temporary RecHit map
244  // std::map< DetId, edm::OwnVector<SiTrackerGSRecHit2D> > temporaryRecHits;
245 
246  // Local correspondence between RecHits and SimHits
247  // typedef MixCollection<PSimHit>::iterator SimHiterator;
248  typedef edm::PSimHitContainer::const_iterator SimHiterator;
249  std::vector<SimHiterator> correspondingSimHit;
250 
253  // Added for cluster reference
255 
256 
257 };
258 
259 
260 #endif
void loadRecHits(std::map< unsigned, edm::OwnVector< SiTrackerGSRecHit2D > > &theRecHits, SiTrackerGSRecHit2DCollection &theRecHitCollection) const
SiStripGaussianSmearingRecHitConverterAlgorithm * theSiStripErrorParametrization
bool gaussianSmearing(const PSimHit &simHit, Local3DPoint &position, LocalError &error, unsigned &alphaMult, unsigned &betaMult, const TrackerTopology *tTopo, RandomEngineAndDistribution const *)
SiPixelGaussianSmearingRecHitConverterAlgorithm * thePixelEndcapParametrization
void smearHits(const edm::PSimHitContainer &input, std::map< unsigned, edm::OwnVector< SiTrackerGSRecHit2D > > &theRecHits, std::map< unsigned, edm::OwnVector< FastTrackerCluster > > &theClusters, const TrackerTopology *tTopo, RandomEngineAndDistribution const *)
void loadClusters(std::map< unsigned, edm::OwnVector< FastTrackerCluster > > &theClusterMap, FastTrackerClusterCollection &theClusterCollection) const
static std::string const input
Definition: EdmProvDump.cc:43
void loadMatchedRecHits(std::map< unsigned, edm::OwnVector< SiTrackerGSMatchedRecHit2D > > &theRecHits, SiTrackerGSMatchedRecHit2DCollection &theRecHitCollection) const
SiPixelGaussianSmearingRecHitConverterAlgorithm * thePixelBarrelParametrization
std::vector< SiPixelQuality::disabledModuleType > * disabledModules
tuple conf
Definition: dbtoconf.py:185
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
virtual void beginRun(edm::Run const &run, const edm::EventSetup &es) override
void matchHits(std::map< unsigned, edm::OwnVector< SiTrackerGSRecHit2D > > &theRecHits, std::map< unsigned, edm::OwnVector< SiTrackerGSMatchedRecHit2D > > &matchedMap)
static int position[264][3]
Definition: ReadPGInfo.cc:509
std::vector< PSimHit > PSimHitContainer
Definition: Run.h:41