]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/FJWrapper/AliFJWrapper.h
Changes to correctly add fragments production for p-A collisions
[u/mrichter/AliRoot.git] / HLT / FJWrapper / AliFJWrapper.h
1 #ifndef AliFJWrapper_HH
2 #define AliFJWrapper_HH
3 /*
4 @Comments:
5 @
6 @
7 @
8 @
9 @
10 @
11 @
12 */
13 #include <vector>
14 #include <fastjet/PseudoJet.hh>
15 #include <fastjet/JetDefinition.hh>
16 #include <fastjet/ClusterSequence.hh>
17 #include <fastjet/ClusterSequenceArea.hh>
18 #include <fastjet/AreaDefinition.hh>
19 #include <fastjet/SISConePlugin.hh>
20
21 #include "TNamed.h"
22
23 class AliFastJetHeader;
24
25 class AliFJWrapper : public TNamed
26 {
27  public:
28
29   AliFJWrapper(const char *name, const char *title);
30
31   virtual ~AliFJWrapper();
32   
33   virtual void CopySettingsFrom (const AliFJWrapper&     wrapper);
34   virtual void SetupFromHeader  (const AliFastJetHeader* header);
35
36   virtual void AddInputVector (double px, double py, double pz, double E, int index = -99999);
37
38   virtual void AddInputVector (const fastjet::PseudoJet& vec,                int index = -99999);
39   virtual void AddInputVectors(const std::vector<fastjet::PseudoJet>& vecs,  int offsetIndex = -99999);
40
41   virtual Int_t  Run();
42   virtual void   Clear(const Option_t* opt = "");
43
44   void SetStrategy     (const fastjet::Strategy strat)             { fStrategy = strat;  }
45   void SetAlgorithm    (const fastjet::JetAlgorithm algor)         { fAlgor    = algor;  }
46   void SetRecombScheme (const fastjet::RecombinationScheme scheme) { fScheme   = scheme; }
47   void SetAreaType     (const fastjet::AreaType atype)             { fAreaType = atype;  }
48
49   void SetupAlgorithmfromOpt (const char *option);
50   void SetupStrategyfromOpt  (const char *option);
51   void SetupSchemefromOpt    (const char *option);
52   void SetupAreaTypefromOpt  (const char *option);
53
54   void SetNRepeats      (const int    nrepeat) { fNGhostRepeats  = nrepeat; }
55   void SetGhostArea     (const double gharea)  { fGhostArea      = gharea;  }
56   void SetMaxRap        (const double maxrap)  { fMaxRap         = maxrap;  }
57   void SetR             (const double r)       { fR              = r;       }
58   void SetGridScatter   (const double gridSc)  { fGridScatter    = gridSc;  }
59   void SetKtScatter     (const double ktSc)    { fKtScatter      = ktSc;    }
60   void SetMeanGhostKt   (const double meankt)  { fMeanGhostKt    = meankt;  }
61   void SetPluginAlgor   (const int    plugin)  { fPluginAlgor    = plugin;  }
62   void SetUseArea4Vector(const bool   useA4v)  { fUseArea4Vector = useA4v; }
63
64   virtual void   GetMedianAndSigma(double& median, double& sigma, int remove = 0);
65   virtual double GetMedianUsedForBgSubtraction() {return fMedianUsedForBgSubtraction;}
66
67   const std::vector<fastjet::PseudoJet> GetInputVectors()    { return fInputVectors;}
68   const std::vector<fastjet::PseudoJet> GetInclusiveJets()   { return fInclusiveJets; }
69
70   std::vector<fastjet::PseudoJet> GetJetConstituents(const unsigned int idx);
71
72   fastjet::ClusterSequenceArea*   GetClusterSequence() { return fClustSeq;      }
73
74   std::vector<double>             GetSubtractedJetsPts(const double median_pt = -1, const bool sorted = false);
75
76   double                          GetJetArea         (const unsigned int idx);
77   double                          GetJetSubtractedPt (const unsigned int idx);
78
79  protected:
80
81   AliFJWrapper();
82   AliFJWrapper(const AliFJWrapper& wrapper);
83   AliFJWrapper& operator = (const AliFJWrapper& wrapper);// {return *this;}
84
85   std::vector<fastjet::PseudoJet> fInputVectors; //!
86   std::vector<fastjet::PseudoJet> fInclusiveJets; //!
87
88   std::vector<double> fSubtractedJetsPt; //!
89   
90   fastjet::AreaDefinition        *fAreaDef;//!
91   fastjet::VoronoiAreaSpec       *fVorAreaSpec;//!
92   fastjet::GhostedAreaSpec       *fGhostedAreaSpec;//!
93   fastjet::JetDefinition         *fJetDef;//!
94   fastjet::JetDefinition::Plugin *fPlugin;//!
95   fastjet::RangeDefinition       *fRange;//!
96   fastjet::ClusterSequenceArea   *fClustSeq;//!
97
98   // same as in the alifjheader
99   fastjet::Strategy               fStrategy; //!
100   fastjet::JetAlgorithm           fAlgor;    //!
101   fastjet::RecombinationScheme    fScheme;   //!
102   fastjet::AreaType               fAreaType; //!
103
104   int                             fNGhostRepeats; //!
105   double                          fGhostArea;     //!
106   double                          fMaxRap;        //!
107   double                          fR;             //!
108
109   // not included in the header (within AliFastJetHeader)
110   // no setters for the moment - used default values in the constructor
111   double                          fGridScatter; //!
112   double                          fKtScatter;   //!
113   double                          fMeanGhostKt; //!
114   int                             fPluginAlgor; //!
115
116   // extra parameters
117   double                          fMedianUsedForBgSubtraction; //!
118   bool                            fUseArea4Vector; //!
119
120   virtual void   SubtractBackground(const double median_pt = -1);
121
122   ClassDef(AliFJWrapper, 0)
123 };
124
125 #endif