BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMdcDigitizer.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Description:
5//Author: Yuan Ye([email protected])
6//Created: Oct. 26, 2004
7//Modified:
8//Comment:
9//---------------------------------------------------------------------------//
10
11#ifndef BesMdcDigitizer_h
12#define BesMdcDigitizer_h 1
13
15class TFile;
16class TH1F;
17class G4Svc;
18#include "GaudiKernel/NTuple.h"
19
20#include "G4VDigitizerModule.hh"
21#include "BesMdcDigi.hh"
22#include "BesMdcGeoParameter.hh"
23#include "BesMdcCalTransfer.hh"
26
27#include "globals.hh"
28#include <vector>
29
30class BesMdcDigitizer : public G4VDigitizerModule
31{
32public:
33 BesMdcDigitizer(G4String modName);
35
36 //necessary digi collection object must be constructed and set to
37 //G4DCofThisEvent by StoreDigiCollection protected method.
38 virtual void Digitize();
39 void SetNoiseFlag(G4int flag){noiseFlag=flag;}
40 void SetNoiseType(G4int type){noiseType=type;}
41 void SetNoiseLevel(G4double level){noiseLevel=level;}
42
43 void SetSmearFlag(G4int flag){smearFlag=flag;}
44 void SetMdcDRes(G4double res){mdcDRes=res;}
45
46 void SetEffFlag(G4int flag){effFlag=flag;}
47 void SetEff(G4int layer, G4double eff);
48
49
50private:
51 G4double Smear(G4double);
52 G4double Smear(G4double, G4double,G4double);
53 G4double Smear(G4double, G4double,G4double,G4double,G4double,G4double);
54 G4double Smear(G4double, G4double,G4double,G4double,G4double,G4double,G4double,G4double,G4double);//liukai 2012-6-4
55 void AddNoise(void);
56 void AddNoise2(void);
57private:
58 G4int noiseFlag; //1: Add noise; 0: do nothing
59 G4int noiseType; //Noise level distribution mode. 0: N(r)=N0; 1: N(r)=N0*r0/r; 2: N(r)=N0*r0^2/r^2
60 G4double noiseLevel; // Noise level of first layer
61 G4double maxNoiseT; //Max drift time of Mdc, maybe change to layer dependence
62
63 G4int smearFlag; //0: do nothing; 1: smear(double gauss); 2: smear(fix sigma) default is 1
64 G4double mdcDRes; //Space resolution of wire, default is 130um by now
65
66 G4int effFlag;//0: from CalFunSvc; 1: from file
67 vector<G4double> layerEff;
68 vector<G4double> mixLevel;
69
70 G4int digiPointer[43][288];//pointer to digisCollection
71 BesMdcDigisCollection* digisCollection;
72 BesMdcDigitizerMessenger* digitizerMessenger;
73 BesMdcGeoParameter* mdcGeoPointer;
74 BesMdcCalTransfer* mdcCalPointer;
75 MdcTunningSvc* mdcTunningSvc;
76
77 TFile* f;
78 TH1F* h1;
79 TH1F* h2;
80 TH1F* h3;
81
82 G4Svc* m_G4Svc;
83 NTuple::Tuple* m_tupleMdc;
84 NTuple::Item<long> m_NHits;
85 NTuple::Item<long> m_layerId;
86 NTuple::Item<long> m_cellId;
87 NTuple::Item<double> m_edep;
88 NTuple::Item<double> m_driftD;
89 // NTuple::Item<double> m_driftT;
90 NTuple::Item<double> m_globalT;
91 NTuple::Item<double> m_theta;
92 NTuple::Item<double> m_enterAngle;
93 NTuple::Item<double> m_driftDNew;
94 NTuple::Item<double> m_driftTNew;
95 // NTuple::Item<double> m_adc;
96 // NTuple::Item<double> m_tdc;
97};
98
99#endif
100
G4TDigiCollection< BesMdcDigi > BesMdcDigisCollection
Definition: BesMdcDigi.hh:59
void SetMdcDRes(G4double res)
virtual void Digitize()
void SetNoiseType(G4int type)
void SetNoiseFlag(G4int flag)
void SetEffFlag(G4int flag)
void SetNoiseLevel(G4double level)
void SetSmearFlag(G4int flag)
void SetEff(G4int layer, G4double eff)
Definition: G4Svc.h:32