10 gROOT->LoadMacro(
"$VMCWORKDIR/macro/run/bmnloadlibs.C");
14 TString inName =
Form(
"bmn_run%04d_digi.root", runId);
21 cout << nEvents << endl;
24 const UInt_t nStrips[kNST] = {256, 825, 825, 825, 825, 825, 1019, 1019};
35 name =
Form(
"X_%d",
i);
36 h_X[
i] =
new TH1F(name, name, nStrips[
i], 0, nStrips[
i]);
37 name =
Form(
"X_color_%d",
i);
38 h_X_2d[
i] =
new TH2F(name, name, nStrips[
i], 0, nStrips[
i], 1, 0, 1);
39 name =
Form(
"X0_%d",
i);
40 h_X0[
i] =
new TH1F(name, name, 500, 1, 500);
41 name =
Form(
"X0_color_%d",
i);
42 h_X0_2d[
i] =
new TH2F(name, name, 500, 1, 500, 1, 0, 1);
43 name =
Form(
"Amp_%d",
i);
44 h_Amp[
i] =
new TH1F(name, name, 100, 0, 500);
45 name =
Form(
"XAmp_%d",
i);
46 h_XAmp[
i] =
new TH1F(name, name, 500, 0, 1000);
49 for (
Int_t iEv = 0; iEv < nEvents; iEv++) {
51 cout <<
"EVENT: " << iEv << endl;
63 h_X_2d[st]->
Fill(str, 0);
64 }
else if (mod == 1 && st == 6) {
65 h_X[st + 1]->
Fill(str);
66 h_X_2d[st + 1]->
Fill(str, 0);
71 const Float_t kThresh = 0.15 * nEvents;
75 if (h_X[
i]->GetBinContent(j) > kThresh)
78 if (h_X_2d[
i]->GetBinContent(j, k) > kThresh)
83 TCanvas* SuperCave =
new TCanvas(
"SuperCave",
"SuperCave", 66 * 100, 41 * 100);
87 SuperCave->
Print(
Form(
"gem_run%04d.pdf(", runId),
"");
88 }
else if (
i == (kNST - 1)) {
89 SuperCave->
Print(
Form(
"gem_run%04d.pdf)", runId),
"");
91 SuperCave->
Print(
Form(
"gem_run%04d.pdf", runId),
"");
95 }
else if (type ==
"png") {
96 TCanvas* SuperCave =
new TCanvas(
"SuperCave",
"SuperCave", 66 * 100, 41 * 100);
99 SuperCave->
SaveAs(
Form(
"gem_run%04d_st%d.png", runId,
i));
111 const Float_t bigBottMarg = 0.1;
112 const Float_t bigTopMarg = 0.1;
113 const Float_t bigLeftMarg = 0.1;
114 const Float_t bigRightMarg = 0.1;
118 pad1->
SetMargin(bigLeftMarg, bigRightMarg, bigBottMarg, bigTopMarg);
129 pad2 =
new TPad(x0->
GetTitle(), x0->
GetTitle(), bigLeftMarg, bigBottMarg, xSmall / xBig + bigLeftMarg,
130 ySmall / yBig + bigBottMarg);
131 pad2->
SetMargin(0, bigRightMarg, 0, bigTopMarg);
133 pad2 =
new TPad(x0->
GetTitle(), x0->
GetTitle(), 1.0 - bigRightMarg - xSmall / xBig, bigBottMarg,
134 1.0 - bigRightMarg, ySmall / yBig + bigBottMarg);
135 pad2->
SetMargin(bigLeftMarg, 0, 0, bigTopMarg);
163 const Float_t bigBottMarg = 0.1;
164 const Float_t bigTopMarg = 0.1;
165 const Float_t bigLeftMarg = 0.1;
166 const Float_t bigRightMarg = 0.1;
181 TPad* pad2 =
new TPad(
"",
"", 0, 0.5, 1.0, 1.0);
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
virtual void SetLabelSize(Float_t size=0.04)
virtual void SetTickLength(Float_t length=0.03)
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
virtual void SetFillColor(Color_t fcolor)
virtual void SetLineColor(Color_t lcolor)
virtual void SetBottomMargin(Float_t bottommargin)
void SetFrameFillColor(Color_t color=1)
void SetFrameFillStyle(Style_t styl=0)
virtual void SetTopMargin(Float_t topmargin)
void SetFrameLineWidth(Width_t width=1)
virtual void SetMargin(Float_t left, Float_t right, Float_t bottom, Float_t top)
virtual Double_t GetBinWidth(Int_t bin) const
TVirtualPad * cd(Int_t subpadnumber=0) override
Int_t SetBranchAddress(const char *bname, T **add, TBranch **ptr=nullptr)
virtual Int_t Add(const char *name, Long64_t nentries=TTree::kMaxEntries)
Long64_t GetEntries() const override
Int_t GetEntry(Long64_t entry=0, Int_t getall=0) override
virtual Int_t GetNbinsY() const
virtual Int_t GetNbinsX() const
void Draw(Option_t *option="") override
virtual Int_t Fill(const char *name, Double_t w)
virtual void SetBinContent(Int_t bin, Double_t content)
virtual Int_t Fill(const char *namex, const char *namey, Double_t w)
void SetBinContent(Int_t bin, Double_t content) override
virtual TLine * DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
const char * GetTitle() const override
Int_t GetEntriesFast() const
TObject * At(Int_t idx) const override
void SetFillStyle(Style_t fstyle) override
void SaveAs(const char *filename="", Option_t *option="") const override
TVirtualPad * cd(Int_t subpadnumber=0) override
void Draw(Option_t *option="") override
void Print(const char *filename, Option_t *option) override
void DrawGemDigitsColz(TH2F *h_2d, TH1F *h, TCanvas *cave)
void GemDigitsAnalysis(UInt_t runId=0, TString type="pdf")
void DrawGemDigits(TH1F *x0, TH1F *x1, TCanvas *cave, Bool_t right=kFALSE)