Belle II Software  release-05-02-19
SecMapTrainer.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jakob Lettenbichler (jakob.lettenbichler@oeaw.ac.at) *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <tracking/spacePointCreation/SpacePointTrackCand.h>
14 
15 #include <tracking/trackFindingVXD/sectorMapTools/SecMapTrainerHit.h>
16 #include <tracking/trackFindingVXD/sectorMapTools/SecMapTrainerTC.h>
17 #include <tracking/dataobjects/SectorMapConfig.h>
18 #include <tracking/trackFindingVXD/environment/VXDTFFilters.h>
19 
20 #include <tracking/trackFindingVXD/sectorMapTools/FilterMill.h>
21 #include <tracking/trackFindingVXD/sectorMapTools/RawSecMapRootInterface.h>
22 //#include <tracking/trackFindingVXD/sectorMapTools/SectorTools.h>
23 #include <tracking/trackFindingVXD/filterMap/map/FiltersContainer.h>
24 #include <tracking/trackFindingVXD/filterMap/filterFramework/SelectionVariableNamesToFunctions.h>
25 #include <framework/geometry/B2Vector3.h>
26 
27 #include <tracking/dataobjects/FullSecID.h>
28 #include <vxd/dataobjects/VxdID.h>
29 
30 #include <string>
31 #include <vector>
32 #include <utility> // std::pair, std::move
33 #include <limits> // std::numeric_limits
34 
35 
36 namespace Belle2 {
44  template <class FilterFactoryType>
45  class SecMapTrainer {
46  protected:
48  const std::string m_nameSetup;
49 
53 
57 
59  FilterFactoryType m_factory;
60 
63 
64 
67 
68 
70  std::vector<SecMapTrainerTC> m_tcs;
71 
72 
74  unsigned m_expNo;
75 
76 
78  unsigned m_runNo;
79 
80 
82  unsigned m_evtNo;
83 
84 
85 
89  bool acceptHit(const SpacePoint& hit)
90  {
91  // rejects if layerID is not acceptable for this secMap-training.
92  auto layerID = hit.getVxdID().getLayerNumber();
93  bool found = false;
94  std::string ids = "";
95  for (auto allowedLayer : m_config.allowedLayers) {
96  ids += std::to_string(allowedLayer) + " ";
97  if (allowedLayer == layerID) found = true;
98  }
99  B2DEBUG(10, "SecMapTrainer::acceptHit: the TC has layerID: " << layerID << " and allowd layers: " << ids << " and was " <<
100  (found ? "accepted" : "rejected"));
101 
102  return found;
103  }
104 
105 
106 
108  unsigned process2HitCombinations(const SecMapTrainerTC& aTC)
109  {
110  unsigned nValues = 0;
111  B2DEBUG(10, "SecMapTrainer::process2HitCombinations: nHits/trackID/pdg: " << aTC.size() << "/" << aTC.getTrackID() << "/" <<
112  aTC.getPDG());
113  if (aTC.size() < 2) { return nValues; }
114 
115  // the iterators mark the hits to be used:
116  SecMapTrainerTC::ConstIterator outerIt = aTC.outermostHit();
117  SecMapTrainerTC::ConstIterator innerIt = ++aTC.outermostHit();
118 
119  // loop over all 2-hit-combis, collect data for each filterType and store it in root-tree:
120  std::vector<std::pair<std::string, double> > collectedResults;
121  for (; innerIt != aTC.innerEnd();) {
122  B2DEBUG(10, "SecMapTrainer::process2HitCombinations: outerHit-/innerHitSecID: " << outerIt->getSectorIDString() <<
123  "/" << innerIt->getSectorIDString());
124 
125  auto& dataSet = m_rootInterface.get2HitDataSet();
126  dataSet.expNo = m_expNo;
127  dataSet.runNo = m_runNo;
128  dataSet.evtNo = m_evtNo;
129  dataSet.trackNo = aTC.getTrackID();
130  dataSet.pdg = aTC.getPDG();
131  dataSet.secIDs.outer = outerIt->getSectorID().getFullSecID();
132  dataSet.secIDs.inner = innerIt->getSectorID().getFullSecID();
133 
134  // create data for each filterType:
136  newHitPair.outer = &(*outerIt);
137  newHitPair.inner = &(*innerIt);
138  m_filterMill.grindData2Hit(newHitPair, collectedResults);
139 
140  // fill data for each filter type:
141  for (const auto& entry : collectedResults) {
142  B2DEBUG(50, "SecMapTrainer::process2HitCombinations: filter/value: " << entry.first << "/" << entry.second);
143  dataSet.setValueOfFilter(entry.first, entry.second);
144  ++nValues;
145  }
147  collectedResults.clear();
148  ++outerIt;
149  ++innerIt;
150  }
151  return nValues;
152  }
153 
154 
155 
157  unsigned process3HitCombinations(const SecMapTrainerTC& aTC)
158  {
159  unsigned nValues = 0;
160  B2DEBUG(10, "SecMapTrainer::process3HitCombinations: nHits/trackID/pdg: " << aTC.size() << "/" << aTC.getTrackID() << "/" <<
161  aTC.getPDG());
162  if (aTC.size() < 3) { return nValues; }
163 
164  // the iterators mark the hits to be used:
165  SecMapTrainerTC::ConstIterator outerIt = aTC.outermostHit();
166  SecMapTrainerTC::ConstIterator centerIt = ++aTC.outermostHit();
167  SecMapTrainerTC::ConstIterator innerIt = ++(++aTC.outermostHit());
168 
169  // loop over all 3-hit-combis, collect data for each filterType and store it in root-tree:
170  std::vector<std::pair<std::string, double> > collectedResults;
171  for (; innerIt != aTC.innerEnd();) {
172  B2DEBUG(10, "SecMapTrainer::process3HitCombinations: outer-/center-/innerHitSecID: " << outerIt->getSectorIDString() <<
173  "/" << centerIt->getSectorIDString() <<
174  "/" << innerIt->getSectorIDString());
175 
176  auto& dataSet = m_rootInterface.get3HitDataSet();
177  dataSet.expNo = m_expNo;
178  dataSet.runNo = m_runNo;
179  dataSet.evtNo = m_evtNo;
180  dataSet.trackNo = aTC.getTrackID();
181  dataSet.pdg = aTC.getPDG();
182  dataSet.secIDs.outer = outerIt->getSectorID().getFullSecID();
183  dataSet.secIDs.center = centerIt->getSectorID().getFullSecID();
184  dataSet.secIDs.inner = innerIt->getSectorID().getFullSecID();
185 
186  // create data for each filterType:
188  newHitTriplet.outer = &(*outerIt);
189  newHitTriplet.center = &(*centerIt);
190  newHitTriplet.inner = &(*innerIt);
191  m_filterMill.grindData3Hit(newHitTriplet, collectedResults);
192 
193  // fill data for each filter type:
194  for (const auto& entry : collectedResults) {
195  B2DEBUG(50, "SecMapTrainer::process3HitCombinations: filter/value: " << entry.first << "/" << entry.second);
196  dataSet.setValueOfFilter(entry.first, entry.second);
197  ++nValues;
198  }
200  collectedResults.clear();
201  ++outerIt;
202  ++centerIt;
203  ++innerIt;
204  }
205  return nValues;
206  }
207 
208 
210  void convertSP2TC(
211  std::vector<std::pair< FullSecID, const SpacePoint*> >& goodSPs,
212  unsigned tcID, double pTValue, int pdgCode)
213  {
214  B2DEBUG(10, "SecMapTrainer::convertSPTC: nGoodHits: " << goodSPs.size());
215 
216  SecMapTrainerTC newTrack(tcID, pTValue, pdgCode);
217 
218  for (const auto& secIDAndSPpair : goodSPs) {
219  FullSecID fullSecID = secIDAndSPpair.first;
220  B2DEBUG(20, "SecMapTrainer::convertSPTC: found fullSecID: " << fullSecID.getFullSecString());
221 
222  newTrack.addHit(SecMapTrainerHit(fullSecID, *secIDAndSPpair.second));
223  }
224 
225  // add vertex (but without real vertexPosition, since origin is assumed)
226  SecMapTrainerHit newVirtualHit(FullSecID(), m_config.vIP);
227 
228  newTrack.addHit(std::move(newVirtualHit));
229 
230  m_tcs.push_back(std::move(newTrack));
231  }
232 
233 
234  public:
235 
237  explicit SecMapTrainer(const std::string& setupName , const std::string& appendix = "") :
238  m_nameSetup(setupName),
240  m_factory(
241  m_config.vIP.X(),
242  m_config.vIP.Y(),
243  m_config.vIP.Z(),
244  m_config.mField),
245 
246  m_filterMill(),
247  m_rootInterface(m_config.secMapName, appendix),
248  m_expNo(std::numeric_limits<unsigned>::max()),
249  m_runNo(std::numeric_limits<unsigned>::max()),
250  m_evtNo(std::numeric_limits<unsigned>::max())
251  {
252  // stretch the cuts:
253 // m_config.pTCuts.first -= m_config.pTCuts.first * m_config.pTSmear;
254 // m_config.pTCuts.second += m_config.pTCuts.second * m_config.pTSmear;
257  }
258 
259 
261  void initialize()
262  {
263  // prepare the filters!
264  // 2 space points:
266 
267  std::vector< std::string> twoHitFilters;
268  for (const auto& filterNameToFunction : TwoSPfilterNamesToFunctions)
269  twoHitFilters.push_back(filterNameToFunction.first);
270 
271  m_rootInterface.initialize2Hit(twoHitFilters);
272  for (auto& nameToFunction : TwoSPfilterNamesToFunctions)
273  m_filterMill.add2HitFilter(nameToFunction);
274 
275 
276  // 3 space points:
277  auto ThreeSPfilterNamesToFunctions(SelectionVariableNamesToFunctions(
279 
280  std::vector< std::string> threeHitFilters;
281  for (const auto& filterNameToFunction : ThreeSPfilterNamesToFunctions)
282  threeHitFilters.push_back(filterNameToFunction.first);
283 
284  m_rootInterface.initialize3Hit(threeHitFilters);
285  for (auto& nameToFunction : ThreeSPfilterNamesToFunctions)
286  m_filterMill.add3HitFilter(nameToFunction);
287  for (auto& nameToFunction : ThreeSPfilterNamesToFunctions)
288  m_filterMill.add3HitFilter(nameToFunction);
289 
290 
291  // 4 space points apparently unused
292  // m_rootInterface.initialize4Hit(m_config.fourHitFilters);
293 
294  // auto FourSPfilterNamesToFunctions( SelectionVariableNamesToFunctions(
295  // VXDTFFilters<SecMapTrainerHit>::fourHitFilter_t() ));
296 
297  // std::vector< std::string> fourHitFilters;
298  // for (const auto& filterNameToFunction :FourSPfilterNamesToFunctions )
299  // fourHitFilters.push_back( filterNameToFunction.first );
300 
301  // m_rootInterface.initialize4Hit(fourHitFilters);
302  // for (auto& nameToFunction : FourSPfilterNamesToFunctions)
303  // m_filterMill.add4HitFilter(nameToFunction);
304 
305  // prevent further modifications:
306  m_filterMill.lockMill();
307  }
308 
310 // void terminate(TFile* file)
311 // { m_rootInterface.write(file); }
312  void terminate()
313  { m_rootInterface.write(); }
314 
316  void initializeEvent(int expNo, int runNo, int evtNo)
317  {
318  m_expNo = expNo;
319  m_runNo = runNo;
320  m_evtNo = evtNo;
321  }
322 
323 
325  const SectorMapConfig& getConfig() { return m_config; }
326 
327 
329  const std::string getSetupName() { return m_nameSetup; }
330 
335  bool storeTC(const SpacePointTrackCand& tc, unsigned iD)
336  {
337  B2DEBUG(10, "SecMapTrainer::storeTC: nHits/threshold: " << tc.getNHits() << "/" << m_config.nHitsMin);
338  // catch TCS which are too short in any case
339  if (tc.getNHits() < m_config.nHitsMin) return false;
340 
341  B2DEBUG(10, "SecMapTrainer::storeTC: hasHitsOnSameSensor: " << tc.hasHitsOnSameSensor());
342  // catch TCs where more than one hit was on the same sensor
343  if (tc.hasHitsOnSameSensor()) return false;
344 
345  // catch TCS where particle type is wrong
346  bool found = false;
347  for (const auto& pdg : m_config.pdgCodesAllowed) {
348  if (tc.getPdgCode() == pdg) found = true;
349  }
350  if (found == false and m_config.pdgCodesAllowed.empty() == false) return false;
351 
352  // check if momentum of TC is within range:
353  auto pT = tc.getMomSeed().Perp();
354  B2DEBUG(10, "SecMapTrainer::storeTC: pT/thresholdmin/-max: " << pT << "/" << m_config.pTmin << "/" <<
355  m_config.pTmax);
356  if (m_config.pTmin > pT or m_config.pTmax < pT) return false;
357 
358  // catch tracks which start too far away from orign
359  B2Vector3D distance2IP = m_config.vIP - tc.getPosSeed();
360  B2DEBUG(10, "SecMapTrainer::storeTC: distance2IP/thresholdXY/-Z: " << distance2IP.Mag() << "/" << m_config.seedMaxDist2IPXY << "/"
362  if (m_config.seedMaxDist2IPXY > 0
363  and m_config.seedMaxDist2IPXY < distance2IP.Perp()) return false;
364  if (m_config.seedMaxDist2IPZ > 0
365  and m_config.seedMaxDist2IPXY < distance2IP.Z()) return false;
366 
367  // collect hits which fullfill all given tests
368  std::vector<std::pair<FullSecID, const SpacePoint*> > goodSPs;
369  for (const SpacePoint* aSP : tc.getHits()) {
370  if (!acceptHit(*aSP)) continue;
371 
372  FullSecID fSecID = m_filtersContainer.getFilters(m_nameSetup)->getFullID(aSP->getVxdID(),
373  aSP->getNormalizedLocalU(), aSP->getNormalizedLocalV());
374  if (fSecID.getFullSecID() == std::numeric_limits<unsigned int>::max())
375  { B2ERROR("a secID for spacePoint not found!"); continue; }
376 
377  goodSPs.push_back({fSecID, aSP});
378  }
379 
380  // catch tracks which have not enough accepted hits.
381  B2DEBUG(10, "SecMapTrainer::storeTC: the TC has now nHits/threshold: " << goodSPs.size() << "/" << m_config.nHitsMin);
382  if (goodSPs.size() < m_config.nHitsMin || goodSPs.size() == 0) return false;
383 
384  // want to have hits going from outer to inner ones
385  if (tc.isOutgoing()) std::reverse(goodSPs.begin(), goodSPs.end());
386 
387 
388  // enfoce a direction in the layer numbering, because else this could generate loops in the sectormap
389  int prevLayerNum = goodSPs.at(0).second->getVxdID().getLayerNumber();
390  for (auto& spCand : goodSPs) {
391  int thisLayerNum = spCand.second->getVxdID().getLayerNumber();
392  // allow same layer
393  if (thisLayerNum > prevLayerNum) {
394  B2DEBUG(20, "Rejected TC due to layer ordering of SPs! previous layer: " << prevLayerNum << " this layer: " << thisLayerNum);
395  return false;
396  }
397  prevLayerNum = thisLayerNum;
398  }
399 
400 
401  convertSP2TC(goodSPs, iD, tc.getMomSeed().Perp(), tc.getPdgCode());
402 
403  return true;
404  }
405 
406 
407 
410  /*
411  FullSecID createSecID(VxdID iD, double uVal, double vVal)
412  {
413  // TODO replace by new secMap-design-approach
414  std::vector<double> uTemp = {0.};
415  uTemp.insert(uTemp.end(), m_config.uSectorDivider.begin(), m_config.uSectorDivider.end());
416  std::vector<double> vTemp = {0.};
417  vTemp.insert(vTemp.end(), m_config.vSectorDivider.begin(), m_config.vSectorDivider.end());
418  auto secID = SectorTools::calcSecID(uTemp, vTemp, {uVal, vVal});
419  if (secID == std::numeric_limits<unsigned short>::max())
420  return FullSecID(std::numeric_limits<unsigned int>::max());
421  return FullSecID(iD, false, secID);
422  }
423  */
424 
425 
428  unsigned processTracks()
429  {
430  unsigned n2HitResults = 0;
431  unsigned n3HitResults = 0;
432  unsigned nTracksProcessed = m_tcs.size();
433 
434  for (const auto& tc : m_tcs) {
435  // two hit:
436  n2HitResults += process2HitCombinations(tc);
437  // three hit:
438  n3HitResults += process3HitCombinations(tc);
439  }
440 
441  m_tcs.clear();
442  B2DEBUG(25, "SecMapTrainer::processTracks: nStoredValues for 2-/3-hit: " << n2HitResults << "/" << n3HitResults);
443 
444  return nTracksProcessed;
445  }
446  };
448 }
449 
Belle2::SectorMapConfig::allowedLayers
std::vector< int > allowedLayers
stores allowed layers to be used (including virtual IP with layer 0).
Definition: SectorMapConfig.h:54
Belle2::SectorMapConfig::seedMaxDist2IPXY
double seedMaxDist2IPXY
Stores a cut for maximum distance of the seed in xy of the given virtual IP.
Definition: SectorMapConfig.h:71
Belle2::SecMapTrainer::convertSP2TC
void convertSP2TC(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
Definition: SecMapTrainer.h:218
Belle2::B2Vector3::Perp
DataType Perp() const
The transverse component (R in cylindrical coordinate system).
Definition: B2Vector3.h:199
Belle2::SecMapTrainer::m_runNo
unsigned m_runNo
contains current run number.
Definition: SecMapTrainer.h:86
Belle2::SecMapTrainer::process3HitCombinations
unsigned process3HitCombinations(const SecMapTrainerTC &aTC)
processes all three-hit-combinations of given TC and stores their results.
Definition: SecMapTrainer.h:165
Belle2::FilterMill::HitTriplet::center
const PointType * center
center hit.
Definition: FilterMill.h:91
Belle2::SecMapTrainer::SecMapTrainer
SecMapTrainer(const std::string &setupName, const std::string &appendix="")
constructor.
Definition: SecMapTrainer.h:245
Belle2::FilterMill::HitPair::outer
const PointType * outer
outer hit.
Definition: FilterMill.h:84
Belle2::SecMapTrainer::getSetupName
const std::string getSetupName()
returns the name of the setup used for this trainer
Definition: SecMapTrainer.h:337
Belle2::SecMapTrainer::processTracks
unsigned processTracks()
for given normalized local variables and VxdID a FullSecID is determined.
Definition: SecMapTrainer.h:436
Belle2::FilterMill::HitTriplet::inner
const PointType * inner
inner hit.
Definition: FilterMill.h:92
Belle2::VXDTFFilters
Class that contains all the static sectors to which the filters are attached.
Definition: VXDTFFilters.h:75
Belle2::SecMapTrainer::m_tcs
std::vector< SecMapTrainerTC > m_tcs
contains tcs of event, reset after each event.
Definition: SecMapTrainer.h:78
Belle2::SecMapTrainer::getConfig
const SectorMapConfig & getConfig()
returns configuration.
Definition: SecMapTrainer.h:333
Belle2::RawSecMapRootInterface::write
void write()
write all trees to file at end of processing.
Definition: RawSecMapRootInterface.h:228
Belle2::SecMapTrainer::m_config
SectorMapConfig m_config
Contains all relevant configurations needed for training a sectorMap.
Definition: SecMapTrainer.h:64
Belle2::SecMapTrainer::m_nameSetup
const std::string m_nameSetup
name of the setting to be used for this training
Definition: SecMapTrainer.h:56
Belle2::SecMapTrainer::m_rootInterface
RawSecMapRootInterface m_rootInterface
Interface for nice and neat storing in root-ttree.
Definition: SecMapTrainer.h:74
Belle2::B2Vector3::Z
DataType Z() const
access variable Z (= .at(2) without boundary check)
Definition: B2Vector3.h:434
Belle2::RawSecMapRootInterface::get2HitDataSet
FilterValueDataSet< SecIDPair > & get2HitDataSet()
returns a reference to the 2-hit-dataset so one can set the relevant values.
Definition: RawSecMapRootInterface.h:191
Belle2::RawSecMapRootInterface::initialize3Hit
void initialize3Hit(std::vector< std::string > filterNames)
initialize the RawSecMapRootInterface for three-hit-combinations (to be called in Module::initialize(...
Definition: RawSecMapRootInterface.h:151
Belle2::SecMapTrainer::acceptHit
bool acceptHit(const SpacePoint &hit)
checks if given Hit is acceptable for this trainer.
Definition: SecMapTrainer.h:97
Belle2::SpacePoint
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:52
Belle2::SecMapTrainer::m_expNo
unsigned m_expNo
contains current experiment number.
Definition: SecMapTrainer.h:82
Belle2::SecMapTrainer::m_filtersContainer
FiltersContainer< SpacePoint > & m_filtersContainer
a reference to the singleton FiltersContainer used for this training.
Definition: SecMapTrainer.h:60
Belle2::FilterMill::HitPair::inner
const PointType * inner
inner hit.
Definition: FilterMill.h:85
Belle2::B2Vector3< double >
Belle2::SecMapTrainer::initialize
void initialize()
initialize the trainer (to be called in Module::initialize().
Definition: SecMapTrainer.h:269
Belle2::SecMapTrainer::m_factory
FilterFactoryType m_factory
A factory taking care of having the correct filters prepared for secMapTraining.
Definition: SecMapTrainer.h:67
Belle2::FullSecID::getFullSecID
unsigned int getFullSecID() const
returns the FullSecID coded as integer for further use (can be reconverted to FullSecID by using Full...
Definition: FullSecID.h:160
Belle2::SectorMapConfig::seedMaxDist2IPZ
double seedMaxDist2IPZ
Stores a cut for maximum distance of the seed in z of the given virtual IP.
Definition: SectorMapConfig.h:76
Belle2::RawSecMapRootInterface
To be used as an interface to root-stuff.
Definition: RawSecMapRootInterface.h:42
Belle2::SelectionVariableNamesToFunctions
std::unordered_map< std::string, typename Variable::functionType > SelectionVariableNamesToFunctions(Belle2::Filter< Variable, Range, Options... >)
Return a map from the SelectionVariable name to the SelectionVariable function of the Variable used i...
Definition: SelectionVariableNamesToFunctions.h:45
Belle2::SecMapTrainer::m_filterMill
FilterMill< SecMapTrainerHit > m_filterMill
Stores the prepared filters and applies them on given hit-combinations.
Definition: SecMapTrainer.h:70
Belle2::FullSecID
Class to identify a sector inside of the VXD.
Definition: FullSecID.h:43
Belle2::RawSecMapRootInterface::initialize2Hit
void initialize2Hit(std::vector< std::string > filterNames)
initialize the RawSecMapRootInterface for two-hit-combinations (to be called in Module::initialize().
Definition: RawSecMapRootInterface.h:110
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SectorMapConfig::pTmin
double pTmin
stores pTCuts for min pT allowed for this .
Definition: SectorMapConfig.h:45
Belle2::RawSecMapRootInterface::fill3Hit
void fill3Hit()
fill three-hit-combinations in tree, triggers an Error if values not set yet.
Definition: RawSecMapRootInterface.h:215
Belle2::SectorMapConfig::pTSmear
double pTSmear
allows smearing of the cuts.
Definition: SectorMapConfig.h:51
Belle2::SecMapTrainer::initializeEvent
void initializeEvent(int expNo, int runNo, int evtNo)
Initialize event.
Definition: SecMapTrainer.h:324
Belle2::SectorMapConfig::pTmax
double pTmax
stores pTCuts for min (.first) and max (.second) ptCut.
Definition: SectorMapConfig.h:47
Belle2::SecMapTrainer::storeTC
bool storeTC(const SpacePointTrackCand &tc, unsigned iD)
checks if given TC is acceptable for this trainer and store it if it is accepted.
Definition: SecMapTrainer.h:343
Belle2::FilterMill
Small class which stores the filters/selectionVariables to be used for a secMap and has an interface ...
Definition: FilterMill.h:35
Belle2::SecMapTrainerHit
simple Hit class used for sectorMap-training.
Definition: SecMapTrainerHit.h:35
Belle2::SectorMapConfig::nHitsMin
unsigned nHitsMin
Stores the minimal number of hits a TC must have to be accepted as TC (vIP-Hits are ignored).
Definition: SectorMapConfig.h:80
Belle2::RawSecMapRootInterface::get3HitDataSet
FilterValueDataSet< SecIDTriplet > & get3HitDataSet()
returns a reference to the 3-hit-dataset so one can set the relevant values.
Definition: RawSecMapRootInterface.h:195
Belle2::FiltersContainer::getInstance
static FiltersContainer & getInstance()
one and only way to access the singleton object
Definition: FiltersContainer.h:64
Belle2::SecMapTrainer::m_evtNo
unsigned m_evtNo
contains current event number.
Definition: SecMapTrainer.h:90
Belle2::SectorMapConfig
simple struct containing all the configuration data needed for the SecMapTrainer.
Definition: SectorMapConfig.h:36
Belle2::FilterMill::HitTriplet
small struct containing pointers to three hits.
Definition: FilterMill.h:89
Belle2::SectorMapConfig::vIP
B2Vector3D vIP
Stores the position of the assumed position of the interaction point - The virtual IP.
Definition: SectorMapConfig.h:84
Belle2::SecMapTrainer::process2HitCombinations
unsigned process2HitCombinations(const SecMapTrainerTC &aTC)
processes all two-hit-combinations of given TC and stores their results.
Definition: SecMapTrainer.h:116
Belle2::FilterMill::HitPair
small struct containing pointers to two hits.
Definition: FilterMill.h:83
Belle2::SecMapTrainer::terminate
void terminate()
initialize the trainer (to be called in Module::terminate().
Definition: SecMapTrainer.h:320
Belle2::FullSecID::getFullSecString
std::string getFullSecString() const
returns the FullSecID coded as string compatible to secIDs stored in the xml-sectormaps
Definition: FullSecID.cc:119
Belle2::FilterMill::HitTriplet::outer
const PointType * outer
outer hit.
Definition: FilterMill.h:90
Belle2::SecMapTrainerTC::ConstIterator
typename std::vector< SecMapTrainerHit >::const_iterator ConstIterator
typedef for more readable iterator-type
Definition: SecMapTrainerTC.h:42
Belle2::B2Vector3::Mag
DataType Mag() const
The magnitude (rho in spherical coordinate system).
Definition: B2Vector3.h:158
Belle2::SectorMapConfig::pdgCodesAllowed
std::vector< int > pdgCodesAllowed
Stores all the pdgCodes which are allowed to be used by the SecMap.
Definition: SectorMapConfig.h:66
Belle2::RawSecMapRootInterface::fill2Hit
void fill2Hit()
fill two-hit-combinations in tree, triggers an Error if values not set yet.
Definition: RawSecMapRootInterface.h:201