Go to the documentation of this file.
17 #include <boost/assign/list_of.hpp>
19 using boost::assign::list_of;
25 using std::stringstream;
51 char eLossModelChar[15];
58 Out() <<
"Number of events: "
59 <<
HM()->
H1(
"h_EventNo_DigitizeQa")->GetEntries() << endl;
61 Out() <<
"Digitizer parameters: " << endl;
62 Out() <<
"\t noise \t\t\t" << noise <<
" e" << endl;
63 Out() <<
"\t threshold \t\t" << threshold <<
" e" << endl;
64 Out() <<
"\t dynamic range \t\t" << dynRange <<
" e" << endl;
65 Out() <<
"\t number of ADC \t\t" << nAdc << endl;
66 Out() <<
"\t time resolution \t" << timeResolution <<
" ns" << endl;
67 Out() <<
"\t dead time \t\t" << deadTime <<
" ns" << endl;
69 Out() <<
"Detector response model takes into account: " << endl;
70 Out() <<
"\t energy loss model: \t" << eLossModelChar << endl;
71 Out() <<
"\t diffusion: \t\t" << (diffusion ?
"On" :
"Off") << endl;
72 Out() <<
"\t Lorentz shift: \t" << (lorentz ?
"On" :
"Off") << endl;
73 Out() <<
"\t cross talk: \t\t" << (crossTalk ?
"On" :
"Off") << endl;
92 string name =
"h_NofObjects_";
93 if (!
HM()->Exists(name +
"Points") && !
HM()->Exists(name +
"Digis")
94 && !
HM()->Exists(name +
"Digis_Station")
95 && !
HM()->Exists(name +
"Points_Station"))
99 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 800, 500);
103 vector<string> labels = list_of(
"Points")(
"Digis");
104 vector<TH1*> histos =
105 list_of(
HM()->
H1(name +
"Points"))(
HM()->
H1(name +
"Digis"));
108 vector<TH1*> histos1 = list_of(
HM()->
H1(name +
"Points_Station"))(
109 HM()->
H1(name +
"Digis_Station"));
112 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 800, 500);
119 string name =
"h_DigisPerChip_Station";
121 if (!
HM()->Exists(Form(
"h_DigisPerChip_Station%i", stationId))
122 && !
HM()->Exists(Form(
"h_PointsMap_Station%i", stationId))
123 && !
HM()->Exists(Form(
"h_MeanAngleMap_Station%i", stationId))
124 && !
HM()->Exists(Form(
"h_RMSAngleMap_Station%i", stationId)))
129 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 2400, 600);
130 canvas->Divide(4, 2);
133 string name1 =
"h_PointsMap_Station";
136 CreateCanvas(canvasName1.c_str(), canvasName1.c_str(), 2400, 600);
137 canvas1->Divide(4, 2);
140 string name2 =
"h_MeanAngleMap_Station";
143 CreateCanvas(canvasName2.c_str(), canvasName2.c_str(), 2400, 600);
144 canvas2->Divide(4, 2);
147 string name3 =
"h_RMSAngleMap_Station";
150 CreateCanvas(canvasName3.c_str(), canvasName3.c_str(), 2400, 600);
151 canvas3->Divide(4, 2);
155 canvas->cd(stationId + 1);
156 DrawH2(
HM()->
H2(Form(
"%s%i", name.c_str(), stationId)),
161 canvas1->cd(stationId + 1);
162 DrawH2(
HM()->
H2(Form(
"%s%i", name1.c_str(), stationId)),
167 canvas2->cd(stationId + 1);
168 DrawH2(
HM()->
H2(Form(
"%s%i", name2.c_str(), stationId)),
173 canvas3->cd(stationId + 1);
174 DrawH2(
HM()->
H2(Form(
"%s%i", name3.c_str(), stationId)),
184 if (!
HM()->Exists(name +
"PointsInDigiLog")
185 && !
HM()->Exists(name +
"DigisByPointLog"))
187 string canvasName =
GetReportName() + name +
"PointsInDigiLog";
189 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 800, 500);
193 vector<TH1*> histos = list_of(
HM()->
H1(name +
"PointsInDigiLog"));
194 vector<string> labels =
195 list_of(Form(
"Points in digi, \n mean = %.2f",
196 HM()->
H1(name +
"PointsInDigiLog")->GetMean()));
200 vector<TH1*> histos1 = list_of(
HM()->
H1(name +
"DigisByPointLog"));
201 vector<string> labels1 =
202 list_of(Form(
"Digis by point, \n mean = %.2f",
203 HM()->
H1(name +
"DigisByPointLog")->GetMean()));
205 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 800, 500);
214 if (!
HM()->Exists(name +
"PointsInDigi")
215 && !
HM()->Exists(name +
"DigisByPoint"))
219 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 800, 500);
222 vector<TH1*> histos = list_of(
HM()->
H1(name +
"PointsInDigi"));
223 vector<string> labels =
224 list_of(Form(
"Points in digi, \n mean = %.2f",
225 HM()->
H1(name +
"PointsInDigi")->GetMean()));
229 vector<TH1*> histos1 = list_of(
HM()->
H1(name +
"DigisByPoint"));
230 vector<string> labels1 =
231 list_of(Form(
"Digis by point, \n mean = %.2f",
232 HM()->
H1(name +
"DigisByPoint")->GetMean()));
234 CreateCanvas(canvasName.c_str(), canvasName.c_str(), 800, 500);
242 Int_t nofEvents =
HM()->
H1(
"h_EventNo_DigitizeQa")->GetEntries();
243 if (nofEvents == 0) nofEvents = 1;
TCanvas * CreateCanvas(const char *name, const char *title, Int_t ww, Int_t wh)
Create canvas and put it to vector of TCanvases. Canvases created with this function will be automati...
void DrawNofObjectsHistograms()
Double_t GetNoise() const
Electronic noise RMS.
Double_t GetThreshold() const
ADC Threshold.
const CbmStsParAsic * fAsicPar
void ScaleByPattern(const std::string &pattern, Double_t scale)
Scale histograms which name matches specified pattern.
TH2 * H2(const std::string &name) const
Return pointer to TH2 histogram.
virtual std::string DocumentBegin() const =0
Return string with open tags for document.
string FindAndReplace(const string &name, const string &oldSubstr, const string &newSubstr)
void ShrinkEmptyBinsH1ByPattern(const std::string &pattern)
Shrink empty bins in H1.
virtual std::string DocumentEnd() const =0
Return string with close tags of the document.
const std::string & GetReportName() const
const CbmReportElement * R() const
Accessor to CbmReportElement object. User has to write the report using available tags from CbmReport...
Helper functions for drawing 1D and 2D histograms and graphs.
UShort_t GetNofAdc() const
Number of ADC channels.
CbmStsELoss ELossModel() const
Energy loss model.
Abstract class for basic report elements (headers, tables, images etc.).
Int_t GetNofStations() const
void SetReportName(const std::string &name)
void DrawH1(TH1 *hist, HistScale logx, HistScale logy, const string &drawOpt, Int_t color, Int_t lineWidth, Int_t lineStyle, Int_t markerSize, Int_t markerStyle)
void PrintCanvases() const
Print images created from canvases in the report.
CbmStsELoss
Energy loss model used in simulation.
Parameters of the STS readout ASIC.
virtual ~CbmStsDigitizeQaReport()
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
virtual void Draw()
Pure abstract function which is called from public Create() function. This function has to draw all n...
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
const CbmStsParSim * fSettings
Class representing the top level of the STS setup.
void DrawH1ByPattern(const std::string &histNamePattern)
Select by pattern TH1 histograms and draw each histogram on separate canvas.
Bool_t CrossTalk() const
Check whether cross-talk is applied.
CbmStsDigitizeQaReport(CbmStsSetup *setup, const CbmStsParSim *settings, const CbmStsParAsic *asicPar)
Bool_t LorentzShift() const
Check whether Lorentz shift is applied.
Double_t GetDynRange() const
Dynamic range of ADC.
Settings for STS simulation (digitizer)
CbmHistManager * HM() const
Return pointer to Histogram manager.
Base class for simulation reports.
std::ostream & Out() const
All text output goes to this stream.
void DrawH2(TH2 *hist, HistScale logx, HistScale logy, HistScale logz, const string &drawOpt)
Bool_t Diffusion() const
Check whether diffusion is applied.
virtual void Create()
Inherited from CbmReport. Pure abstract function which is called from public Create() function.
Double_t GetDeadTime() const
Single-channel dead time.
virtual std::string Title(int size, const std::string &title) const =0
Return string with title.
std::string NumberToString(const T &value, int precision=1)
vector< string > Split(const string &name, char delimiter)
Double_t GetTimeResol() const
Time resolution.