Belle II Software  release-05-02-19
PXDRawHitMaskingModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2019 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Bjoern.Spruck@belle2.org *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <pxd/dataobjects/PXDRawHit.h>
16 #include <string>
17 
18 namespace Belle2 {
23  namespace PXD {
24 
36  class PXDRawHitMaskingModule : public Module {
37 
38  public:
41 
43  virtual void initialize() override;
45  virtual void event() override;
46 
47  private:
48  StoreArray<PXDRawHit> m_pxdRawHit;
49  StoreArray<PXDRawHit> m_pxdRawHitOut;
51  inline bool goodHit(const PXDRawHit& rawhit) const
52  {
53  short u = rawhit.getColumn();
54  bool goodU = (u == std::min(std::max(u, short(0)), short(249)));
55  short v = rawhit.getRow();
56  bool goodV = (v == std::min(std::max(v, short(0)), short(767)));
57  return (goodU && goodV);
58  }
60  std::string m_storeRawHitsName;
62  std::string m_storeRawHitsNameOut;
64  int m_0cut;
66  bool m_trimOutOfRange;
67  };//end class declaration
68 
69 
70  } //end PXD namespace;
72 } // end namespace Belle2
73 
Belle2::PXD::PXDRawHitMaskingModule::goodHit
bool goodHit(const PXDRawHit &rawhit) const
Utility function to check pixel coordinates.
Definition: PXDRawHitMaskingModule.h:59
Belle2::PXD::PXDRawHitMaskingModule::m_0cut
int m_0cut
Minimum charge for a digit to carry.
Definition: PXDRawHitMaskingModule.h:72
Belle2::PXD::PXDRawHitMaskingModule::event
virtual void event() override
do the filtering
Definition: PXDRawHitMaskingModule.cc:58
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PXD::PXDRawHitMaskingModule::m_storeRawHitsName
std::string m_storeRawHitsName
Name of the collection to use for PXDRawHits.
Definition: PXDRawHitMaskingModule.h:68
Belle2::PXD::PXDRawHitMaskingModule::m_storeRawHitsNameOut
std::string m_storeRawHitsNameOut
Name of the collection to use for Output PXDRawHits.
Definition: PXDRawHitMaskingModule.h:70
Belle2::PXD::PXDRawHitMaskingModule::m_pxdRawHitOut
StoreArray< PXDRawHit > m_pxdRawHitOut
Required output for PXDRawHit.
Definition: PXDRawHitMaskingModule.h:57
prepareAsicCrosstalkSimDB.u
u
merged u1 and u2
Definition: prepareAsicCrosstalkSimDB.py:46
Belle2::PXD::PXDRawHitMaskingModule::initialize
virtual void initialize() override
Initialize the module.
Definition: PXDRawHitMaskingModule.cc:51
Belle2::PXD::PXDRawHitMaskingModule::m_pxdRawHit
StoreArray< PXDRawHit > m_pxdRawHit
Required input for PXDRawHit.
Definition: PXDRawHitMaskingModule.h:56
Belle2::PXD::PXDRawHitMaskingModule::m_trimOutOfRange
bool m_trimOutOfRange
Discard out-of-range hits.
Definition: PXDRawHitMaskingModule.h:74
Belle2::PXD::PXDRawHitMaskingModule::PXDRawHitMaskingModule
PXDRawHitMaskingModule()
Constructor defining the parameters.
Definition: PXDRawHitMaskingModule.cc:37