24#include <reconstruction/dbobjects/CDCDedxWireGain.h>
25#include <reconstruction/dbobjects/CDCDedxBadWires.h>
26#include <cdc/dbobjects/CDCGeometry.h>
27#include <calibration/CalibrationAlgorithm.h>
28#include <framework/database/DBObjPtr.h>
29#include <framework/database/IntervalOfValidity.h>
31#include <cdc/geometry/CDCGeometryPar.h>
32#include <cdc/geometry/CDCGeometryParConstants.h>
34const unsigned int c_nwireCDC = c_nSenseWires;
87 void getTruncatedBins(TH1D* hdedxhit,
unsigned int& binlow,
unsigned int& binhigh);
102 void plotWireDist(
const std::vector<TH1D*>& hist,
const std::vector<double>& vrel_mean);
107 void plotWireGain(
const std::vector<double>& vdedx_means,
const std::vector<double>& vrel_mean,
double layeravg);
112 void plotLayerGain(
const std::vector<double>& layermean,
double layeravg);
117 void plotWGPerLayer(
const std::vector<double>& vdedx_means,
const std::vector<double>& layermean,
double layeravg);
A calibration algorithm for CDC dE/dx wire gains.
void plotWGPerLayer(const std::vector< double > &vdedx_means, const std::vector< double > &layermean, double layeravg)
function to draw WG per layer
void plotLayerGain(const std::vector< double > &layermean, double layeravg)
function to draw layer gains
void plotLayerDist(std::array< TH1D *, 2 > hdedxL)
function to draw dE/dx for inner/outer layer
bool m_isMerge
merge payload at the time of calibration
double m_truncMax
max trunc range for mean
double m_truncMin
min trunc range for mean
void enableExtraPlots(bool value=false)
function to set flag active for plotting
void getTruncatedBins(TH1D *hdedxhit, unsigned int &binlow, unsigned int &binhigh)
function to get bins of truncation from histogram
void plotWireGain(const std::vector< double > &vdedx_means, const std::vector< double > &vrel_mean, double layeravg)
function to draw wire gains
void getExpRunInfo()
function to get extract calibration run/exp
void createPayload(const std::vector< double > &vdedx_tmeans)
function to finally store new payload after full calibration
void plotWireDist(const std::vector< TH1D * > &hist, const std::vector< double > &vrel_mean)
function to draw dE/dx histograms for each wire
bool m_isMakePlots
Save arithmetic and truncated mean for the 'dedx' values.
DBObjPtr< CDCDedxBadWires > m_DBBadWires
Bad wire DB object.
void setWireBasedTruction(bool value=false)
function to set truncation method (local vs global)
std::string m_suffix
suffix string to separate plots
double getTruncationMean(TH1D *hdedxhit, int binlow, int binhigh)
function to get mean of truncation from histogram
int m_dedxBins
number of bins for dedx histogram
DBObjPtr< CDCGeometry > m_cdcGeo
Geometry of CDC.
CDCDedxWireGainAlgorithm()
Constructor: Sets the description, the properties and the parameters of the algorithm.
DBObjPtr< CDCDedxWireGain > m_DBWireGains
Wire gain DB object.
virtual ~CDCDedxWireGainAlgorithm()
Destructor.
void setMergePayload(bool value=true)
function to decide merge vs relative gains
void plotEventStats()
function to draw statstics
virtual EResult calibrate() override
Wire gain algorithm.
double m_dedxMax
max dedx range for wiregain cal
double m_dedxMin
min dedx range for wiregain cal
bool m_isWireTruc
method of trunc range for mean
Base class for calibration algorithms.
EResult
The result of calibration.
Class for accessing objects in the database.
Abstract base class for different kinds of events.