16#include "GaudiKernel/ITHistSvc.h"
66 declareInterface<IValidationNtupleTool>(
this);
89 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
106 return StatusCode::SUCCESS;
120 return StatusCode::SUCCESS;
124 if (!
tree)
return StatusCode::FAILURE;
131 tree->Branch(
"TrackID", &
m_TrackID,
"ID_of_track_in_event/b");
167 return StatusCode::SUCCESS;
174 ATH_MSG_ERROR(
"writeTrackParticleData(...) can only be used, if property BookNewNtuple is set to true" );
175 return StatusCode::FAILURE;
182 if (
sc.isFailure())
return sc;
196 if (!evt.isValid()) {
200 return StatusCode::FAILURE;
226 return StatusCode::SUCCESS;
244 return StatusCode::FAILURE;
255 if (perigee->covariance()) {
268 return StatusCode::SUCCESS;
283 return StatusCode::FAILURE;
300 std::bitset<Trk::numberOfDetectorTypes> hitPattern;
308 return StatusCode::SUCCESS;
313 ATH_MSG_WARNING(
"Something is wrong - track has no fit quality data !!");
316 return StatusCode::FAILURE;
321 return StatusCode::FAILURE;
326 return StatusCode::SUCCESS;
330 if (!
tree)
return StatusCode::FAILURE;
334 return StatusCode::SUCCESS;
355 const unsigned int ) {
return StatusCode::SUCCESS;}
362 const unsigned int ) {
return StatusCode::SUCCESS;}
368 const int ) {
return StatusCode::SUCCESS;}
389 const int) {
return StatusCode::SUCCESS;}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
MC particle associated with a reco track + the quality of match.
unsigned char m_numberOfPixelDeadSensors
number of dead pixel sensors crossed
unsigned char m_numberOfPixelHoles
number of pixel layers on track with absence of hits
float m_errortheta0
error on angle theta at perigee UNIT:rad
virtual StatusCode fillTrackParticleData(const Trk::TrackParticleBase &)
fill ntuple data of a given track particle without writing the record.
float m_errorqoverp
error on curvature q/p UNIT:1/MeV
virtual StatusCode writeTrackData(const Trk::Track &, const int iterationIndex, const unsigned int fitStatCode)
fill AND write ntuple data of a given track
virtual StatusCode fillMeasurementData(const Trk::MeasurementBase *, const Trk::TrackParameters *)
fill ntuple data of given measurement and track parameters without writing the record
virtual StatusCode fillTrackParameter(const Trk::TrackParameters *, const int iterationIndex)
fill ntuple data of a given track without writing the record.
StatusCode fillTrkParticlePerigee(const Trk::Perigee *perigee)
fill the perigee in ntuple
~BasicValTrkParticleNtupleTool()
BasicValTrkParticleNtupleTool(const std::string &, const std::string &, const IInterface *)
unsigned char m_numberOfTRTHits
number of TRT hits
unsigned char m_numberOfSCTDeadSensors
number of dead SCT sensors crossed
unsigned char m_numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold
unsigned char m_numberOfContribPixelLayers
number of contributing layers of the pixel detector
float m_errord0
error on local d0 at perigee UNIT:mm
bool m_bookNewNtuple
jobOption: book new ntuple?
StatusCode fillFitQualityData(const Trk::FitQuality *fitQuality)
virtual StatusCode fillOutlierData(const Trk::MeasurementBase *, const Trk::TrackParameters *, const Trk::FitQualityOnSurface *)
fill ntuple data of an outlier measurement (without writing the record yet).
float m_errorz0
error on local z0 at perigee UNIT:mm
virtual StatusCode writeTrackParticleData(const Trk::TrackParticleBase &)
fill AND write ntuple data of a given track particle
unsigned char m_numberOfTRTDeadStraws
number of dead TRT straws crossed
unsigned char m_numberOfPixelHits
number of measurements in the Pixels
unsigned char m_numberOfSCTHits
number of measurements in the SCT
float m_Rec_phi0
reconstructed track params: angle phi at perigee UNIT:rad
static const float s_errorEntry
error entry costant
unsigned char m_TrackID
number of the track within the current event
std::string m_ntupleDirName
jobOption: Ntuple directory name
unsigned char m_numberOfSCTHoles
number of SCT holes
TTree * m_nt
Pointer to the NTuple tree.
std::string m_ntupleTreeName
jobOption: Ntuple tree name
unsigned int m_lastEventNumber
help variable to link with event property tree
int m_TrackIDcounter
help variable to link with event property tree
float m_errorphi0
error on angle phi at perigee UNIT:rad
SG::ReadHandleKey< xAOD::EventInfo > m_evt
float m_Rec_qOverP
reconstructed track params: curvature q/p UNIT:1/MeV
virtual StatusCode fillTrackTruthData(const TrackParameters *&, const TrackTruth &, const int truthIndex=-1)
fill ntuple data of holes on track without writing the record
virtual StatusCode writeRecord(TTree *tree)
write the filled data into the ntuple
float m_Rec_z0
reconstructed track params: local z0 at perigee UNIT:mm
float m_chi2
chi sqared of the track fit normalized to DOF
virtual StatusCode addNtupleItems(TTree *tree)
add branches to the tree Should be called once (per track collection and tree) dunring the initialisa...
float m_Rec_d0
reconstructed track params: local d0 at perigee UNIT:mm
StatusCode fillTrkParticleSummary(const Trk::TrackSummary *summary)
fill the perigee in ntuple
std::string m_ntupleFileName
jobOption: Ntuple file name
int m_runNumber
run number the track belongs to
int m_eventNumber
event number the track belongs to
StatusCode finalize()
finalize
virtual StatusCode fillTrackData(const Trk::Track &, const int iterationIndex, const unsigned int fitStatCode)
fill ntuple data of a given track without writing the record.
virtual StatusCode fillHoleData(const Trk::TrackStateOnSurface &)
fill ntuple data of holes on track without writing the record
float m_Rec_eta
reconstructed track params: pseudorapidity UNIT:1
unsigned char m_numberOfTRTHoles
number of TRT holes
unsigned long m_idHitPattern
bit word carrying information about hit layers
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
double chiSquared() const
returns the of the overall track fit
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
This class is the pure abstract base class for all fittable tracking measurements.
double eta() const
Access method for pseudorapidity - from momentum.
represents the track state (measurement, material, fit parameters and quality) at a surface.
A summary of the information contained by a track.
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 ...
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
ParametersBase< TrackParametersDim, Charged > TrackParameters
DetectorType
enumerates the various detector types currently accessible from the isHit() method.
@ numberOfTRTHoles
number of TRT hits which pass the high threshold (only xenon counted) total number of TRT hits which ...
@ numberOfContribPixelLayers
number of contributing layers of the pixel detector
@ numberOfSCTHits
number of SCT holes
@ numberOfPixelHits
number of pixel layers on track with absence of hits
@ numberOfTRTDeadStraws
number of TRT tube hits
@ numberOfTRTHits
number of TRT outliers
@ numberOfTRTHighThresholdHits
total number of TRT hits which pass the high threshold
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
@ numberOfSCTDeadSensors
number of TRT hits
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
@ numberOfPixelDeadSensors
number of pixel hits with broad errors (width/sqrt(12))