Belle II Software  release-06-00-14
SensitiveDetector.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 /* KLM headers. */
12 #include <klm/dataobjects/bklm/BKLMSimHit.h>
13 #include <klm/dataobjects/bklm/BKLMSimHitPosition.h>
14 #include <klm/dbobjects/bklm/BKLMSimulationPar.h>
15 
16 /* Belle 2 headers. */
17 #include <framework/datastore/StoreArray.h>
18 #include <framework/datastore/RelationArray.h>
19 #include <framework/database/DBObjPtr.h>
20 #include <mdst/dataobjects/MCParticle.h>
21 #include <simulation/kernel/SensitiveDetectorBase.h>
22 
23 namespace Belle2 {
29  class BkgSensitiveDetector;
30 
31  namespace bklm {
32 
33  class Module;
34  class GeometryPar;
35 
39 
40  public:
41 
43  explicit SensitiveDetector(const G4String& name);
44 
46  bool step(G4Step*, G4TouchableHistory*) override;
47 
48  private:
49 
51  void convertHitToRPCStrips(const CLHEP::Hep3Vector&, const Module*, int&, int&, int&, int&);
52 
55 
57  double m_HitTimeMax;
58 
60  static constexpr int m_DepthSection = 2;
61 
63  static constexpr int m_DepthSector = 3;
64 
66  static constexpr int m_DepthLayer = 5;
67 
69  static constexpr int m_DepthPlane = 9;
70 
72  static constexpr int m_DepthScintillator = 10;
73 
76 
79 
82 
85 
88 
91 
94 
95  };
96 
97  } // end of namespace bklm
98 
100 } // end of namespace Belle2
The Class for BeamBackground Sensitive Detector.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:62
Base class for all Sensitive Detectors to create hits during simulation.
Provides BKLM geometry parameters for simulation, reconstruction etc (from Gearbox or DataBase)
Definition: GeometryPar.h:38
Define the geometry of a BKLM module Each sector [octant] contains Modules.
Definition: Module.h:76
Class for the BKLM Sensitive Detector Each qualified simulation step is saved into a StoreArray of BK...
DBObjPtr< BKLMSimulationPar > m_SimPar
Simulation parameters (from DB)
void convertHitToRPCStrips(const CLHEP::Hep3Vector &, const Module *, int &, int &, int &, int &)
Find the ranges of matching RPC strips for each simulated hit.
bool m_FirstCall
Flag to enforce once-only initializations in Initialize()
static constexpr int m_DepthSection
Section depth.
static constexpr int m_DepthSector
Sector depth.
StoreArray< BKLMSimHit > m_SimHits
BKLM simulated hits.
double m_HitTimeMax
maximum permissible hit time (based on overflow of LeCroy 1877 TDC)
BkgSensitiveDetector * m_BkgSensitiveDetector
Pointer to a sensitive-detector object used for beam-background steps.
RelationArray m_MCParticlesToSimHits
Relation array between MCPartices and BKLMSimHits.
SensitiveDetector(const G4String &name)
Constructor.
StoreArray< BKLMSimHitPosition > m_SimHitPositions
BKLM simulated hit positions.
GeometryPar * m_GeoPar
Pointer to GeometryPar singleton.
bool step(G4Step *, G4TouchableHistory *) override
Process each step in the BKLM.
static constexpr int m_DepthScintillator
Scintillator depth.
static constexpr int m_DepthPlane
Plane depth.
StoreArray< MCParticle > m_MCParticles
MC particles.
static constexpr int m_DepthLayer
Layer depth.
Abstract base class for different kinds of events.