updated for some checks
authorssakai <Shingo.Sakai@lnf.infn.it>
Tue, 18 Mar 2014 12:49:31 +0000 (13:49 +0100)
committerssakai <Shingo.Sakai@lnf.infn.it>
Tue, 18 Mar 2014 13:05:04 +0000 (14:05 +0100)
PWGHF/hfe/AliAnalysisTaskHFECal.cxx
PWGHF/hfe/AliAnalysisTaskHFECal.h

index edc2652..0c335fd 100644 (file)
@@ -222,6 +222,10 @@ AliAnalysisTaskHFECal::AliAnalysisTaskHFECal(const char *name)
   ,fPhoVertexReco_step3(0)
   ,fPhoVertexReco_step4(0)
   ,fPhoVertexReco_step5(0)
+  ,fMatchV0_0(0)
+  ,fMatchV0_1(0)
+  ,fMatchMC_0(0)
+  ,fMatchMC_1(0)
   //,fnSigEtaCorr(NULL)
 {
   //Named constructor
@@ -376,6 +380,10 @@ AliAnalysisTaskHFECal::AliAnalysisTaskHFECal()
   ,fPhoVertexReco_step3(0)
   ,fPhoVertexReco_step4(0)
   ,fPhoVertexReco_step5(0)
+  ,fMatchV0_0(0)
+  ,fMatchV0_1(0)
+  ,fMatchMC_0(0)
+  ,fMatchMC_1(0)
   //,fnSigEtaCorr(NULL)
 {
        //Default constructor
@@ -716,8 +724,8 @@ void AliAnalysisTaskHFECal::UserExec(Option_t*)
 
     fTrackPtBefTrkCuts->Fill(track->Pt());             
 
-    UChar_t itsPixel = track->GetITSClusterMap();
     /*
+    UChar_t itsPixel = track->GetITSClusterMap();
     cout << "nITS = " << nITS << endl;
     if(itsPixel & BIT(0))cout << "1st layer hit" << endl;
     if(itsPixel & BIT(1))cout << "2nd layer hit" << endl;
@@ -730,31 +738,31 @@ void AliAnalysisTaskHFECal::UserExec(Option_t*)
 
     // RecKine: ITSTPC cuts  
     if(!ProcessCutStep(AliHFEcuts::kStepRecKineITSTPC, track)) continue;
-    if(mcPho && iHijing==0)fPhoVertexReco_step1->Fill(track->Pt(),conv_proR); // check MC vertex
+    if(mcPho && iHijing==1)fPhoVertexReco_step1->Fill(track->Pt(),conv_proR); // check MC vertex
     
     //RecKink
     if(fRejectKinkMother) { // Quick and dirty fix to reject both kink mothers and daughters
       if(track->GetKinkIndex(0) != 0) continue;
     } 
-    if(mcPho && iHijing==0)fPhoVertexReco_step2->Fill(track->Pt(),conv_proR); // check MC vertex
+    if(mcPho && iHijing==1)fPhoVertexReco_step2->Fill(track->Pt(),conv_proR); // check MC vertex
     
     // RecPrim
     if(!ProcessCutStep(AliHFEcuts::kStepRecPrim, track)) continue;
-    if(mcPho && iHijing==0)fPhoVertexReco_step3->Fill(track->Pt(),conv_proR); // check MC vertex
+    if(mcPho && iHijing==1)fPhoVertexReco_step3->Fill(track->Pt(),conv_proR); // check MC vertex
     
     // HFEcuts: ITS layers cuts
     if(!ProcessCutStep(AliHFEcuts::kStepHFEcutsITS, track)) continue;
-    if(mcPho && iHijing==0)fPhoVertexReco_step4->Fill(track->Pt(),conv_proR); // check MC vertex
+    if(mcPho && iHijing==1)fPhoVertexReco_step4->Fill(track->Pt(),conv_proR); // check MC vertex
     
     // HFE cuts: TPC PID cleanup
     if(!ProcessCutStep(AliHFEcuts::kStepHFEcutsTPC, track)) continue;
-    if(mcPho && iHijing==0)fPhoVertexReco_step5->Fill(track->Pt(),conv_proR); // check MC vertex
+    if(mcPho && iHijing==1)fPhoVertexReco_step5->Fill(track->Pt(),conv_proR); // check MC vertex
 
     int nTPCcl = track->GetTPCNcls();
     //int nTPCclF = track->GetTPCNclsF(); // warnings
     //int nITS = track->GetNcls(0);
    
-    if(mcPho && iHijing==0)fPhoVertexReco_HFE->Fill(track->Pt(),conv_proR); // check MC vertex
+    if(mcPho && iHijing==1)fPhoVertexReco_HFE->Fill(track->Pt(),conv_proR); // check MC vertex
  
     fTrackPtAftTrkCuts->Fill(track->Pt());             
     
@@ -890,7 +898,7 @@ void AliAnalysisTaskHFECal::UserExec(Option_t*)
     hfetrack.SetPbPb();
     if(!fPID->IsSelected(&hfetrack, NULL, "", fPIDqa)) pidpassed = 0;
 
-    if(pidpassed==0) continue;
+    if(pidpassed==0) continue; // nSigma rejection
  
     //--- photonic ID
 
@@ -932,6 +940,23 @@ void AliAnalysisTaskHFECal::UserExec(Option_t*)
           }
       }
 
+    //--- matchin check
+    double emcphimim = 1.396;
+    double emcphimax = 3.14;
+    if(phi>emcphimim && phi<emcphimax)
+      {
+       if(eop<-900)//no matching
+         {
+          if(fFlagPhotonicElec)fMatchV0_0->Fill(pt);  // data  
+          if(mcele>-0.5)fMatchMC_0->Fill(pt); // MC  
+         }
+       else
+         {
+          if(fFlagPhotonicElec)fMatchV0_1->Fill(pt);   
+          if(mcele>-0.5)fMatchMC_1->Fill(pt);   
+         }
+      }
+
     //+++++++  E/p cut ++++++++++++++++   
    
     if(eop<0.9 || eop>1.3)continue;
@@ -1252,7 +1277,7 @@ void AliAnalysisTaskHFECal::UserCreateOutputObjects()
   Double_t max[16] = {kMaxP,   6.5, 4.0,   1.0,   4.0,  2.0, 0.05,    3.0,   3.0,  1.0,  20.0, 100,  100,  2.0, 180,  6.5};
   //fEleInfo = new THnSparseD("fEleInfo", "Electron Info; pT [GeV/c]; TPC signal;phi;eta;nSig; E/p;Rmatch;Ncell;clsF;M20;mcpT;Centrality;charge;opp;same;trigCond;MCele", 16, nBins, min, max);
   fEleInfo = new THnSparseD("fEleInfo", "Electron Info; pT [GeV/c]; TPC signal;phi;eta;nSig; E/p;Rmatch;DCA_xy;DCA_z;M20;mcpT;Centrality;charge;opp;same;trigCond;MCele", 16, nBins, min, max);
-  if(fqahist==1)fOutputList->Add(fEleInfo);
+  //if(fqahist==1)fOutputList->Add(fEleInfo);
 
   // Make common binning
   Int_t nBinsEop[3] =  { 10, 50, 100};
@@ -1522,6 +1547,18 @@ void AliAnalysisTaskHFECal::UserCreateOutputObjects()
   fPhoVertexReco_step5= new TH2D("fPhoVertexReco_step5","photon production Vertex mass selection",40,0,20,250,0,50);
   fOutputList->Add(fPhoVertexReco_step5);
 
+  fMatchV0_0 = new TH1D("fMatchV0_0","V0 match",100,0,20);
+  fOutputList->Add(fMatchV0_0);
+
+  fMatchV0_1 = new TH1D("fMatchV0_1","V0 match",100,0,20);
+  fOutputList->Add(fMatchV0_1);
+
+  fMatchMC_0 = new TH1D("fMatchMC_0","MC match",100,0,20);
+  fOutputList->Add(fMatchMC_0);
+
+  fMatchMC_1 = new TH1D("fMatchMC_1","MC match",100,0,20);
+  fOutputList->Add(fMatchMC_1);
+
   PostData(1,fOutputList);
 }
 
index 0d2160a..b98a2c5 100644 (file)
@@ -217,6 +217,10 @@ class AliAnalysisTaskHFECal : public AliAnalysisTaskSE {
  TH2D                   *fPhoVertexReco_step3;
  TH2D                   *fPhoVertexReco_step4;
  TH2D                   *fPhoVertexReco_step5;
+ TH1D                   *fMatchV0_0;
+ TH1D                   *fMatchV0_1;
+ TH1D                   *fMatchMC_0;
+ TH1D                   *fMatchMC_1;
 
  //<----- correction
  TGraphErrors           *fnSigEtaCorr[7];