]>
Commit | Line | Data |
---|---|---|
03d23846 | 1 | #ifndef ALIRSNMINIOUTPUT_H |
2 | #define ALIRSNMINIOUTPUT_H | |
3 | ||
4 | // | |
5 | // Mini-Output | |
6 | // All the definitions needed for building a RSN histogram | |
7 | // including: | |
8 | // -- properties of resonance (mass, PDG code if needed) | |
9 | // -- properties of daughters (assigned mass, charges) | |
10 | // -- definition of output histogram | |
61f275d1 | 11 | // |
03d23846 | 12 | |
088ca370 | 13 | #include "AliRsnEvent.h" |
03d23846 | 14 | #include "AliRsnDaughter.h" |
15 | #include "AliRsnMiniParticle.h" | |
16 | ||
17 | class THnSparse; | |
18 | class TList; | |
19 | class TH1; | |
20 | ||
21 | class TList; | |
22 | class TClonesArray; | |
23 | class AliRsnMiniAxis; | |
24 | class AliRsnMiniPair; | |
25 | class AliRsnMiniEvent; | |
26 | ||
27 | typedef AliRsnDaughter::ESpecies RSNPID; | |
28 | ||
29 | class AliRsnMiniOutput : public TNamed { | |
30 | public: | |
31 | ||
32 | enum EOutputType { | |
33 | kHistogram, | |
34 | kHistogramSparse, | |
35 | kTypes | |
36 | }; | |
61f275d1 | 37 | |
03d23846 | 38 | enum EComputation { |
39 | kEventOnly, | |
40 | kTrackPair, | |
41 | kTrackPairMix, | |
6aaeb33c | 42 | kTrackPairRotated1, |
43 | kTrackPairRotated2, | |
03d23846 | 44 | kTruePair, |
45 | kMother, | |
4e6aff21 | 46 | kMotherInAcc, |
03d23846 | 47 | kComputations |
48 | }; | |
61f275d1 | 49 | |
03d23846 | 50 | AliRsnMiniOutput(); |
51 | AliRsnMiniOutput(const char *name, EOutputType type, EComputation src = kTrackPair); | |
52 | AliRsnMiniOutput(const char *name, const char *outType, const char *compType); | |
53 | AliRsnMiniOutput(const AliRsnMiniOutput ©); | |
61f275d1 | 54 | AliRsnMiniOutput &operator=(const AliRsnMiniOutput ©); |
55 | ||
03d23846 | 56 | Bool_t IsEventOnly() const {return (fComputation == kEventOnly);} |
57 | Bool_t IsTrackPair() const {return (fComputation == kTrackPair);} | |
58 | Bool_t IsTrackPairMix() const {return (fComputation == kTrackPairMix);} | |
59 | Bool_t IsTruePair() const {return (fComputation == kTruePair);} | |
60 | Bool_t IsMother() const {return (fComputation == kMother);} | |
4e6aff21 | 61 | Bool_t IsMotherInAcc() const {return (fComputation == kMotherInAcc);} |
03d23846 | 62 | Bool_t IsDefined() const {return (IsEventOnly() || IsTrackPair() || IsTrackPairMix() || IsTruePair() || IsMother());} |
d573d2fb | 63 | Bool_t IsLikeSign() const {return (fCharge[0] == fCharge[1]);} |
64 | Bool_t IsSameCut() const {return (fCutID[0] == fCutID[1]);} | |
9e7b94f5 | 65 | Bool_t IsSameDaughter() const {return (fDaughter[0] == fDaughter[1]);} |
66 | //Bool_t IsSymmetric() const {return (IsLikeSign() && IsSameCut());} | |
67 | Bool_t IsSymmetric() const {return (IsLikeSign() && IsSameDaughter());} | |
61f275d1 | 68 | |
03d23846 | 69 | EOutputType GetOutputType() const {return fOutputType;} |
70 | EComputation GetComputation() const {return fComputation;} | |
71 | Int_t GetCutID(Int_t i) const {if (i <= 0) return fCutID [0]; else return fCutID [1];} | |
72 | RSNPID GetDaughter(Int_t i) const {if (i <= 0) return fDaughter[0]; else return fDaughter[1];} | |
73 | Double_t GetMass(Int_t i) const {return AliRsnDaughter::SpeciesMass(GetDaughter(i));} | |
74 | Int_t GetPDG(Int_t i) const {return AliRsnDaughter::SpeciesPDG(GetDaughter(i));} | |
75 | Int_t GetCharge(Int_t i) const {if (i <= 0) return fCharge[0]; else return fCharge[1];} | |
76 | Int_t GetMotherPDG() const {return fMotherPDG;} | |
77 | Double_t GetMotherMass() const {return fMotherMass;} | |
74d60285 | 78 | Bool_t GetFillHistogramOnlyInRange() { return fCheckHistRange; } |
088ca370 | 79 | Short_t GetMaxNSisters() {return fMaxNSisters;} |
61f275d1 | 80 | |
03d23846 | 81 | void SetOutputType(EOutputType type) {fOutputType = type;} |
82 | void SetComputation(EComputation src) {fComputation = src;} | |
83 | void SetCutID(Int_t i, Int_t value) {if (i <= 0) fCutID [0] = value; else fCutID [1] = value;} | |
84 | void SetDaughter(Int_t i, RSNPID value) {if (i <= 0) fDaughter[0] = value; else fDaughter[1] = value;} | |
85 | void SetCharge(Int_t i, Char_t value) {if (i <= 0) fCharge[0] = value; else fCharge[1] = value;} | |
86 | void SetMotherPDG(Int_t pdg) {fMotherPDG = pdg;} | |
87 | void SetMotherMass(Double_t mass) {fMotherMass = mass;} | |
88 | void SetPairCuts(AliRsnCutSet *set) {fPairCuts = set;} | |
74d60285 | 89 | void SetFillHistogramOnlyInRange(Bool_t fillInRangeOnly) { fCheckHistRange = fillInRangeOnly; } |
088ca370 | 90 | void SetMaxNSisters(Short_t n) {fMaxNSisters = n;} |
91 | void SetCheckMomentumConservation(Bool_t checkP) {fCheckP = checkP;} | |
31dbef4e | 92 | void SetCheckFeedDown(Bool_t checkFeedDown) {fCheckFeedDown = checkFeedDown;} |
93 | void SetDselection(UShort_t originDselection); | |
94 | void SetRejectCandidateIfNotFromQuark(Bool_t opt){fRejectIfNoQuark=opt;} | |
61f275d1 | 95 | |
03d23846 | 96 | void AddAxis(Int_t id, Int_t nbins, Double_t min, Double_t max); |
97 | void AddAxis(Int_t id, Double_t min, Double_t max, Double_t step); | |
98 | void AddAxis(Int_t id, Int_t nbins, Double_t *values); | |
61f275d1 | 99 | AliRsnMiniAxis *GetAxis(Int_t i) {if (i >= 0 && i < fAxes.GetEntries()) return (AliRsnMiniAxis *)fAxes[i]; return 0x0;} |
100 | Double_t *GetAllComputed() {return fComputed.GetArray();} | |
101 | ||
102 | AliRsnMiniPair &Pair() {return fPair;} | |
03d23846 | 103 | Bool_t Init(const char *prefix, TList *list); |
45aa62b9 | 104 | Bool_t FillMother(const AliRsnMiniPair *pair, AliRsnMiniEvent *event, TClonesArray *valueList); |
4e6aff21 | 105 | Bool_t FillMotherInAcceptance(const AliRsnMiniPair *pair, AliRsnMiniEvent *event, TClonesArray *valueList); |
45aa62b9 | 106 | Bool_t FillEvent(AliRsnMiniEvent *event, TClonesArray *valueList); |
d573d2fb | 107 | Int_t FillPair(AliRsnMiniEvent *event1, AliRsnMiniEvent *event2, TClonesArray *valueList, Bool_t refFirst = kTRUE); |
61f275d1 | 108 | |
03d23846 | 109 | private: |
110 | ||
111 | void CreateHistogram(const char *name); | |
112 | void CreateHistogramSparse(const char *name); | |
45aa62b9 | 113 | void ComputeValues(AliRsnMiniEvent *event, TClonesArray *valueList); |
114 | void FillHistogram(); | |
03d23846 | 115 | |
116 | EOutputType fOutputType; // type of output | |
117 | EComputation fComputation; // type of computation | |
118 | Int_t fCutID[2]; // ID of cut set used to select tracks | |
119 | RSNPID fDaughter[2]; // species of daughters | |
120 | Char_t fCharge[2]; // required track charge | |
121 | Int_t fMotherPDG; // PDG code of resonance | |
122 | Double_t fMotherMass; // nominal resonance mass | |
123 | AliRsnCutSet *fPairCuts; // cuts on the pair | |
61f275d1 | 124 | |
03d23846 | 125 | Int_t fOutputID; // index of output object in container list |
126 | TClonesArray fAxes; // definitions for the axes of each value | |
127 | TArrayD fComputed; //! temporary container for all computed values | |
128 | AliRsnMiniPair fPair; //! minipair for computations | |
129 | TList *fList; //! pointer to the TList containing the output | |
a2455d2a | 130 | TArrayI fSel1; //! list of selected particles for definition 1 |
131 | TArrayI fSel2; //! list of selected particles for definition 2 | |
088ca370 | 132 | Short_t fMaxNSisters; // maximum number of allowed mother's daughter |
133 | Bool_t fCheckP; // flag to set in order to check the momentum conservation for daughters | |
31dbef4e | 134 | Bool_t fCheckFeedDown; // flag to set in order to check the particle feed down (specific for D meson analysis) |
135 | UShort_t fOriginDselection; // flag to select D0 origins. 0 Only from charm 1 only from beauty 2 both from charm and beauty (specific for D meson analysis) | |
136 | Bool_t fKeepDfromB; // flag for the feed down from b quark decay (specific for D meson analysis) | |
137 | Bool_t fKeepDfromBOnly; // flag to keep only the charm particles that comes from beauty decays (specific for D meson analysis) | |
138 | Bool_t fRejectIfNoQuark; // flag to remove events not generated with PYTHIA | |
74d60285 | 139 | Bool_t fCheckHistRange; // check if values is in histogram range |
140 | ||
31dbef4e | 141 | ClassDef(AliRsnMiniOutput, 4) // AliRsnMiniOutput class |
03d23846 | 142 | }; |
143 | ||
144 | #endif |