]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - HLT/ITS/AliL3ITSclusterer.cxx
Avoiding relative path to include files
[u/mrichter/AliRoot.git] / HLT / ITS / AliL3ITSclusterer.cxx
... / ...
CommitLineData
1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
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//-------------------------------------------------------------------------
24
25#include "AliL3ITSclusterer.h"
26#include "AliRawReader.h"
27#include "AliITSgeom.h"
28#include "AliITSRawStreamSPD.h"
29#include "AliITSRawStreamSDD.h"
30#include "AliITSRawStreamSSD.h"
31#include <TTree.h>
32#include <TClonesArray.h>
33
34ClassImp(AliL3ITSclusterer)
35
36AliL3ITSclusterer::AliL3ITSclusterer(const AliITSgeom *geom):AliITSclustererV2(geom)
37{
38fNModule = geom->GetIndexMax();
39}
40
41void AliL3ITSclusterer::Digits2Clusters(AliRawReader* rawReader,TTree *cTree)
42{
43
44 TClonesArray *array=new TClonesArray("AliITSclusterV2",1000);
45 cTree->Branch("Clusters",&array);
46 delete array;
47
48 TClonesArray** clusters = new TClonesArray*[fNModule];
49 for (Int_t iModule = 0; iModule < fNModule; iModule++) {
50 clusters[iModule] = NULL;
51 }
52
53 rawReader->Reset();
54 AliITSRawStreamSPD inputSPD(rawReader);
55 FindClustersSPD(&inputSPD, clusters);
56
57 rawReader->Reset();
58 AliITSRawStreamSDD inputSDD(rawReader);
59 FindClustersSDD(&inputSDD, clusters);
60
61 rawReader->Reset();
62 AliITSRawStreamSSD inputSSD(rawReader);
63 FindClustersSSD(&inputSSD, clusters);
64
65 // write all clusters to the tree
66 Int_t nClusters = 0;
67 for (Int_t iModule = 0; iModule < fNModule; iModule++) {
68 array = clusters[iModule];
69 if (!array) {
70 Error("Digits2Clusters", "data for module %d missing!", iModule);
71 array = new TClonesArray("AliITSclusterV2");
72 }
73 cTree->SetBranchAddress("Clusters", &array);
74 cTree->Fill();
75 nClusters += array->GetEntriesFast();
76 delete array;
77 }
78
79 delete[] clusters;
80
81 Info("Digits2Clusters", "total number of found clusters in ITS: %d\n",
82 nClusters);
83}