AliPhysics  master (3d17d9d)
AliAnalysisTaskSDKLResponse.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskSDKLResponse_H
2 #define AliAnalysisTaskSDKLResponse_H
3 
4 // $Id$
5 
6 class TH1;
7 class TH2;
8 class TH3;
9 class TNtuple;
10 class THnSparse;
11 class TRandom;
12 class AliJetContainer;
14 //class AliClusterContainer;
15 
16 //#include "AliAnalysisTaskEmcal.h"
18 //#include "AliFJWrapper.h"
19 #include "FJ_includes.h"
20 //#include "AliEmcalJet.h"
21 //#include "AliJetContainer.h"
22 #include "AliAnalysisTaskSDKL.h"
23 
24 struct mjet {
25  double pt;
26  double pt_scalar;
27  double eta;
28  double phi;
29  double area;
30  std::vector<double> track_pts;
31  std::vector<int> track_labels;
32  std::vector<split> splits;
34  fastjet::PseudoJet *pointerPJet;
35 };
36 
38  public:
39 
41  AliAnalysisTaskSDKLResponse(const char *name, Int_t const backgroption, Double_t const fractioneventsfortree);
42  virtual ~AliAnalysisTaskSDKLResponse();
43 
44  void UserCreateOutputObjects();
45  void Terminate(Option_t *option);
46 
47  static AliAnalysisTaskSDKLResponse* AddTaskSoftDropResponse(
48  const char *ntracks = "usedefault",
49  const char *njets1 = "Jets1",
50  const char *njets2 = "Jets2",
51  const char *nrho = "Rho",
52  Int_t nCentBins = 1,
53  Double_t jetradius = 0.4,
54  Double_t jetptcut = 1,
55  Double_t jetareacut = 0.6,
56  const char *type = "EMCAL",
57  Int_t backgroption = 0,
58  Int_t leadhadtype = 0,
59  Double_t fractioneventsfortree = 1.e-6,
60  const char *taskname = "AliAnalysisTaskSDKLResponse"
61  );
62 
63  protected:
64 
65  void ExecOnce();
66  Bool_t FillHistograms() ;
67  Bool_t Run() ;
68 
69  THnSparse *fhResponse[4];
71  TH2F *fhPtDeltaZg[4];
72  TH2F *fhPtDeltaRg[4];
73  TH2F *fhPtDeltaMg[4];
74 
75  THnSparse *fhResponseBackSub[4];
77  TH2F *fhPtDeltaZgBackSub[4];
78  TH2F *fhPtDeltaRgBackSub[4];
79  TH2F *fhPtDeltaMgBackSub[4];
80 
81  THnSparse *fhResponseDet[4];
83  TH2F *fhPtDeltaZgDet[4];
84  TH2F *fhPtDeltaRgDet[4];
85  TH2F *fhPtDeltaMgDet[4];
86 
87 // TH1F *fhRho; //!<!
88 // TH1F *fhRhoSparse; //!<!
89 
92 
93  TNtuple *fTreeDL;
94  TNtuple *fTreeDLUEBS;
95  TNtuple *fTreePL;
96 
101 
102  private:
103  AliAnalysisTaskSDKLResponse(const AliAnalysisTaskSDKLResponse&); // not implemented
104  AliAnalysisTaskSDKLResponse &operator=(const AliAnalysisTaskSDKLResponse&); // not implemented
105 
106  int FillResponseFromMjets( mjet const & mjet1, mjet const & mjet2, THnSparse* hr[4], Float_t const dist, Float_t const eshare, Bool_t const iscl);
107  int FillDeltasFromMjets( mjet const & mjet1, mjet const & mjet2, TH2F *hptdpt, TH2F *h1[4], TH2F *h2[4], TH2F *h3[4] );
108 
109  Float_t CalcDist(mjet const & mjet1, mjet const & mjet2);
110  Float_t CalcEnergyShare(mjet const & mjet1, mjet const & mjet2);
111  Bool_t IsClosestPair(int const i, int const j, std::vector <mjet> const & mjet_container1, std::vector <mjet> const & mjet_container2);
112 
113  void FillMjetContainer(AliJetContainer *jet_container, std::vector <mjet> & mjet_container);
114  void FillMjetContainer(std::vector <fastjet::PseudoJet> & jet_container, std::vector <mjet> & mjet_container);
115 
116  void FillRespTree(std::vector<AliEmcalJet*> const & probe_jets, std::vector<fastjet::PseudoJet> const & resp_jets, TNtuple* tree);
117 
119  TRandom *fRandom;
120 
121 
122  ClassDef(AliAnalysisTaskSDKLResponse, 1) // jet sample analysis task
123 };
124 #endif
double Double_t
Definition: External.C:58
Definition: External.C:236
Definition: External.C:244
fastjet::PseudoJet * pointerPJet
std::vector< double > track_pts
Int_t nCentBins
Container for particles within the EMCAL framework.
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
AliParticleContainer * fTracksCont2
Tracks.
std::vector< split > splits
AliParticleContainer * fTracksCont1
Jets.
Definition: External.C:220
AliEmcalJet * pointerAJet
std::vector< int > track_labels
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
TTree * tree
Container for jet within the EMCAL jet framework.
Definition: External.C:196