Belle II Software  release-05-02-19
RT2SPTCConverterModuleDev.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jonas Wagner *
7  * *
8  **************************************************************************/
9 
10 #include <tracking/modules/spacePointCreator/RT2SPTCConverterModuleDev.h>
11 #include <tracking/spacePointCreation/SpacePointTrackCand.h>
12 
13 #include <framework/dataobjects/EventMetaData.h>
14 #include <framework/datastore/StoreObjPtr.h>
15 
16 #include <algorithm> // find
17 
18 #include <svd/dataobjects/SVDCluster.h>
19 #include <mdst/dataobjects/MCParticle.h>
20 #include <svd/dataobjects/SVDTrueHit.h>
21 #include <pxd/dataobjects/PXDTrueHit.h>
22 
23 using namespace Belle2;
24 using ConversionState = std::bitset<2>;
25 
26 REG_MODULE(RT2SPTCConverter)
27 
29  Module(),
30  m_trackSel(nullptr)
31 
32 {
33  setDescription("Module for converting RecoTracks (e.g. from TrackFinderMCTruth) to SpacePointTrackCands.");
34  setPropertyFlags(c_ParallelProcessingCertified);
35 
36  // input
37  addParam("RecoTracksName", m_RecoTracksName, "Name of container of RecoTracks", std::string(""));
38 
39  // required for conversion
40  addParam("SVDClusters", m_SVDClusterName, "SVDCluster collection name", std::string(""));
41 
42  addParam("SVDSpacePointStoreArrayName", m_svdSpacePointsStoreArrayName, "Name of the collection for SVD.",
43  boost::make_optional<std::string>("SVDSpacePoints"));
44  addParam("PXDSpacePointStoreArrayName", m_pxdSpacePointsStoreArrayName, "Name of the collection for PXD.",
45  boost::make_optional<std::string>("PXDSpacePoints"));
46 
47  // optional input
48  addParam("SVDSingleClusterSP", m_SVDSingleClusterSPName, "SVD single Cluster SpacePoints collection name.", std::string(""));
49 
50  // output
51  addParam("SpacePointTCName", m_SPTCName,
52  "Name of the container under which SpacePointTrackCands will be stored in the DataStore (NOTE: These SpaceTrackCands are not checked for curling behaviour, but are simply converted and stored!)",
53  std::string(""));
54 
55  // parameters
56  addParam("minSP", m_minSP,
57  "Minimum number of SpacePoints a SpacePointTrackCand has to contain in order to get registered in the DataStore. If set to 0, any number is accepted",
58  0);
59 
60  addParam("useTrueHits", m_useTrueHits, "Converts clusters via their relations to TrueHits.", false);
61 
62  addParam("skipProblematicCluster", m_skipProblematicCluster,
63  "If set to true clusters that could not be converted are skipped instead of throwing away the complete SPTC",
64  false);
65 
66  addParam("useSingleClusterSP", m_useSingleClusterSP, "Set to true if these SpacePoints should be used as fallback.", false);
67 
68  addParam("markRecoTracks", m_markRecoTracks, "If True RecoTracks where conversion problems occurred are marked dirty.", false);
69 
70  addParam("noKickCutsFile", m_noKickCutsFile,
71  "TFile that contains the list of cuts to select trainins sample. If parameter left empty NoKickCuts are not applied",
72  std::string(""));
73 
74  addParam("noKickOutput", m_noKickOutput,
75  "If true produce a TFile with some histograms useful to understand behaviour of training sample selection", false);
76 
77  addParam("ignorePXDHits", m_ignorePXDHits, "If true no PXD hits will be used when creating the SpacePointTrackCand", bool(false));
78 
79  addParam("convertFittedOnly", m_convertFittedOnly, "If true only RecoTracks with successful fit will be converted to "
80  "SpacePointTrackCands", m_convertFittedOnly);
81 
82  initializeCounters();
83 }
84 
87 {
88  if (m_trackSel) delete m_trackSel;
89 }
90 
91 // ------------------------------ INITIALIZE ---------------------------------------
93 {
94  B2INFO("RT2SPTCConverter -------------- initialize() ---------------------");
95  // initialize Counters
97 
98  // check if all required StoreArrays are here
99  StoreArray<SVDCluster> SVDClusters; SVDClusters.isRequired(m_SVDClusterName);
101  StoreArray<SpacePoint> spacePoints;
102  spacePoints.isRequired(*m_pxdSpacePointsStoreArrayName);
103  }
105  StoreArray<SpacePoint> spacePoints;
106  spacePoints.isRequired(*m_svdSpacePointsStoreArrayName);
107  }
108 
109 
111  recoTracks.isRequired(m_RecoTracksName);
112 
113  // registering StoreArray for SpacePointTrackCand
115  spTrackCand.registerInDataStore(m_SPTCName, DataStore::c_ErrorIfAlreadyRegistered);
116 
117  StoreArray<MCParticle> mcparticles;
118  if (mcparticles.isOptional()) {
119  m_mcParticlesPresent = true;
120  }
121 
122  if (m_useTrueHits) {
124  }
125 
126  // register Relation to RecoTrack
127  spTrackCand.registerRelationTo(recoTracks);
128 
130 
131 }
132 
133 // ------------------------------------- EVENT -------------------------------------------------------
135 {
136  StoreObjPtr<EventMetaData> eventMetaDataPtr("EventMetaData", DataStore::c_Event);
137  const int eventCounter = eventMetaDataPtr->getEvent();
138  B2DEBUG(20, "RT2SPTCConverter::event(). Processing event " << eventCounter << " --------");
139 
141  StoreArray<SpacePointTrackCand> spacePointTrackCands(m_SPTCName); // output StoreArray
142 
144 
145  for (auto& recoTrack : m_recoTracks) {
146 
147  // if corresponding flag is set only use fitted tracks
148  if (m_convertFittedOnly and not recoTrack.wasFitSuccessful()) continue;
149 
150  if (m_noKickCutsFile.size() != 0) {
151  bool passCut = m_trackSel->trackSelector(recoTrack);
152  if (!passCut) {
153  m_ncut++;
154  continue; //exclude tracks with catastrophic multiple scattering interactions
155  } else {
156  m_npass++;
157  }
158  }
159  std::pair<std::vector<const SpacePoint*>, ConversionState> spacePointStatePair;
160 
161  // the hit informations from the recotrack, the option "true" will result in a sorted vector
162  std::vector<RecoHitInformation*> hitInfos = recoTrack.getRecoHitInformations(true);
163 
164  // if requested remove the PXD hits
165  // NOTE: in RecoTracks there is also a function to get sorted SVD hits only but this uses not the same code as getRecoHitInformations!
166  if (m_ignorePXDHits) {
167  std::vector<RecoHitInformation*> hitInfos_buff;
168  for (std::vector<RecoHitInformation*>::iterator it = hitInfos.begin(); it < hitInfos.end(); ++it) {
169  if ((*it)->getTrackingDetector() != RecoHitInformation::c_PXD) hitInfos_buff.push_back(*it);
170  }
171  hitInfos = hitInfos_buff;
172  }
173 
174  B2DEBUG(20, "New call getSpacePointsFromRecoHitInformationViaTrueHits. Number of hitInfos: " << hitInfos.size());
175  B2DEBUG(20, "number of SVD hits in RecoTrack : " << recoTrack.getNumberOfSVDHits());
176  B2DEBUG(20, "number of PXD hits in RecoTrack : " << recoTrack.getNumberOfPXDHits());
177  B2DEBUG(20, "number of CDC hits in RecoTrack : " << recoTrack.getNumberOfCDCHits());
178 
179  if (m_useTrueHits) {
180  spacePointStatePair = getSpacePointsFromRecoHitInformationViaTrueHits(hitInfos);
181  } else {
182  spacePointStatePair = getSpacePointsFromRecoHitInformations(hitInfos);
183  }
184  B2DEBUG(20, "RT2SPTCConverter::event: Number of SpacePoints: " << spacePointStatePair.first.size() << "State: " <<
185  spacePointStatePair.second);
186 
187  if (int(spacePointStatePair.first.size()) < m_minSP) {
188  B2DEBUG(20, "RT2SPTCConverter::event: Not enough number of SpacePoints: " << spacePointStatePair.first.size() <<
189  " Required Number: "
190  << m_minSP);
191  m_minSPCtr++;
192  continue;
193  }
194 
195  if (spacePointStatePair.second.test(c_undefinedError)) {
198  continue;
199  }
200  if (m_markRecoTracks) recoTrack.setDirtyFlag();
201  }
202 
203  SpacePointTrackCand spacePointTC;
204  if (m_mcParticlesPresent) {
205  MCParticle* mcParticle = recoTrack.getRelatedTo<MCParticle>();
206  spacePointTC = SpacePointTrackCand(spacePointStatePair.first, mcParticle->getPDG(), mcParticle->getCharge(),
207  recoTrack.getArrayIndex());
208  } else {
209  spacePointTC = SpacePointTrackCand(spacePointStatePair.first, 0, 0, recoTrack.getArrayIndex());
210  }
211 
213 
214  if (spacePointStatePair.second.test(c_singleCluster)) {
217  if (m_markRecoTracks) recoTrack.setDirtyFlag();
218  }
219 
220  // convert momentum and position seed into a single 6D seed
221  TVector3 momentumSeed = recoTrack.getMomentumSeed();
222  TVector3 positionSeed = recoTrack.getPositionSeed();
223 
224  TVectorD seed6D(6);
225  seed6D[0] = positionSeed.x();
226  seed6D[1] = positionSeed.y();
227  seed6D[2] = positionSeed.z();
228  seed6D[3] = momentumSeed.Px();
229  seed6D[4] = momentumSeed.Py();
230  seed6D[5] = momentumSeed.Pz();
231  spacePointTC.set6DSeed(seed6D);
232  spacePointTC.setCovSeed(recoTrack.getSeedCovariance());
233 
234  if (spacePointStatePair.second == ConversionState(0)) {
235  m_noFailCtr++;
236  if (m_markRecoTracks) recoTrack.setDirtyFlag(false);
237  }
238 
239  spacePointTrackCands.appendNew(spacePointTC)->addRelationTo(&recoTrack);
240  } // end RecoTrack loop
241 }
242 
243 std::pair<std::vector<const SpacePoint*>, ConversionState>
245 {
246  std::vector<const SpacePoint*> finalSpacePoints;
247  ConversionState state;
248 
249 
250  // loop over all cluster to determine the SpacePoints that define the given RecoTrack.
251  for (const RecoHitInformation* hitInfo : hitInfos) {
252 
253  // ignore all hits that are not SVD or PXD
254  if (hitInfo->getTrackingDetector() != RecoHitInformation::c_SVD && hitInfo->getTrackingDetector() != RecoHitInformation::c_PXD)
255  continue;
256 
257 
258  const VXDTrueHit* relatedTrueHit = NULL;
259  RelationsObject* cluster = NULL;
260 
261  // SVD case
262  if (hitInfo->getTrackingDetector() == RecoHitInformation::c_SVD) {
263  cluster = hitInfo->getRelatedTo<SVDCluster>();
264  if (cluster) {
265  relatedTrueHit = cluster->getRelatedTo<SVDTrueHit>();
266  B2DEBUG(20, "RT2SPTCConverter::getSpacePointsFromClustersViaTrueHits: Number of related SVDTrueHits: " <<
267  cluster->getRelationsTo<SVDTrueHit>().size());
268  }
269  }
270 
271  // PXD case
272  if (hitInfo->getTrackingDetector() == RecoHitInformation::c_PXD) {
273  cluster = hitInfo->getRelatedTo<PXDCluster>();
274  if (cluster) {
275  relatedTrueHit = cluster->getRelatedTo<PXDTrueHit>();
276  B2DEBUG(20, "RT2SPTCConverter::getSpacePointsFromClustersViaTrueHits: Number of related PXDTrueHits: "
277  << cluster->getRelationsTo<PXDTrueHit>().size());
278  }
279  }
280 
281  if (!relatedTrueHit) {
282  state.set(c_undefinedError);
283  B2DEBUG(20, "RT2SPTCConverter::getSpacePointsFromClustersViaTrueHits: TrueHit missing.");
284  if (m_skipProblematicCluster) continue;
285  else break;
286  }
287 
288  // NOTE: double cluster SVD SP and PXD SP should be stored in the same StoreArray!
289  const SpacePoint* relatedSpacePoint = [this, hitInfo, relatedTrueHit]() -> const SpacePoint* {
290  if (m_svdSpacePointsStoreArrayName and hitInfo->getTrackingDetector() == RecoHitInformation::c_SVD) {
291  return relatedTrueHit->getRelatedFrom<SpacePoint>(*m_svdSpacePointsStoreArrayName);
292  }
293  if (m_pxdSpacePointsStoreArrayName and hitInfo->getTrackingDetector() == RecoHitInformation::c_PXD) {
294  return relatedTrueHit->getRelatedFrom<SpacePoint>(*m_pxdSpacePointsStoreArrayName);
295  }
296  return nullptr;
297  }();
298 
299  // special case for the SVD cluster as there is the option for single cluster SP
300  if (hitInfo->getTrackingDetector() == RecoHitInformation::c_SVD) {
301  if (!relatedSpacePoint && m_useSingleClusterSP) {
302  relatedSpacePoint = cluster->getRelatedFrom<SpacePoint>(m_SVDSingleClusterSPName);
303  if (!relatedSpacePoint->getRelatedTo<SVDTrueHit>()) relatedSpacePoint = nullptr;
304  }
305  } // end SVD
306 
307  if (!relatedSpacePoint) {
308  state.set(c_undefinedError);
309  B2DEBUG(20, "RT2SPTCConverter::getSpacePointsFromClustersViaTrueHits: SpacePoint missing.");
310  if (m_skipProblematicCluster) continue;
311  else break;
312  }
313 
314 
315  // Prevent adding the same SpacePoint twice as there are 2 clusters per SP for SVD
316  if (std::find(finalSpacePoints.begin(), finalSpacePoints.end(), relatedSpacePoint) == finalSpacePoints.end()) {
317  finalSpacePoints.push_back(relatedSpacePoint);
318  }
319  }
320  B2DEBUG(20, "RT2SPTCConverter::getSpacePointsFromClustersViaTrueHits: Number of SpacePoints: " << finalSpacePoints.size());
321  return std::make_pair(finalSpacePoints, state);
322 }
323 
324 
325 std::pair<std::vector<const SpacePoint*>, ConversionState>
326 RT2SPTCConverterModule::getSpacePointsFromRecoHitInformations(std::vector<RecoHitInformation*> hitInfos)
327 {
328  std::vector<const SpacePoint*> finalSpacePoints;
329  ConversionState state;
330 
331  // loop over all cluster to determine the SpacePoints that define the given RecoTrack.
332  for (size_t iHit = 0; iHit < hitInfos.size(); ++iHit) {
333 
334  // ignore all hits that are not SVD or PXD
335  if (hitInfos[iHit]->getTrackingDetector() != RecoHitInformation::c_SVD &&
336  hitInfos[iHit]->getTrackingDetector() != RecoHitInformation::c_PXD) continue;
337 
338 
339  std::vector<const SpacePoint*> spacePointCandidates;
342  // simple case PXD : there is a one to one relation between cluster and SpacePoint
343  if (hitInfos[iHit]->getTrackingDetector() == RecoHitInformation::c_PXD) {
344  PXDCluster* pxdCluster = hitInfos.at(iHit)->getRelated<PXDCluster>();
345  SpacePoint* relatedPXDSP = NULL;
346  if (pxdCluster) relatedPXDSP = pxdCluster->getRelated<SpacePoint>(*m_pxdSpacePointsStoreArrayName);
347  // if found a spacepoint one is already done!
348  if (relatedPXDSP) {
349  finalSpacePoints.push_back(relatedPXDSP);
350  continue;
351  }
352  } // end PXD case
353  }
354 
355  // At this point it has to be a SVD cluster, for SVD one has to combine u and v clusters
356  SVDCluster* clusterA = hitInfos.at(iHit)->getRelated<SVDCluster>();
357 
358  // if it is not PXD it has to be a SVD hit so the cluster has to exist!!
359  if (!clusterA) {
360  B2WARNING("SVDCluster to hit not found! This should not happen!");
361  state.set(c_undefinedError);
362  if (m_skipProblematicCluster) continue;
363  else break;
364  }
365 
367  RelationVector<SpacePoint> relatedSpacePointsA = clusterA->getRelationsFrom<SpacePoint>(
369 
370  SVDCluster* clusterB = NULL;
371  if (iHit + 1 < hitInfos.size()) clusterB = hitInfos.at(iHit + 1)->getRelated<SVDCluster>();
372 
373  B2DEBUG(20, "RT2SPTCConverter::getSpacePointsFromClusters: Number of SpacePoints related to first cluster: " <<
374  relatedSpacePointsA.size());
375 
376  // Try to verify SpacePoint by using next cluster to build a U/V pair.
377  if (clusterA && clusterB && (clusterA->isUCluster() != clusterB->isUCluster())) {
378  auto relatedSpacePointsB = clusterB->getRelationsFrom<SpacePoint>(*m_svdSpacePointsStoreArrayName);
379 
380  // determine intersecting SpacePoints.
381  for (const auto& spacePoint : relatedSpacePointsA) {
382  for (const auto& spacePointCompare : relatedSpacePointsB) {
383  // cppcheck-suppress useStlAlgorithm
384  if (spacePoint == spacePointCompare) {
385  spacePointCandidates.push_back(&spacePoint);
386  break;
387  }
388  }
389  }
390  B2DEBUG(20, "RT2SPTCConverter::getSpacePointsFromClusters: Number of intersections with next cluster: " <<
391  spacePointCandidates.size());
392  // Intersection should resolve to the single SpacePoint that was used to create the recoTrack.
393  if (spacePointCandidates.size() == 1) ++iHit;
394  } // end first case
395  }
396 
397  // Look up if it is part of single cluster SP collection. If no dedicated collection is given the default collection will be tried again!
398  if (clusterA && spacePointCandidates.size() != 1 && m_useSingleClusterSP) {
399 
400  // look if it as single cluster!
401  auto relatedSpacePoints = clusterA->getRelationsFrom<SpacePoint>(m_SVDSingleClusterSPName);
402  if (relatedSpacePoints.size() == 1) {
403  state.set(c_singleCluster);
404  spacePointCandidates.push_back(relatedSpacePoints[0]);
405  }
406  } // second case
407 
408  B2DEBUG(20, "RT2SPTCConverter::getSpacePointsFromClusters: Conversion state is: " << state);
409 
410  if (spacePointCandidates.size() != 1) {
411  state.set(c_undefinedError);
412  if (m_skipProblematicCluster) continue;
413  else break;
414  }
415  finalSpacePoints.push_back(spacePointCandidates.at(0));
416  } // end loop hits
417 
418  return std::make_pair(finalSpacePoints, state);
419 }
420 
422 {
423  B2RESULT("Number of Selected Tracks (NoKickRTSel): " << m_npass);
424  B2RESULT("Number of Rejected Tracks (NoKickRTSel): " << m_ncut);
425 
427 }
428 
429 // -------------------------------- TERMINATE --------------------------------------------------------
431 {
432  B2RESULT("RT2SPTCConverter::terminate: Converted " << m_noFailCtr << "Reco Tracks without errors and "
433  << m_singleClusterUseCtr << " Tracks were converted with a single Cluster SpacePoint. "
434  << m_missingTrueHitCtr << " Tracks were skipped because they contained SpacePoints that had no relations to TrueHits, "
435  << m_minSPCtr << " Tracks were skipped because they didn't contain enough SpacePoints and for "
436  << m_undefinedErrorCtr << " Tracks occurred an undefined error.");
437 }
Belle2::RelationVector::size
size_t size() const
Get number of relations.
Definition: RelationVector.h:98
Belle2::StoreArray::appendNew
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:256
Belle2::RT2SPTCConverterModule::m_singleClusterUseCtr
unsigned int m_singleClusterUseCtr
Counts how many tracks contained a single cluster.
Definition: RT2SPTCConverterModuleDev.h:132
Belle2::MCParticle::getCharge
float getCharge() const
Return the particle charge defined in TDatabasePDG.
Definition: MCParticle.cc:35
Belle2::StoreArray::registerRelationTo
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Definition: StoreArray.h:150
Belle2::NoKickRTSel::trackSelector
bool trackSelector(const RecoTrack &track)
This method return true if every segment (see segmentSelector) of the input track respects the cuts c...
Definition: NoKickRTSel.cc:196
Belle2::PXDTrueHit
Class PXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: PXDTrueHit.h:35
Belle2::RT2SPTCConverterModule::m_ignorePXDHits
bool m_ignorePXDHits
PXD hits will be ignored when creating the SP track candidate.
Definition: RT2SPTCConverterModuleDev.h:107
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::RT2SPTCConverterModule::m_minSPCtr
unsigned int m_minSPCtr
Counts how many tracks didn't contain enough SpacePoints after conversion.
Definition: RT2SPTCConverterModuleDev.h:130
Belle2::SpacePointTrackCand::addRefereeStatus
void addRefereeStatus(unsigned short int bitmask)
add a referee status
Definition: SpacePointTrackCand.h:344
Belle2::SVDTrueHit
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: SVDTrueHit.h:35
Belle2::RT2SPTCConverterModule::ConversionState
std::bitset< 2 > ConversionState
Used to store conversionFlags and pass them between methods.
Definition: RT2SPTCConverterModuleDev.h:74
Belle2::RT2SPTCConverterModule::m_SVDClusterName
std::string m_SVDClusterName
SVDCluster collection name.
Definition: RT2SPTCConverterModuleDev.h:95
Belle2::VXDTrueHit
Class VXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: VXDTrueHit.h:38
Belle2::RT2SPTCConverterModule::getSpacePointsFromRecoHitInformationViaTrueHits
std::pair< std::vector< const SpacePoint * >, ConversionState > getSpacePointsFromRecoHitInformationViaTrueHits(std::vector< RecoHitInformation * > hitInfos)
Convert Clusters to SpacePoints using the Relation: Cluster->TrueHit->SpacePoint.
Definition: RT2SPTCConverterModuleDev.cc:244
Belle2::RelationsInterface::addRelationTo
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
Definition: RelationsObject.h:144
Belle2::RT2SPTCConverterModule::m_noKickOutput
bool m_noKickOutput
true=produce TFile with effects of NoKickCuts on tracks
Definition: RT2SPTCConverterModuleDev.h:121
Belle2::RelationsInterface::getRelated
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
Definition: RelationsObject.h:280
Belle2::RelationsInterface::getRelatedTo
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
Definition: RelationsObject.h:250
Belle2::SpacePointTrackCand::setCovSeed
void setCovSeed(const TMatrixDSym &cov)
set the covariance matrix seed
Definition: SpacePointTrackCand.h:313
Belle2::RT2SPTCConverterModule::m_RecoTracksName
std::string m_RecoTracksName
Name of collection of RecoTrack StoreArray.
Definition: RT2SPTCConverterModuleDev.h:102
Belle2::RT2SPTCConverterModule::m_useTrueHits
bool m_useTrueHits
If true the method getSpacePointsFromSVDClustersViaTrueHits is utilized.
Definition: RT2SPTCConverterModuleDev.h:110
Belle2::SpacePoint
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:52
Belle2::RT2SPTCConverterModule::m_SVDSingleClusterSPName
std::string m_SVDSingleClusterSPName
Single Cluster SVD SpacePoints collection name.
Definition: RT2SPTCConverterModuleDev.h:100
Belle2::SpacePointTrackCand::c_checkedTrueHits
@ c_checkedTrueHits
bit 5: All SpacePoints of the SPTC have a relation to at least one TrueHit.
Definition: SpacePointTrackCand.h:86
Belle2::RT2SPTCConverterModule::m_skipProblematicCluster
bool m_skipProblematicCluster
If true problematic clusters are ignored.
Definition: RT2SPTCConverterModuleDev.h:111
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::RT2SPTCConverterModule::m_noKickCutsFile
std::string m_noKickCutsFile
name of TFile of the cuts
Definition: RT2SPTCConverterModuleDev.h:120
Belle2::RT2SPTCConverterModule::getSpacePointsFromRecoHitInformations
std::pair< std::vector< const SpacePoint * >, ConversionState > getSpacePointsFromRecoHitInformations(std::vector< RecoHitInformation * > hitInfos)
Convert Clusters to SpacePoints using the Relation: Cluster->SpacePoint.
Definition: RT2SPTCConverterModuleDev.cc:326
Belle2::SpacePointTrackCand::set6DSeed
void set6DSeed(const TVectorD &state6D)
set the 6D state seed
Definition: SpacePointTrackCand.h:308
Belle2::RelationVector
Class for type safe access to objects that are referred to in relations.
Definition: DataStore.h:38
Belle2::RT2SPTCConverterModule::m_npass
int m_npass
counter of the selected tracks
Definition: RT2SPTCConverterModuleDev.h:125
Belle2::RT2SPTCConverterModule::m_useSingleClusterSP
bool m_useSingleClusterSP
If true use single cluster SpacePoint collection as fallback.
Definition: RT2SPTCConverterModuleDev.h:112
Belle2::RT2SPTCConverterModule::~RT2SPTCConverterModule
~RT2SPTCConverterModule()
Destructor.
Definition: RT2SPTCConverterModuleDev.cc:86
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::RT2SPTCConverterModule::terminate
void terminate() override
Terminate: print some summary information on the processed events.
Definition: RT2SPTCConverterModuleDev.cc:430
Belle2::SpacePointTrackCand::c_singleClustersSPs
@ c_singleClustersSPs
bit 10: SPTC contains single Cluster SpacePoints.
Definition: SpacePointTrackCand.h:93
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::RT2SPTCConverterModule::endRun
void endRun() override
End Run function.
Definition: RT2SPTCConverterModuleDev.cc:421
Belle2::RT2SPTCConverterModule::m_trackSel
NoKickRTSel * m_trackSel
data members used fot the NoKickCuts method
Definition: RT2SPTCConverterModuleDev.h:119
Belle2::MCParticle::getPDG
int getPDG() const
Return PDG code of particle.
Definition: MCParticle.h:123
Belle2::RelationsInterface::getRelationsFrom
RelationVector< FROM > getRelationsFrom(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from another store array to this object.
Definition: RelationsObject.h:214
Belle2::NoKickRTSel::produceHistoNoKick
void produceHistoNoKick()
This method produce the validation histograms (to be used the endrun combined with the filling in tra...
Definition: NoKickRTSel.cc:279
Belle2::RecoHitInformation
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
Definition: RecoHitInformation.h:48
Belle2::RT2SPTCConverterModule::m_pxdSpacePointsStoreArrayName
boost::optional< std::string > m_pxdSpacePointsStoreArrayName
PXD SpacePoints collection names.
Definition: RT2SPTCConverterModuleDev.h:97
Belle2::PXDCluster
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:41
Belle2::SVDCluster::isUCluster
bool isUCluster() const
Get the direction of strips.
Definition: SVDCluster.h:118
Belle2::RT2SPTCConverterModule::initialize
void initialize() override
Initialize module (e.g. check if all required StoreArrays are present or registering new StoreArrays)
Definition: RT2SPTCConverterModuleDev.cc:92
Belle2::RT2SPTCConverterModule::m_undefinedErrorCtr
unsigned int m_undefinedErrorCtr
Counts how many tracks failed to be converted.
Definition: RT2SPTCConverterModuleDev.h:133
Belle2::RT2SPTCConverterModule::m_minSP
int m_minSP
parameter for specifying a minimal number of SpacePoints a SpacePointTrackCand has to have in order t...
Definition: RT2SPTCConverterModuleDev.h:109
Belle2::NoKickRTSel
This class implement some methods useful for the application of cuts evaluated in NoKickCutsEval modu...
Definition: NoKickRTSel.h:43
Belle2::RT2SPTCConverterModule
Module for converting RecoTracks to SpacePointTrackCands.
Definition: RT2SPTCConverterModuleDev.h:42
Belle2::DataStore::c_ErrorIfAlreadyRegistered
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Definition: DataStore.h:74
Belle2::SVDCluster
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:38
Belle2::RT2SPTCConverterModule::m_convertFittedOnly
bool m_convertFittedOnly
if true only RecoTracks with successful fit will be converted
Definition: RT2SPTCConverterModuleDev.h:116
Belle2::RT2SPTCConverterModule::m_mcParticlesPresent
bool m_mcParticlesPresent
If MCParticles are available.
Definition: RT2SPTCConverterModuleDev.h:129
Belle2::RT2SPTCConverterModule::event
void event() override
Event: convert RecoTracks to SpacePointTrackCands.
Definition: RT2SPTCConverterModuleDev.cc:134
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:43
Belle2::StoreArray< SVDCluster >
Belle2::RT2SPTCConverterModule::m_markRecoTracks
bool m_markRecoTracks
If True RecoTracks where conversion problems occurred are marked dirty.
Definition: RT2SPTCConverterModuleDev.h:113
Belle2::RT2SPTCConverterModule::m_svdSpacePointsStoreArrayName
boost::optional< std::string > m_svdSpacePointsStoreArrayName
Non SingleCluster SVD SpacePoints collection names.
Definition: RT2SPTCConverterModuleDev.h:98
Belle2::RT2SPTCConverterModule::m_ncut
int m_ncut
counter of the cuttet tracks
Definition: RT2SPTCConverterModuleDev.h:124
Belle2::DataStore::c_Event
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
Definition: DataStore.h:61
Belle2::RelationsInterface
Defines interface for accessing relations of objects in StoreArray.
Definition: RelationsObject.h:102
Belle2::RT2SPTCConverterModule::m_SPTCName
std::string m_SPTCName
Name of collection under which SpacePointTrackCands will be stored in the StoreArray.
Definition: RT2SPTCConverterModuleDev.h:104
Belle2::SpacePointTrackCand
Storage for (VXD) SpacePoint-based track candidates.
Definition: SpacePointTrackCand.h:51
Belle2::RelationsInterface::getRelatedFrom
FROM * getRelatedFrom(const std::string &name="", const std::string &namedRelation="") const
Get the object from which this object has a relation.
Definition: RelationsObject.h:265
Belle2::RT2SPTCConverterModule::m_noFailCtr
unsigned int m_noFailCtr
Counts how many tracks could be converted without any problems.
Definition: RT2SPTCConverterModuleDev.h:131
Belle2::RT2SPTCConverterModule::initializeCounters
void initializeCounters()
reset counters to 0 to avoid indeterministic behaviour
Definition: RT2SPTCConverterModuleDev.h:85
Belle2::RT2SPTCConverterModule::m_missingTrueHitCtr
unsigned int m_missingTrueHitCtr
Counts how many times a SpacePoint had no relation to a SVDTrueHit.
Definition: RT2SPTCConverterModuleDev.h:134