26#include <framework/database/DBObjPtr.h>
27#include <framework/database/IntervalOfValidity.h>
29#include <reconstruction/dbobjects/CDCDedxBadWires.h>
30#include <reconstruction/dbobjects/CDCDedxWireGain.h>
32#include <calibration/CalibrationAlgorithm.h>
34#include <cdc/dbobjects/CDCGeometry.h>
35#include <cdc/geometry/CDCGeometryPar.h>
36#include <cdc/geometry/CDCGeometryParConstants.h>
111 void plotWireDist(
const std::vector<double>& inwires, std::map<
int, std::vector<double>>& vhitvar);
116 void printCanvas(TList* list, TList* hflist, Color_t color);
121 void plotBadWireMap(
const std::vector<double>& vbadwires,
const std::vector<double>& vdeadwires);
126 TH2F*
getHistoPattern(
const std::vector<double>& inwires,
const std::string& suffix,
int& total);
131 void plotQaPars(std::map<
int, std::vector<double>>& qapars);
143 pt->SetTextAlign(11);
144 pt->SetFillStyle(3001);
147 pt->SetTextSize(size);
155 hist->SetMarkerStyle(20);
156 hist->SetMarkerSize(0.3);
157 hist->SetMarkerColor(color);
158 hist->SetFillColor(color);
A calibration algorithm for CDC dE/dx to find the bad wires.
virtual ~CDCDedxBadWireAlgorithm()
Destructor.
void setHistCosmetics(TH2F *hist, Color_t color)
function to change histogram styles
void plotBadWireMap(const std::vector< double > &vbadwires, const std::vector< double > &vdeadwires)
function to plot wire status map (all, bad and dead)
double m_varMax
max range for input variable
double m_rmsThres
rms Threshold accepted for good wire
double m_varMin
min range for input variable
std::string m_varName
std::string to set var name (adc or dedx)
void getExpRunInfo()
function to get extract calibration run/exp
unsigned int c_nwireCDC
number of wires in CDC
double m_arms
average rms of dedx for all wires
bool m_isMakePlots
produce plots for status
void setHighFracThres(double value)
function to set high dedx fraction threshold
DBObjPtr< CDCDedxBadWires > m_DBBadWires
Badwire DB object.
void setMeanThres(double value)
function to set Mean Threshold
std::string m_suffix
suffix std::string for naming plots
void setTextCosmetics(TPaveText *pt, double size)
function to change text styles
CDCDedxBadWireAlgorithm()
Constructor: Sets the description, the properties and the parameters of the algorithm.
DBObjPtr< CDCGeometry > m_cdcGeo
Geometry of CDC.
double m_meanThres
mean Threshold accepted for good wire
DBObjPtr< CDCDedxWireGain > m_DBWireGains
Wiregain DB object.
double m_fracThres
high-frac Threshold accepted for good wire
int m_varBins
number of bins for input variable
void printCanvas(TList *list, TList *hflist, Color_t color)
function to print canvas
void plotQaPars(std::map< int, std::vector< double > > &qapars)
function to plot the QA (decision) parameters
void plotEventStats()
function to draw the stats
void setRMSThres(double value)
function to set RMS Threshold
virtual EResult calibrate() override
cdcdedx badwire algorithm
void setADC(bool value=false)
function to choose adc or dedx as variable
void plotWireDist(const std::vector< double > &inwires, std::map< int, std::vector< double > > &vhitvar)
function to draw per wire plots
void setHistPars(int nbin, double min, double max)
function to set adc/dedx parameters
void setMonitoringPlots(bool value=false)
function to enable plotting
double m_amean
average mean of dedx for all wires
bool m_isADC
Use adc if(true) else dedx for calibration.
TH2F * getHistoPattern(const std::vector< double > &inwires, const std::string &suffix, int &total)
function to get wire map with input file (all, bad and dead)
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.