Belle II Software  release-08-01-10
CDCDedxDQM.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <framework/core/HistoModule.h>
12 
13 #include <framework/database/DBObjPtr.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <framework/dataobjects/EventMetaData.h>
17 
18 #include <reconstruction/dataobjects/CDCDedxTrack.h>
19 #include <reconstruction/dbobjects/CDCDedxRunGain.h>
20 
21 #include <mdst/dataobjects/Track.h>
22 #include <mdst/dataobjects/TrackFitResult.h>
23 #include <mdst/dataobjects/ECLCluster.h>
24 #include <mdst/dataobjects/SoftwareTriggerResult.h>
25 #include <mdst/dbobjects/BeamSpot.h>
26 
27 #include <analysis/utility/ReferenceFrame.h>
28 #include <cdc/geometry/CDCGeometryPar.h>
29 #include <cdc/geometry/CDCGeometryParConstants.h>
30 #include <mdst/dataobjects/EventLevelTriggerTimeInfo.h>
31 
32 #include <cmath>
33 #include <TMath.h>
34 #include <TH1D.h>
35 #include <TH2D.h>
36 
37 namespace Belle2 {
51  class CDCDedxDQMModule : public HistoModule {
52 
53  public:
54 
57 
59  virtual void defineHisto() override;
60 
62  virtual void initialize() override;
63 
65  virtual void beginRun() override;
66 
69  virtual void event() override;
70 
72  virtual void endRun() override;
73 
75  virtual void terminate() override;
76 
80  void plotWireMap();
81 
82 
83  private:
84 
90  int m_nEvt{0};
91  int m_nBEvt{ 0};
92  int m_nHEvt{0};
94  std::array<std::vector<double>, c_nSenseWires> m_adc;
96  std::string mmode;
98  TH1D* hMeta{nullptr};
99  TH1D* hdEdx{nullptr};
100  TH2D* hinjtimeHer{nullptr};
101  TH2D* hinjtimeLer{nullptr};
102  TH2D* hdEdxvsP{nullptr};
103  TH2D* hdEdxvsPhi{nullptr};
104  TH2D* hdEdxvsCosth{nullptr};
105  TH2D* hdEdxvsEvt{nullptr};
106  TH2F* hWireStatus{nullptr};
107  TH2F* hWires{nullptr};
112  };
114 } // Belle2 namespace
This module to design collect CDC dEdx monitoring for DQM and only minimal information are stored.
Definition: CDCDedxDQM.h:51
TH2F * hWireStatus
dead wire status
Definition: CDCDedxDQM.h:106
DBObjPtr< CDCDedxRunGain > m_DBRunGain
Run gain DB object.
Definition: CDCDedxDQM.h:109
TH2D * hdEdxvsCosth
dedx vs costh
Definition: CDCDedxDQM.h:104
virtual void initialize() override
Initialize the module.
Definition: CDCDedxDQM.cc:70
TH2D * hdEdxvsP
dedx vs p
Definition: CDCDedxDQM.h:102
TH2F * hWires
all wire mapping
Definition: CDCDedxDQM.h:107
virtual void event() override
This method is called for each event.
Definition: CDCDedxDQM.cc:109
virtual void endRun() override
This method is called at the end of each run.
Definition: CDCDedxDQM.cc:229
virtual void terminate() override
End of the event processing.
Definition: CDCDedxDQM.cc:256
TH1D * hMeta
metadata
Definition: CDCDedxDQM.h:98
DBObjPtr< CDCGeometry > m_cdcGeo
Geometry of CDC.
Definition: CDCDedxDQM.h:110
StoreObjPtr< EventMetaData > m_MetaDataPtr
Store array for metadata info.
Definition: CDCDedxDQM.h:85
virtual void beginRun() override
This method is called for each run.
Definition: CDCDedxDQM.cc:85
StoreArray< CDCDedxTrack > m_cdcDedxTracks
Store array for CDCDedxTrack.
Definition: CDCDedxDQM.h:87
int m_nEvt
accepted events
Definition: CDCDedxDQM.h:90
TH2D * hdEdxvsPhi
dedx vs phi
Definition: CDCDedxDQM.h:103
int m_nBEvt
bhabha events
Definition: CDCDedxDQM.h:91
std::array< std::vector< double >, c_nSenseWires > m_adc
adc per wire for wire status
Definition: CDCDedxDQM.h:94
TH2D * hdEdxvsEvt
dedx vs event
Definition: CDCDedxDQM.h:105
int m_nHEvt
hadron events
Definition: CDCDedxDQM.h:92
StoreObjPtr< EventLevelTriggerTimeInfo > TTDInfo
Store array for injection time info.
Definition: CDCDedxDQM.h:88
CDCDedxDQMModule()
Default constructor.
Definition: CDCDedxDQM.cc:18
TH2D * hinjtimeLer
injection time in LER
Definition: CDCDedxDQM.h:101
TH2D * hinjtimeHer
injection time in HER
Definition: CDCDedxDQM.h:100
void plotWireMap()
function to plot wire status map (all, bad)
Definition: CDCDedxDQM.cc:262
std::string mmode
monitoring mode all/basic
Definition: CDCDedxDQM.h:96
StoreObjPtr< SoftwareTriggerResult > m_TrgResult
Store array for Trigger selection.
Definition: CDCDedxDQM.h:86
virtual void defineHisto() override
Defination of histograms.
Definition: CDCDedxDQM.cc:26
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.