-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice *
- **************************************************************************/
-
-/* $Id$ */
-
//
// *** Class AliRsnEvent ***
//
#ifndef ALIRSNEVENT_H
#define ALIRSNEVENT_H
-class AliRsnDaughter;
+#include "AliPID.h"
+#include "AliRsnPIDDefESD.h"
+#include "AliRsnDaughter.h"
-#include <TNamed.h>
-#include <TArrayI.h>
-#include <TClonesArray.h>
-#include "AliRsnPID.h"
-#include "AliRsnPIDIndex.h"
+class AliVEvent;
+class AliMCEvent;
-class AliRsnEvent : public TNamed
+class AliRsnEvent : public TObject
{
public:
- AliRsnEvent();
- AliRsnEvent (const AliRsnEvent& copy);
+ AliRsnEvent(AliVEvent *ref = 0, AliMCEvent *refMC = 0);
+ AliRsnEvent(const AliRsnEvent& copy);
AliRsnEvent& operator= (const AliRsnEvent& copy);
virtual ~AliRsnEvent();
- // Array management
- void Init();
- void Clear (Option_t *option = "");
- AliRsnDaughter* AddTrack (AliRsnDaughter track);
- AliRsnDaughter* GetTrack (Int_t index);
- TClonesArray* GetTracks() {return fTracks;}
- TArrayI* GetCharged (Char_t sign);
- TArrayI* GetTracksArray (AliRsnPID::EMethod pidtype, Char_t sign, AliRsnPID::EType type);
- void FillPIDArrays();
- void Print (Option_t *option = "") const;
-
- // Primary vertex
- Double_t GetPrimaryVertexX() const {return fPVx;}
- Double_t GetPrimaryVertexY() const {return fPVy;}
- Double_t GetPrimaryVertexZ() const {return fPVz;}
- void GetPrimaryVertex (Double_t &x, Double_t &y, Double_t &z) const {x=fPVx;y=fPVy;z=fPVz;}
- void SetPrimaryVertexX (Double_t value) {fPVx = value;}
- void SetPrimaryVertexY (Double_t value) {fPVy = value;}
- void SetPrimaryVertexZ (Double_t value) {fPVz = value;}
- void SetPrimaryVertex (Double_t x, Double_t y, Double_t z) {fPVx=x;fPVy=y;fPVz=z;}
-
- // Multiplicity
- Int_t GetMultiplicity() const;
- Int_t GetNCharged (Char_t sign);
+ void SetRef(AliVEvent *const event, AliMCEvent *const mc = 0) {fRef = event; fRefMC = mc;}
+ void SetRefMC(AliMCEvent * const mc) {fRefMC = mc;}
+ AliVEvent* GetRef() const {return fRef;}
+ AliMCEvent* GetRefMC() const {return fRefMC;}
+ AliRsnPIDDefESD* GetPIDDefESD() {return &fPIDDefESD;}
+
+ void SetDaughter(AliRsnDaughter &daughter, Int_t index);
+ AliRsnDaughter GetDaughter(Int_t i);
+ Int_t GetMultiplicity();
+ Double_t GetVz();
+ AliRsnDaughter GetLeadingParticle(Double_t ptMin = 0.0, AliPID::EParticleType type = AliPID::kUnknown);
+ Double_t GetAverageMomentum(Int_t &count, AliPID::EParticleType type = AliPID::kUnknown);
+ Bool_t GetAngleDistr(Double_t &angleMean, Double_t &angleRMS, AliRsnDaughter d);
+
+ void SetPriorProbability(AliPID::EParticleType type, Double_t p) {if (type>=0&&type<(Int_t)AliPID::kSPECIES)fPrior[type]=p;}
+ void SetPriorProbability(Double_t* const out);
+ void DumpPriors();
+ void GetPriorProbability(Double_t *out) const;
private:
- Int_t ChargeIndex (Char_t sign) const;
- Int_t Fill (TObjArray *array);
-
- Double_t fPVx; // position of
- Double_t fPVy; // primary
- Double_t fPVz; // vertex
-
- TClonesArray *fTracks; // collection of particles
+ Bool_t AcceptTrackPID(AliRsnDaughter*const d, AliPID::EParticleType type = AliPID::kUnknown);
- AliRsnPIDIndex *fNoPID; // array index only for charged tracks
- AliRsnPIDIndex *fPerfectPID; // array index for perfect PID
- AliRsnPIDIndex *fRealisticPID; // array index for realistic PID (largest prob)
+ Double_t fPrior[AliPID::kSPECIES]; // prior probabilities
+ AliVEvent *fRef; // pointer to input event
+ AliMCEvent *fRefMC; // pointer to reference MC event (if any)
+ AliRsnPIDDefESD fPIDDefESD; // (optional) customization of PID weights for ESD
- ClassDef (AliRsnEvent, 2);
+ ClassDef(AliRsnEvent, 3);
};
#endif