Belle II Software development
|
The Class for CDC Sensitive Detector. More...
#include <CDCSensitiveDetector.h>
Public Member Functions | |
CDCSensitiveDetector (G4String name, G4double thresholdEnergyDeposit, G4double thresholdKineticEnergy) | |
Constructor. | |
~CDCSensitiveDetector () | |
Destructor. | |
void | Initialize (G4HCofThisEvent *) override |
Register CDC hits collection into G4HCofThisEvent. | |
bool | step (G4Step *aStep, G4TouchableHistory *history) override |
Process each step and calculate variables defined in CDCB4VHit. | |
void | EndOfEvent (G4HCofThisEvent *) override |
Do what you want to do at the beginning of each event (why this is not called ?) | |
void | saveSimHit (const G4int layerId, const G4int wireId, const G4int trackID, const G4int pid, const G4double distance, const G4double tof, const G4double edep, const G4double stepLength, const G4ThreeVector &mom, const G4ThreeVector &posW, const G4ThreeVector &posIn, const G4ThreeVector &posOut, const G4ThreeVector &posTrack, const G4int lr, const G4int NewLrRaw, const G4int NewLr, const G4double speed, const G4double hitWeight) |
Save CDCSimHit into datastore. | |
Static Public Member Functions | |
static const std::map< std::string, RelationArray::EConsolidationAction > & | getMCParticleRelations () |
Return a list of all registered Relations with MCParticles. | |
static void | setActive (bool activeStatus) |
Enable/Disable all Sensitive Detectors. | |
static void | registerMCParticleRelation (const std::string &name, RelationArray::EConsolidationAction ignoreAction=RelationArray::c_negativeWeight) |
Register an relation involving MCParticles. | |
static void | registerMCParticleRelation (const RelationArray &relation, RelationArray::EConsolidationAction ignoreAction=RelationArray::c_negativeWeight) |
Overload to make it easer to register MCParticle relations. | |
Private Member Functions | |
G4double | ClosestApproach (G4ThreeVector bwp, G4ThreeVector fwp, G4ThreeVector posIn, G4ThreeVector posOut, G4ThreeVector &hitPosition, G4ThreeVector &wirePosition) |
Assume line track to calculate distance between track and wire (drift length). | |
void | CellBound (const G4int layerId, const G4int ic1, const G4int ic2, const G4double venter[6], const G4double vexit[6], const G4double s1, const G4double s2, G4double xint[6], G4double &sint, G4int &iflag) |
Calculate intersection of track with cell boundary. | |
void | GCUBS (const G4double x, const G4double y, const G4double d1, const G4double d2, G4double a[4]) |
void | for_Rotat (const G4double bfld[3]) |
Calculates a rotation matrix. | |
void | Rotat (G4double &x, G4double &y, G4double &z, const int mode) |
Translation method. | |
void | Rotat (G4double x[3], const int mode) |
Overloaded translation method. | |
void | HELWIR (const G4double xwb4, const G4double ywb4, const G4double zwb4, const G4double xwf4, const G4double ywf4, const G4double zwf4, const G4double xp, const G4double yp, const G4double zp, const G4double px, const G4double py, const G4double pz, const G4double B_kG[3], const G4double charge, const G4int ntryMax, G4double &distance, G4double q2[3], G4double q1[3], G4double q3[3], G4int &ntry) |
Calculate closest points between helix and wire. | |
void | Mvopr (const G4int ndim, const G4double b[3], const G4double m[3][3], const G4double a[3], G4double c[3], const G4int mode) |
Calculate the result of a matrix times vector. | |
std::vector< int > | WireId_in_hit_order (int id0, int id1, int nWires) |
Sort wire id. | |
void | setModifiedLeftRightFlag () |
set left/right flag modified for tracking | |
void | reAssignLeftRightInfo () |
Re-assign left/right info. | |
unsigned short | areNeighbors (const WireID &wireId, const WireID &otherWireId) const |
Check if neighboring cell in the same super-layer; essentially a copy from cdcLocalTracking/mclookup. | |
unsigned short | areNeighbors (unsigned short iCLayer, unsigned short iSuperLayer, unsigned short iLayer, unsigned short iWire, const WireID &otherWireId) const |
Check if neighboring cell in the same super-layer; essentially a copy from cdcLocalTracking/mclookup. | |
virtual bool | ProcessHits (G4Step *aStep, G4TouchableHistory *aROhist) |
Check if recording hits is enabled and if so call step() and set the correct MCParticle flag. | |
Private Attributes | |
StoreArray< MCParticle > | m_MCParticles |
MC particles. | |
StoreArray< CDCSimHit > | m_CDCSimHits |
CDC simulation hits. | |
G4int | m_magneticField |
Magnetic field is on or off. | |
G4int | m_nonUniformField |
Magnetic field is uniform or non-uniform. | |
G4double | m_brot [3][3] |
a rotation matrix. | |
CDCGeometryPar * | m_cdcgp |
Pointer to CDCGeometryPar object. | |
G4double | m_thresholdEnergyDeposit |
Threshold energy deposit to be stored. | |
G4double | m_thresholdKineticEnergy |
Threshold kinetic energy to be stored. | |
G4bool | m_wireSag |
Switch to activate wire sag effect. | |
G4bool | m_modifiedLeftRightFlag |
Switch for left/right flag modified for tracking. | |
G4double | m_minTrackLength |
Min. | |
int | m_hitNumber |
The current number of created hits in an event. | |
std::multimap< unsigned short, CDCSimHit * > | m_hitWithPosWeight |
Map containing hits with positive weight. | |
std::vector< CDCSimHit * > | m_hitWithNegWeight |
Vector containing hits with negative weight. | |
const signed short | CCW = 1 |
Constant for counterclockwise orientation. | |
const signed short | CW = -1 |
Constant for clockwise orientation. | |
const signed short | CW_OUT_NEIGHBOR = 1 |
Constant for clockwise outwards. | |
const signed short | CW_NEIGHBOR = 3 |
Constant for clockwise. | |
const signed short | CW_IN_NEIGHBOR = 5 |
Constant for clockwise inwards. | |
const signed short | CCW_IN_NEIGHBOR = 7 |
Constant for counterclockwise inwards. | |
const signed short | CCW_NEIGHBOR = 9 |
Constant for counterclockwise. | |
const signed short | CCW_OUT_NEIGHBOR = 11 |
Constant for counterclockwise outwards. | |
Const::EDetector | m_subdetector |
Subdetector the class belongs to. | |
Static Private Attributes | |
static std::map< std::string, RelationArray::EConsolidationAction > | s_mcRelations |
Static set holding all relations which have to be updated at the end of the Event. | |
static bool | s_active |
Static bool which indicates wether recording of hits is enabled. | |
The Class for CDC Sensitive Detector.
In this class, every variable defined in CDCB4VHit will be calculated. And save CDCB4VHit into hits collection.
Definition at line 38 of file CDCSensitiveDetector.h.
|
inline |
|
inlinestaticinherited |
Return a list of all registered Relations with MCParticles.
Definition at line 42 of file SensitiveDetectorBase.h.
|
inlineprivatevirtualinherited |
Check if recording hits is enabled and if so call step() and set the correct MCParticle flag.
Called by Geant4 for each step inside the sensitive volumes attached
Definition at line 94 of file SensitiveDetectorBase.h.
|
inlinestaticinherited |
Overload to make it easer to register MCParticle relations.
relation | RelationArray to register |
ignoreAction |
Definition at line 66 of file SensitiveDetectorBase.h.
|
staticinherited |
Register an relation involving MCParticles.
All Relations which point from an MCParticle to something have to be registered with addMCParticleRelation() because the index of the MCParticles might change at the end of the event. During simulation, the TrackID should be used as index of the MCParticle
name | Name of the relation to register |
ignoreAction |
Definition at line 22 of file SensitiveDetectorBase.cc.
|
inlinestaticinherited |
Enable/Disable all Sensitive Detectors.
By default, all sensitive detectors won't create hits to make it possible to use the Geant4 Navigator for non-simulation purposes. Only during simulation the sensitive detectors will be enabled to record hits
activeStatus | bool to indicate wether hits should be recorded |
Definition at line 50 of file SensitiveDetectorBase.h.
|
private |
Constant for counterclockwise orientation.
Definition at line 290 of file CDCSensitiveDetector.h.
|
private |
Constant for counterclockwise inwards.
Definition at line 295 of file CDCSensitiveDetector.h.
|
private |
Constant for counterclockwise.
Definition at line 296 of file CDCSensitiveDetector.h.
|
private |
Constant for counterclockwise outwards.
Definition at line 297 of file CDCSensitiveDetector.h.
|
private |
Constant for clockwise orientation.
Definition at line 291 of file CDCSensitiveDetector.h.
|
private |
Constant for clockwise inwards.
Definition at line 294 of file CDCSensitiveDetector.h.
|
private |
Constant for clockwise.
Definition at line 293 of file CDCSensitiveDetector.h.
|
private |
Constant for clockwise outwards.
Definition at line 292 of file CDCSensitiveDetector.h.
|
private |
a rotation matrix.
Definition at line 256 of file CDCSensitiveDetector.h.
|
private |
Pointer to CDCGeometryPar object.
Definition at line 259 of file CDCSensitiveDetector.h.
|
private |
CDC simulation hits.
Definition at line 243 of file CDCSensitiveDetector.h.
|
private |
The current number of created hits in an event.
Used to fill the DataStore CDC array.
Definition at line 277 of file CDCSensitiveDetector.h.
|
private |
Vector containing hits with negative weight.
Definition at line 282 of file CDCSensitiveDetector.h.
|
private |
Map containing hits with positive weight.
Map may be replaced by vector, which may make the job speed faster... Try later.
Definition at line 280 of file CDCSensitiveDetector.h.
|
private |
Magnetic field is on or off.
Definition at line 248 of file CDCSensitiveDetector.h.
|
private |
MC particles.
Definition at line 240 of file CDCSensitiveDetector.h.
|
private |
Min.
track length (mm) required for saving in MCParticle.
Definition at line 275 of file CDCSensitiveDetector.h.
|
private |
Switch for left/right flag modified for tracking.
Definition at line 273 of file CDCSensitiveDetector.h.
|
private |
Magnetic field is uniform or non-uniform.
0: uniform B field (1.5 T), 1: non-uniform B field.
Definition at line 254 of file CDCSensitiveDetector.h.
|
privateinherited |
Subdetector the class belongs to.
Definition at line 91 of file SensitiveDetectorBase.h.
|
private |
Threshold energy deposit to be stored.
Definition at line 264 of file CDCSensitiveDetector.h.
|
private |
Threshold kinetic energy to be stored.
Definition at line 269 of file CDCSensitiveDetector.h.
|
private |
Switch to activate wire sag effect.
Definition at line 271 of file CDCSensitiveDetector.h.
|
staticprivateinherited |
Static bool which indicates wether recording of hits is enabled.
Definition at line 89 of file SensitiveDetectorBase.h.
|
staticprivateinherited |
Static set holding all relations which have to be updated at the end of the Event.
Definition at line 87 of file SensitiveDetectorBase.h.