]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliDisplacedVertexSelection.h
Updates
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliDisplacedVertexSelection.h
1 /**
2  * @file   AliDisplacedVertexSelection.h
3  * @author Christian Holm Christensen <cholm@master.hehi.nbi.dk>
4  * @date   Thu Feb  7 00:53:03 2013
5  * 
6  * @brief  Selection of events from satellite interactions 
7  * 
8  * @ingroup pwglf_forward_aod
9  * 
10  */
11 #ifndef ALIDISPLACEDVERTEXSELECTION_H
12 #define ALIDISPLACEDVERTEXSELECTION_H
13 #include <TObject.h>
14 class AliESDEvent;
15 class AliMCEvent;
16 class TH1D;
17 class TH2D;
18 class TList;
19
20 /** 
21  * Selection of events from satellite interactions 
22  *
23  * @ingroup pwglf_forward_aod
24  */
25 class AliDisplacedVertexSelection : public TObject 
26 {
27 public:
28   /** 
29    * Constructor 
30    */
31   AliDisplacedVertexSelection();
32   /** 
33    * Copy constructor 
34    * 
35    * @param o Object to copy from 
36    */
37   AliDisplacedVertexSelection(const AliDisplacedVertexSelection& o);
38   /** 
39    * Assingment operator 
40    * 
41    * @param o Object to assign from 
42    * 
43    * @return Reference to this object 
44    */
45   AliDisplacedVertexSelection& operator=(const AliDisplacedVertexSelection& o);
46   /** 
47    * Define the output 
48    * 
49    * @param l     List to add output to
50    * @param name  Name of the list 
51    * @param mc    True if we're looking at MC data
52    */
53   void SetupForData(TList* l, const char* name=0, Bool_t mc=false);
54   /** 
55    * Print information 
56    * 
57    * @param option  Not used 
58    */
59   void Print(Option_t* option="") const;
60   /** 
61    * Process an ESD event to get the information 
62    * 
63    * @param esd ESD event 
64    * 
65    * @return true on success
66    */
67   Bool_t Process(const AliESDEvent* esd);
68   /** 
69    * Process an MC event to find true satellite vertex
70    * 
71    * @param mcevent MC event
72    * 
73    * @return true if found or not MC input, false in case of problems
74    */
75   Bool_t ProcessMC(const AliMCEvent* mcevent);
76   /**
77    * Check if this event is marked as a satellite interaction 
78    *
79    * @return true if the found vertex isn't invalid
80    */
81   Bool_t IsSatellite() const { return fVertexZ != kInvalidVtxZ; }
82   /** 
83    * Get the interaction point Z-coordinate from ZDC timing. 
84    * 
85    * 
86    * @return Interaction point Z-coordinate
87    */
88   Double_t GetVertexZ() const { return fVertexZ; }
89   /** 
90    * Return the centrality percentile 
91    * 
92    * 
93    * @return Centrality percentile (ZDC vs ZEM)
94    */
95   Double_t GetCentralityPercentile() const { return fCent; }
96 protected:
97   Bool_t CheckOutlier(Int_t ivtx, const AliESDEvent* esd) const;
98   Float_t GetZemCorr(Int_t k, Bool_t minusminus) const;
99   
100   enum { 
101     kMaxK        = 10,
102     kInvalidVtxZ = 9999
103   };
104   TH1D*     fDeltaTdc;
105   TH1D*     fSumTdc;
106   TH1D*     fZdcEnergy;
107   TH1D*     fZemEnergy;
108   TH2D*     fCorrelationZemZdc;
109   TH2D*     fCorrelationSumDelta;  
110   Double_t  fVertexZ;  // Interaction point Z-coordinate
111   Double_t  fCent;     // Centrality percentile
112   TH1D*     fHVertexZ; // Histogram of vertices 
113   TH1D*     fHCent;    // Histogram of centrality 
114   Bool_t    fMC; // MC flag
115   
116   ClassDef(AliDisplacedVertexSelection,4); // Satelitte collisions 
117 };
118
119 #endif
120 // Local Variables: 
121 //  mode: C++
122 // End: