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 class RandomEngine;
43 
44 namespace edm {
45  class ParameterSet;
46  class Event;
47  class EventSetup;
48 }
49 
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);
71 
72  void matchHits( std::map<unsigned, edm::OwnVector<SiTrackerGSRecHit2D> >& theRecHits,
73  std::map<unsigned, edm::OwnVector<SiTrackerGSMatchedRecHit2D> >& matchedMap);//,
74  // MixCollection<PSimHit>& simhits);
75  // const edm::PSimHitContainer& simhits);
76  // std::vector<PSimHit>& simhits);
77  // edm::Handle<std::vector<PSimHit> >& simhits);
78 
79  void loadRecHits(std::map<unsigned,edm::OwnVector<SiTrackerGSRecHit2D> >& theRecHits,
80  SiTrackerGSRecHit2DCollection& theRecHitCollection) const;
81 
83  SiTrackerGSMatchedRecHit2DCollection& theRecHitCollection) const;
84 
85  void loadClusters(std::map<unsigned,edm::OwnVector<FastTrackerCluster> >& theClusterMap,
86  FastTrackerClusterCollection& theClusterCollection) const;
87 
88  private:
89  //
90  bool gaussianSmearing(const PSimHit& simHit,
92  LocalError& error,
93  unsigned& alphaMult,
94  unsigned& betaMult,
95  const TrackerTopology *tTopo);
96  //
97  void loadPixelData();
98  //
99  void loadPixelData(TFile* pixelDataFile, unsigned int nMultiplicity, std::string histName,
100  std::vector<TH1F*>& theMultiplicityCumulativeProbabilities, bool bigPixels = false);
101  //
102  //
103  // parameters
104  // std::vector<edm::InputTag> trackerContainers;
107  double deltaRaysPCut; // GeV/c
108  bool trackingPSimHits; // in case it is true make RecHit = replica of PSimHit without errors (1 um)
109  //
112 
113 
114  // Vector with the list of dead modules
115  std::vector<SiPixelQuality::disabledModuleType> * disabledModules;
117 
118 
119  // Switch between old (ORCA) and new (CMSSW) pixel parameterization
123 
126  //
127  // Pixel
134  //
135  // multiplicity bins
137  // internal vector: bins ; external vector: multiplicity
142  // resolution bins
144  unsigned int resAlphaBarrel_binN;
146  unsigned int resBetaBarrel_binN;
148  unsigned int resAlphaForward_binN;
150  unsigned int resBetaForward_binN;
151  //
154  //
155  // Strips
156  // TIB
165  //
170  //
171  // TID
178  //
182  //
183  // TOB
196  //
203  //
204  // TEC
219  //
227  //
228  // valid for all the detectors
230  //
231  // typedef std::map<unsigned int, std::vector<PSimHit>,std::less<unsigned int> > simhit_map;
232 
233  // Pixel Error Parametrization (barrel)
235  // Pixel Error Parametrization (barrel)
237  // Si Strip Error parametrization (generic)
239 
240  // Temporary RecHit map
241  // std::map< DetId, edm::OwnVector<SiTrackerGSRecHit2D> > temporaryRecHits;
242 
243  // Local correspondence between RecHits and SimHits
244  // typedef MixCollection<PSimHit>::iterator SimHiterator;
245  typedef edm::PSimHitContainer::const_iterator SimHiterator;
246  std::vector<SimHiterator> correspondingSimHit;
247 
248  // The random engine
250 
253  // Added for cluster reference
255 
256 };
257 
258 
259 #endif
void loadRecHits(std::map< unsigned, edm::OwnVector< SiTrackerGSRecHit2D > > &theRecHits, SiTrackerGSRecHit2DCollection &theRecHitCollection) const
SiStripGaussianSmearingRecHitConverterAlgorithm * theSiStripErrorParametrization
SiPixelGaussianSmearingRecHitConverterAlgorithm * thePixelEndcapParametrization
void loadClusters(std::map< unsigned, edm::OwnVector< FastTrackerCluster > > &theClusterMap, FastTrackerClusterCollection &theClusterCollection) const
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
dictionary map
Definition: Association.py:205
void smearHits(const edm::PSimHitContainer &input, std::map< unsigned, edm::OwnVector< SiTrackerGSRecHit2D > > &theRecHits, std::map< unsigned, edm::OwnVector< FastTrackerCluster > > &theClusters, const TrackerTopology *tTopo)
bool gaussianSmearing(const PSimHit &simHit, Local3DPoint &position, LocalError &error, unsigned &alphaMult, unsigned &betaMult, const TrackerTopology *tTopo)
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)
std::vector< PSimHit > PSimHitContainer
Definition: Run.h:36