AliPhysics  eb0e5d9 (eb0e5d9)
AliAnalysisTaskEmcalHfeTagging.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskEmcalHfeTagging_H
2 #define AliAnalysisTaskEmcalHfeTagging_H
3 
4 class TH1;
5 class TH2;
6 class TH3;
7 class TH3F;
8 class TTree;
9 class THnSparse;
10 class TClonesArray;
11 class TArrayI;
12 class AliAODEvent;
13 class AliJetContainer;
15 class AliPIDResponse;
16 class AliHFEcontainer;
17 class AliHFEcuts;
18 class AliHFEpid;
19 class AliHFEpidQAmanager;
20 class AliCFManager;
21 class AliEventCuts;
22 class AliMultiEventInputHandler;
23 class AliAODMCHeader;
24 class AliAnalysisUtils;
25 
27 
28 
29 
31 public:
32 
33  enum JetShapeType {
34  kMCTrue = 0, // generated jets only
35  kTrueDet =1, // detector and generated jets
36  kData = 2, // raw data
37  kDetEmb = 3, //detector embedded jets
42  };
43  enum JetShapeSub {
44  kNoSub = 0,
45  kConstSub = 1,
47  };
50  kRecoil = 1
51  };
52 
56  };
57 
59  AliAnalysisTaskEmcalHfeTagging(const char *name);
61 
63  void Terminate(Option_t *option);
64 
65  //Setters
72  void SetRMatching(Float_t f) { fRMatching = f ;}
74  void SetPtTriggerSelections(Float_t minpT, Float_t maxpT) { fminpTTrig = minpT; fmaxpTTrig = maxpT; }
80  void SetMinCentrality(Float_t t) { fCentMin = t ; }
81  void SetMaxCentrality(Float_t t) { fCentMax = t ; }
83  void SetHolePos(Float_t poshole) { fHolePos = poshole; }
84  void SetHoleWidth(Float_t holewidth) { fHoleWidth = holewidth; }
87 
88 protected:
90  Bool_t Run();
92 
93  void GetNumberOfElectrons(AliEmcalJet *jet,Int_t jetContNb, Int_t nMother, Double_t listMother[], Int_t &nIncElec, Int_t &nPhotElec, Double_t &pElec, Double_t &ptElec, Bool_t &hasElec);
94  void GetNumberOfTrueElectrons(AliEmcalJet *jet,Int_t jetContNb, Int_t nMother, Double_t listMother[], Int_t &nTrueElec, Int_t &nTrueHFElec);
95  void GetWeightAndDecay(AliAODMCParticle *particle, Int_t &decay, Double_t &weight);
96  Int_t GetNumberOfPairs(AliEmcalJet *jet,AliAODTrack *track,const AliVVertex *pVtx, Int_t nMother, Double_t listMother[]);
97  Bool_t IsFromHFdecay(AliAODMCParticle *particle);
98  Bool_t IsFromLMdecay(AliAODMCParticle *particle);
99  Bool_t IsPrimary(AliAODMCParticle *particle);
100  Double_t GetPi0weight(Double_t mcPi0pT) const;
101  Double_t GetEtaweight(Double_t mcEtapT) const;
102  Bool_t InclElecTrackCuts(const AliVVertex *pVtx,AliAODTrack *ietrack, Int_t nMother, Double_t listMother[]);
103  Bool_t PhotElecTrackCuts(const AliVVertex *pVtx,AliAODTrack *aetrack, Int_t nMother, Double_t listMother[]);
104  Float_t GetJetMass(AliEmcalJet *jet,Int_t jetContNb);
105  Float_t Angularity(AliEmcalJet *jet, Int_t jetContNb);
106  Float_t GetJetAngularity(AliEmcalJet *jet, Int_t jetContNb);
107  Float_t Coronna(AliEmcalJet *jet, Int_t jetContNb);
108  Float_t GetJetCoronna(AliEmcalJet *jet, Int_t jetContNb);
109  Float_t PTD(AliEmcalJet *jet, Int_t jetContNb);
110  Float_t GetJetpTD(AliEmcalJet *jet, Int_t jetContNb);
111  Float_t Circularity(AliEmcalJet *jet, Int_t jetContNb);
112  Float_t GetJetCircularity(AliEmcalJet *jet, Int_t jetContNb);
113  Float_t LeSub(AliEmcalJet *jet, Int_t jetContNb);
114  Float_t GetJetLeSub(AliEmcalJet *jet, Int_t jetContNb);
116  Float_t GetSigma2(AliEmcalJet *jet, Int_t jetContNb);
117  Float_t Sigma2(AliEmcalJet *jet, Int_t jetContNb);
118 
119  Int_t SelectTrigger(Float_t minpT, Float_t maxpT);
121 
123  AliVEvent *fVevent;
124  AliPIDResponse *fpidResponse;
125  TClonesArray *fTracksTender; //Tender for tracks
126  const AliVVertex *pVtx; // z vertex
127  const AliVVertex *spdVtx; //spd z vertez
128 
129  AliMCEvent *fMC;
130  AliStack *fStack;
131  AliAODMCParticle *fMCparticle;
132  TClonesArray *fMCarray;
133  AliAODMCHeader *fMCheader;
134 
135 
136  Int_t fContainer; // jets to be analyzed 0 for Base, 1 for subtracted.
137  Float_t fMinFractionShared; // only fill histos for jets if shared fraction larger than X
138  JetShapeType fJetShapeType; // jet type to be used
139  JetShapeSub fJetShapeSub; // jet subtraction to be used
140  JetSelectionType fJetSelection; // Jet selection: inclusive/recoil jet
141  Float_t fShapesVar[24]; // jet shapes used for the tagging
144  Int_t fSelectedShapes; //chose set of shapes
145  Float_t fminpTTrig; //min - max pT for trigger particle in case of recoil jet
147  Float_t fangWindowRecoil; //angular window for btb recoil analysis
148  Int_t fSemigoodCorrect; //if==1 we run over semigood runs
149  Float_t fHolePos; //position in radians of the bad TPC sector
150  Float_t fHoleWidth; //width of the hole in radians
151  Bool_t fCentSelectOn; // switch on/off centrality selection
152  Float_t fCentMin; // min centrality value
153  Float_t fCentMax; // max centrality value
154  Bool_t fOneConstSelectOn; // switch on/off one constituent selection
156  Int_t fMCweight; //0: no weight, 1: enhanced MC, 2: MB MC
157 
158  Double_t fAssPtCut; // pt cut for associated electron
159  Int_t fITSncut; // ITC number of clusters for tagged electrons
160  Int_t fAssTPCnCut; // TPC number of clusters for associated electron
161  Int_t fTPCnCut; // TPC number of clusters for tagged electron
162  Bool_t fAssITSrefitCut; // ITS refit for associated electron
163  Bool_t fUseTender; // Use tender
164  Double_t fSigmaTOFcut; // sigma TOF cut |sigma_TOF|< cut
165  Double_t fSigmaTPCcut; // sigma TPC cut - cut < sigma_TPC < 3
166  Double_t fDcaXYcut; //DCA_xy cut
167  Double_t fDcaZcut; //DCA_xy cut
168  Double_t fIMcut; //invariant mass cut
169 
177  TH1F *fPtJet;
178  TH1F *fPtGenJet;
184  TH2F *fhpTjetpT; //control p[lot fo the recoil analysis
185  TH1F *fhPt;
186  TH1F *fhPhi;
206  TH1F *fGenHfePt;
207  TH1F *fGenPePt;
208  TH1F *fUlsLsElecPt[5];
209  TH1F *fTotElecPt[5];
211  TH1F *fptJetIE; // pT of jets containing IE
212  TH1F *fptJetPE; // pT of jets containing PE
213  TH1F *fptJetHFE; // pT of jets containing HFE
214  TH1F *fptRecPE;
215  TH1F *fptTruePE;
216  TH1F *fptTrueHFE[4];
217  TH1F *fptWrongPE;
218  TH1F *fPtTrack;
234  TTree *fTreeObservableTagging; // Tree with tagging variables subtracted MC or true MC or raw
235 
236 private:
239 
240  ClassDef(AliAnalysisTaskEmcalHfeTagging, 6)
241 };
242 #endif
243 
Float_t Angularity(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetJetLeSub(AliEmcalJet *jet, Int_t jetContNb)
Bool_t IsFromHFdecay(AliAODMCParticle *particle)
double Double_t
Definition: External.C:58
Definition: External.C:260
Definition: External.C:236
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
Bool_t FillHistograms()
Function filling histograms.
Definition: External.C:244
Double_t GetPi0weight(Double_t mcPi0pT) const
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
TCanvas * c
Definition: TestFitELoss.C:172
Bool_t PhotElecTrackCuts(const AliVVertex *pVtx, AliAODTrack *aetrack, Int_t nMother, Double_t listMother[])
Float_t Circularity(AliEmcalJet *jet, Int_t jetContNb)
Int_t GetNumberOfPairs(AliEmcalJet *jet, AliAODTrack *track, const AliVVertex *pVtx, Int_t nMother, Double_t listMother[])
Float_t GetJetCircularity(AliEmcalJet *jet, Int_t jetContNb)
Container for particles within the EMCAL framework.
Float_t Sigma2(AliEmcalJet *jet, Int_t jetContNb)
Float_t PTD(AliEmcalJet *jet, Int_t jetContNb)
Double_t GetEtaweight(Double_t mcEtapT) const
TClonesArray * fTracksTender
PID response.
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
Bool_t IsPrimary(AliAODMCParticle *particle)
Float_t GetJetMass(AliEmcalJet *jet, Int_t jetContNb)
Bool_t InclElecTrackCuts(const AliVVertex *pVtx, AliAODTrack *ietrack, Int_t nMother, Double_t listMother[])
Double_t RelativePhi(Double_t mphi, Double_t vphi)
AliAnalysisTaskEmcalHfeTagging & operator=(const AliAnalysisTaskEmcalHfeTagging &)
void GetNumberOfElectrons(AliEmcalJet *jet, Int_t jetContNb, Int_t nMother, Double_t listMother[], Int_t &nIncElec, Int_t &nPhotElec, Double_t &pElec, Double_t &ptElec, Bool_t &hasElec)
Float_t LeSub(AliEmcalJet *jet, Int_t jetContNb)
void GetWeightAndDecay(AliAODMCParticle *particle, Int_t &decay, Double_t &weight)
decay
Definition: HFPtSpectrum.C:41
Definition: External.C:220
Float_t GetJetCoronna(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetJetAngularity(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetSigma2(AliEmcalJet *jet, Int_t jetContNb)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
void GetNumberOfTrueElectrons(AliEmcalJet *jet, Int_t jetContNb, Int_t nMother, Double_t listMother[], Int_t &nTrueElec, Int_t &nTrueHFElec)
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
Bool_t IsFromLMdecay(AliAODMCParticle *particle)
Int_t SelectTrigger(Float_t minpT, Float_t maxpT)
void SetPtTriggerSelections(Float_t minpT, Float_t maxpT)
Float_t GetJetpTD(AliEmcalJet *jet, Int_t jetContNb)
Float_t Coronna(AliEmcalJet *jet, Int_t jetContNb)
Container for jet within the EMCAL jet framework.
Definition: External.C:196
Float_t GetJetNumberOfConstituents(AliEmcalJet *jet, Int_t jetContNb)