if (!fESDfriend) {
return;
}
+ if (fESDfriend->TestSkipBit()) return;
if (fESD->GetNumberOfTracks()<kMinTracks) return; //not enough tracks
AliDebug(4,Form("Event number in current file: %d",event->GetEventNumberInFile()));
//
memcpy(smZ, chain->GetV1(), entries*sizeof(Double_t));
//
//
- sprintf(grnamefull,"Side_%d_Bundle_%d_Rod_%d_Beam_%d",
+ snprintf(grnamefull,1000,"Side_%d_Bundle_%d_Rod_%d_Beam_%d",
ltrp->GetSide(), ltrp->GetBundle(), ltrp->GetRod(), ltrp->GetBeam());
// store data
// phi
pphi[0] = fp.GetParameter(0); // offset
pphi[1] = fp.GetParameter(1); // slope
pphi[2] = TMath::Sqrt(fp.GetChisquare()/(entries-2.)); // normalized chi2
- sprintf(grname,"phi_id%d",id);
+ snprintf(grname,1000,"phi_id%d",id);
grphi->SetName(grname); grphi->SetTitle(grnamefull);
grphi->GetXaxis()->SetTitle("b_{z} (T)");
grphi->GetYaxis()->SetTitle("#Delta r#phi (cm)");
pphiP[0] = fp.GetParameter(0); // offset
pphiP[1] = fp.GetParameter(1); // slope
pphiP[2] = TMath::Sqrt(fp.GetChisquare()/(entries-2.)); // normalized chi2
- sprintf(grname,"phiP_id%d",id);
+ snprintf(grname,1000,"phiP_id%d",id);
grphiP->SetName(grname); grphiP->SetTitle(grnamefull);
grphiP->GetXaxis()->SetTitle("b_{z} (T)");
grphiP->GetYaxis()->SetTitle("#Delta #phi (rad)");
pmZ[0] = fp.GetParameter(0); // offset
pmZ[1] = fp.GetParameter(1); // slope
pmZ[2] = TMath::Sqrt(fp.GetChisquare()/(entries-2.)); // normalized chi2
- sprintf(grname,"mZ_id%d",id);
+ snprintf(grname,1000,"mZ_id%d",id);
grmZ->SetName(grname); grmZ->SetTitle(grnamefull);
grmZ->GetXaxis()->SetTitle("b_{z} (T)");
grmZ->GetYaxis()->SetTitle("#Delta z (cm)");
if (!h &&hm &&hm->GetEntries()>0) {
h=(TH1F*)hm->Clone();
h->SetDirectory(0);
- fDeltaZ.AddAt(h,id);
+ fDeltaZ.AddAt(h,id);
}
- if (hm) h->Add(hm);
+ if (h && hm) h->Add(hm);
+
// merge fP3 histograms
hm = (TH1F*)cal->fDeltaP3.At(id);
h = (TH1F*)fDeltaP3.At(id);
h->SetDirectory(0);
fDeltaP3.AddAt(h,id);
}
- if (hm) h->Add(hm);
+ if (h && hm) h->Add(hm);
// merge fP4 histograms
hm = (TH1F*)cal->fDeltaP4.At(id);
h = (TH1F*)fDeltaP4.At(id);
h->SetDirectory(0);
fDeltaP4.AddAt(h,id);
}
- if (hm) h->Add(hm);
+ if (h&&hm) h->Add(hm);
//
// merge fDeltaPhi histograms
h->SetDirectory(0);
fDeltaPhi.AddAt(h,id);
}
- if (hm) h->Add(hm);
+ if (h&&hm) h->Add(hm);
// merge fDeltaPhiP histograms
hm = (TH1F*)cal->fDeltaPhiP.At(id);
h = (TH1F*)fDeltaPhiP.At(id);
h->SetDirectory(0);
fDeltaPhiP.AddAt(h,id);
}
- if (hm) h->Add(hm);
+ if (h&&hm) h->Add(hm);
// merge fSignals histograms
hm = (TH1F*)cal->fSignals.At(id);
h = (TH1F*)fSignals.At(id);
h->SetDirectory(0);
fSignals.AddAt(h,id);
}
- if (hm) h->Add(hm);
+ if (h&&hm) h->Add(hm);
//
//
// merge ProfileY histograms -0
TH2F *profz = (TH2F*)fDeltaZres.UncheckedAt(id);
//TH2F *profy2 = (TH2F*)fDeltaYres2.UncheckedAt(id);
TH2F *profy2 = 0;
- TH2F *profz2 = (TH2F*)fDeltaZres2.UncheckedAt(id);
- TH2F *profyabs = (TH2F*)fDeltaYresAbs.UncheckedAt(id);
- TH2F *profzabs = (TH2F*)fDeltaYresAbs.UncheckedAt(id);
+ TH2F *profz2 = 0;//(TH2F*)fDeltaZres2.UncheckedAt(id);
+ TH2F *profyabs = 0; //(TH2F*)fDeltaYresAbs.UncheckedAt(id);
+ TH2F *profzabs = 0; //(TH2F*)fDeltaYresAbs.UncheckedAt(id);
// TH2F *profy3 = (TH2F*)fDeltaYres3.UncheckedAt(id);
//TH2F *profz3 = (TH2F*)fDeltaZres3.UncheckedAt(id);
if (!profy){
TH1F * hisdz = (TH1F*)fDeltaZ.At(id);
//TH1F * hisP3 = (TH1F*)fDeltaP3.At(id);
TH1F * hisP3 = 0;
- TH1F * hisP4 = (TH1F*)fDeltaP4.At(id);
+ TH1F * hisP4 = 0;
- TH1F * hisdphi = (TH1F*)fDeltaPhi.At(id);
- TH1F * hisdphiP = (TH1F*)fDeltaPhiP.At(id);
- TH1F * hisSignal = (TH1F*)fSignals.At(id);
+ TH1F * hisdphi = 0;//(TH1F*)fDeltaPhi.At(id);
+ TH1F * hisdphiP = 0;//(TH1F*)fDeltaPhiP.At(id);
+ TH1F * hisSignal = 0; //(TH1F*)fSignals.At(id);
if (!hisdz){
hisdz = new TH1F(Form("hisdz%d",id),Form("hisdz%d",id),1000,-10,10);
delete his;
//
his=hisTimeInput->Projection(1);
- Int_t firstBinTime=his->FindFirstBinAbove(0);
- Int_t lastBinTime=his->FindLastBinAbove(0);
+ // Int_t firstBinTime=his->FindFirstBinAbove(0);
+ //Int_t lastBinTime=his->FindLastBinAbove(0);
//hisTimeInput->GetAxis(1)->SetRange(firstBinTime, lastBinTime);
delete his;
//
//
his=hisTimeInput->Projection(2);
- Int_t firstBinZ=his->FindFirstBinAbove(0);
- Int_t lastBinZ=his->FindLastBinAbove(0);
+ //Int_t firstBinZ=his->FindFirstBinAbove(0);
+ //Int_t lastBinZ=his->FindLastBinAbove(0);
//hisTimeInput->GetAxis(2)->SetRange(firstBinZ, lastBinZ);
delete his;
//
his=hisPadInput->Projection(2);
- Int_t firstBinY=his->FindFirstBinAbove(0);
- Int_t lastBinY=his->FindLastBinAbove(0);
+ // Int_t firstBinY=his->FindFirstBinAbove(0);
+ //Int_t lastBinY=his->FindLastBinAbove(0);
//hisPadInput->GetAxis(2)->SetRange(firstBinY, lastBinY);
delete his;
//
his->GetXaxis()->SetRangeUser(his->GetMean()-kSigma*his->GetRMS(), his->GetMean()+kSigma*his->GetRMS());
meandEdx[irow] =his->GetMean();
sigmadEdx[irow]=his->GetRMS();
- Int_t bindedx0= his->FindBin(meandEdx[irow]-kSigma*sigmadEdx[irow]);
- Int_t bindedx1= his->FindBin(meandEdx[irow]+kSigma*sigmadEdx[irow]);
+ // Int_t bindedx0= his->FindBin(meandEdx[irow]-kSigma*sigmadEdx[irow]);
+ //Int_t bindedx1= his->FindBin(meandEdx[irow]+kSigma*sigmadEdx[irow]);
// hisPad->GetAxis(3)->SetRange(bindedx0,bindedx1);
//hisTime->GetAxis(3)->SetRange(bindedx0,bindedx1 );
delete his;
his->GetXaxis()->SetRangeUser(his->GetMean()-kSigma*his->GetRMS(), his->GetMean()-kSigma*his->GetRMS());
meanSTime[irow] =his->GetMean();
sigmaSTime[irow]=his->GetRMS();
- Int_t binSTime0= his->FindBin(his->GetMean()-kSigma*his->GetRMS());
- Int_t binSTime1= his->FindBin(his->GetMean()+kSigma*his->GetRMS());
+ //Int_t binSTime0= his->FindBin(his->GetMean()-kSigma*his->GetRMS());
+ //Int_t binSTime1= his->FindBin(his->GetMean()+kSigma*his->GetRMS());
// hisTime->GetAxis(2)->SetRange(binSTime0, binSTime1);
delete his;
//
his->GetXaxis()->SetRangeUser(his->GetMean()-kSigma*his->GetRMS(), his->GetMean()+kSigma*his->GetRMS());
meanSPad[irow] =his->GetMean();
sigmaSPad[irow]=his->GetRMS();
- Int_t binSPad0= his->FindBin(his->GetMean()-kSigma*his->GetRMS());
- Int_t binSPad1= his->FindBin(his->GetMean()+kSigma*his->GetRMS());
+ // Int_t binSPad0= his->FindBin(his->GetMean()-kSigma*his->GetRMS());
+ //Int_t binSPad1= his->FindBin(his->GetMean()+kSigma*his->GetRMS());
// hisPad->GetAxis(2)->SetRange(binSPad0, binSPad1);
delete his;
//
const Double_t kDistCutFit=0.5;
const Double_t kDistCutFitPad=0.25;
const Double_t kDistCutFitTime=0.25;
- const Int_t kSmoothRow=5.;
+ const Int_t kSmoothRow=5;
TFile f("hisLasers.root"); // Input file
TTree * treeInput=(TTree*)f.Get("laserClusters");
TTreeSRedirector *pcstream=new TTreeSRedirector("fitLasers.root");
fitPadLocal[irow]=0;
fitTimeLocal[irow]=0;
if (isOK[irow]<0.5) continue;
- Int_t sector=(irow<roc->GetNRows(0))? sectorInner:sectorOuter;
+ Int_t sector=(irow<Int_t(roc->GetNRows(0)))? sectorInner:sectorOuter;
if (TMath::Abs(ltrp->GetVecSec()->GetMatrixArray()[irow]-sector)>0.1) continue;
//
TLinearFitter fitterPadLocal(2,"pol1");