#include #include #include "IGeometryDatabase.hxx" #include "IECALReconEventFunction.hxx" #include "IHitSelection.hxx" #include "IDataHit.hxx" #include "IMCHit.hxx" //====================================================================== // Constructor //====================================================================== IECALReconEventFunction::IECALReconEventFunction() : IReconEventFunction("ECAL") { // Prepare algorithm fASumupEnergies = new COMET::IECALSumupEnergies(); } //====================================================================== // Destructor //====================================================================== IECALReconEventFunction::~IECALReconEventFunction() { delete fASumupEnergies; } //====================================================================== // Usage //====================================================================== void IECALReconEventFunction::Usage() { std::cout << "Waveform analysis -> Energy clustering." << std::endl << std::endl << "Options:\n" << " No options yet.\n" << std::endl; } //====================================================================== // SetOption //====================================================================== bool IECALReconEventFunction::SetOption(TString option, TString value) { // Now no specific option here return false; } //====================================================================== // BeginOfEvent //====================================================================== void IECALReconEventFunction::BeginOfEvent() { } //====================================================================== // EndOfEvent //====================================================================== void IECALReconEventFunction::EndOfEvent() { } //====================================================================== // PrepareHits //====================================================================== COMET::IHandle IECALReconEventFunction::PrepareHits(COMET::ICOMETEvent& event) { COMET::IHandle hits = event.GetHitSelection("ECAL"); if(hits){ return MakeBasicAlgorithmResult(hits); } // Return NULL return COMET::IHandle(); } //====================================================================== // ProcesAlgorithms //====================================================================== COMET::IHandle IECALReconEventFunction::ProcessAlgorithms(const COMET::IAlgorithmResult& input, COMET::ICOMETEvent& event) { COMET::IHandle sumenergy = fASumupEnergies->Process(input); event.AddFit(sumenergy); return sumenergy; }