]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSTrackSegmentMakerv1.h
Renaming AliPHOSv0hits to AliPHOSv1 and AliPHOSv1 to AliPHOSv2 to comply with the...
[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 PPSD clusters
11 // Unfolds the EMC cluster   
12 //                  
13 //*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
14
15 // --- ROOT system ---
16
17 // --- Standard library ---
18
19 // --- AliRoot header files ---
20
21 #include "TObjArray.h"
22 #include "AliPHOSClusterizer.h"
23 #include "AliPHOSEmcRecPoint.h"
24 #include "AliPHOSPpsdRecPoint.h"
25 #include "AliPHOSTrackSegmentMaker.h"
26 #include "TMinuit.h" 
27
28 class  AliPHOSTrackSegmentMakerv1 : public AliPHOSTrackSegmentMaker {
29
30 public:
31
32   AliPHOSTrackSegmentMakerv1() ;                     
33   virtual ~ AliPHOSTrackSegmentMakerv1() ; // dtor
34   
35   Bool_t  FindFit(AliPHOSEmcRecPoint * emcRP, int * MaxAt, Float_t * maxAtEnergy, 
36                   Int_t NPar, Float_t * FitParametres) ; //Used in UnfoldClusters, calls TMinuit
37   void    FillOneModule(DigitsList * Dl, AliPHOSRecPoint::RecPointsList * emcIn, 
38                         TObjArray * emcOut, 
39                         AliPHOSRecPoint::RecPointsList * ppsdIn, 
40                         TObjArray * ppsdOutUp, 
41                         TObjArray * ppsdOutLow, 
42                         Int_t &PHOSModule, 
43                         Int_t & emcStopedAt, 
44                         Int_t & ppsdStopedAt) ; // Unfolds clusters and fills temporary arrais   
45   Float_t GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * EmcClu , AliPHOSPpsdRecPoint * Ppsd , Bool_t & TooFar ) ; // see R0
46
47   void    MakeLinks(TObjArray * EmcRecPoints, TObjArray * PpsdRecPointsUp, TObjArray * PpsdRecPointsLow, 
48                     TClonesArray * LinkLowArray, TClonesArray *LinkUpArray) ; //Evaluates distances(links) between EMC and PPSD
49   void    MakePairs(TObjArray * EmcRecPoints, 
50                     TObjArray * PpsdRecPointsUp, 
51                     TObjArray * PpsdRecPointsLow, 
52                     TClonesArray * LinkLowArray, 
53                     TClonesArray * LinkUpArray, 
54                     AliPHOSTrackSegment::TrackSegmentsList * trsl) ; //Finds pairs(triplets) with smallest link
55   void    MakeTrackSegments(DigitsList * DL, 
56                             AliPHOSRecPoint::RecPointsList * emcl, 
57                             AliPHOSRecPoint::RecPointsList * ppsdl, 
58                             AliPHOSTrackSegment::TrackSegmentsList * trsl ) ; // does the job
59   virtual void SetMaxEmcPpsdDistance(Float_t r){ fR0 = r ;}
60   virtual void    SetUnfoldFlag() { fUnfoldFlag = kTRUE ; } ; 
61   static Double_t ShowerShape(Double_t r) ; // Shape of shower used in unfolding; class member function (not object member function)
62   void  UnfoldClusters(DigitsList * DL, 
63                        AliPHOSRecPoint::RecPointsList * emcIn, 
64                        AliPHOSEmcRecPoint * iniEmc, 
65                        Int_t Nmax, 
66                        int * maxAt, 
67                        Float_t * maxAtEnergy, 
68                        TObjArray * emclist) ; //Unfolds overlaping clusters using TMinuit package
69   virtual void UnsetUnfoldFlag() { fUnfoldFlag = kFALSE ; } 
70
71 private:
72
73   Float_t fDelta ;     // parameter used for sorting
74   TMinuit * fMinuit ;  // Minuit object needed by cluster unfolding
75   Float_t fR0 ;        // Maximum distance between a EMC RecPoint and a PPSD RecPoint   
76   Bool_t fUnfoldFlag ; // Directive to unfold or not the clusters in case of multiple maxima
77
78   ClassDef( AliPHOSTrackSegmentMakerv1,1)  // Implementation version 1 of algorithm class to make PHOS track segments 
79
80 };
81
82 #endif // AliPHOSTRACKSEGMENTMAKERV1_H