Propset keyword Id is added
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTracker.cxx
CommitLineData
04e92dc8 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/* $Id$ */
16
17/* History of cvs commits:
18 *
19 * $Log$
04236e67 20 * Revision 1.9 2007/10/10 09:05:10 schutz
21 * Changing name QualAss to QA
22 *
b8274834 23 * Revision 1.8 2007/08/28 12:55:08 policheh
24 * Loaders removed from the reconstruction code (C.Cheshkov)
25 *
9a2cdbdf 26 * Revision 1.7 2007/08/07 14:12:03 kharlov
27 * Quality assurance added (Yves Schutz)
28 *
ddd1a39c 29 * Revision 1.6 2007/08/03 14:41:37 cvetan
30 * Missing header files
31 *
1d0c181d 32 * Revision 1.5 2007/08/03 13:52:16 kharlov
33 * Working skeleton of matching the ESD tracks and ESD clusters (Iouri Belikov)
34 *
04e92dc8 35 */
36
37#include <TClonesArray.h>
1d0c181d 38#include <TMath.h>
04e92dc8 39
40#include <AliLog.h>
23904d16 41#include "AliPHOSTracker.h"
04e92dc8 42#include "AliPHOSEmcRecPoint.h"
af885e0f 43#include "AliESDEvent.h"
1d0c181d 44#include "AliESDtrack.h"
ddd1a39c 45#include "AliPHOSTrackSegmentMakerv1.h"
46#include "AliPHOSPIDv1.h"
23904d16 47
48//-------------------------------------------------------------------------
49// PHOS tracker.
50// Matches ESD tracks with the PHOS and makes the PID.
04e92dc8 51//
23904d16 52//-------------------------------------------------------------------------
53
54ClassImp(AliPHOSTracker)
55
04e92dc8 56Bool_t AliPHOSTracker::fgDebug = kFALSE ;
57
58
59// ***** Some geometrical constants (used in PropagateBack)
60
61const Double_t kR=460.+ 9; // Radial coord. of the centre of EMC module (cm)
62
63const Double_t kAlpha=20.*TMath::Pi()/180.; // Segmentation angle (rad)
64const Double_t kYmax=kR*TMath::Tan(0.5*kAlpha); // Maximal possible y-coord.(cm)
65const Double_t kZmax=65.; // Approximately: the maximal possible z-coord.(cm)
66
67
68
ddd1a39c 69//____________________________________________________________________________
70AliPHOSTracker::AliPHOSTracker():
9a2cdbdf 71 AliTracker()
ddd1a39c 72{
04e92dc8 73 //--------------------------------------------------------------------
74 // The default constructor
75 //--------------------------------------------------------------------
76 for (Int_t i=0; i<5; i++)
77 fModules[i]=new TClonesArray("AliPHOSEmcRecPoint",777);
d7737747 78
04e92dc8 79}
80
ddd1a39c 81//____________________________________________________________________________
82AliPHOSTracker::~AliPHOSTracker()
83{
04e92dc8 84 //--------------------------------------------------------------------
85 // The destructor
86 //--------------------------------------------------------------------
87 for (Int_t i=0; i<5; i++) {
88 (fModules[i])->Delete();
89 delete fModules[i];
90 }
91}
92
ddd1a39c 93//____________________________________________________________________________
c5a539a3 94Int_t AliPHOSTracker::LoadClusters(TTree *) {
04e92dc8 95 //--------------------------------------------------------------------
96 // This function loads the PHOS clusters
97 //--------------------------------------------------------------------
d7737747 98 return 0 ; //At this stage we can not strore result
99 // the closest track and distance to it
100 //We perform same task later in AliPHOSTrackSegmentMakerv1
04e92dc8 101}
102
ddd1a39c 103//____________________________________________________________________________
c5a539a3 104Int_t AliPHOSTracker::PropagateBack(AliESDEvent *) {
04e92dc8 105 //--------------------------------------------------------------------
23904d16 106 // Called by AliReconstruction
04e92dc8 107 // Performs the track matching with the PHOS modules
108 // Makes the PID
109 //--------------------------------------------------------------------
110
d7737747 111 return 0 ; //At this stage we can not strore result
112 // the closest track and distance to it
113 //We perform same task later in AliPHOSTrackSegmentMakerv1
04e92dc8 114}
115
ddd1a39c 116//____________________________________________________________________________
04e92dc8 117AliCluster *AliPHOSTracker::GetCluster(Int_t index) const {
118 //--------------------------------------------------------------------
119 // Returns the pointer to a given cluster
120 //--------------------------------------------------------------------
121 Int_t m=(index & 0xf0000000) >> 28; // Module number
122 Int_t i=(index & 0x0fffffff) >> 00; // Index within the module
123
124 return (AliCluster*)(fModules[m])->UncheckedAt(i);
125}
126
ddd1a39c 127//____________________________________________________________________________
04e92dc8 128void AliPHOSTracker::UnloadClusters() {
129 //--------------------------------------------------------------------
130 // This function unloads the PHOS clusters
131 //--------------------------------------------------------------------
d7737747 132// for (Int_t i=0; i<5; i++) (fModules[i])->Delete();
04e92dc8 133}