// Lxy and CosPointXY study
- Int_t nbinsSparsCxyLxy[4]={84,fCutsTight->GetNPtBins(),10,25};
+ Int_t nbinsSparsCxyLxy[4]={84,fCutsTight->GetNPtBins(),10,20};
Double_t binLowLimitSparseCxyLxy[4]={1.680,fCutsTight->GetPtBinLimits()[0],0.99,0.};// Use OverFlow/UnderFlow to get other cases
- Double_t binUpLimitSparseCxyLxy[4]={2.100,fCutsTight->GetPtBinLimits()[fCutsTight->GetNPtBins()],1.,50.};
+ Double_t binUpLimitSparseCxyLxy[4]={2.100,fCutsTight->GetPtBinLimits()[fCutsTight->GetNPtBins()],1.,20.};
Double_t *ptbinlimitsCxyLxy=new Double_t[fCutsTight->GetNPtBins()+1];
for(Int_t nBins=0;nBins<=fCutsTight->GetNPtBins();nBins++){
ptbinlimitsCxyLxy[nBins]=fCutsTight->GetPtBinLimits()[nBins];
TH1F *hd0zD0ptNCfromDstar;
TH1F *hInvMassD0NCfromDstar,*hInvMassD0barNCfromDstar;
TH2F *hInvMassPtNCfromDstar=new TH2F("hInvMassPtNCfromDstar","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseNCfromDstar=new THnSparseF("hSparseNCfromDstar","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseNCfromDstar=new THnSparseF("hSparseNCfromDstar","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseNCfromDstar->SetBinEdges(0,massbins);
hSparseNCfromDstar->SetBinEdges(1,massbins);
hSparseNCfromDstar->SetBinEdges(2,ptbinsForNsparse);
TH1F *hd0zD0ptNCother;
TH1F *hInvMassD0NCother,*hInvMassD0barNCother;
TH2F *hInvMassPtNCother=new TH2F("hInvMassPtNCother","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseNCother=new THnSparseF("hSparseNCother","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseNCother=new THnSparseF("hSparseNCother","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseNCother->SetBinEdges(0,massbins);
hSparseNCother->SetBinEdges(1,massbins);
hSparseNCother->SetBinEdges(2,ptbinsForNsparse);
TH1F *hd0zD0ptLSCsign;
TH1F *hInvMassD0LSCsign,*hInvMassD0barLSCsign;
TH2F *hInvMassPtLSCsign=new TH2F("hInvMassPtLSCsign","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseLSCsign=new THnSparseF("hSparseLSCsign","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseLSCsign=new THnSparseF("hSparseLSCsign","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseLSCsign->SetBinEdges(0,massbins);
hSparseLSCsign->SetBinEdges(1,massbins);
hSparseLSCsign->SetBinEdges(2,ptbinsForNsparse);
- THnSparseF *hSparseCxyLxyLSCsign=new THnSparseF("hSparseCxyLxyLSCsign","Candidate Mass;massD0;Pt;CosXY;Lxy",4,nbinsSparsCxyLxy,binLowLimitSparseCxyLxy,binUpLimitSparseCxyLxy);
+ THnSparseF *hSparseCxyLxyLSCsign=new THnSparseF("hSparseCxyLxyLSCsign","Candidate Mass;massD0;Pt;CosXY;Lxy",4,nbinsSparsCxyLxy,binLowLimitSparseCxyLxy,binUpLimitSparseCxyLxy);
hSparseCxyLxyLSCsign->SetBinEdges(1,ptbinlimitsCxyLxy);
hSparseCxyLxyLSCsign->GetAxis(0)->SetName("mass");
hSparseCxyLxyLSCsign->GetAxis(0)->SetTitle("Invariant Mass (K#pi) [GeV/c^{2}]");
TH1F *hd0zD0ptLSCback;
TH1F *hInvMassD0LSCback,*hInvMassD0barLSCback;
TH2F *hInvMassPtLSCback=new TH2F("hInvMassPtLSCback","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseLSCback=new THnSparseF("hSparseLSCback","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseLSCback=new THnSparseF("hSparseLSCback","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseLSCback->SetBinEdges(0,massbins);
hSparseLSCback->SetBinEdges(1,massbins);
hSparseLSCback->SetBinEdges(2,ptbinsForNsparse);
TH1F *hd0zD0ptLSCfromB;
TH1F *hInvMassD0LSCfromB,*hInvMassD0barLSCfromB;
TH2F *hInvMassPtLSCfromB=new TH2F("hInvMassPtLSCfromB","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseLSCfromB=new THnSparseF("hSparseLSCfromB","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseLSCfromB=new THnSparseF("hSparseLSCfromB","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseLSCfromB->SetBinEdges(0,massbins);
hSparseLSCfromB->SetBinEdges(1,massbins);
hSparseLSCfromB->SetBinEdges(2,ptbinsForNsparse);
TH1F *hd0zD0ptLSCfromDstar;
TH1F *hInvMassD0LSCfromDstar,*hInvMassD0barLSCfromDstar;
TH2F *hInvMassPtLSCfromDstar=new TH2F("hInvMassPtLSCfromDstar","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseLSCfromDstar=new THnSparseF("hSparseLSCfromDstar","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseLSCfromDstar=new THnSparseF("hSparseLSCfromDstar","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseLSCfromDstar->SetBinEdges(0,massbins);
hSparseLSCfromDstar->SetBinEdges(1,massbins);
hSparseLSCfromDstar->SetBinEdges(2,ptbinsForNsparse);
TH1F *hd0zD0ptLSCother;
TH1F *hInvMassD0LSCother,*hInvMassD0barLSCother;
TH2F *hInvMassPtLSCother=new TH2F("hInvMassPtLSCother","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseLSCother=new THnSparseF("hSparseLSCother","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseLSCother=new THnSparseF("hSparseLSCother","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseLSCother->SetBinEdges(0,massbins);
hSparseLSCother->SetBinEdges(1,massbins);
hSparseLSCother->SetBinEdges(2,ptbinsForNsparse);
TH1F *hd0zD0ptTGHCsign;
TH1F *hInvMassD0TGHCsign,*hInvMassD0barTGHCsign;
TH2F *hInvMassPtTGHCsign=new TH2F("hInvMassPtTGHCsign","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseTGHCsign=new THnSparseF("hSparseTGHCsign","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseTGHCsign=new THnSparseF("hSparseTGHCsign","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseTGHCsign->SetBinEdges(0,massbins);
hSparseTGHCsign->SetBinEdges(1,massbins);
hSparseTGHCsign->SetBinEdges(2,ptbinsForNsparse);
hSparseTGHCsign->SetBinEdges(4,massHypoBins);
flistTghCutsSignal->Add(hSparseTGHCsign);
- THnSparseF *hSparseRecoTGHCfromB=new THnSparseF("hSparseRecoTGHCfromB","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
- hSparseRecoTGHCfromB->SetBinEdges(0,massbins);
- hSparseRecoTGHCfromB->SetBinEdges(1,massbins);
- hSparseRecoTGHCfromB->SetBinEdges(2,ptbinsForNsparse);
- hSparseRecoTGHCfromB->SetBinEdges(3,impparbins);
- hSparseRecoTGHCfromB->SetBinEdges(4,massHypoBins);
- flistTghCutsFromB->Add(hSparseRecoTGHCfromB);
-
-
THnSparseF *hSparseCxyLxyTGHCsign=new THnSparseF("hSparseCxyLxyTGHCsign","Candidate Mass;massD0;Pt;CosXY;Lxy",4,nbinsSparsCxyLxy,binLowLimitSparseCxyLxy,binUpLimitSparseCxyLxy);
hSparseCxyLxyTGHCsign->SetBinEdges(1,ptbinlimitsCxyLxy);
TH1F *hd0zD0ptTGHCback;
TH1F *hInvMassD0TGHCback,*hInvMassD0barTGHCback;
TH2F *hInvMassPtTGHCback=new TH2F("hInvMassPtTGHCback","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseTGHCback=new THnSparseF("hSparseTGHCback","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseTGHCback=new THnSparseF("hSparseTGHCback","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseTGHCback->SetBinEdges(0,massbins);
hSparseTGHCback->SetBinEdges(1,massbins);
hSparseTGHCback->SetBinEdges(2,ptbinsForNsparse);
TH1F *hd0zD0ptTGHCfromB;
TH1F *hInvMassD0TGHCfromB,*hInvMassD0barTGHCfromB;
TH2F *hInvMassPtTGHCfromB=new TH2F("hInvMassPtTGHCfromB","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseTGHCfromB=new THnSparseF("hSparseTGHCfromB","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseTGHCfromB=new THnSparseF("hSparseTGHCfromB","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseTGHCfromB->SetBinEdges(0,massbins);
hSparseTGHCfromB->SetBinEdges(1,massbins);
hSparseTGHCfromB->SetBinEdges(2,ptbinsForNsparse);
hSparseTGHCfromB->SetBinEdges(3,impparbins);
hSparseTGHCfromB->SetBinEdges(4,massHypoBins);
flistTghCutsFromB->Add(hSparseTGHCfromB);
+
+
+ THnSparseF *hSparseRecoTGHCfromB=new THnSparseF("hSparseRecoTGHCfromB","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ hSparseRecoTGHCfromB->SetBinEdges(0,massbins);
+ hSparseRecoTGHCfromB->SetBinEdges(1,massbins);
+ hSparseRecoTGHCfromB->SetBinEdges(2,ptbinsForNsparse);
+ hSparseRecoTGHCfromB->SetBinEdges(3,impparbins);
+ hSparseRecoTGHCfromB->SetBinEdges(4,massHypoBins);
+ flistTghCutsFromB->Add(hSparseRecoTGHCfromB);
+
TH1F *hetaTGHCfromB;
TH1F *hCosPDPBTGHCfromB;
TH1F *hCosPcPDTGHCfromB;
TH1F *hInvMassD0TGHCfromDstar,*hInvMassD0barTGHCfromDstar;
TH1F *hetaTGHCfromDstar;
TH2F *hInvMassPtTGHCfromDstar=new TH2F("hInvMassPtTGHCfromDstar","Candidate p_{t} Vs invariant mass",330,1.700,2.030,200,0.,20.);
- THnSparseF *hSparseTGHCfromDstar=new THnSparseF("hSparseTGHCfromDstar","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
+ THnSparseF *hSparseTGHCfromDstar=new THnSparseF("hSparseTGHCfromDstar","Candidate Masses, pt, Imp Par;massD0;massD0bar;pt;impactpar;selcase",5,nbinsSparse);
hSparseTGHCfromDstar->SetBinEdges(0,massbins);
hSparseTGHCfromDstar->SetBinEdges(1,massbins);
hSparseTGHCfromDstar->SetBinEdges(2,ptbinsForNsparse);
isSideBandD0=kFALSE;
isSideBandD0bar=kFALSE;
isSideBand=kFALSE;
- isinacceptance=kFALSE;
+ isinacceptance=kTRUE;
okd0tight=0;
okd0bartight=0;
okd0tightnopid=0;
if(signallevel==1||signallevel==0)FillHistos(d,flistNoCutsSignal,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar,massmumtrue,aodDMC,vtxTrue); // else if(fusePID&&signallevel>=30&&signallevel<40)FillHistos(d,flistNoCutsSignal,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar,massmumtrue,aodDMC,vtxTrue);// OLD LINE, COULD BE REMOVED
else if(signallevel==2)FillHistos(d,flistNoCutsFromDstar,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar,massmumtrue,aodDMC,vtxTrue);
else if(signallevel==3||signallevel==4)FillHistos(d,flistNoCutsFromB,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar,massmumtrue,aodDMC,vtxTrue);
- else if(signallevel==-1||signallevel==7||signallevel==8||signallevel==10||signallevel==9||signallevel==11)FillHistos(d,flistNoCutsBack,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar,massmumtrue,aodDMC,vtxTrue);
+ else if(signallevel==-1||signallevel==7||signallevel==8||signallevel==10||signallevel==11)FillHistos(d,flistNoCutsBack,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar,massmumtrue,aodDMC,vtxTrue);
else if(signallevel==5||signallevel==6)FillHistos(d,flistNoCutsOther,ptbin,okd0tightnopid,okd0bartightnopid,invMassD0,invMassD0bar,isPeakD0,isPeakD0bar,isSideBandD0,isSideBandD0bar,massmumtrue,aodDMC,vtxTrue);
Bool_t isfromDstar=kFALSE;
grandmoth1=(AliAODMCParticle*)arrayMC->At(mum1->GetMother());
- if(TMath::Abs(grandmoth1->GetPdgCode())==413||TMath::Abs(grandmoth1->GetPdgCode())==423)isfromDstar=kTRUE;// D0 COMING FROM A D0*
+ if(TMath::Abs(grandmoth1->GetPdgCode())==413||TMath::Abs(grandmoth1->GetPdgCode())==423)isfromDstar=kTRUE;// D0 COMING FROM A D*
Int_t origin=CheckOrigin(arrayMC,mum1);
if(origin==4){
-#ifndef ALIANALYSISTASKSECHARMFRACTION_H
-#define ALIANALYSISTASKSECHARMFRACTION_H
-
-/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
-
-//*************************************************************************
-// Class AliAnalysisTaskSECharmFraction
-// AliAnalysisTask for the extraction of the fraction of prompt charm
-// using the charm hadron impact parameter to the primary vertex
-//
-//
-// Author: Andrea Rossi andrea.rossi@pd.infn.it
-//*************************************************************************
-
-class TH1F;
-class TH2F;
-class AliAODDEvent;
-class AliAODMCHeader;
-class AliAODRecoDecayHF2Prong;
-class AliAODRecoDecayHF;
-class AliAODMCParticle;
-class AliAnalysisVertexingHF;
-class AliRDHFCutsD0toKpi;
-class AliNormalizationCounter;
-
-#include "AliAnalysisTaskSE.h"
-
-class AliAnalysisTaskSECharmFraction : public AliAnalysisTaskSE {
- public:
- AliAnalysisTaskSECharmFraction();
- AliAnalysisTaskSECharmFraction(const char *name);
- AliAnalysisTaskSECharmFraction(const char *name,AliRDHFCutsD0toKpi *cutsA,AliRDHFCutsD0toKpi *cutsB);
-
- virtual ~AliAnalysisTaskSECharmFraction();
-
- // Implementation of interface methods
- virtual void UserCreateOutputObjects();
- virtual void Init();
- virtual void LocalInit() {Init();}
- virtual void UserExec(Option_t *option);
- virtual void Terminate(Option_t *option);
- void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
- void SetSplitMassD0D0bar(Bool_t splitD0D0bar=kTRUE){fsplitMassD0D0bar=splitD0D0bar;}
- Bool_t GetIsSplitMassD0D0bar(){return fsplitMassD0D0bar;}
- void SetUsePID(Bool_t pid){fusePID=pid;}
- void SetAnalyzeLikeSign(Bool_t likesign=kFALSE){fLikeSign=likesign;}
- void SetNMaxTrForVtx(const Int_t ntrMaxforVtx){fNtrMaxforVtx=ntrMaxforVtx;}
- Int_t GetNMaxTrForVtx(){return fNtrMaxforVtx;}
- void SetPtBins(Int_t nbins,const Float_t *ptbins);
- void SetSignalInvMassCut(const Double_t signalInvMassCut=0.027){fsignalInvMassCut=signalInvMassCut;}
- void SetLargeInvMassCut(const Double_t largeInvMassCut=2.){flargeInvMassCut=largeInvMassCut;}
- void SetSideBandInvMassCut(const Double_t sidebandInvMassCut=0.054){// default value ~ 2x3 times inv mass resol.: a factor 2 is applied w.r.t. 3sigma, should be safe enough to exclude most of the reflections
- fsidebandInvMassCut=sidebandInvMassCut;
- }
- void SetSideBandInvMassWindow(const Double_t sidebandInvMassWindow=0.108){//~ 6 times inv. mass resol.
- fsidebandInvMassWindow=sidebandInvMassWindow;
- }
- void SetAcceptanceCut(const Double_t eta=0.8,const Double_t nITSpoints=5.,const Double_t nSPDpoints=2.){fAcceptanceCuts[0]=eta;fAcceptanceCuts[1]=nITSpoints;fAcceptanceCuts[2]=nSPDpoints;}
- void SetStandardMassSelection();
- Int_t SetStandardCuts(Double_t pt,Double_t invMassCut);
- Int_t SetStandardCuts(Float_t *&ptbinlimits);
- void CheckInvMassD0(AliAODRecoDecayHF2Prong *d,Double_t &invMassD0,Double_t &invMassD0bar,Bool_t &isPeakD0,Bool_t &isPeakD0bar,Bool_t &isSideBandD0,Bool_t &isSideBandD0bar);
- void SetAnalysisLevel(Int_t level){fFastAnalysis=level;}
- Int_t GetAnalysisLevel(){return fFastAnalysis;}
- Int_t CheckOrigin(const TClonesArray* arrayMC, const AliAODMCParticle *mcPartCandidate)const;
- AliAODRecoDecayHF *GetD0toKPiSignalType(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx);
- AliAODRecoDecayHF *GetD0toKPiSignalTypeObsolete(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx);
- AliAODRecoDecayHF* ConstructFakeTrueSecVtx(const AliAODMCParticle *b1,const AliAODMCParticle *b2,const AliAODMCParticle *mum,Double_t *primaryVtxTrue);
- void SetUseMC(Bool_t useMC){fUseMC=useMC;}
- Bool_t SpecialSelD0(AliAODRecoDecayHF2Prong *d,Int_t &nusedforVtx);
- Bool_t FillAziList(AliAODEvent *aod,Double_t azilist[30000],Int_t trkIDlist[30000],Int_t &nprim)const;
- void FillAziHistos(AliAODRecoDecayHF2Prong *d,TList *&list,Int_t ptbin,Double_t azilist[30000],Int_t trkIDlist[30000],Int_t nprim,Int_t okD0,Int_t okD0bar,Bool_t isPeakD0,Bool_t isPeakD0bar,Bool_t isSideBandD0,Bool_t isSideBandD0bar)const;
-
- AliAODVertex* GetPrimaryVtxSkipped(AliAODEvent *aodev,AliAODRecoDecayHF2Prong *d);
-
- /* ######### THE FOLLOWING IS FOR FURTHER IMPLEMENATION ############
- Int_t GetPtBin(Double_t pt)const;
- void SetD0Cuts(Int_t ptbin,Double_t &*d0cutsLoose,Double_t &*d0cutsTight);
-
- // void InvMassSelection();
-
- void SetCheckMC(Bool_t checkMC){fcheckMC=checkMC;}
- void SetCheckMC_D0(Bool_t check_D0){fcheckMCD0=check_D0;}
- void SetCheckMC_2prongs(Bool_t check2prongs){fcheckMC2prongs=check2prongs;}
- void SetCheckMC_prompt(Bool_t checkprompt){fcheckMCprompt=checkprompt;}
- void SetCheckMC_fromB(Bool_t checkfromB){fcheckMCfromB=checkfromB;}
- void SetCheckMC_fromDstar(Bool_t skipD0star){fSkipD0star=skipD0star;}
- void SetUseCuts(Bool_t usecuts){fD0usecuts=usecuts;}
- void SetSideBands(Double_t sideband){fSideBands=sideband;}
- void SetStudyPureBackground(Bool_t back){fStudyPureBackground=back;}
- */
- AliRDHFCutsD0toKpi* GetLooseCut(){
- return fCutsLoose;
- }
- AliRDHFCutsD0toKpi* GetTightCut(){
- return fCutsTight;
- }
- /* void SetCutFunction(Int_t (*setcuts)(AliAnalysisTaskSECharmFraction*,Double_t,Double_t)){
- fSetCuts=setcuts;
- fStandCuts=kFALSE;
- }
- */
- // Int_t SetCuts(AliAnalysisTaskSECharmFraction *alchfr,Double_t pt,Double_t invMassCut);
-
- private:
- Bool_t FillHistos(AliAODRecoDecayHF2Prong *d,TList *&list,Int_t ptbin,Int_t okD0,Int_t okD0bar,Double_t invMassD0,Double_t invMassD0bar,Bool_t isPeakD0,Bool_t isPeakD0bar,Bool_t isSideBandD0,Bool_t isSideBandD0bar,Double_t massmumtrue,AliAODRecoDecayHF *aodDMC,Double_t *vtxTrue);
- void FillHistoMCproperties(TClonesArray *arrayMC);
-
- AliRDHFCutsD0toKpi *fCutsLoose; // Loose cuts object
- AliRDHFCutsD0toKpi *fCutsTight; // Vertexer heavy flavour
- Int_t fFastAnalysis; // Level of analysis speed: default is 1, switch it to 2 to fill the THnSparse
- Bool_t fReadMC; // Flag To switch on/off access to MC
- Bool_t fsplitMassD0D0bar; // Flag to use two shistos for D0 and D0bar invariant masses
- Bool_t fLikeSign; // Flag to analyse Like Sign array
- Bool_t fusePID; // Flag to use PID
- Double_t fmD0PDG; // MC D0 mass
- Int_t fnbins; // Number of pt bins
- Float_t *fptbins; //[fnbins] ptbins
- Int_t fNtrMaxforVtx; // N Max acceptable tracks used for vertex (0,1,2)
- Double_t fptAll; //!Sum of pt of the reco tracks
- Double_t fptAllSq; //!Sum of the square of the pt of the reco tracks
- Double_t fptMax[3]; //!Three largest track pt in the event
- Double_t fAcceptanceCuts[3]; // array with acceptance cuts
- Double_t fsignalInvMassCut; // invariant mass cut to define signal region
- Double_t flargeInvMassCut; // invariant mass cut to accept all inv mass window
- Double_t fsidebandInvMassCut; // invariant mass cut to define side band region lower limit
- Double_t fsidebandInvMassWindow; // invariant mass cut to define side band region width
- Bool_t fUseMC; // flag to use or not MC info
- Bool_t fCleanCandOwnVtx; // flag to switch on/off cleaning of the candidate own vtx
- TH1F *fNentries; //!histo for #AOD analysed, container 1
- TH1F *fSignalType; //!histo for the type of MC signal , container 2
- TH1F *fSignalTypeLsCuts; //!histo for the type of MC signal with loose cuts , container 3
- TH1F *fSignalTypeTghCuts; //!histo for the type of MC signal with tight cuts, container 4
- AliNormalizationCounter *fCounter; //!counter for the normalization
- TList *flistMCproperties; //!TLists for MC properties of D0 w.r.t. B mesons and c quarks cntainer 5
- TList *flistNoCutsSignal; //!TList for signal (D prompt) with nocuts, container 6
- TList *flistNoCutsBack; //!TList for background with nocuts, container 7
- TList *flistNoCutsFromB; //!TList for D from B or D from Dstar from Bwith nocuts, container 8
- TList *flistNoCutsFromDstar; //!TList for D from Dstar with nocuts, container 9
- TList *flistNoCutsOther; //!TList for others with nocuts, container 10
- TList *flistLsCutsSignal; //!TList for signal (D prompt) with loose cuts, container 11
- TList *flistLsCutsBack; //!TList for background with loose cuts, container 12
- TList *flistLsCutsFromB; //!TList for D from B or D from Dstar from B with loose cuts, container 13
- TList *flistLsCutsFromDstar; //!TList for D from Dstar with loose cuts, container 14
- TList *flistLsCutsOther; //!TList for others with loose cuts, container 15
- TList *flistTghCutsSignal; //!TList for signal (D prompt) with tight cuts, container 16
- TList *flistTghCutsBack; //!TList for backgrnd with tight cuts, container 17
- TList *flistTghCutsFromB; //!TList for D from B or D from Dstar from Bwith tight cuts, container 18
- TList *flistTghCutsFromDstar; //!TList for D from Dstar Dstar with tight cuts, container 19
- TList *flistTghCutsOther; //!TList for others with tight cuts, container 20
- /* Bool_t fD0usecuts; // Switch on the use of the cuts TO BE IMPLEMENTED
- Bool_t fcheckMC; // Switch on MC check: minimum check is same mother TO BE IMPLEMENTED
- Bool_t fcheckMCD0; // check the mother is a D0 TO BE IMPLEMENTED
- Bool_t fcheckMC2prongs; // check the decay is in two prongs TO BE IMPLEMENTED
- Bool_t fcheckMCprompt; // check the D0 comes from a c quark TO BE IMPLEMENTED
- Bool_t fcheckMCfromB; // check the D0 comes from a b quark TO BE IMPLEMENTED
- Bool_t fSkipD0star; // skip if D0 comes from a D* TO BE IMPLEMENTED
- Bool_t fStudyd0fromBTrue; // Flag for analyze true impact par of D0 from B TO BE IMPLEMENTED
- Bool_t fStudyPureBackground; // Flag to study the background (reverse the selection on the signal) TO BE IMPLEMENTED
- Double_t fSideBands; //Side bands selection (see cxx) TO BE IMPLEMENTED
- */
- AliAnalysisTaskSECharmFraction(const AliAnalysisTaskSECharmFraction&); // not implemented
- AliAnalysisTaskSECharmFraction& operator=(const AliAnalysisTaskSECharmFraction&); // not implemented
-
- ClassDef(AliAnalysisTaskSECharmFraction,3); // analysis task for prompt charm fraction
-};
-
-#endif
+#ifndef ALIANALYSISTASKSECHARMFRACTION_H\r
+#define ALIANALYSISTASKSECHARMFRACTION_H\r
+\r
+/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *\r
+ * See cxx source for full Copyright notice */\r
+\r
+//*************************************************************************\r
+// Class AliAnalysisTaskSECharmFraction\r
+// AliAnalysisTask for the extraction of the fraction of prompt charm\r
+// using the charm hadron impact parameter to the primary vertex\r
+//\r
+//\r
+// Author: Andrea Rossi andrea.rossi@pd.infn.it\r
+//*************************************************************************\r
+\r
+class TH1F;\r
+class TH2F;\r
+class AliAODDEvent;\r
+class AliAODMCHeader;\r
+class AliAODRecoDecayHF2Prong;\r
+class AliAODRecoDecayHF;\r
+class AliAODMCParticle;\r
+class AliAnalysisVertexingHF;\r
+class AliRDHFCutsD0toKpi;\r
+class AliNormalizationCounter;\r
+\r
+#include "AliAnalysisTaskSE.h"\r
+\r
+class AliAnalysisTaskSECharmFraction : public AliAnalysisTaskSE {\r
+ public:\r
+ AliAnalysisTaskSECharmFraction();\r
+ AliAnalysisTaskSECharmFraction(const char *name);\r
+ AliAnalysisTaskSECharmFraction(const char *name,AliRDHFCutsD0toKpi *cutsA,AliRDHFCutsD0toKpi *cutsB);\r
+\r
+ virtual ~AliAnalysisTaskSECharmFraction(); \r
+\r
+ // Implementation of interface methods\r
+ virtual void UserCreateOutputObjects();\r
+ virtual void Init();\r
+ virtual void LocalInit() {Init();}\r
+ virtual void UserExec(Option_t *option);\r
+ virtual void Terminate(Option_t *option); \r
+ void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}\r
+ void SetSplitMassD0D0bar(Bool_t splitD0D0bar=kTRUE){fsplitMassD0D0bar=splitD0D0bar;}\r
+ Bool_t GetIsSplitMassD0D0bar(){return fsplitMassD0D0bar;}\r
+ void SetUsePID(Bool_t pid){fusePID=pid;}\r
+ void SetAnalyzeLikeSign(Bool_t likesign=kFALSE){fLikeSign=likesign;}\r
+ void SetNMaxTrForVtx(const Int_t ntrMaxforVtx){fNtrMaxforVtx=ntrMaxforVtx;}\r
+ Int_t GetNMaxTrForVtx(){return fNtrMaxforVtx;}\r
+ void SetPtBins(Int_t nbins,const Float_t *ptbins);\r
+ void SetSignalInvMassCut(const Double_t signalInvMassCut=0.027){fsignalInvMassCut=signalInvMassCut;}\r
+ void SetLargeInvMassCut(const Double_t largeInvMassCut=2.){flargeInvMassCut=largeInvMassCut;}\r
+ void SetSideBandInvMassCut(const Double_t sidebandInvMassCut=0.054){// default value ~ 2x3 times inv mass resol.: a factor 2 is applied w.r.t. 3sigma, should be safe enough to exclude most of the reflections \r
+ fsidebandInvMassCut=sidebandInvMassCut; \r
+ }\r
+ void SetSideBandInvMassWindow(const Double_t sidebandInvMassWindow=0.108){//~ 6 times inv. mass resol.\r
+ fsidebandInvMassWindow=sidebandInvMassWindow;\r
+ } \r
+ void SetAcceptanceCut(const Double_t eta=0.8,const Double_t nITSpoints=5.,const Double_t nSPDpoints=2.){fAcceptanceCuts[0]=eta;fAcceptanceCuts[1]=nITSpoints;fAcceptanceCuts[2]=nSPDpoints;}\r
+ void SetStandardMassSelection();\r
+ Int_t SetStandardCuts(Double_t pt,Double_t invMassCut);\r
+ Int_t SetStandardCuts(Float_t *&ptbinlimits);\r
+ void CheckInvMassD0(AliAODRecoDecayHF2Prong *d,Double_t &invMassD0,Double_t &invMassD0bar,Bool_t &isPeakD0,Bool_t &isPeakD0bar,Bool_t &isSideBandD0,Bool_t &isSideBandD0bar);\r
+ void SetAnalysisLevel(Int_t level){fFastAnalysis=level;}\r
+ Int_t GetAnalysisLevel(){return fFastAnalysis;}\r
+ Int_t CheckOrigin(const TClonesArray* arrayMC, const AliAODMCParticle *mcPartCandidate)const;\r
+ AliAODRecoDecayHF *GetD0toKPiSignalType(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx);\r
+ AliAODRecoDecayHF *GetD0toKPiSignalTypeObsolete(const AliAODRecoDecayHF2Prong *d,TClonesArray *arrayMC,Int_t &signaltype,Double_t &massMumTrue,Double_t *primaryVtx);\r
+ AliAODRecoDecayHF* ConstructFakeTrueSecVtx(const AliAODMCParticle *b1,const AliAODMCParticle *b2,const AliAODMCParticle *mum,Double_t *primaryVtxTrue);\r
+ void SetUseMC(Bool_t useMC){fUseMC=useMC;}\r
+ Bool_t SpecialSelD0(AliAODRecoDecayHF2Prong *d,Int_t &nusedforVtx);\r
+ Bool_t FillAziList(AliAODEvent *aod,Double_t azilist[30000],Int_t trkIDlist[30000],Int_t &nprim)const;\r
+ void FillAziHistos(AliAODRecoDecayHF2Prong *d,TList *&list,Int_t ptbin,Double_t azilist[30000],Int_t trkIDlist[30000],Int_t nprim,Int_t okD0,Int_t okD0bar,Bool_t isPeakD0,Bool_t isPeakD0bar,Bool_t isSideBandD0,Bool_t isSideBandD0bar)const;\r
+\r
+ AliAODVertex* GetPrimaryVtxSkipped(AliAODEvent *aodev,AliAODRecoDecayHF2Prong *d);\r
+ \r
+ /* ######### THE FOLLOWING IS FOR FURTHER IMPLEMENATION ############\r
+ Int_t GetPtBin(Double_t pt)const;\r
+ void SetD0Cuts(Int_t ptbin,Double_t &*d0cutsLoose,Double_t &*d0cutsTight);\r
+ \r
+ // void InvMassSelection();\r
+ \r
+ void SetCheckMC(Bool_t checkMC){fcheckMC=checkMC;}\r
+ void SetCheckMC_D0(Bool_t check_D0){fcheckMCD0=check_D0;}\r
+ void SetCheckMC_2prongs(Bool_t check2prongs){fcheckMC2prongs=check2prongs;}\r
+ void SetCheckMC_prompt(Bool_t checkprompt){fcheckMCprompt=checkprompt;}\r
+ void SetCheckMC_fromB(Bool_t checkfromB){fcheckMCfromB=checkfromB;}\r
+ void SetCheckMC_fromDstar(Bool_t skipD0star){fSkipD0star=skipD0star;}\r
+ void SetUseCuts(Bool_t usecuts){fD0usecuts=usecuts;}\r
+ void SetSideBands(Double_t sideband){fSideBands=sideband;}\r
+ void SetStudyPureBackground(Bool_t back){fStudyPureBackground=back;}\r
+ */\r
+ AliRDHFCutsD0toKpi* GetLooseCut(){\r
+ return fCutsLoose;\r
+ }\r
+ AliRDHFCutsD0toKpi* GetTightCut(){\r
+ return fCutsTight;\r
+ }\r
+ /* void SetCutFunction(Int_t (*setcuts)(AliAnalysisTaskSECharmFraction*,Double_t,Double_t)){\r
+ fSetCuts=setcuts;\r
+ fStandCuts=kFALSE;\r
+ }\r
+ */\r
+ // Int_t SetCuts(AliAnalysisTaskSECharmFraction *alchfr,Double_t pt,Double_t invMassCut);\r
+ \r
+ private:\r
+ Bool_t FillHistos(AliAODRecoDecayHF2Prong *d,TList *&list,Int_t ptbin,Int_t okD0,Int_t okD0bar,Double_t invMassD0,Double_t invMassD0bar,Bool_t isPeakD0,Bool_t isPeakD0bar,Bool_t isSideBandD0,Bool_t isSideBandD0bar,Double_t massmumtrue,AliAODRecoDecayHF *aodDMC,Double_t *vtxTrue);\r
+ void FillHistoMCproperties(TClonesArray *arrayMC);\r
+\r
+ AliRDHFCutsD0toKpi *fCutsLoose; // Loose cuts object\r
+ AliRDHFCutsD0toKpi *fCutsTight; // Vertexer heavy flavour\r
+ Int_t fFastAnalysis; // Level of analysis speed: default is 1, switch it to 2 to fill the THnSparse\r
+ Bool_t fReadMC; // Flag To switch on/off access to MC \r
+ Bool_t fsplitMassD0D0bar; // Flag to use two shistos for D0 and D0bar invariant masses\r
+ Bool_t fLikeSign; // Flag to analyse Like Sign array\r
+ Bool_t fusePID; // Flag to use PID\r
+ Double_t fmD0PDG; // MC D0 mass\r
+ Int_t fnbins; // Number of pt bins\r
+ Float_t *fptbins; //[fnbins] ptbins \r
+ Int_t fNtrMaxforVtx; // N Max acceptable tracks used for vertex (0,1,2)\r
+ Double_t fptAll; //!Sum of pt of the reco tracks\r
+ Double_t fptAllSq; //!Sum of the square of the pt of the reco tracks\r
+ Double_t fptMax[3]; //!Three largest track pt in the event\r
+ Double_t fAcceptanceCuts[3]; // array with acceptance cuts\r
+ Double_t fsignalInvMassCut; // invariant mass cut to define signal region\r
+ Double_t flargeInvMassCut; // invariant mass cut to accept all inv mass window\r
+ Double_t fsidebandInvMassCut; // invariant mass cut to define side band region lower limit\r
+ Double_t fsidebandInvMassWindow; // invariant mass cut to define side band region width\r
+ Bool_t fUseMC; // flag to use or not MC info\r
+ Bool_t fCleanCandOwnVtx; // flag to switch on/off cleaning of the candidate own vtx\r
+ TH1F *fNentries; //!histo for #AOD analysed, container 1\r
+ TH1F *fSignalType; //!histo for the type of MC signal , container 2\r
+ TH1F *fSignalTypeLsCuts; //!histo for the type of MC signal with loose cuts , container 3\r
+ TH1F *fSignalTypeTghCuts; //!histo for the type of MC signal with tight cuts, container 4\r
+ AliNormalizationCounter *fCounter; //!counter for the normalization \r
+ TList *flistMCproperties; //!TLists for MC properties of D0 w.r.t. B mesons and c quarks cntainer 5\r
+ TList *flistNoCutsSignal; //!TList for signal (D prompt) with nocuts, container 6\r
+ TList *flistNoCutsBack; //!TList for background with nocuts, container 7\r
+ TList *flistNoCutsFromB; //!TList for D from B or D from Dstar from Bwith nocuts, container 8\r
+ TList *flistNoCutsFromDstar; //!TList for D from Dstar with nocuts, container 9\r
+ TList *flistNoCutsOther; //!TList for others with nocuts, container 10\r
+ TList *flistLsCutsSignal; //!TList for signal (D prompt) with loose cuts, container 11\r
+ TList *flistLsCutsBack; //!TList for background with loose cuts, container 12\r
+ TList *flistLsCutsFromB; //!TList for D from B or D from Dstar from B with loose cuts, container 13\r
+ TList *flistLsCutsFromDstar; //!TList for D from Dstar with loose cuts, container 14\r
+ TList *flistLsCutsOther; //!TList for others with loose cuts, container 15\r
+ TList *flistTghCutsSignal; //!TList for signal (D prompt) with tight cuts, container 16\r
+ TList *flistTghCutsBack; //!TList for backgrnd with tight cuts, container 17\r
+ TList *flistTghCutsFromB; //!TList for D from B or D from Dstar from Bwith tight cuts, container 18\r
+ TList *flistTghCutsFromDstar; //!TList for D from Dstar Dstar with tight cuts, container 19\r
+ TList *flistTghCutsOther; //!TList for others with tight cuts, container 20\r
+ /* Bool_t fD0usecuts; // Switch on the use of the cuts TO BE IMPLEMENTED \r
+ Bool_t fcheckMC; // Switch on MC check: minimum check is same mother TO BE IMPLEMENTED\r
+ Bool_t fcheckMCD0; // check the mother is a D0 TO BE IMPLEMENTED\r
+ Bool_t fcheckMC2prongs; // check the decay is in two prongs TO BE IMPLEMENTED \r
+ Bool_t fcheckMCprompt; // check the D0 comes from a c quark TO BE IMPLEMENTED\r
+ Bool_t fcheckMCfromB; // check the D0 comes from a b quark TO BE IMPLEMENTED\r
+ Bool_t fSkipD0star; // skip if D0 comes from a D* TO BE IMPLEMENTED\r
+ Bool_t fStudyd0fromBTrue; // Flag for analyze true impact par of D0 from B TO BE IMPLEMENTED \r
+ Bool_t fStudyPureBackground; // Flag to study the background (reverse the selection on the signal) TO BE IMPLEMENTED \r
+ Double_t fSideBands; //Side bands selection (see cxx) TO BE IMPLEMENTED\r
+ */\r
+ AliAnalysisTaskSECharmFraction(const AliAnalysisTaskSECharmFraction&); // not implemented\r
+ AliAnalysisTaskSECharmFraction& operator=(const AliAnalysisTaskSECharmFraction&); // not implemented\r
+ \r
+ ClassDef(AliAnalysisTaskSECharmFraction,3); // analysis task for prompt charm fraction\r
+};\r
+\r
+#endif\r