4 #include <TLorentzVector.h>
7 #include "AliAnalysisUtils.h"
10 #include "AliInputEventHandler.h"
12 #include "AliVCluster.h"
13 #include "AliVEvent.h"
14 #include "AliVVertex.h"
61 const std::array<double, 2> kJetRadii = {0.2, 0.4};
62 for(
auto r : kJetRadii){
63 fHistos->
CreateTH1(Form(
"hJetPtRawR%02d", static_cast<Int_t>(10.*r)), Form(
"Raw jet pt spectrum for R=%.1f jets", r), 20, 0., 200 );
64 fHistos->
CreateTH1(Form(
"hJetPtRecR%02d", static_cast<Int_t>(10.*r)), Form(
"Rec jet pt spectrum for R=%.1f jets", r), 20, 0., 200 );
66 for(
int i = 10; i < 200; i += 10)
67 fHistos->
CreateTH1(Form(
"hR%02dJet%d%dPtRel", static_cast<int>(10.*r), i, i + 10), Form(
"Pt rel of electron candidates for neutral jets with "), 100, 0., 1.);
76 if(!(fInputHandler->IsEventSelected() &
fTriggerBits))
return false;
78 if(!fInputEvent->GetFiredTriggerClasses().Contains(
fTriggerString))
return false;
81 if(TMath::Abs(
fVertexSPD[2]) > 10.)
return false;
96 if(TMath::Abs(j->Eta()) > 0.5)
continue;
97 if(j->Pt() < 20.)
continue;
100 int jetptmin =
static_cast<int>(j->Pt()/10.) * 10;
101 TLorentzVector jetvec(j->Px(), j->Py(), j->Pz(), j->E());
102 for(
int i = 0; j->Nn(); i++){
103 AliVCluster *clust = j->ClusterAt(i,
fClusters->GetArray());
104 if(clust->E() < 1.)
continue;
105 TLorentzVector clustvec;
107 Double_t ptrel = clustvec.Perp(jetvec.Vect());
108 fHistos->
FillTH1(Form(
"hR02Jet%d%dPtRel", jetptmin, jetptmin+10), ptrel);
114 if(TMath::Abs(j->Eta()))
continue;
115 if(j->Pt() < 20)
continue;
118 int jetptmin =
static_cast<int>(j->Pt()/10.) * 10;
119 TLorentzVector jetvec(j->Px(), j->Py(), j->Pz(), j->E());
120 for(
int i = 0; j->Nn(); i++){
121 AliVCluster *clust = j->ClusterAt(i,
fClusters->GetArray());
122 if(clust->E() < 1.)
continue;
123 TLorentzVector clustvec;
125 Double_t ptrel = clustvec.Perp(jetvec.Vect());
126 fHistos->
FillTH1(Form(
"hR04Jet%d%dPtRel", jetptmin, jetptmin+10), ptrel);
TString fNameR04jets
Name of the jet container for R=0.4 jets.
virtual void UserCreateOutputObjects()
TString fTriggerString
Trigger string (distinguish EGA triggers)
virtual ~AliAnalysisTaskEmcalNeutralJets()
AliJetContainer * GetJetContainer(Int_t i=0) const
Double_t fVertexSPD[3]
!event Svertex
AliJetContainer * fR02jets
! Link to jet container for R=0.2 jets
UInt_t fTriggerBits
Trigger Bits.
AliClusterContainer * fClusters
! Link to cluster container;
Bool_t IsTrackInEmcalAcceptance(AliVParticle *part, Double_t edges=0.9) const
Determines if a track is inside the EMCal acceptance.
TString fNameClusters
Name of the cluster container.
THashList * GetListOfHistograms() const
Get the list of histograms.
TString fNameR02jets
Name of the jet container for R=0.2 jets.
THistManager * fHistos
! Histogram handler
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
AliAnalysisUtils * fAliAnalysisUtils
!vertex selection (optional)
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
virtual bool FillHistograms()
Function filling histograms.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
AliJetContainer * fR04jets
! Link to jet container for R=0.4 jets
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
virtual bool Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
AliEmcalList * fOutput
!output list
virtual bool IsEventSelected()
Performing event selection.
Base task in the EMCAL jet framework.
Container class for histograms.
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
AliAnalysisTaskEmcalNeutralJets()