]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnCutPID.h
Coverity fixes
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutPID.h
index baf07489e53dfdc7f9e99fdffeddce01a7a5662d..772bca97dceb696d076d338ff5c3bc7ab2ff1734 100644 (file)
 
 class AliRsnDaughter;
 
-class AliRsnCutPID : public AliRsnCut
-{
-  public:
-    
-    enum EDetector 
-    {
+class AliRsnCutPID : public AliRsnCut {
+public:
+
+   enum EDetector {
       kITS,
       kTPC,
       kTRD,
       kTOF,
       kHMPID,
       kDetectors
-    };
-
-    AliRsnCutPID();
-    AliRsnCutPID(const char *name, AliPID::EParticleType pid, Double_t probMin = 0.0, Bool_t perfectPID = kFALSE);
-    virtual ~AliRsnCutPID() {;};
-    
-    void           SetDefault(Bool_t yn = kTRUE) {fUseDefault = yn;}
-    void           SetPrior(Int_t i, Double_t value) {if (i >= 0 && i < AliPID::kSPECIES) fPrior[i] = value;}
-    void           SetPerfect(Bool_t yn = kTRUE) {fPerfect = yn;}
-    
-    void           IncludeDetector(EDetector det, Double_t threshold = 0., Bool_t goAbove = kTRUE);
-    void           ExcludeDetector(EDetector det) {if (CheckBounds(det)) fUseDetector[det] = kFALSE;}
-    
-    Bool_t         ComputeWeights(AliRsnDaughter *daughter);
-    Int_t          RealisticPID(AliRsnDaughter * const daughter, Double_t &prob);
-    Int_t          PerfectPID(AliRsnDaughter * const daughter);
-    Double_t       GetWeight(Int_t i) {if (i>=0&&i<AliPID::kSPECIES) return fWeight[i]; return 0.0;}
-
-    virtual Bool_t IsSelected(TObject *object);
-
-  protected:
-  
-    Bool_t   CheckBounds(EDetector det) const {return (det >= kITS && det < kDetectors);}
-    Bool_t   CheckThreshold(EDetector det, Double_t value);
-    
-    Double_t              fPrior[AliPID::kSPECIES];        // prior probability
-    Double_t              fWeight[AliPID::kSPECIES];       // PID weights used for combinations
-  
-    Bool_t                fPerfect;                        // choice to use perfect PID
-    Bool_t                fUseDefault;                     // choice to use default combined PID weights (or customized)
-    Bool_t                fUseDetector[kDetectors];        // flag to include/exclude each single detector
-    Double_t              fPtThreshold[kDetectors];        // pT threshold above/below which a detector is considered
-    Double_t              fGoAboveThreshold[kDetectors];   // to choose if detector is used balow or above threshold
-
-    ClassDef(AliRsnCutPID, 1)
+   };
+
+   AliRsnCutPID();
+   AliRsnCutPID(const char *name, AliPID::EParticleType pid, Double_t probMin = 0.0, Bool_t perfectPID = kFALSE);
+   virtual ~AliRsnCutPID() {;};
+
+   void           SetDefault(Bool_t yn = kTRUE) {fUseDefault = yn;}
+   void           SetPrior(Int_t i, Double_t value) {if (i >= 0 && i < AliPID::kSPECIES) fPrior[i] = value;}
+   void           SetPerfect(Bool_t yn = kTRUE) {fPerfect = yn;}
+
+   void           IncludeDetector(EDetector det, Double_t threshold = 0., Bool_t goAbove = kTRUE);
+   void           ExcludeDetector(EDetector det) {if (CheckBounds(det)) fUseDetector[det] = kFALSE;}
+
+   Bool_t         ComputeWeights(AliRsnDaughter *daughter);
+   Int_t          RealisticPID(AliRsnDaughter * const daughter, Double_t &prob);
+   Int_t          PerfectPID(AliRsnDaughter * const daughter);
+   Double_t       GetWeight(Int_t i) const {if (i >= 0 && i < AliPID::kSPECIES) return fWeight[i]; return 0.0;}
+
+   virtual Bool_t IsSelected(TObject *object);
+
+protected:
+
+   Bool_t   CheckBounds(EDetector det) const {return (det >= kITS && det < kDetectors);}
+   Bool_t   CheckThreshold(EDetector det, Double_t value) const;
+
+   Double_t              fPrior[AliPID::kSPECIES];        // prior probability
+   Double_t              fWeight[AliPID::kSPECIES];       // PID weights used for combinations
+
+   Bool_t                fPerfect;                        // choice to use perfect PID
+   Bool_t                fUseDefault;                     // choice to use default combined PID weights (or customized)
+   Bool_t                fUseDetector[kDetectors];        // flag to include/exclude each single detector
+   Double_t              fPtThreshold[kDetectors];        // pT threshold above/below which a detector is considered
+   Double_t              fGoAboveThreshold[kDetectors];   // to choose if detector is used balow or above threshold
+
+   ClassDef(AliRsnCutPID, 1)
 };
 
 #endif