|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include <google/profiler.h>
20 #include "CLHEP/Units/SystemOfUnits.h"
21 #include "Identifier/Identifier.h"
26 #include "GaudiKernel/ITHistSvc.h"
39 m_trt_hole_finder(
"TRTTrackHoleSearchTool"),
40 m_hist_svc(
"THistSvc",
name),
41 m_TRTStrawNeighbourSvc(
"TRT_StrawNeighbourSvc",
name),
46 m_num_preselected_tracks(0),
61 m_n_primary_vertex(0),
115 std::string profile_file =
"cpu.prof";
117 ProfilerStart(profile_file.c_str());
120 return StatusCode::SUCCESS;
135 return StatusCode::SUCCESS;
145 return StatusCode::FAILURE;
152 return StatusCode::FAILURE;
162 ATH_MSG_DEBUG(
"This event has " << tracks->size() <<
" tracks." );
163 for (
const auto *
track : *tracks) {
183 <<
" theta = " << perigee->parameters()[
Trk::theta] <<
"\n"
184 <<
" qOverP = " << perigee->parameters()[
Trk::qOverP] );
193 ATH_MSG_DEBUG(
" This track has " << track_states->
size() <<
" track states on surface." );
195 ATH_MSG_ERROR(
" This track has null track states on surface." );
200 for (
const auto *trackState : *track_states) {
214 bool passed_track_preselection =
224 if (!passed_track_preselection) {
232 for (
const auto *trackState : *track_states ) {
260 ATH_MSG_ERROR(
"fill_hole_data returned an invalid det type: " << hole_det);
263 ATH_MSG_WARNING(
" hole finder returned a TrackStateOnSurface not of type Hole.");
275 return StatusCode::FAILURE;
291 return StatusCode::SUCCESS;
300 #ifdef ANP_CPU_PROFILER
305 return StatusCode::SUCCESS;
438 if (!track_parameters) {
499 std::unique_ptr<Trk::TrackParameters> unbiased_track_parameters =
505 m_hit_ub_locR.push_back(
det == 3 && unbiased_track_parameters ? unbiased_track_parameters->parameters()[
Trk::locR] : -1 );
506 m_hit_ub_x.push_back( unbiased_track_parameters ? unbiased_track_parameters->
position().x() : -1 );
507 m_hit_ub_y.push_back( unbiased_track_parameters ? unbiased_track_parameters->
position().y() : -1 );
508 m_hit_ub_z.push_back( unbiased_track_parameters ? unbiased_track_parameters->
position().z() : -1 );
511 int is_tube_hit = -1;
512 if (measurement && (
det == 3) ) {
517 m_hit_tube_hit.push_back( (
det == 3)&&(measurement !=
nullptr) ? is_tube_hit : -1);
529 if (!track_parameters) {
530 ATH_MSG_ERROR(
"fill_hole_data(hole): null track_parameters");
575 float locR_error = 0.0;
580 const AmgSymMatrix(5)* merr = track_parameters->covariance();
584 ATH_MSG_ERROR(
"Track parameters have no covariance attached.");
def retrieve(aClass, aKey=None)
bool is_pixel(Identifier id) const
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
PublicToolHandle< Trk::IUpdator > m_updator
std::vector< int > m_hole_pad
std::vector< float > m_hit_center_x
uint64_t eventNumber() const
The current event's event number.
std::vector< float > m_hit_ub_z
bool is_sct(Identifier id) const
const Amg::Vector3D & position() const
Access method for the position.
std::vector< int > m_hit_bec
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
std::vector< float > m_hole_z
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
ServiceHandle< ITHistSvc > m_hist_svc
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
std::vector< int > m_hit_phi
unsigned int m_num_preselected_tracks
std::vector< int > m_hit_layer
std::vector< int > m_hit_chip
unsigned int m_event_number
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
bool highLevel() const
returns true if the high level threshold was passed
bool is_trt(Identifier id) const
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::vector< int > m_hole_chip
const Amg::Vector3D & center() const
Returns the center position of the Surface.
PublicToolHandle< Trig::ITrigDecisionTool > m_trigDec
ServiceHandle< ITRT_StrawNeighbourSvc > m_TRTStrawNeighbourSvc
std::vector< int > m_hole_straw
#define AmgSymMatrix(dim)
uint32_t runNumber() const
The current event's run number.
std::vector< int > m_hole_det
std::vector< float > m_hole_locR
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
std::vector< float > m_hit_locR
std::vector< int > m_hit_HL
std::vector< float > m_hole_center_x
std::vector< float > m_hit_center_y
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
std::vector< float > m_hit_R
std::vector< int > m_hole_layer
std::vector< float > m_hole_center_y
std::string m_required_trigger
int straw(const Identifier &id) const
std::vector< float > m_hole_y
std::vector< float > m_hit_ub_locR
std::string m_stream_name
@ Hole
A hole on the track - this is defined in the following way.
std::vector< int > m_hit_pad
ToolHandle< Trk::ITrackHoleSearchTool > m_trt_hole_finder
unsigned int m_num_tracks
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< float > m_hit_center_z
std::vector< float > m_hit_x
std::vector< float > m_hole_x
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
std::vector< int > m_hit_strawlayer
SG::ReadHandleKey< TrackCollection > m_tracksKey
#define ATH_MSG_ALWAYS(x)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
int layer_or_wheel(const Identifier &id) const
uint32_t lumiBlock() const
The current event's luminosity block number.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
int fill_hit_data(const Trk::TrackStateOnSurface &hit)
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
represents the track state (measurement, material, fit parameters and quality) at a surface.
std::vector< int > m_hit_tube_hit
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
int fill_hole_data(const Trk::TrackStateOnSurface &hole)
std::vector< int > m_hole_phi
int phi_module(const Identifier &id) const
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Abstract interface to information on straws electronic grouping.
unsigned int m_run_number
std::vector< int > m_hit_det
std::vector< float > m_hit_ub_x
#define ATH_MSG_WARNING(x)
std::vector< float > m_hit_ub_y
std::vector< int > m_hole_bec
std::vector< float > m_hole_center_z
unsigned int m_lumi_block
std::vector< int > m_hole_strawlayer
TRTStrawEfficiency(const std::string &name, ISvcLocator *pSvcLocator)
unsigned int m_num_events
Handle class for reading from StoreGate.
std::vector< float > m_hole_locR_error
size_type size() const noexcept
Returns the number of elements in the collection.
std::vector< float > m_hit_z
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
std::vector< int > m_hit_straw
std::vector< float > m_hit_y