]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSTrackSegmentMakerv2.h
Fixes to calls for MeanMaterialBudget (now in AliTracker) (From Jouri Belikov)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTrackSegmentMakerv2.h
CommitLineData
861b23c3 1#ifndef ALIPHOSTRACKSEGMENTMAKERV2_H
2#define ALIPHOSTRACKSEGMENTMAKERV2_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/* History of cvs commits:
8 *
9 * $Log$
c978a69b 10 * Revision 1.2 2007/04/01 19:16:52 kharlov
11 * D.P.: Produce EMCTrackSegments using TPC/ITS tracks (no CPV)
12 *
861b23c3 13 * Revision 1.50 2007/03/06 06:54:48 kharlov
14 * DP:Calculation of cluster properties dep. on vertex added
15 *
16 * Revision 1.49 2007/02/01 13:59:11 hristov
17 * Forward declaration
18 *
19 * Revision 1.48 2006/08/28 10:01:56 kharlov
20 * Effective C++ warnings fixed (Timur Pocheptsov)
21 *
22 * Revision 1.47 2005/11/17 12:35:27 hristov
23 * Use references instead of objects. Avoid to create objects when they are not really needed
24 *
25 * Revision 1.46 2005/05/28 14:19:05 schutz
26 * Compilation warnings fixed by T.P.
27 *
28 */
29
30//_________________________________________________________________________
31// Implementation version 1 of algorithm class to construct PHOS track segments
32// Associates EMC and CPV lusters
33// Unfolds the EMC cluster
34//
35//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
c978a69b 36#include <vector>
861b23c3 37
38// --- ROOT system ---
39#include <TVector3.h>
40
41// --- Standard library ---
42
43// --- AliRoot header files ---
44#include "AliPHOSTrackSegmentMaker.h"
45
46class AliPHOSEmcRecPoint ;
47class AliPHOSCpvRecPoint ;
48class AliESDtrack ;
49class TClonesArray;
50
51class AliPHOSTrackSegmentMakerv2 : public AliPHOSTrackSegmentMaker {
52
53public:
54
55 AliPHOSTrackSegmentMakerv2() ;
56 AliPHOSTrackSegmentMakerv2(const TString & alirunFileNameFile, const TString & eventFolderName = AliConfig::GetDefaultEventFolderName());
57 AliPHOSTrackSegmentMakerv2(const AliPHOSTrackSegmentMakerv2 & tsm);
58
59 virtual ~ AliPHOSTrackSegmentMakerv2() ; // dtor
60
61 // virtual char* GetRecPointsBranch (void)const{return (char*)fRecPointsBranchTitle.Data() ;}
62 // virtual char* GetTrackSegmentsBranch(void)const{return (char*)fTrackSegmentsBranchTitle.Data() ;}
63 virtual Int_t GetTrackSegmentsInRun()const {return fTrackSegmentsInRun ;}
64
65 virtual void Exec(Option_t *option); // Does the job
66 void FillOneModule() ; // Finds range in which RecPoints belonging current PHOS module are
67
c978a69b 68 void MakeLinks() ; //Evaluates distances(links) between EMC and CPV
861b23c3 69 void MakePairs() ; //Finds pairs(triplets) with smallest link
70 virtual void Print(const Option_t * = "") const ;
71 //Switch to "on flyght" mode, without writing to TreeR and file
72 void SetWriting(Bool_t toWrite = kFALSE){fWrite = toWrite;}
73 virtual void SetMaxTPCDistance(Float_t r){ fRtpc = r ;} //Maximal distance
74 //between EMCrp and extrapolation of TPC track
75 // virtual void SetRecPointsBranch(const char * title) { fRecPointsBranchTitle = title ;}
76 // virtual void SetTrackSegmentsBranch(const char * title){ fTrackSegmentsBranchTitle = title ; }
77 virtual const char * Version() const { return "tsm-v2" ; }
78
79 AliPHOSTrackSegmentMakerv2 & operator = (const AliPHOSTrackSegmentMakerv2 & ) {
80 // assignement operator requested by coding convention but not needed
81 Fatal("operator =", "not implemented") ;
82 return *this ;
83 }
84 void Unload() ;
85
86private:
87
88 const TString BranchName() const ;
89 void GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * EmcClu , AliESDtrack* track,
90 Float_t &dx, Float_t &dz ) const ; // see R0
91 void Init() ;
92 void InitParameters() ;
93 void PrintTrackSegments(Option_t *option) ;
94 virtual void WriteTrackSegments() ;
861b23c3 95
c978a69b 96protected:
97 struct TrackInPHOS_t {
98 AliESDtrack* track ;
99 Float_t x ; //Raw X intersection coordinate
100 Float_t z ; //Raw Z intersection coordinate
101 } ;
102
861b23c3 103private:
104
105 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
106 Bool_t fWrite ; // Write Tracks to TreeT
107
108 Int_t fNTrackSegments ; // number of track segments found
109
110 Float_t fRtpc ; // Maximum distance between a EMC RecPoint and extrapolation of a TPC track
111
112 TVector3 fVtx ; //! Vertex in current position
113
114 TClonesArray * fLinkUpArray ; //!
c978a69b 115 std::vector<TrackInPHOS_t> fTPCtracks[5]; //!
116 Int_t fNtpcTracks[5] ; //!
861b23c3 117 Int_t fEmcFirst; //! Index of first EMC RecPoint belonging to currect PHOS module
118 Int_t fEmcLast ; //!
119 Int_t fModule ; //! number of module being processed
120 Int_t fTrackSegmentsInRun ; //! Total number of track segments in one run
121
122 ClassDef( AliPHOSTrackSegmentMakerv2,1) // Implementation version 1 of algorithm class to make PHOS track segments
123
124 };
125
126#endif // AliPHOSTRACKSEGMENTMAKERV2_H