Belle II Software  release-06-01-15
ECLCRFinderModule.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 // FRAMEWORK
12 #include <framework/core/Module.h>
13 #include <framework/datastore/StoreArray.h>
14 #include <framework/datastore/StoreObjPtr.h>
15 
16 namespace Belle2 {
21  class ECLConnectedRegion;
22  class ECLCalDigit;
23  class EventLevelClusteringInfo;
24 
25  namespace ECL {
26  class ECLNeighbours;
27  }
28 
33  class ECLCRFinderModule : public Module {
34 
35  public:
38 
40  virtual ~ECLCRFinderModule();
41 
43  virtual void initialize() override;
44 
46  virtual void beginRun() override;
47 
49  virtual void event() override;
50 
52  virtual void endRun() override;
53 
55  virtual void terminate() override;
56 
59 
62 
65 
67  virtual const char* eclCalDigitArrayName() const
68  { return "ECLCalDigits" ; }
69 
71  virtual const char* eclConnectedRegionArrayName() const
72  { return "ECLConnectedRegions" ; }
73 
75  virtual const char* eventLevelClusteringInfoName() const
76  { return "EventLevelClusteringInfo" ; }
77 
78  private:
79 
80  // Module parameters
81  double m_energyCut[3];
82  double m_energyCutBkgd[3];
83  double m_timeCut[3];
84  std::string m_mapType[2];
85  double m_mapPar[2];
91  bool m_isOnlineProcessing{false};
93  double m_energyCutMod[3] {};
94  int m_tempCRId = -1;
97  std::vector <int> m_cellIdToCheckVec;
98  std::vector <int> m_cellIdToSeedVec;
99  std::vector <int> m_cellIdToGrowthVec;
100  std::vector <int> m_cellIdToDigitVec;
103  std::vector< int > m_calDigitStoreArrPosition;
104 
105  // USE POSITION IN STORE ARRAY!!!
106 
108  std::vector < int > m_cellIdToTempCRIdVec;
109  std::map < int, int > m_cellIdToTempCRIdMap;
112  std::vector<ECL::ECLNeighbours*> m_neighbourMaps;
113 
115  void checkNeighbours(const int cellid, const int tempcrid, const int type);
116 
118  void updateCRs(int cellid, int tempcr);
119 
120  };
121 
124  public:
126  virtual const char* eclCalDigitArrayName() const override
127  { return "ECLCalDigitsPureCsI" ; }
128 
130  virtual const char* eclConnectedRegionArrayName() const override
131  { return "ECLConnectedRegionsPureCsI" ; }
132 
134  virtual const char* eventLevelClusteringInfoName() const override
135  { return "EventLevelClusteringInfoPureCsI" ; }
136 
137  }; // end of ECLCovarianceMatrixPureCsIModule
138 
140 } // end of Belle2 namespace
Class to find connected regions.
double m_mapPar[2]
Parameters for neighbour maps.
double m_energyCutMod[3]
modified energy cut taking into account bkgd per event for seed, neighbours, ...
std::vector< int > m_cellIdToDigitVec
cellid -> above threshold digits.
virtual ~ECLCRFinderModule()
Destructor.
StoreArray< ECLConnectedRegion > m_eclConnectedRegions
Store array: ECLConnectedRegion.
double m_timeCut[3]
Time cut for seed, neighbours, ...
bool m_isOnlineProcessing
Other variables.
std::vector< int > m_cellIdToGrowthVec
cellid -> growth digits.
virtual void initialize() override
Initialize.
int m_useBackgroundLevel
Background dependend energy and timing cuts.
std::map< int, int > m_cellIdToTempCRIdMap
cellid -> temporary CR.
double m_energyCut[3]
Energy cut for seed, neighbours, ...
std::vector< int > m_cellIdToCheckVec
Digit vectors.
virtual void event() override
Event.
std::vector< int > m_cellIdToSeedVec
cellid -> seed digit.
int m_tempCRId
Temporary CR ID.
void updateCRs(int cellid, int tempcr)
Update CRs.
virtual void endRun() override
End run.
virtual void terminate() override
Terminate (close ROOT files here if you have opened any).
std::vector< int > m_cellIdToTempCRIdVec
Connected Region map.
int m_skipFailedTimeFitDigits
Handling of digits with failed time fits.
std::vector< int > m_calDigitStoreArrPosition
vector (8736+1 entries) with cell id to store array positions
virtual void beginRun() override
Begin.
int m_fullBkgdCount
Number of expected background digits at full background.
virtual const char * eventLevelClusteringInfoName() const
Name to be used for default option: EventLevelClusteringInfo.
std::vector< ECL::ECLNeighbours * > m_neighbourMaps
Neighbour maps.
std::string m_mapType[2]
Neighbour map types.
double m_energyCutBkgd[3]
Energy cut (for high background) for seed, neighbours, ...
virtual const char * eclCalDigitArrayName() const
Name to be used for default or PureCsI option: ECLCalDigits.
void checkNeighbours(const int cellid, const int tempcrid, const int type)
Neighbour finder.
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
Store object pointer: EventLevelClusteringInfo.
StoreArray< ECLCalDigit > m_eclCalDigits
Store array: ECLCalDigit.
virtual const char * eclConnectedRegionArrayName() const
Name to be used for default option: ECLConnectedRegions.
Class to find connected regions, pureCsI version.
virtual const char * eclConnectedRegionArrayName() const override
Name to be used for PureCsI option: ECLConnectedRegionsPureCsI.
virtual const char * eclCalDigitArrayName() const override
Name to be used for PureCsI option: ECLCalDigitsPureCsI.
virtual const char * eventLevelClusteringInfoName() const override
Name to be used for PureCsI option: EventLevelClusteringInfoPureCsI.
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:95
Abstract base class for different kinds of events.