1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 /* $Id: AliADReconstructor.cxx 20956 2007-09-26 14:22:18Z mrodrigu $ */
17 //////////////////////////////////////////////////////////////////////////////
19 // Class for AD reconstruction //
20 //////////////////////////////////////////////////////////////////////////////
22 #include "AliRawReader.h"
24 #include "AliADReconstructor.h"
25 #include "AliESDEvent.h"
26 #include "AliADdigit.h"
29 ClassImp(AliADReconstructor)
31 AliADReconstructor:: AliADReconstructor():
36 // Default constructor
37 // Get calibration data
41 //_____________________________________________________________________________
42 AliADReconstructor& AliADReconstructor::operator =
43 (const AliADReconstructor& /*reconstructor*/)
45 // assignment operator
47 Fatal("operator =", "assignment operator not implemented");
51 //_____________________________________________________________________________
52 AliADReconstructor::~AliADReconstructor()
59 //_____________________________________________________________________________
60 void AliADReconstructor::Init()
63 fESDAD = new AliESDAD;
66 void AliADReconstructor::ConvertDigits(AliRawReader* /*rawReader*/, TTree* /*digitsTree*/) const
69 printf("Converting digits for AD .. not implemented \n");
72 void AliADReconstructor::FillESD(TTree* digitsTree, TTree* /*clustersTree*/,AliESDEvent* esd) const
75 printf("Running AD Reconstruction \n");
77 // fills ESD with AD Digits
81 AliError("No digits tree!");
85 TBranch* digitBranch = digitsTree->GetBranch("ADdigit");
87 AliError("No AD digits branch found!");
90 digitBranch->SetAddress(&fDigitsArray);
92 digitsTree->GetEvent(0);
95 for(Int_t i = 0; i < 16; i++) { ADHits[i] = kFALSE; }
97 Int_t nDigits = fDigitsArray->GetEntriesFast();
99 for (Int_t d=0; d<nDigits; d++) {
100 AliADdigit* digit = (AliADdigit*) fDigitsArray->At(d);
101 Int_t module = digit->GetCell();
102 // printf("AD Module: %d\n",module);
103 ADHits[module] = kTRUE;
106 AliError("NO AD ESD branch found!");
109 fESDAD->SetADBitCell(ADHits);
113 AliDebug(1, Form("Writing AD data to ESD Tree"));
114 esd->SetADData(fESDAD);
117 fDigitsArray->Clear();