89 {
90 if (verboseLevel >= 10) {
91 G4cout << "MuonWallSD::ProcessHits" << G4endl;
92 }
93
94 const G4TouchableHistory* theTouchable = static_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable());
95 const G4VPhysicalVolume* physVol = theTouchable->GetVolume();
96 const G4LogicalVolume* logiVol = physVol->GetLogicalVolume();
97 const G4String nameLogiVol = logiVol->GetName();
98 const G4int nScinti = physVol->GetCopyNo();
99
100 const G4double edep = aStep->GetTotalEnergyDeposit() * aStep->GetTrack()->GetWeight();
101 G4double stepl = 0.;
102
103 if (aStep->GetTrack()->GetDefinition()->GetPDGCharge() != 0.){
104
105 stepl = aStep->GetStepLength();
106 }
107
108 if ((edep == 0.) && (stepl == 0.)) {
109
110 return false;
111 }
112
114
115 if(nameLogiVol.find("MuScintillatorLayer") !=G4String::npos) {
116
118 } else if(nameLogiVol.find("S1") !=G4String::npos) {
120 } else if(nameLogiVol.find("S2") !=G4String::npos) {
122 } else if(nameLogiVol.find("S3") !=G4String::npos) {
124 } else {
126 }
127
128 if (verboseLevel >= 10) {
130 G4cout << ((hitCollection && hitCollection->HasHit(ind))?"Additional hit in ":"First hit in ")
133 << " time=" << aStep->GetPostStepPoint()->GetGlobalTime()
134 << " ene=" << edep << G4endl;
135 }
136
138 if (!hitCollection) {
139 if (verboseLevel >= 5) {
140 G4cout << "MuonWallSD::ProcessHits WARNING hit collection is not available" << G4endl;
141 }
142 return false;
143 }
145 hitCollection->AddHit(ind,
m_id[ind], edep);
146
147 return true;
148}