]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG3/hfe/AliHFEpidTRD.h
Major update of the HFE package (comments inside the code
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEpidTRD.h
index e9757d46e1209afb73e21e2e40c57953e435ce6d..6c8988776d02c2cb6e61abbe6c3fc3b915a888e7 100644 (file)
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/
-#ifndef __ALIHFEPIDTRD_H__
-#define __ALIHFEPIDTRD_H__
+//
+// TRD PID Class
+// Does PID either on a x% electron efficiency basis or on dE/dx
+// For more information please check the implementation file
+//
+#ifndef ALIHFEPIDTRD_H
+#define ALIHFEPIDTRD_H
 
- #ifndef __ALIHFEPIDBASE_H__
+ #ifndef ALIHFEPIDBASE_H
  #include "AliHFEpidBase.h"
  #endif
 
-class TAxis;
-class TH1F;
-class TMap;
-class TString;
+class AliAODTrack;
+class AliAODMCParticle;
+class AliESDtrack;
+class AliHFEcollection;
+class AliMCParticle;
 class AliVParticle;
+class TList;
+class TH2F;
 
 class AliHFEpidTRD : public AliHFEpidBase{
   public:
@@ -31,31 +39,53 @@ class AliHFEpidTRD : public AliHFEpidBase{
       kLQ = 0,
       kNN = 1
     } PIDMethodTRD_t;
+    enum{
+      kThreshParams = 24
+    };
+    enum{
+      kHistTRDlikeBefore = 0,
+      kHistTRDlikeAfter = 1,
+      kHistTRDthresholds = 2,
+      kHistTRDSigV1 = 3,
+      kHistTRDSigV2 = 4,
+      kHistOverallSpecies = 5
+    };
+    AliHFEpidTRD();
     AliHFEpidTRD(const Char_t *name);
     AliHFEpidTRD(const AliHFEpidTRD &ref);
     AliHFEpidTRD& operator=(const AliHFEpidTRD &ref);
     virtual ~AliHFEpidTRD();
     
     virtual Bool_t InitializePID();
-    virtual Int_t IsSelected(AliVParticle *track);
-    virtual Bool_t HasQAhistos() const { return kFALSE; };
+    virtual Int_t IsSelected(AliHFEpidObject *track, AliHFEpidQAmanager *pidqa);
 
-    void LoadTRDthresholds();
+    Double_t GetTRDSignalV1(const AliESDtrack *track);
+    Double_t GetTRDSignalV2(const AliESDtrack *track);
 
+    Bool_t IsCalculateTRDSignals() const { return TestBit(kTRDsignals); }
     void SetPIDMethod(PIDMethodTRD_t method) { fPIDMethod = method; };
-    void SetThresholdFile(Char_t *thresholdFile) { fThresholdFile = thresholdFile; };
+    void SetElectronEfficiency(Double_t electronEfficiency) { fElectronEfficiency = electronEfficiency; }
+    void SetMinP(Double_t p) { fMinP = p; }
+    void CalculateTRDSignals(Bool_t docalc) { SetBit(kTRDsignals, docalc); } 
 
+    Double_t GetTRDthresholds(Double_t electronEff, Double_t p);
   protected:
+    enum{
+      kTRDsignals = BIT(16)
+    };
     void Copy(TObject &ref) const;
-    TH1F *GetTRDthresholds(Float_t electronEff);
-    void SetTRDthresholds(TH1F *thresholds, Float_t electronEff);
+    Double_t GetElectronLikelihood(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType);
+    Double_t GetP(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType);
+    void InitParameters();
+    void InitParameters1DLQ();
+    void GetParameters(Double_t electronEff, Double_t *parameters);
 
   private:
-    TString fThresholdFile;                                 // Threshold file name
+    static const Double_t fgkVerySmall;                       // Check for 0
+    Double_t fMinP;                                         // Minimum momentum above which TRD PID is applied
+    Double_t fElectronEfficiency;                           // Cut on electron efficiency
     PIDMethodTRD_t fPIDMethod;                              // PID Method: 2D Likelihood or Neural Network
-    TMap *fTRDthresholds;                                   //! TRD Thresholds
-    TAxis *fTRDelectronEfficiencies;                        //! Electron Efficiencies corresponding to reference histos
-
+    Double_t fThreshParams[kThreshParams];                  // Threshold parametrisation
   ClassDef(AliHFEpidTRD, 1)     // TRD electron ID class
 };