CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
BesCgemSD.hh
Go to the documentation of this file.
1//-------------------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//-------------------------------------------------------------------------------------//
4/*
5 * =====================================================================================
6 *
7 * Filename: BesCgemSD.hh
8 * Description:
9 * Conventions:
10 * gv_ : global variable
11 * lv_ : local variable used in function
12 * lvd_ : local variable double
13 * m_* : normal member of class
14 * sm_* : static member of class
15 * m_M_* : class data member, material of each layer
16 * m_N_* : class data member, number of layers (CgemLayer,GemFoil)
17 * m_R_* : class data member, radius of each (material) layer, and so on
18 * m_L_* : class data member, length of each layer or hole pitch
19 * m_T_* : class data member, thickness of each (material) layer
20 * m_A_* : class data member, angle of anode VStrip
21 * Version: CgemSim-01-00-00
22 * Created: 01/02/2014 08:59:21 AM
23 * Revision: CgemSim-00-00-01(in CMT version CgemBoss-0.0.1 written by xiuql)
24 * Compiler: gcc
25 * Author: [email protected]
26 * Organization: DG1,EPC,IHEP
27 * History:
28 * <Num> <Author> <Time> <Version> <remark>
29 * 0 juxd 20140102 01-00-00 created,
30 *
31 * =====================================================================================
32 */
33
34//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35#ifndef BesCgemSD_h
36#define BesCgemSD_h 1
37class TFile;
38class TH1F;
39
40/* Header file: BOSS */
42#include "BesCgemHit.hh"
45
46/* Header file: Geant4 */
47#include "G4VSensitiveDetector.hh"
48
49/* Header file: C++ */
50#include <vector>
51#include <fstream>
52#include <utility>
53#include <map>
54
55class G4Step;
56class G4HCofThisEvent;
58class G4Svc;
59
60//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
62{
63public:
64 BesCgemSD(G4String);
65 ~BesCgemSD();
66
67 void Initialize(G4HCofThisEvent*);
68 void setGeomPtr(CgemGeomSvc* geomSvc) {m_cgemGeomSvc=geomSvc;}
69 G4bool ProcessHits(G4Step*, G4TouchableHistory*);
70 void EndOfEvent(G4HCofThisEvent*);
71
72 void BeginOfTruthEvent(const G4Event*);
73 void EndOfTruthEvent(const G4Event*);
74
75private:
76 BesCgemHitsCollection *m_collection_hit;
77 BesCgemHitsCollection *m_collection_truth;
78 BesCgemHit* myCgemTruth;
79 CgemGeomSvc* m_cgemGeomSvc;
80
81 typedef pair<G4int, G4int> KeyType;
82 map<KeyType, G4int> m_map_truth;
83 map<KeyType, G4int>::iterator m_map_truth_it;
84
85 //Add by sunxh
86 vector<int> hit_ID_vector;
87 G4int lvi_ID_hit ;
88 //end
89
90 int m_F_printTruth; /* Flag of whether print Truth or not: 0-OFF, 1-ON */
91 int m_F_outputTruth; /* Flag of whether output Truth or not: 0-OFF, 1-ON */
92 fstream m_outputTruth; /* Output Truth stream */
93 //int m_iEvent;
94};
95
96//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
97#endif
G4THitsCollection< BesCgemHit > BesCgemHitsCollection
Definition: BesCgemHit.hh:177
void EndOfTruthEvent(const G4Event *)
Definition: BesCgemSD.cc:164
void EndOfEvent(G4HCofThisEvent *)
Definition: BesCgemSD.cc:655
G4bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: BesCgemSD.cc:257
void setGeomPtr(CgemGeomSvc *geomSvc)
Definition: BesCgemSD.hh:68
void BeginOfTruthEvent(const G4Event *)
Definition: BesCgemSD.cc:155
void Initialize(G4HCofThisEvent *)
Definition: BesCgemSD.cc:138
Definition: G4Svc.h:32