fFakeSelection(0),
fRejectIfNoQuark(kTRUE),
fUseMCVertex(kFALSE),
- fDsOption(1)
+ fDsOption(1),
+ fConfiguration(kCheetah) // by default, setting the fast configuration
{
//
//Default ctor
fFakeSelection(0),
fRejectIfNoQuark(kTRUE),
fUseMCVertex(kFALSE),
- fDsOption(1)
+ fDsOption(1),
+ fConfiguration(kCheetah) // by default, setting the fast configuration
{
//
// Constructor. Initialization of Inputs and Outputs
fFakeSelection(c.fFakeSelection),
fRejectIfNoQuark(c.fRejectIfNoQuark),
fUseMCVertex(c.fUseMCVertex),
- fDsOption(c.fDsOption)
+ fDsOption(c.fDsOption),
+ fConfiguration(c.fConfiguration)
{
//
// Copy Constructor
switch (fDecayChannel){
case 2:{
copyfCuts = new AliRDHFCutsD0toKpi(*(static_cast<AliRDHFCutsD0toKpi*>(fCuts)));
- fNvar = 15;
+ switch (fConfiguration) {
+ case kSnail: // slow configuration: all variables in
+ fNvar = 16;
+ break;
+ case kCheetah:// fast configuration: only pt_candidate, y, phi, ct, fake, z_vtx, centrality, multiplicity will be filled
+ fNvar = 8;
+ break;
+ }
fPartName="D0";
fDauNames="K+pi";
break;
}
case 21:{
copyfCuts = new AliRDHFCutsDStartoKpipi(*(static_cast<AliRDHFCutsDStartoKpipi*>(fCuts)));
- fNvar = 15;
+ switch (fConfiguration) {
+ case kSnail: // slow configuration: all variables in
+ fNvar = 16;
+ break;
+ case kCheetah:// fast configuration: only pt_candidate, y, phi, ct, fake, z_vtx, centrality, multiplicity will be filled
+ fNvar = 8;
+ break;
+ }
fPartName="Dstar";
fDauNames="K+pi+pi";
break;
}
case 31:{
copyfCuts = new AliRDHFCutsDplustoKpipi(*(static_cast<AliRDHFCutsDplustoKpipi*>(fCuts)));
- fNvar = 14;
+ switch (fConfiguration) {
+ case kSnail: // slow configuration: all variables in
+ fNvar = 14;
+ break;
+ case kCheetah:// fast configuration: only pt_candidate, y, phi, ct, fake, z_vtx, centrality, multiplicity will be filled
+ fNvar = 8;
+ break;
+ }
fPartName="Dplus";
fDauNames="K+pi+pi";
break;
}
case 32:{
copyfCuts = new AliRDHFCutsLctopKpi(*(static_cast<AliRDHFCutsLctopKpi*>(fCuts)));
- fNvar = 18;
+ switch (fConfiguration) {
+ case kSnail: // slow configuration: all variables in
+ fNvar = 18;
+ break;
+ case kCheetah:// fast configuration: only pt_candidate, y, phi, ct, fake, z_vtx, centrality, multiplicity will be filled
+ fNvar = 8;
+ break;
+ }
fPartName="Lambdac";
fDauNames="p+K+pi";
break;
}
case 33:{
copyfCuts = new AliRDHFCutsDstoKKpi(*(static_cast<AliRDHFCutsDstoKKpi*>(fCuts)));
- fNvar = 14;
+ switch (fConfiguration) {
+ case kSnail: // slow configuration: all variables in
+ fNvar = 14;
+ break;
+ case kCheetah:// fast configuration: only pt_candidate, y, phi, ct, fake, z_vtx, centrality, multiplicity will be filled
+ fNvar = 8;
+ break;
+ }
fPartName="Ds";
fDauNames="K+K+pi";
break;
}
case 4:{
copyfCuts = new AliRDHFCutsD0toKpipipi(*(static_cast<AliRDHFCutsD0toKpipipi*>(fCuts)));
- fNvar = 15;
+ switch (fConfiguration) {
+ case kSnail: // slow configuration: all variables in
+ fNvar = 16;
+ break;
+ case kCheetah:// fast configuration: only pt_candidate, y, phi, ct, fake, z_vtx, centrality, multiplicity will be filled
+ fNvar = 8;
+ break;
+ }
fPartName="D0";
fDauNames="K+pi+pi+pi";
break;
break;
}
}
-
+
AliAODVertex *aodVtx = (AliAODVertex*)aodEvent->GetPrimaryVertex();
if (!aodVtx) return;
cfVtxHF->SetNVar(fNvar);
cfVtxHF->SetFakeSelection(fFakeSelection);
cfVtxHF->SetRejectCandidateIfNotFromQuark(fRejectIfNoQuark);
+ cfVtxHF->SetConfiguration(fConfiguration);
// switch-off the trigger class selection (doesn't work for MC)
fCuts->SetTriggerClass("");
fCuts->SetMaxCentrality(100.);
}
-
Float_t centValue = fCuts->GetCentrality(aodEvent);
cfVtxHF->SetCentralityValue(centValue);
+ // number of tracklets - multiplicity estimator
+ Double_t multiplicity = (Double_t)(aodEvent->GetTracklets()->GetNumberOfTracklets()); // casted to double because the CF is filled with doubles
+ cfVtxHF->SetMultiplicity(multiplicity);
+
for (Int_t iPart=0; iPart<mcArray->GetEntriesFast(); iPart++) {
AliAODMCParticle* mcPart = dynamic_cast<AliAODMCParticle*>(mcArray->At(iPart));
if (!mcPart){
fCFManager->GetParticleContainer()->Fill(containerInputMC,kStepRefit, fWeight);
AliDebug(3,"MC Refit cut passed and container filled\n");
icountRefit++;
-
-
}
else{
AliDebug(3,"MC Refit cut not passed\n");
// }
delete [] trackCuts;
}
+
+
}
//___________________________________________________________________________
AliInfo(Form("Among the above, found %i reco %s that are decaying in %s and satisfy PPR+PID cuts, in %d events",fCountRecoPID,fPartName.Data(),fDauNames.Data(),fEvents));
// draw some example plots....
-
- AliCFContainer *cont= dynamic_cast<AliCFContainer*> (GetOutputData(2));
+ AliCFContainer *cont= dynamic_cast<AliCFContainer*> (GetOutputData(2));
if(!cont) {
printf("CONTAINER NOT FOUND\n");
return;
}
// projecting the containers to obtain histograms
// first argument = variable, second argument = step
-
- TH1D* h[3][12];
- for(Int_t iC=0;iC<12; iC++){
- // MC-level
- h[0][iC] = cont->ShowProjection(iC,0);
- // MC-Acceptance level
- h[1][iC] = cont->ShowProjection(iC,1);
- // Reco-level
- h[2][iC] = cont->ShowProjection(iC,4);
+
+ TH1D** h = new TH1D*[3];
+ if (fConfiguration == kSnail){
+ //h = new TH1D[3][12];
+ for (Int_t ih = 0; ih<3; ih++){
+ h[ih] = new TH1D[12];
+ }
+ for(Int_t iC=1;iC<12; iC++){
+ // MC-level
+ h[0][iC] = *(cont->ShowProjection(iC,0));
+ // MC-Acceptance level
+ h[1][iC] = *(cont->ShowProjection(iC,1));
+ // Reco-level
+ h[2][iC] = *(cont->ShowProjection(iC,4));
+ }
}
- TString titles[12];
- if(fDecayChannel==31){
- titles[0]="pT_Dplus (GeV/c)";
- titles[1]="rapidity";
- titles[2]="phi (rad)";
- titles[3]="cT (#mum)";
- titles[4]="cosPointingAngle";
- titles[5]="pT_1 (GeV/c)";
- titles[6]="pT_2 (GeV/c)";
- titles[7]="pT_3 (GeV/c)";
- titles[8]="d0_1 (#mum)";
- titles[9]="d0_2 (#mum)";
- titles[10]="d0_3 (#mum)";
- titles[11]="zVertex (cm)";
- }else{
- titles[0]="pT_D0 (GeV/c)";
- titles[1]="rapidity";
- titles[2]="cosThetaStar";
- titles[3]="pT_pi (GeV/c)";
- titles[4]="pT_K (Gev/c)";
- titles[5]="cT (#mum)";
- titles[6]="dca (#mum)";
- titles[7]="d0_pi (#mum)";
- titles[8]="d0_K (#mum)";
- titles[9]="d0xd0 (#mum^2)";
- titles[10]="cosPointingAngle";
- titles[11]="phi (rad)";
+ else{
+ //h = new TH1D[3][12];
+ for (Int_t ih = 0; ih<3; ih++){
+ h[ih] = new TH1D[8];
+ }
+ for(Int_t iC=0;iC<8; iC++){
+ // MC-level
+ h[0][iC] = *(cont->ShowProjection(iC,0));
+ // MC-Acceptance level
+ h[1][iC] = *(cont->ShowProjection(iC,1));
+ // Reco-level
+ h[2][iC] = *(cont->ShowProjection(iC,4));
+ }
+ }
+
+ TString* titles;
+ Int_t nvarToPlot = 0;
+ if (fConfiguration == kSnail){
+ nvarToPlot = 12;
+ titles = new TString[nvarToPlot];
+ if(fDecayChannel==31){
+ titles[0]="pT_Dplus (GeV/c)";
+ titles[1]="rapidity";
+ titles[2]="phi (rad)";
+ titles[3]="cT (#mum)";
+ titles[4]="cosPointingAngle";
+ titles[5]="pT_1 (GeV/c)";
+ titles[6]="pT_2 (GeV/c)";
+ titles[7]="pT_3 (GeV/c)";
+ titles[8]="d0_1 (#mum)";
+ titles[9]="d0_2 (#mum)";
+ titles[10]="d0_3 (#mum)";
+ titles[11]="zVertex (cm)";
+ }else{
+ titles[0]="pT_D0 (GeV/c)";
+ titles[1]="rapidity";
+ titles[2]="cosThetaStar";
+ titles[3]="pT_pi (GeV/c)";
+ titles[4]="pT_K (Gev/c)";
+ titles[5]="cT (#mum)";
+ titles[6]="dca (#mum)";
+ titles[7]="d0_pi (#mum)";
+ titles[8]="d0_K (#mum)";
+ titles[9]="d0xd0 (#mum^2)";
+ titles[10]="cosPointingAngle";
+ titles[11]="phi (rad)";
+
+ }
+ }
+ else{
+ nvarToPlot = 8;
+ titles = new TString[nvarToPlot];
+ titles[0]="pT_candidate (GeV/c)";
+ titles[1]="rapidity";
+ titles[2]="cT (#mum)";
+ titles[3]="phi";
+ titles[4]="z_{vtx}";
+ titles[5]="centrality";
+ titles[6]="fake";
+ titles[7]="multiplicity";
}
+
Int_t markers[12]={20,24,21,25,27,28,
20,24,21,25,27,28};
Int_t colors[3]={2,8,4};
- for(Int_t iC=0;iC<12; iC++){
- for(Int_t iStep=0;iStep<3;iStep++){
- h[iStep][iC]->SetTitle(titles[iC].Data());
- h[iStep][iC]->GetXaxis()->SetTitle(titles[iC].Data());
- Double_t maxh=h[iStep][iC]->GetMaximum();
- h[iStep][iC]->GetYaxis()->SetRangeUser(0,maxh*1.2);
- h[iStep][iC]->SetMarkerStyle(markers[iC]);
- h[iStep][iC]->SetMarkerColor(colors[iStep]);
- }
+ for(Int_t iC=0;iC<nvarToPlot; iC++){
+ for(Int_t iStep=0;iStep<3;iStep++){
+ h[iStep][iC].SetTitle(titles[iC].Data());
+ h[iStep][iC].GetXaxis()->SetTitle(titles[iC].Data());
+ Double_t maxh=h[iStep][iC].GetMaximum();
+ h[iStep][iC].GetYaxis()->SetRangeUser(0,maxh*1.2);
+ h[iStep][iC].SetMarkerStyle(markers[iC]);
+ h[iStep][iC].SetMarkerColor(colors[iStep]);
+ }
}
-
-
gStyle->SetCanvasColor(0);
gStyle->SetFrameFillColor(0);
gStyle->SetStatColor(0);
// drawing in 2 separate canvas for a matter of clearity
- TCanvas * c1 =new TCanvas("c1New","Vars 0,1,2",1100,1600);
- c1->Divide(3,3);
+ TCanvas * c1 =new TCanvas(Form("c1New_%d",fDecayChannel),"Vars 0, 1, 2, 3",1100,1200);
+ c1->Divide(3,4);
Int_t iPad=1;
- for(Int_t iVar=0; iVar<3; iVar++){
- c1->cd(iPad++);
- h[0][iVar]->Draw("p");
- c1->cd(iPad++);
- h[1][iVar]->Draw("p");
- c1->cd(iPad++);
- h[2][iVar]->Draw("p");
+ for(Int_t iVar=0; iVar<4; iVar++){
+ c1->cd(iPad++);
+ h[0][iVar].Draw("p");
+ c1->cd(iPad++);
+ h[1][iVar].Draw("p");
+ c1->cd(iPad++);
+ h[2][iVar].Draw("p");
}
- TCanvas * c2 =new TCanvas("c2New","Vars 3,4,5",1100,1600);
- c2->Divide(3,3);
+ TCanvas * c2 =new TCanvas(Form("c2New_%d",fDecayChannel),"Vars 4, 5, 6, 7",1100,1200);
+ c2->Divide(3,4);
iPad=1;
- for(Int_t iVar=3; iVar<6; iVar++){
- c2->cd(iPad++);
- h[0][iVar]->Draw("p");
- c2->cd(iPad++);
- h[1][iVar]->Draw("p");
- c2->cd(iPad++);
- h[2][iVar]->Draw("p");
+ for(Int_t iVar=4; iVar<8; iVar++){
+ c2->cd(iPad++);
+ h[0][iVar].Draw("p");
+ c2->cd(iPad++);
+ h[1][iVar].Draw("p");
+ c2->cd(iPad++);
+ h[2][iVar].Draw("p");
}
-
- TCanvas * c3 =new TCanvas("c3New","Vars 6,7,8",1100,1600);
- c3->Divide(3,3);
- iPad=1;
- for(Int_t iVar=6; iVar<9; iVar++){
- c3->cd(iPad++);
- h[0][iVar]->Draw("p");
- c3->cd(iPad++);
- h[1][iVar]->Draw("p");
- c3->cd(iPad++);
- h[2][iVar]->Draw("p");
- }
-
-
- TCanvas * c4 =new TCanvas("c4New","Vars 9,10,11",1100,1600);
- c4->Divide(3,3);
- iPad=1;
- for(Int_t iVar=9; iVar<11; iVar++){
- c4->cd(iPad++);
- h[0][iVar]->Draw("p");
- c4->cd(iPad++);
- h[1][iVar]->Draw("p");
- c4->cd(iPad++);
- h[2][iVar]->Draw("p");
+ if (fConfiguration == kSnail){
+ TCanvas * c3 =new TCanvas(Form("c3New_%d",fDecayChannel),"Vars 8, 9, 10, 11",1100,1200);
+ c3->Divide(3,4);
+ iPad=1;
+ for(Int_t iVar=8; iVar<12; iVar++){
+ c3->cd(iPad++);
+ h[0][iVar].Draw("p");
+ c3->cd(iPad++);
+ h[1][iVar].Draw("p");
+ c3->cd(iPad++);
+ h[2][iVar].Draw("p");
+ }
}
TH2D* corr1 =hcorr->Projection(0,2);
TH2D* corr2 = hcorr->Projection(1,3);
- TCanvas * c7 =new TCanvas("c7New","",800,400);
+ TCanvas * c7 =new TCanvas(Form("c7New_%d",fDecayChannel),"",800,400);
c7->Divide(2,1);
c7->cd(1);
corr1->Draw("text");
c7->cd(2);
corr2->Draw("text");
-
TFile* file_projection = new TFile("CFtaskHFprojectionNew.root","RECREATE");
corr1->Write();
corr2->Write();
- for(Int_t iC=0;iC<12; iC++){
- for(Int_t iStep=0;iStep<3;iStep++){
- h[iStep][iC]->Write(Form("Step%d_%s",iStep,titles[iC].Data()));
- }
+ for(Int_t iC=0;iC<nvarToPlot; iC++){
+ for(Int_t iStep=0;iStep<3;iStep++){
+ h[iStep][iC].Write(Form("Step%d_%s",iStep,titles[iC].Data()));
+ }
}
file_projection->Close();
-
-
- /*
- c1->SaveAs("Plots/pT_rapidity_cosThetaStar.eps");
- c2->SaveAs("Plots/pTpi_pTK_cT.eps");
- c3->SaveAs("Plots/dca_d0pi_d0TK.eps");
- c4->SaveAs("Plots/d0xd0_cosPointingAngle.eps");
-
- c1->SaveAs("Plots/pT_rapidity_cosThetaStar.gif");
- c2->SaveAs("Plots/pTpi_pTK_cT.gif");
- c3->SaveAs("Plots/dca_d0pi_d0TK.gif");
- c4->SaveAs("Plots/d0xd0_cosPointingAngle.gif");
- */
}
//___________________________________________________________________________
kStepRecoPID = 9
};
+ enum {
+ kSnail = 0, // slow configuration, all variables
+ kCheetah = 1 // fast configuration, only a subset of variables
+ };
AliCFTaskVertexingHF();
AliCFTaskVertexingHF(const Char_t* name, AliRDHFCuts* cuts);
void SetKeepAllDs(){fDsOption=3;}
Bool_t ProcessDs(Int_t returnCodeDs) const;
+
+ void SetConfiguration(Int_t configuration) {(configuration == kSnail) ? Printf("Slow configuration chosen, all variables will be used!") : Printf("Fast configuration chosen, all variablesOnly pt, y, phi, ct, fake, z_vtx, centrality and multiplicity will be used!"); fConfiguration = configuration;}
+ Int_t GetConfiguration() const {return fConfiguration;}
protected:
AliCFManager *fCFManager; // pointer to the CF manager
Bool_t fRejectIfNoQuark; // flag to remove events not geenrated with PYTHIA
Bool_t fUseMCVertex; // flag to use MC vertex (useful when runnign in pp)
Int_t fDsOption; // Ds decay option
+ Int_t fConfiguration; // configuration (slow / fast) of the CF --> different variables will be allocated (all / reduced number)
- ClassDef(AliCFTaskVertexingHF,7); // class for HF corrections as a function of many variables
+ ClassDef(AliCFTaskVertexingHF,8); // class for HF corrections as a function of many variables
};
#endif
#include "AliLog.h"
#include "AliESDtrackCuts.h"
#include "AliESDtrack.h"
+#include "AliCFTaskVertexingHF.h"
#include "AliCFVertexingHF.h"
fEtaAccCut(0x0),
fFakeSelection(0),
fFake(1.), // setting to MC value
- fRejectIfNoQuark(kFALSE)
+ fRejectIfNoQuark(kFALSE),
+ fMultiplicity(0.),
+ fConfiguration(AliCFTaskVertexingHF::kCheetah) // by default, setting the fast configuration
{
//
// constructor
fEtaAccCut(0x0),
fFakeSelection(0),
fFake(1.), // setting to MC value
- fRejectIfNoQuark(kFALSE)
+ fRejectIfNoQuark(kFALSE),
+ fMultiplicity(0.),
+ fConfiguration(AliCFTaskVertexingHF::kCheetah) // by default, setting the fast configuration
{
//
// constructor with mcArray
fEtaAccCut[iP]=c.fEtaAccCut[iP];
}
}
+ fMultiplicity=c.fMultiplicity;
+ fConfiguration=c.fConfiguration;
}
return *this;
fEtaAccCut(0x0),
fFakeSelection(c.fFakeSelection),
fFake(c.fFake),
- fRejectIfNoQuark(c.fRejectIfNoQuark)
+ fRejectIfNoQuark(c.fRejectIfNoQuark),
+ fMultiplicity(c.fMultiplicity),
+ fConfiguration(c.fConfiguration)
{
//
//copy constructor
void SetRejectCandidateIfNotFromQuark(Bool_t opt){fRejectIfNoQuark=opt;}
+ void SetMultiplicity(Double_t multiplicity) {fMultiplicity = multiplicity;}
+ void SetConfiguration(Int_t configuration) {fConfiguration = configuration;}
+
protected:
TClonesArray *fmcArray; //mcArray candidate
Int_t fFakeSelection; // fakes selection: 0 --> all, 1 --> non-fake, 2 --> fake
Float_t fFake; // variable to indicate whether the D0 was a fake or not: 0 --> fake, 1 --> MC, 2 --> non-fake
Bool_t fRejectIfNoQuark; // flag to remove events not geenrated with PYTHIA
+ Double_t fMultiplicity; // multiplicity of the event
+ Int_t fConfiguration; // configuration (slow / fast) of the CF --> different variables will be allocated (all / reduced number)
- ClassDef(AliCFVertexingHF, 6);
+ ClassDef(AliCFVertexingHF, 7);
};
#include "AliCFVertexingHF2Prong.h"
#include "AliCFContainer.h"
+#include "AliCFTaskVertexingHF.h"
ClassImp(AliCFVertexingHF2Prong)
pTK = mcPartDaughter0->Pt();
}
- vectorMC[0] = fmcPartCandidate->Pt();
- vectorMC[1] = fmcPartCandidate->Y() ;
- vectorMC[2] = cosThetaStar ;
- vectorMC[3] = pTpi ;
- vectorMC[4] = pTK ;
- vectorMC[5] = cT*1.E4 ; // in micron
- vectorMC[6] = 0.; // dummy value, meaningless in MC
- vectorMC[7] = 0.; // dummy value, meaningless in MC, in micron
- vectorMC[8] = 0.; // dummy value, meaningless in MC, in micron
- vectorMC[9] = -100000.; // dummy value, meaningless in MC, in micron^2
- vectorMC[10] = 1.01; // dummy value, meaningless in MC
- vectorMC[11] = fmcPartCandidate->Phi();
- vectorMC[12] = fzMCVertex; // z of reconstructed of primary vertex
- vectorMC[13] = fCentValue; //reconstructed centrality
- vectorMC[14] = 1.; // always filling with 1 at MC level
-
+ switch (fConfiguration){
+ case AliCFTaskVertexingHF::kSnail:
+ vectorMC[0] = fmcPartCandidate->Pt();
+ vectorMC[1] = fmcPartCandidate->Y() ;
+ vectorMC[2] = cosThetaStar ;
+ vectorMC[3] = pTpi ;
+ vectorMC[4] = pTK ;
+ vectorMC[5] = cT*1.E4 ; // in micron
+ vectorMC[6] = 0.; // dummy value for dca, meaningless in MC
+ vectorMC[7] = -80000.; // dummy value for d0pixd0K, meaningless in MC, in micron^2
+ vectorMC[8] = 1.01; // dummy value for cosPointing, meaningless in MC
+ vectorMC[9] = fmcPartCandidate->Phi();
+ vectorMC[10] = fzMCVertex; // z of reconstructed of primary vertex
+ vectorMC[11] = fCentValue; //reconstructed centrality
+ vectorMC[12] = 1.; // fake: always filling with 1 at MC level
+ vectorMC[13] = 1.01; // dummy value for cosPointingXY multiplicity
+ vectorMC[14] = 0.; // dummy value for NormalizedDecayLengthXY multiplicity
+ vectorMC[15] = fMultiplicity; // reconstructed multiplicity
+ break;
+ case AliCFTaskVertexingHF::kCheetah:
+ vectorMC[0] = fmcPartCandidate->Pt();
+ vectorMC[1] = fmcPartCandidate->Y() ;
+ vectorMC[2] = cT*1.E4; // in micron
+ vectorMC[3] = fmcPartCandidate->Phi();
+ vectorMC[4] = fzMCVertex;
+ vectorMC[5] = fCentValue; // dummy value for dca, meaningless in MC
+ vectorMC[6] = 1. ; // fake: always filling with 1 at MC level
+ vectorMC[7] = fMultiplicity; // dummy value for d0pi, meaningless in MC, in micron
+ break;
+ }
delete decay;
bGenValues = kTRUE;
return bGenValues;
Double_t cosPointingAngle = d0toKpi->CosPointingAngle();
Double_t phi = d0toKpi->Phi();
Int_t pdgCode = fmcPartCandidate->GetPdgCode();
+ Double_t cosPointingAngleXY = d0toKpi->CosPointingAngleXY();
+ Double_t normDecayLengthXY = d0toKpi->NormalizedDecayLengthXY();
if (pdgCode > 0){
cosThetaStar = d0toKpi->CosThetaStarD0();
Double_t cT = d0toKpi->CtD0();
- vectorReco[0] = pt;
- vectorReco[1] = rapidity;
- vectorReco[2] = cosThetaStar;
- vectorReco[3] = pTpi;
- vectorReco[4] = pTK;
- vectorReco[5] = cT*1.E4; // in micron
- vectorReco[6] = dca*1.E4; // in micron
- vectorReco[7] = d0pi*1.E4; // in micron
- vectorReco[8] = d0K*1.E4; // in micron
- vectorReco[9] = d0xd0*1.E8; // in micron^2
- vectorReco[10] = cosPointingAngle; // in micron
- vectorReco[11] = phi;
- vectorReco[12] = fzPrimVertex; // z of reconstructed of primary vertex
- vectorReco[13] = fCentValue; //reconstructed centrality
- vectorReco[14] = fFake; // whether the reconstructed candidate was a fake (fFake = 0) or not (fFake = 2)
+ switch (fConfiguration){
+ case AliCFTaskVertexingHF::kSnail:
+ vectorReco[0] = pt;
+ vectorReco[1] = rapidity;
+ vectorReco[2] = cosThetaStar;
+ vectorReco[3] = pTpi;
+ vectorReco[4] = pTK;
+ vectorReco[5] = cT*1.E4; // in micron
+ vectorReco[6] = dca*1.E4; // in micron
+ vectorReco[7] = d0xd0*1.E8; // in micron^2
+ vectorReco[8] = cosPointingAngle;
+ vectorReco[9] = phi;
+ vectorReco[10] = fzPrimVertex; // z of reconstructed of primary vertex
+ vectorReco[11] = fCentValue; //reconstructed centrality
+ vectorReco[12] = fFake; // whether the reconstructed candidate was a fake (fFake = 0) or not (fFake = 2)
+ vectorReco[13] = cosPointingAngleXY;
+ vectorReco[14] = normDecayLengthXY; // in cm
+ vectorReco[15] = fMultiplicity; // reconstructed multiplicity
+ break;
+ case AliCFTaskVertexingHF::kCheetah:
+ vectorReco[0] = pt;
+ vectorReco[1] = rapidity ;
+ vectorReco[2] = cT*1.E4; // in micron
+ vectorReco[3] = phi;
+ vectorReco[4] = fzPrimVertex;
+ vectorReco[5] = fCentValue;
+ vectorReco[6] = fFake ;
+ vectorReco[7] = fMultiplicity;
+ break;
+ }
bFillRecoValues = kTRUE;
#include "AliCFVertexingHF3Prong.h"
#include "AliCFContainer.h"
+#include "AliCFTaskVertexingHF.h"
ClassImp(AliCFVertexingHF3Prong)
//______________________________________________
Bool_t AliCFVertexingHF3Prong::GetGeneratedValuesFromMCParticle(Double_t* vectorMC) {
- //
- // collecting all the necessary info from MC particle and fill vectorMC: 12 variables
- // pt_D
- // y_D
- // phi_D
- // ctau
- // cos point
- // pt_1
- // pt_2
- // pt_3
- // d0_1
- // d0_2
- // d0_3
- // zPrimVert
- // centrality
-
- Bool_t bGenValues = kFALSE;
-
- Int_t pdgCand = -1;
- if(fDecay==kDplustoKpipi){
- pdgCand=411;
- }else if(fDecay==kDstoKKpi){
- pdgCand=431;
- }else if(fDecay==kLctopKpi){
- pdgCand=4122;
- }else{
- AliError("WRONG DECAY SETTING");
- return bGenValues;
- }
-
- Double_t vertD[3] = {0,0,0}; // D origin
- fmcPartCandidate->XvYvZv(vertD); // cm
-
- Int_t nprongs = 3;
- Int_t daughter[3];
- Short_t charge = fmcPartCandidate->Charge();
-
- // order the daughters as LS,OS,LS, e.g. D+ -> pi+ K- pi+
- // the 2 LS are ordered so that in pos. 0 there is the one with lower label value
- Int_t index=0;
- Int_t nDauLS=0;
- Int_t nDauOS=0;
-
-
- Int_t nDau=fmcPartCandidate->GetNDaughters();
- Int_t labelFirstDau = fmcPartCandidate->GetDaughter(0);
- if(nDau==3){
- for(Int_t iDau=0; iDau<3; iDau++){
- Int_t ind = labelFirstDau+iDau;
- AliAODMCParticle* part = dynamic_cast<AliAODMCParticle*>(fmcArray->At(ind));
- if(!part){
- AliError("Daughter particle not found in MC array");
- return bGenValues;
- }
- Short_t signDau=part->Charge();
- if(signDau==charge){
- nDauLS++;
- daughter[index] = ind;
- index=2;
- }else{
- daughter[1] = ind;
- nDauOS++;
- }
- }
- }else if(nDau==2){
- for(Int_t iDau=0; iDau<2; iDau++){
- Int_t ind = labelFirstDau+iDau;
- AliAODMCParticle* part = dynamic_cast<AliAODMCParticle*>(fmcArray->At(ind));
- if(!part){
- AliError("Daughter particle not found in MC array");
- return bGenValues;
- }
- Int_t pdgCode=TMath::Abs(part->GetPdgCode());
- if(pdgCode==211 || pdgCode==321 || pdgCode==2212){
- Short_t signDau=part->Charge();
- if(signDau==charge){
- nDauLS++;
- daughter[index] = ind;
- index=2;
+ //
+ // collecting all the necessary info from MC particle and fill vectorMC: 12 variables
+ // pt_D
+ // y_D
+ // phi_D
+ // ctau
+ // cos point
+ // pt_1
+ // pt_2
+ // pt_3
+ // d0_1
+ // d0_2
+ // d0_3
+ // zPrimVert
+ // centrality
+
+ Bool_t bGenValues = kFALSE;
+
+ Int_t pdgCand = -1;
+ if(fDecay==kDplustoKpipi){
+ pdgCand=411;
+ }else if(fDecay==kDstoKKpi){
+ pdgCand=431;
+ }else if(fDecay==kLctopKpi){
+ pdgCand=4122;
}else{
- daughter[1] = ind;
- nDauOS++;
+ AliError("WRONG DECAY SETTING");
+ return bGenValues;
}
- }else{
- Int_t nDauRes=part->GetNDaughters();
- if(nDauRes!=2){
- AliError("Wrong resonant decay");
- return bGenValues;
+
+ Double_t vertD[3] = {0,0,0}; // D origin
+ fmcPartCandidate->XvYvZv(vertD); // cm
+
+ Int_t nprongs = 3;
+ Int_t daughter[3];
+ Short_t charge = fmcPartCandidate->Charge();
+
+ // order the daughters as LS,OS,LS, e.g. D+ -> pi+ K- pi+
+ // the 2 LS are ordered so that in pos. 0 there is the one with lower label value
+ Int_t index=0;
+ Int_t nDauLS=0;
+ Int_t nDauOS=0;
+
+
+ Int_t nDau=fmcPartCandidate->GetNDaughters();
+ Int_t labelFirstDau = fmcPartCandidate->GetDaughter(0);
+ if(nDau==3){
+ for(Int_t iDau=0; iDau<3; iDau++){
+ Int_t ind = labelFirstDau+iDau;
+ AliAODMCParticle* part = dynamic_cast<AliAODMCParticle*>(fmcArray->At(ind));
+ if(!part){
+ AliError("Daughter particle not found in MC array");
+ return bGenValues;
+ }
+ Short_t signDau=part->Charge();
+ if(signDau==charge){
+ nDauLS++;
+ daughter[index] = ind;
+ index=2;
+ }else{
+ daughter[1] = ind;
+ nDauOS++;
+ }
+ }
+ }else if(nDau==2){
+ for(Int_t iDau=0; iDau<2; iDau++){
+ Int_t ind = labelFirstDau+iDau;
+ AliAODMCParticle* part = dynamic_cast<AliAODMCParticle*>(fmcArray->At(ind));
+ if(!part){
+ AliError("Daughter particle not found in MC array");
+ return bGenValues;
+ }
+ Int_t pdgCode=TMath::Abs(part->GetPdgCode());
+ if(pdgCode==211 || pdgCode==321 || pdgCode==2212){
+ Short_t signDau=part->Charge();
+ if(signDau==charge){
+ nDauLS++;
+ daughter[index] = ind;
+ index=2;
+ }else{
+ daughter[1] = ind;
+ nDauOS++;
+ }
+ }else{
+ Int_t nDauRes=part->GetNDaughters();
+ if(nDauRes!=2){
+ AliError("Wrong resonant decay");
+ return bGenValues;
+ }
+ Int_t labelFirstDauRes = part->GetDaughter(0);
+ for(Int_t iDauRes=0; iDauRes<2; iDauRes++){
+ Int_t indDR = labelFirstDauRes+iDauRes;
+ AliAODMCParticle* partDR = dynamic_cast<AliAODMCParticle*>(fmcArray->At(indDR));
+ if(!partDR){
+ AliError("Daughter particle not found in MC array");
+ return bGenValues;
+ }
+ Short_t signDau=partDR->Charge();
+ if(signDau==charge){
+ nDauLS++;
+ daughter[index] = ind;
+ index=2;
+ }else{
+ daughter[1] = ind;
+ nDauOS++;
+ }
+ }
+ }
+ }
+ }else{
+ AliError(Form("Wrong number of daughters %d",nDau));
+ return bGenValues;
}
- Int_t labelFirstDauRes = part->GetDaughter(0);
- for(Int_t iDauRes=0; iDauRes<2; iDauRes++){
- Int_t indDR = labelFirstDauRes+iDauRes;
- AliAODMCParticle* partDR = dynamic_cast<AliAODMCParticle*>(fmcArray->At(indDR));
- if(!partDR){
- AliError("Daughter particle not found in MC array");
- return bGenValues;
- }
- Short_t signDau=partDR->Charge();
- if(signDau==charge){
- nDauLS++;
- daughter[index] = ind;
- index=2;
- }else{
- daughter[1] = ind;
- nDauOS++;
- }
+
+ if(nDauLS!=2 || nDauOS!=1){
+ AliError(Form("Wrong decay channel: LS and OS daughters not OK: %d %d",nDauLS,nDauOS));
+ return bGenValues;
}
- }
- }
- }else{
- AliError(Form("Wrong number of daughters %d",nDau));
- return bGenValues;
- }
-
- if(nDauLS!=2 || nDauOS!=1){
- AliError(Form("Wrong decay channel: LS and OS daughters not OK: %d %d",nDauLS,nDauOS));
- return bGenValues;
- }
- if(daughter[0]>daughter[2]){
- Int_t tmp=daughter[0];
- daughter[0]=daughter[2];
- daughter[2]=tmp;
- }
-
- // getting the momentum from the daughters and decay vertex
- Double_t px[3],py[3],pz[3],pt[3];
- Double_t vertDec[3] = {0,0,0}; // decay vertex
- for(Int_t iDau=0; iDau<3; iDau++){
- AliAODMCParticle* part=dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughter[iDau]));
- if(!part){
- AliError("Daughter particle not found in MC array");
- return bGenValues;
- }
- px[iDau]=part->Px();
- py[iDau]=part->Py();
- pz[iDau]=part->Pz();
- pt[iDau]=part->Pt();
- if(iDau==0) part->XvYvZv(vertDec);
- }
-
- Double_t d0[3] = {0.,0.,0.}; // dummy values!!!!
-
- AliAODRecoDecayHF* decay = new AliAODRecoDecayHF(vertD,vertDec,nprongs,charge,px,py,pz,d0);
- Double_t cT = decay->Ct(pdgCand);
+ if(daughter[0]>daughter[2]){
+ Int_t tmp=daughter[0];
+ daughter[0]=daughter[2];
+ daughter[2]=tmp;
+ }
+
+ // getting the momentum from the daughters and decay vertex
+ Double_t px[3],py[3],pz[3],pt[3];
+ Double_t vertDec[3] = {0,0,0}; // decay vertex
+ for(Int_t iDau=0; iDau<3; iDau++){
+ AliAODMCParticle* part=dynamic_cast<AliAODMCParticle*>(fmcArray->At(daughter[iDau]));
+ if(!part){
+ AliError("Daughter particle not found in MC array");
+ return bGenValues;
+ }
+ px[iDau]=part->Px();
+ py[iDau]=part->Py();
+ pz[iDau]=part->Pz();
+ pt[iDau]=part->Pt();
+ if(iDau==0) part->XvYvZv(vertDec);
+ }
+
+ Double_t d0[3] = {0.,0.,0.}; // dummy values!!!!
+
+ AliAODRecoDecayHF* decay = new AliAODRecoDecayHF(vertD,vertDec,nprongs,charge,px,py,pz,d0);
+ Double_t cT = decay->Ct(pdgCand);
+
+ switch (fConfiguration){
+ case AliCFTaskVertexingHF::kSnail:
+ vectorMC[0] = fmcPartCandidate->Pt();
+ vectorMC[1] = fmcPartCandidate->Y() ;
+ vectorMC[2] = fmcPartCandidate->Phi();
+ vectorMC[3] = cT*1.E4 ; // in micron
+ vectorMC[4] = 1.01; // cos pointing angle, dummy value, meaningless in MC
+ vectorMC[5] = pt[0];
+ vectorMC[6] = pt[1];
+ vectorMC[7] = pt[2];
+ vectorMC[8] = fzMCVertex; // z of reconstructed of primary vertex
+ vectorMC[9] = fCentValue; // reconstructed centrality value
+ vectorMC[10] = 1.; // fake: always filling with 1 at MC level
+ vectorMC[11] = 1.01; // dummy value for cosPointingXY multiplicity
+ vectorMC[12] = 0.; // dummy value for NormalizedDecayLengthXY multiplicity
+ vectorMC[13] = fMultiplicity; // reconstructed multiplicity
- vectorMC[0] = fmcPartCandidate->Pt();
- vectorMC[1] = fmcPartCandidate->Y() ;
- vectorMC[2] = fmcPartCandidate->Phi();
- vectorMC[3] = cT*1.E4 ; // in micron
- vectorMC[4] = 1.01; // cos pointing angle, dummy value, meaningless in MC
- vectorMC[5] = pt[0];
- vectorMC[6] = pt[1];
- vectorMC[7] = pt[2];
- vectorMC[8] = 0.; // imppar0, dummy value, meaningless in MC
- vectorMC[9] = 0.; // imppar1, dummy value, meaningless in MC, in micron
- vectorMC[10] = 0.; // imppar2, dummy value, meaningless in MC, in micron
- vectorMC[11] = fzMCVertex; // z of reconstructed of primary vertex
- vectorMC[12] = fCentValue; // reconstructed centrality value
- vectorMC[13] = 1.; // always filling with 1 at MC level
-
- if (fDecay==kLctopKpi){
- vectorMC[14] = 0.;
- vectorMC[15] = 0.;
- vectorMC[16] = 0.;
- vectorMC[17] = 0.;
+ if (fDecay==kLctopKpi){
+ vectorMC[11] = 0.; //dist12
+ vectorMC[12] = 0.; //dist23
+ vectorMC[13] = 0.; //sigmaVtx
+ vectorMC[14] = 0.; //sumd02
+ vectorMC[15] = 1.01; // dummy value for cosPointingXY multiplicity
+ vectorMC[16] = 0.; // dummy value for NormalizedDecayLengthXY multiplicity
+ vectorMC[17] = fMultiplicity; // reconstructed multiplicity
+ }
+ break;
+
+ case AliCFTaskVertexingHF::kCheetah:
+ vectorMC[0] = fmcPartCandidate->Pt();
+ vectorMC[1] = fmcPartCandidate->Y() ;
+ vectorMC[2] = cT*1.E4; // in micron
+ vectorMC[3] = fmcPartCandidate->Phi();
+ vectorMC[4] = fzMCVertex;
+ vectorMC[5] = fCentValue; // dummy value for dca, meaningless in MC
+ vectorMC[6] = 1. ; // fake: always filling with 1 at MC level
+ vectorMC[7] = fMultiplicity; // dummy value for d0pi, meaningless in MC, in micron
+ break;
}
-
- bGenValues = kTRUE;
- return bGenValues;
+ bGenValues = kTRUE;
+ return bGenValues;
}
//____________________________________________
Bool_t AliCFVertexingHF3Prong::GetRecoValuesFromCandidate(Double_t *vectorReco) const
{
- // Fill vector (see above) with reconstructed quantities
- Bool_t bFillRecoValues=kFALSE;
-
- Int_t pdgCand = -1;
- if(fDecay==kDplustoKpipi){
- pdgCand=411;
- }else if(fDecay==kDstoKKpi){
- pdgCand=431;
- }else if(fDecay==kLctopKpi){
- pdgCand=4122;
- // AliError("LambdaC not yet implemented");
- // return bFillRecoValues;
- }else{
- AliError("WRONG DECAY SETTING");
- return bFillRecoValues;
- }
-
- AliAODRecoDecayHF3Prong *decay3 = (AliAODRecoDecayHF3Prong*)fRecoCandidate;
- Short_t charge=decay3->Charge();
- Double_t rapidity=decay3->Y(pdgCand);
- Double_t cT=decay3->Ct(pdgCand);
- Double_t pt = decay3->Pt();
- Double_t cosPointingAngle = decay3->CosPointingAngle();
- Double_t phi = decay3->Phi();
- Double_t dist12= decay3->GetDist12toPrim();
- Double_t dist23 = decay3->GetDist23toPrim();
- Double_t sigmVert = decay3->GetSigmaVert();
+ // Fill vector (see above) with reconstructed quantities
+ Bool_t bFillRecoValues=kFALSE;
+
+ Int_t pdgCand = -1;
+ if(fDecay==kDplustoKpipi){
+ pdgCand=411;
+ }else if(fDecay==kDstoKKpi){
+ pdgCand=431;
+ }else if(fDecay==kLctopKpi){
+ pdgCand=4122;
+ // AliError("LambdaC not yet implemented");
+ // return bFillRecoValues;
+ }else{
+ AliError("WRONG DECAY SETTING");
+ return bFillRecoValues;
+ }
+
+ AliAODRecoDecayHF3Prong *decay3 = (AliAODRecoDecayHF3Prong*)fRecoCandidate;
+ Short_t charge=decay3->Charge();
+ Double_t rapidity=decay3->Y(pdgCand);
+ Double_t cT=decay3->Ct(pdgCand);
+ Double_t pt = decay3->Pt();
+ Double_t cosPointingAngle = decay3->CosPointingAngle();
+ Double_t phi = decay3->Phi();
+ Double_t dist12= decay3->GetDist12toPrim();
+ Double_t dist23 = decay3->GetDist23toPrim();
+ Double_t sigmVert = decay3->GetSigmaVert();
+ Double_t cosPointingAngleXY = decay3->CosPointingAngleXY();
+ Double_t normDecayLengthXY = decay3->NormalizedDecayLengthXY();
+
+ Int_t daughtSorted[3];
+ Int_t tmpIndex=0;
+ Int_t nDauLS=0;
+ Int_t nDauOS=0;
+ for(Int_t iDau=0; iDau<3; iDau++){
+ AliAODTrack *trk = (AliAODTrack*)decay3->GetDaughter(iDau);
+ Int_t label = TMath::Abs(trk->GetLabel());
+ Short_t chargedau=trk->Charge();
+ if(chargedau==charge){
+ daughtSorted[tmpIndex]=label;
+ tmpIndex=2;
+ nDauLS++;
+ }else{
+ daughtSorted[1]=label;
+ nDauOS++;
+ }
+ }
+
+ if(nDauLS!=2 || nDauOS!=1){
+ AliError("Wrong decay channel: number of OS and LS tracks not OK");
+ return bFillRecoValues;
+ }
+
+ if(daughtSorted[0]>daughtSorted[2]){
+ Int_t tmp=daughtSorted[0];
+ daughtSorted[0]=daughtSorted[2];
+ daughtSorted[2]=tmp;
+ }
-
- Int_t daughtSorted[3];
- Int_t tmpIndex=0;
- Int_t nDauLS=0;
- Int_t nDauOS=0;
- for(Int_t iDau=0; iDau<3; iDau++){
- AliAODTrack *trk = (AliAODTrack*)decay3->GetDaughter(iDau);
- Int_t label = TMath::Abs(trk->GetLabel());
- Short_t chargedau=trk->Charge();
- if(chargedau==charge){
- daughtSorted[tmpIndex]=label;
- tmpIndex=2;
- nDauLS++;
- }else{
- daughtSorted[1]=label;
- nDauOS++;
- }
- }
-
- if(nDauLS!=2 || nDauOS!=1){
- AliError("Wrong decay channel: number of OS and LS tracks not OK");
- return bFillRecoValues;
- }
-
- if(daughtSorted[0]>daughtSorted[2]){
- Int_t tmp=daughtSorted[0];
- daughtSorted[0]=daughtSorted[2];
- daughtSorted[2]=tmp;
- }
-
Double_t d0prong0 = decay3->Getd0Prong(daughtSorted[0]);
Double_t d0prong1 = decay3->Getd0Prong(daughtSorted[1]);
Double_t d0prong2 = decay3->Getd0Prong(daughtSorted[2]);
- vectorReco[0] = pt;
- vectorReco[1] = rapidity;
- vectorReco[2] = phi;
- vectorReco[3] = cT*1.E4; // in micron
- vectorReco[4] = cosPointingAngle; // in micron
- vectorReco[5] = decay3->PtProng(daughtSorted[0]);
- vectorReco[6] = decay3->PtProng(daughtSorted[1]);
- vectorReco[7] = decay3->PtProng(daughtSorted[2]);
- vectorReco[8] = decay3->Getd0Prong(daughtSorted[0]);
- vectorReco[9] = decay3->Getd0Prong(daughtSorted[1]);
- vectorReco[10] = decay3->Getd0Prong(daughtSorted[2]);
- vectorReco[11] = fzPrimVertex; // z of reconstructed of primary vertex
- vectorReco[12] = fCentValue; //reconstructed centrality value
- vectorReco[13] = fFake; // whether the reconstructed candidate was a fake (fFake = 0) or not (fFake = 2)
-
- if(fDecay==kLctopKpi){
- Double_t sumd02 =(d0prong0*d0prong0 + d0prong1*d0prong1 + d0prong2*d0prong2);
- vectorReco[14] = dist12*1.E4;
- vectorReco[15] = dist23*1.E4;
- vectorReco[16] = sigmVert*1.E4;
- vectorReco[17] = sumd02*1.E8;
+ switch (fConfiguration){
+ case AliCFTaskVertexingHF::kSnail:
+ vectorReco[0] = pt;
+ vectorReco[1] = rapidity;
+ vectorReco[2] = phi;
+ vectorReco[3] = cT*1.E4; // in micron
+ vectorReco[4] = cosPointingAngle; // in micron
+ vectorReco[5] = decay3->PtProng(daughtSorted[0]);
+ vectorReco[6] = decay3->PtProng(daughtSorted[1]);
+ vectorReco[7] = decay3->PtProng(daughtSorted[2]);
+ vectorReco[8] = fzPrimVertex; // z of reconstructed of primary vertex
+ vectorReco[9] = fCentValue; //reconstructed centrality value
+ vectorReco[10] = fFake; // whether the reconstructed candidate was a fake (fFake = 0) or not (fFake = 2)
+ vectorReco[11] = cosPointingAngleXY;
+ vectorReco[12] = normDecayLengthXY; // in cm
+ vectorReco[13] = fMultiplicity; // reconstructed multiplicity
+
+ if(fDecay==kLctopKpi){
+ Double_t sumd02 =(d0prong0*d0prong0 + d0prong1*d0prong1 + d0prong2*d0prong2);
+ vectorReco[11] = dist12*1.E4;
+ vectorReco[12] = dist23*1.E4;
+ vectorReco[13] = sigmVert*1.E4;
+ vectorReco[14] = sumd02*1.E8;
+ vectorReco[15] = cosPointingAngleXY;
+ vectorReco[16] = normDecayLengthXY; // in cm
+ vectorReco[17] = fMultiplicity; // reconstructed multiplicity
+ }
+ break;
+ case AliCFTaskVertexingHF::kCheetah:
+ vectorReco[0] = pt;
+ vectorReco[1] = rapidity ;
+ vectorReco[2] = cT*1.E4; // in micron
+ vectorReco[3] = phi;
+ vectorReco[4] = fzPrimVertex;
+ vectorReco[5] = fCentValue;
+ vectorReco[6] = fFake ;
+ vectorReco[7] = fMultiplicity;
+ break;
}
-
- bFillRecoValues = kTRUE;
- return bFillRecoValues;
+ bFillRecoValues = kTRUE;
+ return bFillRecoValues;
}
#include "AliAODRecoCascadeHF.h"
#include "AliCFVertexingHFCascade.h"
#include "AliCFContainer.h"
+#include "AliCFTaskVertexingHF.h"
ClassImp(AliCFVertexingHFCascade)
}
- vectorMC[0] = fmcPartCandidate->Pt();
- vectorMC[1] = fmcPartCandidate->Y() ;
- vectorMC[2] = cosThetaStar ;
- vectorMC[3] = vectorD0[0];
- vectorMC[4] = vectorD0[1];
- vectorMC[5] = cT*1.E4 ; // in micron
- vectorMC[6] = 0.; // dummy value, meaningless in MC
- vectorMC[7] = 0.; // dummy value, meaningless in MC, in micron
- vectorMC[8] = 0.; // dummy value, meaningless in MC, in micron
- vectorMC[9] = -100000.; // dummy value, meaningless in MC, in micron^2
- vectorMC[10] = 1.01; // dummy value, meaningless in MC
- vectorMC[11] = fmcPartCandidate->Phi();
- vectorMC[12] = fzMCVertex; // z of reconstructed of primary vertex
- vectorMC[13] = fCentValue; // reconstructed centrality
- vectorMC[14] = 1.; // always filling with 1 at MC level
+ switch (fConfiguration){
+ case AliCFTaskVertexingHF::kSnail:
+ vectorMC[0] = fmcPartCandidate->Pt();
+ vectorMC[1] = fmcPartCandidate->Y() ;
+ vectorMC[2] = cosThetaStar ;
+ vectorMC[3] = vectorD0[0];
+ vectorMC[4] = vectorD0[1];
+ vectorMC[5] = cT*1.E4 ; // in micron
+ vectorMC[6] = 0.; // dummy value, meaningless in MC
+ vectorMC[7] = -100000.; // dummy value, meaningless in MC, in micron^2
+ vectorMC[8] = 1.01; // dummy value, meaningless in MC
+ vectorMC[9] = fmcPartCandidate->Phi();
+ vectorMC[10] = fzMCVertex; // z of reconstructed of primary vertex
+ vectorMC[11] = fCentValue; // reconstructed centrality
+ vectorMC[12] = 1.; // always filling with 1 at MC level
+ vectorMC[13] = 1.01; // dummy value for cosPointingXY multiplicity
+ vectorMC[14] = 0.; // dummy value for NormalizedDecayLengthXY multiplicity
+ vectorMC[15] = fMultiplicity; // reconstructed multiplicity
+ break;
+ case AliCFTaskVertexingHF::kCheetah:
+ vectorMC[0] = fmcPartCandidate->Pt();
+ vectorMC[1] = fmcPartCandidate->Y() ;
+ vectorMC[2] = cT*1.E4; // in micron
+ vectorMC[3] = fmcPartCandidate->Phi();
+ vectorMC[4] = fzMCVertex;
+ vectorMC[5] = fCentValue; // dummy value for dca, meaningless in MC
+ vectorMC[6] = 1. ; // fake: always filling with 1 at MC level
+ vectorMC[7] = fMultiplicity; // dummy value for d0pi, meaningless in MC, in micron
+ break;
+ }
delete decay;
bGenValues = kTRUE;
Double_t d0xd0 = d0toKpi->Prodd0d0();
Double_t cosPointingAngle = d0toKpi->CosPointingAngle();
Double_t phi = dstarD0pi->Phi();
+ Double_t cosPointingAngleXY = d0toKpi->CosPointingAngleXY();
+ Double_t normDecayLengthXY = d0toKpi->NormalizedDecayLengthXY();
Int_t pdgCode = fmcPartCandidate->GetPdgCode();
Double_t cT = d0toKpi->CtD0();
- vectorReco[0] = pt;
- vectorReco[1] = rapidity;
- vectorReco[2] = cosThetaStar;
- vectorReco[3] = pTpi;
- vectorReco[4] = pTK;
- vectorReco[5] = cT*1.E4; // in micron
- vectorReco[6] = dca*1.E4; // in micron
- vectorReco[7] = d0pi*1.E4; // in micron
- vectorReco[8] = d0K*1.E4; // in micron
- vectorReco[9] = d0xd0*1.E8; // in micron^2
- vectorReco[10] = cosPointingAngle; // in micron
- vectorReco[11] = phi;
- vectorReco[12] = fzPrimVertex; // z of reconstructed of primary vertex
- vectorReco[13] = fCentValue;
- vectorReco[14] = fFake; // whether the reconstructed candidate was a fake (fFake = 0) or not (fFake = 2)
-
- bFillRecoValues = kTRUE;
+ switch (fConfiguration){
+ case AliCFTaskVertexingHF::kSnail:
+ vectorReco[0] = pt;
+ vectorReco[1] = rapidity;
+ vectorReco[2] = cosThetaStar;
+ vectorReco[3] = pTpi;
+ vectorReco[4] = pTK;
+ vectorReco[5] = cT*1.E4; // in micron
+ vectorReco[6] = dca*1.E4; // in micron
+ vectorReco[7] = d0xd0*1.E8; // in micron^2
+ vectorReco[8] = cosPointingAngle; // in micron
+ vectorReco[9] = phi;
+ vectorReco[10] = fzPrimVertex; // z of reconstructed of primary vertex
+ vectorReco[11] = fCentValue;
+ vectorReco[12] = fFake; // whether the reconstructed candidate was a fake (fFake = 0) or not (fFake = 2)
+ vectorReco[13] = cosPointingAngleXY;
+ vectorReco[14] = normDecayLengthXY; // in cm
+ vectorReco[15] = fMultiplicity; // reconstructed multiplicity
+ break;
+ case AliCFTaskVertexingHF::kCheetah:
+ vectorReco[0] = pt;
+ vectorReco[1] = rapidity ;
+ vectorReco[2] = cT*1.E4; // in micron
+ vectorReco[3] = phi;
+ vectorReco[4] = fzPrimVertex;
+ vectorReco[5] = fCentValue;
+ vectorReco[6] = fFake ;
+ vectorReco[7] = fMultiplicity;
+ break;
+ }
+ bFillRecoValues = kTRUE;
+
return bFillRecoValues;
}
//DEFINITION OF A FEW CONSTANTS
-const Double_t ymin = -2.1 ;
-const Double_t ymax = 2.1 ;
-const Double_t cosmin = -1.05;
-const Double_t cosmax = 1.05;
+const Double_t ymin = -1.2 ;
+const Double_t ymax = 1.2 ;
+const Double_t cosminTS = -1.05;
+const Double_t cosmaxTS = 1.05;
+const Double_t cosmin = 0.7;
+const Double_t cosmax = 1.02;
const Double_t cTmin = 0; // micron
-const Double_t cTmax = 500; // micron
+const Double_t cTmax = 300; // micron
const Double_t dcamin = 0; // micron
-const Double_t dcamax = 500; // micron
-const Double_t d0min = -1000; // micron
-const Double_t d0max = 1000; // micron
-const Double_t d0xd0min = -100000; // micron
+const Double_t dcamax = 600; // micron
+const Double_t d0xd0min = -80000; // micron
const Double_t d0xd0max = 100000; // micron
const Double_t phimin = 0.0;
const Int_t mintrackrefsTPC = 2 ;
const Double_t zmax = 15;
const Int_t minITSClusters = 5;
-const Float_t centmin = 0.;
+const Float_t centmin_0_10 = 0.;
+const Float_t centmax_0_10 = 10.;
+const Float_t centmin_10_100 = 10.;
+const Float_t centmax_10_100 = 100.;
const Float_t centmax = 100.;
const Float_t fakemin = -0.5;
const Float_t fakemax = 2.5.;
+const Float_t cosminXY = 0.95;
+const Float_t cosmaxXY = 1.0;
+const Float_t normDecLXYmin = 0;
+const Float_t normDecLXYmax = 20;
+const Float_t multmin_0_20 = 0;
+const Float_t multmax_0_20 = 20;
+const Float_t multmin_20_50 = 20;
+const Float_t multmax_20_50 = 50;
+const Float_t multmin_50_102 = 50;
+const Float_t multmax_50_102 = 102;
//----------------------------------------------------
-AliCFTaskVertexingHF *AddTaskCFVertexingHF(const char* cutFile = "./D0toKpiCuts.root",Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode = 421, Char_t isSign = 2)
+AliCFTaskVertexingHF *AddTaskCFVertexingHF(const char* cutFile = "./D0toKpiCuts.root",Int_t configuration = AliCFTaskVertexingHF::kSnail, Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode = 421, Char_t isSign = 2)
+//AliCFContainer *AddTaskCFVertexingHF(const char* cutFile = "./D0toKpiCuts.root", Int_t configuration = AliCFTaskVertexingHF::kSnail, Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode = 421, Char_t isSign = 2)
{
- printf("Addig CF task using cuts from file %s\n",cutFile);
+ printf("Adding CF task using cuts from file %s\n",cutFile);
+ if (configuration == AliCFTaskVertexingHF::kSnail){
+ printf("The configuration is set to be SLOW --> all the variables will be used to fill the CF\n");
+ }
+ else if (configuration == AliCFTaskVertexingHF::kCheetah){
+ printf("The configuration is set to be FAST --> using only pt, y, ct, phi, zvtx, centrality, fake, multiplicity to fill the CF\n");
+ }
+ else{
+ printf("The configuration is not defined! returning\n");
+ return;
+ }
+
+ gSystem->Sleep(2000);
// isSign = 0 --> D0 only
// isSign = 1 --> D0bar only
}
TFile* fileCuts = new TFile(cutFile);
- AliRDHFCutsD0toKpi *cutsD0toKpi = (AliRDHFCutsD0toKpi*)fileCuts->Get("D0toKpiCuts");
+ AliRDHFCutsD0toKpi *cutsD0toKpi = (AliRDHFCutsD0toKpi*)fileCuts->Get("D0toKpiCutsStandard");
// check that the fKeepD0fromB flag is set to true when the fKeepD0fromBOnly flag is true
// for now the binning is the same than for all D's
//CONTAINER DEFINITION
Info("AliCFTaskVertexingHF","SETUP CONTAINER");
- //the sensitive variables, their indices
- UInt_t ipt = 0;
- UInt_t iy = 1;
- UInt_t icosThetaStar = 2;
- UInt_t ipTpi = 3;
- UInt_t ipTk = 4;
- UInt_t icT = 5;
- UInt_t idca = 6;
- UInt_t id0pi = 7;
- UInt_t id0K = 8;
- UInt_t id0xd0 = 9;
- UInt_t ipointing = 10;
- UInt_t iphi = 11;
- UInt_t iz = 12;
- UInt_t icent = 13;
- UInt_t ifake = 14;
-
const Double_t phimax = 2*TMath::Pi();
-
- //Setting up the container grid...
UInt_t nstep = 10; //number of selection steps: MC with limited acceptance, MC, Acceptance, Vertex, Refit, Reco (no cuts), RecoAcceptance, RecoITSClusters (RecoAcceptance included), RecoPPR (RecoAcceptance+RecoITSCluster included), RecoPID
- const Int_t nvar = 15 ; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi
- //Setting the bins: pt, ptPi, and ptK are considered seprately because for them you can either define the binning by hand, or using the cuts file
+ //const UInt_t ipT, iy, icosThetaStar, ipTpi, ipTk, icT, idca, id0xd0, ipointing, iphi, izvtx, icent, ifake, ipointingXY, iNormDecayLXY, imult;
+ const Int_t nbiny = 24 ; //bins in y
+ const Int_t nbincosThetaStar = 42 ; //bins in cosThetaStar
+ const Int_t nbincT = 15 ; //bins in cT
+ const Int_t nbindca = 20 ; //bins in dca
+ const Int_t nbind0xd0 = 90 ; //bins in d0xd0
+ const Int_t nbinpointing = 50 ; //bins in cosPointingAngle
+ const Int_t nbinphi = 18 ; //bins in Phi
+ const Int_t nbinzvtx = 30 ; //bins in z vertex
+ const Int_t nbincent = 11; //bins in centrality
+ const Int_t nbincent_0_10 = 2; //bins in centrality between 0 and 10
+ const Int_t nbincent_10_100 = 9; //bins in centrality between 10 and 100
+ const Int_t nbinfake = 3; //bins in fake
+ const Int_t nbinpointingXY = 50; //bins in cosPointingAngleXY
+ const Int_t nbinnormDecayLXY = 20; //bins in NormDecayLengthXY
+ const Int_t nbinmult = 48; //bins in multiplicity (total number)
+ const Int_t nbinmult_0_20 = 20; //bins in multiplicity between 0 and 20
+ const Int_t nbinmult_20_50 = 15; //bins in multiplicity between 20 and 50
+ const Int_t nbinmult_50_102 = 13; //bins in multiplicity between 50 and 102
- //arrays for the number of bins in each dimension
- Int_t iBin[nvar];
+ //the sensitive variables, their indices
+ const Int_t nvarTot = 16 ; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi, z, centrality, fake, cosPointingAngleXY, normDecayLengthXY, multiplicity
+
+ // variables' indices
+ const UInt_t ipT = 0;
+ const UInt_t iy = 1;
+ const UInt_t icosThetaStar = 2;
+ const UInt_t ipTpi = 3;
+ const UInt_t ipTk = 4;
+ const UInt_t icT = 5;
+ const UInt_t idca = 6;
+ const UInt_t id0xd0 = 7;
+ const UInt_t ipointing = 8;
+ const UInt_t iphi = 9;
+ const UInt_t izvtx = 10;
+ const UInt_t icent = 11;
+ const UInt_t ifake = 12;
+ const UInt_t ipointingXY = 13;
+ const UInt_t inormDecayLXY = 14;
+ const UInt_t imult = 15;
+
+ //Setting the bins: pt, ptPi, and ptK are considered seprately because for them you can either define the binning by hand, or using the cuts file
+
+ //arrays for the number of bins in each dimension
+ Int_t iBin[nvarTot];
+
//OPTION 1: defining the pt, ptPi, ptK bins by hand...
/*
- const Int_t nbin0_0_6 = 6 ; //bins in pt from 0 to 6 GeV
- const Int_t nbin0_6_8 = 1 ; //bins in pt from 6 to 8 GeV
- const Int_t nbin0_8_16 = 2 ; //bins in pt from 8 to 16 GeV
- const Int_t nbin0_16_24 = 1 ; //bins in pt from 16 to 24 GeV
- const Int_t nbin3_0_6 = 6 ; //bins in ptPi from 0 to 6 GeV
- const Int_t nbin3_6_8 = 1 ; //bins in ptPi from 6 to 8 GeV
- const Int_t nbin3_8_16 = 2 ; //bins in ptPi from 8 to 16 GeV
- const Int_t nbin3_16_24 = 1 ; //bins in ptPi from 16 to 24 GeV
- const Int_t nbin4_0_6 = 6 ; //bins in ptK from 0 to 6 GeV
- const Int_t nbin4_6_8 = 1 ; //bins in ptK from 6 to 8 GeV
- const Int_t nbin4_8_16 = 2 ; //bins in ptK from 8 to 16 GeV
- const Int_t nbin4_16_24 = 1 ; //bins in ptK from 16 to 24 GeV
- iBin[0]=nbin0_0_6+nbin0_6_8+nbin0_8_16+nbin0_16_24;
- iBin[3]=nbin3_0_6+nbin3_6_8+nbin3_8_16+nbin3_16_24;
- iBin[4]=nbin4_0_6+nbin4_6_8+nbin4_8_16+nbin4_16_24;
- Double_t *binLim0=new Double_t[iBin[0]+1];
- Double_t *binLim3=new Double_t[iBin[3]+1];
- Double_t *binLim4=new Double_t[iBin[4]+1];
-
- // values for bin lower bounds
- // pt
- for(Int_t i=0; i<=nbin0_0_6; i++) binLim0[i]=(Double_t)ptmin_0_6 + (ptmax_0_6-ptmin_0_6)/nbin0_0_6*(Double_t)i ;
- if (binLim0[nbin0_0_6] != ptmin_6_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin0_6_8; i++) binLim0[i+nbin0_0_6]=(Double_t)ptmin_6_8 + (ptmax_6_8-ptmin_6_8)/nbin0_6_8*(Double_t)i ;
- if (binLim0[nbin0_0_6+nbin0_6_8] != ptmin_8_16) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin0_8_16; i++) binLim0[i+nbin0_0_6+nbin0_6_8]=(Double_t)ptmin_8_16 + (ptmax_8_16-ptmin_8_16)/nbin0_8_16*(Double_t)i ;
- if (binLim0[nbin0_0_6+nbin0_6_8+nbin0_8_16] != ptmin_16_24) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin0_16_24; i++) binLim0[i+nbin0_0_6+nbin0_6_8+nbin0_8_16]=(Double_t)ptmin_16_24 + (ptmax_16_24-ptmin_16_24)/nbin0_16_24*(Double_t)i ;
-
- // ptPi
- for(Int_t i=0; i<=nbin3_0_6; i++) binLim3[i]=(Double_t)ptmin_0_6 + (ptmax_0_6-ptmin_0_6)/nbin3_0_6*(Double_t)i ;
- if (binLim3[nbin3_0_6] != ptmin_6_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin3_6_8; i++) binLim3[i+nbin3_0_6]=(Double_t)ptmin_6_8 + (ptmax_6_8-ptmin_6_8)/nbin3_6_8*(Double_t)i ;
- if (binLim3[nbin3_0_6+nbin3_6_8] != ptmin_8_16) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin3_8_16; i++) binLim3[i+nbin3_0_6+nbin0_6_8]=(Double_t)ptmin_8_16 + (ptmax_8_16-ptmin_8_16)/nbin3_8_16*(Double_t)i ;
- if (binLim3[nbin3_0_6+nbin3_6_8+nbin3_8_16] != ptmin_16_24) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin3_16_24; i++) binLim3[i+nbin3_0_6+nbin3_6_8+nbin3_8_16]=(Double_t)ptmin_16_24 + (ptmax_16_24-ptmin_16_24)/nbin3_16_24*(Double_t)i ;
-
- // ptKa
- for(Int_t i=0; i<=nbin4_0_6; i++) binLim4[i]=(Double_t)ptmin_0_6 + (ptmax_0_6-ptmin_0_6)/nbin4_0_6*(Double_t)i ;
- if (binLim4[nbin4_0_6] != ptmin_6_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin4_6_8; i++) binLim4[i+nbin4_0_6]=(Double_t)ptmin_6_8 + (ptmax_6_8-ptmin_6_8)/nbin4_6_8*(Double_t)i ;
- if (binLim4[nbin4_0_6+nbin4_6_8] != ptmin_8_16) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin4_8_16; i++) binLim4[i+nbin4_0_6+nbin0_6_8]=(Double_t)ptmin_8_16 + (ptmax_8_16-ptmin_8_16)/nbin4_8_16*(Double_t)i ;
- if (binLim4[nbin4_0_6+nbin4_6_8+nbin4_8_16] != ptmin_16_24) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin4_16_24; i++) binLim4[i+nbin4_0_6+nbin4_6_8+nbin4_8_16]=(Double_t)ptmin_16_24 + (ptmax_16_24-ptmin_16_24)/nbin4_16_24*(Double_t)i ;
+ const Int_t nbinpt_0_6 = 6 ; //bins in pt from 0 to 6 GeV
+ const Int_t nbinpt_6_8 = 1 ; //bins in pt from 6 to 8 GeV
+ const Int_t nbinpt_8_16 = 2 ; //bins in pt from 8 to 16 GeV
+ const Int_t nbinpt_16_24 = 1 ; //bins in pt from 16 to 24 GeV
+ const Int_t nbinpTpi_0_6 = 6 ; //bins in ptPi from 0 to 6 GeV
+ const Int_t nbinpTpi_6_8 = 1 ; //bins in ptPi from 6 to 8 GeV
+ const Int_t nbinpTpi_8_16 = 2 ; //bins in ptPi from 8 to 16 GeV
+ const Int_t nbinpTpi_16_24 = 1 ; //bins in ptPi from 16 to 24 GeV
+ const Int_t nbinpTk_0_6 = 6 ; //bins in ptK from 0 to 6 GeV
+ const Int_t nbinpTk_6_8 = 1 ; //bins in ptK from 6 to 8 GeV
+ const Int_t nbinpTk_8_16 = 2 ; //bins in ptK from 8 to 16 GeV
+ const Int_t nbinpTk_16_24 = 1 ; //bins in ptK from 16 to 24 GeV
+ iBin[ipT]=nbinpt_0_6+nbinpt_6_8+nbinpt_8_16+nbinpt_16_24;
+ iBin[ipTpi]=nbinpTpi_0_6+nbinpTpi_6_8+nbinpTpi_8_16+nbinpTpi_16_24;
+ iBin[ipTk]=nbinpTk_0_6+nbinpTk_6_8+nbinpTk_8_16+nbinpTk_16_24;
+ Double_t *binLimpT=new Double_t[iBin[0]+1];
+ Double_t *binLimpTpi=new Double_t[iBin[3]+1];
+ Double_t *binLimpTk=new Double_t[iBin[4]+1];
+
+ // values for bin lower bounds
+ // pt
+ for(Int_t i=0; i<=nbinpt_0_6; i++) binLimpT[i]=(Double_t)ptmin_0_6 + (ptmax_0_6-ptmin_0_6)/nbinpt_0_6*(Double_t)i ;
+ if (binLimpT[nbinpt_0_6] != ptmin_6_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpt_6_8; i++) binLimpT[i+nbinpt_0_6]=(Double_t)ptmin_6_8 + (ptmax_6_8-ptmin_6_8)/nbinpt_6_8*(Double_t)i ;
+ if (binLimpT[nbinpt_0_6+nbinpt_6_8] != ptmin_8_16) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpt_8_16; i++) binLimpT[i+nbinpt_0_6+nbinpt_6_8]=(Double_t)ptmin_8_16 + (ptmax_8_16-ptmin_8_16)/nbinpt_8_16*(Double_t)i ;
+ if (binLimpT[nbinpt_0_6+nbinpt_6_8+nbinpt_8_16] != ptmin_16_24) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpt_16_24; i++) binLimpT[i+nbinpt_0_6+nbinpt_6_8+nbinpt_8_16]=(Double_t)ptmin_16_24 + (ptmax_16_24-ptmin_16_24)/nbinpt_16_24*(Double_t)i ;
+
+ // ptPi
+ for(Int_t i=0; i<=nbinpTpi_0_6; i++) binLimpTpi[i]=(Double_t)ptmin_0_6 + (ptmax_0_6-ptmin_0_6)/nbinpTpi_0_6*(Double_t)i ;
+ if (binLimpTpi[nbinpTpi_0_6] != ptmin_6_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpTpi_6_8; i++) binLimpTpi[i+nbinpTpi_0_6]=(Double_t)ptmin_6_8 + (ptmax_6_8-ptmin_6_8)/nbinpTpi_6_8*(Double_t)i ;
+ if (binLimpTpi[nbinpTpi_0_6+nbinpTpi_6_8] != ptmin_8_16) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpTpi_8_16; i++) binLimpTpi[i+nbinpTpi_0_6+nbinpt_6_8]=(Double_t)ptmin_8_16 + (ptmax_8_16-ptmin_8_16)/nbinpTpi_8_16*(Double_t)i ;
+ if (binLimpTpi[nbinpTpi_0_6+nbinpTpi_6_8+nbinpTpi_8_16] != ptmin_16_24) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpTpi_16_24; i++) binLimpTpi[i+nbinpTpi_0_6+nbinpTpi_6_8+nbinpTpi_8_16]=(Double_t)ptmin_16_24 + (ptmax_16_24-ptmin_16_24)/nbinpTpi_16_24*(Double_t)i ;
+
+ // ptKa
+ for(Int_t i=0; i<=nbinpTk_0_6; i++) binLimpTk[i]=(Double_t)ptmin_0_6 + (ptmax_0_6-ptmin_0_6)/nbinpTk_0_6*(Double_t)i ;
+ if (binLimpTk[nbinpTk_0_6] != ptmin_6_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpTk_6_8; i++) binLimpTk[i+nbinpTk_0_6]=(Double_t)ptmin_6_8 + (ptmax_6_8-ptmin_6_8)/nbinpTk_6_8*(Double_t)i ;
+ if (binLimpTk[nbinpTk_0_6+nbinpTk_6_8] != ptmin_8_16) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpTk_8_16; i++) binLimpTk[i+nbinpTk_0_6+nbinpt_6_8]=(Double_t)ptmin_8_16 + (ptmax_8_16-ptmin_8_16)/nbinpTk_8_16*(Double_t)i ;
+ if (binLimpTk[nbinpTk_0_6+nbinpTk_6_8+nbinpTk_8_16] != ptmin_16_24) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpTk_16_24; i++) binLimpTk[i+nbinpTk_0_6+nbinpTk_6_8+nbinpTk_8_16]=(Double_t)ptmin_16_24 + (ptmax_16_24-ptmin_16_24)/nbinpTk_16_24*(Double_t)i ;
*/
//OPTION 2: ...or from the cuts file
-
- const Int_t nbin0 = cutsD0toKpi->GetNPtBins(); // bins in pT
- iBin[0]=nbin0;
- iBin[3]=nbin0;
- iBin[4]=nbin0;
- Double_t *binLim0=new Double_t[iBin[0]+1];
- Double_t *binLim3=new Double_t[iBin[3]+1];
- Double_t *binLim4=new Double_t[iBin[4]+1];
+
+ const Int_t nbinpt = cutsD0toKpi->GetNPtBins(); // bins in pT
+ iBin[ipT]=nbinpt;
+ iBin[ipTpi]=nbinpt;
+ iBin[ipTk]=nbinpt;
+ Double_t *binLimpT=new Double_t[iBin[ipT]+1];
+ Double_t *binLimpTpi=new Double_t[iBin[ipTpi]+1];
+ Double_t *binLimpTk=new Double_t[iBin[ipTk]+1];
// values for bin lower bounds
- Float_t* floatbinLim0 = cutsD0toKpi->GetPtBinLimits();
- for (Int_t ibin0 = 0 ; ibin0<iBin[0]+1; ibin0++){
- binLim0[ibin0] = (Double_t)floatbinLim0[ibin0];
- binLim3[ibin0] = (Double_t)floatbinLim0[ibin0];
- binLim4[ibin0] = (Double_t)floatbinLim0[ibin0];
+ Float_t* floatbinLimpT = cutsD0toKpi->GetPtBinLimits();
+ for (Int_t ibin0 = 0 ; ibin0<iBin[ipT]+1; ibin0++){
+ binLimpT[ibin0] = (Double_t)floatbinLimpT[ibin0];
+ binLimpTpi[ibin0] = (Double_t)floatbinLimpT[ibin0];
+ binLimpTk[ibin0] = (Double_t)floatbinLimpT[ibin0];
}
- for(Int_t i=0; i<=nbin0; i++) printf("binLim0[%d]=%f\n",i,binLim0[i]);
-
- printf("pT: nbin (from cuts file) = %d\n",nbin0);
-
+ for(Int_t i=0; i<=nbinpt; i++) printf("binLimpT[%d]=%f\n",i,binLimpT[i]);
+
+ printf("pT: nbin (from cuts file) = %d\n",nbinpt);
+
// defining now the binning for the other variables:
-
- const Int_t nbin1 = 42 ; //bins in y
- const Int_t nbin2 = 42 ; //bins in cosThetaStar
- const Int_t nbin5 = 24 ; //bins in cT
- const Int_t nbin6 = 24 ; //bins in dca
- const Int_t nbin7 = 100 ; //bins in d0pi
- const Int_t nbin8 = 100 ; //bins in d0K
- const Int_t nbin9 = 80 ; //bins in d0xd0
- const Int_t nbin10 = 1050 ; //bins in cosPointingAngle
- const Int_t nbin11 = 20 ; //bins in Phi
- const Int_t nbin12 = 60 ; //bins in z vertex
- const Int_t nbin13 = 10; //bins in centrality
- const Int_t nbin14 = 3; //bins in fake
-
- iBin[1]=nbin1;
- iBin[2]=nbin2;
- iBin[5]=nbin5;
- iBin[6]=nbin6;
- iBin[7]=nbin7;
- iBin[8]=nbin8;
- iBin[9]=nbin9;
- iBin[10]=nbin10;
- iBin[11]=nbin11;
- iBin[12]=nbin12;
- iBin[13]=nbin13;
- iBin[14]=nbin14;
+
+ iBin[iy]=nbiny;
+ iBin[icosThetaStar]=nbincosThetaStar;
+ iBin[icT]=nbincT;
+ iBin[idca]=nbindca;
+ iBin[id0xd0]=nbind0xd0;
+ iBin[ipointing]=nbinpointing;
+ iBin[iphi]=nbinphi;
+ iBin[izvtx]=nbinzvtx;
+ iBin[icent]=nbincent;
+ iBin[ifake]=nbinfake;
+ iBin[ipointingXY]=nbinpointingXY;
+ iBin[inormDecayLXY]=nbinnormDecayLXY;
+ iBin[imult]=nbinmult;
//arrays for lower bounds :
- Double_t *binLim1=new Double_t[iBin[1]+1];
- Double_t *binLim2=new Double_t[iBin[2]+1];
- Double_t *binLim5=new Double_t[iBin[5]+1];
- Double_t *binLim6=new Double_t[iBin[6]+1];
- Double_t *binLim7=new Double_t[iBin[7]+1];
- Double_t *binLim8=new Double_t[iBin[8]+1];
- Double_t *binLim9=new Double_t[iBin[9]+1];
- Double_t *binLim10=new Double_t[iBin[10]+1];
- Double_t *binLim11=new Double_t[iBin[11]+1];
- Double_t *binLim12=new Double_t[iBin[12]+1];
- Double_t *binLim13=new Double_t[iBin[13]+1];
- Double_t *binLim14=new Double_t[iBin[14]+1];
+ Double_t *binLimy=new Double_t[iBin[iy]+1];
+ Double_t *binLimcosThetaStar=new Double_t[iBin[icosThetaStar]+1];
+ Double_t *binLimcT=new Double_t[iBin[icT]+1];
+ Double_t *binLimdca=new Double_t[iBin[idca]+1];
+ Double_t *binLimd0xd0=new Double_t[iBin[id0xd0]+1];
+ Double_t *binLimpointing=new Double_t[iBin[ipointing]+1];
+ Double_t *binLimphi=new Double_t[iBin[iphi]+1];
+ Double_t *binLimzvtx=new Double_t[iBin[izvtx]+1];
+ Double_t *binLimcent=new Double_t[iBin[icent]+1];
+ Double_t *binLimfake=new Double_t[iBin[ifake]+1];
+ Double_t *binLimpointingXY=new Double_t[iBin[ipointingXY]+1];
+ Double_t *binLimnormDecayLXY=new Double_t[iBin[inormDecayLXY]+1];
+ Double_t *binLimmult=new Double_t[iBin[imult]+1];
// y
- for(Int_t i=0; i<=nbin1; i++) binLim1[i]=(Double_t)ymin + (ymax-ymin) /nbin1*(Double_t)i ;
+ for(Int_t i=0; i<=nbiny; i++) binLimy[i]=(Double_t)ymin + (ymax-ymin) /nbiny*(Double_t)i ;
// cosThetaStar
- for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)cosmin + (cosmax-cosmin) /nbin2*(Double_t)i ;
+ for(Int_t i=0; i<=nbincosThetaStar; i++) binLimcosThetaStar[i]=(Double_t)cosminTS + (cosmaxTS-cosminTS) /nbincosThetaStar*(Double_t)i ;
// cT
- for(Int_t i=0; i<=nbin5; i++) binLim5[i]=(Double_t)cTmin + (cTmax-cTmin) /nbin5*(Double_t)i ;
+ for(Int_t i=0; i<=nbincT; i++) binLimcT[i]=(Double_t)cTmin + (cTmax-cTmin) /nbincT*(Double_t)i ;
// dca
- for(Int_t i=0; i<=nbin6; i++) binLim6[i]=(Double_t)dcamin + (dcamax-dcamin) /nbin6*(Double_t)i ;
-
- // d0pi
- for(Int_t i=0; i<=nbin7; i++) binLim7[i]=(Double_t)d0min + (d0max-d0min) /nbin7*(Double_t)i ;
-
- // d0K
- for(Int_t i=0; i<=nbin8; i++) binLim8[i]=(Double_t)d0min + (d0max-d0min) /nbin8*(Double_t)i ;
+ for(Int_t i=0; i<=nbindca; i++) binLimdca[i]=(Double_t)dcamin + (dcamax-dcamin) /nbindca*(Double_t)i ;
// d0xd0
- for(Int_t i=0; i<=nbin9; i++) binLim9[i]=(Double_t)d0xd0min + (d0xd0max-d0xd0min) /nbin9*(Double_t)i ;
+ for(Int_t i=0; i<=nbind0xd0; i++) binLimd0xd0[i]=(Double_t)d0xd0min + (d0xd0max-d0xd0min) /nbind0xd0*(Double_t)i ;
// cosPointingAngle
- for(Int_t i=0; i<=nbin10; i++) binLim10[i]=(Double_t)cosmin + (cosmax-cosmin) /nbin10*(Double_t)i ;
+ for(Int_t i=0; i<=nbinpointing; i++) binLimpointing[i]=(Double_t)cosmin + (cosmax-cosmin) /nbinpointing*(Double_t)i ;
// Phi
- for(Int_t i=0; i<=nbin11; i++) binLim11[i]=(Double_t)phimin + (phimax-phimin) /nbin11*(Double_t)i ;
+ for(Int_t i=0; i<=nbinphi; i++) binLimphi[i]=(Double_t)phimin + (phimax-phimin) /nbinphi*(Double_t)i ;
// z Primary Vertex
- for(Int_t i=0; i<=nbin12; i++) {
- binLim12[i]=(Double_t)zmin + (zmax-zmin) /nbin12*(Double_t)i ;
+ for(Int_t i=0; i<=nbinzvtx; i++) {
+ binLimzvtx[i]=(Double_t)zmin + (zmax-zmin) /nbinzvtx*(Double_t)i ;
}
// centrality
- for(Int_t i=0; i<=nbin13; i++) {
- binLim13[i]=(Double_t)centmin + (centmax-centmin)/nbin13 * (Double_t)i;
+ for(Int_t i=0; i<=nbincent_0_10; i++) binLimcent[i]=(Double_t)centmin_0_10 + (centmax_0_10-centmin_0_10)/nbincent_0_10*(Double_t)i ;
+ if (binLimcent[nbincent_0_10] != centmin_10_100) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for cent - 1st range - differs from expected!\n");
}
+ for(Int_t i=0; i<=nbincent_10_100; i++) binLimcent[i+nbincent_0_10]=(Double_t)centmin_10_100 + (centmax_10_100-centmin_10_100)/nbincent_10_100*(Double_t)i ;
// fake
- for(Int_t i=0; i<=nbin14; i++) {
- binLim14[i]=(Double_t)fakemin + (fakemax-fakemin)/nbin14 * (Double_t)i;
+ for(Int_t i=0; i<=nbinfake; i++) {
+ binLimfake[i]=(Double_t)fakemin + (fakemax-fakemin)/nbinfake * (Double_t)i;
}
+ // cosPointingAngleXY
+ for(Int_t i=0; i<=nbinpointingXY; i++) binLimpointingXY[i]=(Double_t)cosminXY + (cosmaxXY-cosminXY) /nbinpointingXY*(Double_t)i ;
+
+ // normDecayLXY
+ for(Int_t i=0; i<=nbinnormDecayLXY; i++) binLimnormDecayLXY[i]=(Double_t)normDecLXYmin + (normDecLXYmax-normDecLXYmin) /nbinnormDecayLXY*(Double_t)i ;
+
+ // multiplicity
+ for(Int_t i=0; i<=nbinmult_0_20; i++) binLimmult[i]=(Double_t)multmin_0_20 + (multmax_0_20-multmin_0_20)/nbinmult_0_20*(Double_t)i ;
+ if (binLimmult[nbinmult_0_20] != multmin_20_50) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 1st range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinmult_20_50; i++) binLimmult[i+nbinmult_0_20]=(Double_t)multmin_20_50 + (multmax_20_50-multmin_20_50)/nbinmult_20_50*(Double_t)i ;
+ if (binLimmult[nbinmult_0_20+nbinmult_20_50] != multmin_50_102) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinmult_50_102; i++) binLimmult[i+nbinmult_0_20+nbinmult_20_50]=(Double_t)multmin_50_102 + (multmax_50_102-multmin_50_102)/nbinmult_50_102*(Double_t)i ;
+
//one "container" for MC
TString nameContainer="";
if(!isKeepDfromB) {
nameContainer="CFHFccontainer0allD_CommonFramework";
}
- AliCFContainer* container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvar,iBin);
- //setting the bin limits
- printf("pt\n");
- container -> SetBinLimits(ipt,binLim0);
- printf("y\n");
- container -> SetBinLimits(iy,binLim1);
- printf("cts\n");
- container -> SetBinLimits(icosThetaStar,binLim2);
- printf("ptPi\n");
- container -> SetBinLimits(ipTpi,binLim3);
- printf("ptK\n");
- container -> SetBinLimits(ipTk,binLim4);
- printf("cT\n");
- container -> SetBinLimits(icT,binLim5);
- printf("dca\n");
- container -> SetBinLimits(idca,binLim6);
- printf("d0Pi\n");
- container -> SetBinLimits(id0pi,binLim7);
- printf("d0K\n");
- container -> SetBinLimits(id0K,binLim8);
- printf("d0xd0\n");
- container -> SetBinLimits(id0xd0,binLim9);
- printf("pointing\n");
- container -> SetBinLimits(ipointing,binLim10);
- printf("phi\n");
- container -> SetBinLimits(iphi,binLim11);
- printf("z\n");
- container -> SetBinLimits(iz,binLim12);
- printf("cent\n");
- container -> SetBinLimits(icent,binLim13);
- printf("fake\n");
- container -> SetBinLimits(ifake,binLim14);
-
+ //Setting up the container grid...
+
+ AliCFContainer* container;
+
+ if (configuration == AliCFTaskVertexingHF::kSnail){
+ container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvarTot,iBin);
+ //setting the bin limits
+ printf("pt\n");
+ container -> SetBinLimits(ipT,binLimpT);
+ printf("y\n");
+ container -> SetBinLimits(iy,binLimy);
+ printf("cts\n");
+ container -> SetBinLimits(icosThetaStar,binLimcosThetaStar);
+ printf("ptPi\n");
+ container -> SetBinLimits(ipTpi,binLimpTpi);
+ printf("ptK\n");
+ container -> SetBinLimits(ipTk,binLimpTk);
+ printf("cT\n");
+ container -> SetBinLimits(icT,binLimcT);
+ printf("dca\n");
+ container -> SetBinLimits(idca,binLimdca);
+ printf("d0xd0\n");
+ container -> SetBinLimits(id0xd0,binLimd0xd0);
+ printf("pointing\n");
+ container -> SetBinLimits(ipointing,binLimpointing);
+ printf("phi\n");
+ container -> SetBinLimits(iphi,binLimphi);
+ printf("z\n");
+ container -> SetBinLimits(izvtx,binLimzvtx);
+ printf("cent\n");
+ container -> SetBinLimits(icent,binLimcent);
+ printf("fake\n");
+ container -> SetBinLimits(ifake,binLimfake);
+ printf("pointingXY\n");
+ container -> SetBinLimits(ipointingXY,binLimpointingXY);
+ printf("normDecayLXY\n");
+ container -> SetBinLimits(inormDecayLXY,binLimnormDecayLXY);
+ printf("multiplicity\n");
+ container -> SetBinLimits(imult,binLimmult);
+
+ container -> SetVarTitle(ipT,"pt");
+ container -> SetVarTitle(iy,"y");
+ container -> SetVarTitle(icosThetaStar, "cosThetaStar");
+ container -> SetVarTitle(ipTpi, "ptpi");
+ container -> SetVarTitle(ipTk, "ptK");
+ container -> SetVarTitle(icT, "ct");
+ container -> SetVarTitle(idca, "dca");
+ container -> SetVarTitle(id0xd0, "d0xd0");
+ container -> SetVarTitle(ipointing, "pointing");
+ container -> SetVarTitle(iphi, "phi");
+ container -> SetVarTitle(izvtx, "zvtx");
+ container -> SetVarTitle(icent, "centrality");
+ container -> SetVarTitle(ifake, "fake");
+ container -> SetVarTitle(ipointingXY, "piointingXY");
+ container -> SetVarTitle(inormDecayLXY, "normDecayLXY");
+ container -> SetVarTitle(imult, "multiplicity");
+ }
+ else if (configuration == AliCFTaskVertexingHF::kCheetah){
+ //arrays for the number of bins in each dimension
+ const Int_t nvar = 8;
+
+ const UInt_t ipTFast = 0;
+ const UInt_t iyFast = 1;
+ const UInt_t icTFast = 2;
+ const UInt_t iphiFast = 3;
+ const UInt_t izvtxFast = 4;
+ const UInt_t icentFast = 5;
+ const UInt_t ifakeFast = 6;
+ const UInt_t imultFast = 7;
+
+ Int_t iBinFast[nvar];
+ iBinFast[ipTFast] = iBin[ipT];
+ iBinFast[iyFast] = iBin[iy];
+ iBinFast[icTFast] = iBin[icT];
+ iBinFast[iphiFast] = iBin[iphi];
+ iBinFast[izvtxFast] = iBin[izvtx];
+ iBinFast[icentFast] = iBin[icent];
+ iBinFast[ifakeFast] = iBin[ifake];
+ iBinFast[imultFast] = iBin[imult];
+
+ container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvar,iBinFast);
+ printf("pt\n");
+ container -> SetBinLimits(ipTFast,binLimpT);
+ printf("y\n");
+ container -> SetBinLimits(iyFast,binLimy);
+ printf("ct\n");
+ container -> SetBinLimits(icTFast,binLimcT);
+ printf("phi\n");
+ container -> SetBinLimits(iphiFast,binLimphi);
+ printf("zvtx\n");
+ container -> SetBinLimits(izvtxFast,binLimzvtx);
+ printf("centrality\n");
+ container -> SetBinLimits(icentFast,binLimcent);
+ printf("fake\n");
+ container -> SetBinLimits(ifakeFast,binLimfake);
+ printf("multiplicity\n");
+ container -> SetBinLimits(imultFast,binLimmult);
+
+ container -> SetVarTitle(ipTFast,"pt");
+ container -> SetVarTitle(iyFast,"y");
+ container -> SetVarTitle(icTFast, "ct");
+ container -> SetVarTitle(iphiFast, "phi");
+ container -> SetVarTitle(izvtxFast, "zvtx");
+ container -> SetVarTitle(icentFast, "centrality");
+ container -> SetVarTitle(ifakeFast, "fake");
+ container -> SetVarTitle(imultFast, "multiplicity");
+ }
+
container -> SetStepTitle(0, "MCLimAcc");
container -> SetStepTitle(1, "MC");
container -> SetStepTitle(2, "MCAcc");
container -> SetStepTitle(8, "RecoCuts");
container -> SetStepTitle(9, "RecoPID");
- container -> SetVarTitle(ipt,"pt");
- container -> SetVarTitle(iy,"y");
- container -> SetVarTitle(icosThetaStar, "cosThetaStar");
- container -> SetVarTitle(ipTpi, "ptpi");
- container -> SetVarTitle(ipTk, "ptK");
- container -> SetVarTitle(icT, "ct");
- container -> SetVarTitle(idca, "dca");
- container -> SetVarTitle(id0pi, "d0pi");
- container -> SetVarTitle(id0K, "d0K");
- container -> SetVarTitle(id0xd0, "d0xd0");
- container -> SetVarTitle(ipointing, "piointing");
- container -> SetVarTitle(iphi, "phi");
- container -> SetVarTitle(iz, "z");
- container -> SetVarTitle(icent, "centrality");
- container -> SetVarTitle(ifake, "fake");
-
+ //return container;
//CREATE THE CUTS -----------------------------------------------
// create the task
AliCFTaskVertexingHF *task = new AliCFTaskVertexingHF("AliCFTaskVertexingHF",cutsD0toKpi);
+ task->SetConfiguration(configuration);
task->SetFillFromGenerated(kFALSE);
task->SetCFManager(man); //here is set the CF manager
task->SetDecayChannel(2);
if (isKeepDfromB && !isKeepDfromBOnly) task->SetDselection(2);
if (isKeepDfromB && isKeepDfromBOnly) task->SetDselection(1);
- Printf("***************** CONTAINER SETTINGS *****************");
+ Printf("***************** CONTAINER SETTINGS *****************");
Printf("decay channel = %d",(Int_t)task->GetDecayChannel());
Printf("FillFromGenerated = %d",(Int_t)task->GetFillFromGenerated());
Printf("Dselection = %d",(Int_t)task->GetDselection());
// set bin limits
- binEdges[0]= binLim0;
- binEdges[1]= binLim1;
+ binEdges[0]= binLimpT;
+ binEdges[1]= binLimy;
correlation->SetBinEdges(0,binEdges[0]);
correlation->SetBinEdges(2,binEdges[0]);
mgr->ConnectOutput(task,3,coutput3);
mgr->ConnectOutput(task,4,coutput4);
return task;
+
}
//DEFINITION OF A FEW CONSTANTS
-const Double_t ymin = -2.1 ;
-const Double_t ymax = 2.1 ;
-// const Double_t ptmin_0_4 = 0.0 ;
-// const Double_t ptmax_0_4 = 4.0 ;
-// const Double_t ptmin_4_8 = 4.0 ;
-// const Double_t ptmax_4_8 = 8.0 ;
-// const Double_t ptmin_8_10 = 8.0 ;
-// const Double_t ptmax_8_10 = 10.0 ;
-const Double_t cosmin = -1.05;
+const Double_t ymin = -1.2 ;
+const Double_t ymax = 1.2 ;
+const Double_t cosmin = -0.7;
const Double_t cosmax = 1.05;
const Double_t cTmin = 0; // micron
const Double_t cTmax = 500; // micron
-const Double_t dcamin = 0; // micron
-const Double_t dcamax = 500; // micron
-const Double_t d0min = -1000; // micron
-const Double_t d0max = 1000; // micron
-const Double_t d0xd0min = -100000; // micron
-const Double_t d0xd0max = 100000; // micron
const Double_t phimin = 0.0;
-//const Double_t phimax = 2Pi; // defined in the macro!!!!!!!!!!!!!!
const Int_t mintrackrefsTPC = 2 ;
const Int_t mintrackrefsITS = 3 ;
const Int_t charge = 1 ;
const Double_t ptmax = 9999.;
const Double_t etamin = -0.9;
const Double_t etamax = 0.9;
-const Double_t zmin = -15;
-const Double_t zmax = 15;
+const Double_t zvtxmin = -15;
+const Double_t zvtxmax = 15;
const Int_t minITSClusters = 5;
-const Float_t centmin = 0.;
+const Float_t centmin_0_10 = 0.;
+const Float_t centmax_0_10 = 10.;
+const Float_t centmin_10_100 = 10.;
+const Float_t centmax_10_100 = 100.;
const Float_t centmax = 100.;
const Float_t fakemin = -0.5;
const Float_t fakemax = 2.5.;
+const Float_t cosminXY = 0.95;
+const Float_t cosmaxXY = 1.0;
+const Float_t normDecLXYmin = 0;
+const Float_t normDecLXYmax = 20;
+const Float_t multmin_0_20 = 0;
+const Float_t multmax_0_20 = 20;
+const Float_t multmin_20_50 = 20;
+const Float_t multmax_20_50 = 50;
+const Float_t multmin_50_102 = 50;
+const Float_t multmax_50_102 = 102;
//----------------------------------------------------
-AliCFTaskVertexingHF *AddTaskCFVertexingHF3Prong(const char* cutFile = "./DplustoKpipiCuts.root",Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode = 411, Char_t isSign = 2)
+AliCFTaskVertexingHF *AddTaskCFVertexingHF3Prong(const char* cutFile = "./DplustoKpipiCuts.root", Int_t configuration = AliCFTaskVertexingHF::kSnail, Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode = 411, Char_t isSign = 2)
+//AliCFContainer *AddTaskCFVertexingHF3Prong(const char* cutFile = "./DplustoKpipiCuts.root", Int_t configuration = AliCFTaskVertexingHF::kSnail, Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode = 411, Char_t isSign = 2)
{
printf("Addig CF task using cuts from file %s\n",cutFile);
+ if (configuration == AliCFTaskVertexingHF::kSnail){
+ printf("The configuration is set to be SLOW --> all the variables will be used to fill the CF\n");
+ }
+ else if (configuration == AliCFTaskVertexingHF::kCheetah){
+ printf("The configuration is set to be FAST --> using only pt, y, ct, phi, zvtx, centrality, fake, multiplicity to fill the CF\n");
+ }
+ else{
+ printf("The configuration is not defined! returning\n");
+ return;
+ }
+
+ gSystem->Sleep(2000);
// isSign = 0 --> D0 only
// isSign = 1 --> D0bar only
// for now the binning is the same than for all D's
if(isKeepDfromBOnly) isKeepDfromB = true;
-
/*
Double_t ptmin_0_4;
Double_t ptmax_0_4;
//CONTAINER DEFINITION
Info("AliCFTaskVertexingHF","SETUP CONTAINER");
- //the sensitive variables, their indices
- UInt_t ipt = 0;
- UInt_t iy = 1;
- UInt_t iphi = 2;
- UInt_t icT = 3;
- UInt_t ipointing = 4;
- UInt_t iptpi = 5;
- UInt_t iptK = 6;
- UInt_t iptpi2 = 7;
- UInt_t id0pi = 8;
- UInt_t id0K = 9;
- UInt_t id0pi2 = 10;
- UInt_t iz = 11;
- UInt_t icent = 12;
- UInt_t ifake = 13;
const Double_t phimax = 2*TMath::Pi();
//Setting up the container grid...
UInt_t nstep = 10; //number of selection steps: MC with limited acceptance, MC, Acceptance, Vertex, Refit, Reco (no cuts), RecoAcceptance, RecoITSClusters (RecoAcceptance included), RecoPPR (RecoAcceptance+RecoITSCluster included), RecoPID
- const Int_t nvar = 14 ; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi
-// const Int_t nbin0_0_4 = 8 ; //bins in pt from 0 to 4 GeV
-// const Int_t nbin0_4_8 = 4 ; //bins in pt from 4 to 8 GeV
-// const Int_t nbin0_8_10 = 1 ; //bins in pt from 8 to 10 GeV
+// const Int_t nbinpt_0_4 = 8 ; //bins in pt from 0 to 4 GeV
+// const Int_t nbinpt_4_8 = 4 ; //bins in pt from 4 to 8 GeV
+// const Int_t nbinpt_8_10 = 1 ; //bins in pt from 8 to 10 GeV
/*
- Int_t nbin0_0_4;
- Int_t nbin0_4_8;
- Int_t nbin0_8_10;
+ Int_t nbinpt_0_4;
+ Int_t nbinpt_4_8;
+ Int_t nbinpt_8_10;
if (!isKeepDfromB){
- nbin0_0_4 = 8 ; //bins in pt from 0 to 4 GeV
- nbin0_4_8 = 4 ; //bins in pt from 4 to 8 GeV
- nbin0_8_10 = 1 ; //bins in pt from 8 to 10 GeV
+ nbinpt_0_4 = 8 ; //bins in pt from 0 to 4 GeV
+ nbinpt_4_8 = 4 ; //bins in pt from 4 to 8 GeV
+ nbinpt_8_10 = 1 ; //bins in pt from 8 to 10 GeV
}else{
- nbin0_0_4 = 3 ; //bins in pt from 0 to 3 GeV
- nbin0_4_8 = 1 ; //bins in pt from 3 to 5 GeV
- nbin0_8_10 = 1 ; //bins in pt from 5 to 10 GeV
+ nbinpt_0_4 = 3 ; //bins in pt from 0 to 3 GeV
+ nbinpt_4_8 = 1 ; //bins in pt from 3 to 5 GeV
+ nbinpt_8_10 = 1 ; //bins in pt from 5 to 10 GeV
}
*/
- const Int_t nbin0 = cutsDplustoKpipi->GetNPtBins(); // bins in pT
- printf("pT: nbin (from cuts file) = %d\n",nbin0);
- const Int_t nbin1 = 42 ; //bins in y
- const Int_t nbin2 = 20 ; //bins in phi
- const Int_t nbin3 = 24 ; //bins in cT
- const Int_t nbin4 = 1050 ; //bins in cosPointingAngle
- const Int_t nbin5_0_4 = 8 ; //bins in ptPi from 0 to 4 GeV
- const Int_t nbin5_4_8 = 4 ; //bins in ptPi from 4 to 8 GeV
- const Int_t nbin5_8_10 = 1 ; //bins in ptPi from 8 to 10 GeV
- const Int_t nbin6_0_4 = 8 ; //bins in ptKa from 0 to 4 GeV
- const Int_t nbin6_4_8 = 4 ; //bins in ptKa from 4 to 8 GeV
- const Int_t nbin6_8_10 = 1 ; //bins in ptKa from 8 to 10 GeV
- const Int_t nbin7_0_4 = 8 ; //bins in ptpi2 from 0 to 4 GeV
- const Int_t nbin7_4_8 = 4 ; //bins in ptpi2 from 4 to 8 GeV
- const Int_t nbin7_8_10 = 1 ; //bins in ptpi2 from 8 to 10 GeV
- const Int_t nbin8 = 100 ; //bins in d0pi
- const Int_t nbin9 = 100 ; //bins in d0K
- const Int_t nbin10 = 100 ; //bins in d0pi2
- const Int_t nbin11 = 60 ; //bins in z vertex
- const Int_t nbin12 = 10; //bins in centrality
- const Int_t nbin13 = 3; //bins in fake
+ const Int_t nbinpt = cutsDplustoKpipi->GetNPtBins(); // bins in pT
+ printf("pT: nbin (from cuts file) = %d\n",nbinpt);
+ const Int_t nbiny = 24 ; //bins in y
+ const Int_t nbinphi = 18 ; //bins in phi
+ const Int_t nbincT = 25 ; //bins in cT
+ const Int_t nbinpointing = 350 ; //bins in cosPointingAngle
+ const Int_t nbinpTpi_0_4 = 8 ; //bins in ptPi from 0 to 4 GeV
+ const Int_t nbinpTpi_4_8 = 4 ; //bins in ptPi from 4 to 8 GeV
+ const Int_t nbinpTpi_8_10 = 1 ; //bins in ptPi from 8 to 10 GeV
+ const Int_t nbinpTk_0_4 = 8 ; //bins in ptKa from 0 to 4 GeV
+ const Int_t nbinpTk_4_8 = 4 ; //bins in ptKa from 4 to 8 GeV
+ const Int_t nbinpTk_8_10 = 1 ; //bins in ptKa from 8 to 10 GeV
+ const Int_t nbinpTpi2_0_4 = 8 ; //bins in ptpi2 from 0 to 4 GeV
+ const Int_t nbinpTpi2_4_8 = 4 ; //bins in ptpi2 from 4 to 8 GeV
+ const Int_t nbinpTpi2_8_10 = 1 ; //bins in ptpi2 from 8 to 10 GeV
+ const Int_t nbinzvtx = 30 ; //bins in z vertex
+ const Int_t nbincent = 11; //bins in centrality
+ const Int_t nbincent_0_10 = 2; //bins in centrality between 0 and 10
+ const Int_t nbincent_10_100 = 9; //bins in centrality between 10 and 100
+ const Int_t nbinfake = 3; //bins in fake
+ const Int_t nbinpointingXY = 50; //bins in cosPointingAngleXY
+ const Int_t nbinnormDecayLXY = 20; //bins in NormDecayLengthXY
+ const Int_t nbinmult = 48; //bins in multiplicity (total number)
+ const Int_t nbinmult_0_20 = 20; //bins in multiplicity between 0 and 20
+ const Int_t nbinmult_20_50 = 15; //bins in multiplicity between 20 and 50
+ const Int_t nbinmult_50_102 = 13; //bins in multiplicity between 50 and 102
+ //the sensitive variables, their indices
+ const UInt_t ipT = 0;
+ const UInt_t iy = 1;
+ const UInt_t iphi = 2;
+ const UInt_t icT = 3;
+ const UInt_t ipointing = 4;
+ const UInt_t ipTpi = 5;
+ const UInt_t ipTk = 6;
+ const UInt_t ipTpi2 = 7;
+ const UInt_t izvtx = 8;
+ const UInt_t icent = 9;
+ const UInt_t ifake = 10;
+ const UInt_t ipointingXY = 11;
+ const UInt_t inormDecayLXY = 12;
+ const UInt_t imult = 13;
+
+ const Int_t nvarTot = 14 ; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi, zvtx, centrality, fake, cosPointingAngleXY, normDecayLengthXY, multiplicity
+
//arrays for the number of bins in each dimension
- Int_t iBin[nvar];
- //iBin[0]=nbin0_0_4+nbin0_4_8+nbin0_8_10;
- iBin[0]=nbin0;
- iBin[1]=nbin1;
- iBin[2]=nbin2;
- // iBin[3]=nbin3_0_4+nbin3_4_8+nbin3_8_10;
- //iBin[4]=nbin4_0_4+nbin4_4_8+nbin4_8_10;
- iBin[3]=nbin3;
- iBin[4]=nbin4;
- iBin[5]=nbin0;
- iBin[6]=nbin0;
- iBin[7]=nbin0;
- iBin[8]=nbin8;
- iBin[9]=nbin9;
- iBin[10]=nbin10;
- iBin[11]=nbin11;
- iBin[12]=nbin12;
- iBin[13]=nbin13;
-
+ Int_t iBin[nvarTot];
+ //iBin[ipT]=nbinpt_0_4+nbinpt_4_8+nbinpt_8_10;
+ iBin[ipT]=nbinpt;
+ iBin[iy]=nbiny;
+ iBin[iphi]=nbinphi;
+ // iBin[icT]=nbincT_0_4+nbincT_4_8+nbincT_8_10;
+ //iBin[4]=nbinpointing_0_4+nbinpointing_4_8+nbinpointing_8_10;
+ iBin[icT]=nbincT;
+ iBin[ipointing]=nbinpointing;
+ iBin[ipTpi]=nbinpt;
+ iBin[ipTk]=nbinpt;
+ iBin[ipTpi2]=nbinpt;
+ iBin[izvtx]=nbinzvtx;
+ iBin[icent]=nbincent;
+ iBin[ifake]=nbinfake;
+ iBin[ipointingXY]=nbinpointingXY;
+ iBin[inormDecayLXY]=nbinnormDecayLXY;
+ iBin[imult]=nbinmult;
//arrays for lower bounds :
- Double_t *binLim0=new Double_t[iBin[0]+1];
- Double_t *binLim1=new Double_t[iBin[1]+1];
- Double_t *binLim2=new Double_t[iBin[2]+1];
- Double_t *binLim3=new Double_t[iBin[3]+1];
- Double_t *binLim4=new Double_t[iBin[4]+1];
- Double_t *binLim5=new Double_t[iBin[5]+1];
- Double_t *binLim6=new Double_t[iBin[6]+1];
- Double_t *binLim7=new Double_t[iBin[7]+1];
- Double_t *binLim8=new Double_t[iBin[8]+1];
- Double_t *binLim9=new Double_t[iBin[9]+1];
- Double_t *binLim10=new Double_t[iBin[10]+1];
- Double_t *binLim11=new Double_t[iBin[11]+1];
- Double_t *binLim12=new Double_t[iBin[12]+1];
- Double_t *binLim13=new Double_t[iBin[13]+1];
-
+ Double_t *binLimpT=new Double_t[iBin[ipT]+1];
+ Double_t *binLimy=new Double_t[iBin[iy]+1];
+ Double_t *binLimphi=new Double_t[iBin[iphi]+1];
+ Double_t *binLimcT=new Double_t[iBin[icT]+1];
+ Double_t *binLimpointing=new Double_t[iBin[ipointing]+1];
+ Double_t *binLimpTpi=new Double_t[iBin[ipTpi]+1];
+ Double_t *binLimpTk=new Double_t[iBin[ipTk]+1];
+ Double_t *binLimpTpi2=new Double_t[iBin[ipTpi2]+1];
+ Double_t *binLimzvtx=new Double_t[iBin[izvtx]+1];
+ Double_t *binLimcent=new Double_t[iBin[icent]+1];
+ Double_t *binLimfake=new Double_t[iBin[ifake]+1];
+ Double_t *binLimpointingXY=new Double_t[iBin[ipointingXY]+1];
+ Double_t *binLimnormDecayLXY=new Double_t[iBin[inormDecayLXY]+1];
+ Double_t *binLimmult=new Double_t[iBin[imult]+1];
+
// checking limits
/*
- if (ptmax_0_4 != ptmin_4_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 1st range != min lim 2nd range, please check!");
- }
- if (ptmax_4_8 != ptmin_8_10) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 2nd range != min lim 3rd range, please check!");
- }
+ if (ptmax_0_4 != ptmin_4_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 1st range != min lim 2nd range, please check!");
+ }
+ if (ptmax_4_8 != ptmin_8_10) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 2nd range != min lim 3rd range, please check!");
+ }
*/
// values for bin lower bounds
// pt
- Float_t* floatbinLim0 = cutsDplustoKpipi->GetPtBinLimits();
- for (Int_t ibin0 = 0 ; ibin0<iBin[0]+1; ibin0++){
- binLim0[ibin0] = (Double_t)floatbinLim0[ibin0];
- binLim5[ibin0] = (Double_t)floatbinLim0[ibin0];
- binLim6[ibin0] = (Double_t)floatbinLim0[ibin0];
- binLim7[ibin0] = (Double_t)floatbinLim0[ibin0];
+ Float_t* floatbinLimpT = cutsDplustoKpipi->GetPtBinLimits();
+ for (Int_t ibinpT = 0 ; ibinpT<iBin[ipT]+1; ibinpT++){
+ binLimpT[ibinpT] = (Double_t)floatbinLimpT[ibinpT];
+ binLimpTpi[ibinpT] = (Double_t)floatbinLimpT[ibinpT];
+ binLimpTk[ibinpT] = (Double_t)floatbinLimpT[ibinpT];
+ binLimpTpi2[ibinpT] = (Double_t)floatbinLimpT[ibinpT];
}
- for(Int_t i=0; i<=nbin0; i++) printf("binLim0[%d]=%f\n",i,binLim0[i]);
-
+ for(Int_t i=0; i<=nbinpt; i++) printf("binLimpT[%d]=%f\n",i,binLimpT[i]);
+
/*
- for(Int_t i=0; i<=nbin0_0_4; i++) binLim0[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin0_0_4*(Double_t)i ;
- if (binLim0[nbin0_0_4] != ptmin_4_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin0_4_8; i++) binLim0[i+nbin0_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin0_4_8*(Double_t)i ;
- if (binLim0[nbin0_0_4+nbin0_4_8] != ptmin_8_10) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin0_8_10; i++) binLim0[i+nbin0_0_4+nbin0_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin0_8_10*(Double_t)i ;
+ for(Int_t i=0; i<=nbinpt_0_4; i++) binLimpT[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbinpt_0_4*(Double_t)i ;
+ if (binLimpT[nbinpt_0_4] != ptmin_4_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpt_4_8; i++) binLimpT[i+nbinpt_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbinpt_4_8*(Double_t)i ;
+ if (binLimpT[nbinpt_0_4+nbinpt_4_8] != ptmin_8_10) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpt_8_10; i++) binLimpT[i+nbinpt_0_4+nbinpt_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbinpt_8_10*(Double_t)i ;
*/
-
+
// y
- for(Int_t i=0; i<=nbin1; i++) binLim1[i]=(Double_t)ymin + (ymax-ymin) /nbin1*(Double_t)i ;
-
- // cosThetaStar
- // for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)cosmin + (cosmax-cosmin) /nbin2*(Double_t)i ;
+ for(Int_t i=0; i<=nbiny; i++) binLimy[i]=(Double_t)ymin + (ymax-ymin) /nbiny*(Double_t)i ;
+
// Phi
- for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)phimin + (phimax-phimin) /nbin2*(Double_t)i ;
-
+ for(Int_t i=0; i<=nbinphi; i++) binLimphi[i]=(Double_t)phimin + (phimax-phimin) /nbinphi*(Double_t)i ;
+
// cT
- for(Int_t i=0; i<=nbin3; i++) binLim3[i]=(Double_t)cTmin + (cTmax-cTmin) /nbin3*(Double_t)i ;
-
+ for(Int_t i=0; i<=nbincT; i++) binLimcT[i]=(Double_t)cTmin + (cTmax-cTmin) /nbincT*(Double_t)i ;
+
// cosPointingAngle
- for(Int_t i=0; i<=nbin4; i++) binLim4[i]=(Double_t)cosmin + (cosmax-cosmin) /nbin4*(Double_t)i ;
+ for(Int_t i=0; i<=nbinpointing; i++) binLimpointing[i]=(Double_t)cosmin + (cosmax-cosmin) /nbinpointing*(Double_t)i ;
/*
// ptPi
- for(Int_t i=0; i<=nbin3_0_4; i++) binLim3[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin3_0_4*(Double_t)i ;
- if (binLim3[nbin3_0_4] != ptmin_4_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 1st range - differs from expected!");
+ for(Int_t i=0; i<=nbincT_0_4; i++) binLimcT[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbincT_0_4*(Double_t)i ;
+ if (binLimcT[nbincT_0_4] != ptmin_4_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 1st range - differs from expected!");
}
- for(Int_t i=0; i<=nbin3_4_8; i++) binLim3[i+nbin3_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin3_4_8*(Double_t)i ;
- if (binLim3[nbin3_0_4+nbin3_4_8] != ptmin_8_10) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 2nd range - differs from expected!\n");
+ for(Int_t i=0; i<=nbincT_4_8; i++) binLimcT[i+nbincT_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbincT_4_8*(Double_t)i ;
+ if (binLimcT[nbincT_0_4+nbincT_4_8] != ptmin_8_10) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 2nd range - differs from expected!\n");
}
- for(Int_t i=0; i<=nbin3_8_10; i++) binLim3[i+nbin3_0_4+nbin3_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin3_8_10*(Double_t)i ;
-
+ for(Int_t i=0; i<=nbincT_8_10; i++) binLimcT[i+nbincT_0_4+nbincT_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbincT_8_10*(Double_t)i ;
+
// ptKa
- for(Int_t i=0; i<=nbin4_0_4; i++) binLim4[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin4_0_4*(Double_t)i ;
- if (binLim4[nbin4_0_4] != ptmin_4_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 1st range - differs from expected!");
+ for(Int_t i=0; i<=nbinpointing_0_4; i++) binLimpointing[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbinpointing_0_4*(Double_t)i ;
+ if (binLimpointing[nbinpointing_0_4] != ptmin_4_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 1st range - differs from expected!");
}
- for(Int_t i=0; i<=nbin4_4_8; i++) binLim4[i+nbin4_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin4_4_8*(Double_t)i ;
- if (binLim4[nbin4_0_4+nbin4_4_8] != ptmin_8_10) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 2nd range - differs from expected!\n");
+ for(Int_t i=0; i<=nbinpointing_4_8; i++) binLimpointing[i+nbinpointing_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbinpointing_4_8*(Double_t)i ;
+ if (binLimpointing[nbinpointing_0_4+nbinpointing_4_8] != ptmin_8_10) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 2nd range - differs from expected!\n");
}
- for(Int_t i=0; i<=nbin4_8_10; i++) binLim4[i+nbin4_0_4+nbin4_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin4_8_10*(Double_t)i ;
+ for(Int_t i=0; i<=nbinpointing_8_10; i++) binLimpointing[i+nbinpointing_0_4+nbinpointing_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbinpointing_8_10*(Double_t)i ;
*/
-
-
- // dca
- //for(Int_t i=0; i<=nbin6; i++) binLim6[i]=(Double_t)dcamin + (dcamax-dcamin) /nbin6*(Double_t)i ;
-
- // d0pi
- for(Int_t i=0; i<=nbin8; i++) binLim8[i]=(Double_t)d0min + (d0max-d0min) /nbin8*(Double_t)i ;
-
- // d0K
- for(Int_t i=0; i<=nbin9; i++) binLim9[i]=(Double_t)d0min + (d0max-d0min) /nbin9*(Double_t)i ;
-
- // d0pi2
- for(Int_t i=0; i<=nbin10; i++) binLim10[i]=(Double_t)d0min + (d0max-d0min) /nbin10*(Double_t)i ;
-
-
-
-
-
+
// z Primary Vertex
- for(Int_t i=0; i<=nbin11; i++) {
- binLim11[i]=(Double_t)zmin + (zmax-zmin) /nbin11*(Double_t)i ;
- // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim12[i]));
+ for(Int_t i=0; i<=nbinzvtx; i++) {
+ binLimzvtx[i]=(Double_t)zvtxmin + (zvtxmax-zvtxmin) /nbinzvtx*(Double_t)i ;
}
-
+
// centrality
- for(Int_t i=0; i<=nbin12; i++) {
- binLim12[i]=(Double_t)centmin + (centmax-centmin)/nbin12 * (Double_t)i;
+ for(Int_t i=0; i<=nbincent_0_10; i++) binLimcent[i]=(Double_t)centmin_0_10 + (centmax_0_10-centmin_0_10)/nbincent_0_10*(Double_t)i ;
+ if (binLimcent[nbincent_0_10] != centmin_10_100) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for cent - 1st range - differs from expected!\n");
}
-
+ for(Int_t i=0; i<=nbincent_10_100; i++) binLimcent[i+nbincent_0_10]=(Double_t)centmin_10_100 + (centmax_10_100-centmin_10_100)/nbincent_10_100*(Double_t)i ;
+
// fake
- for(Int_t i=0; i<=nbin13; i++) {
- binLim13[i]=(Double_t)fakemin + (fakemax-fakemin)/nbin13 * (Double_t)i;
+ for(Int_t i=0; i<=nbinfake; i++) {
+ binLimfake[i]=(Double_t)fakemin + (fakemax-fakemin)/nbinfake * (Double_t)i;
}
-
+ // cosPointingAngleXY
+ for(Int_t i=0; i<=nbinpointingXY; i++) binLimpointingXY[i]=(Double_t)cosminXY + (cosmaxXY-cosminXY) /nbinpointingXY*(Double_t)i ;
- // debugging printings
- //Info("AliCFHeavyFlavourTaskMultiVarMultiStep","Printing lower limits for bins in pt");
- //for (Int_t i =0; i<= iBin[0]; i++){
- // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim0[i]));
- //}
- //Info("Printing lower limits for bins in ptPi");
- //for (Int_t i =0; i<= iBin[3]; i++){
- // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim3[i]));
- //}
- //Info("Printing lower limits for bins in ptKa");
- //for (Int_t i =0; i<= iBin[4]; i++){
- // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim4[i]));
- // }
+ // normDecayLXY
+ for(Int_t i=0; i<=nbinnormDecayLXY; i++) binLimnormDecayLXY[i]=(Double_t)normDecLXYmin + (normDecLXYmax-normDecLXYmin) /nbinnormDecayLXY*(Double_t)i ;
+ // multiplicity
+ for(Int_t i=0; i<=nbinmult_0_20; i++) binLimmult[i]=(Double_t)multmin_0_20 + (multmax_0_20-multmin_0_20)/nbinmult_0_20*(Double_t)i ;
+ if (binLimmult[nbinmult_0_20] != multmin_20_50) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 1st range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinmult_20_50; i++) binLimmult[i+nbinmult_0_20]=(Double_t)multmin_20_50 + (multmax_20_50-multmin_20_50)/nbinmult_20_50*(Double_t)i ;
+ if (binLimmult[nbinmult_0_20+nbinmult_20_50] != multmin_50_102) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinmult_50_102; i++) binLimmult[i+nbinmult_0_20+nbinmult_20_50]=(Double_t)multmin_50_102 + (multmax_50_102-multmin_50_102)/nbinmult_50_102*(Double_t)i ;
+
//one "container" for MC
TString nameContainer="";
if(!isKeepDfromB) {
- nameContainer="CFHFccontainer0_3Prong_CommonFramework";
+ nameContainer="CFHFccontainer0_3Prong_CommonFramework";
}
else if(isKeepDfromBOnly){
- nameContainer="CFHFccontainer0DfromB_3Prong_CommonFramework";
+ nameContainer="CFHFccontainer0DfromB_3Prong_CommonFramework";
}
else {
- nameContainer="CFHFccontainer0allD_3Prong_CommonFramework";
+ nameContainer="CFHFccontainer0allD_3Prong_CommonFramework";
}
- AliCFContainer* container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvar,iBin);
- //setting the bin limits
- printf("pt\n");
- container -> SetBinLimits(ipt,binLim0);
- printf("y\n");
- container -> SetBinLimits(iy,binLim1);
- printf("Phi\n");
- container -> SetBinLimits(iphi,binLim2);
- printf("cT\n");
- container -> SetBinLimits(icT,binLim3);
- printf("pointing angle\n");
- container -> SetBinLimits(ipointing,binLim4);
- printf("ptpi\n");
- container -> SetBinLimits(iptpi,binLim5);
- printf("ptK\n");
- container -> SetBinLimits(iptK,binLim6);
- printf("ptpi2\n");
- container -> SetBinLimits(iptpi2,binLim7);
- printf("d0pi\n");
- container -> SetBinLimits(id0pi,binLim8);
- printf("d0K\n");
- container -> SetBinLimits(id0K,binLim9);
- printf("d0pi2\n");
- container -> SetBinLimits(id0pi2,binLim10);
- printf("z \n");
- container -> SetBinLimits(iz,binLim11);
- printf("cent\n");
- container -> SetBinLimits(icent,binLim12);
- printf("fake\n");
- container -> SetBinLimits(ifake,binLim13);
-
-
+ AliCFContainer* container;
+ if (configuration == AliCFTaskVertexingHF::kSnail){
+ container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvarTot,iBin);
+ //setting the bin limits
+ printf("pt\n");
+ container -> SetBinLimits(ipT,binLimpT);
+ printf("y\n");
+ container -> SetBinLimits(iy,binLimy);
+ printf("Phi\n");
+ container -> SetBinLimits(iphi,binLimphi);
+ printf("cT\n");
+ container -> SetBinLimits(icT,binLimcT);
+ printf("pointing angle\n");
+ container -> SetBinLimits(ipointing,binLimpointing);
+ printf("ptpi\n");
+ container -> SetBinLimits(ipTpi,binLimpTpi);
+ printf("ptK\n");
+ container -> SetBinLimits(ipTk,binLimpTk);
+ printf("ptpi2\n");
+ container -> SetBinLimits(ipTpi2,binLimpTpi2);
+ printf("zvtx \n");
+ container -> SetBinLimits(izvtx,binLimzvtx);
+ printf("cent\n");
+ container -> SetBinLimits(icent,binLimcent);
+ printf("fake\n");
+ container -> SetBinLimits(ifake,binLimfake);
+ printf("pointingXY\n");
+ container -> SetBinLimits(ipointingXY,binLimpointingXY);
+ printf("normDecayLXY\n");
+ container -> SetBinLimits(inormDecayLXY,binLimnormDecayLXY);
+ printf("multiplicity\n");
+ container -> SetBinLimits(imult,binLimmult);
+
+ container -> SetVarTitle(ipT,"pt");
+ container -> SetVarTitle(iy,"y");
+ container -> SetVarTitle(iphi, "phi");
+ container -> SetVarTitle(icT, "ct");
+ container -> SetVarTitle(ipointing, "pointing");
+ container -> SetVarTitle(ipTpi, "ptpi");
+ container -> SetVarTitle(ipTk, "ptK");
+ container -> SetVarTitle(ipTpi2, "ptpi2");
+ container -> SetVarTitle(izvtx, "zvtx");
+ container -> SetVarTitle(icent, "centrality");
+ container -> SetVarTitle(ifake, "fake");
+ container -> SetVarTitle(ipointingXY, "piointingXY");
+ container -> SetVarTitle(inormDecayLXY, "normDecayLXY");
+ container -> SetVarTitle(imult, "multiplicity");
+ }
+ else if (configuration == AliCFTaskVertexingHF::kCheetah){
+ //arrays for the number of bins in each dimension
+ const Int_t nvar = 8;
+
+ const UInt_t ipTFast = 0;
+ const UInt_t iyFast = 1;
+ const UInt_t icTFast = 2;
+ const UInt_t iphiFast = 3;
+ const UInt_t izvtxFast = 4;
+ const UInt_t icentFast = 5;
+ const UInt_t ifakeFast = 6;
+ const UInt_t imultFast = 7;
+
+ Int_t iBinFast[nvar];
+ iBinFast[ipTFast] = iBin[ipT];
+ iBinFast[iyFast] = iBin[iy];
+ iBinFast[icTFast] = iBin[icT];
+ iBinFast[iphiFast] = iBin[iphi];
+ iBinFast[izvtxFast] = iBin[izvtx];
+ iBinFast[icentFast] = iBin[icent];
+ iBinFast[ifakeFast] = iBin[ifake];
+ iBinFast[imultFast] = iBin[imult];
+
+ container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvar,iBinFast);
+ printf("pt\n");
+ container -> SetBinLimits(ipTFast,binLimpT);
+ printf("y\n");
+ container -> SetBinLimits(iyFast,binLimy);
+ printf("ct\n");
+ container -> SetBinLimits(icTFast,binLimcT);
+ printf("phi\n");
+ container -> SetBinLimits(iphiFast,binLimphi);
+ printf("zvtx\n");
+ container -> SetBinLimits(izvtxFast,binLimzvtx);
+ printf("centrality\n");
+ container -> SetBinLimits(icentFast,binLimcent);
+ printf("fake\n");
+ container -> SetBinLimits(ifakeFast,binLimfake);
+ printf("multiplicity\n");
+ container -> SetBinLimits(imultFast,binLimmult);
+
+ container -> SetVarTitle(ipTFast,"pt");
+ container -> SetVarTitle(iyFast,"y");
+ container -> SetVarTitle(icTFast, "ct");
+ container -> SetVarTitle(iphiFast, "phi");
+ container -> SetVarTitle(izvtxFast, "zvtx");
+ container -> SetVarTitle(icentFast, "centrality");
+ container -> SetVarTitle(ifakeFast, "fake");
+ container -> SetVarTitle(imultFast, "multiplicity");
+ }
+
+ //return container;
+
container -> SetStepTitle(0, "MCLimAcc");
container -> SetStepTitle(1, "MC");
container -> SetStepTitle(2, "MCAcc");
container -> SetStepTitle(8, "RecoCuts");
container -> SetStepTitle(9, "RecoPID");
- container -> SetVarTitle(ipt,"pt");
- container -> SetVarTitle(iy,"y");
- container -> SetVarTitle(iphi, "phi");
- container -> SetVarTitle(icT, "ct");
- container -> SetVarTitle(ipointing, "pionting");
- container -> SetVarTitle(iptpi, "ptpi");
- container -> SetVarTitle(iptK, "ptK");
- container -> SetVarTitle(iptpi2, "ptpi2");
- container -> SetVarTitle(id0pi, "d0pi");
- container -> SetVarTitle(id0K, "d0K");
- container -> SetVarTitle(id0pi2, "d0pi2");
- container -> SetVarTitle(iz, "z");
- container -> SetVarTitle(icent, "centrality");
- container -> SetVarTitle(ifake, "fake");
-
//CREATE THE CUTS -----------------------------------------------
//first half : reconstructed
//second half : MC
- thnDim[0] = iBin[0];
- thnDim[2] = iBin[0];
- thnDim[1] = iBin[1];
- thnDim[3] = iBin[1];
+ thnDim[0] = iBin[ipT];
+ thnDim[2] = iBin[ipT];
+ thnDim[1] = iBin[iy];
+ thnDim[3] = iBin[iy];
TString nameCorr="";
if(!isKeepDfromB) {
// set bin limits
- binEdges[0]= binLim0;
- binEdges[1]= binLim1;
+ binEdges[0]= binLimpT;
+ binEdges[1]= binLimy;
correlation->SetBinEdges(0,binEdges[0]);
correlation->SetBinEdges(2,binEdges[0]);
//DEFINITION OF A FEW CONSTANTS
-const Double_t ymin = -2.1 ;
-const Double_t ymax = 2.1 ;
-// const Double_t ptmin_0_4 = 0.0 ;
-// const Double_t ptmax_0_4 = 4.0 ;
-// const Double_t ptmin_4_8 = 4.0 ;
-// const Double_t ptmax_4_8 = 8.0 ;
-// const Double_t ptmin_8_10 = 8.0 ;
-// const Double_t ptmax_8_10 = 10.0 ;
-const Double_t cosmin = -1.05;
+const Double_t ymin = -1.2 ;
+const Double_t ymax = 1.2 ;
+const Double_t cosmin = -0.7;
const Double_t cosmax = 1.05;
const Double_t cTmin = 0; // micron
const Double_t cTmax = 500; // micron
-const Double_t dcamin = 0; // micron
-const Double_t dcamax = 500; // micron
-const Double_t d0min = -1000; // micron
-const Double_t d0max = 1000; // micron
-const Double_t d0xd0min = -100000; // micron
-const Double_t d0xd0max = 100000; // micron
const Double_t phimin = 0.0;
-//const Double_t phimax = 2Pi; // defined in the macro!!!!!!!!!!!!!!
const Int_t mintrackrefsTPC = 2 ;
const Int_t mintrackrefsITS = 3 ;
const Int_t charge = 1 ;
const Double_t ptmax = 9999.;
const Double_t etamin = -0.9;
const Double_t etamax = 0.9;
-const Double_t zmin = -15;
-const Double_t zmax = 15;
+const Double_t zvtxmin = -15;
+const Double_t zvtxmax = 15;
const Int_t minITSClusters = 5;
-const Float_t centmin = 0.;
+const Float_t centmin_0_10 = 0.;
+const Float_t centmax_0_10 = 10.;
+const Float_t centmin_10_100 = 10.;
+const Float_t centmax_10_100 = 100.;
const Float_t centmax = 100.;
const Float_t fakemin = -0.5;
const Float_t fakemax = 2.5.;
-
const Double_t distTwoPartmin=0;
const Double_t distTwoPartmax=600;
-
const Double_t dispVtxmin = 0;
const Double_t dispVtxmax = 600;
-
const Double_t sumd02min = 0.;
const Double_t sumd02max = 50000.;
+const Float_t cosminXY = 0.95;
+const Float_t cosmaxXY = 1.0;
+const Float_t normDecLXYmin = 0;
+const Float_t normDecLXYmax = 20;
+const Float_t multmin_0_20 = 0;
+const Float_t multmax_0_20 = 20;
+const Float_t multmin_20_50 = 20;
+const Float_t multmax_20_50 = 50;
+const Float_t multmin_50_102 = 50;
+const Float_t multmax_50_102 = 102;
+
//----------------------------------------------------
-AliCFTaskVertexingHF *AddTaskCFVertexingHF3ProngLc(const char* cutFile = "./cuts4LctopKpi.root",Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode = 4122, Char_t isSign = 2)
+//AliCFTaskVertexingHF *AddTaskCFVertexingHF3ProngLc(const char* cutFile = "./cuts4LctopKpi.root", Int_t configuration = AliCFTaskVertexingHF::kSnail, Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode = 4122, Char_t isSign = 2)
+AliCFContainer *AddTaskCFVertexingHF3ProngLc(const char* cutFile = "./cuts4LctopKpi.root", Int_t configuration = AliCFTaskVertexingHF::kSnail, Bool_t isKeepDfromB=kFALSE, Bool_t isKeepDfromBOnly=kFALSE, Int_t pdgCode = 4122, Char_t isSign = 2)
{
printf("Addig CF task using cuts from file %s\n",cutFile);
-
+ if (configuration == AliCFTaskVertexingHF::kSnail){
+ printf("The configuration is set to be SLOW --> all the variables will be used to fill the CF\n");
+ }
+ else if (configuration == AliCFTaskVertexingHF::kCheetah){
+ printf("The configuration is set to be FAST --> using only pt, y, ct, phi, zvtx, centrality, fake, multiplicity to fill the CF\n");
+ }
+ else{
+ printf("The configuration is not defined! returning\n");
+ return;
+ }
+
+ gSystem->Sleep(2000);
+
// isSign = 0 --> D0 only
// isSign = 1 --> D0bar only
// isSign = 2 --> D0 + D0bar
AliError(Form("Sign not valid (%d, possible values are 0, 1, 2), returning"));
return 0x0;
}
-
+
TFile* fileCuts = new TFile(cutFile);
AliRDHFCutsLctopKpi *cutsLctopKpi = (AliRDHFCutsLctopKpi*)fileCuts->Get("LctopKpiProdCuts");
// for now the binning is the same than for all D's
if(isKeepDfromBOnly) isKeepDfromB = true;
-
/*
Double_t ptmin_0_4;
Double_t ptmax_0_4;
//CONTAINER DEFINITION
Info("AliCFTaskVertexingHF","SETUP CONTAINER");
- //the sensitive variables, their indices
- UInt_t ipt = 0;
- UInt_t iy = 1;
- UInt_t iphi = 2;
- UInt_t icT = 3;
- UInt_t ipointing = 4;
- UInt_t iptpi = 5;
- UInt_t iptK = 6;
- UInt_t iptpi2 = 7;
- UInt_t id0pi = 8;
- UInt_t id0K = 9;
- UInt_t id0pi2 = 10;
- UInt_t iz = 11;
- UInt_t icent = 12;
- UInt_t ifake = 13;
-
- UInt_t idist12 = 14;
- UInt_t idist23 = 15;
- UInt_t idispVtx = 16;
- UInt_t isumd02 = 17;
const Double_t phimax = 2*TMath::Pi();
//Setting up the container grid...
UInt_t nstep = 10; //number of selection steps: MC with limited acceptance, MC, Acceptance, Vertex, Refit, Reco (no cuts), RecoAcceptance, RecoITSClusters (RecoAcceptance included), RecoPPR (RecoAcceptance+RecoITSCluster included), RecoPID
- const Int_t nvar = 18; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi
-// const Int_t nbin0_0_4 = 8 ; //bins in pt from 0 to 4 GeV
-// const Int_t nbin0_4_8 = 4 ; //bins in pt from 4 to 8 GeV
-// const Int_t nbin0_8_10 = 1 ; //bins in pt from 8 to 10 GeV
+// const Int_t nbinpt_0_4 = 8 ; //bins in pt from 0 to 4 GeV
+// const Int_t nbinpt_4_8 = 4 ; //bins in pt from 4 to 8 GeV
+// const Int_t nbinpt_8_10 = 1 ; //bins in pt from 8 to 10 GeV
/*
- Int_t nbin0_0_4;
- Int_t nbin0_4_8;
- Int_t nbin0_8_10;
+ Int_t nbinpt_0_4;
+ Int_t nbinpt_4_8;
+ Int_t nbinpt_8_10;
if (!isKeepDfromB){
- nbin0_0_4 = 8 ; //bins in pt from 0 to 4 GeV
- nbin0_4_8 = 4 ; //bins in pt from 4 to 8 GeV
- nbin0_8_10 = 1 ; //bins in pt from 8 to 10 GeV
+ nbinpt_0_4 = 8 ; //bins in pt from 0 to 4 GeV
+ nbinpt_4_8 = 4 ; //bins in pt from 4 to 8 GeV
+ nbinpt_8_10 = 1 ; //bins in pt from 8 to 10 GeV
}else{
- nbin0_0_4 = 3 ; //bins in pt from 0 to 3 GeV
- nbin0_4_8 = 1 ; //bins in pt from 3 to 5 GeV
- nbin0_8_10 = 1 ; //bins in pt from 5 to 10 GeV
+ nbinpt_0_4 = 3 ; //bins in pt from 0 to 3 GeV
+ nbinpt_4_8 = 1 ; //bins in pt from 3 to 5 GeV
+ nbinpt_8_10 = 1 ; //bins in pt from 5 to 10 GeV
}
*/
- const Int_t nbin0 = cutsLctopKpi->GetNPtBins(); // bins in pT
- printf("pT: nbin (from cuts file) = %d\n",nbin0);
- const Int_t nbin1 = 42 ; //bins in y
- const Int_t nbin2 = 20 ; //bins in phi
- const Int_t nbin3 = 24 ; //bins in cT
- const Int_t nbin4 = 1050 ; //bins in cosPointingAngle
- const Int_t nbin5_0_4 = 8 ; //bins in ptPi from 0 to 4 GeV
- const Int_t nbin5_4_8 = 4 ; //bins in ptPi from 4 to 8 GeV
- const Int_t nbin5_8_10 = 1 ; //bins in ptPi from 8 to 10 GeV
- const Int_t nbin6_0_4 = 8 ; //bins in ptKa from 0 to 4 GeV
- const Int_t nbin6_4_8 = 4 ; //bins in ptKa from 4 to 8 GeV
- const Int_t nbin6_8_10 = 1 ; //bins in ptKa from 8 to 10 GeV
- const Int_t nbin7_0_4 = 8 ; //bins in ptpi2 from 0 to 4 GeV
- const Int_t nbin7_4_8 = 4 ; //bins in ptpi2 from 4 to 8 GeV
- const Int_t nbin7_8_10 = 1 ; //bins in ptpi2 from 8 to 10 GeV
- const Int_t nbin8 = 100 ; //bins in d0pi
- const Int_t nbin9 = 100 ; //bins in d0K
- const Int_t nbin10 = 100 ; //bins in d0pi2
- const Int_t nbin11 = 60 ; //bins in z vertex
- const Int_t nbin12 = 10; //bins in centrality
- const Int_t nbin13 = 3; //bins in fake
-
- const Int_t nbin14 = 10; //bins dist12
- const Int_t nbin15 = 10; //bins dist23
- const Int_t nbin16 = 10; //bin sigmaVtx
- const Int_t nbin17 = 10; //bin sumD0^2
-
+ const Int_t nbinpt = cutsLctopKpi->GetNPtBins(); // bins in pT
+ printf("pT: nbin (from cuts file) = %d\n",nbinpt);
+ const Int_t nbiny = 24 ; //bins in y
+ const Int_t nbinphi = 18 ; //bins in phi
+ const Int_t nbincT = 25 ; //bins in cT
+ const Int_t nbinpointing = 350 ; //bins in cosPointingAngle
+ const Int_t nbinpTpi_0_4 = 8 ; //bins in ptPi from 0 to 4 GeV
+ const Int_t nbinpTpi_4_8 = 4 ; //bins in ptPi from 4 to 8 GeV
+ const Int_t nbinpTpi_8_10 = 1 ; //bins in ptPi from 8 to 10 GeV
+ const Int_t nbinpTk_0_4 = 8 ; //bins in ptKa from 0 to 4 GeV
+ const Int_t nbinpTk_4_8 = 4 ; //bins in ptKa from 4 to 8 GeV
+ const Int_t nbinpTk_8_10 = 1 ; //bins in ptKa from 8 to 10 GeV
+ const Int_t nbinpTpi2_0_4 = 8 ; //bins in ptpi2 from 0 to 4 GeV
+ const Int_t nbinpTpi2_4_8 = 4 ; //bins in ptpi2 from 4 to 8 GeV
+ const Int_t nbinpTpi2_8_10 = 1 ; //bins in ptpi2 from 8 to 10 GeV
+ const Int_t nbinzvtx = 30 ; //bins in z vertex
+ const Int_t nbincent = 11; //bins in centrality
+ const Int_t nbincent_0_10 = 2; //bins in centrality between 0 and 10
+ const Int_t nbincent_10_100 = 9; //bins in centrality between 10 and 100
+ const Int_t nbinfake = 3; //bins in fake
+ const Int_t nbindist12 = 10; //bins dist12
+ const Int_t nbindist23 = 10; //bins dist23
+ const Int_t nbinsigmaVtx = 10; //bin sigmaVtx
+ const Int_t nbinsumd02 = 10; //bin sumD0^2
+ const Int_t nbinpointingXY = 50; //bins in cosPointingAngleXY
+ const Int_t nbinnormDecayLXY = 20; //bins in NormDecayLengthXY
+ const Int_t nbinmult = 48; //bins in multiplicity (total number)
+ const Int_t nbinmult_0_20 = 20; //bins in multiplicity between 0 and 20
+ const Int_t nbinmult_20_50 = 15; //bins in multiplicity between 20 and 50
+ const Int_t nbinmult_50_102 = 13; //bins in multiplicity between 50 and 102
+
+ //the sensitive variables, their indices
+ const UInt_t ipT = 0;
+ const UInt_t iy = 1;
+ const UInt_t iphi = 2;
+ const UInt_t icT = 3;
+ const UInt_t ipointing = 4;
+ const UInt_t ipTpi = 5;
+ const UInt_t ipTk = 6;
+ const UInt_t ipTpi2 = 7;
+ const UInt_t izvtx = 8;
+ const UInt_t icent = 9;
+ const UInt_t ifake = 10;
+ const UInt_t idist12 = 11;
+ const UInt_t idist23 = 12;
+ const UInt_t isigmaVtx = 13;
+ const UInt_t isumd02 = 14;
+ const UInt_t ipointingXY = 15;
+ const UInt_t inormDecayLXY = 16;
+ const UInt_t imult = 17;
+
+ const Int_t nvarTot = 18 ; //number of variables on the grid:pt, y, cosThetaStar, pTpi, pTk, cT, dca, d0pi, d0K, d0xd0, cosPointingAngle, phi, zvtx, centrality, fake, cosPointingAngleXY, normDecayLengthXY, multiplicity
//arrays for the number of bins in each dimension
- Int_t iBin[nvar];
- //iBin[0]=nbin0_0_4+nbin0_4_8+nbin0_8_10;
- iBin[0]=nbin0;
- iBin[1]=nbin1;
- iBin[2]=nbin2;
- // iBin[3]=nbin3_0_4+nbin3_4_8+nbin3_8_10;
- //iBin[4]=nbin4_0_4+nbin4_4_8+nbin4_8_10;
- iBin[3]=nbin3;
- iBin[4]=nbin4;
- iBin[5]=nbin0;
- iBin[6]=nbin0;
- iBin[7]=nbin0;
- iBin[8]=nbin8;
- iBin[9]=nbin9;
- iBin[10]=nbin10;
- iBin[11]=nbin11;
- iBin[12]=nbin12;
-
- iBin[13]=nbin13;
- iBin[14]=nbin14;
- iBin[15]=nbin15;
- iBin[16]=nbin16;
- iBin[17]=nbin17;
-
+ Int_t iBin[nvarTot];
+ //iBin[ipT]=nbinpt_0_4+nbinpt_4_8+nbinpt_8_10;
+ iBin[ipT]=nbinpt;
+ iBin[iy]=nbiny;
+ iBin[iphi]=nbinphi;
+ // iBin[icT]=nbincT_0_4+nbincT_4_8+nbincT_8_10;
+ //iBin[4]=nbinpointing_0_4+nbinpointing_4_8+nbinpointing_8_10;
+ iBin[icT]=nbincT;
+ iBin[ipointing]=nbinpointing;
+ iBin[ipTpi]=nbinpt;
+ iBin[ipTk]=nbinpt;
+ iBin[ipTpi2]=nbinpt;
+ iBin[izvtx]=nbinzvtx;
+ iBin[icent]=nbincent;
+ iBin[ifake]=nbinfake;
+ iBin[idist12]=nbindist12;
+ iBin[idist23]=nbindist23;
+ iBin[isigmaVtx]=nbinsigmaVtx;
+ iBin[isumd02]=nbinsumd02;
+ iBin[ipointingXY]=nbinpointingXY;
+ iBin[inormDecayLXY]=nbinnormDecayLXY;
+ iBin[imult]=nbinmult;
+
//arrays for lower bounds :
- Double_t *binLim0=new Double_t[iBin[0]+1];
- Double_t *binLim1=new Double_t[iBin[1]+1];
- Double_t *binLim2=new Double_t[iBin[2]+1];
- Double_t *binLim3=new Double_t[iBin[3]+1];
- Double_t *binLim4=new Double_t[iBin[4]+1];
- Double_t *binLim5=new Double_t[iBin[5]+1];
- Double_t *binLim6=new Double_t[iBin[6]+1];
- Double_t *binLim7=new Double_t[iBin[7]+1];
- Double_t *binLim8=new Double_t[iBin[8]+1];
- Double_t *binLim9=new Double_t[iBin[9]+1];
- Double_t *binLim10=new Double_t[iBin[10]+1];
- Double_t *binLim11=new Double_t[iBin[11]+1];
- Double_t *binLim12=new Double_t[iBin[12]+1];
-
- Double_t *binLim13=new Double_t[iBin[13]+1];
- Double_t *binLim14=new Double_t[iBin[14]+1];
- Double_t *binLim15=new Double_t[iBin[15]+1];
- Double_t *binLim16=new Double_t[iBin[16]+1];
- Double_t *binLim17=new Double_t[iBin[17]+1];
+ Double_t *binLimpT=new Double_t[iBin[ipT]+1];
+ Double_t *binLimy=new Double_t[iBin[iy]+1];
+ Double_t *binLimphi=new Double_t[iBin[iphi]+1];
+ Double_t *binLimcT=new Double_t[iBin[icT]+1];
+ Double_t *binLimpointing=new Double_t[iBin[ipointing]+1];
+ Double_t *binLimpTpi=new Double_t[iBin[ipTpi]+1];
+ Double_t *binLimpTk=new Double_t[iBin[ipTk]+1];
+ Double_t *binLimpTpi2=new Double_t[iBin[ipTpi2]+1];
+ Double_t *binLimzvtx=new Double_t[iBin[izvtx]+1];
+ Double_t *binLimcent=new Double_t[iBin[icent]+1];
+ Double_t *binLimfake=new Double_t[iBin[ifake]+1];
+ Double_t *binLimdist12=new Double_t[iBin[idist12]+1];
+ Double_t *binLimdist23=new Double_t[iBin[idist23]+1];
+ Double_t *binLimsigmaVtx=new Double_t[iBin[isigmaVtx]+1];
+ Double_t *binLimsumd02=new Double_t[iBin[isumd02]+1];
+ Double_t *binLimpointingXY=new Double_t[iBin[ipointingXY]+1];
+ Double_t *binLimnormDecayLXY=new Double_t[iBin[inormDecayLXY]+1];
+ Double_t *binLimmult=new Double_t[iBin[imult]+1];
// checking limits
/*
- if (ptmax_0_4 != ptmin_4_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 1st range != min lim 2nd range, please check!");
- }
- if (ptmax_4_8 != ptmin_8_10) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 2nd range != min lim 3rd range, please check!");
- }
+ if (ptmax_0_4 != ptmin_4_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 1st range != min lim 2nd range, please check!");
+ }
+ if (ptmax_4_8 != ptmin_8_10) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","max lim 2nd range != min lim 3rd range, please check!");
+ }
*/
// values for bin lower bounds
// pt
- Float_t* floatbinLim0 = cutsLctopKpi->GetPtBinLimits();
- for (Int_t ibin0 = 0 ; ibin0<iBin[0]+1; ibin0++){
- binLim0[ibin0] = (Double_t)floatbinLim0[ibin0];
- binLim5[ibin0] = (Double_t)floatbinLim0[ibin0];
- binLim6[ibin0] = (Double_t)floatbinLim0[ibin0];
- binLim7[ibin0] = (Double_t)floatbinLim0[ibin0];
+ Float_t* floatbinLimpT = cutsLctopKpi->GetPtBinLimits();
+ for (Int_t ibinpT = 0 ; ibinpT<iBin[ipT]+1; ibinpT++){
+ binLimpT[ibinpT] = (Double_t)floatbinLimpT[ibinpT];
+ binLimpTpi[ibinpT] = (Double_t)floatbinLimpT[ibinpT];
+ binLimpTk[ibinpT] = (Double_t)floatbinLimpT[ibinpT];
+ binLimpTpi2[ibinpT] = (Double_t)floatbinLimpT[ibinpT];
}
- for(Int_t i=0; i<=nbin0; i++) printf("binLim0[%d]=%f\n",i,binLim0[i]);
-
+ for(Int_t i=0; i<=nbinpt; i++) printf("binLimpT[%d]=%f\n",i,binLimpT[i]);
+
/*
- for(Int_t i=0; i<=nbin0_0_4; i++) binLim0[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin0_0_4*(Double_t)i ;
- if (binLim0[nbin0_0_4] != ptmin_4_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin0_4_8; i++) binLim0[i+nbin0_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin0_4_8*(Double_t)i ;
- if (binLim0[nbin0_0_4+nbin0_4_8] != ptmin_8_10) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
- }
- for(Int_t i=0; i<=nbin0_8_10; i++) binLim0[i+nbin0_0_4+nbin0_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin0_8_10*(Double_t)i ;
+ for(Int_t i=0; i<=nbinpt_0_4; i++) binLimpT[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbinpt_0_4*(Double_t)i ;
+ if (binLimpT[nbinpt_0_4] != ptmin_4_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 1st range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpt_4_8; i++) binLimpT[i+nbinpt_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbinpt_4_8*(Double_t)i ;
+ if (binLimpT[nbinpt_0_4+nbinpt_4_8] != ptmin_8_10) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for pt - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinpt_8_10; i++) binLimpT[i+nbinpt_0_4+nbinpt_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbinpt_8_10*(Double_t)i ;
*/
-
+
// y
- for(Int_t i=0; i<=nbin1; i++) binLim1[i]=(Double_t)ymin + (ymax-ymin) /nbin1*(Double_t)i ;
-
- // cosThetaStar
- // for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)cosmin + (cosmax-cosmin) /nbin2*(Double_t)i ;
+ for(Int_t i=0; i<=nbiny; i++) binLimy[i]=(Double_t)ymin + (ymax-ymin) /nbiny*(Double_t)i ;
+
// Phi
- for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)phimin + (phimax-phimin) /nbin2*(Double_t)i ;
-
+ for(Int_t i=0; i<=nbinphi; i++) binLimphi[i]=(Double_t)phimin + (phimax-phimin) /nbinphi*(Double_t)i ;
+
// cT
- for(Int_t i=0; i<=nbin3; i++) binLim3[i]=(Double_t)cTmin + (cTmax-cTmin) /nbin3*(Double_t)i ;
-
+ for(Int_t i=0; i<=nbincT; i++) binLimcT[i]=(Double_t)cTmin + (cTmax-cTmin) /nbincT*(Double_t)i ;
+
// cosPointingAngle
- for(Int_t i=0; i<=nbin4; i++) binLim4[i]=(Double_t)cosmin + (cosmax-cosmin) /nbin4*(Double_t)i ;
+ for(Int_t i=0; i<=nbinpointing; i++) binLimpointing[i]=(Double_t)cosmin + (cosmax-cosmin) /nbinpointing*(Double_t)i ;
/*
// ptPi
- for(Int_t i=0; i<=nbin3_0_4; i++) binLim3[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin3_0_4*(Double_t)i ;
- if (binLim3[nbin3_0_4] != ptmin_4_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 1st range - differs from expected!");
+ for(Int_t i=0; i<=nbincT_0_4; i++) binLimcT[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbincT_0_4*(Double_t)i ;
+ if (binLimcT[nbincT_0_4] != ptmin_4_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 1st range - differs from expected!");
}
- for(Int_t i=0; i<=nbin3_4_8; i++) binLim3[i+nbin3_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin3_4_8*(Double_t)i ;
- if (binLim3[nbin3_0_4+nbin3_4_8] != ptmin_8_10) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 2nd range - differs from expected!\n");
+ for(Int_t i=0; i<=nbincT_4_8; i++) binLimcT[i+nbincT_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbincT_4_8*(Double_t)i ;
+ if (binLimcT[nbincT_0_4+nbincT_4_8] != ptmin_8_10) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptPi - 2nd range - differs from expected!\n");
}
- for(Int_t i=0; i<=nbin3_8_10; i++) binLim3[i+nbin3_0_4+nbin3_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin3_8_10*(Double_t)i ;
-
+ for(Int_t i=0; i<=nbincT_8_10; i++) binLimcT[i+nbincT_0_4+nbincT_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbincT_8_10*(Double_t)i ;
+
// ptKa
- for(Int_t i=0; i<=nbin4_0_4; i++) binLim4[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbin4_0_4*(Double_t)i ;
- if (binLim4[nbin4_0_4] != ptmin_4_8) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 1st range - differs from expected!");
+ for(Int_t i=0; i<=nbinpointing_0_4; i++) binLimpointing[i]=(Double_t)ptmin_0_4 + (ptmax_0_4-ptmin_0_4)/nbinpointing_0_4*(Double_t)i ;
+ if (binLimpointing[nbinpointing_0_4] != ptmin_4_8) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 1st range - differs from expected!");
}
- for(Int_t i=0; i<=nbin4_4_8; i++) binLim4[i+nbin4_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbin4_4_8*(Double_t)i ;
- if (binLim4[nbin4_0_4+nbin4_4_8] != ptmin_8_10) {
- Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 2nd range - differs from expected!\n");
+ for(Int_t i=0; i<=nbinpointing_4_8; i++) binLimpointing[i+nbinpointing_0_4]=(Double_t)ptmin_4_8 + (ptmax_4_8-ptmin_4_8)/nbinpointing_4_8*(Double_t)i ;
+ if (binLimpointing[nbinpointing_0_4+nbinpointing_4_8] != ptmin_8_10) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for ptKa - 2nd range - differs from expected!\n");
}
- for(Int_t i=0; i<=nbin4_8_10; i++) binLim4[i+nbin4_0_4+nbin4_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbin4_8_10*(Double_t)i ;
+ for(Int_t i=0; i<=nbinpointing_8_10; i++) binLimpointing[i+nbinpointing_0_4+nbinpointing_4_8]=(Double_t)ptmin_8_10 + (ptmax_8_10-ptmin_8_10)/nbinpointing_8_10*(Double_t)i ;
*/
-
-
- // dca
- //for(Int_t i=0; i<=nbin6; i++) binLim6[i]=(Double_t)dcamin + (dcamax-dcamin) /nbin6*(Double_t)i ;
-
- // d0pi
- for(Int_t i=0; i<=nbin8; i++) binLim8[i]=(Double_t)d0min + (d0max-d0min) /nbin8*(Double_t)i ;
-
- // d0K
- for(Int_t i=0; i<=nbin9; i++) binLim9[i]=(Double_t)d0min + (d0max-d0min) /nbin9*(Double_t)i ;
-
- // d0pi2
- for(Int_t i=0; i<=nbin10; i++) binLim10[i]=(Double_t)d0min + (d0max-d0min) /nbin10*(Double_t)i ;
-
-
-
-
-
+
// z Primary Vertex
- for(Int_t i=0; i<=nbin11; i++) {
- binLim11[i]=(Double_t)zmin + (zmax-zmin) /nbin11*(Double_t)i ;
- // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim12[i]));
+ for(Int_t i=0; i<=nbinzvtx; i++) {
+ binLimzvtx[i]=(Double_t)zvtxmin + (zvtxmax-zvtxmin) /nbinzvtx*(Double_t)i ;
}
-
- //centrality
- for(Int_t i=0; i<=nbin12; i++) {
- binLim12[i]=(Double_t)centmin + (centmax-centmin)/nbin12 * (Double_t)i;
+
+ // centrality
+ for(Int_t i=0; i<=nbincent_0_10; i++) binLimcent[i]=(Double_t)centmin_0_10 + (centmax_0_10-centmin_0_10)/nbincent_0_10*(Double_t)i ;
+ if (binLimcent[nbincent_0_10] != centmin_10_100) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for cent - 1st range - differs from expected!\n");
}
-
- // fake
- for(Int_t i=0; i<=nbin13; i++) {
- binLim13[i]=(Double_t)fakemin + (fakemax-fakemin)/nbin13 * (Double_t)i;
- }
+ for(Int_t i=0; i<=nbincent_10_100; i++) binLimcent[i+nbincent_0_10]=(Double_t)centmin_10_100 + (centmax_10_100-centmin_10_100)/nbincent_10_100*(Double_t)i ;
- //dist12
- for(Int_t i=0; i<=nbin14; i++) {
- binLim14[i]=(Double_t)distTwoPartmin + (distTwoPartmax-distTwoPartmin)/nbin14 * (Double_t)i;
+ // fake
+ for(Int_t i=0; i<=nbinfake; i++) {
+ binLimfake[i]=(Double_t)fakemin + (fakemax-fakemin)/nbinfake * (Double_t)i;
}
- //dist23
- for(Int_t i=0; i<=nbin15; i++) {
- binLim15[i]=(Double_t)distTwoPartmin + (distTwoPartmax-distTwoPartmin)/nbin15 * (Double_t)i;
+ //dist12
+ for(Int_t i=0; i<=nbindist12; i++) {
+ binLimdist12[i]=(Double_t)distTwoPartmin + (distTwoPartmax-distTwoPartmin)/nbindist12 * (Double_t)i;
+ }
+
+ //dist23
+ for(Int_t i=0; i<=nbindist23; i++) {
+ binLimdist23[i]=(Double_t)distTwoPartmin + (distTwoPartmax-distTwoPartmin)/nbindist23 * (Double_t)i;
+ }
+
+ //dispersion Vtx
+ for(Int_t i=0; i<=nbinsigmaVtx; i++) {
+ binLimsigmaVtx[i]=(Double_t)dispVtxmin + (dispVtxmax-dispVtxmin)/nbinsigmaVtx * (Double_t)i;
}
- //dispersion Vtx
- for(Int_t i=0; i<=nbin16; i++) {
- binLim16[i]=(Double_t)dispVtxmin + (dispVtxmax-dispVtxmin)/nbin16 * (Double_t)i;
+ //sumd0^2
+ for(Int_t i=0; i<=nbinsumd02; i++) {
+ binLimsumd02[i]=(Double_t)sumd02min + (sumd02max-sumd02min)/nbinsumd02 * (Double_t)i;
}
- //sumd0^2
- for(Int_t i=0; i<=nbin17; i++) {
- binLim17[i]=(Double_t)sumd02min + (sumd02max-sumd02min)/nbin17 * (Double_t)i;
-}
-
-
- // debugging printings
- //Info("AliCFHeavyFlavourTaskMultiVarMultiStep","Printing lower limits for bins in pt");
- //for (Int_t i =0; i<= iBin[0]; i++){
- // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim0[i]));
- //}
- //Info("Printing lower limits for bins in ptPi");
- //for (Int_t i =0; i<= iBin[3]; i++){
- // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim3[i]));
- //}
- //Info("Printing lower limits for bins in ptKa");
- //for (Int_t i =0; i<= iBin[4]; i++){
- // Info("AliCFHeavyFlavourTaskMultiVarMultiStep",Form("i-th bin, lower limit = %f", binLim4[i]));
- // }
+ // cosPointingAngleXY
+ for(Int_t i=0; i<=nbinpointingXY; i++) binLimpointingXY[i]=(Double_t)cosminXY + (cosmaxXY-cosminXY) /nbinpointingXY*(Double_t)i ;
+
+ // normDecayLXY
+ for(Int_t i=0; i<=nbinnormDecayLXY; i++) binLimnormDecayLXY[i]=(Double_t)normDecLXYmin + (normDecLXYmax-normDecLXYmin) /nbinnormDecayLXY*(Double_t)i ;
+ // multiplicity
+ for(Int_t i=0; i<=nbinmult_0_20; i++) binLimmult[i]=(Double_t)multmin_0_20 + (multmax_0_20-multmin_0_20)/nbinmult_0_20*(Double_t)i ;
+ if (binLimmult[nbinmult_0_20] != multmin_20_50) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 1st range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinmult_20_50; i++) binLimmult[i+nbinmult_0_20]=(Double_t)multmin_20_50 + (multmax_20_50-multmin_20_50)/nbinmult_20_50*(Double_t)i ;
+ if (binLimmult[nbinmult_0_20+nbinmult_20_50] != multmin_50_102) {
+ Error("AliCFHeavyFlavourTaskMultiVarMultiStep","Calculated bin lim for mult - 2nd range - differs from expected!\n");
+ }
+ for(Int_t i=0; i<=nbinmult_50_102; i++) binLimmult[i+nbinmult_0_20+nbinmult_20_50]=(Double_t)multmin_50_102 + (multmax_50_102-multmin_50_102)/nbinmult_50_102*(Double_t)i ;
+
//one "container" for MC
TString nameContainer="";
if(!isKeepDfromB) {
- nameContainer="CFHFccontainer0_3Prong_CommonFramework";
+ nameContainer="CFHFccontainer0_3Prong_CommonFramework";
}
else if(isKeepDfromBOnly){
- nameContainer="CFHFccontainer0DfromB_3Prong_CommonFramework";
+ nameContainer="CFHFccontainer0DfromB_3Prong_CommonFramework";
}
else {
- nameContainer="CFHFccontainer0allD_3Prong_CommonFramework";
- }
-
- AliCFContainer* container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvar,iBin);
- //setting the bin limits
- printf("pt\n");
- container -> SetBinLimits(ipt,binLim0);
- printf("y\n");
- container -> SetBinLimits(iy,binLim1);
- printf("Phi\n");
- container -> SetBinLimits(iphi,binLim2);
- printf("cT\n");
- container -> SetBinLimits(icT,binLim3);
- printf("pointing angle\n");
- container -> SetBinLimits(ipointing,binLim4);
- printf("ptpi\n");
- container -> SetBinLimits(iptpi,binLim5);
- printf("ptK\n");
- container -> SetBinLimits(iptK,binLim6);
- printf("ptpi2\n");
- container -> SetBinLimits(iptpi2,binLim7);
- printf("d0pi\n");
- container -> SetBinLimits(id0pi,binLim8);
- printf("d0K\n");
- container -> SetBinLimits(id0K,binLim9);
- printf("d0pi2\n");
- container -> SetBinLimits(id0pi2,binLim10);
- printf("z \n");
- container -> SetBinLimits(iz,binLim11);
- printf("cent\n");
- container -> SetBinLimits(icent,binLim12);
- printf("fake\n");
- container -> SetBinLimits(ifake,binLim13);
- printf("dist12\n");
- container -> SetBinLimits(idist12,binLim14);
- printf("dist23\n");
- container -> SetBinLimits(idist23,binLim15);
- printf("dispVtx\n");
- container -> SetBinLimits(idispVtx,binLim16);
- printf("sumd0^2\n");
- container -> SetBinLimits(isumd02,binLim17);
-
+ nameContainer="CFHFccontainer0allD_3Prong_CommonFramework";
+ }
+ AliCFContainer* container;
+ if (configuration == AliCFTaskVertexingHF::kSnail){
+ container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvarTot,iBin);
+ //setting the bin limits
+ printf("pt\n");
+ container -> SetBinLimits(ipT,binLimpT);
+ printf("y\n");
+ container -> SetBinLimits(iy,binLimy);
+ printf("Phi\n");
+ container -> SetBinLimits(iphi,binLimphi);
+ printf("cT\n");
+ container -> SetBinLimits(icT,binLimcT);
+ printf("pointing angle\n");
+ container -> SetBinLimits(ipointing,binLimpointing);
+ printf("ptpi\n");
+ container -> SetBinLimits(ipTpi,binLimpTpi);
+ printf("ptK\n");
+ container -> SetBinLimits(ipTk,binLimpTk);
+ printf("ptpi2\n");
+ container -> SetBinLimits(ipTpi2,binLimpTpi2);
+ printf("zvtx \n");
+ container -> SetBinLimits(izvtx,binLimzvtx);
+ printf("cent\n");
+ container -> SetBinLimits(icent,binLimcent);
+ printf("fake\n");
+ container -> SetBinLimits(ifake,binLimfake);
+ printf("dist12\n");
+ container -> SetBinLimits(idist12,binLimdist12);
+ printf("dist23\n");
+ container -> SetBinLimits(idist23,binLimdist23);
+ printf("dispVtx\n");
+ container -> SetBinLimits(isigmaVtx,binLimsigmaVtx);
+ printf("sumd0^2\n");
+ container -> SetBinLimits(isumd02,binLimsumd02);
+ printf("pointingXY\n");
+ container -> SetBinLimits(ipointingXY,binLimpointingXY);
+ printf("normDecayLXY\n");
+ container -> SetBinLimits(inormDecayLXY,binLimnormDecayLXY);
+ printf("multiplicity\n");
+ container -> SetBinLimits(imult,binLimmult);
+
+ container -> SetVarTitle(ipT,"pt");
+ container -> SetVarTitle(iy,"y");
+ container -> SetVarTitle(iphi, "phi");
+ container -> SetVarTitle(icT, "ct");
+ container -> SetVarTitle(ipointing, "pionting");
+ container -> SetVarTitle(ipTpi, "ptpi");
+ container -> SetVarTitle(ipTk, "ptK");
+ container -> SetVarTitle(ipTpi2, "ptpi2");
+ container -> SetVarTitle(izvtx, "zvtx");
+ container -> SetVarTitle(icent, "centrality");
+ container -> SetVarTitle(ifake, "fake");
+ container -> SetVarTitle(idist12, "dist12toVtx");
+ container -> SetVarTitle(idist23, "dist23toVtx");
+ container -> SetVarTitle(isigmaVtx, "dispertionToSecVtx");
+ container -> SetVarTitle(isumd02, "sumd0^2");
+ container -> SetVarTitle(ipointingXY, "piointingXY");
+ container -> SetVarTitle(inormDecayLXY, "normDecayLXY");
+ container -> SetVarTitle(imult, "multiplicity");
+ }
+ else if (configuration == AliCFTaskVertexingHF::kCheetah){
+ //arrays for the number of bins in each dimension
+ const Int_t nvar = 8;
+
+ const UInt_t ipTFast = 0;
+ const UInt_t iyFast = 1;
+ const UInt_t icTFast = 2;
+ const UInt_t iphiFast = 3;
+ const UInt_t izvtxFast = 4;
+ const UInt_t icentFast = 5;
+ const UInt_t ifakeFast = 6;
+ const UInt_t imultFast = 7;
+
+ Int_t iBinFast[nvar];
+ iBinFast[ipTFast] = iBin[ipT];
+ iBinFast[iyFast] = iBin[iy];
+ iBinFast[icTFast] = iBin[icT];
+ iBinFast[iphiFast] = iBin[iphi];
+ iBinFast[izvtxFast] = iBin[izvtx];
+ iBinFast[icentFast] = iBin[icent];
+ iBinFast[ifakeFast] = iBin[ifake];
+ iBinFast[imultFast] = iBin[imult];
+
+ container = new AliCFContainer(nameContainer,"container for tracks",nstep,nvar,iBinFast);
+ printf("pt\n");
+ container -> SetBinLimits(ipTFast,binLimpT);
+ printf("y\n");
+ container -> SetBinLimits(iyFast,binLimy);
+ printf("ct\n");
+ container -> SetBinLimits(icTFast,binLimcT);
+ printf("phi\n");
+ container -> SetBinLimits(iphiFast,binLimphi);
+ printf("zvtx\n");
+ container -> SetBinLimits(izvtxFast,binLimzvtx);
+ printf("centrality\n");
+ container -> SetBinLimits(icentFast,binLimcent);
+ printf("fake\n");
+ container -> SetBinLimits(ifakeFast,binLimfake);
+ printf("multiplicity\n");
+ container -> SetBinLimits(imultFast,binLimmult);
+
+ container -> SetVarTitle(ipTFast,"pt");
+ container -> SetVarTitle(iyFast,"y");
+ container -> SetVarTitle(icTFast, "ct");
+ container -> SetVarTitle(iphiFast, "phi");
+ container -> SetVarTitle(izvtxFast, "zvtx");
+ container -> SetVarTitle(icentFast, "centrality");
+ container -> SetVarTitle(ifakeFast, "fake");
+ container -> SetVarTitle(imultFast, "multiplicity");
+ }
+
+ return container;
+
container -> SetStepTitle(0, "MCLimAcc");
container -> SetStepTitle(1, "MC");
container -> SetStepTitle(2, "MCAcc");
container -> SetStepTitle(8, "RecoCuts");
container -> SetStepTitle(9, "RecoPID");
- container -> SetVarTitle(ipt,"pt");
- container -> SetVarTitle(iy,"y");
- container -> SetVarTitle(iphi, "phi");
- container -> SetVarTitle(icT, "ct");
- container -> SetVarTitle(ipointing, "pionting");
- container -> SetVarTitle(iptpi, "ptpi");
- container -> SetVarTitle(iptK, "ptK");
- container -> SetVarTitle(iptpi2, "ptpi2");
- container -> SetVarTitle(id0pi, "d0pi");
- container -> SetVarTitle(id0K, "d0K");
- container -> SetVarTitle(id0pi2, "d0pi2");
- container -> SetVarTitle(iz, "z");
- container -> SetVarTitle(icent, "centrality");
- container -> SetVarTitle(ifake, "fake");
- container -> SetVarTitle(idist12, "dist12toVtx");
- container -> SetVarTitle(idist23, "dist23toVtx");
- container -> SetVarTitle(idispVtx, "dispertionToSecVtx");
- container -> SetVarTitle(isumd02, "sumd0^2");
//CREATE THE CUTS -----------------------------------------------
task->SetUseWeight(kFALSE);
task->SetCFManager(man); //here is set the CF manager
task->SetSign(isSign);
- task->SetCentralitySelection(kTRUE);
+ task->SetCentralitySelection(kFALSE);
+ task->SetFakeSelection(0);
task->SetRejectCandidateIfNotFromQuark(kTRUE); // put to false if you want to keep HIJING D0!!
task->SetUseMCVertex(kFALSE); // put to true if you want to do studies on pp
-
if (isKeepDfromB && !isKeepDfromBOnly) task->SetDselection(2);
if (isKeepDfromB && isKeepDfromBOnly) task->SetDselection(1);
Printf("RejectCandidateIfNotFromQuark selection = %d",(Int_t)task->GetRejectCandidateIfNotFromQuark());
Printf("UseMCVertex selection = %d",(Int_t)task->GetUseMCVertex());
Printf("***************END CONTAINER SETTINGS *****************\n");
-
+
//-----------------------------------------------------------//
// create correlation matrix for unfolding - only eta-pt //
//-----------------------------------------------------------//
//first half : reconstructed
//second half : MC
- thnDim[0] = iBin[0];
- thnDim[2] = iBin[0];
- thnDim[1] = iBin[1];
- thnDim[3] = iBin[1];
+ thnDim[0] = iBin[ipT];
+ thnDim[2] = iBin[ipT];
+ thnDim[1] = iBin[iy];
+ thnDim[3] = iBin[iy];
TString nameCorr="";
if(!isKeepDfromB) {
// set bin limits
- binEdges[0]= binLim0;
- binEdges[1]= binLim1;
+ binEdges[0]= binLimpT;
+ binEdges[1]= binLimy;
correlation->SetBinEdges(0,binEdges[0]);
correlation->SetBinEdges(2,binEdges[0]);
mgr->ConnectOutput(task,4,coutput4);
return task;
-}
+ }