#Decoder Tool for pile-up autocorrelation
theLArPhysAutoCorrDecoderTool = LArAutoCorrDecoderTool(
    "LArPhysAutoCorrDecoderTool")
theLArPhysAutoCorrDecoderTool.DecodeMode = 1
theLArPhysAutoCorrDecoderTool.UseAlwaysHighGain = True
theLArPhysAutoCorrDecoderTool.KeyAutoCorr = "LArPhysAutoCorr"
ToolSvc += theLArPhysAutoCorrDecoderTool

#Instantiate LArOFCAlgos

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"
theLArAutoCorrDecoderTool.UseAlwaysHighGain = True
theLArAutoCorrDecoderTool.isSC = SuperCells
ToolSvc += theLArAutoCorrDecoderTool

if NColl > 0:
    theLArPhysAutoCorrDecoderTool = LArAutoCorrDecoderTool(
        "LArPhysAutoCorrDecoderTool")
    theLArPhysAutoCorrDecoderTool.DecodeMode = 1
    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
示例#3
0
    svcMgr += getConfigurable("CondProxyProvider")()
    svcMgr.CondProxyProvider.InputCollections += PoolFileList

###########################################################################
#                            OFC computation
###########################################################################

from LArCalibUtils.LArCalibUtilsConf import LArAutoCorrDecoderTool
theLArAutoCorrDecoderTool = LArAutoCorrDecoderTool()
ToolSvc += theLArAutoCorrDecoderTool

from LArCalibUtils.LArCalibUtilsConf import LArOFCAlg
if (AllWavesPerCh):
    LArCaliOFCAlgVec = []
    for i in range(0, MaxCalLinePerCh):
        topSequence += LArOFCAlg("LArCaliOFCAlg" + str(i + 1))
        exec 'LArCaliOFCAlgVec.append( topSequence.LArCaliOFCAlg%(fn)s )' % {
            'fn': i + 1
        }

        LArCaliOFCAlgVec[i].ReadCaliWave = True
        LArCaliOFCAlgVec[i].KeyList = [ContainerKeySplitted[i]]
        LArCaliOFCAlgVec[i].Nphase = Nphases
        LArCaliOFCAlgVec[i].Dphase = Dphases
        LArCaliOFCAlgVec[i].Ndelay = Ndelays
        LArCaliOFCAlgVec[i].Nsample = Nsamples
        LArCaliOFCAlgVec[i].Normalize = Normalize
        LArCaliOFCAlgVec[i].TimeShift = TimeShift
        LArCaliOFCAlgVec[i].TimeShiftByIndex = TimeShiftByIndex
        LArCaliOFCAlgVec[i].Verify = True
        LArCaliOFCAlgVec[i].KeyOFC = OFCKeySplitted[
示例#4
0
    LArPhysWaveShifter.NindexFromPeak = 0  # if 0 will use Ndelays*Nsampling
    LArPhysWaveShifter.Ndelays = 24
    LArPhysWaveShifter.Nsamplings = Nsamplings
    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:
   svcMgr.IOVRegistrationSvc.RecreateFolders = False




###########################################################################
#                            OFC computation
###########################################################################
if doOFC:
  from LArCalibUtils.LArCalibUtilsConf import LArAutoCorrDecoderTool
  theLArAutoCorrDecoderTool = LArAutoCorrDecoderTool()
  theLArAutoCorrDecoderTool.isSC = SuperCells
  ToolSvc += theLArAutoCorrDecoderTool

  from LArCalibUtils.LArCalibUtilsConf import LArOFCAlg
  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 = False
  if ( DumpOFC ) :
     LArCaliOFCAlg.DumpOFCfile = "LArOFCCali.dat"
  LArCaliOFCAlg.GroupingType = GroupingType
  LArCaliOFCAlg.DecoderTool=theLArAutoCorrDecoderTool
示例#6
0
    LArPhysWaveShifter.OutputShiftsKey = ShiftKey
    topSequence += LArPhysWaveShifter

else:
    #Load Shifts from DB:
    conddb.addFolder(
        "LAR_OFL", OFCBinFolder + "<tag>" + OutputObjectSpecTagOFCBin +
        "</tag><key>" + ShiftKey + "</key>")

###########################################################################
#                      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