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 "AliAODEvent.h"
29 #include "AliESDEvent.h"
30 #include "AliAnalysisVertexingHF.h"
31 #include "AliAnalysisTaskSE.h"
32 #include "AliAnalysisTaskSEVertexingHF.h"
34 ClassImp(AliAnalysisTaskSEVertexingHF)
37 //________________________________________________________________________
38 AliAnalysisTaskSEVertexingHF::AliAnalysisTaskSEVertexingHF():
44 fCharm3ProngTClArr(0),
47 // Default constructor
50 //________________________________________________________________________
51 AliAnalysisTaskSEVertexingHF::AliAnalysisTaskSEVertexingHF(const char *name):
52 AliAnalysisTaskSE(name),
57 fCharm3ProngTClArr(0),
60 // Default constructor
63 //________________________________________________________________________
64 AliAnalysisTaskSEVertexingHF::~AliAnalysisTaskSEVertexingHF()
69 //________________________________________________________________________
70 void AliAnalysisTaskSEVertexingHF::Init()
73 // Instanciates vHF and loads its parameters
75 if(fDebug > 1) printf("AnalysisTaskSEVertexingHF::Init() \n");
77 gROOT->LoadMacro("ConfigVertexingHF.C");
79 fVHF = (AliAnalysisVertexingHF*)gROOT->ProcessLine("ConfigVertexingHF()");
85 //________________________________________________________________________
86 void AliAnalysisTaskSEVertexingHF::UserCreateOutputObjects()
88 // Create the output container
90 if(fDebug > 1) printf("AnalysisTaskSEVertexingHF::UserCreateOutPutData() \n");
93 printf("AnalysisTaskSEVertexingHF::UserCreateOutPutData() \n ERROR! no fvHF!\n");
97 fVerticesHFTClArr = new TClonesArray("AliAODVertex", 0);
98 fVerticesHFTClArr->SetName("VerticesHF");
99 AddAODBranch("TClonesArray", &fVerticesHFTClArr);
101 if(fVHF->GetD0toKpi()) {
102 fD0toKpiTClArr = new TClonesArray("AliAODRecoDecayHF2Prong", 0);
103 fD0toKpiTClArr->SetName("D0toKpi");
104 AddAODBranch("TClonesArray", &fD0toKpiTClArr);
107 if(fVHF->GetJPSItoEle()) {
108 fJPSItoEleTClArr = new TClonesArray("AliAODRecoDecayHF2Prong", 0);
109 fJPSItoEleTClArr->SetName("JPSItoEle");
110 AddAODBranch("TClonesArray", &fJPSItoEleTClArr);
113 if(fVHF->Get3Prong()) {
114 fCharm3ProngTClArr = new TClonesArray("AliAODRecoDecayHF3Prong", 0);
115 fCharm3ProngTClArr->SetName("Charm3Prong");
116 AddAODBranch("TClonesArray", &fCharm3ProngTClArr);
119 if(fVHF->Get4Prong()) {
120 fCharm4ProngTClArr = new TClonesArray("AliAODRecoDecayHF4Prong", 0);
121 fCharm4ProngTClArr->SetName("Charm4Prong");
122 AddAODBranch("TClonesArray", &fCharm4ProngTClArr);
128 //________________________________________________________________________
129 void AliAnalysisTaskSEVertexingHF::UserExec(Option_t */*option*/)
131 // Execute analysis for current event:
132 // heavy flavor vertexing
134 AliESDEvent *esd = dynamic_cast<AliESDEvent*> (InputEvent());
136 // heavy flavor vertexing
137 fVHF->FindCandidatesESDtoAOD(esd,
147 //________________________________________________________________________
148 void AliAnalysisTaskSEVertexingHF::Terminate(Option_t */*option*/)
150 // Terminate analysis
152 if(fDebug > 1) printf("AnalysisTaskSEVertexingHF: Terminate() \n");