AliPhysics  9df6235 (9df6235)
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 
58  enum JetShapeTree {
59  kAll = 0,
60  kInclElec = 1,
61  kPhotElec = 2,
62  kNoElec = 3
63  };
64 
66  AliAnalysisTaskEmcalHfeTagging(const char *name);
68 
70  void Terminate(Option_t *option);
71 
72  //Setters
79  void SetRMatching(Float_t f) { fRMatching = f ;}
81  void SetPtTriggerSelections(Float_t minpT, Float_t maxpT) { fminpTTrig = minpT; fmaxpTTrig = maxpT; }
87  void SetMinCentrality(Float_t t) { fCentMin = t ; }
88  void SetMaxCentrality(Float_t t) { fCentMax = t ; }
90  void SetHolePos(Float_t poshole) { fHolePos = poshole; }
91  void SetHoleWidth(Float_t holewidth) { fHoleWidth = holewidth; }
94 
95 protected:
97  Bool_t Run();
99 
100  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);
101  void GetNumberOfTrueElectrons(AliEmcalJet *jet,Int_t jetContNb, Int_t nMother, Double_t listMother[], Int_t &nTrueElec, Int_t &nTrueHFElec);
102  void GetWeightAndDecay(AliAODMCParticle *particle, Int_t &decay, Double_t &weight);
103  Int_t GetNumberOfPairs(AliAODTrack *track,const AliVVertex *pVtx, Int_t nMother, Double_t listMother[]);
104  Bool_t IsFromHFdecay(AliAODMCParticle *particle);
105  Bool_t IsFromLMdecay(AliAODMCParticle *particle);
106  Bool_t IsPrimary(AliAODMCParticle *particle);
107  Double_t GetPi0weight(Double_t mcPi0pT) const;
108  Double_t GetEtaweight(Double_t mcEtapT) const;
109  Bool_t InclElecTrackCuts(const AliVVertex *pVtx,AliAODTrack *ietrack, Int_t nMother, Double_t listMother[]);
110  Bool_t PhotElecTrackCuts(const AliVVertex *pVtx,AliAODTrack *aetrack, Int_t nMother, Double_t listMother[]);
111  Float_t GetJetMass(AliEmcalJet *jet,Int_t jetContNb);
112  Float_t Angularity(AliEmcalJet *jet, Int_t jetContNb);
113  Float_t GetJetAngularity(AliEmcalJet *jet, Int_t jetContNb);
114  Float_t Coronna(AliEmcalJet *jet, Int_t jetContNb);
115  Float_t GetJetCoronna(AliEmcalJet *jet, Int_t jetContNb);
116  Float_t PTD(AliEmcalJet *jet, Int_t jetContNb);
117  Float_t GetJetpTD(AliEmcalJet *jet, Int_t jetContNb);
118  Float_t Circularity(AliEmcalJet *jet, Int_t jetContNb);
119  Float_t GetJetCircularity(AliEmcalJet *jet, Int_t jetContNb);
120  Float_t LeSub(AliEmcalJet *jet, Int_t jetContNb);
121  Float_t GetJetLeSub(AliEmcalJet *jet, Int_t jetContNb);
123  Float_t GetSigma2(AliEmcalJet *jet, Int_t jetContNb);
124  Float_t Sigma2(AliEmcalJet *jet, Int_t jetContNb);
125 
126  Int_t SelectTrigger(Float_t minpT, Float_t maxpT);
128 
130  AliVEvent *fVevent;
131  AliPIDResponse *fpidResponse;
132  TClonesArray *fTracksTender; //Tender for tracks
133  const AliVVertex *pVtx; // z vertex
134  const AliVVertex *spdVtx; //spd z vertez
135 
136  AliMCEvent *fMC;
137  AliStack *fStack;
138  AliAODMCParticle *fMCparticle;
139  TClonesArray *fMCarray;
140  AliAODMCHeader *fMCheader;
141 
142 
143  Int_t fContainer; // jets to be analyzed 0 for Base, 1 for subtracted.
144  Float_t fMinFractionShared; // only fill histos for jets if shared fraction larger than X
145  JetShapeType fJetShapeType; // jet type to be used
146  JetShapeSub fJetShapeSub; // jet subtraction to be used
147  JetSelectionType fJetSelection; // Jet selection: inclusive/recoil jet
148  Float_t fShapesVar[21]; // jet shapes used for the tagging
151  Int_t fSelectedShapes; //chose set of shapes
152  Float_t fminpTTrig; //min - max pT for trigger particle in case of recoil jet
154  Float_t fangWindowRecoil; //angular window for btb recoil analysis
155  Int_t fSemigoodCorrect; //if==1 we run over semigood runs
156  Float_t fHolePos; //position in radians of the bad TPC sector
157  Float_t fHoleWidth; //width of the hole in radians
158  Bool_t fCentSelectOn; // switch on/off centrality selection
159  Float_t fCentMin; // min centrality value
160  Float_t fCentMax; // max centrality value
161  Bool_t fOneConstSelectOn; // switch on/off one constituent selection
163  Int_t fJetShapeTree; // selection of the tree
164 
165  Double_t fAssPtCut; // pt cut for associated electron
166  Int_t fITSncut; // ITC number of clusters for tagged electrons
167  Int_t fAssTPCnCut; // TPC number of clusters for associated electron
168  Int_t fTPCnCut; // TPC number of clusters for tagged electron
169  Bool_t fAssITSrefitCut; // ITS refit for associated electron
170  Bool_t fUseTender; // Use tender
171  Double_t fSigmaTOFcut; // sigma TOF cut |sigma_TOF|< cut
172  Double_t fSigmaTPCcut; // sigma TPC cut - cut < sigma_TPC < 3
173  Double_t fDcaXYcut; //DCA_xy cut
174  Double_t fDcaZcut; //DCA_xy cut
175  Double_t fIMcut; //invariant mass cut
176 
184  TH1F *fPtJet;
185  TH2F *fhpTjetpT; //control p[lot fo the recoil analysis
186  TH1F *fhPt;
187  TH1F *fhPhi;
208  TH1F *fTotElecPt;
210 
211  TTree *fTreeObservableTagging; // Tree with tagging variables subtracted MC or true MC or raw
212 
213 private:
216 
217  ClassDef(AliAnalysisTaskEmcalHfeTagging, 6)
218 };
219 #endif
220 
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
Int_t GetNumberOfPairs(AliAODTrack *track, const AliVVertex *pVtx, Int_t nMother, Double_t listMother[])
Bool_t PhotElecTrackCuts(const AliVVertex *pVtx, AliAODTrack *aetrack, Int_t nMother, Double_t listMother[])
Float_t Circularity(AliEmcalJet *jet, Int_t jetContNb)
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)