Belle II Software  release-08-01-10
CDCTriggerNeuroModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #ifndef CDCTRIGGERNEUROMODULE_H
9 #define CDCTRIGGERNEUROMODULE_H
10 
11 #include <framework/core/Module.h>
12 #include <trg/cdc/NeuroTrigger.h>
13 #include <trg/cdc/NeuroTriggerParameters.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <framework/database/DBObjPtr.h>
16 #include <trg/cdc/dbobjects/CDCTriggerNeuroConfig.h>
17 #include <trg/cdc/dataobjects/CDCTriggerTrack.h>
18 #include <trg/cdc/dataobjects/CDCTriggerSegmentHit.h>
19 #include <trg/cdc/dataobjects/CDCTriggerMLPInput.h>
20 
21 namespace Belle2 {
32  class CDCTriggerNeuroModule : public Module {
33  public:
36 
39 
43  virtual void initialize() override;
44 
49  virtual void event() override;
51  float hwInputIdShuffle(float tsid, int sl);
52 
53  protected:
55  std::string m_filename;
57  std::string m_arrayname;
59  std::string m_hitCollectionName;
61  std::string m_EventTimeName;
63  std::string m_inputCollectionName;
80  std::vector<unsigned> m_precision;
94  std::string m_et_option;
115  };
117 }
118 #endif
The neural network module of the CDC trigger.
std::string m_EventTimeName
name of the event time StoreObjPtr
StoreArray< CDCTriggerTrack > m_tracks2D
list of input 2D tracks or neurotracks
DBObjPtr< CDCTriggerNeuroConfig > m_cdctriggerneuroconfig
get NNT payload from database.
CDCTriggerNeuroModule()
Constructor, for setting module description and parameters.
StoreArray< CDCTriggerTrack > m_realtracks2D
list of input real 2D tracks
StoreArray< CDCTriggerTrack > m_tracksNN
list of output NN tracks
virtual void initialize() override
Initialize the module.
StoreArray< CDCTriggerMLPInput > m_mlpInput
list of input vectors for each NN track
virtual void event() override
Called once for each event.
StoreArray< CDCTriggerSegmentHit > m_segmentHits
list of track segment hits
std::string m_outputCollectionName
Name of the StoreArray containing the resulting NN tracks.
NeuroTrigger m_NeuroTrigger
Instance of the NeuroTrigger.
std::vector< unsigned > m_precision
Fixed point precision in bit after radix point.
std::string m_arrayname
Name of the TObjArray holding the networks.
float hwInputIdShuffle(float tsid, int sl)
shuffle the input ids in the input vector to match the hardware
bool m_neuroTrackInputMode
use Neurotracks as InputTracks
std::string m_inputCollectionName
Name of the StoreArray containing the input 2D tracks or neurotracks.
bool m_fixedPoint
Switch to execute the network with fixed point calculation.
bool m_writeMLPinput
Switch for writing out the input vector for each track (off by default).
std::string m_et_option
way to obtain the event time, possible values are: "etf_only" : only ETF info is used,...
std::string m_realinputCollectionName
Name of the StoreArray containing the real input 2D tracks.
std::string m_filename
Name of file where network weights etc.
bool m_min4axials
require at least 4 axial track segments
std::string m_hitCollectionName
Name of the StoreArray containing the input track segment hits.
bool m_hardwareCompatibilityMode
Switch to mimic an apparent bug in the hardware preprocessing.
virtual ~CDCTriggerNeuroModule()
Destructor.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Base class for Modules.
Definition: Module.h:72
Class to represent the CDC Neurotrigger.
Definition: NeuroTrigger.h:40
Abstract base class for different kinds of events.