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