Belle II Software development
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 <framework/geometry/B2Vector3.h>
14#include <TMatrixDSym.h>
15#include <string>
16
17// DataObjects
18#include <mdst/dataobjects/MCParticle.h>
19#include <analysis/dataobjects/Particle.h>
20
21namespace Belle2 {
33 class TagVertex : public RelationsObject {
34
35 public:
36
42 {
43 m_tagVertex(0) = 0; m_tagVertex(1) = 0; m_tagVertex(2) = 0;
45 m_deltaT = 0;
46 m_deltaTErr = 0;
47 m_mcDeltaTau = 0;
48 m_mcDeltaT = 0;
49 m_mcTagV(0) = 0; m_mcTagV(1) = 0; m_mcTagV(2) = 0;
50 m_mcPDG = 0;
53 m_FitType = 0;
54 m_NTracks = -1;
55 m_tagVl = 0;
56 m_tagVlErr = 0;
57 m_tagVol = 0;
58 m_tagVolErr = 0;
59 m_truthTagVl = 0;
60 m_truthTagVol = 0;
61 m_tagVNDF = 0;
62 m_tagVChi2 = 0;
63 m_tagVChi2IP = 0;
64 m_NFitTracks = 0;
69 }
70
71 // get methods
72
77
81 TMatrixDSym getTagVertexErrMatrix() const;
82
86 float getTagVertexPval() const;
87
91 const Particle* getVtxFitParticle(unsigned int trackIndex) const;
92
96 const MCParticle* getVtxFitMCParticle(unsigned int trackIndex) const;
97
101 float getDeltaT() const;
102
106 float getDeltaTErr() const;
107
112
116 int getMCTagBFlavor() const;
117
121 float getMCDeltaTau() const;
122
126 float getMCDeltaT() const;
127
131 int getFitType() const;
132
137 std::string getConstraintType() const;
138
142 int getNTracks() const;
143
147 int getNFitTracks() const;
148
152 float getTagVl() const;
153
157 float getTruthTagVl() const;
158
162 float getTagVlErr() const;
163
167 float getTagVol() const;
168
172 float getTruthTagVol() const;
173
177 float getTagVolErr() const;
178
182 float getTagVNDF() const;
183
187 float getTagVChi2() const;
188
192 float getTagVChi2IP() const;
193
200
205 TMatrixDSym getConstraintCov() const;
206
211 ROOT::Math::XYZVector getVtxFitTrackP(unsigned int trackIndex) const;
212
217 double getVtxFitTrackZ0(unsigned int trackIndex) const;
218
223 double getVtxFitTrackD0(unsigned int trackIndex) const;
224
229 double getRaveWeight(unsigned int trackIndex) const;
230
234 int getFitTruthStatus() const;
235
239 int getRollBackStatus() const;
240
241 // set methods
242
246 void setTagVertex(const B2Vector3D& TagVertex);
247
251 void setTagVertexErrMatrix(const TMatrixDSym& TagVertexErrMatrix);
252
256 void setTagVertexPval(float TagVertexPval);
257
261 void setDeltaT(float DeltaT);
262
266 void setDeltaTErr(float DeltaTErr);
267
271 void setMCTagVertex(const B2Vector3D& mcTagVertex);
272
276 void setMCTagBFlavor(int mcTagBFlavor);
277
281 void setMCDeltaTau(float mcDeltaTau);
282
286 void setMCDeltaT(float mcDeltaT);
287
291 void setFitType(float FitType) ;
292
296 void setNTracks(int nTracks) ;
297
301 void setTagVl(float TagVl) ;
302
306 void setTruthTagVl(float TruthTagVl) ;
307
311 void setTagVlErr(float TagVlErr) ;
312
316 void setTagVol(float TagVol) ;
317
321 void setTruthTagVol(float TruthTagVol) ;
322
326 void setTagVolErr(float TagVolErr) ;
327
331 void setTagVNDF(float TagVNDF) ;
332
336 void setTagVChi2(float TagVChi2) ;
337
341 void setTagVChi2IP(float TagVChi2IP) ;
342
346 void setVertexFitParticles(const std::vector<const Particle*>& vtxFitParticles);
347
351 void setVertexFitMCParticles(const std::vector<const MCParticle*>& vtxFitMCParticles);
352
356 void setRaveWeights(const std::vector<double>& raveWeights);
357
362 void setConstraintCenter(const B2Vector3D& constraintCenter);
363
368 void setConstraintCov(const TMatrixDSym& constraintCov);
369
374 void setConstraintType(const std::string& constraintType);
375
379 void setFitTruthStatus(int truthStatus);
380
384 void setRollBackStatus(int backStatus);
385
386 private:
390 float m_deltaT;
398 float m_tagVl;
401 float m_tagVol;
404 float m_tagVNDF;
407 std::vector<const Particle*> m_vtxFitParticles;
408 std::vector<const MCParticle*> m_vtxFitMCParticles;
410 std::vector<double> m_raveWeights;
411 std::string m_constraintType;
413 TMatrixDSym m_constraintCov;
423
428 void resetConstraintCov();
429
439 };
440
442} // 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
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
TagVertex data object: contains Btag Vertex and DeltaT.
Definition: TagVertex.h:33
int m_fitTruthStatus
status of the fit when fitted with the truth info of the tracks
Definition: TagVertex.h:414
TMatrixDSym m_constraintCov
covariance matrix associated to the constraint, ie size of the constraint
Definition: TagVertex.h:413
std::string getConstraintType() const
get the constraint type used in the tag fit
Definition: TagVertex.cc:82
int m_NFitTracks
Number of tracks used by Rave to fit the vertex.
Definition: TagVertex.h:409
float getDeltaTErr() const
Returns DeltaTErr.
Definition: TagVertex.cc:52
TMatrixDSym getConstraintCov() const
Get the covariance matrix of the constraint for the tag fit.
Definition: TagVertex.cc:93
void resetConstraintCov()
Resets 3x3 constraint error matrix All elements are set to 0.0.
Definition: TagVertex.cc:326
void setConstraintType(const std::string &constraintType)
Set the type of the constraint for the tag fit.
Definition: TagVertex.cc:314
float getTruthTagVl() const
Returns the MC tagV component in the boost direction.
Definition: TagVertex.cc:113
int getMCTagBFlavor() const
Returns generated Btag PDG code.
Definition: TagVertex.cc:62
TagVertex()
Default constructor.
Definition: TagVertex.h:41
float getDeltaT() const
Returns DeltaT.
Definition: TagVertex.cc:47
float m_tagVertexPval
Btag vertex P value.
Definition: TagVertex.h:389
B2Vector3D getTagVertex() const
Returns BTag Vertex.
Definition: TagVertex.cc:18
void setTagVlErr(float TagVlErr)
Set the error of the tagV component in the boost direction.
Definition: TagVertex.cc:252
std::vector< double > m_raveWeights
weights of each track in the Rave tag vtx fit
Definition: TagVertex.h:410
float m_tagVlErr
Error of the tagV component in the boost direction
Definition: TagVertex.h:400
float getTagVolErr() const
Returns the error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:133
std::vector< const Particle * > m_vtxFitParticles
pointers to the tracks used by rave to fit the vertex
Definition: TagVertex.h:407
float getTagVl() const
Returns the tagV component in the boost direction.
Definition: TagVertex.cc:108
void setTruthTagVl(float TruthTagVl)
Set the MC tagV component in the boost direction.
Definition: TagVertex.cc:247
void setTagVertex(const B2Vector3D &TagVertex)
Set BTag Vertex.
Definition: TagVertex.cc:187
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:159
float getMCDeltaT() const
Returns mc DeltaT (in kin.
Definition: TagVertex.cc:72
float getTagVol() const
Returns the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:123
void setConstraintCenter(const B2Vector3D &constraintCenter)
Set the centre of the constraint for the tag fit.
Definition: TagVertex.cc:303
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:33
TMatrixDSym m_tagVertexErrMatrix
Btag vertex (3x3) error matrix.
Definition: TagVertex.h:388
int m_NTracks
Number of tracks used in the fit.
Definition: TagVertex.h:397
void setTruthTagVol(float TruthTagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:262
float m_mcDeltaT
generated Delta t approximated: true Delta L divided by Upsilon(4S)'s boost
Definition: TagVertex.h:395
void setMCTagBFlavor(int mcTagBFlavor)
Set generated Btag PDG code.
Definition: TagVertex.cc:217
float m_truthTagVl
MC tagV component in the boost direction
Definition: TagVertex.h:399
int getRollBackStatus() const
Get the status of the fit performed with the rolled back tracks.
Definition: TagVertex.cc:182
float m_tagVNDF
Number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.h:404
std::vector< const MCParticle * > m_vtxFitMCParticles
pointers to the MC p'cles corresponding to the tracks in the tag vtx fit
Definition: TagVertex.h:408
void setTagVolErr(float TagVolErr)
Set the error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:267
B2Vector3D m_constraintCenter
centre of the constraint
Definition: TagVertex.h:412
void setMCTagVertex(const B2Vector3D &mcTagVertex)
Set generated BTag Vertex.
Definition: TagVertex.cc:212
ROOT::Math::XYZVector getVtxFitTrackP(unsigned int trackIndex) const
Returns the momentum vector of the tag track indexed by trackindex.
Definition: TagVertex.cc:153
float m_tagVChi2
chi^2 value of the tag vertex fit result
Definition: TagVertex.h:405
int getNFitTracks() const
Returns number of tracks used in the fit (not counting the ones removed because they come from Kshort...
Definition: TagVertex.cc:103
B2Vector3D m_mcTagV
generated Btag vertex
Definition: TagVertex.h:392
void setTagVNDF(float TagVNDF)
Set the number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.cc:272
float getTagVlErr() const
Returns the error of the tagV component in the boost direction.
Definition: TagVertex.cc:118
int getFitTruthStatus() const
Get the status of the fit performed with the truth info of the tracks.
Definition: TagVertex.cc:177
void setDeltaTErr(float DeltaTErr)
Set DeltaTErr.
Definition: TagVertex.cc:207
float m_deltaT
Delta t.
Definition: TagVertex.h:390
float m_tagVolErr
Error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.h:403
void setNTracks(int nTracks)
Set number of tracks used in the fit.
Definition: TagVertex.cc:237
B2Vector3D m_tagVertex
Btag vertex.
Definition: TagVertex.h:387
void setTagVChi2(float TagVChi2)
Set the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:277
void setMCDeltaT(float mcDeltaT)
Set generated DeltaT (in kin.
Definition: TagVertex.cc:227
void setRollBackStatus(int backStatus)
Set the status of the fit performed with the rolled back tracks.
Definition: TagVertex.cc:338
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:293
float getMCDeltaTau() const
Returns generated DeltaTau.
Definition: TagVertex.cc:67
float getTruthTagVol() const
Returns the MC tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:128
void setTagVol(float TagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:257
void setDeltaT(float DeltaT)
Set DeltaT.
Definition: TagVertex.cc:202
int getFitType() const
Returns fit algo type.
Definition: TagVertex.cc:77
float getTagVNDF() const
Returns the number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.cc:138
std::string m_constraintType
Type of the constraint used for the tag vertex fit (noConstraint, IP, Boost, Tube)
Definition: TagVertex.h:411
float m_tagVl
tagV component in the boost direction
Definition: TagVertex.h:398
float m_mcDeltaTau
generated Delta t: difference between signal and tag flight times
Definition: TagVertex.h:394
void setRaveWeights(const std::vector< double > &raveWeights)
Set the weights used by Rave in the tag vtx fit.
Definition: TagVertex.cc:298
void setTagVertexPval(float TagVertexPval)
Set BTag Vertex P value.
Definition: TagVertex.cc:197
B2Vector3D getConstraintCenter() const
Returns the position of the constraint, ie centre of the constraint ellipse.
Definition: TagVertex.cc:87
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:40
TMatrixDSym getTagVertexErrMatrix() const
Returns BTag Vertex (3x3) error matrix.
Definition: TagVertex.cc:23
float m_deltaTErr
Delta t error.
Definition: TagVertex.h:391
void setMCDeltaTau(float mcDeltaTau)
Set generated DeltaT.
Definition: TagVertex.cc:222
float m_tagVChi2IP
IP component of chi^2 value of the tag vertex fit result.
Definition: TagVertex.h:406
void setTagVl(float TagVl)
Set the tagV component in the boost direction.
Definition: TagVertex.cc:242
void setTagVertexErrMatrix(const TMatrixDSym &TagVertexErrMatrix)
Set BTag Vertex (3x3) error matrix.
Definition: TagVertex.cc:192
B2Vector3D getMCTagVertex() const
Returns generated BTag Vertex.
Definition: TagVertex.cc:57
int m_mcPDG
generated tag side B flavor (PDG code)
Definition: TagVertex.h:393
float getTagVChi2() const
Returns the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:143
float getTagVChi2IP() const
Returns the IP component of the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:148
void resetTagVertexErrorMatrix()
Resets 3x3 tag vertex error matrix All elements are set to 0.0.
Definition: TagVertex.cc:319
float m_truthTagVol
MC tagV component in the direction orthogonal to the boost.
Definition: TagVertex.h:402
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:165
float m_tagVol
tagV component in the direction orthogonal to the boost
Definition: TagVertex.h:401
int m_rollbackStatus
status of the fit when fitted with rolled back tracks
Definition: TagVertex.h:415
void setConstraintCov(const TMatrixDSym &constraintCov)
Set the covariance matrix of the constraint for the tag fit.
Definition: TagVertex.cc:308
void setFitType(float FitType)
Set fit algo type.
Definition: TagVertex.cc:232
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:287
int getNTracks() const
Returns number of tracks used in the fit.
Definition: TagVertex.cc:98
int m_FitType
Fit algo used.
Definition: TagVertex.h:396
void setTagVChi2IP(float TagVChi2IP)
Set the IP component of the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:282
double getRaveWeight(unsigned int trackIndex) const
Returns the weight assigned by Rave to the track indexed by trackIndex.
Definition: TagVertex.cc:171
void setFitTruthStatus(int truthStatus)
Set the status of the fit performed with the truth info of the tracks.
Definition: TagVertex.cc:333
float getTagVertexPval() const
Returns BTag Vertex P value.
Definition: TagVertex.cc:28
Abstract base class for different kinds of events.