Belle II Software  release-08-01-10
CDCTrigger3DFitterModule.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 CDCTRIGGER3DFITTERModule_H
9 #define CDCTRIGGER3DFITTERModule_H
10 
11 #include "framework/core/Module.h"
12 #include <string>
13 
14 #include <framework/datastore/StoreArray.h>
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <trg/cdc/dataobjects/CDCTriggerSegmentHit.h>
17 #include <trg/cdc/dataobjects/CDCTriggerTrack.h>
18 #include <framework/dataobjects/BinnedEventT0.h>
19 
20 namespace Belle2 {
26  class TRGCDCJSignal;
27  class TRGCDCJLUT;
28  class TRGCDCJSignalData;
29 
32 
33  public:
34 
37 
39  virtual ~CDCTrigger3DFitterModule();
40 
42  virtual void initialize() override;
43 
45  virtual void event() override;
46 
47  protected:
55  void finder(int charge, double rho, double phi,
56  std::vector<int>& bestTSIndex, std::vector<double>& bestTSPhi);
67  void fitter(const std::vector<int>& bestTSIndex, std::vector<double>& bestTSPhi,
68  int charge, double rho, double phi,
69  double& z0, double& cot, double& chi2);
70 
72  std::string m_hitCollectionName;
74  std::string m_EventTimeName;
76  std::string m_inputCollectionName;
80  unsigned m_fitterMode;
82  unsigned m_minHits;
84  bool m_xtSimple;
87 
88  private:
90  std::vector<double> nWires = {};
92  std::vector<double> rr = {};
94  std::vector<double> zToStraw = {};
96  std::vector<int> nShift = {};
98  std::vector<double> angleSt = {};
100  std::vector<std::vector<double>> xtTables = {};
101 
103  std::map<std::string, std::vector<double> > m_stGeometry;
105  std::vector<std::vector<double> > m_stXts;
106 
110  std::map<std::string, Belle2::TRGCDCJSignal> m_mSignalStorage;
112  std::map<std::string, Belle2::TRGCDCJLUT*> m_mLutStorage;
114  std::map<std::string, double> m_mConstD;
116  std::map<std::string, std::vector<double> > m_mConstV;
117 
126  };
127 
129 } // namespace Belle2
130 
131 #endif // CDCTrigger3DFitterModule_H
Module for the 3D Fitter of the CDC trigger.
std::string m_EventTimeName
name of the event time StoreObjPtr
StoreArray< CDCTriggerTrack > m_tracks2D
list of 2D input tracks
std::map< std::string, std::vector< double > > m_stGeometry
map of geometry constants
Belle2::TRGCDCJSignalData * m_commonData
Datastore for firmware simulation.
std::map< std::string, double > m_mConstD
Constants for firmware simulation.
virtual void initialize() override
Initialize the module and register DataStore arrays.
CDCTrigger3DFitterModule()
Constructor, for setting module description and parameters.
virtual void event() override
Run the 3D fitter for an event.
std::string m_outputCollectionName
Name of the StoreArray containing the resulting 3D tracks.
StoreArray< CDCTriggerSegmentHit > m_hits
list of track segment hits
std::vector< double > angleSt
geometry constants: stereo angle
std::map< std::string, std::vector< double > > m_mConstV
Constants for firmware simulation.
void finder(int charge, double rho, double phi, std::vector< int > &bestTSIndex, std::vector< double > &bestTSPhi)
Select stereo hits.
std::map< std::string, Belle2::TRGCDCJSignal > m_mSignalStorage
Signalstore for firmware simulation.
bool m_isVerbose
Switch printing detail information.
std::string m_inputCollectionName
Name of the StoreArray containing the input tracks from the 2D fitter.
std::vector< std::vector< double > > xtTables
geometry constants: drift length - drift time relation
unsigned m_fitterMode
Fitter mode: 1: fast, 2: firmware.
bool m_xtSimple
Switch between nominal drift velocity and xt table.
unsigned m_minHits
Minimal number of hits required for fitting.
StoreArray< CDCTriggerTrack > m_tracks3D
list of 3D output tracks
StoreObjPtr< BinnedEventT0 > m_eventTime
StoreObjPtr containing the event time.
std::vector< int > nShift
geometry constants: wire shift of stereo layers
std::vector< double > nWires
geometry constants: number of wires per super layer
std::vector< double > rr
geometry constants: radius of priority layers
std::vector< double > zToStraw
geometry constants: backward z of priority layers
void fitter(const std::vector< int > &bestTSIndex, std::vector< double > &bestTSPhi, int charge, double rho, double phi, double &z0, double &cot, double &chi2)
Perform the 3D fit.
std::string m_hitCollectionName
Name of the StoreArray containing the input track segment hits.
std::map< std::string, Belle2::TRGCDCJLUT * > m_mLutStorage
Lutstore for firmware simulation.
std::vector< std::vector< double > > m_stXts
stereo xt tables
Base class for Modules.
Definition: Module.h:72
A class to hold common data for JSignals.
Definition: JSignalData.h:33
Abstract base class for different kinds of events.