ATLAS Offline Software
LArBarrelCalculator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 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 
27 class G4Step;
28 class AccMap;
29 
30 class LArG4BirksLaw;
31 
33 {
34 public:
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 
58 private:
59 
61  const AccMap* m_accmap;
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  bool m_IflCur;
69  bool m_IflXtalk;
70 
71  double m_dstep;
72 
74  bool m_doHV;
75 
76  // global EMBarrel dimensions
78  double m_zMinBarrel;
79  double m_zMaxBarrel;
80  // global Accordion dimensions
83  // half thickness of absorber and electrode
84  double m_ThickAbs;
85  double m_ThickEle;
86  // GU 11/06/2003 total number of cells in phi
89  // to handle small difference (mostly phi wrapping and +-z symmetry)
90  // between atlas and test beam
91  bool m_testbeam;
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
LArBarrelCalculator::Process
virtual G4bool Process(const G4Step *a_step, std::vector< LArHitData > &hdata) const override final
Definition: LArBarrelCalculator.cxx:181
AccMap
Definition: AccMap.h:16
LArBarrelCalculator::m_geometry
ServiceHandle< ILArBarrelGeometry > m_geometry
Definition: LArBarrelCalculator.h:60
LArBarrelCalculator::m_etamap2
std::unique_ptr< MapEta > m_etamap2
Definition: LArBarrelCalculator.h:63
LArBarrelCalculator::m_ThickEle
double m_ThickEle
Definition: LArBarrelCalculator.h:85
LArBarrelCalculator::m_NCellTot
int m_NCellTot
Definition: LArBarrelCalculator.h:87
LArBarrelCalculator::m_accmap
const AccMap * m_accmap
Definition: LArBarrelCalculator.h:61
LArBarrelCalculator::m_etamap3
std::unique_ptr< MapEta > m_etamap3
Definition: LArBarrelCalculator.h:64
LArBarrelCalculator::m_etamap1
std::unique_ptr< MapEta > m_etamap1
Definition: LArBarrelCalculator.h:62
LArBarrelCalculator::m_IflCur
bool m_IflCur
Definition: LArBarrelCalculator.h:67
LArBarrelCalculator::m_etaMaxBarrel
double m_etaMaxBarrel
Definition: LArBarrelCalculator.h:77
LArBarrelCalculator::m_zMinBarrel
double m_zMinBarrel
Definition: LArBarrelCalculator.h:78
LArBarrelCalculator::m_hv
double m_hv[2][1024][7][2]
Definition: LArBarrelCalculator.h:100
LArBarrelCalculator::m_ThickAbs
double m_ThickAbs
Definition: LArBarrelCalculator.h:84
LArBarrelCalculator::m_zMaxBarrel
double m_zMaxBarrel
Definition: LArBarrelCalculator.h:79
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
LArBarrelCalculator::InitHV
void InitHV()
Definition: LArBarrelCalculator.cxx:661
LArBarrelCalculator::operator=
LArBarrelCalculator & operator=(const LArBarrelCalculator &)=delete
LArBarrelCalculator::m_NCellMax
int m_NCellMax
Definition: LArBarrelCalculator.h:88
LArBarrelCalculator::initialize
virtual StatusCode initialize() override final
Definition: LArBarrelCalculator.cxx:81
LArBarrelCalculator::m_testbeam
bool m_testbeam
Definition: LArBarrelCalculator.h:91
LArBarrelCalculator::LArBarrelCalculator
LArBarrelCalculator(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArBarrelCalculator.cxx:49
LArBarrelCalculator::ScaleHV
double ScaleHV(double, double, double, double) const
Definition: LArBarrelCalculator.cxx:729
LArBarrelCalculator
Definition: LArBarrelCalculator.h:33
LArBarrelCalculator::m_birksLaw
const LArG4BirksLaw * m_birksLaw
Definition: LArBarrelCalculator.h:73
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArBarrelCalculator::m_IflMapTrans
bool m_IflMapTrans
Definition: LArBarrelCalculator.h:68
LArBarrelCalculator::m_rMinAccordion
double m_rMinAccordion
Definition: LArBarrelCalculator.h:81
LArBarrelCalculator::m_IflXtalk
bool m_IflXtalk
Definition: LArBarrelCalculator.h:69
LArBarrelCalculator::initializeForSDCreation
void initializeForSDCreation() override final
Definition: LArBarrelCalculator.h:43
LArBarrelCalculator::OOTcut
virtual G4float OOTcut() const override final
Definition: LArBarrelCalculator.h:56
LArG4Identifier.h
LArCalculatorSvcImp
Definition: LArCalculatorSvcImp.h:11
LArCalculatorSvcImp.h
MapEta.h
LArBarrelCalculator::m_rMaxAccordion
double m_rMaxAccordion
Definition: LArBarrelCalculator.h:82
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArBarrelCalculator::m_dstep
double m_dstep
Definition: LArBarrelCalculator.h:71
LArBarrelCalculator::FiducialCuts
G4bool FiducialCuts(G4double, G4double, G4double) const
Definition: LArBarrelCalculator.cxx:647
LArG4BirksLaw
Definition: LArG4BirksLaw.h:8
LArCalculatorSvcImp::m_OOTcut
double m_OOTcut
Definition: LArCalculatorSvcImp.h:28
LArBarrelCalculator::m_doHV
bool m_doHV
Definition: LArBarrelCalculator.h:74
LArBarrelCalculator::LArBarrelCalculator
LArBarrelCalculator(const LArBarrelCalculator &)=delete
hitTime
float hitTime(const AFP_SIDSimHit &hit)
Definition: AFP_SIDSimHit.h:39
ILArBarrelGeometry.h
LArBarrelCalculator::isInTime
virtual G4bool isInTime(G4double hitTime) const override final
Definition: LArBarrelCalculator.h:48
ServiceHandle< ILArBarrelGeometry >
LArBarrelCalculator::finalize
virtual StatusCode finalize() override final
Definition: LArBarrelCalculator.cxx:174