Belle II Software  release-05-02-19
TagVertex.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014-2019 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luigi Li Gioi, Stefano Lacaprara, Thibaud Humair *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/datastore/RelationsObject.h>
14 
15 #include <TVector3.h>
16 #include <TMatrixDSym.h>
17 #include <string>
18 
19 // DataObjects
20 #include <mdst/dataobjects/TrackFitResult.h>
21 #include <mdst/dataobjects/MCParticle.h>
22 #include <analysis/dataobjects/Particle.h>
23 
24 namespace Belle2 {
36  class TagVertex : public RelationsObject {
37 
38  public:
39 
45  {
46  m_tagVertex(0) = 0; m_tagVertex(1) = 0; m_tagVertex(2) = 0;
47  m_tagVertexPval = 0;
48  m_deltaT = 0;
49  m_deltaTErr = 0;
50  m_mcDeltaTau = 0;
51  m_mcDeltaT = 0;
52  m_mcTagV(0) = 0; m_mcTagV(1) = 0; m_mcTagV(2) = 0;
53  m_mcPDG = 0;
56  m_FitType = 0;
57  m_NTracks = -1;
58  m_tagVl = 0;
59  m_tagVlErr = 0;
60  m_tagVol = 0;
61  m_tagVolErr = 0;
62  m_truthTagVl = 0;
63  m_truthTagVol = 0;
64  m_tagVNDF = 0;
65  m_tagVChi2 = 0;
66  m_tagVChi2IP = 0;
67  m_constraintType = "";
69  m_fitTruthStatus = 0;
70  m_rollbackStatus = 0;
71  }
72 
73  // get methods
74 
78  TVector3 getTagVertex();
79 
83  TMatrixDSym getTagVertexErrMatrix();
84 
88  float getTagVertexPval();
89 
93  const Particle* getVtxFitParticle(unsigned int trackIndex);
94 
98  const MCParticle* getVtxFitMCParticle(unsigned int trackIndex);
99 
103  float getDeltaT();
104 
108  float getDeltaTErr();
109 
113  TVector3 getMCTagVertex();
114 
118  int getMCTagBFlavor();
119 
123  float getMCDeltaTau();
124 
128  float getMCDeltaT();
129 
133  int getFitType() ;
134 
139  std::string getConstraintType();
140 
144  int getNTracks() ;
145 
149  int getNFitTracks() ;
150 
154  float getTagVl() ;
155 
159  float getTruthTagVl() ;
160 
164  float getTagVlErr() ;
165 
169  float getTagVol() ;
170 
174  float getTruthTagVol() ;
175 
179  float getTagVolErr() ;
180 
184  float getTagVNDF() ;
185 
189  float getTagVChi2() ;
190 
194  float getTagVChi2IP() ;
195 
201  TVector3 getConstraintCenter();
202 
207  TMatrixDSym getConstraintCov();
208 
213  TVector3 getVtxFitTrackPosition(unsigned int trackIndex);
214 
219  TVector3 getVtxFitTrackP(unsigned int trackIndex);
220 
224  double getVtxFitTrackPComponent(unsigned int trackIndex, unsigned int component);
225 
230  double getVtxFitTrackZ0(unsigned int trackIndex);
231 
236  double getVtxFitTrackD0(unsigned int trackIndex);
237 
242  double getRaveWeight(unsigned int trackIndex);
243 
247  int getFitTruthStatus();
248 
252  int getRollBackStatus();
253 
254  // set methods
255 
259  void setTagVertex(const TVector3& TagVertex);
260 
264  void setTagVertexErrMatrix(const TMatrixDSym& TagVertexErrMatrix);
265 
269  void setTagVertexPval(float TagVertexPval);
270 
274  void setDeltaT(float DeltaT);
275 
279  void setDeltaTErr(float DeltaTErr);
280 
284  void setMCTagVertex(const TVector3& mcTagVertex);
285 
289  void setMCTagBFlavor(int mcTagBFlavor);
290 
294  void setMCDeltaTau(float mcDeltaTau);
295 
299  void setMCDeltaT(float mcDeltaT);
300 
304  void setFitType(float FitType) ;
305 
309  void setNTracks(int nTracks) ;
310 
314  void setTagVl(float TagVl) ;
315 
319  void setTruthTagVl(float TruthTagVl) ;
320 
324  void setTagVlErr(float TagVlErr) ;
325 
329  void setTagVol(float TagVol) ;
330 
334  void setTruthTagVol(float TruthTagVol) ;
335 
339  void setTagVolErr(float TagVolErr) ;
340 
344  void setTagVNDF(float TagVNDF) ;
345 
349  void setTagVChi2(float TagVChi2) ;
350 
354  void setTagVChi2IP(float TagVChi2IP) ;
355 
359  void setVertexFitParticles(const std::vector<const Particle*>& vtxFitParticles);
360 
364  void setVertexFitMCParticles(const std::vector<const MCParticle*>& vtxFitMCParticles);
365 
369  void setRaveWeights(const std::vector<double>& raveWeights);
370 
375  void setConstraintCenter(const TVector3& constraintCenter);
376 
381  void setConstraintCov(const TMatrixDSym& constraintCov);
382 
387  void setConstraintType(const std::string& constraintType);
388 
392  void setFitTruthStatus(int truthStatus);
393 
397  void setRollBackStatus(int backStatus);
398 
399  private:
400  TVector3 m_tagVertex;
401  TMatrixDSym m_tagVertexErrMatrix;
402  float m_tagVertexPval;
403  float m_deltaT;
404  float m_deltaTErr;
405  TVector3 m_mcTagV;
406  int m_mcPDG;
407  float m_mcDeltaTau;
408  float m_mcDeltaT;
409  int m_FitType;
410  int m_NTracks;
411  float m_tagVl;
412  float m_truthTagVl;
413  float m_tagVlErr;
414  float m_tagVol;
416  float m_tagVolErr;
417  float m_tagVNDF;
418  float m_tagVChi2;
419  float m_tagVChi2IP;
420  std::vector<const Particle*> m_vtxFitParticles;
421  std::vector<const MCParticle*> m_vtxFitMCParticles;
423  std::vector<double> m_raveWeights;
424  std::string m_constraintType;
426  TMatrixDSym m_constraintCov;
436 
441  void resetConstraintCov();
442 
443  ClassDef(TagVertex, 5)
451  };
452 
454 } // end namespace Belle2
Belle2::TagVertex::setTagVol
void setTagVol(float TagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:270
Belle2::TagVertex::getVtxFitTrackD0
double getVtxFitTrackD0(unsigned int trackIndex)
Returns the radial distance from the IP to the POCA of the tag track indexed by trackIndex.
Definition: TagVertex.cc:178
Belle2::TagVertex::setRaveWeights
void setRaveWeights(const std::vector< double > &raveWeights)
Set the weights used by Rave in the tag vtx fit.
Definition: TagVertex.cc:311
Belle2::TagVertex::m_mcDeltaTau
float m_mcDeltaTau
generated Delta t: difference between signal and tag flight times
Definition: TagVertex.h:415
Belle2::TagVertex::setTagVl
void setTagVl(float TagVl)
Set the tagV component in the boost direction.
Definition: TagVertex.cc:255
Belle2::TagVertex::m_mcDeltaT
float m_mcDeltaT
generated Delta t approximated: true Delta L divided by Upsilon(4S)'s boost
Definition: TagVertex.h:416
Belle2::TagVertex::setVertexFitMCParticles
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:306
Belle2::TagVertex::setFitTruthStatus
void setFitTruthStatus(int truthStatus)
Set the status of the fit performed with the truth info of the tracks.
Definition: TagVertex.cc:346
Belle2::TagVertex::m_truthTagVl
float m_truthTagVl
MC tagV component in the boost direction
Definition: TagVertex.h:420
Belle2::TagVertex::getMCDeltaTau
float getMCDeltaTau()
Returns generated DeltaTau.
Definition: TagVertex.cc:67
Belle2::TagVertex::m_constraintCenter
TVector3 m_constraintCenter
centre of the constraint
Definition: TagVertex.h:433
Belle2::TagVertex::resetConstraintCov
void resetConstraintCov()
Resets 3x3 constraint error matrix All elements are set to 0.0.
Definition: TagVertex.cc:339
Belle2::TagVertex::m_tagVertex
TVector3 m_tagVertex
Btag vertex.
Definition: TagVertex.h:408
Belle2::TagVertex::getRollBackStatus
int getRollBackStatus()
Get the status of the fit performed with the rolled back tracks.
Definition: TagVertex.cc:195
Belle2::TagVertex::getMCTagVertex
TVector3 getMCTagVertex()
Returns generated BTag Vertex.
Definition: TagVertex.cc:57
Belle2::TagVertex::m_truthTagVol
float m_truthTagVol
MC tagV component in the direction orthogonal to the boost.
Definition: TagVertex.h:423
Belle2::TagVertex::getTagVertexPval
float getTagVertexPval()
Returns BTag Vertex P value.
Definition: TagVertex.cc:28
Belle2::TagVertex::setTagVolErr
void setTagVolErr(float TagVolErr)
Set the error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:280
Belle2::TagVertex::m_tagVChi2
float m_tagVChi2
chi^2 value of the tag vertex fit result
Definition: TagVertex.h:426
Belle2::TagVertex::getVtxFitMCParticle
const MCParticle * getVtxFitMCParticle(unsigned int trackIndex)
Returns a ptr to the MC particle matched to the tag vtx track indexed by trackIndex.
Definition: TagVertex.cc:40
Belle2::TagVertex::getTagVl
float getTagVl()
Returns the tagV component in the boost direction.
Definition: TagVertex.cc:108
Belle2::TagVertex::m_tagVol
float m_tagVol
tagV component in the direction orthogonal to the boost
Definition: TagVertex.h:422
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::TagVertex::setTagVertexPval
void setTagVertexPval(float TagVertexPval)
Set BTag Vertex P value.
Definition: TagVertex.cc:210
Belle2::TagVertex::getDeltaT
float getDeltaT()
Returns DeltaT.
Definition: TagVertex.cc:47
Belle2::TagVertex::setMCTagBFlavor
void setMCTagBFlavor(int mcTagBFlavor)
Set generated Btag PDG code.
Definition: TagVertex.cc:230
Belle2::TagVertex::m_tagVertexPval
float m_tagVertexPval
Btag vertex P value.
Definition: TagVertex.h:410
Belle2::TagVertex::setFitType
void setFitType(float FitType)
Set fit algo type.
Definition: TagVertex.cc:245
Belle2::TagVertex::getVtxFitParticle
const Particle * getVtxFitParticle(unsigned int trackIndex)
Returns a ptr to the particle constructed from the tag vtx track indexed by trackIndex.
Definition: TagVertex.cc:33
Belle2::TagVertex::setRollBackStatus
void setRollBackStatus(int backStatus)
Set the status of the fit performed with the rolled back tracks.
Definition: TagVertex.cc:351
Belle2::TagVertex::m_constraintCov
TMatrixDSym m_constraintCov
covariance matrix associated to the constraint, ie size of the constraint
Definition: TagVertex.h:434
Belle2::TagVertex::getTagVertexErrMatrix
TMatrixDSym getTagVertexErrMatrix()
Returns BTag Vertex (3x3) error matrix.
Definition: TagVertex.cc:23
Belle2::TagVertex::setTagVNDF
void setTagVNDF(float TagVNDF)
Set the number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.cc:285
Belle2::TagVertex::getTagVNDF
float getTagVNDF()
Returns the number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.cc:138
Belle2::TagVertex::m_NTracks
int m_NTracks
Number of tracks used in the fit.
Definition: TagVertex.h:418
Belle2::TagVertex::m_deltaTErr
float m_deltaTErr
Delta t error.
Definition: TagVertex.h:412
Belle2::TagVertex::m_raveWeights
std::vector< double > m_raveWeights
weights of each track in the Rave tag vtx fit
Definition: TagVertex.h:431
Belle2::TagVertex::m_tagVl
float m_tagVl
tagV component in the boost direction
Definition: TagVertex.h:419
Belle2::TagVertex::m_constraintType
std::string m_constraintType
Type of the constraint used for the tag vertex fit (noConstraint, IP, Boost, Tube)
Definition: TagVertex.h:432
Belle2::TagVertex::getTagVol
float getTagVol()
Returns the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:123
Belle2::TagVertex::setTagVChi2
void setTagVChi2(float TagVChi2)
Set the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:290
Belle2::TagVertex::setTagVlErr
void setTagVlErr(float TagVlErr)
Set the error of the tagV component in the boost direction.
Definition: TagVertex.cc:265
Belle2::TagVertex::getRaveWeight
double getRaveWeight(unsigned int trackIndex)
Returns the weight assigned by Rave to the track indexed by trackIndex.
Definition: TagVertex.cc:184
Belle2::TagVertex::TagVertex
TagVertex()
Default constructor.
Definition: TagVertex.h:52
Belle2::TagVertex::m_mcPDG
int m_mcPDG
generated tag side B flavor (PDG code)
Definition: TagVertex.h:414
Belle2::TagVertex::m_tagVlErr
float m_tagVlErr
Error of the tagV component in the boost direction
Definition: TagVertex.h:421
Belle2::TagVertex::setConstraintType
void setConstraintType(const std::string &constraintType)
Set the type of the constraint for the tag fit.
Definition: TagVertex.cc:327
Belle2::TagVertex::setTruthTagVol
void setTruthTagVol(float TruthTagVol)
Set the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:275
Belle2::TagVertex::setConstraintCenter
void setConstraintCenter(const TVector3 &constraintCenter)
Set the centre of the constraint for the tag fit.
Definition: TagVertex.cc:316
Belle2::TagVertex::setTagVertex
void setTagVertex(const TVector3 &TagVertex)
Set BTag Vertex.
Definition: TagVertex.cc:200
Belle2::TagVertex::setNTracks
void setNTracks(int nTracks)
Set number of tracks used in the fit.
Definition: TagVertex.cc:250
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TagVertex::getConstraintCov
TMatrixDSym getConstraintCov()
Get the covariance matrix of the constraint for the tag fit.
Definition: TagVertex.cc:93
Belle2::TagVertex::getVtxFitTrackPosition
TVector3 getVtxFitTrackPosition(unsigned int trackIndex)
Returns the position vector (X, Y, Z) of the tag track indexed by trackindex.
Definition: TagVertex.cc:153
Belle2::TagVertex::setTruthTagVl
void setTruthTagVl(float TruthTagVl)
Set the MC tagV component in the boost direction.
Definition: TagVertex.cc:260
Belle2::TagVertex::m_tagVolErr
float m_tagVolErr
Error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.h:424
Belle2::TagVertex::setDeltaT
void setDeltaT(float DeltaT)
Set DeltaT.
Definition: TagVertex.cc:215
Belle2::TagVertex::resetTagVertexErrorMatrix
void resetTagVertexErrorMatrix()
Resets 3x3 tag vertex error matrix All elements are set to 0.0.
Definition: TagVertex.cc:332
Belle2::TagVertex::getTruthTagVl
float getTruthTagVl()
Returns the MC tagV component in the boost direction.
Definition: TagVertex.cc:113
Belle2::TagVertex::m_tagVertexErrMatrix
TMatrixDSym m_tagVertexErrMatrix
Btag vertex (3x3) error matrix.
Definition: TagVertex.h:409
Belle2::TagVertex::getMCDeltaT
float getMCDeltaT()
Returns mc DeltaT (in kin.
Definition: TagVertex.cc:72
Belle2::TagVertex::m_tagVNDF
float m_tagVNDF
Number of degrees of freedom in the tag vertex fit.
Definition: TagVertex.h:425
Belle2::TagVertex::getVtxFitTrackZ0
double getVtxFitTrackZ0(unsigned int trackIndex)
Returns the longitudinal distance from the IP to the POCA of the tag track indexed by trackIndex.
Definition: TagVertex.cc:172
Belle2::TagVertex::m_vtxFitParticles
std::vector< const Particle * > m_vtxFitParticles
pointers to the tracks used by rave to fit the vertex
Definition: TagVertex.h:428
Belle2::TagVertex::getVtxFitTrackP
TVector3 getVtxFitTrackP(unsigned int trackIndex)
Returns the momentum vector of the tag track indexed by trackindex.
Definition: TagVertex.cc:160
Belle2::TagVertex::getFitType
int getFitType()
Returns fit algo type.
Definition: TagVertex.cc:77
Belle2::TagVertex::getFitTruthStatus
int getFitTruthStatus()
Get the status of the fit performed with the truth info of the tracks.
Definition: TagVertex.cc:190
Belle2::TagVertex::m_rollbackStatus
int m_rollbackStatus
status of the fit when fitted with rolled back tracks
Definition: TagVertex.h:436
Belle2::TagVertex::setConstraintCov
void setConstraintCov(const TMatrixDSym &constraintCov)
Set the covariance matrix of the constraint for the tag fit.
Definition: TagVertex.cc:321
Belle2::TagVertex::m_deltaT
float m_deltaT
Delta t.
Definition: TagVertex.h:411
Belle2::TagVertex::setMCDeltaTau
void setMCDeltaTau(float mcDeltaTau)
Set generated DeltaT.
Definition: TagVertex.cc:235
Belle2::Particle
Class to store reconstructed particles.
Definition: Particle.h:77
Belle2::TagVertex::m_NFitTracks
int m_NFitTracks
Number of tracks used by Rave to fit the vertex.
Definition: TagVertex.h:430
Belle2::TagVertex::getTagVChi2
float getTagVChi2()
Returns the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:143
Belle2::TagVertex::getMCTagBFlavor
int getMCTagBFlavor()
Returns generated Btag PDG code.
Definition: TagVertex.cc:62
Belle2::TagVertex::m_tagVChi2IP
float m_tagVChi2IP
IP component of chi^2 value of the tag vertex fit result.
Definition: TagVertex.h:427
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::TagVertex
TagVertex data object: contains Btag Vertex and DeltaT.
Definition: TagVertex.h:44
Belle2::TagVertex::setDeltaTErr
void setDeltaTErr(float DeltaTErr)
Set DeltaTErr.
Definition: TagVertex.cc:220
Belle2::TagVertex::m_mcTagV
TVector3 m_mcTagV
generated Btag vertex
Definition: TagVertex.h:413
Belle2::TagVertex::getTagVlErr
float getTagVlErr()
Returns the error of the tagV component in the boost direction.
Definition: TagVertex.cc:118
Belle2::TagVertex::getTagVolErr
float getTagVolErr()
Returns the error of the tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:133
Belle2::TagVertex::getTagVChi2IP
float getTagVChi2IP()
Returns the IP component of the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:148
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:43
Belle2::TagVertex::setMCDeltaT
void setMCDeltaT(float mcDeltaT)
Set generated DeltaT (in kin.
Definition: TagVertex.cc:240
Belle2::TagVertex::setTagVChi2IP
void setTagVChi2IP(float TagVChi2IP)
Set the IP component of the chi^2 value of the tag vertex fit result.
Definition: TagVertex.cc:295
Belle2::TagVertex::setTagVertexErrMatrix
void setTagVertexErrMatrix(const TMatrixDSym &TagVertexErrMatrix)
Set BTag Vertex (3x3) error matrix.
Definition: TagVertex.cc:205
Belle2::TagVertex::getVtxFitTrackPComponent
double getVtxFitTrackPComponent(unsigned int trackIndex, unsigned int component)
Returns one of the 3 components of the momentum of tag track indexed by trackindex.
Definition: TagVertex.cc:166
Belle2::TagVertex::getConstraintCenter
TVector3 getConstraintCenter()
Returns the position of the constraint, ie centre of the constraint ellipse.
Definition: TagVertex.cc:87
Belle2::TagVertex::getConstraintType
std::string getConstraintType()
get the constraint type used in the tag fit
Definition: TagVertex.cc:82
Belle2::TagVertex::getNTracks
int getNTracks()
Returns number of tracks used in the fit.
Definition: TagVertex.cc:98
Belle2::TagVertex::getDeltaTErr
float getDeltaTErr()
Returns DeltaTErr.
Definition: TagVertex.cc:52
Belle2::TagVertex::getTagVertex
TVector3 getTagVertex()
Returns BTag Vertex.
Definition: TagVertex.cc:18
Belle2::TagVertex::m_vtxFitMCParticles
std::vector< const MCParticle * > m_vtxFitMCParticles
pointers to the MC p'cles corresponding to the tracks in the tag vtx fit
Definition: TagVertex.h:429
Belle2::TagVertex::setVertexFitParticles
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:300
Belle2::TagVertex::m_FitType
int m_FitType
Fit algo used.
Definition: TagVertex.h:417
Belle2::TagVertex::setMCTagVertex
void setMCTagVertex(const TVector3 &mcTagVertex)
Set generated BTag Vertex.
Definition: TagVertex.cc:225
Belle2::TagVertex::getNFitTracks
int getNFitTracks()
Returns number of tracks used in the fit (not counting the ones removed because they come from Kshort...
Definition: TagVertex.cc:103
Belle2::TagVertex::m_fitTruthStatus
int m_fitTruthStatus
status of the fit when fitted with the truth info of the tracks
Definition: TagVertex.h:435
Belle2::TagVertex::getTruthTagVol
float getTruthTagVol()
Returns the MC tagV component in the direction orthogonal to the boost.
Definition: TagVertex.cc:128