Added possibility to read like-sign pairs (Chiara B)
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Oct 2009 16:09:12 +0000 (16:09 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Oct 2009 16:09:12 +0000 (16:09 +0000)
PWG3/vertexingHF/AddTaskD0Mass.C
PWG3/vertexingHF/AliAnalysisTaskSED0Mass.cxx
PWG3/vertexingHF/AliAnalysisTaskSED0Mass.h

index 5d29db6..f226fce 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTaskSED0Mass *AddTaskD0Mass()
+AliAnalysisTaskSED0 *AddTaskD0(Int_t flag=0/*0 = D0,1 = LS*/)
 {
   //
   // AddTask for the AliAnalysisTaskSE for D0 candidates
@@ -12,14 +12,19 @@ AliAnalysisTaskSED0Mass *AddTaskD0Mass()
   //==============================================================================
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if (!mgr) {
-    ::Error("AddTaskD0MassDistr", "No analysis manager to connect to.");
+    ::Error("AddTaskD0Distr", "No analysis manager to connect to.");
     return NULL;
   }   
 
-  
+  TString filename="";
+  if(flag==0){
+    filename="D0InvMass.root"; 
+  } else filename="LSD0.root";
+
   // Aanalysis task    
-  AliAnalysisTaskSED0Mass *massD0Task = new AliAnalysisTaskSED0Mass("D0MassAndDistrAnalysis");
+  AliAnalysisTaskSED0 *massD0Task = new AliAnalysisTaskSED0("D0MassAndDistrAnalysis");
   massD0Task->SetDebugLevel(2);
+  massD0Task->SetArray(flag);
   mgr->AddTask(massD0Task);
   
   //
@@ -29,16 +34,16 @@ AliAnalysisTaskSED0Mass *AddTaskD0Mass()
 
   AliAnalysisDataContainer *coutputmassD01 = mgr->CreateContainer("coutputmassD01",TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          "D0InvMass.root");
+                                                          filename.Data());
   AliAnalysisDataContainer *coutputmassD02 = mgr->CreateContainer("coutputmassD02",TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          "D0InvMass.root");
+                                                          filename.Data());
   AliAnalysisDataContainer *coutputmassD03 = mgr->CreateContainer("nEntriesD0",TH1F::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          "D0InvMass.root");
+                                                          filename.Data());
   AliAnalysisDataContainer *coutputmassD04 = mgr->CreateContainer("coutputmassD0distr",TList::Class(),
                                                           AliAnalysisManager::kOutputContainer, 
-                                                          "D0InvMass.root");
+                                                          filename.Data());
 
   mgr->ConnectInput(massD0Task,0,mgr->GetCommonInputContainer());
 
index b82dea7..69d400d 100644 (file)
@@ -19,7 +19,8 @@
 // and comparison with the MC truth and cut variables distributions.
 //
 // Authors: A.Dainese, andrea.dainese@lnl.infn.it
-// and Chiara Bianchin, chiara.bianchin@pd.infn.it
+// Chiara Bianchin, chiara.bianchin@pd.infn.it (invariant mass)
+// Carmelo Di Giglio, carmelo.digiglio@ba.infn.it (like sign)
 /////////////////////////////////////////////////////////////
 
 #include <Riostream.h>
@@ -50,9 +51,12 @@ AliAnalysisTaskSE(),
 fOutputtight(0),
 fOutputloose(0),
 fDistr(0), 
+fNentries(0),
 fVHFtight(0),
 fVHFloose(0),
-fNentries(0)
+fArray(0),
+fLsNormalization(1.)
+
 {
   // Default constructor
 }
@@ -63,9 +67,11 @@ AliAnalysisTaskSE(name),
 fOutputtight(0), 
 fOutputloose(0), 
 fDistr(0),
+fNentries(0),
 fVHFtight(0),
 fVHFloose(0),
-fNentries(0)
+fArray(0),
+fLsNormalization(1.)
 {
   // Default constructor
 
@@ -180,7 +186,7 @@ void AliAnalysisTaskSED0Mass::UserCreateOutputObjects()
     tmpBt->Sumw2();
     tmpBl->Sumw2();
 
-    //Reflection: histo filled with D0 which pass the cut (also) as D0bar and with D0bar which pass (also) the cut as D0
+    //Reflection: histo filled with D0Mass which pass the cut (also) as D0bar and with D0bar which pass (also) the cut as D0
     TH1F* tmpRt = new TH1F(nameRfl.Data(), "Reflected signal invariant mass - MC; M [GeV]; Entries",200,1.765,1.965);
     TH1F *tmpRl=(TH1F*)tmpRt->Clone();
     tmpRt->Sumw2();
@@ -203,60 +209,44 @@ void AliAnalysisTaskSED0Mass::UserCreateOutputObjects()
   //  pT
   namedistr="hptpiS";
   TH1F *hptpiS = new TH1F(namedistr.Data(), "P_{T} distribution (pions);p_{T} [GeV/c]",200,0.,8.);
-//   namedistr="hptpiR";
-//   TH1F *hptpiR = new TH1F(namedistr.Data(), "P_{T} distribution (pions);p_{T} [GeV/c]",200,0.,8.);
 
   namedistr="hptKS";
   TH1F *hptKS = new TH1F(namedistr.Data(), "P_{T} distribution (kaons);p_{T} [GeV/c]",200,0.,8.);
 
   namedistr="hptB";
   TH1F *hptB = new TH1F(namedistr.Data(), "P_{T} distribution;p_{T} [GeV/c]",200,0.,8.);
-//   namedistr="hptKR";
-//   TH1F *hptKR = new TH1F(namedistr.Data(), "P_{T} distribution (kaons);p_{T} [GeV/c]",200,0.,8.);
 
   //  dca
   namedistr="hdcaS";
   TH1F *hdcaS = new TH1F(namedistr.Data(), "DCA distribution;dca [cm]",200,0.,0.1);
   namedistr="hdcaB";
   TH1F *hdcaB = new TH1F(namedistr.Data(), "DCA distribution;dca [cm]",200,0.,0.1);
-//   namedistr="hdcaR";
-//   TH1F *hdcaR = new TH1F(namedistr.Data(), "DCA distribution;dca [cm]",200,0.,0.1);
 
   //  costhetastar
-  namedistr="costhetastarS";
+  namedistr="hcosthetastarS";
   TH1F *hcosthetastarS = new TH1F(namedistr.Data(), "cos#theta* distribution;cos#theta*",200,-1.,1.);
-  namedistr="costhetastarB";
+  namedistr="hcosthetastarB";
   TH1F *hcosthetastarB = new TH1F(namedistr.Data(), "cos#theta* distribution;cos#theta*",200,-1.,1.);
-//   namedistr="costhetastarR";
-//   TH1F *hcosthetastarR = new TH1F(namedistr.Data(), "cos#theta* distribution;cos#theta*",200,-1.,1.);
 
   // impact parameter
   namedistr="hd0piS";
   TH1F *hd0piS = new TH1F(namedistr.Data(), "Impact parameter distribution (pions);d0(#pi) [cm]",200,-0.1,0.1);
-//   namedistr="hd0piR";
-//   TH1F *hd0piR = new TH1F(namedistr.Data(), "Impact parameter distribution (pions);d0(#pi) [cm]",200,0.,1.);
 
   namedistr="hd0KS";
   TH1F *hd0KS = new TH1F(namedistr.Data(), "Impact parameter distribution (kaons);d0(K) [cm]",200,-0.1,0.1);
   namedistr="hd0B";
   TH1F *hd0B = new TH1F(namedistr.Data(), "Impact parameter distribution;d0 [cm]",200,-0.1,0.1);
-//   namedistr="hd0KR";
-//   TH1F *hd0KR = new TH1F(namedistr.Data(), "Impact parameter distribution (kaons);d0(K) [cm]",200,0.,0.1);
 
   namedistr="hd0d0S";
   TH1F *hd0d0S = new TH1F(namedistr.Data(), "d_{0}#timesd_{0} distribution;d_{0}#timesd_{0} [cm^{2}]",200,-0.001,0.001);
   namedistr="hd0d0B";
   TH1F *hd0d0B = new TH1F(namedistr.Data(), "d_{0}#timesd_{0} distribution;d_{0}#timesd_{0} [cm^{2}]",200,-0.001,0.001);
-//   namedistr="hd0d0R";
-//   TH1F *hd0d0R = new TH1F(namedistr.Data(), "d_{0}#timesd_{0} distribution (pions);d_{0}#timesd_{0} [cm^{2}]",200,-0.001,0.001);
 
   //  costhetapoint
   namedistr="hcosthetapointS";
   TH1F *hcosthetapointS = new TH1F(namedistr.Data(), "cos#theta_{Point} distribution;cos#theta_{Point}",200,0,1.);
   namedistr="hcosthetapointB";
   TH1F *hcosthetapointB = new TH1F(namedistr.Data(), "cos#theta_{Point} distribution;cos#theta_{Point}",200,0,1.);
-//   namedistr="costhetapointR";
-//   TH1F *hcosthetapointR = new TH1F(namedistr.Data(), "cos#theta_{Point} distribution;cos#theta_{Point}",200,-1,1.);
 
   namedistr="hcosthpointd0d0S";
   TH2F *hcosthpointd0d0S= new TH2F(namedistr.Data(),"Correlation cos#theta_{Point}-d_{0}#timesd_{0};cos#theta_{Point};d_{0}#timesd_{0} [cm^{2}]",200,0,1.,200,-0.001,0.001);
@@ -264,32 +254,24 @@ void AliAnalysisTaskSED0Mass::UserCreateOutputObjects()
   TH2F *hcosthpointd0d0B= new TH2F(namedistr.Data(),"Correlation cos#theta_{Point}-d_{0}#timesd_{0};cos#theta_{Point};d_{0}#timesd_{0} [cm^{2}]",200,0,1.,200,-0.001,0.001);
 
   fDistr->Add(hptpiS);
-  //fDistr->Add(hptpiR);
   fDistr->Add(hptKS);
   fDistr->Add(hptB);
-  //fDistr->Add(hptKR);
 
   fDistr->Add(hdcaS);
   fDistr->Add(hdcaB);
-  //fDistr->Add(hdcaR);
 
   fDistr->Add(hd0piS);
-  //fDistr->Add(hd0piR);
   fDistr->Add(hd0KS);
   fDistr->Add(hd0B);
-  //fDistr->Add(hd0KR);
 
   fDistr->Add(hd0d0S);
   fDistr->Add(hd0d0B);
-  //fDistr->Add(hd0d0R);
 
   fDistr->Add(hcosthetastarS);
   fDistr->Add(hcosthetastarB);
-  //fDistr->Add(hcosthetastarR);
 
   fDistr->Add(hcosthetapointS);
   fDistr->Add(hcosthetapointB);
-  //fDistr->Add(hcosthetapointR);
 
   fDistr->Add(hcosthpointd0d0S);
   fDistr->Add(hcosthpointd0d0B);
@@ -306,19 +288,36 @@ void AliAnalysisTaskSED0Mass::UserExec(Option_t */*option*/)
   // heavy flavor candidates association to MC truth
   //cout<<"I'm in UserExec"<<endl;
   AliAODEvent *aod = dynamic_cast<AliAODEvent*> (InputEvent());
-  // load D0->Kpi candidates                                                   
-  TClonesArray *inputArrayD0toKpi =
-    (TClonesArray*)aod->GetList()->FindObject("D0toKpi");
-  if(!inputArrayD0toKpi) {
-    printf("AliAnalysisTaskSECompareHFpt::UserExec: D0toKpi branch not found!\n");
-    return;
+
+  TClonesArray *inputArray=0;
+
+  if(fArray==0){ //D0 candidates
+    // load D0->Kpi candidates                                                   
+    //cout<<"D0 candidates"<<endl;
+    inputArray =
+      (TClonesArray*)aod->GetList()->FindObject("D0toKpi");
+    if(!inputArray) {
+      printf("AliAnalysisTaskSECompareHFpt::UserExec: D0toKpi branch not found!\n");
+      return;
+    }
+
+  } else { //LikeSign candidates
+
+    //cout<<"LS candidates"<<endl;
+    // load like sign candidates
+    inputArray =
+      (TClonesArray*)aod->GetList()->FindObject("LikeSign2Prong");
+    if(!inputArray) {
+      printf("AliAnalysisTaskSEBkgLikeSignD0::UserExec: LikeSign2Prong branch not found!\n");
+      return;
+    }
+
   }
   
   // AOD primary vertex
   AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
   //vtx1->Print();
-  
+
   // load MC particles
   TClonesArray *mcArray = 
     (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
@@ -339,13 +338,14 @@ void AliAnalysisTaskSED0Mass::UserExec(Option_t */*option*/)
   //histogram filled with 1 for every AOD
   fNentries->Fill(1);
   PostData(3,fNentries);
-  // loop over D0->Kpi candidates
-  Int_t nInD0toKpi = inputArrayD0toKpi->GetEntriesFast();
-  AliDebug(2,Form("Number of D0->Kpi: %d",nInD0toKpi));
+  // loop over candidates
+  Int_t nInD0toKpi = inputArray->GetEntriesFast();
+  printf("Number of D0->Kpi: %d\n",nInD0toKpi);
   
   for (Int_t iD0toKpi = 0; iD0toKpi < nInD0toKpi; iD0toKpi++) {
+    //Int_t nPosPairs=0, nNegPairs=0;
     //cout<<"inside the loop"<<endl;
-    AliAODRecoDecayHF2Prong *d = (AliAODRecoDecayHF2Prong*)inputArrayD0toKpi->UncheckedAt(iD0toKpi);
+    AliAODRecoDecayHF2Prong *d = (AliAODRecoDecayHF2Prong*)inputArray->UncheckedAt(iD0toKpi);
     Bool_t unsetvtx=kFALSE;
     if(!d->GetOwnPrimaryVtx()) {
       d->SetOwnPrimaryVtx(vtx1); // needed to compute all variables
@@ -375,14 +375,12 @@ void AliAnalysisTaskSED0Mass::UserExec(Option_t */*option*/)
     Double_t minvD0bar = d->InvMassD0bar();
     //apply cut on invariant mass on the pair
     if(TMath::Abs(minvD0-mPDG)<0.03 || TMath::Abs(minvD0bar-mPDG)<0.03){
+      //cout<<"inside mass cut"<<endl;
       Int_t pdgDgD0toKpi[2]={321,211};
       Int_t lab=d->MatchToMC(421,mcArray,2,pdgDgD0toKpi); //return MC particle label if the array corresponds to a D0, -1 if not (cf. AliAODRecoDecay.cxx)
 
-      //      Int_t lab=d->MatchToMC(421,mcArray); //|pdg| requested
-//       AliAODMCParticle *mcmother = (AliAODMCParticle*)mcArray->At(lab);
-//       cout<<"mcmother name = "<<mcmother->GetName()<<" label = "<<mcmother->GetLabel()<<endl;
       if(lab>=0){ //signal
-       //cout<<"is signal"<<endl;
+       if(fArray==1) cout<<"LS signal: ERROR"<<endl;
        for (Int_t iprong=0; iprong<2; iprong++){
          AliAODTrack *prong=(AliAODTrack*)d->GetDaughter(iprong);
          Int_t labprong=prong->GetLabel();
@@ -407,8 +405,8 @@ void AliAnalysisTaskSED0Mass::UserExec(Option_t */*option*/)
        }
 
        if (((AliAODMCParticle*)mcArray->At(lab))->GetPdgCode() == 421)
-       ((TH1F*)fDistr->FindObject("costhetastarS"))->Fill(d->CosThetaStarD0());
-       else ((TH1F*)fDistr->FindObject("costhetastarS"))->Fill(d->CosThetaStarD0bar());
+         ((TH1F*)fDistr->FindObject("hcosthetastarS"))->Fill(d->CosThetaStarD0());
+       else ((TH1F*)fDistr->FindObject("hcosthetastarS"))->Fill(d->CosThetaStarD0bar());
 
        ((TH1F*)fDistr->FindObject("hd0d0S"))->Fill(d->Prodd0d0());
 
@@ -417,17 +415,22 @@ void AliAnalysisTaskSED0Mass::UserExec(Option_t */*option*/)
 
        //cout<<"ok point"<<endl;
 
-      } else{ //Background
+       
+      } else{ //Background or LS
        //cout<<"is background"<<endl;
-       //      AliAODTrack *prong=(AliAODTrack*)d->GetDaughter(0);
+       AliAODTrack *prong=(AliAODTrack*)d->GetDaughter(0);
+       if(!prong) cout<<"No daughter found";
+       else{
+         if(prong->Charge()==1) fTotPosPairs[4]++; else fTotNegPairs[4]++;
+       }
        ((TH1F*)fDistr->FindObject("hptB"))->Fill(d->PtProng(0));
        //cout<<"ptok"<<endl;
        ((TH1F*)fDistr->FindObject("hd0B"))->Fill(d->Getd0Prong(0));
        //cout<<"d0ok"<<endl;
        ((TH1F*)fDistr->FindObject("hdcaB"))->Fill(d->GetDCA());
        //cout<<"dcaok"<<endl;
-       ((TH1F*)fDistr->FindObject("costhetastarB"))->Fill(d->CosThetaStarD0());
-       ((TH1F*)fDistr->FindObject("costhetastarB"))->Fill(d->CosThetaStarD0bar());     
+       ((TH1F*)fDistr->FindObject("hcosthetastarB"))->Fill(d->CosThetaStarD0());
+       ((TH1F*)fDistr->FindObject("hcosthetastarB"))->Fill(d->CosThetaStarD0bar());    
        ((TH1F*)fDistr->FindObject("hd0d0B"))->Fill(d->Prodd0d0());
        //cout<<"d0d0ok"<<endl;
        ((TH1F*)fDistr->FindObject("hcosthetapointB"))->Fill(d->CosPointingAngle());
@@ -498,18 +501,21 @@ void AliAnalysisTaskSED0Mass::FillHists(Int_t ptbin, AliAODRecoDecayHF2Prong *pa
   // function used in UserExec:
   //
   Int_t okD0=0,okD0bar=0;
-
+  //cout<<"inside FillHist"<<endl;
   if(part->SelectD0(vhf->GetD0toKpiCuts(),okD0,okD0bar)) {//selected
     Double_t invmassD0 = part->InvMassD0(), invmassD0bar = part->InvMassD0bar();
     //printf("SELECTED\n");
+
+    AliAODTrack *prong=(AliAODTrack*)part->GetDaughter(0);
+    if(!prong) cout<<"No daughter found";
+    else{
+      if(prong->Charge()==1) fTotPosPairs[ptbin-1]++; else fTotNegPairs[ptbin-1]++;
+    }
+
+    TString fillthis="";
     Int_t pdgDgD0toKpi[2]={321,211};
     Int_t labD0 = part->MatchToMC(421,arrMC,2,pdgDgD0toKpi); //return MC particle label if the array corresponds to a D0, -1 if not (cf. AliAODRecoDecay.cxx)
 
-    //Int_t labD0 = part->MatchToMC(421,arrMC); //return MC particle label if the array corresponds to a D0, -1 if not (cf. AliAODRecoDecay.cxx)
-    //printf("labD0 %d",labD0);
-    
-    TString fillthis="";
-    
     if (okD0==1) {
       fillthis="histMass_";
       fillthis+=ptbin;
@@ -517,7 +523,10 @@ void AliAnalysisTaskSED0Mass::FillHists(Int_t ptbin, AliAODRecoDecayHF2Prong *pa
 
       //printf("Fill mass with D0");
       ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0);
       if(labD0>=0) {
+       if(fArray==1) cout<<"LS signal ERROR"<<endl;
+
        AliAODMCParticle *partD0 = (AliAODMCParticle*)arrMC->At(labD0);
        Int_t pdgD0 = partD0->GetPdgCode();
        //cout<<"pdg = "<<pdgD0<<endl;
@@ -537,14 +546,16 @@ void AliAnalysisTaskSED0Mass::FillHists(Int_t ptbin, AliAODRecoDecayHF2Prong *pa
        fillthis+=ptbin;
        ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0);
       }
+      
     }
     if (okD0bar==1) {
       fillthis="histMass_";
       fillthis+=ptbin;
       //printf("Fill mass with D0bar");
       ((TH1F*)listout->FindObject(fillthis))->Fill(invmassD0bar);
-      
       if(labD0>=0) {
+       if(fArray==1) cout<<"LS signal ERROR"<<endl;
        AliAODMCParticle *partD0 = (AliAODMCParticle*)arrMC->At(labD0);
        Int_t pdgD0 = partD0->GetPdgCode();
        //cout<<" pdg = "<<pdgD0<<endl;
@@ -558,7 +569,7 @@ void AliAnalysisTaskSED0Mass::FillHists(Int_t ptbin, AliAODRecoDecayHF2Prong *pa
          fillthis+=ptbin;
          ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0bar);
        }
-      } else {//background
+      } else {//background or LS
        fillthis="histBkg_";
        fillthis+=ptbin;
        ((TH1F*)(listout->FindObject(fillthis)))->Fill(invmassD0bar);
@@ -592,6 +603,41 @@ void AliAnalysisTaskSED0Mass::Terminate(Option_t */*option*/)
     return;
   }
 
+  if(fArray==1){
+    for(Int_t ipt=0;ipt<4;ipt++){
+      fLsNormalization = 2.*TMath::Sqrt(fTotPosPairs[ipt]*fTotNegPairs[ipt]); 
+
+
+      if(fLsNormalization>0) {
+      
+       TString massName="histMass_";
+       massName+=ipt+1;
+       ((TH1F*)fOutputtight->FindObject(massName))->Scale((1/fLsNormalization)*((TH1F*)fOutputtight->FindObject(massName))->GetEntries());
+       ((TH1F*)fOutputloose->FindObject(massName))->Scale((1/fLsNormalization)*((TH1F*)fOutputloose->FindObject(massName))->GetEntries());
+      }
+    }
+
+    fLsNormalization = 2.*TMath::Sqrt(fTotPosPairs[4]*fTotNegPairs[4]);
+
+    if(fLsNormalization>0) {
+
+      TString nameDistr="hptB";
+      ((TH1F*)fDistr->FindObject(nameDistr))->Scale((1/fLsNormalization)*((TH1F*)fDistr->FindObject(nameDistr))->GetEntries());
+      nameDistr="hdcaB";
+      ((TH1F*)fDistr->FindObject(nameDistr))->Scale((1/fLsNormalization)*((TH1F*)fDistr->FindObject(nameDistr))->GetEntries());
+      nameDistr="hcosthetastarB";
+      ((TH1F*)fDistr->FindObject(nameDistr))->Scale((1/fLsNormalization)*((TH1F*)fDistr->FindObject(nameDistr))->GetEntries());
+      nameDistr="hd0B";
+      ((TH1F*)fDistr->FindObject(nameDistr))->Scale((1/fLsNormalization)*((TH1F*)fDistr->FindObject(nameDistr))->GetEntries());
+      nameDistr="hd0d0B";
+      ((TH1F*)fDistr->FindObject(nameDistr))->Scale((1/fLsNormalization)*((TH1F*)fDistr->FindObject(nameDistr))->GetEntries());
+      nameDistr="hcosthetapointB";
+      ((TH1F*)fDistr->FindObject(nameDistr))->Scale((1/fLsNormalization)*((TH1F*)fDistr->FindObject(nameDistr))->GetEntries());
+      nameDistr="hcosthpointd0d0B";
+      ((TH2F*)fDistr->FindObject(nameDistr))->Scale((1/fLsNormalization)*((TH2F*)fDistr->FindObject(nameDistr))->GetEntries());
+
+    }
+  }
 
   return;
 }
index 58ab37e..f3ff51e 100644 (file)
@@ -37,18 +37,28 @@ class AliAnalysisTaskSED0Mass : public AliAnalysisTaskSE
   virtual void UserExec(Option_t *option);
   virtual void Terminate(Option_t *option);
 
+  void SetArray(Int_t type=AliAnalysisTaskSED0Mass::kD0){fArray=type;}
+
+  enum{kD0,kLS};
   
  private:
 
   AliAnalysisTaskSED0Mass(const AliAnalysisTaskSED0Mass &source);
   AliAnalysisTaskSED0Mass& operator=(const AliAnalysisTaskSED0Mass& source); 
-  void    FillHists(Int_t ptbin, AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliAnalysisVertexingHF *vhf, TList *listout);
-  TList   *fOutputtight; //! list send on output slot 1
-  TList   *fOutputloose; //! list send on output slot 2
-  TList   *fDistr;       //! list send on output slot 3
+  void     FillHists(Int_t ptbin, AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliAnalysisVertexingHF *vhf, TList *listout);
+  TList    *fOutputtight; //! list send on output slot 1
+  TList    *fOutputloose; //! list send on output slot 2
+  TList    *fDistr;       //! list send on output slot 4
+  TH1F     *fNentries;    //! histogram with number of events on output slot 3
   AliAnalysisVertexingHF *fVHFtight;  // Vertexer heavy flavour (used to pass the cuts)
   AliAnalysisVertexingHF *fVHFloose;  // Vertexer heavy flavour (used to pass the cuts)
-  TH1F *fNentries; //! histogram with number of events
+  Int_t    fArray;        //can be D0 or Like Sign candidates
+
+  Int_t    fTotPosPairs[5];     //
+  Int_t    fTotNegPairs[5];     // 
+  Double_t fLsNormalization;  // normalization
+
+
   ClassDef(AliAnalysisTaskSED0Mass,2); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates
 };