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:
36 void setHistFileName(const std::string& name) {m_outputFileName = "histWireEff_" + name + ".root";}
38 void setAverageOccupancyThreshold(const float threshold) { m_averageOccupancyThreshold = threshold; };
39 protected:
41 EResult calibrate() override;
43 bool hasEnoughData();
45 void buildEfficiencies();
47 void detectBadWires();
49 double chiTest(TGraphAsymmErrors* graph1, TGraphAsymmErrors* graph2, double minVale, double maxValue);
50 private:
52 TList* m_efficiencyList = new TList();
53 std::string m_outputFileName = "wire_efficiencies.root";
56 };
57
58
59 }
61}
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.
double chiTest(TGraphAsymmErrors *graph1, TGraphAsymmErrors *graph2, double minVale, double maxValue)
chitest
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.
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.