BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/EvtRecEvent/include/EvtRecEvent/EvtRecVeeVertex.h
Go to the documentation of this file.
1#ifndef Event_EvtRecVeeVertex_H
2#define Event_EvtRecVeeVertex_H
3
4#include "CLHEP/Matrix/SymMatrix.h"
5#include "CLHEP/Matrix/Vector.h"
6#include "EventModel/EventModel.h"
7#include "EvtRecEvent/EvtRecTrack.h"
8#include "GaudiKernel/ContainedObject.h"
9#include "GaudiKernel/ObjectVector.h"
10#include "GaudiKernel/SmartRef.h"
11#include "GaudiKernel/SmartRefVector.h"
12#include <utility>
13
14using CLHEP::HepSymMatrix;
15using CLHEP::HepVector;
16using namespace EventModel;
17extern const CLID& CLID_EvtRecVeeVertex;
18
19//
20// For "V" Type Vertex : Ks, Lambda, gamma conversion
21// more than 1 vee vertex for every event
22// Author : Kanglin He, Min Xu Date: 2008.11.13
23//
24class EvtRecVeeVertex : virtual public ContainedObject {
25public:
26 virtual const CLID& clID() const { return EvtRecVeeVertex::classID(); }
27 static const CLID& classID() { return CLID_EvtRecVeeVertex; }
28
31
34
35 int vertexId() const { return m_vertexId; }
36 int vertexType() const { return m_vertexType; }
37 double chi2() const { return m_chi2; }
38 int ndof() const { return m_ndof; }
39 double mass() const { return m_mass; }
40 const HepVector& w() const { return m_w; }
41 const HepSymMatrix& Ew() const { return m_Ew; }
42 const std::pair<int, int>& pair() const { return m_pair; }
43 inline int pair( int i ) const;
44 int nCharge() const { return m_nCharge; }
45 int nTracks() const { return m_nTracks; }
46 std::pair<SmartRef<EvtRecTrack>, SmartRef<EvtRecTrack>>& pairDaughters() {
47 return m_daughters;
48 }
49 inline SmartRef<EvtRecTrack>& daughter( int i );
50
51 void setVertexId( int vtxId ) { m_vertexId = vtxId; }
52 void setVertexType( int vtxType ) { m_vertexType = vtxType; }
53 void setChi2( double chi2 ) { m_chi2 = chi2; }
54 void setNdof( int ndof ) { m_ndof = ndof; }
55 void setMass( double mass ) { m_mass = mass; }
56 void setW( const HepVector& w ) { m_w = w; }
57 void setEw( const HepSymMatrix& Ew ) { m_Ew = Ew; }
58 void setPair( const std::pair<int, int>& pair ) { m_pair = pair; }
59 void setNCharge( int nCharge ) { m_nCharge = nCharge; }
60 void setNTracks( int nTracks ) { m_nTracks = nTracks; }
61 inline void addDaughter( const SmartRef<EvtRecTrack>& track, int i );
62 void setDaughter( const std::pair<SmartRef<EvtRecTrack>, SmartRef<EvtRecTrack>>& p ) {
63 m_daughters = p;
64 }
65
66private:
67 int m_vertexId;
68 int m_vertexType; // 0 : Ks; 1 : Lambda; 2 : gamma conversion
69 double m_chi2; // chi square of vertex fitting
70 int m_ndof; // degree of freedom
71 double m_mass; // mass of "V" type decay particle
72 HepVector m_w; // (px, py, pz, E, x, y, z) of "V" type decay particle
73 HepSymMatrix m_Ew; // error matrix
74 std::pair<int, int> m_pair; // identification of daughter particles
75 // 1:e 2:mu 3:pion 4:kaon 5:proton
76 int m_nCharge; // total charges of daughter particles
77 int m_nTracks; // total tracks of daughter particles
78 std::pair<SmartRef<EvtRecTrack>, SmartRef<EvtRecTrack>> m_daughters;
79};
80
81inline int EvtRecVeeVertex::pair( int i ) const {
82 if ( i == 0 ) { return m_pair.first; }
83 assert( i == 1 );
84 return m_pair.second;
85}
86
87inline SmartRef<EvtRecTrack>& EvtRecVeeVertex::daughter( int i ) {
88 if ( i == 0 ) { return m_daughters.first; }
89 assert( i == 1 );
90 return m_daughters.second;
91}
92
93inline void EvtRecVeeVertex::addDaughter( const SmartRef<EvtRecTrack>& track, int i ) {
94 if ( i == 0 ) { m_daughters.first = track; }
95 else if ( i == 1 ) { m_daughters.second = track; }
96 else { assert( false ); }
97}
98
99typedef ObjectVector<EvtRecVeeVertex> EvtRecVeeVertexCol;
100#endif
const CLID & CLID_EvtRecVeeVertex
ObjectVector< EvtRecVeeVertex > EvtRecVeeVertexCol
NTuple::Item< double > m_chi2
const CLID & CLID_EvtRecVeeVertex
const std::pair< int, int > & pair() const
std::pair< SmartRef< EvtRecTrack >, SmartRef< EvtRecTrack > > & pairDaughters()
void addDaughter(const SmartRef< EvtRecTrack > &track, int i)
void setPair(const std::pair< int, int > &pair)
EvtRecVeeVertex & operator=(const EvtRecVeeVertex &)
void setDaughter(const std::pair< SmartRef< EvtRecTrack >, SmartRef< EvtRecTrack > > &p)