ROOT logo
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
*                                                                        *
* Author: The ALICE Off-line Project.                                    *
* Contributors are mentioned in the code where appropriate.              *
*                                                                        *
* Permission to use, copy, modify and distribute this software and its   *
* documentation strictly for non-commercial purposes is hereby granted   *
* without fee, provided that the above copyright notice appears in all   *
* copies and that both the copyright notice and this permission notice   *
* appear in the supporting documentation. The authors make no claims     *
* about the suitability of this software for any purpose. It is          *
* provided "as is" without express or implied warranty.                  *
**************************************************************************/
//
// Debug event to look at the distribution of the variable we are cutting on
//
//
#ifndef ALIHFEREDUCEDEVENT_H
#define ALIHFEREDUCEDEVENT_H

#include <TObject.h>

class TObjArray;
class AliHFEreducedTrack;
class AliHFEreducedMCParticle;

class AliHFEreducedEvent : public TObject{
 public:
  AliHFEreducedEvent();
  AliHFEreducedEvent(const AliHFEreducedEvent &ref);
  AliHFEreducedEvent &operator=(const AliHFEreducedEvent &ref);
  ~AliHFEreducedEvent();
  
  void AddTrack(const AliHFEreducedTrack *track);
  const AliHFEreducedTrack *GetTrack(int itrk) const;
  Int_t GetNumberOfTracks() const { return fNtracks; }
  void AddMCParticle(const AliHFEreducedMCParticle *mctrack);
  const AliHFEreducedMCParticle *GetMCParticle(int itrk) const;
  Int_t GetNumberOfMCParticles() const { return fNmcparticles; }
  
  Float_t GetVX() const { return fVX[0]; }
  Float_t GetVY() const { return fVY[0]; }
  Float_t GetVZ() const { return fVZ[0]; }
  Float_t GetVXSPD() const { return fVX[1]; }
  Float_t GetVYSPD() const { return fVY[1]; }
  Float_t GetVZSPD() const { return fVZ[1]; }
  Double_t GetVXMC() const { return fVMC[0]; }
  Double_t GetVYMC() const { return fVMC[1]; }
  Double_t GetVZMC() const { return fVMC[2]; }
  Int_t GetNContribVertex() const { return fNContrib[0]; }
  Int_t GetNContribVertexSPD() const { return fNContrib[1]; }
  Bool_t HasPrimaryVertex() const { return fNContrib[0] > 0; }
  Bool_t HasPrimaryVertexSPD() const { return fNContrib[1] > 0; }
  Float_t GetVertexZResolution() const { return fVertexResolution[0]; };
  Float_t GetVertexZResolutionSPD() const { return fVertexResolution[1]; };
  Float_t GetVertexDispersion()  const { return fVertexDispersion[0]; };
  Float_t GetVertexDispersionSPD()  const { return fVertexDispersion[1]; };
  Int_t GetRunNumber() const { return fRunNumber; }
  Double_t GetCentrality() const { return fCentrality[0]; }
  Double_t GetCentralityV0M() const { return fCentrality[0]; }
  Double_t GetCentralityV0A() const { return fCentrality[1]; }
  Double_t GetCentralityV0C() const { return fCentrality[2]; }
  Double_t GetCentralityTracklets() const { return fCentrality[3]; }
  Double_t GetCentralityTracks() const { return fCentrality[4]; }
  Double_t GetCentralityZNA() const { return fCentrality[5]; }
  Double_t GetCentralityZNC() const { return fCentrality[6]; }
  Double_t GetCentralityCL0() const { return fCentrality[7]; }
  Double_t GetCentralityCL1() const { return fCentrality[8]; }
  Double_t GetCentralityCND() const { return fCentrality[9]; }
  Float_t GetV0AMultiplicity() const { return fV0Multiplicity[0]; }
  Float_t GetV0CMultiplicity() const { return fV0Multiplicity[1]; }
  Float_t GetV0MMultiplicity() const { return fV0Multiplicity[0] + fV0Multiplicity[1]; }
  Float_t GetZNAEnergy() const { return fZDCEnergy[0]; }
  Float_t GetZNCEnergy() const { return fZDCEnergy[1]; }
  Float_t GetZPAEnergy() const { return fZDCEnergy[2]; }
  Float_t GetZPCEnergy() const { return fZDCEnergy[3]; }
  Float_t GetZDCNEnergySum() const { return fZDCEnergy[0] + fZDCEnergy[1]; }
  Float_t GetZDCNEnergyDifference() const { return fZDCEnergy[0] - fZDCEnergy[1]; }
  Float_t GetZDCNEnergyAsymmetry() const { return fZDCEnergy[0] + fZDCEnergy[1] != 0 ? (fZDCEnergy[0] - fZDCEnergy[1])/(fZDCEnergy[0] + fZDCEnergy[1]) : 1.; }
  Float_t GetZDCPEnergySum() const { return fZDCEnergy[2] + fZDCEnergy[3]; }
  Float_t GetZDCPEnergyDifference() const { return fZDCEnergy[2] - fZDCEnergy[3]; }
  Float_t GetZDCPEnergyAsymmetry() const { return fZDCEnergy[2] + fZDCEnergy[3] != 0 ? (fZDCEnergy[2] - fZDCEnergy[3])/(fZDCEnergy[2] + fZDCEnergy[3]) : 1.; }
  Int_t   GetSPDMultiplicity() const { return fSPDMultiplicity; }
  
  void SetVX(Float_t vx) { fVX[0] = vx; }
  void SetVY(Float_t vy) { fVY[0] = vy; }
  void SetVZ(Float_t vz) { fVZ[0] = vz; }
  void SetVXSPD(Float_t vx) { fVX[1] = vx; }
  void SetVYSPD(Float_t vy) { fVY[1] = vy; }
  void SetVZSPD(Float_t vz) { fVZ[1] = vz; }
  void SetVMC(Double_t vx, Double_t vy, Double_t vz){
      fVMC[0] = vx;
      fVMC[1] = vy;
      fVMC[2] = vz;
  }
  void SetRunNumber(Int_t runnumber) { fRunNumber = runnumber; }
  void SetPileupFlag() { fPileupFlag = kTRUE; }
  inline void SetCentrality(
        Float_t centV0M, 
        Float_t centV0A, 
        Float_t centV0C, 
        Float_t centTLS, 
        Float_t centTrks, 
        Float_t centZNA, 
        Float_t centZNC,
        Float_t centCL0,
        Float_t centCL1,
        Float_t centCND
  );
  void SetNContribVertex(Int_t ncontrib) { fNContrib[0] = ncontrib; }
  void SetNContribVertexSPD(Int_t ncontrib) { fNContrib[1] = ncontrib; }
  void SetVertexResolution(Float_t res) { fVertexResolution[0] = res; }
  void SetVertexResolutionSPD(Float_t res) { fVertexResolution[1] = res; }
  void SetVertexDispersion(Float_t dis) { fVertexDispersion[0] = dis; }
  void SetVertexDispersionSPD(Float_t dis) { fVertexDispersion[1] = dis; }
  
  Bool_t IsMBTrigger() const { return TESTBIT(fTrigger, kMB); }
  Bool_t IsSemiCentralTrigger() const { return TESTBIT(fTrigger, kSemiCentral); }
  Bool_t IsCentralTrigger() const { return TESTBIT(fTrigger, kCentral); }
  Bool_t IsEMCalTrigger() const { return TESTBIT(fTrigger, kEMCAL); }
  Bool_t IsTRDSETrigger() const { return TESTBIT(fTrigger, kTRDSE); }
  Bool_t IsTRDDQTrigger() const { return TESTBIT(fTrigger, kTRDDQ); }
  Bool_t IsINTTrigger() const { return TESTBIT(fTrigger, kINTTRG); }
  Bool_t HasPileupFlag() const { return fPileupFlag; }
  
  void SetMBTrigger() { SETBIT(fTrigger, kMB); }
  void SetSemiCentralTrigger() { SETBIT(fTrigger, kSemiCentral); }
  void SetCentralTrigger() { SETBIT(fTrigger, kCentral); }
  void SetEMCALTrigger() { SETBIT(fTrigger, kEMCAL); }
  void SetTRDSETrigger() { SETBIT(fTrigger, kTRDSE); }
  void SetTRDDQTrigger() { SETBIT(fTrigger, kTRDDQ); }
  void SetINTTrigger() { SETBIT(fTrigger, kINTTRG); }

  void SetV0Multiplicity(Float_t v0A, Float_t v0C) {
    fV0Multiplicity[0] = v0A;
    fV0Multiplicity[1] = v0C;
  }
  inline void SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc);
  void SetSPDMultiplicity(Int_t mult) { fSPDMultiplicity = mult; }
  
 private:
  typedef enum{
    kMB = 0,
    kSemiCentral = 1,
    kCentral = 2,
    kEMCAL = 3,
    kTRDSE = 4,
    kTRDDQ = 5,
    kINTTRG = 6
  } Trigger_t;
  enum{
    kCentBuff = 15
  };
  TObjArray *fTracks;           // Array with reconstructed tracks
  TObjArray *fMCparticles;      // Array with MC particles
  Int_t fNtracks;               // Number of tracks
  Int_t fNmcparticles;          // Number of MC Particles
  Int_t fRunNumber;             // Run Number
  Float_t  fCentrality[kCentBuff];     // Centrality (V0M, V0A, V0C, TLS, TRK, ZNA, ZNC, CL0, CL1, CND)
  Int_t fTrigger;               // Trigger bits
  Float_t fVX[2];               // Vertex X
  Float_t fVY[2];               // Vertex Y
  Float_t fVZ[2];               // Vertex Z
  Double_t fVMC[3];              // Position of the MC Vertex
  Int_t    fNContrib[2];        // Number of vertex contributors
  Float_t  fVertexResolution[2];// z-Vertex resolution 
  Float_t  fVertexDispersion[2];// z-Vertex dispersion
  Float_t  fV0Multiplicity[2];  // V0 multiplicity
  Float_t  fZDCEnergy[4];       // ZDC Energy (n,p)
  Int_t    fSPDMultiplicity;    // SPD tracklet multiplicity
  Bool_t   fPileupFlag;         // Flag for Pileup event
  
  ClassDef(AliHFEreducedEvent, 5)
};

//____________________________________________________________
void AliHFEreducedEvent::SetCentrality(
        Float_t centV0M, 
        Float_t centV0A, 
        Float_t centV0C, 
        Float_t centTLS, 
        Float_t centTrks, 
        Float_t centZNA, 
        Float_t centZNC,
        Float_t centCL0,
        Float_t centCL1,
        Float_t centCND
  ) 
{ 
    fCentrality[0] = centV0M; 
    fCentrality[1] = centV0A; 
    fCentrality[2] = centV0C; 
    fCentrality[3] = centTLS; 
    fCentrality[4] = centTrks; 
    fCentrality[5] = centZNA; 
    fCentrality[6] = centZNC; 
    fCentrality[7] = centCL0; 
    fCentrality[8] = centCL1; 
    fCentrality[9] = centCND; 
}

//_________________________________________________________
void AliHFEreducedEvent::SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc){
  fZDCEnergy[0] = zna;
  fZDCEnergy[1] = znc;
  fZDCEnergy[2] = zpa;
  fZDCEnergy[3] = zpc;
}
#endif
 AliHFEreducedEvent.h:1
 AliHFEreducedEvent.h:2
 AliHFEreducedEvent.h:3
 AliHFEreducedEvent.h:4
 AliHFEreducedEvent.h:5
 AliHFEreducedEvent.h:6
 AliHFEreducedEvent.h:7
 AliHFEreducedEvent.h:8
 AliHFEreducedEvent.h:9
 AliHFEreducedEvent.h:10
 AliHFEreducedEvent.h:11
 AliHFEreducedEvent.h:12
 AliHFEreducedEvent.h:13
 AliHFEreducedEvent.h:14
 AliHFEreducedEvent.h:15
 AliHFEreducedEvent.h:16
 AliHFEreducedEvent.h:17
 AliHFEreducedEvent.h:18
 AliHFEreducedEvent.h:19
 AliHFEreducedEvent.h:20
 AliHFEreducedEvent.h:21
 AliHFEreducedEvent.h:22
 AliHFEreducedEvent.h:23
 AliHFEreducedEvent.h:24
 AliHFEreducedEvent.h:25
 AliHFEreducedEvent.h:26
 AliHFEreducedEvent.h:27
 AliHFEreducedEvent.h:28
 AliHFEreducedEvent.h:29
 AliHFEreducedEvent.h:30
 AliHFEreducedEvent.h:31
 AliHFEreducedEvent.h:32
 AliHFEreducedEvent.h:33
 AliHFEreducedEvent.h:34
 AliHFEreducedEvent.h:35
 AliHFEreducedEvent.h:36
 AliHFEreducedEvent.h:37
 AliHFEreducedEvent.h:38
 AliHFEreducedEvent.h:39
 AliHFEreducedEvent.h:40
 AliHFEreducedEvent.h:41
 AliHFEreducedEvent.h:42
 AliHFEreducedEvent.h:43
 AliHFEreducedEvent.h:44
 AliHFEreducedEvent.h:45
 AliHFEreducedEvent.h:46
 AliHFEreducedEvent.h:47
 AliHFEreducedEvent.h:48
 AliHFEreducedEvent.h:49
 AliHFEreducedEvent.h:50
 AliHFEreducedEvent.h:51
 AliHFEreducedEvent.h:52
 AliHFEreducedEvent.h:53
 AliHFEreducedEvent.h:54
 AliHFEreducedEvent.h:55
 AliHFEreducedEvent.h:56
 AliHFEreducedEvent.h:57
 AliHFEreducedEvent.h:58
 AliHFEreducedEvent.h:59
 AliHFEreducedEvent.h:60
 AliHFEreducedEvent.h:61
 AliHFEreducedEvent.h:62
 AliHFEreducedEvent.h:63
 AliHFEreducedEvent.h:64
 AliHFEreducedEvent.h:65
 AliHFEreducedEvent.h:66
 AliHFEreducedEvent.h:67
 AliHFEreducedEvent.h:68
 AliHFEreducedEvent.h:69
 AliHFEreducedEvent.h:70
 AliHFEreducedEvent.h:71
 AliHFEreducedEvent.h:72
 AliHFEreducedEvent.h:73
 AliHFEreducedEvent.h:74
 AliHFEreducedEvent.h:75
 AliHFEreducedEvent.h:76
 AliHFEreducedEvent.h:77
 AliHFEreducedEvent.h:78
 AliHFEreducedEvent.h:79
 AliHFEreducedEvent.h:80
 AliHFEreducedEvent.h:81
 AliHFEreducedEvent.h:82
 AliHFEreducedEvent.h:83
 AliHFEreducedEvent.h:84
 AliHFEreducedEvent.h:85
 AliHFEreducedEvent.h:86
 AliHFEreducedEvent.h:87
 AliHFEreducedEvent.h:88
 AliHFEreducedEvent.h:89
 AliHFEreducedEvent.h:90
 AliHFEreducedEvent.h:91
 AliHFEreducedEvent.h:92
 AliHFEreducedEvent.h:93
 AliHFEreducedEvent.h:94
 AliHFEreducedEvent.h:95
 AliHFEreducedEvent.h:96
 AliHFEreducedEvent.h:97
 AliHFEreducedEvent.h:98
 AliHFEreducedEvent.h:99
 AliHFEreducedEvent.h:100
 AliHFEreducedEvent.h:101
 AliHFEreducedEvent.h:102
 AliHFEreducedEvent.h:103
 AliHFEreducedEvent.h:104
 AliHFEreducedEvent.h:105
 AliHFEreducedEvent.h:106
 AliHFEreducedEvent.h:107
 AliHFEreducedEvent.h:108
 AliHFEreducedEvent.h:109
 AliHFEreducedEvent.h:110
 AliHFEreducedEvent.h:111
 AliHFEreducedEvent.h:112
 AliHFEreducedEvent.h:113
 AliHFEreducedEvent.h:114
 AliHFEreducedEvent.h:115
 AliHFEreducedEvent.h:116
 AliHFEreducedEvent.h:117
 AliHFEreducedEvent.h:118
 AliHFEreducedEvent.h:119
 AliHFEreducedEvent.h:120
 AliHFEreducedEvent.h:121
 AliHFEreducedEvent.h:122
 AliHFEreducedEvent.h:123
 AliHFEreducedEvent.h:124
 AliHFEreducedEvent.h:125
 AliHFEreducedEvent.h:126
 AliHFEreducedEvent.h:127
 AliHFEreducedEvent.h:128
 AliHFEreducedEvent.h:129
 AliHFEreducedEvent.h:130
 AliHFEreducedEvent.h:131
 AliHFEreducedEvent.h:132
 AliHFEreducedEvent.h:133
 AliHFEreducedEvent.h:134
 AliHFEreducedEvent.h:135
 AliHFEreducedEvent.h:136
 AliHFEreducedEvent.h:137
 AliHFEreducedEvent.h:138
 AliHFEreducedEvent.h:139
 AliHFEreducedEvent.h:140
 AliHFEreducedEvent.h:141
 AliHFEreducedEvent.h:142
 AliHFEreducedEvent.h:143
 AliHFEreducedEvent.h:144
 AliHFEreducedEvent.h:145
 AliHFEreducedEvent.h:146
 AliHFEreducedEvent.h:147
 AliHFEreducedEvent.h:148
 AliHFEreducedEvent.h:149
 AliHFEreducedEvent.h:150
 AliHFEreducedEvent.h:151
 AliHFEreducedEvent.h:152
 AliHFEreducedEvent.h:153
 AliHFEreducedEvent.h:154
 AliHFEreducedEvent.h:155
 AliHFEreducedEvent.h:156
 AliHFEreducedEvent.h:157
 AliHFEreducedEvent.h:158
 AliHFEreducedEvent.h:159
 AliHFEreducedEvent.h:160
 AliHFEreducedEvent.h:161
 AliHFEreducedEvent.h:162
 AliHFEreducedEvent.h:163
 AliHFEreducedEvent.h:164
 AliHFEreducedEvent.h:165
 AliHFEreducedEvent.h:166
 AliHFEreducedEvent.h:167
 AliHFEreducedEvent.h:168
 AliHFEreducedEvent.h:169
 AliHFEreducedEvent.h:170
 AliHFEreducedEvent.h:171
 AliHFEreducedEvent.h:172
 AliHFEreducedEvent.h:173
 AliHFEreducedEvent.h:174
 AliHFEreducedEvent.h:175
 AliHFEreducedEvent.h:176
 AliHFEreducedEvent.h:177
 AliHFEreducedEvent.h:178
 AliHFEreducedEvent.h:179
 AliHFEreducedEvent.h:180
 AliHFEreducedEvent.h:181
 AliHFEreducedEvent.h:182
 AliHFEreducedEvent.h:183
 AliHFEreducedEvent.h:184
 AliHFEreducedEvent.h:185
 AliHFEreducedEvent.h:186
 AliHFEreducedEvent.h:187
 AliHFEreducedEvent.h:188
 AliHFEreducedEvent.h:189
 AliHFEreducedEvent.h:190
 AliHFEreducedEvent.h:191
 AliHFEreducedEvent.h:192
 AliHFEreducedEvent.h:193
 AliHFEreducedEvent.h:194
 AliHFEreducedEvent.h:195
 AliHFEreducedEvent.h:196
 AliHFEreducedEvent.h:197
 AliHFEreducedEvent.h:198
 AliHFEreducedEvent.h:199
 AliHFEreducedEvent.h:200
 AliHFEreducedEvent.h:201
 AliHFEreducedEvent.h:202
 AliHFEreducedEvent.h:203
 AliHFEreducedEvent.h:204
 AliHFEreducedEvent.h:205
 AliHFEreducedEvent.h:206
 AliHFEreducedEvent.h:207
 AliHFEreducedEvent.h:208
 AliHFEreducedEvent.h:209
 AliHFEreducedEvent.h:210