CMS 3D CMS Logo

MillePedeDQMModule.h
Go to the documentation of this file.
1 #ifndef Alignment_MillePedeAlignmentAlgorithm_MillePedeDQMModule_h
2 #define Alignment_MillePedeAlignmentAlgorithm_MillePedeDQMModule_h
3 
14 /*** system includes ***/
15 #include <array>
16 #include <memory>
17 
18 /*** core framework functionality ***/
28 
29 /*** Geometry ***/
35 
36 /*** Thresholds from DB ***/
38 
39 /*** Quality from DB ***/
42 
43 /*** DQM ***/
46 
47 /*** Records for ESWatcher ***/
53 
54 /*** MillePede ***/
56 
58  //========================== PUBLIC METHODS ==================================
59 public: //====================================================================
61  ~MillePedeDQMModule() override = default;
62 
64 
65  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
66 
67  enum { SIZE_LG_STRUCTS = 6, SIZE_HG_STRUCTS = 820, SIZE_INDEX = 8 };
68 
69  //========================= PRIVATE METHODS ==================================
70 private: //===================================================================
71  void beginRun(const edm::Run&, const edm::EventSetup&) override;
72 
74 
75  void fillStatusHisto(MonitorElement* statusHisto);
76 
77  void fillStatusHistoHG(MonitorElement* statusHisto);
78 
79  void fillExpertHistos();
80 
81  void fillExpertHistos_HG();
82 
84  const std::array<double, SIZE_INDEX>& cut,
85  const std::array<double, SIZE_INDEX>& sigCut,
86  const std::array<double, SIZE_INDEX>& maxMoveCut,
87  const std::array<double, SIZE_INDEX>& maxErrorCut,
88  const std::array<double, SIZE_LG_STRUCTS>& obs,
89  const std::array<double, SIZE_LG_STRUCTS>& obsErr);
90 
91  void fillExpertHisto_HG(std::map<std::string, MonitorElement*>& histo_map,
92  const std::array<double, SIZE_INDEX>& cut,
93  const std::array<double, SIZE_INDEX>& sigCut,
94  const std::array<double, SIZE_INDEX>& maxMoveCut,
95  const std::array<double, SIZE_INDEX>& maxErrorCut,
96  const std::array<double, SIZE_HG_STRUCTS>& obs,
97  const std::array<double, SIZE_HG_STRUCTS>& obsErr);
98 
99  bool setupChanged(const edm::EventSetup&);
100  int getIndexFromString(const std::string& alignableId);
101 
102  //========================== PRIVATE DATA ====================================
103  //============================================================================
104 
105  // esConsumes
113 
116  std::unique_ptr<AlignableTracker> tracker_;
117  std::unique_ptr<MillePedeFileReader> mpReader_;
118  std::shared_ptr<PixelTopologyMap> pixelTopologyMap_;
119  std::shared_ptr<SiPixelQuality> pixelQuality_;
120 
121  std::vector<std::pair<std::string, int>> layerVec;
122 
126 
127  // Histograms
134 
135  std::map<std::string, MonitorElement*> h_xPos_HG;
136  std::map<std::string, MonitorElement*> h_xRot_HG;
137  std::map<std::string, MonitorElement*> h_yPos_HG;
138  std::map<std::string, MonitorElement*> h_yRot_HG;
139  std::map<std::string, MonitorElement*> h_zPos_HG;
140  std::map<std::string, MonitorElement*> h_zRot_HG;
141 
146 
147  bool isHG_;
148 };
149 
150 // define this as a plug-in
152 
153 #endif /* Alignment_MillePedeAlignmentAlgorithm_MillePedeDQMModule_h */
void fillExpertHisto(MonitorElement *histo, const std::array< double, SIZE_INDEX > &cut, const std::array< double, SIZE_INDEX > &sigCut, const std::array< double, SIZE_INDEX > &maxMoveCut, const std::array< double, SIZE_INDEX > &maxErrorCut, const std::array< double, SIZE_LG_STRUCTS > &obs, const std::array< double, SIZE_LG_STRUCTS > &obsErr)
const edm::ParameterSet mpReaderConfig_
std::shared_ptr< SiPixelQuality > pixelQuality_
void fillStatusHisto(MonitorElement *statusHisto)
std::map< std::string, MonitorElement * > h_xRot_HG
std::vector< std::pair< std::string, int > > layerVec
std::map< std::string, MonitorElement * > h_yPos_HG
bool setupChanged(const edm::EventSetup &)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
MonitorElement * h_zPos
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > gDetToken_
std::map< std::string, MonitorElement * > h_zRot_HG
MonitorElement * binariesAvalaible
edm::ESWatcher< IdealGeometryRecord > watchIdealGeometryRcd_
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
MonitorElement * isVetoed
MillePedeDQMModule(const edm::ParameterSet &)
std::map< std::string, MonitorElement * > h_yRot_HG
void bookHistograms(DQMStore::IBooker &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::map< std::string, MonitorElement * > h_xPos_HG
MonitorElement * h_xPos
void beginRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * h_yPos
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::shared_ptr< PixelTopologyMap > pixelTopologyMap_
const edm::ESGetToken< AlignPCLThresholdsHG, AlignPCLThresholdsHGRcd > aliThrToken_
MonitorElement * statusResults
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESWatcher< TrackerTopologyRcd > watchTrackerTopologyRcd_
edm::ESWatcher< PTrackerParametersRcd > watchPTrackerParametersRcd_
MonitorElement * h_xRot
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
std::unique_ptr< AlignableTracker > tracker_
std::unique_ptr< MillePedeFileReader > mpReader_
int getIndexFromString(const std::string &alignableId)
MonitorElement * h_zRot
MonitorElement * exitCode
std::map< std::string, MonitorElement * > h_zPos_HG
const edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcd > siPixelQualityToken_
const std::string outputFolder_
void fillStatusHistoHG(MonitorElement *statusHisto)
~MillePedeDQMModule() override=default
MonitorElement * h_yRot
Definition: Run.h:45
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void fillExpertHisto_HG(std::map< std::string, MonitorElement *> &histo_map, const std::array< double, SIZE_INDEX > &cut, const std::array< double, SIZE_INDEX > &sigCut, const std::array< double, SIZE_INDEX > &maxMoveCut, const std::array< double, SIZE_INDEX > &maxErrorCut, const std::array< double, SIZE_HG_STRUCTS > &obs, const std::array< double, SIZE_HG_STRUCTS > &obsErr)