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 // Implementation of the HLT ITS clusterer class
18 // The class derives from AliITSclustererV2.
19 // There is one new method added which allows to read ITS raw data
20 // and store the clusters in a tree without using runloaders.
21 // In this case, the labels filling is skipped.
22 // Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
23 //-------------------------------------------------------------------------
25 #include "AliL3ITSclusterer.h"
26 #include "AliRawReader.h"
27 #include "AliITSgeom.h"
28 #include "AliITSRawStreamSPD.h"
29 #include "AliITSRawStreamSDD.h"
30 #include "AliITSRawStreamSSD.h"
32 #include <TClonesArray.h>
34 ClassImp(AliL3ITSclusterer)
36 AliL3ITSclusterer::AliL3ITSclusterer(const AliITSgeom *geom):AliITSclustererV2(geom)
38 fNModule = geom->GetIndexMax();
41 void AliL3ITSclusterer::Digits2Clusters(AliRawReader* rawReader,TTree *cTree)
44 TClonesArray *array=new TClonesArray("AliITSclusterV2",1000);
45 cTree->Branch("Clusters",&array);
48 TClonesArray** clusters = new TClonesArray*[fNModule];
49 for (Int_t iModule = 0; iModule < fNModule; iModule++) {
50 clusters[iModule] = NULL;
54 AliITSRawStreamSPD inputSPD(rawReader);
55 FindClustersSPD(&inputSPD, clusters);
58 AliITSRawStreamSDD inputSDD(rawReader);
59 FindClustersSDD(&inputSDD, clusters);
62 AliITSRawStreamSSD inputSSD(rawReader);
63 FindClustersSSD(&inputSSD, clusters);
65 // write all clusters to the tree
67 for (Int_t iModule = 0; iModule < fNModule; iModule++) {
68 array = clusters[iModule];
70 Error("Digits2Clusters", "data for module %d missing!", iModule);
71 array = new TClonesArray("AliITSclusterV2");
73 cTree->SetBranchAddress("Clusters", &array);
75 nClusters += array->GetEntriesFast();
81 Info("Digits2Clusters", "total number of found clusters in ITS: %d\n",