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 "AliPHOSDigit.h"
29 ClassImp(AliPHOSClusterizer)
31 AliPHOSCalibData * AliPHOSClusterizer::fgCalibData = 0 ;
33 //____________________________________________________________________________
34 AliPHOSClusterizer::AliPHOSClusterizer():
42 fDigitsArr = new TClonesArray("AliPHOSDigit",100);
43 fEMCRecPoints = new TObjArray(100) ;
44 fEMCRecPoints ->SetName("EMCRECPOINTS") ;
45 fCPVRecPoints = new TObjArray(100) ;
46 fCPVRecPoints ->SetName("CPVRECPOINTS") ;
49 //____________________________________________________________________________
50 AliPHOSClusterizer::AliPHOSClusterizer(AliPHOSGeometry *geom):
58 fDigitsArr = new TClonesArray("AliPHOSDigit",100);
59 fEMCRecPoints = new TObjArray(100) ;
60 fEMCRecPoints ->SetName("EMCRECPOINTS") ;
61 fCPVRecPoints = new TObjArray(100) ;
62 fCPVRecPoints ->SetName("CPVRECPOINTS") ;
65 //____________________________________________________________________________
66 AliPHOSClusterizer::~AliPHOSClusterizer()
74 fEMCRecPoints->Delete();
78 fCPVRecPoints->Delete();
83 //____________________________________________________________________________
84 void AliPHOSClusterizer::SetInput(TTree * digitsTree)
86 // Get the tree with digits and sets
87 // the input array with digits for PHOS
88 TBranch *branch = digitsTree->GetBranch("PHOS");
90 AliError("can't get the branch with the PHOS digits !");
94 branch->SetAddress(&fDigitsArr);
98 //____________________________________________________________________________
99 void AliPHOSClusterizer::SetOutput(TTree * clustersTree)
101 // Set the output clusters tree,
102 // creates the arrays for EMC and CPV,
103 // and set the corresponding branch addresses
104 fTreeR = clustersTree;
106 AliDebug(9, "Making array for EMC clusters");
108 Int_t bufsize = 32000;
109 fTreeR->Branch("PHOSEmcRP", "TObjArray", &fEMCRecPoints, bufsize, split);
111 AliDebug(9, "Making array for CPV clusters");
112 fTreeR->Branch("PHOSCpvRP", "TObjArray", &fCPVRecPoints, bufsize, split);