Belle II Software  release-05-02-19
SectorMapBootstrapModule.cc
1 /********************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Eugenio Paoloni, Thomas Lueck *
7  * *
8  * This software is provided "as is" without any warranty. *
9  *******************************************************************************/
10 
11 #include <iostream>
12 
13 #include <tracking/trackFindingVXD/filterMap/map/FiltersContainer.h>
14 #include "tracking/trackFindingVXD/environment/VXDTFFilters.h"
15 #include "tracking/modules/vxdtfRedesign/SectorMapBootstrapModule.h"
16 //#include "tracking/dataobjects/VXDTFSecMap.h"
17 #include "tracking/dataobjects/SectorMapConfig.h"
18 #include <tracking/spacePointCreation/SpacePoint.h>
19 
20 // needed for complicated parameter types to not get an undefined reference error
21 #include <framework/core/ModuleParam.templateDetails.h>
22 
23 #include <vxd/geometry/GeoCache.h>
24 #include <vxd/geometry/SensorInfoBase.h>
25 
26 #include <TString.h>
27 #include <TFile.h>
28 #include <TTree.h>
29 
30 #include <algorithm>
31 #include <fstream>
32 
33 
34 using namespace Belle2;
35 using namespace std;
36 
37 REG_MODULE(SectorMapBootstrap);
38 
40 {
41 
43 
44  setDescription("Create the VXDTF SectorMap for the following modules."
45  );
46 
47  addParam("SectorMapsInputFile", m_sectorMapsInputFile,
48  "File from which the SectorMaps will be retrieved if\
49  ReadSectorMap is set to true", m_sectorMapsInputFile);
50 
51  addParam("SectorMapsOutputFile", m_sectorMapsOutputFile,
52  "File into which the SectorMaps will be written if\
53  WriteSectorMap is set to true", m_sectorMapsOutputFile);
54 
55  addParam("ReadSectorMap", m_readSectorMap, "If set to true \
56 retrieve the SectorMaps from SectorMapsInputFile during initialize.", m_readSectorMap);
57 
58  addParam("WriteSectorMap", m_writeSectorMap, "If set to true \
59 at endRun write the SectorMaps to SectorMapsOutputFile.", m_writeSectorMap);
60 
61  addParam("SetupToRead", m_setupToRead, "If non empty only the setup with the given name will be read"
62  " from the from the root file. All other will be ignored. If empty \"\" (default) all setups are read. Will "
63  "only used if sectormap is retrieved from root file. Case will be ignored!",
64  std::string(""));
65 
66  addParam("ReadSecMapFromDB", m_readSecMapFromDB, "If set to true the sector map will be read from the Data Base. NOTE: this will "
67  "override the parameter ReadSectorMap (reading sector map from file)!!!", m_readSecMapFromDB);
68 
69 
70  // dummy vector needed to get the current structure of the filter
71  std::vector< std::pair<char, void*> > dummyVector = {};
72 
74  // the structure is the same for all specializations of the template
75  std::string structure2HitFilter = empty2HitFilter.getNameAndReference(&dummyVector);
76  dummyVector.clear();
77  addParam("twoHitFilterAdjustFunctions", m_twoHitFilterAdjustFunctions,
78  "Vector of vectors containing expressions used to "
79  "alter the 2-hit filters. The inner vector should contain exactly two strings. The first entry is interpreted as index (integer). "
80  "The second entry is interpreted as function used to create a TF1. The variable to be altered will be assumed to be called \"x\" "
81  "and in addition one can use \"[0]\" can be used which will be interpreted as FullSecID of the static sector the filter is attached to. "
82  "No other parameter is allowed. The structure of the 2-hit filter is as follows: " + structure2HitFilter +
83  " Example: [(1, \"12\"), (3, \"sin(x)\"), (4, \"x + [0]\")] PS: use this feature only if you know what you are doing!",
85 
87  // the structure is the same for all specializations of the template
88  std::string structure3HitFilter = empty3HitFilter.getNameAndReference(&dummyVector);
89  dummyVector.clear();
90  addParam("threeHitFilterAdjustFunctions", m_threeHitFilterAdjustFunctions,
91  "Vector of vectors containing expressions used to "
92  "alter the 3-hit filters. The inner vector should contain exactly two strings. The first entry is interpreted as index (integer). "
93  "The second entry is interpreted as function used to create a TF1. The variable to be altered will be assumed to be called \"x\" "
94  "and in addition \"[0]\" can be used which will be interpreted as FullSecID of the static sector the filter is attached to. No other "
95  "parameter is allowd. The structure of the 2-hit filter is as follows: " + structure3HitFilter +
96  " Example: [(1, \"12\"), (3, \"sin(x)\"), (4, \"x + [0]\")] PS: use this feature only if you know what you are doing!",
98 }
99 
100 void
102 {
103 
104  // in case sector map is read from the DB one needs to set the DB pointer
105  if (m_readSecMapFromDB) {
106  B2DEBUG(1, "SectorMapBootstrapModule: Retrieving sectormap from DB. Filename: " << m_sectorMapsInputFile);
108  if (m_ptrDBObjPtr == nullptr) B2FATAL("SectorMapBootstrapModule: the DBObjPtr is not initialized");
109  // add a callback function so that the sectormap is updated each time the DBObj changes
111  }
112  // retrieve the SectorMap or create an empty one
115  else
117 
118  // security measurement: test if output file exists so that existing sector maps are not overwritten
119  if (m_writeSectorMap) {
120  if (std::ifstream(m_sectorMapsOutputFile.c_str())) {
121  B2FATAL("Detected existing output file! Please delete or move before proceeding! File name: " << m_sectorMapsOutputFile);
122  } else {
123  B2DEBUG(1, "Checked that output file does not exist!");
124  }
125  }
126 
127 
128 
129 }
130 
131 void
133 {
134 }
135 
136 
137 void
139 {
140 }
141 
142 void
144 {
145 
146 
147  // TODO: Most of these informations are not used at all.
148  // It seems to me (EP) that only the SectorDividers are used.
149 
150  // TODO: find a better way to put the configs into the framework
151 
152  // WARNING: chose the names of the configs in that way that they are not contained in each other!
153  // E.g. having two configs with names "BobTheGreat" and "Bob" is not allowed as it will cause problems in some modules!
154 
155 
156  // for now declare this as default config for SVD only tracking!
157  SectorMapConfig config1;
158 // config1.pTmin = 0.02;
159 // config1.pTmax = 0.08;
160  config1.pTmin = 0.02; // minimal relevant version
161  config1.pTmax = 6.0; // minimal relevant version // Feb18-onePass-Test
162  config1.pTSmear = 0.;
163  config1.allowedLayers = {0, 3, 4, 5, 6};
164 // config1.uSectorDivider = { .15, .5, .85, 1.};
165 // config1.vSectorDivider = { .1, .3, .5, .7, .9, 1.};
166  config1.uSectorDivider = { .3, .7, 1.}; // standard relevant version
167  config1.vSectorDivider = { .3, .7, 1.}; // standard relevant version
168 // config1.uSectorDivider = { .5, 1.}; // small relevant version
169 // config1.vSectorDivider = { .5, 1.}; // small relevant version
170 // config1.uSectorDivider = { 1.}; // minimal relevant version
171 // config1.vSectorDivider = { 1.}; // minimal relevant version
172  config1.pdgCodesAllowed = {};
173  config1.seedMaxDist2IPXY = 23.5;
174  config1.seedMaxDist2IPZ = 23.5;
175  config1.nHitsMin = 3;
176  config1.vIP = B2Vector3D(0, 0, 0);
177  config1.secMapName = "SVDOnlyDefault"; // has been: "lowTestRedesign";
178  config1.mField = 1.5;
179  config1.rarenessThreshold = 0.; //0.001;
180  config1.quantiles = {0., 1.}; //{0.005, 1. - 0.005};
181  // TODO: still missing: minimal sample-size, quantiles for smaller samplesizes, threshshold small <-> big sampleSize.
182  bootstrapSectorMap(config1);
183 
184 
185  // same as config1 but allows the PXD layers
186  // default for VXD tracking (SVD+PXD)
187  SectorMapConfig config1point1;
188  config1point1.pTmin = 0.02; // minimal relevant version
189  config1point1.pTmax = 6.0; // minimal relevant version // Feb18-onePass-Test
190  config1point1.pTSmear = 0.;
191  config1point1.allowedLayers = {0, 1, 2, 3, 4, 5, 6};
192  config1point1.uSectorDivider = { .3, .7, 1.}; // standard relevant version
193  config1point1.vSectorDivider = { .3, .7, 1.}; // standard relevant version
194  config1point1.pdgCodesAllowed = {};
195  config1point1.seedMaxDist2IPXY = 23.5;
196  config1point1.seedMaxDist2IPZ = 23.5;
197  config1point1.nHitsMin = 3;
198  config1point1.vIP = B2Vector3D(0, 0, 0);
199  config1point1.secMapName = "SVDPXDDefault"; // has been: "lowTestSVDPXD";
200  config1point1.mField = 1.5;
201  config1point1.rarenessThreshold = 0.; //0.001;
202  config1point1.quantiles = {0., 1.}; //{0.005, 1. - 0.005};
203  bootstrapSectorMap(config1point1);
204 
205 }
206 
207 void
209 {
210  if (m_writeSectorMap)
212 }
213 
214 void
216 {
217 
218  // TODO: change naming! This is poor naming as these include also Triplet filters!
219  VXDTFFilters<SpacePoint>* segmentFilters = new VXDTFFilters<SpacePoint>();
220  segmentFilters->setConfig(config);
221 
222  // TO DO: All these informations must be retrieved from the geometry
223  CompactSecIDs compactSecIds;
224 
225  vector< double > uDividersMinusLastOne = config.uSectorDivider;
226  uDividersMinusLastOne.pop_back();
227  vector< double > vDividersMinusLastOne = config.vSectorDivider;
228  vDividersMinusLastOne.pop_back();
229 
230 
231  vector< vector< FullSecID > > sectors;
232 
233  sectors.resize(config.uSectorDivider.size());
234  unsigned nSectorsInU = config.uSectorDivider.size(),
235  nSectorsInV = config.vSectorDivider.size();
236 
237  // retrieve the full list of sensors from the geometry
239  std::vector<VxdID> listOfSensors = geometry.getListOfSensors();
240  for (VxdID aSensorId : listOfSensors) {
241 
242  // filter only those sensors on layers which are specified in the config
243  if (std::find(config.allowedLayers.begin(), config.allowedLayers.end(),
244  aSensorId.getLayerNumber()) == config.allowedLayers.end()) continue;
245 
246  // for testbeams there might be other sensors in the geometry so filter for SVD and PXD only, as the CompactSecID dont like those!
247  VXD::SensorInfoBase::SensorType type = geometry.getSensorInfo(aSensorId).getType();
248  if (type != VXD::SensorInfoBase::SVD && type != VXD::SensorInfoBase::PXD) {
249  B2WARNING("Found sensor which is not PXD or SVD with VxdID: " << aSensorId << " ! Will skip that sensor ");
250  continue;
251  }
252 
253  int counter = 0;
254  for (unsigned int i = 0; i < nSectorsInU; i++) {
255  sectors.at(i).resize(nSectorsInV);
256  for (unsigned int j = 0; j < nSectorsInV ; j++) {
257  sectors.at(i).at(j) = FullSecID(aSensorId, false, counter);
258  counter ++;
259  }
260  }
261  segmentFilters->addSectorsOnSensor(uDividersMinusLastOne ,
262  vDividersMinusLastOne,
263  sectors) ;
264  }//end loop over sensors
265 
266 
267  // if layer 0 is specified in the config then the virtual IP is added
268  if (std::find(config.allowedLayers.begin(), config.allowedLayers.end(), 0) != config.allowedLayers.end()) {
269  std::vector<double> uCuts4vIP = {}, vCuts4vIP = {};
270  sectors.clear();
271  sectors = {{ FullSecID(0) }};
272  segmentFilters->addSectorsOnSensor(uCuts4vIP, vCuts4vIP, sectors);
273  }
274 
275  // put config into the container
276  FiltersContainer<SpacePoint>::getInstance().assignFilters(config.secMapName, segmentFilters);
277 
278 }
279 
280 
282 void
284 {
285 
286  // the "CREATE" option results in the root file not being opened if it already exists (to prevent overwriting existing sectormaps)
287  TFile rootFile(m_sectorMapsOutputFile.c_str() , "CREATE");
288  if (!rootFile.IsOpen()) B2FATAL("Unable to open rootfile! This could be caused by an already existing file of the same name: "
289  << m_sectorMapsOutputFile.c_str());
290 
291  TTree* tree = new TTree(c_setupKeyNameTTreeName.c_str(),
292  c_setupKeyNameTTreeName.c_str());
293 
294  TString setupKeyName;
295 
296  tree->Branch(c_setupKeyNameBranchName.c_str(),
297  & setupKeyName);
298 
299  auto allSetupsFilters = FiltersContainer<SpacePoint>::getInstance().getAllSetups();
300  for (auto singleSetupFilters : allSetupsFilters) {
301 
302  setupKeyName = TString(singleSetupFilters.first.c_str());
303 
304  tree->Fill();
305 
306  rootFile.mkdir(setupKeyName, setupKeyName);
307  rootFile.cd(setupKeyName);
308 
309  singleSetupFilters.second->persistOnRootFile();
310 
311  rootFile.cd("..");
312 
313  }
314 
315  rootFile.Write();
316  rootFile.Close();
317 
318 
319 }
320 
321 
323 void
325 {
326 
327  std::string rootFileName = m_sectorMapsInputFile;
328  // if reading from the DB get the root file name from the DB object ptr
329  if (m_readSecMapFromDB) {
330  if (m_ptrDBObjPtr == nullptr) B2FATAL("SectorMapBootstrapModule: the pointer to the DB payload is not set!");
331  if (!(*m_ptrDBObjPtr).isValid()) B2FATAL("SectorMapBootstrapModule the DB object is not valid!");
332 
333  rootFileName = (*m_ptrDBObjPtr)->getFileName();
334  }
335 
336  B2DEBUG(1, "SectorMapBootstrapModule: retrieving new SectorMap. New file name: " << rootFileName);
337  TFile rootFile(rootFileName.c_str());
338 
339  // some cross check that the file is open
340  if (!rootFile.IsOpen()) B2FATAL("The root file: " << rootFileName << " was not found.");
341 
342  TTree* tree = nullptr;
343  rootFile.GetObject(c_setupKeyNameTTreeName.c_str(), tree);
344  if (tree == nullptr) B2FATAL("SectorMapBootstrapModule: tree not found! tree name: " << c_setupKeyNameTTreeName.c_str());
345 
346  TString* setupKeyName = nullptr;
347  tree->SetBranchAddress(c_setupKeyNameBranchName.c_str(),
348  & setupKeyName);
349  if (setupKeyName == nullptr) B2FATAL("SectorMapBootstrapModule: setupKeyName not found");
350 
351  // ignore case, so only upper case
352  TString setupToRead_upper = m_setupToRead;
353  setupToRead_upper.ToUpper();
354 
355  // to monitor if anything was read from the root files
356  bool read_something = false;
357 
359  auto nEntries = tree->GetEntriesFast();
360  for (int i = 0; i < nEntries ; i++) {
361  tree->GetEntry(i);
362 
363  // if a setup name is specified only read that one
364  if (setupToRead_upper != "") {
365  TString buff = setupKeyName->Data();
366  buff.ToUpper();
367  if (buff != setupToRead_upper) continue;
368  }
369 
370  rootFile.cd(setupKeyName->Data());
371 
372  B2DEBUG(1, "Retrieving SectorMap with name " << setupKeyName->Data());
373 
374  VXDTFFilters<SpacePoint>* segmentFilters = new VXDTFFilters<SpacePoint>();
375 
376  string setupKeyNameStd = string(setupKeyName->Data());
377  segmentFilters->retrieveFromRootFile(setupKeyName);
378 
379  // if the m_twoHitFilterAdjustFunctions m_threeHitFilterAdjustFunctions are non empty filters will be altered
380  if (m_twoHitFilterAdjustFunctions.size() > 0) {
381  B2WARNING("The 2-hit filters will be altered from the default!");
382  B2INFO("The following set of indizes and functions will be used to alter the 2-hit filters:");
383  for (auto& entry : m_twoHitFilterAdjustFunctions) {
384  B2INFO("index=" << std::get<0>(entry) << " function=" << std::get<1>(entry));
385  }
387  }
388  if (m_threeHitFilterAdjustFunctions.size() > 0) {
389  B2WARNING("The 3-hit filters will be altered from the default!");
390  B2INFO("The following set of indizes and functions will be used to alter the 3-hit filters:");
391  for (auto& entry : m_threeHitFilterAdjustFunctions) {
392  B2INFO("index=" << std::get<0>(entry) << " function=" << std::get<1>(entry));
393  }
395  }
396 
397  // locks all functions that can modify the filters
398  segmentFilters->lockFilters();
399 
400  B2DEBUG(1, "Retrieved map with name: " << setupKeyNameStd << " from rootfie.");
401  filtersContainer.assignFilters(setupKeyNameStd, segmentFilters);
402 
403  rootFile.cd("..");
404 
405  setupKeyName->Clear();
406 
407  read_something = true;
408  }
409 
410  if (!read_something) B2FATAL("SectorMapBootstrapModule: No setup was read from the root file! " <<
411  "The requested setup name was: " << m_setupToRead);
412 
413  rootFile.Close();
414 
415  // delete the TString which was allocated by ROOT but not cleaned up
416  if (setupKeyName != nullptr) {
417  delete setupKeyName;
418  }
419 
420 }
421 
422 
Belle2::SectorMapBootstrapModule::SectorMapBootstrapModule
SectorMapBootstrapModule()
Constructor.
Definition: SectorMapBootstrapModule.cc:39
Belle2::SectorMapConfig::allowedLayers
std::vector< int > allowedLayers
stores allowed layers to be used (including virtual IP with layer 0).
Definition: SectorMapConfig.h:54
Belle2::VXDTFFilters::modify2SPFilters
void modify2SPFilters(const std::vector< std::tuple< int, std::string > > &adjustFunctions)
modifies the 2SP-filters according to the functions given
Definition: VXDTFFilters.h:366
Belle2::SectorMapConfig::quantiles
std::pair< double, double > quantiles
the quantiles to be chosen in the end for determining the cuts first is quantile, second is 1-quantil...
Definition: SectorMapConfig.h:96
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::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::VXD::SensorInfoBase::SensorType
SensorType
Enum specifing the type of sensor the SensorInfo represents.
Definition: SensorInfoBase.h:43
Belle2::DBObjPtr< PayloadFile >
Specialization of DBObjPtr in case of PayloadFiles.
Definition: PayloadFile.h:64
Belle2::FiltersContainer
This class contains everything needed by the VXDTF that is not going to change during a RUN,...
Definition: FiltersContainer.h:38
Belle2::Module::setDescription
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:216
Belle2::SectorMapBootstrapModule::m_threeHitFilterAdjustFunctions
std::vector< std::tuple< int, std::string > > m_threeHitFilterAdjustFunctions
vector of tuple<int, string> specifying how 3-hit filters are altered.
Definition: SectorMapBootstrapModule.h:96
Belle2::SectorMapBootstrapModule::m_sectorMapsInputFile
std::string m_sectorMapsInputFile
the name of the input root file the sectormaps are read from
Definition: SectorMapBootstrapModule.h:77
Belle2::VXDTFFilters
Class that contains all the static sectors to which the filters are attached.
Definition: VXDTFFilters.h:75
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::Module::c_ParallelProcessingCertified
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:82
Belle2::VXDTFFilters::retrieveFromRootFile
bool retrieveFromRootFile(const TString *dirName)
Retrieves from the current TDirectory all the VXDTFFilters.
Definition: VXDTFFilters.h:317
Belle2::SectorMapBootstrapModule::m_writeSectorMap
bool m_writeSectorMap
if true the sectormap will be written to an output file
Definition: SectorMapBootstrapModule.h:104
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::SectorMapBootstrapModule::initialize
void initialize() override
Initialize the Module.
Definition: SectorMapBootstrapModule.cc:101
Belle2::Module::setPropertyFlags
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:210
Belle2::SectorMapBootstrapModule::event
void event() override
This method is the core of the module.
Definition: SectorMapBootstrapModule.cc:138
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::FullSecID
Class to identify a sector inside of the VXD.
Definition: FullSecID.h:43
Belle2::SectorMapBootstrapModule::m_sectorMapsOutputFile
std::string m_sectorMapsOutputFile
the name of the ouput root file the sectormaps are written to
Definition: SectorMapBootstrapModule.h:79
Belle2::B2Vector3D
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:507
Belle2::VXDTFFilters::lockFilters
void lockFilters()
This function should be called only AFTER all adjustments to the filters have been performed.
Definition: VXDTFFilters.h:361
Belle2::SectorMapBootstrapModule::m_readSecMapFromDB
bool m_readSecMapFromDB
if true the sector map will be read from the DB. NOTE: this will override m_readSectorMap (read from ...
Definition: SectorMapBootstrapModule.h:99
Belle2::VXD::GeoCache::getInstance
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:215
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::SectorMapConfig::vSectorDivider
std::vector< double > vSectorDivider
Defines the sectors boundaries in normalized v coordinates (i.e.
Definition: SectorMapConfig.h:62
Belle2::SectorMapConfig::pTSmear
double pTSmear
allows smearing of the cuts.
Definition: SectorMapConfig.h:51
Belle2::SectorMapConfig::pTmax
double pTmax
stores pTCuts for min (.first) and max (.second) ptCut.
Definition: SectorMapConfig.h:47
Belle2::FiltersContainer::assignFilters
void assignFilters(const std::string &setupName, VXDTFFilters< point_t > *filters)
assigns filters.
Definition: FiltersContainer.h:98
Belle2::SectorMapBootstrapModule::m_setupToRead
std::string m_setupToRead
if specified (non "") ONLY the setup with this name will be read. Else all setups in the root file wi...
Definition: SectorMapBootstrapModule.h:82
Belle2::VXDTFFilters::modify3SPFilters
void modify3SPFilters(const std::vector< std::tuple< int, std::string > > &adjustFunctions)
modifies the 3SP-filters according to the functions given
Definition: VXDTFFilters.h:383
Belle2::CompactSecIDs
This class provides a computer convenient numbering scheme for the sectors in the sector map and for ...
Definition: CompactSecIDs.h:38
Belle2::SectorMapBootstrapModule::persistSectorMap
void persistSectorMap(void)
writes a sectormap to a root file
Definition: SectorMapBootstrapModule.cc:283
Belle2::SectorMapBootstrapModule::c_setupKeyNameBranchName
const std::string c_setupKeyNameBranchName
the name of the branch the setupt are stored in the tree
Definition: SectorMapBootstrapModule.h:74
Belle2::VXDTFFilters::addSectorsOnSensor
int addSectorsOnSensor(const std::vector< double > &normalizedUsup, const std::vector< double > &normalizedVsup, const std::vector< std::vector< FullSecID > > &sectorIds)
To add an array of sectors on a sensor.
Definition: VXDTFFilters.h:154
Belle2::VXD::SensorInfoBase::SVD
@ SVD
SVD Sensor.
Definition: SensorInfoBase.h:45
Belle2::VXDTFFilters::setConfig
void setConfig(const SectorMapConfig &config)
set the configuration which is used to create this filter
Definition: VXDTFFilters.h:288
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::SectorMapConfig::rarenessThreshold
double rarenessThreshold
defined 1 == 100%, if relative frequency of sec-combi to the outer-sector is less than threshold,...
Definition: SectorMapConfig.h:93
Belle2::FiltersContainer::getInstance
static FiltersContainer & getInstance()
one and only way to access the singleton object
Definition: FiltersContainer.h:64
Belle2::FiltersContainer::getAllSetups
const setupNameToFilters_t & getAllSetups(void)
returns all the available setups.
Definition: FiltersContainer.h:91
Belle2::VXD::SensorInfoBase::PXD
@ PXD
PXD Sensor.
Definition: SensorInfoBase.h:44
Belle2::Module::addParam
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:562
Belle2::VXD::GeoCache
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:41
Belle2::SectorMapBootstrapModule::retrieveSectorMap
void retrieveSectorMap(void)
retrieves SectorMap from file or from the DB
Definition: SectorMapBootstrapModule.cc:324
Belle2::SectorMapConfig
simple struct containing all the configuration data needed for the SecMapTrainer.
Definition: SectorMapConfig.h:36
Belle2::SectorMapConfig::secMapName
std::string secMapName
Sets the human readable proto-name of the sectorMap.
Definition: SectorMapConfig.h:87
Belle2::SectorMapConfig::vIP
B2Vector3D vIP
Stores the position of the assumed position of the interaction point - The virtual IP.
Definition: SectorMapConfig.h:84
Belle2::SectorMapBootstrapModule::bootstrapSectorMap
void bootstrapSectorMap(void)
puts several empty sectormaps into the framework
Definition: SectorMapBootstrapModule.cc:143
Belle2::SectorMapBootstrapModule::m_twoHitFilterAdjustFunctions
std::vector< std::tuple< int, std::string > > m_twoHitFilterAdjustFunctions
vector of tuple<int, string> specifying how 2-hit filters are altered.
Definition: SectorMapBootstrapModule.h:91
Belle2::SectorMapBootstrapModule::beginRun
void beginRun() override
Called when entering a new run.
Definition: SectorMapBootstrapModule.cc:132
Belle2::SectorMapBootstrapModule::m_ptrDBObjPtr
DBObjPtr< PayloadFile > * m_ptrDBObjPtr
pointer to the DBObjPtr for the payloadfile from which the sectormap is read
Definition: SectorMapBootstrapModule.h:85
Belle2::SectorMapBootstrapModule::c_setupKeyNameTTreeName
const std::string c_setupKeyNameTTreeName
the name of the tree the setups are stored in in the root file
Definition: SectorMapBootstrapModule.h:72
Belle2::SectorMapBootstrapModule::endRun
void endRun() override
This method is called if the current run ends.
Definition: SectorMapBootstrapModule.cc:208
Belle2::SectorMapConfig::mField
double mField
Magnetic field value to be set for the filters.
Definition: SectorMapConfig.h:90
Belle2::DBAccessorBase::addCallback
void addCallback(std::function< void(const std::string &)> callback, bool onDestruction=false)
Add a callback method.
Definition: DBAccessorBase.h:108
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::SectorMapConfig::uSectorDivider
std::vector< double > uSectorDivider
Defines the sectors boundaries in normalized u coordinates (i.e.
Definition: SectorMapConfig.h:58
Belle2::SectorMapBootstrapModule::m_readSectorMap
bool m_readSectorMap
if true a sectormap will be read from a file. NOTE: this will be overridden by m_readSecMapFromDB!
Definition: SectorMapBootstrapModule.h:102