AliPhysics  9b6b435 (9b6b435)
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  Bool_t HasMother(AliAODMCParticle *particle);
101  Double_t GetPi0weight(Double_t mcPi0pT) const;
102  Double_t GetEtaweight(Double_t mcEtapT) const;
103  Bool_t InclElecTrackCuts(const AliVVertex *pVtx,AliAODTrack *ietrack, Int_t nMother, Double_t listMother[]);
104  Bool_t PhotElecTrackCuts(const AliVVertex *pVtx,AliAODTrack *aetrack, Int_t nMother, Double_t listMother[]);
105  Float_t GetJetMass(AliEmcalJet *jet,Int_t jetContNb);
106  Float_t Angularity(AliEmcalJet *jet, Int_t jetContNb);
107  Float_t GetJetAngularity(AliEmcalJet *jet, Int_t jetContNb);
108  Float_t Coronna(AliEmcalJet *jet, Int_t jetContNb);
109  Float_t GetJetCoronna(AliEmcalJet *jet, Int_t jetContNb);
110  Float_t PTD(AliEmcalJet *jet, Int_t jetContNb);
111  Float_t GetJetpTD(AliEmcalJet *jet, Int_t jetContNb);
112  Float_t Circularity(AliEmcalJet *jet, Int_t jetContNb);
113  Float_t GetJetCircularity(AliEmcalJet *jet, Int_t jetContNb);
114  Float_t LeSub(AliEmcalJet *jet, Int_t jetContNb);
115  Float_t GetJetLeSub(AliEmcalJet *jet, Int_t jetContNb);
117  Float_t GetSigma2(AliEmcalJet *jet, Int_t jetContNb);
118  Float_t Sigma2(AliEmcalJet *jet, Int_t jetContNb);
119 
120  Int_t SelectTrigger(Float_t minpT, Float_t maxpT);
122 
124  AliVEvent *fVevent;
125  AliPIDResponse *fpidResponse;
126  TClonesArray *fTracksTender; //Tender for tracks
127  const AliVVertex *pVtx; // z vertex
128  const AliVVertex *spdVtx; //spd z vertez
129 
130  AliMCEvent *fMC;
131  AliStack *fStack;
132  AliAODMCParticle *fMCparticle;
133  TClonesArray *fMCarray;
134  AliAODMCHeader *fMCheader;
135 
136 
137  Int_t fContainer; // jets to be analyzed 0 for Base, 1 for subtracted.
138  Float_t fMinFractionShared; // only fill histos for jets if shared fraction larger than X
139  JetShapeType fJetShapeType; // jet type to be used
140  JetShapeSub fJetShapeSub; // jet subtraction to be used
141  JetSelectionType fJetSelection; // Jet selection: inclusive/recoil jet
142  Float_t fShapesVar[26]; // jet shapes used for the tagging
145  Int_t fSelectedShapes; //chose set of shapes
146  Float_t fminpTTrig; //min - max pT for trigger particle in case of recoil jet
148  Float_t fangWindowRecoil; //angular window for btb recoil analysis
149  Int_t fSemigoodCorrect; //if==1 we run over semigood runs
150  Float_t fHolePos; //position in radians of the bad TPC sector
151  Float_t fHoleWidth; //width of the hole in radians
152  Bool_t fCentSelectOn; // switch on/off centrality selection
153  Float_t fCentMin; // min centrality value
154  Float_t fCentMax; // max centrality value
155  Bool_t fOneConstSelectOn; // switch on/off one constituent selection
157  Int_t fMCweight; //0: no weight, 1: enhanced MC, 2: MB MC
158  Int_t fRunNumber; // run number
159 
160  Double_t fAssPtCut; // pt cut for associated electron
161  Int_t fITSncut; // ITC number of clusters for tagged electrons
162  Int_t fAssTPCnCut; // TPC number of clusters for associated electron
163  Int_t fTPCnCut; // TPC number of clusters for tagged electron
164  Bool_t fAssITSrefitCut; // ITS refit for associated electron
165  Bool_t fUseTender; // Use tender
166  Double_t fSigmaTOFcut; // sigma TOF cut |sigma_TOF|< cut
167  Double_t fSigmaTPCcut; // sigma TPC cut - cut < sigma_TPC < 3
168  Double_t fDcaXYcut; //DCA_xy cut
169  Double_t fDcaZcut; //DCA_xy cut
170  Double_t fIMcut; //invariant mass cut
171 
172  TH1F *fNeventV0;
173  TH1F *fNeventT0;
181  TH1F *fPtJet;
182  TH1F *fPtGenJet;
195  TH1F *fnTPCSigma[5][18];
208  TH1F *fPi0PtGen;
209  TH1F *fPi0PtEnh;
210  TH1F *fEtaPtGen;
211  TH1F *fEtaPtEnh;
212  TH1F *fGenHfePt;
213  TH1F *fGenPePt;
214  TH1F *fUlsLsElecPt[5];
215  TH1F *fTotElecPt[5];
217  TH1F *fptJetIE; // pT of jets containing IE
218  TH1F *fptJetPE; // pT of jets containing PE
219  TH1F *fptJetHFE; // pT of jets containing HFE
220  TH1F *fptRecPE;
221  TH1F *fptTruePE;
224  TH1F *fptWrongPE;
225  TH1F *fPtTrack;
245  TTree *fTreeObservableTagging; // Tree with tagging variables subtracted MC or true MC or raw
246 
247 private:
250 
251  ClassDef(AliAnalysisTaskEmcalHfeTagging, 6)
252 };
253 #endif
254 
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)
Bool_t HasMother(AliAODMCParticle *particle)
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)