BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcSim/MdcSim/BesMdcSD.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------
4//Description: Sensitive detector definition for axial layers of MDC
5//Author: Yuan Ye([email protected])
6//Created: 4 Dec, 2003
7//Modified:
8//Comment: Used in "BesMdc"
9//---------------------------------------------------------------------------//
10
11#ifndef BesMdcSD_h
12#define BesMdcSD_h 1
13class TFile;
14class TH1F;
15class G4Svc;
16
17//#include "G4VSensitiveDetector.hh"
18#include "BesSensitiveDetector.hh"
19#include "BesMdcHit.hh"
20#include "BesMdcGeoParameter.hh"
21#include "BesMdcCalTransfer.hh"
22#include "MdcGeomSvc/MdcGeomSvc.h"
23#include "CalibDataSvc/CalibDataSvc.h"
24#include "DedxCurSvc/DedxCurSvc.h"
25#include "GaudiKernel/NTuple.h"
26#include "TF1.h"
27
28#include <vector>
29
30class G4Step;
31class G4HCofThisEvent;
33class G4Svc;
34
36{
37public:
38 BesMdcSD(G4String);
39 ~BesMdcSD();
40
41 void Initialize(G4HCofThisEvent*);
42 G4bool ProcessHits(G4Step*, G4TouchableHistory*);
43 void EndOfEvent(G4HCofThisEvent*);
44
45 void BeginOfTruthEvent(const G4Event*);
46 void EndOfTruthEvent(const G4Event*);
47
48 G4double Distance(G4int, G4int,G4ThreeVector,G4ThreeVector,G4ThreeVector&,G4double&);
49
50 void dedxFuncInti(void);
51
52private:
53 G4int hitPointer[43][288],truthPointer[43][288];
54 BesMdcHitsCollection* hitsCollection;
55 BesMdcHitsCollection* truthCollection;
56 BesMdcGeoParameter* mdcGeoPointer;
57 BesMdcCalTransfer* mdcCalPointer;
58 MdcGeomSvc* mdcGeomSvc;
59 G4Svc* m_G4Svc;
60 TF1 *dEdE_mylanfunc;
61
62 ///dedx sim ---------------------------
63 CalibDataSvc* m_calibDataSvc;
64 IDedxCurSvc* m_pDedxCurSvc;
65 TH1F* m_dedx_hists;
66 G4int m_version;
67 G4int m_numDedxHists;
68 G4int m_numBg;
69 G4int m_numTheta;
70 std::vector<G4double> m_bgRange;
71 G4int GetBetagammaIndex(G4double bg);
72 G4int GetAngleIndex(G4double);
73 G4int GetChargeIndex(G4int);
74 G4double GetValDedxCurve(G4double bg, G4double charge);
75 G4double dedxSample(G4double betagamma, G4double length, G4double theta);
76
77 //dedx ntuple
78 NTuple::Tuple* m_tupleMdc;
79 NTuple::Item<double> m_betaGamma;
80 NTuple::Item<double> m_fitval;
81 NTuple::Item<double> m_random;
82 NTuple::Item<double> m_dedx;
83 NTuple::Item<double> m_de;
84 //NTuple::Item<double> m_length;
85 NTuple::Item<double> m_charge;
86 NTuple::Item<double> m_costheta;
87 ///------------------------------------
88};
89
90#endif
91
G4THitsCollection< BesMdcHit > BesMdcHitsCollection
void bg(int i, double p)
Definition: betagamma.cxx:1
void dedxFuncInti(void)
Definition: BesMdcSD.cc:436
void BeginOfTruthEvent(const G4Event *)
Definition: BesMdcSD.cc:131
void EndOfTruthEvent(const G4Event *)
Definition: BesMdcSD.cc:138
G4double Distance(G4int, G4int, G4ThreeVector, G4ThreeVector, G4ThreeVector &, G4double &)
Definition: BesMdcSD.cc:375
G4bool ProcessHits(G4Step *, G4TouchableHistory *)
Definition: BesMdcSD.cc:149
void EndOfEvent(G4HCofThisEvent *)
Definition: BesMdcSD.cc:362
~BesMdcSD()
Definition: BesMdcSD.cc:109