MW sensitive detector class based on G4VSensitiveDetector. More...
#include <MW_SD.h>
Public Member Functions | |
MW_SD (G4String name) | |
Constructor. | |
~MW_SD () | |
Destructor. | |
void | clear () |
In the event of an aborted event clear hit collections not assigned to the usual hit collection.. | |
void | DrawAll () |
Draw all hits. | |
void | EndOfEvent (G4HCofThisEvent *HCE) |
Routine to process hit information at the end of each event. | |
G4double | getThreshold () |
G4double | getXresol () |
G4double | getYresol () |
void | Initialize (G4HCofThisEvent *HCE) |
Initialise the hits collection. | |
void | PrintAll () |
Print all hits. | |
G4bool | ProcessHits (G4Step *step, G4TouchableHistory *ROhist) |
Routine to process each hit. | |
G4double | setThreshold (G4double) |
Set/Get energy threshold. | |
G4double | setXresol (G4double) |
Set/Get X resolution. | |
G4double | setYresol (G4double) |
Set/Get Y resolution. | |
Private Attributes | |
MW_HitsCollection * | MW_HC |
Data members. | |
G4AffineTransform | MW_LocaltoWorld [N_MW] |
G4double | MW_threshold |
Energy threshold for valid hit. | |
G4bool | MW_Transform [N_MW] |
G4AffineTransform | MW_WorldtoLocal [N_MW] |
Boolean if transforms defined. | |
G4double | MW_Xresol |
x resolution. | |
G4double | MW_Yresol |
y resolution. |
MW sensitive detector class based on G4VSensitiveDetector.
Creates the MW_SD class and provides the member routines for initialising the hits collection, processing of hits, and end of event action.
Definition at line 46 of file MW_SD.h.
MW_SD::MW_SD | ( | G4String | name ) |
Constructor.
Definition at line 50 of file MW_SD.cc.
References MW_Messenger::Instance(), MW_threshold, MW_Transform, MW_Xresol, MW_Yresol, N_MW, and MW_Messenger::setMW_SDptr().
void MW_SD::clear | ( | ) |
void MW_SD::EndOfEvent | ( | G4HCofThisEvent * | HCE ) |
Routine to process hit information at the end of each event.
Definition at line 172 of file MW_SD.cc.
References MW_Data::e, MW_Data::id, MW_HC, EventAction::mwdata, MW_Data::nMW, MW_Data::Reset(), MW_Data::t, MW_Data::tr, MW_Data::tx, MW_Data::txl, MW_Data::ty, MW_Data::tyl, MW_Data::tz, MW_Data::tzl, MW_Data::x, MW_Data::xl, MW_Data::y, MW_Data::yl, MW_Data::z, and MW_Data::zl.
G4double MW_SD::getThreshold | ( | ) |
Definition at line 226 of file MW_SD.cc.
References MW_threshold.
void MW_SD::Initialize | ( | G4HCofThisEvent * | HCE ) |
G4bool MW_SD::ProcessHits | ( | G4Step * | step, |
G4TouchableHistory * | ROhist | ||
) |
Routine to process each hit.
Stores all the hit information in the data members of the hit class. ROHist is only given if a readout geometry is associated with this detector.
Definition at line 92 of file MW_SD.cc.
References MW_Hit::copyno, MW_Hit::edep, MW_Hit::local, MW_HC, MW_LocaltoWorld, MW_threshold, MW_Transform, MW_WorldtoLocal, MW_Xresol, MW_Yresol, MW_Hit::time, MW_Hit::tlocal, MW_Hit::trackid, MW_Hit::tworld, and MW_Hit::world.
G4double MW_SD::setThreshold | ( | G4double | thres ) |
G4double MW_SD::setXresol | ( | G4double | res ) |
G4double MW_SD::setYresol | ( | G4double | res ) |
MW_HitsCollection* MW_SD::MW_HC [private] |
Data members.
Pointer to hits collection.
Definition at line 108 of file MW_SD.h.
Referenced by EndOfEvent(), Initialize(), PrintAll(), and ProcessHits().
G4AffineTransform MW_SD::MW_LocaltoWorld[N_MW] [private] |
Definition at line 120 of file MW_SD.h.
Referenced by ProcessHits().
G4double MW_SD::MW_threshold [private] |
Energy threshold for valid hit.
Definition at line 110 of file MW_SD.h.
Referenced by getThreshold(), MW_SD(), ProcessHits(), and setThreshold().
G4bool MW_SD::MW_Transform[N_MW] [private] |
Definition at line 115 of file MW_SD.h.
Referenced by MW_SD(), and ProcessHits().
G4AffineTransform MW_SD::MW_WorldtoLocal[N_MW] [private] |
Boolean if transforms defined.
Pointers to transformations.
Definition at line 119 of file MW_SD.h.
Referenced by ProcessHits().
G4double MW_SD::MW_Xresol [private] |
x resolution.
Definition at line 112 of file MW_SD.h.
Referenced by getXresol(), MW_SD(), ProcessHits(), and setXresol().
G4double MW_SD::MW_Yresol [private] |
y resolution.
Definition at line 113 of file MW_SD.h.
Referenced by getYresol(), MW_SD(), ProcessHits(), and setYresol().