12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/gearbox/Unit.h>
16#include <framework/geometry/B2Vector3.h>
17#include <mdst/dataobjects/EventLevelClusteringInfo.h>
32 class ECLLocalMaximum;
33 class ECLConnectedRegion;
57 virtual void event()
override;
60 virtual void endRun()
override;
88 {
return "MCParticles" ; }
92 {
return "ECLHits" ; }
96 {
return "ECLDigits" ; }
100 {
return "ECLCalDigits" ; }
104 {
return "ECLConnectedRegions" ; }
108 {
return "ECLLocalMaximums" ; }
120 void addToSignalEnergy(
int motherpdg,
int motherindex,
int pi0index,
double weight);
132 void getMax(
int& maxtype,
int& maxpos);
201 {
return "ECLDigitsPureCsI" ; }
205 {
return "ECLCalDigitsPureCsI" ; }
209 {
return "ECLConnectedRegionsPureCsI" ; }
213 {
return "ECLLocalMaximumsPureCsI" ; }
Class to store connected regions (CRs)
Class to find connected regions.
TTree * m_tree
tree that contain information for MVA training
double m_cutRatioCorrection
correction for nominator and denominator of the ratio.
double m_signalEnergy[10][5]
total energy per MC matching type of this digit
void getEnteringMother(const MCParticle &particle, int &pdg, int &arrayindex, int &pi0arrayindex)
Get enterging mother of this particle.
StoreArray< ECLConnectedRegion > m_eclConnectedRegions
Store array: ECLConnectedRegion.
float m_timeFitFailed
failed fit
float m_energyRatioNeighbour[c_nMaxNeighbours]
energy ratio of neighbour 0..9 to center
double m_cutOffset
cut offset
double m_totalSignalEnergy
total energy of this digit
float m_phiId
local maximum center theta Id
double m_energyCut
energy cut for seed
virtual void initialize() override
Initialize.
virtual const char * eclHitArrayName() const
Name to be used for default or PureCsI option: ECLHits.
StoreArray< ECLLocalMaximum > m_eclLocalMaximums
Store array: ECLLocalMaximum.
float m_cellId
local maximum center cell Id
virtual void event() override
Event.
virtual const char * eclLocalMaximumArrayName() const
Name to be used for default option: ECLLocalMaximums.
int getIdPosition(const int type, const int id)
Get Id position in the vector.
float m_energy
Variables to monitor the MVA training.
virtual void endRun() override
End run.
std::string m_method
Method to find the local maximum.
virtual void terminate() override
Terminate (close ROOT files here if you have opened any).
ECL::ECLGeometryPar * m_geom
Geometry.
std::string m_outfileName
file name prefix of the training output file
StoreArray< ECLDigit > m_eclDigits
Store array: ECLDigit.
ECL::ECLNeighbours * m_neighbourMap
Neighbour maps.
void makeLocalMaximum(const ECLConnectedRegion &aCR, const int cellId, const int lmId)
Make local maximum for a given connected region.
void resetClassifierVariables()
Reset Classifier Variables.
float m_thetaId
local maximum center theta Id
virtual const char * mcParticleArrayName() const
MCParticles.
float m_maxNeighbourEnergy
highest energy of all neighbours
ECLLocalMaximumFinderModule()
Constructor.
bool isEnteringECL(const B2Vector3D &vec)
Check if particle is produced outside of the ECL.
TFile * m_outfile
Output training files and trees.
float m_timeResolution
time resolution
virtual void beginRun() override
Begin.
void addToSignalEnergy(int motherpdg, int motherindex, int pi0index, double weight)
Add energy to vector.
virtual const char * eclDigitArrayName() const
Name to be used for default or PureCsI option: ECLDigits.
float m_targetpi0index
target array index
StoreArray< ECLHit > m_eclHits
Store array: ECLHit.
virtual const char * eclConnectedRegionArrayName() const
Name to be used for default option: ECLConnectedRegions.
float m_target
MC truth variables.
static const unsigned c_nMaxNeighbours
Variables (possibly) used for MVA classification.
StoreArray< MCParticle > m_mcParticles
Store array: MCParticle.
virtual const char * eclCalDigitArrayName() const
Name to be used for default or PureCsI option: ECLCalDigits.
float m_targetindex
target array index
float m_maxEnergyRatio
Highest energetic neighbour energy divided by LM energy.
int m_signalId[10][5]
total energy per MC matching type of this digit
const double c_minEnergyCut
Minimum LM energy.
std::vector< int > m_StoreArrPosition
vector (ECLElementNumbers::c_NCrystals + 1 entries) with cell id to store array positions
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
EventLevelClusteringInfo.
void resetTrainingVariables()
Reset Debug Variables.
void getMax(int &maxtype, int &maxpos)
Get the highest energy deposition particle type.
StoreArray< ECLCalDigit > m_eclCalDigits
Store array: ECLCalDigit.
double m_cutSlope
cut slope.
int m_isTrainingMode
training mode for MVA methods (i.e.
double m_truthFraction
MC truth fraction.
float m_nNeighbours10
Variables (possibly) used for cut classification.
virtual ~ECLLocalMaximumFinderModule()
Destructor.
Class to find connected regions, pureCsI version.
virtual const char * eclCalDigitArrayName() const override
Name to be used for PureCsI option: ECLCalDigitsPureCsI.
virtual const char * eclDigitArrayName() const override
Name to be used for PureCsI option: ECLHitsPureCsI.
virtual const char * eclLocalMaximumArrayName() const override
Name to be used for PureCsI option: ECLLocalMaximumsPureCsI.
virtual const char * eclConnectedRegionArrayName() const override
Name to be used for PureCsI option: ECLConnectedRegionsPureCsI.
The Class for ECL Geometry Parameters.
Class to get the neighbours for a given cell id.
A Class to store the Monte Carlo particle information.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
static const double MeV
[megaelectronvolt]
Abstract base class for different kinds of events.