// Temporary histogram for chi2/ITS cluster
if(IsPbPb()) {
TBits shared = track->GetTPCSharedMap();
- Int_t sharebit=0;
+ Int_t sharebit=0;
if(shared.CountBits() >= 2) sharebit=1;
+ Double_t itschi2percluster = 0.0;
+ if(track->GetNcls(0) > 0) itschi2percluster = track->GetITSchi2()/static_cast<Double_t>(track->GetNcls(0));
+
Double_t itsChi2[7] = {track->Pt(),track->Eta(), track->Phi(),
- fCentralityF,track->GetTPCsignalN(), sharebit,
- track->GetITSchi2()/static_cast<Double_t>(track->GetNcls(0))};
+ fCentralityF,track->GetTPCsignalN(), sharebit, itschi2percluster};
fQACollection->Fill("fChi2perITScluster", itsChi2);
}
else{
- Double_t itsChi2[3] = {track->Pt(), fCentralityF, track->GetITSchi2()/static_cast<Double_t>(track->GetNcls(0))};
- fQACollection->Fill("fChi2perITScluster", itsChi2);
+
+ Double_t itschi2percluster = 0.0;
+ if(track->GetNcls(0) > 0) itschi2percluster = track->GetITSchi2()/static_cast<Double_t>(track->GetNcls(0));
+
+ Double_t itsChi2[3] = {track->Pt(), fCentralityF, itschi2percluster};
+ fQACollection->Fill("fChi2perITScluster", itsChi2);
}
// Fill Histogram for Hadronic Background
signalContainer[2] = track->Phi();
signalContainer[3] = track->Charge()/3;
- Double_t vertex[3]; // Production vertex cut to mask gammas which are NOT supposed to have hits in the first ITS layer(s)
+ Double_t vertex[3] = {0.,0.,0.}; // Production vertex cut to mask gammas which are NOT supposed to have hits in the first ITS layer(s)
if(IsESDanalysis()){
AliMCParticle *mctrack = dynamic_cast<AliMCParticle *>(track);
if(mctrack){
alltogetherCorrection->SetName("AlltogetherCorrectedNotNormalizedSpectrum");
alltogetherCorrection->Write();
//
- unnormalizedRawSpectrum->SetName("beautyAfterIP");
- unnormalizedRawSpectrum->Write();
+ if(unnormalizedRawSpectrum) {
+ unnormalizedRawSpectrum->SetName("beautyAfterIP");
+ unnormalizedRawSpectrum->Write();
+ }
if(gNormalizedRawSpectrum){
gNormalizedRawSpectrum->SetName("normalizedBeautyAfterIP");
AliCFDataGrid *backgroundGrid = new AliCFDataGrid("ConversionBgGrid","ConversionBgGrid",*backgroundContainer,stepbackground);
//backgroundGrid->Scale(evtnorm);
//workaround for statistical errors: "Scale" method does not work for our errors, since Sumw2 is not defined for AliCFContainer
- Int_t *nBin=new Int_t[1];
+ Int_t nBin[1];
- Int_t* bins=new Int_t[1];
+ Int_t bins[1];
bins[0]=fConversionEff->GetNbinsX();
for(Long_t iBin=1; iBin<= bins[0];iBin++){
}
//end of workaround for statistical errors
- AliCFDataGrid *weightedConversionContainer = new AliCFDataGrid("weightedConversionContainer","weightedConversionContainer",1,bins);
+ AliCFDataGrid *weightedConversionContainer = new AliCFDataGrid("weightedConversionContainer","weightedConversionContainer",1,&bins[0]);
weightedConversionContainer->SetGrid(GetPIDxIPEff(2));
backgroundGrid->Multiply(weightedConversionContainer,1.0);
AliCFDataGrid *backgroundGrid = new AliCFDataGrid("NonHFEBgGrid","NonHFEBgGrid",*backgroundContainer,stepbackground);
//backgroundGrid->Scale(evtnorm);
//workaround for statistical errors: "Scale" method does not work for our errors, since Sumw2 is not defined for AliCFContainer
- Int_t *nBin=new Int_t[1];
+ Int_t nBin[1];
- Int_t* bins=new Int_t[1];
+ Int_t bins[1];
bins[0]=fConversionEff->GetNbinsX();
for(Long_t iBin=1; iBin<= bins[0];iBin++){
}
//end of workaround for statistical errors
- AliCFDataGrid *weightedNonHFEContainer = new AliCFDataGrid("weightedNonHFEContainer","weightedNonHFEContainer",1,bins);
+ AliCFDataGrid *weightedNonHFEContainer = new AliCFDataGrid("weightedNonHFEContainer","weightedNonHFEContainer",1,&bins[0]);
weightedNonHFEContainer->SetGrid(GetPIDxIPEff(3));
backgroundGrid->Multiply(weightedNonHFEContainer,1.0);