CMS 3D CMS Logo

SiPixelChargeReweightingAlgorithm.h
Go to the documentation of this file.
1 #ifndef SimTracker_SiPixelDigitizer_SiPixelChargeReweightingAlgorithm_h
2 #define SimTracker_SiPixelDigitizer_SiPixelChargeReweightingAlgorithm_h
3 
8 
9 // forward declarations
10 class DetId;
12 class PixelDigi;
13 class PixelDigiSimLink;
14 class PixelGeomDetUnit;
16 
18 public:
21 
22  // initialization that cannot be done in the constructor
23  void init(const edm::EventSetup& es);
24 
25  typedef std::map<int, SiPixelDigitizerAlgorithm::Amplitude, std::less<int> > signal_map_type; // from Digi.Skel.
26  typedef signal_map_type::iterator signal_map_iterator; // from Digi.Skel.
27  typedef signal_map_type::const_iterator signal_map_const_iterator; // from Digi.Skel.
28 
29  bool hitSignalReweight(const PSimHit& hit,
30  std::map<int, float, std::less<int> >& hit_signal,
31  const size_t hitIndex,
32  const size_t hitIndex4CR,
33  const unsigned int tofBin,
34  const PixelTopology* topol,
35  uint32_t detID,
36  signal_map_type& theSignal,
37  unsigned short int processType,
38  const bool& boolmakeDigiSimLinks);
39 
40  bool lateSignalReweight(const PixelGeomDetUnit* pixdet,
41  std::vector<PixelDigi>& digis,
42  PixelSimHitExtraInfo& loopTempSH,
43  signal_map_type& theNewDigiSignal,
44  const TrackerTopology* tTopo,
45  CLHEP::HepRandomEngine* engine);
46 
47 private:
48  // Internal typedef
49  typedef std::map<uint32_t, signal_map_type> signalMaps;
51  typedef std::vector<edm::ParameterSet> Parameters;
52  typedef boost::multi_array<float, 2> array_2d;
53 
54  std::vector<SiPixelTemplateStore2D> templateStores_;
55 
56  // Variables and objects for the charge reweighting using 2D templates
58  std::vector<bool> xdouble;
59  std::vector<bool> ydouble;
60  std::vector<float> track;
61  int IDnum, IDden;
62 
63  const bool UseReweighting;
65  const bool PrintClusters;
66  const bool PrintTemplates;
67 
68  static constexpr float cmToMicrons = 10000.f;
69 
74 
75  // methods for charge reweighting in irradiated sensors
76  int PixelTempRewgt2D(int id_gen, int id_rewgt, array_2d& cluster);
77  void printCluster(array_2d& cluster);
78  void printCluster(float arr[BXM2][BYM2]);
79  void printCluster(float arr[TXSIZE][TYSIZE]);
80 };
81 
82 #endif
edm::ESGetToken< SiPixel2DTemplateDBObject, SiPixel2DTemplateDBObjectRcd > SiPixel2DTemp_num_token_
#define TXSIZE
bool lateSignalReweight(const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, PixelSimHitExtraInfo &loopTempSH, signal_map_type &theNewDigiSignal, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *engine)
std::map< int, SiPixelDigitizerAlgorithm::Amplitude, std::less< int > > signal_map_type
const SiPixel2DTemplateDBObject * dbobject_den
std::map< uint32_t, signal_map_type > signalMaps
#define BXM2
#define BYM2
signal_map_type::const_iterator signal_map_const_iterator
const SiPixel2DTemplateDBObject * dbobject_num
Definition: DetId.h:17
int PixelTempRewgt2D(int id_gen, int id_rewgt, array_2d &cluster)
#define TYSIZE
SiPixelChargeReweightingAlgorithm(const edm::ParameterSet &conf, edm::ConsumesCollector iC)
edm::ESGetToken< SiPixel2DTemplateDBObject, SiPixel2DTemplateDBObjectRcd > SiPixel2DTemp_den_token_
std::vector< SiPixelTemplateStore2D > templateStores_
bool hitSignalReweight(const PSimHit &hit, std::map< int, float, std::less< int > > &hit_signal, const size_t hitIndex, const size_t hitIndex4CR, const unsigned int tofBin, const PixelTopology *topol, uint32_t detID, signal_map_type &theSignal, unsigned short int processType, const bool &boolmakeDigiSimLinks)