ATLAS Offline Software
Loading...
Searching...
No Matches
LArG4FCALConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
3from AthenaConfiguration.ComponentFactory import CompFactory
4from AthenaCommon.SystemOfUnits import mm,deg,ns
5import math
6
7
8def FCALCalculatorBaseCfg(name="FCALCalculatorBase", **kwargs):
9 result = ComponentAccumulator()
10 kwargs.setdefault("OOTcut",2.5*ns)
11 kwargs.setdefault("Birksk",0.0486) # this constant was not tuned for G4 10.6, so resetting back to the MC21 default value
12 result.addService(CompFactory.LArFCALCalculatorBase(name, **kwargs), primary = True)
13 return result
14
15
16def FCAL1CalculatorCfg(flags, name="FCAL1Calculator", **kwargs):
17 kwargs.setdefault("FCALSampling",1)
18 return FCALCalculatorBaseCfg(name, **kwargs)
19
20
21def FCAL2CalculatorCfg(flags, name="FCAL2Calculator", **kwargs):
22 kwargs.setdefault("FCALSampling",2)
23 return FCALCalculatorBaseCfg(name, **kwargs)
24
25
26def FCAL3CalculatorCfg(flags, name="FCAL3Calculator", **kwargs):
27 kwargs.setdefault("FCALSampling",3)
28 return FCALCalculatorBaseCfg(name, **kwargs)
29
30
31def FCAL1CalibCalculatorCfg(flags, name="FCAL1CalibCalculator", **kwargs):
32 result = ComponentAccumulator()
33 kwargs.setdefault("FCALdeltaX",7.5*mm)
34 kwargs.setdefault("FCALdeltaY",7.5*mm*math.sin(60*deg))
35 kwargs.setdefault("FCALSampling",1)
36 result.addService(CompFactory.LArG4.FCAL.LArFCALCalibCalculatorBase(name, **kwargs), primary = True)
37 return result
38
39
40def FCAL2CalibCalculatorCfg(flags, name="FCAL2CalibCalculator", **kwargs):
41 result = ComponentAccumulator()
42 kwargs.setdefault("FCALdeltaX",8.179*mm)
43 kwargs.setdefault("FCALdeltaY",8.179*mm*math.sin(60*deg))
44 kwargs.setdefault("FCALSampling",2)
45 result.addService(CompFactory.LArG4.FCAL.LArFCALCalibCalculatorBase(name, **kwargs), primary = True)
46 return result
47
48
49def FCAL3CalibCalculatorCfg(flags, name="FCAL3CalibCalculator", **kwargs):
50 result = ComponentAccumulator()
51 kwargs.setdefault("FCALdeltaX",9.0*mm)
52 kwargs.setdefault("FCALdeltaY",9.0*mm*math.sin(60*deg))
53 kwargs.setdefault("FCALSampling",3)
54 result.addService(CompFactory.LArG4.FCAL.LArFCALCalibCalculatorBase(name, **kwargs), primary = True)
55 return result
FCALCalculatorBaseCfg(name="FCALCalculatorBase", **kwargs)
FCAL2CalculatorCfg(flags, name="FCAL2Calculator", **kwargs)
FCAL1CalculatorCfg(flags, name="FCAL1Calculator", **kwargs)
FCAL3CalibCalculatorCfg(flags, name="FCAL3CalibCalculator", **kwargs)
FCAL3CalculatorCfg(flags, name="FCAL3Calculator", **kwargs)
FCAL1CalibCalculatorCfg(flags, name="FCAL1CalibCalculator", **kwargs)
FCAL2CalibCalculatorCfg(flags, name="FCAL2CalibCalculator", **kwargs)