Belle II Software development
WireEfficiencyAlgorithm.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 <TEfficiency.h>
12#include <calibration/CalibrationAlgorithm.h>
13#include <framework/database/DBObjPtr.h>
14
15#include <cdc/dbobjects/CDCGeometry.h>
16#include <cdc/dbobjects/CDCBadWires.h>
17
18#include <string>
19
20namespace Belle2 {
25 namespace CDC {
30 public:
37
41 void setHistFileName(const std::string& name) {m_outputFileName = "histWireEff_" + name + ".root";}
43 void setAverageOccupancyThreshold(const float threshold) { m_averageOccupancyThreshold = threshold; };
44 protected:
46 EResult calibrate() override;
48 bool hasEnoughData();
50 void buildEfficiencies();
52 void detectBadWires();
54 static double chiTest(TGraphAsymmErrors* graph1, TGraphAsymmErrors* graph2, double minVale, double maxValue);
55 private:
57 TList* m_efficiencyList = new TList();
58 std::string m_outputFileName = "wire_efficiencies.root";
61 };
62
63
64 }
66}
Database object for bad wires.
Definition CDCBadWires.h:27
TList * m_efficiencyList
TList of efficiencies.
void setAverageOccupancyThreshold(const float threshold)
Set the average occupancy threshold.
static double chiTest(TGraphAsymmErrors *graph1, TGraphAsymmErrors *graph2, double minVale, double maxValue)
chitest
WireEfficiencyAlgorithm(const WireEfficiencyAlgorithm &)=delete
Copy constructor (disabled).
CDCBadWires * m_badWireList
BadWireList that willbe built.
DBObjPtr< CDCGeometry > m_cdcGeo
Geometry of CDC.
void setHistFileName(const std::string &name)
Set name for histogram output.
WireEfficiencyAlgorithm & operator=(const WireEfficiencyAlgorithm &)=delete
Operator = (disabled).
EResult calibrate() override
Run algo on data.
void buildEfficiencies()
create 2D TEfficiency for each wire
bool hasEnoughData()
check if there is enough data to run the calibration
float m_averageOccupancyThreshold
Threshold for the average layer occupancy to run the calibration.
std::string m_outputFileName
name of the output file
EResult
The result of calibration.
CalibrationAlgorithm(const std::string &collectorModuleName)
Constructor - sets the prefix for collected objects (won't be accesses until execute(....
Class for accessing objects in the database.
Definition DBObjPtr.h:21
Abstract base class for different kinds of events.