AliPhysics  32e057f (32e057f)
AliFMDEventInspector.h
Go to the documentation of this file.
1 //
2 // This class inspects the event
3 //
4 #ifndef ALIFMDEVENTINSPECTOR_H
5 #define ALIFMDEVENTINSPECTOR_H
6 
16 #include <TNamed.h>
17 #include <TAxis.h>
18 #include <TList.h>
20 class AliESDEvent;
22 class TH2D;
23 class TH1D;
24 class TH1I;
25 class TH1F;
26 class TH2F;
27 class TH2I;
28 class TAxis;
29 class TVector3;
30 // class TList;
31 
51 {
52 public:
56  enum ECodes {
58  kOk = 0,
60  kNoEvent = 0x1,
62  kNoTriggers = 0x2,
64  kNoSPD = 0x4,
66  kNoFMD = 0x8,
68  kNoVertex = 0x10,
70  kBadVertex = 0x20
71  };
75  enum ETrgBins {
81  kA,
82  kB,
83  kC,
84  kE,
90  };
94  enum EVtxType {
100  };
104  enum EPileupType {
105  kSPD = 0x1,
106  kTracks = 0x2,
107  kOutOfBunch = 0x4,
108  kSPDBins = 0x8
109  };
113  enum ECentMethod {
129  };
130 
136  kPP,
138  };
139  enum EVtxStatus {
140  kVtxOK = 1,
146  };
147  enum ETrgStatus {
152  kMinBias, // CINT1
153  kMinBiasNoSPD, // CINT5
154  kV0AndTrg, // CINT7
155  kMinBiasAD, // CINT10
160  kADOr, //
161  kADAnd, //
164  };
168  static const char* fgkFolderName;
178  AliFMDEventInspector(const char* name);
182  virtual ~AliFMDEventInspector();
183 
189  virtual void SetupForData(const TAxis& vtxAxis);
206  UInt_t Process(const AliESDEvent* event,
207  UInt_t& triggers,
208  Bool_t& lowFlux,
209  UShort_t& ivz,
210  TVector3& ip,
211  Double_t& cent,
212  UShort_t& nClusters);
233  void SetMaxVzErr(Double_t c=0.1) { fMaxVzErr = c; }
247  SetVertexMethod(use ? kPWGUD : kNormal); }
254  void SetpA2012Vtx(Bool_t use) {
255  SetVertexMethod(use ? kpA2012 : kNormal); }
262  void SetUseV0AndForNSD(Bool_t use=true) {fUseV0AND = use; }
269  {
270  fMinPileupContrib = nContrib;
271  }
278  {
279  fMinPileupDistance = cm;
280  }
287  void SetUseDisplacedVertices(Bool_t use=true) {
288  SetVertexMethod(use ? kDisplaced : kNormal); }
297  void SetMinCentrality(Double_t mincent=-1.0);
305  void SetMaxCentrality(Double_t maxcent=-1.0);
326  void SetCentralityMethod(const TString& m) { fCentMethod = m; }
341  void SetPileupFlags(UShort_t flags=0x5) { fPileupFlags = flags; }
347  void SetDebug(Int_t dbg=1) { fDebug = dbg; }
356  void SetMC(Bool_t isMC=true) { fMC = isMC; }
357  Bool_t IsMC() const { return fMC; }
369  Bool_t FetchHistograms(const TList* d,
370  TH1I*& hEventsTr,
371  TH1I*& hEventsTrVtx,
372  TH1I*& hEventsAcc,
373  TH1I*& hTriggers) const;
382  Bool_t ReadRunDetails(const AliESDEvent* esd);
394  UShort_t GetEnergy() const { return fEnergy; }
400  Short_t GetField() const { return fField; }
406  ULong_t GetRunNumber() const { return fRunNumber; }
415  Short_t GetProductionYear() const { return fProdYear; }
438  Bool_t IsProductionMC() const { return fProdMC; }
439 
445  void Print(Option_t* option="") const;
446  // getter for fmincentrality
447  // Double_t GetMinCentrality() const { return fMinCent;}
448  // gettter for fmaxcentrality
449  // Double_t GetMaxCentrality() const { return fMaxCent;}
463  virtual void StoreInformation();
468  virtual void StoreProduction();
476  static const char* CodeString(UInt_t mask);
477 protected:
484  : TNamed(o),
485  fHEventsTr(0),
486  fHEventsTrVtx(0),
487  fHEventsAccepted(0),
489  fHTriggers(0),
490  fHType(0),
491  fHWords(0),
492  fHCent(0),
493  fHCentVsQual(0),
494  fHStatus(0),
495  fHVtxStatus(0),
496  fHTrgStatus(0),
497  fHPileup(0),
498  fLowFluxCut(1000),
499  fMaxVzErr(0.2),
500  fList(0),
501  fEnergy(0),
502  fField(999),
504  fDebug(0),
505  fCentAxis(0),
506  fVtxAxis(10,-10,10),
508  // fUseFirstPhysicsVertex(false),
509  fUseV0AND(false),
511  fMinPileupContrib(3),
512  fMinPileupDistance(0.8),
513  // fUseDisplacedVertices(false),
515  fCollWords(),
516  fBgWords(),
517  fCentMethod("default"),
518  fMinCent(-1.0),
519  fMaxCent(-1.0),
520  // fUsepA2012Vertex(false),
521  fRunNumber(0),
522  fMC(false),
523  fProdYear(-1),
524  fProdLetter('?'),
525  fProdPass(-1),
526  fProdSVN(-1),
527  fProdMC(false)
528  {}
544  const TList* classes,
555  Bool_t ReadTriggers(const AliESDEvent& esd, UInt_t& triggers,
556  UShort_t& nClusters);
564  Bool_t CheckpAExtraV0(const AliESDEvent& esd) const;
574  virtual Bool_t CheckFastPartition(bool fastonly) const;
584  virtual Bool_t CheckINELGT0(const AliESDEvent& esd, UShort_t& nClusters,
585  UInt_t& triggers) const;
594  virtual Bool_t CheckPileup(const AliESDEvent& esd, UInt_t& triggers) const;
603  virtual Bool_t CheckMultiVertex(const AliESDEvent& esd,
604  Bool_t checkOtherBC=false) const;
612  virtual Bool_t CheckCosmics(const TString& trigStri) const;
621  virtual Bool_t CheckEmpty(const TString& trigStr, UInt_t& triggers) const;
630  virtual Bool_t CheckWords(const AliESDEvent& esd, UInt_t& triggers) const;
639  Bool_t ReadVertex(const AliESDEvent& esd, TVector3& ip);
653  virtual EVtxStatus CheckPWGUDVertex(const AliESDEvent& esd,
654  TVector3& ip) const;
667  virtual EVtxStatus CheckpA2012Vertex(const AliESDEvent& esd,
668  TVector3& ip) const;
684  virtual EVtxStatus CheckpA2013Vertex(const AliESDEvent& esd,
685  TVector3& ip) const;
695  virtual EVtxStatus CheckVertex(const AliESDEvent& esd, TVector3& ip) const;
705  virtual Bool_t ReadCentrality(const AliESDEvent& esd, Double_t& cent,
706  UShort_t& qual) const;
707 
715  TH1F* fHCent;
721  Int_t fLowFluxCut; // Low flux cut
722  Double_t fMaxVzErr; // Maximum error on v_z
724  UShort_t fEnergy; // CMS energy (per nucleon pair) [GeV]
725  Short_t fField; // L3 magnetic field [kG]
726  UShort_t fCollisionSystem; // Collision system
727  Int_t fDebug; // Debug level
728  TAxis* fCentAxis; // Centrality axis used in histograms
729  TAxis fVtxAxis; // IP_z Axis
730  EVtxType fVtxMethod; // Vertex method to use
731  // Bool_t fUseFirstPhysicsVertex;//Use the vtx code from p+p first physics
732  Bool_t fUseV0AND; // Use the vtx code from p+p first physics
733  UShort_t fPileupFlags; // Which pileups to use
734  UShort_t fMinPileupContrib; // Min contributors to 2nd pile-up IP
735  Double_t fMinPileupDistance; // Min distance of 2nd pile-up IP
736  // Bool_t fUseDisplacedVertices; // Analyze displaced vertices?
737  AliDisplacedVertexSelection fDisplacedVertex; //Displaced vertex selector
740  TString fCentMethod; // Centrality method
741  Double_t fMinCent; // min centrality
742  Double_t fMaxCent; // max centrailty
743  // Bool_t fUsepA2012Vertex; // flag to use pA2012 Veretx selection
744  ULong_t fRunNumber; // Current run number
745  Bool_t fMC; // Is this MC input
746  Short_t fProdYear; // Production year
747  Char_t fProdLetter; // Production letter
748  Short_t fProdPass; // Pass number
749  Int_t fProdSVN; // AliROOT revision used in production
750  Bool_t fProdMC; // True if anchor production
751 
752  ClassDef(AliFMDEventInspector,16); // Inspect the event
753 };
754 
755 #endif
756 // Local Variables:
757 // mode: C++
758 // End:
759 
760 
761 
Short_t GetProductionRevision() const
double Double_t
Definition: External.C:58
UShort_t fEnergy
Histogram container.
void SetpA2012Vtx(Bool_t use)
void SetUseV0AndForNSD(Bool_t use=true)
virtual EVtxStatus CheckVertex(const AliESDEvent &esd, TVector3 &ip) const
Definition: External.C:236
virtual Bool_t CheckPileup(const AliESDEvent &esd, UInt_t &triggers) const
TH1I * fHEventsTrVtx
Histogram of events w/trigger.
Bool_t IsUseDisplacedVertices() const
Bool_t IsProductionMC() const
Int_t fLowFluxCut
Pile-up status.
char Char_t
Definition: External.C:18
virtual Bool_t CheckCosmics(const TString &trigStri) const
TH1I * fHTriggers
XY vtx with trigger and Z vertex in range.
void SetMinPileupContributors(UShort_t nContrib=3)
TCanvas * c
Definition: TestFitELoss.C:172
void SetMaxCentrality(Double_t maxcent=-1.0)
AliFMDEventInspector & operator=(const AliFMDEventInspector &)
TH1I * fHPileup
Trigger processing status.
TH2D * fHEventsAcceptedXY
Events w/trigger and vertex in range.
void SetUseFirstPhysicsVtx(Bool_t use)
Bool_t ReadRunDetails(const AliESDEvent *esd)
void CacheConfiguredTriggerClasses(TList &cache, const TList *classes, AliOADBPhysicsSelection *o)
Bool_t FetchHistograms(const TList *d, TH1I *&hEventsTr, TH1I *&hEventsTrVtx, TH1I *&hEventsAcc, TH1I *&hTriggers) const
virtual Bool_t CheckFastPartition(bool fastonly) const
Short_t GetProductionYear() const
AliFMDEventInspector(const AliFMDEventInspector &o)
TH1I * fHVtxStatus
Event processing status.
void SetMaxVzErr(Double_t c=0.1)
UInt_t Process(const AliESDEvent *event, UInt_t &triggers, Bool_t &lowFlux, UShort_t &ivz, TVector3 &ip, Double_t &cent, UShort_t &nClusters)
void SetUseDisplacedVertices(Bool_t use=true)
int Int_t
Definition: External.C:63
Definition: External.C:204
UShort_t GetCollisionSystem() const
unsigned int UInt_t
Definition: External.C:33
static const char * fgkFolderName
virtual EVtxStatus CheckpA2012Vertex(const AliESDEvent &esd, TVector3 &ip) const
void SetVertexMethod(EVtxType t)
void SetCentralityMethod(const TString &m)
TList fBgWords
Configured collision words.
Definition: External.C:228
Definition: External.C:212
void SetPileupFlags(UShort_t flags=0x5)
Bool_t ReadVertex(const AliESDEvent &esd, TVector3 &ip)
virtual EVtxStatus CheckpA2013Vertex(const AliESDEvent &esd, TVector3 &ip) const
void SetMC(Bool_t isMC=true)
unsigned long ULong_t
Definition: External.C:38
virtual Bool_t ReadCentrality(const AliESDEvent &esd, Double_t &cent, UShort_t &qual) const
TH1I * fHEventsAccepted
Events w/trigger and vertex.
void CreateOutputObjects(TList *dir)
virtual Bool_t CheckINELGT0(const AliESDEvent &esd, UShort_t &nClusters, UInt_t &triggers) const
TH1I * fHStatus
Centrality vs quality.
short Short_t
Definition: External.C:23
Selection of events from satellite interactions.
TString fCentMethod
Configured background words.
void SetMinPileupDistance(Double_t cm=0.8)
void SetMinCentrality(Double_t mincent=-1.0)
Bool_t isMC
AliDisplacedVertexSelection fDisplacedVertex
TH1I * fHTrgStatus
Vertex processing status.
ULong_t GetRunNumber() const
TH1I * fHWords
Type (low/high flux) of event.
virtual Bool_t CheckWords(const AliESDEvent &esd, UInt_t &triggers) const
void Print(Option_t *option="") const
Char_t GetProductionPeriod() const
UShort_t GetEnergy() const
unsigned short UShort_t
Definition: External.C:28
virtual Bool_t CheckMultiVertex(const AliESDEvent &esd, Bool_t checkOtherBC=false) const
const char Option_t
Definition: External.C:48
TH1F * fHCent
Trigger words.
bool Bool_t
Definition: External.C:53
TH2F * fHCentVsQual
Centrality.
static const char * CodeString(UInt_t mask)
Bool_t AllowDisplaced() const
Bool_t ReadTriggers(const AliESDEvent &esd, UInt_t &triggers, UShort_t &nClusters)
void SetDebug(Int_t dbg=1)
virtual Bool_t CheckEmpty(const TString &trigStr, UInt_t &triggers) const
Bool_t CheckpAExtraV0(const AliESDEvent &esd) const
TDirectoryFile * dir
virtual void SetupForData(const TAxis &vtxAxis)
virtual EVtxStatus CheckPWGUDVertex(const AliESDEvent &esd, TVector3 &ip) const