85{
87 G4DigiManager* digiManager = G4DigiManager::GetDMpointer();
88 G4int THCID = digiManager->GetHitsCollectionID("BesTofHitsCollection");
90
91
92
93
94
95
96 if(m_THC)
97 {
98
99
100 m_scintGroup = new vector<ScintSingle*>;
102 G4int size=m_scintGroup->size();
103
104
105
106
108 G4int partId;
109 for (G4int i=0;i<size;i++)
110 {
111 scint = (*m_scintGroup)[i];
113
114
115
116 if (partId==1)
117 {
118 if (m_versionBr==1)
119 tofDMBr1->
Digitize(scint,m_besTofDigitsCollection);
120 else if (m_versionBr==2){
121
122 tofDMBr2->
Digitize(scint,m_besTofDigitsCollection);
123 }
124 else
125 tofDMBr2->
Digitize(scint,m_besTofDigitsCollection);
126 }
127 else
128 {
129 if (m_versionEc==1)
130 tofDMEc1->
Digitize(scint,m_besTofDigitsCollection);
131 else if (m_versionEc==2)
132 tofDMEc2->
Digitize(scint,m_besTofDigitsCollection);
133 else if (m_versionEc==3){
134 tofDMEc3->
Digitize(scint,m_besTofDigitsCollection);}
135 else if (m_versionEc==4)
136 tofDMEc4->
Digitize(scint,m_besTofDigitsCollection);
137 else
138 {
139 cout << "Warning: BesTofDigitizerEcV2 is utilized otherwise!" << endl;
140 tofDMEc2->
Digitize(scint,m_besTofDigitsCollection);
141 }
142 }
143 }
144 if (m_scintGroup)
145 {
146 for (size_t i=0;i<m_scintGroup->size();i++)
147 {
148 delete (*m_scintGroup)[i];
149
150
151 }
152 m_scintGroup->clear();
153 delete m_scintGroup;
154 }
155
156 }
157
158 StoreDigiCollection(m_besTofDigitsCollection);
159}
G4TDigiCollection< BesTofDigi > BesTofDigitsCollection
G4THitsCollection< BesTofHit > BesTofHitsCollection
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)