B1TrackingAction.hh 1.07 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15


#ifndef TrackingAction_h
#define TrackingAction_h

#include "G4UserTrackingAction.hh"
#include "G4LogicalVolume.hh"
#include <map>

class G4Region;
class G4ParticleDefinition;
class B1DetectorConstruction;


class B1TrackingAction : public G4UserTrackingAction
Marcos Derós's avatar
Marcos Derós committed
16
{
17
18
19
20
21
22
23
24
25
private:
  //aqui ficam as  variáveis da classe
  B1DetectorConstruction* fworld;
  G4Region* fworldRegion;
  G4LogicalVolume* worldVolume;
  const G4ParticleDefinition* particle_def;
  std::map<const G4ParticleDefinition*, int> fNParticleOutsideWorld;
  std::map<const G4ParticleDefinition*, int> fNParticleInWorld;

Marcos Derós's avatar
Marcos Derós committed
26
public:
27
28
29
30
31
32
33
34
35
 //aqui ficam as funçes que a classe terá
    B1TrackingAction(B1DetectorConstruction* world); //construtor
    ~B1TrackingAction(); //destrutor
    virtual void PreUserTrackingAction(const G4Track* track);

    std::map<const G4ParticleDefinition*, int>& GetNParticlesCreatedOutsideWorld()
    {
        return fNParticleOutsideWorld;
    }
Marcos Derós's avatar
Marcos Derós committed
36

37
38
39
40
41
42
    std::map<const G4ParticleDefinition*, int>& GetNParticlesCreatedInWorld()
    {
        return fNParticleInWorld;
    }
    void clearParticles();
};
Marcos Derós's avatar
Marcos Derós committed
43

44
#endif