50 if (plane != NULL )plane->
print();
59 Info(
"process",
"Event %ld",
nEvents);
61 Int_t startSatTmp = -1;
64 Double_t mean[2][
NCHAN];
65 Double_t sigma[2][
NCHAN];
66 Double_t qtot[2][
NCHAN];
70 for(Int_t ndet=0;ndet<2;ndet++) {
71 for(Int_t j=0;j<
NCHAN;j++){
81 for(Int_t ndet=0;ndet<2;ndet++) {
84 if ( m == NULL )
continue;
86 for(Int_t j=0;j<
NCHAN;j++){
87 Double_t meanQ = 0, sigmaQ = 0;
88 TArrayD* arr =
new TArrayD(
NADC);
90 for(Int_t i=0;i<
NADC;i++){
102 for(Int_t i=0;i<
NADC;i++){
105 hTest[ndet]->Fill(i,q);
117 sigma[ndet][j] = sigmaQ;
118 mean[ndet][j] = meanQ;
130 if ( m0 == NULL )
return;
132 if ( m1 == NULL )
return;
133 for(Int_t j0=0;j0<
NCHAN;j0++){
134 for(Int_t j1=0;j1<
NCHAN;j1++){
138 if(sigma[0][j0] == 0)
continue;
139 if(sigma[1][j1] == 0)
continue;
141 Int_t startSC = -1, startSat = -1, startSat2 = -1;
142 Int_t width = 0, width1 = 0, qTot1 = 0;
144 for(Int_t i=0;i<
NADC;i++){
145 Double_t q0 = m0->
GetData(j0,i);
146 Double_t q1 = m1->
GetData(j1,i);
147 if(q0>mean[0][j0]+5*sigma[0][j0] && q1>mean[1][j1]+5*sigma[1][j1]){
156 if(q0>3700 && q1>3700)
164 startSatTmp = startSat;
166 for(Int_t i=0;i<
NADC;i++){
167 Double_t q0 = m0->
GetData(j0,i);
168 Double_t q1 = m1->
GetData(j1,i);
170 Double_t q = (q0+q1)/2;
180 if(mean[0][j0]<5 && sigma[0][j0]>5 && mean[1][j1]<5 && sigma[1][j1]>5){
194 if(mean[0][j0]<5 && sigma[0][j0]>5 && mean[1][j1]<5 && sigma[1][j1]>5){
202 hQtot[0]->Fill(qTot);
216 for(Int_t ndet=0;ndet<2;ndet++) {
219 if ( m == NULL )
continue;
233 for(Int_t j=0;j<
NCHAN;j++){
234 Double_t meanQ = 0, sigmaQ = 0;
235 TArrayD* arr =
new TArrayD(
NADC);
237 for(Int_t i=0;i<
NADC;i++){
245 arr->AddAt(-10000,i);
249 for(Int_t i=0;i<
NADC;i++){
252 hTest[ndet]->Fill(i,q);
264 sigma[ndet][j] = sigmaQ;
265 mean[ndet][j] = meanQ;
276 Int_t startSC = -1, startSat = -1, startSat2 = -1;
277 Int_t width = 0, width1 = 0, qTot1 = 0;
278 for(Int_t i=0;i<
NADC;i++){
281 if(q>meanQ+5*sigmaQ){
305 startSatTmp = startSat;
307 for(Int_t i=0;i<
NADC;i++){
315 if(meanQ<5 && sigmaQ>5){
325 qtot[ndet][j] = qTot;
327 if(meanQ<5 && sigmaQ>5){
334 hWidth[ndet]->Fill(width);
338 for(Int_t j0=0;j0<
NCHAN;j0++){
339 for(Int_t j1=0;j1<
NCHAN;j1++){
343 if(sigma[0][j0] == 0)
continue;
344 if(sigma[1][j1] == 0)
continue;
346 if(mean[0][j0]<5 && sigma[0][j0]>5 && mean[1][j1]<5 && sigma[1][j1]>5)
347 hQtotRef[0]->Fill((qtot[0][j0] + qtot[0][j0])/2);
349 hQtot[0]->Fill((qtot[0][j0] + qtot[0][j0])/2);
364 const Int_t nbinsQ1 = 100;
365 const Int_t nbinsQ2 = 395;
366 Double_t xminQ1 = -50;
367 Double_t xminQ2 = xminQ1 + nbinsQ1;
369 Double_t xbinsQ[nbinsQ1+nbinsQ2+1];
372 for (Int_t i=0;i<=nbinsQ1;i++)
373 xbinsQ[i] = xminQ1 + i;
374 for (Int_t i=0;i<=nbinsQ2;i++)
375 xbinsQ[nbinsQ1+i] = xminQ2 + 10*i;
378 hSpaceCharge[0] =
new TH2F(
"hSpaceChargeX",
"map",512,0,512,500,-100,400);
379 hSpaceCharge[1] =
new TH2F(
"hSpaceChargeY",
"map",512,0,512,500,-100,400);
380 hSpaceCharge2[0] =
new TH2F(
"hSpaceCharge2X",
"map",1024,-512,512,nbinsQ1+nbinsQ2,xbinsQ);
381 hSpaceCharge2[1] =
new TH2F(
"hSpaceCharge2Y",
"map",1024,-512,512,nbinsQ1+nbinsQ2,xbinsQ);
382 hSpaceChargeRef[0] =
new TH2F(
"hSpaceChargeRefX",
"map",512,0,512,500,-100,400);
383 hSpaceChargeRef[1] =
new TH2F(
"hSpaceChargeRefY",
"map",512,0,512,500,-100,400);
384 hSpaceCharge2Ref[0] =
new TH2F(
"hSpaceCharge2RefX",
"map",1024,-512,512,nbinsQ1+nbinsQ2,xbinsQ);
385 hSpaceCharge2Ref[1] =
new TH2F(
"hSpaceCharge2RefY",
"map",1024,-512,512,nbinsQ1+nbinsQ2,xbinsQ);
386 hSaturation[0] =
new TH2F(
"hSaturationX",
"map",1024,-512,512,nbinsQ1+nbinsQ2,xbinsQ);
387 hSaturation[1] =
new TH2F(
"hSaturationY",
"map",1024,-512,512,nbinsQ1+nbinsQ2,xbinsQ);
388 hSaturation2[0] =
new TH2F(
"hSaturation2X",
"map",1024,-512,512,nbinsQ1+nbinsQ2,xbinsQ);
389 hSaturation2[1] =
new TH2F(
"hSaturation2Y",
"map",1024,-512,512,nbinsQ1+nbinsQ2,xbinsQ);
393 hWidth[0] =
new TH1F(
"hWidthX",
"map",512,0,512);
394 hWidth[1] =
new TH1F(
"hWidthY",
"map",512,0,512);
395 hWidthRef[0] =
new TH1F(
"hWidthRefX",
"map",512,0,512);
396 hWidthRef[1] =
new TH1F(
"hWidthRefY",
"map",512,0,512);
397 hNpositive[0] =
new TH1F(
"hNpositiveX",
"map",512,0,512);
398 hNpositive[1] =
new TH1F(
"hNpositiveY",
"map",512,0,512);
399 hTest[0] =
new TH2F(
"hTestX",
"map",512,0,512,500,-100,400);
400 hTest[1] =
new TH2F(
"hTestY",
"map",512,0,512,500,-100,400);
401 hTest2[0] =
new TH2F(
"hTest2X",
"map",512,0,512,500,-100,400);
402 hTest2[1] =
new TH2F(
"hTest2Y",
"map",512,0,512,500,-100,400);
403 hTest3[0] =
new TH2F(
"hTest3X",
"map",512,0,512,500,-100,400);
404 hTest3[1] =
new TH2F(
"hTest3Y",
"map",512,0,512,500,-100,400);
414 hSigmaCh[0] =
new TH1F(
"hSigmaChX",
";#sigma_{Q}",1000,0,20);
415 hSigmaCh[1] =
new TH1F(
"hSigmaChY",
";#sigma_{Q}",1000,0,20);
416 hMeanCh[0] =
new TH1F(
"hMeanChX",
";Q_{raw}",1000,-50,50);
417 hMeanCh[1] =
new TH1F(
"hMeanChY",
";Q_{raw}",1000,-50,50);
418 hSigmaMeanCh[0] =
new TH2F(
"hSigmaMeanChX",
";#sigma_{Q};Q_{raw}",1000,-50,50,500,0,20);
419 hSigmaMeanCh[1] =
new TH2F(
"hSigmaMeanChY",
";#sigma_{Q};Q_{raw}",1000,-50,50,500,0,20);
420 hSigmaChVsCh[0] =
new TH2F(
"hSigmaChVsChX",
";#sigma_{Q};Q_{raw}",288,0,288,500,0,20);
421 hSigmaChVsCh[1] =
new TH2F(
"hSigmaChVsChY",
";#sigma_{Q};Q_{raw}",288,0,288,500,0,20);
422 hMeanChVsCh[0] =
new TH2F(
"hMeanChVsChX",
";#sigma_{Q};Q_{raw}",288,0,288,1000,-50,50);
423 hMeanChVsCh[1] =
new TH2F(
"hMeanChVsChY",
";#sigma_{Q};Q_{raw}",288,0,288,1000,-50,50);
426 const Int_t nbinsQcl = 500;
427 Double_t xminQcl = 10;
428 Double_t xmaxQcl = 1e6;
429 Double_t logxminQcl = TMath::Log(xminQcl);
430 Double_t logxmaxQcl = TMath::Log(xmaxQcl);
431 Double_t binwidthQcl = (logxmaxQcl-logxminQcl)/nbinsQcl;
432 Double_t xbinsQcl[nbinsQcl+1];
433 xbinsQcl[0] = xminQcl;
434 xbinsQcl[nbinsQcl] = xmaxQcl;
435 for (Int_t i=1;i<nbinsQcl;i++)
436 xbinsQcl[i] = TMath::Exp(logxminQcl+i*binwidthQcl);
438 hQtot[0] =
new TH1F(
"hQtotX",
";Q_{tot}",nbinsQcl,xbinsQcl);
439 hQtot[1] =
new TH1F(
"hQtotY",
";Q_{tot}",nbinsQcl,xbinsQcl);
440 hQtotRef[0] =
new TH1F(
"hQtotRefX",
";Q_{tot}",nbinsQcl,xbinsQcl);
441 hQtotRef[1] =
new TH1F(
"hQtotRefY",
";Q_{tot}",nbinsQcl,xbinsQcl);
442 hQtotWidth[0] =
new TH2F(
"hQtotWidthX",
";Q_{tot}",512,0,512,nbinsQcl,xbinsQcl);
443 hQtotWidth[1] =
new TH2F(
"hQtotWidthY",
";Q_{tot}",512,0,512,nbinsQcl,xbinsQcl);
444 hQtotWidthRef[0] =
new TH2F(
"hQtotWidthRefX",
";Q_{tot}",512,0,512,nbinsQcl,xbinsQcl);
445 hQtotWidthRef[1] =
new TH2F(
"hQtotWidthRefY",
";Q_{tot}",512,0,512,nbinsQcl,xbinsQcl);
525 Int_t size = vect->GetSize();
527 Double_t truncMean = 0;
528 Double_t truncSigma = 0;
529 Int_t* index =
new Int_t[size];
530 TMath::Sort(size,vect->GetArray(),index,kFALSE);
531 Int_t t = 0, tLow, tHigh;
534 while(vect->At(index[t])==-10000&&t<size+1) t++;
536 tLow = TMath::FloorNint(t + (size - t)*tl);
537 tHigh = TMath::FloorNint(t + (size - t)*th);
541 for(Int_t tind = tLow; tind<tHigh; tind++){
542 truncMean += vect->At(index[tind]);
543 truncSigma += vect->At(index[tind])*vect->At(index[tind]);
548 if(tHigh-tLow == 0)
return 0;
551 truncMean /= (tHigh-tLow);
552 truncSigma /= (tHigh-tLow);
553 truncSigma -= truncMean*truncMean;
556 truncS = TMath::Sqrt(truncSigma);
Int_t fStartSatOld
Redefine empty default.
Double_t GetRawData(Int_t i, Int_t j)
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.
Double_t TruncSigma(TArrayD *vect, Double_t &truncS, Double_t &truncM, Double_t tl, Double_t th)
void print()
Ovreloaded medod whic do all job.
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...
TH2F * hSpaceCharge2Ref[2]
TH2F * hSpaceChargeRef[2]
Dummy analysis to run as test and example. Give basic histograms of the data.
HarpoEventHeader * GetHeader()
const ULong_t gkNDetectors
HarpoDccMap * GetDccMap(Long_t plane=XDCC)
R__EXTERN HarpoDetSet * gHDetSet
void Save(char *mode=NULL)