Belle II Software  release-06-02-00
SVDClusterizerModule.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 
9 #pragma once
10 
11 #include <framework/core/Module.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <framework/database/DBObjPtr.h>
14 
15 #include <svd/reconstruction/RawCluster.h>
16 #include <svd/reconstruction/SVDClusterTime.h>
17 #include <svd/reconstruction/SVDClusterCharge.h>
18 #include <svd/reconstruction/SVDClusterPosition.h>
19 
20 #include <mdst/dataobjects/MCParticle.h>
21 #include <svd/dataobjects/SVDShaperDigit.h>
22 #include <svd/dataobjects/SVDCluster.h>
23 #include <svd/dataobjects/SVDTrueHit.h>
24 
25 #include <svd/calibration/SVDPulseShapeCalibrations.h>
26 #include <svd/calibration/SVDNoiseCalibrations.h>
27 #include <svd/calibration/SVDClustering.h>
28 #include <svd/dbobjects/SVDRecoConfiguration.h>
29 
30 namespace Belle2 {
36  namespace SVD {
37 
45  class SVDClusterizerModule : public Module {
46 
47  public:
48 
51 
53  void initialize() override;
54 
56  void beginRun() override;
57 
59  void event() override;
60 
62  void endRun() override;
63 
64  protected:
65 
66  //1. Collections and relations Names
70  std::string m_storeClustersName;
72  std::string m_storeTrueHitsName;
75 
86 
95 
96  // 2. Clustering
98  double m_cutSeed = 5;
100  double m_cutAdjacent = 3;
102  double m_cutCluster = 0;
104  bool m_useDB = true;
105 
106  // 3. Cluster Reconstruction Configuration:
109  std::string m_timeRecoWith6SamplesAlgorithm = "not set";
111  std::string m_timeRecoWith3SamplesAlgorithm = "not set";
113  std::string m_chargeRecoWith6SamplesAlgorithm = "not set";
115  std::string m_chargeRecoWith3SamplesAlgorithm = "not set";
117  std::string m_positionRecoWith6SamplesAlgorithm = "not set";
119  std::string m_positionRecoWith3SamplesAlgorithm = "not set";
120 
122  std::string m_stripTimeRecoWith6SamplesAlgorithm = "not set";
124  std::string m_stripTimeRecoWith3SamplesAlgorithm = "not set";
126  std::string m_stripChargeRecoWith6SamplesAlgorithm = "not set";
128  std::string m_stripChargeRecoWith3SamplesAlgorithm = "not set";
129 
138  // 4. Calibration Objects
139  bool m_returnRawClusterTime = false;
150  double applyLorentzShiftCorrection(double position, VxdID vxdID, bool isU);
151 
156  void finalizeCluster(Belle2::SVD::RawCluster& rawCluster);
157 
162 
163  };// end class declarations
164 
165 
166  } //end SVD namespace;
168 } // end namespace Belle2
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Base class for Modules.
Definition: Module.h:72
This class defines the dbobject and the methods to access the calibration of the cluster reconstructi...
Definition: SVDClustering.h:29
This class defines the dbobject and the method to access SVD calibrations from the noise local runs.
Class representing a raw cluster candidate during clustering of the SVD.
Definition: RawCluster.h:33
Abstract Class representing the SVD cluster charge.
Abstract Class representing the SVD cluster position.
Abstract Class representing the SVD cluster time.
std::string m_stripChargeRecoWith3SamplesAlgorithm
string storing the strip charge reconstruction algorithm for cluster reconstruction in 3-sample DAQ m...
double applyLorentzShiftCorrection(double position, VxdID vxdID, bool isU)
returns the position of the cluster after lorentz shift correction
SVDClusterCharge * m_charge6SampleClass
cluster charge class for the 6-sample acquisition mode
SVDClusterCharge * m_charge3SampleClass
cluster charge class for the 3-sample acquisition mode
SVDClusterPosition * m_position3SampleClass
cluster position class for the 3-sample acquisition mode
StoreArray< SVDTrueHit > m_storeTrueHits
Collection of SVDTrueHits.
StoreArray< SVDShaperDigit > m_storeDigits
Collection of SVDShaperDigits.
std::string m_relShaperDigitMCParticleName
Name of the relation between SVDShaperDigits and MCParticles.
void initialize() override
Initialize the module.
StoreArray< MCParticle > m_storeMCParticles
Collection of MCParticles.
std::string m_storeShaperDigitsName
Name of the collection to use for the SVDShaperDigits.
void event() override
does the actual clustering
SVDNoiseCalibrations m_NoiseCal
SVDNoise calibrations db object.
void endRun() override
delete pointers
double m_cutCluster
Cluster cut in units of m_elNoise, not included (yet?)
std::string m_storeTrueHitsName
Name of the collection to use for the SVDTrueHits.
SVDClustering m_ClusterCal
SVDCluster calibrations db object.
SVDClusterTime * m_time6SampleClass
cluster time class for the 6-sample acquisition mode
std::string m_storeMCParticlesName
Name of the collection to use for the MCParticles.
std::string m_chargeRecoWith6SamplesAlgorithm
string storing the cluster charge reconstruction algorithm in 6-sample DAQ mode
std::string m_chargeRecoWith3SamplesAlgorithm
string storing the cluster charge reconstruction algorithm in 3-sample DAQ mode
int m_numberOfAcquiredSamples
number of acquired samples, can be 6 or 3 (1 is not supported!)
std::string m_relShaperDigitTrueHitName
Name of the relation between SVDShaperDigits and SVDTrueHits.
std::string m_positionRecoWith3SamplesAlgorithm
string storing the cluster position reconstruction algorithm in 3-sample DAQ mode
std::string m_stripTimeRecoWith6SamplesAlgorithm
string storing the strip time reconstruction algorithm for cluster position reconstruction in 6-sampl...
void beginRun() override
configure clustering
void writeClusterRelations(Belle2::SVD::RawCluster &rawCluster)
writes the relations of the SVDClusters with the other StoreArrays
SVDClusterPosition * m_position6SampleClass
cluster position class for the 6-sample acquisition mode
std::string m_stripChargeRecoWith6SamplesAlgorithm
string storing the strip charge reconstruction algorithm for cluster position reconstruction in 6-sam...
std::string m_storeClustersName
Name of the collection to use for the SVDClusters.
double m_cutSeed
Seed cut in units of noise.
std::string m_relClusterShaperDigitName
Name of the relation between SVDClusters and SVDShaperDigits.
std::string m_relClusterMCParticleName
Name of the relation between SVDClusters and MCParticles.
void finalizeCluster(Belle2::SVD::RawCluster &rawCluster)
computes charge, position and time of the raw cluster and appends the new SVDCluster to the StoreArra...
std::string m_stripTimeRecoWith3SamplesAlgorithm
string storing the strip time reconstruction algorithm for cluster position reconstruction in 3-sampl...
SVDClusterizerModule()
Constructor defining the parameters.
std::string m_timeRecoWith6SamplesAlgorithm
string storing the cluster time reconstruction algorithm in 6-sample DAQ mode
DBObjPtr< SVDRecoConfiguration > m_recoConfig
SVD Reconstruction Configuration payload.
std::string m_positionRecoWith6SamplesAlgorithm
string storing the cluster position reconstruction algorithm in 6-sample DAQ mode
StoreArray< SVDCluster > m_storeClusters
Collection of SVDClusters.
std::string m_timeRecoWith3SamplesAlgorithm
string storing the cluster time reconstruction algorithm in 3-sample DAQ mode
bool m_useDB
if true takes the clusterizer cuts and reconstruction configuration from the DB objects
SVDClusterTime * m_time3SampleClass
cluster time class for the 3-sample acquisition mode
double m_cutAdjacent
Adjacent cut in units of noise.
std::string m_relClusterTrueHitName
Name of the relation between SVDClusters and SVDTrueHits.
bool m_returnRawClusterTime
if true cluster time is not calibrated, to be used for time calibration
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.