ROOT logo
#ifndef ALIRSNLOOPEFF_H
#define ALIRSNLOOPEFF_H

//
// Class to compute an efficiency.
// Builds a 2-elements CF container
// to fill with resonances generated and passing some defined cuts.
//

#include "AliLog.h"

#include "AliRsnLoop.h"
#include "AliRsnListOutput.h"

class AliRsnLoopEff : public AliRsnLoop {
public:

   AliRsnLoopEff(const char *name = "default", Int_t nSteps = 0, Double_t maxDistPV = 1E-2);
   AliRsnLoopEff(const AliRsnLoopEff &copy);
   AliRsnLoopEff &operator=(const AliRsnLoopEff &copy);
   ~AliRsnLoopEff();

   AliRsnListOutput *GetOutput()          {return fOutput;}
   void              CreateOutput();
   void              AddStep(TObject *set);
   void              SetMaxDistanceFromPV(Double_t value) {fMaxDistPV = value;}
   virtual void      AddOutput(TObject *) {AliWarning("In loops for efficiency it is not allowed to add outputs externally");}
   virtual Bool_t    Init(const char *prefix, TList *list);

protected:

   Int_t             FindTrack(Int_t label, const AliVEvent *event);
   Int_t             GetMatchedDaughter(Int_t label, AliRsnEvent *event);
   Double_t          DistanceFromPV(Double_t x, Double_t y, Double_t z);
   Bool_t            CheckDistanceFromPV(Double_t x, Double_t y, Double_t z) {return (DistanceFromPV(x,y,z) <= fMaxDistPV);}

   Int_t              fAddSteps;  //  number of additional steps
   TObjArray          fSteps;     //  list of cuts for all steps with MC tracks
   AliRsnListOutput  *fOutput;    //  unique list output
   Double_t           fVertex[3]; //! primary vertex position
   Double_t           fMaxDistPV; //  maximum allowed distance from primary vertex

private:

   ClassDef(AliRsnLoopEff, 1)
};

#endif

 AliRsnLoopEff.h:1
 AliRsnLoopEff.h:2
 AliRsnLoopEff.h:3
 AliRsnLoopEff.h:4
 AliRsnLoopEff.h:5
 AliRsnLoopEff.h:6
 AliRsnLoopEff.h:7
 AliRsnLoopEff.h:8
 AliRsnLoopEff.h:9
 AliRsnLoopEff.h:10
 AliRsnLoopEff.h:11
 AliRsnLoopEff.h:12
 AliRsnLoopEff.h:13
 AliRsnLoopEff.h:14
 AliRsnLoopEff.h:15
 AliRsnLoopEff.h:16
 AliRsnLoopEff.h:17
 AliRsnLoopEff.h:18
 AliRsnLoopEff.h:19
 AliRsnLoopEff.h:20
 AliRsnLoopEff.h:21
 AliRsnLoopEff.h:22
 AliRsnLoopEff.h:23
 AliRsnLoopEff.h:24
 AliRsnLoopEff.h:25
 AliRsnLoopEff.h:26
 AliRsnLoopEff.h:27
 AliRsnLoopEff.h:28
 AliRsnLoopEff.h:29
 AliRsnLoopEff.h:30
 AliRsnLoopEff.h:31
 AliRsnLoopEff.h:32
 AliRsnLoopEff.h:33
 AliRsnLoopEff.h:34
 AliRsnLoopEff.h:35
 AliRsnLoopEff.h:36
 AliRsnLoopEff.h:37
 AliRsnLoopEff.h:38
 AliRsnLoopEff.h:39
 AliRsnLoopEff.h:40
 AliRsnLoopEff.h:41
 AliRsnLoopEff.h:42
 AliRsnLoopEff.h:43
 AliRsnLoopEff.h:44
 AliRsnLoopEff.h:45
 AliRsnLoopEff.h:46
 AliRsnLoopEff.h:47
 AliRsnLoopEff.h:48
 AliRsnLoopEff.h:49