Belle II Software  release-06-02-00
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 
29 #include "TMath.h"
30 #include "TH1D.h"
31 #include "TH2D.h"
32 
33 namespace Belle2 {
47  class CDCDedxDQMModule : public HistoModule {
48 
49  public:
50 
53 
55  virtual ~CDCDedxDQMModule();
56 
58  virtual void defineHisto() override;
59 
61  virtual void initialize() override;
62 
64  virtual void beginRun() override;
65 
68  virtual void event() override;
69 
71  virtual void endRun() override;
72 
74  virtual void terminate() override;
75 
77  double getIndexVal(int iWire, TString what);
78 
79 
80  private:
81 
88  Int_t m_exp{ -1};
89  Int_t m_run{ -1};
90  Int_t m_event{ -1};
92  Int_t m_nEvt{0};
93  Int_t m_nBEvt{ 0};
94  Int_t m_nHEvt{0};
96  Double_t m_rungain{ -99.0};
97  std::vector <double> m_adc[14336];
99  std::string mmode;
101  TH1D* hMeta{nullptr};
102  TH1D* hdEdx{nullptr};
103  TH2D* hdEdxvsP{nullptr};
104  TH2D* hdEdxvsPhi{nullptr};
105  TH2D* hdEdxvsCosth{nullptr};
106  TH2D* hdEdxvsEvt{nullptr};
107  TH2F* hWireStatus{nullptr};
108  TH2F* hWires{nullptr};
110  };
112 } // Belle2 namespace
This module to design collect CDC dEdx monitoring for DQM and only minimal information are stored.
Definition: CDCDedxDQM.h:47
Int_t m_exp
exp number
Definition: CDCDedxDQM.h:88
Int_t m_nBEvt
bhabha events
Definition: CDCDedxDQM.h:93
TH2F * hWireStatus
dead wire status
Definition: CDCDedxDQM.h:107
DBObjPtr< CDCDedxRunGain > m_DBRunGain
Run gain DB object.
Definition: CDCDedxDQM.h:82
TH2D * hdEdxvsCosth
dedx vs costh
Definition: CDCDedxDQM.h:105
virtual void initialize() override
Initialize the module.
Definition: CDCDedxDQM.cc:69
TH2D * hdEdxvsP
dedx vs p
Definition: CDCDedxDQM.h:103
TH2F * hWires
all wire mapping
Definition: CDCDedxDQM.h:108
Int_t m_event
number of event
Definition: CDCDedxDQM.h:90
virtual void event() override
This method is called for each event.
Definition: CDCDedxDQM.cc:106
Int_t m_nHEvt
hadron events
Definition: CDCDedxDQM.h:94
virtual void endRun() override
This method is called at the end of each run.
Definition: CDCDedxDQM.cc:216
virtual void terminate() override
End of the event processing.
Definition: CDCDedxDQM.cc:254
Int_t m_nEvt
accepted events
Definition: CDCDedxDQM.h:92
TH1D * hMeta
metadata
Definition: CDCDedxDQM.h:101
Int_t m_run
run number
Definition: CDCDedxDQM.h:89
StoreObjPtr< EventMetaData > m_MetaDataPtr
Store array for metadata info.
Definition: CDCDedxDQM.h:84
virtual void beginRun() override
This method is called for each run.
Definition: CDCDedxDQM.cc:84
StoreArray< CDCDedxTrack > m_cdcDedxTracks
Store array for CDCDedxTrack.
Definition: CDCDedxDQM.h:86
virtual ~CDCDedxDQMModule()
Destructor.
Definition: CDCDedxDQM.cc:25
Double_t m_rungain
previous rungain
Definition: CDCDedxDQM.h:96
TH2D * hdEdxvsPhi
dedx vs phi
Definition: CDCDedxDQM.h:104
double getIndexVal(int iWire, TString what)
get index val of cdc wire/layer/parameters
Definition: CDCDedxDQM.cc:260
TH2D * hdEdxvsEvt
dedx vs event
Definition: CDCDedxDQM.h:106
CDCDedxDQMModule()
Default constructor.
Definition: CDCDedxDQM.cc:17
std::string mmode
monitoring mode all/basic
Definition: CDCDedxDQM.h:99
StoreObjPtr< SoftwareTriggerResult > m_TrgResult
Store array for Trigger selection.
Definition: CDCDedxDQM.h:85
virtual void defineHisto() override
Defination of histograms.
Definition: CDCDedxDQM.cc:31
std::vector< double > m_adc[14336]
adc per wire for wire status
Definition: CDCDedxDQM.h:97
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:95
Abstract base class for different kinds of events.