AliPhysics  9fe175b (9fe175b)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalJetLight.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
16 
17 #include <TClonesArray.h>
18 #include <TList.h>
19 
20 #include "AliAnalysisManager.h"
21 #include "AliCentrality.h"
22 #include "AliEMCALGeometry.h"
23 #include "AliESDEvent.h"
24 #include "AliEmcalJet.h"
25 #include "AliLog.h"
26 #include "AliRhoParameter.h"
27 #include "AliLocalRhoParameter.h"
28 #include "AliVCluster.h"
29 #include "AliVEventHandler.h"
30 #include "AliVParticle.h"
31 
35 
41  fJetCollArray()
42 {
43  fJetCollArray.SetOwner(kTRUE);
44 }
45 
57  AliAnalysisTaskEmcalLight(name, histo),
58  fJetCollArray()
59 {
60  fJetCollArray.SetOwner(kTRUE);
61 }
62 
67 {
68 }
69 
81 {
83 
84  //Load all requested jet branches - each container knows name already
85  if(fJetCollArray.GetEntriesFast()==0) {
86  AliWarning("There are no jet collections");
87  return;
88  }
89 
90  for(Int_t i =0; i<fJetCollArray.GetEntriesFast(); i++) {
91  AliJetContainer *cont = static_cast<AliJetContainer*>(fJetCollArray.At(i));
92  cont->SetRunNumber(InputEvent()->GetRunNumber());
93  cont->SetArray(InputEvent());
94  cont->LoadRho(InputEvent());
95  }
96 }
97 
104 {
106  return kFALSE;
107 
108  AliEmcalContainer* cont = 0;
109 
110  TIter nextJetColl(&fJetCollArray);
111  while ((cont = static_cast<AliEmcalContainer*>(nextJetColl()))) cont->NextEvent();
112 
113  return kTRUE;
114 }
115 
127  UInt_t accType, TString tag)
128 {
131 
132  return AddJetContainer(jetType, jetAlgo, recoScheme, radius, accType, partCont, clusCont, tag);
133 }
134 
147 AliJetContainer* AliAnalysisTaskEmcalJetLight::AddJetContainer(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, UInt_t accType,
148  AliParticleContainer* partCont, AliClusterContainer* clusCont, TString tag)
149 {
150  AliJetContainer *cont = new AliJetContainer(jetType, jetAlgo, recoScheme, radius, partCont, clusCont, tag);
151  cont->SetJetAcceptanceType(accType);
152  fJetCollArray.Add(cont);
153 
154  return cont;
155 }
156 
163 {
164  if (i < 0 || i >= fJetCollArray.GetEntriesFast()) return 0;
165  AliJetContainer *cont = static_cast<AliJetContainer*>(fJetCollArray.At(i));
166  return cont;
167 }
168 
175  // Get the jet container with name
176 
177  AliJetContainer *cont = static_cast<AliJetContainer*>(fJetCollArray.FindObject(name));
178  return cont;
179 }
AliJetContainer * AddJetContainer(EJetType_t jetType, EJetAlgo_t jetAlgo, ERecoScheme_t recoScheme, Double_t radius, UInt_t accType, AliParticleContainer *partCont, AliClusterContainer *clusCont, TString tag="Jet")
void LoadRho(const AliVEvent *event)
AliJetContainer * GetJetContainer(Int_t i=0) const
TObjArray fJetCollArray
jet collection array
Container for particles within the EMCAL framework.
Base task in the EMCAL framework (lighter version of AliAnalysisTaskEmcal)
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Base task in the EMCAL jet framework (lighter version of AliAnalysisTaskEmcalJet) ...
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
AliParticleContainer * GetParticleContainer(Int_t i=0) const
void SetArray(const AliVEvent *event)
void SetRunNumber(Int_t r)
Int_t GetRunNumber(TString)
Definition: PlotMuonQA.C:2235
void SetJetAcceptanceType(UInt_t type)
Container structure for EMCAL clusters.
Container for jet within the EMCAL jet framework.