ROOT logo
/**
 * @file   AliDisplacedVertexSelection.h
 * @author Christian Holm Christensen <cholm@master.hehi.nbi.dk>
 * @date   Thu Feb  7 00:53:03 2013
 * 
 * @brief  Selection of events from satellite interactions 
 * 
 * @ingroup pwglf_forward_aod
 * 
 */
#ifndef ALIDISPLACEDVERTEXSELECTION_H
#define ALIDISPLACEDVERTEXSELECTION_H
#include <TObject.h>
class AliESDEvent;
class AliMCEvent;
class TH1D;
class TH2D;
class TList;

/** 
 * Selection of events from satellite interactions 
 *
 * @ingroup pwglf_forward_aod
 */
class AliDisplacedVertexSelection : public TObject 
{
public:
  /** 
   * Constructor 
   */
  AliDisplacedVertexSelection();
  /** 
   * Copy constructor 
   * 
   * @param o Object to copy from 
   */
  AliDisplacedVertexSelection(const AliDisplacedVertexSelection& o);
  /** 
   * Assingment operator 
   * 
   * @param o Object to assign from 
   * 
   * @return Reference to this object 
   */
  AliDisplacedVertexSelection& operator=(const AliDisplacedVertexSelection& o);
  /** 
   * Define the output 
   * 
   * @param l     List to add output to
   * @param name  Name of the list 
   * @param mc    True if we're looking at MC data
   */
  void SetupForData(TList* l, const char* name=0, Bool_t mc=false);
  /** 
   * Print information 
   * 
   * @param option  Not used 
   */
  void Print(Option_t* option="") const;
  /** 
   * Process an ESD event to get the information 
   * 
   * @param esd ESD event 
   * 
   * @return true on success
   */
  Bool_t Process(const AliESDEvent* esd);
  /** 
   * Process an MC event to find true satellite vertex
   * 
   * @param mcevent MC event
   * 
   * @return true if found or not MC input, false in case of problems
   */
  Bool_t ProcessMC(const AliMCEvent* mcevent);
  /**
   * Check if this event is marked as a satellite interaction 
   *
   * @return true if the found vertex isn't invalid
   */
  Bool_t IsSatellite() const { return fVertexZ != kInvalidVtxZ; }
  /** 
   * Get the interaction point Z-coordinate from ZDC timing. 
   * 
   * 
   * @return Interaction point Z-coordinate
   */
  Double_t GetVertexZ() const { return fVertexZ; }
  /** 
   * Return the centrality percentile 
   * 
   * 
   * @return Centrality percentile (ZDC vs ZEM)
   */
  Double_t GetCentralityPercentile() const { return fCent; }
protected:
  Bool_t CheckOutlier(Int_t ivtx, const AliESDEvent* esd) const;
  Float_t GetZemCorr(Int_t k, Bool_t minusminus) const;
  
  enum { 
    kMaxK        = 10,
    kInvalidVtxZ = 9999
  };
  TH1D*     fDeltaTdc;
  TH1D*     fSumTdc;
  TH1D*     fZdcEnergy;
  TH1D*     fZemEnergy;
  TH2D*     fCorrelationZemZdc;
  TH2D*     fCorrelationSumDelta;  
  Double_t  fVertexZ;  // Interaction point Z-coordinate
  Double_t  fCent;     // Centrality percentile
  TH1D*     fHVertexZ; // Histogram of vertices 
  TH1D*     fHCent;    // Histogram of centrality 
  Bool_t    fMC; // MC flag
  
  ClassDef(AliDisplacedVertexSelection,4); // Satelitte collisions 
};

#endif
// Local Variables: 
//  mode: C++
// End:
 AliDisplacedVertexSelection.h:1
 AliDisplacedVertexSelection.h:2
 AliDisplacedVertexSelection.h:3
 AliDisplacedVertexSelection.h:4
 AliDisplacedVertexSelection.h:5
 AliDisplacedVertexSelection.h:6
 AliDisplacedVertexSelection.h:7
 AliDisplacedVertexSelection.h:8
 AliDisplacedVertexSelection.h:9
 AliDisplacedVertexSelection.h:10
 AliDisplacedVertexSelection.h:11
 AliDisplacedVertexSelection.h:12
 AliDisplacedVertexSelection.h:13
 AliDisplacedVertexSelection.h:14
 AliDisplacedVertexSelection.h:15
 AliDisplacedVertexSelection.h:16
 AliDisplacedVertexSelection.h:17
 AliDisplacedVertexSelection.h:18
 AliDisplacedVertexSelection.h:19
 AliDisplacedVertexSelection.h:20
 AliDisplacedVertexSelection.h:21
 AliDisplacedVertexSelection.h:22
 AliDisplacedVertexSelection.h:23
 AliDisplacedVertexSelection.h:24
 AliDisplacedVertexSelection.h:25
 AliDisplacedVertexSelection.h:26
 AliDisplacedVertexSelection.h:27
 AliDisplacedVertexSelection.h:28
 AliDisplacedVertexSelection.h:29
 AliDisplacedVertexSelection.h:30
 AliDisplacedVertexSelection.h:31
 AliDisplacedVertexSelection.h:32
 AliDisplacedVertexSelection.h:33
 AliDisplacedVertexSelection.h:34
 AliDisplacedVertexSelection.h:35
 AliDisplacedVertexSelection.h:36
 AliDisplacedVertexSelection.h:37
 AliDisplacedVertexSelection.h:38
 AliDisplacedVertexSelection.h:39
 AliDisplacedVertexSelection.h:40
 AliDisplacedVertexSelection.h:41
 AliDisplacedVertexSelection.h:42
 AliDisplacedVertexSelection.h:43
 AliDisplacedVertexSelection.h:44
 AliDisplacedVertexSelection.h:45
 AliDisplacedVertexSelection.h:46
 AliDisplacedVertexSelection.h:47
 AliDisplacedVertexSelection.h:48
 AliDisplacedVertexSelection.h:49
 AliDisplacedVertexSelection.h:50
 AliDisplacedVertexSelection.h:51
 AliDisplacedVertexSelection.h:52
 AliDisplacedVertexSelection.h:53
 AliDisplacedVertexSelection.h:54
 AliDisplacedVertexSelection.h:55
 AliDisplacedVertexSelection.h:56
 AliDisplacedVertexSelection.h:57
 AliDisplacedVertexSelection.h:58
 AliDisplacedVertexSelection.h:59
 AliDisplacedVertexSelection.h:60
 AliDisplacedVertexSelection.h:61
 AliDisplacedVertexSelection.h:62
 AliDisplacedVertexSelection.h:63
 AliDisplacedVertexSelection.h:64
 AliDisplacedVertexSelection.h:65
 AliDisplacedVertexSelection.h:66
 AliDisplacedVertexSelection.h:67
 AliDisplacedVertexSelection.h:68
 AliDisplacedVertexSelection.h:69
 AliDisplacedVertexSelection.h:70
 AliDisplacedVertexSelection.h:71
 AliDisplacedVertexSelection.h:72
 AliDisplacedVertexSelection.h:73
 AliDisplacedVertexSelection.h:74
 AliDisplacedVertexSelection.h:75
 AliDisplacedVertexSelection.h:76
 AliDisplacedVertexSelection.h:77
 AliDisplacedVertexSelection.h:78
 AliDisplacedVertexSelection.h:79
 AliDisplacedVertexSelection.h:80
 AliDisplacedVertexSelection.h:81
 AliDisplacedVertexSelection.h:82
 AliDisplacedVertexSelection.h:83
 AliDisplacedVertexSelection.h:84
 AliDisplacedVertexSelection.h:85
 AliDisplacedVertexSelection.h:86
 AliDisplacedVertexSelection.h:87
 AliDisplacedVertexSelection.h:88
 AliDisplacedVertexSelection.h:89
 AliDisplacedVertexSelection.h:90
 AliDisplacedVertexSelection.h:91
 AliDisplacedVertexSelection.h:92
 AliDisplacedVertexSelection.h:93
 AliDisplacedVertexSelection.h:94
 AliDisplacedVertexSelection.h:95
 AliDisplacedVertexSelection.h:96
 AliDisplacedVertexSelection.h:97
 AliDisplacedVertexSelection.h:98
 AliDisplacedVertexSelection.h:99
 AliDisplacedVertexSelection.h:100
 AliDisplacedVertexSelection.h:101
 AliDisplacedVertexSelection.h:102
 AliDisplacedVertexSelection.h:103
 AliDisplacedVertexSelection.h:104
 AliDisplacedVertexSelection.h:105
 AliDisplacedVertexSelection.h:106
 AliDisplacedVertexSelection.h:107
 AliDisplacedVertexSelection.h:108
 AliDisplacedVertexSelection.h:109
 AliDisplacedVertexSelection.h:110
 AliDisplacedVertexSelection.h:111
 AliDisplacedVertexSelection.h:112
 AliDisplacedVertexSelection.h:113
 AliDisplacedVertexSelection.h:114
 AliDisplacedVertexSelection.h:115
 AliDisplacedVertexSelection.h:116
 AliDisplacedVertexSelection.h:117
 AliDisplacedVertexSelection.h:118
 AliDisplacedVertexSelection.h:119
 AliDisplacedVertexSelection.h:120
 AliDisplacedVertexSelection.h:121
 AliDisplacedVertexSelection.h:122