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 <pxd/dataobjects/PXDDigit.h>
16#include <pxd/dataobjects/PXDDAQStatus.h>
17#include <string>
18
19namespace Belle2 {
24 namespace PXD {
25
35
36 public:
39
41 virtual void initialize() override;
43 virtual void event() override;
44
45 private:
52
54 inline bool goodHit(const PXDRawHit* const 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 }
63 std::string m_storeRawHitsName;
65 std::string m_storeDigitsName;
69 int m_0cut;
72 };//end class declaration
73
74
75 } //end PXD namespace;
77} // end namespace Belle2
78
Base class for Modules.
Definition: Module.h:72
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
Abstract base class for different kinds of events.