BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Analysis/VertexFitRefine/include/VertexFitRefine/VertexExtrapolate.h
Go to the documentation of this file.
1/* <===<===<===<===<===<===<===<===<===~===>===>===>===>===>===>===>===>===>
2 * File Name: VertexExtrapolate.h
3 * Author: Hao-Kai SUN
4 * Created: 2021-09-06 Mon 18:02:17 CST
5 * <<=====================================>>
6 * Last Updated: 2022-01-06 Thu 11:00:20 CST
7 * By: Hao-Kai SUN
8 * Update #: 40
9 * ============================== CODES ==============================>>> */
10#ifndef VERTEXFITREFINE_VERTEXEXTRAPOLATE_H
11# define VERTEXFITREFINE_VERTEXEXTRAPOLATE_H
12//// constants
13// # ifndef NULL
14// # define NULL 0
15// # endif
16
17// # ifndef R__NULLPTR
18// # ifndef nullptr
19// # define nullptr 0
20// # endif
21// # endif
22////
23# include "G4Material.hh"
24# include "G4Processor/GDMLProcessor.hh"
25# include "G4Tubs.hh"
26# include "KalFitAlg/KalFitCylinder.h"
27# include "KalFitAlg/KalFitMaterial.h"
28
29# include "DstEvent/DstMdcKalTrack.h"
30
31# include <string>
32
33class VertexExtrapolate {
34public:
35 static VertexExtrapolate* instance();
37 void KalFitExt( const HepPoint3D& point, DstMdcKalTrack* kalTrack, const int pid );
38
39 const HepVector getHelixVector() const;
40 const HepSymMatrix getErrorMatrix() const;
41
42private:
44 static VertexExtrapolate* m_instance;
45
46 G4Tubs* getTubs( const std::string& name );
47 void G4MtovKalFitM( G4Material* g4m, const std::string& name );
48 void AddWalls( int index, double radius, double thick, double length, double z0 );
49 void AddWalls( int index );
50 void testMW( int index );
51 void constructWallsFromGdml();
52
53 void setHelixVector( const CLHEP::HepVector a );
54 void setErrorMatrix( const CLHEP::HepSymMatrix Ea );
55
56 int getWallMdcNumber( const HepPoint3D& point ) const;
57 void extToAnyPoint( KalFitTrack& track, const HepPoint3D& point );
58
59 /// Properties
60 std::vector<KalFitCylinder> m_BesKalmanExtWalls;
61 std::vector<KalFitMaterial> m_BesKalmanExtMaterials;
62
63 CLHEP::HepVector m_helixVector;
64 CLHEP::HepSymMatrix m_errorMatrix;
65};
66
67inline const HepVector VertexExtrapolate::getHelixVector() const { return m_helixVector; }
68
69inline const HepSymMatrix VertexExtrapolate::getErrorMatrix() const { return m_errorMatrix; }
70
71inline void VertexExtrapolate::setHelixVector( const CLHEP::HepVector a ) {
72 m_helixVector = a;
73}
74
75inline void VertexExtrapolate::setErrorMatrix( const CLHEP::HepSymMatrix Ea ) {
76 m_errorMatrix = Ea;
77}
78
79inline G4Tubs* VertexExtrapolate::getTubs( const std::string& name ) {
80 return dynamic_cast<G4Tubs*>(
81 const_cast<G4LogicalVolume*>( GDMLProcessor::GetInstance()->GetLogicalVolume( name ) )
82 ->GetSolid() );
83}
84
85#endif /* VERTEXFITREFINE_VERTEXEXTRAPOLATE_H */
86/* ===================================================================<<< */
87/* =================== VertexExtrapolate.h ends here ==================== */
HepGeom::Point3D< double > HepPoint3D
Description of a track class (<- Helix.cc).
void KalFitExt(const HepPoint3D &point, DstMdcKalTrack *kalTrack, const int pid)
static VertexExtrapolate * instance()