CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SensitiveDetector.h
Go to the documentation of this file.
1 #ifndef SimG4Core_SensitiveDetector_H
2 #define SimG4Core_SensitiveDetector_H
3 
5 
6 //#include "DataFormats/GeometryVector/interface/LocalPoint.h"
7 //#include "DataFormats/GeometryVector/interface/LocalVector.h"
12 
13 #include "G4VSensitiveDetector.hh"
14 
15 #include <boost/cstdint.hpp>
16 #include <string>
17 
18 class G4Step;
19 class G4HCofThisEvent;
20 class G4TouchableHistory;
21 class G4VPhysicalVolume;
22 class DDCompactView;
23 
24 class SensitiveDetector : public G4VSensitiveDetector
25 {
26 public:
27  explicit SensitiveDetector(std::string & iname, const DDCompactView & cpv,
29  edm::ParameterSet const & p);
30  virtual ~SensitiveDetector();
31  virtual void Initialize(G4HCofThisEvent * eventHC);
32  virtual void clearHits() = 0;
33  virtual G4bool ProcessHits(G4Step * step ,G4TouchableHistory * tHistory) = 0;
34  virtual uint32_t setDetUnitId(G4Step * step) = 0;
35  void Register();
36  virtual void AssignSD(std::string & vname);
37  virtual void EndOfEvent(G4HCofThisEvent * eventHC);
42  std::string nameOfSD() { return name; }
43  virtual std::vector<std::string> getNames()
44  {
45  std::vector<std::string> temp;
46  temp.push_back(nameOfSD());
47  return temp;
48  }
49 
50  void NaNTrap( G4Step* step ) ;
51 
52 private:
53  std::string name;
54  G4Step * currentStep;
55 };
56 
57 #endif
virtual ~SensitiveDetector()
std::string nameOfSD()
list step
Definition: launcher.py:15
virtual uint32_t setDetUnitId(G4Step *step)=0
virtual void clearHits()=0
Local3DPoint ConvertToLocal3DPoint(G4ThreeVector point)
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory)=0
SensitiveDetector(std::string &iname, const DDCompactView &cpv, SensitiveDetectorCatalog &, edm::ParameterSet const &p)
type of data representation of DDCompactView
Definition: DDCompactView.h:77
virtual std::vector< std::string > getNames()
void NaNTrap(G4Step *step)
virtual void AssignSD(std::string &vname)
virtual void EndOfEvent(G4HCofThisEvent *eventHC)
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)