1 /// \ingroup "PWG3muon"
2 /// \class AliAnalysisTaskSingleMu
3 /// \brief Analysis task for single muons in the spectrometer
14 class AliAnalysisTaskSingleMu : public AliAnalysisTaskSE {
16 AliAnalysisTaskSingleMu(const char *name = "AliAnalysisTaskSingleMu", Int_t fillTreeScaleDown = 0, Bool_t keepAll = kFALSE);
17 virtual ~AliAnalysisTaskSingleMu();
19 virtual void UserCreateOutputObjects();
20 virtual void UserExec(Option_t *option);
21 virtual void Terminate(Option_t *option);
22 virtual void NotifyRun();
23 virtual void FinishTaskOutput();
25 void SetRefTrigName(const Char_t* trigClassMB = "CINT1B",
26 const Char_t* trigClassMU = "CMUS1B");
28 /// Get CORRFW manager
29 AliCFManager * GetCFManager() const { return fCFManager; }
32 kHvarPt, ///< Pt at vertex
33 kHvarEta, ///< Pseudo-rapidity
36 kHvarVz, ///< Z vertex position
37 kHvarThetaZones, ///< Theta at absorber end (4 zones)
38 kHvarCharge, ///< Particle charge
39 kHvarMatchTrig, ///< Matching trigger
40 kHvarTrigClass, ///< Trigger classes
41 kHvarIsGoodVtx, ///< IP vertex correctly reconstructed
42 kHvarMotherType, ///< Mother type (MC only)
43 kNvars ///< THnSparse dimensions
47 kStepReconstructed, ///< Reconstructed tracks
48 kStepAcceptance, ///< Track in acceptance
49 kStepMuonRef, ///< Reference muon
50 kStepGeneratedMC, ///< Generated tracks (MC)
51 kStepAcceptanceMC, ///< Track in acceptance (MC)
52 kStepMuonRefMC, ///< Reference muon) (MC)
53 kNsteps ///< Number of steps
58 AliAnalysisTaskSingleMu(const AliAnalysisTaskSingleMu&);
59 AliAnalysisTaskSingleMu& operator=(const AliAnalysisTaskSingleMu&);
63 kHistoNeventsPerTrig, ///< Number of events per trigger
64 kHistoMuonMultiplicity, ///< Number of muons per event
65 kHistoEventVz, ///< Vertex z distribution for all events
66 kHistoEventVzNorm, ///< Vertex z distribution normalized to the muon events
67 kHistoNeventsPerRun, ///< Number of triggers per run (for check)
68 kHistoNmuonsPerRun, ///< Number of muons per run (for check)
69 kNsummaryHistos ///< Number of summary histograms
73 kNoMatchTrig, ///< No match with trigger
74 kAllPtTrig, ///< Match All Pt
75 kLowPtTrig, ///< Match Low Pt
76 kHighPtTrig, ///< Match High Pt
77 kNtrigCuts ///< Total number of trigger types
83 kHistoCheckVzMC, ///< Check vertex distribution
84 kNsummaryHistosMC ///< Summary histograms for MC
88 kHistoPtResolutionMC, ///< Pt resolution
89 kNhistoTypesMC ///< Number of MC histograms
93 kCharmMu, ///< Mu from charm
94 kBeautyMu, ///< Mu from beauty
95 kPrimaryMu, ///< Primary mu
96 kSecondaryMu, ///< Secondary mu
97 kRecoHadron, ///< Reconstructed hadron
98 kUnknownPart, ///< Particle that fails matching kine
99 kNtrackSources ///< Total number of track sources
104 kVarPx, ///< Px at vertex
105 kVarPy, ///< Py at vertex
106 kVarPz, ///< Pz at vertex
107 kVarPt, ///< Pt at vertex
108 kVarPxAtDCA, ///< Px at DCA
109 kVarPyAtDCA, ///< Py at DCA
110 kVarPzAtDCA, ///< Pz at DCA
111 kVarPtAtDCA, ///< Pt at DCA
112 kVarPxUncorrected, ///< Px at first chamber
113 kVarPyUncorrected, ///< Py at first chamber
114 kVarPzUncorrected, ///< Pz at first chamber
115 kVarPtUncorrected, ///< Pt at first chamber
116 kVarXUncorrected, ///< X at first chamber
117 kVarYUncorrected, ///< Y at at first chamber
118 kVarZUncorrected, ///< Z at at first chamber
119 kVarXatDCA, ///< X position at DCA
120 kVarYatDCA, ///< Y position at DCA
123 kVarRapidity, ///< Rapidity
124 kVarCharge, ///< Charge
125 kVarRAtAbsEnd, ///< R at absorber end
127 kVarIPVx, ///< IP x position
128 kVarIPVy, ///< IP y position
129 kVarIPVz, ///< IP z position
134 kVarMatchTrig, ///< Match trigger
135 kVarIsMuon, ///< Is muon
136 kVarIsGhost, ///< Is Ghost (trigger track not matching tracker)
137 kVarLocalCircuit, ///< Fired local circuit
139 kVarPassPhysicsSelection, ///< Pass physics selection (Requires ESD)
140 kVarNVtxContrib, ///< Vertex contributors
141 kVarNspdTracklets, ///< SPD tracklets
142 kVarIsPileup, ///< Pileup vertices
148 kVarTrigMask, ///< Fires triggers mask
155 kVarBunchCrossNumber, ///< Bunch crossing number
156 kVarOrbitNumber, ///< Orbit number
157 kVarPeriodNumber, ///< Period number
158 kVarRunNumber, ///< Run number
164 kVarPxMC, ///< Px from Kine
165 kVarPyMC, ///< Py from Kine
166 kVarPzMC, ///< Pz from Kine
167 kVarPtMC, ///< Pt from Kine
168 kVarEtaMC, ///< Eta from Kine
169 kVarRapidityMC, ///< Rapidity from Kine
170 kVarVxMC, ///< Particle production x vertex from Kine
171 kVarVyMC, ///< Particle production y vertex from Kine
172 kVarVzMC, ///< Particle production z vertex from Kine
178 kVarMotherType, ///< Mother type
182 Int_t GetHistoIndex(Int_t histoTypeIndex, Int_t trigIndex = -1, Int_t srcIndex = -1);
183 Float_t GetBinThetaAbsEnd(Float_t RAtAbsEnd, Bool_t isTheta = kFALSE);
184 Float_t GetBinTrigClass(const Char_t* trigClass);
186 void FillTriggerHistos(Int_t histoIndex, Int_t matchTrig, Int_t motherType,
187 Float_t var1, Float_t var2 = 0. , Float_t var3 = 0.);
189 Int_t RecoTrackMother(AliMCParticle* mcParticle);
191 void Reset(Bool_t keepGlobal = kTRUE);
193 void SetAxisLabel(TAxis* axis);
195 Int_t fFillTreeScaleDown; ///< Ntuple must be filled each fFillTreeScaleDown events
196 Bool_t fKeepAll; ///< Flag indicating to keep all info in tree
197 Int_t fkNvtxContribCut; ///< Number of cuts in vertex contributors
198 AliCFManager* fCFManager; //!< Pointer to the CF manager
199 TList* fHistoList; //!< List of histograms for data
200 TList* fHistoListMC; //!< List of histograms for MC
201 TList* fHistoListQA; //!< List of QA histos
202 TTree* fTreeSingleMu; //!< Optional output Tree
203 TTree* fTreeSingleMuMC; //!< Optional output Tree for MC
204 Float_t* fVarFloat; //!< Reconstructed parameters float
205 Int_t* fVarInt; //!< Reconstructed parameters int
206 Char_t** fVarChar; //!< Reconstructed parameters string
207 UInt_t* fVarUInt; //!< Reconstructed parameters Uint
208 Float_t* fVarFloatMC; //!< MC parameters float
209 Int_t* fVarIntMC; //!< MC parameters int
210 TMap* fVertexPerRun; //!< Map of vertex distribution per run
211 TString* fRefTrigName; //!< reference trigger class name for MB and muon events
213 ClassDef(AliAnalysisTaskSingleMu, 2); // Single muon analysis