]> git.uio.no Git - u/mrichter/AliRoot.git/blob - JETAN/AliCdfJetFinder.h
Updated versions (Adrian Sevcenco)
[u/mrichter/AliRoot.git] / JETAN / AliCdfJetFinder.h
1 #ifndef ALICDFJETFINDER_H
2 #define ALICDFJETFINDER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 #include "AliJetFinder.h"
8 #include <math.h>
9
10 //
11 //  Definition of constants, structures and functions
12 //
13
14 using namespace std ;
15
16 const Double_t pi = TMath::Pi();
17
18 struct varContainer // container for Particle and Jets
19   { // variables of container struct
20   Double_t  pt; Double_t eta; Double_t phi;
21   Int_t njet; // if jets are stored in varContainer njet is multiplicity of jet
22               // if particles are stored , njet is index number of jet
23   } ;
24
25
26
27 class AliCdfJetHeader;
28
29 class AliCdfJetFinder : public AliJetFinder
30   {
31   public:
32
33     AliCdfJetFinder();
34     virtual ~AliCdfJetFinder();
35
36     void           CreateOutputObjects(TList *histos);
37     void           FindJets();
38     void           InitData();
39     void           FindCones();
40     void           ComputeConesWeight();
41     void           WriteJets();
42     void           AnalizeJets();
43     void           Clean();
44
45     virtual void   FinishRun();
46
47     Double_t DeltaPhiNorm (Double_t dphi)
48       {
49       if ( dphi < - pi ) { dphi = -dphi - 2.0 * pi ; }
50       if ( dphi >   pi ) { dphi = -dphi + 2.0 * pi ; }
51       return dphi;
52       }
53
54     inline long double Distance (long double x, long double y)
55       { return TMath::Sqrt ( pow(x,2) + pow(y,2) ); }
56
57
58
59   protected:
60     AliCdfJetFinder ( const AliCdfJetFinder& jf );
61     AliCdfJetFinder& operator = ( const AliCdfJetFinder& jf );
62
63     TList         *fHistos;    // List of histograms
64
65     Bool_t        fDebug;   //  enables debugging
66
67     Bool_t fFromAod;
68     Bool_t fAODwrite;   // write jets to AOD
69     Bool_t fAODtracksWrite;  // write jet tracks to AOD
70     TRefArray *fRefArr ; // pointer to references array of tracks from AOD
71
72
73     Int_t         fNJets;     // counter of number of jets
74     Int_t         fNPart;     // number of particles in event
75
76     Double_t      fRadius;
77
78     Int_t fMinJetParticles;
79     Double_t fJetPtCut;
80
81     varContainer **fVectParticle; // container for Particles
82     varContainer **fVectJet;      // container for Jets
83
84     Double_t *fPtArray;  // momentum array
85     Int_t   *fIdxArray;  // index array of sorted pts
86
87
88
89
90
91
92     ClassDef ( AliCdfJetFinder, 1 )
93   };//
94 #endif
95