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 
106  std::unique_ptr<AlignableTracker> tracker_;
107  std::unique_ptr<MillePedeFileReader> mpReader_;
108  std::shared_ptr<PixelTopologyMap> pixelTopologyMap_;
109 
110  std::vector<std::pair<std::string, int>> layerVec;
111 
115 
116  // Histograms
123 
124  std::map<std::string, MonitorElement*> h_xPos_HG;
125  std::map<std::string, MonitorElement*> h_xRot_HG;
126  std::map<std::string, MonitorElement*> h_yPos_HG;
127  std::map<std::string, MonitorElement*> h_yRot_HG;
128  std::map<std::string, MonitorElement*> h_zPos_HG;
129  std::map<std::string, MonitorElement*> h_zRot_HG;
130 
135 
136  bool isHG_;
137 };
138 
139 // define this as a plug-in
141 
142 #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
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
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 &)
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
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)