12#ifndef O2_EMCAL_CELLCONVERTER_SPEC
13#define O2_EMCAL_CELLCONVERTER_SPEC
34namespace reco_workflow
56 CellConverterSpec(
bool propagateMC,
int inputSubsepc,
int outputSubspec, std::shared_ptr<o2::emcal::CalibLoader> calibhandler) :
framework::
Task(), mPropagateMC(propagateMC), mSubspecificationIn(inputSubsepc), mSubspecificationOut(outputSubspec), mCalibHandler(calibhandler){};
86 std::vector<o2::emcal::SRUBunchContainer>
digitsToBunches(gsl::span<const o2::emcal::Digit>
digits, std::vector<gsl::span<const o2::emcal::MCLabel>>& mcLabels);
88 std::vector<AltroBunch>
findBunches(
const std::vector<const o2::emcal::Digit*>& channelDigits,
const std::vector<gsl::span<const o2::emcal::MCLabel>>& mcLabels,
ChannelType_t channelType);
90 void mergeLabels(std::vector<o2::emcal::AltroBunch>& channelBunches);
98 bool mPropagateMC =
false;
99 unsigned int mSubspecificationIn = 0;
100 unsigned int mSubspecificationOut = 0;
102 std::shared_ptr<o2::emcal::CalibLoader> mCalibHandler;
103 std::unique_ptr<o2::emcal::CaloRawFitter> mRawFitter;
104 std::vector<o2::emcal::Cell> mOutputCells;
105 std::vector<o2::emcal::TriggerRecord> mOutputTriggers;
Definition of a container to keep Monte Carlo truth external to simulation objects.
EMCAL geometry definition.
Coverter task for EMCAL digits to EMCAL cells.
std::vector< AltroBunch > findBunches(const std::vector< const o2::emcal::Digit * > &channelDigits, const std::vector< gsl::span< const o2::emcal::MCLabel > > &mcLabels, ChannelType_t channelType)
~CellConverterSpec() override=default
Destructor.
void init(framework::InitContext &ctx) final
Initializing the CellConverterSpec.
void updateCalibrationObjects()
Update calibration objects.
int selectMaximumBunch(const gsl::span< const Bunch > &bunchvector)
void mergeLabels(std::vector< o2::emcal::AltroBunch > &channelBunches)
CellConverterSpec(bool propagateMC, int inputSubsepc, int outputSubspec, std::shared_ptr< o2::emcal::CalibLoader > calibhandler)
Constructor.
std::vector< o2::emcal::SRUBunchContainer > digitsToBunches(gsl::span< const o2::emcal::Digit > digits, std::vector< gsl::span< const o2::emcal::MCLabel > > &mcLabels)
void run(framework::ProcessingContext &ctx) final
Run conversion of digits to cells.
void finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj) final
framework::DataProcessorSpec getCellConverterSpec(bool propagateMC, int inputSubsepc=0, int outputSubspec=0)
Creating DataProcessorSpec for the EMCAL Cell Converter Spec.
ChannelType_t
Type of a raw data channel.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< Digit > digits