 |
Belle II Software
release-05-02-19
|
14 #include <framework/core/Module.h>
15 #include <framework/datastore/RelationArray.h>
16 #include <framework/datastore/StoreArray.h>
17 #include <svd/dataobjects/SVDEventInfo.h>
18 #include <svd/dataobjects/SVDShaperDigit.h>
19 #include <svd/dataobjects/SVDRecoDigit.h>
20 #include <svd/calibration/SVDPulseShapeCalibrations.h>
21 #include <svd/calibration/SVDNoiseCalibrations.h>
22 #include <svd/calibration/SVDCoGTimeCalibrations.h>
24 #include <mdst/dataobjects/MCParticle.h>
25 #include <svd/dataobjects/SVDTrueHit.h>
46 class SVDCoGTimeEstimatorModule :
public Module {
65 virtual void event()
override;
68 virtual void endRun()
override;
129 relation,
unsigned int index);
virtual ~SVDCoGTimeEstimatorModule()
default destructor
virtual void endRun() override
This method is called if the current run ends.
bool m_corrPeakTime
correction of peakTime per strip from local calibrations
bool m_StopCreationReco
To stop creation of the SVDShaperDigit if something is wrong.
Low-level class to create/modify relations between StoreArrays.
float CalculateAmplitudeError(VxdID ThisSensorID, bool ThisSide, int ThisCellID)
Function to calculate the amplitude error as the noise of the strip.
This class defines the dbobject and the methods to access the SVD calibrations from the local runs pr...
Class to uniquely identify a any structure of the PXD and SVD.
float m_weightedMeanTimeError
The peak time estimation error.
std::vector< const RelationElement * > RelationLookup
Container for a RelationArray Lookup table.
float m_amplitudeError
The shaper amplitude estimation error.
RelationLookup m_mcRelation
Lookup table for SVDShaperDigit->MCParticle relation.
virtual void initialize() override
Initialize the SVDCoGTimeEstimator.
StoreArray< SVDRecoDigit > m_storeReco
SVDRecoDigits store array.
std::string m_relRecoDigitTrueHitName
Name of the relation between SVDRecoDigits and SVDTrueHits.
SVDPulseShapeCalibrations m_PulseShapeCal
SVDPulseShaper calibrations db object.
float m_weightedMeanTime
The peak time estimation.
std::string m_relShaperDigitMCParticleName
Name of the relation between SVDShaperDigits and MCParticles.
float m_DeltaT
Time width of a sampling.
int m_NumberOfAPVSamples
number of samples
virtual void terminate() override
This method is called at the end of the event processing.
virtual void event() override
This method is the core of the SVDCoGTimeEstimator.
std::string m_storeTrueHitsName
Name of the collection to use for the SVDTrueHits.
float CalculateWeightedMeanPeakTimeError(Belle2::SVDShaperDigit::APVFloatSamples samples)
Function to calculate the peak time error.
StoreArray< MCParticle > m_storeMCParticles
MCParticles Store array.
std::array< APVFloatSampleType, c_nAPVSamples > APVFloatSamples
array of APVFloatSampleType objects
SVDNoiseCalibrations m_NoiseCal
SVDNoise calibrations db object.
float m_amplitude
The shaper amplitude estimation.
std::string m_relRecoDigitShaperDigitName
Name of the relation between SVDRecoDigits and SVDShaperDigits.
void fillRelationMap(const RelationLookup &lookup, std::map< unsigned int, float > &relation, unsigned int index)
Add the relation from a given SVDShaperDigit index to a map.
std::string m_relRecoDigitMCParticleName
Name of the relation between SVDRecoDigits and MCParticles.
bool m_calEventT0
Parameters for the corrections.
std::string m_storeShaperDigitsName
Name of the collection to use for the SVDShaperDigits.
This class defines the dbobject and the method to access SVD calibrations from the noise local runs.
Abstract base class for different kinds of events.
Type-safe access to single objects in the data store.
RelationLookup m_trueRelation
Lookup table for SVDShaperDigit->SVDTrueHit relation.
float CalculateChi2()
Function to calculate chi2, that is not used here, so just set at 0.01.
std::string m_svdEventInfoName
Name of the SVDEventInfo object.
virtual void beginRun() override
Called when entering a new run.
SVDCoGTimeEstimatorModule()
Constructor defining the parameters.
float CalculateAmplitude(Belle2::SVDShaperDigit::APVFloatSamples samples)
Function to calculate the amplitude of the shaper, obtained as the largest of the 6 samples.
StoreArray< SVDTrueHit > m_storeTrueHits
SVDTrueHits store array.
std::string m_relShaperDigitTrueHitName
Name of the relation between SVDShaperDigits and SVDTrueHits.
float m_chi2
Chi2, to be defined here.
Accessor to arrays stored in the data store.
float m_AmplitudeArbitraryError
Approximate ADC error on each sample.
float CalculateWeightedMeanPeakTime(Belle2::SVDShaperDigit::APVFloatSamples samples)
Function to calculate the peak time, obtained as the weighted mean of the time of the samples,...
std::string m_storeRecoDigitsName
Name of the collection to use for the SVDRecoDigits.
SVDCoGTimeCalibrations m_TimeCal
SVD CoG Time calibrations db object.
void createRelationLookup(const RelationArray &relation, RelationLookup &lookup, size_t digits)
Create lookup maps for relations FIXME: This has to be significantly simplified here,...
std::string m_storeMCParticlesName
Name of the collection to use for the MCParticles.
StoreArray< SVDShaperDigit > m_storeShaper
store arrays
StoreObjPtr< SVDEventInfo > m_storeSVDEvtInfo
storage for SVDEventInfo object
This class defines the dbobject and the methods to access the SVD calibrations from the local runs pr...