#ifndef ALIRSNLOOPPAIR_H
#define ALIRSNLOOPPAIR_H
#include "AliRsnLoop.h"
class TList;
class AliRsnEvent;
class AliRsnPairDef;
class AliRsnLoopPair : public AliRsnLoop {
public:
AliRsnLoopPair(const char *name = "default", AliRsnPairDef *def = 0, Bool_t isMixed = kFALSE);
AliRsnLoopPair(const AliRsnLoopPair ©);
AliRsnLoopPair &operator=(const AliRsnLoopPair ©);
~AliRsnLoopPair();
Bool_t IsTrueMC() const {return fTrueMC;}
Bool_t IsOnlyTrue() const {return fOnlyTrue;}
Bool_t IsCheckDecay() const {return fCheckDecay;}
AliRsnPairDef *GetPairDef() {return fPairDef;}
AliRsnCutSet *GetPairCuts() {return fPairCuts;}
AliRsnMother *GetMother() {return &fMother;}
void SetPairCuts(AliRsnCutSet *cuts) {fPairCuts = cuts;}
void SetTrueMC(Bool_t yn = kTRUE) {fTrueMC = yn;}
void SetOnlyTrue(Bool_t onlyTrue = kTRUE) {fOnlyTrue = onlyTrue;}
void SetMCRefInfo(Bool_t b = kTRUE) {fUseMCRef = b;}
void SetCheckDecay(Bool_t check = kTRUE) {fCheckDecay = check;}
void SetListID(Int_t i, Int_t val) {if (i==0||i==1) fListID[i] = val;}
void SetRangeY(Double_t range) {fRangeY = range;}
void SetRangeDCAproduct(Double_t range) {fRangeDCAproduct = range;}
Bool_t IsTrueMother();
virtual void Print(Option_t *opt = "") const;
virtual Bool_t Init(const char *prefix, TList *list);
virtual Int_t DoLoop(AliRsnEvent *main, AliRsnDaughterSelector *smain, AliRsnEvent *mix = 0, AliRsnDaughterSelector *smix = 0);
protected:
Bool_t AssignMotherAndDaughters (AliRsnEvent *event, Int_t ipart);
Bool_t AssignMotherAndDaughtersESD(AliRsnEvent *event, Int_t ipart);
Bool_t AssignMotherAndDaughtersAOD(AliRsnEvent *event, Int_t ipart);
Int_t LoopTrueMC(AliRsnEvent *event);
Bool_t fTrueMC;
Bool_t fOnlyTrue;
Bool_t fUseMCRef;
Bool_t fCheckDecay;
Int_t fListID[2];
Double_t fRangeY;
Double_t fRangeDCAproduct;
AliRsnPairDef *fPairDef;
AliRsnCutSet *fPairCuts;
AliRsnMother fMother;
AliRsnDaughter fDaughter[2];
private:
ClassDef(AliRsnLoopPair, 5)
};
#endif