5#ifndef MUON_MUONINSIDEOUTVALIDATIONNTUPLE_H
6#define MUON_MUONINSIDEOUTVALIDATIONNTUPLE_H
28 typedef std::pair<std::reference_wrapper<std::vector<int>*>,std::string>
IntBlock;
29 typedef std::pair<std::reference_wrapper<std::vector<unsigned int>*>,std::string>
UnsignedIntBlock;
30 typedef std::pair<std::reference_wrapper<std::vector<float>*>,std::string>
FloatBlock;
31 typedef std::pair< MuonValidationBlockBase*, std::string >
SubBlock;
49 void init(
const std::string& prefix, TTree*,
bool write =
true);
65 void fill(
int sector_,
int chIndex_ ) {
sector->push_back(sector_);
chIndex->push_back(chIndex_); }
75 std::vector<int>*
pdg =
nullptr;
77 std::vector<float>*
beta =
nullptr;
79 void fill(
int pdg_,
int barcode_,
float beta_=1. ) {
pdg->push_back(pdg_);
barcode->push_back(barcode_);
beta->push_back(beta_); }
89 std::vector<int>*
trkid =
nullptr;
91 void fill(
int trkid_ ) {
trkid->push_back(trkid_); }
106 std::vector<int>*
type =
nullptr;
109 std::vector<float>*
r =
nullptr;
110 std::vector<float>*
z =
nullptr;
111 std::vector<float>*
d =
nullptr;
112 std::vector<float>*
time =
nullptr;
113 std::vector<float>*
err =
nullptr;
116 std::vector<float>*
tof =
nullptr;
117 std::vector<float>*
avTof =
nullptr;
120 void fill(
int type_,
unsigned int gasgapId_,
float r_,
float z_,
float time_,
float err_,
121 float timeProp_ = 0.,
float avTimeProp_ = 0.,
float tof_ = 0.,
float avTof_ = 0.,
float timeCor_ = 0.,
int stage_ = 0 ) {
122 type->push_back(type_);
gasgapId->push_back(gasgapId_);
r->push_back(r_);
z->push_back(z_);
d->push_back(sqrt(r_*r_+z_*z_));
time->push_back(time_);
124 avTof->push_back(avTof_);
timeCor->push_back(timeCor_);
stage->push_back(stage_);
145 float expos_err_ = cov ?
Amg::error(*cov,par) : 0;
146 fill(pos_,err_,expos_,expos_err_, cov!=
nullptr );
149 void fill(
float pos_,
float err_,
float expos_,
float expos_err_,
int status=1 ){
151 float res = pos_ - expos_;
152 float err2 = err_*err_ + expos_err_*expos_err_;
153 float pull_ =
res/sqrt(err2);
156 pull->push_back(pull_);
157 pos->push_back(pos_);
158 err->push_back(err_);
159 expos->push_back(expos_);
168 void fillResPull(
float res_,
float pull_,
float err_,
float expos_err_,
int status=1 ){
171 pull->push_back(pull_);
173 err->push_back(err_);
174 expos->push_back(0.);
180 std::vector<float>*
pull =
nullptr;
181 std::vector<float>*
pos =
nullptr;
182 std::vector<float>*
err =
nullptr;
183 std::vector<float>*
expos =
nullptr;
195 std::vector<float>*
pt =
nullptr;
196 std::vector<float>*
p =
nullptr;
197 std::vector<float>*
eta =
nullptr;
198 std::vector<float>*
phi =
nullptr;
214 std::vector<float>*
r =
nullptr;
215 std::vector<float>*
z =
nullptr;
216 std::vector<float>*
t0 =
nullptr;
258 std::vector<float>*
beta =
nullptr;
260 std::vector<int>*
nseg =
nullptr;
268 void fill(
int ntimes_,
float beta_,
float chi2ndof_,
int nseg_,
int nprec_,
int ntrigPhi_,
int ntrigEta_,
int stage_ ){
269 ntimes->push_back(ntimes_);
270 beta->push_back(beta_);
272 nseg->push_back(nseg_);
273 nprec->push_back(nprec_);
276 stage->push_back(stage_);
std::pair< std::vector< unsigned int >, bool > res
MuonValidationTrackParticleBlock trackParticleBlock
MuonValidationHoughBlock houghBlock
MuonValidationTimeBlock timeBlock
MuonValidationSegmentBlock segmentBlock
MuonValidationCandidateBlock candidateBlock
MuonInsideOutValidationNtuple()
MuonValidationHitBlock hitBlock
This class is the pure abstract base class for all fittable tracking measurements.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
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 ...
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
ParamDefs
This file defines the parameter enums in the Trk namespace.
base class for ntuple block The class can handle float and integer block and supports sub blocks.
std::vector< SubBlock > subBlocks
std::vector< IntBlock > intBlocks
void init(const std::string &prefix, TTree *, bool write=true)
std::vector< FloatBlock > floatBlocks
std::pair< std::reference_wrapper< std::vector< unsigned int > * >, std::string > UnsignedIntBlock
std::pair< std::reference_wrapper< std::vector< float > * >, std::string > FloatBlock
virtual ~MuonValidationBlockBase()
std::pair< MuonValidationBlockBase *, std::string > SubBlock
void addBlock(std::vector< int > *&block, std::string name)
std::vector< UnsignedIntBlock > unsignedIntBlocks
void addBlock(std::vector< float > *&block, std::string name)
void addBlock(std::vector< unsigned int > *&block, std::string name)
std::pair< std::reference_wrapper< std::vector< int > * >, std::string > IntBlock
void addBlock(MuonValidationBlockBase *block, std::string name)
std::vector< int > * ntimes
std::vector< int > * nprec
std::vector< float > * beta
std::vector< int > * ntrigEta
std::vector< int > * nseg
void fill(int ntimes_, float beta_, float chi2ndof_, int nseg_, int nprec_, int ntrigPhi_, int ntrigEta_, int stage_)
std::vector< int > * ntrigPhi
MuonValidationTrackBlock track
MuonValidationCandidateBlock()
std::vector< int > * stage
std::vector< float > * chi2ndof
MuonValidationResidualBlock residuals
MuonValidationTrackBlock track
MuonValidationTruthBlock truth
Block with hough maxima information.
MuonValidationHoughBlock()
std::vector< float > * maximum
MuonValidationTruthBlock truth
MuonValidationTrackBlock track
MuonValidationResidualBlock residuals
Block with identifier information.
std::vector< int > * sector
std::vector< int > * chIndex
void fill(int sector_, int chIndex_)
Block with residual and pull information.
void fill(const Trk::MeasurementBase &hit, const MuonSystemExtension::Intersection &intersection, Trk::ParamDefs par)
void fill(float pos_, float err_, const MuonSystemExtension::Intersection &intersection, Trk::ParamDefs par)
MuonValidationResidualBlock()
void fillResPull(float res_, float pull_, float err_, float expos_err_, int status=1)
void fill(float pos_, float err_, float expos_, float expos_err_, int status=1)
std::vector< float > * pos
std::vector< int > * expos_errstatus
void fillResPull(float res_, float pull_, int status=1)
std::vector< float > * residual
std::vector< float > * expos
std::vector< float > * expos_err
std::vector< float > * err
std::vector< float > * pull
Block with segment information.
std::vector< float > * t0
std::vector< int > * quality
MuonValidationSegmentBlock()
MuonValidationTruthBlock truth
MuonValidationTrackBlock track
std::vector< float > * t0Error
MuonValidationResidualBlock xresiduals
MuonValidationResidualBlock combinedYZ
std::vector< int > * stage
std::vector< float > * t0TrigError
MuonValidationResidualBlock angleYZ
std::vector< int > * ntrigPhiHits
std::vector< float > * t0Trig
std::vector< int > * nmdtHits
MuonValidationResidualBlock angleXZ
MuonValidationResidualBlock yresiduals
std::vector< int > * ntrigEtaHits
Block with timing information.
std::vector< float > * time
std::vector< unsigned int > * gasgapId
std::vector< int > * stage
MuonValidationTrackBlock track
std::vector< float > * timeProp
std::vector< float > * avTimeProp
std::vector< float > * tof
MuonValidationTruthBlock truth
std::vector< int > * type
MuonValidationTimeBlock()
std::vector< float > * timeCor
void fill(int type_, unsigned int gasgapId_, float r_, float z_, float time_, float err_, float timeProp_=0., float avTimeProp_=0., float tof_=0., float avTof_=0., float timeCor_=0., int stage_=0)
std::vector< float > * avTof
std::vector< float > * err
Block with the track index.
MuonValidationTrackBlock()
std::vector< int > * trkid
Block with information on the incoming track particle.
std::vector< float > * phi
std::vector< float > * eta
std::vector< float > * pt
MuonValidationTrackParticleBlock()
MuonValidationTruthBlock truth
Block with truth information.
std::vector< int > * barcode
void fill(int pdg_, int barcode_, float beta_=1.)
std::vector< float > * beta
MuonValidationTruthBlock()