Belle II Software  release-06-02-00
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 <TVector3.h>
14 #include <TMatrixDSym.h>
15 #include <string>
16 
17 // DataObjects
18 #include <mdst/dataobjects/TrackFitResult.h>
19 #include <mdst/dataobjects/MCParticle.h>
20 #include <analysis/dataobjects/Particle.h>
21 
22 namespace Belle2 {
34  class TagVertex : public RelationsObject {
35 
36  public:
37 
43  {
44  m_tagVertex(0) = 0; m_tagVertex(1) = 0; m_tagVertex(2) = 0;
45  m_tagVertexPval = 0;
46  m_deltaT = 0;
47  m_deltaTErr = 0;
48  m_mcDeltaTau = 0;
49  m_mcDeltaT = 0;
50  m_mcTagV(0) = 0; m_mcTagV(1) = 0; m_mcTagV(2) = 0;
51  m_mcPDG = 0;
54  m_FitType = 0;
55  m_NTracks = -1;
56  m_tagVl = 0;
57  m_tagVlErr = 0;
58  m_tagVol = 0;
59  m_tagVolErr = 0;
60  m_truthTagVl = 0;
61  m_truthTagVol = 0;
62  m_tagVNDF = 0;
63  m_tagVChi2 = 0;
64  m_tagVChi2IP = 0;
65  m_NFitTracks = 0;
66  m_constraintType = "";
68  m_fitTruthStatus = 0;
69  m_rollbackStatus = 0;
70  }
71 
72  // get methods
73 
77  TVector3 getTagVertex() const;
78 
82  TMatrixDSym getTagVertexErrMatrix() const;
83 
87  float getTagVertexPval() const;
88 
92  const Particle* getVtxFitParticle(unsigned int trackIndex) const;
93 
97  const MCParticle* getVtxFitMCParticle(unsigned int trackIndex) const;
98 
102  float getDeltaT() const;
103 
107  float getDeltaTErr() const;
108 
112  TVector3 getMCTagVertex() const;
113 
117  int getMCTagBFlavor() const;
118 
122  float getMCDeltaTau() const;
123 
127  float getMCDeltaT() const;
128 
132  int getFitType() const;
133 
138  std::string getConstraintType() const;
139 
143  int getNTracks() const;
144 
148  int getNFitTracks() const;
149 
153  float getTagVl() const;
154 
158  float getTruthTagVl() const;
159 
163  float getTagVlErr() const;
164 
168  float getTagVol() const;
169 
173  float getTruthTagVol() const;
174 
178  float getTagVolErr() const;
179 
183  float getTagVNDF() const;
184 
188  float getTagVChi2() const;
189 
193  float getTagVChi2IP() const;
194 
200  TVector3 getConstraintCenter() const;
201 
206  TMatrixDSym getConstraintCov() const;
207 
212  TVector3 getVtxFitTrackPosition(unsigned int trackIndex) const;
213 
218  TVector3 getVtxFitTrackP(unsigned int trackIndex) const;
219 
223  double getVtxFitTrackPComponent(unsigned int trackIndex, unsigned int component) const;
224 
229  double getVtxFitTrackZ0(unsigned int trackIndex) const;
230 
235  double getVtxFitTrackD0(unsigned int trackIndex) const;
236 
241  double getRaveWeight(unsigned int trackIndex) const;
242 
246  int getFitTruthStatus() const;
247 
251  int getRollBackStatus() const;
252 
253  // set methods
254 
258  void setTagVertex(const TVector3& TagVertex);
259 
263  void setTagVertexErrMatrix(const TMatrixDSym& TagVertexErrMatrix);
264 
268  void setTagVertexPval(float TagVertexPval);
269 
273  void setDeltaT(float DeltaT);
274 
278  void setDeltaTErr(float DeltaTErr);
279 
283  void setMCTagVertex(const TVector3& mcTagVertex);
284 
288  void setMCTagBFlavor(int mcTagBFlavor);
289 
293  void setMCDeltaTau(float mcDeltaTau);
294 
298  void setMCDeltaT(float mcDeltaT);
299 
303  void setFitType(float FitType) ;
304 
308  void setNTracks(int nTracks) ;
309 
313  void setTagVl(float TagVl) ;
314 
318  void setTruthTagVl(float TruthTagVl) ;
319 
323  void setTagVlErr(float TagVlErr) ;
324 
328  void setTagVol(float TagVol) ;
329 
333  void setTruthTagVol(float TruthTagVol) ;
334 
338  void setTagVolErr(float TagVolErr) ;
339 
343  void setTagVNDF(float TagVNDF) ;
344 
348  void setTagVChi2(float TagVChi2) ;
349 
353  void setTagVChi2IP(float TagVChi2IP) ;
354 
358  void setVertexFitParticles(const std::vector<const Particle*>& vtxFitParticles);
359 
363  void setVertexFitMCParticles(const std::vector<const MCParticle*>& vtxFitMCParticles);
364 
368  void setRaveWeights(const std::vector<double>& raveWeights);
369 
374  void setConstraintCenter(const TVector3& constraintCenter);
375 
380  void setConstraintCov(const TMatrixDSym& constraintCov);
381 
386  void setConstraintType(const std::string& constraintType);
387 
391  void setFitTruthStatus(int truthStatus);
392 
396  void setRollBackStatus(int backStatus);
397 
398  private:
399  TVector3 m_tagVertex;
400  TMatrixDSym m_tagVertexErrMatrix;
402  float m_deltaT;
403  float m_deltaTErr;
404  TVector3 m_mcTagV;
405  int m_mcPDG;
406  float m_mcDeltaTau;
407  float m_mcDeltaT;
408  int m_FitType;
409  int m_NTracks;
410  float m_tagVl;
411  float m_truthTagVl;
412  float m_tagVlErr;
413  float m_tagVol;
415  float m_tagVolErr;
416  float m_tagVNDF;
417  float m_tagVChi2;
418  float m_tagVChi2IP;
419  std::vector<const Particle*> m_vtxFitParticles;
420  std::vector<const MCParticle*> m_vtxFitMCParticles;
422  std::vector<double> m_raveWeights;
423  std::string m_constraintType;
425  TMatrixDSym m_constraintCov;
435 
440  void resetConstraintCov();
441 
442  ClassDef(TagVertex, 5)
450  };
451 
453 } // end namespace Belle2
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:32
Class to store reconstructed particles.
Definition: Particle.h:74
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:34
int m_fitTruthStatus
status of the fit when fitted with the truth info of the tracks
Definition: TagVertex.h:426
TMatrixDSym m_constraintCov
covariance matrix associated to the constraint, ie size of the constraint
Definition: TagVertex.h:425
std::string getConstraintType() const
get the constraint type used in the tag fit
Definition: TagVertex.cc:80
int m_NFitTracks
Number of tracks used by Rave to fit the vertex.
Definition: TagVertex.h:421
TVector3 getVtxFitTrackP(unsigned int trackIndex) const
Returns the momentum vector of the tag track indexed by trackindex.
Definition: TagVertex.cc:158
float getDeltaTErr() const
Returns DeltaTErr.
Definition: TagVertex.cc:50
TVector3 getConstraintCenter() const
Returns the position of the constraint, ie centre of the constraint ellipse.
Definition: TagVertex.cc:85
TMatrixDSym getConstraintCov() const
Get the covariance matrix of the constraint for the tag fit.
Definition: TagVertex.cc:91
void resetConstraintCov()
Resets 3x3 constraint error matrix All elements are set to 0.0.
Definition: TagVertex.cc:337
void setConstraintType(const std::string &constraintType)
Set the type of the constraint for the tag fit.
Definition: TagVertex.cc:325
float getTruthTagVl() const
Returns the MC tagV component in the boost direction.
Definition: TagVertex.cc:111
int getMCTagBFlavor() const
Returns generated Btag PDG code.
Definition: TagVertex.cc:60
TagVertex()
Default constructor.
Definition: TagVertex.h:42
double getVtxFitTrackPComponent(unsigned int trackIndex, unsigned int component) const
Returns one of the 3 components of the momentum of tag track indexed by trackindex.
Definition: TagVertex.cc:164
float getDeltaT() const
Returns DeltaT.
Definition: TagVertex.cc:45
TVector3 getVtxFitTrackPosition(unsigned int trackIndex) const
Returns the position vector (X, Y, Z) of the tag track indexed by trackindex.
Definition: TagVertex.cc:151
float m_tagVertexPval
Btag vertex P value.
Definition: TagVertex.h:401
void setTagVlErr(float TagVlErr)
Set the error of the tagV component in the boost direction.
Definition: TagVertex.cc:263
std::vector< double > m_raveWeights
weights of each track in the Rave tag vtx fit
Definition: TagVertex.h:422
void setTagVertex(const TVector3 &TagVertex)
Set BTag Vertex.
Definition: TagVertex.cc:198
float m_tagVlErr
Error of the tagV component in the boost direction
Definition: TagVertex.h:412
float getTagVolErr() const
Returns the error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:131
std::vector< const Particle * > m_vtxFitParticles
pointers to the tracks used by rave to fit the vertex
Definition: TagVertex.h:419
float getTagVl() const
Returns the tagV component in the boost direction.
Definition: TagVertex.cc:106
void setTruthTagVl(float TruthTagVl)
Set the MC tagV component in the boost direction.
Definition: TagVertex.cc:258
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:170
float getMCDeltaT() const
Returns mc DeltaT (in kin.
Definition: TagVertex.cc:70
float getTagVol() const
Returns the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:121
TVector3 m_tagVertex
Btag vertex.
Definition: TagVertex.h:399
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:31
TMatrixDSym m_tagVertexErrMatrix
Btag vertex (3x3) error matrix.
Definition: TagVertex.h:400
int m_NTracks
Number of tracks used in the fit.
Definition: TagVertex.h:409
void setTruthTagVol(float TruthTagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:273
float m_mcDeltaT
generated Delta t approximated: true Delta L divided by Upsilon(4S)'s boost
Definition: TagVertex.h:407
void setMCTagBFlavor(int mcTagBFlavor)
Set generated Btag PDG code.
Definition: TagVertex.cc:228
float m_truthTagVl
MC tagV component in the boost direction
Definition: TagVertex.h:411
TVector3 getMCTagVertex() const
Returns generated BTag Vertex.
Definition: TagVertex.cc:55
int getRollBackStatus() const
Get the status of the fit performed with the rolled back tracks.
Definition: TagVertex.cc:193
float m_tagVNDF
Number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.h:416
std::vector< const MCParticle * > m_vtxFitMCParticles
pointers to the MC p'cles corresponding to the tracks in the tag vtx fit
Definition: TagVertex.h:420
void setTagVolErr(float TagVolErr)
Set the error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:278
float m_tagVChi2
chi^2 value of the tag vertex fit result
Definition: TagVertex.h:417
int getNFitTracks() const
Returns number of tracks used in the fit (not counting the ones removed because they come from Kshort...
Definition: TagVertex.cc:101
void setTagVNDF(float TagVNDF)
Set the number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.cc:283
float getTagVlErr() const
Returns the error of the tagV component in the boost direction.
Definition: TagVertex.cc:116
int getFitTruthStatus() const
Get the status of the fit performed with the truth info of the tracks.
Definition: TagVertex.cc:188
void setDeltaTErr(float DeltaTErr)
Set DeltaTErr.
Definition: TagVertex.cc:218
TVector3 getTagVertex() const
Returns BTag Vertex.
Definition: TagVertex.cc:16
float m_deltaT
Delta t.
Definition: TagVertex.h:402
float m_tagVolErr
Error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.h:415
void setNTracks(int nTracks)
Set number of tracks used in the fit.
Definition: TagVertex.cc:248
void setTagVChi2(float TagVChi2)
Set the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:288
void setMCDeltaT(float mcDeltaT)
Set generated DeltaT (in kin.
Definition: TagVertex.cc:238
void setRollBackStatus(int backStatus)
Set the status of the fit performed with the rolled back tracks.
Definition: TagVertex.cc:349
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:304
float getMCDeltaTau() const
Returns generated DeltaTau.
Definition: TagVertex.cc:65
float getTruthTagVol() const
Returns the MC tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:126
void setMCTagVertex(const TVector3 &mcTagVertex)
Set generated BTag Vertex.
Definition: TagVertex.cc:223
void setTagVol(float TagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:268
void setDeltaT(float DeltaT)
Set DeltaT.
Definition: TagVertex.cc:213
int getFitType() const
Returns fit algo type.
Definition: TagVertex.cc:75
float getTagVNDF() const
Returns the number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.cc:136
std::string m_constraintType
Type of the constraint used for the tag vertex fit (noConstraint, IP, Boost, Tube)
Definition: TagVertex.h:423
float m_tagVl
tagV component in the boost direction
Definition: TagVertex.h:410
float m_mcDeltaTau
generated Delta t: difference between signal and tag flight times
Definition: TagVertex.h:406
void setRaveWeights(const std::vector< double > &raveWeights)
Set the weights used by Rave in the tag vtx fit.
Definition: TagVertex.cc:309
void setTagVertexPval(float TagVertexPval)
Set BTag Vertex P value.
Definition: TagVertex.cc:208
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:38
TMatrixDSym getTagVertexErrMatrix() const
Returns BTag Vertex (3x3) error matrix.
Definition: TagVertex.cc:21
float m_deltaTErr
Delta t error.
Definition: TagVertex.h:403
void setMCDeltaTau(float mcDeltaTau)
Set generated DeltaT.
Definition: TagVertex.cc:233
float m_tagVChi2IP
IP component of chi^2 value of the tag vertex fit result.
Definition: TagVertex.h:418
void setTagVl(float TagVl)
Set the tagV component in the boost direction.
Definition: TagVertex.cc:253
void setTagVertexErrMatrix(const TMatrixDSym &TagVertexErrMatrix)
Set BTag Vertex (3x3) error matrix.
Definition: TagVertex.cc:203
int m_mcPDG
generated tag side B flavor (PDG code)
Definition: TagVertex.h:405
float getTagVChi2() const
Returns the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:141
float getTagVChi2IP() const
Returns the IP component of the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:146
void resetTagVertexErrorMatrix()
Resets 3x3 tag vertex error matrix All elements are set to 0.0.
Definition: TagVertex.cc:330
float m_truthTagVol
MC tagV component in the direction orthogonal to the boost.
Definition: TagVertex.h:414
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:176
TVector3 m_constraintCenter
centre of the constraint
Definition: TagVertex.h:424
float m_tagVol
tagV component in the direction orthogonal to the boost
Definition: TagVertex.h:413
void setConstraintCenter(const TVector3 &constraintCenter)
Set the centre of the constraint for the tag fit.
Definition: TagVertex.cc:314
int m_rollbackStatus
status of the fit when fitted with rolled back tracks
Definition: TagVertex.h:427
void setConstraintCov(const TMatrixDSym &constraintCov)
Set the covariance matrix of the constraint for the tag fit.
Definition: TagVertex.cc:319
void setFitType(float FitType)
Set fit algo type.
Definition: TagVertex.cc:243
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:298
TVector3 m_mcTagV
generated Btag vertex
Definition: TagVertex.h:404
int getNTracks() const
Returns number of tracks used in the fit.
Definition: TagVertex.cc:96
int m_FitType
Fit algo used.
Definition: TagVertex.h:408
void setTagVChi2IP(float TagVChi2IP)
Set the IP component of the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:293
double getRaveWeight(unsigned int trackIndex) const
Returns the weight assigned by Rave to the track indexed by trackIndex.
Definition: TagVertex.cc:182
void setFitTruthStatus(int truthStatus)
Set the status of the fit performed with the truth info of the tracks.
Definition: TagVertex.cc:344
float getTagVertexPval() const
Returns BTag Vertex P value.
Definition: TagVertex.cc:26
Abstract base class for different kinds of events.