9#include <tracking/modules/spacePointCreator/GFTC2SPTCConverterModule.h>
10#include <tracking/spacePointCreation/SpacePointTrackCand.h>
12#include <framework/dataobjects/EventMetaData.h>
13#include <framework/datastore/StoreObjPtr.h>
14#include <framework/gearbox/Const.h>
18#include <boost/tuple/tuple_comparison.hpp>
27 setDescription(
"Module for converting genfit::TrackCands (e.g. from TrackFinderMCTruth) to SpacePointTrackCands.");
34 "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!)",
38 "Single Cluster SVD SpacePoints collection name. NOTE: This StoreArray will be searched for SpacePoints only if 'useSingleClusterSP' is set to true!",
39 std::string(
"SVDSpacePoints"));
41 "Non Single Cluster SVD SpacePoints collection name. This StoreArray will be searched for SpacePoints",
42 std::string(
"SVDSpacePoints"));
46 "Minimum number of degrees of freedom a SpacePointTrackCand has to contain in order to get registered in the DataStore. If set to 0, any number is accepted",
50 "Set to true if you want TrueHits of Clusters forming a SpacePoint (e.g. SVD) to be checked for equality",
false);
52 "Set to true if you want to use singleCluster SVD SpacePoints if no doubleCluster SVD SpacePoint can be found. NOTE: this gets overridden if 'skipCluster' is set to true!",
55 "Set to false if you want to disable the initial check for the StoreArray of Non Single Cluster SVD SpacePoints. NOTE: The module will still search for these SpacePoints first, so you have to make sure you are not registering SpacePoints under the StoreArray with the NoSingleClusterSVDSP name! (Disable the module that registers these SpacePoints)",
58 "Set to true if you only want to skip the Clusters for which no appropriate SpacePoints can be found, instead of aborting the conversion of the whole GFTC when such a case occurs. NOTE: setting this to true automatically sets 'useSingleClusterSP' to false!",
67 B2INFO(
"GFTC2SPTCConverter -------------- initialize() ---------------------");
97 B2WARNING(
"'minNDF' is set to a value below 0. Resetting to 0!");
107 const int eventCounter = eventMetaDataPtr->getEvent();
108 B2DEBUG(21,
"GFTC2SPTCConverter::event(). Processing event " << eventCounter <<
" --------");
114 for (
int iTC = 0; iTC < nTCs; ++iTC) {
119 "================================================================================\nNow processing genfit::TrackCand "
124 std::pair<const SpacePointTrackCand, conversionStatus> spacePointTC =
createSpacePointTC(trackCand);
126 if (spacePointTC.second == 0) {
133 B2DEBUG(21,
"The conversion failed due to: " << spacePointTC.second);
136 }
catch (std::runtime_error& anE) {
137 B2ERROR(
"Caught exception in creation of SpacePointTrackCand: " << anE.what());
139 B2ERROR(
"Caught undefined exception in creation of SpacePointTrackCand!");
147 std::stringstream generalOutput;
152 B2INFO(generalOutput.str());
154 std::stringstream verboseOutput;
155 verboseOutput <<
"counter variables: ";
168 B2DEBUG(21, verboseOutput.str());
171 std::stringstream explanation;
172 explanation <<
"explanation of counter variables (key words only):\n";
173 explanation <<
"NoSP -> Found no related SpacePoint to a Cluster\n";
174 explanation <<
"Unsuitable -> Cluster combination of SpacePoint was not in consecutive order in GFTC\n";
175 explanation <<
"NoValidSP -> Cluster combination of SpacePoint was not contained in GFTC\n";
176 if (
m_PARAMcheckTrueHits) explanation <<
"TrueHit/noTH -> found no related TrueHit to a SpacePoint\n";
177 if (
m_nonSingleSPCtr) explanation <<
"nonSingleSP -> more than one singleCluster SpacePoint related to a Cluster\n";
178 explanation <<
"noTwoClusterSP -> found no two Cluster SpacePoint\n";
179 explanation <<
"singleClusterSVDSP -> number of tries to add a singleCluster SpacePoint for latter cases\n";
180 B2DEBUG(22, explanation.str());
185std::pair<const Belle2::SpacePointTrackCand, GFTC2SPTCConverterModule::conversionStatus>
189 std::vector<HitInfo<SpacePoint> > tcSpacePoints;
193 int nHits = genfitTC->getNHits();
194 B2DEBUG(21,
"genfit::TrackCand contains " << nHits <<
" hits");
197 std::vector<flaggedPair<int> > fHitIDs;
198 for (
int i = 0; i < nHits; ++i) {
199 auto aHit = genfitTC->getHit(i);
201 fHitIDs.push_back(aPair);
204 bool usedSingleCluster =
false;
206 for (
int iTCHit = 0; iTCHit < nHits; ++iTCHit) {
207 genfit::TrackCandHit* aTCHit = genfitTC->getHit(iTCHit);
208 double sortingParam = aTCHit->getSortingParameter();
210 B2DEBUG(20,
"Processing TrackCandHit " << iTCHit <<
" of " << nHits);
211 if (fHitIDs[iTCHit].get<0>()) {
212 B2DEBUG(28,
"This hit has already been added to the SpacePointTrackCand via a SpacePoint and will not be processed again");
214 std::pair<SpacePoint*, conversionStatus> aSpacePoint =
processTrackCandHit(aTCHit, fHitIDs, iTCHit);
217 if (aSpacePoint.first !=
nullptr && (aSpacePoint.second >= 0 || aSpacePoint.second ==
c_nonSingleSP)) {
219 tcSpacePoints.push_back({sortingParam, aSpacePoint.first});
220 B2DEBUG(28,
"Added SpacePoint " << aSpacePoint.first->getArrayIndex() <<
" from Array " << aSpacePoint.first->getArrayName() <<
221 " to tcSpacePoints");
224 convStatus = aSpacePoint.second;
225 B2DEBUG(28,
"There was an error during conversion: for Hit " << iTCHit <<
": " << convStatus);
228 "There was an error during conversion for a GFTC. 'skipCluster' is set to false, hence this trackCand will not be converted!");
237 B2DEBUG(20,
"NDF for this SpacePointTrackCand: " <<
m_NDF);
239 B2DEBUG(21,
"The created SpacePointTrackCand has not enough NDF: NDF is " <<
m_NDF <<
" but 'minNDF' is set to " <<
m_PARAMminNDF);
246 B2WARNING(
"There is at least one TrackCandHit that has not been marked as used although 'skipCluster' is set to false");
251 std::vector<const SpacePoint*> spacePoints;
252 std::vector<double> sortingParams;
254 spacePoints.push_back(aSP.second);
255 sortingParams.push_back(aSP.first);
259 genfitTC->getMcTrackId());
260 spacePointTC.
set6DSeed(genfitTC->getStateSeed());
261 spacePointTC.
setCovSeed(genfitTC->getCovSeed());
268 return std::make_pair(spacePointTC,
c_noFail);
272std::pair<Belle2::SpacePoint*, GFTC2SPTCConverterModule::conversionStatus>
275 int detID = hit->getDetId();
276 int hitID = hit->getHitId();
277 int planeID = hit->getPlaneId();
278 B2DEBUG(28,
"Processing TrackCandHit " << iHit <<
" with detID: " << detID <<
", hitID: " << hitID <<
", planeID: " << planeID);
280 std::pair<SpacePoint*, conversionStatus> returnSP = {
nullptr,
c_noFail };
282 if (detID == Const::PXD) {
284 returnSP = getSpacePoint<PXDCluster, PXDTrueHit>(aCluster, flaggedHitIDs, iHit,
true,
m_PXDClusterSPName);
287 }
else if (detID == Const::SVD) {
292 throw SpacePointTrackCand::UnsupportedDetType();
298template<
typename ClusterType,
typename TrueHitType>
299std::pair<Belle2::SpacePoint*, GFTC2SPTCConverterModule::conversionStatus>
301 bool singleCluster, std::string arrayName)
303 std::pair<SpacePoint*, conversionStatus> spacePoint = {
nullptr,
c_noFail};
305 B2DEBUG(28,
"Trying to find a related SpacePoint in StoreArray " << arrayName <<
" for Cluster " << cluster->getArrayIndex() <<
306 " from Array " << cluster->getArrayName());
308 B2DEBUG(28,
"Found " << spacePoints.
size() <<
" related SpacePoints for Cluster " << cluster->getArrayIndex() <<
" from Array " <<
309 cluster->getArrayName());
312 if (spacePoints.
size() == 0) {
313 B2DEBUG(28,
"Found no related (single Cluster) SpacePoint!");
317 if (spacePoints.
size() > 1) {
318 B2ERROR(
"More than one single Cluster SpacePoint related to a Cluster! Returning only the first in RelationVector!");
322 spacePoint.first = spacePoints[0];
328 spacePoint = findAppropriateSpacePoint<ClusterType>(spacePoints, flaggedHitIDs);
329 if (spacePoint.first ==
nullptr) {
330 B2DEBUG(28,
"Did not find an appropriate double Cluster SpacePoint for Cluster " << cluster->getArrayIndex() <<
" from Array " <<
331 cluster->getArrayName() <<
". Reason for failure: " << spacePoint.second);
334 B2DEBUG(28,
"Trying to get a single Cluster SpacePoint now!");
343 if (!foundRelatedTrueHit<TrueHitType>(spacePoint.first)) { spacePoint.second =
c_foundNoTrueHit; }
350template<
typename ClusterType>
351std::pair<Belle2::SpacePoint*, GFTC2SPTCConverterModule::conversionStatus>
355 std::pair<SpacePoint*, conversionStatus> returnSP = {
nullptr,
c_noFail };
356 B2DEBUG(22,
"Trying to find an appropriate SpacePoint from RelationVector with " << spacePoints.
size() <<
" entries!");
357 if (spacePoints.
size() == 0) {
358 B2DEBUG(28,
"There are no spacePoints to choose of!");
367 std::vector<std::pair<bool, bool> > existAndValidSP;
369 std::vector<std::pair<int, int> > clusterPositions;
372 for (
unsigned int iSP = 0; iSP < spacePoints.
size(); ++iSP) {
374 B2DEBUG(22,
"Processing SpacePoint " << iSP + 1 <<
" of " << spacePoints.
size() <<
" with Index " << aSP->
getArrayIndex() <<
377 bool bothValid =
true;
378 bool foundBoth =
true;
380 std::vector<int> clusterInds = getClusterIndices<SVDCluster>(aSP,
m_SVDClusterName);
381 for (
int index : clusterInds) {
383 std::pair<int, int> existAndValidClPos =
checkExistAndValid(index, detID, flaggedHitIDs);
384 if (existAndValidClPos.first < 0) {
386 if (existAndValidClPos.second < 0) foundBoth =
false;
390 clusterPositions.push_back({iSP, existAndValidClPos.first});
391 B2DEBUG(29,
"clusterInd: " << index <<
" checkExistAndValid.first: " << existAndValidClPos.first <<
", .second: " <<
392 existAndValidClPos.second <<
" bothValid/foundBoth: " << bothValid <<
"/" << foundBoth);
395 existAndValidSP.push_back({foundBoth, bothValid});
396 B2DEBUG(22,
"Cluster combination of SpacePoint " << aSP->
getArrayIndex() <<
" is contained in genfit::TrackCand: " << foundBoth <<
397 ". SpacePoint is valid: " << bothValid);
401 if (relVecPosition < 0) {
406 B2DEBUG(22,
"SpacePoint " << spacePoints[relVecPosition]->getArrayIndex() <<
407 " is the appropriate SpacePoint of all checked SpacePoints! The positions inside the GFTC are: " << clusterPositions.at(
408 relVecPosition * 2).second <<
" and " << clusterPositions.at(relVecPosition * 2 + 1).second);
409 markHitAsUsed(flaggedHitIDs, clusterPositions.at(relVecPosition * 2).second);
410 markHitAsUsed(flaggedHitIDs, clusterPositions.at(relVecPosition * 2 + 1).second);
411 returnSP.first = spacePoints[relVecPosition];
417template<
typename ClusterType>
420 std::vector<int> clusterInds;
422 B2ASSERT(
"Too many clusters. There are " << relClusters.
size() <<
" clusters.", relClusters.
size() < 3);
424 std::stringstream clusterStream;
425 for (
const ClusterType& aCluster : relClusters) {
426 clusterInds.push_back(aCluster.getArrayIndex());
427 clusterStream << aCluster.getArrayIndex() <<
" ";
431 "): clusters are: " << clusterStream.str());
440 B2DEBUG(29,
"Now checking if Cluster " << clusterInd <<
" is valid");
441 std::pair<int, int> positions = { -1, -1};
449 unsigned int validPos = std::find(flaggedHitIDs.begin(), flaggedHitIDs.end(), validID) - flaggedHitIDs.begin();
450 unsigned int existingPos = std::find(flaggedHitIDs.begin(), flaggedHitIDs.end(), existingID) - flaggedHitIDs.begin();
452 B2DEBUG(22,
"validID = (" << validID.get<1>() <<
"," << validID.get<2>() <<
"), found at position " << validPos <<
453 ", existingID found at position " << existingPos <<
" of " << flaggedHitIDs.size());
456 if (validPos < flaggedHitIDs.size()) { positions.first = validPos; }
457 if (existingPos < flaggedHitIDs.size()) { positions.second = existingPos; }
459 B2DEBUG(29,
"Return values, .first: " << positions.first <<
", .second: " << positions.second);
466 if (spacePoint ==
nullptr) {
467 B2ERROR(
"Got nullptr pointer to determine the NDF of!");
472 if (assignedHits.first && assignedHits.second)
return 2;
474 if (assignedHits.first ^ assignedHits.second)
return 1;
480 const std::vector<std::pair<int, int> >& clusterPositions)
483 int nExistingButUsedSP = std::count(existAndValidSPs.begin(), existAndValidSPs.end(), std::make_pair(
true,
false));
484 int nValidSP = std::count(existAndValidSPs.begin(), existAndValidSPs.end(), std::make_pair(
true,
true));
487 std::stringstream output;
488 output <<
"content of passed vector of pairs (comma separated): ";
489 for (
auto entry : existAndValidSPs) { output << entry.first <<
"/" << entry.second <<
", "; }
490 B2DEBUG(29, output.str() <<
"nValidSP: " << nValidSP <<
" nExistingButUsedSP: " << nExistingButUsedSP);
494 if (nValidSP < 1 && nExistingButUsedSP > 0) {
496 "There are only Cluster Combinations where one of the Clusters is already used by another SpacePoint! This genfit::TrackCand cannot be converted properly to a SpacePointTrackCand!");
498 }
else if (nValidSP < 1 && nExistingButUsedSP < 1) {
499 B2DEBUG(28,
"Found no valid SpacePoint and no SpacePoint with existing but used Clusters/Hits!");
502 else if (nValidSP > 0) {
504 std::vector<std::pair<int, int> > positionInfos;
506 for (
unsigned int iSP = 0; iSP < existAndValidSPs.size(); ++iSP) {
507 if (!existAndValidSPs.at(iSP).second)
continue;
509 int posDiff = clusterPositions.at(iSP * 2).second - clusterPositions.at(iSP * 2 + 1).second;
511 B2DEBUG(28,
"Difference of positions of Clusters for entry " << iSP <<
" is " << posDiff);
512 positionInfos.push_back(std::make_pair(iSP, posDiff * posDiff));
516 sort(positionInfos.begin(), positionInfos.end(), [](
const std::pair<int, int>& lTuple,
const std::pair<int, int>& rTuple) { return lTuple.second < rTuple.second; });
518 if (positionInfos.at(0).second != 1) {
519 B2DEBUG(28,
"The shortest squared distance between two Clusters is " << positionInfos.at(0).second <<
520 "! This would lead to wrong ordered TrackCandHits.");
524 B2DEBUG(22,
"SpacePoint with index " << positionInfos.at(0).first <<
525 " is the valid SpacePoint with two Clusters in consecutive order from all valid SpacePoints.");
526 return positionInfos.at(0).first;
536 for (
unsigned int i = 0; i < flaggedHitIDs.size(); ++i) {
538 B2DEBUG(28,
"Hit " << i <<
" with (detID,hitID): (" << fPair.get<1>() <<
"," << fPair.get<2>() <<
") has been used: " <<
540 if (!fPair.get<0>()) {
550template <
typename TrueHitType>
554 if (relTrueHits.
size() == 0) {
555 B2DEBUG(22,
"Found no TrueHit to SpacePoint " << spacePoint->
getArrayIndex() <<
" from Array " << spacePoint->
getArrayName());
558 B2DEBUG(22,
"Found " << relTrueHits.
size() <<
" related TrueHits for SpacePoint " << spacePoint->
getArrayIndex() <<
" from Array "
560 return (relTrueHits.
size() <= allowedRelations);
567 flaggedHitIDs[hitToMark].get<0>() =
true;
569 B2DEBUG(22,
"Marked Hit " << hitToMark <<
" as used. (detID,hitID) of this hit is (" << fPair.get<1>() <<
"," << fPair.get<2>() <<
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
unsigned int m_abortedNoSPCtr
Counter for aborted conversions because no SpacePoint has been found.
StoreArray< SpacePoint > m_SingleClusterSpacePoints
SVD SpacePoints StoreArray only consisting of one SVDCluster.
int getNDF(Belle2::SpacePoint *spacePoint)
get the NDF of a SpacePoint
int m_PARAMminNDF
parameter for specifying a minimal number of degrees of freedom a SpacePointTrackCand has to have in ...
unsigned int m_skippedPXDunsuitableCtr
Counter for skipped PXD Clusters due to unsuitable GFTC.
bool m_PARAMskipCluster
Switch for controlling the behavior of the converter, when for one or more Clusters no appropriate Sp...
conversionStatus
enum for differentiating different reasons why a conversion failed negative values mean fail!
@ c_nonSingleSP
conversion failed because there were more than one single Cluster SpacePoints related to a Cluster
@ c_foundNoSpacePoint
conversion failed because no related SpacePoint was found to a Cluster/Hit of the GFTC
@ c_singleClusterSP
had to use a singleCluster SpacePoint (also returned if PXD is passed!
@ c_lowNDF
conversion failed because the created SpacePointTrackCand had not enough degrees of freedom
@ c_noValidSP
conversion failed because there was no valid SpacePoint (only possible for double Cluster SpacePoints...
@ c_foundNoTrueHit
conversion failed because there was no related SpacePoint to a TrueHit
@ c_unsuitableGFTC
conversion failed because the GFTC is considered not suitable for conversion
@ c_noFail
conversion without any problems
unsigned int m_skippedSVDnoValidSPCtr
Counter for skipped SVD Clusters due to no found valid SpacePoint.
std::string m_SingleClusterSVDSPName
Single Cluster SVD SpacePoints collection name.
unsigned int m_abortedUnsuitableTCCtr
Counter for aborted conversions due to unsuitable genfit::TrackCand.
std::pair< double, const HitType * > HitInfo
container used for storing information, that is then put into the SpacePointTrackCand
StoreArray< SVDCluster > m_SVDClusters
SVDClusters StoreArray.
std::string m_NoSingleClusterSVDSPName
Non SingleCluster SVD SpacePoints collection name.
void initialize() override
initialize module (e.g.
StoreArray< SpacePointTrackCand > m_SpacePointTrackCands
SpacePointTrackCands StoreArray.
void event() override
event: convert genfit::TrackCands to SpacePointTrackCands
std::string m_PXDClusterName
PXDCluster collection name.
unsigned int m_skippedSVDunsuitableCtr
Counter for skipped SVD Clusters due to unsuitable GFTC.
StoreArray< PXDTrueHit > m_PXDTrueHits
PXDTrueHits StoreArray.
void terminate() override
terminate: print some summary information on the processed events
GFTC2SPTCConverterModule()
Constructor.
bool foundRelatedTrueHit(const Belle2::SpacePoint *spacePoint, unsigned int allowedRelations=1)
check if there is a related TrueHit for a given SpacePoint.
unsigned int m_skippedSVDnoSPCtr
Counter for skipped SVD Clusters, due to no found SpacePoint.
unsigned int m_genfitTCCtr
Counter for genfit::TrackCands which were presented to the module.
std::string m_genfitTCName
Name of collection of genfit::TrackCand StoreArray.
void increaseSkippedCounter(conversionStatus status, ClusterType *cluster)
increase the appropriate counter variable if a Cluster is skipped (i.e.
bool m_PARAMcheckTrueHits
Parameter Indicating if the TrueHits related from the Clusters forming a SpacePoint should be checked...
unsigned int m_skippedSVDnoTHCtr
Counter for skipped SVD Clusters, due to no related TrueHit to a SpacePoint.
StoreArray< genfit::TrackCand > m_GenfitTrackCands
Genfit::TrackCand StoreArray.
bool m_PARAMuseSingleClusterSP
Parameter Indicating if SingleCluster SVD SpacePoints should be used if no double Cluster SVD SpacePo...
std::pair< Belle2::SpacePoint *, conversionStatus > processTrackCandHit(genfit::TrackCandHit *hit, std::vector< flaggedPair< int > > &flaggedHitIDs, int iHit)
process a TrackCandHit (i.e.
unsigned int m_nonSingleSPCtr
Counter for cases where there is more than one single Cluster SpacePoint related to a Cluster.
unsigned int m_noTwoClusterSPCtr
Counter for cases where no related two Cluster could be found for a Cluster.
StoreArray< PXDCluster > m_PXDClusters
PXDClusters StoreArray.
unsigned int m_abortedNoValidSPCtr
Counter for aborted conversions due to no found valid SpacePoint to any Cluster of the GFTC.
boost::tuple< bool, T, T > flaggedPair
typedef, for avoiding having a vector<bool> and a vector<pair<T,T>>
std::string m_SPTCName
Name of collection under which SpacePointTrackCands will be stored in the StoreArray.
conversionStatus getFailEnum(int intToConvert)
get the enum representation of an integer
void increaseFailCounter(conversionStatus status)
increase the counter that 'belongs' to the conversionStatus
void markHitAsUsed(std::vector< flaggedPair< int > > &flaggedHitIDs, int hitToMark)
mark a hit as used, i.e.
unsigned int m_skippedPXDnoSPCtr
Counter for skipped PXD Clusters, due to no found SpacePoint.
std::pair< Belle2::SpacePoint *, conversionStatus > findAppropriateSpacePoint(const Belle2::RelationVector< Belle2::SpacePoint > &spacePoints, std::vector< flaggedPair< int > > &flaggedHitIDs)
given a RelationVector with SpacePoints in it, it tries to get the appropriate one (see main document...
unsigned int m_skippedPXDnoValidSPCtr
Counter for skipped PXD Clusters due to no found valid SpacePoint.
std::string m_SVDClusterName
SVDCluster collection name.
std::string m_PXDClusterSPName
PXDCluster SpacePoints collection name.
unsigned int m_skippedPXDnoTHCtr
Counter for skipped PXD Clusters, due to no related TrueHit to a SpacePoint.
std::pair< int, int > checkExistAndValid(int clusterInd, int detID, std::vector< flaggedPair< int > > &flaggedHitIDs)
check if the Cluster (of a SpacePoint) is valid and/or exists in a genfit::TrackCand
unsigned int m_skippedCluster
Counter for skipped Cluster.
std::pair< Belle2::SpacePoint *, conversionStatus > getSpacePoint(const ClusterType *cluster, std::vector< flaggedPair< int > > &flaggedHitIDs, int iHit, bool singleCluster, std::string arrayName="")
templated version to get a SpacePoint from a Cluster
bool m_PARAMcheckNoSingleSVDSP
Switch for checking the StoreArray of non-single cluster SVD SpacePoints in initialize.
unsigned int m_SpacePointTCCtr
Counter for SpacePointTrackCands which were converted (if a curling track is split up,...
unsigned int m_abortedLowNDFCtr
Counter for SpacePointTrackCands that were not stored due to a too small number of degrees of freedom...
bool checkUsedAllHits(std::vector< flaggedPair< int > > &flaggedHitIDs)
check if all hits have been used (i.e.
std::vector< int > getClusterIndices(const Belle2::SpacePoint *spacePoint, std::string storeArrayName)
get the indices of the Clusters related to the SpacePoint.
void initializeCounters()
reset counters to 0 to avoid indeterministic behaviour
int m_NDF
number of degrees of freedom.
unsigned int m_singleClusterSPCtr
Counter for single cluster SVD SpacePoints.
std::pair< const Belle2::SpacePointTrackCand, conversionStatus > createSpacePointTC(const genfit::TrackCand *genfitTC)
create a SpacePointTrackCand from the genfit::TrackCand
int getAppropriateSpacePointIndex(const std::vector< std::pair< bool, bool > > &existAndValidSPs, const std::vector< std::pair< int, int > > &clusterPositions)
get the position of the appropriate SpacePoint inside the RelationVector NOTE: returns negative index...
StoreArray< SpacePoint > m_PXDSpacePoints
PXDSpacePoints StoreArray.
StoreArray< SpacePoint > m_NoSingleClusterSpacePoints
SVD SpacePoints StoreArray consisting of two SVDClusters.
StoreArray< SVDTrueHit > m_SVDTrueHits
SVDTrueHits StoreArray.
unsigned int m_abortedTrueHitCtr
Counting discarded conversions due to check for TrueHits not good.
@ c_Debug
Debug: for code development.
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
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).
std::string getArrayName() const
Get name of array this object is stored in, or "" if not found.
int getArrayIndex() const
Returns this object's array index (in StoreArray), or -1 if not found.
RelationVector< TO > getRelationsTo(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from this object to another store array.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Storage for (VXD) SpacePoint-based track candidates.
void setSortingParameters(const std::vector< double > &sortParams)
set the sorting parameters
void set6DSeed(const TVectorD &state6D)
set the 6D state seed
void setCovSeed(const TMatrixDSym &cov)
set the covariance matrix seed
@ c_checkedTrueHits
bit 5: All SpacePoints of the SPTC have a relation to at least one TrueHit.
@ c_omittedClusters
bit 9: Not all Clusters of the genfit::TrackCand have been used to create this SPTC.
@ c_singleClustersSPs
bit 10: SPTC contains single Cluster SpacePoints.
void addRefereeStatus(unsigned short int bitmask)
add a referee status
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
std::pair< bool, bool > getIfClustersAssigned() const
Returns, if u(v)-coordinate is based on cluster information.
const std::string & getName() const
Return name under which the object is saved in the DataStore.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
T * appendNew()
Construct a new T object at the end of the array.
int getEntries() const
Get the number of objects in the array.
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.
Type-safe access to single objects in the data store.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.