ATLAS Offline Software
Loading...
Searching...
No Matches
LCWeightingConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6def GetLCWCfg(flags):
7
8 result = ComponentAccumulator()
9
10 GetLCW = CompFactory.GetLCWeights("GetLCW",ClusterCollectionName = "CaloTopoClusters")
11 GetLCW.OutputFileName = flags.LCW.outFileNameLCW
12 GetLCW.UseInversionMethod = True
13 GetLCW.CalibrationHitContainerNames = ["LArCalibrationHitInactive"
14 ,"LArCalibrationHitActive"
15 ,"TileCalibHitInactiveCell"
16 ,"TileCalibHitActiveCell"]
17
18 #
19 # Example how to set dimensions for two samplings (here EMB1 & 2):
20 #
21 #from AthenaCommon.SystemOfUnits import deg, GeV, MeV, TeV
22 #from math import ( pi as m_pi, log10 as m_log10 )
23 # GetLCW.SamplingDimensions = {
24 # 'EMB1:EMB1': ('EMB1',0.5,1.5,1),
25 # 'EMB1:side': ('side',-1.5,1.5,1),
26 # 'EMB1:|eta|': ('|eta|',0.,1.6,16),
27 # 'EMB1:phi': ('phi',-m_pi,m_pi,1),
28 # 'EMB1:log10(E_clus (MeV))': ('log10(E_clus (MeV))',m_log10(200*MeV),m_log10(1*TeV),22),
29 # 'EMB1:log10(rho_cell (MeV/mm^3))': ('log10(rho_cell (MeV/mm^3))',-7.0,1.0,20),
30 # 'EMB1:weight': ('weight',-2.0,3.0,1),
31 # 'EMB2:EMB2': ('EMB2',1.5,2.5,1),
32 # 'EMB2:side': ('side',-1.5,1.5,1),
33 # 'EMB2:|eta|': ('|eta|',0.,1.6,16),
34 # 'EMB2:phi': ('phi',-m_pi,m_pi,1),
35 # 'EMB2:log10(E_clus (MeV))': ('log10(E_clus (MeV))',m_log10(200*MeV),m_log10(1*TeV),22),
36 # 'EMB2:log10(rho_cell (MeV/mm^3))': ('log10(rho_cell (MeV/mm^3))',-7.0,1.0,20),
37 # 'EMB2:weight': ('weight',-2.0,3.0,1)}
38 #
39
40 result.addEventAlgo(GetLCW)
41
42 return result