]>
Commit | Line | Data |
---|---|---|
c865cb1d | 1 | #ifndef ALIRSNLOOPEFF_H |
2 | #define ALIRSNLOOPEFF_H | |
3 | ||
4 | // | |
b63357a0 | 5 | // Class to compute an efficiency. |
6 | // Builds a 2-elements CF container | |
7 | // to fill with resonances generated and passing some defined cuts. | |
c865cb1d | 8 | // |
9 | ||
10 | #include "AliLog.h" | |
11 | ||
c865cb1d | 12 | #include "AliRsnLoop.h" |
f34f960b | 13 | #include "AliRsnListOutput.h" |
c865cb1d | 14 | |
15 | class AliRsnLoopEff : public AliRsnLoop { | |
16 | public: | |
17 | ||
f34f960b | 18 | AliRsnLoopEff(const char *name = "default", Int_t nSteps = 0, Double_t maxDistPV = 1E-2); |
c865cb1d | 19 | AliRsnLoopEff(const AliRsnLoopEff ©); |
61f275d1 | 20 | AliRsnLoopEff &operator=(const AliRsnLoopEff ©); |
c865cb1d | 21 | ~AliRsnLoopEff(); |
22 | ||
61f275d1 | 23 | AliRsnListOutput *GetOutput() {return fOutput;} |
c865cb1d | 24 | void CreateOutput(); |
61f275d1 | 25 | void AddStep(TObject *set); |
f34f960b | 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");} | |
c865cb1d | 28 | virtual Bool_t Init(const char *prefix, TList *list); |
29 | ||
30 | protected: | |
31 | ||
b63357a0 | 32 | Int_t FindTrack(Int_t label, const AliVEvent *event); |
f34f960b | 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);} | |
c865cb1d | 36 | |
f34f960b | 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 | |
c865cb1d | 42 | |
43 | private: | |
44 | ||
45 | ClassDef(AliRsnLoopEff, 1) | |
46 | }; | |
47 | ||
48 | #endif | |
49 |