]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSMultReconstructor.h
Fix bug in the macro to create FastRecPoints from Hits
[u/mrichter/AliRoot.git] / ITS / AliITSMultReconstructor.h
1 #ifndef ALIITSMULTRECONSTRUCTOR_H
2 #define ALIITSMULTRECONSTRUCTOR_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 /////////////////////////////////////////////////////////////////////////
9 // 
10 // AliITSMultReconstructor - find clusters in the pixels (theta and
11 // phi) and tracklets.
12 // 
13 // These can be used to extract charged particles multiplcicity from the ITS.
14 //
15 // A tracklet consist of two ITS clusters, one in the first pixel
16 // layer and one in the second. The clusters are associates if the 
17 // differencies in Phi (azimuth) and Zeta (longitudinal) are inside 
18 // a fiducial volume. In case of multiple candidates it is selected the
19 // candidate with minimum distance in Phi. 
20 // The boolean fOnlyOneTrackletPerC2 allows to control if two clusters 
21 // in layer 2 can be associated to the same cluster in layer 1 or not.
22 //
23 /////////////////////////////////////////////////////////////////////////
24
25 #include "TObject.h"
26
27 class TTree;
28 class TH1F;
29 class TH2F; 
30
31 class AliITSgeom;
32
33 class AliITSMultReconstructor : public TObject 
34 {
35 public:
36   AliITSMultReconstructor();
37   virtual ~AliITSMultReconstructor();
38
39   void Reconstruct(TTree* tree, Float_t* vtx, Float_t* vtxRes);
40   void LoadClusterFiredChips(TTree* tree);
41   void FlagClustersInOverlapRegions(Int_t ic1,Int_t ic2);
42
43   // Following members are set via AliITSRecoParam
44   void SetOnlyOneTrackletPerC2(Bool_t b = kTRUE) {fOnlyOneTrackletPerC2 = b;}
45   void SetPhiWindow(Float_t w=0.08) {fPhiWindow=w;}
46   void SetZetaWindow(Float_t w=1.) {fZetaWindow=w;}
47   void SetRemoveClustersFromOverlaps(Bool_t b = kFALSE) {fRemoveClustersFromOverlaps = b;}
48   void SetPhiOverlapCut(Float_t w=0.005) {fPhiOverlapCut=w;}
49   void SetZetaOverlapCut(Float_t w=0.05) {fZetaOverlapCut=w;}
50
51   Int_t GetNClustersLayer1() const {return fNClustersLay1;}
52   Int_t GetNClustersLayer2() const {return fNClustersLay2;}
53   Int_t GetNTracklets() const {return fNTracklets;}
54   Int_t GetNSingleClusters() const {return fNSingleCluster;}
55   Short_t GetNFiredChips(Int_t layer) const {return fNFiredChips[layer];}
56
57   Float_t* GetClusterLayer1(Int_t n) {return fClustersLay1[n];}
58   Float_t* GetClusterLayer2(Int_t n) {return fClustersLay2[n];}
59   Float_t* GetTracklet(Int_t n) {return fTracklets[n];}
60   Float_t* GetCluster(Int_t n) {return fSClusters[n];}
61
62   void SetHistOn(Bool_t b=kFALSE) {fHistOn=b;}
63   void SaveHists();
64
65 protected:
66   AliITSMultReconstructor(const AliITSMultReconstructor& mr);
67   AliITSMultReconstructor& operator=(const AliITSMultReconstructor& mr);
68
69   
70   Float_t**     fClustersLay1;               // clusters in the 1st layer of ITS 
71   Float_t**     fClustersLay2;               // clusters in the 2nd layer of ITS 
72   Int_t*        fDetectorIndexClustersLay1;  // module index for clusters 1st ITS layer
73   Int_t*        fDetectorIndexClustersLay2;  // module index for clusters 2nd ITS layer
74   Bool_t*       fOverlapFlagClustersLay1;    // flag for clusters in the overlap regions 1st ITS layer
75   Bool_t*       fOverlapFlagClustersLay2;    // flag for clusters in the overlap regions 2nd ITS layer 
76
77
78   Float_t**     fTracklets;            // tracklets 
79   Float_t**     fSClusters;            // single clusters (unassociated)
80   Bool_t*       fAssociationFlag;      // flag for the associations 
81   
82   Int_t         fNClustersLay1;        // Number of clusters (Layer1)
83   Int_t         fNClustersLay2;        // Number of clusters (Layer2)
84   Int_t         fNTracklets;           // Number of tracklets
85   Int_t         fNSingleCluster;       // Number of unassociated clusters
86   Short_t       fNFiredChips[2];       // Number of fired chips in the two SPD layers
87  
88   // Following members are set via AliITSRecoParam
89   Bool_t        fOnlyOneTrackletPerC2;         // Allow only one tracklet per cluster in the outer layer
90   Float_t       fPhiWindow;                    // Search window in phi
91   Float_t       fZetaWindow;                   // Search window in eta
92   Bool_t        fRemoveClustersFromOverlaps;   // Option to skip clusters in the overlaps
93   Float_t       fPhiOverlapCut;                // Fiducial window in phi for overlap cut
94   Float_t       fZetaOverlapCut;               // Fiducial window in eta for overlap cut
95
96   Bool_t        fHistOn;               // Option to define and fill the histograms 
97
98   TH1F*         fhClustersDPhiAcc;     // Phi2 - Phi1 for tracklets 
99   TH1F*         fhClustersDThetaAcc;   // Theta2 - Theta1 for tracklets 
100   TH1F*         fhClustersDZetaAcc;    // z2 - z1projected for tracklets 
101   TH1F*         fhClustersDPhiAll;     // Phi2 - Phi1 all the combinations 
102   TH1F*         fhClustersDThetaAll;   // Theta2 - Theta1 all the combinations
103   TH1F*         fhClustersDZetaAll;    // z2 - z1projected all the combinations
104  
105   TH2F*         fhDPhiVsDThetaAll;     // 2D plot for all the combinations  
106   TH2F*         fhDPhiVsDThetaAcc;     // same plot for tracklets 
107   TH2F*         fhDPhiVsDZetaAll;      // 2d plot for all the combination 
108   TH2F*         fhDPhiVsDZetaAcc;      // same plot for tracklets 
109
110   TH1F*         fhetaTracklets;        // Pseudorapidity distr. for tracklets 
111   TH1F*         fhphiTracklets;        // Azimuthal (Phi) distr. for tracklets  
112   TH1F*         fhetaClustersLay1;     // Pseudorapidity distr. for Clusters L. 1
113   TH1F*         fhphiClustersLay1;     // Azimuthal (Phi) distr. for Clusters L. 1 
114
115
116   void LoadClusterArrays(TTree* tree);
117
118   ClassDef(AliITSMultReconstructor,4)
119 };
120
121 #endif