12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
24 class ECLConnectedRegion;
26 class EventLevelClusteringInfo;
49 virtual void event()
override;
52 virtual void endRun()
override;
68 {
return "ECLCalDigits" ; }
72 {
return "ECLConnectedRegions" ; }
76 {
return "EventLevelClusteringInfo" ; }
106 bool areNeighbours(
const int cellid1,
const int cellid2,
const int maptype);
109 std::vector<int>
oneHotVector(std::vector<int>& A,
const int n);
112 std::vector<int>
flattenVector(std::vector<std::vector<int>>& A);
118 std::vector<std::vector<int>>
getConnectedRegions(
const std::vector<int>& A,
const std::vector<int>& B,
const int maptype);
127 {
return "ECLCalDigitsPureCsI" ; }
131 {
return "ECLConnectedRegionsPureCsI" ; }
135 {
return "EventLevelClusteringInfoPureCsI" ; }
Class to find connected regions.
double m_mapPar[2]
Parameters for neighbour maps.
virtual const char * eventLevelClusteringInfoName() const
Name to be used for default option: EventLevelClusteringInfo.
bool areNeighbours(const int cellid1, const int cellid2, const int maptype)
Check if two crystals are neighbours.
std::vector< int > m_cellIdToDigitVec
cellid -> above threshold digits.
virtual ~ECLCRFinderModule()
Destructor.
ECLCRFinderModule()
Constructor.
StoreArray< ECLConnectedRegion > m_eclConnectedRegions
Store array: ECLConnectedRegion.
double m_timeCut[3]
Time cut for seed, neighbours, ...
std::vector< int > oneHotVector(std::vector< int > &A, const int n)
Convert vector of cell ids to 0/1 vectors from 1-8737.
std::vector< int > m_cellIdToGrowthVec
cellid -> growth digits.
virtual void initialize() override
Initialize.
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.
virtual void endRun() override
End run.
std::vector< int > flattenVector(std::vector< std::vector< int > > &A)
Convert vector of vectors to one long vector.
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 (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to store array positions
virtual void beginRun() override
Begin.
std::vector< std::vector< int > > getConnectedRegions(const std::vector< int > &A, const std::vector< int > &B, const int maptype)
Get all connected regions.
std::vector< std::set< int > > mergeVectorsUsingSets(std::vector< std::vector< int > > &A)
Find all lists of cell-ids that share at least one cell.
virtual const char * eclConnectedRegionArrayName() const
Name to be used for default option: ECLConnectedRegions.
std::vector< ECL::ECLNeighbours * > m_neighbourMaps
Neighbour maps.
virtual const char * eclCalDigitArrayName() const
Name to be used for default or PureCsI option: ECLCalDigits.
std::string m_mapType[2]
Neighbour map types.
double m_timeCut_maxEnergy[3]
Time cut is only applied below this energy, ...
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
Store object pointer: EventLevelClusteringInfo.
StoreArray< ECLCalDigit > m_eclCalDigits
Store array: ECLCalDigit.
Class to find connected regions, pureCsI version.
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.
virtual const char * eclConnectedRegionArrayName() const override
Name to be used for PureCsI option: ECLConnectedRegionsPureCsI.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
Abstract base class for different kinds of events.