]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/Cal/AliTRDCalPIDLQ.h
Rename AliTRDCalPIDLQRef
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalPIDLQ.h
index 1cfa2bc11467bb2771d6e3742408158dd1930d06..bbaa3db8891181719e1a4b49f3aa885d1f774455 100644 (file)
@@ -10,8 +10,9 @@
 // Container for the distributions of dE/dx and the time bin of the          //
 // max. cluster for electrons and pions                                      //
 //                                                                           //
-// Author                                                                  //
+// Authors:                                                                  //
 //   Prashant Shukla <shukla@pi0.physi.uni-heidelberg.de>                    //
+//   Alex Bercuci <A.Bercuci@gsi.de>                                         //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 
 class TH1;
 class TObjArray;
-class AliTRDCalPIDLQRef;
-
 class AliTRDCalPIDLQ : public TNamed {
-
- friend class AliTRDCalPIDLQRef;
-
- public:
+public:
+       enum {
+               kNMom = 11,
+               kNLength = 4
+       };
 
   AliTRDCalPIDLQ();
   AliTRDCalPIDLQ(const Text_t *name, const Text_t *title);
   AliTRDCalPIDLQ(const AliTRDCalPIDLQ& pd);
-  virtual        ~AliTRDCalPIDLQ();
-  AliTRDCalPIDLQ &operator=(const AliTRDCalPIDLQ &c);
-
-  virtual void Copy(TObject &c) const;
-
-  Bool_t       ReadReferences(Char_t *responseFile);
-  void         SetMeanChargeRatio(Double_t ratio)     { fMeanChargeRatio = ratio;  }
-
-  Double_t     GetMeanChargeRatio() const             { return fMeanChargeRatio;   }
-  Double_t     GetMomentum(Int_t ip) const            { return (ip<0 || ip>=fNMom)    ? -1. : fTrackMomentum[ip];  }
-  Double_t     GetLength(Int_t il) const              { return (il<0 || il>=fNLength) ? -1. : fTrackSegLength[il]; }
+  virtual         ~AliTRDCalPIDLQ();
+  AliTRDCalPIDLQ&   operator=(const AliTRDCalPIDLQ &c);
+  virtual void     Copy(TObject &c) const;
+           Bool_t   LoadLQReferences(Char_t *refFile);
+           Bool_t   LoadNNReferences(Char_t *refFile){return kTRUE;}
+  //void         SetMeanChargeRatio(Double_t ratio)     { fMeanChargeRatio = ratio;  }
+
+  //Double_t     GetMeanChargeRatio() const             { return fMeanChargeRatio;   }
+  static   Double_t GetMomentum(Int_t ip)            { return (ip<0 || ip>=kNMom)    ? -1. : fTrackMomentum[ip];  }
+  static   Double_t GetLength(Int_t il)              { return (il<0 || il>=kNLength) ? -1. : fTrackSegLength[il]; }
   //Double_t   GetMean(Int_t iType, Int_t ip) const;
   //Double_t   GetNormalization(Int_t iType, Int_t ip) const;
 
-  TH1*         GetHistogram(Int_t iType, Int_t ip/*, Int_t il*/) const;
-  TH1*         GetHistogramT(Int_t iType, Int_t ip) const;
-
-  Double_t     GetProbability(Int_t spec, Float_t mom, Float_t *dedx, Float_t length) const;
-  Double_t     GetProbabilityT(Int_t spec, Double_t mom, Int_t timbin) const;
-  //Int_t      GetNbins() const                       { return fNbins;   }
-  //Double_t   GetBinSize() const                     { return fBinSize; }
-  Bool_t       WriteReferences(Char_t *File="TRDPIDHistograms.root", Char_t *dir =".");
+           TH1*     GetHistogram(Int_t iType, Int_t ip/*, Int_t il*/) const;
+           TH1*     GetHistogramT(Int_t iType, Int_t ip) const;
+           Double_t GetProbability(Int_t spec, Float_t mom, Float_t *dedx, Float_t length) const;
+           Double_t GetProbabilityT(Int_t spec, Double_t mom, Int_t timbin) const;
 
  protected:
 
-  void         Init();
-  void         CleanUp();
-
-  inline Int_t GetHistID(Int_t part, Int_t mom/*, Int_t length=0*/) const { return part*fNMom + mom; }
-  void        SaveMaxTimeBin(const Int_t mom, const char *fn);
-                               
+           void     Init();
+  inline  Int_t    GetHistID(Int_t part, Int_t mom/*, Int_t length=0*/) const { return part*kNMom + mom; }
+           void     CleanUp();
+ public:
+  static  Char_t   *fpartName[5];     //! Names of particle species
+  static  Char_t   *fpartSymb[5];     //! Symbols of particle species
+  
  protected:
+       static Float_t   fTrackMomentum[kNMom]; // Track momenta for which response functions are available
+  static Float_t   fTrackSegLength[kNLength]; // Track segment lengths for which response functions are available
+         Double_t  fMeanChargeRatio; //  Ratio of mean charge from real Det. to prob. dist.
+         TObjArray *fHistdEdx;        //  Prob. of dEdx for 5 particles and for several momenta
+         TObjArray *fHistTimeBin;     //  Prob. of max time bin for 5 particles and for several momenta
 
-  static  Char_t    *fpartName[5];     //! Names of particle species
-  static  Char_t    *fpartSymb[5];     //! Symbols of particle species  
-  Int_t              fNMom;            //  Number of momenta
-  Int_t              fNLength;         //  Number of track segment length intervals
-
-  Double_t          *fTrackMomentum;   //[fNMom]    Track momenta for which response functions are available
-  Double_t          *fTrackSegLength;  //[fNLength] Track segment lengths for which response functions are available
-  Int_t              fNTimeBins;       //  Number of time bins
-
-  Double_t           fMeanChargeRatio; //  Ratio of mean charge from real Det. to prob. dist.
-  Int_t              fNbins;           //  Number of energy bins
-  Double_t           fBinSize;         //  Size of energy bin
-
-  TObjArray         *fHistdEdx;        //  Prob. of dEdx for 5 particles and for several momenta
-  TObjArray         *fHistTimeBin;     //  Prob. of max time bin for 5 particles and for several momenta
-
- private:
-
-  TH1              *h1MaxTB[2];      //!
-  AliTRDCalPIDLQRef *fEstimator;      //!
        
   ClassDef(AliTRDCalPIDLQ, 2)         //   The TRD PID response container class