1 /**************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /////////////////////////////////////////////////////////////
18 // AliAnalysisTaskSE for the reconstruction of heavy flavor
19 // decays, using the class AliAnalysisVertexingHF.
21 // Author: A.Dainese, andrea.dainese@lnl.infn.it
22 /////////////////////////////////////////////////////////////
26 #include <TClonesArray.h>
28 #include "AliVEvent.h"
29 #include "AliAODEvent.h"
30 #include "AliESDEvent.h"
31 #include "AliAnalysisVertexingHF.h"
32 #include "AliAnalysisTaskSE.h"
33 #include "AliAnalysisTaskSEVertexingHF.h"
35 ClassImp(AliAnalysisTaskSEVertexingHF)
38 //________________________________________________________________________
39 AliAnalysisTaskSEVertexingHF::AliAnalysisTaskSEVertexingHF():
45 fCharm3ProngTClArr(0),
48 // Default constructor
51 //________________________________________________________________________
52 AliAnalysisTaskSEVertexingHF::AliAnalysisTaskSEVertexingHF(const char *name):
53 AliAnalysisTaskSE(name),
58 fCharm3ProngTClArr(0),
61 // Default constructor
64 //________________________________________________________________________
65 AliAnalysisTaskSEVertexingHF::~AliAnalysisTaskSEVertexingHF()
70 //________________________________________________________________________
71 void AliAnalysisTaskSEVertexingHF::Init()
74 // Instanciates vHF and loads its parameters
76 if(fDebug > 1) printf("AnalysisTaskSEVertexingHF::Init() \n");
78 gROOT->LoadMacro("ConfigVertexingHF.C");
80 fVHF = (AliAnalysisVertexingHF*)gROOT->ProcessLine("ConfigVertexingHF()");
86 //________________________________________________________________________
87 void AliAnalysisTaskSEVertexingHF::UserCreateOutputObjects()
89 // Create the output container
91 if(fDebug > 1) printf("AnalysisTaskSEVertexingHF::UserCreateOutPutData() \n");
94 printf("AnalysisTaskSEVertexingHF::UserCreateOutPutData() \n ERROR! no fvHF!\n");
98 fVerticesHFTClArr = new TClonesArray("AliAODVertex", 0);
99 fVerticesHFTClArr->SetName("VerticesHF");
100 AddAODBranch("TClonesArray", &fVerticesHFTClArr);
102 if(fVHF->GetD0toKpi()) {
103 fD0toKpiTClArr = new TClonesArray("AliAODRecoDecayHF2Prong", 0);
104 fD0toKpiTClArr->SetName("D0toKpi");
105 AddAODBranch("TClonesArray", &fD0toKpiTClArr);
108 if(fVHF->GetJPSItoEle()) {
109 fJPSItoEleTClArr = new TClonesArray("AliAODRecoDecayHF2Prong", 0);
110 fJPSItoEleTClArr->SetName("JPSItoEle");
111 AddAODBranch("TClonesArray", &fJPSItoEleTClArr);
114 if(fVHF->Get3Prong()) {
115 fCharm3ProngTClArr = new TClonesArray("AliAODRecoDecayHF3Prong", 0);
116 fCharm3ProngTClArr->SetName("Charm3Prong");
117 AddAODBranch("TClonesArray", &fCharm3ProngTClArr);
120 if(fVHF->Get4Prong()) {
121 fCharm4ProngTClArr = new TClonesArray("AliAODRecoDecayHF4Prong", 0);
122 fCharm4ProngTClArr->SetName("Charm4Prong");
123 AddAODBranch("TClonesArray", &fCharm4ProngTClArr);
129 //________________________________________________________________________
130 void AliAnalysisTaskSEVertexingHF::UserExec(Option_t */*option*/)
132 // Execute analysis for current event:
133 // heavy flavor vertexing
135 AliVEvent *event = dynamic_cast<AliVEvent*> (InputEvent());
137 // heavy flavor vertexing
138 fVHF->FindCandidates(event,
148 //________________________________________________________________________
149 void AliAnalysisTaskSEVertexingHF::Terminate(Option_t */*option*/)
151 // Terminate analysis
153 if(fDebug > 1) printf("AnalysisTaskSEVertexingHF: Terminate() \n");