Fix for the problem during PbPb run of Nov 2010 (Indra)
[u/mrichter/AliRoot.git] / JETAN / AliUA1JetFinderV1.h
index b8e3465..f40b9f4 100644 (file)
@@ -15,6 +15,7 @@
 #include "AliJetFinder.h"
 class AliUA1JetHeaderV1;
 class TH2F;
+class TH1F;
 
 class AliUA1JetFinderV1 : public AliJetFinder
 {
@@ -29,34 +30,44 @@ class AliUA1JetFinderV1 : public AliJetFinder
                    Float_t* etJet,Float_t* etaJet, Float_t* phiJet,
                    Float_t* etallJet, Int_t* ncellsJet);
 
-  void SubtractBackg(Int_t& nIn, Int_t&nJ, Float_t&EtbgTotalN,
-                      Float_t* ptT, Float_t* etaT, Float_t* phiT,
-                      Float_t* etJet,Float_t* etaJet, Float_t* phiJet,
-                      Float_t* etsigJet,Int_t* multJet, Int_t* injet);
-
-  void SubtractBackgCone(Int_t& nIn, Int_t&nJ,Float_t& EtbgTotalN,
-                      Float_t* ptT, Float_t* etaT, Float_t* phiT,
-                      Float_t* etJet,Float_t* etaJet, Float_t* phiJet,
-                      Float_t* etsigJet, Int_t* multJet, Int_t* injet);
-
-  void SubtractBackgRatio(Int_t& nIn, Int_t&nJ,Float_t& EtbgTotalN,
-                      Float_t* ptT, Float_t* etaT, Float_t* phiT,
-                      Float_t* etJet,Float_t* etaJet, Float_t* phiJet,
-                      Float_t* etsigJet, Int_t* multJet, Int_t* injet);
-
-  void SubtractBackgStat(Int_t& nIn, Int_t&nJ,Float_t&EtbgTotalN,
-                      Float_t* ptT, Float_t* etaT, Float_t* phiT,
-                      Float_t* etJet,Float_t* etaJet, Float_t* phiJet,
-                      Float_t* etsigJet, Int_t* multJet, Int_t* injet);
+  void SubtractBackg(const Int_t& nIn, const Int_t&nJ, Float_t&EtbgTotalN,
+                    const Float_t* ptT, const Float_t* etaT, const Float_t* phiT,
+                     Float_t* etJet, const Float_t* etaJet, const Float_t* phiJet,
+                    Float_t* etsigJet,Int_t* multJet, Int_t* injet);
+  
+  void SubtractBackgCone(const Int_t& nIn, const Int_t&nJ,Float_t& EtbgTotalN,
+                        const Float_t* ptT, const Float_t* etaT, const Float_t* phiT,
+                        Float_t* etJet, const Float_t* etaJet, const Float_t* phiJet,
+                        Float_t* etsigJet, Int_t* multJet, Int_t* injet);
+  
+  void SubtractBackgRatio(const Int_t& nIn, const Int_t&nJ,Float_t& EtbgTotalN,
+                         const Float_t* ptT, const Float_t* etaT, const Float_t* phiT,
+                         Float_t* etJet, const Float_t* etaJet, const Float_t* phiJet,
+                         Float_t* etsigJet, Int_t* multJet, Int_t* injet);
+  
+  void SubtractBackgStat(const Int_t& nIn, const Int_t&nJ,Float_t&EtbgTotalN,
+                        const Float_t* ptT, const Float_t* etaT, const Float_t* phiT,
+                        Float_t* etJet, const Float_t* etaJet, const Float_t* phiJet,
+                        Float_t* etsigJet, Int_t* multJet, Int_t* injet);
   void Reset();
   void Init();
-  void WriteJHeaderToFile();
+  void WriteJHeaderToFile() const;
+  
+  enum {kMaxJets = 30};
 
  protected:
   AliUA1JetFinderV1(const AliUA1JetFinderV1& rJetF1);
   AliUA1JetFinderV1& operator = (const AliUA1JetFinderV1& rhsf);
-  TH2F           * fLego;           //Lego Histo
-  ClassDef(AliUA1JetFinderV1,1)
+  TH2F*          fLego;           //Lego Histo
+  // temporary histos for background, reset for each event, no need to stream
+  TH1F*          fhEtJet[kMaxJets];   //! histogram for background subtraction
+  TH1F*          fhAreaJet[kMaxJets]; //! histogram for background subtraction (store global not to create it with every event
+  TH1F*          fhEtBackg;           //! histogram for background subtraction
+  TH1F*          fhAreaBackg;           //! histogram for background subtraction
+
+  //
+
+  ClassDef(AliUA1JetFinderV1,2)
 };
 
 #endif