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

    if len(ofcdef.PhysAutoCorr) == 2:  #Second OFC flavor defined
        LArPhysOFCAlg.ComputeOFCV2 = True
        LArPhysOFCAlg.UseDeltaV2 = ofcdef.useDelta[1]
        LArPhysOFCAlg.KeyOFCV2 = ofcdef.KeyOFC[1]
        if ofcdef.PhysAutoCorr[1]:
            LArPhysOFCAlg.DecoderToolV2 = theLArPhysAutoCorrDecoderTool
        else:
            LArPhysOFCAlg.DecoderToolV2 = theLArAutoCorrDecoderTool

    if ofcdef.Nsamples == 4:
        LArPhysOFCAlg.ReadDSPConfig = ofcdef.ReadDSPConfig
        LArPhysOFCAlg.DSPConfigFolder = ofcdef.DSPConfigFolder
예제 #2
0
    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

###########################################################################

if (WriteNtuple):

    from LArCalibTools.LArCalibToolsConf import LArOFC2Ntuple
    if (AllWavesPerCh):
        LArOFC2NtupleVec = []
        for i in range(0, MaxCalLinePerCh):
            topSequence += LArOFC2Ntuple("LArOFC2Ntuple" + str(i + 1))
            exec 'LArOFC2NtupleVec.append( topSequence.LArOFC2Ntuple%(fn)s )' % {
                'fn': i + 1
            }
            LArOFC2NtupleVec[i].ContainerKey = OFCKeySplitted[i]