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.                  *
 **************************************************************************/

/*****************************************************************
  AliFlowEventStar: Event container for flow analysis

  origin:   Mikolaj Krzewicki  (mikolaj.krzewicki@cern.ch)
*****************************************************************/

#include "Riostream.h"
#include "AliFlowEventSimple.h"
#include "AliFlowTrackSimple.h"
#include "AliStarTrack.h"
#include "AliStarTrackCuts.h"
#include "AliStarEvent.h"
#include "AliFlowEventStar.h"

using std::cout;
using std::endl;
ClassImp(AliFlowEventStar)

//-----------------------------------------------------------------------

AliFlowEventStar::AliFlowEventStar():
  AliFlowEventSimple()
{
  //ctor
  cout << "AliFlowEventStar: Default constructor to be used only by root for io" << endl;
}

//-----------------------------------------------------------------------
AliFlowEventStar::AliFlowEventStar(const AliFlowEventStar& event):
  AliFlowEventSimple(event)
{
  //cpy ctor
}

//-----------------------------------------------------------------------
AliFlowEventStar& AliFlowEventStar::operator=( const AliFlowEventStar& event )
{
  //assignment operator
  AliFlowEventSimple::operator=(event);
  return *this;
}

//-----------------------------------------------------------------------
AliFlowEventStar::AliFlowEventStar( const AliStarEvent* starevent,
                                    const AliStarTrackCuts* rpCuts,
                                    const AliStarTrackCuts* poiCuts ):
  AliFlowEventSimple(starevent->GetNumberOfTracks())
{
  //construct from a star event
  SetReferenceMultiplicity(starevent->GetRefMult());
  for (Int_t i=0; i<starevent->GetNumberOfTracks(); i++)
  {
    const AliStarTrack* startrack = starevent->GetTrack(i);
    if (!startrack) continue;
    AliFlowTrackSimple* flowtrack = new AliFlowTrackSimple();
    flowtrack->SetPhi(startrack->GetPhi());
    flowtrack->SetEta(startrack->GetEta());
    flowtrack->SetPt(startrack->GetPt());
    flowtrack->SetCharge(startrack->GetCharge());
    if (rpCuts)
    {
      Bool_t pass = rpCuts->PassesCuts(startrack);
      flowtrack->TagRP(pass); //tag RPs
      if (pass) IncrementNumberOfPOIs(0);
    }
    if (poiCuts)
    {
      flowtrack->TagPOI(poiCuts->PassesCuts(startrack)); //tag POIs
    }
    AddTrack(flowtrack);
  }
}
 AliFlowEventStar.cxx:1
 AliFlowEventStar.cxx:2
 AliFlowEventStar.cxx:3
 AliFlowEventStar.cxx:4
 AliFlowEventStar.cxx:5
 AliFlowEventStar.cxx:6
 AliFlowEventStar.cxx:7
 AliFlowEventStar.cxx:8
 AliFlowEventStar.cxx:9
 AliFlowEventStar.cxx:10
 AliFlowEventStar.cxx:11
 AliFlowEventStar.cxx:12
 AliFlowEventStar.cxx:13
 AliFlowEventStar.cxx:14
 AliFlowEventStar.cxx:15
 AliFlowEventStar.cxx:16
 AliFlowEventStar.cxx:17
 AliFlowEventStar.cxx:18
 AliFlowEventStar.cxx:19
 AliFlowEventStar.cxx:20
 AliFlowEventStar.cxx:21
 AliFlowEventStar.cxx:22
 AliFlowEventStar.cxx:23
 AliFlowEventStar.cxx:24
 AliFlowEventStar.cxx:25
 AliFlowEventStar.cxx:26
 AliFlowEventStar.cxx:27
 AliFlowEventStar.cxx:28
 AliFlowEventStar.cxx:29
 AliFlowEventStar.cxx:30
 AliFlowEventStar.cxx:31
 AliFlowEventStar.cxx:32
 AliFlowEventStar.cxx:33
 AliFlowEventStar.cxx:34
 AliFlowEventStar.cxx:35
 AliFlowEventStar.cxx:36
 AliFlowEventStar.cxx:37
 AliFlowEventStar.cxx:38
 AliFlowEventStar.cxx:39
 AliFlowEventStar.cxx:40
 AliFlowEventStar.cxx:41
 AliFlowEventStar.cxx:42
 AliFlowEventStar.cxx:43
 AliFlowEventStar.cxx:44
 AliFlowEventStar.cxx:45
 AliFlowEventStar.cxx:46
 AliFlowEventStar.cxx:47
 AliFlowEventStar.cxx:48
 AliFlowEventStar.cxx:49
 AliFlowEventStar.cxx:50
 AliFlowEventStar.cxx:51
 AliFlowEventStar.cxx:52
 AliFlowEventStar.cxx:53
 AliFlowEventStar.cxx:54
 AliFlowEventStar.cxx:55
 AliFlowEventStar.cxx:56
 AliFlowEventStar.cxx:57
 AliFlowEventStar.cxx:58
 AliFlowEventStar.cxx:59
 AliFlowEventStar.cxx:60
 AliFlowEventStar.cxx:61
 AliFlowEventStar.cxx:62
 AliFlowEventStar.cxx:63
 AliFlowEventStar.cxx:64
 AliFlowEventStar.cxx:65
 AliFlowEventStar.cxx:66
 AliFlowEventStar.cxx:67
 AliFlowEventStar.cxx:68
 AliFlowEventStar.cxx:69
 AliFlowEventStar.cxx:70
 AliFlowEventStar.cxx:71
 AliFlowEventStar.cxx:72
 AliFlowEventStar.cxx:73
 AliFlowEventStar.cxx:74
 AliFlowEventStar.cxx:75
 AliFlowEventStar.cxx:76
 AliFlowEventStar.cxx:77
 AliFlowEventStar.cxx:78
 AliFlowEventStar.cxx:79
 AliFlowEventStar.cxx:80
 AliFlowEventStar.cxx:81
 AliFlowEventStar.cxx:82
 AliFlowEventStar.cxx:83
 AliFlowEventStar.cxx:84
 AliFlowEventStar.cxx:85
 AliFlowEventStar.cxx:86
 AliFlowEventStar.cxx:87