Belle II Software  release-05-02-19
PXDClusterizerModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 #include <vxd/dataobjects/VxdID.h>
15 #include <pxd/reconstruction/ClusterCache.h>
16 #include <pxd/reconstruction/ClusterProjection.h>
17 #include <pxd/reconstruction/NoiseMap.h>
18 #include <string>
19 #include <memory>
20 
21 namespace Belle2 {
26  class RelationArray;
27  class RelationElement;
28 
29 
30  namespace PXD {
31 
45  class PXDClusterizerModule : public Module {
46 
47  public:
49  typedef std::vector<const RelationElement*> RelationLookup;
50 
53 
55  virtual void initialize() override;
57  virtual void event() override;
58 
59  private:
70  void createRelationLookup(const RelationArray& relation, RelationLookup& lookup, size_t digits);
71 
77  void fillRelationMap(const RelationLookup& lookup, std::map<unsigned int, float>& relation, unsigned int index);
78 
82  void writeClusters(VxdID sensorID);
83 
92  void calculatePositionError(const ClusterCandidate& cls, ClusterProjection& primary, const ClusterProjection& secondary,
93  double minPitch, double centerPitch, double maxPitch);
94 
96  double m_elNoise;
98  double m_cutSeed;
100  double m_cutAdjacent;
102  double m_cutCluster;
106  std::string m_storeDigitsName;
108  std::string m_storeClustersName;
110  std::string m_storeTrueHitsName;
123 
125  int m_sizeHeadTail;
126 
130  std::unique_ptr<ClusterCache> m_cache;
133 
138 
139  };//end class declaration
140 
141 
142  } //end PXD namespace;
144 } // end namespace Belle2
145 
Belle2::RelationArray
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:72
Belle2::PXD::PXDClusterizerModule::m_cache
std::unique_ptr< ClusterCache > m_cache
cache of the last seen clusters to speed up clustering
Definition: PXDClusterizerModule.h:138
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::PXD::PXDClusterizerModule::m_cutAdjacent
double m_cutAdjacent
Noise cut in sigma.
Definition: PXDClusterizerModule.h:108
Belle2::PXD::ClusterCandidate
Class representing a possible cluster during clustering of the PXD It supports merging of different c...
Definition: ClusterCandidate.h:41
Belle2::PXD::PXDClusterizerModule::m_relDigitTrueHitName
std::string m_relDigitTrueHitName
Name of the relation between PXDDigits and PXDTrueHits.
Definition: PXDClusterizerModule.h:128
Belle2::PXD::PXDClusterizerModule::m_elNoise
double m_elNoise
Noise in ADU.
Definition: PXDClusterizerModule.h:104
Belle2::PXD::PXDClusterizerModule::m_relClusterMCParticleName
std::string m_relClusterMCParticleName
Name of the relation between PXDClusters and MCParticles.
Definition: PXDClusterizerModule.h:124
Belle2::PXD::PXDClusterizerModule::PXDClusterizerModule
PXDClusterizerModule()
Constructor defining the parameters.
Definition: PXDClusterizerModule.cc:41
Belle2::PXD::PXDClusterizerModule::RelationLookup
std::vector< const RelationElement * > RelationLookup
Container for a RelationArray Lookup table.
Definition: PXDClusterizerModule.h:57
Belle2::PXD::PXDClusterizerModule::m_cutAdjacentSignal
double m_cutAdjacentSignal
Signal in ADU for Adjacent cut, basically m_elNoise*m_cutAdjacent.
Definition: PXDClusterizerModule.h:112
Belle2::PXD::PXDClusterizerModule::calculatePositionError
void calculatePositionError(const ClusterCandidate &cls, ClusterProjection &primary, const ClusterProjection &secondary, double minPitch, double centerPitch, double maxPitch)
Calculate position and error for a given cluster.
Definition: PXDClusterizerModule.cc:383
Belle2::PXD::PXDClusterizerModule::m_relClusterDigitName
std::string m_relClusterDigitName
Name of the relation between PXDClusters and PXDDigits.
Definition: PXDClusterizerModule.h:126
Belle2::PXD::PXDClusterizerModule::m_storeTrueHitsName
std::string m_storeTrueHitsName
Name of the collection to use for the PXDTrueHits.
Definition: PXDClusterizerModule.h:118
Belle2::PXD::PXDClusterizerModule::m_mcRelation
RelationLookup m_mcRelation
Lookup table for PXDDigit->MCParticle relation.
Definition: PXDClusterizerModule.h:143
Belle2::PXD::PXDClusterizerModule::m_relDigitMCParticleName
std::string m_relDigitMCParticleName
Name of the relation between PXDDigits and MCParticles.
Definition: PXDClusterizerModule.h:122
Belle2::PXD::PXDClusterizerModule::m_cutCluster
double m_cutCluster
Cluster cut in sigma.
Definition: PXDClusterizerModule.h:110
Belle2::PXD::PXDClusterizerModule::writeClusters
void writeClusters(VxdID sensorID)
Write clusters to collection.
Definition: PXDClusterizerModule.cc:256
Belle2::PXD::NoiseMap
Base Class to represent pixel dependent Noise Map.
Definition: NoiseMap.h:36
Belle2::PXD::PXDClusterizerModule::m_cutSeed
double m_cutSeed
Seed cut in sigma.
Definition: PXDClusterizerModule.h:106
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PXD::PXDClusterizerModule::m_clusterCacheSize
int m_clusterCacheSize
Size of cluster Cache (0 = default)
Definition: PXDClusterizerModule.h:136
Belle2::PXD::PXDClusterizerModule::m_storeDigitsName
std::string m_storeDigitsName
Name of the collection to use for the PXDDigits.
Definition: PXDClusterizerModule.h:114
Belle2::PXD::PXDClusterizerModule::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: PXDClusterizerModule.cc:227
Belle2::PXD::PXDClusterizerModule::initialize
virtual void initialize() override
Initialize the module.
Definition: PXDClusterizerModule.cc:71
Belle2::PXD::ClusterProjection
Helper struct to collect information about the 1D projection of a Pixel cluster.
Definition: ClusterProjection.h:37
Belle2::PXD::PXDClusterizerModule::m_trueRelation
RelationLookup m_trueRelation
Lookup table for PXDDigit->PXDTrueHit relation.
Definition: PXDClusterizerModule.h:145
Belle2::PXD::PXDClusterizerModule::event
virtual void event() override
do the clustering
Definition: PXDClusterizerModule.cc:141
Belle2::PXD::PXDClusterizerModule::m_noiseMap
NoiseMap m_noiseMap
Noise map for the currently active sensor.
Definition: PXDClusterizerModule.h:140
Belle2::PXD::PXDClusterizerModule::m_sizeHeadTail
int m_sizeHeadTail
Size of the cluster at which we switch from Center of Gravity to Analog Head Tail.
Definition: PXDClusterizerModule.h:133
Belle2::PXD::PXDClusterizerModule::fillRelationMap
void fillRelationMap(const RelationLookup &lookup, std::map< unsigned int, float > &relation, unsigned int index)
Add the relation from a given PXDDigit index to a map.
Definition: PXDClusterizerModule.cc:239
Belle2::PXD::PXDClusterizerModule::m_storeMCParticlesName
std::string m_storeMCParticlesName
Name of the collection to use for the MCParticles.
Definition: PXDClusterizerModule.h:120
Belle2::PXD::PXDClusterizerModule::m_storeClustersName
std::string m_storeClustersName
Name of the collection to use for the PXDClusters.
Definition: PXDClusterizerModule.h:116
Belle2::PXD::PXDClusterizerModule::m_relClusterTrueHitName
std::string m_relClusterTrueHitName
Name of the relation between PXDClusters and PXDTrueHits.
Definition: PXDClusterizerModule.h:130