CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DataMixingSiPixelMCDigiWorker.h
Go to the documentation of this file.
1 #ifndef DataMixingSiPixelMCDigiWorker_h
2 #define DataMixingSiPixelMCDigiWorker_h
3 
25 
26 //Data Formats
31 
36 
37 #include <map>
38 #include <vector>
39 #include <string>
40 
41 
42 namespace CLHEP {
43  class HepRandomEngine;
44 }
45 
46 
47 namespace edm
48 {
49  class ModuleCallingContext;
50 
52  {
53  public:
54 
56 
59 
62 
63  virtual void initializeEvent(edm::Event const& e, edm::EventSetup const& c); // override?
64 
65  void putSiPixel(edm::Event &e, edm::EventSetup const& iSetup, std::vector<PileupSummaryInfo> &ps, int &bs) ;
66  void addSiPixelSignals(const edm::Event &e);
67  void addSiPixelPileups(const int bcr, const edm::EventPrincipal*,unsigned int EventId, ModuleCallingContext const*);
68 
69  void setPileupInfo(const std::vector<PileupSummaryInfo> &ps, const int &bs); //this sets pu_scale
70 
71 
72  private:
73 
74  //
75  // PixelEfficiencies struct
76  //
82  double thePixelEfficiency[20]; // Single pixel effciency
83  double thePixelColEfficiency[20]; // Column effciency
84  double thePixelChipEfficiency[20]; // ROC efficiency
85  std::vector<double> theLadderEfficiency_BPix[20]; // Ladder efficiency
86  std::vector<double> theModuleEfficiency_BPix[20]; // Module efficiency
87  std::vector<double> thePUEfficiency[20]; // Instlumi dependent efficiency
88  double theInnerEfficiency_FPix[20]; // Fpix inner module efficiency
89  double theOuterEfficiency_FPix[20]; // Fpix outer module efficiency
90  unsigned int FPixIndex; // The Efficiency index for FPix Disks
91  };
92 
93  // Needed by dynamic inefficiency
94  // 0-3 BPix, 4-5 FPix (inner, outer)
95  double _pu_scale[20];
96 
97  // data specifiers
98 
99  edm::InputTag pixeldigi_collectionSig_ ; // secondary name given to collection of SiPixel digis
100  edm::InputTag pixeldigi_collectionPile_ ; // secondary name given to collection of SiPixel digis
101  std::string PixelDigiCollectionDM_ ; // secondary name to be given to new SiPixel digis
102 
105 
107 
108  //
109  // Internal typedefs
110 
111  typedef int Amplitude;
112  typedef std::map<int, Amplitude, std::less<int> > signal_map_type; // from Digi.Skel.
113  typedef signal_map_type::iterator signal_map_iterator; // from Digi.Skel.
114  typedef signal_map_type::const_iterator signal_map_const_iterator; // from Digi.Skel.
115  typedef std::map<uint32_t, signal_map_type> signalMaps;
116 
117  // Contains the accumulated hit info.
119 
120  typedef std::multimap<int, PixelDigi> OneDetectorMap; // maps by pixel ID for later combination - can have duplicate pixels
121  typedef std::map<uint32_t, OneDetectorMap> SiGlobalIndex; // map to all data for each detector ID
122 
124 
125 
126  // unsigned int eventId_; //=0 for signal, from 1-n for pileup events
127 
130 
131  //-- Allow for upgrades
132  const int NumberOfBarrelLayers; // Default = 3
133  const int NumberOfEndcapDisks; // Default = 2
134 
136  const double bunchScaleAt25;
137 
138  const bool AddPixelInefficiency; // bool to read in inefficiencies
139 
141 
142 
143  };
144 }//edm
145 
146 #endif
std::multimap< int, PixelDigi > OneDetectorMap
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > PixelDigiToken_
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
signal_map_type::const_iterator signal_map_const_iterator
std::map< int, Amplitude, std::less< int > > signal_map_type
tuple conf
Definition: dbtoconf.py:185
std::map< uint32_t, signal_map_type > signalMaps
void setPileupInfo(const std::vector< PileupSummaryInfo > &ps, const int &bs)
std::map< uint32_t, OneDetectorMap > SiGlobalIndex
void addSiPixelPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > PixelDigiPToken_
PixelEfficiencies(const edm::ParameterSet &conf, bool AddPixelInefficiency, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
void putSiPixel(edm::Event &e, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > &ps, int &bs)