Skip to content

Commit

Permalink
Const-correct G4Step* in Geant4SensitiveAction::process
Browse files Browse the repository at this point in the history
As required by dd4hep v1-21 (changed in AIDASoft/DD4hep#933)
  • Loading branch information
vvolkl committed Jul 22, 2022
1 parent f686d53 commit ec82528
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plugins/CaloPreShowerSDAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace dd4hep {
}

/// Method for generating hit(s) using the information of G4Step object.
template <> bool Geant4SensitiveAction<CalorimeterWithPreShowerLayer>::process(G4Step* step,G4TouchableHistory*) {
template <> bool Geant4SensitiveAction<CalorimeterWithPreShowerLayer>::process(const G4Step* step,G4TouchableHistory*) {
typedef CalorimeterWithPreShowerLayer::Hit Hit;
Geant4StepHandler h(step);
HitContribution contrib = Hit::extractContribution(step);
Expand Down
10 changes: 5 additions & 5 deletions plugins/TPCSDAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace dd4hep {


/// return the layer number of the volume (either pre or post-position )
int getCopyNumber(G4Step* s, bool usePostPos ){
int getCopyNumber(const G4Step* s, bool usePostPos ){

int cellID = this->volID( s , usePostPos) ;

Expand All @@ -93,7 +93,7 @@ namespace dd4hep {


/// Returns the volumeID of sensitive volume corresponding to the step (either pre or post-position )
long long int volID( G4Step* s, bool usePostPos=false ) {
long long int volID(const G4Step* s, bool usePostPos=false ) {

Geant4StepHandler h(s);

Expand Down Expand Up @@ -129,7 +129,7 @@ namespace dd4hep {


/// Method for generating hit(s) using the information of G4Step object.
G4bool process(G4Step* step, G4TouchableHistory* ) {
G4bool process(const G4Step* step, G4TouchableHistory* ) {


fHitCollection = sensitive->collection(0) ;
Expand Down Expand Up @@ -450,7 +450,7 @@ namespace dd4hep {
ResetCumulativeVariables();
}

void CumulateLowPtStep(G4Step *step)
void CumulateLowPtStep(const G4Step *step)
{

const G4ThreeVector meanPosition = (step->GetPreStepPoint()->GetPosition() + step->GetPostStepPoint()->GetPosition()) / 2;
Expand Down Expand Up @@ -501,7 +501,7 @@ namespace dd4hep {

/// Method for generating hit(s) using the information of G4Step object.
template <> G4bool
Geant4SensitiveAction<TPCSDData>::process(G4Step* step, G4TouchableHistory* history) {
Geant4SensitiveAction<TPCSDData>::process(const G4Step* step, G4TouchableHistory* history) {
return m_userData.process(step, history);
}

Expand Down

0 comments on commit ec82528

Please sign in to comment.