ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTrkHitFillerTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6//
7// Author : Alaettin Serhan Mete (serhan@iastate.edu)
8// Date : 03 August 2009
9//
14
15
16namespace {
17
18const int ID = 1;
19const int MS = 2;
20
21struct Var
22{
23 const char* name;
25 int which;
26};
27const Var vars[] =
28{
29 {"nOutliersOnTrack", xAOD::numberOfOutliersOnTrack, ID+MS},
30
32 {"nPixHits", xAOD::numberOfPixelHits, ID},
33 {"nSCTHits", xAOD::numberOfSCTHits, ID},
34 {"nTRTHits", xAOD::numberOfTRTHits, ID},
35 {"nTRTHighTHits", xAOD::numberOfTRTHighThresholdHits, ID},
37 {"nPixSharedHits", xAOD::numberOfPixelSharedHits, ID},
38 {"nPixHoles", xAOD::numberOfPixelHoles, ID},
39 {"nSCTSharedHits", xAOD::numberOfSCTSharedHits, ID},
40 {"nSCTHoles", xAOD::numberOfSCTHoles, ID},
41 {"nTRTOutliers", xAOD::numberOfTRTOutliers, ID},
42 {"nTRTHighTOutliers", xAOD::numberOfTRTHighThresholdOutliers, ID},
43 {"nGangedPixels", xAOD::numberOfGangedPixels, ID},
44 {"nPixelDeadSensors", xAOD::numberOfPixelDeadSensors, ID},
45 {"nSCTDeadSensors", xAOD::numberOfSCTDeadSensors, ID},
46 {"nTRTDeadStraws", xAOD::numberOfTRTDeadStraws, ID},
47 {"expectInnermostPixelLayerHit", xAOD::expectInnermostPixelLayerHit, ID},
48
49 {"nprecisionLayers", xAOD::numberOfPrecisionLayers, MS},
50 {"nprecisionHoleLayers", xAOD::numberOfPrecisionHoleLayers, MS},
51 {"nphiLayers", xAOD::numberOfPhiLayers, MS},
52 {"nphiHoleLayers", xAOD::numberOfPhiHoleLayers, MS},
53 {"ntrigEtaLayers", xAOD::numberOfTriggerEtaLayers, MS},
54 {"ntrigEtaHoleLayers", xAOD::numberOfTriggerEtaHoleLayers, MS},
55};
56
57
58}
59
60
61namespace D3PD {
62
63
65 const std::string& name,
66 const IInterface* parent)
67 : BlockFillerTool<xAOD::Muon> (type, name, parent)
68{
69 declareProperty ("SaveIDMuonHitSummary", m_saveIDMuonHitSummary = true);
70 declareProperty ("SaveMSMuonHitSummary", m_saveMSMuonHitSummary = true);
71}
72
73
75{
76 int mask = 0;
77 if (m_saveIDMuonHitSummary) mask += ID;
78 if (m_saveMSMuonHitSummary) mask += MS;
79
80 m_vars.reserve (std::distance (std::begin (vars), std::end (vars)));
81 for (const Var& v : vars) {
82 if (v.which & mask) {
83 m_vars.emplace_back (v.type, nullptr);
84 CHECK( addVariable (v.name, m_vars.back().second) );
85 }
86 }
87 return StatusCode::SUCCESS;
88}
89
90
92{
93 for (auto& v : m_vars)
94 p.summaryValue (*v.second, v.first);
95 return StatusCode::SUCCESS;
96}
97
98
99} // namespace D3PD
std::vector< Identifier > ID
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Type-safe wrapper for block filler tools.
std::vector< std::pair< xAOD::SummaryType, uint8_t * > > m_vars
virtual StatusCode fill(const xAOD::Muon &p)
Fill one block — type-safe version.
MuonTrkHitFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode book()
Declare tuple variables.
Block filler tool for noisy FEB information.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Muon_v1 Muon
Reference the current persistent version:
SummaryType
Enumerates the different types of information stored in Summary.
@ numberOfGangedPixels
number of pixels which have a ganged ambiguity [unit8_t].
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
@ numberOfTRTDeadStraws
number of dead TRT straws crossed [unit8_t].
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
@ numberOfPrecisionLayers
layers with at least 3 hits [unit8_t].
@ numberOfTRTHighThresholdOutliers
number of TRT high threshold outliers (only xenon counted) [unit8_t].
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
@ numberOfTriggerEtaHoleLayers
layers with trigger eta holes but no hits [unit8_t].
@ numberOfPhiHoleLayers
layers with trigger phi holes but no hits [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
@ numberOfTriggerEtaLayers
layers with trigger eta hits [unit8_t].
@ numberOfOutliersOnTrack
number of measurements flaged as outliers in TSOS [unit8_t].
@ numberOfPhiLayers
layers with a trigger phi hit [unit8_t].
@ numberOfPrecisionHoleLayers
layers with holes AND no hits [unit8_t].
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
@ numberOfSCTHoles
number of SCT holes [unit8_t].