CMS 3D CMS Logo

SensitiveDetector.h
Go to the documentation of this file.
1 #ifndef SimG4Core_SensitiveDetector_H
2 #define SimG4Core_SensitiveDetector_H
3 
5 
10 
11 #include "G4VSensitiveDetector.hh"
12 
13 #include <boost/cstdint.hpp>
14 #include <string>
15 
16 class G4Step;
17 class G4HCofThisEvent;
18 class G4TouchableHistory;
19 class G4VPhysicalVolume;
20 class DDCompactView;
21 
22 class SensitiveDetector : public G4VSensitiveDetector
23 {
24 public:
25  explicit SensitiveDetector(std::string & iname, const DDCompactView & cpv,
26  const SensitiveDetectorCatalog & ,
27  edm::ParameterSet const & p);
28  virtual ~SensitiveDetector();
29  virtual void Initialize(G4HCofThisEvent * eventHC);
30  virtual void clearHits() = 0;
31  virtual G4bool ProcessHits(G4Step * step ,G4TouchableHistory * tHistory) = 0;
32  virtual uint32_t setDetUnitId(G4Step * step) = 0;
33  void Register();
34  virtual void AssignSD(const std::string & vname);
35  virtual void EndOfEvent(G4HCofThisEvent * eventHC);
39  Local3DPoint ConvertToLocal3DPoint(const G4ThreeVector& point);
40  std::string nameOfSD() { return name; }
41  virtual std::vector<std::string> getNames()
42  {
43  std::vector<std::string> temp;
44  temp.push_back(nameOfSD());
45  return temp;
46  }
47 
48  void NaNTrap( G4Step* step ) ;
49 
50 private:
52  G4Step * currentStep;
53 };
54 
55 #endif
virtual ~SensitiveDetector()
std::string nameOfSD()
virtual uint32_t setDetUnitId(G4Step *step)=0
virtual void clearHits()=0
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory)=0
type of data representation of DDCompactView
Definition: DDCompactView.h:90
SensitiveDetector(std::string &iname, const DDCompactView &cpv, const SensitiveDetectorCatalog &, edm::ParameterSet const &p)
virtual void AssignSD(const std::string &vname)
Local3DPoint ConvertToLocal3DPoint(const G4ThreeVector &point)
virtual std::vector< std::string > getNames()
void NaNTrap(G4Step *step)
virtual void EndOfEvent(G4HCofThisEvent *eventHC)
step
Local3DPoint FinalStepPosition(G4Step *s, coordinates)
Local3DPoint InitialStepPosition(G4Step *s, coordinates)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
virtual void Initialize(G4HCofThisEvent *eventHC)