20 #include <TClonesArray.h> 23 #include "AliAnalysisManager.h" 24 #include "AliCentrality.h" 25 #include "AliEMCALGeometry.h" 26 #include "AliESDEvent.h" 31 #include "AliVCluster.h" 32 #include "AliVEventHandler.h" 33 #include "AliVParticle.h" 95 if (!sname.IsNull()) {
96 rho =
dynamic_cast<AliRhoParameter*
>(InputEvent()->FindListObject(sname));
98 AliWarning(Form(
"%s: Could not retrieve rho with name %s!", GetName(), name));
116 if (!sname.IsNull()) {
119 AliWarning(Form(
"%s: Could not retrieve local rho with name %s!", GetName(), name));
145 AliError(Form(
"%s: Could not retrieve rho %s!", GetName(),
fRhoName.Data()));
154 AliError(Form(
"%s: Could not retrieve local rho %s!", GetName(),
fLocalRhoName.Data()));
162 AliWarning(
"There are no jet collections");
176 if (!cont->GetArrayName().IsNull()) {
177 fJets = cont->GetArray();
179 AliErrorStream() << GetName() <<
": Could not retrieve first jet branch!\n";
180 std::stringstream foundbranches;
182 for(
auto e : *(fInputEvent->GetList())){
188 foundbranches <<
", ";
190 foundbranches << e->GetName();
192 std::string fbstring = foundbranches.str();
193 AliErrorStream() <<
"Found branches: " << fbstring << std::endl;
216 if (sorted && ijetclus > iclus)
218 if (ijetclus == iclus)
235 if (sorted && ijettrack > itrack)
237 if (ijettrack == itrack)
255 AliEmcalContainer* cont = 0;
258 while ((cont = static_cast<AliEmcalContainer*>(nextJetColl()))) cont->NextEvent(InputEvent());
280 return AddJetContainer(jetType, jetAlgo, recoScheme, radius, accType, partCont, clusCont, tag);
316 if (
TString(n).IsNull())
return 0;
338 if(
TString(n).IsNull())
return 0;
342 defaultCutType.ToUpper();
344 if (defaultCutType.IsNull() || defaultCutType.EqualTo(
"USER")) {
347 else if(defaultCutType.EqualTo(
"TPC")) {
350 else if(defaultCutType.EqualTo(
"TPCFID")) {
353 else if(defaultCutType.EqualTo(
"EMCAL")) {
356 else if(defaultCutType.EqualTo(
"EMCALFID")) {
359 else if(defaultCutType.EqualTo(
"DCAL")) {
362 else if(defaultCutType.EqualTo(
"DCALFID")) {
366 AliWarning(Form(
"%s: default cut type %s not recognized. Not setting cuts.",GetName(),defaultCutType.Data()));
402 AliError(Form(
"%s in SetJetAcceptanceType(...): container %d not found!",GetName(),c));
410 AliError(Form(
"%s in SetJetAcceptanceType(...): container %d not found",GetName(),c));
416 if(!cutType.IsNull() && !cutType.EqualTo(
"USER")) {
417 if(cutType.EqualTo(
"TPC"))
419 else if(cutType.EqualTo(
"EMCAL"))
422 AliWarning(Form(
"%s: default cut type %s not recognized. Not setting cuts.",GetName(),cutType.Data()));
432 else AliError(Form(
"%s in SetRhoName(...): container %d not found",GetName(),c));
443 else AliError(Form(
"%s in SetJetEtaLimits(...): container %d not found",GetName(),c));
450 else AliError(Form(
"%s in SetJetPhiLimits(...): container %d not found",GetName(),c));
457 else AliError(Form(
"%s in SetJetAreaCut(...): container %d not found",GetName(),c));
464 else AliError(Form(
"%s in SetPercAreaCut(...): container %d not found",GetName(),c));
471 else AliError(Form(
"%s in SetZLeadingCut(...): container %d not found",GetName(),c));
478 else AliError(Form(
"%s in SetNEFCut(...): container %d not found",GetName(),c));
485 else AliError(Form(
"%s in SetAreaEmcCut(...): container %d not found",GetName(),c));
492 else AliError(Form(
"%s in SetJetPtCut(...): container %d not found",GetName(),c));
499 else AliError(Form(
"%s in SetJetRadius(...): container %d not found",GetName(),c));
506 else AliError(Form(
"%s in SetMaxClusterPt(...): container %d not found",GetName(),c));
513 else AliError(Form(
"%s in SetMaxTrackPt(...): container %d not found",GetName(),c));
520 else AliError(Form(
"%s in SetPtBiasJetClus(...): container %d not found",GetName(),c));
527 else AliError(Form(
"%s in SetPtBiasJetTrack(...): container %d not found",GetName(),c));
534 else AliError(Form(
"%s in SetLeadingHadronType(...): container %d not found",GetName(),c));
541 else AliError(Form(
"%s in SetNLeadingJets(...): container %d not found",GetName(),c));
547 if (cont) cont->SetBitMap(m);
548 else AliError(Form(
"%s in SetJetBitMap(...): container %d not found",GetName(),c));
554 if (cont) cont->SetIsParticleLevel(b);
555 else AliError(Form(
"%s in SetIsParticleLevel(...): container %d not found",GetName(),c));
563 else { AliError(Form(
"%s in GetRhoName(...): container %d not found. Returning fRhoName...",GetName(),c));
return fRhoName; }
574 AliError(Form(
"%s:Container %d not found",GetName(),i));
577 return cont->GetArray();
584 AliError(Form(
"%s:Container %d not found",GetName(),i));
595 AliError(Form(
"%s:Container %d not found",GetName(),c));
607 AliError(Form(
"%s:Container %d not found",GetName(),c));
619 AliError(Form(
"%s:Container %d not found",GetName(),i));
630 AliError(Form(
"%s:Container %d not found",GetName(),i));
640 AliError(Form(
"%s:Container %d not found",GetName(),c));
654 AliError(Form(
"%s:Container %d not found",GetName(),c));
658 UInt_t rejectionReason = 0;
659 return cont->
AcceptJet(jet, rejectionReason);
void SetAreaEmcCut(Double_t a=0.99)
void SetPercAreaCut(Float_t p, Int_t c=0)
AliAnalysisTaskEmcalJet()
void SetMaxClusterPt(Float_t b, Int_t c=0)
Double_t GetRhoVal() const
AliEmcalJet * GetJetFromArray(Int_t j, Int_t c=0) const
const TString & GetRhoName() const
void LoadRho(const AliVEvent *event)
AliJetContainer * GetJetContainer(Int_t i=0) const
DCal acceptance – spans entire rectangular region in eta-phi (including most of PHOS) ...
const TString & GetRhoName(Int_t c=0) const
void SetJetBitMap(UInt_t m, Int_t c=0)
Base task in the EMCAL framework.
void SetLeadingHadronType(Int_t t)
Bool_t fLocalInitialized
whether or not the task has been already initialized
Int_t GetNJets(Int_t i=0) const
void SetAreaEmcCut(Double_t a=0.99, Int_t c=0)
void SetPtBiasJetTrack(Float_t b)
Int_t ClusterAt(Int_t idx) const
Double_t GetLeadingHadronPt(AliEmcalJet *jet, Int_t c=0)
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
Full acceptance, i.e. no acceptance cut applied – left to user.
AliJetContainer * AddJetContainer(const char *n, TString defaultCutType, Float_t jetRadius=0.4)
AliLocalRhoParameter * GetLocalRhoFromEvent(const char *name)
Bool_t RetrieveEventObjects()
void SetPercAreaCut(Float_t p)
void SetPtBiasJetClus(Float_t b, Int_t c=0)
TClonesArray * GetJetArray(Int_t i=0) const
void SetPtBiasJetClus(Float_t b)
Container for particles within the EMCAL framework.
Double_t GetJetRadius(Int_t i=0) const
Int_t TrackAt(Int_t idx) const
UShort_t GetNumberOfTracks() const
Bool_t IsJetTrack(AliEmcalJet *jet, Int_t itrack, Bool_t sorted=kFALSE) const
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
TString fLocalRhoName
name for local rho
void SetRhoName(const char *n)
TPC fiducial acceptance (each eta edge narrowed by jet R)
void SetLeadingHadronType(Int_t t, Int_t c=0)
Bool_t IsJetCluster(AliEmcalJet *jet, Int_t iclus, Bool_t sorted=kFALSE) const
AliRhoParameter * GetRhoFromEvent(const char *name)
UShort_t GetNumberOfClusters() const
void SetJetRadius(Float_t r)
void SetJetPtCut(Float_t cut)
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
void SetPtBiasJetTrack(Float_t b, Int_t c=0)
void SetNLeadingJets(Int_t t)
void SetJetRadius(Float_t r, Int_t c=0)
void SetJetEtaLimits(Float_t min, Float_t max, Int_t c=0)
void SetJetPhiLimits(Float_t min, Float_t max)
AliRhoParameter * fRho
! event rho
void SetJetAcceptanceType(UInt_t t, Int_t c=0)
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
AliLocalRhoParameter * fLocalRho
! local event rho
void SetZLeadingCut(Float_t zemc, Float_t zch, Int_t c=0)
AliEmcalJet * GetAcceptJetFromArray(Int_t j, Int_t c=0) const
virtual void SetRhoName(const char *n, Int_t c=0)
virtual Bool_t RetrieveEventObjects()
Retrieve common objects from event.
TObjArray fJetCollArray
jet collection array
TClonesArray * fJets
! jets
AliRhoParameter * GetRhoParameter()
void SetJetPhiLimits(Float_t min, Float_t max, Int_t c=0)
Double_t GetRhoVal(Int_t i=0) const
void SetJetAreaCut(Float_t cut, Int_t c=0)
virtual ~AliAnalysisTaskEmcalJet()
Float_t GetJetRadius() const
void SetNLeadingJets(Int_t t, Int_t c=0)
void SetIsParticleLevel(Bool_t b, Int_t c=0)
void SetArray(const AliVEvent *event)
AliEmcalJet * GetAcceptJet(Int_t i) const
void SetRunNumber(Int_t r)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
virtual void ExecOnce()
Perform steps needed to initialize the analysis.
Int_t GetRunNumber(TString)
void SetMaxClusterPt(Float_t b)
void SetJetAcceptanceType(UInt_t type)
virtual Bool_t AcceptJet(AliEmcalJet *jet, Int_t c=0)
DCal fiducial acceptance (each eta, phi edge narrowed by jet R)
void SetNEFCut(Float_t min, Float_t max, Int_t c=0)
void SetJetPtCut(Float_t cut, Int_t c=0)
void SetMaxTrackPt(Float_t b, Int_t c=0)
void SetMaxTrackPt(Float_t b)
void SetJetEtaLimits(Float_t min, Float_t max)
Double_t fRhoVal
! event rho value, same for local rho
Container structure for EMCAL clusters.
void SetZLeadingCut(Float_t zemc, Float_t zch)
EMCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Container for jet within the EMCAL jet framework.
void SetJetAreaCut(Float_t cut)
void SetNEFCut(Float_t min=0., Float_t max=1.)
AliEmcalJet * GetJet(Int_t i) const