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 ***/
46 
47 /*** MillePede ***/
49 
51  //========================== PUBLIC METHODS ==================================
52 public: //====================================================================
54  ~MillePedeDQMModule() override;
55 
57 
58  enum { SIZE_LG_STRUCTS = 6, SIZE_HG_STRUCTS = 820, SIZE_INDEX = 8 };
59 
60  //========================= PRIVATE METHODS ==================================
61 private: //===================================================================
62  void beginRun(const edm::Run&, const edm::EventSetup&) override;
63 
65 
66  void fillStatusHisto(MonitorElement* statusHisto);
67 
68  void fillStatusHistoHG(MonitorElement* statusHisto);
69 
70  void fillExpertHistos();
71 
72  void fillExpertHistos_HG();
73 
75  const std::array<double, SIZE_INDEX>& cut,
76  const std::array<double, SIZE_INDEX>& sigCut,
77  const std::array<double, SIZE_INDEX>& maxMoveCut,
78  const std::array<double, SIZE_INDEX>& maxErrorCut,
79  const std::array<double, SIZE_LG_STRUCTS>& obs,
80  const std::array<double, SIZE_LG_STRUCTS>& obsErr);
81 
82  void fillExpertHisto_HG(std::map<std::string, MonitorElement*>& histo_map,
83  const std::array<double, SIZE_INDEX>& cut,
84  const std::array<double, SIZE_INDEX>& sigCut,
85  const std::array<double, SIZE_INDEX>& maxMoveCut,
86  const std::array<double, SIZE_INDEX>& maxErrorCut,
87  const std::array<double, SIZE_HG_STRUCTS>& obs,
88  const std::array<double, SIZE_HG_STRUCTS>& obsErr);
89 
90  bool setupChanged(const edm::EventSetup&);
91  int getIndexFromString(const std::string& alignableId);
92 
93  //========================== PRIVATE DATA ====================================
94  //============================================================================
95 
96  // esConsumes
102 
105  std::unique_ptr<AlignableTracker> tracker_;
106  std::unique_ptr<MillePedeFileReader> mpReader_;
107  std::shared_ptr<PixelTopologyMap> pixelTopologyMap_;
108 
109  std::vector<std::pair<std::string, int>> layerVec;
110 
114 
115  // Histograms
122 
123  std::map<std::string, MonitorElement*> h_xPos_HG;
124  std::map<std::string, MonitorElement*> h_xRot_HG;
125  std::map<std::string, MonitorElement*> h_yPos_HG;
126  std::map<std::string, MonitorElement*> h_yRot_HG;
127  std::map<std::string, MonitorElement*> h_zPos_HG;
128  std::map<std::string, MonitorElement*> h_zRot_HG;
129 
134 
135  bool isHG_;
136 };
137 
138 // define this as a plug-in
140 
141 #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_
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)