AliAnalysisTaskEmcalJet: Add possibility to not use pileup rejection with AnaUtils...
authormverweij <marta.verweij@cern.ch>
Mon, 27 Oct 2014 22:53:12 +0000 (23:53 +0100)
committermverweij <marta.verweij@cern.ch>
Mon, 27 Oct 2014 22:53:12 +0000 (23:53 +0100)
PWG/EMCAL/AliAnalysisTaskEmcal.cxx
PWG/EMCAL/AliAnalysisTaskEmcal.h
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalHighMultTrigger.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalHighMultTrigger.h
PWGJE/EMCALJetTasks/macros/AddTaskEmcalHighMultTrigger.C

index 46a9cbc..6898e08 100644 (file)
@@ -57,6 +57,7 @@ AliAnalysisTaskEmcal::AliAnalysisTaskEmcal() :
   fTrackPtCut(0),
   fMinNTrack(0),
   fUseAliAnaUtils(kFALSE),
+  fRejectPileup(kFALSE),
   fAliAnalysisUtils(0x0),
   fOffTrigger(AliVEvent::kAny),
   fTrigClass(),
@@ -140,6 +141,7 @@ AliAnalysisTaskEmcal::AliAnalysisTaskEmcal(const char *name, Bool_t histo) :
   fTrackPtCut(0),
   fMinNTrack(0),
   fUseAliAnaUtils(kFALSE),
+  fRejectPileup(kFALSE),
   fAliAnalysisUtils(0x0),
   fOffTrigger(AliVEvent::kAny),
   fTrigClass(),
@@ -855,7 +857,7 @@ Bool_t AliAnalysisTaskEmcal::IsEventSelected()
       return kFALSE;
     }
 
-    if (fAliAnalysisUtils->IsPileUpEvent(InputEvent())) {
+    if (fRejectPileup &&fAliAnalysisUtils->IsPileUpEvent(InputEvent())) {
       if (fGeneralHistograms) fHistEventRejection->Fill("PileUp",1);
       return kFALSE;
     }
index 14c4319..38d2726 100644 (file)
@@ -83,7 +83,7 @@ class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
   void                        SetTracksName(const char *n)                          { AddParticleContainer(n)                             ; }
   void                        SetTrigClass(const char *n)                           { fTrigClass         = n                              ; } 
   void                        SetTriggerTypeSel(TriggerType t)                      { fTriggerTypeSel    = t                              ; } 
-  void                        SetUseAliAnaUtils(Bool_t b)                           { fUseAliAnaUtils    = b                              ; }
+  void                        SetUseAliAnaUtils(Bool_t b, Bool_t bRejPilup = kTRUE) { fUseAliAnaUtils    = b ; fRejectPileup = bRejPilup  ; }
   void                        SetVzRange(Double_t min, Double_t max)                { fMinVz             = min  ; fMaxVz   = max          ; }
 
  protected:
@@ -131,7 +131,8 @@ class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
   Double_t                    fMaxVz;                      // max vertex for event selection
   Double_t                    fTrackPtCut;                 // cut on track pt in event selection
   Int_t                       fMinNTrack;                  // minimum nr of tracks in event with pT>fTrackPtCut
-  Bool_t                      fUseAliAnaUtils;             //  used for LHC13* data
+  Bool_t                      fUseAliAnaUtils;             // used for LHC13* data: z-vtx, Ncontributors, z-vtx resolution cuts
+  Bool_t                      fRejectPileup;               // Reject pilup using function AliAnalysisUtils::IsPileUpEvent()
   AliAnalysisUtils           *fAliAnalysisUtils;           //! vertex selection (optional)
   UInt_t                      fOffTrigger;                 // offline trigger for event selection
   TString                     fTrigClass;                  // trigger class name for event selection
@@ -150,7 +151,7 @@ class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
   Int_t                       fMinMCLabel;                 // minimum MC label value for the tracks/clusters being considered MC particles
   Int_t                       fMCLabelShift;               // if MC label > fMCLabelShift, MC label -= fMCLabelShift
   Int_t                       fNcentBins;                  // how many centrality bins
-  Bool_t                      fNeedEmcalGeom;              // whether or not the task need the emcal geometry
+  Bool_t                      fNeedEmcalGeom;              // whether or not the task needs the emcal geometry
   Bool_t                      fIsEsd;                      //!whether it's an ESD analysis
   AliEMCALGeometry           *fGeom;                       //!emcal geometry
   TClonesArray               *fTracks;                     //!tracks
@@ -194,6 +195,6 @@ class AliAnalysisTaskEmcal : public AliAnalysisTaskSE {
   AliAnalysisTaskEmcal(const AliAnalysisTaskEmcal&);            // not implemented
   AliAnalysisTaskEmcal &operator=(const AliAnalysisTaskEmcal&); // not implemented
 
-  ClassDef(AliAnalysisTaskEmcal, 10) // EMCAL base analysis task
+  ClassDef(AliAnalysisTaskEmcal, 11) // EMCAL base analysis task
 };
 #endif
index 10bdbfb..7f35412 100644 (file)
@@ -38,7 +38,8 @@ AliAnalysisTaskEmcalHighMultTrigger::AliAnalysisTaskEmcalHighMultTrigger() :
   fHistTracklets(0),
   fHistV0MultSum(0),
   fHistTracksTracklets(0),
-  fHistTracksV0MultSum(0)
+  fHistTracksV0MultSum(0),
+  fHistSPDTrackletsClusters(0)
 {
   // Default constructor.
 
@@ -73,7 +74,8 @@ AliAnalysisTaskEmcalHighMultTrigger::AliAnalysisTaskEmcalHighMultTrigger(const c
   fHistTracklets(0),
   fHistV0MultSum(0),
   fHistTracksTracklets(0),
-  fHistTracksV0MultSum(0)
+  fHistTracksV0MultSum(0),
+  fHistSPDTrackletsClusters(0)
 {
   // Standard constructor.
 
@@ -151,8 +153,8 @@ void AliAnalysisTaskEmcalHighMultTrigger::UserCreateOutputObjects()
   fOutput->Add(fHistV0MultSum);
 
   const Int_t nMultEst = 3;
-  Int_t nBinsMultEst[nMultEst] = {300,300,500};
-  Double_t multEstMax[nMultEst] = {300.,300.,500.};
+  Int_t nBinsMultEst[nMultEst] = {300,200,500};
+  Double_t multEstMax[nMultEst] = {300.,200.,500.};
   TString strMultEst[nMultEst] = {"Tracks","Tracklets","V0MultSum"};
   for(Int_t i = 0; i<nMultEst; i++) {
     histName = Form("fHistEnergyMedianEst%s",strMultEst[i].Data());
@@ -196,6 +198,11 @@ void AliAnalysisTaskEmcalHighMultTrigger::UserCreateOutputObjects()
   fHistTracksV0MultSum = new TH2F(histName.Data(),histTitle.Data(),nBinsMultEst[0],0.,multEstMax[0],nBinsMultEst[2],0.,multEstMax[2]);
   fOutput->Add(fHistTracksV0MultSum);
 
+  histName = Form("fHistSPDTrackletsClusters");
+  histTitle = Form("%s;#it{N}_{tracklets,SPD};#it{N}_{clusters,SPD}",histName.Data());
+  fHistSPDTrackletsClusters = new TH2F(histName.Data(),histTitle.Data(),nBinsMultEst[1],0.,multEstMax[1],200,0.,1000.);
+  fOutput->Add(fHistSPDTrackletsClusters);
+
   PostData(1, fOutput); // Post data for ALL output slots > 0 here.
 }
 
@@ -239,6 +246,10 @@ Bool_t AliAnalysisTaskEmcalHighMultTrigger::FillHistograms()
   fHistTracksTracklets->Fill(multEst[0],multEst[1]);
   fHistTracksV0MultSum->Fill(multEst[0],multEst[2]);
 
+  Int_t nClustersLayer0 = InputEvent()->GetNumberOfITSClusters(0);
+  Int_t nClustersLayer1 = InputEvent()->GetNumberOfITSClusters(1);
+  fHistSPDTrackletsClusters->Fill(multEst[1],(Float_t)(nClustersLayer0+nClustersLayer1));
+
   return kTRUE;
 }
 
index de973e3..1fcad8a 100644 (file)
@@ -37,29 +37,30 @@ class AliAnalysisTaskEmcalHighMultTrigger : public AliAnalysisTaskEmcalJet {
 
 
   //Histograms
-  TH2F                       *fHistPatchEtaPhi;         //!
-  TH1F                       *fHistEnergyMedian;        //!
-  TH1F                       *fHistEnergyMedianExLP;    //!
-  TH1F                       *fHistEnergySum;           //!
-  TH1F                       *fHistEnergySumExLP;       //!
+  TH2F                       *fHistPatchEtaPhi;               //! patch eta vs phi (center of patch)
+  TH1F                       *fHistEnergyMedian;              //! median energy in EMCal
+  TH1F                       *fHistEnergyMedianExLP;          //! median energy in EMCal exclucing N leading patches
+  TH1F                       *fHistEnergySum;                 //! total energy in EMCal
+  TH1F                       *fHistEnergySumExLP;             //! total energy in EMCal exclucing N leading patches
 
-  TH1F                       *fHistTracks;              //!
-  TH1F                       *fHistTracklets;           //!
-  TH1F                       *fHistV0MultSum;           //!
+  TH1F                       *fHistTracks;                    //! N hybrid tracks
+  TH1F                       *fHistTracklets;                 //! Ntracklets
+  TH1F                       *fHistV0MultSum;                 //! V0A+V0C multiplicity
 
-  TH2F                       *fHistEnergyMedianEst[3];        //!
-  TH2F                       *fHistEnergyMedianExLPEst[3];    //!
-  TH2F                       *fHistEnergySumEst[3];           //!
-  TH2F                       *fHistEnergySumExLPEst[3];       //!
-  TH2F                       *fHistEnergySumAvgEst[3];        //!
-  TH2F                       *fHistEnergySumAvgExLPEst[3];    //!
+  TH2F                       *fHistEnergyMedianEst[3];        //! median energy in EMCal vs mult estimator
+  TH2F                       *fHistEnergyMedianExLPEst[3];    //! median energy in EMCal excluding N leading patches vs mult estimator
+  TH2F                       *fHistEnergySumEst[3];           //! total energy in EMCal vs mult estimator
+  TH2F                       *fHistEnergySumExLPEst[3];       //! total energy in EMCal excluding N leading patches vs mult estimator
+  TH2F                       *fHistEnergySumAvgEst[3];        //! avg energy in EMCal vs mult estimator
+  TH2F                       *fHistEnergySumAvgExLPEst[3];    //! avg energy in EMCal excluding N leading patches vs mult estimator
 
-  TH2F                       *fHistTracksTracklets;           //!
-  TH2F                       *fHistTracksV0MultSum;           //!
+  TH2F                       *fHistTracksTracklets;           //! Ntracks vs Ntracklets
+  TH2F                       *fHistTracksV0MultSum;           //! Ntracks vs V0A+V0C
+  TH2F                       *fHistSPDTrackletsClusters;      //! correlation between SPD clusters and tracklets
 
   AliAnalysisTaskEmcalHighMultTrigger(const AliAnalysisTaskEmcalHighMultTrigger&);            // not implemented
   AliAnalysisTaskEmcalHighMultTrigger &operator=(const AliAnalysisTaskEmcalHighMultTrigger&); // not implemented
 
-  ClassDef(AliAnalysisTaskEmcalHighMultTrigger, 1) // high multiplicity pp trigger analysis task
+  ClassDef(AliAnalysisTaskEmcalHighMultTrigger, 2) // high multiplicity pp trigger analysis task
 };
 #endif
index 07e0e7f..b526528 100644 (file)
@@ -37,7 +37,7 @@ AliAnalysisTaskEmcalHighMultTrigger* AddTaskEmcalHighMultTrigger(
   task->SetNCentBins(nCentBins);
   task->SetCaloTriggerPatchInfoName(nPatches);
   task->SetVzRange(-10.,10.);
-  task->SetUseAliAnaUtils(kTRUE);
+  task->SetUseAliAnaUtils(kTRUE,kFALSE);
 
   AliParticleContainer *trackCont  = task->AddParticleContainer(ntracks);
   trackCont->SetClassName("AliVTrack");