ATLAS Offline Software
Loading...
Searching...
No Matches
HistFamily Struct Reference
Collaboration diagram for HistFamily:

Public Member Functions

 HistFamily (const string &)
void fill (const xAOD::TrackParticle &, const xAOD::Vertex *)
 HistFamily (const HistFamily &)=delete
HistFamilyoperator= (const HistFamily &)=delete

Private Member Functions

uint8_t getSum (const xAOD::TrackParticle &, xAOD::SummaryType) const

Private Attributes

TH2 * h_pt = nullptr
TH2 * h_si_hits_phys = nullptr
TH2 * h_si_hits = nullptr
TH2 * h_si_holes = nullptr
TH2 * h_si_shared = nullptr
TH2 * h_ibl_hits = nullptr
TH2 * h_bl_hits = nullptr
TH2 * h_ibl_expected = nullptr
TH2 * h_bl_expected = nullptr
TH2 * h_pix_hits_phys = nullptr
TH2 * h_pix_hits = nullptr
TH2 * h_pix_holes = nullptr
TH2 * h_pix_shared = nullptr
TH2 * h_sct_hits_phys = nullptr
TH2 * h_sct_hits = nullptr
TH2 * h_sct_holes = nullptr
TH2 * h_sct_shared = nullptr
TH2 * h_trt_hits = nullptr
TH2 * h_trt_outlier_fraction = nullptr
TH2 * h_d0 = nullptr
TH2 * h_z0sintheta = nullptr

Detailed Description

Definition at line 33 of file InDetTrackSelectionToolTester.cxx.

Constructor & Destructor Documentation

◆ HistFamily() [1/2]

HistFamily::HistFamily ( const string & cut_name)

Definition at line 187 of file InDetTrackSelectionToolTester.cxx.

188{
189 auto* currentFile = TFile::CurrentFile();
190 currentFile->mkdir(cut_name.data())->cd(); // create a directory for this cut type and cd into it
191#define HIST_INIT( NAME, AXIS_LABEL, AXIS_N, AXIS_XL, AXIS_XH ) \
192 do{ \
193 h_##NAME = new TH2F(#NAME, #NAME ";#eta;" AXIS_LABEL, 50,-2.5,2.5, \
194 AXIS_N, AXIS_XL, AXIS_XH); \
195 } while (false)
196
197 HIST_INIT( pt, "p_{T} [GeV]", 100, 0, 20 );
198 HIST_INIT( si_hits_phys, "Si physical hits", 24, 0, 24 );
199 HIST_INIT( si_hits, "Si hits", 24, 0, 24 );
200 HIST_INIT( si_holes, "Si holes", 6, 0, 6 );
201 HIST_INIT( si_shared, "Si shared hits", 6, 0, 6 );
202 HIST_INIT( pix_hits_phys, "Pixel physical hits", 10, 0, 10 );
203 HIST_INIT( pix_hits, "Pixel hits", 10, 0, 10 );
204 HIST_INIT( pix_holes, "Pixel holes", 4, 0, 4 );
205 HIST_INIT( pix_shared, "Pixel shared hits", 4, 0, 4 );
206 HIST_INIT( sct_hits_phys, "SCT physical hits", 16, 0, 16 );
207 HIST_INIT( sct_hits, "SCT hits", 16, 0, 16 );
208 HIST_INIT( sct_holes, "SCT holes", 4, 0, 4 );
209 HIST_INIT( sct_shared, "SCT shared hits", 4, 0, 4 );
210 HIST_INIT( ibl_hits, "IBL hits", 4, 0, 4 );
211 HIST_INIT( ibl_expected, "expect IBL hit", 2, 0, 2 );
212 HIST_INIT( bl_hits, "BLayer hits", 4, 0, 4 );
213 HIST_INIT( bl_expected, "expect BLayer hit", 2, 0, 2 );
214 HIST_INIT( trt_hits, "TRT hits + outliers", 60, 0, 60 );
215 HIST_INIT( trt_outlier_fraction, "TRT outlier fraction", 25, 0., 1. );
216
217 h_d0 = new TH2F( "d0", "d_{0}^{BL};d_{0}^{BL} [mm];#sigma_{d_{0}} [mm]", 60, -3., 3., 60, 0., 3. );
218 h_z0sintheta = new TH2F( "z0sintheta", "z_{0}^{PV} sin #theta;z_{0}^{PV} sin #theta [mm];#sigma_{z_{0} sin #theta} [mm]", 100, -5., 5., 50, 0., 5. );
219
220#undef HIST_INIT
221
222 currentFile->cd(); // move back to the parent directory
223}
#define HIST_INIT(NAME, AXIS_LABEL, AXIS_N, AXIS_XL, AXIS_XH)
const char * cut_name[]
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)

◆ HistFamily() [2/2]

HistFamily::HistFamily ( const HistFamily & )
delete

Member Function Documentation

◆ fill()

void HistFamily::fill ( const xAOD::TrackParticle & trk,
const xAOD::Vertex * vtx )

Definition at line 225 of file InDetTrackSelectionToolTester.cxx.

226{
227 uint8_t nPixHits = getSum(trk, xAOD::numberOfPixelHits);
230 uint8_t nPixHoles = getSum(trk, xAOD::numberOfPixelHoles);
231 uint8_t nSctHits = getSum(trk, xAOD::numberOfSCTHits);
233 uint8_t nSctShared = getSum(trk, xAOD::numberOfSCTSharedHits);
234 uint8_t nSctHoles = getSum(trk, xAOD::numberOfSCTHoles);
239 uint8_t nTrtHits = getSum(trk, xAOD::numberOfTRTHits);
240 uint8_t nTrtOutliers = getSum(trk, xAOD::numberOfTRTOutliers);
241
242 double eta = trk.eta();
243 h_pt->Fill(eta, trk.pt()*1e-3);
244 h_ibl_hits->Fill(eta, nIblHits);
245 h_ibl_expected->Fill(eta, expectIbl);
246 h_bl_hits->Fill(eta, nBlHits);
247 h_bl_expected->Fill(eta, expectBl);
248 h_pix_hits_phys->Fill(eta, nPixHits);
249 h_pix_hits->Fill(eta, nPixHits + nPixDead);
250 h_pix_holes->Fill(eta, nPixHoles);
251 h_pix_shared->Fill(eta, nPixShared);
252 h_sct_hits_phys->Fill(eta, nSctHits);
253 h_sct_hits->Fill(eta, nSctHits + nSctDead);
254 h_sct_holes->Fill(eta, nSctHoles);
255 h_sct_shared->Fill(eta, nSctShared);
256 h_si_hits_phys->Fill(eta, nPixHits + nSctHits);
257 h_si_hits->Fill(eta, nPixHits + nPixDead + nSctHits + nSctDead);
258 h_si_holes->Fill(eta, nPixHoles + nSctHoles);
259 h_si_shared->Fill(eta, nPixShared + nSctShared);
260 h_trt_hits->Fill(eta, nTrtHits + nTrtOutliers);
261 h_trt_outlier_fraction->Fill(eta, nTrtOutliers / static_cast<double>(nTrtHits + nTrtOutliers));
262
263 const auto& covMatrix = trk.definingParametersCovMatrix();
264 h_d0->Fill(trk.d0(), std::sqrt(covMatrix(0,0)) );
265 double z0 = trk.z0();
266 if (vtx != nullptr) {
267 z0 += trk.vz() - vtx->z();
268 }
269 double sinTheta = std::sin(trk.theta());
270 double cosTheta = std::cos(trk.theta());
271 double varZ0SinTheta = 0.;
272 varZ0SinTheta += covMatrix(1,1)*sinTheta*sinTheta;
273 varZ0SinTheta += 2*covMatrix(1,3)*z0*sinTheta*cosTheta;
274 varZ0SinTheta += covMatrix(3,3)*z0*z0*cosTheta*cosTheta;
275 h_z0sintheta->Fill(z0*sinTheta, std::sqrt(varZ0SinTheta));
276
277 return;
278}
Scalar eta() const
pseudorapidity method
float z0() const
Returns the parameter.
float theta() const
Returns the parameter, which has range 0 to .
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
float vz() const
The z origin for the parameters.
float d0() const
Returns the parameter.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
float z() const
Returns the z position.
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
@ 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].
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
@ numberOfSCTHoles
number of SCT holes [unit8_t].
uint8_t getSum(const xAOD::TrackParticle &, xAOD::SummaryType) const

◆ getSum()

uint8_t HistFamily::getSum ( const xAOD::TrackParticle & trk,
xAOD::SummaryType sum_type ) const
private

Definition at line 280 of file InDetTrackSelectionToolTester.cxx.

281{
282 uint8_t sum_val = 0;
283 if (!trk.summaryValue(sum_val, sum_type)) {
284 Error( "HistFamily::getSum()", "Could not get summary type %i", sum_type );
285 }
286 return sum_val;
287}
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition Error.h:16

◆ operator=()

HistFamily & HistFamily::operator= ( const HistFamily & )
delete

Member Data Documentation

◆ h_bl_expected

TH2* HistFamily::h_bl_expected = nullptr
private

Definition at line 49 of file InDetTrackSelectionToolTester.cxx.

◆ h_bl_hits

TH2* HistFamily::h_bl_hits = nullptr
private

Definition at line 47 of file InDetTrackSelectionToolTester.cxx.

◆ h_d0

TH2* HistFamily::h_d0 = nullptr
private

Definition at line 61 of file InDetTrackSelectionToolTester.cxx.

◆ h_ibl_expected

TH2* HistFamily::h_ibl_expected = nullptr
private

Definition at line 48 of file InDetTrackSelectionToolTester.cxx.

◆ h_ibl_hits

TH2* HistFamily::h_ibl_hits = nullptr
private

Definition at line 46 of file InDetTrackSelectionToolTester.cxx.

◆ h_pix_hits

TH2* HistFamily::h_pix_hits = nullptr
private

Definition at line 51 of file InDetTrackSelectionToolTester.cxx.

◆ h_pix_hits_phys

TH2* HistFamily::h_pix_hits_phys = nullptr
private

Definition at line 50 of file InDetTrackSelectionToolTester.cxx.

◆ h_pix_holes

TH2* HistFamily::h_pix_holes = nullptr
private

Definition at line 52 of file InDetTrackSelectionToolTester.cxx.

◆ h_pix_shared

TH2* HistFamily::h_pix_shared = nullptr
private

Definition at line 53 of file InDetTrackSelectionToolTester.cxx.

◆ h_pt

TH2* HistFamily::h_pt = nullptr
private

Definition at line 41 of file InDetTrackSelectionToolTester.cxx.

◆ h_sct_hits

TH2* HistFamily::h_sct_hits = nullptr
private

Definition at line 55 of file InDetTrackSelectionToolTester.cxx.

◆ h_sct_hits_phys

TH2* HistFamily::h_sct_hits_phys = nullptr
private

Definition at line 54 of file InDetTrackSelectionToolTester.cxx.

◆ h_sct_holes

TH2* HistFamily::h_sct_holes = nullptr
private

Definition at line 56 of file InDetTrackSelectionToolTester.cxx.

◆ h_sct_shared

TH2* HistFamily::h_sct_shared = nullptr
private

Definition at line 57 of file InDetTrackSelectionToolTester.cxx.

◆ h_si_hits

TH2* HistFamily::h_si_hits = nullptr
private

Definition at line 43 of file InDetTrackSelectionToolTester.cxx.

◆ h_si_hits_phys

TH2* HistFamily::h_si_hits_phys = nullptr
private

Definition at line 42 of file InDetTrackSelectionToolTester.cxx.

◆ h_si_holes

TH2* HistFamily::h_si_holes = nullptr
private

Definition at line 44 of file InDetTrackSelectionToolTester.cxx.

◆ h_si_shared

TH2* HistFamily::h_si_shared = nullptr
private

Definition at line 45 of file InDetTrackSelectionToolTester.cxx.

◆ h_trt_hits

TH2* HistFamily::h_trt_hits = nullptr
private

Definition at line 58 of file InDetTrackSelectionToolTester.cxx.

◆ h_trt_outlier_fraction

TH2* HistFamily::h_trt_outlier_fraction = nullptr
private

Definition at line 59 of file InDetTrackSelectionToolTester.cxx.

◆ h_z0sintheta

TH2* HistFamily::h_z0sintheta = nullptr
private

Definition at line 62 of file InDetTrackSelectionToolTester.cxx.


The documentation for this struct was generated from the following file: