Belle II Software release-09-00-00
ECLBackgroundModule.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/* ECL headers. */
12#include <ecl/dataobjects/ECLElementNumbers.h>
13
14/* Basf2 headers. */
15#include <framework/core/HistoModule.h>
16#include <framework/datastore/StoreArray.h>
17
18/* C++ headers. */
19#include <vector>
20
21class TH1F;
22class TH2F;
23
24namespace Belle2 {
30 class ECLSimHit;
31 class MCParticle;
32 class ECLShower;
33 class BeamBackHit;
34 class ECLCrystalData;
35
36#ifdef DOARICH
37 class ARICHGeometryPar;
38#endif
39
45
46 public:
47
50
52 virtual ~ECLBackgroundModule();
53
55 virtual void initialize() override;
56
58 virtual void beginRun() override;
59
61 virtual void event() override;
62
64 virtual void endRun() override;
65
67 virtual void terminate() override;
68
70 virtual void defineHisto() override;
71
72 private:
73
76
79
82
85
88
91
93 std::vector<int> m_CryInt;
94
96 int m_nEvent{0};
97
99 TH1F* h_nECLSimHits{nullptr};
100
102 TH1F* h_CrystalRadDoseTheta{nullptr};
104 TH1F* h_CrystalRadDose{nullptr};
106 TH1F* h_CrystalThetaID2{nullptr};
108 TH1F* h_CrystalThetaID67{nullptr};
110 TH2F* h_HitLocations{nullptr};
112 TH1F* h_BarrelDose{nullptr};
113
115 TH1F* hEdepPerRing{nullptr};
116
118 TH1F* hNevtPerRing{nullptr};
119
120
121
123 TH1F* h_DiodeRadDose{nullptr};
125 TH1F* h_NeutronFlux{nullptr};
127 TH1F* h_NeutronFluxThetaID2{nullptr};
131 TH1F* h_NeutronE{nullptr};
133 TH1F* h_NeutronEThetaID0{nullptr};
135 TH1F* h_PhotonE{nullptr};
136
137
139 TH2F* h_ShowerVsTheta{nullptr};
141 TH1F* h_Shower{nullptr};
142
144 TH1F* h_ProdVert{nullptr};
146 TH2F* h_ProdVertvsThetaId{nullptr};
147
149 const double usInYr = 1e13;
151 const double GeVtoJ = 1.6e-10;
152
155
157 int FillARICHBeamBack(BeamBackHit* aBBHit);
159 int BuildECL();
160 // Transform Histograms //
161
163 int SetPosHistos(TH1F* h, TH2F* hFWD, TH2F* hBAR, TH2F* hBWD);
165 TH2F* BuildPosHisto(TH1F* h, const char* sub);
167 TH1F* BuildThetaIDWideHisto(TH1F* h_cry);
169 TH1F* BuildARICHringIDHisto(TH1F* h_cell);
171 int ARICHmod2row(int modID);
172
173 //ECL channels
175 static const int nECLThetaID = 69;
176
177 //ECL Pin Diodes
179 const double DiodeArea = 2 * 2;
181 const double DiodeThk = 0.1;
183 const double SiRho = 2.33e-3;
185 const double DiodeMass = DiodeArea * DiodeThk * SiRho;;
186
187
189#ifdef DOARICH
190 ARICHGeometryPar* m_arichgp {0};
191#endif
192
193 //Below are the density for the BOARDS (not the HAPD themselves)
194 //The values are Taken from Luka Šantelj's BeamBack_arich.cc
195
197 const double HAPDarea = 7.5 * 7.5;
199 const double HAPDthickness = 0.2;
201 const double HAPDmass = 47.25e-3;
202
203 //ARICH channels
205 const int nHAPD = 420;
207 const int nHAPDrings = 7;
209 const int nHAPDperRing[7] = {42, 48, 54, 60, 66, 72, 78};
210
211 // For shield studies
212
214 TH1F* hEMDose{nullptr};
215
217 TH1F* hEnergyPerCrystal{nullptr};
218
220 TH1F* hDiodeFlux{nullptr};
221
223 TH1F* hEgamma{nullptr};
225 TH1F* hEneu{nullptr};
226
227
229 TH1F* hARICHDoseBB{nullptr};
231 TH1F* hHAPDFlux{nullptr};
232
234 TH2F* hEnergyPerCrystalECF{nullptr};
236 TH2F* hEnergyPerCrystalECB{nullptr};
238 TH2F* hEnergyPerCrystalBAR{nullptr};
241
242
244 TH2F* hEMDoseECF{nullptr};
246 TH2F* hEMDoseECB{nullptr};
248 TH2F* hEMDoseBAR{nullptr};
250 TH1F* hEMDoseWideTID{nullptr};
251
253 TH2F* hDiodeFluxECF{nullptr};
255 TH2F* hDiodeFluxECB{nullptr};
257 TH2F* hDiodeFluxBAR{nullptr};
259 TH1F* hDiodeFluxWideTID{nullptr};
260
261 };
262
264} // end of Belle2 namespace
The Class for ARICH Geometry Parameters.
Class BeamBackHit - Stores hits from beam backgound simulation.
Definition: BeamBackHit.h:28
A module to study background campaigns and produce histograms.
const double SiRho
Density (silicium) [kg*cm^{-3}] of Si.
const double DiodeThk
Thickness [cm] of Diodes.
bool m_doARICH
Whether or not the ARICH plots are produced.
TH1F * h_DiodeRadDose
Diode Radiation Dose.
int SetPosHistos(TH1F *h, TH2F *hFWD, TH2F *hBAR, TH2F *hBWD)
Create 2D histograms indicating the position of each crystals.
StoreArray< ECLShower > m_eclShowerArray
Store array: ECLShower.
const double HAPDthickness
ARICH: Thickness (cm) of the HAPD boards.
TH2F * hEMDoseECF
Radiation Dose Forward Calorimeter.
TH2F * h_ShowerVsTheta
Shower Energy distribution vs theta.
TH2F * hEnergyPerCrystalBAR
Energy per crystal Barrel.
TH1F * BuildARICHringIDHisto(TH1F *h_cell)
Convert histogram vs ARICH channel ID to average per ring ID.
TH1F * hEnergyPerCrystal
Energy per cell.
static const int nECLThetaID
Number of thetaID values.
virtual void initialize() override
Initialize variables.
TH2F * hEnergyPerCrystalECB
Energy per crystal Backward Calorimeter.
TH1F * hEMDoseWideTID
Radiation Dose Wide bins.
const double HAPDmass
ARICH: Mass (kg) of the HAPD boards.
TH1F * hEneu
Log Spectrum of the neutrons hitting the diodes / 1 MeV.
virtual void event() override
Event method
const int nHAPD
ARICH parameter.
TH1F * hARICHDoseBB
ARICH Yearly dose (rad) vs module index.
TH2F * hDiodeFluxECF
Diode Neutron Flux Forward Calorimeter.
const double HAPDarea
ARICH geometry paramaters.
TH2F * hEMDoseBAR
Radiation Dose Barrel.
virtual void endRun() override
endRun
TH2F * hEMDoseECB
Radiation Dose Backward Calorimeter.
TH2F * h_ProdVertvsThetaId
Production Vertex vs thetaID.
int BuildECL()
Builds geometry (fill Crystal look-up arrays)
std::vector< int > m_CryInt
Cell ID of crystal(s) of interest.
virtual void terminate() override
terminate
TH1F * h_CrystalRadDoseTheta
Crystal Radiation Dose, actual Theta.
TH1F * h_PhotonE
Photon Energy.
TH1F * h_ProdVert
Production Vertex.
TH1F * hNevtPerRing
Event counter averaged per ring (theta-id)
int ARICHmod2row(int modID)
Get ARICH ring ID from the module index.
const double DiodeArea
Frontal area [cm*cm] of Diodes.
TH2F * h_HitLocations
Hit locations.
const double usInYr
us in a year
int FillARICHBeamBack(BeamBackHit *aBBHit)
Populate ARICH HAPD dose and flux histograms (from the BeamBack hits array)
virtual void beginRun() override
beginRun
TH2F * BuildPosHisto(TH1F *h, const char *sub)
Convert histogram vs crystal index to geometrical positions.
TH1F * h_NeutronFluxThetaID67
Neutron flux in Diodes, ThetaID=67.
TH1F * hHAPDFlux
ARICH Yearly neutron flux vs module index.
TH1F * h_NeutronFluxThetaID2
Neutron flux in Diodes, ThetaID=2.
const int nHAPDperRing[7]
ARICH parameter.
TH1F * h_Shower
Shower Energy distribution.
const double DiodeMass
Mass [kg] of Diodes.
TH2F * hEnergyPerCrystalECF
Energy per crystal Forward Calorimeter.
StoreArray< BeamBackHit > m_BeamBackArray
Store array: BeamBackHit.
TH1F * hEdepPerRing
Energy averaged per ring.
StoreArray< ECLSimHit > m_eclArray
Store array: ECLSimHit.
TH1F * hEnergyPerCrystalWideTID
Energy per crystal Wide bins.
TH1F * hDiodeFluxWideTID
Diode Neutron Flux Wide bins.
StoreArray< MCParticle > m_mcParticles
Store array: MCParticle.
TH1F * h_CrystalThetaID2
Crystal Radiation Dose, ThetaID=2.
TH2F * hDiodeFluxECB
Diode Neutron Flux Backward Calorimeter.
TH1F * BuildThetaIDWideHisto(TH1F *h_cry)
Convert histogram vs crystal index to average per theta-ID (wide binning)
virtual ~ECLBackgroundModule()
Destructor.
TH1F * h_CrystalThetaID67
Crystal Radiation Dose, ThetaID=67.
ECLCrystalData * Crystal[ECLElementNumbers::c_NCrystals]
Store crystal geometry and mass data.
TH1F * h_BarrelDose
Crystal Radiation Dose in Barrel, 12<thetaID<59.
TH1F * hEgamma
Log Spectrum of the photons hitting the crystals / 1 MeV.
TH1F * hEMDose
Radiation Dose per cell.
TH1F * h_NeutronFlux
Neutron Flux in Diodes.
const int nHAPDrings
ARICH parameter.
TH2F * hDiodeFluxBAR
Diode Neutron Flux Barrel.
TH1F * h_NeutronE
Neutron Energy.
const double GeVtoJ
Joules in a GeV.
TH1F * hDiodeFlux
Diode Neutron Flux per cell.
TH1F * h_CrystalRadDose
Crystal Radiation Dose.
TH1F * h_nECLSimHits
ECL Sim Hits.
int m_sampleTime
length of sample in us
virtual void defineHisto() override
Initalize the histograms.
TH1F * h_NeutronEThetaID0
Neutron Energy, First Crystal.
Class for obtaining crystal details for a given crystal cell An evolved look-up table.
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
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.