29 #include "TRootEmbeddedCanvas.h"
30 #include "TGListBox.h"
52 if (plane != NULL )plane->
print();
68 for(Int_t ndet=0;ndet<2;ndet++) {
71 if ( m == NULL )
continue;
74 for(Int_t j=0;j<
NCHAN;j++){
76 for(Int_t i=0;i<
NADC;i++){
86 hQch[ndet]->Fill(qch);
87 if(qch>QchMax[ndet]) QchMax[ndet] = qch;
88 if(qch>QchMax[ndet]) QchMax[ndet] = qch;
90 for(Int_t i=NADC-1;i>=0;i--){
93 if(qch>5e4)
hQsat[ndet]->Fill(index,q);
94 else hQnosat[ndet]->Fill(index,q);
95 if(index == 0)
hQlast[ndet]->Fill(qch,q);
99 for(Int_t i=0;i<
NADC;i++){
102 if(qch>5e4)
hQsat1[ndet]->Fill(index,q);
104 if(index == 0)
hQfirst[ndet]->Fill(qch,q);
109 Info(
"process",
"Map %d saturated",ndet);
114 if(qtot[0]<=0)
return;
115 if(qtot[1]<=0)
return;
133 hMapRaw[0] =
new TH2F(
"hMapRawX",
"map;Time;Channel",511,0,511,288,0,288);
134 hMapRaw[1] =
new TH2F(
"hMapRawY",
"map",511,0,511,288,0,288);
136 hPmm2 =
new TH2F(
"hPmm2",
"map",16,0,16,1024,0,1024);
137 hAngle =
new TH1F(
"hAngle",
"map",200,0,TMath::Pi());
139 hQraw[0] =
new TH1F(
"hQrawX",
";Q_{raw}",4096,0,4096);
140 hQraw[1] =
new TH1F(
"hQrawY",
";Q_{raw}",4096,0,4096);
143 hQsat[0] =
new TH2F(
"hQsatX",
";index;Q;",511,0,511,4096,0,4096);
144 hQsat[1] =
new TH2F(
"hQsatY",
";index;Q;",511,0,511,4096,0,4096);
145 hQnosat[0] =
new TH2F(
"hQnosatX",
";index;Q;",511,0,511,4096,0,4096);
146 hQnosat[1] =
new TH2F(
"hQnosatY",
";index;Q;",511,0,511,4096,0,4096);
148 hQsat1[0] =
new TH2F(
"hQsat1X",
";index;Q;",511,0,511,4096,0,4096);
149 hQsat1[1] =
new TH2F(
"hQsat1Y",
";index;Q;",511,0,511,4096,0,4096);
150 hQnosat1[0] =
new TH2F(
"hQnosat1X",
";index;Q;",511,0,511,4096,0,4096);
151 hQnosat1[1] =
new TH2F(
"hQnosat1Y",
";index;Q;",511,0,511,4096,0,4096);
157 Double_t fQmin = 100, fQmax = 1e7;
161 Info(
"Constructor",
"Use default fnbinr %d",fNbins);
167 Info(
"Constructor",
"Use default Qmin %.3g",fQmin);
173 Info(
"Constructor",
"Use default Qmax %.3g",fQmax);
179 const Int_t nbinsQcl = fNbins;
180 Double_t xminQcl = fQmin;
181 Double_t xmaxQcl = fQmax;
182 Double_t logxminQcl = TMath::Log(xminQcl);
183 Double_t logxmaxQcl = TMath::Log(xmaxQcl);
184 Double_t binwidthQcl = (logxmaxQcl-logxminQcl)/nbinsQcl;
185 Double_t xbinsQcl[nbinsQcl+1];
186 xbinsQcl[0] = xminQcl;
187 for (Int_t i=1;i<=nbinsQcl;i++)
188 xbinsQcl[i] = TMath::Exp(logxminQcl+i*binwidthQcl);
190 const Int_t nbinsQcl2 = 200;
191 Double_t xminQcl2 = 1e2;
192 Double_t xmaxQcl2 = 1e7;
193 Double_t logxminQcl2 = TMath::Log(xminQcl2);
194 Double_t logxmaxQcl2 = TMath::Log(xmaxQcl2);
195 Double_t binwidthQcl2 = (logxmaxQcl2-logxminQcl2)/nbinsQcl2;
196 Double_t xbinsQcl2[nbinsQcl2+1];
197 xbinsQcl2[0] = xminQcl2;
198 for (Int_t i=1;i<=nbinsQcl2;i++)
199 xbinsQcl2[i] = TMath::Exp(logxminQcl2+i*binwidthQcl2);
201 hQcl[0] =
new TH1F(
"hQclX",
";Q_{cl}",nbinsQcl,xbinsQcl);
202 hQcl[1] =
new TH1F(
"hQclY",
";Q_{cl}",nbinsQcl,xbinsQcl);
205 hQch[0] =
new TH1F(
"hQchX",
";Q_{ch}",nbinsQcl,xbinsQcl);
206 hQch[1] =
new TH1F(
"hQchY",
";Q_{ch}",nbinsQcl,xbinsQcl);
208 hQfirst[0] =
new TH2F(
"hQfirstX",
";Q_{first}",nbinsQcl,xbinsQcl,4096,0,4096);
209 hQfirst[1] =
new TH2F(
"hQfirstY",
";Q_{first}",nbinsQcl,xbinsQcl,4096,0,4096);
210 hQlast[0] =
new TH2F(
"hQlastX",
";Q_{last}",nbinsQcl,xbinsQcl,4096,0,4096);
211 hQlast[1] =
new TH2F(
"hQlastY",
";Q_{last}",nbinsQcl,xbinsQcl,4096,0,4096);
213 hRatioVsQchX =
new TH2F(
"hRatioVsQchX",
";Q_{channelX}^{max};Q_{x}/Q_{y}",nbinsQcl,xbinsQcl,500,0,5);
214 hRatioVsQchY =
new TH2F(
"hRatioVsQchY",
";Q_{channelY}^{max};Q_{x}/Q_{y}",nbinsQcl,xbinsQcl,500,0,5);
217 const Int_t nbinsRatio = 150;
218 Double_t xminRatio = 0;
219 Double_t xmaxRatio = 3;
220 Double_t xbinsRatio[nbinsRatio+1];
221 for (Int_t i=1;i<=nbinsRatio;i++)
222 xbinsRatio[i] = xminRatio + i*1./nbinsRatio*(xmaxRatio - xminRatio);
225 hRatioVsQchXVsQtotX =
new TH3F(
"hRatioVsQchXVsQtotX",
";Q_{channelX}^{max};Q_{X}^{tot};Q_{x}/Q_{y}",nbinsQcl2,xbinsQcl2,nbinsQcl2,xbinsQcl2,nbinsRatio,xbinsRatio);
226 hRatioVsQchYVsQtotY =
new TH3F(
"hRatioVsQchYVsQtotY",
";Q_{channelY}^{max};Q_{Y}^{tot};Q_{x}/Q_{y}",nbinsQcl2,xbinsQcl2,nbinsQcl2,xbinsQcl2,nbinsRatio,xbinsRatio);
268 TCanvas* c = ecTab->GetCanvas();
269 c->GetPad(1)->Delete();
270 c->GetPad(2)->Delete();
273 for(Int_t plane = 0; plane<2;plane++){
274 TVirtualPad* cMap = c->GetPad(plane+1);
276 hQch[plane]->SetMinimum(0.5);
280 hMapRaw[plane]->SetMaximum(100000);
283 infobox->NewEntry(Form(
"Qchmax = %g",qmax));
Dummy analysis to run as test and example. Give basic histograms of the data.
void DisplayAnalysis(TRootEmbeddedCanvas *ecTab, TGListBox *infobox)
Redefine empty default.
void Save(char *mode=NULL)
TH3F * hRatioVsQchYVsQtotY
Double_t GetRawData(Int_t i, Int_t j)
void print()
Overloaded method which do all job.
Double_t GetData(Int_t i, Int_t j)
Set/Get Data Cell.
Bool_t isExist(ULong_t det)
Detecror date exist //! Number of Real Detectors.
void SetData(Int_t i, Int_t j, Double_t val)
TFile * OpenHistFile(const char *ananame)
unpacked dcc data The class contains the data map for DCC or Feminos The data is stored as a 2D TMatr...
TVirtualPad * MakeNiceHisto(TH1 *hist, TVirtualPad *c1, const char *opt, Bool_t copy)
TH3F * hRatioVsQchXVsQtotX
Bool_t Lookup(const char *path, Bool_t &val)
Lookup function for scalar values.
HarpoEventHeader * GetHeader()
void ConfigFrame(TGMainFrame *fMain, Int_t id)
const ULong_t gkNDetectors
HarpoDccMap * GetDccMap(Long_t plane=XDCC)
R__EXTERN HarpoDetSet * gHDetSet