ATLAS Offline Software
Functions
LArSC2NtupleConfig Namespace Reference

Functions

def LArSC2NtupleCfg (flags, isEmf=False, **kwargs)
 

Function Documentation

◆ LArSC2NtupleCfg()

def LArSC2NtupleConfig.LArSC2NtupleCfg (   flags,
  isEmf = False,
**  kwargs 
)

Definition at line 5 of file LArSC2NtupleConfig.py.

5 def LArSC2NtupleCfg(flags, isEmf=False, **kwargs):
6 
7  kwargs['isSC'] = True
8 
9  from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
10  cfg = ByteStreamReadCfg(flags)
11 
12  if kwargs.get("ContainerKey","") != "" or "SC_ADC_BAS" in kwargs.get('SCContainerKeys') or "SC_ET" in kwargs.get('SCContainerKeys'):
13  from LArByteStream.LArRawSCDataReadingConfig import LArRawSCDataReadingCfg
14  cfg.merge(LArRawSCDataReadingCfg(flags,OutputLevel=kwargs['OutputLevel']))
15  else:
16  theLArLATOMEDecoder = CompFactory.LArLATOMEDecoder("LArLATOMEDecoder")
17  from LArCabling.LArCablingConfig import LArCalibIdMappingCfg,LArOnOffIdMappingCfg
18  cfg.merge(LArOnOffIdMappingCfg(flags))
19  cfg.merge(LArCalibIdMappingCfg(flags))
20  cfg.addEventAlgo(CompFactory.LArRawSCCalibDataReadingAlg(LArSCAccCalibDigitKey = flags.LArSCDump.acccalibdigitsKey,
21  LArSCAccDigitKey = flags.LArSCDump.accdigitsKey,
22  CalibCablingKeyLeg="LArCalibLineMap",
23  OnOffMapLeg="LArOnOffIdMap",
24  LATOMEDecoder = theLArLATOMEDecoder, ))
25 
26  from LArCabling.LArCablingConfig import LArOnOffIdMappingSCCfg,LArCalibIdMappingSCCfg,LArLATOMEMappingCfg
27  cfg.merge(LArOnOffIdMappingSCCfg(flags))
28  cfg.merge(LArCalibIdMappingSCCfg(flags))
29  cfg.merge(LArLATOMEMappingCfg(flags))
30  if isEmf:
31  # hack for different mapping from EMF
32  cil=cfg.getCondAlgo('CondInputLoader')
33  iovdbsvc=cfg.getService('IOVDbSvc')
34  folder='/LAR/Identifier/LatomeMapping'
35  for i in range(0,len(iovdbsvc.Folders)):
36  if (iovdbsvc.Folders[i].find(folder)>=0):
37  del iovdbsvc.Folders[i]
38  break
39 
40  remove_folder = False
41  for cil_Loadval in cil.Load:
42  if folder in cil_Loadval:
43  print(f"Removing {cil_Loadval} from cil/Load")
44  remove_folder = True
45  break
46  if remove_folder: cil.Load.remove(cil_Loadval)
47  from IOVDbSvc.IOVDbSvcConfig import addFolders
48  cfg.merge(addFolders(flags,'/LAR/Identifier/LatomeMapping',tag='LARIdentifierLatomeMapping-EMF',className="CondAttrListCollection",detDb='/afs/cern.ch/user/p/pavol/w0/public/DB_update_24/SCcalib/LatomeMapping_EMF.db'))
49 
50  if flags.LArSCDump.doRawChan:
51  from LArByteStream.LArRawDataReadingConfig import LArRawDataReadingCfg
52  cfg.merge(LArRawDataReadingCfg(flags))
53  from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
54  cfg.merge(LArOnOffIdMappingCfg(flags))
55  from LArConfiguration.LArConfigFlags import RawChannelSource
56  if flags.LAr.RawChannelSource is RawChannelSource.Calculated:
57  from LArROD.LArRawChannelBuilderAlgConfig import LArRawChannelBuilderAlgCfg
58  cfg.merge(LArRawChannelBuilderAlgCfg(flags))
59 
60  cfg.getEventAlgo("LArRawChannelBuilder").LArRawChannelKey="LArRawChannels"
61 
62  if 'FillLB' in kwargs and kwargs['FillLB']: #we are filling per event tree
63  from LArCellRec.LArTimeVetoAlgConfig import LArTimeVetoAlgCfg
64  cfg.merge(LArTimeVetoAlgCfg(flags))
65  if flags.LArSCDump.fillNoisyRO: # should also config reco
66  from CaloRec.CaloRecoConfig import CaloRecoCfg
67  cfg.merge(CaloRecoCfg(flags))
68  from LArCellRec.LArNoisyROSummaryConfig import LArNoisyROSummaryCfg
69  cfg.merge(LArNoisyROSummaryCfg(flags))
70 
71  if 'FillTriggerTowers' in kwargs and kwargs['FillTriggerTowers']: #confiigure decoding
72  from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamDecoderCfg
73  from TrigT1CaloByteStream.LVL1CaloRun2ByteStreamConfig import LVL1CaloRun2ReadBSCfg
74  cfg.merge(L1TriggerByteStreamDecoderCfg(flags) )
75  cfg.merge(LVL1CaloRun2ReadBSCfg(flags))
76  from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg, HLTConfigSvcCfg, L1PrescaleCondAlgCfg, HLTPrescaleCondAlgCfg
77  cfg.merge( L1ConfigSvcCfg(flags) )
78  cfg.merge( HLTConfigSvcCfg(flags) )
79  cfg.merge( L1PrescaleCondAlgCfg(flags) )
80  cfg.merge( HLTPrescaleCondAlgCfg(flags) )
81 
82  alg=CompFactory.LArSC2Ntuple('LArSC2Ntuple',**kwargs)
83 
84  print(alg)
85 
86  cfg.addEventAlgo(alg)
87 
88  return cfg
89 
90 
python.CaloRecoConfig.CaloRecoCfg
def CaloRecoCfg(flags, clustersname=None)
Definition: CaloRecoConfig.py:9
LArCablingConfig.LArOnOffIdMappingSCCfg
def LArOnOffIdMappingSCCfg(configFlags)
Definition: LArCablingConfig.py:65
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
python.LArRawDataReadingConfig.LArRawDataReadingCfg
def LArRawDataReadingCfg(flags, **kwargs)
Definition: LArRawDataReadingConfig.py:11
python.LArRawChannelBuilderAlgConfig.LArRawChannelBuilderAlgCfg
def LArRawChannelBuilderAlgCfg(flags, **kwargs)
Definition: LArRawChannelBuilderAlgConfig.py:9
python.LArRawSCDataReadingConfig.LArRawSCDataReadingCfg
def LArRawSCDataReadingCfg(configFlags, **kwargs)
Definition: LArRawSCDataReadingConfig.py:8
python.ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
LVL1CaloRun2ByteStreamConfig.LVL1CaloRun2ReadBSCfg
def LVL1CaloRun2ReadBSCfg(flags, forRoIBResultToxAOD=False)
Definition: LVL1CaloRun2ByteStreamConfig.py:121
python.TrigConfigSvcCfg.HLTPrescaleCondAlgCfg
def HLTPrescaleCondAlgCfg(flags)
Definition: TrigConfigSvcCfg.py:329
LArCablingConfig.LArLATOMEMappingCfg
def LArLATOMEMappingCfg(configFlags)
Definition: LArCablingConfig.py:95
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
LArTimeVetoAlgConfig.LArTimeVetoAlgCfg
def LArTimeVetoAlgCfg(flags)
Definition: LArTimeVetoAlgConfig.py:7
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:81
LArCablingConfig.LArOnOffIdMappingCfg
def LArOnOffIdMappingCfg(configFlags)
Definition: LArCablingConfig.py:62
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.TrigConfigSvcCfg.L1PrescaleCondAlgCfg
def L1PrescaleCondAlgCfg(flags)
Definition: TrigConfigSvcCfg.py:273
python.TrigConfigSvcCfg.L1ConfigSvcCfg
def L1ConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:198
LArCablingConfig.LArCalibIdMappingSCCfg
def LArCalibIdMappingSCCfg(configFlags)
Definition: LArCablingConfig.py:86
LArNoisyROSummaryConfig.LArNoisyROSummaryCfg
def LArNoisyROSummaryCfg(configFlags, **kwargs)
Definition: LArNoisyROSummaryConfig.py:9
python.TrigConfigSvcCfg.HLTConfigSvcCfg
def HLTConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:231
TrigT1ResultByteStreamConfig.L1TriggerByteStreamDecoderCfg
def L1TriggerByteStreamDecoderCfg(flags, returnEDM=False)
Definition: TrigT1ResultByteStreamConfig.py:132
LArCablingConfig.LArCalibIdMappingCfg
def LArCalibIdMappingCfg(configFlags)
Definition: LArCablingConfig.py:83
LArSC2NtupleConfig.LArSC2NtupleCfg
def LArSC2NtupleCfg(flags, isEmf=False, **kwargs)
Definition: LArSC2NtupleConfig.py:5