]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
updated esd cut parameters into AddTask, and THnSparse array elements
authorjmazer <jmazer@cern.ch>
Thu, 17 Apr 2014 21:13:21 +0000 (17:13 -0400)
committermverweij <marta.verweij@cern.ch>
Fri, 18 Apr 2014 11:10:04 +0000 (13:10 +0200)
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetHadEPpid.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetHadEPpid.h
PWGJE/EMCALJetTasks/macros/AddTaskEmcalJetHadEPpid.C

index 44b9adfb2e7fe295c27fed4380fddbbcf339ad8b..a2a914398bc5c2126b1339f4d3d34f4966357730 100644 (file)
@@ -546,7 +546,7 @@ void AliAnalysisTaskEmcalJetHadEPpid::UserCreateOutputObjects()
   UInt_t bitcoded = 0; // bit coded, see GetDimParams() below
   UInt_t cifras = 0;
   UInt_t bitcode = 0;  // bit coded, see GetDimParamsPID() below
-  bitcoded = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7 | 1<<8 | 1<<9;
+  bitcoded = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7; // | 1<<8 | 1<<9;
   if(makeextraCORRhistos) fhnJH = NewTHnSparseF("fhnJH", bitcoded);
   if(makeextraCORRhistos) fOutput->Add(fhnJH);
 
@@ -581,7 +581,7 @@ void AliAnalysisTaskEmcalJetHadEPpid::UserCreateOutputObjects()
 
   // set up event mixing sparse
   if(fDoEventMixing){
-    cifras = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7 | 1<<9;
+    cifras = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 | 1<<7; // | 1<<8 | 1<<9;
     fhnMixedEvents = NewTHnSparseF("fhnMixedEvents", cifras);
     fhnMixedEvents->Sumw2();  
     fOutput->Add(fhnMixedEvents);
@@ -857,7 +857,7 @@ Bool_t AliAnalysisTaskEmcalJetHadEPpid::Run()
      jetPt = jet->Pt();
      jetPtGlobal = jet->Pt()-jet->Area()*fRhoVal;  // corrected pT of jet from rho value
      jetPtLocal = jet->Pt()-jet->Area()*fLocalRhoVal; // corrected pT of jet using Rho modulated for V2 and V3
-     Float_t dEP = -500;                    // initialize angle between jet and event plane
+     Double_t dEP = -500;                    // initialize angle between jet and event plane
      //Int_t ieta = -500;             // initialize jet eta bin
      //ieta = GetEtaBin(jeteta);         // bin of eta
      dEP = RelativeEPJET(jetphi,fEPV0); // angle betweeen jet and event plane
@@ -925,6 +925,8 @@ Bool_t AliAnalysisTaskEmcalJetHadEPpid::Run()
           continue;
 
         // calculate and get some track parameters
+               Double_t trCharge = -99;
+        trCharge = track->Charge();
         Double_t tracketa=track->Eta();   // eta of track
         Double_t deta=tracketa-jeteta;    // dETA between track and jet
                Int_t ieta = -1;
@@ -941,7 +943,7 @@ Bool_t AliAnalysisTaskEmcalJetHadEPpid::Run()
 //        iptjet=GetpTjetBin(jetPt);        // bin of jet pT
         iptjet=GetpTjetBin(jet->Pt());    // bin of jet pt
            if(iptjet<0) continue;                        // double check we don't have a negative array index
-        Double_t dR=sqrt(deta*deta+dphijh*dphijh);                   // difference of R between jet and hadron track
+        //Double_t dR=sqrt(deta*deta+dphijh*dphijh);                   // difference of R between jet and hadron track
 
         // fill some jet-hadron histo's
         if(makeextraCORRhistos) fHistJetH[centbin][iptjet][ieta]->Fill(dphijh,track->Pt());  // fill jet-hadron dPHI--track pT distribution
@@ -954,7 +956,7 @@ Bool_t AliAnalysisTaskEmcalJetHadEPpid::Run()
         // does our max track or cluster pass the bias?
         if ((jet->MaxTrackPt()>fTrkBias) || (jet->MaxClusterPt()>fClusBias)){
           // set up and fill Jet-Hadron THnSparse
-          Double_t triggerEntries[9] = {fCent,jetPtLocal,track->Pt(),dR,deta,dphijh,0,leadjet,zVtx};
+          Double_t triggerEntries[10] = {fCent, jet->Pt(), track->Pt(), deta, dphijh, dEP, zVtx, trCharge, 0, 0};
           if(makeextraCORRhistos) fhnJH->Fill(triggerEntries);    // fill Sparse Histo with trigger entries
           
           // fill histo's
@@ -1262,14 +1264,14 @@ Bool_t AliAnalysisTaskEmcalJetHadEPpid::Run()
 
                   Double_t DEta = part->Eta()-jet->Eta();                // difference in eta
                   Double_t DPhi = RelativePhi(jet->Phi(),part->Phi());   // difference in phi
-                  Float_t dEP = RelativeEPJET(jet->Phi(),fEPV0);            // difference between jet and EP
+                  Double_t dEP = RelativeEPJET(jet->Phi(),fEPV0);           // difference between jet and EP
                          Double_t mixcharge = part->Charge();
 
                   //Double_t DR=TMath::Sqrt(DPhi*DPhi+DEta*DEta);      // difference in R
 //T                  if(DPhi<-0.5*TMath::Pi()) DPhi+=2.*TMath::Pi();
 //T                  if(DPhi>3./2.*TMath::Pi()) DPhi-=2.*TMath::Pi();
                            
-                  Double_t triggerEntries[10] = {fCent,jet->Pt(),part->Pt(),DEta,DPhi,dEP,zVtx, mixcharge,0,leadjet}; //array for ME sparse
+                  Double_t triggerEntries[10] = {fCent,jet->Pt(),part->Pt(),DEta,DPhi,dEP,zVtx, mixcharge, leadjet, 0}; //array for ME sparse
                   fhnMixedEvents->Fill(triggerEntries,1./nMix);   // fill Sparse histo of mixed events
                   fHistMEphieta->Fill(DPhi,DEta, 1./nMix);
 
@@ -1319,7 +1321,7 @@ Int_t AliAnalysisTaskEmcalJetHadEPpid::GetCentBin(Double_t cent) const
 }
 
 //________________________________________________________________________
-Float_t AliAnalysisTaskEmcalJetHadEPpid::RelativePhi(Double_t mphi,Double_t vphi) const
+Double_t AliAnalysisTaskEmcalJetHadEPpid::RelativePhi(Double_t mphi,Double_t vphi) const
 { // function to calculate relative PHI
   double dphi = mphi-vphi;
 
@@ -1337,7 +1339,7 @@ Float_t AliAnalysisTaskEmcalJetHadEPpid::RelativePhi(Double_t mphi,Double_t vphi
 
 
 //_________________________________________________________________________
-Float_t AliAnalysisTaskEmcalJetHadEPpid:: RelativeEPJET(Double_t jetAng, Double_t EPAng) const
+Double_t AliAnalysisTaskEmcalJetHadEPpid:: RelativeEPJET(Double_t jetAng, Double_t EPAng) const
 { // function to calculate angle between jet and EP in the 1st quadrant (0,Pi/2)
   Double_t dphi = (EPAng - jetAng);
   
@@ -1481,17 +1483,17 @@ void AliAnalysisTaskEmcalJetHadEPpid::GetDimParams(Int_t iEntry, TString &label,
       break;
 
    case 1:
-      label = "Corrected Jet p_{T}";
-      nbins = 256;
-      xmin = -50.;
-      xmax = 206.;
+      label = "Jet p_{T}";
+      nbins = 288;
+      xmin = 0.;
+      xmax = 288.;
       break;
 
    case 2:
       label = "Track p_{T}";
-      nbins = 100;
+      nbins = 144;
       xmin = 0.;
-      xmax = 100.;
+      xmax = 144.;
       break;
 
     case 3:
@@ -1524,24 +1526,25 @@ void AliAnalysisTaskEmcalJetHadEPpid::GetDimParams(Int_t iEntry, TString &label,
 
   case 7:
       label = "track charge";
-      nbins =3;
+      nbins = 3;
       xmin = -1.5;
       xmax = 1.5;
       break;
 
-  case 8: // need to update
-      label = "leading track";
-      nbins = 10;
-      xmin = 0;
-      xmax = 50;
-      break;
-
-  case 9:  // need to update
+  case 8:  // need to update
       label = "leading jet";
       nbins = 3;
       xmin = -0.5;
       xmax = 2.5;
       break;
+
+  case 9: // need to update
+      label = "leading track";
+      nbins = 10;
+      xmin = 0;
+      xmax = 50;
+      break; 
+
    } // end of switch
 } // end of getting dim-params
 
index 8675c3243d582a168b2e1a45407dad8da33cd822..8f4339d0f4cd573e4951859bfc9f2e72bc74e838 100644 (file)
@@ -112,8 +112,8 @@ protected:
   virtual void           Terminate(Option_t *); 
   virtual Int_t          AcceptMyJet(AliEmcalJet *jet);   // applies basic jet tests/cuts before accepting
   virtual Int_t          GetCentBin(Double_t cent) const; // centrality bin of event
-  Float_t                RelativePhi(Double_t mphi,Double_t vphi) const; // relative jet track angle
-  Float_t                RelativeEPJET(Double_t jetAng, Double_t EPAng) const;  // relative jet event plane angle
+  Double_t                RelativePhi(Double_t mphi,Double_t vphi) const; // relative jet track angle
+  Double_t                RelativeEPJET(Double_t jetAng, Double_t EPAng) const;  // relative jet event plane angle
   virtual Int_t          GetEtaBin(Double_t eta) const;      // eta bins
   virtual Int_t          GetpTjetBin(Double_t pt) const;     // jet pt bins
   virtual Int_t          GetpTtrackBin(Double_t pt) const;   // track pt bins
index efc65e13f9e1be1e61d0fa1f89d01bd24a9469e4..7180324b0ca5a6b621534a75849e201a34eca388 100644 (file)
@@ -26,7 +26,8 @@ AliAnalysisTaskEmcalJetHadEPpid* AddTaskEmcalJetHadEPpid(
    const Double_t constitCut  = 0.15,
    const Int_t MixingTracks   = 50000,
    TString cutType                       = "EMCAL",
-   Bool_t   Comments             = 0
+   Bool_t   Comments             = 0,
+   Int_t esdcuts                         = 10001006
 )
 {  
   
@@ -96,6 +97,12 @@ AliAnalysisTaskEmcalJetHadEPpid* AddTaskEmcalJetHadEPpid(
   correlationtask->SetJetPtCut(JetPtcut, 1);
   correlationtask->SetPercAreaCut(0.6, 1); 
 
+  // ===================================================================
+  // ESD track quality cuts
+  AliESDtrackCuts *esdTrackCuts = 0x0;
+  gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
+  esdTrackCuts = CreateTrackCutsPWGJE(esdcuts);
+
   //-------------------------------------------------------
   // Final settings, pass to manager and set the containers
   //-------------------------------------------------------