Belle II Software  release-05-02-19
SVDClusterizerDirectModule.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 SVDClusterizerDirectModule_H
12 #define SVDClusterizerDirectModule_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 
39  class SVDClusterizerDirectModule : public Module {
40 
41  public:
42 
44  typedef std::vector<const RelationElement*> RelationLookup;
45 
48 
50  virtual void initialize() override;
51 
53  virtual void event() override;
54 
55  protected:
56 
67  void createRelationLookup(const RelationArray& relation, RelationLookup& lookup,
68  size_t digits);
69 
75  void fillRelationMap(const RelationLookup& lookup, std::map<unsigned int, float>&
76  relation, unsigned int index);
77 
78  // Data members
79 
82 
83  //1. Collections
85  std::string m_storeMCParticlesName;
87  std::string m_storeTrueHitsName;
91  std::string m_storeClustersName;
103  std::string m_svdEventInfoName;
104 
105  //2. Strip and time fitter data
107  std::string m_timeFitterName;
110  bool m_calibratePeak = false;
111 
112 
113  //3. Clustering
115  double m_cutAdjacent = 3.0;
117  double m_cutSeed = 5.0;
119  double m_cutCluster = 5.0;
121  int m_sizeHeadTail = 3;
122 
123  // 4. Strip map and time fitter handles
126 
131 
132  // 5. Relation lookups
137 
138  };//end class declaration
139 
140  } //end SVD namespace;
142 } // end namespace Belle2
143 
144 #endif // SVDClusterizerDirectModule_H
Belle2::SVD::SVDClusterizerDirectModule::m_pulseShapeCal
SVDPulseShapeCalibrations m_pulseShapeCal
Calibrations: pusle shape and gain.
Definition: SVDClusterizerDirectModule.h:138
Belle2::RelationArray
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:72
Belle2::SVD::SVDClusterizerDirectModule::m_relClusterShaperDigitName
std::string m_relClusterShaperDigitName
Name of the relation between SVDClusters and SVDShaperDigits.
Definition: SVDClusterizerDirectModule.h:109
Belle2::SVD::SVDClusterizerDirectModule::RelationLookup
std::vector< const RelationElement * > RelationLookup
Container for a RelationArray Lookup table.
Definition: SVDClusterizerDirectModule.h:52
Belle2::SVD::SVDClusterizerDirectModule::m_cutCluster
double m_cutCluster
Cluster cut in units of m_elNoise.
Definition: SVDClusterizerDirectModule.h:127
Belle2::SVD::SVDClusterizerDirectModule::m_storeClustersName
std::string m_storeClustersName
Name of the collection to use for the SVDClusters.
Definition: SVDClusterizerDirectModule.h:99
Belle2::SVD::SVDClusterizerDirectModule::m_cutSeed
double m_cutSeed
Seed cut in units of m_elNoise.
Definition: SVDClusterizerDirectModule.h:125
Belle2::SVD::SVDClusterizerDirectModule::m_fitter
NNWaveFitter m_fitter
Time fitter.
Definition: SVDClusterizerDirectModule.h:133
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::SVDClusterizerDirectModule::initialize
virtual void initialize() override
Initialize the module.
Definition: SVDClusterizerDirectModule.cc:83
Belle2::SVD::SVDClusterizerDirectModule::m_calibratePeak
bool m_calibratePeak
Use peak widths and peak time calibrations? Unitl this is also simulated, set to true only for testbe...
Definition: SVDClusterizerDirectModule.h:118
Belle2::SVD::SVDClusterizerDirectModule::m_storeShaperDigitsName
std::string m_storeShaperDigitsName
Name of the collection to use for the SVDShaperDigits.
Definition: SVDClusterizerDirectModule.h:97
Belle2::SVD::SVDClusterizerDirectModule::event
virtual void event() override
do the clustering
Definition: SVDClusterizerDirectModule.cc:180
Belle2::SVD::SVDClusterizerDirectModule::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: SVDClusterizerDirectModule.cc:163
Belle2::SVD::SVDClusterizerDirectModule::m_relShaperDigitTrueHitName
std::string m_relShaperDigitTrueHitName
Name of the relation between SVDShaperDigits and SVDTrueHits.
Definition: SVDClusterizerDirectModule.h:103
Belle2::SVD::SVDClusterizerDirectModule::SVDClusterizerDirectModule
SVDClusterizerDirectModule()
Constructor defining the parameters.
Definition: SVDClusterizerDirectModule.cc:46
Belle2::SVD::SVDClusterizerDirectModule::m_relClusterMCParticleName
std::string m_relClusterMCParticleName
Name of the relation between SVDClusters and MCParticles.
Definition: SVDClusterizerDirectModule.h:105
Belle2::SVD::SVDClusterizerDirectModule::m_svdEventInfoName
std::string m_svdEventInfoName
Name of the SVDEventInfo object.
Definition: SVDClusterizerDirectModule.h:111
Belle2::SVD::SVDClusterizerDirectModule::m_sizeHeadTail
int m_sizeHeadTail
Size of the cluster at which we switch from Center of Gravity to Analog Head Tail.
Definition: SVDClusterizerDirectModule.h:129
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::SVDClusterizerDirectModule::m_noiseCal
SVDNoiseCalibrations m_noiseCal
Calibrations: noise.
Definition: SVDClusterizerDirectModule.h:136
Belle2::SVD::SVDClusterizerDirectModule::m_mcRelation
RelationLookup m_mcRelation
Lookup table for SVDShaperDigit->MCParticle relation.
Definition: SVDClusterizerDirectModule.h:142
Belle2::SVD::SVDClusterizerDirectModule::m_storeMCParticlesName
std::string m_storeMCParticlesName
Name of the collection to use for the MCParticles.
Definition: SVDClusterizerDirectModule.h:93
Belle2::SVD::SVDClusterizerDirectModule::m_cutAdjacent
double m_cutAdjacent
Noise (cluster member) cut in units of m_elNoise.
Definition: SVDClusterizerDirectModule.h:123
Belle2::SVD::SVDClusterizerDirectModule::m_storeTrueHitsName
std::string m_storeTrueHitsName
Name of the collection to use for the SVDTrueHits.
Definition: SVDClusterizerDirectModule.h:95
Belle2::SVD::SVDClusterizerDirectModule::m_trueRelation
RelationLookup m_trueRelation
Lookup table for SVDShaperDigit->SVDTrueHit relation.
Definition: SVDClusterizerDirectModule.h:144
Belle2::SVD::SVDClusterizerDirectModule::m_timeFitterName
std::string m_timeFitterName
Name of the time fitter (db label)
Definition: SVDClusterizerDirectModule.h:115
Belle2::SVD::SVDClusterizerDirectModule::m_storeSVDEvtInfo
StoreObjPtr< SVDEventInfo > m_storeSVDEvtInfo
Storage for SVDEventInfo object.
Definition: SVDClusterizerDirectModule.h:89
Belle2::SVD::SVDClusterizerDirectModule::m_relClusterTrueHitName
std::string m_relClusterTrueHitName
Name of the relation between SVDClusters and SVDTrueHits.
Definition: SVDClusterizerDirectModule.h:107
Belle2::SVD::SVDClusterizerDirectModule::createRelationLookup
void createRelationLookup(const RelationArray &relation, RelationLookup &lookup, size_t digits)
Create lookup maps for relations We do not use the RelationIndex as we know much more about the relat...
Definition: SVDClusterizerDirectModule.cc:150
Belle2::SVD::SVDClusterizerDirectModule::m_relShaperDigitMCParticleName
std::string m_relShaperDigitMCParticleName
Name of the relation between SVDShaperDigits and MCParticles.
Definition: SVDClusterizerDirectModule.h:101
Belle2::SVDPulseShapeCalibrations
This class defines the dbobject and the methods to access the SVD calibrations from the local runs pr...
Definition: SVDPulseShapeCalibrations.h:46