ATLAS Offline Software
Loading...
Searching...
No Matches
LArBarrelCalculator.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// LArBarrelCalculator.hh
6// The Cell Identifier for the EM Barrel readout cells
7
8// Adapted from code written by Gaston Parrour
9// Adaptation by Sylvain Negroni
10
11// 12-Jul-2002 WGS: Added LArG4Identifier.
12
13// 18-03-2005 G.Unal: major revision to include new current maps
14#ifndef LARBARRELCALCULATOR_H
15#define LARBARRELCALCULATOR_H
16
19#include "ILArBarrelGeometry.h"
20#include "MapEta.h"
21
22#include <stdexcept>
23#include <vector>
24#include <string>
25#include <memory>
26
27class G4Step;
28class AccMap;
29
30class LArG4BirksLaw;
31
33{
34public:
35
36 LArBarrelCalculator(const std::string& name, ISvcLocator* pSvcLocator);
37 virtual StatusCode initialize() override final;
38 virtual StatusCode finalize() override final;
39
42
43 void initializeForSDCreation() override final { m_geometry->initializeForSDCreation(); };
44
45 virtual G4bool Process(const G4Step* a_step, std::vector<LArHitData>& hdata) const override final;
46
47 // Check if the current hitTime is in-time
48 virtual G4bool isInTime(G4double hitTime) const override final
49 {
50 return !(std::fabs(hitTime) > m_OOTcut);
51 }
52
53 //
54 // get functions:
55 //
56 virtual G4float OOTcut() const override final { return m_OOTcut; }
57
58private:
59
60 ServiceHandle<ILArBarrelGeometry> m_geometry{this, "GeometryCalculator", "LArBarrelGeometry"};
61 const AccMap* m_accmap{nullptr};
62 std::unique_ptr<MapEta> m_etamap1{};
63 std::unique_ptr<MapEta> m_etamap2{};
64 std::unique_ptr<MapEta> m_etamap3{};
65
66 // RUN Options
67 Gaudi::Property<bool> m_IflCur{this, "EMBCurr", true};
68 Gaudi::Property<bool> m_IflMapTrans{this, "EMBEtaTrans", true};
69 Gaudi::Property<bool> m_IflXtalk{this, "EMBXtalk", true};
70
71 Gaudi::Property<double> m_dstep{this, "EMBdstep", .2*CLHEP::mm};
72
73 const LArG4BirksLaw* m_birksLaw{nullptr};
74 Gaudi::Property<bool> m_doHV{this, "EMBHVEnable", false};
75
76 // global EMBarrel dimensions
77 double m_etaMaxBarrel{0.};
78 double m_zMinBarrel{0.};
79 double m_zMaxBarrel{0.};
80 // global Accordion dimensions
81 double m_rMinAccordion{0.};
82 double m_rMaxAccordion{0.};
83 // half thickness of absorber and electrode
84 double m_ThickAbs{0.};
85 double m_ThickEle{0.};
86 // GU 11/06/2003 total number of cells in phi
87 int m_NCellTot{0};
88 int m_NCellMax{0};
89 // to handle small difference (mostly phi wrapping and +-z symmetry)
90 // between atlas and test beam
91 bool m_testbeam{false};
92
93
94 // Hv values
95 // 0,1 = positive/negative barrel
96 // 0->1023 = electrode number
97 // 0->6 = eta region number (0.2 granularity) (1.2 to 1.475 in same eta bin)
98 // 0,1 = below, above the electrode (according to phi in global Atlas frame)
99
100 double m_hv[2][1024][7][2]{};
101
102 G4bool FiducialCuts(G4double,G4double,G4double) const;
103
104 void InitHV();
105 double ScaleHV(double, double, double, double) const;
106
107};
108
109#endif // LARBARRELCALCULATOR_H
float hitTime(const AFP_SIDSimHit &hit)
const LArG4BirksLaw * m_birksLaw
Gaudi::Property< bool > m_IflXtalk
virtual StatusCode finalize() override final
Gaudi::Property< bool > m_doHV
virtual G4bool Process(const G4Step *a_step, std::vector< LArHitData > &hdata) const override final
Gaudi::Property< bool > m_IflCur
ServiceHandle< ILArBarrelGeometry > m_geometry
void initializeForSDCreation() override final
LArBarrelCalculator(const LArBarrelCalculator &)=delete
double ScaleHV(double, double, double, double) const
std::unique_ptr< MapEta > m_etamap1
double m_hv[2][1024][7][2]
virtual StatusCode initialize() override final
virtual G4float OOTcut() const override final
G4bool FiducialCuts(G4double, G4double, G4double) const
Gaudi::Property< double > m_dstep
std::unique_ptr< MapEta > m_etamap2
virtual G4bool isInTime(G4double hitTime) const override final
LArBarrelCalculator(const std::string &name, ISvcLocator *pSvcLocator)
std::unique_ptr< MapEta > m_etamap3
Gaudi::Property< bool > m_IflMapTrans
LArBarrelCalculator & operator=(const LArBarrelCalculator &)=delete
LArCalculatorSvcImp(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< double > m_OOTcut