Belle II Software  release-05-02-19
SVDNNClusterizerModule.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 SVDNNClusterizerModule_H
12 #define SVDNNClusterizerModule_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 <map>
20 #include <vector>
21 
22 namespace Belle2 {
28  namespace SVD {
29 
40  class SVDNNClusterizerModule : public Module {
41 
42  public:
43 
45  typedef std::vector<const RelationElement*> RelationLookup;
46 
49 
51  virtual void initialize() override;
52 
54  virtual void event() override;
55 
56  protected:
57 
68  void createRelationLookup(const RelationArray& relation, RelationLookup& lookup,
69  size_t digits);
70 
76  void fillRelationMap(const RelationLookup& lookup, std::map<unsigned int, float>&
77  relation, unsigned int index);
78 
79  // Data members
80  //1. Collections
82  std::string m_storeMCParticlesName;
84  std::string m_storeTrueHitsName;
86  std::string m_storeRecoDigitsName;
88  std::string m_storeClustersName;
99 
100  //2. Strip and time fitter data
102  std::string m_timeFitterName;
105  bool m_calibratePeak = false;
106 
107  //3. Clustering
109  double m_cutAdjacent = 3.0;
111  double m_cutSeed = 5.0;
113  double m_cutCluster = 5.0;
115  int m_sizeHeadTail = 3;
116 
117  // 4. Strip map and time fitter handles
124 
125  // 5. Relation lookups
130 
131  };//end class declaration
132 
133  } //end SVD namespace;
135 } // end namespace Belle2
136 
137 #endif // SVDNNClusterizerModule_H
Belle2::RelationArray
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:72
Belle2::SVD::SVDNNClusterizerModule::m_relClusterTrueHitName
std::string m_relClusterTrueHitName
Name of the relation between SVDClusters and SVDTrueHits.
Definition: SVDNNClusterizerModule.h:104
Belle2::SVD::SVDNNClusterizerModule::m_pulseShapeCal
SVDPulseShapeCalibrations m_pulseShapeCal
Calibrations: pusle shape and gain.
Definition: SVDNNClusterizerModule.h:129
Belle2::SVD::SVDNNClusterizerModule::initialize
virtual void initialize() override
Initialize the module.
Definition: SVDNNClusterizerModule.cc:81
Belle2::SVD::SVDNNClusterizerModule::RelationLookup
std::vector< const RelationElement * > RelationLookup
Container for a RelationArray Lookup table.
Definition: SVDNNClusterizerModule.h:53
Belle2::SVD::SVDNNClusterizerModule::m_cutCluster
double m_cutCluster
Cluster cut in units of m_elNoise.
Definition: SVDNNClusterizerModule.h:121
Belle2::SVD::SVDNNClusterizerModule::m_mcRelation
RelationLookup m_mcRelation
Lookup table for SVDRecoDigit->MCParticle relation.
Definition: SVDNNClusterizerModule.h:135
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::SVDNNClusterizerModule::m_relRecoDigitTrueHitName
std::string m_relRecoDigitTrueHitName
Name of the relation between SVDRecoDigits and SVDTrueHits.
Definition: SVDNNClusterizerModule.h:100
Belle2::SVD::SVDNNClusterizerModule::m_relClusterMCParticleName
std::string m_relClusterMCParticleName
Name of the relation between SVDClusters and MCParticles.
Definition: SVDNNClusterizerModule.h:102
Belle2::SVD::SVDNNClusterizerModule::m_storeClustersName
std::string m_storeClustersName
Name of the collection to use for the SVDClusters.
Definition: SVDNNClusterizerModule.h:96
Belle2::SVD::SVDNNClusterizerModule::m_timeFitterName
std::string m_timeFitterName
Name of the time fitter (db label)
Definition: SVDNNClusterizerModule.h:110
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::SVD::SVDNNClusterizerModule::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: SVDNNClusterizerModule.cc:144
Belle2::SVD::SVDNNClusterizerModule::m_cutSeed
double m_cutSeed
Seed cut in units of m_elNoise.
Definition: SVDNNClusterizerModule.h:119
Belle2::SVD::SVDNNClusterizerModule::m_storeMCParticlesName
std::string m_storeMCParticlesName
Name of the collection to use for the MCParticles.
Definition: SVDNNClusterizerModule.h:90
Belle2::SVD::SVDNNClusterizerModule::m_fitter
NNWaveFitter m_fitter
Time fitter.
Definition: SVDNNClusterizerModule.h:131
Belle2::SVD::SVDNNClusterizerModule::event
virtual void event() override
do the clustering
Definition: SVDNNClusterizerModule.cc:174
Belle2::SVD::SVDNNClusterizerModule::m_cutAdjacent
double m_cutAdjacent
Noise (cluster member) cut in units of m_elNoise.
Definition: SVDNNClusterizerModule.h:117
Belle2::SVD::SVDNNClusterizerModule::m_calibratePeak
bool m_calibratePeak
Use peak widths and peak time calibrations? Unitl this is also simulated, set to true only for testbe...
Definition: SVDNNClusterizerModule.h:113
Belle2::SVD::SVDNNClusterizerModule::m_storeTrueHitsName
std::string m_storeTrueHitsName
Name of the collection to use for the SVDTrueHits.
Definition: SVDNNClusterizerModule.h:92
Belle2::SVD::SVDNNClusterizerModule::SVDNNClusterizerModule
SVDNNClusterizerModule()
Constructor defining the parameters.
Definition: SVDNNClusterizerModule.cc:46
Belle2::SVD::SVDNNClusterizerModule::fillRelationMap
void fillRelationMap(const RelationLookup &lookup, std::map< unsigned int, float > &relation, unsigned int index)
Add the relation from a given SVDRecoDigit index to a map.
Definition: SVDNNClusterizerModule.cc:157
Belle2::SVD::SVDNNClusterizerModule::m_storeRecoDigitsName
std::string m_storeRecoDigitsName
Name of the collection to use for the SVDRecoDigits.
Definition: SVDNNClusterizerModule.h:94
Belle2::SVD::SVDNNClusterizerModule::m_noiseCal
SVDNoiseCalibrations m_noiseCal
Calibrations: noise.
Definition: SVDNNClusterizerModule.h:127
Belle2::SVD::SVDNNClusterizerModule::m_sizeHeadTail
int m_sizeHeadTail
Size of the cluster at which we switch from Center of Gravity to Analog Head Tail.
Definition: SVDNNClusterizerModule.h:123
Belle2::SVD::SVDNNClusterizerModule::m_relClusterRecoDigitName
std::string m_relClusterRecoDigitName
Name of the relation between SVDClusters and SVDRecoDigits.
Definition: SVDNNClusterizerModule.h:106
Belle2::SVD::SVDNNClusterizerModule::m_trueRelation
RelationLookup m_trueRelation
Lookup table for SVDRecoDigit->SVDTrueHit relation.
Definition: SVDNNClusterizerModule.h:137
Belle2::SVD::SVDNNClusterizerModule::m_relRecoDigitMCParticleName
std::string m_relRecoDigitMCParticleName
Name of the relation between SVDRecoDigits and MCParticles.
Definition: SVDNNClusterizerModule.h:98
Belle2::SVDPulseShapeCalibrations
This class defines the dbobject and the methods to access the SVD calibrations from the local runs pr...
Definition: SVDPulseShapeCalibrations.h:46