Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATO-525,ATO-496 - addig qptTgl correction to slove dEdx splitting at pt<0.5 GeV #1319

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions STAT/AliTreePlayer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ TObjArray * AliTreePlayer::MakeHistograms(TTree * tree, TString hisString, TStr
Int_t nExpressions=hisString.CountChar(':')+hisString.CountChar(';')+1;
TObjArray * formulaArray = new TObjArray(nExpressions); // array of all expressions - OWNER
TString queryString = "";
Int_t hisSizeFull=0;
Long_t hisSizeFull=0;
//
// 1.) Analyze formula, book list of TObjString
//
Expand Down Expand Up @@ -1307,7 +1307,7 @@ TObjArray * AliTreePlayer::MakeHistograms(TTree * tree, TString hisString, TStr
}
}
if (verbose&0x1) {
::Info("AliTreePlayer::MakeHistograms","Total size=%d",hisSizeFull);
::Info("AliTreePlayer::MakeHistograms","Total size=%lld",hisSizeFull);
}
}
// 2.3 fill histograms
Expand Down Expand Up @@ -1647,6 +1647,7 @@ void AliTreePlayer::MakeCacheTreeChunk(TTree * tree, TString varList, TString ou
for (Int_t iEntry=firstEntry; iEntry<nEntries; iEntry+=chunkSize) {
::Info("Processing chunk","%d",iEntry);
if (estimate < chunkSize) tree->SetEstimate(chunkSize);
if (chunkSize+iEntry>=entriesAll) chunkSize=entriesAll-iEntry; // ROOT6 does not handle properly query above limit
Int_t entries = tree->Draw(varList.Data(), selection, "goffpara", chunkSize, iEntry);
if (entries<=0) break;
if (entries > estimate) {
Expand Down
28 changes: 21 additions & 7 deletions STAT/TStatToolkit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1221,17 +1221,31 @@ TGraph * TStatToolkit::MakeGraphSparse(TTree * tree, const char * expr, const ch
graphNew->GetXaxis()->SetBinLabel(i+1,xName);
graphNew->GetX()[i]+=offset;
}
if (tree->GetVar(1)->IsInteger() && strlen(tree->GetHistogram()->GetXaxis()->GetBinLabel(1))>0){
for(Int_t i=0;i<count;i++){
graphNew->GetXaxis()->SetBinLabel(i+1,tree->GetHistogram()->GetXaxis()->GetBinLabel(i+1));
if (tree->GetV3()==NULL) {
if (tree->GetVar(1)->IsInteger() && strlen(tree->GetHistogram()->GetXaxis()->GetBinLabel(1)) > 0) {
for (Int_t i = 0; i < count; i++) {
graphNew->GetXaxis()->SetBinLabel(i + 1, tree->GetHistogram()->GetXaxis()->GetBinLabel(i + 1));
}
}
}
if (tree->GetVar(0)->IsInteger() && strlen(tree->GetHistogram()->GetXaxis()->GetBinLabel(1))>0 ){
for(Int_t i=0;i<count;i++){
graphNew->GetYaxis()->SetBinLabel(i+1,tree->GetHistogram()->GetYaxis()->GetBinLabel(i+1));
if (tree->GetVar(0)->IsInteger() && strlen(tree->GetHistogram()->GetYaxis()->GetBinLabel(1)) > 0) {
for (Int_t i = 0; i < count; i++) {
graphNew->GetYaxis()->SetBinLabel(i + 1, tree->GetHistogram()->GetYaxis()->GetBinLabel(i + 1));
}
}
}else{
if (tree->GetVar(1)->IsInteger() && strlen(tree->GetHistogram()->GetYaxis()->GetBinLabel(1)) > 0) {
for (Int_t i = 0; i < count; i++) {
graphNew->GetXaxis()->SetBinLabel(i + 1, tree->GetHistogram()->GetYaxis()->GetBinLabel(i + 1));
}
}
if (tree->GetVar(0)->IsInteger() && strlen(tree->GetHistogram()->GetZaxis()->GetBinLabel(1)) > 0) {
for (Int_t i = 0; i < count; i++) {
graphNew->GetYaxis()->SetBinLabel(i + 1, tree->GetHistogram()->GetZaxis()->GetBinLabel(i + 1));
}
}
}


graphNew->GetHistogram()->SetTitle("");
graphNew->SetMarkerStyle(mstyle);
graphNew->SetMarkerColor(mcolor); graphNew->SetLineColor(mcolor);
Expand Down
18 changes: 13 additions & 5 deletions STEER/ESD/AliESDv0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -986,15 +986,23 @@ Double_t AliESDv0::GetKFInfoScale(UInt_t p1, UInt_t p2, Int_t type, Double_t d1p
// calculate delta of energy loss
Double_t bg1=paramP.P() /TDatabasePDG::Instance()->GetParticle(spdg[p1])->Mass();
Double_t bg2=paramN.P() /TDatabasePDG::Instance()->GetParticle(spdg[p2])->Mass();
Double_t dP1=AliExternalTrackParam::BetheBlochGeant(bg1)/AliExternalTrackParam::BetheBlochGeant(3.); ///relative energu loss
Double_t dP2=AliExternalTrackParam::BetheBlochGeant(bg2)/AliExternalTrackParam::BetheBlochGeant(3.);

Double_t dE1=AliExternalTrackParam::BetheBlochGeant(bg1)/AliExternalTrackParam::BetheBlochGeant(3.); ///relative energu loss
Double_t dE2=AliExternalTrackParam::BetheBlochGeant(bg2)/AliExternalTrackParam::BetheBlochGeant(3.);
dE1*=TMath::Sqrt(1+(paramP.GetTgl()*paramP.GetTgl()));
dE2*=TMath::Sqrt(1+(paramN.GetTgl()*paramN.GetTgl()));
Double_t mass1=AliPID::ParticleMass(p1);
Double_t mass2=AliPID::ParticleMass(p2);
Double_t E1 = TMath::Sqrt(paramP.P()*paramP.P()+mass1*mass1)+eLoss*dE1;
Double_t E2 = TMath::Sqrt(paramN.P()*paramN.P()+mass2*mass2)+eLoss*dE2;
Double_t dP1=TMath::Sqrt(TMath::Max(E1*E1-mass1*mass1,0.0))-paramP.P();
Double_t dP2=TMath::Sqrt(TMath::Max(E2*E2-mass2*mass2,0.0))-paramN.P();
//printf("%f\t%f\t%f\t%f\t%f\t%f\t%f\n",dE1,dE2, E1,E2, dP1,dP2,eLoss);
Double_t *pparam1 = (Double_t*)paramP.GetParameter();
Double_t *pparam2 = (Double_t*)paramN.GetParameter();
if (flag&0x1) pparam1[4]+=d1pt;
if (flag&0x2) pparam2[4]+=d1pt;
if (flag&0x1) pparam1[4]*=(1+s1pt)*(1.+eLoss*dP1/paramP.P()); /// TODO - use relative energy loss
if (flag&0x2) pparam2[4]*=(1+s1pt)*(1.+eLoss*dP2/paramN.P()); ///
if (flag&0x1) pparam1[4]*=(1+s1pt)*(1.+dP1/paramP.P()); /// TODO - use relative energy loss
if (flag&0x2) pparam2[4]*=(1+s1pt)*(1.+dP2/paramN.P()); ///

//
AliKFParticle kfp1( paramP, spdg[p1] *TMath::Sign(1,p1) );
Expand Down
Loading