8#include "trg/cdc/modules/trgcdc/CDCTriggerETFModule.h"
22 "The Event Time Finder module of the CDC trigger.\n"
23 "Uses fastest time of CDCTriggerSegmentHits to find the event time.\n"
28 "Name of the input StoreArray of CDCTriggerSegmentHits.",
31 "Name of the output StoreObjPtr.",
35 "If true, always output 0 (assuming this is the true event time for MC).",
39 "Event time is given by first timing bin with more than threshold hits.",
64 TH1* h =
new TH1D(
"h",
"h", 1000, -500, 499);
66 for (
int iClk = 0; iClk < 64; ++iClk) {
68 int foundT =
m_hits[iTS]->foundTime();
69 if (foundT / 16 + 31 != iClk)
71 int fastestT =
m_hits[iTS]->fastestTime();
72 int whdiff = foundT - fastestT;
75 for (
int iSL = 0; iSL < 9; ++iSL) {
76 if (
m_hits[iTS]->getISuperLayer() != iSL)
79 if (cnt[iSL][iClk] <= 10) {
81 B2DEBUG(100,
"fill fastestT " << fastestT);
91 for (
int i = 450; i < 600; ++i) {
void addBinnedEventT0(int eventT0, Const::EDetector detector)
Store a binned event t0 for the given detector replacing any other hypothesis for this detector.
std::string m_EventTimeName
name of the output StoreObjPtr holding the event time
virtual void initialize() override
Initialize the module and register DataStore arrays.
virtual void event() override
Run the ETF for an event.
unsigned m_threshold
bin threshold for event time
CDCTriggerETFModule()
Constructor, for setting module description and parameters.
StoreArray< CDCTriggerSegmentHit > m_hits
list of input track segment hits
bool m_trueEventTime
if true, always output 0 (assuming this is the true event time for MC)
StoreObjPtr< BinnedEventT0 > m_eventTime
StoreObjPtr holding the event time.
std::string m_hitCollectionName
name of the input track segment hit StoreArray
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...
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
bool create(bool replace=false)
Create a default object in the data store.
int getEntries() const
Get the number of objects in the array.
bool isValid() const
Check whether the object was created.
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.