Belle II Software development
CsIStudyModule.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#ifndef CSISTUDYMODULE_H
10#define CSISTUDYMODULE_H
11
12#include <framework/core/HistoModule.h>
13#include <framework/datastore/StoreArray.h>
14#include <beast/csi/dataobjects/CsiSimHit.h>
15#include <beast/csi/dataobjects/CsiHit.h>
16#include <beast/csi/dataobjects/CsiDigiHit.h>
17
18//C++/C standard lib elements.
19#include <string>
20
21
22//ROOT
23#include <TH1F.h>
24
25namespace Belle2 {
38 class CsIStudyModule : public HistoModule {
39
40 public:
41
46
48 virtual ~CsIStudyModule();
49
51 virtual void initialize() override;
52
54 virtual void beginRun() override;
55
57 virtual void endRun() override;
58
59
61 virtual void event() override;
62
64 virtual void terminate() override;
65
66
68 /*
69 Histogram definitions such as TH1(), TH2(), TNtuple(), TTree().... are supposed
70 to be placed in this function.
71 */
72 virtual void defineHisto() override;
73
74
83 bool* readDPPStatusBits(char packedbits);
84
85 private:
86
92 // Parameters
95 ;
96 std::string m_waveformFilename ;
99 //Othe rmembers
100 TFile* fWF;
102 // Histograms
110 TH1C* h_Gate;
111 TH1F* h_Charge ;
113 TH1F* h_Height;
114 TH1F* h_Weight;
118 // Constants
119 const double GeVtoJ = 1.6e-10;
120 const double Sampletime = 1000.0;
121 const double usInYr = 1.0e13;
122 };
124}
125
126#endif /* CSISTUDYMODULE_H */
Analyze simulations of CsI readings in BEAST.
const double Sampletime
Sample time in us.
TH1F * h_CrystalEdep
Energy deposited in each crystal.
TH1F * h_Charge
Distribution of the integrated charge from the pulse processing algorithm.
TH1F * h_CrystalSpectrum
Distribution of the energy of each simhit.
TH1F * h_TrueEdep
Distribution of the true total deposited energy in the event.
virtual ~CsIStudyModule()
Empty destructor.
virtual void initialize() override
Initialization: building histograms.
virtual void event() override
Read each event, calculate doses and fill histograms.
bool * readDPPStatusBits(char packedbits)
Reads and unpacks the status bits of the digitizer Unpacks in the appropriate booleans.
StoreArray< CsiHit > m_hits
Array of the crystal hits (1 per event)
double m_paramTemplate
Template of an input parameter.
virtual void endRun() override
To do at the end of each runs.
TH1F * h_Height
Max height of the peak signa(.
virtual void terminate() override
Clean everything up.
StoreArray< CsiSimHit > m_simhits
Array of the simulated hits in the crystals (incl.
int m_nWFSamples
Number of samples in each of the waveforms (in the near future this should be imported from the digi ...
TH1F * h_Weight
Event weight assigned by the generator.
TH1S * h_Waveform
Contains the digitized waveform (if enabled in the digitizer)
const double usInYr
Conversion between us to nominal year.
virtual void beginRun() override
To do at the beginning of each runs.
TH1F * h_LightYieldCrystal
Number of photons hits in each crystal (to validate light yield..)
TH1C * h_Gate
Contains the integration gate (if waveforms are enabled in the digitizer)
TH1F * h_NhitCrystal
Number of hits in each crystal (to get hit rate)
StoreArray< CsiDigiHit > m_digihits
Array of the crystal digitized hits (1 per event per fired crystal)
CsIStudyModule()
Constructor: Sets the description, the properties and the parameters of the module.
TH1F * h_CrystalRadDoseSH
Yearly radiation dose deposited in each crystal (for hit-simhit check)
std::string m_waveformFilename
Path where to save the waveforms (root file)
const double GeVtoJ
Conversion between GeV to Joule.
TFile * fWF
ROOT file to save waveforms.
TH1F * h_CrystalRadDose
Yearly radiation dose deposited in each crystal.
virtual void defineHisto() override
function to define histograms
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
Abstract base class for different kinds of events.