Belle II Software  release-08-01-10
SecMapTrainer< FilterFactoryType > Class Template Reference

This class contains all relevant tools for training a VXDTFFilters. More...

#include <SecMapTrainer.h>

Collaboration diagram for SecMapTrainer< FilterFactoryType >:

Public Member Functions

 SecMapTrainer (const std::string &setupName, const std::string &appendix="")
 constructor.
 
void initialize ()
 initialize the trainer (to be called in Module::initialize().
 
void terminate ()
 initialize the trainer (to be called in Module::terminate().
 
void initializeEvent (int expNo, int runNo, int evtNo)
 Initialize event.
 
const SectorMapConfiggetConfig ()
 returns configuration.
 
const std::string getSetupName ()
 returns the name of the setup used for this trainer
 
bool storeTC (const SpacePointTrackCand &tc, unsigned iD)
 checks if given TC is acceptable for this trainer and store it if it is accepted. More...
 
unsigned processTracks ()
 for given normalized local variables and VxdID a FullSecID is determined. More...
 

Protected Member Functions

bool acceptHit (const SpacePoint &hit)
 checks if given Hit is acceptable for this trainer. More...
 
unsigned process2HitCombinations (const SecMapTrainerTC &aTC)
 processes all two-hit-combinations of given TC and stores their results. More...
 
unsigned process3HitCombinations (const SecMapTrainerTC &aTC)
 processes all three-hit-combinations of given TC and stores their results. More...
 
void convertSP2TC (const std::vector< std::pair< FullSecID, const SpacePoint * > > &goodSPs, unsigned tcID, double pTValue, int pdgCode)
 converts the SpacePoints into a SecMapTrainerTC and stores it to m_TCs
 

Protected Attributes

const std::string m_nameSetup
 name of the setting to be used for this training
 
FiltersContainer< SpacePoint > & m_filtersContainer = Belle2::FiltersContainer<SpacePoint>::getInstance()
 a reference to the singleton FiltersContainer used for this training. More...
 
SectorMapConfig m_config
 Contains all relevant configurations needed for training a sectorMap. More...
 
FilterFactoryType m_factory
 A factory taking care of having the correct filters prepared for secMapTraining.
 
FilterMill< SecMapTrainerHitm_filterMill
 Stores the prepared filters and applies them on given hit-combinations.
 
RawSecMapRootInterface m_rootInterface
 Interface for nice and neat storing in root-ttree.
 
std::vector< SecMapTrainerTCm_tcs
 contains tcs of event, reset after each event.
 
unsigned m_expNo
 contains current experiment number.
 
unsigned m_runNo
 contains current run number.
 
unsigned m_evtNo
 contains current event number.
 

Detailed Description

template<class FilterFactoryType>
class Belle2::SecMapTrainer< FilterFactoryType >

This class contains all relevant tools for training a VXDTFFilters.

Definition at line 43 of file SecMapTrainer.h.

Member Function Documentation

◆ acceptHit()

bool acceptHit ( const SpacePoint hit)
inlineprotected

checks if given Hit is acceptable for this trainer.

Returns true if accepted and false otherwise.

Definition at line 87 of file SecMapTrainer.h.

88  {
89  // rejects if layerID is not acceptable for this secMap-training.
90  auto layerID = hit.getVxdID().getLayerNumber();
91  bool found = false;
92  std::string ids = "";
93  for (auto allowedLayer : m_config.allowedLayers) {
94  ids += std::to_string(allowedLayer) + " ";
95  if (allowedLayer == layerID) found = true;
96  }
97  B2DEBUG(20, "SecMapTrainer::acceptHit: the TC has layerID: " << layerID << " and allowd layers: " << ids << " and was " <<
98  (found ? "accepted" : "rejected"));
99 
100  return found;
101  }
SectorMapConfig m_config
Contains all relevant configurations needed for training a sectorMap.
Definition: SecMapTrainer.h:54
std::vector< int > allowedLayers
stores allowed layers to be used (including virtual IP with layer 0).

◆ process2HitCombinations()

unsigned process2HitCombinations ( const SecMapTrainerTC aTC)
inlineprotected

processes all two-hit-combinations of given TC and stores their results.

returns number of stored values.

Definition at line 106 of file SecMapTrainer.h.

◆ process3HitCombinations()

unsigned process3HitCombinations ( const SecMapTrainerTC aTC)
inlineprotected

processes all three-hit-combinations of given TC and stores their results.

returns number of stored values.

Definition at line 155 of file SecMapTrainer.h.

◆ processTracks()

unsigned processTracks ( )
inline

for given normalized local variables and VxdID a FullSecID is determined.

returns unsigned int max if correct ID could not be found. takes all TCs stored and processed them for root storing. Takes care of cleaning event-dependent TCs.

Definition at line 426 of file SecMapTrainer.h.

◆ storeTC()

bool storeTC ( const SpacePointTrackCand tc,
unsigned  iD 
)
inline

checks if given TC is acceptable for this trainer and store it if it is accepted.

The return value is true, it was accepted and stored, false if not.

Definition at line 333 of file SecMapTrainer.h.

Member Data Documentation

◆ m_config

SectorMapConfig m_config
protected

Contains all relevant configurations needed for training a sectorMap.

Copy of the config in the SectorMap needed as it is modified (the one in VXDTFFilters is const).

Definition at line 54 of file SecMapTrainer.h.

◆ m_filtersContainer

FiltersContainer<SpacePoint>& m_filtersContainer = Belle2::FiltersContainer<SpacePoint>::getInstance()
protected

a reference to the singleton FiltersContainer used for this training.

Needed as some information are only accessable from the filters (in the container).

Definition at line 50 of file SecMapTrainer.h.


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