]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnMiniOutput.h
Added cut set for kstar analysis (fbellini)
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnMiniOutput.h
CommitLineData
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
13#include "AliRsnDaughter.h"
14#include "AliRsnMiniParticle.h"
15
16class THnSparse;
17class TList;
18class TH1;
19
20class TList;
21class TClonesArray;
22class AliRsnMiniAxis;
23class AliRsnMiniPair;
24class AliRsnMiniEvent;
25
26typedef AliRsnDaughter::ESpecies RSNPID;
27
28class AliRsnMiniOutput : public TNamed {
29public:
30
31 enum EOutputType {
32 kHistogram,
33 kHistogramSparse,
34 kTypes
35 };
61f275d1 36
03d23846 37 enum EComputation {
38 kEventOnly,
39 kTrackPair,
40 kTrackPairMix,
6aaeb33c 41 kTrackPairRotated1,
42 kTrackPairRotated2,
03d23846 43 kTruePair,
44 kMother,
45 kComputations
46 };
61f275d1 47
03d23846 48 AliRsnMiniOutput();
49 AliRsnMiniOutput(const char *name, EOutputType type, EComputation src = kTrackPair);
50 AliRsnMiniOutput(const char *name, const char *outType, const char *compType);
51 AliRsnMiniOutput(const AliRsnMiniOutput &copy);
61f275d1 52 AliRsnMiniOutput &operator=(const AliRsnMiniOutput &copy);
53
03d23846 54 Bool_t IsEventOnly() const {return (fComputation == kEventOnly);}
55 Bool_t IsTrackPair() const {return (fComputation == kTrackPair);}
56 Bool_t IsTrackPairMix() const {return (fComputation == kTrackPairMix);}
57 Bool_t IsTruePair() const {return (fComputation == kTruePair);}
58 Bool_t IsMother() const {return (fComputation == kMother);}
59 Bool_t IsDefined() const {return (IsEventOnly() || IsTrackPair() || IsTrackPairMix() || IsTruePair() || IsMother());}
d573d2fb 60 Bool_t IsLikeSign() const {return (fCharge[0] == fCharge[1]);}
61 Bool_t IsSameCut() const {return (fCutID[0] == fCutID[1]);}
9e7b94f5 62 Bool_t IsSameDaughter() const {return (fDaughter[0] == fDaughter[1]);}
63 //Bool_t IsSymmetric() const {return (IsLikeSign() && IsSameCut());}
64 Bool_t IsSymmetric() const {return (IsLikeSign() && IsSameDaughter());}
61f275d1 65
03d23846 66 EOutputType GetOutputType() const {return fOutputType;}
67 EComputation GetComputation() const {return fComputation;}
68 Int_t GetCutID(Int_t i) const {if (i <= 0) return fCutID [0]; else return fCutID [1];}
69 RSNPID GetDaughter(Int_t i) const {if (i <= 0) return fDaughter[0]; else return fDaughter[1];}
70 Double_t GetMass(Int_t i) const {return AliRsnDaughter::SpeciesMass(GetDaughter(i));}
71 Int_t GetPDG(Int_t i) const {return AliRsnDaughter::SpeciesPDG(GetDaughter(i));}
72 Int_t GetCharge(Int_t i) const {if (i <= 0) return fCharge[0]; else return fCharge[1];}
73 Int_t GetMotherPDG() const {return fMotherPDG;}
74 Double_t GetMotherMass() const {return fMotherMass;}
74d60285 75 Bool_t GetFillHistogramOnlyInRange() { return fCheckHistRange; }
61f275d1 76
03d23846 77 void SetOutputType(EOutputType type) {fOutputType = type;}
78 void SetComputation(EComputation src) {fComputation = src;}
79 void SetCutID(Int_t i, Int_t value) {if (i <= 0) fCutID [0] = value; else fCutID [1] = value;}
80 void SetDaughter(Int_t i, RSNPID value) {if (i <= 0) fDaughter[0] = value; else fDaughter[1] = value;}
81 void SetCharge(Int_t i, Char_t value) {if (i <= 0) fCharge[0] = value; else fCharge[1] = value;}
82 void SetMotherPDG(Int_t pdg) {fMotherPDG = pdg;}
83 void SetMotherMass(Double_t mass) {fMotherMass = mass;}
84 void SetPairCuts(AliRsnCutSet *set) {fPairCuts = set;}
74d60285 85 void SetFillHistogramOnlyInRange(Bool_t fillInRangeOnly) { fCheckHistRange = fillInRangeOnly; }
61f275d1 86
03d23846 87 void AddAxis(Int_t id, Int_t nbins, Double_t min, Double_t max);
88 void AddAxis(Int_t id, Double_t min, Double_t max, Double_t step);
89 void AddAxis(Int_t id, Int_t nbins, Double_t *values);
61f275d1 90 AliRsnMiniAxis *GetAxis(Int_t i) {if (i >= 0 && i < fAxes.GetEntries()) return (AliRsnMiniAxis *)fAxes[i]; return 0x0;}
91 Double_t *GetAllComputed() {return fComputed.GetArray();}
92
93 AliRsnMiniPair &Pair() {return fPair;}
03d23846 94 Bool_t Init(const char *prefix, TList *list);
45aa62b9 95 Bool_t FillMother(const AliRsnMiniPair *pair, AliRsnMiniEvent *event, TClonesArray *valueList);
96 Bool_t FillEvent(AliRsnMiniEvent *event, TClonesArray *valueList);
d573d2fb 97 Int_t FillPair(AliRsnMiniEvent *event1, AliRsnMiniEvent *event2, TClonesArray *valueList, Bool_t refFirst = kTRUE);
61f275d1 98
03d23846 99private:
100
101 void CreateHistogram(const char *name);
102 void CreateHistogramSparse(const char *name);
45aa62b9 103 void ComputeValues(AliRsnMiniEvent *event, TClonesArray *valueList);
104 void FillHistogram();
03d23846 105
106 EOutputType fOutputType; // type of output
107 EComputation fComputation; // type of computation
108 Int_t fCutID[2]; // ID of cut set used to select tracks
109 RSNPID fDaughter[2]; // species of daughters
110 Char_t fCharge[2]; // required track charge
111 Int_t fMotherPDG; // PDG code of resonance
112 Double_t fMotherMass; // nominal resonance mass
113 AliRsnCutSet *fPairCuts; // cuts on the pair
61f275d1 114
03d23846 115 Int_t fOutputID; // index of output object in container list
116 TClonesArray fAxes; // definitions for the axes of each value
117 TArrayD fComputed; //! temporary container for all computed values
118 AliRsnMiniPair fPair; //! minipair for computations
119 TList *fList; //! pointer to the TList containing the output
a2455d2a 120 TArrayI fSel1; //! list of selected particles for definition 1
121 TArrayI fSel2; //! list of selected particles for definition 2
61f275d1 122
74d60285 123 Bool_t fCheckHistRange; // check if values is in histogram range
124
125 ClassDef(AliRsnMiniOutput,2) // AliRsnMiniOutput class
03d23846 126};
127
128#endif