GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSTouchableIDComputer.h
1 /*
2  * GGSTouchableIDComputer.h
3  *
4  * Created on: 3 Jun 3 2020
5  * Author: Nicola Mori
6  */
7 
8 #ifndef GGSTOUCHABLEIDCOMPUTER_H_
9 #define GGSTOUCHABLEIDCOMPUTER_H_
10 
11 class G4Step;
12 
21 public:
24 
30  virtual int ComputeTouchableID(G4Step *aStep) = 0;
31 };
32 
33 #include "utils/GGSFactory.h"
34 
36 #define RegisterTIDC(className) \
37  GGSTouchableIDComputer *className##Builder() { return new className(); } \
38  class className##Proxy { \
39  public: \
40  className##Proxy() { \
41  GGSFactory<GGSTouchableIDComputer>::GetInstance().RegisterBuilder(#className, className##Builder); \
42  } \
43  }; \
44  className##Proxy proxyFor##className
45 #endif /* GGSTOUCHABLEIDCOMPUTER_H_ */
virtual ~GGSTouchableIDComputer()
Destructor.
virtual int ComputeTouchableID(G4Step *aStep)=0
Computes the numeric ID for the touchable.
Interface for volume ID calculator classes.