 |
Belle II Software
release-05-02-19
|
12 #include <framework/core/Module.h>
13 #include <pxd/dataobjects/PXDSimHit.h>
14 #include <pxd/dataobjects/PXDInjectionBGTiming.h>
15 #include <pxd/geometry/SensorInfo.h>
16 #include <framework/dataobjects/RelationElement.h>
17 #include <framework/datastore/StoreObjPtr.h>
35 bool operator<(
const Digit& b)
const {
return v() < b.v() || (
v() == b.v() &&
u() < b.u()); }
39 unsigned short u()
const {
return m_u; }
41 unsigned short v()
const {
return m_v; }
53 typedef std::map<RelationElement::index_type, RelationElement::weight_type>
relations_map;
60 void add(
double charge,
int particle = -1,
int truehit = -1)
82 typedef std::map<Digit, DigitValue>
Sensor;
84 typedef std::map<VxdID, Sensor>
Sensors;
109 void driftCharge(
const TVector3& position,
double electrons);
127 void event()
override final;
bool m_applyPoisson
Wether or not to apply poission fluctuation of charge.
double addNoise(double charge)
Calculate the noise contribution to one pixel with given charge.
void event() override final
Digitize one event.
double charge() const
Return the charge collected in the pixel.
double m_charge
charge of the pixel
int m_elMaxSteps
Maximum number of random walks before abort.
const PXDSimHit * m_currentHit
Pointer to the PXDSimhit currently digitized.
bool m_gatingWithoutReadout
Digits from gated rows not sent to DHH.
Class representing the charge and particle contributions for one pixel.
unsigned short v() const
Return v (row) ID.
int m_currentTrueHit
Index of the TrueHit the current hit belongs to.
unsigned short u() const
Return u (column) ID.
double m_pedestalMean
Mean pedestal in ADU.
double m_chargeThresholdElectrons
...
std::map< RelationElement::index_type, RelationElement::weight_type > relations_map
Type to store contributions to pixel charge by different particles.
int m_elGroupSize
Max number of electrons per random walk.
Class to represent the coordinates of one pixel.
std::vector< std::pair< int, int > > m_gatedChannelIntervals
Vector of gated readout channels
double m_eToADU
ENC equivalent of 1 ADU.
std::string m_relDigitMCParticleName
Name of the relation between PXDDigits and MCParticles.
void add(double charge, int particle=-1, int truehit=-1)
Add charge to the pixel.
unsigned short m_u
u (column) ID
int m_nGates
Number of readout gates (or total number of Switcher channels)
double m_gq
g_q of a pixel in nA/electrons.
Digit(unsigned short u=0, unsigned short v=0)
Constructor.
double m_segmentLength
Max.
double m_gatingTime
Time window during which the PXD is not collecting charge.
PXDDigitizerModule()
Constructor.
double m_chargeThreshold
Zero-suppression threshold in ADU.
relations_map m_particles
particle contributions to the charge
relations_map m_truehits
truehit contributions to the charge
Sensors m_sensors
Structure containing all existing sensors.
double m_elStepTime
Timeframe for one random walk step.
int m_triggerGate
PXD triggergate.
double m_elNoise
Amount of noise to apply.
void beginRun() override final
Initialize the list of existing PXD Sensors.
Specific implementation of SensorInfo for PXD Sensors which provides additional pixel specific inform...
bool operator<(const Digit &b) const
Comparison operator to provide unique ordering.
void saveDigits()
Save all digits to the datastore.
std::string m_relMCParticleSimHitName
Name of the relation between MCParticles and PXDSimHits.
std::string m_storeMCParticlesName
Name of the collection for the MCParticles.
unsigned short m_v
v (row) ID
std::string m_relTrueHitSimHitName
Name of the relation between PXDTrueHits and PXDSimHits.
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
double m_timePerGate
Time needed to sample and clear a readout gate
void processHit()
Process one PXDSimHit by dividing the step in smaller steps and drifting the charge.
std::map< VxdID, Sensor > Sensors
Map of all hits in all Sensors.
std::string m_relDigitTrueHitName
Name of the relation between PXDDigits and PXDTrueHits.
double m_hwdelay
Hardware delay between time of bunch crossing and switching on triggergate in ns.
void addNoiseDigits()
Add pure noise digits to the Sensors.
double m_pxdIntegrationTime
Integration time for each gate of the PXD in ns.
TVector3 m_currentBField
Current magnetic field.
std::map< Digit, DigitValue > Sensor
Map of all hits in one Sensor.
StoreObjPtr< PXDInjectionBGTiming > m_storePXDTiming
Input array for timings.
void initialize() override final
Initialize the module and check the parameters.
const relations_map & truehits() const
Return the map containing all truehit contributions to the pixel charge.
Sensor * m_currentSensor
Pointer to the sensor in which the current hit occured.
double m_noiseFraction
Fraction of noisy pixels per sensor.
bool checkIfGated(int gate)
Check if gate was read while in gated mode.
bool m_applyWindow
Wether or not to apply a time window cut.
bool operator==(const Digit &b) const
Equality operator to check for equality.
bool m_gated
Gated mode flag.
bool m_applyNoise
Wether or not to apply noise.
std::string m_storeDigitsName
Name of the collection for the PXDDigits.
double m_ADCUnit
Slope of the linear ADC transfer curve in nA/ADU.
void driftCharge(const TVector3 &position, double electrons)
Drift the charge inside the silicon.
double m_gatingWithoutReadoutTime
Time window during which digits from gated rows are not sent to DHH.
double m_pedestalRMS
RMS pedestal in ADU.
const SensorInfo * m_currentSensorInfo
Pointer to the SensorInfo of the current sensor.
The PXD Digitizer module.
const relations_map & particles() const
Return the map containing all particle contributions to the pixel charge.
std::string m_storeSimHitsName
Name of the collection for the PXDSimhits.
int m_currentParticle
Index of the particle which caused the current hit.
std::string m_storeTrueHitsName
Name of the collection for the PXDTrueHits.
std::vector< float > m_gatingStartTimes
Vector of start times for gating.
Class PXDSimHit - Geant4 simulated hit for the PXD.