9#include <ecl/modules/eclTrimShowersAndDigits/ECLTrimShowersAndDigitsModule.h>
10#include <mdst/dataobjects/ECLCluster.h>
11#include <ecl/dataobjects/ECLCalDigit.h>
12#include <ecl/dataobjects/ECLShower.h>
13#include <mdst/dataobjects/MCParticle.h>
14#include <framework/datastore/DataStore.h>
32 setDescription(
"Create trimmed ECLCalDigit and ECLShower dataobjects");
63 double clusterMaxMCE = 0.;
65 for (
int i = 0; i < nCluster; i++) {
70 for (
unsigned int ir = 0; ir < clusterMCRelations.size(); ++ir) {
71 mcE += clusterMCRelations.weight(ir);
73 if (mcE > clusterMaxMCE) {
107 bool returnValue =
false;
110 const auto cluster = clusterShowerRelations.object(0);
111 const unsigned short cellID = cluster->getMaxECellId();
112 if (cellID ==
maxCellID) {returnValue =
true;}
122 bool returnValue =
false;
124 for (
unsigned int ir = 0; ir < clusterDigitRelations.size(); ++ir) {
125 const auto cluster = clusterDigitRelations.object(ir);
126 const unsigned short cellID = cluster->getMaxECellId();
127 if (cellID ==
maxCellID) {returnValue =
true;}
@ c_WriteOut
Object/array should be saved by output modules.
Class to store calibrated ECLDigits: ECLCalDigits.
@ c_nPhotons
CR is split into n photons (N1)
Class to store ECL Showers.
int getHypothesisId() const
Get Hypothesis Id.
@ c_nPhotons
CR is split into n photons (N1)
StoreArray< MCParticle > m_mcParticleArray
Array of MCParticles.
StoreArray< ECLShower > m_eclShowerArray
Array of ECLShowers.
std::string m_DigitArrayName
Name of new ECLCalDigit StoreArray.
virtual void initialize() override
Register input and output data.
virtual void event() override
Event.
StoreArray< ECLCluster > m_eclClusterArray
Array of ECLClusters.
bool selectShower(const ECLShower *shower)
keep the ECLShower or not
std::string m_ShowerArrayName
Name of new ECLShower StoreArray.
bool selectDigit(const ECLCalDigit *digit)
keep the ECLCalDigit or not
virtual void terminate() override
Terminate.
ECLTrimShowersAndDigitsModule()
Constructor: Sets the description, the properties and the parameters of the module.
StoreArray< ECLCalDigit > m_eclCalDigitArray
Array of ECLCalDigits.
SelectSubset< ECLCalDigit > m_selectedDigits
selected ECLCalDigits
unsigned short maxCellID
used to identify the cluster of interest
SelectSubset< ECLShower > m_selectedShowers
selected ECLShowers
A Class to store the Monte Carlo particle information.
void setDescription(const std::string &description)
Sets the description of the module.
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.
int getEntries() const
Get the number of objects in the array.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.