 |
Belle II Software
release-05-02-19
|
11 #ifndef CDCDIGITIZER_H
12 #define CDCDIGITIZER_H
15 #include <framework/core/Module.h>
16 #include <framework/datastore/StoreArray.h>
19 #include <mdst/dataobjects/MCParticle.h>
20 #include <cdc/dataobjects/CDCSimHit.h>
21 #include <cdc/dataobjects/CDCHit.h>
22 #include <cdc/dataobjects/WireID.h>
23 #include <cdc/geometry/CDCGeometryPar.h>
24 #include <cdc/geometry/CDCGeoControlPar.h>
25 #include <cdc/dbobjects/CDCFEElectronics.h>
26 #include <reconstruction/dbobjects/CDCDedxRunGain.h>
28 #include <cdc/dbobjects/CDCCrossTalkLibrary.h>
52 class CDCDigitizerModule :
public Module {
65 void event()
override;
100 double getdDdt(
double driftLength);
114 double getDriftTime(
double driftLength,
bool addTof,
bool addDelay);
119 unsigned short getADCCount(
const WireID& wid,
double edep,
double dx,
double costh);
235 SignalInfo(
int simHitIndex = 0,
float driftTime = 0,
float charge = 0,
float maxDriftL = 0,
float minDriftL = 0,
236 int simHitIndex2 = -1,
237 float driftTime2 = std::numeric_limits<float>::max(),
int simHitIndex3 = -1,
float driftTime3 = std::numeric_limits<float>::max()) :
255 XTalkInfo(
unsigned short tdc,
unsigned short adc,
unsigned short tot,
unsigned short status) :
258 unsigned short m_adc;
259 unsigned short m_tot;
267 #endif // CDCDIGITIZER_H
double smearDriftLength(double driftLength, double dDdt)
Method used to smear the drift length.
bool m_spaceChargeEffect
Space charge effect.
CDC::CDCGeometryPar * m_cdcgp
Cached Pointer to CDCGeometryPar.
double m_analogGain
analog gain (V/pC)
void terminate() override
Terminate func.
double m_totalFudgeFactor
total fudge factor for space resol.
Class to identify a wire inside the CDC.
void event() override
Actual digitization of all hits in the CDC.
bool m_includeEarlyXTalks
Flag to switch on/off xtalks earlier than the hit.
std::string m_outputCDCHitsName
Output array name.
SignalInfo(int simHitIndex=0, float driftTime=0, float charge=0, float maxDriftL=0, float minDriftL=0, int simHitIndex2=-1, float driftTime2=std::numeric_limits< float >::max(), int simHitIndex3=-1, float driftTime3=std::numeric_limits< float >::max())
Constructor that initializes all members.
CDCSimHit * m_aCDCSimHit
Pointer to CDCSimHit.
double m_addFudgeFactorForSigma
additional fudge factor for space resol.
double m_tMin
Lower edge of time window in ns.
double m_runGain
run gain.
float m_driftTime2
2nd-shortest drift time in the cell.
double m_resolution1
Resolution of the first Gassian used to smear drift length.
bool m_outputNegativeDriftTime
A switch to output negative drift time to CDCHit.
double m_tdcResol
TDC resolution (in ns)
double m_mean1
Mean value of the first Gassian used to smear drift length.
std::string m_inputCDCSimHitsName
Input array name.
int m_simHitIndex3
SimHit index for 3rd drift time.
TVector3 m_posTrack
track position of this hit
double m_driftLength
drift length of this hit
double m_flightTime
flight time of this hit
Class for accessing arrays of objects in the database.
bool m_doSmearing
A switch to control drift length smearing.
float m_uprEdgeOfTimeWindow[nBoards]
Upper edge of time-window.
double m_driftV
Nominal drift velocity (in cm/ns)
float m_charge
Sum of charge for all SimHits in the cell.
TVector3 m_momentum
3-momentum of this hit
unsigned short m_widthOfTimeWindow[nBoards]
Width of time window.
bool m_align
A switch to control alignment.
double m_tMaxOuter
Upper edge of time window in ns for the outer layers.
DBObjPtr< CDCDedxRunGain > * m_runGainFromDB
Pointer to run gain from DB.
bool m_addTimeOfFlight4Bg
A switch used to control adding time of flight into the total drift time or not for beam bg.
Structure for saving the signal information.
double m_digitalGain
digital gain (V/pC)
double m_resolution2
Resolution of the second Gassian used to smear drift length.
float m_driftTime3
3rd-shortest drift time in the cell.
double m_tdcThreshold4Outer
TDC threshold for outer layers in unit of eV.
void initialize() override
Initialize variables, print info, and start CPU clock.
TVector3 m_posWire
wire position of this hit
double m_tdcBinWidthInv
m_tdcBinWidth^-1 (in ns^-1)
double m_mean2
Mean value of the second Gassian used to smear drift length.
double m_fraction
Fraction of the first Gaussian used to smear drift length.
bool m_useSimpleDigitization
Use float Gaussian Smearing instead of proper digitization.
bool m_addInWirePropagationDelay4Bg
A switch used to control adding propagation delay into the total drift time or not for beam bg.
unsigned short m_tdc
TDC count.
float m_minDriftL
Min of drift length.
bool m_useDB4EDepToADC
Fetch edep-to-ADC conversion params.
double m_globalTime
global time of this hit
CDCDigitizerModule()
Constructor.
Class for accessing objects in the database.
std::string m_SimHitsTOCDCHitsName
Relation for outgoing CDCHits.
double getdDdt(double driftLength)
The method to get dD/dt.
double m_overallGainFactor
Overall gain factor.
StoreArray< MCParticle > m_mcParticles
Set edep-to-ADC conversion params.
float m_adcThresh[nBoards]
Threshold for FADC.
bool m_addInWirePropagationDelay
A switch used to control adding propagation delay into the total drift time or not.
DBObjPtr< CDCCrossTalkLibrary > * m_xTalkFromDB
Pointer to cross-talk from DB.
The Class for CDC Geometry Parameters.
void addXTalk()
Add crosstalk.
bool m_useDB4FEE
Fetch FEE params from DB.
int m_adcThreshold
Threshold for ADC in unit of count.
StoreArray< CDCHit > m_cdcHits
CDCHit array.
Abstract base class for different kinds of events.
bool m_addXTalk
Flag to switch on/off crosstalk.
bool m_addTimeWalk
A switch used to control adding time-walk delay into the total drift time or not.
int m_simHitIndex
SimHit Index number.
bool m_addTimeOfFlight
A switch used to control adding time of flight into the total drift time or not.
double m_propSpeedInv
Inv.
int m_debugLevel4XTalk
Debug level for crosstalk.
bool m_useDB4RunGain
Fetch run gain from DB.
StoreArray< CDCSimHit > m_simHits
CDCSimHit array.
double m_scaleFac
Factor to mutiply to edep.
float m_maxDriftL
Max of drift length.
double m_driftVInv
m_driftV^-1 (in ns/cm)
void setFEElectronics()
Set FEE parameters (from DB)
XTalkInfo(unsigned short tdc, unsigned short adc, unsigned short tot, unsigned short status)
Constructor that initializes all members.
double m_tdcThresholdOffset
Offset for TDC(digital) threshold (mV)
unsigned short getADCCount(const WireID &wid, double edep, double dx, double costh)
Edep to ADC Count converter.
double m_tdcBinWidth
Width of a TDC bin (in ns)
double getDriftTime(double driftLength, bool addTof, bool addDelay)
The method to get drift time based on drift length.
double m_adcBinWidth
ADC bin width (mV)
CDC::CDCGeoControlPar * m_gcp
Cached pointer to CDCGeoControlPar.
unsigned short m_boardID
FEE board ID.
bool m_issue2ndHitWarning
Flag to switch on/off a warning on the 2nd TDC hit.
double getPositiveT0(const WireID &)
Modify t0 for negative-t0 case.
Structure for saving the x-talk information.
int m_simHitIndex2
SimHit index for 2nd drift time.
float m_driftTime
Shortest drift time of any SimHit in the cell.
DBArray< CDCFEElectronics > * m_fEElectronicsFromDB
Pointer to FE electronics params.
void setRunGain()
Set run-gain (from DB)
float m_tdcThresh[nBoards]
Threshold for timing-signal.
float m_lowEdgeOfTimeWindow[nBoards]
Lower edge of time-window.
std::string m_outputCDCHitsName4Trg
Output array name for trigger.
double m_tMaxInner
Upper edge of time window in ns for the inner layers.
WireID m_wireID
WireID of this hit.
double m_trigTimeJitter
Magnitude of trigger timing jitter (ns).
bool m_output2ndHit
A switch to output 2nd hit.
double m_tdcThreshold4Inner
TDC threshold for inner layers in unit of eV.
The Class for CDC Geometry Control Parameters.
unsigned short m_adc
ADC count.
double m_gasToGasWire
Approx.
unsigned short m_status
status
unsigned short m_posFlag
left or right flag of this hit
StoreArray< CDCHit > m_cdcHits4Trg
CDCHit4trg array.
std::string m_MCParticlesToSimHitsName
Relation for origin of incoming SimHits.
bool m_correctForWireSag
A switch to control wire sag.
bool m_treatNegT0WiresAsGood
A switch for negative-t0 wires.