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;
109  double deltaRaysPCut; // GeV/c
110  bool trackingPSimHits; // in case it is true make RecHit = replica of PSimHit without errors (1 um)
111  //
114 
115 
116  // Vector with the list of dead modules
117  std::vector<SiPixelQuality::disabledModuleType> * disabledModules;
119 
120 
121  // Switch between old (ORCA) and new (CMSSW) pixel parameterization
125 
128  //
129  // Pixel
136  //
137  // multiplicity bins
139  // internal vector: bins ; external vector: multiplicity
144  // resolution bins
146  unsigned int resAlphaBarrel_binN;
148  unsigned int resBetaBarrel_binN;
150  unsigned int resAlphaForward_binN;
152  unsigned int resBetaForward_binN;
153  //
156  //
157  // Strips
158  // TIB
167  //
172  //
173  // TID
180  //
184  //
185  // TOB
198  //
205  //
206  // TEC
221  //
229  //
230  // valid for all the detectors
232  //
233  // typedef std::map<unsigned int, std::vector<PSimHit>,std::less<unsigned int> > simhit_map;
234 
235  // Pixel Error Parametrization (barrel)
237  // Pixel Error Parametrization (barrel)
239  // Si Strip Error parametrization (generic)
241 
242  // Temporary RecHit map
243  // std::map< DetId, edm::OwnVector<SiTrackerGSRecHit2D> > temporaryRecHits;
244 
245  // Local correspondence between RecHits and SimHits
246  // typedef MixCollection<PSimHit>::iterator SimHiterator;
247  typedef edm::PSimHitContainer::const_iterator SimHiterator;
248  std::vector<SimHiterator> correspondingSimHit;
249 
252  // Added for cluster reference
254 
255 };
256 
257 
258 #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 int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
static std::string const input
Definition: EdmProvDump.cc:44
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:41