8#include "trg/gdl/modules/trggdl/TRGGDLCosmicRunModule.h"
20 "Module that returns true, if the trigger condition "
21 "for the 2017 cosmic runs is fulfilled.\n"
22 "trigger conditions:\n"
23 " with back-to-back: two back-to-back track segments in superlayer 2 "
25 " without back-to-back: on track segment in superlayer 2 "
30 "Name of the input StoreArray of CDCTriggerSegmentHits.",
33 "Switch to turn back-to-back requirement on or off.",
36 "Switch to turn off the ECL part of the cosmic trigger.",
50 bool TSinMerger[12] = {
false};
56 unsigned mergerID = (
m_segmentHits[its]->getSegmentID() - 320) / 16;
57 TSinMerger[mergerID] =
true;
61 bool BackToBack =
false;
62 for (
unsigned i = 0; i < 6; ++i) {
63 BackToBack |= (TSinMerger[i] && TSinMerger[i + 6]);
68 for (
int itchit = 0; itchit <
m_tchit.getEntries(); itchit++) {
69 if ((
m_tchit[itchit] -> getNofTCHit()) > 0) {
void setDescription(const std::string &description)
Sets the description of the module.
void setReturnValue(int value)
Sets the return value for this module as integer.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
int getEntries() const
Get the number of objects in the array.
StoreArray< TRGECLTrg > m_tchit
list of ECL trigger hits
virtual void initialize() override
Initialize the module.
virtual void event() override
Check the trigger condition and set return value.
StoreArray< CDCTriggerSegmentHit > m_segmentHits
list of track segment hits
bool m_skipECL
switch for turning off the ECL part
std::string m_tsHitCollectionName
name of track segment hit list
TRGGDLCosmicRunModule()
Constructor, for setting module description and parameters.
bool m_backToBack
switch for back-to-back condition
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.