AliPhysics  95775ff (95775ff)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAODForwardMult.h
Go to the documentation of this file.
1 //
2 // See implementation or Doxygen comments for more information
3 //
4 #ifndef ALIAODFORWARDMULT_H
5 #define ALIAODFORWARDMULT_H
6 
16 #include <TObject.h>
17 #include <TH2D.h>
18 class TBrowser;
19 class TH1I;
102 {
103 public:
109  enum ETriggerBits {
111  kInel = 0x0001,
113  kInelGt0 = 0x0002,
115  kNSD = 0x0004,
117  kEmpty = 0x0008,
119  kA = 0x0010,
121  kB = 0x0020,
123  kC = 0x0080,
125  kE = 0x0100,
127  kPileUp = 0x0200,
129  kMCNSD = 0x0400,
131  kOffline = 0x0800,
133  kNClusterGt0 = 0x1000,
135  kV0AND = 0x2000,
137  kSatellite = 0x4000,
139  kSPDOutlier = 0x8000,
141  kPileupSPD = 0x10000,
143  kPileupTrack = 0x20000,
145  kPileupBC = 0x40000,
147  kPileupBins = 0x80000,
149  kADOR = 0x100000,
151  kADAND = 0x200000,
153  kCentNoCalib = 0x4000000,
155  kInclusive = 0x8000000,
158  };
164  enum ETriggerBins {
184  };
190  enum EFlags {
192  kSecondary = (1 << 14),
194  kVertexBias = (1 << 15),
196  kAcceptance = (1 << 16),
198  kMergingEfficiency = (1 << 17),
200  kSum = (1 << 18),
202  kEmpirical = (1 << 19)
203  };
226  };
227 
243  virtual ~AliAODForwardMult() {} // Destructor
249  void Init(const TAxis& etaAxis);
259  const TH2D& GetHistogram() const { return fHist; } // Get histogram
265  TH2D& GetHistogram() { return fHist; } // Get histogram
271  Int_t GetEtaCoverageBin() const { return 0; }
277  Int_t GetPhiAcceptanceBin() const { return fHist.GetNbinsY()+1; }
283  TH1* GetEtaCoverage() const;
289  TH1* GetPhiAcceptance() const;
297  void FillEtaCoverage(TH1& h) const;
305  void FillPhiAcceptance(TH1& h) const;
306  /* @} */
316  void SetIpZ(Float_t ipZ) { fIpZ = ipZ; } // Set Ip's Z coordinate
322  Float_t GetIpZ() const { return fIpZ; } // Get Ip's Z coordinate
328  Bool_t HasIpZ() const;
339  Bool_t InRange(Float_t low, Float_t high) const;
340  /* @} */
351  void SetSNN(UShort_t sNN);
360  void SetSystem(UShort_t sys);
366  UShort_t GetSNN() const;
375  UShort_t GetSystem() const;
391  Float_t GetCentrality() const { return fCentrality; }
397  Bool_t HasCentrality() const { return !(fCentrality < 0); }
398  /* @} */
408  UShort_t GetNClusters() const { return fNClusters; }
415  /* @} */
425  UInt_t GetTriggerBits() const { return fTriggers; } // Get triggers
431  void SetTriggerMask(UInt_t trg) { fTriggers = trg; } // Set triggers
437  void SetTriggerBits(UInt_t bits) { fTriggers |= bits; } // Set trigger bits
451  static Bool_t IsTriggerBits(UInt_t bits, UInt_t trg);
462  Bool_t IsTriggerBits(UInt_t bits) const;
473  Bool_t IsTriggerOrBits(UInt_t bits) const;
479  Bool_t HasTrigger() const { return fTriggers != 0; } // Check for triggers
488  static const Char_t* GetTriggerString(UInt_t mask, const char* sep="&");
504  static UInt_t MakeTriggerMask(const char* what, const char* sep="&");
505  /* @} */
515  Bool_t IsInel() const { return (fTriggers & kInel); }
521  Bool_t IsInelGt0() const { return (fTriggers & kInelGt0); }
527  Bool_t IsNSD() const { return (fTriggers & kNSD); }
533  Bool_t IsEmpty() const { return (fTriggers & kEmpty); }
539  Bool_t IsBeamEmpty() const { return (fTriggers & kA); }
545  Bool_t IsBeamBeam() const { return (fTriggers & kB); }
551  Bool_t IsEmptyBeam() const { return (fTriggers & kC); }
557  Bool_t IsEmptyEmpty() const { return (fTriggers & kE); }
563  Bool_t IsPileUp() const { return (fTriggers & kPileUp); }
569  Bool_t IsMCNSD() const { return (fTriggers & kMCNSD); }
575  Bool_t IsOffline() const { return (fTriggers & kOffline); }
581  Bool_t IsNClusterGt0() const { return (fTriggers & kNClusterGt0); }
587  Bool_t IsV0AND() const { return (fTriggers & kV0AND); }
593  Bool_t IsSatellite() const { return (fTriggers & kSatellite); }
599  Bool_t IsSPDOutlier() const { return (fTriggers & kSPDOutlier); }
605  Bool_t IsPileupSPD() const { return (fTriggers & kPileupSPD); }
611  Bool_t IsPileupTrack() const { return (fTriggers & kPileupTrack); }
617  Bool_t IsPileupBC() const { return (fTriggers & kPileupBC); }
623  Bool_t IsPileupBins() const { return (fTriggers & kPileupBins); }
624  /* @} */
634  Bool_t IsSecondaryCorrected() const { return TestBit(kSecondary); }
640  Bool_t IsVertexBiasCorrected() const { return TestBit(kVertexBias); }
646  Bool_t IsAcceptanceCorrected() const { return TestBit(kAcceptance); }
653  return TestBit(kMergingEfficiency); }
659  Bool_t IsEmpiricalCorrected() const { return TestBit(kEmpirical); }
668  Bool_t IsSumSignal() const { return TestBit(kSum); }
669  /* @} */
679  const Char_t* GetName() const { return (fIsMC ? "ForwardMC" : "Forward"); }
685  void Clear(Option_t* option="");
691  void Browse(TBrowser* b);
697  Bool_t IsFolder() const { return kTRUE; } // Always true
698 
704  void Print(Option_t* option="") const;
705  /* @} */
710  /* @} */
745  Bool_t CheckEvent(UInt_t triggerMask=kInel,
746  Double_t vzMin=-10, Double_t vzMax=10,
747  Double_t cMin=0, Double_t cMax=100,
748  TH1* hist=0,
749  TH1* status=0,
750  UInt_t filterMask=kDefaultFilter) const;
758  static void FillTriggerHistogram(UInt_t triggerMask, UInt_t trg, TH1* hist);
771  Bool_t FilterEvent(Double_t vzMin, Double_t vzMax,
772  TH1* hist, TH1* status,
773  UInt_t filterMask) const;
786  static TH1I* MakeTriggerHistogram(const char* name="triggers",
787  UInt_t mask=0);
797  static TH1I* MakeStatusHistogram(const char* name="status");
798  /* @} */
799 protected:
801  Bool_t fIsMC; // Whether this is from MC
803  TH2D fHist; // Histogram of N_{ch}(eta,phi)
805  UInt_t fTriggers; // Trigger bit mask
807  Float_t fIpZ; // Z coordinate of the interaction point
809  Float_t fCentrality; // Event centrality
811  UShort_t fNClusters; // Number of SPD clusters in |eta|<1
813  static const Float_t fgkInvalidIpZ; // Invalid IpZ value
814  ClassDef(AliAODForwardMult,7); // AOD forward multiplicity
815 };
816 
817 //____________________________________________________________________
818 inline Bool_t
820 {
821  return HasIpZ() && fIpZ >= low && fIpZ < high;
822 }
823 
824 //____________________________________________________________________
825 inline Bool_t
827 {
828  return IsTriggerBits(bits, fTriggers);
829 }
830 //____________________________________________________________________
831 inline Bool_t
833 {
834  const UInt_t mask = ~kInclusive;
835  if (bits & kInclusive)
836  return trig > 0 && ((trig & mask & bits) != 0);
837  return trig > 0 && ((trig & mask & bits) == bits);
838 }
839 
840 //____________________________________________________________________
841 inline Bool_t
843 {
844  return HasTrigger() && ((fTriggers & bits) != 0);
845 }
846 
847 #endif
848 // Local Variables:
849 // mode: C++
850 // End:
851 
Bool_t IsSecondaryCorrected() const
void SetIpZ(Float_t ipZ)
UShort_t GetSystem() const
static UInt_t MakeTriggerMask(const char *what, const char *sep="&")
Bool_t HasCentrality() const
Bool_t IsVertexBiasCorrected() const
double Double_t
Definition: External.C:58
virtual ~AliAODForwardMult()
static void FillTriggerHistogram(UInt_t triggerMask, UInt_t trg, TH1 *hist)
void SetTriggerBits(UInt_t bits)
TH1 * GetPhiAcceptance() const
ClassDef(AliAODForwardMult, 7)
void SetNClusters(UShort_t n)
void SetSNN(UShort_t sNN)
void Clear(Option_t *option="")
Bool_t IsPileupSPD() const
char Char_t
Definition: External.C:18
void SetCentrality(Float_t c)
static TH1I * MakeTriggerHistogram(const char *name="triggers", UInt_t mask=0)
TCanvas * c
Definition: TestFitELoss.C:172
Bool_t IsFolder() const
Bool_t IsV0AND() const
Bool_t HasTrigger() const
void SetTriggerMask(UInt_t trg)
const Char_t * GetName() const
Float_t GetIpZ() const
Bool_t IsAcceptanceCorrected() const
Bool_t IsEmpiricalCorrected() const
UShort_t GetSNN() const
Bool_t IsSumSignal() const
Bool_t IsNSD() const
Bool_t IsNClusterGt0() const
Bool_t IsBeamEmpty() const
void FillPhiAcceptance(TH1 &h) const
Bool_t IsBeamBeam() const
int Int_t
Definition: External.C:63
void Init(const TAxis &etaAxis)
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
static Bool_t IsTriggerBits(UInt_t bits, UInt_t trg)
float Float_t
Definition: External.C:68
Bool_t IsEmptyBeam() const
Definition: External.C:228
TH1 * GetEtaCoverage() const
void SetSystem(UShort_t sys)
Bool_t HasIpZ() const
Bool_t FilterEvent(Double_t vzMin, Double_t vzMax, TH1 *hist, TH1 *status, UInt_t filterMask) const
void Print(Option_t *option="") const
Bool_t IsPileupBins() const
Bool_t IsMCNSD() const
static const Char_t * GetTriggerString(UInt_t mask, const char *sep="&")
Bool_t IsSatellite() const
Bool_t IsPileupTrack() const
Bool_t IsMergingEfficiencyCorrected() const
Bool_t IsTriggerOrBits(UInt_t bits) const
void Browse(TBrowser *b)
static TH1I * MakeStatusHistogram(const char *name="status")
Bool_t isMC
Bool_t InRange(Float_t low, Float_t high) const
Bool_t IsOffline() const
UInt_t GetTriggerBits() const
Bool_t IsEmpty() const
Int_t GetEtaCoverageBin() const
static const Float_t fgkInvalidIpZ
unsigned short UShort_t
Definition: External.C:28
Bool_t IsInelGt0() const
Float_t GetCentrality() const
UShort_t GetNClusters() const
Bool_t IsEmptyEmpty() const
const char Option_t
Definition: External.C:48
Bool_t IsPileupBC() const
bool Bool_t
Definition: External.C:53
Bool_t IsPileUp() const
void FillEtaCoverage(TH1 &h) const
Int_t GetPhiAcceptanceBin() const
Bool_t IsInel() const
Bool_t CheckEvent(UInt_t triggerMask=kInel, Double_t vzMin=-10, Double_t vzMax=10, Double_t cMin=0, Double_t cMax=100, TH1 *hist=0, TH1 *status=0, UInt_t filterMask=kDefaultFilter) const
Definition: External.C:196
const TH2D & GetHistogram() const
Bool_t IsSPDOutlier() const