CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEmcDigitizer.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oreiented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Descpirtion: EMC detector
5//Author: Hemiao
6//Created: Sep, 2004
7//Comment:
8//---------------------------------------------------------------------------//
9// $Id:BesEmcDigitizer.hh
10
11#ifndef BesEmcDigitizer_h
12#define BesEmcDigitizer_h 1
13
14#include "G4VDigitizerModule.hh"
15#include "BesEmcDigi.hh"
16#include "BesEmcHit.hh"
17#include "globals.hh"
18#include <vector>
19#include "GaudiKernel/NTuple.h"
20using namespace std;
21
22class BesEmcHit;
23class G4Svc;
25
27{
28 friend class BesEmcDigitizer;
29
30 public:
31
33 {
34 hitIndexes = new vector<G4int>;
35 }
37 {
38 partId = right.partId;
39 nTheta = right.nTheta;
40 nPhi = right.nPhi;
41 edep = right.edep;
42 hitIndexes =right.hitIndexes;
43 }
45 {
46 partId = right.partId;
47 nTheta = right.nTheta;
48 nPhi = right.nPhi;
49 edep = right.edep;
50 hitIndexes =right.hitIndexes;
51 return *this;
52 }
54 {
55 delete hitIndexes;
56 }
57
58 G4int GetPartId() {return partId;}
59 G4int GetNTheta() {return nTheta;}
60 G4int GetNPhi() {return nPhi;}
61 G4double GetEdep() {return edep;}
62 vector<G4int>* GetHitIndexes() {return hitIndexes;}
63
64 void SetPartId(G4int id) {partId = id;}
65 void SetNTheta(G4int theta) {nTheta = theta;}
66 void SetNPhi(G4int phi) {nPhi = phi;}
67 void SetEdep(G4double e) {edep = e;}
68 void AddEdep(G4double e) {edep += e;}
69
70 private:
71
72 G4int partId;
73 G4int nTheta;
74 G4int nPhi;
75 G4double edep;
76 vector<G4int>* hitIndexes;
77};
78
79class BesEmcDigitizer : public G4VDigitizerModule
80{
81public:
82 BesEmcDigitizer(G4String modName);
84
85public:
86 virtual void Digitize();
87 virtual void GroupHits(BesEmcHitsCollection*);
88 // Add noise to 5x5 matrix around the seed
89 virtual void AddNoise5x5(G4double coherentNoise);
90 // Add noise to all crystals
91 virtual void AddNoiseAll(G4double coherentNoise);
92
93private: //memory size needed optimizing
94 void Initialize();
95// void Smear();
96
97private:
98 BesEmcDigitsCollection* m_besEmcDigitsCollection;
99 vector<CrystalSingle*>* m_crystalGroup;
100 G4double m_energy;
101
102private:
103 G4Svc* m_G4Svc;
104 IEmcCalibConstSvc *m_emcCalibConstSvc;
105 NTuple::Tuple* m_tupleEmc1; //digi level
106 NTuple::Item<long> m_partId;
107 NTuple::Item<long> m_nTheta;
108 NTuple::Item<long> m_nPhi;
109 NTuple::Item<double> m_eDep;
110 NTuple::Item<long> m_nHits;
111 NTuple::Item<double> m_adc;
112 NTuple::Item<long> m_tdc;
113
114 NTuple::Tuple* m_tupleEmc2; //event level
115 NTuple::Item<double> m_eTot;
116 NTuple::Item<long> m_nDigi;
117
118};
119#endif
G4TDigiCollection< BesEmcDigi > BesEmcDigitsCollection
Definition: BesEmcDigi.hh:69
G4THitsCollection< BesEmcHit > BesEmcHitsCollection
Definition: BesEmcHit.hh:83
const int nPhi
virtual void AddNoiseAll(G4double coherentNoise)
virtual void AddNoise5x5(G4double coherentNoise)
virtual void GroupHits(BesEmcHitsCollection *)
virtual void Digitize()
void SetNTheta(G4int theta)
vector< G4int > * GetHitIndexes()
const CrystalSingle & operator=(const CrystalSingle &right)
G4double GetEdep()
void SetNPhi(G4int phi)
void AddEdep(G4double e)
CrystalSingle(const CrystalSingle &right)
void SetPartId(G4int id)
void SetEdep(G4double e)
Definition: G4Svc.h:32