Belle II Software  release-05-02-19
PXDDigitSorterModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef PXDDigitSorterModule_H
12 #define PXDDigitSorterModule_H
13 
14 #include <framework/core/Module.h>
15 #include <pxd/dataobjects/PXDDigit.h>
16 #include <string>
17 #include <algorithm>
18 
19 namespace Belle2 {
24  namespace PXD {
25 
37  class PXDDigitSorterModule : public Module {
38 
39  public:
42 
44  virtual void initialize() override;
46  virtual void event() override;
47 
48  private:
50  inline bool goodDigit(const PXDDigit* const digit) const
51  {
52  short u = digit->getUCellID();
53  bool goodU = (u == std::min(std::max(u, short(0)), short(249)));
54  short v = digit->getVCellID();
55  bool goodV = (v == std::min(std::max(v, short(0)), short(767)));
56  return (goodU && goodV);
57  }
58 
60  std::string m_storeDigitsName;
62  std::string m_storeTrueHitsName;
64  std::string m_storeMCParticlesName;
66  std::string m_relDigitMCParticleName;
68  std::string m_relDigitTrueHitName;
70  std::vector<PXDDigit> m_digitcopy;
75  };//end class declaration
76 
77 
78  } //end PXD namespace;
80 } // end namespace Belle2
81 
82 #endif // PXDDigitSorterModule_H
Belle2::PXD::PXDDigitSorterModule::initialize
virtual void initialize() override
Initialize the module.
Definition: PXDDigitSorterModule.cc:56
Belle2::PXD::PXDDigitSorterModule::PXDDigitSorterModule
PXDDigitSorterModule()
Constructor defining the parameters.
Definition: PXDDigitSorterModule.cc:37
Belle2::PXD::PXDDigitSorterModule::m_relDigitMCParticleName
std::string m_relDigitMCParticleName
Name of the relation between PXDDigits and MCParticles.
Definition: PXDDigitSorterModule.h:74
Belle2::PXD::PXDDigitSorterModule::m_storeTrueHitsName
std::string m_storeTrueHitsName
Name of the collection to use for the PXDTrueHits.
Definition: PXDDigitSorterModule.h:70
Belle2::PXD::PXDDigitSorterModule::m_storeDigitsName
std::string m_storeDigitsName
Name of the collection to use for the PXDDigits.
Definition: PXDDigitSorterModule.h:68
Belle2::PXD::PXDDigitSorterModule::m_relDigitTrueHitName
std::string m_relDigitTrueHitName
Name of the relation between PXDDigits and PXDTrueHits.
Definition: PXDDigitSorterModule.h:76
Belle2::PXD::PXDDigitSorterModule::goodDigit
bool goodDigit(const PXDDigit *const digit) const
Utility function to check pixel coordinates.
Definition: PXDDigitSorterModule.h:58
Belle2::PXD::PXDDigitSorterModule::m_digitcopy
std::vector< PXDDigit > m_digitcopy
Copy of the Digits needed for sorting.
Definition: PXDDigitSorterModule.h:78
Belle2::PXD::PXDDigitSorterModule::event
virtual void event() override
do the sorting
Definition: PXDDigitSorterModule.cc:79
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PXD::PXDDigitSorterModule::m_trimDigits
bool m_trimDigits
if true, check digit data and discard malformed digits.
Definition: PXDDigitSorterModule.h:82
Belle2::PXD::PXDDigitSorterModule::m_mergeDuplicates
bool m_mergeDuplicates
Mode: if true, merge duplicate pixels, otherwise delete all but the first occurence.
Definition: PXDDigitSorterModule.h:80
prepareAsicCrosstalkSimDB.u
u
merged u1 and u2
Definition: prepareAsicCrosstalkSimDB.py:46
Belle2::PXD::PXDDigitSorterModule::m_storeMCParticlesName
std::string m_storeMCParticlesName
Name of the collection to use for the MCParticles.
Definition: PXDDigitSorterModule.h:72