Belle II Software development
TRGGDLDQMModule Class Reference
Inheritance diagram for TRGGDLDQMModule:
HistoModule Module PathElement

Public Types

enum  EModulePropFlags {
  c_Input = 1 ,
  c_Output = 2 ,
  c_ParallelProcessingCertified = 4 ,
  c_HistogramManager = 8 ,
  c_InternalSerializer = 16 ,
  c_TerminateInAllProcesses = 32 ,
  c_DontCollectStatistics = 64
}
 Each module can be tagged with property flags, which indicate certain features of the module. More...
 
typedef ModuleCondition::EAfterConditionPath EAfterConditionPath
 Forward the EAfterConditionPath definition from the ModuleCondition.
 

Public Member Functions

 TRGGDLDQMModule ()
 Constructor.
 
virtual ~TRGGDLDQMModule ()
 Destrunctor.
 
virtual void initialize () override
 initialize
 
virtual void beginRun () override
 begin Run
 
virtual void event () override
 Event.
 
virtual void endRun () override
 End Run.
 
virtual void terminate () override
 terminate
 
virtual void defineHisto () override
 Define Histogram.
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules.
 
const std::string & getName () const
 Returns the name of the module.
 
const std::string & getType () const
 Returns the type of the module (i.e.
 
const std::string & getPackage () const
 Returns the package this module is in.
 
const std::string & getDescription () const
 Returns the description of the module.
 
void setName (const std::string &name)
 Set the name of the module.
 
void setPropertyFlags (unsigned int propertyFlags)
 Sets the flags for the module properties.
 
LogConfiggetLogConfig ()
 Returns the log system configuration.
 
void setLogConfig (const LogConfig &logConfig)
 Set the log system configuration.
 
void setLogLevel (int logLevel)
 Configure the log level.
 
void setDebugLevel (int debugLevel)
 Configure the debug messaging level.
 
void setAbortLevel (int abortLevel)
 Configure the abort log level.
 
void setLogInfo (int logLevel, unsigned int logInfo)
 Configure the printed log information for the given level.
 
void if_value (const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 Add a condition to the module.
 
void if_false (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to add a condition to the module.
 
void if_true (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to set the condition of the module.
 
bool hasCondition () const
 Returns true if at least one condition was set for the module.
 
const ModuleConditiongetCondition () const
 Return a pointer to the first condition (or nullptr, if none was set)
 
const std::vector< ModuleCondition > & getAllConditions () const
 Return all set conditions for this module.
 
bool evalCondition () const
 If at least one condition was set, it is evaluated and true returned if at least one condition returns true.
 
std::shared_ptr< PathgetConditionPath () const
 Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).
 
Module::EAfterConditionPath getAfterConditionPath () const
 What to do after the conditional path is finished.
 
std::vector< std::shared_ptr< Path > > getAllConditionPaths () const
 Return all condition paths currently set (no matter if the condition is true or not).
 
bool hasProperties (unsigned int propertyFlags) const
 Returns true if all specified property flags are available in this module.
 
bool hasUnsetForcedParams () const
 Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.
 
const ModuleParamListgetParamList () const
 Return module param list.
 
template<typename T>
ModuleParam< T > & getParam (const std::string &name) const
 Returns a reference to a parameter.
 
bool hasReturnValue () const
 Return true if this module has a valid return value set.
 
int getReturnValue () const
 Return the return value set by this module.
 
std::shared_ptr< PathElementclone () const override
 Create an independent copy of this module.
 
std::shared_ptr< boost::python::list > getParamInfoListPython () const
 Returns a python list of all parameters.
 

Static Public Member Functions

static void exposePythonAPI ()
 Exposes methods of the Module class to Python.
 

Protected Member Functions

void fillRiseFallTimings (void)
 
void fillOutputExtra (void)
 
void fillOutputOverlap (void)
 
void fillOutputPureExtra (void)
 
void genVcd (void)
 
bool anaBitCondition (void)
 
bool isFired (std::string bitname)
 
bool isFired_quick (const std::string &bitname, const bool &isPsnm)
 
int getinbitnum (const char *c) const
 
int getoutbitnum (const char *c) const
 
virtual void def_initialize ()
 Wrappers to make the methods without "def_" prefix callable from Python.
 
virtual void def_beginRun ()
 Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.
 
virtual void def_event ()
 Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.
 
virtual void def_endRun ()
 This method can receive that the current run ends as a call from the Python side.
 
virtual void def_terminate ()
 Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.
 
void setDescription (const std::string &description)
 Sets the description of the module.
 
void setType (const std::string &type)
 Set the module type.
 
template<typename T>
void addParam (const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
 Adds a new parameter to the module.
 
template<typename T>
void addParam (const std::string &name, T &paramVariable, const std::string &description)
 Adds a new enforced parameter to the module.
 
void setReturnValue (int value)
 Sets the return value for this module as integer.
 
void setReturnValue (bool value)
 Sets the return value for this module as bool.
 
void setParamList (const ModuleParamList &params)
 Replace existing parameter list.
 

Protected Attributes

int start_skim_gdldqm = 0
 
int end_skim_gdldqm = 0
 
int m_skim = -1
 
TH1I * h_c8_gdlL1TocomL1 [nskim_gdldqm] = {nullptr}
 timestamp diff from gdlL1 to comL1 in LSB8nsec
 
TH1I * h_c8_topTogdlL1 [nskim_gdldqm] = {nullptr}
 timestamp diff from t0(top) to gdlL1 in LSB8nsec
 
TH1I * h_c8_eclTogdlL1 [nskim_gdldqm] = {nullptr}
 timestamp diff from t0(ecl) to gdlL1 in LSB8nsec
 
TH1I * h_c8_cdcTogdlL1 [nskim_gdldqm] = {nullptr}
 timestamp diff from t0(cdc) to gdlL1 in LSB8nsec
 
TH1I * h_c8_ecl8mToGDL [nskim_gdldqm] = {nullptr}
 timestamp diff from fit on fam to GDL in LSB8nsec
 
TH1I * h_c8_topToGDL [nskim_gdldqm] = {nullptr}
 timestamp diff from t0(top) to GDL in LSB8nsec
 
TH1I * h_c8_eclToGDL [nskim_gdldqm] = {nullptr}
 timestamp diff from t0(ecl) to GDL in LSB8nsec
 
TH1I * h_c8_cdcToGDL [nskim_gdldqm] = {nullptr}
 timestamp diff from t0(cdc) to GDL in LSB8nsec
 
TH1I * h_c2_cdcTocomL1 [nskim_gdldqm] = {nullptr}
 timestamp diff from cdc_timing to comL1 in LSB2nsec
 
TH1D * h_ns_cdcTocomL1 [nskim_gdldqm] = {nullptr}
 timestamp diff from cdc_timing to comL1 in nsec
 
TH1D * h_ns_cdcTogdlL1 [nskim_gdldqm] = {nullptr}
 timestamp diff from cdc_timing to gdlL1 in nsec
 
TH1D * h_ns_topToecl [nskim_gdldqm] = {nullptr}
 timestamp diff from top_timing to ecl_timing in nsec
 
TH1D * h_ns_topTocdc [nskim_gdldqm] = {nullptr}
 timestamp diff from top_timing to cdc_timing in nsec
 
TH1I * h_c2_cdcToecl [nskim_gdldqm] = {nullptr}
 timestamp from cdc_timing to ecl_timing to L1 in LSB2nsec
 
TH1D * h_ns_cdcToecl [nskim_gdldqm] = {nullptr}
 timestamp diff from cdc_timing to ecl_timing in nsec
 
TH1I * h_itd [nskim_gdldqm] = {nullptr}
 input bits
 
TH1I * h_itd_rise [N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
 
TH1I * h_itd_fall [N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
 
TH1I * h_ftd [nskim_gdldqm] = {nullptr}
 ftd bits
 
TH1I * h_ftd_rise [N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
 
TH1I * h_ftd_fall [N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
 
TH1I * h_psn [nskim_gdldqm] = {nullptr}
 psn bits
 
TH1I * h_psn_rise [N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
 
TH1I * h_psn_fall [N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
 
TH1I * h_psn_extra [nskim_gdldqm] = {nullptr}
 
TH1I * h_psn_extra_fast [nskim_gdldqm] = {nullptr}
 
TH1I * h_psn_effect_to_l1 [nskim_gdldqm] = {nullptr}
 
TH1I * h_psn_raw_rate [nskim_gdldqm] = {nullptr}
 
TH1I * h_psn_pure_extra [nskim_gdldqm] = {nullptr}
 
TH1I * h_timtype [nskim_gdldqm] = {nullptr}
 timtype
 
std::vector< int > h_0_vec
 
std::vector< int > h_p_vec
 
std::vector< int > h_f_vec
 event by event ftdl timing distribution
 
std::vector< int > h_i_vec
 event by event input timing distribution
 
TDirectory * oldDir = nullptr
 
TDirectory * dirDQM = nullptr
 
bool m_eventByEventTimingHistRecord
 
bool m_dumpVcdFile
 
bool m_bitNameOnBinLabel
 
bool m_generatePostscript
 
unsigned m_vcdEventStart = 0
 
unsigned m_vcdNumberOfEvents = 0
 
std::string m_bitConditionToDumpVcd
 
std::string m_postScriptName
 
std::unordered_map< std::string, int > m_inbitIndex
 bit name -> input bit number, built once in initialize()
 
std::unordered_map< std::string, int > m_outbitIndex
 bit name -> output bit number, built once in initialize()
 
std::vector< char > m_firedPsnm
 per-event cache: psnm output bit fired in at least one clock cycle
 
std::vector< char > m_firedFtdl
 per-event cache: ftdl output bit fired in at least one clock cycle
 
std::vector< char > m_firedInput
 per-event cache: input bit fired in at least one clock cycle
 
unsigned n_clocks = 0
 
unsigned evtno = 0
 
unsigned _exp = 0
 
unsigned _run = 0
 
std::vector< int > skim
 
int array_psn_extra_fast [nskim_gdldqm][nsample_fast][n_output_extra] = {{{0}}}
 array to store past nsample events
 
int m_fastPos [nskim_gdldqm] = {0}
 ring-buffer index of the newest slot of array_psn_extra_fast
 
int m_fastSum [nskim_gdldqm][n_output_extra] = {{0}}
 running sum of array_psn_extra_fast over the whole ring
 
bool m_leavesResolved = false
 whether the leaf positions below are valid for the current run
 
int m_evtLeaf = -1
 position of the "evt" leaf in m_unpackername, -1 if absent
 
int m_clkLeaf = 0
 position of the "clk" leaf in m_unpackername
 
std::vector< std::pair< int, int > > m_leafMap
 (position in m_unpacker, leaf number) for every mapped leaf
 
DBObjPtr< TRGGDLDBUnpackerm_unpacker
 condition database for unpacker
 
int LeafBitMap [320] = {0}
 
char LeafNames [320][100] = {{0}}
 
int _e_timtype = 0
 
int _e_gdll1rvc = 0
 
int _e_coml1rvc = 0
 
int _e_toptiming = 0
 
int _e_ecltiming = 0
 
int _e_cdctiming = 0
 
int _e_toprvc = 0
 
int _e_eclrvc = 0
 
int _e_cdcrvc = 0
 
int ee_psn [10] = {0}
 
int ee_ftd [10] = {0}
 
int ee_itd [10] = {0}
 
int n_leafs = 0
 
int n_leafsExtra = 0
 
int nconf = 0
 
int nword_input = 0
 
int nword_output = 0
 
DBObjPtr< TRGGDLDBInputBitsm_dbinput
 condition database for input bits
 
unsigned n_inbit = 0
 
char inbitname [320][100] = {""}
 
DBObjPtr< TRGGDLDBFTDLBitsm_dbftdl
 condition database for output bits
 
unsigned n_outbit = 0
 
char outbitname [320][100] = {""}
 
std::string skim_menu [nskim_gdldqm]
 name of skim from hlt/softwaretrigger/scripts/softwaretrigger/db_access.py
 
std::string skim_smap [nskim_gdldqm]
 name of histograms
 

Static Protected Attributes

static const int nskim_gdldqm = 11
 number of skims
 
static const int n_output_extra = 105
 
static const char * output_extra [n_output_extra]
 
static const int n_output_overlap = 130
 
static const char * output_overlap [n_output_overlap]
 
static const int n_output_pure_extra = 13
 
static const char * output_pure_extra [n_output_pure_extra]
 
static const int nsample_fast = 500
 number of sample for fast efficiency monitor
 

Private Member Functions

std::list< ModulePtrgetModules () const override
 no submodules, return empty list
 
std::string getPathString () const override
 return the module name.
 
void setParamPython (const std::string &name, const boost::python::object &pyObj)
 Implements a method for setting boost::python objects.
 
void setParamPythonDict (const boost::python::dict &dictionary)
 Implements a method for reading the parameter values from a boost::python dictionary.
 

Private Attributes

TrgEclMappingtrgeclmap = nullptr
 ecltrg<->ecl mappint
 
StoreArray< TRGGDLUnpackerStoreentAry
 Input store array of GDL data.
 
StoreObjPtr< EventMetaDatabevt
 Input store array of metadata.
 
StoreObjPtr< SoftwareTriggerResultresult_soft
 Input store array of HLT.
 
StoreArray< TrackTracks
 Input store array of track.
 
StoreArray< ECLCalDigitm_ECLCalDigitData
 
StoreArray< ECLDigitm_ECLDigitData
 
std::string m_name
 The name of the module, saved as a string (user-modifiable)
 
std::string m_type
 The type of the module, saved as a string.
 
std::string m_package
 Package this module is found in (may be empty).
 
std::string m_description
 The description of the module.
 
unsigned int m_propertyFlags
 The properties of the module as bitwise or (with |) of EModulePropFlags.
 
LogConfig m_logConfig
 The log system configuration of the module.
 
ModuleParamList m_moduleParamList
 List storing and managing all parameter of the module.
 
bool m_hasReturnValue
 True, if the return value is set.
 
int m_returnValue
 The return value.
 
std::vector< ModuleConditionm_conditions
 Module condition, only non-null if set.
 

Detailed Description

Definition at line 43 of file TRGGDLDQMModule.h.

Member Typedef Documentation

◆ EAfterConditionPath

Forward the EAfterConditionPath definition from the ModuleCondition.

Definition at line 88 of file Module.h.

Member Enumeration Documentation

◆ EModulePropFlags

enum EModulePropFlags
inherited

Each module can be tagged with property flags, which indicate certain features of the module.

Enumerator
c_Input 

This module is an input module (reads data).

c_Output 

This module is an output module (writes data).

c_ParallelProcessingCertified 

This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)

c_HistogramManager 

This module is used to manage histograms accumulated by other modules.

c_InternalSerializer 

This module is an internal serializer/deserializer for parallel processing.

c_TerminateInAllProcesses 

When using parallel processing, call this module's terminate() function in all processes().

This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.

c_DontCollectStatistics 

No statistics is collected for this module.

Definition at line 77 of file Module.h.

77 {
78 c_Input = 1,
79 c_Output = 2,
80 c_ParallelProcessingCertified = 4,
81 c_HistogramManager = 8,
82 c_InternalSerializer = 16,
83 c_TerminateInAllProcesses = 32,
84 c_DontCollectStatistics = 64,
85 };
@ c_Output
Output Process.
Definition ProcHelper.h:19
@ c_Input
Input Process.
Definition ProcHelper.h:17

Constructor & Destructor Documentation

◆ TRGGDLDQMModule()

Constructor.

Definition at line 48 of file TRGGDLDQMModule.cc.

48 : HistoModule()
49{
50
51 setDescription("DQM for GDL Trigger system");
53
54 addParam("eventByEventTimingHistRecord", m_eventByEventTimingHistRecord,
55 "Recording event by event timing distribution histogram or not",
56 false);
57 addParam("dumpVcdFile", m_dumpVcdFile,
58 "Dumping vcd file or not",
59 false);
60 addParam("bitConditionToDumpVcd", m_bitConditionToDumpVcd,
61 "Condition for vcd. alg format with '!' and '+'.",
62 string(""));
63 addParam("vcdEventStart", m_vcdEventStart,
64 "Start equential event number",
65 unsigned(0));
66 addParam("vcdNumberOfEvents", m_vcdNumberOfEvents,
67 "Number of events to dump vcd file",
68 unsigned(10));
69 addParam("bitNameOnBinLabel", m_bitNameOnBinLabel,
70 "Put bitname on BinLabel",
71 true);
72 addParam("generatePostscript", m_generatePostscript,
73 "Genarete postscript file or not",
74 false);
75 addParam("postScriptName", m_postScriptName,
76 "postscript file name",
77 string("gdldqm.ps"));
78 addParam("skim", m_skim,
79 "use skim information or not",
80 int(-1));
81 B2DEBUG(20, "eventByEventTimingFlag(" << m_eventByEventTimingHistRecord
82 << "), m_dumpVcdFile(" << m_dumpVcdFile
83 << "), m_bitConditionToDumpVcd(" << m_bitConditionToDumpVcd
84 << "), m_vcdEventStart(" << m_vcdEventStart
85 << "), m_vcdNumberOfEvents(" << m_vcdNumberOfEvents);
86
87
88}
HistoModule()
Constructor.
Definition HistoModule.h:32
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition Module.h:80
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition Module.h:559

◆ ~TRGGDLDQMModule()

virtual ~TRGGDLDQMModule ( )
inlinevirtual

Destrunctor.

Definition at line 49 of file TRGGDLDQMModule.h.

49{}

Member Function Documentation

◆ anaBitCondition()

bool anaBitCondition ( void )
protected

Definition at line 769 of file TRGGDLDQMModule.cc.

770{
771 if (m_bitConditionToDumpVcd.length() == 0) return true;
772 const char* cst = m_bitConditionToDumpVcd.c_str();
773 bool reading_word = false;
774 bool result_the_term = true; // init value must be true
775 bool not_flag = false;
776 unsigned begin_word = 0;
777 unsigned word_length = 0;
778 // notation steeing side must follow
779 // no blank between '!' and word
780 for (unsigned i = 0; i < m_bitConditionToDumpVcd.length(); i++) {
781 if (('a' <= cst[i] && cst[i] <= 'z') ||
782 ('A' <= cst[i] && cst[i] <= 'Z') ||
783 ('_' == cst[i]) || ('!' == cst[i]) ||
784 ('0' <= cst[i] && cst[i] <= '9')) {
785 if (reading_word) { // must not be '!'
786 word_length++;
787 if (i == m_bitConditionToDumpVcd.length() - 1) {
788 bool fired = isFired(m_bitConditionToDumpVcd.substr(begin_word, word_length));
789 B2DEBUG(20,
790 m_bitConditionToDumpVcd.substr(begin_word, word_length).c_str()
791 << "(" << fired << ")");
792 if (((!not_flag && fired) || (not_flag && !fired)) && result_the_term) {
793 return true;
794 }
795 }
796 } else {
797 // start of new word
798 reading_word = true;
799 if ('!' == cst[i]) {
800 begin_word = i + 1;
801 not_flag = true;
802 word_length = 0;
803 } else {
804 begin_word = i;
805 not_flag = false;
806 word_length = 1;
807 if (i == m_bitConditionToDumpVcd.length() - 1) {
808 // one char bit ('f',...) comes end of conditions, 'xxx+f'
809 bool fired = isFired(m_bitConditionToDumpVcd.substr(begin_word, word_length));
810 B2DEBUG(20,
811 m_bitConditionToDumpVcd.substr(begin_word, word_length).c_str()
812 << "(" << fired << ")");
813 // cppcheck-suppress knownConditionTrueFalse
814 if (((!not_flag && fired) || (not_flag && !fired)) && result_the_term) {
815 return true;
816 }
817 }
818 }
819 }
820 } else if ('+' == cst[i] || i == m_bitConditionToDumpVcd.length() - 1) {
821 // End of the term.
822 if (reading_word) { // 'xxx+'
823 if (result_the_term) {
824 bool fired = isFired(m_bitConditionToDumpVcd.substr(begin_word, word_length));
825 B2DEBUG(20,
826 m_bitConditionToDumpVcd.substr(begin_word, word_length).c_str()
827 << "(" << fired << ")");
828 if ((!not_flag && fired) || (not_flag && !fired)) {
829 return true;
830 } else {
831 // this term is denied by the latest bit
832 }
833 } else {
834 // already false.
835 }
836 reading_word = false;
837 } else {
838 // prior char is blank, 'xxx +'
839 if (result_the_term) {
840 return true;
841 } else {
842 // already false
843 }
844 }
845 result_the_term = true; // go to next term
846 } else {
847 // can be blank (white space) or any delimiter.
848 if (reading_word) {
849 // end of a word, 'xxxx '
850 if (result_the_term) {
851 // worth to try
852 bool fired = isFired(m_bitConditionToDumpVcd.substr(begin_word, word_length));
853 B2DEBUG(20,
854 m_bitConditionToDumpVcd.substr(begin_word, word_length).c_str()
855 << "(" << fired << ")");
856 if ((!not_flag && fired) || (not_flag && !fired)) {
857 // go to next word
858 } else {
859 result_the_term = false;
860 }
861 } else {
862 // already false
863 }
864 reading_word = false;
865 } else {
866 // 2nd blank 'xx ' or leading blank '^ '
867 }
868 }
869 }
870 return false;
871}

◆ beginRun()

void beginRun ( void )
overridevirtual

begin Run

Reimplemented from Module.

Definition at line 243 of file TRGGDLDQMModule.cc.

244{
245
246 dirDQM->cd();
247
248 for (int iskim = start_skim_gdldqm; iskim < end_skim_gdldqm; iskim++) {
249 h_c8_gdlL1TocomL1[iskim]->Reset();
250 h_c8_topTogdlL1[iskim]->Reset();
251 h_c8_eclTogdlL1[iskim]->Reset();
252 h_c8_cdcTogdlL1[iskim]->Reset();
253 h_c8_ecl8mToGDL[iskim]->Reset();
254 h_c8_topToGDL[iskim]->Reset();
255 h_c8_eclToGDL[iskim]->Reset();
256 h_c8_cdcToGDL[iskim]->Reset();
257 h_c2_cdcTocomL1[iskim]->Reset();
258 h_ns_cdcTocomL1[iskim]->Reset();
259 h_ns_cdcTogdlL1[iskim]->Reset();
260 h_ns_topToecl[iskim]->Reset();
261 h_ns_topTocdc[iskim]->Reset();
262 h_c2_cdcToecl[iskim]->Reset();
263 h_ns_cdcToecl[iskim]->Reset();
264 h_itd[iskim]->Reset();
265 h_ftd[iskim]->Reset();
266 h_psn[iskim]->Reset();
267 h_psn_extra[iskim]->Reset();
268 h_psn_extra_fast[iskim]->Reset();
269 h_psn_pure_extra[iskim]->Reset();
270 h_timtype[iskim]->Reset();
271 h_psn_raw_rate[iskim]->Reset();
272 h_psn_effect_to_l1[iskim]->Reset();
273 }
274
275 for (int iskim = 0; iskim < nskim_gdldqm; iskim++) {
276 for (int i = 0; i < nsample_fast; i++) {
277 for (int ibin = 0; ibin < n_output_extra; ibin++) {
278 array_psn_extra_fast[iskim][i][ibin] = 0;
279 }
280 }
281 m_fastPos[iskim] = 0;
282 for (int ibin = 0; ibin < n_output_extra; ibin++) m_fastSum[iskim][ibin] = 0;
283 }
284
285 m_leavesResolved = false;
286 m_evtLeaf = -1;
287 m_clkLeaf = 0;
288 m_leafMap.clear();
289
290 // The rise/fall axis titles and ranges only depend on n_clocks. These histograms
291 // exist only for skim 0, which defineHisto() creates only when it is in the
292 // configured skim range.
293 if (start_skim_gdldqm == 0) {
294 const char* clkTitle = (n_clocks == 32) ? "clk32ns" : "clk8ns";
295 for (unsigned i = 0; i < n_inbit; i++) {
296 for (TH1I* h : {h_itd_rise[i][0], h_itd_fall[i][0]}) {
297 h->GetXaxis()->SetTitle(clkTitle);
298 if (n_clocks == 32) h->GetXaxis()->SetRange(1, 32);
299 }
300 }
301 for (unsigned i = 0; i < n_outbit; i++) {
302 for (TH1I* h : {h_ftd_rise[i][0], h_psn_rise[i][0], h_ftd_fall[i][0], h_psn_fall[i][0]}) {
303 h->GetXaxis()->SetTitle(clkTitle);
304 if (n_clocks == 32) h->GetXaxis()->SetRange(1, 32);
305 }
306 }
307 }
308
309 oldDir->cd();
310}
int m_evtLeaf
position of the "evt" leaf in m_unpackername, -1 if absent
TH1I * h_c8_cdcTogdlL1[nskim_gdldqm]
timestamp diff from t0(cdc) to gdlL1 in LSB8nsec
int m_fastPos[nskim_gdldqm]
ring-buffer index of the newest slot of array_psn_extra_fast
TH1I * h_c8_eclTogdlL1[nskim_gdldqm]
timestamp diff from t0(ecl) to gdlL1 in LSB8nsec
TH1I * h_c8_topTogdlL1[nskim_gdldqm]
timestamp diff from t0(top) to gdlL1 in LSB8nsec
TH1I * h_c8_eclToGDL[nskim_gdldqm]
timestamp diff from t0(ecl) to GDL in LSB8nsec
static const int nskim_gdldqm
number of skims
TH1D * h_ns_topTocdc[nskim_gdldqm]
timestamp diff from top_timing to cdc_timing in nsec
TH1I * h_ftd[nskim_gdldqm]
ftd bits
static const int nsample_fast
number of sample for fast efficiency monitor
TH1D * h_ns_cdcToecl[nskim_gdldqm]
timestamp diff from cdc_timing to ecl_timing in nsec
TH1I * h_c8_ecl8mToGDL[nskim_gdldqm]
timestamp diff from fit on fam to GDL in LSB8nsec
int array_psn_extra_fast[nskim_gdldqm][nsample_fast][n_output_extra]
array to store past nsample events
TH1I * h_c2_cdcToecl[nskim_gdldqm]
timestamp from cdc_timing to ecl_timing to L1 in LSB2nsec
TH1I * h_c8_gdlL1TocomL1[nskim_gdldqm]
timestamp diff from gdlL1 to comL1 in LSB8nsec
TH1D * h_ns_cdcTocomL1[nskim_gdldqm]
timestamp diff from cdc_timing to comL1 in nsec
TH1I * h_c2_cdcTocomL1[nskim_gdldqm]
timestamp diff from cdc_timing to comL1 in LSB2nsec
TH1I * h_c8_topToGDL[nskim_gdldqm]
timestamp diff from t0(top) to GDL in LSB8nsec
int m_fastSum[nskim_gdldqm][n_output_extra]
running sum of array_psn_extra_fast over the whole ring
int m_clkLeaf
position of the "clk" leaf in m_unpackername
std::vector< std::pair< int, int > > m_leafMap
(position in m_unpacker, leaf number) for every mapped leaf
TH1I * h_psn[nskim_gdldqm]
psn bits
TH1D * h_ns_topToecl[nskim_gdldqm]
timestamp diff from top_timing to ecl_timing in nsec
TH1I * h_itd[nskim_gdldqm]
input bits
TH1D * h_ns_cdcTogdlL1[nskim_gdldqm]
timestamp diff from cdc_timing to gdlL1 in nsec
bool m_leavesResolved
whether the leaf positions below are valid for the current run
TH1I * h_timtype[nskim_gdldqm]
timtype
TH1I * h_c8_cdcToGDL[nskim_gdldqm]
timestamp diff from t0(cdc) to GDL in LSB8nsec

◆ clone()

std::shared_ptr< PathElement > clone ( ) const
overridevirtualinherited

Create an independent copy of this module.

Note that parameters are shared, so changing them on a cloned module will also affect the original module.

Implements PathElement.

Definition at line 179 of file Module.cc.

180{
183 newModule->setName(getName());
184 newModule->m_package = m_package;
185 newModule->m_propertyFlags = m_propertyFlags;
186 newModule->m_logConfig = m_logConfig;
187 newModule->m_conditions = m_conditions;
188
189 return newModule;
190}
std::shared_ptr< Module > registerModule(const std::string &moduleName, std::string sharedLibPath="") noexcept(false)
Creates an instance of a module and registers it to the ModuleManager.
static ModuleManager & Instance()
Exception is thrown if the requested module could not be created by the ModuleManager.
void setParameters(const ModuleParamList &params)
Set values for parameters from other parameter list.
const ModuleParamList & getParamList() const
Return module param list.
Definition Module.h:362
const std::string & getName() const
Returns the name of the module.
Definition Module.h:186
const std::string & getType() const
Returns the type of the module (i.e.
Definition Module.cc:41
unsigned int m_propertyFlags
The properties of the module as bitwise or (with |) of EModulePropFlags.
Definition Module.h:511
ModuleParamList m_moduleParamList
List storing and managing all parameter of the module.
Definition Module.h:515
void setName(const std::string &name)
Set the name of the module.
Definition Module.h:213
LogConfig m_logConfig
The log system configuration of the module.
Definition Module.h:513
std::vector< ModuleCondition > m_conditions
Module condition, only non-null if set.
Definition Module.h:520
std::string m_package
Package this module is found in (may be empty).
Definition Module.h:509
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
Definition Module.h:43

◆ def_beginRun()

virtual void def_beginRun ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 425 of file Module.h.

425{ beginRun(); }

◆ def_endRun()

virtual void def_endRun ( )
inlineprotectedvirtualinherited

This method can receive that the current run ends as a call from the Python side.

For regular C++-Modules that forwards the call to the regular endRun() method.

Reimplemented in PyModule.

Definition at line 438 of file Module.h.

438{ endRun(); }

◆ def_event()

virtual void def_event ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 431 of file Module.h.

431{ event(); }

◆ def_initialize()

virtual void def_initialize ( )
inlineprotectedvirtualinherited

Wrappers to make the methods without "def_" prefix callable from Python.

Overridden in PyModule. Wrapper method for the virtual function initialize() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 419 of file Module.h.

419{ initialize(); }

◆ def_terminate()

virtual void def_terminate ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 444 of file Module.h.

444{ terminate(); }

◆ defineHisto()

void defineHisto ( )
overridevirtual

Define Histogram.

Reimplemented from HistoModule.

Definition at line 90 of file TRGGDLDQMModule.cc.

91{
92 oldDir = gDirectory;
93 dirDQM = gDirectory;
94 if (!oldDir->Get("TRGGDL"))oldDir->mkdir("TRGGDL");
95 dirDQM->cd("TRGGDL");
96
97 for (int iskim = start_skim_gdldqm; iskim < end_skim_gdldqm; iskim++) {
98 h_c8_gdlL1TocomL1[iskim] = new TH1I(Form("hGDL_gdlL1TocomL1_%s", skim_smap[iskim].c_str()), "comL1 - gdlL1 [clk8ns]", 100, 0,
99 100);
100 h_c8_gdlL1TocomL1[iskim]->GetXaxis()->SetTitle("clk8ns");
101
102 h_c8_topTogdlL1[iskim] = new TH1I(Form("hGDL_topTogdlL1_%s", skim_smap[iskim].c_str()), "gdlL1 - top_timing [clk8ns]", 700, 0,
103 700);
104 h_c8_topTogdlL1[iskim]->GetXaxis()->SetTitle("clk8ns");
105 h_c8_eclTogdlL1[iskim] = new TH1I(Form("hGDL_eclTogdlL1_%s", skim_smap[iskim].c_str()), "gdlL1 - ecl_timing [clk8ns]", 500, 0,
106 500);
107 h_c8_eclTogdlL1[iskim]->GetXaxis()->SetTitle("clk8ns");
108 h_c8_cdcTogdlL1[iskim] = new TH1I(Form("hGDL_cdcTogdlL1_%s", skim_smap[iskim].c_str()), "gdlL1 - cdc_timing [clk8ns]", 700, 0,
109 700);
110 h_c8_cdcTogdlL1[iskim]->GetXaxis()->SetTitle("clk8ns");
111
112 h_c8_ecl8mToGDL[iskim] = new TH1I(Form("hGDL_ecl8mToGDL_%s", skim_smap[iskim].c_str()), "gdlIn^{8MHz} - ecl_timing [clk8ns]",
113 500, 0, 500);
114 h_c8_ecl8mToGDL[iskim]->GetXaxis()->SetTitle("clk8ns");
115 h_c8_topToGDL[iskim] = new TH1I(Form("hGDL_topToGDL_%s", skim_smap[iskim].c_str()), "gdlIn - top_timing [clk8ns]", 700, 0,
116 700);
117 h_c8_topToGDL[iskim]->GetXaxis()->SetTitle("clk8ns");
118 h_c8_eclToGDL[iskim] = new TH1I(Form("hGDL_eclToGDL_%s", skim_smap[iskim].c_str()), "gdlIn - ecl_timing [clk8ns]", 500, 0,
119 500);
120 h_c8_eclToGDL[iskim]->GetXaxis()->SetTitle("clk8ns");
121 h_c8_cdcToGDL[iskim] = new TH1I(Form("hGDL_cdcToGDL_%s", skim_smap[iskim].c_str()), "gdlIn - cdc_timing [clk8ns]", 700, 0,
122 700);
123 h_c8_cdcToGDL[iskim]->GetXaxis()->SetTitle("clk8ns");
124
125 h_c2_cdcTocomL1[iskim] = new TH1I(Form("hGDL_cdcTocomL1_%s", skim_smap[iskim].c_str()), "comL1 - cdc_timing [clk2ns]", 520, 0,
126 5200);
127 h_c2_cdcTocomL1[iskim]->GetXaxis()->SetTitle("clk2ns");
128 h_ns_cdcTocomL1[iskim] = new TH1D(Form("hGDL_ns_cdcTocomL1_%s", skim_smap[iskim].c_str()), "comL1 - cdc_timing [ns]", 2600, 0,
129 10400);
130 h_ns_cdcTocomL1[iskim]->GetXaxis()->SetTitle("ns");
131 h_ns_cdcTocomL1[iskim]->GetYaxis()->SetTitle("evt / 4ns");
132 h_ns_cdcTogdlL1[iskim] = new TH1D(Form("hGDL_ns_cdcTogdlL1_%s", skim_smap[iskim].c_str()), "gdlL1 - cdc_timing [ns]", 2600, 0,
133 10400);
134 h_ns_cdcTogdlL1[iskim]->GetXaxis()->SetTitle("ns");
135 h_ns_cdcTogdlL1[iskim]->GetYaxis()->SetTitle("evt / 4ns");
136
137 h_ns_topToecl[iskim] = new TH1D(Form("hGDL_ns_topToecl_%s", skim_smap[iskim].c_str()), "ecl_timing - top_timing [ns]", 800, 0,
138 4000);
139 h_ns_topToecl[iskim]->GetXaxis()->SetTitle("ns");
140 h_ns_topToecl[iskim]->GetYaxis()->SetTitle("evt / 5ns");
141 h_ns_topTocdc[iskim] = new TH1D(Form("hGDL_ns_topTocdc_%s", skim_smap[iskim].c_str()), "cdc_timing - top_timing [ns]", 800, 0,
142 4000);
143 h_ns_topTocdc[iskim]->GetXaxis()->SetTitle("ns");
144 h_ns_topTocdc[iskim]->GetYaxis()->SetTitle("evt / 5ns");
145 h_ns_cdcToecl[iskim] = new TH1D(Form("hGDL_ns_cdcToecl_%s", skim_smap[iskim].c_str()), "ecl_timing - cdc_timing [ns]", 2000, 0,
146 4000);
147 h_ns_cdcToecl[iskim]->GetXaxis()->SetTitle("ns");
148 h_ns_cdcToecl[iskim]->GetYaxis()->SetTitle("evt / 2ns");
149
150 h_c2_cdcToecl[iskim] = new TH1I(Form("hGDL_cdcToecl_%s", skim_smap[iskim].c_str()), "ecl_timing - cdc_timing [clk2ns]", 1000, 0,
151 2000);
152 h_c2_cdcToecl[iskim]->GetXaxis()->SetTitle("clk2ns");
153
154 h_timtype[iskim] = new TH1I(Form("hGDL_timtype_%s", skim_smap[iskim].c_str()), "timtype", 7, 0, 7);
155
156 h_itd[iskim] = new TH1I(Form("hGDL_itd_%s", skim_smap[iskim].c_str()), "itd", n_inbit + 1, -1, n_inbit);
157 h_ftd[iskim] = new TH1I(Form("hGDL_ftd_%s", skim_smap[iskim].c_str()), "ftd", n_outbit + 1, -1, n_outbit);
158 h_psn[iskim] = new TH1I(Form("hGDL_psn_%s", skim_smap[iskim].c_str()), "psn", n_outbit + 1, -1, n_outbit);
159 // output extra
160 h_psn_extra[iskim] = new TH1I(Form("hGDL_psn_extra_%s", skim_smap[iskim].c_str()), "psn extra", n_output_extra, 0, n_output_extra);
161 for (int i = 0; i < n_output_extra; i++) {
162 h_psn_extra[iskim]->GetXaxis()->SetBinLabel(i + 1, output_extra[i]);
163 }
164 h_psn_extra[iskim]->GetXaxis()->SetLabelSize(0.02);
165 // output extra
166 h_psn_extra_fast[iskim] = new TH1I(Form("hGDL_psn_extra_fast_%s", skim_smap[iskim].c_str()), "psn extra fast", n_output_extra, 0,
167 n_output_extra);
168 for (int i = 0; i < n_output_extra; i++) {
169 h_psn_extra_fast[iskim]->GetXaxis()->SetBinLabel(i + 1, output_extra[i]);
170 }
171 h_psn_extra_fast[iskim]->GetXaxis()->SetLabelSize(0.02);
172 // output overlap
173 h_psn_effect_to_l1[iskim] = new TH1I(Form("hGDL_psn_effect_to_l1_%s", skim_smap[iskim].c_str()), "psn effect to l1",
174 n_output_overlap, 0,
175 n_output_overlap);
176 for (int i = 0; i < n_output_overlap; i++) {
177 h_psn_effect_to_l1[iskim]->GetXaxis()->SetBinLabel(i + 1, output_overlap[i]);
178 }
179 h_psn_effect_to_l1[iskim]->GetXaxis()->SetLabelSize(0.02);
180 // output no overlap
181 h_psn_raw_rate[iskim] = new TH1I(Form("hGDL_psn_raw_rate_%s", skim_smap[iskim].c_str()), "psn raw rate", n_output_overlap, 0,
182 n_output_overlap);
183 for (int i = 0; i < n_output_overlap; i++) {
184 h_psn_raw_rate[iskim]->GetXaxis()->SetBinLabel(i + 1, output_overlap[i]);
185 }
186 h_psn_raw_rate[iskim]->GetXaxis()->SetLabelSize(0.02);
187 // output pure extra
188 h_psn_pure_extra[iskim] = new TH1I(Form("hGDL_psn_pure_extra_%s", skim_smap[iskim].c_str()), "psn pure extra", n_output_pure_extra,
189 0, n_output_pure_extra);
190 for (int i = 0; i < n_output_pure_extra; i++) {
191 h_psn_pure_extra[iskim]->GetXaxis()->SetBinLabel(i + 1, output_pure_extra[i]);
192 }
193
194 h_itd[iskim]->GetXaxis()->SetBinLabel(h_itd[iskim]->GetXaxis()->FindBin(-1 + 0.5), "all");
195 h_ftd[iskim]->GetXaxis()->SetBinLabel(h_ftd[iskim]->GetXaxis()->FindBin(-1 + 0.5), "all");
196 h_psn[iskim]->GetXaxis()->SetBinLabel(h_psn[iskim]->GetXaxis()->FindBin(-1 + 0.5), "all");
197 h_itd[iskim]->GetXaxis()->SetLabelSize(0.02);
198 h_ftd[iskim]->GetXaxis()->SetLabelSize(0.02);
199 h_psn[iskim]->GetXaxis()->SetLabelSize(0.02);
200 for (unsigned i = 0; i < n_inbit; i++) {
201 if (m_bitNameOnBinLabel) {
202 h_itd[iskim]->GetXaxis()->SetBinLabel(h_itd[iskim]->GetXaxis()->FindBin(i + 0.5), inbitname[i]);
203 }
204 }
205 for (unsigned i = 0; i < n_outbit; i++) {
206 if (m_bitNameOnBinLabel) {
207 h_ftd[iskim]->GetXaxis()->SetBinLabel(h_ftd[iskim]->GetXaxis()->FindBin(i + 0.5), outbitname[i]);
208 h_psn[iskim]->GetXaxis()->SetBinLabel(h_psn[iskim]->GetXaxis()->FindBin(i + 0.5), outbitname[i]);
209 }
210 }
211
212 //reduce #plot
213 if (iskim != 0)continue;
214
215 // rise/fall
216 for (unsigned i = 0; i < n_inbit; i++) {
217 h_itd_rise[i][iskim] = new TH1I(Form("hGDL_itd_%s_rise_%s", inbitname[i], skim_smap[iskim].c_str()),
218 Form("itd%d(%s) rising", i, inbitname[i]), 48, 0, 48);
219 h_itd_rise[i][iskim]->SetLineColor(kRed);
220 h_itd_fall[i][iskim] = new TH1I(Form("hGDL_itd_%s_fall_%s", inbitname[i], skim_smap[iskim].c_str()),
221 Form("itd%d(%s) falling", i, inbitname[i]), 48, 0, 48);
222 h_itd_fall[i][iskim]->SetLineColor(kGreen);
223 }
224 for (unsigned i = 0; i < n_outbit; i++) {
225 h_ftd_rise[i][iskim] = new TH1I(Form("hGDL_ftd_%s_rise_%s", outbitname[i], skim_smap[iskim].c_str()),
226 Form("ftd%d(%s) rising", i, outbitname[i]), 48, 0, 48);
227 h_ftd_rise[i][iskim]->SetLineColor(kRed);
228 h_ftd_fall[i][iskim] = new TH1I(Form("hGDL_ftd_%s_fall_%s", outbitname[i], skim_smap[iskim].c_str()),
229 Form("ftd%d(%s) falling", i, outbitname[i]), 48, 0, 48);
230 h_ftd_fall[i][iskim]->SetLineColor(kGreen);
231 h_psn_rise[i][iskim] = new TH1I(Form("hGDL_psn_%s_rise_%s", outbitname[i], skim_smap[iskim].c_str()),
232 Form("psn%d(%s) rising", i, outbitname[i]), 48, 0, 48);
233 h_psn_rise[i][iskim]->SetLineColor(kRed);
234 h_psn_fall[i][iskim] = new TH1I(Form("hGDL_psn_%s_fall_%s", outbitname[i], skim_smap[iskim].c_str()),
235 Form("psn%d(%s) falling", i, outbitname[i]), 48, 0, 48);
236 h_psn_fall[i][iskim]->SetLineColor(kGreen);
237 }
238 }
239
240 oldDir->cd();
241}
std::string skim_smap[nskim_gdldqm]
name of histograms

◆ endRun()

void endRun ( void )
overridevirtual

End Run.

Reimplemented from Module.

Definition at line 437 of file TRGGDLDQMModule.cc.

438{
439 if (m_generatePostscript) {
440 TPostScript* ps = new TPostScript(m_postScriptName.c_str(), 112);
441 gStyle->SetOptStat(0);
442 TCanvas c1("c1", "", 0, 0, 500, 300);
443 c1.cd();
444
445 for (int iskim = start_skim_gdldqm; iskim < end_skim_gdldqm; iskim++) {
446
447 h_itd[iskim]->GetXaxis()->SetRange(h_itd[iskim]->GetXaxis()->FindBin(0.5),
448 h_itd[iskim]->GetXaxis()->FindBin(n_inbit - 0.5));
449 h_itd[iskim]->Draw();
450 c1.Update();
451 h_ftd[iskim]->GetXaxis()->SetRange(h_ftd[iskim]->GetXaxis()->FindBin(0.5),
452 h_ftd[iskim]->GetXaxis()->FindBin(n_outbit - 0.5));
453 h_ftd[iskim]->Draw();
454 c1.Update();
455 h_psn[iskim]->GetXaxis()->SetRange(h_psn[iskim]->GetXaxis()->FindBin(0.5),
456 h_psn[iskim]->GetXaxis()->FindBin(n_outbit - 0.5));
457 h_psn[iskim]->Draw();
458 c1.Update();
459 h_ftd[iskim]->SetTitle("ftd(green), psnm(red)");
460 h_ftd[iskim]->SetFillColor(kGreen);
461 h_ftd[iskim]->SetBarWidth(0.4);
462 h_ftd[iskim]->Draw("bar");
463 h_psn[iskim]->SetFillColor(kRed);
464 h_psn[iskim]->SetBarWidth(0.4);
465 h_psn[iskim]->SetBarOffset(0.5);
466 h_psn[iskim]->Draw("bar,same");
467
468 c1.Update();
469 h_timtype[iskim]->Draw();
470 c1.Update();
471 h_c8_gdlL1TocomL1[iskim]->Draw();
472 c1.Update();
473 h_c8_topTogdlL1[iskim]->Draw();
474 c1.Update();
475 h_c8_eclTogdlL1[iskim]->Draw();
476 c1.Update();
477 h_c8_cdcTogdlL1[iskim]->Draw();
478 c1.Update();
479 h_c8_ecl8mToGDL[iskim]->Draw();
480 c1.Update();
481 h_c8_topToGDL[iskim]->Draw();
482 c1.Update();
483 h_c8_eclToGDL[iskim]->Draw();
484 c1.Update();
485 h_c8_cdcToGDL[iskim]->Draw();
486 c1.Update();
487 h_c2_cdcTocomL1[iskim]->Draw();
488 c1.Update();
489 h_ns_cdcTocomL1[iskim]->Draw();
490 c1.Update();
491 h_ns_cdcTogdlL1[iskim]->Draw();
492 c1.Update();
493 h_ns_topToecl[iskim]->Draw();
494 c1.Update();
495 h_ns_topTocdc[iskim]->Draw();
496 c1.Update();
497 h_c2_cdcToecl[iskim]->Draw();
498 c1.Update();
499 h_ns_cdcToecl[iskim]->Draw();
500 c1.Update();
501
502 //reduce #plot
503 if (iskim != 0)continue;
504 for (unsigned i = 0; i < n_inbit; i++) {
505
506 h_itd_rise[i][iskim]->SetTitle(Form("itd%d(%s) rising(red), falling(green)",
507 i, inbitname[i]));
508 h_itd_rise[i][iskim]->Draw();
509 h_itd_fall[i][iskim]->Draw("same");
510 c1.Update();
511 }
512
513 }
514
515 ps->Close();
516 }
517}

◆ evalCondition()

bool evalCondition ( ) const
inherited

If at least one condition was set, it is evaluated and true returned if at least one condition returns true.

If no condition or result value was defined, the method returns false. Otherwise, the condition is evaluated and true returned, if at least one condition returns true. To speed up the evaluation, the condition strings were already parsed in the method if_value().

Returns
True if at least one condition and return value exists and at least one condition expression was evaluated to true.

Definition at line 96 of file Module.cc.

97{
98 if (m_conditions.empty()) return false;
99
100 //okay, a condition was set for this Module...
101 if (!m_hasReturnValue) {
102 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
103 }
104
105 for (const auto& condition : m_conditions) {
106 if (condition.evaluate(m_returnValue)) {
107 return true;
108 }
109 }
110 return false;
111}
int m_returnValue
The return value.
Definition Module.h:518
bool m_hasReturnValue
True, if the return value is set.
Definition Module.h:517

◆ event()

void event ( void )
overridevirtual

Event.

Reimplemented from Module.

Definition at line 519 of file TRGGDLDQMModule.cc.

520{
521 /* cppcheck-suppress variableScope */
522 static unsigned nvcd = 0;
523 static bool begin_run = true;
524
525 skim.clear();
526
527 if (!entAry || !entAry.getEntries()) {
528 return;
529 }
530
531 //Get skim type from SoftwareTriggerResult
532 for (int iskim = start_skim_gdldqm; iskim < end_skim_gdldqm; iskim++) {
533 if (iskim == 0) skim.push_back(iskim);
534 }
535 // getResults() returns the map by value, so only call it when there is a skim
536 // other than 0 to look up
537 if (end_skim_gdldqm > 1 && result_soft.isValid()) {
538 const std::map<std::string, int> skim_map = result_soft->getResults();
539 for (int iskim = std::max(start_skim_gdldqm, 1); iskim < end_skim_gdldqm; iskim++) {
540 if (skim_map.find(skim_menu[iskim]) != skim_map.end()) {
541 const bool accepted = (result_soft->getResult(skim_menu[iskim]) == SoftwareTriggerCutResult::c_accept);
542 if (accepted) skim.push_back(iskim);
543 }
544 }
545 }
546
547
548 //prepare entAry address
549 // the leaf names and the leaf mapping are fixed for the whole run
550 if (!m_leavesResolved) {
551 for (int i = 0; i < 320; i++) {
552 if (strcmp(entAry[0]->m_unpackername[i], "evt") == 0) m_evtLeaf = i;
553 if (strcmp(entAry[0]->m_unpackername[i], "clk") == 0) m_clkLeaf = i;
554 if (LeafBitMap[i] != -1) m_leafMap.emplace_back(i, LeafBitMap[i]);
555 }
556 m_leavesResolved = true;
557 }
558 const int clk_map = m_clkLeaf;
559 if (m_evtLeaf >= 0) evtno = entAry[0]->m_unpacker[m_evtLeaf];
560
561 const double clkTo2ns = 1. / .508877;
562 const double clkTo1ns = 0.5 / .508877;
563
564 dirDQM->cd();
565
566 std::fill(h_0_vec.begin(), h_0_vec.end(), 0);
567 std::fill(h_p_vec.begin(), h_p_vec.end(), 0);
568 std::fill(h_f_vec.begin(), h_f_vec.end(), 0);
569 std::fill(h_i_vec.begin(), h_i_vec.end(), 0);
570
571 oldDir->cd();
572
573 // fill "bit vs clk" for the event
574 const int nLeafTot = n_leafs + n_leafsExtra;
575 for (int ii = 0; ii < entAry.getEntries(); ii++) {
576 const int clkRow = entAry[ii]->m_unpacker[clk_map] * nLeafTot;
577 for (const auto& leaf : m_leafMap) {
578 h_0_vec[clkRow + leaf.second] = entAry[ii]->m_unpacker[leaf.first];
579 }
580 }
581 int coml1rvc = h_0_vec[0 * (n_leafs + n_leafsExtra) + _e_coml1rvc];
582 int toprvc = h_0_vec[0 * (n_leafs + n_leafsExtra) + _e_toprvc];
583 int eclrvc = h_0_vec[0 * (n_leafs + n_leafsExtra) + _e_eclrvc];
584 int cdcrvc = h_0_vec[0 * (n_leafs + n_leafsExtra) + _e_cdcrvc];
585 int c1_top_timing = h_0_vec[(n_clocks - 1) * (n_leafs + n_leafsExtra) + _e_toptiming];
586 int c1_ecl_timing = h_0_vec[(n_clocks - 1) * (n_leafs + n_leafsExtra) + _e_ecltiming];
587 int c1_cdc_timing = h_0_vec[(n_clocks - 1) * (n_leafs + n_leafsExtra) + _e_cdctiming];
588 int c8_top_timing = c1_top_timing >> 3;
589 int c2_top_timing = c1_top_timing >> 1;
590 int c8_ecl_timing = c1_ecl_timing >> 3;
591 int c2_ecl_timing = c1_ecl_timing >> 1;
592 int c8_cdc_timing = c1_cdc_timing >> 3;
593 int c2_cdc_timing = c1_cdc_timing >> 1;
594
595 if (begin_run) {
596 B2DEBUG(20, "nconf(" << nconf
597 << "), n_clocks(" << n_clocks
598 << "), n_leafs(" << n_leafs
599 << "), n_leafsExtra(" << n_leafsExtra
600 << ")");
601 begin_run = false;
602 }
603
604 int psn[10] = {0};
605 int ftd[10] = {0};
606 int itd[10] = {0};
607 int timtype = 0;
608
609
610 int gdll1_rvc = h_0_vec[(n_clocks - 1) * (n_leafs + n_leafsExtra) + _e_gdll1rvc];
611
612 // fill event by event timing histogram and get time integrated bit info
613 for (unsigned clk = 1; clk <= n_clocks; clk++) {
614 int psn_tmp[10] = {0};
615 int ftd_tmp[10] = {0};
616 int itd_tmp[10] = {0};
617 for (unsigned j = 0; j < (unsigned)nword_input; j++) {
618 itd_tmp[j] = h_0_vec[(clk - 1) * (n_leafs + n_leafsExtra) + ee_itd[j]];
619 itd[j] |= itd_tmp[j];
620 for (int i = 0; i < 32; i++) {
621 if (i + j * 32 >= n_inbit)continue;
622 if (itd_tmp[j] & (1 << i)) h_i_vec[(clk - 1)*n_inbit + i + j * 32] = 1;
623 }
624 }
625 if (nconf == 0) {
626 psn_tmp[0] = h_0_vec[(clk - 1) * (n_leafs + n_leafsExtra) + ee_psn[0]];
627 ftd_tmp[0] = h_0_vec[(clk - 1) * (n_leafs + n_leafsExtra) + ee_ftd[0]];
628 psn[0] |= psn_tmp[0];
629 ftd[0] |= ftd_tmp[0];
630 for (unsigned int i = 0; i < 32; i++) {
631 if (i >= n_outbit)continue;
632 if (psn_tmp[0] & (1 << i)) h_p_vec[(clk - 1)*n_outbit + i] = 1;
633 if (ftd_tmp[0] & (1 << i)) h_f_vec[(clk - 1)*n_outbit + i] = 1;
634 }
635 psn_tmp[1] = h_0_vec[(clk - 1) * n_outbit + ee_psn[2]] * (1 << 16) + h_0_vec[(clk - 1) * n_outbit + ee_psn[1]];
636 ftd_tmp[1] = h_0_vec[(clk - 1) * n_outbit + ee_ftd[2]] * (1 << 16) + h_0_vec[(clk - 1) * n_outbit + ee_ftd[1]];
637 psn[1] |= psn_tmp[1];
638 ftd[1] |= ftd_tmp[1];
639 for (unsigned int i = 0; i < 32; i++) {
640 if (i + 32 >= n_outbit)continue;
641 if (psn_tmp[1] & (1 << i)) h_p_vec[(clk - 1)*n_outbit + i + 32] = 1;
642 if (ftd_tmp[1] & (1 << i)) h_f_vec[(clk - 1)*n_outbit + i + 32] = 1;
643 }
644 } else {
645 for (unsigned j = 0; j < (unsigned)nword_output; j++) {
646 psn_tmp[j] = h_0_vec[(clk - 1) * (n_leafs + n_leafsExtra) + ee_psn[j]];
647 ftd_tmp[j] = h_0_vec[(clk - 1) * (n_leafs + n_leafsExtra) + ee_ftd[j]];
648 psn[j] |= psn_tmp[j];
649 ftd[j] |= ftd_tmp[j];
650 for (int i = 0; i < 32; i++) {
651 if (i + j * 32 >= n_outbit)continue;
652 if (psn_tmp[j] & (1 << i)) h_p_vec[(clk - 1)*n_outbit + i + j * 32] = 1;
653 if (ftd_tmp[j] & (1 << i)) h_f_vec[(clk - 1)*n_outbit + i + j * 32] = 1;
654 }
655 }
656 }
657 int timtype_tmp = h_0_vec[(clk - 1) * (n_leafs + n_leafsExtra) + _e_timtype];
658 timtype = (timtype_tmp == 0) ? timtype : timtype_tmp;
659
660 } // clk
661
662
663 // Collapse the per-clock bit vectors into "did this bit fire in any clock cycle",
664 // so that isFired_quick() is a single lookup
665 m_firedPsnm.assign(n_outbit, 0);
666 m_firedFtdl.assign(n_outbit, 0);
667 m_firedInput.assign(n_inbit, 0);
668 for (unsigned clk = 0; clk < n_clocks; clk++) {
669 for (unsigned b = 0; b < n_outbit; b++) {
670 if (h_p_vec[clk * n_outbit + b] > 0) m_firedPsnm[b] = 1;
671 if (h_f_vec[clk * n_outbit + b] > 0) m_firedFtdl[b] = 1;
672 }
673 for (unsigned b = 0; b < n_inbit; b++) {
674 if (h_i_vec[clk * n_inbit + b] > 0) m_firedInput[b] = 1;
675 }
676 }
677
678 // fill rising and falling edges
679 fillRiseFallTimings();
680 // fill Output_extra for efficiency study
681 fillOutputExtra();
682 // fill Output_overlap for trigger rate study
683 fillOutputOverlap();
684
685 // fill summary histograms
686 for (unsigned ifill = 0; ifill < skim.size(); ifill++) {
687 h_timtype[skim[ifill]]->Fill(timtype);
688 h_itd[skim[ifill]]->Fill(-0.5);
689 h_ftd[skim[ifill]]->Fill(-0.5);
690 h_psn[skim[ifill]]->Fill(-0.5);
691 for (int i = 0; i < 32; i++) {
692 for (unsigned j = 0; j < (unsigned)nword_input; j++) {
693 if (itd[j] & (1 << i)) h_itd[skim[ifill]]->Fill(i + 0.5 + 32 * j);
694 }
695 for (unsigned j = 0; j < (unsigned)nword_output; j++) {
696 if (ftd[j] & (1 << i)) h_ftd[skim[ifill]]->Fill(i + 0.5 + 32 * j);
697 if (psn[j] & (1 << i)) h_psn[skim[ifill]]->Fill(i + 0.5 + 32 * j);
698 }
699 }
700
701 // fill timestamp values stored in header
702 int gdlL1TocomL1 = gdll1_rvc < coml1rvc ? coml1rvc - gdll1_rvc : (coml1rvc + 1280) - gdll1_rvc;
703 h_c8_gdlL1TocomL1[skim[ifill]]->Fill(gdlL1TocomL1);
704
705 int topTogdlL1 = gdll1_rvc < c8_top_timing ? (gdll1_rvc + 1280) - c8_top_timing : gdll1_rvc - c8_top_timing;
706 h_c8_topTogdlL1[skim[ifill]]->Fill(topTogdlL1);
707
708 int eclTogdlL1 = gdll1_rvc < c8_ecl_timing ? (gdll1_rvc + 1280) - c8_ecl_timing : gdll1_rvc - c8_ecl_timing;
709 h_c8_eclTogdlL1[skim[ifill]]->Fill(eclTogdlL1);
710
711 int cdcTogdlL1 = gdll1_rvc < c8_cdc_timing ? (gdll1_rvc + 1280) - c8_cdc_timing : gdll1_rvc - c8_cdc_timing;
712 h_c8_cdcTogdlL1[skim[ifill]]->Fill(cdcTogdlL1);
713
714 int c127_ecl_timing = c8_ecl_timing & (((1 << 7) - 1) << 4);
715 int fit8mToGDL = c127_ecl_timing < eclrvc ? eclrvc - c127_ecl_timing : (eclrvc + 1280) - c127_ecl_timing;
716 h_c8_ecl8mToGDL[skim[ifill]]->Fill(fit8mToGDL);
717
718 int topToGDL = c8_top_timing < toprvc ? toprvc - c8_top_timing : (toprvc + 1280) - c8_top_timing;
719 h_c8_topToGDL[skim[ifill]]->Fill(topToGDL);
720 int eclToGDL = c8_ecl_timing < eclrvc ? eclrvc - c8_ecl_timing : (eclrvc + 1280) - c8_ecl_timing;
721 h_c8_eclToGDL[skim[ifill]]->Fill(eclToGDL);
722 int cdcToGDL = c8_cdc_timing < cdcrvc ? cdcrvc - c8_cdc_timing : (cdcrvc + 1280) - c8_cdc_timing;
723 h_c8_cdcToGDL[skim[ifill]]->Fill(cdcToGDL);
724
725 int c2_comL1 = coml1rvc << 2;
726 int c2_gdlL1 = gdll1_rvc << 2;
727 int c2_diff_cdcTogdlL1 = c2_gdlL1 > c2_cdc_timing ?
728 c2_gdlL1 - c2_cdc_timing :
729 c2_gdlL1 - c2_cdc_timing + (1280 << 2) ;
730 h_ns_cdcTogdlL1[skim[ifill]]->Fill(c2_diff_cdcTogdlL1 * clkTo2ns);
731
732 int c2_diff_cdcTocomL1 = c2_comL1 > c2_cdc_timing ?
733 c2_comL1 - c2_cdc_timing :
734 c2_comL1 - c2_cdc_timing + (1280 << 2) ;
735 h_c2_cdcTocomL1[skim[ifill]]->Fill(c2_diff_cdcTocomL1);
736 h_ns_cdcTocomL1[skim[ifill]]->Fill(c2_diff_cdcTocomL1 * clkTo2ns);
737
738 int c2_diff_cdcToecl = c2_ecl_timing > c2_cdc_timing ?
739 c2_ecl_timing - c2_cdc_timing :
740 c2_ecl_timing - c2_cdc_timing + (1280 << 2);
741 h_c2_cdcToecl[skim[ifill]]->Fill(c2_diff_cdcToecl);
742 h_ns_cdcToecl[skim[ifill]]->Fill(c2_diff_cdcToecl * clkTo2ns);
743
744 int c1_diff_topToecl = c1_ecl_timing > c1_top_timing ?
745 c1_ecl_timing - c1_top_timing :
746 c1_ecl_timing - c1_top_timing + (1280 << 3);
747 h_ns_topToecl[skim[ifill]]->Fill(c1_diff_topToecl * clkTo1ns);
748
749 int c2_diff_topTocdc = c2_cdc_timing > c2_top_timing ?
750 c2_cdc_timing - c2_top_timing :
751 c2_cdc_timing - c2_top_timing + (1280 << 2);
752 h_ns_topTocdc[skim[ifill]]->Fill(c2_diff_topTocdc * clkTo2ns);
753 }
754
755
756 // vcd dump
757 if (m_dumpVcdFile) {
758 if (anaBitCondition()) {
759 nvcd++;
760 B2DEBUG(20, "anaBitCondition fired, evt(" << evtno << ")");
761 if (m_vcdEventStart <= nvcd && nvcd < m_vcdEventStart + m_vcdNumberOfEvents) {
762 genVcd();
763 }
764 }
765 }
766
767}
std::string skim_menu[nskim_gdldqm]
name of skim from hlt/softwaretrigger/scripts/softwaretrigger/db_access.py
std::vector< char > m_firedFtdl
per-event cache: ftdl output bit fired in at least one clock cycle
std::vector< char > m_firedInput
per-event cache: input bit fired in at least one clock cycle
StoreObjPtr< SoftwareTriggerResult > result_soft
Input store array of HLT.
std::vector< int > h_i_vec
event by event input timing distribution
std::vector< int > h_f_vec
event by event ftdl timing distribution
StoreArray< TRGGDLUnpackerStore > entAry
Input store array of GDL data.
std::vector< char > m_firedPsnm
per-event cache: psnm output bit fired in at least one clock cycle

◆ exposePythonAPI()

void exposePythonAPI ( )
staticinherited

Exposes methods of the Module class to Python.

Definition at line 325 of file Module.cc.

326{
327 // to avoid confusion between std::arg and boost::python::arg we want a shorthand namespace as well
328 namespace bp = boost::python;
329
330 docstring_options options(true, true, false); //userdef, py sigs, c++ sigs
331
332 void (Module::*setReturnValueInt)(int) = &Module::setReturnValue;
333
334 enum_<Module::EAfterConditionPath>("AfterConditionPath",
335 R"(Determines execution behaviour after a conditional path has been executed:
336
337.. attribute:: END
338
339 End processing of this path after the conditional path. (this is the default for if_value() etc.)
340
341.. attribute:: CONTINUE
342
343 After the conditional path, resume execution after this module.)")
344 .value("END", Module::EAfterConditionPath::c_End)
345 .value("CONTINUE", Module::EAfterConditionPath::c_Continue)
346 ;
347
348 /* Do not change the names of >, <, ... we use them to serialize conditional paths */
349 enum_<Belle2::ModuleCondition::EConditionOperators>("ConditionOperator")
356 ;
357
358 enum_<Module::EModulePropFlags>("ModulePropFlags",
359 R"(Flags to indicate certain low-level features of modules, see :func:`Module.set_property_flags()`, :func:`Module.has_properties()`. Most useful flags are:
360
361.. attribute:: PARALLELPROCESSINGCERTIFIED
362
363 This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)
364
365.. attribute:: HISTOGRAMMANAGER
366
367 This module is used to manage histograms accumulated by other modules
368
369.. attribute:: TERMINATEINALLPROCESSES
370
371 When using parallel processing, call this module's terminate() function in all processes. This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.
372)")
373 .value("INPUT", Module::EModulePropFlags::c_Input)
374 .value("OUTPUT", Module::EModulePropFlags::c_Output)
375 .value("PARALLELPROCESSINGCERTIFIED", Module::EModulePropFlags::c_ParallelProcessingCertified)
376 .value("HISTOGRAMMANAGER", Module::EModulePropFlags::c_HistogramManager)
377 .value("INTERNALSERIALIZER", Module::EModulePropFlags::c_InternalSerializer)
378 .value("TERMINATEINALLPROCESSES", Module::EModulePropFlags::c_TerminateInAllProcesses)
379 ;
380
381 //Python class definition
382 class_<Module, PyModule> module("Module", R"(
383Base class for Modules.
384
385A module is the smallest building block of the framework.
386A typical event processing chain consists of a Path containing
387modules. By inheriting from this base class, various types of
388modules can be created. To use a module, please refer to
389:func:`Path.add_module()`. A list of modules is available by running
390``basf2 -m`` or ``basf2 -m package``, detailed information on parameters is
391given by e.g. ``basf2 -m RootInput``.
392
393The 'Module Development' section in the manual provides detailed information
394on how to create modules, setting parameters, or using return values/conditions:
395https://xwiki.desy.de/xwiki/rest/p/f4fa4/#HModuleDevelopment
396
397)");
398 module
399 .def("__str__", &Module::getPathString)
400 .def("name", &Module::getName, return_value_policy<copy_const_reference>(),
401 "Returns the name of the module. Can be changed via :func:`set_name() <Module.set_name()>`, use :func:`type() <Module.type()>` for identifying a particular module class.")
402 .def("type", &Module::getType, return_value_policy<copy_const_reference>(),
403 "Returns the type of the module (i.e. class name minus 'Module')")
404 .def("set_name", &Module::setName, args("name"), R"(
405Set custom name, e.g. to distinguish multiple modules of the same type.
406
407>>> path.add_module('EventInfoSetter')
408>>> ro = path.add_module('RootOutput', branchNames=['EventMetaData'])
409>>> ro.set_name('RootOutput_metadata_only')
410>>> print(path)
411[EventInfoSetter -> RootOutput_metadata_only]
412
413)")
414 .def("description", &Module::getDescription, return_value_policy<copy_const_reference>(),
415 "Returns the description of this module.")
416 .def("package", &Module::getPackage, return_value_policy<copy_const_reference>(),
417 "Returns the package this module belongs to.")
418 .def("available_params", &_getParamInfoListPython,
419 "Return list of all module parameters as `ModuleParamInfo` instances")
420 .def("has_properties", &Module::hasProperties, (bp::arg("properties")),
421 R"DOCSTRING(Allows to check if the module has the given properties out of `ModulePropFlags` set.
422
423>>> if module.has_properties(ModulePropFlags.PARALLELPROCESSINGCERTIFIED):
424>>> ...
425
426Parameters:
427 properties (int): bitmask of `ModulePropFlags` to check for.
428)DOCSTRING")
429 .def("set_property_flags", &Module::setPropertyFlags, args("property_mask"),
430 "Set module properties in the form of an OR combination of `ModulePropFlags`.");
431 {
432 // python signature is too crowded, make ourselves
433 docstring_options subOptions(true, false, false); //userdef, py sigs, c++ sigs
434 module
435 .def("if_value", &Module::if_value,
436 (bp::arg("expression"), bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
437 R"DOCSTRING(if_value(expression, condition_path, after_condition_path=AfterConditionPath.END)
438
439Sets a conditional sub path which will be executed after this
440module if the return value set in the module passes the given ``expression``.
441
442Modules can define a return value (int or bool) using ``setReturnValue()``,
443which can be used in the steering file to split the Path based on this value, for example
444
445>>> module_with_condition.if_value("<1", another_path)
446
447In case the return value of the ``module_with_condition`` for a given event is
448less than 1, the execution will be diverted into ``another_path`` for this event.
449
450You could for example set a special return value if an error occurs, and divert
451the execution into a path containing :b2:mod:`RootOutput` if it is found;
452saving only the data producing/produced by the error.
453
454After a conditional path has executed, basf2 will by default stop processing
455the path for this event. This behaviour can be changed by setting the
456``after_condition_path`` argument.
457
458Parameters:
459 expression (str): Expression to determine if the conditional path should be executed.
460 This should be one of the comparison operators ``<``, ``>``, ``<=``,
461 ``>=``, ``==``, or ``!=`` followed by a numerical value for the return value
462 condition_path (Path): path to execute in case the expression is fulfilled
463 after_condition_path (AfterConditionPath): What to do once the ``condition_path`` has been executed.
464)DOCSTRING")
465 .def("if_false", &Module::if_false,
466 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
467 R"DOC(if_false(condition_path, after_condition_path=AfterConditionPath.END)
468
469Sets a conditional sub path which will be executed after this module if
470the return value of the module evaluates to False. This is equivalent to
471calling `if_value` with ``expression=\"<1\"``)DOC")
472 .def("if_true", &Module::if_true,
473 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
474 R"DOC(if_true(condition_path, after_condition_path=AfterConditionPath.END)
475
476Sets a conditional sub path which will be executed after this module if
477the return value of the module evaluates to True. It is equivalent to
478calling `if_value` with ``expression=\">=1\"``)DOC");
479 }
480 module
481 .def("has_condition", &Module::hasCondition,
482 "Return true if a conditional path has been set for this module "
483 "using `if_value`, `if_true` or `if_false`")
484 .def("get_all_condition_paths", &_getAllConditionPathsPython,
485 "Return a list of all conditional paths set for this module using "
486 "`if_value`, `if_true` or `if_false`")
487 .def("get_all_conditions", &_getAllConditionsPython,
488 "Return a list of all conditional path expressions set for this module using "
489 "`if_value`, `if_true` or `if_false`")
490 .add_property("logging", make_function(&Module::getLogConfig, return_value_policy<reference_existing_object>()),
491 &Module::setLogConfig)
@ c_GE
Greater or equal than: ">=".
@ c_SE
Smaller or equal than: "<=".
@ c_GT
Greater than: ">".
@ c_NE
Not equal: "!=".
@ c_EQ
Equal: "=" or "==".
@ c_ST
Smaller than: "<".
void if_value(const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
Add a condition to the module.
Definition Module.cc:79
void if_true(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to set the condition of the module.
Definition Module.cc:90
Module()
Constructor.
Definition Module.cc:30
void setReturnValue(int value)
Sets the return value for this module as integer.
Definition Module.cc:220
@ c_HistogramManager
This module is used to manage histograms accumulated by other modules.
Definition Module.h:81
@ c_Input
This module is an input module (reads data).
Definition Module.h:78
@ c_InternalSerializer
This module is an internal serializer/deserializer for parallel processing.
Definition Module.h:82
@ c_Output
This module is an output module (writes data).
Definition Module.h:79
@ c_TerminateInAllProcesses
When using parallel processing, call this module's terminate() function in all processes().
Definition Module.h:83
void if_false(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to add a condition to the module.
Definition Module.cc:85
ModuleCondition::EAfterConditionPath EAfterConditionPath
Forward the EAfterConditionPath definition from the ModuleCondition.
Definition Module.h:88

◆ fillOutputExtra()

void fillOutputExtra ( void )
protected

Definition at line 1703 of file TRGGDLDQMModule.cc.

1704{
1705 bool c4_fired = isFired_quick("c4");
1706 bool hie_fired = isFired_quick("hie");
1707 bool LML_fired = (isFired_quick("lml0", true) || isFired_quick("lml1", true) || isFired_quick("lml2", true)
1708 || isFired_quick("lml3", true) || isFired_quick("lml4", true) || isFired_quick("lml5", true)
1709 || isFired_quick("lml6", true) || isFired_quick("lml7", true) || isFired_quick("lml8", true)
1710 || isFired_quick("lml9", true) || isFired_quick("lml10", true) || isFired_quick("eclmumu", true));
1711 bool CDC_fired = (isFired_quick("fff", true) || isFired_quick("ffo", true) || isFired_quick("ffb", true)
1712 || isFired_quick("ffy", true) || isFired_quick("fyo", true) || isFired_quick("fyb", true));
1713 bool ECL_fired = (isFired_quick("c4", true) || isFired_quick("hie", true));
1714 bool fff_fired = isFired_quick("fff");
1715 bool ff_fired = isFired_quick("ff");
1716 bool f_fired = isFired_quick("f");
1717 bool ffo_fired = isFired_quick("ffo");
1718 bool ffb_fired = isFired_quick("ffb");
1719 bool ffy_fired = isFired_quick("ffy");
1720 bool fyo_fired = isFired_quick("fyo");
1721 bool fyb_fired = isFired_quick("fyb");
1722 bool aaa_fired = isFired_quick("aaa");
1723 bool aay_fired = isFired_quick("aay");
1724 bool bha2D_fired = isFired_quick("bhabha");
1725 bool bha3D_fired = isFired_quick("bha3d");
1726 bool lml0_fired = isFired_quick("lml0");
1727 bool lml1_fired = isFired_quick("lml1");
1728 bool lml2_fired = isFired_quick("lml2");
1729 bool lml3_fired = isFired_quick("lml3");
1730 bool lml4_fired = isFired_quick("lml4");
1731 bool lml5_fired = isFired_quick("lml5");
1732 bool lml6_fired = isFired_quick("lml6");
1733 bool lml7_fired = isFired_quick("lml7");
1734 bool lml8_fired = isFired_quick("lml8");
1735 bool lml9_fired = isFired_quick("lml9");
1736 bool lml10_fired = isFired_quick("lml10");
1737 bool lml12_fired = isFired_quick("lml12");
1738 bool lml13_fired = isFired_quick("lml13");
1739 bool eclmumu_fired = isFired_quick("eclmumu");
1740 bool mu_b2b_fired = isFired_quick("mu_b2b");
1741 bool mu_eb2b_fired = isFired_quick("mu_eb2b");
1742 bool cdcklm1_fired = isFired_quick("cdcklm1");
1743 bool cdcklm2_fired = isFired_quick("cdcklm2");
1744 bool ycdcklm1_fired = isFired_quick("ycdcklm1");
1745 bool ycdcklm2_fired = isFired_quick("ycdcklm2");
1746 bool klm_hit_fired = isFired_quick("klm_hit");
1747 bool eklm_hit_fired = isFired_quick("eklm_hit");
1748 bool cdcecl1_fired = isFired_quick("cdcecl1");
1749 bool cdcecl2_fired = isFired_quick("cdcecl2");
1750 bool cdcecl3_fired = isFired_quick("cdcecl3");
1751 bool cdcecl4_fired = isFired_quick("cdcecl4");
1752 bool fso_fired = isFired_quick("fso");
1753 bool fsb_fired = isFired_quick("fsb");
1754 bool syo_fired = isFired_quick("syo");
1755 bool syb_fired = isFired_quick("syb");
1756 bool syoecl_fired = isFired_quick("syoecl");
1757 bool sybecl_fired = isFired_quick("sybecl");
1758 bool x_fired = isFired_quick("x");
1759 bool fioiecl1_fired = isFired_quick("fioiecl1");
1760 bool ecleklm1_fired = isFired_quick("ecleklm1");
1761 bool seklm1_fired = isFired_quick("seklm1");
1762 bool seklm2_fired = isFired_quick("seklm2");
1763 bool ieklm_fired = isFired_quick("ieklm");
1764 bool iecl_fired = isFired_quick("iecl");
1765 bool yioiecl1_fired = isFired_quick("yioiecl1");
1766 bool stt_fired = isFired_quick("stt");
1767 bool sttecl_fired = isFired_quick("sttecl");
1768 bool ffz_fired = isFired_quick("ffz");
1769 bool fzo_fired = isFired_quick("fzo");
1770 bool fzb_fired = isFired_quick("fzb");
1771
1772 for (unsigned ifill = 0; ifill < skim.size(); ifill++) {
1773
1774 // array_psn_extra_fast holds the last nsample_fast events as a ring buffer: advance the
1775 // index, drop the slot being reused from the running sum, and publish the histogram
1776 // straight from that sum
1777 const int fastSkim = skim[ifill];
1778 m_fastPos[fastSkim] = (m_fastPos[fastSkim] + 1) % nsample_fast;
1779 const int fastPos = m_fastPos[fastSkim];
1780 for (int ibin = 0; ibin < n_output_extra; ibin++) {
1781 m_fastSum[fastSkim][ibin] -= array_psn_extra_fast[fastSkim][fastPos][ibin];
1782 array_psn_extra_fast[fastSkim][fastPos][ibin] = 0;
1783 }
1784
1785 if (1) {
1786 h_psn_extra[skim[ifill]]->Fill(0.5);
1787 array_psn_extra_fast[fastSkim][fastPos][0] = 1;
1788 }
1789 if (fff_fired && (ECL_fired)) {
1790 h_psn_extra[skim[ifill]]->Fill(1.5);
1791 array_psn_extra_fast[fastSkim][fastPos][1] = 1;
1792 }
1793 if (ffo_fired && (ECL_fired)) {
1794 h_psn_extra[skim[ifill]]->Fill(2.5);
1795 array_psn_extra_fast[fastSkim][fastPos][2] = 1;
1796 }
1797 if (ffb_fired && (ECL_fired)) {
1798 h_psn_extra[skim[ifill]]->Fill(3.5);
1799 array_psn_extra_fast[fastSkim][fastPos][3] = 1;
1800 }
1801 if (fff_fired) {
1802 h_psn_extra[skim[ifill]]->Fill(4.5);
1803 array_psn_extra_fast[fastSkim][fastPos][4] = 1;
1804 }
1805 if (ECL_fired) {
1806 h_psn_extra[skim[ifill]]->Fill(5.5);
1807 array_psn_extra_fast[fastSkim][fastPos][5] = 1;
1808 }
1809 if (CDC_fired) {
1810 h_psn_extra[skim[ifill]]->Fill(6.5);
1811 array_psn_extra_fast[fastSkim][fastPos][6] = 1;
1812 }
1813 if ((CDC_fired) && (ECL_fired)) {
1814 h_psn_extra[skim[ifill]]->Fill(7.5);
1815 array_psn_extra_fast[fastSkim][fastPos][7] = 1;
1816 }
1817 if (bha2D_fired) {
1818 h_psn_extra[skim[ifill]]->Fill(8.5);
1819 array_psn_extra_fast[fastSkim][fastPos][8] = 1;
1820 }
1821 if (bha3D_fired) {
1822 h_psn_extra[skim[ifill]]->Fill(9.5);
1823 array_psn_extra_fast[fastSkim][fastPos][9] = 1;
1824 }
1825 if (ff_fired) {
1826 h_psn_extra[skim[ifill]]->Fill(10.5);
1827 array_psn_extra_fast[fastSkim][fastPos][10] = 1;
1828 }
1829 if (ff_fired && (LML_fired)) {
1830 h_psn_extra[skim[ifill]]->Fill(11.5);
1831 array_psn_extra_fast[fastSkim][fastPos][11] = 1;
1832 }
1833 if (f_fired) {
1834 h_psn_extra[skim[ifill]]->Fill(12.5);
1835 array_psn_extra_fast[fastSkim][fastPos][12] = 1;
1836 }
1837 if (f_fired && (LML_fired)) {
1838 h_psn_extra[skim[ifill]]->Fill(13.5);
1839 array_psn_extra_fast[fastSkim][fastPos][13] = 1;
1840 }
1841 if (LML_fired) {
1842 h_psn_extra[skim[ifill]]->Fill(14.5);
1843 array_psn_extra_fast[fastSkim][fastPos][14] = 1;
1844 }
1845 if (fff_fired && (LML_fired)) {
1846 h_psn_extra[skim[ifill]]->Fill(15.5);
1847 array_psn_extra_fast[fastSkim][fastPos][15] = 1;
1848 }
1849 if (ffo_fired && (LML_fired)) {
1850 h_psn_extra[skim[ifill]]->Fill(16.5);
1851 array_psn_extra_fast[fastSkim][fastPos][16] = 1;
1852 }
1853 if (ffb_fired && (LML_fired)) {
1854 h_psn_extra[skim[ifill]]->Fill(17.5);
1855 array_psn_extra_fast[fastSkim][fastPos][17] = 1;
1856 }
1857 if (ffy_fired) {
1858 h_psn_extra[skim[ifill]]->Fill(18.5);
1859 array_psn_extra_fast[fastSkim][fastPos][18] = 1;
1860 }
1861 if (ffy_fired && (ECL_fired)) {
1862 h_psn_extra[skim[ifill]]->Fill(19.5);
1863 array_psn_extra_fast[fastSkim][fastPos][19] = 1;
1864 }
1865 if (fyo_fired && (ECL_fired)) {
1866 h_psn_extra[skim[ifill]]->Fill(20.5);
1867 array_psn_extra_fast[fastSkim][fastPos][20] = 1;
1868 }
1869 if (fyb_fired && (ECL_fired)) {
1870 h_psn_extra[skim[ifill]]->Fill(21.5);
1871 array_psn_extra_fast[fastSkim][fastPos][21] = 1;
1872 }
1873 if ((ffy_fired || fyo_fired || fyb_fired) && (ECL_fired)) {
1874 h_psn_extra[skim[ifill]]->Fill(22.5);
1875 array_psn_extra_fast[fastSkim][fastPos][22] = 1;
1876 }
1877 if (ffy_fired && (LML_fired)) {
1878 h_psn_extra[skim[ifill]]->Fill(23.5);
1879 array_psn_extra_fast[fastSkim][fastPos][23] = 1;
1880 }
1881 if (fyo_fired && (LML_fired)) {
1882 h_psn_extra[skim[ifill]]->Fill(24.5);
1883 array_psn_extra_fast[fastSkim][fastPos][24] = 1;
1884 }
1885 if (fyb_fired && (LML_fired)) {
1886 h_psn_extra[skim[ifill]]->Fill(25.5);
1887 array_psn_extra_fast[fastSkim][fastPos][25] = 1;
1888 }
1889 if (c4_fired && (CDC_fired)) {
1890 h_psn_extra[skim[ifill]]->Fill(26.5);
1891 array_psn_extra_fast[fastSkim][fastPos][26] = 1;
1892 }
1893 if (hie_fired && (CDC_fired)) {
1894 h_psn_extra[skim[ifill]]->Fill(27.5);
1895 array_psn_extra_fast[fastSkim][fastPos][27] = 1;
1896 }
1897 if (lml0_fired && (CDC_fired)) {
1898 h_psn_extra[skim[ifill]]->Fill(28.5);
1899 array_psn_extra_fast[fastSkim][fastPos][28] = 1;
1900 }
1901 if (lml1_fired && (CDC_fired)) {
1902 h_psn_extra[skim[ifill]]->Fill(29.5);
1903 array_psn_extra_fast[fastSkim][fastPos][29] = 1;
1904 }
1905 if (lml2_fired && (CDC_fired)) {
1906 h_psn_extra[skim[ifill]]->Fill(30.5);
1907 array_psn_extra_fast[fastSkim][fastPos][30] = 1;
1908 }
1909 if (lml3_fired && (CDC_fired)) {
1910 h_psn_extra[skim[ifill]]->Fill(31.5);
1911 array_psn_extra_fast[fastSkim][fastPos][31] = 1;
1912 }
1913 if (lml4_fired && (CDC_fired)) {
1914 h_psn_extra[skim[ifill]]->Fill(32.5);
1915 array_psn_extra_fast[fastSkim][fastPos][32] = 1;
1916 }
1917 if (lml5_fired && (CDC_fired)) {
1918 h_psn_extra[skim[ifill]]->Fill(33.5);
1919 array_psn_extra_fast[fastSkim][fastPos][33] = 1;
1920 }
1921 if (lml6_fired && (CDC_fired)) {
1922 h_psn_extra[skim[ifill]]->Fill(34.5);
1923 array_psn_extra_fast[fastSkim][fastPos][34] = 1;
1924 }
1925 if (lml7_fired && (CDC_fired)) {
1926 h_psn_extra[skim[ifill]]->Fill(35.5);
1927 array_psn_extra_fast[fastSkim][fastPos][35] = 1;
1928 }
1929 if (lml8_fired && (CDC_fired)) {
1930 h_psn_extra[skim[ifill]]->Fill(36.5);
1931 array_psn_extra_fast[fastSkim][fastPos][36] = 1;
1932 }
1933 if (lml9_fired && (CDC_fired)) {
1934 h_psn_extra[skim[ifill]]->Fill(37.5);
1935 array_psn_extra_fast[fastSkim][fastPos][37] = 1;
1936 }
1937 if (lml10_fired && (CDC_fired)) {
1938 h_psn_extra[skim[ifill]]->Fill(38.5);
1939 array_psn_extra_fast[fastSkim][fastPos][38] = 1;
1940 }
1941 if (lml12_fired && (CDC_fired)) {
1942 h_psn_extra[skim[ifill]]->Fill(39.5);
1943 array_psn_extra_fast[fastSkim][fastPos][39] = 1;
1944 }
1945 if (lml13_fired && (CDC_fired)) {
1946 h_psn_extra[skim[ifill]]->Fill(40.5);
1947 array_psn_extra_fast[fastSkim][fastPos][40] = 1;
1948 }
1949 if (eclmumu_fired && (CDC_fired)) {
1950 h_psn_extra[skim[ifill]]->Fill(41.5);
1951 array_psn_extra_fast[fastSkim][fastPos][41] = 1;
1952 }
1953 if (mu_b2b_fired && (CDC_fired)) {
1954 h_psn_extra[skim[ifill]]->Fill(42.5);
1955 array_psn_extra_fast[fastSkim][fastPos][42] = 1;
1956 }
1957 if (mu_eb2b_fired && (CDC_fired)) {
1958 h_psn_extra[skim[ifill]]->Fill(43.5);
1959 array_psn_extra_fast[fastSkim][fastPos][43] = 1;
1960 }
1961 if (cdcklm1_fired && (CDC_fired)) {
1962 h_psn_extra[skim[ifill]]->Fill(44.5);
1963 array_psn_extra_fast[fastSkim][fastPos][44] = 1;
1964 }
1965 if (cdcklm2_fired && (CDC_fired)) {
1966 h_psn_extra[skim[ifill]]->Fill(45.5);
1967 array_psn_extra_fast[fastSkim][fastPos][45] = 1;
1968 }
1969 if (klm_hit_fired && (CDC_fired)) {
1970 h_psn_extra[skim[ifill]]->Fill(46.5);
1971 array_psn_extra_fast[fastSkim][fastPos][46] = 1;
1972 }
1973 if (eklm_hit_fired && (CDC_fired)) {
1974 h_psn_extra[skim[ifill]]->Fill(47.5);
1975 array_psn_extra_fast[fastSkim][fastPos][47] = 1;
1976 }
1977 if (mu_b2b_fired && LML_fired) {
1978 h_psn_extra[skim[ifill]]->Fill(48.5);
1979 array_psn_extra_fast[fastSkim][fastPos][48] = 1;
1980 }
1981 if (mu_eb2b_fired && LML_fired) {
1982 h_psn_extra[skim[ifill]]->Fill(49.5);
1983 array_psn_extra_fast[fastSkim][fastPos][49] = 1;
1984 }
1985 if (cdcklm1_fired && LML_fired) {
1986 h_psn_extra[skim[ifill]]->Fill(50.5);
1987 array_psn_extra_fast[fastSkim][fastPos][50] = 1;
1988 }
1989 if (cdcklm2_fired && LML_fired) {
1990 h_psn_extra[skim[ifill]]->Fill(51.5);
1991 array_psn_extra_fast[fastSkim][fastPos][51] = 1;
1992 }
1993 if (klm_hit_fired && LML_fired) {
1994 h_psn_extra[skim[ifill]]->Fill(52.5);
1995 array_psn_extra_fast[fastSkim][fastPos][52] = 1;
1996 }
1997 if (eklm_hit_fired && LML_fired) {
1998 h_psn_extra[skim[ifill]]->Fill(53.5);
1999 array_psn_extra_fast[fastSkim][fastPos][53] = 1;
2000 }
2001 if (cdcecl1_fired && (CDC_fired)) {
2002 h_psn_extra[skim[ifill]]->Fill(54.5);
2003 array_psn_extra_fast[fastSkim][fastPos][54] = 1;
2004 }
2005 if (cdcecl2_fired && (CDC_fired)) {
2006 h_psn_extra[skim[ifill]]->Fill(55.5);
2007 array_psn_extra_fast[fastSkim][fastPos][55] = 1;
2008 }
2009 if (cdcecl3_fired && (CDC_fired)) {
2010 h_psn_extra[skim[ifill]]->Fill(56.5);
2011 array_psn_extra_fast[fastSkim][fastPos][56] = 1;
2012 }
2013 if (cdcecl4_fired && (CDC_fired)) {
2014 h_psn_extra[skim[ifill]]->Fill(57.5);
2015 array_psn_extra_fast[fastSkim][fastPos][57] = 1;
2016 }
2017 if (cdcecl1_fired && LML_fired) {
2018 h_psn_extra[skim[ifill]]->Fill(58.5);
2019 array_psn_extra_fast[fastSkim][fastPos][58] = 1;
2020 }
2021 if (cdcecl2_fired && LML_fired) {
2022 h_psn_extra[skim[ifill]]->Fill(59.5);
2023 array_psn_extra_fast[fastSkim][fastPos][59] = 1;
2024 }
2025 if (cdcecl3_fired && LML_fired) {
2026 h_psn_extra[skim[ifill]]->Fill(60.5);
2027 array_psn_extra_fast[fastSkim][fastPos][60] = 1;
2028 }
2029 if (cdcecl4_fired && LML_fired) {
2030 h_psn_extra[skim[ifill]]->Fill(61.5);
2031 array_psn_extra_fast[fastSkim][fastPos][61] = 1;
2032 }
2033 if (fso_fired && LML_fired) {
2034 h_psn_extra[skim[ifill]]->Fill(62.5);
2035 array_psn_extra_fast[fastSkim][fastPos][62] = 1;
2036 }
2037 if (fsb_fired && LML_fired) {
2038 h_psn_extra[skim[ifill]]->Fill(63.5);
2039 array_psn_extra_fast[fastSkim][fastPos][63] = 1;
2040 }
2041 if (syo_fired && LML_fired) {
2042 h_psn_extra[skim[ifill]]->Fill(64.5);
2043 array_psn_extra_fast[fastSkim][fastPos][64] = 1;
2044 }
2045 if (syb_fired && LML_fired) {
2046 h_psn_extra[skim[ifill]]->Fill(65.5);
2047 array_psn_extra_fast[fastSkim][fastPos][65] = 1;
2048 }
2049 if (x_fired && LML_fired) {
2050 h_psn_extra[skim[ifill]]->Fill(66.5);
2051 array_psn_extra_fast[fastSkim][fastPos][66] = 1;
2052 }
2053 if (fioiecl1_fired && LML_fired) {
2054 h_psn_extra[skim[ifill]]->Fill(67.5);
2055 array_psn_extra_fast[fastSkim][fastPos][67] = 1;
2056 }
2057 if (ecleklm1_fired && LML_fired) {
2058 h_psn_extra[skim[ifill]]->Fill(68.5);
2059 array_psn_extra_fast[fastSkim][fastPos][68] = 1;
2060 }
2061 if (seklm1_fired && LML_fired) {
2062 h_psn_extra[skim[ifill]]->Fill(69.5);
2063 array_psn_extra_fast[fastSkim][fastPos][69] = 1;
2064 }
2065 if (seklm2_fired && LML_fired) {
2066 h_psn_extra[skim[ifill]]->Fill(70.5);
2067 array_psn_extra_fast[fastSkim][fastPos][70] = 1;
2068 }
2069 if (ieklm_fired && LML_fired) {
2070 h_psn_extra[skim[ifill]]->Fill(71.5);
2071 array_psn_extra_fast[fastSkim][fastPos][71] = 1;
2072 }
2073 if (iecl_fired && LML_fired) {
2074 h_psn_extra[skim[ifill]]->Fill(72.5);
2075 array_psn_extra_fast[fastSkim][fastPos][72] = 1;
2076 }
2077 if (ecleklm1_fired && CDC_fired) {
2078 h_psn_extra[skim[ifill]]->Fill(73.5);
2079 array_psn_extra_fast[fastSkim][fastPos][73] = 1;
2080 }
2081 if (syo_fired && ECL_fired) {
2082 h_psn_extra[skim[ifill]]->Fill(74.5);
2083 array_psn_extra_fast[fastSkim][fastPos][74] = 1;
2084 }
2085 if (yioiecl1_fired && ECL_fired) {
2086 h_psn_extra[skim[ifill]]->Fill(75.5);
2087 array_psn_extra_fast[fastSkim][fastPos][75] = 1;
2088 }
2089 if (stt_fired && ECL_fired) {
2090 h_psn_extra[skim[ifill]]->Fill(76.5);
2091 array_psn_extra_fast[fastSkim][fastPos][76] = 1;
2092 }
2093 if (ffz_fired && (ECL_fired)) {
2094 h_psn_extra[skim[ifill]]->Fill(77.5);
2095 array_psn_extra_fast[fastSkim][fastPos][77] = 1;
2096 }
2097 if (fzo_fired && (ECL_fired)) {
2098 h_psn_extra[skim[ifill]]->Fill(78.5);
2099 array_psn_extra_fast[fastSkim][fastPos][78] = 1;
2100 }
2101 if (fzb_fired && (ECL_fired)) {
2102 h_psn_extra[skim[ifill]]->Fill(79.5);
2103 array_psn_extra_fast[fastSkim][fastPos][79] = 1;
2104 }
2105 if (ffy_fired && ffz_fired && (ECL_fired)) {
2106 h_psn_extra[skim[ifill]]->Fill(80.5);
2107 array_psn_extra_fast[fastSkim][fastPos][80] = 1;
2108 }
2109 if (fyo_fired && fzo_fired && (ECL_fired)) {
2110 h_psn_extra[skim[ifill]]->Fill(81.5);
2111 array_psn_extra_fast[fastSkim][fastPos][81] = 1;
2112 }
2113 if (fyb_fired && fzb_fired && (ECL_fired)) {
2114 h_psn_extra[skim[ifill]]->Fill(82.5);
2115 array_psn_extra_fast[fastSkim][fastPos][82] = 1;
2116 }
2117 if ((ffy_fired || ffz_fired) && (ECL_fired)) {
2118 h_psn_extra[skim[ifill]]->Fill(83.5);
2119 array_psn_extra_fast[fastSkim][fastPos][83] = 1;
2120 }
2121 if ((fyo_fired || fzo_fired) && (ECL_fired)) {
2122 h_psn_extra[skim[ifill]]->Fill(84.5);
2123 array_psn_extra_fast[fastSkim][fastPos][84] = 1;
2124 }
2125 if ((fyb_fired || fzb_fired) && (ECL_fired)) {
2126 h_psn_extra[skim[ifill]]->Fill(85.5);
2127 array_psn_extra_fast[fastSkim][fastPos][85] = 1;
2128 }
2129 if (ffy_fired && ffz_fired) {
2130 h_psn_extra[skim[ifill]]->Fill(86.5);
2131 array_psn_extra_fast[fastSkim][fastPos][86] = 1;
2132 }
2133 if (fyo_fired && fzo_fired) {
2134 h_psn_extra[skim[ifill]]->Fill(87.5);
2135 array_psn_extra_fast[fastSkim][fastPos][87] = 1;
2136 }
2137 if (fyb_fired && fzb_fired) {
2138 h_psn_extra[skim[ifill]]->Fill(88.5);
2139 array_psn_extra_fast[fastSkim][fastPos][88] = 1;
2140 }
2141 if (ffy_fired || ffz_fired) {
2142 h_psn_extra[skim[ifill]]->Fill(89.5);
2143 array_psn_extra_fast[fastSkim][fastPos][89] = 1;
2144 }
2145 if (fyo_fired || fzo_fired) {
2146 h_psn_extra[skim[ifill]]->Fill(90.5);
2147 array_psn_extra_fast[fastSkim][fastPos][90] = 1;
2148 }
2149 if (fyb_fired || fzb_fired) {
2150 h_psn_extra[skim[ifill]]->Fill(91.5);
2151 array_psn_extra_fast[fastSkim][fastPos][91] = 1;
2152 }
2153 if (ffo_fired) {
2154 h_psn_extra[skim[ifill]]->Fill(92.5);
2155 array_psn_extra_fast[fastSkim][fastPos][92] = 1;
2156 }
2157 if (ffb_fired) {
2158 h_psn_extra[skim[ifill]]->Fill(93.5);
2159 array_psn_extra_fast[fastSkim][fastPos][93] = 1;
2160 }
2161 if (aaa_fired && ECL_fired) {
2162 h_psn_extra[skim[ifill]]->Fill(94.5);
2163 array_psn_extra_fast[fastSkim][fastPos][94] = 1;
2164 }
2165 if (aay_fired && ECL_fired) {
2166 h_psn_extra[skim[ifill]]->Fill(95.5);
2167 array_psn_extra_fast[fastSkim][fastPos][95] = 1;
2168 }
2169 if (ycdcklm1_fired && (CDC_fired)) {
2170 h_psn_extra[skim[ifill]]->Fill(96.5);
2171 array_psn_extra_fast[fastSkim][fastPos][96] = 1;
2172 }
2173 if (ycdcklm2_fired && (CDC_fired)) {
2174 h_psn_extra[skim[ifill]]->Fill(97.5);
2175 array_psn_extra_fast[fastSkim][fastPos][97] = 1;
2176 }
2177 if (ycdcklm1_fired && LML_fired) {
2178 h_psn_extra[skim[ifill]]->Fill(98.5);
2179 array_psn_extra_fast[fastSkim][fastPos][98] = 1;
2180 }
2181 if (ycdcklm2_fired && LML_fired) {
2182 h_psn_extra[skim[ifill]]->Fill(99.5);
2183 array_psn_extra_fast[fastSkim][fastPos][99] = 1;
2184 }
2185 if (sttecl_fired && ECL_fired) {
2186 h_psn_extra[skim[ifill]]->Fill(100.5);
2187 array_psn_extra_fast[fastSkim][fastPos][100] = 1;
2188 }
2189 if (syoecl_fired && LML_fired) {
2190 h_psn_extra[skim[ifill]]->Fill(101.5);
2191 array_psn_extra_fast[fastSkim][fastPos][101] = 1;
2192 }
2193 if (sybecl_fired && LML_fired) {
2194 h_psn_extra[skim[ifill]]->Fill(102.5);
2195 array_psn_extra_fast[fastSkim][fastPos][102] = 1;
2196 }
2197 if (syoecl_fired && ECL_fired) {
2198 h_psn_extra[skim[ifill]]->Fill(103.5);
2199 array_psn_extra_fast[fastSkim][fastPos][103] = 1;
2200 }
2201 if (sybecl_fired && ECL_fired) {
2202 h_psn_extra[skim[ifill]]->Fill(104.5);
2203 array_psn_extra_fast[fastSkim][fastPos][104] = 1;
2204 }
2205
2206
2207 for (int ibin = 0; ibin < n_output_extra; ibin++) {
2208 m_fastSum[fastSkim][ibin] += array_psn_extra_fast[fastSkim][fastPos][ibin];
2209 h_psn_extra_fast[fastSkim]->SetBinContent(ibin + 1, m_fastSum[fastSkim][ibin]);
2210 }
2211 }
2212
2213}

◆ fillOutputOverlap()

void fillOutputOverlap ( void )
protected

Definition at line 1095 of file TRGGDLDQMModule.cc.

1096{
1097 for (unsigned ifill = 0; ifill < skim.size(); ifill++) {
1098 bool ffy_fired = isFired_quick("ffy", true);
1099 bool fyo_fired = isFired_quick("fyo", true) || isFired_quick("fyb", true);
1100 bool c4_fired = isFired_quick("c4", true);
1101 bool hie_fired = isFired_quick("hie", true);
1102 bool klm_fired = isFired_quick("mu_b2b", true) || isFired_quick("mu_eb2b", true) || isFired_quick("eklm2", true)
1103 || isFired_quick("beklm", true);
1104 bool klm_match_fired = isFired_quick("cdcklm1", true) || isFired_quick("cdcklm2", true)
1105 || isFired_quick("seklm1", true) || isFired_quick("seklm2", true)
1106 || isFired_quick("fwd_seklm", true) || isFired_quick("bwd_seklm", true)
1107 || isFired_quick("ieklm1", true) || isFired_quick("ecleklm1", true);
1108 bool stt_fired = isFired_quick("stt", true) || isFired_quick("sttecl", true);
1109 bool short_fired = isFired_quick("syo", true) || isFired_quick("syb", true) || isFired_quick("yioiecl1", true) ;
1110 bool ff30_fired = isFired_quick("fy30", true);
1111 bool inner_fired = isFired_quick("ioiecl2", true);
1112 bool lml_fired = isFired_quick("lml0", true) || isFired_quick("lml2", true) || isFired_quick("lml6", true)
1113 || isFired_quick("lml7", true) || isFired_quick("lml8", true) || isFired_quick("lml9", true)
1114 || isFired_quick("lml10", true)
1115 || isFired_quick("lml12", true) || isFired_quick("lml13", true)
1116 || isFired_quick("lml14", true) || isFired_quick("lml15", true) || isFired_quick("lml16", true);
1117 bool gg_fired = isFired_quick("ggsel", true);
1118 bool bhabha_fired = isFired_quick("bhapur", true);
1119 bool pid_fired = isFired_quick("ssb", true) || isFired_quick("eed", true) || isFired_quick("fed", true)
1120 || isFired_quick("yp", true)
1121 || isFired_quick("fp", true) || isFired_quick("shem", true) || isFired_quick("ohem", true);
1122 bool bhamon_fired = isFired_quick("bffo", true) || isFired_quick("bhie", true) || isFired_quick("lml3", true)
1123 || isFired_quick("lml5", true) || isFired_quick("bha3d", true) || isFired_quick("bhabha", true) || isFired_quick("lume", true);
1124 bool eclmumu_fired = isFired_quick("eclmumu", true);
1125 bool lml1_fired = isFired_quick("lml1", true);
1126 bool lml4_fired = isFired_quick("lml4", true);
1127 bool veto_fired = isFired_quick("hiev", true) || isFired_quick("fffv", true);
1128 bool random_fired = isFired_quick("bg", true) || isFired_quick("poissonv", true) || isFired_quick("revolution", true)
1129 || isFired_quick("random", true);
1130 bool ffz_fired = isFired_quick("ffz", true);
1131 bool fzo_fired = isFired_quick("fzo", true) || isFired_quick("fzb", true);
1132 bool trg_calib_fired = isFired_quick("c2", true) || isFired_quick("c3", true) || isFired_quick("eklmhit", true)
1133 || isFired_quick("f", true) || isFired_quick("s", true);
1134 bool cdcecl_calib_fired = isFired_quick("cdcecl3", true) || isFired_quick("cdcecl4", true);
1135// bool monitor_fired = isFired_quick("fff", true) || isFired_quick("ffo", true) || isFired_quick("ffb", true)
1136// || isFired_quick("fffo", true) || isFired_quick("ffs", true) || isFired_quick("fss", true) || isFired_quick("sss", true)
1137// || isFired_quick("ff", true) || isFired_quick("ss", true) || isFired_quick("fso", true)
1138// || isFired_quick("sso", true) || isFired_quick("fsb", true) || isFired_quick("ff30", true)
1139// || isFired_quick("lume", true) || isFired_quick("c2", true) || isFired_quick("c3", true)
1140// || isFired_quick("bha3d", true) || isFired_quick("bhabha", true)
1141// || isFired_quick("g_high", true) || isFired_quick("g_c1", true) || isFired_quick("gg", true)
1142// || isFired_quick("eklmhit", true) || isFired_quick("fioiecl1", true) || isFired_quick("ioiecl1", true)
1143// || isFired_quick("cdcecl1", true) || isFired_quick("cdcecl2", true) || isFired_quick("cdcecl3", true)
1144// || isFired_quick("cdcecl4", true) || isFired_quick("c2gev1", true) || isFired_quick("c2gev2", true)
1145// || isFired_quick("c2hie", true) || isFired_quick("f", true) || isFired_quick("s", true)
1146// || isFired_quick("revolution", true) || isFired_quick("random", true);
1147 bool monitor_fired = isFired_quick("fff", true) || isFired_quick("ffo", true) || isFired_quick("ffb", true)
1148 || isFired_quick("fffo", true) || isFired_quick("ffs", true) || isFired_quick("fss", true) || isFired_quick("sss", true)
1149 || isFired_quick("ff", true) || isFired_quick("ss", true) || isFired_quick("fso", true)
1150 || isFired_quick("sso", true) || isFired_quick("fsb", true) || isFired_quick("ff30", true)
1151 || isFired_quick("fioiecl1", true) || isFired_quick("ioiecl1", true)
1152 || isFired_quick("cdcecl1", true) || isFired_quick("cdcecl2", true)
1153 || isFired_quick("c2gev1", true) || isFired_quick("c2gev2", true)
1154 || isFired_quick("g_high", true) || isFired_quick("g_c1", true) || isFired_quick("gg", true)
1155 || isFired_quick("c2hie", true) || isFired_quick("stt6", true);
1156// bool monitor_fired = isFired_quick("c2hie", true);
1157
1158 bool B_CDC_fired = ffy_fired || fyo_fired;
1159 bool B_ECL_fired = c4_fired || hie_fired;
1160 bool LOW_KLM_fired = klm_fired || klm_match_fired;
1161 bool LOW_CDC_fired = stt_fired || short_fired || ff30_fired || inner_fired;
1162 bool LOW_ECL_fired = lml_fired || cdcecl_calib_fired;
1163 bool CALIB_fired = gg_fired || bhabha_fired || pid_fired || bhamon_fired || eclmumu_fired || lml1_fired || lml4_fired || veto_fired
1164 || random_fired || trg_calib_fired;
1165 bool MONITOR_fired = monitor_fired || ffz_fired || fzo_fired;
1166
1167 //all event
1168 if (1) {
1169 h_psn_effect_to_l1[skim[ifill]]->Fill(0.5);
1170 }
1171 //main category
1172 if (B_CDC_fired) {
1173 h_psn_effect_to_l1[skim[ifill]]->Fill(1.5);
1174 } else if (B_ECL_fired) {
1175 h_psn_effect_to_l1[skim[ifill]]->Fill(2.5);
1176 } else if (LOW_KLM_fired) {
1177 h_psn_effect_to_l1[skim[ifill]]->Fill(3.5);
1178 } else if (LOW_CDC_fired) {
1179 h_psn_effect_to_l1[skim[ifill]]->Fill(4.5);
1180 } else if (LOW_ECL_fired) {
1181 h_psn_effect_to_l1[skim[ifill]]->Fill(5.5);
1182 } else if (CALIB_fired) {
1183 h_psn_effect_to_l1[skim[ifill]]->Fill(6.5);
1184 } else if (MONITOR_fired) {
1185 h_psn_effect_to_l1[skim[ifill]]->Fill(7.5);
1186 } else {
1187 h_psn_effect_to_l1[skim[ifill]]->Fill(8.5);
1188 }
1189 //detail category
1190 if (ffy_fired) {
1191 h_psn_effect_to_l1[skim[ifill]]->Fill(9.5);
1192 } else if (fyo_fired) {
1193 h_psn_effect_to_l1[skim[ifill]]->Fill(10.5);
1194 } else if (c4_fired) {
1195 h_psn_effect_to_l1[skim[ifill]]->Fill(11.5);
1196 } else if (hie_fired) {
1197 h_psn_effect_to_l1[skim[ifill]]->Fill(12.5);
1198 } else if (klm_fired) {
1199 h_psn_effect_to_l1[skim[ifill]]->Fill(13.5);
1200 } else if (klm_match_fired) {
1201 h_psn_effect_to_l1[skim[ifill]]->Fill(14.5);
1202 } else if (stt_fired) {
1203 h_psn_effect_to_l1[skim[ifill]]->Fill(15.5);
1204 } else if (short_fired) {
1205 h_psn_effect_to_l1[skim[ifill]]->Fill(16.5);
1206 } else if (ff30_fired) {
1207 h_psn_effect_to_l1[skim[ifill]]->Fill(17.5);
1208 } else if (inner_fired) {
1209 h_psn_effect_to_l1[skim[ifill]]->Fill(18.5);
1210 } else if (lml_fired) {
1211 h_psn_effect_to_l1[skim[ifill]]->Fill(19.5);
1212 } else if (gg_fired) {
1213 h_psn_effect_to_l1[skim[ifill]]->Fill(20.5);
1214 } else if (bhabha_fired) {
1215 h_psn_effect_to_l1[skim[ifill]]->Fill(21.5);
1216 } else if (pid_fired) {
1217 h_psn_effect_to_l1[skim[ifill]]->Fill(22.5);
1218 } else if (bhamon_fired) {
1219 h_psn_effect_to_l1[skim[ifill]]->Fill(23.5);
1220 } else if (eclmumu_fired) {
1221 h_psn_effect_to_l1[skim[ifill]]->Fill(24.5);
1222 } else if (lml1_fired) {
1223 h_psn_effect_to_l1[skim[ifill]]->Fill(25.5);
1224 } else if (lml4_fired) {
1225 h_psn_effect_to_l1[skim[ifill]]->Fill(26.5);
1226 } else if (veto_fired) {
1227 h_psn_effect_to_l1[skim[ifill]]->Fill(27.5);
1228 } else if (random_fired) {
1229 h_psn_effect_to_l1[skim[ifill]]->Fill(28.5);
1230 } else if (ffz_fired) {
1231 h_psn_effect_to_l1[skim[ifill]]->Fill(29.5);
1232 } else if (fzo_fired) {
1233 h_psn_effect_to_l1[skim[ifill]]->Fill(30.5);
1234 } else if (monitor_fired) {
1235 h_psn_effect_to_l1[skim[ifill]]->Fill(31.5);
1236 } else {
1237 h_psn_effect_to_l1[skim[ifill]]->Fill(32.5);
1238 }
1239 //full dump without category
1240 if (isFired_quick("ffy", true)) {
1241 h_psn_effect_to_l1[skim[ifill]]->Fill(33.5);
1242 } else if (isFired_quick("fyb", true)) {
1243 h_psn_effect_to_l1[skim[ifill]]->Fill(34.5);
1244 } else if (isFired_quick("fyo", true)) {
1245 h_psn_effect_to_l1[skim[ifill]]->Fill(35.5);
1246 } else if (isFired_quick("c4", true)) {
1247 h_psn_effect_to_l1[skim[ifill]]->Fill(36.5);
1248 } else if (isFired_quick("hie", true)) {
1249 h_psn_effect_to_l1[skim[ifill]]->Fill(37.5);
1250 } else if (isFired_quick("mu_b2b", true)) {
1251 h_psn_effect_to_l1[skim[ifill]]->Fill(38.5);
1252 } else if (isFired_quick("mu_eb2b", true)) {
1253 h_psn_effect_to_l1[skim[ifill]]->Fill(39.5);
1254 } else if (isFired_quick("eklm2", true)) {
1255 h_psn_effect_to_l1[skim[ifill]]->Fill(40.5);
1256 } else if (isFired_quick("beklm", true)) {
1257 h_psn_effect_to_l1[skim[ifill]]->Fill(41.5);
1258 } else if (isFired_quick("cdcklm1", true)) {
1259 h_psn_effect_to_l1[skim[ifill]]->Fill(42.5);
1260 } else if (isFired_quick("cdcklm2", true)) {
1261 h_psn_effect_to_l1[skim[ifill]]->Fill(43.5);
1262 } else if (isFired_quick("seklm1", true)) {
1263 h_psn_effect_to_l1[skim[ifill]]->Fill(44.5);
1264 } else if (isFired_quick("seklm2", true)) {
1265 h_psn_effect_to_l1[skim[ifill]]->Fill(45.5);
1266 } else if (isFired_quick("fwd_seklm", true)) {
1267 h_psn_effect_to_l1[skim[ifill]]->Fill(46.5);
1268 } else if (isFired_quick("bwd_seklm", true)) {
1269 h_psn_effect_to_l1[skim[ifill]]->Fill(47.5);
1270 } else if (isFired_quick("ecleklm1", true)) {
1271 h_psn_effect_to_l1[skim[ifill]]->Fill(48.5);
1272 } else if (isFired_quick("ieklm1", true)) {
1273 h_psn_effect_to_l1[skim[ifill]]->Fill(49.5);
1274 } else if (isFired_quick("sttecl", true)) {
1275 h_psn_effect_to_l1[skim[ifill]]->Fill(50.5);
1276 } else if (isFired_quick("stt", true)) {
1277 h_psn_effect_to_l1[skim[ifill]]->Fill(51.5);
1278 } else if (isFired_quick("syb", true)) {
1279 h_psn_effect_to_l1[skim[ifill]]->Fill(52.5);
1280 } else if (isFired_quick("syo", true)) {
1281 h_psn_effect_to_l1[skim[ifill]]->Fill(53.5);
1282 } else if (isFired_quick("yioiecl1", true)) {
1283 h_psn_effect_to_l1[skim[ifill]]->Fill(54.5);
1284 } else if (isFired_quick("fy30", true)) {
1285 h_psn_effect_to_l1[skim[ifill]]->Fill(55.5);
1286 } else if (isFired_quick("ioiecl2", true)) {
1287 h_psn_effect_to_l1[skim[ifill]]->Fill(56.5);
1288 } else if (isFired_quick("lml0", true)) {
1289 h_psn_effect_to_l1[skim[ifill]]->Fill(57.5);
1290 } else if (isFired_quick("lml2", true)) {
1291 h_psn_effect_to_l1[skim[ifill]]->Fill(58.5);
1292 } else if (isFired_quick("lml6", true)) {
1293 h_psn_effect_to_l1[skim[ifill]]->Fill(59.5);
1294 } else if (isFired_quick("lml7", true)) {
1295 h_psn_effect_to_l1[skim[ifill]]->Fill(60.5);
1296 } else if (isFired_quick("lml8", true)) {
1297 h_psn_effect_to_l1[skim[ifill]]->Fill(61.5);
1298 } else if (isFired_quick("lml9", true)) {
1299 h_psn_effect_to_l1[skim[ifill]]->Fill(62.5);
1300 } else if (isFired_quick("lml10", true)) {
1301 h_psn_effect_to_l1[skim[ifill]]->Fill(63.5);
1302 } else if (isFired_quick("lml12", true)) {
1303 h_psn_effect_to_l1[skim[ifill]]->Fill(64.5);
1304 } else if (isFired_quick("lml13", true)) {
1305 h_psn_effect_to_l1[skim[ifill]]->Fill(65.5);
1306 } else if (isFired_quick("lml14", true)) {
1307 h_psn_effect_to_l1[skim[ifill]]->Fill(66.5);
1308 } else if (isFired_quick("lml15", true)) {
1309 h_psn_effect_to_l1[skim[ifill]]->Fill(67.5);
1310 } else if (isFired_quick("lml16", true)) {
1311 h_psn_effect_to_l1[skim[ifill]]->Fill(68.5);
1312 } else if (isFired_quick("ggsel", true)) {
1313 h_psn_effect_to_l1[skim[ifill]]->Fill(69.5);
1314 } else if (isFired_quick("bhapur", true)) {
1315 h_psn_effect_to_l1[skim[ifill]]->Fill(70.5);
1316 } else if (isFired_quick("lml3", true)) {
1317 h_psn_effect_to_l1[skim[ifill]]->Fill(71.5);
1318 } else if (isFired_quick("lml5", true)) {
1319 h_psn_effect_to_l1[skim[ifill]]->Fill(72.5);
1320 } else if (isFired_quick("bha3d", true)) {
1321 h_psn_effect_to_l1[skim[ifill]]->Fill(73.5);
1322 } else if (isFired_quick("bhabha", true)) {
1323 h_psn_effect_to_l1[skim[ifill]]->Fill(74.5);
1324 } else if (isFired_quick("lume", true)) {
1325 h_psn_effect_to_l1[skim[ifill]]->Fill(75.5);
1326 } else if (isFired_quick("bffo", true)) {
1327 h_psn_effect_to_l1[skim[ifill]]->Fill(76.5);
1328 } else if (isFired_quick("bhie", true)) {
1329 h_psn_effect_to_l1[skim[ifill]]->Fill(77.5);
1330 } else if (isFired_quick("eclmumu", true)) {
1331 h_psn_effect_to_l1[skim[ifill]]->Fill(78.5);
1332 } else if (isFired_quick("lml1", true)) {
1333 h_psn_effect_to_l1[skim[ifill]]->Fill(79.5);
1334 } else if (isFired_quick("lml4", true)) {
1335 h_psn_effect_to_l1[skim[ifill]]->Fill(80.5);
1336 } else if (isFired_quick("ssb", true)) {
1337 h_psn_effect_to_l1[skim[ifill]]->Fill(81.5);
1338 } else if (isFired_quick("eed", true)) {
1339 h_psn_effect_to_l1[skim[ifill]]->Fill(82.5);
1340 } else if (isFired_quick("fed", true)) {
1341 h_psn_effect_to_l1[skim[ifill]]->Fill(83.5);
1342 } else if (isFired_quick("yp", true)) {
1343 h_psn_effect_to_l1[skim[ifill]]->Fill(84.5);
1344 } else if (isFired_quick("fp", true)) {
1345 h_psn_effect_to_l1[skim[ifill]]->Fill(85.5);
1346 } else if (isFired_quick("shem", true)) {
1347 h_psn_effect_to_l1[skim[ifill]]->Fill(86.5);
1348 } else if (isFired_quick("ohem", true)) {
1349 h_psn_effect_to_l1[skim[ifill]]->Fill(87.5);
1350 } else if (isFired_quick("hiev", true)) {
1351 h_psn_effect_to_l1[skim[ifill]]->Fill(88.5);
1352 } else if (isFired_quick("fffv", true)) {
1353 h_psn_effect_to_l1[skim[ifill]]->Fill(89.5);
1354 } else if (isFired_quick("bg", true)) {
1355 h_psn_effect_to_l1[skim[ifill]]->Fill(90.5);
1356 } else if (isFired_quick("poissonv", true)) {
1357 h_psn_effect_to_l1[skim[ifill]]->Fill(91.5);
1358 } else if (isFired_quick("revolution", true)) {
1359 h_psn_effect_to_l1[skim[ifill]]->Fill(92.5);
1360 } else if (isFired_quick("random", true)) {
1361 h_psn_effect_to_l1[skim[ifill]]->Fill(93.5);
1362 } else if (isFired_quick("c2", true)) {
1363 h_psn_effect_to_l1[skim[ifill]]->Fill(94.5);
1364 } else if (isFired_quick("c3", true)) {
1365 h_psn_effect_to_l1[skim[ifill]]->Fill(95.5);
1366 } else if (isFired_quick("eklmhit", true)) {
1367 h_psn_effect_to_l1[skim[ifill]]->Fill(96.5);
1368 } else if (isFired_quick("f", true)) {
1369 h_psn_effect_to_l1[skim[ifill]]->Fill(97.5);
1370 } else if (isFired_quick("s", true)) {
1371 h_psn_effect_to_l1[skim[ifill]]->Fill(98.5);
1372 } else if (isFired_quick("y", true)) {
1373 h_psn_effect_to_l1[skim[ifill]]->Fill(99.5);
1374 } else if (isFired_quick("cdcecl3", true)) {
1375 h_psn_effect_to_l1[skim[ifill]]->Fill(100.5);
1376 } else if (isFired_quick("cdcecl4", true)) {
1377 h_psn_effect_to_l1[skim[ifill]]->Fill(101.5);
1378 } else if (isFired_quick("ffz", true)) {
1379 h_psn_effect_to_l1[skim[ifill]]->Fill(102.5);
1380 } else if (isFired_quick("fzb", true)) {
1381 h_psn_effect_to_l1[skim[ifill]]->Fill(103.5);
1382 } else if (isFired_quick("fzo", true)) {
1383 h_psn_effect_to_l1[skim[ifill]]->Fill(104.5);
1384 } else if (isFired_quick("fff", true)) {
1385 h_psn_effect_to_l1[skim[ifill]]->Fill(105.5);
1386 } else if (isFired_quick("ffb", true)) {
1387 h_psn_effect_to_l1[skim[ifill]]->Fill(106.5);
1388 } else if (isFired_quick("ffo", true)) {
1389 h_psn_effect_to_l1[skim[ifill]]->Fill(107.5);
1390 } else if (isFired_quick("fffo", true)) {
1391 h_psn_effect_to_l1[skim[ifill]]->Fill(108.5);
1392 } else if (isFired_quick("ffs", true)) {
1393 h_psn_effect_to_l1[skim[ifill]]->Fill(109.5);
1394 } else if (isFired_quick("fss", true)) {
1395 h_psn_effect_to_l1[skim[ifill]]->Fill(110.5);
1396 } else if (isFired_quick("sss", true)) {
1397 h_psn_effect_to_l1[skim[ifill]]->Fill(111.5);
1398 } else if (isFired_quick("ff", true)) {
1399 h_psn_effect_to_l1[skim[ifill]]->Fill(112.5);
1400 } else if (isFired_quick("ss", true)) {
1401 h_psn_effect_to_l1[skim[ifill]]->Fill(113.5);
1402 } else if (isFired_quick("fso", true)) {
1403 h_psn_effect_to_l1[skim[ifill]]->Fill(114.5);
1404 } else if (isFired_quick("sso", true)) {
1405 h_psn_effect_to_l1[skim[ifill]]->Fill(115.5);
1406 } else if (isFired_quick("fsb", true)) {
1407 h_psn_effect_to_l1[skim[ifill]]->Fill(116.5);
1408 } else if (isFired_quick("ff30", true)) {
1409 h_psn_effect_to_l1[skim[ifill]]->Fill(117.5);
1410 } else if (isFired_quick("fioiecl1", true)) {
1411 h_psn_effect_to_l1[skim[ifill]]->Fill(118.5);
1412 } else if (isFired_quick("ioiecl1", true)) {
1413 h_psn_effect_to_l1[skim[ifill]]->Fill(119.5);
1414 } else if (isFired_quick("cdcecl1", true)) {
1415 h_psn_effect_to_l1[skim[ifill]]->Fill(120.5);
1416 } else if (isFired_quick("cdcecl2", true)) {
1417 h_psn_effect_to_l1[skim[ifill]]->Fill(121.5);
1418 } else if (isFired_quick("c2gev1", true)) {
1419 h_psn_effect_to_l1[skim[ifill]]->Fill(122.5);
1420 } else if (isFired_quick("c2gev2", true)) {
1421 h_psn_effect_to_l1[skim[ifill]]->Fill(123.5);
1422 } else if (isFired_quick("c2hie", true)) {
1423 h_psn_effect_to_l1[skim[ifill]]->Fill(124.5);
1424 } else if (isFired_quick("g_high", true)) {
1425 h_psn_effect_to_l1[skim[ifill]]->Fill(125.5);
1426 } else if (isFired_quick("g_c1", true)) {
1427 h_psn_effect_to_l1[skim[ifill]]->Fill(126.5);
1428 } else if (isFired_quick("gg", true)) {
1429 h_psn_effect_to_l1[skim[ifill]]->Fill(127.5);
1430 } else if (isFired_quick("stt6", true)) {
1431 h_psn_effect_to_l1[skim[ifill]]->Fill(128.5);
1432 } else {
1433 h_psn_effect_to_l1[skim[ifill]]->Fill(129.5);
1434 }
1435
1436 //all event
1437 if (1) {
1438 h_psn_raw_rate[skim[ifill]]->Fill(0.5);
1439 }
1440 //main category
1441 if (B_CDC_fired) {
1442 h_psn_raw_rate[skim[ifill]]->Fill(1.5);
1443 } if (B_ECL_fired) {
1444 h_psn_raw_rate[skim[ifill]]->Fill(2.5);
1445 } if (LOW_KLM_fired) {
1446 h_psn_raw_rate[skim[ifill]]->Fill(3.5);
1447 } if (LOW_CDC_fired) {
1448 h_psn_raw_rate[skim[ifill]]->Fill(4.5);
1449 } if (LOW_ECL_fired) {
1450 h_psn_raw_rate[skim[ifill]]->Fill(5.5);
1451 } if (CALIB_fired) {
1452 h_psn_raw_rate[skim[ifill]]->Fill(6.5);
1453 } if (MONITOR_fired) {
1454 h_psn_raw_rate[skim[ifill]]->Fill(7.5);
1455 }
1456 //detail category
1457 if (ffy_fired) {
1458 h_psn_raw_rate[skim[ifill]]->Fill(9.5);
1459 } if (fyo_fired) {
1460 h_psn_raw_rate[skim[ifill]]->Fill(10.5);
1461 } if (c4_fired) {
1462 h_psn_raw_rate[skim[ifill]]->Fill(11.5);
1463 } if (hie_fired) {
1464 h_psn_raw_rate[skim[ifill]]->Fill(12.5);
1465 } if (klm_fired) {
1466 h_psn_raw_rate[skim[ifill]]->Fill(13.5);
1467 } if (klm_match_fired) {
1468 h_psn_raw_rate[skim[ifill]]->Fill(14.5);
1469 } if (stt_fired) {
1470 h_psn_raw_rate[skim[ifill]]->Fill(15.5);
1471 } if (short_fired) {
1472 h_psn_raw_rate[skim[ifill]]->Fill(16.5);
1473 } if (ff30_fired) {
1474 h_psn_raw_rate[skim[ifill]]->Fill(17.5);
1475 } if (inner_fired) {
1476 h_psn_raw_rate[skim[ifill]]->Fill(18.5);
1477 } if (lml_fired) {
1478 h_psn_raw_rate[skim[ifill]]->Fill(19.5);
1479 } if (gg_fired) {
1480 h_psn_raw_rate[skim[ifill]]->Fill(20.5);
1481 } if (bhabha_fired) {
1482 h_psn_raw_rate[skim[ifill]]->Fill(21.5);
1483 } if (pid_fired) {
1484 h_psn_raw_rate[skim[ifill]]->Fill(22.5);
1485 } if (bhamon_fired) {
1486 h_psn_raw_rate[skim[ifill]]->Fill(23.5);
1487 } if (eclmumu_fired) {
1488 h_psn_raw_rate[skim[ifill]]->Fill(24.5);
1489 } if (lml1_fired) {
1490 h_psn_raw_rate[skim[ifill]]->Fill(25.5);
1491 } if (lml4_fired) {
1492 h_psn_raw_rate[skim[ifill]]->Fill(26.5);
1493 } if (veto_fired) {
1494 h_psn_raw_rate[skim[ifill]]->Fill(27.5);
1495 } if (random_fired) {
1496 h_psn_raw_rate[skim[ifill]]->Fill(28.5);
1497 } if (ffz_fired) {
1498 h_psn_raw_rate[skim[ifill]]->Fill(29.5);
1499 } if (fzo_fired) {
1500 h_psn_raw_rate[skim[ifill]]->Fill(30.5);
1501 } if (monitor_fired) {
1502 h_psn_raw_rate[skim[ifill]]->Fill(31.5);
1503 }
1504 //full dump without category
1505 if (isFired_quick("ffy", true)) {
1506 h_psn_raw_rate[skim[ifill]]->Fill(33.5);
1507 } if (isFired_quick("fyb", true)) {
1508 h_psn_raw_rate[skim[ifill]]->Fill(34.5);
1509 } if (isFired_quick("fyo", true)) {
1510 h_psn_raw_rate[skim[ifill]]->Fill(35.5);
1511 } if (isFired_quick("c4", true)) {
1512 h_psn_raw_rate[skim[ifill]]->Fill(36.5);
1513 } if (isFired_quick("hie", true)) {
1514 h_psn_raw_rate[skim[ifill]]->Fill(37.5);
1515 } if (isFired_quick("mu_b2b", true)) {
1516 h_psn_raw_rate[skim[ifill]]->Fill(38.5);
1517 } if (isFired_quick("mu_eb2b", true)) {
1518 h_psn_raw_rate[skim[ifill]]->Fill(39.5);
1519 } if (isFired_quick("eklm2", true)) {
1520 h_psn_raw_rate[skim[ifill]]->Fill(40.5);
1521 } if (isFired_quick("beklm", true)) {
1522 h_psn_raw_rate[skim[ifill]]->Fill(41.5);
1523 } if (isFired_quick("cdcklm1", true)) {
1524 h_psn_raw_rate[skim[ifill]]->Fill(42.5);
1525 } if (isFired_quick("cdcklm2", true)) {
1526 h_psn_raw_rate[skim[ifill]]->Fill(43.5);
1527 } if (isFired_quick("seklm1", true)) {
1528 h_psn_raw_rate[skim[ifill]]->Fill(44.5);
1529 } if (isFired_quick("seklm2", true)) {
1530 h_psn_raw_rate[skim[ifill]]->Fill(45.5);
1531 } if (isFired_quick("fwd_seklm", true)) {
1532 h_psn_raw_rate[skim[ifill]]->Fill(46.5);
1533 } if (isFired_quick("bwd_seklm", true)) {
1534 h_psn_raw_rate[skim[ifill]]->Fill(47.5);
1535 } if (isFired_quick("ecleklm1", true)) {
1536 h_psn_raw_rate[skim[ifill]]->Fill(48.5);
1537 } if (isFired_quick("ieklm1", true)) {
1538 h_psn_raw_rate[skim[ifill]]->Fill(49.5);
1539 } if (isFired_quick("sttecl", true)) {
1540 h_psn_raw_rate[skim[ifill]]->Fill(50.5);
1541 } if (isFired_quick("stt", true)) {
1542 h_psn_raw_rate[skim[ifill]]->Fill(51.5);
1543 } if (isFired_quick("syb", true)) {
1544 h_psn_raw_rate[skim[ifill]]->Fill(52.5);
1545 } if (isFired_quick("syo", true)) {
1546 h_psn_raw_rate[skim[ifill]]->Fill(53.5);
1547 } if (isFired_quick("yioiecl1", true)) {
1548 h_psn_raw_rate[skim[ifill]]->Fill(54.5);
1549 } if (isFired_quick("fy30", true)) {
1550 h_psn_raw_rate[skim[ifill]]->Fill(55.5);
1551 } if (isFired_quick("ioiecl2", true)) {
1552 h_psn_raw_rate[skim[ifill]]->Fill(56.5);
1553 } if (isFired_quick("lml0", true)) {
1554 h_psn_raw_rate[skim[ifill]]->Fill(57.5);
1555 } if (isFired_quick("lml2", true)) {
1556 h_psn_raw_rate[skim[ifill]]->Fill(58.5);
1557 } if (isFired_quick("lml6", true)) {
1558 h_psn_raw_rate[skim[ifill]]->Fill(59.5);
1559 } if (isFired_quick("lml7", true)) {
1560 h_psn_raw_rate[skim[ifill]]->Fill(60.5);
1561 } if (isFired_quick("lml8", true)) {
1562 h_psn_raw_rate[skim[ifill]]->Fill(61.5);
1563 } if (isFired_quick("lml9", true)) {
1564 h_psn_raw_rate[skim[ifill]]->Fill(62.5);
1565 } if (isFired_quick("lml10", true)) {
1566 h_psn_raw_rate[skim[ifill]]->Fill(63.5);
1567 } if (isFired_quick("lml12", true)) {
1568 h_psn_raw_rate[skim[ifill]]->Fill(64.5);
1569 } if (isFired_quick("lml13", true)) {
1570 h_psn_raw_rate[skim[ifill]]->Fill(65.5);
1571 } if (isFired_quick("lml14", true)) {
1572 h_psn_raw_rate[skim[ifill]]->Fill(66.5);
1573 } if (isFired_quick("lml15", true)) {
1574 h_psn_raw_rate[skim[ifill]]->Fill(67.5);
1575 } if (isFired_quick("lml16", true)) {
1576 h_psn_raw_rate[skim[ifill]]->Fill(68.5);
1577 } if (isFired_quick("ggsel", true)) {
1578 h_psn_raw_rate[skim[ifill]]->Fill(69.5);
1579 } if (isFired_quick("bhapur", true)) {
1580 h_psn_raw_rate[skim[ifill]]->Fill(70.5);
1581 } if (isFired_quick("lml3", true)) {
1582 h_psn_raw_rate[skim[ifill]]->Fill(71.5);
1583 } if (isFired_quick("lml5", true)) {
1584 h_psn_raw_rate[skim[ifill]]->Fill(72.5);
1585 } if (isFired_quick("bha3d", true)) {
1586 h_psn_raw_rate[skim[ifill]]->Fill(73.5);
1587 } if (isFired_quick("bhabha", true)) {
1588 h_psn_raw_rate[skim[ifill]]->Fill(74.5);
1589 } if (isFired_quick("lume", true)) {
1590 h_psn_raw_rate[skim[ifill]]->Fill(75.5);
1591 } if (isFired_quick("bffo", true)) {
1592 h_psn_raw_rate[skim[ifill]]->Fill(76.5);
1593 } if (isFired_quick("bhie", true)) {
1594 h_psn_raw_rate[skim[ifill]]->Fill(77.5);
1595 } if (isFired_quick("eclmumu", true)) {
1596 h_psn_raw_rate[skim[ifill]]->Fill(78.5);
1597 } if (isFired_quick("lml1", true)) {
1598 h_psn_raw_rate[skim[ifill]]->Fill(79.5);
1599 } if (isFired_quick("lml4", true)) {
1600 h_psn_raw_rate[skim[ifill]]->Fill(80.5);
1601 } if (isFired_quick("ssb", true)) {
1602 h_psn_raw_rate[skim[ifill]]->Fill(81.5);
1603 } if (isFired_quick("eed", true)) {
1604 h_psn_raw_rate[skim[ifill]]->Fill(82.5);
1605 } if (isFired_quick("fed", true)) {
1606 h_psn_raw_rate[skim[ifill]]->Fill(83.5);
1607 } if (isFired_quick("yp", true)) {
1608 h_psn_raw_rate[skim[ifill]]->Fill(84.5);
1609 } if (isFired_quick("fp", true)) {
1610 h_psn_raw_rate[skim[ifill]]->Fill(85.5);
1611 } if (isFired_quick("shem", true)) {
1612 h_psn_raw_rate[skim[ifill]]->Fill(86.5);
1613 } if (isFired_quick("ohem", true)) {
1614 h_psn_raw_rate[skim[ifill]]->Fill(87.5);
1615 } if (isFired_quick("hiev", true)) {
1616 h_psn_raw_rate[skim[ifill]]->Fill(88.5);
1617 } if (isFired_quick("fffv", true)) {
1618 h_psn_raw_rate[skim[ifill]]->Fill(89.5);
1619 } if (isFired_quick("bg", true)) {
1620 h_psn_raw_rate[skim[ifill]]->Fill(90.5);
1621 } if (isFired_quick("poissonv", true)) {
1622 h_psn_raw_rate[skim[ifill]]->Fill(91.5);
1623 } if (isFired_quick("revolution", true)) {
1624 h_psn_raw_rate[skim[ifill]]->Fill(92.5);
1625 } if (isFired_quick("random", true)) {
1626 h_psn_raw_rate[skim[ifill]]->Fill(93.5);
1627 } if (isFired_quick("c2", true)) {
1628 h_psn_raw_rate[skim[ifill]]->Fill(94.5);
1629 } if (isFired_quick("c3", true)) {
1630 h_psn_raw_rate[skim[ifill]]->Fill(95.5);
1631 } if (isFired_quick("eklmhit", true)) {
1632 h_psn_raw_rate[skim[ifill]]->Fill(96.5);
1633 } if (isFired_quick("f", true)) {
1634 h_psn_raw_rate[skim[ifill]]->Fill(97.5);
1635 } if (isFired_quick("s", true)) {
1636 h_psn_raw_rate[skim[ifill]]->Fill(98.5);
1637 } if (isFired_quick("y", true)) {
1638 h_psn_raw_rate[skim[ifill]]->Fill(99.5);
1639 } if (isFired_quick("cdcecl3", true)) {
1640 h_psn_raw_rate[skim[ifill]]->Fill(100.5);
1641 } if (isFired_quick("cdcecl4", true)) {
1642 h_psn_raw_rate[skim[ifill]]->Fill(101.5);
1643 } if (isFired_quick("ffz", true)) {
1644 h_psn_raw_rate[skim[ifill]]->Fill(102.5);
1645 } if (isFired_quick("fzb", true)) {
1646 h_psn_raw_rate[skim[ifill]]->Fill(103.5);
1647 } if (isFired_quick("fzo", true)) {
1648 h_psn_raw_rate[skim[ifill]]->Fill(104.5);
1649 } if (isFired_quick("fff", true)) {
1650 h_psn_raw_rate[skim[ifill]]->Fill(105.5);
1651 } if (isFired_quick("ffb", true)) {
1652 h_psn_raw_rate[skim[ifill]]->Fill(106.5);
1653 } if (isFired_quick("ffo", true)) {
1654 h_psn_raw_rate[skim[ifill]]->Fill(107.5);
1655 } if (isFired_quick("fffo", true)) {
1656 h_psn_raw_rate[skim[ifill]]->Fill(108.5);
1657 } if (isFired_quick("ffs", true)) {
1658 h_psn_raw_rate[skim[ifill]]->Fill(109.5);
1659 } if (isFired_quick("fss", true)) {
1660 h_psn_raw_rate[skim[ifill]]->Fill(110.5);
1661 } if (isFired_quick("sss", true)) {
1662 h_psn_raw_rate[skim[ifill]]->Fill(111.5);
1663 } if (isFired_quick("ff", true)) {
1664 h_psn_raw_rate[skim[ifill]]->Fill(112.5);
1665 } if (isFired_quick("ss", true)) {
1666 h_psn_raw_rate[skim[ifill]]->Fill(113.5);
1667 } if (isFired_quick("fso", true)) {
1668 h_psn_raw_rate[skim[ifill]]->Fill(114.5);
1669 } if (isFired_quick("sso", true)) {
1670 h_psn_raw_rate[skim[ifill]]->Fill(115.5);
1671 } if (isFired_quick("fsb", true)) {
1672 h_psn_raw_rate[skim[ifill]]->Fill(116.5);
1673 } if (isFired_quick("ff30", true)) {
1674 h_psn_raw_rate[skim[ifill]]->Fill(117.5);
1675 } if (isFired_quick("fioiecl1", true)) {
1676 h_psn_raw_rate[skim[ifill]]->Fill(118.5);
1677 } if (isFired_quick("ioiecl1", true)) {
1678 h_psn_raw_rate[skim[ifill]]->Fill(119.5);
1679 } if (isFired_quick("cdcecl1", true)) {
1680 h_psn_raw_rate[skim[ifill]]->Fill(120.5);
1681 } if (isFired_quick("cdcecl2", true)) {
1682 h_psn_raw_rate[skim[ifill]]->Fill(121.5);
1683 } if (isFired_quick("c2gev1", true)) {
1684 h_psn_raw_rate[skim[ifill]]->Fill(122.5);
1685 } if (isFired_quick("c2gev2", true)) {
1686 h_psn_raw_rate[skim[ifill]]->Fill(123.5);
1687 } if (isFired_quick("c2hie", true)) {
1688 h_psn_raw_rate[skim[ifill]]->Fill(124.5);
1689 } if (isFired_quick("g_high", true)) {
1690 h_psn_raw_rate[skim[ifill]]->Fill(125.5);
1691 } if (isFired_quick("g_c1", true)) {
1692 h_psn_raw_rate[skim[ifill]]->Fill(126.5);
1693 } if (isFired_quick("gg", true)) {
1694 h_psn_raw_rate[skim[ifill]]->Fill(127.5);
1695 } if (isFired_quick("stt6", true)) {
1696 h_psn_raw_rate[skim[ifill]]->Fill(128.5);
1697 }
1698 }
1699}

◆ fillOutputPureExtra()

void fillOutputPureExtra ( void )
protected

Definition at line 2339 of file TRGGDLDQMModule.cc.

2340{
2341 //get offline CDC track information
2342 int n_fulltrack = 0;
2343 float max_dphi = 0;
2344 float phi_list[100];
2345 for (int itrack = 0; itrack < Tracks.getEntries(); itrack++) {
2346 const TrackFitResult* tfr = Tracks[itrack]->getTrackFitResult(Const::pion);
2347 if (tfr == nullptr) continue;
2348
2349 float z0 = tfr->getZ0();
2350 float d0 = tfr->getD0();
2351 float phi = tfr->getPhi();
2352 //float omega = tfr->getOmega();
2353 int flayer = tfr->getHitPatternCDC().getFirstLayer();
2354 int llayer = tfr->getHitPatternCDC().getLastLayer();
2355 float pt = tfr->getTransverseMomentum();
2356 if (z0 > -1 && z0 < 1 && d0 > -1 && d0 < 1 && flayer < 8 && llayer > 50
2357 && pt > 0.3) { //select track from IP, hit SL0 and SL8, pt>0.3GeV
2358 phi_list[n_fulltrack] = phi;
2359 n_fulltrack += 1;
2360 }
2361 }
2362 for (int i = 0; i < n_fulltrack; i++) {
2363 for (int j = 0; j < n_fulltrack; j++) {
2364 float dphi = phi_list[i] - phi_list[j];
2365 if (dphi < 0) dphi = -dphi;
2366 if (dphi > 3.14) dphi = 2 * 3.14 - dphi;
2367 if (dphi > max_dphi) max_dphi = dphi;
2368 }
2369 }
2370
2371 //get offline ECL cluster information
2372 //double total_energy = 0;
2373 //for (int iclst = 0; iclst < ECLClusters.getEntries(); iclst++) {
2374 // total_energy += ECLClusters[iclst]->getEnergyRaw();
2375 //}
2376 //
2377 //
2378 int ecl_timing_threshold_low = -200; // (ns) xtal timing selection
2379 int ecl_timing_threshold_high = 200; // (ns) xtal timing selection
2380 double ecl_xtcid_energy_sum[576] = {0};
2381 double total_energy = 0;
2382 int ncluster = 0;
2383 for (const auto& eclcalhit : m_ECLCalDigitData) {
2384
2385 // (ecl) calibation status check and cut
2386 if (!eclcalhit.isCalibrated()) {continue;}
2387 if (eclcalhit.isFailedFit()) {continue;}
2388 if (eclcalhit.isTimeResolutionFailed()) {continue;}
2389
2390 // (ecl) xtal-id
2391 int ecl_cid = (double) eclcalhit.getCellId();
2392
2393 // (ecl) fitter quality check and cut
2394 int ecl_quality = -1;
2395 for (const auto& eclhit : m_ECLDigitData) {
2396 if (ecl_cid == eclhit.getCellId()) {
2397 ecl_quality = (int) eclhit.getQuality();
2398 }
2399 }
2400 if (ecl_quality != 0) {continue;}
2401
2402 // (ecl) xtal energy
2403 double ecl_xtal_energy = eclcalhit.getEnergy(); // ECLCalDigit
2404
2405
2406 // (ecl) timing cut
2407 int ecl_timing = eclcalhit.getTime();
2408 if (ecl_timing < ecl_timing_threshold_low ||
2409 ecl_timing > ecl_timing_threshold_high) {continue;}
2410
2411 // (ecl) tc-id for xtal-id
2412 int ecl_tcid = trgeclmap->getTCIdFromXtalId(ecl_cid);
2413 int ecl_thetaid = trgeclmap->getTCThetaIdFromTCId(ecl_tcid);
2414
2415 if (ecl_tcid >= 0 && ecl_tcid < 576 && ecl_thetaid >= 2 && ecl_thetaid <= 15) { //pick up only 2=<thetaid=<15
2416 ecl_xtcid_energy_sum[ecl_tcid] = ecl_xtcid_energy_sum[ecl_tcid] + ecl_xtal_energy;
2417 //ecltimingsum[i] = ecl_timing;
2418 }
2419 }
2420
2421 for (int i = 0; i < 576; i++) {
2422 if (ecl_xtcid_energy_sum[i] > 0.1) {
2423 total_energy += ecl_xtcid_energy_sum[i];
2424 ncluster += 1;
2425 }
2426 }
2427
2428 //get offline KLM cluster information
2429
2430
2431 //fff: require the number of CDC full tracks is more than or equal to 3
2432 if (n_fulltrack > 2) {
2433 bool fff_fired = isFired_quick("fff");
2434 bool ffy_fired = isFired_quick("ffy");
2435 bool c4_fired = isFired_quick("c4");
2436 bool hie_fired = isFired_quick("hie");
2437 if (c4_fired || hie_fired) {
2438 h_psn_pure_extra[0]->Fill(0.5);
2439 }
2440 if (fff_fired && (c4_fired || hie_fired)) {
2441 h_psn_pure_extra[0]->Fill(1.5);
2442 }
2443 if (ffy_fired && (c4_fired || hie_fired)) {
2444 h_psn_pure_extra[0]->Fill(2.5);
2445 }
2446 }
2447 //ffo: require the number of CDC full tracks is more than or equal to 2, opening angle > 90deg
2448 if (n_fulltrack > 1 && max_dphi > 3.14 / 2.) {
2449 bool ffo_fired = isFired_quick("ffo");
2450 bool fyo_fired = isFired_quick("fyo");
2451 bool c4_fired = isFired_quick("c4");
2452 bool hie_fired = isFired_quick("hie");
2453 if (c4_fired || hie_fired) {
2454 h_psn_pure_extra[0]->Fill(3.5);
2455 }
2456 if (ffo_fired && (c4_fired || hie_fired)) {
2457 h_psn_pure_extra[0]->Fill(4.5);
2458 }
2459 if (fyo_fired && (c4_fired || hie_fired)) {
2460 h_psn_pure_extra[0]->Fill(5.5);
2461 }
2462 }
2463 //ffo: require the number of CDC full tracks is more than or equal to 2, opening angle >150deg
2464 if (n_fulltrack > 1 && max_dphi > 3.14 * 5 / 6.) {
2465 bool ffb_fired = isFired_quick("ffb");
2466 bool fyb_fired = isFired_quick("fyb");
2467 bool c4_fired = isFired_quick("c4");
2468 bool hie_fired = isFired_quick("hie");
2469 if (c4_fired || hie_fired) {
2470 h_psn_pure_extra[0]->Fill(6.5);
2471 }
2472 if (ffb_fired && (c4_fired || hie_fired)) {
2473 h_psn_pure_extra[0]->Fill(7.5);
2474 }
2475 if (fyb_fired && (c4_fired || hie_fired)) {
2476 h_psn_pure_extra[0]->Fill(8.5);
2477 }
2478 }
2479
2480 //hie: require the total energy of ECL cluster is more than 1GeV
2481 if (total_energy > 1) {
2482 bool fff_fired = isFired_quick("fff");
2483 bool ffo_fired = isFired_quick("ffo");
2484 bool ffb_fired = isFired_quick("ffb");
2485 bool hie_fired = isFired_quick("hie");
2486 if (fff_fired || ffo_fired || ffb_fired) {
2487 h_psn_pure_extra[0]->Fill(9.5);
2488 }
2489 if (hie_fired && (fff_fired || ffo_fired || ffb_fired)) {
2490 h_psn_pure_extra[0]->Fill(10.5);
2491 }
2492 }
2493
2494 //c4: require the total number of cluster is more than 3
2495 if (ncluster > 3) {
2496 bool fff_fired = isFired_quick("fff");
2497 bool ffo_fired = isFired_quick("ffo");
2498 bool ffb_fired = isFired_quick("ffb");
2499 bool c4_fired = isFired_quick("c4");
2500 if (fff_fired || ffo_fired || ffb_fired) {
2501 h_psn_pure_extra[0]->Fill(11.5);
2502 }
2503 if (c4_fired && (fff_fired || ffo_fired || ffb_fired)) {
2504 h_psn_pure_extra[0]->Fill(12.5);
2505 }
2506 }
2507
2508}
static const ChargedStable pion
charged pion particle
Definition Const.h:662
short getLastLayer() const
Returns the index of the last layer with a hit.
short getFirstLayer() const
Returns the index of the first layer with a hit.
StoreArray< Track > Tracks
Input store array of track.
TrgEclMapping * trgeclmap
ecltrg<->ecl mappint
double getPhi() const
Getter for phi0 with CDF naming convention.
double getD0() const
Getter for d0.
double getTransverseMomentum() const
Getter for the absolute value of the transverse momentum at the perigee.
double getZ0() const
Getter for z0.
HitPatternCDC getHitPatternCDC() const
Getter for the hit pattern in the CDC;.

◆ fillRiseFallTimings()

void fillRiseFallTimings ( void )
protected

Definition at line 1024 of file TRGGDLDQMModule.cc.

1025{
1026
1027
1028 for (unsigned ifill = 0; ifill < skim.size(); ifill++) {
1029 //reduce #plot
1030 if (skim[ifill] != 0)continue;
1031
1032 for (unsigned i = 0; i < n_inbit; i++) {
1033 bool rising_done = false;
1034 bool falling_done = false;
1035 for (unsigned clk = 0; clk < n_clocks; clk++) {
1036 if (h_i_vec[clk * n_inbit + i] > 0) {
1037 if (! rising_done) {
1038 h_itd_rise[i][skim[ifill]]->Fill(clk + 0.5);
1039 rising_done = true;
1040 // cppcheck-suppress knownConditionTrueFalse
1041 } else if (rising_done && !falling_done && clk == n_clocks - 1) {
1042 h_itd_fall[i][skim[ifill]]->Fill(clk + 0.5);
1043 }
1044 } else if (h_i_vec[clk * n_inbit + i] == 0) {
1045 if (rising_done && ! falling_done) {
1046 h_itd_fall[i][skim[ifill]]->Fill(clk + 0.5);
1047 falling_done = true;
1048 }
1049 }
1050 }
1051 }
1052 for (unsigned i = 0; i < n_outbit; i++) {
1053 bool rising_done = false;
1054 bool falling_done = false;
1055 for (unsigned clk = 0; clk < n_clocks; clk++) {
1056 if (h_f_vec[clk * n_outbit + i] > 0) {
1057 if (! rising_done) {
1058 h_ftd_rise[i][skim[ifill]]->Fill(clk + 0.5);
1059 rising_done = true;
1060 // cppcheck-suppress knownConditionTrueFalse
1061 } else if (rising_done && !falling_done && clk == n_clocks - 1) {
1062 h_ftd_fall[i][skim[ifill]]->Fill(clk + 0.5);
1063 }
1064 } else if (h_f_vec[clk * n_outbit + i] == 0) {
1065 if (rising_done && ! falling_done) {
1066 h_ftd_fall[i][skim[ifill]]->Fill(clk + 0.5);
1067 falling_done = true;
1068 }
1069 }
1070 }
1071 rising_done = false;
1072 falling_done = false;
1073 for (unsigned clk = 0; clk < n_clocks; clk++) {
1074 if (h_p_vec[clk * n_outbit + i] > 0) {
1075 if (! rising_done) {
1076 h_psn_rise[i][skim[ifill]]->Fill(clk + 0.5);
1077 rising_done = true;
1078 // cppcheck-suppress knownConditionTrueFalse
1079 } else if (rising_done && !falling_done && clk == n_clocks - 1) {
1080 h_psn_fall[i][skim[ifill]]->Fill(clk + 0.5);
1081 }
1082 } else if (h_p_vec[clk * n_outbit + i] == 0) {
1083 if (rising_done && ! falling_done) {
1084 h_psn_fall[i][skim[ifill]]->Fill(clk + 0.5);
1085 falling_done = true;
1086 }
1087 }
1088 }
1089 }
1090 }
1091}

◆ genVcd()

void genVcd ( void )
protected

Definition at line 873 of file TRGGDLDQMModule.cc.

874{
875 int prev_i[400] = {0};
876 int prev_f[400] = {0};
877 int prev_p[400] = {0};
878 //int prev_g[400]={0}; // Future Plan
879 ofstream outf(Form("vcd/e%02dr%08de%08d.vcd", _exp, _run, evtno));
880 outf << "$date" << endl;
881 outf << " Aug 20, 2018 17:53:52" << endl;
882 outf << "$end" << endl;
883 outf << "$version" << endl;
884 outf << " ChipScope Pro Analyzer 14.7 P.20131013 (Build 14700.13.286.464)" << endl;
885 outf << "$end" << endl;
886 outf << "$timescale" << endl;
887 if (n_clocks == 32) {
888 outf << " 32ns" << endl;
889 } else if (n_clocks == 48) {
890 outf << " 8ns" << endl;
891 } else {
892 outf << " 1ns" << endl;
893 }
894 outf << "$end" << endl;
895 outf << "" << endl;
896 outf << "$scope module gdl0067d_icn $end" << endl;
897 int seqnum = 0;
898 for (unsigned j = 0; j < n_inbit; j++) {
899 outf << "$var wire 1 n" << seqnum++ << " " << inbitname[j] << " $end" << endl;
900 }
901 for (unsigned j = 0; j < n_outbit; j++) {
902 outf << "$var wire 1 n" << seqnum++ << " ftd." << outbitname[j] << " $end" << endl;
903 }
904 for (unsigned j = 0; j < n_outbit; j++) {
905 outf << "$var wire 1 n" << seqnum++ << " psn." << outbitname[j] << " $end" << endl;
906 }
907
908 outf << "$upscope $end" << endl;
909 outf << "$enddefinitions $end" << endl << endl;
910
911 for (unsigned clk = 1; clk <= n_clocks; clk++) {
912 seqnum = 0;
913 outf << "#" << clk - 1 << endl;
914 for (unsigned k = 1; k <= n_inbit; k++) {
915 if (clk == 1 || prev_i[k - 1] != h_i_vec[(clk - 1)*n_inbit + k - 1]) {
916 prev_i[k - 1] = h_i_vec[(clk - 1) * n_inbit + k - 1];
917 outf << h_i_vec[(clk - 1)*n_inbit + k - 1] << "n" << seqnum << endl;
918 }
919 seqnum++;
920 }
921 for (unsigned k = 1; k <= n_outbit; k++) {
922 if (clk == 1 || prev_f[k - 1] != h_f_vec[(clk - 1)*n_outbit + k - 1]) {
923 prev_f[k - 1] = h_f_vec[(clk - 1) * n_outbit + k - 1];
924 outf << h_f_vec[(clk - 1)*n_outbit + k - 1] << "n" << seqnum << endl;
925 }
926 seqnum++;
927 }
928 for (unsigned k = 1; k <= n_outbit; k++) {
929 if (clk == 1 || prev_p[k - 1] != h_p_vec[(clk - 1)*n_outbit + k - 1]) {
930 prev_p[k - 1] = h_p_vec[(clk - 1) * n_outbit + k - 1];
931 outf << h_p_vec[(clk - 1)*n_outbit + k - 1] << "n" << seqnum << endl;
932 }
933 seqnum++;
934 }
935 /* Future Plan
936 for(unsigned k=1; k<=n_gdlbits; k++){
937 if(clk == 1 || prev_g[k-1] != hg->GetBinContent(clk, k)){
938 prev_g[k-1] = hg->GetBinContent(clk, k);
939 if(EBitWidth[k-1] != 1){
940 char ans[33];
941 if(k-1 == e_rvc){
942 dec2binstring(hg->GetBinContent(clk, k), ans, true);
943 }else{
944 dec2binstring(hg->GetBinContent(clk, k), ans);
945 }
946 outf << "b" << ans << " n" << seqnum << endl;
947 }else{
948 outf << hg->GetBinContent(clk, k) << "n" << seqnum << endl;
949 }
950 }
951 seqnum++;
952 }
953 */
954 }
955 outf.close();
956}

◆ getAfterConditionPath()

Module::EAfterConditionPath getAfterConditionPath ( ) const
inherited

What to do after the conditional path is finished.

(defaults to c_End if no condition is set)

Definition at line 133 of file Module.cc.

134{
135 if (m_conditions.empty()) return EAfterConditionPath::c_End;
136
137 //okay, a condition was set for this Module...
138 if (!m_hasReturnValue) {
139 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
140 }
141
142 for (const auto& condition : m_conditions) {
143 if (condition.evaluate(m_returnValue)) {
144 return condition.getAfterConditionPath();
145 }
146 }
147
148 return EAfterConditionPath::c_End;
149}

◆ getAllConditionPaths()

std::vector< std::shared_ptr< Path > > getAllConditionPaths ( ) const
inherited

Return all condition paths currently set (no matter if the condition is true or not).

Definition at line 150 of file Module.cc.

151{
152 std::vector<std::shared_ptr<Path>> allConditionPaths;
153 for (const auto& condition : m_conditions) {
154 allConditionPaths.push_back(condition.getPath());
155 }
156
157 return allConditionPaths;
158}

◆ getAllConditions()

const std::vector< ModuleCondition > & getAllConditions ( ) const
inlineinherited

Return all set conditions for this module.

Definition at line 323 of file Module.h.

324 {
325 return m_conditions;
326 }

◆ getCondition()

const ModuleCondition * getCondition ( ) const
inlineinherited

Return a pointer to the first condition (or nullptr, if none was set)

Definition at line 313 of file Module.h.

314 {
315 if (m_conditions.empty()) {
316 return nullptr;
317 } else {
318 return &m_conditions.front();
319 }
320 }

◆ getConditionPath()

std::shared_ptr< Path > getConditionPath ( ) const
inherited

Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).

Definition at line 113 of file Module.cc.

114{
115 PathPtr p;
116 if (m_conditions.empty()) return p;
117
118 //okay, a condition was set for this Module...
119 if (!m_hasReturnValue) {
120 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
121 }
122
123 for (const auto& condition : m_conditions) {
124 if (condition.evaluate(m_returnValue)) {
125 return condition.getPath();
126 }
127 }
128
129 // if none of the conditions were true, return a null pointer.
130 return p;
131}
std::shared_ptr< Path > PathPtr
Defines a pointer to a path object as a boost shared pointer.
Definition Path.h:35

◆ getDescription()

const std::string & getDescription ( ) const
inlineinherited

Returns the description of the module.

Definition at line 201 of file Module.h.

201{return m_description;}

◆ getFileNames()

virtual std::vector< std::string > getFileNames ( bool outputFiles)
inlinevirtualinherited

Return a list of output filenames for this modules.

This will be called when basf2 is run with "--dry-run" if the module has set either the c_Input or c_Output properties.

If the parameter outputFiles is false (for modules with c_Input) the list of input filenames should be returned (if any). If outputFiles is true (for modules with c_Output) the list of output files should be returned (if any).

If a module has sat both properties this member is called twice, once for each property.

The module should return the actual list of requested input or produced output filenames (including handling of input/output overrides) so that the grid system can handle input/output files correctly.

This function should return the same value when called multiple times. This is especially important when taking the input/output overrides from Environment as they get consumed when obtained so the finalized list of output files should be stored for subsequent calls.

Reimplemented in RootInputModule, RootOutputModule, and StorageRootOutputModule.

Definition at line 133 of file Module.h.

134 {
135 return std::vector<std::string>();
136 }

◆ getinbitnum()

int getinbitnum ( const char * c) const
protected

Definition at line 973 of file TRGGDLDQMModule.cc.

974{
975 for (int i = 0; i < 320; i++) {
976 if (strcmp(c, inbitname[i]) == 0)return i;
977 }
978 return -1;
979}

◆ getLogConfig()

LogConfig & getLogConfig ( )
inlineinherited

Returns the log system configuration.

Definition at line 224 of file Module.h.

224{return m_logConfig;}

◆ getModules()

std::list< ModulePtr > getModules ( ) const
inlineoverrideprivatevirtualinherited

no submodules, return empty list

Implements PathElement.

Definition at line 505 of file Module.h.

505{ return std::list<ModulePtr>(); }

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns the name of the module.

This can be changed via e.g. set_name() in the steering file to give more useful names if there is more than one module of the same type.

For identifying the type of a module, using getType() (or type() in Python) is recommended.

Definition at line 186 of file Module.h.

186{return m_name;}

◆ getoutbitnum()

int getoutbitnum ( const char * c) const
protected

Definition at line 982 of file TRGGDLDQMModule.cc.

983{
984 for (int i = 0; i < 320; i++) {
985 if (strcmp(c, outbitname[i]) == 0)return i;
986 }
987 return -1;
988}

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 196 of file Module.h.

196{return m_package;}

◆ getParamInfoListPython()

std::shared_ptr< boost::python::list > getParamInfoListPython ( ) const
inherited

Returns a python list of all parameters.

Each item in the list consists of the name of the parameter, a string describing its type, a python list of all default values and the description of the parameter.

Returns
A python list containing the parameters of this parameter list.

Definition at line 279 of file Module.cc.

280{
282}
std::shared_ptr< boost::python::list > getParamInfoListPython() const
Returns a python list of all parameters.

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 362 of file Module.h.

362{ return m_moduleParamList; }

◆ getPathString()

std::string getPathString ( ) const
overrideprivatevirtualinherited

return the module name.

Implements PathElement.

Definition at line 192 of file Module.cc.

193{
194
195 std::string output = getName();
196
197 for (const auto& condition : m_conditions) {
198 output += condition.getString();
199 }
200
201 return output;
202}

◆ getReturnValue()

int getReturnValue ( ) const
inlineinherited

Return the return value set by this module.

This value is only meaningful if hasReturnValue() is true

Definition at line 380 of file Module.h.

380{ return m_returnValue; }

◆ getType()

const std::string & getType ( ) const
inherited

Returns the type of the module (i.e.

class name minus 'Module')

Definition at line 41 of file Module.cc.

42{
43 if (m_type.empty())
44 B2FATAL("Module type not set for " << getName());
45 return m_type;
46}
std::string m_type
The type of the module, saved as a string.
Definition Module.h:508

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

Returns true if at least one condition was set for the module.

Definition at line 310 of file Module.h.

310{ return not m_conditions.empty(); };

◆ hasProperties()

bool hasProperties ( unsigned int propertyFlags) const
inherited

Returns true if all specified property flags are available in this module.

Parameters
propertyFlagsOred EModulePropFlags which should be compared with the module flags.

Definition at line 160 of file Module.cc.

161{
162 return (propertyFlags & m_propertyFlags) == propertyFlags;
163}

◆ hasReturnValue()

bool hasReturnValue ( ) const
inlineinherited

Return true if this module has a valid return value set.

Definition at line 377 of file Module.h.

377{ return m_hasReturnValue; }

◆ hasUnsetForcedParams()

bool hasUnsetForcedParams ( ) const
inherited

Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.

Definition at line 166 of file Module.cc.

167{
169 std::string allMissing = "";
170 for (const auto& s : missing)
171 allMissing += s + " ";
172 if (!missing.empty())
173 B2ERROR("The following required parameters of Module '" << getName() << "' were not specified: " << allMissing <<
174 "\nPlease add them to your steering file.");
175 return !missing.empty();
176}
std::vector< std::string > getUnsetForcedParams() const
Returns list of unset parameters (if they are required to have a value.

◆ if_false()

void if_false ( const std::shared_ptr< Path > & path,
EAfterConditionPath afterConditionPath = EAfterConditionPath::c_End )
inherited

A simplified version to add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression "<1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is false.
afterConditionPathWhat to do after executing 'path'.

Definition at line 85 of file Module.cc.

86{
87 if_value("<1", path, afterConditionPath);
88}

◆ if_true()

void if_true ( const std::shared_ptr< Path > & path,
EAfterConditionPath afterConditionPath = EAfterConditionPath::c_End )
inherited

A simplified version to set the condition of the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression ">=1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 90 of file Module.cc.

91{
92 if_value(">=1", path, afterConditionPath);
93}

◆ if_value()

void if_value ( const std::string & expression,
const std::shared_ptr< Path > & path,
EAfterConditionPath afterConditionPath = EAfterConditionPath::c_End )
inherited

Add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

See https://xwiki.desy.de/xwiki/rest/p/a94f2 or ModuleCondition for a description of the syntax.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

Parameters
expressionThe expression of the condition.
pathShared pointer to the Path which will be executed if the condition is evaluated to true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 79 of file Module.cc.

80{
81 m_conditions.emplace_back(expression, path, afterConditionPath);
82}

◆ initialize()

void initialize ( void )
overridevirtual

initialize

Reimplemented from Module.

Definition at line 312 of file TRGGDLDQMModule.cc.

313{
314
315 if (m_skim == 0) { //no skim
316 start_skim_gdldqm = 0;
317 end_skim_gdldqm = 1;
318 } else if (m_skim == 1) { //skim
319 start_skim_gdldqm = 1;
320 end_skim_gdldqm = nskim_gdldqm;
321 } else { //no skim + skim
322 start_skim_gdldqm = 0;
323 end_skim_gdldqm = nskim_gdldqm;
324 }
325
326 _exp = bevt->getExperiment();
327 _run = bevt->getRun();
328
329 trgeclmap = new TrgEclMapping();
330
331 // calls back the defineHisto() function, but the HistoManager module has to be in the path
332 REG_HISTOGRAM
333
334 for (int i = 0; i < 320; i++) {
335 LeafBitMap[i] = m_unpacker->getLeafMap(i);
336 }
337 for (int i = 0; i < 320; i++) {
338 strcpy(LeafNames[i], m_unpacker->getLeafnames(i));
339 }
340 _e_timtype = 0;
341 _e_gdll1rvc = 0;
342 _e_coml1rvc = 0;
343 _e_toptiming = 0;
344 _e_ecltiming = 0;
345 _e_cdctiming = 0;
346 _e_toprvc = 0;
347 _e_eclrvc = 0;
348 _e_cdcrvc = 0;
349 for (int i = 0; i < 10; i++) {
350 ee_psn[i] = {0};
351 ee_ftd[i] = {0};
352 ee_itd[i] = {0};
353 }
354 for (int i = 0; i < 320; i++) {
355 if (strcmp(LeafNames[i], "timtype") == 0) _e_timtype = LeafBitMap[i];
356 if (strcmp(LeafNames[i], "gdll1rvc") == 0) _e_gdll1rvc = LeafBitMap[i];
357 if (strcmp(LeafNames[i], "coml1rvc") == 0) _e_coml1rvc = LeafBitMap[i];
358 if (strcmp(LeafNames[i], "toptiming") == 0)_e_toptiming = LeafBitMap[i];
359 if (strcmp(LeafNames[i], "ecltiming") == 0)_e_ecltiming = LeafBitMap[i];
360 if (strcmp(LeafNames[i], "cdctiming") == 0)_e_cdctiming = LeafBitMap[i];
361 if (strcmp(LeafNames[i], "toprvc") == 0) _e_toprvc = LeafBitMap[i];
362 if (strcmp(LeafNames[i], "eclrvc") == 0) _e_eclrvc = LeafBitMap[i];
363 if (strcmp(LeafNames[i], "cdcrvc") == 0) _e_cdcrvc = LeafBitMap[i];
364 if (strcmp(LeafNames[i], "psn0") == 0) ee_psn[0] = LeafBitMap[i];
365 if (strcmp(LeafNames[i], "psn1") == 0) ee_psn[1] = LeafBitMap[i];
366 if (strcmp(LeafNames[i], "psn2") == 0) ee_psn[2] = LeafBitMap[i];
367 if (strcmp(LeafNames[i], "psn3") == 0) ee_psn[3] = LeafBitMap[i];
368 if (strcmp(LeafNames[i], "psn4") == 0) ee_psn[4] = LeafBitMap[i];
369 if (strcmp(LeafNames[i], "psn5") == 0) ee_psn[5] = LeafBitMap[i];
370 if (strcmp(LeafNames[i], "psn6") == 0) ee_psn[6] = LeafBitMap[i];
371 if (strcmp(LeafNames[i], "psn7") == 0) ee_psn[7] = LeafBitMap[i];
372 if (strcmp(LeafNames[i], "psn8") == 0) ee_psn[8] = LeafBitMap[i];
373 if (strcmp(LeafNames[i], "psn9") == 0) ee_psn[9] = LeafBitMap[i];
374 if (strcmp(LeafNames[i], "ftd0") == 0) ee_ftd[0] = LeafBitMap[i];
375 if (strcmp(LeafNames[i], "ftd1") == 0) ee_ftd[1] = LeafBitMap[i];
376 if (strcmp(LeafNames[i], "ftd2") == 0) ee_ftd[2] = LeafBitMap[i];
377 if (strcmp(LeafNames[i], "ftd3") == 0) ee_ftd[3] = LeafBitMap[i];
378 if (strcmp(LeafNames[i], "ftd4") == 0) ee_ftd[4] = LeafBitMap[i];
379 if (strcmp(LeafNames[i], "ftd5") == 0) ee_ftd[5] = LeafBitMap[i];
380 if (strcmp(LeafNames[i], "ftd6") == 0) ee_ftd[6] = LeafBitMap[i];
381 if (strcmp(LeafNames[i], "ftd7") == 0) ee_ftd[7] = LeafBitMap[i];
382 if (strcmp(LeafNames[i], "ftd8") == 0) ee_ftd[8] = LeafBitMap[i];
383 if (strcmp(LeafNames[i], "ftd9") == 0) ee_ftd[9] = LeafBitMap[i];
384 if (strcmp(LeafNames[i], "itd0") == 0) ee_itd[0] = LeafBitMap[i];
385 if (strcmp(LeafNames[i], "itd1") == 0) ee_itd[1] = LeafBitMap[i];
386 if (strcmp(LeafNames[i], "itd2") == 0) ee_itd[2] = LeafBitMap[i];
387 if (strcmp(LeafNames[i], "itd3") == 0) ee_itd[3] = LeafBitMap[i];
388 if (strcmp(LeafNames[i], "itd4") == 0) ee_itd[4] = LeafBitMap[i];
389 if (strcmp(LeafNames[i], "itd5") == 0) ee_itd[5] = LeafBitMap[i];
390 if (strcmp(LeafNames[i], "itd6") == 0) ee_itd[6] = LeafBitMap[i];
391 if (strcmp(LeafNames[i], "itd7") == 0) ee_itd[7] = LeafBitMap[i];
392 if (strcmp(LeafNames[i], "itd8") == 0) ee_itd[8] = LeafBitMap[i];
393 if (strcmp(LeafNames[i], "itd9") == 0) ee_itd[9] = LeafBitMap[i];
394 }
395
396 n_inbit = m_dbinput->getninbit();
397 n_outbit = m_dbftdl ->getnoutbit();
398 for (int i = 0; i < 320; i++) {
399 strcpy(inbitname[i], m_dbinput->getinbitname(i));
400 }
401 for (int i = 0; i < 320; i++) {
402 strcpy(outbitname[i], m_dbftdl->getoutbitname(i));
403 }
404
405 // The bit names are constant for the whole run. All 320 entries are indexed and
406 // the first occurrence of a name wins.
407 for (int i = 0; i < 320; i++) {
408 m_inbitIndex.emplace(inbitname[i], i);
409 m_outbitIndex.emplace(outbitname[i], i);
410 }
411 n_leafs = m_unpacker->getnLeafs();
412 n_leafsExtra = m_unpacker->getnLeafsExtra();
413 n_clocks = m_unpacker->getnClks();
414 nconf = m_unpacker->getconf();
415 nword_input = m_unpacker->get_nword_input();
416 nword_output = m_unpacker->get_nword_output();
417
418 for (unsigned i = 0; i < n_clocks; i++) {
419 for (int j = 0; j < n_leafs + n_leafsExtra; j++)h_0_vec.push_back(0);
420 for (unsigned int j = 0; j < n_outbit; j++) h_p_vec.push_back(0);
421 for (unsigned int j = 0; j < n_outbit; j++) h_f_vec.push_back(0);
422 for (unsigned int j = 0; j < n_inbit; j++) h_i_vec.push_back(0);
423 }
424
425 for (int iskim = 0; iskim < nskim_gdldqm; iskim++) {
426 for (int i = 0; i < nsample_fast; i++) {
427 for (int ibin = 0; ibin < n_output_extra; ibin++) {
428 array_psn_extra_fast[iskim][i][ibin] = 0;
429 }
430 }
431 m_fastPos[iskim] = 0;
432 for (int ibin = 0; ibin < n_output_extra; ibin++) m_fastSum[iskim][ibin] = 0;
433 }
434
435}
DBObjPtr< TRGGDLDBFTDLBits > m_dbftdl
condition database for output bits
StoreObjPtr< EventMetaData > bevt
Input store array of metadata.
std::unordered_map< std::string, int > m_outbitIndex
bit name -> output bit number, built once in initialize()
std::unordered_map< std::string, int > m_inbitIndex
bit name -> input bit number, built once in initialize()
DBObjPtr< TRGGDLDBInputBits > m_dbinput
condition database for input bits
DBObjPtr< TRGGDLDBUnpacker > m_unpacker
condition database for unpacker

◆ isFired()

bool isFired ( std::string bitname)
protected

Definition at line 992 of file TRGGDLDQMModule.cc.

993{
994 bool isPsnm = false;
995 for (unsigned i = 0; i < bitname.length(); i++) {
996 if ('A' <= bitname[i] && bitname[i] <= 'Z') {
997 isPsnm = true;
998 }
999 }
1000 boost::algorithm::to_lower(bitname);
1001 int bn = m_dbftdl->getoutbitnum(bitname.c_str());
1002 for (unsigned clk = 0; clk < n_clocks; clk++) {
1003 if (bn > -1) {
1004 if (isPsnm) {
1005 if (h_p_vec[clk * n_outbit + bn] > 0)
1006 return true;
1007 } else {
1008 if (h_f_vec[clk * n_outbit + bn] > 0)
1009 return true;
1010 }
1011 }
1012 }
1013 bn = m_dbinput->getinbitnum(bitname.c_str());
1014 for (unsigned clk = 0; clk < n_clocks; clk++) {
1015 if (bn > -1) {
1016 if (h_i_vec[clk * n_inbit + bn] > 0)
1017 return true;
1018 }
1019 }
1020 return false;
1021}

◆ isFired_quick()

bool isFired_quick ( const std::string & bitname,
const bool & isPsnm = 0 )
protected

Definition at line 959 of file TRGGDLDQMModule.cc.

960{
961 const auto itOut = m_outbitIndex.find(bitname);
962 if (itOut != m_outbitIndex.end() && itOut->second < (int)n_outbit) {
963 if (isPsnm ? m_firedPsnm[itOut->second] : m_firedFtdl[itOut->second]) return true;
964 }
965 const auto itIn = m_inbitIndex.find(bitname);
966 if (itIn != m_inbitIndex.end() && itIn->second < (int)n_inbit) {
967 if (m_firedInput[itIn->second]) return true;
968 }
969 return false;
970}

◆ setAbortLevel()

void setAbortLevel ( int abortLevel)
inherited

Configure the abort log level.

Definition at line 67 of file Module.cc.

68{
69 m_logConfig.setAbortLevel(static_cast<LogConfig::ELogLevel>(abortLevel));
70}
ELogLevel
Definition of the supported log levels.
Definition LogConfig.h:26
void setAbortLevel(ELogLevel abortLevel)
Configure the abort level.
Definition LogConfig.h:112

◆ setDebugLevel()

void setDebugLevel ( int debugLevel)
inherited

Configure the debug messaging level.

Definition at line 61 of file Module.cc.

62{
63 m_logConfig.setDebugLevel(debugLevel);
64}
void setDebugLevel(int debugLevel)
Configure the debug messaging level.
Definition LogConfig.h:98

◆ setDescription()

void setDescription ( const std::string & description)
protectedinherited

Sets the description of the module.

Parameters
descriptionA description of the module.

Definition at line 214 of file Module.cc.

215{
216 m_description = description;
217}
std::string m_description
The description of the module.
Definition Module.h:510

◆ setLogConfig()

void setLogConfig ( const LogConfig & logConfig)
inlineinherited

Set the log system configuration.

Definition at line 229 of file Module.h.

229{m_logConfig = logConfig;}

◆ setLogInfo()

void setLogInfo ( int logLevel,
unsigned int logInfo )
inherited

Configure the printed log information for the given level.

Parameters
logLevelThe log level (one of LogConfig::ELogLevel)
logInfoWhat kind of info should be printed? ORed combination of LogConfig::ELogInfo flags.

Definition at line 73 of file Module.cc.

74{
75 m_logConfig.setLogInfo(static_cast<LogConfig::ELogLevel>(logLevel), logInfo);
76}
void setLogInfo(ELogLevel logLevel, unsigned int logInfo)
Configure the printed log information for the given level.
Definition LogConfig.h:127

◆ setLogLevel()

void setLogLevel ( int logLevel)
inherited

Configure the log level.

Definition at line 55 of file Module.cc.

56{
57 m_logConfig.setLogLevel(static_cast<LogConfig::ELogLevel>(logLevel));
58}
void setLogLevel(ELogLevel logLevel)
Configure the log level.
Definition LogConfig.cc:25

◆ setName()

void setName ( const std::string & name)
inlineinherited

Set the name of the module.

Note
The module name is set when using the REG_MODULE macro, but the module can be renamed before calling process() using the set_name() function in your steering file.
Parameters
nameThe name of the module

Definition at line 213 of file Module.h.

213{ m_name = name; };

◆ setParamList()

void setParamList ( const ModuleParamList & params)
inlineprotectedinherited

Replace existing parameter list.

Definition at line 500 of file Module.h.

500{ m_moduleParamList = params; }

◆ setParamPython()

void setParamPython ( const std::string & name,
const boost::python::object & pyObj )
privateinherited

Implements a method for setting boost::python objects.

The method supports the following types: list, dict, int, double, string, bool The conversion of the python object to the C++ type and the final storage of the parameter value is done in the ModuleParam class.

Parameters
nameThe unique name of the parameter.
pyObjThe object which should be converted and stored as the parameter value.

Definition at line 234 of file Module.cc.

235{
236 LogSystem& logSystem = LogSystem::Instance();
237 logSystem.updateModule(&(getLogConfig()), getName());
238 try {
240 } catch (std::runtime_error& e) {
241 throw std::runtime_error("Cannot set parameter '" + name + "' for module '"
242 + m_name + "': " + e.what());
243 }
244
245 logSystem.updateModule(nullptr);
246}
void updateModule(const LogConfig *moduleLogConfig=nullptr, const std::string &moduleName="")
Sets the log configuration to the given module log configuration and sets the module name This method...
Definition LogSystem.h:200
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition LogSystem.cc:28
LogConfig & getLogConfig()
Returns the log system configuration.
Definition Module.h:224
std::string m_name
The name of the module, saved as a string (user-modifiable)
Definition Module.h:507
void setParamPython(const std::string &name, const PythonObject &pyObj)
Implements a method for setting boost::python objects.

◆ setParamPythonDict()

void setParamPythonDict ( const boost::python::dict & dictionary)
privateinherited

Implements a method for reading the parameter values from a boost::python dictionary.

The key of the dictionary has to be the name of the parameter and the value has to be of one of the supported parameter types.

Parameters
dictionaryThe python dictionary from which the parameter values are read.

Definition at line 249 of file Module.cc.

250{
251
252 LogSystem& logSystem = LogSystem::Instance();
253 logSystem.updateModule(&(getLogConfig()), getName());
254
255 boost::python::list dictKeys = dictionary.keys();
256 int nKey = boost::python::len(dictKeys);
257
258 //Loop over all keys in the dictionary
259 for (int iKey = 0; iKey < nKey; ++iKey) {
260 boost::python::object currKey = dictKeys[iKey];
261 boost::python::extract<std::string> keyProxy(currKey);
262
263 if (keyProxy.check()) {
264 const boost::python::object& currValue = dictionary[currKey];
265 setParamPython(keyProxy, currValue);
266 } else {
267 B2ERROR("Setting the module parameters from a python dictionary: invalid key in dictionary!");
268 }
269 }
270
271 logSystem.updateModule(nullptr);
272}
void setParamPython(const std::string &name, const boost::python::object &pyObj)
Implements a method for setting boost::python objects.
Definition Module.cc:234

◆ setPropertyFlags()

void setPropertyFlags ( unsigned int propertyFlags)
inherited

Sets the flags for the module properties.

Parameters
propertyFlagsbitwise OR of EModulePropFlags

Definition at line 208 of file Module.cc.

209{
210 m_propertyFlags = propertyFlags;
211}

◆ setReturnValue() [1/2]

void setReturnValue ( bool value)
protectedinherited

Sets the return value for this module as bool.

The bool value is saved as an integer with the convention 1 meaning true and 0 meaning false. The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 227 of file Module.cc.

228{
229 m_hasReturnValue = true;
230 m_returnValue = value;
231}

◆ setReturnValue() [2/2]

void setReturnValue ( int value)
protectedinherited

Sets the return value for this module as integer.

The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 220 of file Module.cc.

221{
222 m_hasReturnValue = true;
223 m_returnValue = value;
224}

◆ setType()

void setType ( const std::string & type)
protectedinherited

Set the module type.

Only for use by internal modules (which don't use the normal REG_MODULE mechanism).

Definition at line 48 of file Module.cc.

49{
50 if (!m_type.empty())
51 B2FATAL("Trying to change module type from " << m_type << " is not allowed, the value is assumed to be fixed.");
52 m_type = type;
53}

◆ terminate()

virtual void terminate ( void )
inlineoverridevirtual

terminate

Reimplemented from Module.

Definition at line 61 of file TRGGDLDQMModule.h.

61{}

Member Data Documentation

◆ _e_cdcrvc

int _e_cdcrvc = 0
protected

Definition at line 200 of file TRGGDLDQMModule.h.

◆ _e_cdctiming

int _e_cdctiming = 0
protected

Definition at line 197 of file TRGGDLDQMModule.h.

◆ _e_coml1rvc

int _e_coml1rvc = 0
protected

Definition at line 194 of file TRGGDLDQMModule.h.

◆ _e_eclrvc

int _e_eclrvc = 0
protected

Definition at line 199 of file TRGGDLDQMModule.h.

◆ _e_ecltiming

int _e_ecltiming = 0
protected

Definition at line 196 of file TRGGDLDQMModule.h.

◆ _e_gdll1rvc

int _e_gdll1rvc = 0
protected

Definition at line 193 of file TRGGDLDQMModule.h.

◆ _e_timtype

int _e_timtype = 0
protected

Definition at line 192 of file TRGGDLDQMModule.h.

◆ _e_toprvc

int _e_toprvc = 0
protected

Definition at line 198 of file TRGGDLDQMModule.h.

◆ _e_toptiming

int _e_toptiming = 0
protected

Definition at line 195 of file TRGGDLDQMModule.h.

◆ _exp

unsigned _exp = 0
protected

Definition at line 169 of file TRGGDLDQMModule.h.

◆ _run

unsigned _run = 0
protected

Definition at line 170 of file TRGGDLDQMModule.h.

◆ array_psn_extra_fast

int array_psn_extra_fast[nskim_gdldqm][nsample_fast][n_output_extra] = {{{0}}}
protected

array to store past nsample events

Definition at line 180 of file TRGGDLDQMModule.h.

180{{{0}}};

◆ bevt

StoreObjPtr<EventMetaData> bevt
private

Input store array of metadata.

Definition at line 260 of file TRGGDLDQMModule.h.

◆ dirDQM

TDirectory* dirDQM = nullptr
protected

Definition at line 135 of file TRGGDLDQMModule.h.

◆ ee_ftd

int ee_ftd[10] = {0}
protected

Definition at line 202 of file TRGGDLDQMModule.h.

202{0};

◆ ee_itd

int ee_itd[10] = {0}
protected

Definition at line 203 of file TRGGDLDQMModule.h.

203{0};

◆ ee_psn

int ee_psn[10] = {0}
protected

Definition at line 201 of file TRGGDLDQMModule.h.

201{0};

◆ end_skim_gdldqm

int end_skim_gdldqm = 0
protected

Definition at line 69 of file TRGGDLDQMModule.h.

◆ entAry

Input store array of GDL data.

Definition at line 257 of file TRGGDLDQMModule.h.

◆ evtno

unsigned evtno = 0
protected

Definition at line 168 of file TRGGDLDQMModule.h.

◆ h_0_vec

std::vector<int> h_0_vec
protected

Definition at line 126 of file TRGGDLDQMModule.h.

◆ h_c2_cdcTocomL1

TH1I* h_c2_cdcTocomL1[nskim_gdldqm] = {nullptr}
protected

timestamp diff from cdc_timing to comL1 in LSB2nsec

Definition at line 89 of file TRGGDLDQMModule.h.

89{nullptr};

◆ h_c2_cdcToecl

TH1I* h_c2_cdcToecl[nskim_gdldqm] = {nullptr}
protected

timestamp from cdc_timing to ecl_timing to L1 in LSB2nsec

Definition at line 99 of file TRGGDLDQMModule.h.

99{nullptr};

◆ h_c8_cdcToGDL

TH1I* h_c8_cdcToGDL[nskim_gdldqm] = {nullptr}
protected

timestamp diff from t0(cdc) to GDL in LSB8nsec

Definition at line 87 of file TRGGDLDQMModule.h.

87{nullptr};

◆ h_c8_cdcTogdlL1

TH1I* h_c8_cdcTogdlL1[nskim_gdldqm] = {nullptr}
protected

timestamp diff from t0(cdc) to gdlL1 in LSB8nsec

Definition at line 79 of file TRGGDLDQMModule.h.

79{nullptr};

◆ h_c8_ecl8mToGDL

TH1I* h_c8_ecl8mToGDL[nskim_gdldqm] = {nullptr}
protected

timestamp diff from fit on fam to GDL in LSB8nsec

Definition at line 81 of file TRGGDLDQMModule.h.

81{nullptr};

◆ h_c8_eclToGDL

TH1I* h_c8_eclToGDL[nskim_gdldqm] = {nullptr}
protected

timestamp diff from t0(ecl) to GDL in LSB8nsec

Definition at line 85 of file TRGGDLDQMModule.h.

85{nullptr};

◆ h_c8_eclTogdlL1

TH1I* h_c8_eclTogdlL1[nskim_gdldqm] = {nullptr}
protected

timestamp diff from t0(ecl) to gdlL1 in LSB8nsec

Definition at line 77 of file TRGGDLDQMModule.h.

77{nullptr};

◆ h_c8_gdlL1TocomL1

TH1I* h_c8_gdlL1TocomL1[nskim_gdldqm] = {nullptr}
protected

timestamp diff from gdlL1 to comL1 in LSB8nsec

Definition at line 73 of file TRGGDLDQMModule.h.

73{nullptr};

◆ h_c8_topToGDL

TH1I* h_c8_topToGDL[nskim_gdldqm] = {nullptr}
protected

timestamp diff from t0(top) to GDL in LSB8nsec

Definition at line 83 of file TRGGDLDQMModule.h.

83{nullptr};

◆ h_c8_topTogdlL1

TH1I* h_c8_topTogdlL1[nskim_gdldqm] = {nullptr}
protected

timestamp diff from t0(top) to gdlL1 in LSB8nsec

Definition at line 75 of file TRGGDLDQMModule.h.

75{nullptr};

◆ h_f_vec

std::vector<int> h_f_vec
protected

event by event ftdl timing distribution

Definition at line 130 of file TRGGDLDQMModule.h.

◆ h_ftd

TH1I* h_ftd[nskim_gdldqm] = {nullptr}
protected

ftd bits

Definition at line 112 of file TRGGDLDQMModule.h.

112{nullptr};

◆ h_ftd_fall

TH1I* h_ftd_fall[N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
protected

Definition at line 114 of file TRGGDLDQMModule.h.

114{{nullptr}};

◆ h_ftd_rise

TH1I* h_ftd_rise[N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
protected

Definition at line 113 of file TRGGDLDQMModule.h.

113{{nullptr}};

◆ h_i_vec

std::vector<int> h_i_vec
protected

event by event input timing distribution

Definition at line 132 of file TRGGDLDQMModule.h.

◆ h_itd

TH1I* h_itd[nskim_gdldqm] = {nullptr}
protected

input bits

itd bits

Definition at line 108 of file TRGGDLDQMModule.h.

108{nullptr};

◆ h_itd_fall

TH1I* h_itd_fall[N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
protected

Definition at line 110 of file TRGGDLDQMModule.h.

110{{nullptr}};

◆ h_itd_rise

TH1I* h_itd_rise[N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
protected

Definition at line 109 of file TRGGDLDQMModule.h.

109{{nullptr}};

◆ h_ns_cdcTocomL1

TH1D* h_ns_cdcTocomL1[nskim_gdldqm] = {nullptr}
protected

timestamp diff from cdc_timing to comL1 in nsec

Definition at line 91 of file TRGGDLDQMModule.h.

91{nullptr};

◆ h_ns_cdcToecl

TH1D* h_ns_cdcToecl[nskim_gdldqm] = {nullptr}
protected

timestamp diff from cdc_timing to ecl_timing in nsec

Definition at line 101 of file TRGGDLDQMModule.h.

101{nullptr};

◆ h_ns_cdcTogdlL1

TH1D* h_ns_cdcTogdlL1[nskim_gdldqm] = {nullptr}
protected

timestamp diff from cdc_timing to gdlL1 in nsec

Definition at line 93 of file TRGGDLDQMModule.h.

93{nullptr};

◆ h_ns_topTocdc

TH1D* h_ns_topTocdc[nskim_gdldqm] = {nullptr}
protected

timestamp diff from top_timing to cdc_timing in nsec

Definition at line 97 of file TRGGDLDQMModule.h.

97{nullptr};

◆ h_ns_topToecl

TH1D* h_ns_topToecl[nskim_gdldqm] = {nullptr}
protected

timestamp diff from top_timing to ecl_timing in nsec

Definition at line 95 of file TRGGDLDQMModule.h.

95{nullptr};

◆ h_p_vec

std::vector<int> h_p_vec
protected

Definition at line 128 of file TRGGDLDQMModule.h.

◆ h_psn

TH1I* h_psn[nskim_gdldqm] = {nullptr}
protected

psn bits

Definition at line 116 of file TRGGDLDQMModule.h.

116{nullptr};

◆ h_psn_effect_to_l1

TH1I* h_psn_effect_to_l1[nskim_gdldqm] = {nullptr}
protected

Definition at line 121 of file TRGGDLDQMModule.h.

121{nullptr};

◆ h_psn_extra

TH1I* h_psn_extra[nskim_gdldqm] = {nullptr}
protected

Definition at line 119 of file TRGGDLDQMModule.h.

119{nullptr};

◆ h_psn_extra_fast

TH1I* h_psn_extra_fast[nskim_gdldqm] = {nullptr}
protected

Definition at line 120 of file TRGGDLDQMModule.h.

120{nullptr};

◆ h_psn_fall

TH1I* h_psn_fall[N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
protected

Definition at line 118 of file TRGGDLDQMModule.h.

118{{nullptr}};

◆ h_psn_pure_extra

TH1I* h_psn_pure_extra[nskim_gdldqm] = {nullptr}
protected

Definition at line 123 of file TRGGDLDQMModule.h.

123{nullptr};

◆ h_psn_raw_rate

TH1I* h_psn_raw_rate[nskim_gdldqm] = {nullptr}
protected

Definition at line 122 of file TRGGDLDQMModule.h.

122{nullptr};

◆ h_psn_rise

TH1I* h_psn_rise[N_BITS_RESERVED][nskim_gdldqm] = {{nullptr}}
protected

Definition at line 117 of file TRGGDLDQMModule.h.

117{{nullptr}};

◆ h_timtype

TH1I* h_timtype[nskim_gdldqm] = {nullptr}
protected

timtype

Definition at line 125 of file TRGGDLDQMModule.h.

125{nullptr};

◆ inbitname

char inbitname[320][100] = {""}
protected

Definition at line 213 of file TRGGDLDQMModule.h.

213{""};

◆ LeafBitMap

int LeafBitMap[320] = {0}
protected

Definition at line 190 of file TRGGDLDQMModule.h.

190{0};

◆ LeafNames

char LeafNames[320][100] = {{0}}
protected

Definition at line 191 of file TRGGDLDQMModule.h.

191{{0}};

◆ m_bitConditionToDumpVcd

std::string m_bitConditionToDumpVcd
protected

Definition at line 143 of file TRGGDLDQMModule.h.

◆ m_bitNameOnBinLabel

bool m_bitNameOnBinLabel
protected

Definition at line 139 of file TRGGDLDQMModule.h.

◆ m_clkLeaf

int m_clkLeaf = 0
protected

position of the "clk" leaf in m_unpackername

Definition at line 185 of file TRGGDLDQMModule.h.

◆ m_conditions

std::vector<ModuleCondition> m_conditions
privateinherited

Module condition, only non-null if set.

Definition at line 520 of file Module.h.

◆ m_dbftdl

DBObjPtr<TRGGDLDBFTDLBits> m_dbftdl
protected

condition database for output bits

Definition at line 216 of file TRGGDLDQMModule.h.

◆ m_dbinput

DBObjPtr<TRGGDLDBInputBits> m_dbinput
protected

condition database for input bits

Definition at line 211 of file TRGGDLDQMModule.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 510 of file Module.h.

◆ m_dumpVcdFile

bool m_dumpVcdFile
protected

Definition at line 138 of file TRGGDLDQMModule.h.

◆ m_ECLCalDigitData

StoreArray<ECLCalDigit> m_ECLCalDigitData
private

Definition at line 270 of file TRGGDLDQMModule.h.

◆ m_ECLDigitData

StoreArray<ECLDigit> m_ECLDigitData
private

Definition at line 271 of file TRGGDLDQMModule.h.

◆ m_eventByEventTimingHistRecord

bool m_eventByEventTimingHistRecord
protected

Definition at line 137 of file TRGGDLDQMModule.h.

◆ m_evtLeaf

int m_evtLeaf = -1
protected

position of the "evt" leaf in m_unpackername, -1 if absent

Definition at line 184 of file TRGGDLDQMModule.h.

◆ m_fastPos

int m_fastPos[nskim_gdldqm] = {0}
protected

ring-buffer index of the newest slot of array_psn_extra_fast

Definition at line 181 of file TRGGDLDQMModule.h.

181{0};

◆ m_fastSum

int m_fastSum[nskim_gdldqm][n_output_extra] = {{0}}
protected

running sum of array_psn_extra_fast over the whole ring

Definition at line 182 of file TRGGDLDQMModule.h.

182{{0}};

◆ m_firedFtdl

std::vector<char> m_firedFtdl
protected

per-event cache: ftdl output bit fired in at least one clock cycle

Definition at line 164 of file TRGGDLDQMModule.h.

◆ m_firedInput

std::vector<char> m_firedInput
protected

per-event cache: input bit fired in at least one clock cycle

Definition at line 166 of file TRGGDLDQMModule.h.

◆ m_firedPsnm

std::vector<char> m_firedPsnm
protected

per-event cache: psnm output bit fired in at least one clock cycle

Definition at line 162 of file TRGGDLDQMModule.h.

◆ m_generatePostscript

bool m_generatePostscript
protected

Definition at line 140 of file TRGGDLDQMModule.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 517 of file Module.h.

◆ m_inbitIndex

std::unordered_map<std::string, int> m_inbitIndex
protected

bit name -> input bit number, built once in initialize()

Definition at line 158 of file TRGGDLDQMModule.h.

◆ m_leafMap

std::vector<std::pair<int, int> > m_leafMap
protected

(position in m_unpacker, leaf number) for every mapped leaf

Definition at line 186 of file TRGGDLDQMModule.h.

◆ m_leavesResolved

bool m_leavesResolved = false
protected

whether the leaf positions below are valid for the current run

Definition at line 183 of file TRGGDLDQMModule.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 513 of file Module.h.

◆ m_moduleParamList

ModuleParamList m_moduleParamList
privateinherited

List storing and managing all parameter of the module.

Definition at line 515 of file Module.h.

◆ m_name

std::string m_name
privateinherited

The name of the module, saved as a string (user-modifiable)

Definition at line 507 of file Module.h.

◆ m_outbitIndex

std::unordered_map<std::string, int> m_outbitIndex
protected

bit name -> output bit number, built once in initialize()

Definition at line 160 of file TRGGDLDQMModule.h.

◆ m_package

std::string m_package
privateinherited

Package this module is found in (may be empty).

Definition at line 509 of file Module.h.

◆ m_postScriptName

std::string m_postScriptName
protected

Definition at line 144 of file TRGGDLDQMModule.h.

◆ m_propertyFlags

unsigned int m_propertyFlags
privateinherited

The properties of the module as bitwise or (with |) of EModulePropFlags.

Definition at line 511 of file Module.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 518 of file Module.h.

◆ m_skim

int m_skim = -1
protected

Definition at line 70 of file TRGGDLDQMModule.h.

◆ m_type

std::string m_type
privateinherited

The type of the module, saved as a string.

Definition at line 508 of file Module.h.

◆ m_unpacker

DBObjPtr<TRGGDLDBUnpacker> m_unpacker
protected

condition database for unpacker

Definition at line 189 of file TRGGDLDQMModule.h.

◆ m_vcdEventStart

unsigned m_vcdEventStart = 0
protected

Definition at line 141 of file TRGGDLDQMModule.h.

◆ m_vcdNumberOfEvents

unsigned m_vcdNumberOfEvents = 0
protected

Definition at line 142 of file TRGGDLDQMModule.h.

◆ n_clocks

unsigned n_clocks = 0
protected

Definition at line 167 of file TRGGDLDQMModule.h.

◆ n_inbit

unsigned n_inbit = 0
protected

Definition at line 212 of file TRGGDLDQMModule.h.

◆ n_leafs

int n_leafs = 0
protected

Definition at line 204 of file TRGGDLDQMModule.h.

◆ n_leafsExtra

int n_leafsExtra = 0
protected

Definition at line 205 of file TRGGDLDQMModule.h.

◆ n_outbit

unsigned n_outbit = 0
protected

Definition at line 217 of file TRGGDLDQMModule.h.

◆ n_output_extra

const int n_output_extra = 105
staticprotected

Definition at line 173 of file TRGGDLDQMModule.h.

◆ n_output_overlap

const int n_output_overlap = 130
staticprotected

Definition at line 175 of file TRGGDLDQMModule.h.

◆ n_output_pure_extra

const int n_output_pure_extra = 13
staticprotected

Definition at line 177 of file TRGGDLDQMModule.h.

◆ nconf

int nconf = 0
protected

Definition at line 206 of file TRGGDLDQMModule.h.

◆ nsample_fast

const int nsample_fast = 500
staticprotected

number of sample for fast efficiency monitor

Definition at line 179 of file TRGGDLDQMModule.h.

◆ nskim_gdldqm

const int nskim_gdldqm = 11
staticprotected

number of skims

Definition at line 67 of file TRGGDLDQMModule.h.

◆ nword_input

int nword_input = 0
protected

Definition at line 207 of file TRGGDLDQMModule.h.

◆ nword_output

int nword_output = 0
protected

Definition at line 208 of file TRGGDLDQMModule.h.

◆ oldDir

TDirectory* oldDir = nullptr
protected

Definition at line 134 of file TRGGDLDQMModule.h.

◆ outbitname

char outbitname[320][100] = {""}
protected

Definition at line 218 of file TRGGDLDQMModule.h.

218{""};

◆ output_extra

const char * output_extra
staticprotected
Initial value:
= {
"all", "fff&(c4|hie)", "ffo&(c4|hie)", "ffb&(c4|hie)", "fff", "c4|hie", "fff|ffo|ffb", "(fff|ffo|ffb)&(c4|hie)", "bha2D", "bha3D",
"ff", "ff&(lml|eclmumu)", "f", "f&(lml|eclmumu)", "lml|eclmumu", "fff&(lml|eclmumu)", "ffo&(lml|eclmumu)", "ffb&(lml|eclmumu)", "ffy", "ffy&(c4|hie)",
"fyo&(c4|hie)", "fyb&(c4|hie)", "(ffy|ffo|ffb)&(c4|hie)", "ffy&(lml|eclmumu)", "fyo&(lml|eclmumu)", "fyb&(lml|eclmumu)", "c4&(fff|ffo|ffb)", "hie&(fff|ffo|ffb)", "lml0&(fff|ffo|ffb)", "lml1&(fff|ffo|ffb)",
"lml2&(fff|ffo|ffb)", "lml3&(fff|ffo|ffb)", "lml4&(fff|ffo|ffb)", "lml5&(fff|ffo|ffb)", "lml6&(fff|ffo|ffb)", "lml7&(fff|ffo|ffb)", "lml8&(fff|ffo|ffb)", "lml9&(fff|ffo|ffb)", "lml10&(fff|ffo|ffb)", "lml12&(fff|ffo|ffb)",
"lml13&(fff|ffo|ffb)", "eclmumu&(fff|ffo|ffb)", "mu_b2b&(fff|ffo|ffb)", "mu_eb2b&(fff|ffo|ffb)", "cdcklm1&(fff|ffo|ffb)", "cdcklm2&(fff|ffo|ffb)", "klm_hit&(fff|ffo|ffb)", "eklm_hit&(fff|ffo|ffb)", "mu_b2b&(lml|eclmumu)", "mu_eb2b&(lml|eclmumu)",
"cdcklm1&(lml|eclmumu)", "cdcklm2&(lml|eclmumu)", "klm_hit&(lml|eclmumu)", "eklm_hit&(lml|eclmumu)", "cdcecl1&(fff|ffo|ffb)", "cdcecl2&(fff|ffo|ffb)", "cdcecl3&(fff|ffo|ffb)", "cdcecl4&(fff|ffo|ffb)", "cdcecl1&(lml|eclmumu)", "cdcecl2&(lml|eclmumu)",
"cdcecl3&(lml|eclmumu)", "cdcecl4&(lml|eclmumu)", "fso&(lml|eclmumu)", "fsb&(lml|eclmumu)", "syo&(lml|eclmumu)", "syb&(lml|eclmumu)", "x&(lml|eclmumu)", "fioiecl1&(lml|eclmumu)", "ecleklm1&(lml|eclmumu)", "seklm1&(lml|eclmumu)",
"seklm2&(lml|eclmumu)", "ieklm&(lml|eclmumu)", "iecl&(lml|eclmumu)", "ecleklm1&(fff|ffo|ffb)", "syo&(c4|hie)", "yioiecl1&(c4|hie)", "stt&(c4|hie)", "ffz&(c4|hie)", "fzo&(c4|hie)", "fzb&(c4|hie)",
"ffy&ffz&(c4|hie)", "fyo&fzo&(c4|hie)", "fyb&fzb&(c4|hie)", "(ffy|ffz)&(c4|hie)", "(fyo|fzo)&(c4|hie)", "(fyb|fzb)&(c4|hie)", "ffy&ffz", "fyo&fzo", "fyb&fzb", "(ffy|ffz)",
"(fyo|fzo)", "(fyb|fzb)", "ffo", "ffb", "aaa&(c4|hie)", "aay&(c4|hie)", "ycdcklm1&(fff|ffo|ffb)", "ycdcklm2&(fff|ffo|ffb)", "ycdcklm1&(lml|eclmumu)", "ycdcklm2&(lml|eclmumu)",
"sttecl&(c4|hie)", "syoecl&(lml|eclmumu)", "sybecl&(lml|eclmumu)", "syoecl&(c4|hie)", "sybecl&(c4|hie)"
}

Definition at line 174 of file TRGGDLDQMModule.h.

◆ output_overlap

const char * output_overlap
staticprotected

Definition at line 176 of file TRGGDLDQMModule.h.

◆ output_pure_extra

const char * output_pure_extra
staticprotected
Initial value:
= {
"c4|hie offline_fff", "fff&(c4|hie) offline_fff", "ffy&(c4|hie) offline_fff",
"c4|hie offline_ffo", "ffo&(c4|hie) offline_ffo", "fyo&(c4|hie) offline_ffo",
"c4|hie offline_ffb", "ffb&(c4|hie) offline_ffb", "fyb&(c4|hie) offline_ffb",
"fff|ffb|ffo offline_hie", "hie&(fff|ffb|ffo) offline_hie",
"fff|ffb|ffo offline_c4", "c4&(fff|ffb|ffo) offline_c4"
}

Definition at line 178 of file TRGGDLDQMModule.h.

◆ result_soft

StoreObjPtr<SoftwareTriggerResult> result_soft
private

Input store array of HLT.

Definition at line 263 of file TRGGDLDQMModule.h.

◆ skim

std::vector<int> skim
protected

Definition at line 171 of file TRGGDLDQMModule.h.

◆ skim_menu

std::string skim_menu[nskim_gdldqm]
protected
Initial value:
= {
"all",
"software_trigger_cut&skim&accept_hadron",
"software_trigger_cut&skim&accept_tau_tau",
"software_trigger_cut&skim&accept_mumu_1trk",
"software_trigger_cut&skim&accept_mumu_2trk",
"software_trigger_cut&skim&accept_gamma_gamma",
"software_trigger_cut&skim&accept_bhabha",
"software_trigger_cut&skim&accept_hadronb",
"software_trigger_cut&skim&accept_hadronb1",
"software_trigger_cut&skim&accept_hadronb2",
"software_trigger_cut&skim&accept_mumutight"
}

name of skim from hlt/softwaretrigger/scripts/softwaretrigger/db_access.py

Definition at line 222 of file TRGGDLDQMModule.h.

222 {
223 "all",
224 "software_trigger_cut&skim&accept_hadron",
225 "software_trigger_cut&skim&accept_tau_tau",
226 "software_trigger_cut&skim&accept_mumu_1trk",
227 "software_trigger_cut&skim&accept_mumu_2trk",
228 "software_trigger_cut&skim&accept_gamma_gamma",
229 "software_trigger_cut&skim&accept_bhabha",
230 "software_trigger_cut&skim&accept_hadronb",
231 "software_trigger_cut&skim&accept_hadronb1",
232 "software_trigger_cut&skim&accept_hadronb2",
233 "software_trigger_cut&skim&accept_mumutight"
234 };

◆ skim_smap

std::string skim_smap[nskim_gdldqm]
protected
Initial value:
= {
"all",
"hadron",
"tautau",
"mumu1trk",
"mumu2trk",
"gammagamma",
"bhabha",
"hadronb",
"hadronb1",
"hadronb2",
"mumutight"
}

name of histograms

Definition at line 237 of file TRGGDLDQMModule.h.

237 {
238 "all",
239 "hadron",
240 "tautau",
241 "mumu1trk",
242 "mumu2trk",
243 "gammagamma",
244 "bhabha",
245 "hadronb",
246 "hadronb1",
247 "hadronb2",
248 "mumutight"
249 };

◆ start_skim_gdldqm

int start_skim_gdldqm = 0
protected

Definition at line 68 of file TRGGDLDQMModule.h.

◆ Tracks

StoreArray<Track> Tracks
private

Input store array of track.

Definition at line 266 of file TRGGDLDQMModule.h.

◆ trgeclmap

TrgEclMapping* trgeclmap = nullptr
private

ecltrg<->ecl mappint

Definition at line 254 of file TRGGDLDQMModule.h.


The documentation for this class was generated from the following files: