10#include "trg/trg/Debug.h"
11#include "trg/ecl/modules/trgeclRawdataAnalysis/TRGECLRawdataAnalysisModule.h"
32 return string(
"TRGECLAnalysisModule 1.00");
39 _debugLevel(0), _Clustering(1)
42 string desc =
"TRGECLRawdataAnalysisModule(" +
version() +
")";
52 std::cout <<
"TRGECLRawdataAnalysisModule ... created" << std::endl;
62 std::cout <<
"TRGECLRawdataAnalysisModule ... destructed " << std::endl;
76 std::cout <<
"TRGECLRawdataAnalysisModule::initialize ... options" << std::endl;
101 std::cout <<
"TRGECLRawdataAnalysisModule ... beginRun called " << std::endl;
114 std::cout <<
"TRGECLMoudle ... event called" << std::endl;
117 std::vector<int> TCId;
118 std::vector<double> TCTiming;
119 std::vector<double> TCEnergy;
131 for (
int ii = 0; ii < trgeclUnpackerStoreArray.
getEntries(); ii++) {
134 int iTCID = (TCHit->
getTCId() - 1);
136 int HitEnergy = TCHit -> getTCEnergy();
137 HitRevoFAM = TCHit -> getRevoFAM();
138 HitFineTime = TCHit -> getTCTime();
140 if (iTCID == -1) {
continue;}
142 TCId.push_back(iTCID + 1);
143 TCTiming.push_back(HitTiming);
144 TCEnergy.push_back(HitEnergy);
150 if (TCId.size() > 0) {
154 obj_cluster.
setICN(TCId, TCEnergy, TCTiming);
159 int Timing = ((HitFineTime >> 3) & 0xF) + ((HitRevoFAM & 0x7F) << 4);
166 TimingArray[
m_hitNum]->setTiming(Timing);
187 std::cout <<
"TRGECLRawdataAnalysisModule ... endRun called " << std::endl;
197 std::cout <<
"TRGECLRawdataAnalysisModule ... terminate called " << std::endl;
void setDescription(const std::string &description)
Sets the description of the module.
Accessor to arrays stored in the data store.
T * appendNew()
Construct a new T object at the end of the array.
int getEntries() const
Get the number of objects in the array.
int _Clustering
Clustering option.
int _debugLevel
Debug level.
int m_hitNum
The current number of created hits in an event.
int m_hitTCNum
TC Hit number.
int m_nEvent
Event number.
StoreArray< TRGECLCluster > m_TRGECLCluster
output for TRGECLCluster
StoreArray< TRGECLUnpackerStore > m_TRGECLUnpackerStore
output for TRGECLUnpackerStore
StoreArray< TRGECLTiming > m_TRGECLTiming
output for TRGECLTiming
int getTCId() const
The method to get cell id.
int getTCTime() const
The method to get hit average time.
A Class of ECL Trigger clustering
void save(int)
Save Cluster information in TRGECLCluster Table.
void setICN(const std::vector< int > &)
set ICN for each part(Fw,Br,Bw)
void setClusteringMethod(int method)
Set.
void setEventId(int eventId)
Set EventId.
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.
virtual ~TRGECLRawdataAnalysisModule()
Destructor
virtual void initialize() override
Initilizes TRGECLModule.
virtual void event() override
Called event by event.
TRGECLRawdataAnalysisModule()
Constructor.
virtual void endRun() override
Called when run ended.
virtual void terminate() override
Called when processing ended.
virtual void beginRun() override
Called when new run started.
std::string version(void) const
returns version of TRGECLModule.
static std::string tab(void)
returns tab spaces.
static int level(void)
returns the debug level.
Abstract base class for different kinds of events.