1 #ifndef ALIRSNLOOPEFF_H
2 #define ALIRSNLOOPEFF_H
5 // Class to compute an efficiency.
6 // Builds a 2-elements CF container
7 // to fill with resonances generated and passing some defined cuts.
12 #include "AliRsnLoop.h"
13 #include "AliRsnListOutput.h"
15 class AliRsnLoopEff : public AliRsnLoop {
18 AliRsnLoopEff(const char *name = "default", Int_t nSteps = 0, Double_t maxDistPV = 1E-2);
19 AliRsnLoopEff(const AliRsnLoopEff ©);
20 AliRsnLoopEff &operator=(const AliRsnLoopEff ©);
23 AliRsnListOutput *GetOutput() {return fOutput;}
25 void AddStep(TObject *set);
26 void SetMaxDistanceFromPV(Double_t value) {fMaxDistPV = value;}
27 virtual void AddOutput(TObject *) {AliWarning("In loops for efficiency it is not allowed to add outputs externally");}
28 virtual Bool_t Init(const char *prefix, TList *list);
32 Int_t FindTrack(Int_t label, const AliVEvent *event);
33 Int_t GetMatchedDaughter(Int_t label, AliRsnEvent *event);
34 Double_t DistanceFromPV(Double_t x, Double_t y, Double_t z);
35 Bool_t CheckDistanceFromPV(Double_t x, Double_t y, Double_t z) {return (DistanceFromPV(x,y,z) <= fMaxDistPV);}
37 Int_t fAddSteps; // number of additional steps
38 TObjArray fSteps; // list of cuts for all steps with MC tracks
39 AliRsnListOutput *fOutput; // unique list output
40 Double_t fVertex[3]; //! primary vertex position
41 Double_t fMaxDistPV; // maximum allowed distance from primary vertex
45 ClassDef(AliRsnLoopEff, 1)