Updates in order to enable the '2D' PID for the TRD developed by Daniel Lohner.
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliTRDPIDResponse.h
index 53d90de..f1c079b 100644 (file)
 
 class TObjArray;
 class AliVTrack;
-class AliTRDPIDParams;
-class AliTRDPIDReference;
+class AliTRDPIDResponseObject;
+
 class AliTRDPIDResponse : public TObject {
   public:
     enum ETRDPIDResponseStatus {
       kIsOwner = BIT(14)
     };
     enum ETRDPIDResponseDef {
-      kNlayer = 6
-      ,kNPBins = 6
+       kNlayer = 6
+       ,kNPBins = 6
     };
     enum ETRDPIDMethod {
       kNN   = 0,
       kLQ2D = 1,
       kLQ1D = 2
     };
+    enum ETRDPIDNMethod {
+       kNMethod=3
+    };
     enum ETRDNslices {
       kNslicesLQ1D = 1,
       kNslicesLQ2D = 2,
@@ -65,19 +68,18 @@ class AliTRDPIDResponse : public TObject {
     void      SetOwner();
     void      SetPIDmethod(ETRDPIDMethod m) {fPIDmethod=m;}
     void      SetGainNormalisationFactor(Double_t gainFactor) { fGainNormalisationFactor = gainFactor; }
-    void      SetPIDParams(const AliTRDPIDParams * params) { fkPIDParams = params; }
 
-    Bool_t    Load(const Char_t *filename = NULL, const Char_t *refName = "RefTRDLQ1D");
-    Bool_t    Load(const AliTRDPIDReference *ref) { fkPIDReference = ref; return kTRUE; }
+    Bool_t    SetPIDResponseObject(const AliTRDPIDResponseObject * obj) { fkPIDResponseObject = obj; return kTRUE;}
+
+    Bool_t    Load(const Char_t *filename = NULL);
   
     Bool_t    IdentifiedAsElectron(Int_t nTracklets, const Double_t *like, Double_t p, Double_t level) const;
   
   private:
     Bool_t    CookdEdx(Int_t nSlice, const Double_t * const in, Double_t *out) const;
-    Double_t  GetProbabilitySingleLayer(Int_t species, Double_t plocal, Double_t dEdx) const;
+    Double_t  GetProbabilitySingleLayer(Int_t species, Double_t plocal, Double_t *dEdx) const;
     
-    const AliTRDPIDReference *fkPIDReference;   // PID References
-    const AliTRDPIDParams *fkPIDParams;         // PID Params
+    const AliTRDPIDResponseObject *fkPIDResponseObject;   // PID References and Params
     Double_t  fGainNormalisationFactor;         // Gain normalisation factor
     ETRDPIDMethod   fPIDmethod;                 // PID method selector
       
@@ -96,3 +98,4 @@ AliTRDPIDResponse::ETRDNslices AliTRDPIDResponse::GetNumberOfSlices() const {
   return slices;
 }
 #endif
+