from LArCalibUtils.LArCalibUtilsConf import LArOFCAlg from LArCalibUtils.LArCalibUtilsConf import LArOFPhasePicker for ofcdef in OFCDefs: if ofcdef == 0: continue LArPhysOFCAlg = LArOFCAlg(ofcdef.Algoname) LArPhysOFCAlg.RunThreaded = RunThreaded LArPhysOFCAlg.ReadCaliWave = False LArPhysOFCAlg.KeyList = [InputKey] LArPhysOFCAlg.Normalize = True LArPhysOFCAlg.Verify = True LArPhysOFCAlg.FillShape = True LArPhysOFCAlg.GroupingType = GroupingType LArPhysOFCAlg.Nphase = ofcdef.Nphase LArPhysOFCAlg.Dphase = ofcdef.Dphase LArPhysOFCAlg.Ndelay = 24 LArPhysOFCAlg.Nsample = ofcdef.Nsamples LArPhysOFCAlg.AddTimeOffset = -1.0 * TimeShiftGuardRegion LArPhysOFCAlg.LArPhysWaveBinKey = "LArPhysWaveShift" LArPhysOFCAlg.KeyShape = ofcdef.KeyShape LArPhysOFCAlg.UseDelta = ofcdef.useDelta[0] LArPhysOFCAlg.KeyOFC = ofcdef.KeyOFC[0] if ofcdef.PhysAutoCorr[0]: LArPhysOFCAlg.DecoderTool = theLArPhysAutoCorrDecoderTool else: LArPhysOFCAlg.DecoderTool = theLArAutoCorrDecoderTool
theLArPhysAutoCorrDecoderTool.UseAlwaysHighGain = True theLArPhysAutoCorrDecoderTool.isSC = SuperCells theLArPhysAutoCorrDecoderTool.KeyAutoCorr = "LArPhysAutoCorr" ToolSvc += theLArPhysAutoCorrDecoderTool from LArCalibUtils.LArCalibUtilsConf import LArOFCAlg LArPhysOFCAlg = LArOFCAlg("LArPhysOFCAlg") LArPhysOFCAlg.ReadCaliWave = False LArPhysOFCAlg.KeyList = [InputKey] LArPhysOFCAlg.Normalize = Normalize LArPhysOFCAlg.Verify = True LArPhysOFCAlg.GroupingType = GroupingType LArPhysOFCAlg.Nphase = Nphases LArPhysOFCAlg.Dphase = Dphases LArPhysOFCAlg.Ndelay = Ndelays LArPhysOFCAlg.Nsample = Nsamples LArPhysOFCAlg.FillShape = FillShape LArPhysOFCAlg.TimeShift = TimeShift LArPhysOFCAlg.TimeShiftByIndex = TimeShiftByIndex LArPhysOFCAlg.AddTimeOffset = -1.0 * TimeShiftGuardRegion LArPhysOFCAlg.LArPhysWaveBinKey = ShiftKey LArPhysOFCAlg.UseDelta = 0 #Only for high-mu OFCs LArPhysOFCAlg.KeyOFC = OFCKey LArPhysOFCAlg.KeyShape = ShapeKey LArPhysOFCAlg.DecoderTool = theLArAutoCorrDecoderTool LArPhysOFCAlg.isSC = SuperCells if Nsamples == 4:
LArPhysWaveShifter.TimeShiftByFEB = True LArPhysWaveShifter.TimeShiftGuardRegion = TimeShiftGuardRegion LArPhysWaveShifter.UsePhysCaliTdiff = UsePhysCaliTdiff topSequence += LArPhysWaveShifter ########################################################################### # OFC computation ########################################################################### from LArCalibUtils.LArCalibUtilsConf import LArOFCAlg LArPhysOFCAlg = LArOFCAlg("LArPhysOFCAlg") LArPhysOFCAlg.ReadCaliWave = False LArPhysOFCAlg.KeyList = [ContainerKey] LArPhysOFCAlg.Nphase = Nphases LArPhysOFCAlg.Dphase = Dphases LArPhysOFCAlg.Ndelay = Ndelays LArPhysOFCAlg.Nsample = Nsamples LArPhysOFCAlg.Normalize = Normalize LArPhysOFCAlg.TimeShift = TimeShift LArPhysOFCAlg.TimeShiftByIndex = TimeShiftByIndex LArPhysOFCAlg.Verify = True LArPhysOFCAlg.FillShape = FillShape if (doOFCPicker): LArPhysOFCAlg.KeyOFC = "tempOFC" LArPhysOFCAlg.KeyShape = "tempShape" else: LArPhysOFCAlg.KeyOFC = OFCKey LArPhysOFCAlg.KeyShape = ShapeKey
LArCaliOFCAlgVec[i].KeyOFC = OFCKeySplitted[ i] # this is also the key for the output LArOFCComplete LArCaliOFCAlgVec[i].FillShape = FillShape LArCaliOFCAlgVec[i].KeyShape = ShapeKeySplitted[ i] # this is the key for the output LArShapeComplete if (DumpOFC): LArCaliOFCAlgVec[i].DumpOFCfile = "LArOFCCali" + str(i + 1) + ".dat" LArCaliOFCAlgVec[i].GroupingType = GroupingType LArCaliOFCAlgVec[i].DecoderTool = theLArAutoCorrDecoderTool else: LArCaliOFCAlg = LArOFCAlg("LArCaliOFCAlg") LArCaliOFCAlg.ReadCaliWave = True LArCaliOFCAlg.KeyList = [ContainerKey] LArCaliOFCAlg.Nphase = Nphases LArCaliOFCAlg.Dphase = Dphases LArCaliOFCAlg.Ndelay = Ndelays LArCaliOFCAlg.Nsample = Nsamples LArCaliOFCAlg.Normalize = Normalize LArCaliOFCAlg.TimeShift = TimeShift LArCaliOFCAlg.TimeShiftByIndex = TimeShiftByIndex LArCaliOFCAlg.Verify = True LArCaliOFCAlg.FillShape = FillShape if (DumpOFC): LArCaliOFCAlg.DumpOFCfile = "LArOFCCali.dat" LArCaliOFCAlg.GroupingType = GroupingType LArCaliOFCAlg.DecoderTool = theLArAutoCorrDecoderTool topSequence += LArCaliOFCAlg ###########################################################################
########################################################################### # OFC computation ########################################################################### from LArCalibUtils.LArCalibUtilsConf import LArOFCAlg LArPhysOFCAlg = LArOFCAlg("LArPhysOFCAlg") LArPhysOFCAlg.ReadCaliWave = False LArPhysOFCAlg.KeyList = [InputKey] LArPhysOFCAlg.Normalize = Normalize LArPhysOFCAlg.Verify = True LArPhysOFCAlg.GroupingType = GroupingType LArPhysOFCAlg.Nphase = Nphases LArPhysOFCAlg.Dphase = Dphases LArPhysOFCAlg.Ndelay = Ndelays LArPhysOFCAlg.Nsample = Nsamples LArPhysOFCAlg.FillShape = FillShape LArPhysOFCAlg.TimeShift = TimeShift LArPhysOFCAlg.TimeShiftByIndex = TimeShiftByIndex LArPhysOFCAlg.AddTimeOffset = -1.0 * TimeShiftGuardRegion LArPhysOFCAlg.LArPhysWaveBinKey = ShiftKey LArPhysOFCAlg.UseDelta = UseDelta LArPhysOFCAlg.KeyOFC = OFCKey LArPhysOFCAlg.KeyShape = ShapeKey topSequence += LArPhysOFCAlg