Esempio n. 1
0
#ToolSvc += metMonTool
monManETmiss.AthenaMonTools += [metMonTool]

# Tool for calorimetric MET monitoring
metMonTool = METMonTool(name="METMonTool_Calo_cut80_" + triggerName)
metMonTool.NameSuffix = "Calo_cut80"
metMonTool.metKeys = ["MET_Topo", "MET_LocHadTopo"]
metMonTool.metFinKey = ""
metMonTool.metCalKey = ""
metMonTool.jetColKey = "AntiKt4LCTopoJets"
metMonTool.eleColKey = ""
metMonTool.muoColKey = ""
metMonTool.doMetCut80 = True
metMonTool.metCut = 80.0
#metMonTool.TriggerChain = trigger
metMonTool.FilterTools += [GetFilledBunchFilterTool()]
metMonTool.FilterTools += [GetLArBadLBFilterTool()]
if trigger != "":
    metMonTool.TrigDecisionTool = monTrigDecTool
#ToolSvc += metMonTool
monManETmiss.AthenaMonTools += [metMonTool]

# Monitoring for Random trigger
# If trigger is off, run anyway without trigger (useful for Random stream)
if DQMonFlags.useTrigger():
    trigger = "L1_RD0_EMPTY"
else:
    trigger = ""
#
# Tool for calorimeter term monitoring (TopoClusters)
metMonTool = METMonTool(name="METMonTool_Topo")
Esempio n. 2
0
# SCT_ByteStreamErrorsTool
myMonAlg.SCT_ByteStreamErrorsTool = SCT_ByteStreamErrorsTool
# InDetSCT_ConfigurationConditionsTool
myMonAlg.conditionsTool = InDetSCT_ConfigurationConditionsTool
# SCT_DCSConditionsTool
if InDetFlags.useDCS():
    myMonAlg.SCT_DCSConditionsTool = InDetSCT_DCSConditionsTool
else:
    myMonAlg.UseDCS = False
# InDetSCT_ConditionsSummaryTool
myMonAlg.SCT_ConditionsSummaryTool = InDetSCT_ConditionsSummaryTool

# FilterTools
if jobproperties.Beam.beamType() == 'collisions':
    from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
    myMonAlg.FilterTools += [GetFilledBunchFilterTool()]

myMonGroup = helper.addGroup(myMonAlg, "SCTErrMonitor", "SCT/")

# Configure histograms

from ROOT import SCT_Monitoring as sctMon  #import SCT_MonitoringNumbers.h

# Filled in fillHistograms
myMonGroup.defineHistogram(varname="lumiBlock;NumberOfEventsVsLB",
                           cutmask="is1D",
                           type="TH1F",
                           title="Num of events per LB ;LumiBlock",
                           path="GENERAL/Conf",
                           xbins=sctMon.NBINS_LBs,
                           xmin=0.5,
Esempio n. 3
0
    max_abs_eta=2.5,
    MinTrackP=0.0 * Units.GeV,
    min_pT=minTrkPtCut,  # default = 0.5 GeV
    min_si_hits=minSiHitCut,  # default = 3
    min_pixel_hits=minPixHitCut,  # default = 1
    min_sct_hits=0,
    min_trt_hits=10,
    TrigDecisionObjectName="xTrigDecision" if DQMonFlags.useTrigger else "")

if globalflags.DataSource == 'geant4':
    #No ByteStream error in MC case
    InDetTRT_Monitoring_Tool.ByteStreamErrors = ""

if jobproperties.Beam.beamType() == 'collisions':
    from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
    InDetTRT_Monitoring_Tool.FilterTools += [GetFilledBunchFilterTool()]

#ToolSvc += InDetTRT_Monitoring_Tool
if (InDetFlags.doPrintConfigurables()):
    printfunc(InDetTRT_Monitoring_Tool)

#-------------------------------------------------------------
# add an AthenaMonManager algorithm to the list of algorithms to be ran
#-------------------------------------------------------------
from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager

InDetTRTMonMan = AthenaMonManager(
    "TRTMonManager",
    FileKey=DQMonFlags.monManFileKey(),  #"GLOBAL" #"stat"
    ManualDataTypeSetup=DQMonFlags.monManManualDataTypeSetup(),  #True
    DataType=DQMonFlags.monManDataType(),  #"cosmics"
Esempio n. 4
0
        TRT_Manager=InDetKeys.TRT_Manager())

    InDetAlignMonGenericTracks = IDAlignMonGenericTracks(
        name="InDetAlignMonGenericTracks",
        trackSelection=m_alignMonTrackSelectionTool[1],
        tracksName=InDetKeys.ExtendedTracks(),
        VxPrimContainerName=InDetKeys.xAODVertexContainer())

    InDetAlignMonBeamSpot = InDetAlignMonBeamSpot(
        name="InDetAlignMonBeamSpot",
        vxContainerName=InDetKeys.xAODVertexContainer(),
        vxContainerWithBeamConstraint=InDetFlags.useBeamConstraint())

    if jobproperties.Beam.beamType() == 'collisions':
        from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
        InDetAlignMonSivsTRT.FilterTools += [GetFilledBunchFilterTool()]
        InDetAlignMonResiduals.FilterTools += [GetFilledBunchFilterTool()]
        InDetAlignMonEfficiencies.FilterTools += [GetFilledBunchFilterTool()]
        InDetAlignMonGenericTracks.FilterTools += [GetFilledBunchFilterTool()]
        InDetAlignMonBeamSpot.FilterTools += [GetFilledBunchFilterTool()]

    InDetAlignMonSivsTRT.TrigDecisionTool = monTrigDecTool
    InDetAlignMonResiduals.TrigDecisionTool = monTrigDecTool
    InDetAlignMonEfficiencies.TrigDecisionTool = monTrigDecTool
    InDetAlignMonGenericTracks.TrigDecisionTool = monTrigDecTool
    InDetAlignMonBeamSpot.TrigDecisionTool = monTrigDecTool

    if rec.doHeavyIon():
        InDetAlignMonSivsTRT.TriggerChain = "HLT_j30_ion_L1TE50"
        InDetAlignMonResiduals.TriggerChain = "HLT_j30_ion_L1TE50"
        InDetAlignMonEfficiencies.TriggerChain = "HLT_j30_ion_L1TE50"
                                        AthenaMonTools      = []) # these are set at the end

if InDetFlags.doMonitoringGlobal():
  #######################################################
  #                                                     #
  # LVL1 & BC ID monitoring - only for real data        #
  #                                                     #
  #######################################################
  from InDetGlobalMonitoring.InDetGlobalMonitoringConf import InDetGlobalSynchMonTool
  InDetGlobalSynchMonTool = InDetGlobalSynchMonTool( name          = "InDetGlobalSynchMonTool",
                                                    histoPathBase = "/GLOBAL",
                                                    checkRate     = 2000)
  
  if jobproperties.Beam.beamType()=='collisions':
    from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
    InDetGlobalSynchMonTool.FilterTools += [GetFilledBunchFilterTool()]
  
  #ToolSvc += InDetGlobalSynchMonTool
  if (InDetFlags.doPrintConfigurables()):
      printfunc (InDetGlobalSynchMonTool)

  #######################################################
  #                                                     #
  # Error monitoring, only online                       #
  #                                                     #
  #######################################################
  if doIdGlobalErrorMon:
      from InDetGlobalMonitoring.InDetGlobalMonitoringConf import InDetGlobalErrorMonTool
      InDetGlobalErrorMonTool=InDetGlobalErrorMonTool( name = "InDetGlobalErrorMonTool" )
  
      #ToolSvc += InDetGlobalErrorMonTool
Esempio n. 6
0
        if(egammaMonitorPhotons):
            from egammaPerformance.egammaPerformanceConf import photonMonTool
            phMonTool = photonMonTool(name= "phMonTool",
                                      EgTrigDecisionTool = MyTrigDecisionTool,
                                      EgUseTrigger = MyDoTrigger,
                                      EgTrigger = photonTrigItems,
                                      EgGroupExtension = "",
                                      PhotonContainer = "Photons",
                                      OutputLevel = egammaMonOutputLevel,
                                      )
            
            phMonTool.FilterTools += [ GetLArBadLBFilterTool() ]

            if jobproperties.Beam.beamType()=='collisions':
                phMonTool.FilterTools += [GetFilledBunchFilterTool()]
            monManEgamma.AthenaMonTools += [ phMonTool ]

            if DQMonFlags.useTrigger():
                phMonToolWithTrigger = photonMonTool(name= "phMonToolWithTrigger",
                                                     EgTrigDecisionTool = BypassMyTrigDecisionTool,
                                                     EgUseTrigger = True,
                                                     EgTrigger = BypassphotonTrigItems,
                                                     EgGroupExtension = "WithTrigger",
                                                     PhotonContainer = "Photons",
                                                     OutputLevel = egammaMonOutputLevel,
                                                     )
            
                phMonToolWithTrigger.FilterTools += [ GetLArBadLBFilterTool() ]
                
                if jobproperties.Beam.beamType()=='collisions':
Esempio n. 7
0
    InDetSCTErrMonTool = SCTErrMonTool(name="InDetSCTErrMonTool",
                                       OutputLevel=4,
                                       histoPathBase="/stat",
                                       UseDCS=InDetFlags.useDCS())
    if InDetFlags.useDCS():
        from SCT_ConditionsTools.SCT_DCSConditionsToolSetup import SCT_DCSConditionsToolSetup
        sct_DCSConditionsToolSetup = SCT_DCSConditionsToolSetup()
        sct_DCSConditionsToolSetup.setup()
        InDetSCTErrMonTool.SCT_DCSConditionsTool = sct_DCSConditionsToolSetup.getTool(
        )
    else:
        InDetSCTErrMonTool.SCT_DCSConditionsTool = None

    if jobproperties.Beam.beamType() == 'collisions':
        from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
        InDetSCTErrMonTool.FilterTools += [GetFilledBunchFilterTool()]

    if (InDetFlags.doPrintConfigurables()):
        printfunc(InDetSCTErrMonTool)

    from SCT_Monitoring.SCT_MonitoringConf import SCTTracksMonTool
    InDetSCTTracksMonTool = SCTTracksMonTool(name="InDetSCTTracksMonTool",
                                             OutputLevel=4,
                                             doTrigger=doTrigger,
                                             tracksName=tracksName)

    if jobproperties.Beam.beamType() == 'collisions':
        from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
        InDetSCTTracksMonTool.FilterTools += [GetFilledBunchFilterTool()]

        if (InDetFlags.doPrintConfigurables()):
Esempio n. 8
0
if InDetFlags.doMonitoringGlobal():
    #######################################################
    #                                                     #
    # LVL1 & BC ID monitoring - only for real data        #
    #                                                     #
    #######################################################
    from InDetGlobalMonitoring.InDetGlobalMonitoringConf import InDetGlobalSynchMonTool
    InDetGlobalSynchMonTool = InDetGlobalSynchMonTool(
        name="InDetGlobalSynchMonTool",
        histoPathBase="/GLOBAL",
        checkRate=2000)

    if jobproperties.Beam.beamType() == 'collisions':
        from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
        InDetGlobalSynchMonTool.FilterTools += [GetFilledBunchFilterTool()]

    #ToolSvc += InDetGlobalSynchMonTool
    if (InDetFlags.doPrintConfigurables()):
        printfunc(InDetGlobalSynchMonTool)

    #######################################################
    #                                                     #
    # Error monitoring, only online                       #
    #                                                     #
    #######################################################
    if doIdGlobalErrorMon:
        from InDetGlobalMonitoring.InDetGlobalMonitoringConf import InDetGlobalErrorMonTool
        InDetGlobalErrorMonTool = InDetGlobalErrorMonTool(
            name="InDetGlobalErrorMonTool")
Esempio n. 9
0
def SCTTracksMonAlgConfig(inputFlags):
    '''Function to configures some algorithms in the monitoring system.'''
    ### STEP 1 ###
    # Define one top-level monitoring algorithm. The new configuration 
    # framework uses a component accumulator.
    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
    result = ComponentAccumulator()

    # The following class will make a sequence, configure algorithms, and link
    # them to GenericMonitoringTools
    from AthenaMonitoring import AthMonitorCfgHelper
    helper = AthMonitorCfgHelper(inputFlags, 'SCTTracksMonCfg')


    ### STEP 2 ###
    # Adding an algorithm to the helper. Here, we will use the example 
    # algorithm in the AthenaMonitoring package. Just pass the type to the 
    # helper. Then, the helper will instantiate an instance and set up the 
    # base class configuration following the inputFlags. The returned object 
    # is the algorithm.
    from AthenaConfiguration.ComponentFactory import CompFactory
    myMonAlg = helper.addAlgorithm(CompFactory.SCTTracksMonAlg, 'SCTTracksMonAlg')

    if inputFlags.Beam.Type=='collisions':
        from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
        myMonAlg.FilterTools += [GetFilledBunchFilterTool()]

    doTrigger = False
    if not inputFlags.isMC:
        if inputFlags.Trigger.doHLT:
            doTrigger = True
    myMonAlg.doTrigger = doTrigger

    # # If for some really obscure reason you need to instantiate an algorithm
    # # yourself, the AddAlgorithm method will still configure the base 
    # # properties and add the algorithm to the monitoring sequence.
    # helper.AddAlgorithm(myExistingAlg)


    ### STEP 3 ###
    # Edit properties of a algorithm
    myMonAlg.TriggerChain = ''
    # myMonAlg.RandomHist = True

    # Set InDetTrackSummaryTool to TrackSummaryTool of SCTLorentzMonAlg
    from .TrackSummaryToolWorkaround import TrackSummaryToolWorkaround
    myMonAlg.TrackSummaryTool = result.popToolsAndMerge(TrackSummaryToolWorkaround(inputFlags))

    ### STEP 4 ###
    # Add some tools. N.B. Do not use your own trigger decion tool. Use the
    # standard one that is included with AthMonitorAlgorithm.

    # # First, add a tool that's set up by a different configuration function. 
    # # In this case, CaloNoiseToolCfg returns its own component accumulator, 
    # # which must be merged with the one from this function.
    # from CaloTools.CaloNoiseToolConfig import CaloNoiseToolCfg
    # caloNoiseAcc, caloNoiseTool = CaloNoiseToolCfg(inputFlags)
    # result.merge(caloNoiseAcc)
    # myMonAlg.CaloNoiseTool = caloNoiseTool

    # set up geometry / conditions
    from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
    result.merge(InDetGeometryCfg(inputFlags))

    # # Then, add a tool that doesn't have its own configuration function. In
    # # this example, no accumulator is returned, so no merge is necessary.
    # from MyDomainPackage.MyDomainPackageConf import MyDomainTool
    # myMonAlg.MyDomainTool = MyDomainTool()

    # Add a generic monitoring tool (a "group" in old language). The returned 
    # object here is the standard GenericMonitoringTool.
    myMonGroup = helper.addGroup(
        myMonAlg,
        "SCTTracksMonitor",
        "SCT/GENERAL/"
    )

    ### STEP 5 ###
    # Configure histograms
    regionNames = ["EndCapC", "Barrel", "EndCapA"]
    N_REGIONS = len(regionNames)
    s_triggerNames = ["RNDM", "BPTX", "L1CAL", "TGC", "RPC", "MBTS", "COSM", "Calib"]
    N_TRIGGER_TYPES = len(s_triggerNames)
    N_HIT_BINS =  50
    FIRST_HIT_BIN =  0
    LAST_HIT_BIN  = N_HIT_BINS-FIRST_HIT_BIN-1 # This is already defined in SCT_MonitoringNumbers.h
    myMonGroup.defineHistogram(varname="trk_N", # ; means alias
                               type="TH1F",
                               title="Number of tracks"+";Number of Tracks",
                               path="tracks", # path cannot be "".
                               xbins=400, xmin=0., xmax=4000.)
    myMonGroup.defineHistogram(varname="trk_chi2", # ; means alias
                               type="TH1F",
                               title="Track #chi^{2} div ndf"+";Number of track #chi^{2}/NDF",
                               path="tracks", # path cannot be "".
                               xbins=150, xmin=0., xmax=150.)
    myMonGroup.defineHistogram(varname="trk_d0", # ; means alias
                               type="TH1F",
                               title="Track d0"+";d0 [mm]",
                               path="tracks", # path cannot be "".
                               xbins=160, xmin=-40., xmax=40.)
    myMonGroup.defineHistogram(varname="trk_z0", # ; means alias
                               type="TH1F",
                               title="Track z0"+";z0 [mm]",
                               path="tracks", # path cannot be "".
                               xbins=200, xmin=-200., xmax=200.)
    myMonGroup.defineHistogram(varname="trk_phi", # ; means alias
                               type="TH1F",
                               title="Track Phi"+";#phi [rad]",
                               path="tracks", # path cannot be "".
                               xbins=160, xmin=-4., xmax=4.)
    myMonGroup.defineHistogram(varname="trk_pt", # ; means alias
                               type="TH1F",
                               title="Track P_{T}"+";P_{T} [GeV]",
                               path="tracks", # path cannot be "".
                               xbins=150, xmin=0., xmax=150.)
    myMonGroup.defineHistogram(varname="trk_sct_hits", # ; means alias
                               type="TH1F",
                               title="SCT HITS per single Track"+";Num of Hits",
                               path="tracks", # path cannot be "".
                               xbins=N_HIT_BINS, xmin=FIRST_HIT_BIN, xmax=LAST_HIT_BIN)
    myMonGroup.defineHistogram(varname="trk_eta", # ; means alias
                               type="TH1F",
                               title="Track Eta"+";#eta",
                               path="tracks", # path cannot be "".
                               xbins=160, xmin=-4., xmax=4.)
                                           
    myMonGroup.defineHistogram(varname="trackTriggers", # ; means alias
                               type="TH1I",
                               title="Tracks for different trigger types",
                               path="tracks", # path cannot be "".
                               xbins=N_TRIGGER_TYPES, xmin=-0.5, xmax=7.5, xlabels=s_triggerNames)
    myMonGroup.defineHistogram(varname="region"+","+"hitsRegion"+";"+"SCTTrackRate", # ; means alias
                               type="TProfile",
                               title="Track per event for SCT regions",
                               path="tracks", # path cannot be "".
                               xbins=3, xmin=0.0, xmax=3.0, xlabels=regionNames)
    myMonGroup.defineHistogram(varname="tracksPerRegion", # ; means alias
                               type="TH1F",
                               title="Number of tracks in eta regions",
                               path="tracks", # path cannot be "".
                               xbins=N_REGIONS, xmin=0, xmax=N_REGIONS, xlabels=regionNames)


    for region in regionNames:
        myMonGroup.defineHistogram(varname="total"+region+"Residual",
                                   title="Overall Residual Distribution for the "+region+";Residual [mm]",
                                   type="TH1F", path="tracks",
                                   xbins=100, xmin=-0.5, xmax=0.5)
        myMonGroup.defineHistogram(varname="total"+region+"Pull",
                                   title="Overall Pull Distribution for the "+region+";Pull",
                                   type="TH1F", path="tracks",
                                   xbins=100, xmin=-5, xmax=5)
    ### STEP 6 ###
    # Finalize. The return value should be a tuple of the ComponentAccumulator
    # and the sequence containing the created algorithms. If we haven't called
    # any configuration other than the AthMonitorCfgHelper here, then we can 
    # just return directly (and not create "result" above)
    #return helper.result()
    
    # # Otherwise, merge with result object and return
    result.merge(helper.result())
    return result
Esempio n. 10
0
            phMonTool = photonMonTool(
                name="phMonTool",
                PhotonContainer="PhotonAODCollection",
                EMShowerContainer="",
                EMConvertContainer="",
                Photon_Trigger_Items=photonTrigItems,
                Photon_Selection_Items=["all", "loose", "tight"],
                Photon_Divison_Items=["PHOB", "PHOC", "PHOE"],
                OutputLevel=egammaMonOutputLevel,
                TrigDecisionTool=MyTrigDecisionTool,
                UseTrigger=DQMonFlags.useTrigger())

            phMonTool.FilterTools += [GetLArBadLBFilterTool()]

            if jobproperties.Beam.beamType() == 'collisions':
                phMonTool.FilterTools += [GetFilledBunchFilterTool()]
            monManEgamma.AthenaMonTools += [phMonTool]

        if (egammaMonitorElectrons):
            from egammaPerformance.egammaPerformanceConf import electronMonTool
            elMonTool = electronMonTool(
                name="elMonTool",
                ElectronContainer="ElectronAODCollection",
                EMTrackMatchContainer="",
                EMShowerContainer="",
                EMConvertContainer="",
                Electron_Trigger_Items=electronTrigItems,
                Electron_Selection_Items=["all", "loose", "medium", "tight"],
                Electron_Divison_Items=["EIDB", "EIDC", "EIDE", "EIDA"],
                OutputLevel=egammaMonOutputLevel,
                TrigDecisionTool=MyTrigDecisionTool,