Commit 66d19a3b authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'Alignment_MT_Monitoring_Migration' into 'master'

Creation of the new Run-3 monitoring package for InDetAlignment

See merge request atlas/athena!45270
parents 181dac38 51c8e717
......@@ -58,9 +58,14 @@ def AthenaMonitoringCfg(flags):
result.merge(TRTMonitoringRun3Cfg(flags))
if flags.DQ.Steering.doInDetMon:
info('Set up InDet Global monitoring')
from InDetGlobalMonitoringRun3Test.InDetGlobalMonitoringRun3TestConfig import InDetGlobalMonitoringRun3TestConfig
result.merge(InDetGlobalMonitoringRun3TestConfig(flags))
if flags.DQ.Steering.InDet.doGlobalMon:
info('Set up InDet Global monitoring')
from InDetGlobalMonitoringRun3Test.InDetGlobalMonitoringRun3TestConfig import InDetGlobalMonitoringRun3TestConfig
result.merge(InDetGlobalMonitoringRun3TestConfig(flags))
if flags.DQ.Steering.InDet.doAlignMon:
info('Set up Alignment monitoring')
from InDetAlignmentMonitoringRun3.InDetAlignmentMonitoringRun3Config import InDetAlignmentMonitoringRun3Config
result.merge(InDetAlignmentMonitoringRun3Config(flags))
if flags.DQ.Steering.doLArMon:
info('Set up LAr monitoring')
......
......@@ -367,7 +367,7 @@ if DQMonFlags.doMonitoring():
Steering.doPixelMon=DQMonFlags.doPixelMon()
Steering.doSCTMon=DQMonFlags.doSCTMon()
Steering.doTRTMon=DQMonFlags.doTRTMon()
Steering.doInDetMon=DQMonFlags.doInDetGlobalMon()
Steering.doInDetMon = Steering.InDet.doGlobalMon or Steering.InDet.doAlignMon
Steering.doLArMon=DQMonFlags.doLArMon()
Steering.doTileMon=DQMonFlags.doTileMon()
Steering.doCaloGlobalMon=DQMonFlags.doCaloMon()
......
################################################################################
# Package: InDetAlignmentMonitoringRun3
################################################################################
# Declare the package name:
atlas_subdir( InDetAlignmentMonitoringRun3 )
# Component(s) in the package:
atlas_add_component( InDetAlignmentMonitoringRun3
src/*.h src/*.cxx src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel CommissionEvent AthenaBaseComps AthenaMonitoringLib AthContainers AtlasDetDescr Identifier EventPrimitives xAODEventInfo xAODTracking TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry InDetPrepRawData InDetRIO_OnTrack Particle TrkGeometry TrkSurfaces TrkEventPrimitives TrkParameters TrkParticleBase TrkPseudoMeasurementOnTrack TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkTruthData VxVertex TrkExInterfaces TrkToolInterfaces TrkVertexFitterInterfaces InDetTrackSelectionToolLib BeamSpotConditionsData InDetAlignGenToolsLib InDetTrackSplitterToolLib )
# Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
#
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#
"""
@file IDAlignMonGenericTracksAlgCfg.py
@author Per Johansson
@date 2021
@brief Configuration for Run 3 based on IDAlignMonGenericTracks.cxx
"""
from math import pi as M_PI
def IDAlignMonGenericTracksAlgCfg(helper, alg, **kwargs):
# values
m_pTRange = 100
m_NTracksRange = 200
m_rangePixHits = 10
m_rangeSCTHits = 20
m_rangeTRTHits = 60
m_etaRange = 3
m_d0BsNbins = 100
m_d0Range = 2
m_z0Range = 250
m_d0BsRange = 0.5
# this creates a "genericTrackGroup" called "alg" which will put its histograms into the subdirectory "GenericTracks"
genericTrackGroup = helper.addGroup(alg, 'Tracks')
pathtrack = '/IDAlignMon/ExtendendTracks_NoTriggerSelection/GenericTracks'
varName = 'm_lb;LumiBlock'
title = 'Lumiblock'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=1024, xmin=-0.5, xmax=1023.5)
varName = 'm_beamSpotX,m_beamSpotY;YBs_vs_XBs'
title = 'BeamSpot Position: y vs x'
genericTrackGroup.defineHistogram(varName, type='TH2F', path=pathtrack, title=title, xbins=100, xmin=-0.9, xmax=-0.1, ybins=100, ymin=-0.9, ymax=-0.1)
varName = 'm_beamSpotZ,m_beamSpotY;YBs_vs_ZBs'
title = 'BeamSpot Position: y vs z'
genericTrackGroup.defineHistogram(varName, type='TH2F', path=pathtrack, title=title, xbins=100, xmin=-25, xmax=-5, ybins=100, ymin=-0.9, ymax=-0.1)
varName = 'm_beamSpotX,m_beamSpotZ;XBs_vs_XZs'
title = 'BeamSpot Position: x vs z'
genericTrackGroup.defineHistogram(varName, type='TH2F', path=pathtrack, title=title, xbins=100, xmin=-25, xmax=-5, ybins=100, ymin=-0.9, ymax=-0.1)
varName = 'm_nhits_per_track;Nhits_per_track'
title = 'Number of hits per track;Number of Good Tracks;Number of Events'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_NTracksRange + 1, xmin=-0.5, xmax=m_NTracksRange + 0.5)
varName = 'm_npixelhits_per_track;Npixhits_per_track'
title = 'Number of pixhits per track;Number of Good Tracks;Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_rangePixHits, xmin=-0.5, xmax=m_rangePixHits - 0.5)
varName = 'm_nscthits_per_track;Nscthits_per_track'
title = 'Number of scthits per track;Number of SCT hits per Tracks;Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_rangeSCTHits, xmin=-0.5, xmax=m_rangeSCTHits - 0.5)
varName = 'm_ntrthits_per_track;Ntrthits_per_track'
title = 'Number of trthits per track;Number of TRT hits per Tracks;Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_rangeTRTHits, xmin=-0.5, xmax=m_rangeTRTHits - 0.5)
varName = 'm_chi2oDoF;chi2oDoF'
title = 'chi2oDoF;Track in #chi^{2} / NDoF;Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=100, xmin=0, xmax=10)
varName = 'm_eta;eta'
title = 'eta;Track #eta;Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=80, xmin=-m_etaRange, xmax=m_etaRange)
varName = 'm_eta_pos;eta_pos'
title = 'eta for positive tracks; #eta(+);Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=25, xmin=-m_etaRange, xmax=m_etaRange)
varName = 'm_eta_neg;eta_neg'
title = 'eta for negative tracks; #eta(-);Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=25, xmin=-m_etaRange, xmax=m_etaRange)
varName = 'm_phi;phi'
title = 'phi;Track #phi;Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=80, xmin=0, xmax= 2 * M_PI)
varName = 'm_z0;z0'
title = 'z0;[mm]'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_d0BsNbins, xmin=-m_z0Range, xmax=m_z0Range)
varName = 'm_z0sintheta;z0sintheta'
title = 'z0sintheta;[mm]'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_d0BsNbins, xmin=-m_z0Range, xmax=m_z0Range)
varName = 'm_d0;d0'
title = 'd0;[mm]'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_d0BsNbins, xmin=-m_d0Range, xmax=m_d0Range)
varName = 'm_d0_bscorr;d0_bscorr'
title = 'd0 (corrected for beamspot);d0 [mm]'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=m_d0BsNbins, xmin=-m_d0BsRange, xmax=m_d0BsRange)
varName = 'm_pT;pT'
title = 'pT;Signed Track pT [GeV];Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=200, xmin=-m_pTRange, xmax=m_pTRange)
varName = 'm_p;P'
title = 'Track Momentum P;Signed Track P [GeV];Number of Tracks'
genericTrackGroup.defineHistogram(varName, type='TH1F', path=pathtrack, title=title, xbins=200, xmin=-m_pTRange, xmax=m_pTRange)
# end histograms
#
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#
'''@file InDetAlignMonResidualsAlgCfg.py
@author PerJohansson
@date 2021
@brief Configuration for Run 3 based on InDetAlignMonResiduals.cxx
'''
def IDAlignMonResidualsAlgCfg(helper, alg, **kwargs):
'''Function to configures some algorithms in the monitoring system.'''
#Values
m_nBinsMuRange = 101
m_muRangeMin = -0.5
m_muRangeMax = 100.5
m_minSiResFillRange = -0.08
m_maxSiResFillRange = 0.08
m_RangeOfPullHistos = 6
m_minPIXResYFillRange = -0.4
m_maxPIXResYFillRange = 0.4
# this creates a "residualGroup" called "alg" which will put its histograms into the subdirectory "Residuals"
residualGroup = helper.addGroup(alg, 'Residuals')
pathResiduals = '/IDAlignMon/ExtendendTracks_NoTriggerSelection/Residuals'
# Histograms for the Alignment Residual monitoring:
varName = 'm_mu;mu_perEvent'
title = 'mu_perEvent;<#mu> per event;Events'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=m_nBinsMuRange, xmin=m_muRangeMin, xmax=m_muRangeMax)
varName = 'm_detType;sirescalcfailure'
title = 'Hits with ResidualPullCalculator problem;Events;DetType'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=2, xmin=0, xmax=2)
#Common for Pixel and SCT
varName = 'm_si_residualx;si_residualx'
title = 'Silicon UnBiased X Residual;Events;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_si_b_residualx;si_b_residualx'
title = 'Silicon Barrel Only UnBiased X Residual;Events;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
#Pixel Barrel Plots
varName = 'm_pix_b_residualx;pix_b_residualx'
title = 'UnBiased X Residual Pixel Barrel;Events;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_pix_b_biased_residualx;pix_b_biasedresidualx'
title = 'Biased X Residual Pixel Barrel;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_pix_b_residualy;pix_b_residualy'
title = 'UnBiased Y Residual Pixel Barrel;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minPIXResYFillRange, xmax=m_maxPIXResYFillRange)
varName = 'm_pix_b_biased_residualy;pix_b_biasedresidualy'
title = 'Biased Y Residual Pixel Barrel;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minPIXResYFillRange, xmax=m_maxPIXResYFillRange)
varName = 'm_pix_b0_residualsx;pix_b0_residualx'
title = 'UnBiased X Residual Pixel Barrel 0'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_pix_b1_residualsx;pix_b1_residualx'
title = 'UnBiased X Residual Pixel Barrel 1'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_pix_b2_residualsx;pix_b2_residualx'
title = 'UnBiased X Residual Pixel Barrel 2'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_pix_b3_residualsx;pix_b3_residualx'
title = 'UnBiased X Residual Pixel Barrel 3'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_pix_b0_residualsy;pix_b0_residualy'
title = 'UnBiased Y Residual Pixel Barrel 0'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minPIXResYFillRange, xmax=m_maxPIXResYFillRange)
varName = 'm_pix_b1_residualsy;pix_b1_residualy'
title = 'UnBiased Y Residual Pixel Barrel 1'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minPIXResYFillRange, xmax=m_maxPIXResYFillRange)
varName = 'm_pix_b2_residualsy;pix_b2_residualy'
title = 'UnBiased Y Residual Pixel Barrel 2'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minPIXResYFillRange, xmax=m_maxPIXResYFillRange)
varName = 'm_pix_b3_residualsy;pix_b3_residualy'
title = 'UnBiased Y Residual Pixel Barrel 3'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minPIXResYFillRange, xmax=m_maxPIXResYFillRange)
varName = 'm_pix_b0_pullsx;pix_b0_pullx'
title = 'UnBiased X Pull Pixel Barrel 0'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_pix_b1_pullsx;pix_b1_pullsx'
title = 'UnBiased X Pull Pixel Barrel 1'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_pix_b2_pullsx;pix_b2_pullx'
title = 'UnBiased X Pull Pixel Barrel 2'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_pix_b3_pullsx;pix_b3_pullx'
title = 'UnBiased X Pull Pixel Barrel 3'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_pix_b0_pullsy;pix_b0_pully'
title = 'UnBiased Y Pull Pixel Barrel 0'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_pix_b1_pullsy;pix_b1_pully'
title = 'UnBiased X Pull Pixel Barrel 1'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_pix_b2_pullsy;pix_b2_pully'
title = 'UnBiased Y Pull Pixel Barrel 2'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_pix_b3_pullsy;pix_b3_pully'
title = 'UnBiased Y Pull Pixel Barrel 3'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
#Pixel EndCap A plots
varName = 'm_pix_eca_residualx;pix_eca_residualx'
title = 'UnBiased X Residual Pixel EndCap A;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_pix_eca_residualy;pix_eca_residualy'
title = 'UnBiased Y Residual Pixel EndCap A;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minPIXResYFillRange, xmax=m_maxPIXResYFillRange)
varName = 'm_pix_eca_pullx;pix_eca_pulllx'
title = 'UnBiased X Pull Pixel EndCap A'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_pix_eca_pully;pix_eca_pullly'
title = 'UnBiased Y Pull Pixel EndCap A'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
#Pixel EndCap C plots
varName = 'm_pix_ecc_residualx;pix_ecc_residualx'
title = 'UnBiased X Residual Pixel EndCap C;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_pix_ecc_residualy;pix_ecc_residualy'
title = 'UnBiased Y Residual Pixel EndCap C;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minPIXResYFillRange, xmax=m_maxPIXResYFillRange)
varName = 'm_pix_ecc_pullx;pix_ecc_pulllx'
title = 'UnBiased X Pull Pixel EndCap C'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_pix_ecc_pully;pix_ecc_pullly'
title = 'UnBiased Y Pull Pixel EndCap C'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
#SCT
#Barrel Plots
varName = 'm_sct_b_residualx;sct_b_residualx'
title = 'UnBiased X Residual SCT Barrel;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_sct_b_biased_residualx;sct_b_biasedresidualx'
title = 'Biased X Residual SCT Barrel;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_sct_b0_residualsx;sct_b0_residualx'
title = 'UnBiased X Residual SCT Barrel 0'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_sct_b1_residualsx;sct_b1_residualx'
title = 'UnBiased X Residual SCT Barrel 1'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_sct_b2_residualsx;sct_b2_residualx'
title = 'UnBiased X Residual SCT Barrel 2'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_sct_b3_residualsx;sct_b3_residualx'
title = 'UnBiased X Residual SCT Barrel 3'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_sct_b0_pullsx;sct_b0_pullx'
title = 'UnBiased X Pull SCT Barrel 0'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_sct_b1_pullsx;sct_b1_pullx'
title = 'UnBiased X Pull SCT Barrel 1'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_sct_b2_pullsx;sct_b2_pullx'
title = 'UnBiased X Pull SCT Barrel 2'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
varName = 'm_sct_b3_pullsx;sct_b3_pullx'
title = 'UnBiased X Pull SCT Barrel 3'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
#SCT EndCap A plots
varName = 'm_sct_eca_residualx;sct_eca_residualx'
title = 'UnBiased X Residual SCT EndCap A;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_sct_eca_pullx;sct_eca_pulllx'
title = 'UnBiased X Pull SCT EndCap A'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
#SCT EndCap C plots
varName = 'm_sct_ecc_residualx;sct_ecc_residualx'
title = 'UnBiased X Residual SCT EndCap C;Residual [mm]'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=m_minSiResFillRange, xmax=m_maxSiResFillRange)
varName = 'm_sct_ecc_pullx;sct_ecc_pulllx'
title = 'UnBiased X Pull SCT EndCap C'
residualGroup.defineHistogram(varName, type='TH1F', path=pathResiduals, title=title, xbins=100, xmin=-m_RangeOfPullHistos, xmax=m_RangeOfPullHistos)
# end histograms
#
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#
####################################################
# #
# InDetAlignmentManager top algorithm #
# #
####################################################
def InDetAlignmentMonitoringRun3Config(flags):
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
acc = ComponentAccumulator()
from AthenaMonitoring import AthMonitorCfgHelper
helper = AthMonitorCfgHelper(flags, "InDetAlignmentMonitoringRun3")
from AthenaConfiguration.ComponentFactory import CompFactory
if flags.DQ.Environment in ('online', 'tier0', 'tier0Raw'):
########### here begins InDetAlignMonGenericTracksAlg ###########
kwargsIDAlignMonGenericTracksAlg = {
'vxPrimContainerName' : 'PrimaryVertices', #InDetKeys.xAODVertexContainer(),
'TrackName' : 'ExtendedTracks', #Until new config ready
'TrackName2' : 'ExtendedTracks', #Until new config ready
}
from InDetAlignmentMonitoringRun3.IDAlignMonGenericTracksAlgCfg import IDAlignMonGenericTracksAlgCfg
inDetAlignMonGenericTracksAlg = helper.addAlgorithm(CompFactory.IDAlignMonGenericTracksAlg, 'IDAlignMonGenericTracksAlg')
for k, v in kwargsIDAlignMonGenericTracksAlg.items():
setattr(inDetAlignMonGenericTracksAlg, k, v)
inDetAlignMonGenericTracksAlg.TrackSelectionTool = CompFactory.InDet.InDetTrackSelectionTool('IDAlignMonGenericTracksAlg_TrackSelectionTool')
inDetAlignMonGenericTracksAlg.TrackSelectionTool.UseTrkTrackTools = True
inDetAlignMonGenericTracksAlg.TrackSelectionTool.CutLevel = "TightPrimary"
inDetAlignMonGenericTracksAlg.TrackSelectionTool.maxNPixelHoles = 1
inDetAlignMonGenericTracksAlg.TrackSelectionTool.minNBothInnermostLayersHits = 0
inDetAlignMonGenericTracksAlg.TrackSelectionTool.minNInnermostLayerHits = 1
inDetAlignMonGenericTracksAlg.TrackSelectionTool.minPt = 5000
inDetAlignMonGenericTracksAlg.TrackSelectionTool.maxD0 = 100000
inDetAlignMonGenericTracksAlg.TrackSelectionTool.maxZ0SinTheta = 150
IDAlignMonGenericTracksAlgCfg(helper, inDetAlignMonGenericTracksAlg, **kwargsIDAlignMonGenericTracksAlg)
########### here ends InDetAlignMonGenericTracksAlg ###########
########### here starts InDetAlignMonResidualAlgs ###########
kwargsIDAlignMonResidualsAlg = {
'TrackName' : 'CombinedInDetTracks', #Until new config ready
'TrackName2' : 'CombinedInDetTracks', #Until new config ready
}
from InDetAlignmentMonitoringRun3.IDAlignMonResidualsAlgCfg import IDAlignMonResidualsAlgCfg
inDetAlignMonResidualsAlg = helper.addAlgorithm(CompFactory.IDAlignMonResidualsAlg, 'IDAlignMonResidualsAlg')
for k, v in kwargsIDAlignMonResidualsAlg.items():
setattr(inDetAlignMonResidualsAlg, k, v)
inDetAlignMonResidualsAlg.TrackSelectionTool = CompFactory.InDet.InDetTrackSelectionTool('IDAlignMonResidualsAlg_TrackSelectionTool')
inDetAlignMonResidualsAlg.TrackSelectionTool.UseTrkTrackTools = True
inDetAlignMonResidualsAlg.TrackSelectionTool.CutLevel = "TightPrimary"
inDetAlignMonResidualsAlg.TrackSelectionTool.maxNPixelHoles = 1
inDetAlignMonResidualsAlg.TrackSelectionTool.minNBothInnermostLayersHits = 0
inDetAlignMonResidualsAlg.TrackSelectionTool.minNInnermostLayerHits = 1
inDetAlignMonResidualsAlg.TrackSelectionTool.minPt = 5000
inDetAlignMonResidualsAlg.TrackSelectionTool.maxD0 = 100000
inDetAlignMonResidualsAlg.TrackSelectionTool.maxZ0SinTheta = 150
IDAlignMonResidualsAlgCfg(helper, inDetAlignMonResidualsAlg, **kwargsIDAlignMonResidualsAlg)
########### here ends InDetAlignMonResidualsAlg ###########
acc.merge(helper.result())
return acc
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
// **********************************************************************
// AlignmentMonAlg.cxx
// AUTHORS: Beate Heinemann, Tobias Golling
// Adapted to AthenaMT by Per Johansson 2021
// **********************************************************************
//main header
#include "IDAlignMonGenericTracksAlg.h"
#include <cmath>
#include "TMath.h"
#include "GaudiKernel/MsgStream.h"
#include "AtlasDetDescr/AtlasDetectorID.h"
#include "InDetIdentifier/PixelID.h"
#include "InDetIdentifier/SCT_ID.h"
#include "InDetIdentifier/TRT_ID.h"
#include "TrkTrack/TrackCollection.h"
#include "InDetRIO_OnTrack/SiClusterOnTrack.h"
#include "InDetPrepRawData/SiCluster.h"
#include "Particle/TrackParticle.h"
#include "TrkParticleBase/LinkToTrackParticleBase.h"
#include "TrkEventPrimitives/FitQuality.h"
#include "TrkEventPrimitives/LocalParameters.h"
#include "CLHEP/GenericFunctions/CumulativeChiSquare.hh"
#include "InDetAlignGenTools/IInDetAlignHitQualSelTool.h"
// *********************************************************************
// Public Methods
// *********************************************************************
IDAlignMonGenericTracksAlg::IDAlignMonGenericTracksAlg( const std::string & name, ISvcLocator* pSvcLocator ) :
AthMonitorAlgorithm(name, pSvcLocator),
m_idHelper(0),
m_pixelID(0),
m_sctID(0),
m_trtID(0),
m_barrelEta(0.8),
m_d0Range(2.0),
m_d0BsRange(0.5),
m_z0Range(250.0),
m_etaRange(3.0),
m_NTracksRange(200),
m_trackSelection( "InDet::InDetTrackSelectionTool/TrackSelectionTool", this)
{
m_hitQualityTool = ToolHandle<IInDetAlignHitQualSelTool>("");
declareProperty("Pixel_Manager" , m_Pixel_Manager);
declareProperty("SCT_Manager" , m_SCT_Manager);
declareProperty("TRT_Manager" , m_TRT_Manager);
declareProperty("TrackSelectionTool" , m_trackSelection);
declareProperty("HitQualityTool" , m_hitQualityTool);
declareProperty("useExtendedPlots" , m_extendedPlots = false);
declareProperty("d0Range" , m_d0Range);
declareProperty("d0BsRange" , m_d0BsRange);
declareProperty("z0Range" , m_z0Range);
declareProperty("etaRange" , m_etaRange);
declareProperty("pTRange" , m_pTRange);
declareProperty("NTracksRange" , m_NTracksRange);
declareProperty("doIP" , m_doIP = false);
}
IDAlignMonGenericTracksAlg::~IDAlignMonGenericTracksAlg() { }
StatusCode IDAlignMonGenericTracksAlg::initialize()
{
StatusCode sc;
//ID Helper
ATH_CHECK(detStore()->retrieve(m_idHelper, "AtlasID"));
m_pixelID = nullptr;
ATH_CHECK(detStore()->retrieve(m_pixelID, "PixelID"));
ATH_MSG_DEBUG("Initialized PixelIDHelper");
m_sctID = nullptr;