Belle II Software  release-05-02-19
KLMTriggerModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Dmitri Liventsev *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef KLMTRIGGERMODULE_H
12 #define KLMTRIGGERMODULE_H
13 
14 #include <framework/core/Module.h>
15 
16 namespace Belle2 {
24  class KLMTriggerModule : public Module {
25  public:
26 
27  // Constructor
28  KLMTriggerModule();
29 
30  // Destructor
31  virtual ~KLMTriggerModule() { };
32 
33  virtual void initialize() override;
34  virtual void beginRun() override;
35  virtual void event() override;
36  virtual void endRun() override;
37  virtual void terminate() override { };
38 
39  private: // Parameters
40 
42  void fillHits();
43 
45  void fillTracks();
46 
48  void calcChisq();
49 
59  void geometryConverter(int section, int sector, int layer, int phiStrip, int zStrip, int& x, int& y, int& z);
60 
62  static const int c_TotalSectors = 8;
64  static const int c_TotalLayers = 15;
65 
67  double m_maxChisq;
69  double m_maxIP;
71  int m_minLayers;
72 
74  int m_nEvents = 0;
76  int m_nTracks = 0;
77 
81  std::string m_klmhitCollectionName;
82  };
84 } // namespace Belle2
85 
86 #endif // KLMTRIGGERMODULE_H
87 
Belle2::KLMTriggerModule::endRun
virtual void endRun() override
This method is called if the current run ends.
Definition: KLMTriggerModule.cc:88
Belle2::KLMTriggerModule::m_klmhitCollectionName
std::string m_klmhitCollectionName
name of StoreArray Hits
Definition: KLMTriggerModule.h:89
Belle2::KLMTriggerModule::m_minLayers
int m_minLayers
Trigger threshold on the number of fired layers.
Definition: KLMTriggerModule.h:79
Belle2::KLMTriggerModule::geometryConverter
void geometryConverter(int section, int sector, int layer, int phiStrip, int zStrip, int &x, int &y, int &z)
Convert sector, layer and channel numbers to x, y, z coordinates.
Definition: KLMTriggerModule.cc:407
Belle2::KLMTriggerModule::terminate
virtual void terminate() override
This method is called at the end of the event processing.
Definition: KLMTriggerModule.h:45
Belle2::KLMTriggerModule::m_nEvents
int m_nEvents
Total number of processed events.
Definition: KLMTriggerModule.h:82
Belle2::KLMTriggerModule::initialize
virtual void initialize() override
Initialize the Module.
Definition: KLMTriggerModule.cc:58
Belle2::KLMTriggerModule::event
virtual void event() override
This method is the core of the module.
Definition: KLMTriggerModule.cc:79
Belle2::KLMTriggerModule::fillTracks
void fillTracks()
Create tracks from 2D hits.
Definition: KLMTriggerModule.cc:154
Belle2::KLMTriggerModule::m_maxChisq
double m_maxChisq
Trigger threshold on chisq.
Definition: KLMTriggerModule.h:75
Belle2::KLMTriggerModule::c_TotalSectors
static const int c_TotalSectors
Total number of sectors (eight, a constant)
Definition: KLMTriggerModule.h:70
Belle2::KLMTriggerModule::m_klmtrackCollectionName
std::string m_klmtrackCollectionName
name of StoreArray Tracks
Definition: KLMTriggerModule.h:87
Belle2::KLMTriggerModule::m_maxIP
double m_maxIP
Trigger threshold on the impact parameter.
Definition: KLMTriggerModule.h:77
Belle2::KLMTriggerModule::beginRun
virtual void beginRun() override
Called when entering a new run.
Definition: KLMTriggerModule.cc:71
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::KLMTriggerModule::m_nTracks
int m_nTracks
Total number of found tracks.
Definition: KLMTriggerModule.h:84
Belle2::KLMTriggerModule::fillHits
void fillHits()
Create 2D hits from KLM Digits.
Definition: KLMTriggerModule.cc:93
Belle2::KLMTriggerModule::c_TotalLayers
static const int c_TotalLayers
Total number of layers (fifteen, a constant)
Definition: KLMTriggerModule.h:72
Belle2::KLMTriggerModule::calcChisq
void calcChisq()
Calculate track parameters, chi squared, impact parameter and number of fired layers.
Definition: KLMTriggerModule.cc:182