3 /**************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
18 //-------------------------------------------------------------------------
19 // Implementation of the HLT ITS clusterer class
20 // The class derives from AliITSclustererV2.
21 // There is one new method added which allows to read ITS raw data
22 // and store the clusters in a tree without using runloaders.
23 // In this case, the labels filling is skipped.
24 // Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
25 //-------------------------------------------------------------------------
27 #include "AliHLTITSclusterer.h"
28 #include "AliITSgeomTGeo.h"
29 #include "AliRawReader.h"
30 #include "AliITSRawStreamSPD.h"
31 #include "AliITSRawStreamSDD.h"
32 #include "AliITSRawStreamSSD.h"
34 #include <TClonesArray.h>
36 ClassImp(AliHLTITSclusterer)
38 AliHLTITSclusterer::AliHLTITSclusterer(const Char_t *geom)
40 AliITSclustererV2(geom),
41 fNModule(AliITSgeomTGeo::GetNModules())
45 void AliHLTITSclusterer::Digits2Clusters(AliRawReader* rawReader,TTree *cTree)
48 TClonesArray *array=new TClonesArray("AliITSclusterV2",1000);
49 cTree->Branch("Clusters",&array);
52 TClonesArray** clusters = new TClonesArray*[fNModule];
53 for (Int_t iModule = 0; iModule < fNModule; iModule++) {
54 clusters[iModule] = NULL;
58 AliITSRawStreamSPD inputSPD(rawReader);
59 FindClustersSPD(&inputSPD, clusters);
62 AliITSRawStreamSDD inputSDD(rawReader);
63 FindClustersSDD(&inputSDD, clusters);
66 AliITSRawStreamSSD inputSSD(rawReader);
67 FindClustersSSD(&inputSSD, clusters);
69 // write all clusters to the tree
71 for (Int_t iModule = 0; iModule < fNModule; iModule++) {
72 array = clusters[iModule];
74 Error("Digits2Clusters", "data for module %d missing!", iModule);
75 array = new TClonesArray("AliITSclusterV2");
77 cTree->SetBranchAddress("Clusters", &array);
79 nClusters += array->GetEntriesFast();
85 Info("Digits2Clusters", "total number of found clusters in ITS: %d\n",