]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/muon/AliAnalysisTaskMuonTreeBuilder.h
expand particle map when needed
[u/mrichter/AliRoot.git] / PWG / muon / AliAnalysisTaskMuonTreeBuilder.h
CommitLineData
9fe33e0b 1#ifndef ALIANALYSISTASKMUONTREEBUILDER_H
2#define ALIANALYSISTASKMUONTREEBUILDER_H
3
27de2dfb 4/* $Id$ */
5
9fe33e0b 6#include "AliAnalysisTaskSE.h"
7#include "TMath.h"
8
9// Analysis task for muon-dimuon analysis
10// Works for real and MC events
11// author: L. Bianchi - Universita' & INFN Torino
12
13class TH1I;
14class TParticle ;
15class TLorentzVector ;
9fe33e0b 16class TFile ;
17class AliStack ;
18class AliESDtrack;
19class AliVParticle;
20class AliMCParticle;
21class AliMCEvent;
22
23
24class AliAnalysisTaskMuonTreeBuilder : public AliAnalysisTaskSE {
25 public:
26
27 AliAnalysisTaskMuonTreeBuilder();
28 AliAnalysisTaskMuonTreeBuilder(const Char_t* name);
29 AliAnalysisTaskMuonTreeBuilder& operator= (const AliAnalysisTaskMuonTreeBuilder& c);
30 AliAnalysisTaskMuonTreeBuilder(const AliAnalysisTaskMuonTreeBuilder& c);
31 virtual ~AliAnalysisTaskMuonTreeBuilder();
32
33 // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
34 void UserExec(Option_t *option);
35 void Terminate(Option_t *);
36 void UserCreateOutputObjects();
37
38
39 // Data types
40 void SetIsMC (Bool_t flagMC) {fIsMC=flagMC;}
41 void SetBeamEnergy (Double_t en) {fBeamEnergy=en;}
42
43 protected:
44
c9726e00 45 Double_t fNevt ; // event counter
46 Double_t fBeamEnergy ; // Energy of the beam (required for the CS angle)
47 TList *fOutput ; // output
48 TTree *fOutputTree ; //! tree output
9fe33e0b 49
c9726e00 50 Bool_t fIsMC; // if MC truth has to be read
9fe33e0b 51
c9726e00 52 Bool_t fIsSelected; // physics selection flag
53 char fTrigClass[100]; // fired trigger classes
9fe33e0b 54
c9726e00 55 Int_t fNumMuonTracks ; // muon tracks in the event
56 Int_t fNumSPDTracklets; // spd tracklets
57 Int_t fNumContributors; // n contributors
58 Double_t fVertex[3]; // x,y,z vertex
59 Double_t fpT[10]; // single mu pT
60 Double_t fE[10]; // single mu E
61 Double_t fpx[10]; // single mu px
62 Double_t fpy[10]; // single mu py
63 Double_t fpz[10]; // single mu pz
64 Double_t fpxUncorr[10]; // single mu px uncorrected
65 Double_t fpyUncorr[10]; // single mu py uncorrected
66 Double_t fpzUncorr[10]; // single mu pz uncorrected
67 Double_t fy[10]; // single mu y
68 Double_t feta[10]; // single mu eta
69 Double_t fphi[10]; // single mu phi
70 Int_t fMatchTrig[10]; // single mu match trigger
71 Double_t fTrackChi2[10]; // single mu chi2 track
72 Double_t fMatchTrigChi2[10]; // single mu chi2 of match trigger
73 Double_t fDCA[10]; // single mu DCA
74 Short_t fCharge[10]; // single mu charge
75 Int_t fMuFamily[10]; // single mu provenience
76 Double_t fRAtAbsEnd[10]; // single mu distance from beam center at end abs
9fe33e0b 77
c9726e00 78 Int_t fNumDimuons; // dimuons in the event
79 Int_t fDimuonConstituent[45][2]; // reference to single mus
80 Double_t fpTdimuon[45]; // dimuon pT
81 Double_t fpxdimuon[45]; // dimuon px
82 Double_t fpydimuon[45]; // dimuon py
83 Double_t fpzdimuon[45]; // dimuon pz
84 Double_t fydimuon[45]; // dimuon y
85 Double_t fiMassdimuon[45]; // dimuon invariant mass
86 Double_t fcostCS[45]; // dimuon cos theta Collins-Soper
87 Double_t fcostHE[45]; // dimuon cos theta Helicity
88 Double_t fphiCS[45]; // dimuon phi Collins-Soper
89 Double_t fphiHE[45]; // dimuon phi Helicity
9fe33e0b 90
91 //Int_t fIsPrimary[10];
c9726e00 92 Int_t fPDG[10]; // PDG single mu
93 Int_t fPDGmother[10]; // PDG mother single mu
94 Int_t fPDGdimu[45]; // PDG dimu
9fe33e0b 95
96
97
98
99
100 Int_t FindDimuFamily(AliMCParticle* mcTrack1,AliMCParticle* mcTrack2, AliMCEvent* mcEvent) const;
101 Int_t FindMuFamily(AliMCParticle* mcTrack, AliMCEvent* mcEvent) const;
102 Double_t Imass (Double_t e1, Double_t px1, Double_t py1, Double_t pz1, Double_t e2, Double_t px2, Double_t py2, Double_t pz2) const;
103 Double_t Rap (Double_t e, Double_t pz) const;
9fe33e0b 104 Double_t Phideg(Double_t phi) const;
105
9fe33e0b 106 Double_t CostCS (Double_t px1, Double_t py1, Double_t pz1, Double_t e1, Double_t charge1, Double_t px2, Double_t py2, Double_t pz2, Double_t e2);
107 Double_t CostHE (Double_t px1, Double_t py1, Double_t pz1, Double_t e1, Double_t charge1, Double_t px2, Double_t py2, Double_t pz2, Double_t e2);
108 Double_t PhiCS (Double_t px1, Double_t py1, Double_t pz1, Double_t e1, Double_t charge1, Double_t px2, Double_t py2, Double_t pz2, Double_t e2);
109 Double_t PhiHE (Double_t px1, Double_t py1, Double_t pz1, Double_t e1, Double_t charge1, Double_t px2, Double_t py2, Double_t pz2, Double_t e2);
110
111 ClassDef(AliAnalysisTaskMuonTreeBuilder,1);
112};
113
114#endif