Belle II Software  release-05-02-19
SVDCrossTalkFinderModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: James Webb *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef SVDCrossTalkFinderModule_H
12 #define SVDCrossTalkFinderModule_H
13 
14 #include <framework/core/Module.h>
15 #include <framework/datastore/StoreArray.h>
16 #include <framework/datastore/StoreObjPtr.h>
17 
18 #include <svd/dataobjects/SVDRecoDigit.h>
19 #include <svd/dataobjects/SVDEventInfo.h>
20 #include <vxd/dataobjects/VxdID.h>
21 #include <svd/calibration/SVDOccupancyCalibrations.h>
22 
23 #include <TFile.h>
24 #include <TH1F.h>
25 
26 #include <string>
27 #include <map>
28 
29 namespace Belle2 {
36  /* Flags potential cross talk strips on Origami sensors */
37 
41  class SVDCrossTalkFinderModule : public Module {
42 
43  public:
44 
45  /* Constructor */
46  SVDCrossTalkFinderModule();
47 
48 
50  virtual void initialize() override;
52  virtual void event() override;
54  virtual void terminate() override;
55 
56 
57  protected:
58 
59  void calculateAverage(const VxdID& sensorID, double& mean, int side);
61  // Data members
62 
63 
65  std::string m_svdRecoDigitsName;
66 
68  StoreArray<SVDRecoDigit> m_svdRecoDigits;
69 
71  std::string m_svdEventInfoName;
72 
74  StoreObjPtr<SVDEventInfo> m_svdEventInfo;
75 
76  int m_uSideOccupancyFactor;
80  int m_nAPVFactor;
84  std::string m_outputFilename;
86  TFile* m_histogramFile = nullptr;
87  std::map<std::string, TH1F* > m_sensorHistograms;
89  //calibration objects
93  };
94 
96 } //end namespace Belle2
97 
98 #endif
Belle2::SVDCrossTalkFinderModule::m_svdRecoDigitsName
std::string m_svdRecoDigitsName
Function to calculate sensor average occupancy.
Definition: SVDCrossTalkFinderModule.h:73
Belle2::SVDCrossTalkFinderModule::m_histogramFile
TFile * m_histogramFile
Filename of root file containing cross-talk strip calibration payload.
Definition: SVDCrossTalkFinderModule.h:94
Belle2::SVDOccupancyCalibrations
This class defines the dbobject and the method to access SVD calibrations from the noise local runs.
Definition: SVDOccupancyCalibrations.h:42
Belle2::SVDCrossTalkFinderModule::m_OccupancyCal
SVDOccupancyCalibrations m_OccupancyCal
SVDOccupancy calibrations db object.
Definition: SVDCrossTalkFinderModule.h:98
Belle2::SVDCrossTalkFinderModule::terminate
virtual void terminate() override
Final output.
Definition: SVDCrossTalkFinderModule.cc:184
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDCrossTalkFinderModule::m_svdEventInfo
StoreObjPtr< SVDEventInfo > m_svdEventInfo
The storeObject for svdEventInfo.
Definition: SVDCrossTalkFinderModule.h:82
Belle2::SVDCrossTalkFinderModule::m_vSideOccupancyFactor
int m_vSideOccupancyFactor
Parameter to define high occupancy strips (some multiple above sensor average occupancy)
Definition: SVDCrossTalkFinderModule.h:86
Belle2::SVDCrossTalkFinderModule::m_svdEventInfoName
std::string m_svdEventInfoName
SVDEventInfo collection name.
Definition: SVDCrossTalkFinderModule.h:79
Belle2::SVDCrossTalkFinderModule::m_svdRecoDigits
StoreArray< SVDRecoDigit > m_svdRecoDigits
The storeArray for svdRecoDigits.
Definition: SVDCrossTalkFinderModule.h:76
Belle2::SVDCrossTalkFinderModule::m_nAPVFactor
int m_nAPVFactor
Parameter to define high occupancy strips (some multiple above sensor average occupancy)
Definition: SVDCrossTalkFinderModule.h:88
Belle2::SVDCrossTalkFinderModule::event
virtual void event() override
Event.
Definition: SVDCrossTalkFinderModule.cc:84
Belle2::SVDCrossTalkFinderModule::m_sensorHistograms
std::map< std::string, TH1F * > m_sensorHistograms
Pointer to root TFile containing histograms for calibration payload.
Definition: SVDCrossTalkFinderModule.h:95
Belle2::SVDCrossTalkFinderModule::m_createCalibrationPayload
bool m_createCalibrationPayload
Parameter to set number of sensors with possible cross-talk clusters required for event flagging.
Definition: SVDCrossTalkFinderModule.h:90
Belle2::SVDCrossTalkFinderModule::m_outputFilename
std::string m_outputFilename
If true module will produce and write-out payload for SVDCrossTalkStripsCalibrations.
Definition: SVDCrossTalkFinderModule.h:92
Belle2::SVDCrossTalkFinderModule::initialize
virtual void initialize() override
Init the module.
Definition: SVDCrossTalkFinderModule.cc:49