Belle II Software development
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
17namespace Belle2 {
28
29 public:
30
36 void prepare() override final;
38 void collect() override final;
39
40 private:
41
46
48 std::string m_storeRawHitsName;
49
51 int m_0cut;
52
54 inline bool goodHit(const PXDRawHit& rawhit) const
55 {
56 short u = rawhit.getColumn();
57 bool goodU = (u == std::min(std::max(u, short(0)), short(249)));
58 short v = rawhit.getRow();
59 bool goodV = (v == std::min(std::max(v, short(0)), short(767)));
60 return (goodU && goodV);
61 }
62 };
64}
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.