Belle II Software development
PXDRawHitMaskingModule.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 <pxd/dataobjects/PXDRawHit.h>
14#include <string>
15
16namespace Belle2 {
21 namespace PXD {
22
32
33 public:
36
38 virtual void initialize() override;
40 virtual void event() override;
41
42 private:
46 inline bool goodHit(const PXDRawHit& rawhit) const
47 {
48 short u = rawhit.getColumn();
49 bool goodU = (u == std::min(std::max(u, short(0)), short(249)));
50 short v = rawhit.getRow();
51 bool goodV = (v == std::min(std::max(v, short(0)), short(767)));
52 return (goodU && goodV);
53 }
55 std::string m_storeRawHitsName;
59 int m_0cut;
62 };//end class declaration
63
64
65 } //end PXD namespace;
67} // end namespace Belle2
68
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.
StoreArray< PXDRawHit > m_pxdRawHit
Required input for PXDRawHit.
virtual void initialize() override
Initialize the module.
virtual void event() override
do the filtering
PXDRawHitMaskingModule()
Constructor defining the parameters.
std::string m_storeRawHitsNameOut
Name of the collection to use for Output PXDRawHits.
std::string m_storeRawHitsName
Name of the collection to use for PXDRawHits.
bool goodHit(const PXDRawHit &rawhit) const
Utility function to check pixel coordinates.
StoreArray< PXDRawHit > m_pxdRawHitOut
Required output for PXDRawHit.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.