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 ***/
26 
27 /*** Geometry ***/
33 
34 /*** Thresholds from DB ***/
36 
37 /*** DQM ***/
40 
41 /*** Records for ESWatcher ***/
47 
48 /*** MillePede ***/
50 
52  //========================== PUBLIC METHODS ==================================
53 public: //====================================================================
55  ~MillePedeDQMModule() override;
56 
58 
59  enum { SIZE_LG_STRUCTS = 6, SIZE_HG_STRUCTS = 820, SIZE_INDEX = 8 };
60 
61  //========================= PRIVATE METHODS ==================================
62 private: //===================================================================
63  void beginRun(const edm::Run&, const edm::EventSetup&) override;
64 
66 
67  void fillStatusHisto(MonitorElement* statusHisto);
68 
69  void fillStatusHistoHG(MonitorElement* statusHisto);
70 
71  void fillExpertHistos();
72 
73  void fillExpertHistos_HG();
74 
76  const std::array<double, SIZE_INDEX>& cut,
77  const std::array<double, SIZE_INDEX>& sigCut,
78  const std::array<double, SIZE_INDEX>& maxMoveCut,
79  const std::array<double, SIZE_INDEX>& maxErrorCut,
80  const std::array<double, SIZE_LG_STRUCTS>& obs,
81  const std::array<double, SIZE_LG_STRUCTS>& obsErr);
82 
83  void fillExpertHisto_HG(std::map<std::string, MonitorElement*>& histo_map,
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_HG_STRUCTS>& obs,
89  const std::array<double, SIZE_HG_STRUCTS>& obsErr);
90 
91  bool setupChanged(const edm::EventSetup&);
92  int getIndexFromString(const std::string& alignableId);
93 
94  //========================== PRIVATE DATA ====================================
95  //============================================================================
96 
97  // esConsumes
104 
107  std::unique_ptr<AlignableTracker> tracker_;
108  std::unique_ptr<MillePedeFileReader> mpReader_;
109  std::shared_ptr<PixelTopologyMap> pixelTopologyMap_;
110 
111  std::vector<std::pair<std::string, int>> layerVec;
112 
116 
117  // Histograms
124 
125  std::map<std::string, MonitorElement*> h_xPos_HG;
126  std::map<std::string, MonitorElement*> h_xRot_HG;
127  std::map<std::string, MonitorElement*> h_yPos_HG;
128  std::map<std::string, MonitorElement*> h_yRot_HG;
129  std::map<std::string, MonitorElement*> h_zPos_HG;
130  std::map<std::string, MonitorElement*> h_zRot_HG;
131 
136 
137  bool isHG_;
138 };
139 
140 // define this as a plug-in
142 
143 #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_
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
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
~MillePedeDQMModule() override
const std::string outputFolder_
void fillStatusHistoHG(MonitorElement *statusHisto)
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)