BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
ExtSteppingAction.h
Go to the documentation of this file.
1//
2// File: ExtSteppingAction.hh
3// data: 2005.3.16
4// Author: L.L.Wang
5//
6// Description:
7//
8
9#ifndef EXTSTEPPINGACTION
10#define EXTSTEPPINGACTION 1
11
12#include "G4Material.hh"
13#include "G4UserSteppingAction.hh"
14
15#include "CLHEP/Matrix/SymMatrix.h"
16#include "ExtEvent/RecExtTrack.h"
17#include "Ext_xp_err.h"
18#include "G4LogicalVolume.hh"
19#include "G4VPhysicalVolume.hh"
20#include "McTruth/MucMcHit.h"
21#include "MucRawEvent/MucDigi.h"
22using namespace CLHEP;
23
24class ExtSteppingAction : public G4UserSteppingAction {
25public:
26 // Constructor and destructors
29
30 void Reset();
31 void MucReset();
32 void UserSteppingAction( const G4Step* currentStep );
33
34 void SetInitialPath( double aPath ) { initialPath = aPath; };
35 void SetInitialTof( double aTof ) { initialTof = aTof; };
36 void SetBetaInMDC( double aBeta ) { myBetaInMDC = aBeta; };
37 void SetXpErrPointer( Ext_xp_err* xpErr ) { extXpErr = xpErr; };
38
39 void SetMsgFlag( bool aMsgFalg ) { msgFlag = aMsgFalg; };
40 void SetMucKalFlag( bool aMucKalFlag ) { myUseMucKalFlag = aMucKalFlag; };
41 void SetMucWindow( int aMucWindow ) { myMucWindow = aMucWindow; };
42 void SetExtTrackPointer( RecExtTrack* aExtTrack ) { myExtTrack = aExtTrack; };
43 // inline void SetMsFlag(bool value){msFlag=value};
44 void CalculateEmcEndThetaPhi( int npart, int sector, int nb, int& ntheta, int& nphi );
45 int CalculateEmcEndPhiNb( int num );
46 int CalculateEmcEndCopyNb( int num );
47
48 void Set_which_tof_version( int version ) { m_which_tof_version = version; }
49 int Get_which_tof_version( void ) { return m_which_tof_version; }
50
51 void InfmodMuc( Hep3Vector& pos, Hep3Vector& mom, HepSymMatrix& err );
52 Hep3Vector GetGapID( G4String vol );
53 bool TrackStop() { return m_trackstop; }
54 void SetMucDigiColPointer( MucDigiCol* rawdigicol ) { m_mucdigicol = rawdigicol; }
55
56private:
57 // Calculate chicc
58 void CalculateChicc( G4Material* currentMaterial );
59
60 double chicc; // a const about the materimal
61 double initialPath; // particle path in MDC
62 double initialTof; // particle TOF in MDC
63 double myBetaInMDC; // particle velocity/C in MDC
64
65 double myPathIntoCrystal;
66 double myPathOutCrystal;
67 double myPathInCrystal;
68
69 double myPathIntoTof1;
70 double myPathOutTof1;
71 vector<double> myPathInTof1;
72
73 double myPathIntoTof2;
74 double myPathOutTof2;
75 vector<double> myPathInTof2;
76 int myMucWindow;
77 // bool msFlag; //Caculation of multiple scattering error switch flag
78
79 Ext_xp_err* extXpErr;
80
81 // units mm,MeV --> cm,GeV
82 HepSymMatrix myOutputSM;
83 HepSymMatrix& myOutputSymMatrix( const HepSymMatrix& );
84
85 MucDigiCol* m_mucdigicol;
86 bool myUseMucKalFlag;
87 Hep3Vector RememberID;
88 bool m_trackstop;
89 int myMucnfit_;
90 double myMucchisq_;
91 double myMucdepth_;
92 int myMucbrLastLay_;
93 int myMucecLastLay_;
94 int myMucnhits_;
95 HepSymMatrix m_err_mod;
96 Hep3Vector m_pos_mod;
97 Hep3Vector m_mom_mod;
98
99 Hep3Vector RemPositon;
100 Hep3Vector RemMomentum;
101 HepSymMatrix RemXpErr;
102 int RemStep;
103 double RemDist;
104 double RemDepth;
105 Hep3Vector RemID;
106 G4String RemVol;
107
108 // Ext data
109 RecExtTrack* myExtTrack;
110
111 bool msgFlag; // Message on/off
112 bool myTofFlag; // when enter "physicalTof",this flag will be ture.
113 bool myTof1Flag; // If we get Tof1 data,the flag will be true.
114 bool myTof2Flag;
115 bool myInTof1;
116 bool myOutTof1;
117 bool myInTof2;
118 bool myOutTof2;
119 bool myPhyEmcFlag; // when enter "BSC",this flag will be ture.
120 bool myEmcFlag;
121 bool myEmcPathFlag;
122 bool myMucFlag;
123
124 double myTof1R;
125 double myTof1Z;
126 double myTof2R;
127
128 double myEmcR1;
129 double myEmcR2;
130 double myEmcZ;
131
132 double myMucR;
133 double myMucZ;
134
135 int m_which_tof_version;
136};
137
138#endif
void SetMsgFlag(bool aMsgFalg)
void SetExtTrackPointer(RecExtTrack *aExtTrack)
void SetMucWindow(int aMucWindow)
void SetBetaInMDC(double aBeta)
void SetMucKalFlag(bool aMucKalFlag)
int Get_which_tof_version(void)
void SetInitialPath(double aPath)
void SetInitialTof(double aTof)
Hep3Vector GetGapID(G4String vol)
void CalculateEmcEndThetaPhi(int npart, int sector, int nb, int &ntheta, int &nphi)
void InfmodMuc(Hep3Vector &pos, Hep3Vector &mom, HepSymMatrix &err)
void UserSteppingAction(const G4Step *currentStep)
int CalculateEmcEndCopyNb(int num)
void SetXpErrPointer(Ext_xp_err *xpErr)
int CalculateEmcEndPhiNb(int num)
void Set_which_tof_version(int version)
void SetMucDigiColPointer(MucDigiCol *rawdigicol)