Belle II Software development
svd modules

Namespaces

namespace  Belle2::SVD
 Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.
 

Classes

class  SVDChannelMappingModule
 The Channel Mapping Check Module. More...
 
class  SVDClusterCalibrationsMonitorModule
 Module to produce a list of histogram showing the uploaded calibration constants. More...
 
class  SVDHotStripFinderModule
 A module template. More...
 
class  SVDLatencyCalibrationModule
 this module perfoms an analysis to find the APV25 latency More...
 
class  SVDLocalCalibrationsCheckModule
 Module to produce a list of histogram showing the uploaded local calibration constants. More...
 
class  SVDLocalCalibrationsMonitorModule
 Module to produce a list of histogram showing the uploaded local calibration constants. More...
 
class  SVDPositionErrorScaleFactorImporterModule
 Module that produces a localdb with position error scale factors for different position algoritms. More...
 
class  SVDTimeCalibrationsMonitorModule
 Module to produce a list of histogram showing the uploaded calibration constants. More...
 
class  SVDChargeSharingAnalysisModule
 Module for monitoring DSSD cluster charge deposition in regard of capacitive charge sharing between adjacent strips in a cluster for data and the simulation. More...
 
class  SVDClusterQualityEstimatorCalibrationModule
 Generate PDFs for assigning probability that cluster generated from signal particle. More...
 
class  SVDClusterQualityEstimatorModule
 Calculates the probability of a cluster originating from signal hit. More...
 
class  SVDCrossTalkCalibrationsCollectorModule
 Collector module used to create the histograms needed for the cross talk calibration. More...
 
class  SVDCrossTalkFinderModule
 Flags potential cross talk strips on Origami sensors. More...
 
class  SVDdEdxCollectorModule
 Collector module used to create the histograms needed for the SVD dE/dx calibration. More...
 
class  SVDdEdxValidationCollectorModule
 Collector module used to create the histograms needed for the SVD dE/dx calibration. More...
 
class  SVDDQMClustersOnTrackModule
 SVD DQM Module for Clusters related to Tracks. More...
 
class  SVDDQMEfficiencyModule
 Creates the basic histograms for SVD Efficiency DQM. More...
 
class  SVDDQMExpressRecoModule
 SVD DQM Module for Express Reco. More...
 
class  SVDDQMHitTimeModule
 This module to design collect the svd hit time for different detectors trigger timing and physics processes. More...
 
class  SVDUnpackerDQMModule
 SVD DQM Module for the Unpacker. More...
 
class  svdDumpModule
 Class definition of svdClsHistoManager module. More...
 
class  SVDTrackingEventLevelMdstInfoFillerModule
 This module adds additional global event level information about SVD track finding to the MDST object 'EventLevelTrackingInfo'. More...
 
class  SVDOccupancyCalibrationsCollectorModule
 This This module collects hits from shaper digits to compute per sensor SVD occupancy using mu+mu- events for calibration of the SVDOccupancyCalibration payload using CAF. More...
 
class  SVDB4CommissioningPlotsModule
 The SVD B4CommissioningPlots Module. More...
 
class  SVDClusterEvaluationModule
 The SVD ClusterEvaluation Module. More...
 
class  SVDClusterEvaluationTrueInfoModule
 Clustering Performance, using true informations. More...
 
class  SVDClusterFilterModule
 generates a new StoreArray from the input StoreArray which has all specified Clusters removed More...
 
class  SVDEventT0PerformanceTTreeModule
 The module is used to create a TTree to study SVD EventT0. More...
 
class  SVDMaxStripTTreeModule
 The module is used to create a TTree to study the number of strips fired per event per APV chip. More...
 
class  SVDOccupancyAnalysisModule
 The SVD OccupancyAnalysis Module. More...
 
class  SVDPerformanceModule
 The (TB) SVD Performance Module. More...
 
class  SVDPerformanceTTreeModule
 The module is used to create a TTree to study SVD clusters, genfit unbiased residuals and many other properties related to the track they belong to. More...
 
class  SVDShaperDigitsFromTracksModule
 generates two new StoreArray from the input StoreArray. More...
 
class  SVDCoGTimeEstimatorModule
 This module builds the SVDRecoDigits (calibrated and fitted strips) from the SVDShaperDigits. More...
 
class  SVDDataFormatCheckModule
 This module checks the format of the data that we are going to reconstruct checking the SVDModeByte and the SVDDAQDiagnostic. More...
 
class  SVDStripMaskingModule
 This module removes the strips to be masked read form the SVDHotStripsCalibration. More...
 
class  SVD3SamplesEmulatorModule
 This module takes the SVDShaperDigit as input and select three consecutive samples starting from the one choosen by the user. More...
 
class  SVDEventInfoSetterModule
 Module to set the SVDEventInfo in the simulation. More...
 
class  SVDTriggerQualityGeneratorModule
 This module generates a StoreObjPtr that contains random trigger quality chosen between FINE and CORSE. More...
 
class  SVDZeroSuppressionEmulatorModule
 This module filters out strips that do not pass a ZS cut from the SVDShaperDigit StoreArray. More...
 
class  SVD6SampleEventSkimModule
 SVD 6-sample event skim module. More...
 
struct  ClustersOnSensor
 small struct for storing all clusters of the same sensor in one container. More...
 
class  SVDSpacePointCreatorModule
 Imports Clusters of the SVD detector and converts them to spacePoints. More...
 
class  SVDSpacePointQICalibrationModule
 Imports Clusters of the SVD detector and converts them to spacePoints. More...
 
class  SVDClusterTimeShifterCollectorModule
 This module creates and fills histograms based on cluster-sizes so that the mean of SVD-cluster time distribution could be calculated. More...
 
class  SVDTimeCalibrationCollectorModule
 Collector module used to create the histograms needed for the SVD CoG-Time calibration. More...
 
class  SVDTimeGroupingModule
 Imports Clusters of the SVD detector and converts them to spacePoints. More...
 
class  SVDTimeValidationCollectorModule
 Collector module used to create the histograms needed for the SVD CoG-Time calibration. More...
 

Typedefs

typedef std::tuple< double, double, double > GroupInfo
 typedef to be used to store Gauss parameters (integral, center, sigma)
 

Functions

void clusterPDFName (const VxdID &sensor, int size, int side, int maxClusterSize, std::string &PDFName, std::string &errorPDFName, bool useLegacyNaming)
 Function to set name of PDF for cluster quality estimation.
 
void occupancyPDFName (const VxdID &sensor, int side, std::string &PDFName)
 Function to maintain common naming convention between calibration occupancy file generation and occupancy value extraction in main crossTalkFinder module.
 
template<class SpacePointType >
void provideSVDClusterSingles (const StoreArray< SVDCluster > &svdClusters, StoreArray< SpacePointType > &spacePoints)
 simply store one spacePoint for each existing SVDCluster.
 
void storeInputVectorFromSingleCluster (const SVDCluster *cls, std::vector< float > &inputVector, const SVDNoiseCalibrations &noiseCal)
 Store the input values for SVDSpacePoint selection from the given SVDCluster

 
void findPossibleCombinations (const Belle2::ClustersOnSensor &aSensor, std::vector< std::vector< const SVDCluster * > > &foundCombinations, const SVDHitTimeSelection &hitTimeCut, const bool &useSVDGroupInfo, const int &numberOfSignalGroups, const bool &formSingleSignalGroup, const SVDNoiseCalibrations &noiseCal, const DBObjPtr< SVDSpacePointSNRFractionSelector > &svdSpacePointSelectionFunction, bool useSVDSpacePointSNRFractionSelector)
 stores all possible 2-Cluster-combinations.
 
void spPDFName (const VxdID &sensor, int uSize, int vSize, int maxClusterSize, std::string &PDFName, std::string &errorPDFName, bool useLegacyNaming)
 Function to set name of PDF for spacePoint quality estimation.
 
void calculatePairingProb (TFile *pdfFile, std::vector< const SVDCluster * > &clusters, double &prob, double &error, bool useLegacyNaming)
 Function to extract probability of correct (pair from signal hit) cluster pairing from preconfigured pdfs Probability defined as Pcharge * Ptime * Pucluster * Pvcluster.
 
template<class SpacePointType >
void provideSVDClusterCombinations (const StoreArray< SVDCluster > &svdClusters, StoreArray< SpacePointType > &spacePoints, SVDHitTimeSelection &hitTimeCut, bool useQualityEstimator, TFile *pdfFile, bool useLegacyNaming, unsigned int numMaxSpacePoints, std::string m_eventLevelTrackingInfoName, const bool &useSVDGroupInfo, const int &numberOfSignalGroups, const bool &formSingleSignalGroup, const SVDNoiseCalibrations &noiseCal, const DBObjPtr< SVDSpacePointSNRFractionSelector > &svdSpacePointSelectionFunction, bool useSVDSpacePointSNRFractionSelector)
 finds all possible combinations of U and V Clusters for SVDClusters.
 
double myGaus (const double *x, const double *par)
 Gaus function to be used in the fit.
 
void addGausToHistogram (TH1D &hist, const double &integral, const double &center, const double &sigma, const double &sigmaN, const bool &isAddition=true)
 Add (or Subtract) a Gaussian to (or from) a histogram.
 
void subtractGausFromHistogram (TH1D &hist, const double &integral, const double &center, const double &sigma, const double &sigmaN)
 Subtract a Gaussian from a histogram.
 
int getSensorType (const VxdID &sensorID)
 Get Sensor Type of SVD sensors.
 

Detailed Description

Typedef Documentation

◆ GroupInfo

typedef std::tuple<double, double, double> GroupInfo

typedef to be used to store Gauss parameters (integral, center, sigma)

Definition at line 39 of file SVDTimeGroupingModule.h.

Function Documentation

◆ addGausToHistogram()

void addGausToHistogram ( TH1D &  hist,
const double &  integral,
const double &  center,
const double &  sigma,
const double &  sigmaN,
const bool &  isAddition = true 
)
inline

Add (or Subtract) a Gaussian to (or from) a histogram.

The gauss is calculated upto the sigmaN passed to the function.

Definition at line 174 of file SVDTimeGroupingModule.h.

177 {
178 int startBin = hist.FindBin(center - sigmaN * sigma);
179 int endBin = hist.FindBin(center + sigmaN * sigma);
180 if (startBin < 1) startBin = 1;
181 if (endBin > (hist.GetNbinsX())) endBin = hist.GetNbinsX();
182
183 for (int ijx = startBin; ijx <= endBin; ijx++) {
184 double tbinc = hist.GetBinCenter(ijx);
185 double tbincontent = hist.GetBinContent(ijx);
186
187 if (isAddition) tbincontent += integral * TMath::Gaus(tbinc, center, sigma, true);
188 else tbincontent -= integral * TMath::Gaus(tbinc, center, sigma, true);
189
190 hist.SetBinContent(ijx, tbincontent);
191 }
192 }

◆ calculatePairingProb()

void calculatePairingProb ( TFile *  pdfFile,
std::vector< const SVDCluster * > &  clusters,
double &  prob,
double &  error,
bool  useLegacyNaming 
)
inline

Function to extract probability of correct (pair from signal hit) cluster pairing from preconfigured pdfs Probability defined as Pcharge * Ptime * Pucluster * Pvcluster.

Definition at line 246 of file SpacePointHelperFunctions.h.

248 {
249
250 int maxSize;
251 int pdfEntries = pdfFile->GetListOfKeys()->GetSize();
252 if (useLegacyNaming == true) {
253 maxSize = floor(sqrt((pdfEntries - 4) / 6)); //4(time+size)+3(sensors)*2(prob/error)*size^2(u/v combo.)
254 } else {
255 maxSize = floor(sqrt((pdfEntries - 4) / 344)); //4(time+size)+172(sensorType)*2(prob/error)*size^2(u/v combo.)
256 }
257 std::string chargeProbInput;
258 std::string chargeErrorInput;
259
260 spPDFName(clusters[0]->getSensorID(), clusters[0]->getSize(), clusters[1]->getSize(), maxSize,
261 chargeProbInput, chargeErrorInput, useLegacyNaming);
262 std::string timeProbInput = "timeProb";
263 std::string timeErrorInput = "timeError";
264 std::string sizeProbInput = "sizeProb";
265 std::string sizeErrorInput = "sizeError";
266
267
268 TH2F* chargePDF = nullptr;
269 TH2F* chargeError = nullptr;
270 TH2F* timePDF = nullptr;
271 TH2F* timeError = nullptr;
272 TH2F* sizePDF = nullptr;
273 TH2F* sizeError = nullptr;
274
275 pdfFile->GetObject(chargeProbInput.c_str(), chargePDF);
276 pdfFile->GetObject(chargeErrorInput.c_str(), chargeError);
277 pdfFile->GetObject(timeProbInput.c_str(), timePDF);
278 pdfFile->GetObject(timeErrorInput.c_str(), timeError);
279 pdfFile->GetObject(sizeProbInput.c_str(), sizePDF);
280 pdfFile->GetObject(sizeErrorInput.c_str(), sizeError);
281
282 int xChargeBin = chargePDF->GetXaxis()->FindFixBin(clusters[0]->getCharge());
283 int yChargeBin = chargePDF->GetYaxis()->FindFixBin(clusters[1]->getCharge());
284
285 int xTimeBin = timePDF->GetXaxis()->FindFixBin(clusters[0]->getClsTime());
286 int yTimeBin = timePDF->GetYaxis()->FindFixBin(clusters[1]->getClsTime());
287
288
289 int xSizeBin = sizePDF->GetXaxis()->FindFixBin(clusters[0]->getSize());
290 int ySizeBin = sizePDF->GetYaxis()->FindFixBin(clusters[1]->getSize());
291
292 double chargeProb = chargePDF->GetBinContent(xChargeBin, yChargeBin);
293 double timeProb = timePDF->GetBinContent(xTimeBin, yTimeBin);
294 double sizeProb = sizePDF->GetBinContent(xSizeBin, ySizeBin);
295 double chargeProbError = chargePDF->GetBinContent(xChargeBin, yChargeBin);
296 double timeProbError = timePDF->GetBinContent(xTimeBin, yTimeBin);
297 double sizeProbError = sizePDF->GetBinContent(xSizeBin, ySizeBin);
298
299
300 if (chargeProbError == 0) {
301 B2DEBUG(21, "svdClusterProbabilityEstimator has not been run, spacePoint QI will return zero!");
302 }
303
304 prob = chargeProb * timeProb * sizeProb * clusters[0]->getQuality() * clusters[1]->getQuality();
305 error = prob * sqrt(pow(timeProb * sizeProb * clusters[0]->getQuality() * clusters[1]->getQuality() * chargeProbError, 2) +
306 pow(chargeProb * sizeProb * clusters[0]->getQuality() * clusters[1]->getQuality() * timeProbError, 2) +
307 pow(chargeProb * timeProb * clusters[0]->getQuality() * clusters[1]->getQuality() * sizeProbError, 2) +
308 pow(chargeProb * timeProb * sizeProb * clusters[1]->getQuality() * clusters[0]->getQualityError(), 2) +
309 pow(chargeProb * timeProb * sizeProb * clusters[0]->getQuality() * clusters[1]->getQualityError(), 2));
310 }
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
void spPDFName(const VxdID &sensor, int uSize, int vSize, int maxClusterSize, std::string &PDFName, std::string &errorPDFName, bool useLegacyNaming)
Function to set name of PDF for spacePoint quality estimation.

◆ clusterPDFName()

void clusterPDFName ( const VxdID sensor,
int  size,
int  side,
int  maxClusterSize,
std::string &  PDFName,
std::string &  errorPDFName,
bool  useLegacyNaming 
)
inline

Function to set name of PDF for cluster quality estimation.

Legacy naming convention for PDFs distributed by sensor type rather than sensor ID, not used after 2018 MC calibrated PDFs.

Definition at line 24 of file ClusterQualityHelperFunctions.h.

26 {
27 if (useLegacyNaming == true) {
28 std::string sensorSide;
29 if (side == 1) sensorSide = "u";
30 if (side == 0) sensorSide = "v";
31
32 if (size > maxClusterSize) size = maxClusterSize;
33 std::string sensorName;
34 if (sensor.getLayerNumber() == 3) sensorName = "l3";
35 if (sensor.getLayerNumber() > 3 && sensor.getSensorNumber() == 1) sensorName = "trap";
36 if (sensor.getLayerNumber() > 3 && sensor.getSensorNumber() > 1) sensorName = "large";
37
38 PDFName = sensorSide + sensorName + std::to_string(size);
39 errorPDFName = PDFName + "Error";
40 } else {
41
42 std::string sensorSide;
43 if (side == 1) sensorSide = "u";
44 if (side == 0) sensorSide = "v";
45 int layer = sensor.getLayerNumber();
46 int ladder = sensor.getLadderNumber();
47 int sens = sensor.getSensorNumber();
48
49 if (size > maxClusterSize) size = maxClusterSize;
50
51 PDFName = std::to_string(layer) + "." + std::to_string(ladder) + "." + std::to_string(sens) + "." + sensorSide + "." +
52 std::to_string(size);
53 errorPDFName = PDFName + "_Error";
54
55 }
56 }

◆ findPossibleCombinations()

void findPossibleCombinations ( const Belle2::ClustersOnSensor aSensor,
std::vector< std::vector< const SVDCluster * > > &  foundCombinations,
const SVDHitTimeSelection hitTimeCut,
const bool &  useSVDGroupInfo,
const int &  numberOfSignalGroups,
const bool &  formSingleSignalGroup,
const SVDNoiseCalibrations noiseCal,
const DBObjPtr< SVDSpacePointSNRFractionSelector > &  svdSpacePointSelectionFunction,
bool  useSVDSpacePointSNRFractionSelector 
)
inline

stores all possible 2-Cluster-combinations.

first parameter is a struct containing all clusters on current sensor. second parameter is the container which collects all combinations found.

for each u cluster, a v cluster is combined to a possible combination. Condition which has to be fulfilled: the first entry is always an u cluster, the second always a v-cluster

Definition at line 128 of file SpacePointHelperFunctions.h.

133 {
134
135 for (const SVDCluster* uCluster : aSensor.clustersU) {
136 if (! hitTimeCut.isClusterInTime(uCluster->getSensorID(), 1, uCluster->getClsTime())) {
137 B2DEBUG(29, "Cluster rejected due to timing cut. Cluster time: " << uCluster->getClsTime());
138 continue;
139 }
140 for (const SVDCluster* vCluster : aSensor.clustersV) {
141 if (! hitTimeCut.isClusterInTime(vCluster->getSensorID(), 0, vCluster->getClsTime())) {
142 B2DEBUG(29, "Cluster rejected due to timing cut. Cluster time: " << vCluster->getClsTime());
143 continue;
144 }
145
146 if (! hitTimeCut.areClusterTimesCompatible(vCluster->getSensorID(), uCluster->getClsTime(), vCluster->getClsTime())) {
147 B2DEBUG(29, "Cluster combination rejected due to timing cut. Cluster time U (" << uCluster->getClsTime() <<
148 ") is incompatible with Cluster time V (" << vCluster->getClsTime() << ")");
149 continue;
150 }
151
152 if (useSVDGroupInfo) {
153 const std::vector<int>& uTimeGroupId = uCluster->getTimeGroupId();
154 const std::vector<int>& vTimeGroupId = vCluster->getTimeGroupId();
155
156 if (int(uTimeGroupId.size()) && int(vTimeGroupId.size())) { // indirect check if the clusterizer module is disabled
157 bool isContinue = true;
158 for (auto& uitem : uTimeGroupId) {
159 if (uitem < 0 || uitem >= numberOfSignalGroups) continue;
160 for (auto& vitem : vTimeGroupId) {
161 if (vitem < 0 || vitem >= numberOfSignalGroups) continue;
162 if ((uitem == vitem) || formSingleSignalGroup) { isContinue = false; break; }
163 }
164 if (!isContinue) break;
165 }
166
167 if (isContinue) {
168 B2DEBUG(29, "Cluster combination rejected due to different time-group Id.");
169 continue;
170 }
171 }
172 }
173
174 if (useSVDSpacePointSNRFractionSelector) {
175 std::vector<float> inputU;
176 std::vector<float> inputV;
177
178 storeInputVectorFromSingleCluster(uCluster, inputU, noiseCal);
179 storeInputVectorFromSingleCluster(vCluster, inputV, noiseCal);
180
181 bool pass = svdSpacePointSelectionFunction->passSNRFractionSelection(inputU, inputV);
182 if (!pass) {
183 B2DEBUG(29, "Cluster combination rejected due to SVDSpacePointSNRFractionSelector");
184 continue;
185 }
186 }
187
188 foundCombinations.push_back({uCluster, vCluster});
189
190
191 }
192 }
193
194
195
196
197 }
void storeInputVectorFromSingleCluster(const SVDCluster *cls, std::vector< float > &inputVector, const SVDNoiseCalibrations &noiseCal)
Store the input values for SVDSpacePoint selection from the given SVDCluster
std::vector< const SVDCluster * > clustersU
stores all SVDclusters of U type.
std::vector< const SVDCluster * > clustersV
stores all SVDclusters of V type.

◆ getSensorType()

int getSensorType ( const VxdID sensorID)
inline

Get Sensor Type of SVD sensors.

Definition at line 207 of file SVDTimeGroupingModule.h.

208 {
209 int layer = sensorID.getLayerNumber();
210 int sensor = sensorID.getSensorNumber();
211 if (layer == 3)
212 return 0;
213 else {
214 if (sensor == 1)
215 return 1;
216 else
217 return 2;
218 }
219 }

◆ myGaus()

double myGaus ( const double *  x,
const double *  par 
)
inline

Gaus function to be used in the fit.

Definition at line 164 of file SVDTimeGroupingModule.h.

165 {
166 return par[0] * TMath::Gaus(x[0], par[1], par[2], true);
167 }

◆ occupancyPDFName()

void occupancyPDFName ( const VxdID sensor,
int  side,
std::string &  PDFName 
)
inline

Function to maintain common naming convention between calibration occupancy file generation and occupancy value extraction in main crossTalkFinder module.

Definition at line 27 of file SVDCrossTalkFinderHelperFunctions.h.

28 {
29
30 int layer = sensor.getLayerNumber();
31 int ladder = sensor.getLadderNumber();
32 int sens = sensor.getSensorNumber();
33
34
35 PDFName = std::to_string(layer) + "." + std::to_string(ladder) + "." + std::to_string(sens) + "." + std::to_string(side);
36
37
38 }

◆ provideSVDClusterCombinations()

void provideSVDClusterCombinations ( const StoreArray< SVDCluster > &  svdClusters,
StoreArray< SpacePointType > &  spacePoints,
SVDHitTimeSelection hitTimeCut,
bool  useQualityEstimator,
TFile *  pdfFile,
bool  useLegacyNaming,
unsigned int  numMaxSpacePoints,
std::string  m_eventLevelTrackingInfoName,
const bool &  useSVDGroupInfo,
const int &  numberOfSignalGroups,
const bool &  formSingleSignalGroup,
const SVDNoiseCalibrations noiseCal,
const DBObjPtr< SVDSpacePointSNRFractionSelector > &  svdSpacePointSelectionFunction,
bool  useSVDSpacePointSNRFractionSelector 
)

finds all possible combinations of U and V Clusters for SVDClusters.

first parameter is a storeArray containing SVDClusters. second parameter is a storeArra containing SpacePoints (will be filled in the function). third parameter tels the spacePoint where to get the name of the storeArray containing the related clusters relationweights code the type of the cluster. +1 for u and -1 for v

Definition at line 319 of file SpacePointHelperFunctions.h.

325 {
326 std::unordered_map<VxdID::baseType, ClustersOnSensor>
327 activatedSensors; // collects one entry per sensor, each entry will contain all Clusters on it TODO: better to use a sorted vector/list?
328 std::vector<std::vector<const SVDCluster*> >
329 foundCombinations; // collects all combinations of Clusters which were possible (condition: 1u+1v-Cluster on the same sensor)
330
331 // sort Clusters by sensor. After the loop, each entry of activatedSensors contains all U and V-type clusters on that sensor
332 for (unsigned int i = 0; i < uint(svdClusters.getEntries()); ++i) {
333 SVDCluster* currentCluster = svdClusters[i];
334
335 activatedSensors[currentCluster->getSensorID().getID()].addCluster(currentCluster);
336 }
337
338
339 for (auto& aSensor : activatedSensors)
340 findPossibleCombinations(aSensor.second, foundCombinations, hitTimeCut, useSVDGroupInfo, numberOfSignalGroups,
341 formSingleSignalGroup,
342 noiseCal, svdSpacePointSelectionFunction, useSVDSpacePointSNRFractionSelector);
343
344 // Do not make space-points if their number would be too large to be considered by tracking
345 if (foundCombinations.size() > numMaxSpacePoints) {
346 StoreObjPtr<EventLevelTrackingInfo> m_eventLevelTrackingInfo(m_eventLevelTrackingInfoName);
347 if (m_eventLevelTrackingInfo.isValid()) {
348 m_eventLevelTrackingInfo->setSVDSpacePointCreatorAbortionFlag();
349 }
350 return;
351 }
352
353 for (auto& clusterCombi : foundCombinations) {
354 SpacePointType* newSP = spacePoints.appendNew(clusterCombi);
355 if (useQualityEstimator == true) {
356 double probability;
357 double error;
358 calculatePairingProb(pdfFile, clusterCombi, probability, error, useLegacyNaming);
359 newSP->setQualityEstimation(probability);
360 newSP->setQualityEstimationError(error);
361 }
362 for (auto* cluster : clusterCombi) {
363 newSP->addRelationTo(cluster, cluster->isUCluster() ? 1. : -1.);
364 }
365 }
366 }
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
void calculatePairingProb(TFile *pdfFile, std::vector< const SVDCluster * > &clusters, double &prob, double &error, bool useLegacyNaming)
Function to extract probability of correct (pair from signal hit) cluster pairing from preconfigured ...
void findPossibleCombinations(const Belle2::ClustersOnSensor &aSensor, std::vector< std::vector< const SVDCluster * > > &foundCombinations, const SVDHitTimeSelection &hitTimeCut, const bool &useSVDGroupInfo, const int &numberOfSignalGroups, const bool &formSingleSignalGroup, const SVDNoiseCalibrations &noiseCal, const DBObjPtr< SVDSpacePointSNRFractionSelector > &svdSpacePointSelectionFunction, bool useSVDSpacePointSNRFractionSelector)
stores all possible 2-Cluster-combinations.

◆ provideSVDClusterSingles()

void provideSVDClusterSingles ( const StoreArray< SVDCluster > &  svdClusters,
StoreArray< SpacePointType > &  spacePoints 
)

simply store one spacePoint for each existing SVDCluster.

first parameter is a storeArray containing SVDClusters. second parameter is a storeArra containing SpacePoints (will be filled in the function).

Definition at line 77 of file SpacePointHelperFunctions.h.

79 {
80 for (unsigned int i = 0; i < uint(svdClusters.getEntries()); ++i) {
81 const SVDCluster* currentCluster = svdClusters[i];
82 std::vector<const SVDCluster*> currentClusterCombi = { currentCluster };
83 SpacePointType* newSP = spacePoints.appendNew(currentClusterCombi);
84 newSP->addRelationTo(currentCluster);
85 }
86 }
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).
T * appendNew()
Construct a new T object at the end of the array.
Definition: StoreArray.h:246

◆ spPDFName()

void spPDFName ( const VxdID sensor,
int  uSize,
int  vSize,
int  maxClusterSize,
std::string &  PDFName,
std::string &  errorPDFName,
bool  useLegacyNaming 
)
inline

Function to set name of PDF for spacePoint quality estimation.

Legacy naming convention for PDFs distributed by sensor type rather than sensor ID, not used after 2018 MC calibrated PDFs.

Definition at line 204 of file SpacePointHelperFunctions.h.

206 {
207 if (useLegacyNaming == true) {
208
209 if (uSize > maxClusterSize) uSize = maxClusterSize;
210 if (vSize > maxClusterSize) vSize = maxClusterSize;
211
212 std::string sensorName;
213
214 if (sensor.getLayerNumber() == 3) sensorName = "l3";
215 if (sensor.getLayerNumber() > 3 && sensor.getSensorNumber() == 1) sensorName = "trap";
216 if (sensor.getLayerNumber() > 3 && sensor.getSensorNumber() > 1) sensorName = "large";
217
218 PDFName = sensorName + std::to_string(uSize) + std::to_string(vSize);
219 errorPDFName = "error" + PDFName;
220 } else {
221
222 if (uSize > maxClusterSize) uSize = maxClusterSize;
223 if (vSize > maxClusterSize) vSize = maxClusterSize;
224
225 int layer = sensor.getLayerNumber();
226 int ladder = sensor.getLadderNumber();
227 int sens = sensor.getSensorNumber();
228
229 PDFName = std::to_string(layer) + "." + std::to_string(ladder) + "." + std::to_string(sens) + "." + std::to_string(
230 uSize) + "." + std::to_string(vSize);
231 errorPDFName = PDFName + "_Error";
232 }
233
234
235
236 }

◆ storeInputVectorFromSingleCluster()

void storeInputVectorFromSingleCluster ( const SVDCluster cls,
std::vector< float > &  inputVector,
const SVDNoiseCalibrations noiseCal 
)
inline

Store the input values for SVDSpacePoint selection from the given SVDCluster

Definition at line 91 of file SpacePointHelperFunctions.h.

94 {
95 inputVector.clear();
96 inputVector.resize(3, 0.0);
97
98 auto shaperDigits = cls->getRelationsTo<SVDShaperDigit>();
99 float noise = 0;
100 for (auto iSD : shaperDigits) {
101 auto samples = iSD.getSamples();
102
103 inputVector[0] += samples[0];
104 inputVector[1] += samples[1];
105 inputVector[2] += samples[2];
106
107 VxdID thisSensorID = iSD.getSensorID();
108 bool thisSide = iSD.isUStrip();
109 int thisCellID = iSD.getCellID();
110 float thisNoise = noiseCal.getNoise(thisSensorID, thisSide, thisCellID);
111
112 noise += thisNoise * thisNoise;
113 }
114 noise = sqrt(noise);
115 inputVector[0] = inputVector[0] / noise;
116 inputVector[1] = inputVector[1] / noise;
117 inputVector[2] = inputVector[2] / noise;
118 }

◆ subtractGausFromHistogram()

void subtractGausFromHistogram ( TH1D &  hist,
const double &  integral,
const double &  center,
const double &  sigma,
const double &  sigmaN 
)
inline

Subtract a Gaussian from a histogram.

The gauss is calculated upto the sigmaN passed to the function.

Definition at line 199 of file SVDTimeGroupingModule.h.

202 {
203 addGausToHistogram(hist, integral, center, sigma, sigmaN, false);
204 }
void addGausToHistogram(TH1D &hist, const double &integral, const double &center, const double &sigma, const double &sigmaN, const bool &isAddition=true)
Add (or Subtract) a Gaussian to (or from) a histogram.