Belle II Software light-2607-kasei
TagVertex.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/datastore/RelationsObject.h>
12
13#include <Math/Vector3D.h>
14#include <TMatrixDSym.h>
15#include <string>
16
17namespace Belle2 {
22 class MCParticle;
23 class Particle;
24
28
29 class TagVertex : public RelationsObject {
30
31 public:
32
38 : m_tagVertex(ROOT::Math::XYZVector(0, 0, 0))
39 {
41 m_deltaT = 0;
42 m_deltaTErr = 0;
43 m_mcDeltaTau = 0;
44 m_mcDeltaT = 0;
45 m_mcPDG = 0;
48 m_FitType = 0;
49 m_NTracks = -1;
50 m_tagVl = 0;
51 m_tagVlErr = 0;
52 m_tagVol = 0;
53 m_tagVolErr = 0;
54 m_truthTagVl = 0;
55 m_truthTagVol = 0;
56 m_tagVNDF = 0;
57 m_tagVChi2 = 0;
58 m_tagVChi2IP = 0;
59 m_NFitTracks = 0;
61 m_constraintCenter = ROOT::Math::XYZVector(0, 0, 0);
64 }
65
66 // get methods
67
71 ROOT::Math::XYZVector getTagVertex() const;
72
76 TMatrixDSym getTagVertexErrMatrix() const;
77
81 float getTagVertexPval() const;
82
86 const Particle* getVtxFitParticle(unsigned int trackIndex) const;
87
91 const MCParticle* getVtxFitMCParticle(unsigned int trackIndex) const;
92
96 float getDeltaT() const;
97
101 float getDeltaTErr() const;
102
106 ROOT::Math::XYZVector getMCTagVertex() const;
107
111 int getMCTagBFlavor() const;
112
116 float getMCDeltaTau() const;
117
121 float getMCDeltaT() const;
122
126 int getFitType() const;
127
131 const std::string& getConstraintType() const;
132
136 int getNTracks() const;
137
141 int getNFitTracks() const;
142
146 float getTagVl() const;
147
151 float getTruthTagVl() const;
152
156 float getTagVlErr() const;
157
161 float getTagVol() const;
162
166 float getTruthTagVol() const;
167
171 float getTagVolErr() const;
172
176 float getTagVNDF() const;
177
181 float getTagVChi2() const;
182
186 float getTagVChi2IP() const;
187
192
193 ROOT::Math::XYZVector getConstraintCenter() const;
194
198
199 TMatrixDSym getConstraintCov() const;
200
204
205 ROOT::Math::XYZVector getVtxFitTrackP(unsigned int trackIndex) const;
206
210
211 double getVtxFitTrackZ0(unsigned int trackIndex) const;
212
216
217 double getVtxFitTrackD0(unsigned int trackIndex) const;
218
222
223 double getRaveWeight(unsigned int trackIndex) const;
224
228 int getFitTruthStatus() const;
229
233 int getRollBackStatus() const;
234
235 // set methods
236
240 void setTagVertex(const ROOT::Math::XYZVector& TagVertex);
241
245 void setTagVertexErrMatrix(const TMatrixDSym& TagVertexErrMatrix);
246
250 void setTagVertexPval(float TagVertexPval);
251
255 void setDeltaT(float DeltaT);
256
260 void setDeltaTErr(float DeltaTErr);
261
265 void setMCTagVertex(const ROOT::Math::XYZVector& mcTagVertex);
266
270 void setMCTagBFlavor(int mcTagBFlavor);
271
275 void setMCDeltaTau(float mcDeltaTau);
276
280 void setMCDeltaT(float mcDeltaT);
281
285 void setFitType(float FitType) ;
286
290 void setNTracks(int nTracks) ;
291
295 void setTagVl(float TagVl) ;
296
300 void setTruthTagVl(float TruthTagVl) ;
301
305 void setTagVlErr(float TagVlErr) ;
306
310 void setTagVol(float TagVol) ;
311
315 void setTruthTagVol(float TruthTagVol) ;
316
320 void setTagVolErr(float TagVolErr) ;
321
325 void setTagVNDF(float TagVNDF) ;
326
330 void setTagVChi2(float TagVChi2) ;
331
335 void setTagVChi2IP(float TagVChi2IP) ;
336
340 void setVertexFitParticles(const std::vector<const Particle*>& vtxFitParticles);
341
345 void setVertexFitMCParticles(const std::vector<const MCParticle*>& vtxFitMCParticles);
346
350 void setRaveWeights(const std::vector<double>& raveWeights);
351
355
356 void setConstraintCenter(const ROOT::Math::XYZVector& constraintCenter);
357
361
362 void setConstraintCov(const TMatrixDSym& constraintCov);
363
367
368 void setConstraintType(const std::string& constraintType);
369
373 void setFitTruthStatus(int truthStatus);
374
378 void setRollBackStatus(int backStatus);
379
380 private:
381 ROOT::Math::XYZVector m_tagVertex;
384 float m_deltaT;
386 ROOT::Math::XYZVector m_mcTagV;
392 float m_tagVl;
395 float m_tagVol;
398 float m_tagVNDF;
401 std::vector<const Particle*> m_vtxFitParticles;
402 std::vector<const MCParticle*> m_vtxFitMCParticles;
404 std::vector<double> m_raveWeights;
405 std::string m_constraintType;
406 ROOT::Math::XYZVector m_constraintCenter;
407 TMatrixDSym m_constraintCov;
410
411
417
422 void resetConstraintCov();
423
433
434 };
435
437} // end namespace Belle2
A Class to store the Monte Carlo particle information.
Definition MCParticle.h:32
Class to store reconstructed particles.
Definition Particle.h:76
TagVertex data object: contains Btag Vertex and DeltaT.
Definition TagVertex.h:29
int m_fitTruthStatus
status of the fit when fitted with the truth info of the tracks
Definition TagVertex.h:408
TMatrixDSym m_constraintCov
covariance matrix associated to the constraint, ie size of the constraint
Definition TagVertex.h:407
int m_NFitTracks
Number of tracks used by Rave to fit the vertex.
Definition TagVertex.h:403
float getDeltaTErr() const
Returns DeltaTErr.
Definition TagVertex.cc:54
TMatrixDSym getConstraintCov() const
Get the covariance matrix of the constraint for the tag fit.
Definition TagVertex.cc:95
void resetConstraintCov()
Resets 3x3 constraint error matrix All elements are set to 0.0.
Definition TagVertex.cc:328
void setConstraintType(const std::string &constraintType)
Set the type of the constraint for the tag fit.
Definition TagVertex.cc:316
float getTruthTagVl() const
Returns the MC tagV component in the boost direction.
Definition TagVertex.cc:115
int getMCTagBFlavor() const
Returns generated Btag PDG code.
Definition TagVertex.cc:64
TagVertex()
Default constructor.
Definition TagVertex.h:37
float getDeltaT() const
Returns DeltaT.
Definition TagVertex.cc:49
float m_tagVertexPval
Btag vertex P value.
Definition TagVertex.h:383
void setTagVlErr(float TagVlErr)
Set the error of the tagV component in the boost direction.
Definition TagVertex.cc:254
std::vector< double > m_raveWeights
weights of each track in the Rave tag vtx fit
Definition TagVertex.h:404
ROOT::Math::XYZVector getTagVertex() const
Returns BTag Vertex.
Definition TagVertex.cc:20
float m_tagVlErr
Error of the tagV component in the boost direction.
Definition TagVertex.h:394
float getTagVolErr() const
Returns the error of the tagV component in the direction orthogonal to the boost.
Definition TagVertex.cc:135
std::vector< const Particle * > m_vtxFitParticles
pointers to the tracks used by rave to fit the vertex
Definition TagVertex.h:401
float getTagVl() const
Returns the tagV component in the boost direction.
Definition TagVertex.cc:110
void setTruthTagVl(float TruthTagVl)
Set the MC tagV component in the boost direction.
Definition TagVertex.cc:249
double getVtxFitTrackZ0(unsigned int trackIndex) const
Returns the longitudinal distance from the IP to the POCA of the tag track indexed by trackIndex.
Definition TagVertex.cc:161
float getMCDeltaT() const
Returns mc DeltaT (in kin.
Definition TagVertex.cc:74
float getTagVol() const
Returns the tagV component in the direction orthogonal to the boost.
Definition TagVertex.cc:125
const Particle * getVtxFitParticle(unsigned int trackIndex) const
Returns a ptr to the particle constructed from the tag vtx track indexed by trackIndex.
Definition TagVertex.cc:35
TMatrixDSym m_tagVertexErrMatrix
Btag vertex (3x3) error matrix.
Definition TagVertex.h:382
const std::string & getConstraintType() const
get the constraint type used in the tag fit
Definition TagVertex.cc:84
int m_NTracks
Number of tracks used in the fit.
Definition TagVertex.h:391
void setTruthTagVol(float TruthTagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition TagVertex.cc:264
float m_mcDeltaT
generated Delta t approximated: true Delta L divided by Upsilon(4S)'s boost
Definition TagVertex.h:389
void setMCTagBFlavor(int mcTagBFlavor)
Set generated Btag PDG code.
Definition TagVertex.cc:219
float m_truthTagVl
MC tagV component in the boost direction.
Definition TagVertex.h:393
int getRollBackStatus() const
Get the status of the fit performed with the rolled back tracks.
Definition TagVertex.cc:184
ROOT::Math::XYZVector m_constraintCenter
centre of the constraint
Definition TagVertex.h:406
float m_tagVNDF
Number of degrees of freedom in the tag vertex fit.
Definition TagVertex.h:398
std::vector< const MCParticle * > m_vtxFitMCParticles
pointers to the MC p'cles corresponding to the tracks in the tag vtx fit
Definition TagVertex.h:402
void setTagVolErr(float TagVolErr)
Set the error of the tagV component in the direction orthogonal to the boost.
Definition TagVertex.cc:269
ROOT::Math::XYZVector getVtxFitTrackP(unsigned int trackIndex) const
Returns the momentum vector of the tag track indexed by trackindex.
Definition TagVertex.cc:155
float m_tagVChi2
chi^2 value of the tag vertex fit result
Definition TagVertex.h:399
int getNFitTracks() const
Returns number of tracks used in the fit (not counting the ones removed because they come from Kshort...
Definition TagVertex.cc:105
void setTagVNDF(float TagVNDF)
Set the number of degrees of freedom in the tag vertex fit.
Definition TagVertex.cc:274
float getTagVlErr() const
Returns the error of the tagV component in the boost direction.
Definition TagVertex.cc:120
int getFitTruthStatus() const
Get the status of the fit performed with the truth info of the tracks.
Definition TagVertex.cc:179
void setDeltaTErr(float DeltaTErr)
Set DeltaTErr.
Definition TagVertex.cc:209
float m_deltaT
Delta t.
Definition TagVertex.h:384
ROOT::Math::XYZVector getMCTagVertex() const
Returns generated BTag Vertex.
Definition TagVertex.cc:59
float m_tagVolErr
Error of the tagV component in the direction orthogonal to the boost.
Definition TagVertex.h:397
void setConstraintCenter(const ROOT::Math::XYZVector &constraintCenter)
Set the centre of the constraint for the tag fit.
Definition TagVertex.cc:305
void setNTracks(int nTracks)
Set number of tracks used in the fit.
Definition TagVertex.cc:239
void setTagVChi2(float TagVChi2)
Set the chi^2 value of the tag vertex fit result.
Definition TagVertex.cc:279
void setMCDeltaT(float mcDeltaT)
Set generated DeltaT (in kin.
Definition TagVertex.cc:229
ROOT::Math::XYZVector getConstraintCenter() const
Returns the position of the constraint, ie centre of the constraint ellipse.
Definition TagVertex.cc:89
void setRollBackStatus(int backStatus)
Set the status of the fit performed with the rolled back tracks.
Definition TagVertex.cc:340
void setVertexFitMCParticles(const std::vector< const MCParticle * > &vtxFitMCParticles)
Set a vector of pointers to the MC p'cles corresponding to the tracks in the tag vtx fit.
Definition TagVertex.cc:295
float getMCDeltaTau() const
Returns generated DeltaTau.
Definition TagVertex.cc:69
float getTruthTagVol() const
Returns the MC tagV component in the direction orthogonal to the boost.
Definition TagVertex.cc:130
void setTagVol(float TagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition TagVertex.cc:259
void setDeltaT(float DeltaT)
Set DeltaT.
Definition TagVertex.cc:204
int getFitType() const
Returns fit algo type.
Definition TagVertex.cc:79
float getTagVNDF() const
Returns the number of degrees of freedom in the tag vertex fit.
Definition TagVertex.cc:140
std::string m_constraintType
Type of the constraint used for the tag vertex fit (noConstraint, IP, Boost, Tube)
Definition TagVertex.h:405
float m_tagVl
tagV component in the boost direction
Definition TagVertex.h:392
float m_mcDeltaTau
generated Delta t: difference between signal and tag flight times
Definition TagVertex.h:388
void setRaveWeights(const std::vector< double > &raveWeights)
Set the weights used by Rave in the tag vtx fit.
Definition TagVertex.cc:300
void setTagVertexPval(float TagVertexPval)
Set BTag Vertex P value.
Definition TagVertex.cc:199
const MCParticle * getVtxFitMCParticle(unsigned int trackIndex) const
Returns a ptr to the MC particle matched to the tag vtx track indexed by trackIndex.
Definition TagVertex.cc:42
TMatrixDSym getTagVertexErrMatrix() const
Returns BTag Vertex (3x3) error matrix.
Definition TagVertex.cc:25
void setTagVertex(const ROOT::Math::XYZVector &TagVertex)
Set BTag Vertex.
Definition TagVertex.cc:189
float m_deltaTErr
Delta t error.
Definition TagVertex.h:385
void setMCDeltaTau(float mcDeltaTau)
Set generated DeltaT.
Definition TagVertex.cc:224
float m_tagVChi2IP
IP component of chi^2 value of the tag vertex fit result.
Definition TagVertex.h:400
void setTagVl(float TagVl)
Set the tagV component in the boost direction.
Definition TagVertex.cc:244
void setTagVertexErrMatrix(const TMatrixDSym &TagVertexErrMatrix)
Set BTag Vertex (3x3) error matrix.
Definition TagVertex.cc:194
int m_mcPDG
generated tag side B flavor (PDG code)
Definition TagVertex.h:387
float getTagVChi2() const
Returns the chi^2 value of the tag vertex fit result.
Definition TagVertex.cc:145
float getTagVChi2IP() const
Returns the IP component of the chi^2 value of the tag vertex fit result.
Definition TagVertex.cc:150
void resetTagVertexErrorMatrix()
Resets 3x3 tag vertex error matrix All elements are set to 0.0.
Definition TagVertex.cc:321
float m_truthTagVol
MC tagV component in the direction orthogonal to the boost.
Definition TagVertex.h:396
double getVtxFitTrackD0(unsigned int trackIndex) const
Returns the radial distance from the IP to the POCA of the tag track indexed by trackIndex.
Definition TagVertex.cc:167
ROOT::Math::XYZVector m_mcTagV
generated Btag vertex
Definition TagVertex.h:386
float m_tagVol
tagV component in the direction orthogonal to the boost
Definition TagVertex.h:395
ROOT::Math::XYZVector m_tagVertex
Btag vertex.
Definition TagVertex.h:381
int m_rollbackStatus
status of the fit when fitted with rolled back tracks
Definition TagVertex.h:409
void setConstraintCov(const TMatrixDSym &constraintCov)
Set the covariance matrix of the constraint for the tag fit.
Definition TagVertex.cc:310
void setFitType(float FitType)
Set fit algo type.
Definition TagVertex.cc:234
void setVertexFitParticles(const std::vector< const Particle * > &vtxFitParticles)
Set a vector of pointers to the tracks used in the tag vtx fit.
Definition TagVertex.cc:289
void setMCTagVertex(const ROOT::Math::XYZVector &mcTagVertex)
Set generated BTag Vertex.
Definition TagVertex.cc:214
int getNTracks() const
Returns number of tracks used in the fit.
Definition TagVertex.cc:100
int m_FitType
Fit algo used.
Definition TagVertex.h:390
void setTagVChi2IP(float TagVChi2IP)
Set the IP component of the chi^2 value of the tag vertex fit result.
Definition TagVertex.cc:284
double getRaveWeight(unsigned int trackIndex) const
Returns the weight assigned by Rave to the track indexed by trackIndex.
Definition TagVertex.cc:173
void setFitTruthStatus(int truthStatus)
Set the status of the fit performed with the truth info of the tracks.
Definition TagVertex.cc:335
float getTagVertexPval() const
Returns BTag Vertex P value.
Definition TagVertex.cc:30
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Abstract base class for different kinds of events.