Belle II Software  release-06-02-00
PXDClusterizerModule.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <pxd/modules/pxdReconstruction/PXDClusterizerModule.h>
10 
11 #include <framework/datastore/DataStore.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <framework/datastore/RelationArray.h>
14 #include <framework/logging/Logger.h>
15 
16 #include <vxd/geometry/GeoCache.h>
17 
18 #include <mdst/dataobjects/MCParticle.h>
19 #include <pxd/dataobjects/PXDDigit.h>
20 #include <pxd/dataobjects/PXDCluster.h>
21 #include <pxd/dataobjects/PXDTrueHit.h>
22 #include <pxd/geometry/SensorInfo.h>
23 
24 #include <pxd/reconstruction/PXDClusterPositionEstimator.h>
25 
26 using namespace std;
27 using namespace Belle2;
28 using namespace Belle2::PXD;
29 
30 //-----------------------------------------------------------------
31 // Register the Module
32 //-----------------------------------------------------------------
33 REG_MODULE(PXDClusterizer);
34 
35 //-----------------------------------------------------------------
36 // Implementation
37 //-----------------------------------------------------------------
38 
39 PXDClusterizerModule::PXDClusterizerModule() : Module()
40  , m_elNoise(0.7), m_cutSeed(5.0), m_cutAdjacent(3.0), m_cutCluster(8.0)
41  , m_cutAdjacentSignal(0), m_sizeHeadTail(3), m_clusterCacheSize(0)
42 {
43  //Set module properties
44  setDescription("Cluster PXDHits");
46 
47  addParam("ElectronicNoise", m_elNoise,
48  "Noise added by the electronics, set in ADU", m_elNoise);
49  addParam("NoiseSN", m_cutAdjacent,
50  "SN for digits to be considered for clustering", m_cutAdjacent);
51  addParam("SeedSN", m_cutSeed, "SN for digits to be considered as seed",
52  m_cutSeed);
53  addParam("ClusterSN", m_cutCluster, "Minimum SN for clusters", m_cutCluster);
54  addParam("ClusterCacheSize", m_clusterCacheSize,
55  "Maximum desired number of sensor rows", 0);
56  addParam("HeadTailSize", m_sizeHeadTail,
57  "Minimum cluster size to switch to Analog head tail algorithm for cluster center",
59  addParam("Digits", m_storeDigitsName, "Digits collection name", string(""));
60  addParam("Clusters", m_storeClustersName, "Cluster collection name",
61  string(""));
62  addParam("TrueHits", m_storeTrueHitsName, "TrueHit collection name",
63  string(""));
64  addParam("MCParticles", m_storeMCParticlesName, "MCParticles collection name",
65  string(""));
66 
67 }
68 
70 {
71  //Register collections
76 
78  storeDigits.isRequired();
79  storeTrueHits.isOptional();
80  storeMCParticles.isOptional();
81 
82  RelationArray relClusterDigits(storeClusters, storeDigits);
83  RelationArray relClusterTrueHits(storeClusters, storeTrueHits);
84  RelationArray relClusterMCParticles(storeClusters, storeMCParticles);
85  RelationArray relDigitMCParticles(storeDigits, storeMCParticles);
86  RelationArray relDigitTrueHits(storeDigits, storeTrueHits);
87 
88  relClusterDigits.registerInDataStore();
89  //Relations to Simulation objects are only needed if the parent one already
90  //exists
91  if (relDigitTrueHits.isOptional()) {
92  relClusterTrueHits.registerInDataStore();
93  }
94  if (relDigitMCParticles.isOptional()) {
95  relClusterMCParticles.registerInDataStore();
96  }
97 
98  //Now save all names to speed creation later, mainly if they had default names
99  m_storeClustersName = storeClusters.getName();
100  m_storeDigitsName = storeDigits.getName();
101  m_storeTrueHitsName = storeTrueHits.getName();
102  m_storeMCParticlesName = storeMCParticles.getName();
103 
104  m_relClusterDigitName = relClusterDigits.getName();
105  m_relClusterTrueHitName = relClusterTrueHits.getName();
106  m_relClusterMCParticleName = relClusterMCParticles.getName();
107  m_relDigitTrueHitName = relDigitTrueHits.getName();
108  m_relDigitMCParticleName = relDigitMCParticles.getName();
109 
110  B2DEBUG(20,
111  "PXDClusterizer Parameters (in default system units, *=cannot be set directly):");
112  B2DEBUG(20, " --> ElectronicNoise: " << m_elNoise);
113  B2DEBUG(20, " --> NoiseSN: " << m_cutAdjacent);
114  B2DEBUG(20, " --> SeedSN: " << m_cutSeed);
115  B2DEBUG(20, " --> ClusterSN: " << m_cutCluster);
116  B2DEBUG(20,
117  " --> MCParticles: " << DataStore::arrayName<MCParticle>(m_storeMCParticlesName));
118  B2DEBUG(20,
119  " --> Digits: " << DataStore::arrayName<PXDDigit>(m_storeDigitsName));
120  B2DEBUG(20,
121  " --> Clusters: " << DataStore::arrayName<PXDCluster>(m_storeClustersName));
122  B2DEBUG(20,
123  " --> TrueHits: " << DataStore::arrayName<PXDTrueHit>(m_storeTrueHitsName));
124  B2DEBUG(20, " --> DigitMCRel: " << m_relDigitMCParticleName);
125  B2DEBUG(20, " --> ClusterMCRel: " << m_relClusterMCParticleName);
126  B2DEBUG(20, " --> ClusterDigitRel: " << m_relClusterDigitName);
127  B2DEBUG(20, " --> DigitTrueRel: " << m_relDigitTrueHitName);
128  B2DEBUG(20, " --> ClusterTrueRel: " << m_relClusterTrueHitName);
129 
130 
133  if (m_clusterCacheSize > 0)
134  m_cache = std::unique_ptr<ClusterCache>(new ClusterCache(m_clusterCacheSize));
135  else
136  m_cache = std::unique_ptr<ClusterCache>(new ClusterCache());
137 }
138 
140 {
141  const StoreArray<MCParticle> storeMCParticles(m_storeMCParticlesName);
142  const StoreArray<PXDTrueHit> storeTrueHits(m_storeTrueHitsName);
143  const StoreArray<PXDDigit> storeDigits(m_storeDigitsName);
145 
146  storeClusters.clear();
147 
148  RelationArray relClusterMCParticle(storeClusters, storeMCParticles,
150  if (relClusterMCParticle) relClusterMCParticle.clear();
151 
152  RelationArray relClusterDigit(storeClusters, storeDigits,
154  if (relClusterDigit) relClusterDigit.clear();
155 
156  RelationArray relClusterTrueHit(storeClusters, storeTrueHits,
158  if (relClusterTrueHit) relClusterTrueHit.clear();
159 
160  int nPixels = storeDigits.getEntries();
161  if (nPixels == 0)
162  return;
163 
164  //Build lookup tables for relations
165  RelationArray relDigitMCParticle(storeDigits, storeMCParticles, m_relDigitMCParticleName);
166  RelationArray relDigitTrueHit(storeDigits, storeTrueHits, m_relDigitTrueHitName);
167  createRelationLookup(relDigitMCParticle, m_mcRelation, storeDigits.getEntries());
168  createRelationLookup(relDigitTrueHit, m_trueRelation, storeDigits.getEntries());
169 
170  m_cache->clear();
171 
172  //We require all pixels are already sorted and directly cluster them. Once
173  //the sensorID changes, we write out all existing clusters and continue.
174  VxdID sensorID(0);
175  //To check sorting
176  Pixel lastPixel;
177  for (int i = 0; i < nPixels; i++) {
178  const PXDDigit* const storeDigit = storeDigits[i];
179  Pixel px(storeDigit, i);
180  //New sensor, write clusters
181  if (sensorID != storeDigit->getSensorID()) {
182  writeClusters(sensorID);
183  sensorID = storeDigit->getSensorID();
184  //Load the correct noise map for the new sensor
185  m_noiseMap.setSensorID(sensorID);
186  } else if (px <= lastPixel) {
187  //Check for sorting as precaution
188  B2FATAL("Pixels are not sorted correctly, please include the "
189  "PXDDigitSorter module before running the Clusterizer or fix "
190  "the input to be ordered by v,u in ascending order");
191  }
192  //Remember last pixel to check sorting
193  lastPixel = px;
194 
195  //Ignore digits with not enough signal. Has to be done after the check of
196  //the SensorID to make sure we compare to the correct noise level
197  if (!m_noiseMap(px, m_cutAdjacent)) continue;
198 
199  // TODO: If we would like to cluster across dead channels we would need a
200  // sorted list of dead pixels. Assuming we have such a list m_deadChannels
201  // containing Pixel instances with all dead channels of this sensor and
202  // m_currentDeadChannel is an iterator to that list (initialized to
203  // begin(m_deadChannels) when the sensorID changes), we would do
204  //
205  // while(m_currentDeadChannel != end(m_deadChannels) && *m_currentDeadChannel < px){
206  // m_cache->findCluster(m_currentDeadChannel->getU(), m_currentDeadChannel->getV());
207  // m_currentDeadChannel++;
208  // }
209  //
210  // This would have the effect of marking the pixel address as belonging
211  // to a cluster but would not modify the clusters itself (except for
212  // possible merging of clusters) so we would end up with clusters that
213  // contain holes or are disconnected.
214 
215  // Find correct cluster and add pixel to cluster
216  try {
217  m_cache->findCluster(px.getU(), px.getV()).add(px);
218  } catch (std::out_of_range& e) {
219  B2WARNING("PXD clustering: Ignoring pixel " << px.getU() << "," << px.getV() << ": " << e.what());
220  }
221  }
222  writeClusters(sensorID);
223 }
224 
225 void PXDClusterizerModule::createRelationLookup(const RelationArray& relation, RelationLookup& lookup, size_t digits)
226 {
227  lookup.clear();
228  //If we don't have a relation we don't build a lookuptable
229  if (!relation) return;
230  //Resize to number of digits and set all values
231  lookup.resize(digits);
232  for (const RelationElement& element : relation) {
233  lookup[element.getFromIndex()] = &element;
234  }
235 }
236 
237 void PXDClusterizerModule::fillRelationMap(const RelationLookup& lookup, std::map<unsigned int, float>& relation,
238  unsigned int index)
239 {
240  //If the lookup table is not empty and the element is set
241  if (!lookup.empty() && lookup[index]) {
242  const RelationElement& element = *lookup[index];
243  const unsigned int size = element.getSize();
244  //Add all Relations to the map
245  for (unsigned int i = 0; i < size; ++i) {
246  //negative weights are from ignored particles, we don't like them and
247  //thus ignore them :D
248  if (element.getWeight(i) < 0) continue;
249  relation[element.getToIndex(i)] += element.getWeight(i);
250  }
251  }
252 }
253 
255 {
256  if (m_cache->empty())
257  return;
258 
259  //Get all datastore elements
260  const StoreArray<MCParticle> storeMCParticles(m_storeMCParticlesName);
261  const StoreArray<PXDDigit> storeDigits(m_storeDigitsName);
262  const StoreArray<PXDTrueHit> storeTrueHits(m_storeTrueHitsName);
264  RelationArray relClusterMCParticle(storeClusters, storeMCParticles,
266  RelationArray relClusterDigit(storeClusters, storeDigits,
268  RelationArray relClusterTrueHit(storeClusters, storeTrueHits,
270 
271  //Get Geometry information
272  const SensorInfo& info = dynamic_cast<const SensorInfo&>(VXD::GeoCache::get(
273  sensorID));
274 
275  map<unsigned int, float> mc_relations;
276  map<unsigned int, float> truehit_relations;
277  vector<pair<unsigned int, float> > digit_weights;
278 
279 
280  for (ClusterCandidate& cls : *m_cache) {
281  //Check for noise cuts
282  if (!(cls.size() > 0 && m_noiseMap(cls.getCharge(), m_cutCluster) && m_noiseMap(cls.getSeed(), m_cutSeed))) continue;
283 
284  double rho(0);
285  ClusterProjection projU, projV;
286  mc_relations.clear();
287  truehit_relations.clear();
288  digit_weights.clear();
289  digit_weights.reserve(cls.size());
290 
291  const Pixel& seed = cls.getSeed();
292 
293  for (const PXD::Pixel& px : cls.pixels()) {
294  //Add the Pixel information to the two projections
295  projU.add(px.getU(), info.getUCellPosition(px.getU()), px.getCharge());
296  projV.add(px.getV(), info.getVCellPosition(px.getV()), px.getCharge());
297 
298  //Obtain relations from MCParticles
299  fillRelationMap(m_mcRelation, mc_relations, px.getIndex());
300  //Obtain relations from PXDTrueHits
301  fillRelationMap(m_trueRelation, truehit_relations, px.getIndex());
302  //Save the weight of the digits for the Cluster->Digit relation
303  digit_weights.emplace_back(px.getIndex(), px.getCharge());
304  }
305  projU.finalize();
306  projV.finalize();
307 
308  const double pitchU = info.getUPitch();
309  const double pitchV = info.getVPitch(projV.getPos());
310  // Calculate shape correlation coefficient: only for non-trivial shapes
311  if (projU.getSize() > 1 && projV.getSize() > 1) {
312  // Add in-pixel position noise to smear the correlation
313  double posUU = cls.getCharge() * pitchU * pitchU / 12.0;
314  double posVV = cls.getCharge() * pitchV * pitchV / 12.0;
315  double posUV(0);
316  for (const Pixel& px : cls.pixels()) {
317  const double du = info.getUCellPosition(px.getU()) - projU.getPos();
318  const double dv = info.getVCellPosition(px.getV()) - projV.getPos();
319  posUU += px.getCharge() * du * du;
320  posVV += px.getCharge() * dv * dv;
321  posUV += px.getCharge() * du * dv;
322  }
323  rho = posUV / sqrt(posUU * posVV);
324  }
325 
326  //Calculate position and error with u as primary axis, fixed pitch size
327  calculatePositionError(cls, projU, projV, pitchU, pitchU, pitchU);
328  //Calculate position and error with v as primary axis, possibly different pitch sizes
329  calculatePositionError(cls, projV, projU, info.getVPitch(projV.getMinPos()), pitchV, info.getVPitch(projV.getMaxPos()));
330 
331  TVector3 lorentzShift = info.getLorentzShift(projU.getPos(), projV.getPos());
332  projU.setPos(projU.getPos() - lorentzShift.X());
333  projV.setPos(projV.getPos() - lorentzShift.Y());
334  B2DEBUG(20, "Lorentz shift: " << lorentzShift.X() << " " << lorentzShift.Y());
335 
336  // Pre classification of cluster looking at pitch type of pixels and if they touch sensor edges
337  int clusterkind = PXDClusterPositionEstimator::getInstance().getClusterkind(cls.pixels(), sensorID);
338 
339  // Compute sorted set of pixel
340  // FIXME: I am not 100% sure if cls.pixels() are sorted
341  set<Pixel> pixelSet(cls.pixels().begin(), cls.pixels().end());
342 
343  // Compute classifier variables needed for later retrival of position correction in PXD CKF
344  vector<float> sectorEtaValues = {0, 0, 0, 0};
345  sectorEtaValues[0] = PXDClusterPositionEstimator::getInstance().computeEta(pixelSet, projV.getMinCell(), projV.getSize(), +1.0,
346  +1.0);
347  sectorEtaValues[1] = PXDClusterPositionEstimator::getInstance().computeEta(pixelSet, projV.getMinCell(), projV.getSize(), -1.0,
348  +1.0);
349  sectorEtaValues[2] = PXDClusterPositionEstimator::getInstance().computeEta(pixelSet, projV.getMinCell(), projV.getSize(), -1.0,
350  -1.0);
351  sectorEtaValues[3] = PXDClusterPositionEstimator::getInstance().computeEta(pixelSet, projV.getMinCell(), projV.getSize(), +1.0,
352  -1.0);
353 
354  vector<int> sectorShapeIndices = { -1, -1, -1, -1};
355  sectorShapeIndices[0] = PXDClusterPositionEstimator::getInstance().computeShapeIndex(pixelSet, projU.getMinCell(),
356  projV.getMinCell(), projV.getSize(), +1.0, +1.0);
357  sectorShapeIndices[1] = PXDClusterPositionEstimator::getInstance().computeShapeIndex(pixelSet, projU.getMinCell(),
358  projV.getMinCell(), projV.getSize(), -1.0, +1.0);
359  sectorShapeIndices[2] = PXDClusterPositionEstimator::getInstance().computeShapeIndex(pixelSet, projU.getMinCell(),
360  projV.getMinCell(), projV.getSize(), -1.0, -1.0);
361  sectorShapeIndices[3] = PXDClusterPositionEstimator::getInstance().computeShapeIndex(pixelSet, projU.getMinCell(),
362  projV.getMinCell(), projV.getSize(), +1.0, -1.0);
363 
364  //Store Cluster into Datastore ...
365  int clsIndex = storeClusters.getEntries();
366  storeClusters.appendNew(sensorID, projU.getPos(), projV.getPos(), projU.getError(), projV.getError(),
367  rho, cls.getCharge(), seed.getCharge(),
368  cls.size(), projU.getSize(), projV.getSize(), projU.getMinCell(), projV.getMinCell(), clusterkind,
369  sectorEtaValues, sectorShapeIndices
370  );
371 
372  //Create Relations to this Digit
373  if (!mc_relations.empty()) relClusterMCParticle.add(clsIndex, mc_relations.begin(), mc_relations.end());
374  if (!truehit_relations.empty()) relClusterTrueHit.add(clsIndex, truehit_relations.begin(), truehit_relations.end());
375  relClusterDigit.add(clsIndex, digit_weights.begin(), digit_weights.end());
376  }
377 
378  m_cache->clear();
379 }
380 
382  const ClusterProjection& secondary, double minPitch, double centerPitch, double maxPitch)
383 {
384  if (primary.getSize() >= static_cast<unsigned int>(m_sizeHeadTail)) { //Analog head tail
385  //Average charge in the central area
386  const double centerCharge = primary.getCenterCharge() / (primary.getSize() - 2);
387  const double minCharge = (primary.getMinCharge() < centerCharge) ? primary.getMinCharge() : centerCharge;
388  const double maxCharge = (primary.getMaxCharge() < centerCharge) ? primary.getMaxCharge() : centerCharge;
389  primary.setPos(0.5 * (primary.getMinPos() + primary.getMaxPos()
390  + (maxCharge * maxPitch - minCharge * minPitch) / centerCharge));
391  const double snHead = centerCharge / m_cutAdjacentSignal / minPitch;
392  const double snTail = centerCharge / m_cutAdjacentSignal / maxPitch;
393  const double landauHead = minCharge / centerCharge * minPitch;
394  const double landauTail = maxCharge / centerCharge * maxPitch;
395  primary.setError(0.5 * sqrt(1.0 / snHead / snHead + 1.0 / snTail / snTail
396  + 0.5 * landauHead * landauHead + 0.5 * landauTail * landauTail));
397  } else if (primary.getSize() <= 2) { // Add a phantom charge to second strip
398  primary.setError(centerPitch * (secondary.getSize() + 2) * m_cutAdjacentSignal / (primary.getCharge() +
399  (secondary.getSize() + 3) * m_cutAdjacentSignal));
400  } else {
401  const double sn = cls.getSeedCharge() / m_elNoise;
402  primary.setError(2.0 * centerPitch / sn);
403  }
404 }
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Definition: DataStore.h:72
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
The PXD digit class.
Definition: PXDDigit.h:27
VxdID getSensorID() const
Get the sensor ID.
Definition: PXDDigit.h:64
Class to remember recently assigned clusters This class will remember the current and the last pixel ...
Definition: ClusterCache.h:77
Class representing a possible cluster during clustering of the PXD It supports merging of different c...
float getSeedCharge() const
get the seed charge of the cluster
Helper struct to collect information about the 1D projection of a Pixel cluster.
double getMinPos() const
Return the position of the minimum cell of the cluster.
void add(unsigned int cell, float position, float charge)
Add Pixel information to the projection.
double getMaxCharge() const
Return the charge in the maximum cell of the cluster.
void finalize()
Finish calculation of center of gravity and set correct cluster size.
unsigned int getMinCell() const
Return the minimum cell part of the cluster.
double getCharge() const
Return the total charge of the cluster.
void setPos(double pos)
Set the position of the cluster.
double getMinCharge() const
Return the charge in the minimum cell of the cluster.
void setError(double error)
Set the error of the cluster.
double getError() const
Return the error of the cluster.
double getMaxPos() const
Return the position of the maximum cell of the cluster.
double getPos() const
Return the projected position of the cluster.
double getCenterCharge() const
Return the center charge of the cluster, that is total charge minus minimum and maximum cell charge.
unsigned int getSize() const
Return the projected size of the cluster.
void setNoiseLevel(float noise)
Set the noise level.
Definition: NoiseMap.h:33
virtual void setSensorID(VxdID)
Set the sensorID currently used.
Definition: NoiseMap.h:38
static PXDClusterPositionEstimator & getInstance()
Main (and only) way to access the PXDClusterPositionEstimator.
float computeEta(const std::set< Pixel > &pixels, int vStart, int vSize, double thetaU, double thetaV) const
Return the normed charge ratio between head and tail pixels (size>=2) or the charge of the seed (size...
int computeShapeIndex(const std::set< Pixel > &pixels, int uStart, int vStart, int vSize, double thetaU, double thetaV) const
Return the shape index of the pixels.
int getClusterkind(const PXDCluster &cluster) const
Return kind of cluster needed to find cluster position correction.
NoiseMap m_noiseMap
Noise map for the currently active sensor.
int m_clusterCacheSize
Size of cluster Cache (0 = default)
double m_cutAdjacentSignal
Signal in ADU for Adjacent cut, basically m_elNoise*m_cutAdjacent.
virtual void initialize() override
Initialize the module.
std::string m_relDigitMCParticleName
Name of the relation between PXDDigits and MCParticles.
virtual void event() override
do the clustering
void calculatePositionError(const ClusterCandidate &cls, ClusterProjection &primary, const ClusterProjection &secondary, double minPitch, double centerPitch, double maxPitch)
Calculate position and error for a given cluster.
std::vector< const RelationElement * > RelationLookup
Container for a RelationArray Lookup table.
std::string m_relClusterDigitName
Name of the relation between PXDClusters and PXDDigits.
double m_cutCluster
Cluster cut in sigma.
std::string m_storeTrueHitsName
Name of the collection to use for the PXDTrueHits.
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.
std::string m_storeMCParticlesName
Name of the collection to use for the MCParticles.
RelationLookup m_trueRelation
Lookup table for PXDDigit->PXDTrueHit relation.
int m_sizeHeadTail
Size of the cluster at which we switch from Center of Gravity to Analog Head Tail.
std::string m_storeDigitsName
Name of the collection to use for the PXDDigits.
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...
std::string m_storeClustersName
Name of the collection to use for the PXDClusters.
void writeClusters(VxdID sensorID)
Write clusters to collection.
double m_cutSeed
Seed cut in sigma.
std::string m_relDigitTrueHitName
Name of the relation between PXDDigits and PXDTrueHits.
std::string m_relClusterMCParticleName
Name of the relation between PXDClusters and MCParticles.
RelationLookup m_mcRelation
Lookup table for PXDDigit->MCParticle relation.
std::unique_ptr< ClusterCache > m_cache
cache of the last seen clusters to speed up clustering
double m_cutAdjacent
Noise cut in sigma.
std::string m_relClusterTrueHitName
Name of the relation between PXDClusters and PXDTrueHits.
Class to represent one pixel, used in clustering for fast access.
Definition: Pixel.h:36
unsigned short getU() const
Return the CellID in u.
Definition: Pixel.h:66
unsigned short getV() const
Return the CellID in v.
Definition: Pixel.h:68
Specific implementation of SensorInfo for PXD Sensors which provides additional pixel specific inform...
Definition: SensorInfo.h:23
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:62
void add(index_type from, index_type to, weight_type weight=1.0)
Add a new element to the relation.
void clear() override
Clear all elements from the relation.
Class to store a single element of a relation.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
const std::string & getName() const
Return name under which the object is saved in the DataStore.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:246
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
void clear() override
Delete all entries in this array.
Definition: StoreArray.h:207
static const SensorInfoBase & get(Belle2::VxdID id)
Return a reference to the SensorInfo of a given SensorID.
Definition: GeoCache.h:139
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
Namespace to encapsulate code needed for simulation and reconstrucion of the PXD.
Abstract base class for different kinds of events.