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 //_________________________________________________________________________
17 // Base class for the clusterization algorithm (pure abstract)
19 //*-- Author: Yves Schutz SUBATECH
20 //////////////////////////////////////////////////////////////////////////////
22 #include <TClonesArray.h>
25 #include "AliPHOSClusterizer.h"
26 #include "AliPHOSQualAssDataMaker.h"
27 #include "AliPHOSDigit.h"
29 ClassImp(AliPHOSClusterizer)
31 //____________________________________________________________________________
32 AliPHOSClusterizer::AliPHOSClusterizer():
43 //____________________________________________________________________________
44 AliPHOSClusterizer::AliPHOSClusterizer(AliPHOSGeometry *geom):
53 fQADM = new AliPHOSQualAssDataMaker() ;
54 //initiaizes the quality assurance data maker
55 fQADM ->Init(AliQualAss::kRECPOINTS) ;
58 //____________________________________________________________________________
59 AliPHOSClusterizer::~AliPHOSClusterizer()
68 fEMCRecPoints->Delete();
72 fCPVRecPoints->Delete();
77 //____________________________________________________________________________
78 void AliPHOSClusterizer::SetInput(TTree * digitsTree)
80 // Get the tree with digits and sets
81 // the input array with digits for PHOS
82 TBranch *branch = digitsTree->GetBranch("PHOS");
84 AliError("can't get the branch with the PHOS digits !");
87 fDigitsArr = new TClonesArray("AliPHOSDigit",100);
88 branch->SetAddress(&fDigitsArr);
92 //____________________________________________________________________________
93 void AliPHOSClusterizer::SetOutput(TTree * clustersTree)
95 // Set the output clusters tree,
96 // creates the arrays for EMC and CPV,
97 // and set the corresponding branch addresses
98 fTreeR = clustersTree;
100 AliDebug(9, "Making array for EMC clusters");
101 fEMCRecPoints = new TObjArray(100) ;
102 fEMCRecPoints->SetName("EMCRECPOINTS") ;
104 Int_t bufsize = 32000;
105 fTreeR->Branch("PHOSEmcRP", "TObjArray", &fEMCRecPoints, bufsize, split);
107 AliDebug(9, "Making array for CPV clusters");
108 fCPVRecPoints = new TObjArray(100) ;
109 fCPVRecPoints->SetName("CPVRECPOINTS") ;
110 fTreeR->Branch("PHOSCpvRP", "TObjArray", &fCPVRecPoints, bufsize, split);