AliPhysics  6cf2591 (6cf2591)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAODForwardHeader.h
Go to the documentation of this file.
1 //
2 // See implementation or Doxygen comments for more information
3 //
4 #ifndef ALIAODFORWARDHEADER_H
5 #define ALIAODFORWARDHEADER_H
6 
15 #include <TObject.h>
16 class TBrowser;
17 
19 {
20 public:
24  enum {
26  kInel = 0x0001,
28  kInelGt0 = 0x0002,
30  kNSD = 0x0004,
32  kEmpty = 0x0008,
34  kA = 0x0010,
36  kB = 0x0020,
38  kC = 0x0080,
40  kE = 0x0100,
42  kPileUp = 0x0200,
44  kMCNSD = 0x0400,
46  kOffline = 0x0800,
48  kNClusterGt0 = 0x1000,
50  kV0AND = 0x2000,
52  kSatellite = 0x4000
53  };
57  enum {
75  };
79  enum ECheckStatus {
81  kGoodEvent = 0,
92  };
98  {}
99 
109  void Clear(Option_t* option="");
115  void SetTriggerMask(UInt_t trg) { fTriggers = trg; } // Set triggers
121  void SetTriggerBits(UInt_t bits) { fTriggers |= bits; } // Set trigger bits
127  void SetIpZ(Float_t ipZ) { fIpZ = ipZ; } // Set Ip's Z coordinate
140  /* @} */
141 
142 
157  Bool_t IsTriggerBits(UInt_t bits) const;
168  Bool_t IsTriggerOrBits(UInt_t bits) const;
174  Bool_t HasTrigger() const { return fTriggers != 0; } // Check for triggers
180  Bool_t HasIpZ() const;
191  Bool_t InRange(Float_t low, Float_t high) const;
197  Bool_t HasCentrality() const { return !(fCentrality < 0); }
226  Bool_t CheckEvent(Int_t triggerMask=kInel,
227  Double_t vzMin=-10, Double_t vzMax=10,
228  UShort_t cMin=0, UShort_t cMax=100,
229  TH1* hist=0,
230  TH1* status=0) const;
231  /* @} */
232 
242  UInt_t GetTriggerBits() const { return fTriggers; } // Get triggers
248  Float_t GetIpZ() const { return fIpZ; } // Get Ip's Z coordinate
254  Float_t GetCentrality() const { return fCentrality; }
260  UShort_t GetNClusters() const { return fNClusters; }
261  /* @} */
262 
272  void Print(Option_t* option="") const;
278  const Char_t* GetName() const { return "ForwardHeader"; }
284  void Browse(TBrowser* b);
290  Bool_t IsFolder() const { return kTRUE; } // Always true
291  /* @} */
303  static const Char_t* GetTriggerString(UInt_t mask);
316  static TH1I* MakeTriggerHistogram(const char* name="triggers",
317  Int_t mask=0);
327  static TH1I* MakeStatusHistogram(const char* name="status");
342  static UInt_t MakeTriggerMask(const char* what);
343  /* @} */
344 protected:
346  UInt_t fTriggers; // Trigger bit mask
348  Float_t fIpZ; // Z coordinate of the interaction point
350  Float_t fCentrality; // Event centrality
352  UShort_t fNClusters; // Number of SPD clusters in |eta|<1
354  static const Float_t fgkInvalidIpZ; // Invalid IpZ value
355  ClassDef(AliAODForwardHeader,1); // AOD forward header
356 };
357 
358 //____________________________________________________________________
359 inline Bool_t
361 {
362  return HasIpZ() && fIpZ >= low && fIpZ < high;
363 }
364 
365 //____________________________________________________________________
366 inline Bool_t
368 {
369  return HasTrigger() && ((fTriggers & bits) == bits);
370 }
371 //____________________________________________________________________
372 inline Bool_t
374 {
375  return HasTrigger() && ((fTriggers & bits) != 0);
376 }
377 
378 
379 #endif
380 // Local Variables:
381 // mode: C++
382 // End:
383 
double Double_t
Definition: External.C:58
Bool_t IsFolder() const
Bool_t HasCentrality() const
UInt_t GetTriggerBits() const
void Clear(Option_t *option="")
char Char_t
Definition: External.C:18
static const Char_t * GetTriggerString(UInt_t mask)
TCanvas * c
Definition: TestFitELoss.C:172
void SetCentrality(Float_t c)
UShort_t GetNClusters() const
void Browse(TBrowser *b)
Float_t GetCentrality() const
Bool_t HasTrigger() const
static const Float_t fgkInvalidIpZ
void SetIpZ(Float_t ipZ)
int Int_t
Definition: External.C:63
Float_t GetIpZ() const
Bool_t IsTriggerOrBits(UInt_t bits) const
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
Bool_t InRange(Float_t low, Float_t high) const
void Print(Option_t *option="") const
const Char_t * GetName() const
ClassDef(AliAODForwardHeader, 1)
void SetTriggerBits(UInt_t bits)
Bool_t IsTriggerBits(UInt_t bits) const
static UInt_t MakeTriggerMask(const char *what)
static TH1I * MakeTriggerHistogram(const char *name="triggers", Int_t mask=0)
static TH1I * MakeStatusHistogram(const char *name="status")
unsigned short UShort_t
Definition: External.C:28
const char Option_t
Definition: External.C:48
void SetTriggerMask(UInt_t trg)
void SetNClusters(UShort_t n)
bool Bool_t
Definition: External.C:53
Bool_t CheckEvent(Int_t triggerMask=kInel, Double_t vzMin=-10, Double_t vzMax=10, UShort_t cMin=0, UShort_t cMax=100, TH1 *hist=0, TH1 *status=0) const
Definition: External.C:196