Belle II Software  release-08-01-10
PXDRawHotPixelMaskCollectorModule.h
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 #pragma once
10 
11 #include <framework/datastore/StoreArray.h>
12 #include <pxd/dataobjects/PXDRawHit.h>
13 #include <pxd/dataobjects/PXDDAQStatus.h>
14 #include <calibration/CalibrationCollectorModule.h>
15 #include <string>
16 
17 namespace Belle2 {
31 
32  public:
33 
39  void prepare() override final;
41  void collect() override final;
42 
43  private:
44 
49 
51  std::string m_storeRawHitsName;
52 
54  int m_0cut;
55 
57  inline bool goodHit(const PXDRawHit& rawhit) const
58  {
59  short u = rawhit.getColumn();
60  bool goodU = (u == std::min(std::max(u, short(0)), short(249)));
61  short v = rawhit.getRow();
62  bool goodV = (v == std::min(std::max(v, short(0)), short(767)));
63  return (goodU && goodV);
64  }
65  };
67 }
Calibration collector module base class.
The PXD Raw Hit class This class stores information about PXD Pixel hits and makes them available in ...
Definition: PXDRawHit.h:24
short getColumn() const
Get u cell id of hit position.
Definition: PXDRawHit.h:76
short getRow() const
Get v cell id of hit position.
Definition: PXDRawHit.h:60
Calibration Collector Module for PXD hot pixel masking from PXDRawHits.
PXDRawHotPixelMaskCollectorModule()
Constructor: Sets the description, the properties and the parameters of the module.
int m_0cut
Minimum charge (ADU) for detecting a hit.
StoreArray< PXDRawHit > m_pxdRawHit
Required input for PXDRawHit.
StoreObjPtr< PXDDAQStatus > m_storeDaqStatus
Required input for PXD Daq Status.
std::string m_storeRawHitsName
Name of the collection to use for PXDRawHits.
bool goodHit(const PXDRawHit &rawhit) const
Utility function to check pixel coordinates.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.