ATLAS Offline Software
Loading...
Searching...
No Matches
TRTStrawEfficiency.h
Go to the documentation of this file.
1// this is c++ file -*- c++ -*-
2/*
3 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4*/
5
6// TRTStrawEfficiency.h
7// author: Ryan D. Reece <ryan.reece@cern.ch>
8// created: Nov 2009
9
10#ifndef TRT_TrackHoleSearch_TRTStrawEfficiency_h
11#define TRT_TrackHoleSearch_TRTStrawEfficiency_h
12
14#include "GaudiKernel/ToolHandle.h"
15#include "GaudiKernel/ServiceHandle.h"
16#include "GaudiKernel/ITHistSvc.h"
20
24
26
27#include "CLHEP/Units/SystemOfUnits.h"
28
29#include <string>
30#include <vector>
31
32namespace Trk
33{
36}
37
38class TRT_ID;
39
40class TTree;
41
43{
44 public:
45 TRTStrawEfficiency(const std::string& name, ISvcLocator* pSvcLocator);
46
47 StatusCode initialize();
48 StatusCode finalize();
49 StatusCode execute();
50
51 private:
52 // configurables
53 //----------------------------------
54 ToolHandle<Trk::ITrackHoleSearchTool> m_trt_hole_finder
55 {this, "trt_hole_finder","TRTTrackHoleSearchTool"};
56 FloatProperty m_max_abs_d0{this, "max_abs_d0", 600*CLHEP::mm};
57 FloatProperty m_max_abs_z0{this, "max_abs_z0", 600*CLHEP::mm};
58 FloatProperty m_min_pT{this, "min_pT", 1.0*CLHEP::GeV};
59 FloatProperty m_min_p{this, "min_p", 2.0*CLHEP::GeV};
60 FloatProperty m_max_abs_eta{this, "max_abs_eta", 2.5};
61 IntegerProperty m_min_pixel_hits{this, "min_pixel_hits", 0};
62 IntegerProperty m_min_sct_hits{this, "min_sct_hits", 2};
63 IntegerProperty m_min_trt_hits{this, "min_trt_hits", 15};
64 ServiceHandle<ITHistSvc> m_hist_svc{this, "hist_svc", "THistSvc"};
66 {this, "straw_neighbour_svc", "TRT_StrawNeighbourSvc"};
67 StringProperty m_tree_name{this, "tree_name", "trt_eff"};
68 StringProperty m_stream_name{this, "stream_name", "TRTEffStream"};
69 StringProperty m_required_trigger{this, "required_trigger", ""};
70
71 // private data
72 //----------------------------------
73 TTree* m_tree{nullptr};
74 const TRT_ID* m_TRT_ID{nullptr};
75 PublicToolHandle<Trk::IUpdator> m_updator
76 {this,"KalmanUpdator","Trk::KalmanUpdator/TrkKalmanUpdator",""};
77 PublicToolHandle<Trig::ITrigDecisionTool> m_trigDec
78 {this,"ITrigDecisionTool","Trig::ITrigDecisionTool/TrigDecisionTool",""};
79
80 // Data handles
81 SG::ReadHandleKey<TrackCollection> m_tracksKey{this, "track_collection", "CombinedInDetTracks", "Tracks container key"};
82 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "event_info_key", "EventInfo", "Event info key"};
83 SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainerKey{this, "VertexContainerName", "PrimaryVertices", "Vertex container key"};
84
85 unsigned int m_num_events{0};
86 unsigned int m_num_tracks{0};
87 unsigned int m_num_preselected_tracks{0};
88
89 // ntuple branches
90 unsigned int m_event_number{0};
91 unsigned int m_run_number{0};
92 unsigned int m_lumi_block{0};
93 float m_track_pt{0.};
94 float m_track_eta{0.};
95 float m_track_phi{0.};
96 float m_track_d0{0.};
97 float m_track_z0{0.};
101 std::vector<int> m_hit_bec;
102 std::vector<int> m_hit_phi;
103 std::vector<int> m_hit_layer;
104 std::vector<int> m_hit_strawlayer;
105 std::vector<int> m_hit_straw;
106 std::vector<int> m_hit_chip;
107 std::vector<int> m_hit_pad;
108 std::vector<float> m_hit_x;
109 std::vector<float> m_hit_y;
110 std::vector<float> m_hit_z;
111 std::vector<float> m_hit_center_x;
112 std::vector<float> m_hit_center_y;
113 std::vector<float> m_hit_center_z;
114 std::vector<float> m_hit_R;
115 std::vector<float> m_hit_locR;
116 std::vector<int> m_hit_HL;
117 std::vector<int> m_hit_det;
118 std::vector<float> m_hit_ub_locR;
119 std::vector<float> m_hit_ub_x;
120 std::vector<float> m_hit_ub_y;
121 std::vector<float> m_hit_ub_z;
125 std::vector<int> m_hole_bec;
126 std::vector<int> m_hole_phi;
127 std::vector<int> m_hole_layer;
128 std::vector<int> m_hole_strawlayer;
129 std::vector<int> m_hole_straw;
130 std::vector<int> m_hole_chip;
131 std::vector<int> m_hole_pad;
132 std::vector<float> m_hole_x;
133 std::vector<float> m_hole_y;
134 std::vector<float> m_hole_z;
135 std::vector<float> m_hole_center_x;
136 std::vector<float> m_hole_center_y;
137 std::vector<float> m_hole_center_z;
138 std::vector<float> m_hole_locR;
139 std::vector<float> m_hole_locR_error;
140 std::vector<int> m_hole_det;
141
142 //---- branches added by dan -------
143 std::vector<int> m_hit_tube_hit;
146
147 // private methods
148 //----------------------------------
149 void make_branches();
150 void clear_branches();
153};
154
155#endif // TRT_TrackHoleSearch_TRTStrawEfficiency_h
Abstract interface to information on straws electronic grouping.
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
std::vector< float > m_hit_ub_z
std::vector< int > m_hit_pad
std::vector< float > m_hit_z
std::vector< int > m_hit_straw
StringProperty m_stream_name
unsigned int m_event_number
ServiceHandle< ITRT_StrawNeighbourSvc > m_TRTStrawNeighbourSvc
IntegerProperty m_min_trt_hits
std::vector< float > m_hole_center_x
std::vector< float > m_hole_center_y
std::vector< int > m_hit_det
std::vector< float > m_hole_z
std::vector< float > m_hole_x
std::vector< float > m_hit_ub_y
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
int fill_hole_data(const Trk::TrackStateOnSurface &hole)
FloatProperty m_max_abs_d0
std::vector< int > m_hit_bec
IntegerProperty m_min_sct_hits
std::vector< float > m_hole_locR
StringProperty m_required_trigger
std::vector< int > m_hit_HL
std::vector< float > m_hit_center_y
std::vector< int > m_hole_strawlayer
std::vector< float > m_hit_y
std::vector< float > m_hole_locR_error
ServiceHandle< ITHistSvc > m_hist_svc
std::vector< float > m_hit_center_x
StringProperty m_tree_name
std::vector< int > m_hit_layer
std::vector< int > m_hit_phi
std::vector< float > m_hit_R
FloatProperty m_max_abs_z0
std::vector< int > m_hole_det
std::vector< int > m_hit_strawlayer
std::vector< float > m_hit_locR
IntegerProperty m_min_pixel_hits
std::vector< int > m_hole_chip
std::vector< int > m_hole_phi
int fill_hit_data(const Trk::TrackStateOnSurface &hit)
PublicToolHandle< Trk::IUpdator > m_updator
TRTStrawEfficiency(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< int > m_hole_layer
const TRT_ID * m_TRT_ID
std::vector< int > m_hit_tube_hit
std::vector< float > m_hole_center_z
ToolHandle< Trk::ITrackHoleSearchTool > m_trt_hole_finder
FloatProperty m_max_abs_eta
unsigned int m_num_preselected_tracks
PublicToolHandle< Trig::ITrigDecisionTool > m_trigDec
std::vector< int > m_hole_straw
std::vector< float > m_hole_y
std::vector< int > m_hit_chip
SG::ReadHandleKey< TrackCollection > m_tracksKey
std::vector< int > m_hole_pad
std::vector< float > m_hit_x
std::vector< float > m_hit_ub_locR
std::vector< float > m_hit_center_z
std::vector< int > m_hole_bec
std::vector< float > m_hit_ub_x
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
interface for searching, counting and adding holes on tracks anywhere in ATLAS.
represents the track state (measurement, material, fit parameters and quality) at a surface.
Ensure that the ATLAS eigen extensions are properly loaded.