Skip to content
Snippets Groups Projects
Commit fdcf6b64 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'IDVPMforHGTDClusters' into 'main'

Allow to run Idpvm on hgtd clusters

See merge request !69034
parents 9bfafbd0 4ac989d2
No related branches found
No related tags found
53 merge requests!78751Including CTP Monitoring in GLobal Monitoring,!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77733Draft: add new HLT NN JVT, augmented with additional tracking information,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!76343Draft: MooTrackBuilder: Recalibrate NSW hits in refine method,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74430Draft: Fixing upper bound for Delayed Jet Triggers,!73963Changing the path of the histograms to "Expert" area,!73875updating ID ART reference plots,!73874AtlasCLHEP_RandomGenerators: Fix cppcheck warnings.,!73449Add muon detectors to DarkJetPEBTLA partial event building,!73343Draft: [TrigEgamma] Add photon ringer chains on bootstrap mechanism,!72972Update L1Calo Jet Trigger Efficiency Monitoring algorithm,!72336Fixed TRT calibration crash,!72176Draft: Improving L1TopoOnline chain that now gets no-empty plots. Activating it by default,!72012Draft: Separate JiveXMLConfig.py into Config files,!71876Fix MET trigger name in MissingETMonitoring,!71820Draft: Adding new TLA End-Of-Fill (EOF) chains and removing obsolete DIPZ chains,!71279Draft: ATR-29330: Move L1_4J15 and the HLT chains seeded by it in the MC Menu,!70990Updates to pulse analysis to support new 2016 p+Pb analysis and 2023 Pb+Pb analysis,!70948[TrigEGam] Adding egamma chains to be monitored,!70777Draft: sTGC offline raw monitoring: strip efficiency re-implementation,!70654Update JetMonitoringStandard.py,!70442Draft: Harmonize output folders+collections in ID Alignment monitoring and update DQM han config,!70269Draft: Initial Preparations for mc23e mu-distribution,!70047More test chains for delayed jets,!69944Draft: Avoid additional ONNX thread spawning for FastCaloSim,!69935Draft: New efficiency DQ criteria for HLTmuon hanconfig,!69795Some updates to the LArSuperCell Monitoring...,!69643Draft: added back ditau chain for commissioning,!69589Draft: Rely on callables to deffer createion of sequences in HLT menu generation,!69450Draft: Adding WP Scan GN2 vs GN1,!69449Draft: Adding the Working Point Scan chains,!69341Draft: Removing BKee Triggers from CPS Group (ATR-19501),!69292Draft:Make InDetTimeCollection recording optional,!69228Updating LAr EM NTuple creation to CA based configuration,!69154gFEX: fix bug in gTower class,!69149Fix bug in gTower class,!69128Delayed jets, additional chains, ATR-28836,!69112Update test_q443.sh to use correct CA option,!69034Allow to run Idpvm on hgtd clusters
Showing
with 413 additions and 13 deletions
......@@ -38,6 +38,8 @@ def createIDPVMConfigFlags():
icf.addFlag("doIDTIDE", False ) # for IDTIDE derivation
icf.addFlag("doTechnicalEfficiency", False) # for enabling the filling of technical efficiency
icf.addFlag("doPRW", False)
icf.addFlag("doActs", False)
icf.addFlag("doHGTD", False)
return icf
......@@ -28,6 +28,7 @@ def GetCustomAthArgs():
IDPVMparser.add_argument("--doElectronMatchedTracks", help='run plots for tracks matched to true electrons', action='store_true', default=False)
IDPVMparser.add_argument("--doTruthToRecoNtuple", help='output track-to-truth ntuple', action='store_true', default=False)
IDPVMparser.add_argument("--doActs", help='run plots for acts collections', action='store_true', default=False)
IDPVMparser.add_argument("--doHGTD", help='run plots fof HGTD collections', action='store_true', default=False)
IDPVMparser.add_argument("--disableDecoration", help='disable extra track and truth decoration if possible', action='store_true', default=False)
IDPVMparser.add_argument("--hardScatterStrategy", help='Strategy to select the hard scatter. 0 = SumPt² 1 = SumPt , 2 = Sumptw, 3 = H->yy', choices=["0","1","2","3"], default="0")
IDPVMparser.add_argument("--truthMinPt", help='minimum truth particle pT', type=float, default=None)
......@@ -93,7 +94,8 @@ flags.PhysVal.IDPVM.GRL = MyArgs.GRL
flags.PhysVal.IDPVM.validateExtraTrackCollections = MyArgs.validateExtraTrackCollections
flags.PhysVal.IDPVM.doTechnicalEfficiency = MyArgs.doTechnicalEfficiency
flags.PhysVal.IDPVM.doPRW = MyArgs.doPRW
flags.PhysVal.doActs = MyArgs.doActs
flags.PhysVal.IDPVM.doActs = MyArgs.doActs
flags.PhysVal.IDPVM.doHGTD = MyArgs.doHGTD
flags.Exec.SkipEvents = MyArgs.skipEvents
flags.Exec.MaxEvents = MyArgs.maxEvents
......
<?xml version="1.0" ?>
<!--
DCube configuration XML file = dcube_config.xml
auto-generated using DCube 4.6692016 ($Rev: 217525 $ $Date$) by Krzysztof Daniel Ciba (Krzysztof.Ciba@NOSPAMgmail.com)
on Tue, 07 Apr 2020 17:46:00 CEST
from Root reference file: IDPVM/PHYSVAL.root
Statistics tests:
"['KS', 'meany']"
Legend:
* KS - Kolmogorov-Smirnov test (default)
* chi2 - chi2 test
* bbb - bin-by-bin comparision
* meany - avg eff mean y [TProfiles only!]
* all - all above tests
Tweaks:
[1] remove or comment out (using HTML comments tags) histograms not relevant
to your analysis
[2] provide a new content to "ref_desc" and "mon_desc" tags to something
more meaningful
[3] and of course feel free to change attribute "tests" in each "hist" tag
[4] limits of p-value warning and failure can be set by changing attributes
in <plimit> tag
[5] if you want to make plots FOR EVERY histogram in your monitored file
change attribute "inclusive" in <mode> tag to "true"
-->
<dcube_client_config>
<dcube branch="*" cmtconfig="*" install="*" jobId="*" project="*">
<!--
###################################################
DCubeClient for:
[1] branch: *
[2] install: *
[3] cmtconfig: *
[4] project: *
[5] jobId: *
[6] reference root file: /eos/home-n/npetters/www/dcube/IDPVM/PHYSVAL.root
[7] p-values limits FAIL = 0.750000 WARN = 0.950000
###################################################
-->
<reference file="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/InDetPhysValMonitoring/inputs/601237_ttbar_allhad_PU200_ITk_master_v1.RDO.root" />
<ref_desc>
PUT YOUR REFERENCE DESCRIPTION HERE
</ref_desc>
<test_desc>
PUT YOUR TEST DESCRIPTION HERE
</test_desc>
<plimit fail="0.75" warn="0.95"/>
<TDirectory name="/">
<TDirectory name="SquirrelPlots">
<TDirectory name="Acts">
<TDirectory name="HGTD_Clusters">
<hist2D name="local_xy_left" plotopts="box" tests="KS" type="TH2F"/>
<hist2D name="local_xy_right" plotopts="box" tests="KS" type="TH2F"/>
<hist2D name="global_xy_left" plotopts="box" tests="KS" type="TH2F"/>
<hist2D name="global_xy_right" plotopts="box" tests="KS" type="TH2F"/>
<hist2D name="global_zr_left" plotopts="box" tests="KS" type="TH2F"/>
<hist2D name="global_zr_right" plotopts="box" tests="KS" type="TH2F"/>
<hist1D name="barrelEndcap" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="layer_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="layer_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="phi_module_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="phi_module_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="eta_module_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="eta_module_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="phi_index_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="phi_index_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="eta_index_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="eta_index_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="eta" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="local_x_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="local_x_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="local_y_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="local_y_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="local_t_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="local_t_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="localCovXX_left" plotopts="logy" tests="KS" type="TH1F"/>
<hist1D name="localCovXX_right" plotopts="logy" tests="KS" type="TH1F"/>
<hist1D name="localCovYY_left" plotopts="logy" tests="KS" type="TH1F"/>
<hist1D name="localCovYY_right" plotopts="logy" tests="KS" type="TH1F"/>
<hist1D name="localCovTT_left" plotopts="logy" tests="KS" type="TH1F"/>
<hist1D name="localCovTT_right" plotopts="logy" tests="KS" type="TH1F"/>
<hist1D name="global_x_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="global_x_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="global_y_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="global_y_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="global_z_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="global_z_right" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="global_r_left" plotopts="" tests="KS" type="TH1F"/>
<hist1D name="global_r_right" plotopts="" tests="KS" type="TH1F"/>
</TDirectory>
</TDirectory>
</TDirectory>
</TDirectory>
</dcube>
</dcube_client_config>
......@@ -19,7 +19,6 @@ def createPhysValConfigFlags():
icf.addFlag("PhysVal.doPFlow", False)
icf.addFlag("PhysVal.doMuon", False)
icf.addFlag("PhysVal.doLRTMuon", False)
icf.addFlag("PhysVal.doActs", False)
icf.addFlag("PhysVal.doLLPSecVtx", False)
icf.addFlag("PhysVal.doLLPSecVtxLeptons", False)
......
......@@ -84,7 +84,7 @@ def PhysValMonitoringCfg(flags, name="PhysValMonManager", tools=None, **kwargs):
if flags.PhysVal.doLRTMuon:
from MuonPhysValMonitoring.MuonPhysValConfig import PhysValLRTMuonCfg
tools.append(acc.popToolsAndMerge(PhysValLRTMuonCfg(flags)))
if flags.PhysVal.doActs:
if flags.PhysVal.IDPVM.doActs:
from ActsConfig.ActsAnalysisConfig import PhysValActsCfg
tools.append(acc.popToolsAndMerge(PhysValActsCfg(flags)))
if flags.PhysVal.doLLPSecVtx:
......
......@@ -476,7 +476,8 @@ def ActsStripEstimatedTrackParamsAnalysisAlgCfg(flags,
def PhysValActsCfg(flags,
name: str = 'PhysValActs') -> ComponentAccumulator:
acc = ComponentAccumulator()
acc.setPrivateTools(CompFactory.ActsTrk.PhysValTool(name=name))
acc.setPrivateTools(CompFactory.ActsTrk.PhysValTool(name=name,
doHGTD=flags.PhysVal.IDPVM.doHGTD))
return acc
def ActsSeedAnalysisCfg(flags):
......
......@@ -19,6 +19,14 @@ def PersistifyActsEDMCfg(flags) -> ComponentAccumulator:
'xAOD::StripClusterContainer#ITkStripClusters',
'xAOD::StripClusterAuxContainer#ITkStripClustersAux.' + strip_cluster_variables]
if flags.Reco.EnableHGTDExtension:
hgtd_cluster_shortlist = ['-hgtdClusterLink']
hgtd_cluster_variables = '.'.join(hgtd_cluster_shortlist)
toAOD += ['xAOD::HGTDClusterContainer#HGTD_Clusters',
'xAOD::HGTDClusterAuxContainer#HGTD_ClustersAux.' + hgtd_cluster_variables]
if flags.Acts.doITkConversion:
toAOD += ['xAOD::StripClusterContainer#ITkConversionStripClusters',
'xAOD::StripClusterAuxContainer#ITkConversionStripClustersAux.' + strip_cluster_variables]
......
......@@ -7,9 +7,9 @@ n_events=2
# Run reconstruction and produce AOD with persistified Acts EDM
Reco_tf.py --CA \
--preExec "flags.Exec.FPE=500;" "flags.Acts.EDM.PersistifyClusters=True;flags.Acts.EDM.PersistifySpacePoints=True;flags.Acts.EDM.PersistifyTracks=True;" \
--preExec "flags.Exec.FPE=500;" "flags.Acts.EDM.PersistifyClusters=True;flags.Acts.EDM.PersistifySpacePoints=True;flags.Acts.EDM.PersistifyTracks=True;flags.Reco.EnableHGTDExtension=True;" \
--preInclude "InDetConfig.ConfigurationHelpers.OnlyTrackingPreInclude,ActsConfig.ActsCIFlags.actsWorkflowFlags" \
--postInclude "ActsConfig.ActsPostIncludes.PersistifyActsEDMCfg" \
--postInclude "HGTD_Config.HGTD_PrepRawDataFormationConfig.PadClusterizationCfg,InDetConfig.InDetPrepRawDataFormationConfig.HGTDInDetToXAODClusterConversionCfg,ActsConfig.ActsPostIncludes.PersistifyActsEDMCfg" \
--inputRDOFile ${input_rdo} \
--outputAODFile AOD.pool.root \
--maxEvents ${n_events}
......
......@@ -36,7 +36,8 @@ atlas_add_component( ActsMonitoring
TrkValHistUtils
xAODEventInfo
xAODInDetMeasurement
xAODMeasurementBase )
xAODMeasurementBase
HGTD_ReadoutGeometry )
atlas_install_scripts( test/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
......
/*
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "src/HgtdClusterValidationPlots.h"
#include "HGTD_ReadoutGeometry/HGTD_DetectorElement.h"
#include "TrkSurfaces/Surface.h"
namespace ActsTrk {
HgtdClusterValidationPlots::HgtdClusterValidationPlots(PlotBase* pParent,
const std::string& sDir)
: PlotBase(pParent, sDir)
{
m_barrelEndcap = Book1D("barrelEndcap", "HgtdCluster_barrelEndcap;Barrel-Endcap;Entries;", 5, -2, 3, false);
m_layer_right = Book1D("layer_right", "HgtdCluster_layer_right;Layer;Entries;", 20, -10, 11, false);
m_layer_left = Book1D("layer_left", "HgtdCluster_layer_left;Layer;Entries;", 20, -10, 11, false);
m_phi_module_right = Book1D("phi_module_right", "HgtdCluster_phi_module_right;Phi Module;Entries;", 100, 0, 300, false);
m_phi_module_left = Book1D("phi_module_left", "HgtdCluster_phi_module_left;Phi Module;Entries;", 100, 0, 300, false);
m_eta_module_right = Book1D("eta_module_right", "HgtdCluster_eta_module_right;Eta Module;Entries;", 100, -10, 10, false);
m_eta_module_left = Book1D("eta_module_left", "HgtdCluster_eta_module_left;Eta Module;Entries;", 100, -10, 10, false);
m_phi_index_right = Book1D("phi_index_right", "HgtdCluster_phi_index_right;Phi Index;Entries;", 100, -10, 10, false);
m_phi_index_left = Book1D("phi_index_left", "HgtdCluster_phi_index_left;Phi Index;Entries;", 100, -10, 10, false);
m_eta_index_right = Book1D("eta_index_right", "HgtdCluster_eta_index_right;Eta Index;Entries;", 100, -10, 10, false);
m_eta_index_left = Book1D("eta_index_left", "HgtdCluster_eta_index_left;Eta Index;Entries;", 100, -10, 10, false);
m_local_x_right = Book1D("local_x_right", "HgtdCluster_local_x_right;Local x [mm];Entries;", 100, -30, 30, false);
m_local_y_right = Book1D("local_y_right", "HgtdCluster_local_y_right;Local y [mm];Entries;", 100, -30, 30, false);
m_local_t_right = Book1D("local_t_right", "HgtdCluster_local_t_right;Local t [ns];Entries;", 30, 0, 50, false);
m_localCovXX_right = Book1D("localCovXX_right", "HgtdCluster_localCovXX_right;Local Cov XX [mm2];Entries;", 100, 0, 0.5, false);
m_localCovYY_right = Book1D("localCovYY_right", "HgtdCluster_localCovYY_right;Local Cov YY [mm2];Entries;", 100, 0, 0.5, false);
m_localCovTT_right = Book1D("localCovTT_right", "HgtdCluster_localCovTT_right;Local Cov TT [ns2];Entries;", 100, 0, 0.2, false);
m_local_xy_right = Book2D("local_xy_right", "HgtdCluster_local_xy_right;Local x [mm];Local y [mm];", 100, -30, 30, 100, -30, 30, false);
m_local_x_left = Book1D("local_x_left", "HgtdCluster_local_x_left;Local x [mm];Entries;", 100, -30, 30, false);
m_local_y_left = Book1D("local_y_left", "HgtdCluster_local_y_left;Local y [mm];Entries;", 100, -30, 30, false);
m_local_t_left = Book1D("local_t_left", "HgtdCluster_local_t_left;Local t [ns];Entries;", 30, 0, 50, false);
m_localCovXX_left = Book1D("localCovXX_left", "HgtdCluster_localCovXX_left;Local Cov XX [mm2];Entries;", 100, 0, 0.5, false);
m_localCovYY_left = Book1D("localCovYY_left", "HgtdCluster_localCovYY_left;Local Cov YY [mm2];Entries;", 100, 0, 0.5, false);
m_localCovTT_left = Book1D("localCovTT_left", "HgtdCluster_localCovTT_left;Local Cov TT [ns2];Entries;", 100, 0, 0.2, false);
m_eta = Book1D("eta", "HgtdCluster_eta;Eta;Entries;", 100, -5, 5, false);
m_global_x_left = Book1D("global_x_left", "HgtdCluster_global_x_left;Global x [mm];Entries;", 100, -1100, 1100, false);
m_global_x_right = Book1D("global_x_right", "HgtdCluster_global_x_right;Global x [mm];Entries;", 100, -1100, 1100, false);
m_global_y_left = Book1D("global_y_left", "HgtdCluster_global_y_left;Global y [mm];Entries;", 100, -1100, 1100, false);
m_global_y_right = Book1D("global_y_right", "HgtdCluster_global_y_right;Global y [mm];Entries;", 100, -1100, 1100, false);
m_global_z_left = Book1D("global_z_left", "HgtdCluster_global_z_left;Global z [mm];Entries;", 100, -4000, -3000, false);
m_global_z_right = Book1D("global_z_right", "HgtdCluster_global_z_right;Global z [mm];Entries;", 100, 3000, 4000, false);
m_global_r_left = Book1D("global_r_left", "HgtdCluster_global_r_left;Global r [mm];Entries;", 100, 0, 900, false);
m_global_r_right = Book1D("global_r_right", "HgtdCluster_global_r_right;Global r [mm];Entries;", 100, 0, 900, false);
m_local_xy_left = Book2D("local_xy_left", "HgtdCluster_local_xy_left;Local x [mm];Local y [mm];", 100, -30, 30, 100, -30, 30, false);
m_global_xy_left = Book2D("global_xy_left", "HgtdCluster_global_xy_left;Global x [mm];Global y [mm];", 100, -1100, 1100, 100, -1100, 1100, false);
m_global_xy_right = Book2D("global_xy_right", "HgtdCluster_global_xy_right;Global x [mm];global y [mm];", 100, -1100, 1100, 100, -1100, 1100, false);
m_global_zr_left = Book2D("global_zr_left", "HgtdCluster_global_zr_left;Global z [mm];Global r [mm];", 100, -4000, -3000, 100, 0, 900, false);
m_global_zr_right = Book2D("global_zr_right", "HgtdCluster_global_zr_right;Global z [mm];Global r [mm];", 100, 3000, 4000, 100, 0, 900, false);
}
void HgtdClusterValidationPlots::fill(const xAOD::HGTDCluster* cluster,
const InDetDD::HGTD_DetectorElementCollection& hgtdElements,
float beamSpotWeight,
const HGTD_ID* hgtdID)
{
const Identifier& id = hgtdID->wafer_id(cluster->identifierHash());
const auto *element = hgtdElements.getDetectorElement(hgtdID->wafer_hash(hgtdID->wafer_id(id)));
const auto& local_position = cluster->template localPosition<3>();
const auto& local_covariance = cluster->template localCovariance<3>();
// compute global position
const Amg::Transform3D& T = element->surface().transform();
double Ax[3] = {T(0,0),T(1,0),T(2,0)};
double Ay[3] = {T(0,1),T(1,1),T(2,1)};
double R [3] = {T(0,3),T(1,3),T(2,3)};
Amg::Vector2D M;
M[0] = local_position(0,0);
M[1] = local_position(1,0);
Amg::Vector3D globalPos(M[0]*Ax[0]+M[1]*Ay[0]+R[0],M[0]*Ax[1]+M[1]*Ay[1]+R[1],M[0]*Ax[2]+M[1]*Ay[2]+R[2]);
m_barrelEndcap->Fill(hgtdID->endcap(id));
m_eta->Fill(globalPos.eta(), beamSpotWeight);
// Divide in left and right endcaps
if (hgtdID->endcap(id) == -2) {
m_layer_left->Fill(hgtdID->layer(id), beamSpotWeight);
m_phi_module_left->Fill(hgtdID->phi_module(id), beamSpotWeight);
m_eta_module_left->Fill(hgtdID->eta_module(id), beamSpotWeight);
m_phi_index_left->Fill(hgtdID->phi_index(id), beamSpotWeight);
m_eta_index_left->Fill(hgtdID->eta_index(id), beamSpotWeight);
m_local_x_left->Fill(local_position(0, 0), beamSpotWeight);
m_local_y_left->Fill(local_position(1, 0), beamSpotWeight);
m_local_t_left->Fill(local_position(2, 0), beamSpotWeight);
m_localCovXX_left->Fill(local_covariance(0, 0), beamSpotWeight);
m_localCovYY_left->Fill(local_covariance(1, 1), beamSpotWeight);
m_localCovTT_left->Fill(local_covariance(2, 2), beamSpotWeight);
m_global_x_left->Fill(globalPos.x(), beamSpotWeight);
m_global_y_left->Fill(globalPos.y(), beamSpotWeight);
m_global_z_left->Fill(globalPos.z(), beamSpotWeight);
m_global_r_left->Fill(std::sqrt(globalPos.x()*globalPos.x() + (globalPos.y()*globalPos.y())), beamSpotWeight);
m_local_xy_left->Fill(local_position(0, 0), local_position(1, 0), beamSpotWeight);
m_global_xy_left->Fill(globalPos.x(), globalPos.y(), beamSpotWeight);
m_global_zr_left->Fill(globalPos.z(), std::sqrt(globalPos.x()*globalPos.x() + (globalPos.y()*globalPos.y())), beamSpotWeight);
} else if (hgtdID->endcap(id) == 2) {
m_layer_right->Fill(hgtdID->layer(id), beamSpotWeight);
m_phi_module_right->Fill(hgtdID->phi_module(id), beamSpotWeight);
m_eta_module_right->Fill(hgtdID->eta_module(id), beamSpotWeight);
m_phi_index_right->Fill(hgtdID->phi_index(id), beamSpotWeight);
m_eta_index_right->Fill(hgtdID->eta_index(id), beamSpotWeight);
m_local_x_right->Fill(local_position(0, 0), beamSpotWeight);
m_local_y_right->Fill(local_position(1, 0), beamSpotWeight);
m_local_t_right->Fill(local_position(2, 0), beamSpotWeight);
m_localCovXX_right->Fill(local_covariance(0, 0), beamSpotWeight);
m_localCovYY_right->Fill(local_covariance(1, 1), beamSpotWeight);
m_localCovTT_right->Fill(local_covariance(2, 2), beamSpotWeight);
m_global_x_right->Fill(globalPos.x(), beamSpotWeight);
m_global_y_right->Fill(globalPos.y(), beamSpotWeight);
m_global_z_right->Fill(globalPos.z(), beamSpotWeight);
m_global_r_right->Fill(std::sqrt(globalPos.x()*globalPos.x() + (globalPos.y()*globalPos.y())), beamSpotWeight);
m_local_xy_right->Fill(local_position(0, 0), local_position(1, 0), beamSpotWeight);
m_global_xy_right->Fill(globalPos.x(), globalPos.y(), beamSpotWeight);
m_global_zr_right->Fill(globalPos.z(), std::sqrt(globalPos.x()*globalPos.x() + (globalPos.y()*globalPos.y())), beamSpotWeight);
}
}
}
/*
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ACTS_HGTD_CLUSTER_VALIDATION_PLOTS_H
#define ACTS_HGTD_CLUSTER_VALIDATION_PLOTS_H
#include "TrkValHistUtils/PlotBase.h"
#include "xAODInDetMeasurement/HGTDClusterContainer.h"
#include "HGTD_Identifier/HGTD_ID.h"
#include "HGTD_ReadoutGeometry/HGTD_DetectorElementCollection.h"
namespace ActsTrk {
class HgtdClusterValidationPlots :
public PlotBase {
public:
HgtdClusterValidationPlots(PlotBase* pParent, const std::string& sDir);
virtual ~HgtdClusterValidationPlots() = default;
void fill(const xAOD::HGTDCluster* cluster,
const InDetDD::HGTD_DetectorElementCollection& hgtdElements,
float beamSpotWeight,
const HGTD_ID*);
private:
TH1* m_barrelEndcap {};
TH1* m_layer_right {};
TH1* m_layer_left {};
TH1* m_phi_module_right {};
TH1* m_phi_module_left {};
TH1* m_eta_module_right {};
TH1* m_eta_module_left {};
TH1* m_phi_index_right {};
TH1* m_phi_index_left {};
TH1* m_eta_index_right {};
TH1* m_eta_index_left {};
TH1* m_eta {};
TH1* m_local_x_right {};
TH1* m_local_y_right {};
TH1* m_local_t_right {};
TH1* m_localCovXX_right {};
TH1* m_localCovYY_right {};
TH1* m_localCovTT_right {};
TH2* m_local_xy_right {};
TH2* m_global_xy_right {};
TH2* m_global_zr_right {};
TH1* m_local_x_left {};
TH1* m_local_y_left {};
TH1* m_local_t_left {};
TH1* m_localCovXX_left {};
TH1* m_localCovYY_left {};
TH1* m_localCovTT_left {};
TH1* m_global_x_left {};
TH1* m_global_y_left {};
TH1* m_global_z_left {};
TH1* m_global_r_left {};
TH1* m_global_x_right {};
TH1* m_global_y_right {};
TH1* m_global_z_right {};
TH1* m_global_r_right {};
TH2* m_local_xy_left {};
TH2* m_global_xy_left {};
TH2* m_global_zr_left {};
};
}
#endif
......@@ -21,11 +21,14 @@ namespace ActsTrk {
ATH_CHECK(m_pixelClusterContainerKey.initialize());
ATH_CHECK(m_stripClusterContainerKey.initialize());
ATH_CHECK(m_hgtdClusterContainerKey.initialize(m_doHGTD));
ATH_CHECK(m_pixelSpacePointContainerKey.initialize());
ATH_CHECK(m_stripSpacePointContainerKey.initialize());
ATH_CHECK(m_stripOverlapSpacePointContainerKey.initialize());
ATH_CHECK(m_HGTDDetEleCollKey.initialize(m_doHGTD));
std::string folder = "SquirrelPlots/Acts";
m_pixelClusterValidationPlots =
std::make_unique< ActsTrk::PixelClusterValidationPlots >(nullptr,
......@@ -55,9 +58,19 @@ namespace ActsTrk {
folder.c_str(),
m_stripOverlapSpacePointContainerKey.key().c_str()),
"StripOverlap");
// Schedule HGTD objects
if (m_doHGTD) {
m_hgtdClusterValidationPlots =
std::make_unique< ActsTrk::HgtdClusterValidationPlots >(nullptr,
Form("%s/%s/",
folder.c_str(),
m_hgtdClusterContainerKey.key().c_str()));
}
ATH_CHECK(detStore()->retrieve(m_pixelID, "PixelID"));
ATH_CHECK(detStore()->retrieve(m_stripID, "SCT_ID"));
if (m_doHGTD) ATH_CHECK(detStore()->retrieve(m_hgtdID, "HGTD_ID"));
return StatusCode::SUCCESS;
}
......@@ -68,13 +81,39 @@ namespace ActsTrk {
ATH_CHECK(bookCollection(m_pixelClusterValidationPlots.get()));
ATH_CHECK(bookCollection(m_stripClusterValidationPlots.get()));
if (m_doHGTD) ATH_CHECK(bookCollection(m_hgtdClusterValidationPlots.get()));
ATH_CHECK(bookCollection(m_pixelSpacePointValidationPlots.get()));
ATH_CHECK(bookCollection(m_stripSpacePointValidationPlots.get()));
ATH_CHECK(bookCollection(m_stripOverlapSpacePointValidationPlots.get()));
return StatusCode::SUCCESS;
}
StatusCode PhysValTool::fillHgtd(const EventContext& ctx,
float beamSpotWeight) {
// Get collection
SG::ReadHandle< xAOD::HGTDClusterContainer > inputHgtdClusterContainer = SG::makeHandle( m_hgtdClusterContainerKey, ctx );
if (not inputHgtdClusterContainer.isValid()) {
ATH_MSG_FATAL("xAOD::HGTDClusterContainer with key " << m_hgtdClusterContainerKey.key() << " is not available...");
return StatusCode::FAILURE;
}
const xAOD::HGTDClusterContainer *hgtdClusterContainer = inputHgtdClusterContainer.cptr();
SG::ReadCondHandle<InDetDD::HGTD_DetectorElementCollection> hgtdDetEleHandle(m_HGTDDetEleCollKey, ctx);
const InDetDD::HGTD_DetectorElementCollection* hgtdElements(*hgtdDetEleHandle);
if (not hgtdDetEleHandle.isValid() or hgtdElements==nullptr) {
ATH_MSG_FATAL(m_HGTDDetEleCollKey.fullKey() << " is not available.");
return StatusCode::FAILURE;
}
// Fill plots
for (const xAOD::HGTDCluster* cluster : *hgtdClusterContainer) {
m_hgtdClusterValidationPlots->fill(cluster, *hgtdElements, beamSpotWeight, m_hgtdID);
}
return StatusCode::SUCCESS;
}
StatusCode PhysValTool::fillHistograms()
{
......@@ -150,6 +189,8 @@ namespace ActsTrk {
m_stripOverlapSpacePointValidationPlots->fill(spacePoint, beamSpotWeight, m_stripID);
}
if (m_doHGTD) ATH_CHECK(fillHgtd(ctx, beamSpotWeight));
return StatusCode::SUCCESS;
}
......@@ -158,6 +199,10 @@ namespace ActsTrk {
ATH_MSG_DEBUG("Finalising hists for " << name() << "...");
m_pixelClusterValidationPlots->finalize();
m_stripClusterValidationPlots->finalize();
if (m_doHGTD) m_hgtdClusterValidationPlots->finalize();
m_pixelSpacePointValidationPlots->finalize();
m_stripSpacePointValidationPlots->finalize();
m_stripOverlapSpacePointValidationPlots->finalize();
return StatusCode::SUCCESS;
}
......
......@@ -7,12 +7,15 @@
#include "AthenaMonitoring/ManagedMonitorToolBase.h"
#include "xAODInDetMeasurement/PixelClusterContainer.h"
#include "xAODInDetMeasurement/HGTDClusterContainer.h"
#include "xAODEventInfo/EventInfo.h"
#include "StoreGate/ReadHandleKey.h"
#include "InDetIdentifier/PixelID.h"
#include "InDetIdentifier/SCT_ID.h"
#include "HGTD_Identifier/HGTD_ID.h"
#include "src/PixelClusterValidationPlots.h"
#include "src/StripClusterValidationPlots.h"
#include "src/HgtdClusterValidationPlots.h"
#include "src/PixelSpacePointValidationPlots.h"
#include "src/StripSpacePointValidationPlots.h"
......@@ -36,6 +39,9 @@ namespace ActsTrk {
template<typename external_collection_t>
StatusCode bookCollection(external_collection_t*);
StatusCode fillHgtd(const EventContext& ctx,
float beamSpotWeight);
private:
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo {this, "EventInfo", "EventInfo",
"Event info key"};
......@@ -44,7 +50,9 @@ namespace ActsTrk {
"Key of input pixel clusters"};
SG::ReadHandleKey< xAOD::StripClusterContainer > m_stripClusterContainerKey {this, "StripClusterContainerKey", "ITkStripClusters",
"Key of input pixel clusters"};
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_hgtdClusterContainerKey {this, "HGTDClusterContainerKey", "HGTD_Clusters",
"Key of input hgtd clusters"};
SG::ReadHandleKey< xAOD::SpacePointContainer > m_pixelSpacePointContainerKey {this, "PixelSpacePointContainerKey", "ITkPixelSpacePoints",
"Key of input pixel space points"};
SG::ReadHandleKey< xAOD::SpacePointContainer > m_stripSpacePointContainerKey {this, "StripSpacePointContainerKey", "ITkStripSpacePoints",
......@@ -52,15 +60,22 @@ namespace ActsTrk {
SG::ReadHandleKey< xAOD::SpacePointContainer > m_stripOverlapSpacePointContainerKey {this, "StripOverlapSpacePointContainerKey", "ITkStripOverlapSpacePoints",
"Key of input strip overlap space points"};
SG::ReadCondHandleKey<InDetDD::HGTD_DetectorElementCollection> m_HGTDDetEleCollKey {this, "HGTDDetEleCollKey", "HGTD_DetectorElementCollection",
"Key of HGTD_DetectorElementCollection for HGTD"};
Gaudi::Property<bool> m_doHGTD {this, "doHGTD", false, "Analyse HGTD collections"};
std::unique_ptr< ActsTrk::PixelClusterValidationPlots > m_pixelClusterValidationPlots;
std::unique_ptr< ActsTrk::StripClusterValidationPlots > m_stripClusterValidationPlots;
std::unique_ptr< ActsTrk::HgtdClusterValidationPlots > m_hgtdClusterValidationPlots;
std::unique_ptr< ActsTrk::PixelSpacePointValidationPlots > m_pixelSpacePointValidationPlots;
std::unique_ptr< ActsTrk::StripSpacePointValidationPlots > m_stripSpacePointValidationPlots;
std::unique_ptr< ActsTrk::StripSpacePointValidationPlots > m_stripOverlapSpacePointValidationPlots;
const PixelID *m_pixelID {};
const SCT_ID *m_stripID {};
const HGTD_ID *m_hgtdID {};
};
template<typename external_collection_t>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment