Belle II Software development
CDCTrigger3DHNeuroModule.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
9#pragma once
10
11#include "trg/cdc/NeuroTrigger3DH.h"
12#include "trg/cdc/dataobjects/CDCTriggerSegmentHit.h"
13#include "trg/cdc/dataobjects/CDCTrigger3DHTrack.h"
14#include "framework/core/Module.h"
15#include "framework/datastore/StoreArray.h"
16
17namespace Belle2 {
22 /*
23 The neural network module of the CDC trigger for 3DFinder track candidates.
24 For binary extended input deep neural networks with classification node.
25 */
26 class CDCTrigger3DHNeuroModule : public Module {
27 public:
28 // Constructor
29 CDCTrigger3DHNeuroModule();
30 // Destructor
31 virtual ~CDCTrigger3DHNeuroModule() {}
32
33 // Module initialization (load network from root file, set data stores)
34 virtual void initialize() override;
35 // Run the neural network for each event
36 virtual void event() override;
37
38 private:
39 // Get the quadrant number for a 3DFinder track
40 short getQuadrant(const int trackIdx);
41 // Name of file where network weights etc. are stored.
42 std::string m_fileName;
43 // Name of the TObjArray holding the networks.
44 std::string m_arrayName;
45 // Name of the StoreArray containing the input track segment hits.
46 std::string m_hitCollectionName;
47 // Name of the StoreArray containing the input 3DFinder tracks.
48 std::string m_inputCollectionName;
49 // Name of the StoreArray containing the resulting Neuro tracks.
50 std::string m_outputCollectionName;
51 // Switch to execute the network with fixed point calculation.
52 bool m_fixedPoint;
53 // Global classification cut to set nntBit (y-Bit)
54 double m_classificationCutNNT;
55 // Global classification cut to set sttBit
56 double m_classificationCutSTT;
57
58 // StoreArray of input 3DFinder tracks
59 StoreArray<CDCTrigger3DHTrack> m_ndFinderTracks;
60 // StoreArray of input track segment hits
61 StoreArray<CDCTriggerSegmentHit> m_trackSegmentHits;
62 // StoreArray of ouptput Neuro3D tracks
63 StoreArray<CDCTrigger3DHTrack> m_neuro3DHTracks;
64
65 // Instance of the NeuroTrigger3DH
66 NeuroTrigger3DH m_neuroTrigger3DH;
67 // Instance of the MLP from the conditions database
68 DBObjPtr<CDCTrigger3DHMLP> m_CDCTrigger3DHMLPConditionsDB;
69 };
70
71}
virtual void initialize() override
Initialize the Module.
virtual void event() override
This method is the core of the module.
Class for accessing objects in the database.
Definition DBObjPtr.h:21
Module()
Constructor.
Definition Module.cc:30
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Abstract base class for different kinds of events.