How to check when particle enters the SD volume?

Hi everyone!

I want to check how many particles cross my calorimeter cell. And count number of particles with pz>0 and pz<=0

To do this, i check for any particles which entry my calorimeter cell volume with a following code:

G4bool MySensitiveDetector::ProcessHits(G4Step *step, G4TouchableHistory*){
    ......
    const G4VProcess* currentProcess=preStepPoint->GetProcessDefinedStep();
    if(currentProcess != 0){
        const G4String & stepProcessName = currentProcess->GetProcessName();
        G4String volumePos = step->GetTrack()->GetNextVolume()->GetName();
        if(stepProcessName == "Transportation" && volumePos == "Si"){
            G4double pz = (step->GetTrack()->GetMomentum()).getZ();
            if(pz > 0.) hit->AddDirParticle();
            else hit->AddBSParticle();
        }
    }

But in the result I have a lot of energy deposits in cells with
n_dir_particles =0 and n_bs_particles = 0.

Do some particles can enter the SD volume omitting Transportation process?
Or something wrong with my code for volumes boundary cross check?

EDIT:
I found more elegant way to do it, but still I found some cells with energy deposits and no particles are seen on boundaries
Now I do it this way:

if(preStepPoint->GetStepStatus() == fGeomBoundary)

thanks and have a nice day,
Bohdan