9#include <ecl/modules/eclTriggerClusterMatcher/ECLTriggerClusterMatcherModule.h>
12#include <framework/geometry/B2Vector3.h>
15#include <mdst/dataobjects/ECLCluster.h>
18#include <trg/ecl/dataobjects/TRGECLCluster.h>
38 addParam(
"maxAngle",
m_maxAngle,
"Maximum angle between an ECLCLuster and an ECLTRGCluster [rad]", 0.15);
54 const double eclclusterTheta = eclcluster.getTheta();
55 const double eclclusterPhi = eclcluster.getPhi();
57 double eclclusterE = 0.0;
74 cluster.SetTheta(eclclusterTheta);
75 cluster.SetPhi(eclclusterPhi);
78 const double ecltriggerX = ecltrigger.getPositionX();
79 const double ecltriggerY = ecltrigger.getPositionY();
80 const double ecltriggerZ = ecltrigger.getPositionZ();
81 const double ecltriggerE = ecltrigger.getEnergyDep();
83 B2Vector3D trigger(ecltriggerX, ecltriggerY, ecltriggerZ);
85 const double angle = cluster.Angle(trigger);
87 double fracEnergy = -1.;
88 if (eclclusterE > 0.0) fracEnergy = ecltriggerE / eclclusterE;
93 eclcluster.addRelationTo(&ecltrigger);
@ c_TriggerCluster
bit 0: ECLCluster is matched to a ECL trigger cluster
@ c_TriggerClusterMatching
bit 1: ECLCluster to ECLTRGCluster matcher was run
@ c_nPhotons
CR is split into n photons (N1)
@ c_neutralHadron
CR is reconstructed as a neutral hadron (N2)
double m_minClusterEnergy
minimum cluster energy.
double m_minFracEnergy
minimum energy fraction tr/cluster
virtual void initialize() override
Register input and output data.
virtual void event() override
Event.
double m_maxAngle
maximal angular separation
double m_maxFracEnergy
maximal energy fraction trg/cluster
ECLTriggerClusterMatcherModule()
Constructor: Sets the description, the properties and the parameters of the module.
StoreArray< TRGECLCluster > m_eclTriggers
eclTriggers
StoreArray< ECLCluster > m_eclClusters
eclClusters
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.