ATLAS Offline Software
Loading...
Searching...
No Matches
python.LArRawChannelBuilderAlgConfig Namespace Reference

Functions

 LArRawChannelBuilderAlgCfg (flags, doDigiTruth=False, **kwargs)

Variables

 flags = initConfigFlags()
 Files
 AtlasVersion
 GlobalTag
 isMC
 GeometryTile
 acc = MainServicesCfg(flags)
 DumpLArRawChannels = CompFactory.DumpLArRawChannels
 sequenceName

Function Documentation

◆ LArRawChannelBuilderAlgCfg()

LArRawChannelBuilderAlgCfg ( flags,
doDigiTruth = False,
** kwargs )

Definition at line 9 of file LArRawChannelBuilderAlgConfig.py.

9def LArRawChannelBuilderAlgCfg(flags, doDigiTruth=False, **kwargs):
10
11 acc = LArADC2MeVCondAlgCfg(flags)
12
13 if not doDigiTruth:
14 kwargs.setdefault("name", "LArRawChannelBuilder")
15 else:
16 kwargs.setdefault("name", "LArRawChannelBuilder_DigiHSTruth")
17 kwargs.setdefault("firstSample", flags.LAr.ROD.nPreceedingSamples if flags.LAr.ROD.nPreceedingSamples!=0 else flags.LAr.ROD.FirstSample)
18 obj = "AthenaAttributeList"
19 dspkey = 'Run2DSPThresholdsKey'
20 from IOVDbSvc.IOVDbSvcConfig import addFolders
21 if flags.Input.isMC and flags.Input.Format != Format.BS:
22 # need OFC configuration, which includes appropriate ElecCalibDb
23 acc.merge(LArOFCCondAlgCfg(flags))
24
25 if not doDigiTruth:
26 kwargs.setdefault("LArRawChannelKey", "LArRawChannels")
27 else:
28 kwargs.setdefault("LArRawChannelKey", "LArRawChannels_DigiHSTruth")
29
30 kwargs.setdefault("ShapeKey", "LArShapeSym")
31 if flags.GeoModel.Run is LHCPeriod.Run1: # back to flat threshold
32 kwargs.setdefault("useDB", False)
33 dspkey = ''
34 else:
35 fld="/LAR/NoiseOfl/DSPThresholds"
36 sgkey=fld
37 dbString="OFLP200"
38 dbInstance="LAR_OFL"
39 acc.merge(addFolders(flags,fld, dbInstance, className=obj, db=dbString))
40
41 if flags.Common.ProductionStep in [ProductionStep.PileUpPresampling, ProductionStep.PileUpPretracking]:
42 kwargs.setdefault("LArDigitKey", flags.Overlay.BkgPrefix + "LArDigitContainer_MC")
43 elif doDigiTruth:
44 kwargs.setdefault("LArDigitKey", "LArDigitContainer_DigiHSTruth")
45 else:
46 kwargs.setdefault("LArDigitKey", "LArDigitContainer_MC")
47 else:
48 acc.merge(LArElecCalibDBCfg(flags,("OFC","Shape","Pedestal")))
49 if flags.Common.ProductionStep is ProductionStep.MinbiasPreprocessing:
50 kwargs.setdefault("LArDigitKey", f"{flags.Overlay.BkgPrefix}LArDigitContainer_data")
51 kwargs.setdefault("LArRawChannelKey", "LArRawChannels_FromDigits")
52 elif flags.Overlay.DataOverlay:
53 kwargs.setdefault("LArDigitKey", "LArDigitContainer_MC")
54 kwargs.setdefault("LArRawChannelKey", "LArRawChannels")
55 else:
56 kwargs.setdefault("LArRawChannelKey", "LArRawChannels_FromDigits")
57 if 'COMP200' in flags.IOVDb.DatabaseInstance:
58 fld='/LAR/Configuration/DSPThreshold/Thresholds'
59 obj='LArDSPThresholdsComplete'
60 dspkey = 'Run1DSPThresholdsKey'
61 sgkey='LArDSPThresholds'
62 dbString = 'COMP200'
63 else:
64 fld="/LAR/Configuration/DSPThresholdFlat/Thresholds"
65 sgkey=fld
66 dbString="CONDBR2"
67 dbInstance="LAR_ONL"
68 acc.merge(addFolders(flags,fld, dbInstance, className=obj, db=dbString))
69
70 if len (dspkey) > 0:
71 kwargs.setdefault(dspkey, sgkey)
72
73 if flags.LAr.ROD.forceIter or flags.LAr.RawChannelSource is RawChannelSource.Calculated:
74 # iterative OFC procedure
75 kwargs.setdefault('minSample',2)
76 kwargs.setdefault('maxSample',12)
77 kwargs.setdefault('minADCforIterInSigma',4)
78 kwargs.setdefault('minADCforIter',15)
79 kwargs.setdefault('defaultPhase',12)
80 nominalPeakSample=2
81 from LArConditionsCommon.LArRunFormat import getLArFormatForRun
82 larformat=getLArFormatForRun(flags.Input.RunNumbers[0],connstring="COOLONL_LAR/"+flags.IOVDb.DatabaseInstance)
83 if larformat is not None:
84 nominalPeakSample = larformat.firstSample()
85 else:
86 print("WARNING: larformat not found, use nominalPeakSample = 2")
87 nominalPeakSample = 2
88 if (nominalPeakSample > 1) :
89 kwargs.setdefault('DefaultShiftTimeSample',nominalPeakSample-2)
90 else :
91 kwargs.setdefault('DefaultShiftTimeSample',0)
92
93 acc.addEventAlgo(CompFactory.LArRawChannelBuilderIterAlg(**kwargs))
94 else:
95 #fixed OFC, as in DSP
96 acc.addEventAlgo(CompFactory.LArRawChannelBuilderAlg(**kwargs))
97
98 return acc
99
100
void print(char *figname, TCanvas *c1)

Variable Documentation

◆ acc

python.LArRawChannelBuilderAlgConfig.acc = MainServicesCfg(flags)

Definition at line 123 of file LArRawChannelBuilderAlgConfig.py.

◆ AtlasVersion

python.LArRawChannelBuilderAlgConfig.AtlasVersion

Definition at line 111 of file LArRawChannelBuilderAlgConfig.py.

◆ DumpLArRawChannels

python.LArRawChannelBuilderAlgConfig.DumpLArRawChannels = CompFactory.DumpLArRawChannels

Definition at line 127 of file LArRawChannelBuilderAlgConfig.py.

◆ Files

python.LArRawChannelBuilderAlgConfig.Files

Definition at line 110 of file LArRawChannelBuilderAlgConfig.py.

◆ flags

python.LArRawChannelBuilderAlgConfig.flags = initConfigFlags()

Definition at line 109 of file LArRawChannelBuilderAlgConfig.py.

◆ GeometryTile

python.LArRawChannelBuilderAlgConfig.GeometryTile

Definition at line 116 of file LArRawChannelBuilderAlgConfig.py.

◆ GlobalTag

python.LArRawChannelBuilderAlgConfig.GlobalTag

Definition at line 112 of file LArRawChannelBuilderAlgConfig.py.

◆ isMC

python.LArRawChannelBuilderAlgConfig.isMC

Definition at line 115 of file LArRawChannelBuilderAlgConfig.py.

◆ sequenceName

python.LArRawChannelBuilderAlgConfig.sequenceName

Definition at line 128 of file LArRawChannelBuilderAlgConfig.py.