]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSTrackSegmentMakerv1.h
29c60ed84124e9c826742f5a96b009f5d0f59641
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTrackSegmentMakerv1.h
1 #ifndef ALIPHOSTRACKSEGMENTMAKERV1_H
2 #define ALIPHOSTRACKSEGMENTMAKERV1_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 // Implementation version 1 of algorithm class to construct PHOS track segments
10 // Associates EMC and CPV lusters
11 // Unfolds the EMC cluster   
12 //                  
13 //*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
14
15 // --- ROOT system ---
16 #include <TVector3.h>
17
18 // --- Standard library ---
19
20 // --- AliRoot header files ---
21 #include "AliPHOSTrackSegmentMaker.h"
22
23 class AliPHOSEmcRecPoint ;
24 class AliPHOSCpvRecPoint ;
25
26 class  AliPHOSTrackSegmentMakerv1 : public AliPHOSTrackSegmentMaker {
27
28 public:
29
30   AliPHOSTrackSegmentMakerv1() ;                     
31   AliPHOSTrackSegmentMakerv1(const TString alirunFileNameFile, const TString eventFolderName = AliConfig::GetDefaultEventFolderName());
32   AliPHOSTrackSegmentMakerv1(const AliPHOSTrackSegmentMakerv1 & tsm) : AliPHOSTrackSegmentMaker(tsm) {
33     // cpy ctor: no implementation yet
34     // requested by the Coding Convention
35     Fatal("cpy ctor", "not implemented") ;
36   }
37   virtual ~ AliPHOSTrackSegmentMakerv1() ; // dtor
38   
39   //  virtual char*  GetRecPointsBranch    (void)const{return (char*)fRecPointsBranchTitle.Data() ;}
40   //  virtual char*  GetTrackSegmentsBranch(void)const{return (char*)fTrackSegmentsBranchTitle.Data() ;}
41   virtual const Int_t GetTrackSegmentsInRun()const {return fTrackSegmentsInRun ;}  
42
43   virtual void   Exec(Option_t *option); // Does the job
44           void   FillOneModule() ;       // Finds range in which RecPoints belonging current PHOS module are
45
46           void   MakeLinks() const;      //Evaluates distances(links) between EMC and CPV
47           void   MakePairs() ;           //Finds pairs(triplets) with smallest link
48   virtual void   Print() const ;
49   virtual void   SetMaxEmcCPVDistance(Float_t r){ fRcpv = r ;} //Maximal distance (in PHOS plane) 
50                                                                //between EMCrp and CPVrp
51   virtual void   SetMaxEmcTPCDistance(Float_t r){ fRtpc = r ;} //Maximal distance (in PHOS plane) 
52                                                                //between EMCrp and extrapolation of TPC track
53   //  virtual void   SetRecPointsBranch(const char * title) { fRecPointsBranchTitle = title ;} 
54   //  virtual void   SetTrackSegmentsBranch(const char * title){ fTrackSegmentsBranchTitle = title ; }
55   virtual const char * Version() const { return "tsm-v1" ; }  
56
57   AliPHOSTrackSegmentMakerv1 & operator = (const AliPHOSTrackSegmentMakerv1 & )  {
58     // assignement operator requested by coding convention but not needed
59     Fatal("operator =", "not implemented") ;
60     return *this ; 
61   }
62   void Unload() ;
63
64 private:
65
66   const TString BranchName() const ; 
67   Float_t GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * EmcClu , AliPHOSCpvRecPoint * Cpv , Int_t & track ) const ; // see R0
68   TVector3 PropagateToPlane(Double_t *x, Double_t *p, char *det, Int_t module) const;
69   void    Init() ;
70   void    InitParameters() ;
71   void    PrintTrackSegments(Option_t *option) ;
72   virtual void   WriteTrackSegments() ;
73
74 private:  
75
76   Bool_t  fDefaultInit;               //! Says if the task was created by defaut ctor (only parameters are initialized)
77  
78   Int_t fNTrackSegments ; // number of track segments found 
79
80   Float_t fRcpv ;        // Maximum distance between a EMC RecPoint and a CPV RecPoint   
81   Float_t fRtpc ;        // Maximum distance between a EMC RecPoint and extrapolation of a TPC track   
82
83   TClonesArray * fLinkUpArray  ;  //!
84   Int_t fEmcFirst;     //! Index of first EMC RecPoint belonging to currect PHOS module
85   Int_t fEmcLast ;     //!
86   Int_t fCpvFirst;     //! Cpv upper layer     
87   Int_t fCpvLast;      //! 
88   Int_t fModule ;      //! number of module being processed
89   Int_t fTrackSegmentsInRun ; //! Total number of track segments in one run
90
91   ClassDef( AliPHOSTrackSegmentMakerv1,3)  // Implementation version 1 of algorithm class to make PHOS track segments 
92
93  };
94
95 #endif // AliPHOSTRACKSEGMENTMAKERV1_H