15 #include <framework/core/Module.h>
16 #include <framework/gearbox/Unit.h>
17 #include <framework/datastore/StoreArray.h>
18 #include <framework/datastore/StoreObjPtr.h>
30 class ECLConnectedRegion;
32 class ECLLocalMaximum;
33 class EventLevelClusteringInfo;
60 virtual void event()
override;
63 virtual void endRun()
override;
109 const unsigned short c_nSectorCellIdFWD[13] = {3, 3, 4, 4, 4, 6, 6, 6, 6, 6, 6, 9, 9};
112 const unsigned short c_crystalsPerRing[69] = {48, 48, 64, 64, 64, 96, 96, 96, 96, 96, 96, 144, 144,
113 144, 144, 144, 144, 144, 144, 144,
114 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
115 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
116 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
117 144, 144, 144, 144, 144, 144, 144, 144, 144,
118 144, 144, 96, 96, 96, 96, 96, 64, 64, 64
151 {
return "ECLCalDigits" ; }
155 {
return "ECLConnectedRegions" ; }
159 {
return "ECLLocalMaximums" ; }
163 {
return "ECLShowers" ; }
167 {
return "EventLevelClusteringInfo" ; }
182 double getEnergySum(std::vector < std::pair<double, double> >& weighteddigits,
const unsigned int n);
195 {
return "ECLCalDigitsPureCsI" ; }
199 {
return "ECLConnectedRegionsPureCsI" ; }
203 {
return "ECLLocalMaximumsPureCsI" ; }
207 {
return "ECLShowersPureCsI" ; }
211 {
return "EventLevelClusteringInfoPureCsI" ; }
Class to store connected regions (CRs)
Class to perform the shower correction.
ECLSplitterN1Module()
Constructor.
ECL::ECLNeighbours * m_NeighbourMap9
Neighbour maps.
const unsigned short c_nSectorCellIdBWD[10]
crystals per sector for theta rings
double m_liloParameterB
lin-log parameter B
int m_maxIterations
Maximum number of iterations.
~ECLSplitterN1Module()
Destructor.
StoreArray< ECLShower > m_eclShowers
Store array: ECLShower.
std::string m_fileNOptimalBWDName
BWD number of optimal neighbours filename.
ECL::ECLNeighbours * m_NeighbourMap21
5x5 neighbours excluding corners = 21
StoreArray< ECLConnectedRegion > m_eclConnectedRegions
Store array: ECLConnectedRegion.
double m_minimumSharedEnergy
Minimum shared energy.
const unsigned short c_nSectorCellIdFWD[13]
crystals per sector for theta rings
TGraph2D * m_tg2dNOptimalBarrel
Array of 2D graphs used for interpolation between background and energy.
std::string m_positionMethod
Position calculation: lilo or linear.
void splitConnectedRegion(ECLConnectedRegion &aCR)
Split connected region into showers.
virtual void initialize() override
Initialize.
TFile * m_fileBackgroundNorm
Background normalization file.
double m_cutDigitTimeResidualForEnergy
Maximum time residual to be included in the shower energy calculation.
StoreArray< ECLLocalMaximum > m_eclLocalMaximums
Store array: ECLLocalMaximum.
virtual void event() override
Event.
TFile * m_fileNOptimalBarrel
Barrel number of optimal neighbours.
std::string m_fileBackgroundNormName
Background normalization filename.
double m_threshold
Local maximum threshold after splitting.
double estimateEnergy(const int centerid)
Estimate energy using 3x3 around central crystal.
virtual const char * eclShowerArrayName() const
Default name ECLShowers.
virtual void endRun() override
End run.
TFile * m_fileNOptimalFWD
FWD number of optimal neighbours.
virtual void terminate() override
Terminate.
ECL::ECLGeometryPar * m_geom
Geometry.
TGraph2D * m_tg2dNOptimalBWD[10][9]
Array of 2D graphs used for interpolation between background and energy.
std::string m_fileNOptimalFWDName
FWD number of optimal neighbours filename.
std::vector< int > m_cellIdInCR
list with all cellid of this connected region
double m_shiftTolerance
Tolerance level for centroid shifts.
virtual void beginRun() override
Begin run.
int m_fullBkgdCount
Number of expected background digits at full background, FIXME: move to database.
virtual const char * eventLevelClusteringInfoName() const
Name to be used for default option: EventLevelClusteringInfo.
TH1F * m_th1fBackgroundNorm
Background normalization histogram.
std::string m_fileNOptimalBarrelName
Barrel number of optimal neighbours filename.
const double c_molierRadius
Constant RM (Molier Radius) from exp(-a*dist/RM), http://pdg.lbl.gov/2009/AtomicNuclearProperties/HTM...
int m_maxSplits
Maximum number of splits.
int m_useOptimalNumberOfDigitsForEnergy
Optimize the number of neighbours for energy calculations.
int getNeighbourMap(const double energy, const double background)
Get number of neighbours based on first energy estimation and background level per event.
double m_cutDigitEnergyForEnergy
Minimum digit energy to be included in the shower energy calculation.
std::vector< double > m_liloParameters
lin-log parameters A, B, and C
virtual const char * eclCalDigitArrayName() const
Default name ECLCalDigits.
std::vector< int > m_StoreArrPosition
vector (8736+1 entries) with cell id to store array positions
TGraph2D * m_tg2dNOptimalFWD[13][9]
Array of 2D graphs used for interpolation between background and energy.
std::vector< int > m_StoreArrPositionLM
vector (8736+1 entries) with cell id to store array positions for LM
double m_liloParameterA
lin-log parameter A
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
Store object pointer: EventLevelClusteringInfo.
unsigned int getOptimalNumberOfDigits(const int cellid, const double energy, const double background)
Get optimal number of digits (out of 21) based on first energy estimation and background level per ev...
double getEnergySum(std::vector< std::pair< double, double > > &weighteddigits, const unsigned int n)
Get energy sum for weighted entries.
StoreArray< ECLCalDigit > m_eclCalDigits
Store array: ECLCalDigit.
double m_expConstant
Constant a from exp(-a*dist/RM), 1.5 to 2.5.
double m_liloParameterC
lin-log parameter C
virtual const char * eclConnectedRegionArrayName() const
Default name ECLConnectedRegions.
TFile * m_fileNOptimalBWD
BWD number of optimal neighbours.
virtual const char * eclLocalMaximumArrayName() const
Default name ECLLocalMaximums.
const unsigned short c_crystalsPerRing[69]
Number of crystals per theta ring.
The very same module but for PureCsI.
virtual const char * eclConnectedRegionArrayName() const override
PureCsI name ECLConnectedRegionsPureCsI.
virtual const char * eclLocalMaximumArrayName() const override
PureCsI name ECLLocalMaximumsPureCsI.
virtual const char * eclShowerArrayName() const override
PureCsI name ECLShowersPureCsI.
virtual const char * eclCalDigitArrayName() const override
PureCsI name ECLCalDigitsPureCsI.
virtual const char * eventLevelClusteringInfoName() const override
Name to be used for PureCsI option: EventLevelClusteringInfoPureCsI.
The Class for ECL Geometry Parameters.
Class to get the neighbours for a given cell id.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
static const double cm
Standard units with the value = 1.
Abstract base class for different kinds of events.