80 {
81
83 G4DigiManager* digiManager = G4DigiManager::GetDMpointer();
84 G4int THCID = digiManager->GetHitsCollectionID("BesTofHitsCollection");
86
87 if( m_THC ) {
88 m_scintGroup = new vector<ScintSingle*>;
90 G4int size = m_scintGroup->size();
91
92
93
95 G4int partId;
96 for( G4int i=0; i<size; i++ ) {
97 scint = (*m_scintGroup)[i];
99
100
101
102 if( partId==1 ) {
103 if( m_versionBr==1 )
104 tofDMBr1->
Digitize(scint,m_besTofDigitsCollection);
105 else if( m_versionBr==2 ) {
106
107 tofDMBr2->
Digitize(scint,m_besTofDigitsCollection);
108 }
109 else {
110 tofDMBr2->
Digitize(scint,m_besTofDigitsCollection);
111 }
112 }
113 else {
114 if( m_versionEc==1 ) {
115 tofDMEc1->
Digitize(scint,m_besTofDigitsCollection);
116 }
117 else if( m_versionEc==2 ) {
118 tofDMEc2->
Digitize(scint,m_besTofDigitsCollection);
119 }
120 else if( m_versionEc==3 ) {
121 tofDMEc3->
Digitize(scint,m_besTofDigitsCollection);
122 }
123 else if( m_versionEc==4 ) {
124 tofDMEc4->
Digitize(scint,m_besTofDigitsCollection);
125 }
126 else {
127 cout << "TofSim: Warning: BesTofDigitizerEcV2 is utilized otherwise!" << endl;
128 tofDMEc2->
Digitize(scint,m_besTofDigitsCollection);
129 }
130 }
131 }
132
133 if( m_scintGroup ) {
134 for( size_t i=0; i<m_scintGroup->size(); i++ ) {
135 delete (*m_scintGroup)[i];
136
137
138 }
139 m_scintGroup->clear();
140 delete m_scintGroup;
141 }
142 }
143
144 StoreDigiCollection(m_besTofDigitsCollection);
145}
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 *)