Beispiel #1
0
	def __init__(self, name):
		mlog = logging.getLogger(name+'::__init__')
		mlog.info("entering")
			
		egammaMonTool.__init__(self,name)
		_name = name	

		try:
			## add an AthenaMonManager algorithm to the list of algorithms to be ran
			from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
			monMan = AthenaMonManager( "MonManager_%s" % name )

			monMan.AthenaMonTools += [ "egammaMonTool/'%s'" % name ]

			# FileKey must match that given to THistSvc
			monMan.FileKey = "'%s'" % name

			# Set global monitoring parameters: see the AthenaMonManager class
			# in the Control/AthenaMonitoring package
			monMan.ManualDataTypeSetup = True
			monMan.DataType            = "monteCarlo"
			monMan.Environment         = "user"
			monMan.ManualRunLBSetup    = True
			monMan.Run                 = 1
			monMan.LumiBlock           = 1

		except Exception:
			mlog.error("could not initialize egammaMonTool/%s" % name)
			print(traceback.format_exc())
			return False
		
		# get a handle on the top sequence of algorithms
		from AthenaCommon.AlgSequence import AlgSequence
		topSequence = AlgSequence()
		topSequence += monMan
# Add an AthenaMonManager algorithm to the list of algorithms to be ran
#
# AthenaMonManager is the Algorithm that manages many classes inheriting
# 	from ManagedMonitorToolBase
#
from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
monMan = AthenaMonManager("PixelMonManager")

from PixelMonitoring.PixelMonitoringConf import *
PixelMainsMon = PixelMainMon()
ToolSvc += PixelMainsMon
monMan.AthenaMonTools += [PixelMainsMon]
print PixelMainsMon

## FileKey must match that given to THistSvc
monMan.FileKey = "GLOBAL"

## Set global monitoring parameters: see the AthenaMonManager class
## in the Control/AthenaMonitoring package
monMan.ManualDataTypeSetup = True
monMan.DataType = "montecarlo"
monMan.Environment = "user"
monMan.ManualRunLBSetup = True
monMan.Run = 1
monMan.LumiBlock = 1

## Set pixel monitoring parameters
##Flags for data container types
PixelMainsMon.doRDO = True
PixelMainsMon.doErrors = True
PixelMainsMon.doSpacePoint = True
Beispiel #3
0
from InDetPhysValMonitoring.InDetPhysValMonitoringConf import HistogramDefinitionSvc
ToolSvc = ServiceMgr.ToolSvc
ServiceMgr+=HistogramDefinitionSvc()
ServiceMgr.HistogramDefinitionSvc.DefinitionSource="../share/testHDef.xml"
ServiceMgr.HistogramDefinitionSvc.DefinitionFormat="text/xml"

from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
monMan = AthenaMonManager( "PhysValMonManager" )
monMan.ManualDataTypeSetup = True
monMan.DataType            = "monteCarlo"
monMan.Environment         = "altprod"
monMan.ManualRunLBSetup    = True
monMan.Run                 = 1
monMan.LumiBlock           = 1
monMan.FileKey = "TestPlots"
topSequence += monMan



from InDetPhysValMonitoring.InDetPhysValMonitoringConf import ToolTestMonitoringPlots
tool1 = ToolTestMonitoringPlots()

ToolSvc += tool1
monMan.AthenaMonTools += [tool1]


from GaudiSvc.GaudiSvcConf import THistSvc
ServiceMgr += THistSvc()
svcMgr.THistSvc.Output += ["TestPlots DATAFILE='TestPlots.root' OPT='RECREATE'"]
Beispiel #4
0
        OutputLevel=INFO)
    #ToolSvc += ZmumuMon

    from AthenaMonitoring.DQMonFlags import DQMonFlags
    from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
    IDPerfMonManager = AthenaMonManager(
        name="IDPerfMonManager",
        FileKey=DQMonFlags.monManFileKey(),
        ManualDataTypeSetup=DQMonFlags.monManManualDataTypeSetup(),
        DataType=DQMonFlags.monManDataType(),
        Environment="user",
        ManualRunLBSetup=True,
        Run=1,
        LumiBlock=1)
    IDPerfMonManager.AthenaMonTools += [ZmumuMon]

    ServiceMgr.THistSvc.Output += [
        "DiMuMon DATAFILE='DiMuMon.root' OPT='RECREATE'"
    ]
    IDPerfMonManager.FileKey = "DiMuMon"

    topSequence += IDPerfMonManager

#### run global alignment monitoring

if zmumuval == True and globalAlignmentMon == True:
    trackCollections = ["SelectedMuonsRefit1", "SelectedMuonsRefit2"]
    StoreGateSvc = Service("StoreGateSvc")
    StoreGateSvc.Dump = False
    include("InDetPerformanceMonitoring/TrackMonitoring.py")
Beispiel #5
0
else:
    from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
    ToolSvc += Trig__TrigDecisionTool("TrigDecisionTool")
    ToolSvc.TrigDecisionTool.OutputLevel = ERROR
    ToolSvc.TrigDecisionTool.Navigation.OutputLevel = ERROR

HLTmetMonMan = AthenaMonManager(name="HLTMonManager",
                                FileKey=DQMonFlags.monManFileKey(),
                                Environment=DQMonFlags.monManEnvironment(),
                                OutputLevel=HLTmetOutputLevel)

topSequence += HLTmetMonMan

# in order to check available detectors
from RecExConfig.RecFlags import rec

try:
    from TrigMETMonitoring.TrigMETMonitoringConfig import HLTMETMonitoringTool
    HLTmetMonMan.AthenaMonTools += HLTMETMonitoringTool()
except:
    print "Problems with HLTMETTool, tool not enabled"

HLTmetMonMan.FileKey = "MonitorHLTmet"

print HLTmetMonMan

#############################################
# Events to run over; "-1" for all events.
#############################################
theApp.EvtMax = -1
Beispiel #6
0
    InDetAlignMonPVBiases_noTrig.FilterTools.append(monFilledBunchFilterTool)

if InDetAlignMonDoTruth:
    InDetAlignMonManager.AthenaMonTools += [InDetAlignMonTruthComparison]
if not hasattr(ToolSvc, 'monTrigDecTool') or not doTriggerAwareMonitoring:
    print "InDetAlignmentMonitoring_InDetRec_jobOptions.py: trigger decision tool not found: don't run trigger-aware monitoring"
elif jobproperties.Beam.beamType() == 'cosmics' or jobproperties.Beam.beamType(
) == 'singlebeam':
    print "singlebeam or cosmics: don't run trigger-aware monitoring"
else:
    InDetAlignMonManager.AthenaMonTools += [InDetAlignMonResiduals]
    InDetAlignMonManager.AthenaMonTools += [InDetAlignMonEfficiencies]
    InDetAlignMonManager.AthenaMonTools += [InDetAlignMonGenericTracks]
    InDetAlignMonManager.AthenaMonTools += [InDetAlignMonBeamSpot]
    InDetAlignMonManager.AthenaMonTools += [InDetAlignMonPVBiases]
    InDetAlignMonManager.AthenaMonTools += [InDetAlignMonSivsTRT]

## Setup the output histogram file(s):
if not hasattr(ServiceMgr, 'THistSvc'):
    from GaudiSvc.GaudiSvcConf import THistSvc
    ServiceMgr += THistSvc()
if InDetAlignMonDoOutput:
    THistSvc = Service("THistSvc")
    histOutput = "IDAlignMon DATAFILE='./IDAlignMon.root' OPT='RECREATE'"
    THistSvc.Output += [histOutput]
    InDetAlignMonManager.FileKey = "IDAlignMon"

topSequence += InDetAlignMonManager
if (InDetFlags.doPrintConfigurables()):
    print InDetAlignMonManager
Beispiel #7
0
from InDetPhysValMonitoring.InDetPhysValMonitoringConf import HistogramDefinitionSvc
ToolSvc = ServiceMgr.ToolSvc
ServiceMgr+=HistogramDefinitionSvc()
ServiceMgr.HistogramDefinitionSvc.DefinitionSource="../share/InDetPVMPlotDefRun2.xml"
ServiceMgr.HistogramDefinitionSvc.DefinitionFormat="text/xml"


from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
monMan = AthenaMonManager( "PhysValMonManager" )
monMan.ManualDataTypeSetup = True
monMan.DataType            = "monteCarlo"
monMan.Environment         = "altprod"
monMan.ManualRunLBSetup    = True
monMan.Run                 = 1
monMan.LumiBlock           = 1
monMan.FileKey = "M_output"
topSequence += monMan


#this works:
'''
from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
InDetTrackSelectorTool = InDet__InDetTrackSelectionTool(name = "InDetTrackSelectorTool",
                                                        CutLevel = InDetPrimaryVertexingCuts.TrackCutLevel(),
                                                        minPt = InDetPrimaryVertexingCuts.minPT(),
                                                        maxD0 = InDetPrimaryVertexingCuts.IPd0Max(),
                                                        maxZ0 = InDetPrimaryVertexingCuts.z0Max(),
                                                        maxZ0SinTheta = InDetPrimaryVertexingCuts.IPz0Max(),
                                                        maxSigmaD0 = InDetPrimaryVertexingCuts.sigIPd0Max(),
                                                        maxSigmaZ0SinTheta = InDetPrimaryVertexingCuts.sigIPz0Max(),
                                                        # maxChiSqperNdf = InDetPrimaryVertexingCuts.fitChi2OnNdfMax(), # Seems not to be implemented?
        FileKey=DQMonFlags.monManFileKey(),
        Environment=DQMonFlags.monManEnvironment(),
        OutputLevel=muonOutputLevel)

    from CscRawDataMonitoring.CscRawDataMonitoringConf import CscPrdValAlg
    cscPrdESDValAlg = CscPrdValAlg(
        name='cscPrdESDValAlg',
        CSCPrepRawDataPath='Muon/MuonRawDataMonitoring/CSC/PRD',
        CSCPrepRawDataKey='CSC_Measurements',
        NoiseCutADC=100,
        CSCStripFitter=ToolSvc.CalibCscStripFitter)
    ToolSvc += cscPrdESDValAlg
    cscprdRawMonMan.AthenaMonTools += [cscPrdESDValAlg]

    topSequence += cscprdRawMonMan
    cscprdRawMonMan.FileKey = "CSCMonitor"

#---------------------------------------------------------------
# CSC Cluster Monitoring
#---------------------------------------------------------------
if doCSCClus:
    ## trigger-aware monitoring: sample seletion triggers
    csc_evtSelectionTriggers = [
        "L1_MU10", "L1_MU15", "EF_mu20_muCombTag_NoEF", "EF_mu15",
        "EF_mu15_mu10_EFFS", "EF_2mu10", "EF_2mu10_loose"
    ]

    ## retrieve TDT (this should be done already?)
    from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
    ToolSvc += Trig__TrigDecisionTool("TrigDecisionTool")
    ToolSvc.TrigDecisionTool.OutputLevel = ERROR
Beispiel #9
0
from AthenaCommon.BeamFlags import jobproperties

from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()

from AthenaMonitoring.DQMonFlags import DQMonFlags

if not 'rec' in dir():
    from RecExConfig.RecFlags import rec

from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
ManagedAthenaTileMon = AthenaMonManager( "ManagedAthenaTileMon" ) #topSequence.ManagedAthenaTileMon

from AthenaCommon.AppMgr import ServiceMgr

ManagedAthenaTileMon.FileKey = DQMonFlags.monManFileKey()
ManagedAthenaTileMon.ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup()
ManagedAthenaTileMon.DataType            = DQMonFlags.monManDataType()
ManagedAthenaTileMon.Environment         = DQMonFlags.monManEnvironment()
ManagedAthenaTileMon.ManualRunLBSetup    = DQMonFlags.monManManualRunLBSetup()
ManagedAthenaTileMon.Run                 = DQMonFlags.monManRun()
ManagedAthenaTileMon.LumiBlock           = DQMonFlags.monManLumiBlock()

if DQMonFlags.monManEnvironment() == 'tier0Raw':
    tileRawMon=True
    tileESDMon=False
elif DQMonFlags.monManEnvironment() == 'tier0ESD':
    tileRawMon=False
    tileESDMon=True
else: # it should be 'tier0'
    tileRawMon=True
if not runDAOD : 
  from InDetPhysValMonitoring.InDetPhysValMonitoringConf import InDetPhysValDecoratorAlg
  decorators = InDetPhysValDecoratorAlg()
  topSequence += decorators


from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
monMan = AthenaMonManager( "PhysValMonManager" )
monMan.ManualDataTypeSetup = True
monMan.DataType            = "monteCarlo"
monMan.Environment         = "altprod"
monMan.ManualRunLBSetup    = True
monMan.Run                 = 1
monMan.LumiBlock           = 1
monMan.FileKey = "MyPhysVal"
topSequence += monMan

#-------------------------------------------------------------
# Set up track selection tool
#-------------------------------------------------------------
from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
InDetTrackSelectorTool = InDet__InDetTrackSelectionTool("InDetTrackSelectorTool")
InDetTrackSelectorTool.minPt            = 400           # Mev
InDetTrackSelectorTool.maxD0            = 1              # mm
InDetTrackSelectorTool.maxZ0            = 150          # mm
InDetTrackSelectorTool.minNSiHits       = 9            # Pixel + SCT
InDetTrackSelectorTool.maxNPixelHoles   = 2             # Pixel only
#eta dependant hit cut below
#InDetTrackSelectorTool.vecEtaCutoffsForSiHitsCut = [0,1.0,1.2,1.8,2.2]
#InDetTrackSelectorTool.vecMinNSiHitsAboveEta = [11,11,11,13,10]
Beispiel #11
0
            Run=1,
            LumiBlock=1)

        topSequence += InDetTrackPerfMonManager
        if (InDetFlags.doPrintConfigurables()):
            print InDetTrackPerfMonManager

        # --- Setup the output histogram file(s)
        if not hasattr(ServiceMgr, 'THistSvc'):
            from GaudiSvc.GaudiSvcConf import THistSvc
            ServiceMgr += THistSvc()
        THistSvc = Service("THistSvc")
        histOutput = "InDetPerformanceMon DATAFILE='" + InDetKeys.StandardPlotHistName(
        ) + "' OPT='RECREATE'"
        THistSvc.Output += [histOutput]
        InDetTrackPerfMonManager.FileKey = "InDetPerformanceMon"

        from InDetPerformanceRTT.InDetPerformanceRTTConf import IDStandardPerformance as InDetStandardPerformance

        # all tracks
        InDetStandardPerformanceAll = InDetStandardPerformance(
            name="InDetStandardPerformanceAll",
            tracksName=InDetKeys.UnslimmedTracks(),
            tracksTruthName=InDetKeys.UnslimmedTracksTruth(),
            SummaryTool=InDetTrackSummaryToolSharedHits,
            HoleSearch=InDetHoleSearchTool,
            useTrackSelection=False,
            HistDirectoryName="AllTracks",
            TruthToTrackTool=TruthToTrackTool,
            doUpgrade=InDetFlags.doSLHC(),
            DoTruth=InDetFlags.doTruth())
            ZmumuMon_XpressTrig_2mu.TrigDecisionTool = monTrigDecTool
            ToolSvc += ZmumuMon_XpressTrig_2mu
            if (InDetFlags.doPrintConfigurables()):
                print ZmumuMon_XpressTrig_2mu
            InDetDiMuMonManager.AthenaMonTools += [ZmumuMon_XpressTrig_2mu]

    ## Setup the output histogram file(s):
    if not hasattr(ServiceMgr, 'THistSvc'):
        from GaudiSvc.GaudiSvcConf import THistSvc
        ServiceMgr += THistSvc()

    if DiMuMonDoROOTFile:
        THistSvc = Service("THistSvc")
        histOutput = "DiMuMon DATAFILE='./DiMuMon.root' OPT='RECREATE'"
        THistSvc.Output += [histOutput]
        InDetDiMuMonManager.FileKey = "DiMuMon"

    topSequence += InDetDiMuMonManager
    if (InDetFlags.doPrintConfigurables()):
        print InDetDiMuMonManager

#
# HI collisions
#
if rec.doHeavyIon():

    from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
    InDetDiMuMonManager = AthenaMonManager(
        name="InDetDiMuMonManager",
        FileKey="GLOBAL",
        ManualDataTypeSetup=True,
Beispiel #13
0
ToolSvc = ServiceMgr.ToolSvc
ServiceMgr += HistogramDefinitionSvc()
ServiceMgr.HistogramDefinitionSvc.DefinitionSource = "../share/TCCPlotDef.xml"
ServiceMgr.HistogramDefinitionSvc.DefinitionFormat = "text/xml"

from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager

monMan = AthenaMonManager("PhysValMonManager")
monMan.ManualDataTypeSetup = True
monMan.DataType = "monteCarlo"
monMan.Environment = "altprod"
monMan.ManualRunLBSetup = True
monMan.Run = 1
monMan.LumiBlock = 1
monMan.FileKey = "MyTCC"
topSequence += monMan

from TrackCaloClusterRecValidation.TrackCaloClusterRecValidationConf import TrackCaloClusterRecValidationTool

tool = TrackCaloClusterRecValidationTool()
tool.JetTruthContainerName = "AntiKt10TruthJets"
tool.TopoJetReferenceName = "MyAntiKt10LCTopoJets"
tool.TopoTrimmedJetReferenceName = "MyAntiKt10LCTopoTrimmedJets"
tool.JetContainerNames = [
    "MyAntiKt10LCTopoJets", "MyAntiKt10LCTopoTrimmedJets",
    "AntiKt10TrackCaloClustersAllJets",
    "AntiKt10TrackCaloClustersAllTrimmedJets",
    "AntiKt10TrackCaloClustersChargedJets",
    "AntiKt10TrackCaloClustersChargedTrimmedJets",
    "AntiKt10TrackCaloClustersJets", "AntiKt10TrackCaloClustersTrimmedJets"
Beispiel #14
0
include("RecExCommon/RecExCommon_topOptions.py")

# TDT
from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool

ToolSvc += Trig__TrigDecisionTool("TrigDecisionTool")
ToolSvc.TrigDecisionTool.TrigDecisionKey = 'xTrigDecision'

from AthenaCommon.AlgSequence import AlgSequence

topSequence = AlgSequence()

from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager

monMan = AthenaMonManager("PhysValMonManager")
monMan.FileKey = "PhysVal"
topSequence += monMan

from GaudiSvc.GaudiSvcConf import THistSvc

ServiceMgr += THistSvc()

ServiceMgr.THistSvc.Output += [
    "PhysVal DATAFILE='PhysVal.root' OPT='RECREATE'"
]

from AthenaCommon.AppMgr import ToolSvc
from TrigEgammaAnalysisTools.TrigEgammaAnalysisToolsConfig import TrigEgammaNavAnalysisTool, TrigEgammaNavTPAnalysisTool
from TrigEgammaAnalysisTools.TrigEgammaProbelist import default

probelist = default
from InDetPerformanceMonitoring.InDetPerformanceMonitoringConf import IDPerfMonKshort
iDPerfMonKshort = IDPerfMonKshort(name = 'IDPerfMonKshort',
                                  tracksName = "InDetTrackParticles",
                                  #CheckRate = 1000,
                                  triggerChainName = "NoTriggerSelection",
                                  VxContainerName = "V0UnconstrVertices",
                                  VxPrimContainerName = "PrimaryVertices",
                                  OutputLevel = DEBUG)

ToolSvc += iDPerfMonKshort

from AthenaMonitoring.DQMonFlags import DQMonFlags
from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
IDPerfMonManager = AthenaMonManager(name                = "IDPerfMonManager",
                                    FileKey             = DQMonFlags.monManFileKey(),
                                    ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup(),
                                    DataType            = DQMonFlags.monManDataType(),
                                    Environment         = "user",
                                    ManualRunLBSetup    = True,
                                    Run                 = 1,
                                    LumiBlock           = 1)
IDPerfMonManager.AthenaMonTools += [ iDPerfMonKshort ]

from GaudiSvc.GaudiSvcConf import THistSvc
ServiceMgr += THistSvc()
ServiceMgr.THistSvc.Output += ["IDPerfMon DATAFILE='./IDPerfMon.root' OPT='RECREATE'"]
IDPerfMonManager.FileKey = "IDPerfMon"

topSequence += IDPerfMonManager
# Access the algorithm sequence:
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()

from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
monMan = AthenaMonManager("MyMuonMonManager")
monMan.ManualDataTypeSetup = True
monMan.DataType = "cosmics"
#monMan.DataType            = "monteCarlo"
#monMan.DataType            = "collisions"
monMan.Environment = "tier0ESD"
# monMan.ManualRunLBSetup    = True
# monMan.Run                 = 1
# monMan.LumiBlock           = 1
monMan.FileKey = "MuonMon"
topSequence += monMan

#from MuonRecExample.MuonRecFlags import muonRecFlags

from AthenaMonitoring.DQMonFlags import DQMonFlags
DQMonFlags.doMuonRawMon = False
DQMonFlags.doMuonSegmentMon = False
DQMonFlags.doMuonTrackMon = True
DQMonFlags.doMuonAlignMon = False
DQMonFlags.doMuonTrkPhysMon = False

DQMonFlags.monManFileKey = "MuonMon"
#include ("AthenaMonitoring/DataQualitySteering_jobOptions.py")

from MuonDQAMonFlags.MuonDQAProperFlags import MuonDQADetFlags
ServiceMgr.HistogramDefinitionSvc.DefinitionFormat="text/xml"

from InDetPhysValMonitoring.InDetPhysValMonitoringConf import InDetPhysValDecoratorAlg
decorators = InDetPhysValDecoratorAlg()
topSequence += decorators


from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
monMan = AthenaMonManager( "PhysValMonManager" )
monMan.ManualDataTypeSetup = True
monMan.DataType            = "monteCarlo"
monMan.Environment         = "altprod"
monMan.ManualRunLBSetup    = True
monMan.Run                 = 1
monMan.LumiBlock           = 1
monMan.FileKey = "output"
topSequence += monMan

from InDetPhysValMonitoring.InDetPhysValMonitoringConf import TrackTruthSelectionTool
truthSelection = TrackTruthSelectionTool()
#truthSelection.requireDecayBeforePixel = False
truthSelection.minPt = 1000.
truthSelection.maxBarcode = -1
ToolSvc += truthSelection

# @asogaard
from InDetPhysValMonitoring.InDetPhysValMonitoringConf import TrackSelectionTool
trackSelection = TrackSelectionTool()
print trackSelection
#trackSelection.maxZImpact = -1
#trackSelection.minZImpact = -1