MyTrackerHit.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef SOMEEXPERIMENT_MYTRACKERHIT_H
14 #define SOMEEXPERIMENT_MYTRACKERHIT_H
15 
17 #include "DDG4/Geant4Data.h"
18 
19 namespace SomeExperiment {
20 
22 
39  class MyTrackerHit /* : public dd4hep::sim::Geant4HitData */ {
40 
41  public:
43  long long int cellID = 0;
45  long flag = 0;
47  long g4ID = -1;
48 
49 
51  dd4hep::Position position;
53  dd4hep::Direction momentum;
55  double length = 0;
57  dd4hep::sim::Geant4HitData::MonteCarloContrib truth;
59  double energyDeposit = 0;
60 
61  public:
63  MyTrackerHit() = default;
65  MyTrackerHit(int track_id, int pdg_id, double deposit, double time_stamp)
66  : length(0.0), truth(track_id, pdg_id, deposit, time_stamp, 0.), energyDeposit(deposit) {}
68  virtual ~MyTrackerHit() = default;
74  MyTrackerHit& storePoint(const G4Step* step, const G4StepPoint* pnt);
75  };
76 }
77 
78 // CINT configuration
79 #if defined(__CINT__) || defined(__MAKECINT__) || defined(__CLING__) || defined(__ROOTCLING__)
80 #pragma link off all globals;
81 #pragma link off all classes;
82 #pragma link off all functions;
83 
85 #pragma link C++ namespace dd4hep;
86 #pragma link C++ namespace dd4hep::sim;
87 #pragma link C++ namespace SomeExperiment;
88 #pragma link C++ class SomeExperiment::MyTrackerHit+;
89 #endif
90 
91 #endif /* SOMEEXPERIMENT_MYTRACKERHIT_H */
MyTrackerHit & storePoint(const G4Step *step, const G4StepPoint *pnt)
Store Geant4 point and step information into tracker hit structure.
long flag
dd4hep::sim::Geant4HitData: User flag to classify hits
Definition: MyTrackerHit.h:45
double energyDeposit
Energy deposit in the tracker hit.
Definition: MyTrackerHit.h:59
This is the hit definition.
Definition: MyTrackerHit.h:39
double length
Length of the track segment contributing to this hit.
Definition: MyTrackerHit.h:55
virtual ~MyTrackerHit()=default
Default destructor.
long long int cellID
dd4hep::sim::Geant4HitData: cellID
Definition: MyTrackerHit.h:43
MyTrackerHit()=default
Default constructor.
dd4hep::Direction momentum
Hit direction.
Definition: MyTrackerHit.h:53
MyTrackerHit(int track_id, int pdg_id, double deposit, double time_stamp)
Initializing constructor.
Definition: MyTrackerHit.h:65
Framework include files.
Definition: MyTrackerHit.h:19
MyTrackerHit & clear()
Clear hit content.
dd4hep::sim::Geant4HitData::MonteCarloContrib truth
Monte Carlo / Geant4 information.
Definition: MyTrackerHit.h:57
MyTrackerHit & operator=(const MyTrackerHit &c)
Assignment operator.
dd4hep::Position position
Hit position.
Definition: MyTrackerHit.h:51
long g4ID
dd4hep::sim::Geant4HitData: Original Geant 4 track identifier of the creating track (debugging)
Definition: MyTrackerHit.h:47