add EMCal trigger in eh analysis. add hists. in Raa study
authorssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 May 2013 08:59:26 +0000 (08:59 +0000)
committerssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 May 2013 08:59:26 +0000 (08:59 +0000)
PWGHF/hfe/AliAnalysisTaskElecHadronCorrel.cxx
PWGHF/hfe/AliAnalysisTaskElecHadronCorrel.h
PWGHF/hfe/AliAnalysisTaskHFECal.cxx
PWGHF/hfe/macros/AddTaskHFEElecHadronCorrlPbPb.C
PWGHF/hfe/macros/configs/PbPb/ConfigHFEElecHadronCorrelPbPb.C

index 66ae06d..5c363c2 100644 (file)
@@ -133,6 +133,7 @@ ClassImp(AliehDPhiBasicParticle)
   ,fEovPMin(0.8)                                                                
   ,fEovPMax(1.2)
   ,fTriggerCentral(kTRUE) 
+  ,fTriggerMB(kTRUE) 
   ,fPoolMgr(0x0)  
     ,fNoEvents(0)
     //  ,fTrkpt(0)
@@ -407,6 +408,7 @@ AliAnalysisTaskElecHadronCorrel::AliAnalysisTaskElecHadronCorrel()
   ,fEovPMin(0.8)                                                                          
   ,fEovPMax(1.2)
   ,fTriggerCentral(kTRUE) 
+  ,fTriggerMB(kTRUE) 
   ,fPoolMgr(0x0)    
     ,fNoEvents(0)
     //  ,fTrkpt(0)
@@ -695,15 +697,20 @@ void AliAnalysisTaskElecHadronCorrel::UserExec(Option_t*)
   }
 
 
-  if(fTriggerCentral){
+  if(fTriggerMB && fTriggerCentral){
     // trigger selection
     if(!(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & (AliVEvent::kCentral))) return;
   }
 
-  if(!fTriggerCentral){
+  if(fTriggerMB && !fTriggerCentral){
     // trigger selection
     if(!(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & (AliVEvent::kSemiCentral))) return;
   }
+  
+  if(!fTriggerMB){
+// trigger selection
+        if(!(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & (AliVEvent::kEMCEGA))) return;
+  }
   // centrality selection 
   //  SetCentralityParameters(0., 7., "V0M");
   Bool_t pass = kFALSE; 
index 6a32c0c..ef2667f 100644 (file)
@@ -63,6 +63,8 @@ class AliAnalysisTaskElecHadronCorrel : public AliAnalysisTaskSE {
     void ElectronHadCorrelEtaBinsNoPartner(Int_t itrack,Int_t jtrack, AliVTrack *track, TH2F *DphiPtEta1, TH2F *DphiPtEta11,TH2F *DphiPtEta12,TH2F *DphiPtEta13,TH2F *DphiPtEta14,TH2F *DphiPtEta2, TH2F *DphiPtEta21,TH2F *DphiPtEta22,TH2F *DphiPtEta23,TH2F *DphiPtEta24);  
     // void ElectronHadCorrelEtaBinsNoPartner(Int_t itrack,Int_t jtrack, AliVTrack *track, TH3F *DphiPtEta1, TH3F *DphiPtEta11,TH3F *DphiPtEta12,TH3F *DphiPtEta13,TH3F *DphiPtEta14); 
     void HadronInfo(Int_t itrack);
+
+    void SetEventTriggerSelectionMB(Bool_t TriggerMB) {fTriggerMB = TriggerMB;};
     void SetTriggerSelection(Bool_t TriggerCentral) {fTriggerCentral = TriggerCentral;};
     void    SetCentralityParameters(Double_t CentralityMin, Double_t CentralityMax, const char* CentralityMethod); //select centrality
     void    CheckCentrality(AliVEvent *event,Bool_t &centralitypass); //to use only events with the correct centrality....
@@ -122,6 +124,7 @@ class AliAnalysisTaskElecHadronCorrel : public AliAnalysisTaskSE {
     Double_t   fEovPMin;//
     Double_t   fEovPMax;//
     Bool_t     fTriggerCentral;//
+    Bool_t     fTriggerMB;//
 
     AliEventPoolManager*     fPoolMgr;         //! event pool manager
 
index d41099d..a0b94ce 100644 (file)
@@ -121,6 +121,8 @@ AliAnalysisTaskHFECal::AliAnalysisTaskHFECal(const char *name)
   ,fInvmassULS(0)              
   ,fInvmassLSmc(0)             
   ,fInvmassULSmc(0)            
+  ,fInvmassLSreco(0)           
+  ,fInvmassULSreco(0)          
   ,fInvmassLSmc0(0)            
   ,fInvmassLSmc1(0)            
   ,fInvmassLSmc2(0)            
@@ -250,6 +252,8 @@ AliAnalysisTaskHFECal::AliAnalysisTaskHFECal()
   ,fInvmassULS(0)              
   ,fInvmassLSmc(0)             
   ,fInvmassULSmc(0)            
+  ,fInvmassLSreco(0)           
+  ,fInvmassULSreco(0)          
   ,fInvmassLSmc0(0)            
   ,fInvmassLSmc1(0)            
   ,fInvmassLSmc2(0)            
@@ -1088,6 +1092,14 @@ void AliAnalysisTaskHFECal::UserCreateOutputObjects()
   fInvmassULSmc = new THnSparseD("fInvmassULSmc", "Inv mass of ULS (e,e); cent; p_{T} (GeV/c); mass(GeV/c^2); nSigma; angle; m20cut; eop; MCele", 9, nBinspho,minpho, maxpho);
   if(fqahist==1)fOutputList->Add(fInvmassULSmc);
 
+  fInvmassLSreco = new TH2D("fInvmassLSreco", "Inv mass of LS (e,e) reco; cent; p_{T} (GeV/c); mass(GeV/c^2)",20,0,20,500,0,0.5 );
+  fInvmassLSreco->Sumw2();
+  fOutputList->Add(fInvmassLSreco);
+
+  fInvmassULSreco = new TH2D("fInvmassULSreco", "Inv mass of ULS (e,e) reco; cent; p_{T} (GeV/c); mass(GeV/c^2)",20,0,20,500,0,0.5 );
+  fInvmassULSreco->Sumw2();
+  fOutputList->Add(fInvmassULSreco);
+
   fInvmassLSmc0 = new TH2D("fInvmassLSmc0", "Inv mass of LS (e,e); cent; p_{T} (GeV/c); mass(GeV/c^2)",20,0,20,500,0,0.5 );
   fInvmassLSmc0->Sumw2();
   fOutputList->Add(fInvmassLSmc0);
@@ -1526,17 +1538,18 @@ void AliAnalysisTaskHFECal::SelectPhotonicElectron(Int_t itrack, Double_t cent,
     // angle cut
     if(openingAngle > fOpeningAngleCut) continue;
     // chi2 cut
-    if(TMath::Sqrt(TMath::Abs(chi2recg))>chi2cut) continue;
-
-   
-
+    //if(TMath::Sqrt(TMath::Abs(chi2recg))>chi2cut) continue;
+    if(chi2recg>chi2cut) continue;
+    if(fFlagLS ) fInvmassLSreco->Fill(ptPrim,mass);
+    if(fFlagULS) fInvmassULSreco->Fill(ptPrim,mass);
+  
     // for real data  
     //printf("mce =%f\n",mce);
     if(mce<-0.5) // mce==-1. is real
        {
          //printf("Real data\n");
         if(mass<fInvmassCut && fFlagULS && !flagPhotonicElec){
-        //if(mass<fInvmassCut && fFlagULS && !flagPhotonicElec && (p1==p2)){ <--- only MC train (55,56) v5-03-68-AN & 69 for check
               flagPhotonicElec = kTRUE;
              }
         if(mass<fInvmassCut && fFlagLS && !flagConvinatElec){
@@ -1551,15 +1564,16 @@ void AliAnalysisTaskHFECal::SelectPhotonicElectron(Int_t itrack, Double_t cent,
          if(w>0.0)
            {
            //cout << "tagpi0 = " << tagpi0 << " ; tageta = " << tageta << endl;
-           if(fFlagLS && ibgevent==0 && jbgevent==0 && tagpi0) fInvmassLSmc0->Fill(ptPrim,mass,w);
-           if(fFlagULS && ibgevent==0 && jbgevent==0 && tagpi0) fInvmassULSmc0->Fill(ptPrim,mass,w);
-           if(fFlagLS && ibgevent==0 && jbgevent==0 && tageta) fInvmassLSmc1->Fill(ptPrim,mass,w);
-           if(fFlagULS && ibgevent==0 && jbgevent==0 && tageta) fInvmassULSmc1->Fill(ptPrim,mass,w);
-           if(fFlagLS && ibgevent==0 && jbgevent==0 && (p1==p2) && tagpi0) fInvmassLSmc2->Fill(ptPrim,mass,w);
-           if(fFlagULS && ibgevent==0 && jbgevent==0 && (p1==p2) && tagpi0) fInvmassULSmc2->Fill(ptPrim,mass,w);
-           if(fFlagLS && ibgevent==0 && jbgevent==0 && (p1==p2) && tageta) fInvmassLSmc3->Fill(ptPrim,mass,w);
-           if(fFlagULS && ibgevent==0 && jbgevent==0 && (p1==p2) && tageta) fInvmassULSmc3->Fill(ptPrim,mass,w);
+           if(fFlagLS && ibgevent==0 && jbgevent==0 && tagpi0) fInvmassLSmc0->Fill(ptPrim,mass);
+           if(fFlagULS && ibgevent==0 && jbgevent==0 && tagpi0) fInvmassULSmc0->Fill(ptPrim,mass);
+           if(fFlagLS && ibgevent==0 && jbgevent==0 && tageta) fInvmassLSmc1->Fill(ptPrim,mass);
+           if(fFlagULS && ibgevent==0 && jbgevent==0 && tageta) fInvmassULSmc1->Fill(ptPrim,mass);
+           if(fFlagLS && ibgevent==0 && jbgevent==0 && (p1==p2) && tagpi0) fInvmassLSmc2->Fill(ptPrim,mass);
+           if(fFlagULS && ibgevent==0 && jbgevent==0 && (p1==p2) && tagpi0) fInvmassULSmc2->Fill(ptPrim,mass);
+           if(fFlagLS && ibgevent==0 && jbgevent==0 && (p1==p2) && tageta) fInvmassLSmc3->Fill(ptPrim,mass);
+           if(fFlagULS && ibgevent==0 && jbgevent==0 && (p1==p2) && tageta) fInvmassULSmc3->Fill(ptPrim,mass);
           }
+
         if(mass<fInvmassCut && fFlagULS && !flagPhotonicElec && (ibgevent==jbgevent)){
         //if(mass<fInvmassCut && fFlagULS && !flagPhotonicElec && (p1==p2)){ <--- only MC train (55,56) v5-03-68-AN & 69 for check
               flagPhotonicElec = kTRUE;
index 85fcaa7..a4c78a4 100644 (file)
@@ -1,4 +1,5 @@
-AliAnalysisTaskElecHadronCorrel *AddTaskHFEElecHadronCorrlPbPb(Bool_t TrigSelCen = kTRUE,
+AliAnalysisTaskElecHadronCorrel *AddTaskHFEElecHadronCorrlPbPb(Bool_t EventTrigSelMB=kTRUE,
+                                                               Bool_t TrigSelCen = kTRUE,
                                                                Double_t CentrMin = 0,
                                                                Double_t CentMax = 7,
                                                                Double_t TPCNsigMinE = -2,
@@ -43,7 +44,7 @@ AliAnalysisTaskElecHadronCorrel *AddTaskHFEElecHadronCorrlPbPb(Bool_t TrigSelCen
 
   //analysis task 
   gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFEElecHadronCorrelPbPb.C");
-  AliAnalysisTaskElecHadronCorrel *taskHFEeh = ConfigHFEElecHadronCorrelPbPb(MCthere,TrigSelCen,CentrMin,CentMax,TPCNsigMinE,TPCNsigMaxE,TPCNsigMinH,TPCNsigMaxH,SSM02Min,SSM02Max,SSM20Min,SSM20Max,Disp,EovPMin,EovPMax,InvM,TaskName);
+  AliAnalysisTaskElecHadronCorrel *taskHFEeh = ConfigHFEElecHadronCorrelPbPb(MCthere,EventTrigSelMB,TrigSelCen,CentrMin,CentMax,TPCNsigMinE,TPCNsigMaxE,TPCNsigMinH,TPCNsigMaxH,SSM02Min,SSM02Max,SSM20Min,SSM20Max,Disp,EovPMin,EovPMax,InvM,TaskName);
 
   TString containerName = mgr->GetCommonFileName();
   containerName += ":PWGHF_hfeCalPbPbeh";
index 4e5a5dc..78f7935 100644 (file)
@@ -1,4 +1,5 @@
 AliAnalysisTaskElecHadronCorrel* ConfigHFEElecHadronCorrelPbPb(Bool_t useMC,\r
+                                                               Bool_t EventTrigSelMB=kTRUE,\r
                                                                Bool_t TrigSelCen = kTRUE,\r
                                                                Double_t CentMin = 0,\r
                                                                Double_t CentMax = 7,\r
@@ -51,6 +52,7 @@ AliAnalysisTaskElecHadronCorrel* ConfigHFEElecHadronCorrelPbPb(Bool_t useMC,
 //  task->SetRemovePileUp(kTRUE);\r
 //  task->SetInvariantMassCut(0.1);\r
 \r
+  task->SetEventTriggerSelectionMB(EventTrigSelMB);\r
   task->SetTriggerSelection(TrigSelCen);\r
   task->SetCentralityParameters(CentMin, CentMax, "V0M");\r
   task->SetInvariantMassCut(InvM);\r