]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/AliAnalysisTaskSEVertexingHF.cxx
New options: 1)raw data type. 2)initialization of reconstruction paramteres. Clean up.
[u/mrichter/AliRoot.git] / PWG3 / AliAnalysisTaskSEVertexingHF.cxx
CommitLineData
699a38d6 1/**************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/////////////////////////////////////////////////////////////
17//
18// AliAnalysisTaskSE for the reconstruction of heavy flavor
19// decays, using the class AliAnalysisVertexingHF.
20//
21// Author: A.Dainese, andrea.dainese@lnl.infn.it
22/////////////////////////////////////////////////////////////
23
24#include <TROOT.h>
25#include <TSystem.h>
26#include <TClonesArray.h>
27
28#include "AliAODEvent.h"
29#include "AliESDEvent.h"
30#include "AliAnalysisVertexingHF.h"
31#include "AliAnalysisTaskSE.h"
32#include "AliAnalysisTaskSEVertexingHF.h"
33
34ClassImp(AliAnalysisTaskSEVertexingHF)
35
36
37//________________________________________________________________________
38AliAnalysisTaskSEVertexingHF::AliAnalysisTaskSEVertexingHF():
39AliAnalysisTaskSE(),
40fVHF(0),
41fVerticesHFTClArr(0),
42fD0toKpiTClArr(0),
43fJPSItoEleTClArr(0),
44fCharm3ProngTClArr(0),
45fCharm4ProngTClArr(0)
46{
47 // Default constructor
48}
49
50//________________________________________________________________________
51AliAnalysisTaskSEVertexingHF::AliAnalysisTaskSEVertexingHF(const char *name):
52AliAnalysisTaskSE(name),
53fVHF(0),
54fVerticesHFTClArr(0),
55fD0toKpiTClArr(0),
56fJPSItoEleTClArr(0),
57fCharm3ProngTClArr(0),
58fCharm4ProngTClArr(0)
59{
60 // Default constructor
61}
62
63//________________________________________________________________________
64AliAnalysisTaskSEVertexingHF::~AliAnalysisTaskSEVertexingHF()
65{
66 // Destructor
67}
68
69//________________________________________________________________________
70void AliAnalysisTaskSEVertexingHF::Init()
71{
72 // Initialization
73 // Instanciates vHF and loads its parameters
74
75 if(fDebug > 1) printf("AnalysisTaskSEVertexingHF::Init() \n");
76
77 gROOT->LoadMacro("ConfigVertexingHF.C");
78
79 fVHF = (AliAnalysisVertexingHF*)gROOT->ProcessLine("ConfigVertexingHF()");
80 fVHF->PrintStatus();
81
82 return;
83}
84
85//________________________________________________________________________
86void AliAnalysisTaskSEVertexingHF::UserCreateOutputObjects()
87{
88 // Create the output container
89 //
90 if(fDebug > 1) printf("AnalysisTaskSEVertexingHF::UserCreateOutPutData() \n");
91
92 if(!fVHF) {
93 printf("AnalysisTaskSEVertexingHF::UserCreateOutPutData() \n ERROR! no fvHF!\n");
94 return;
95 }
96
97 fVerticesHFTClArr = new TClonesArray("AliAODVertex", 0);
98 fVerticesHFTClArr->SetName("VerticesHF");
99 AddAODBranch("TClonesArray", fVerticesHFTClArr);
100
101 if(fVHF->GetD0toKpi()) {
102 fD0toKpiTClArr = new TClonesArray("AliAODRecoDecayHF2Prong", 0);
103 fD0toKpiTClArr->SetName("D0toKpi");
104 AddAODBranch("TClonesArray", fD0toKpiTClArr);
105 }
106
107 if(fVHF->GetJPSItoEle()) {
108 fJPSItoEleTClArr = new TClonesArray("AliAODRecoDecayHF2Prong", 0);
109 fJPSItoEleTClArr->SetName("JPSItoEle");
110 AddAODBranch("TClonesArray", fJPSItoEleTClArr);
111 }
112
113 if(fVHF->Get3Prong()) {
114 fCharm3ProngTClArr = new TClonesArray("AliAODRecoDecayHF3Prong", 0);
115 fCharm3ProngTClArr->SetName("Charm3Prong");
116 AddAODBranch("TClonesArray", fCharm3ProngTClArr);
117 }
118
119 if(fVHF->Get4Prong()) {
120 fCharm4ProngTClArr = new TClonesArray("AliAODRecoDecayHF4Prong", 0);
121 fCharm4ProngTClArr->SetName("Charm4Prong");
122 AddAODBranch("TClonesArray", fCharm4ProngTClArr);
123 }
124
125 return;
126}
127
128//________________________________________________________________________
129void AliAnalysisTaskSEVertexingHF::UserExec(Option_t */*option*/)
130{
131 // Execute analysis for current event:
132 // heavy flavor vertexing
133
134 AliESDEvent *esd = dynamic_cast<AliESDEvent*> (InputEvent());
135
136 // heavy flavor vertexing
137 fVHF->FindCandidatesESDtoAOD(esd,
138 fVerticesHFTClArr,
139 fD0toKpiTClArr,
140 fJPSItoEleTClArr,
141 fCharm3ProngTClArr,
142 fCharm4ProngTClArr);
143
144 return;
145}
146
147//________________________________________________________________________
148void AliAnalysisTaskSEVertexingHF::Terminate(Option_t */*option*/)
149{
150 // Terminate analysis
151 //
152 if(fDebug > 1) printf("AnalysisTaskSEVertexingHF: Terminate() \n");
153}