Belle II Software development
PXDRawHitSorterModule.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/core/Module.h>
12#include <framework/datastore/StoreArray.h>
13#include <framework/datastore/StoreObjPtr.h>
14#include <pxd/dataobjects/PXDRawHit.h>
15#include <string>
16
17namespace Belle2 {
22 class PXDDAQStatus;
23 class PXDDigit;
24
25 namespace PXD {
26
36
37 public:
40
42 virtual void initialize() override;
44 virtual void event() override;
45
46 private:
53
55 inline bool goodHit(const PXDRawHit* const rawhit) const
56 {
57 short u = rawhit->getColumn();
58 bool goodU = (u == std::min(std::max(u, short(0)), short(249)));
59 short v = rawhit->getRow();
60 bool goodV = (v == std::min(std::max(v, short(0)), short(767)));
61 return (goodU && goodV);
62 }
63
64 std::string m_storeRawHitsName;
66 std::string m_storeDigitsName;
70 int m_0cut;
73 };//end class declaration
74
75
76 } //end PXD namespace;
78} // end namespace Belle2
79
Module()
Constructor.
Definition Module.cc:30
The PXD DAQ Status class.
The PXD digit class.
Definition PXDDigit.h:27
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
int m_0cut
Minimum charge for a digit to carry.
bool m_trimOutOfRange
Discard out-of-range hits.
virtual void initialize() override
Initialize the module.
bool m_mergeDuplicates
Mode: if true, merge duplicate pixels, otherwise only keep the first.
virtual void event() override
do the sorting
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 *const rawhit) const
Utility function to check pixel coordinates.
PXDRawHitSorterModule()
Constructor defining the parameters.
std::string m_storeDigitsName
Name of the collection to use for the PXDDigits.
StoreArray< PXDRawHit > m_storeRawHits
Required input for PXDRawHit.
StoreArray< PXDDigit > m_storeDigits
Output array for PXDDigits.
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
Namespace to encapsulate code needed for simulation and reconstrucion of the PXD.
Abstract base class for different kinds of events.