Belle II Software development
DATCONSVDClusterizer.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/findlets/base/Findlet.h>
11#include <framework/datastore/StoreArray.h>
12#include <vxd/geometry/GeoCache.h>
13#include <svd/calibration/SVDNoiseCalibrations.h>
14
15#include <string>
16#include <vector>
17#include <fstream>
18#include <numeric>
19
20namespace Belle2 {
25 class ModuleParamList;
26 class DATCONSVDDigit;
27 class SVDCluster;
28 struct DATCONSVDClusterCandidate;
29
35 class DATCONSVDClusterizer : public TrackFindingCDC::Findlet<const DATCONSVDDigit, SVDCluster> {
38
40 typedef std::map<int, float> SimpleSVDNoiseMap;
41
42 public:
45
47 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override;
48
50 void initialize() override;
51
53 void beginRun() override;
54
56 void apply(const std::vector<DATCONSVDDigit>& digits, std::vector<SVDCluster>& clusters) override;
57
58 private:
61
65 float calculateSNR(DATCONSVDDigit digit);
66
70 void saveCluster(DATCONSVDClusterCandidate& clusterCand, std::vector<SVDCluster>& clusters);
71
74
75 // Parameters
78
80 std::string m_param_noiseMapfileName = "noiseMap.txt";
84 bool m_param_isU = true;
85
89 std::string m_param_storeSVDClustersName = "DATCONSVDClusters";
92
94 unsigned short m_param_maxiClusterSize = 20;
101
104
105 };
107}
Findlet for clustering DATCONSVDDigits and creating SVDClusters that are used for tracking in DATCON.
void initialize() override
Create the store arrays.
float m_param_noiseCut
Value above which u-strips are considered noisy, all other u-strips will get assigned a standard nois...
bool m_param_writeNoiseMapsToFile
Write the noise map to file m_param_noiseMapfileName for export to FPGA?
SimpleSVDNoiseMap m_svdNoiseMap
Simple noise map for u-strips*‍/.
SVDNoiseCalibrations m_NoiseCal
SVD Noise payload.
bool m_param_isU
Is this the finldlet for u-side or for v-side?
float m_param_requiredSNRstrip
Require a SNR for a u-strip signal to be valid.
StoreArray< SVDCluster > m_storeSVDClusters
StoreArray to save the clusters to.
std::string m_param_noiseMapfileName
File name for a file containing the noise of the strips for export to FPGA.
unsigned short m_param_maxiClusterSize
maximum cluster size
std::map< int, float > SimpleSVDNoiseMap
Simple representation of a SVD Noise Map.
void apply(const std::vector< DATCONSVDDigit > &digits, std::vector< SVDCluster > &clusters) override
Load in the DATCONSVDDigits and create SVDClusters from them.
float calculateSNR(DATCONSVDDigit digit)
calculate the SNR of a DATCONSVDDigit (= one strip) in a simplified way
void beginRun() override
Begin Run.
void saveCluster(DATCONSVDClusterCandidate &clusterCand, std::vector< SVDCluster > &clusters)
save the current cluster candidate as a SVDCluster
void fillDATCONSVDNoiseMap()
fill the noise map to be used for SNR cuts
DATCONSVDClusterizer()
Cluster SVD strips.
const VXD::GeoCache & m_geoCache
instance of GeoCache to avoid creating it again for every cluster
float m_param_requiredSNRcluster
Require a SNR for at least one strip in the u-cluster to make the cluster valid.
bool m_param_saveClusterToDataStore
Save SVDCluster to DataStore for analysis?
std::string m_param_storeSVDClustersName
SVDClusters StoreArray name.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
The DATCONSVDDigit class.
The Module parameter list class.
This class defines the dbobject and the method to access SVD calibrations from the noise local runs.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition: Findlet.h:26
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Abstract base class for different kinds of events.
struct containing a cluster candidate for easier handling