Belle II Software  release-05-02-19
SVDNNShapeReconstructorModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Peter Kvasnicka *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef SVDNNShapeReconstructorModule_H
12 #define SVDNNShapeReconstructorModule_H
13 
14 #include <framework/core/Module.h>
15 #include <framework/datastore/RelationArray.h>
16 #include <svd/calibration/SVDNoiseCalibrations.h>
17 #include <svd/calibration/SVDPulseShapeCalibrations.h>
18 #include <svd/reconstruction/NNWaveFitter.h>
19 #include <svd/dataobjects/SVDEventInfo.h>
20 #include <map>
21 #include <vector>
22 
23 namespace Belle2 {
29  namespace SVD {
30 
37  class SVDNNShapeReconstructorModule : public Module {
38 
39  public:
40 
42  typedef std::vector<const RelationElement*> RelationLookup;
43 
46 
48  virtual void initialize() override;
49 
51  virtual void event() override;
52 
53  protected:
54 
69  void createRelationLookup(const RelationArray& relation, RelationLookup& lookup,
70  size_t digits);
71 
77  void fillRelationMap(const RelationLookup& lookup, std::map<unsigned int, float>&
78  relation, unsigned int index);
79 
80  // Data members
83 
84  //1. Collections
86  std::string m_storeMCParticlesName;
88  std::string m_storeTrueHitsName;
92  std::string m_storeRecoDigitsName;
104  std::string m_svdEventInfoName;
105 
106  //2. Strip and time fitter data
108  std::string m_timeFitterName;
111  bool m_calibratePeak = false;
112 
117 
120 
121  // Relation lookups
126 
128  bool m_writeRecoDigits = false;
129 
131  float m_cutAdjacent = 3.0;
132 
133  };//end class declaration
134 
135  } //end SVD namespace;
137 } // end namespace Belle2
138 
139 #endif // SVDNNShapeReconstructorModule_H
Belle2::RelationArray
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:72
Belle2::SVD::SVDNNShapeReconstructorModule::m_relShaperDigitTrueHitName
std::string m_relShaperDigitTrueHitName
Name of the relation between SVDShaperDigits and SVDTrueHits.
Definition: SVDNNShapeReconstructorModule.h:104
Belle2::SVD::SVDNNShapeReconstructorModule::m_calibratePeak
bool m_calibratePeak
Use peak widths and peak time calibrations? Unitl this is also simulated, set to true only for testbe...
Definition: SVDNNShapeReconstructorModule.h:119
Belle2::SVD::SVDNNShapeReconstructorModule::m_timeFitterName
std::string m_timeFitterName
Name of the time fitter data xml.
Definition: SVDNNShapeReconstructorModule.h:116
Belle2::SVD::SVDNNShapeReconstructorModule::m_relRecoDigitMCParticleName
std::string m_relRecoDigitMCParticleName
Name of the relation between SVDRecoDigits and MCParticles.
Definition: SVDNNShapeReconstructorModule.h:106
Belle2::SVD::SVDNNShapeReconstructorModule::initialize
virtual void initialize() override
Initialize the module.
Definition: SVDNNShapeReconstructorModule.cc:70
Belle2::SVD::SVDNNShapeReconstructorModule::event
virtual void event() override
do the clustering
Definition: SVDNNShapeReconstructorModule.cc:170
Belle2::SVD::SVDNNShapeReconstructorModule::m_fitter
NNWaveFitter m_fitter
Time fitter.
Definition: SVDNNShapeReconstructorModule.h:127
Belle2::SVD::SVDNNShapeReconstructorModule::SVDNNShapeReconstructorModule
SVDNNShapeReconstructorModule()
Constructor defining the parameters.
Definition: SVDNNShapeReconstructorModule.cc:41
Belle2::SVD::SVDNNShapeReconstructorModule::m_relRecoDigitShaperDigitName
std::string m_relRecoDigitShaperDigitName
Name of the relation between SVDRecoDigits and SVDShaperDigits.
Definition: SVDNNShapeReconstructorModule.h:110
Belle2::SVD::NNWaveFitter
The class uses a neural network to find a probability distribution of arrival times for a sextet of A...
Definition: NNWaveFitter.h:63
Belle2::SVD::SVDNNShapeReconstructorModule::createRelationLookup
void createRelationLookup(const RelationArray &relation, RelationLookup &lookup, size_t digits)
Create lookup maps for relations FIXME: This has to be significantly simplified here,...
Definition: SVDNNShapeReconstructorModule.cc:140
Belle2::SVD::SVDNNShapeReconstructorModule::m_cutAdjacent
float m_cutAdjacent
Zero-suppression cut.
Definition: SVDNNShapeReconstructorModule.h:139
Belle2::SVD::SVDNNShapeReconstructorModule::m_relShaperDigitMCParticleName
std::string m_relShaperDigitMCParticleName
Name of the relation between SVDShaperDigits and MCParticles.
Definition: SVDNNShapeReconstructorModule.h:102
Belle2::SVD::SVDNNShapeReconstructorModule::m_writeRecoDigits
bool m_writeRecoDigits
Write SVDRecoDigits? (no in normal operation)
Definition: SVDNNShapeReconstructorModule.h:136
Belle2::SVD::SVDNNShapeReconstructorModule::m_mcRelation
RelationLookup m_mcRelation
Lookup table for SVDShaperDigit->MCParticle relation.
Definition: SVDNNShapeReconstructorModule.h:131
Belle2::SVD::SVDNNShapeReconstructorModule::m_storeSVDEvtInfo
StoreObjPtr< SVDEventInfo > m_storeSVDEvtInfo
Storage for SVDEventInfo object.
Definition: SVDNNShapeReconstructorModule.h:90
Belle2::SVDNoiseCalibrations
This class defines the dbobject and the method to access SVD calibrations from the noise local runs.
Definition: SVDNoiseCalibrations.h:46
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::SVD::SVDNNShapeReconstructorModule::m_pulseShapeCal
SVDPulseShapeCalibrations m_pulseShapeCal
Calibrations: pusle shape and gain.
Definition: SVDNNShapeReconstructorModule.h:124
Belle2::SVD::SVDNNShapeReconstructorModule::m_noiseCal
SVDNoiseCalibrations m_noiseCal
Calibrations: noise.
Definition: SVDNNShapeReconstructorModule.h:122
Belle2::SVD::SVDNNShapeReconstructorModule::m_storeTrueHitsName
std::string m_storeTrueHitsName
Name of the collection to use for the SVDTrueHits.
Definition: SVDNNShapeReconstructorModule.h:96
Belle2::SVD::SVDNNShapeReconstructorModule::m_svdEventInfoName
std::string m_svdEventInfoName
Name of the SVDEventInfo object.
Definition: SVDNNShapeReconstructorModule.h:112
Belle2::SVD::SVDNNShapeReconstructorModule::m_trueRelation
RelationLookup m_trueRelation
Lookup table for SVDShaperDigit->SVDTrueHit relation.
Definition: SVDNNShapeReconstructorModule.h:133
Belle2::SVD::SVDNNShapeReconstructorModule::m_storeRecoDigitsName
std::string m_storeRecoDigitsName
Name of the collection to use for the SVDRecoDigits.
Definition: SVDNNShapeReconstructorModule.h:100
Belle2::SVD::SVDNNShapeReconstructorModule::m_storeShaperDigitsName
std::string m_storeShaperDigitsName
Name of the collection to use for the SVDShaperDigits.
Definition: SVDNNShapeReconstructorModule.h:98
Belle2::SVD::SVDNNShapeReconstructorModule::RelationLookup
std::vector< const RelationElement * > RelationLookup
Container for a RelationArray Lookup table.
Definition: SVDNNShapeReconstructorModule.h:50
Belle2::SVD::SVDNNShapeReconstructorModule::fillRelationMap
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.
Definition: SVDNNShapeReconstructorModule.cc:153
Belle2::SVD::SVDNNShapeReconstructorModule::m_relRecoDigitTrueHitName
std::string m_relRecoDigitTrueHitName
Name of the relation between SVDRecoDigits and SVDTrueHits.
Definition: SVDNNShapeReconstructorModule.h:108
Belle2::SVD::SVDNNShapeReconstructorModule::m_storeMCParticlesName
std::string m_storeMCParticlesName
Name of the collection to use for the MCParticles.
Definition: SVDNNShapeReconstructorModule.h:94
Belle2::SVDPulseShapeCalibrations
This class defines the dbobject and the methods to access the SVD calibrations from the local runs pr...
Definition: SVDPulseShapeCalibrations.h:46