ROOT logo
// $Id$
// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007

/**************************************************************************
 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
 * full copyright notice.                                                 *
 **************************************************************************/

#include <memory>
#include "AliEveVSDCreator.h"

#include "AliEveEventManager.h"

#include <AliStack.h>
#include <AliITSLoader.h>
#include <AliTPCTrackHitsV2.h>
#include <AliPDG.h>
#include <AliHit.h>
#include <AliESDEvent.h>
#include <AliESDv0.h>
#include <AliTPCclusterMI.h>
#include <AliTPCClustersRow.h>
#include <AliITSclusterV2.h>
#include <AliESDkink.h>
#include <AliESDtrack.h>

#include <AliRun.h>
#include <AliRunLoader.h>
#include <AliTPCParam.h>

#include <TDatabasePDG.h>
#include <TSystem.h>
#include <TFile.h>

//______________________________________________________________________________
//
// Create VSD file from ALICE data.

ClassImp(AliEveVSDCreator)

AliEveVSDCreator::AliEveVSDCreator(const Text_t* name, const Text_t* title) :
  TEveVSD(name, title),

  fTPCHitRes  (2),
  fTRDHitRes  (1),

  fDebugLevel (0),
  fRunLoader  (0),
  fGenInfoMap ()
{
  // Constructor.

  // Particles not in ROOT's PDG database occuring in ALICE
  AliPDG::AddParticlesToPdgDataBase();
}

/******************************************************************************/

void AliEveVSDCreator::CreateVSD(const Text_t* vsdFile)
{
  // Create the VSD for current event in AliEveEventManager.
  // Result is stored in directory "Event%04d".

  static const TEveException kEH("AliEveVSDCreator::CreateVSD ");

  AliEveEventManager::AssertGeometry();

  fRunLoader = AliEveEventManager::AssertRunLoader();

  if (fDebugLevel > 0)
    printf("%s open seems ok. Now loading sim data.\n", kEH.Data());

  fRunLoader->LoadHeader();
  fRunLoader->LoadKinematics();
  fRunLoader->LoadTrackRefs();
  fRunLoader->LoadHits();

  if (fDebugLevel > 0)
    printf("%s opening output TEveVSD.\n", kEH.Data());

  TFile* file = TFile::Open(vsdFile, "UPDATE", "ALICE Visualization Summary Data");

  Int_t curEvent = AliEveEventManager::CurrentEventId();

  TString eventDir; eventDir.Form("Event%04d", curEvent);

  if (file->Get(eventDir))
  {
    Warning(kEH, "Event-dir '%s' existed -- replacing.", eventDir.Data());
    file->Delete(eventDir + ";*");
  }

  fDirectory = new TDirectoryFile(eventDir, Form("Data for event %d", curEvent));

  if (fDebugLevel > 0)
    printf("%s creating trees now ...\n", kEH.Data());

  CreateTrees();

  if (fDebugLevel > 0)
    printf("%s trees created, closing files.\n", kEH.Data());

  file->Write();
  file->Close();
  delete file;
  fDirectory = 0;

  // clean after the TEveVSD data was sucessfuly written
  fTreeK      = 0;
  fTreeH      = 0;
  //fTreeTR     = 0;
  fTreeC      = 0;
  fTreeV0     = 0;
  fTreeKK     = 0;
  fTreeR      = 0;
  fTreeGI     = 0;

  fRunLoader = 0;

  if (fDebugLevel > 0)
    printf("%s all done.\n", kEH.Data());
}

void AliEveVSDCreator::CreateTrees()
{
  // Create and fill the output trees by calling all the
  // ConvertXyzz() functions.
  // Exceptions from individual functions are displayed as warnings.

  static const TEveException kEH("AliEveVSDCreator::CreateTrees ");

  if (fDirectory == 0)
    throw kEH + "output directory not set.";

  try
  {
    if (fDebugLevel > 1)
      printf("%sConvertKinematics.\n", kEH.Data());
    ConvertKinematics();
  }
  catch(TEveException& exc)
  {
    Warning(kEH, "%s", exc.Data());
  }

  try
  {
    if (fDebugLevel > 1)
      printf("%sConvertHits.\n", kEH.Data());
    ConvertHits();
  }
  catch(TEveException& exc)
  {
    Warning(kEH, "%s", exc.Data());
  }

  try
  {
    if (fDebugLevel > 1)
      printf("%sConvertClusters.\n", kEH.Data());
    ConvertClusters();
  }
  catch(TEveException& exc)
  {
    Warning(kEH, "%s", exc.Data());
  }

  try 
  {
    if (fDebugLevel > 1)
      printf("%sConvertRecTracks.\n", kEH.Data());
    ConvertRecTracks();
  }
  catch(TEveException& exc)
  {
    Warning(kEH, "Executing %s skipping AliEveV0 extraction.", exc.Data());
    goto end_esd_processing;
  }

  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  Warning(kEH, "Explicitly abandoning further conversion.");
  return;

  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/*
  try
  {
    if (fDebugLevel > 1)
      printf("%sConvertV0.\n", kEH.Data());
    ConvertV0();
  }
  catch(TEveException& exc)
  {
    Warning(kEH, exc);
  }

  try
  {
    if (fDebugLevel > 1)
      printf("%sConvertKinks.\n", kEH.Data());
    ConvertKinks();
  }
  catch(TEveException& exc)
  {
    Warning(kEH, exc);
  }
*/
end_esd_processing:

  try
  {
    if (fDebugLevel > 1)
      printf("%sConvertGenInfo.\n", kEH.Data());
    ConvertGenInfo();
  }
  catch(TEveException& exc)
  {
    Warning(kEH, "%s", exc.Data());
  }

  return;
}

/******************************************************************************/
// Kinematics
/******************************************************************************/

void AliEveVSDCreator::ConvertKinematics()
{
  // Convert kinematics.
  // Track references are not stored, they should be.

  static const TEveException kEH("AliEveVSDCreator::ConvertKinematics ");

  if (fTreeK != 0)
    throw kEH + "kinematics already converted";

  AliStack* stack = fRunLoader->Stack();
  if (stack == 0)
    throw kEH + "stack is null.";

  fDirectory->cd();
  fTreeK = new TTree("Kinematics", "Particles created during simulation.");

  Int_t nentries = stack->GetNtrack();
  std::vector<TEveMCTrack>  vmc(nentries);
  for (Int_t idx = 0; idx < nentries; ++idx)
  {
    TParticle*   tp = stack->Particle(idx);
    vmc[idx]        = *tp;
    vmc[idx].fLabel = idx;
  }

  // read track refrences
  // functionality now in AliEveKineTools.
  /*
  TTree* fTreeTR =  fRunLoader->TreeTR();

  if(fTreeTR == 0) {
    Warning(kEH, "no TrackRefs; some data will not be available.");
  } else {
    TClonesArray* RunArrayTR = 0;
    fTreeTR->SetBranchAddress("AliRun", &RunArrayTR);

    Int_t nPrimaries = (Int_t) fTreeTR->GetEntries();
    for (Int_t iPrimPart = 0; iPrimPart<nPrimaries; iPrimPart++) {
      // printf("T0 fTreeTR->GetEntry(%d) \n",iPrimPart);
      fTreeTR->GetEntry(iPrimPart);
      // printf("END fTreeTR->GetEntry(%d) \n",iPrimPart);

      for (Int_t iTrackRef = 0; iTrackRef < RunArrayTR->GetEntriesFast(); iTrackRef++) {
	AliTrackReference *trackRef = (AliTrackReference*)RunArrayTR->At(iTrackRef);
	Int_t track = trackRef->GetTrack();
	if(track < nentries && track > 0){
	  TEveMCTrack& mct = vmc[track];
	  if(trackRef->TestBit(kNotDeleted)) {
	    mct.decayed   = true;
	    mct.t_decay   = trackRef->GetTime();
	    mct.V_decay.x = trackRef->X();
	    mct.V_decay.y = trackRef->Y();
	    mct.V_decay.z = trackRef->Z();
	    mct.P_decay.x = trackRef->Px();
	    mct.P_decay.y = trackRef->Py();
	    mct.P_decay.z = trackRef->Pz();
	    if(TMath::Abs(mct.GetPdgCode()) == 11)
	      mct.decayed = false; // a bug in TreeTR
	  }
	}
      }
    }
  }
  */

  fTreeK->Branch("K", "TEveMCTrack",  &fpK, fBuffSize);

  printf("sizeofvmc = %d\n", (Int_t) vmc.size());
  for(std::vector<TEveMCTrack>::iterator k = vmc.begin(); k != vmc.end(); ++k)
  {
    TEveMCTrack& mct = *k;
    fK = mct;

    TParticle* m  = &mct;
    Int_t      mi = mct.fLabel;
    int cnt = 0;
    while (m->GetMother(0) != -1)
    {
      if (cnt > 100)
	printf("cnt %d mi=%d, mo=%d\n", cnt, mi, m->GetMother(0));

      mi = m->GetMother(0);
      m = &vmc[mi];
      ++cnt;
    }
    fK.fEvaLabel = mi;

    fTreeK->Fill();
  }

  fTreeK->BuildIndex("fLabel");
}


//==============================================================================
// Hits
//==============================================================================

void AliEveVSDCreator::ConvertHits()
{
  // Convert MC hits.
  // TPC hits are handled specially as they are compressed - only mayor
  // hits are stored

  static const TEveException kEH("AliEveVSDCreator::ConvertHits ");

  if (fTreeH != 0)
    throw kEH + "hits already converted.";

  fDirectory->cd();
  fTreeH = new TTree("Hits", "Simulated energy depositions in detector.");
  fTreeH->Branch("H", "TEveHit", &fpH, fBuffSize);

  try
  {
    ConvertAnyHits("ITS", "AliITShit", 0, 0);
    ConvertTPCHits(                    1, fTPCHitRes*fTPCHitRes);
    ConvertAnyHits("TRD", "AliTRDhit", 2, fTRDHitRes*fTRDHitRes);
    ConvertAnyHits("TOF", "AliTOFhit", 3, 0);

  }
  catch(TEveException& exc)
  {
    Warning(kEH, "%s", exc.Data());
  }
}

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

void AliEveVSDCreator::ConvertAnyHits(const TString& detector,
                                      const TString& clones_class,
                                      Int_t det_id, Float_t minDistSqr)
{
  // Convert hits for detector.

  static const TEveException kEH("AliEveVSDCreator::ConvertAnyHits ");

  Float_t x,y,z, x1,y1,z1;

  TTree* treeh = fRunLoader->GetTreeH(detector, kFALSE);
  if (treeh == 0)
  {
    Warning(kEH, "no hits for %s.", detector.Data());
    return;
  }

  TClonesArray *arr = new TClonesArray(clones_class);
  treeh->SetBranchAddress(detector, &arr);
  Int_t np = treeh->GetEntries();

  // In TreeH files hits are grouped in clones arrays
  // each eva particle has its own clone array.

  std::map<Int_t, Int_t> hmap;

  for (Int_t i = 0; i < np; ++i)
  {
    treeh->GetEntry(i);
    Int_t evaIdx = np - i - 1;
    Int_t nh = arr->GetEntriesFast();
    x = y = z = 0;
    // printf("%d entry %d hits for primary %d \n", i, nh, evaIdx);
    for (Int_t j = 0; j < nh; ++j)
    {
      AliHit* aliHit = (AliHit*)arr->UncheckedAt(j);

      x1 = aliHit->X(); y1 = aliHit->Y(); z1 = aliHit->Z();
      if (minDistSqr == 0 || (x-x1)*(x-x1) + (y-y1)*(y-y1) + (z-z1)*(z-z1) > minDistSqr)
      {
        fH.fDetId      = det_id;
        fH.fSubdetId   = 0;
        fH.fLabel      = aliHit->GetTrack();
        fH.fEvaLabel   = evaIdx;
        fH.fV.Set(aliHit->X(), aliHit->Y(), aliHit->Z());

        fTreeH->Fill();

        hmap[fH.fLabel]++;

        x=x1; y=y1; z=z1;
      }
    }
  }
  delete arr;

  // Set geninfo.
  for (std::map<Int_t, Int_t>::iterator j = hmap.begin(); j != hmap.end(); ++j)
  {
    GetGeninfo(j->first)->fNHits += j->second;
  }
}

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

void AliEveVSDCreator::ConvertTPCHits(Int_t det_id, Float_t minDistSqr)
{
  // Convert hits for TPC.

  static const TEveException kEH("AliEveVSDCreator::ConvertTPCHits ");

  Float_t x,y,z, x1,y1,z1;

  TTree* treeh = fRunLoader->GetTreeH("TPC", false);
  if (treeh == 0)
  {
    Warning(kEH, "no hits for %s.", "TPC");
    return;
  }

  AliTPCTrackHitsV2 hv2, *hv2p = &hv2;
  treeh->SetBranchAddress("TPC2", &hv2p);
  Int_t np = treeh->GetEntries();

  std::map<Int_t, Int_t> hmap;

  for (Int_t i = 0; i < np; ++i)
  {
    treeh->GetEntry(i);
    Int_t evaIdx = np -i -1;
    if (hv2.First() == 0) continue;
    x = y = z = 0;
    do
    {
      AliHit* ah = hv2.GetHit();
      x1 = ah->X(); y1 = ah->Y(); z1 = ah->Z();
      if (minDistSqr == 0 || (x-x1)*(x-x1) + (y-y1)*(y-y1) + (z-z1)*(z-z1) > minDistSqr)
      {
        fH.fDetId    = det_id;
        fH.fSubdetId = 0;
        fH.fLabel    = ah->Track();
        fH.fEvaLabel = evaIdx;
        fH.fV.fX = x1; fH.fV.fY = y1; fH.fV.fZ = z1;

        fTreeH->Fill();

        hmap[fH.fLabel]++;

        x = x1; y = y1; z = z1;
      }
    } while (hv2.Next());
  }

  // Set geninfo.
  for (std::map<Int_t, Int_t>::iterator j = hmap.begin(); j != hmap.end(); ++j)
  {
    GetGeninfo(j->first)->fNHits += j->second;
  }
}


//==============================================================================
// Clusters
//==============================================================================

void AliEveVSDCreator::ConvertClusters()
{
  // Convert clusters.
  //
  // Only supported for ITS and TPC at the moment, see dedicated
  // functions ConvertITSClusters() and ConvertTPCClusters().
  //
  // It should be possible now to do this in a general manner (with
  // the alignment framework).

  static const TEveException kEH("AliEveVSDCreator::ConvertClusters ");

  if (fTreeC != 0)
    throw kEH + "clusters already converted.";

  fDirectory->cd();
  fTreeC = new TTree("Clusters", "Reconstructed points of particle passage.");
  fTreeC->Branch("C", "TEveCluster", &fpC, fBuffSize);

  try
  {
    ConvertAnyClusters("ITS", "ITSRecPoints", 0);
    ConvertTPCClusters(                       1);
    ConvertAnyClusters("TRD", "TRDcluster",   2);
    ConvertAnyClusters("TOF", "TOF",          3);

  }
  catch(TEveException& exc)
  {
    Warning(kEH, "%s", exc.Data());
  }
}

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

void AliEveVSDCreator::ConvertAnyClusters(const TString& detector,
                                          const TString& branch_name,
                                          Int_t det_id)
{
  // Convert clusters for detector and transform them to global coordinates.

  static const TEveException kEH("AliEveVSDCreator::ConvertITSClusters ");

  fRunLoader->LoadRecPoints(detector);
  TTree* tree = fRunLoader->GetTreeR(detector, false);
  if (!tree)
    throw kEH + "'TreeR' not found.";

  TClonesArray *cl = 0;
  TBranch *branch  = tree->GetBranch(branch_name);
  branch->SetAddress(&cl);

  Int_t nmods = branch->GetEntries();

  std::map<Int_t, Int_t> cmap;

  for (Int_t mod = 0; mod < nmods; ++mod)
  {
    branch->GetEntry(mod);
    Int_t nc = cl->GetEntriesFast();
    for (Int_t j = 0; j < nc; ++j)
    {
      AliCluster *c = (AliCluster*) cl->UncheckedAt(j);

      fC.fDetId    = det_id;
      fC.fSubdetId = mod;
      fC.fLabel[0] = c->GetLabel(0);
      fC.fLabel[1] = c->GetLabel(1);
      fC.fLabel[2] = c->GetLabel(2);

      c->GetGlobalXYZ(fC.fV.Arr());

      fTreeC->Fill();

      {
        int i = 0;
	while (i < 3 && fC.fLabel[i])
	  cmap[fC.fLabel[i++]]++;
      }
    }
  }
  delete cl;

  for (std::map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j)
  {
    GetGeninfo(j->first)->fNClus += j->second;
  }
}

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

void AliEveVSDCreator::ConvertTPCClusters(Int_t det_id)
{
  // Convert TPC clusters and transform them to global coordinates.

  static const TEveException kEH("AliEveVSDCreator::ConvertTPCClusters ");

  const Int_t kMaxCl = 100*160;

  fRunLoader->LoadRecPoints("TPC");
  TTree* tree = fRunLoader->GetTreeR("TPC", false);
  if (!tree)
    throw kEH + "'TreeR' not found.";

  AliTPCClustersRow *clrow = new AliTPCClustersRow;
  clrow->SetClass("AliTPCclusterMI");
  clrow->SetArray(kMaxCl);
  tree->SetBranchAddress("Segment", &clrow);

  Int_t nEnt = tree->GetEntries();

  std::map<Int_t, Int_t> cmap;

  for (Int_t j = 0; j < nEnt; ++j)
  {
    if (!tree->GetEvent(j)) continue;

    TClonesArray *cl = clrow->GetArray();
    Int_t ncl = cl->GetEntriesFast();

    while (ncl--)
    {
      AliCluster *c = (AliCluster*) cl->UncheckedAt(ncl);

      fC.fDetId    = det_id;
      fC.fSubdetId = j;
      fC.fLabel[0] = c->GetLabel(0);
      fC.fLabel[1] = c->GetLabel(1);
      fC.fLabel[2] = c->GetLabel(2);

      c->GetGlobalXYZ(fC.fV.Arr());

      fTreeC->Fill();

      {
        int i = 0;
	while (i < 3 && fC.fLabel[i])
	  cmap[fC.fLabel[i++]]++;
      }
    }

    cl->Clear();
  }
  delete clrow;

  //set geninfo
  for (std::map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j)
  {
    GetGeninfo(j->first)->fNClus += j->second;
  }
}


/******************************************************************************/
// ESD
/******************************************************************************/

void AliEveVSDCreator::ConvertRecTracks()
{
  // Convert reconstructed tracks.

  static const TEveException kEH("AliEveVSDCreator::ConvertRecTracks ");

  if (fTreeR != 0)
    throw kEH + "tracks already converted.";

  AliESDEvent* esdEvent = AliEveEventManager::AssertESD();

  fDirectory->cd();
  fTreeR =  new TTree("RecTracks", "Reconstructed particle trajectories.");
  fTreeR->Branch("R", "TEveRecTrack", &fpR, 512*1024);

  // reconstructed tracks
  AliESDtrack* esdTrack;
  Double_t     dbuf[3];
  for (Int_t n = 0; n < esdEvent->GetNumberOfTracks(); ++n)
  {
    esdTrack = esdEvent->GetTrack(n);

    fR.fLabel  = esdTrack->GetLabel();
    fR.fStatus = (Int_t) esdTrack->GetStatus();
    fR.fSign   = (Int_t) esdTrack->GetSign();
    esdTrack->GetXYZ(dbuf);    fR.fV.Set(dbuf);
    esdTrack->GetPxPyPz(dbuf); fR.fP.Set(dbuf);
    Double_t ep = esdTrack->GetP();
    fR.fBeta = ep/TMath::Sqrt(ep*ep + TMath::C()*TMath::C()*esdTrack->GetMass()*esdTrack->GetMass());
    fTreeR->Fill();
  }

  fTreeR->BuildIndex("fLabel");
}

/******************************************************************************/

void AliEveVSDCreator::ConvertV0()
{
  // Convert reconstructed V0s.

  static const TEveException kEH("AliEveVSDCreator::ConvertV0 ");

  if (fTreeV0 != 0)
    throw kEH + "AliEveV0 already converted.";

  AliESDEvent* esdEvent = AliEveEventManager::AssertESD();

  fDirectory->cd();
  fTreeV0 =  new TTree("AliEveV0", "AliEveV0 points");

  fTreeV0->Branch("AliEveV0", "TEveRecV0", &fpV0, 512*1024,1);

  for (Int_t n = 0; n < esdEvent->GetNumberOfV0s(); ++n)
  {
    AliESDv0    *av     = esdEvent->GetV0(n);
    AliESDtrack *trackN = esdEvent->GetTrack(av->GetNindex()); // negative daughter
    AliESDtrack *trackP = esdEvent->GetTrack(av->GetPindex()); // positive daughter

    Double_t pos[3];

    fV0.fStatus = av->GetStatus();
    // Point of closest approach
    av->GetXYZ(pos[0],pos[1],pos[2]);
    fV0.fVCa.fX = pos[0];
    fV0.fVCa.fY = pos[1];
    fV0.fVCa.fZ = pos[2];
    // set birth vertex of neutral particle
    av->GetXYZ(pos[0], pos[1], pos[2]);
    fV0.fV0Birth.Set(pos);

    // momentum and position of negative particle
    av->GetParamN()->GetPxPyPz(pos);
    fV0.fPNeg.Set(pos);
    av->GetParamN()->GetXYZ(pos);
    fV0.fVNeg.Set(pos);

    // momentum and position of positive particle
    av->GetParamP()->GetPxPyPz(pos);
    fV0.fPPos.Set(pos);
    av->GetParamP()->GetXYZ(pos);
    fV0.fVPos.Set(pos);

    fV0.fLabel = 0; // !!!! mother label unknown
    fV0.fPdg   = av->GetPdgCode();

    // daughter indices
    fV0.fDLabel[0] = TMath::Abs(trackN->GetLabel());
    fV0.fDLabel[1] = TMath::Abs(trackP->GetLabel());

    // printf("AliEveV0 convert labels(%d,%d) index(%d,%d)\n",
    //	   fV0.d_label[0],  fV0.d_label[1],
    //	   av->GetNIndex(), av->GetPIndex());

    fTreeV0->Fill();
  }
  // if (esdEvent->GetNumberOfV0s()) fTreeV0->BuildIndex("label");
  delete esdEvent;
}

/******************************************************************************/

void AliEveVSDCreator::ConvertKinks()
{
  // Convert reconstructed kinks.

  static const TEveException kEH("AliEveVSDCreator::ConvertKinks ");

  if (fTreeKK != 0)
    throw kEH + "Kinks already converted.";

  throw kEH + "Currently non-supported - TEveRecKink being updated.";

  /*
  AliESDEvent* esdEvent = AliEveEventManager::AssertESD();

  fDirectory->cd();
  fTreeKK =  new TTree("Kinks", "ESD Kinks");

  fTreeKK->Branch("KK", "TEveRecKink", &fpKK, fBuffSize);

  //  printf("CONVERT KINK Read %d entries in tree kinks \n",  esdEvent->GetNumberOfKinks());
  for (Int_t n = 0; n < esdEvent->GetNumberOfKinks(); ++n)
  {
    AliESDkink* kk = esdEvent->GetKink(n);

    Double_t pos[3];

    fKK.fLabel  = kk->GetLabel(0);
    fKK.fStatus = 0; // status is Char_t[12] ... have no idea how/what to extract.

    // reconstructed kink position
    fKK.fLabelSec = kk->GetLabel(1);
    fKK.fVKink.Set(kk->GetPosition());

    const AliExternalTrackParam& tpMother = kk->RefParamMother();
    // momentum and position of mother
    tpMother.GetPxPyPz(pos);
    fKK.fP.Set(pos);
    tpMother.GetXYZ(pos);
    fKK.fV.Set(pos);
    const Double_t* par =  tpMother.GetParameter();
    // printf("KINK Pt %f, %f \n",1/tpMother.Pt(),par[4] );
    fKK.fSign = (par[4] < 0) ? -1 : 1;

    const AliExternalTrackParam& tpDaughter = kk->RefParamDaughter();
    // momentum and position of daughter
    tpDaughter.GetPxPyPz(pos);
    fKK.fPSec.Set(pos);
    tpDaughter.GetXYZ(pos);
    fKK.fVEnd.Set(pos);

    fTreeKK->Fill();
  }
  if (esdEvent->GetNumberOfKinks()) fTreeKK->BuildIndex("label");
  delete esdEvent;
  */
}
/******************************************************************************/
// TEveMCRecCrossRef
/******************************************************************************/

void AliEveVSDCreator::ConvertGenInfo()
{
  // Build simulation-reconstruction cross-reference table.
  // In a rather poor state at the moment.

  static const TEveException kEH("AliEveVSDCreator::ConvertGenInfo ");

  if (fTreeGI != 0)
    throw kEH + "GI already converted.";

  fDirectory->cd();
  fTreeGI = new TTree("TEveMCRecCrossRef", "Objects prepared for cross querry");

  TEveMCRecCrossRef::Class()->IgnoreTObjectStreamer(true);
  fTreeGI->Branch("GI", "TEveMCRecCrossRef",  &fpGI, fBuffSize);
  fTreeGI->Branch("K.", "TEveMCTrack",  &fpK);
  fTreeGI->Branch("R.", "TEveRecTrack", &fpR);

  for (std::map<Int_t, TEveMCRecCrossRef*>::iterator j=fGenInfoMap.begin(); j!=fGenInfoMap.end(); ++j)
  {
    fGI        = *(j->second);
    fGI.fLabel = j->first;
    fTreeK->GetEntry(j->first);

    if (fTreeR) {
      Int_t re = fTreeR->GetEntryNumberWithIndex(j->first);
      if(re != -1)
	fGI.fIsRec = true;
    }
    //    Int_t hasV0 =  fTreeV0->GetEntryNumberWithIndex(j->first);
    //if (hasV0 != -1)
    //  fGI.has_AliEveV0 = true;
    if (fTreeKK)
    {
      Int_t hasKk =  fTreeKK->GetEntryNumberWithIndex(j->first);
      if (hasKk != -1)
	fGI.fHasKink = true;
    }
    fTreeGI->Fill();
  }
  fGenInfoMap.clear();
}

/******************************************************************************/
/******************************************************************************/
// Protected methods
/******************************************************************************/
/******************************************************************************/

TEveMCRecCrossRef* AliEveVSDCreator::GetGeninfo(Int_t label)
{
  // Return the cross-reference structure for given label.
  // If the object does not exist it is created.

  // printf("get_geninfo %d\n", label);
  TEveMCRecCrossRef* gi;
  std::map<Int_t, TEveMCRecCrossRef*>::iterator i = fGenInfoMap.find(label);
  if (i == fGenInfoMap.end())
  {
    gi =  new TEveMCRecCrossRef();
    fGenInfoMap[label] = gi;
  }
  else
  {
    gi = i->second;
  }
  return gi;
}
 AliEveVSDCreator.cxx:1
 AliEveVSDCreator.cxx:2
 AliEveVSDCreator.cxx:3
 AliEveVSDCreator.cxx:4
 AliEveVSDCreator.cxx:5
 AliEveVSDCreator.cxx:6
 AliEveVSDCreator.cxx:7
 AliEveVSDCreator.cxx:8
 AliEveVSDCreator.cxx:9
 AliEveVSDCreator.cxx:10
 AliEveVSDCreator.cxx:11
 AliEveVSDCreator.cxx:12
 AliEveVSDCreator.cxx:13
 AliEveVSDCreator.cxx:14
 AliEveVSDCreator.cxx:15
 AliEveVSDCreator.cxx:16
 AliEveVSDCreator.cxx:17
 AliEveVSDCreator.cxx:18
 AliEveVSDCreator.cxx:19
 AliEveVSDCreator.cxx:20
 AliEveVSDCreator.cxx:21
 AliEveVSDCreator.cxx:22
 AliEveVSDCreator.cxx:23
 AliEveVSDCreator.cxx:24
 AliEveVSDCreator.cxx:25
 AliEveVSDCreator.cxx:26
 AliEveVSDCreator.cxx:27
 AliEveVSDCreator.cxx:28
 AliEveVSDCreator.cxx:29
 AliEveVSDCreator.cxx:30
 AliEveVSDCreator.cxx:31
 AliEveVSDCreator.cxx:32
 AliEveVSDCreator.cxx:33
 AliEveVSDCreator.cxx:34
 AliEveVSDCreator.cxx:35
 AliEveVSDCreator.cxx:36
 AliEveVSDCreator.cxx:37
 AliEveVSDCreator.cxx:38
 AliEveVSDCreator.cxx:39
 AliEveVSDCreator.cxx:40
 AliEveVSDCreator.cxx:41
 AliEveVSDCreator.cxx:42
 AliEveVSDCreator.cxx:43
 AliEveVSDCreator.cxx:44
 AliEveVSDCreator.cxx:45
 AliEveVSDCreator.cxx:46
 AliEveVSDCreator.cxx:47
 AliEveVSDCreator.cxx:48
 AliEveVSDCreator.cxx:49
 AliEveVSDCreator.cxx:50
 AliEveVSDCreator.cxx:51
 AliEveVSDCreator.cxx:52
 AliEveVSDCreator.cxx:53
 AliEveVSDCreator.cxx:54
 AliEveVSDCreator.cxx:55
 AliEveVSDCreator.cxx:56
 AliEveVSDCreator.cxx:57
 AliEveVSDCreator.cxx:58
 AliEveVSDCreator.cxx:59
 AliEveVSDCreator.cxx:60
 AliEveVSDCreator.cxx:61
 AliEveVSDCreator.cxx:62
 AliEveVSDCreator.cxx:63
 AliEveVSDCreator.cxx:64
 AliEveVSDCreator.cxx:65
 AliEveVSDCreator.cxx:66
 AliEveVSDCreator.cxx:67
 AliEveVSDCreator.cxx:68
 AliEveVSDCreator.cxx:69
 AliEveVSDCreator.cxx:70
 AliEveVSDCreator.cxx:71
 AliEveVSDCreator.cxx:72
 AliEveVSDCreator.cxx:73
 AliEveVSDCreator.cxx:74
 AliEveVSDCreator.cxx:75
 AliEveVSDCreator.cxx:76
 AliEveVSDCreator.cxx:77
 AliEveVSDCreator.cxx:78
 AliEveVSDCreator.cxx:79
 AliEveVSDCreator.cxx:80
 AliEveVSDCreator.cxx:81
 AliEveVSDCreator.cxx:82
 AliEveVSDCreator.cxx:83
 AliEveVSDCreator.cxx:84
 AliEveVSDCreator.cxx:85
 AliEveVSDCreator.cxx:86
 AliEveVSDCreator.cxx:87
 AliEveVSDCreator.cxx:88
 AliEveVSDCreator.cxx:89
 AliEveVSDCreator.cxx:90
 AliEveVSDCreator.cxx:91
 AliEveVSDCreator.cxx:92
 AliEveVSDCreator.cxx:93
 AliEveVSDCreator.cxx:94
 AliEveVSDCreator.cxx:95
 AliEveVSDCreator.cxx:96
 AliEveVSDCreator.cxx:97
 AliEveVSDCreator.cxx:98
 AliEveVSDCreator.cxx:99
 AliEveVSDCreator.cxx:100
 AliEveVSDCreator.cxx:101
 AliEveVSDCreator.cxx:102
 AliEveVSDCreator.cxx:103
 AliEveVSDCreator.cxx:104
 AliEveVSDCreator.cxx:105
 AliEveVSDCreator.cxx:106
 AliEveVSDCreator.cxx:107
 AliEveVSDCreator.cxx:108
 AliEveVSDCreator.cxx:109
 AliEveVSDCreator.cxx:110
 AliEveVSDCreator.cxx:111
 AliEveVSDCreator.cxx:112
 AliEveVSDCreator.cxx:113
 AliEveVSDCreator.cxx:114
 AliEveVSDCreator.cxx:115
 AliEveVSDCreator.cxx:116
 AliEveVSDCreator.cxx:117
 AliEveVSDCreator.cxx:118
 AliEveVSDCreator.cxx:119
 AliEveVSDCreator.cxx:120
 AliEveVSDCreator.cxx:121
 AliEveVSDCreator.cxx:122
 AliEveVSDCreator.cxx:123
 AliEveVSDCreator.cxx:124
 AliEveVSDCreator.cxx:125
 AliEveVSDCreator.cxx:126
 AliEveVSDCreator.cxx:127
 AliEveVSDCreator.cxx:128
 AliEveVSDCreator.cxx:129
 AliEveVSDCreator.cxx:130
 AliEveVSDCreator.cxx:131
 AliEveVSDCreator.cxx:132
 AliEveVSDCreator.cxx:133
 AliEveVSDCreator.cxx:134
 AliEveVSDCreator.cxx:135
 AliEveVSDCreator.cxx:136
 AliEveVSDCreator.cxx:137
 AliEveVSDCreator.cxx:138
 AliEveVSDCreator.cxx:139
 AliEveVSDCreator.cxx:140
 AliEveVSDCreator.cxx:141
 AliEveVSDCreator.cxx:142
 AliEveVSDCreator.cxx:143
 AliEveVSDCreator.cxx:144
 AliEveVSDCreator.cxx:145
 AliEveVSDCreator.cxx:146
 AliEveVSDCreator.cxx:147
 AliEveVSDCreator.cxx:148
 AliEveVSDCreator.cxx:149
 AliEveVSDCreator.cxx:150
 AliEveVSDCreator.cxx:151
 AliEveVSDCreator.cxx:152
 AliEveVSDCreator.cxx:153
 AliEveVSDCreator.cxx:154
 AliEveVSDCreator.cxx:155
 AliEveVSDCreator.cxx:156
 AliEveVSDCreator.cxx:157
 AliEveVSDCreator.cxx:158
 AliEveVSDCreator.cxx:159
 AliEveVSDCreator.cxx:160
 AliEveVSDCreator.cxx:161
 AliEveVSDCreator.cxx:162
 AliEveVSDCreator.cxx:163
 AliEveVSDCreator.cxx:164
 AliEveVSDCreator.cxx:165
 AliEveVSDCreator.cxx:166
 AliEveVSDCreator.cxx:167
 AliEveVSDCreator.cxx:168
 AliEveVSDCreator.cxx:169
 AliEveVSDCreator.cxx:170
 AliEveVSDCreator.cxx:171
 AliEveVSDCreator.cxx:172
 AliEveVSDCreator.cxx:173
 AliEveVSDCreator.cxx:174
 AliEveVSDCreator.cxx:175
 AliEveVSDCreator.cxx:176
 AliEveVSDCreator.cxx:177
 AliEveVSDCreator.cxx:178
 AliEveVSDCreator.cxx:179
 AliEveVSDCreator.cxx:180
 AliEveVSDCreator.cxx:181
 AliEveVSDCreator.cxx:182
 AliEveVSDCreator.cxx:183
 AliEveVSDCreator.cxx:184
 AliEveVSDCreator.cxx:185
 AliEveVSDCreator.cxx:186
 AliEveVSDCreator.cxx:187
 AliEveVSDCreator.cxx:188
 AliEveVSDCreator.cxx:189
 AliEveVSDCreator.cxx:190
 AliEveVSDCreator.cxx:191
 AliEveVSDCreator.cxx:192
 AliEveVSDCreator.cxx:193
 AliEveVSDCreator.cxx:194
 AliEveVSDCreator.cxx:195
 AliEveVSDCreator.cxx:196
 AliEveVSDCreator.cxx:197
 AliEveVSDCreator.cxx:198
 AliEveVSDCreator.cxx:199
 AliEveVSDCreator.cxx:200
 AliEveVSDCreator.cxx:201
 AliEveVSDCreator.cxx:202
 AliEveVSDCreator.cxx:203
 AliEveVSDCreator.cxx:204
 AliEveVSDCreator.cxx:205
 AliEveVSDCreator.cxx:206
 AliEveVSDCreator.cxx:207
 AliEveVSDCreator.cxx:208
 AliEveVSDCreator.cxx:209
 AliEveVSDCreator.cxx:210
 AliEveVSDCreator.cxx:211
 AliEveVSDCreator.cxx:212
 AliEveVSDCreator.cxx:213
 AliEveVSDCreator.cxx:214
 AliEveVSDCreator.cxx:215
 AliEveVSDCreator.cxx:216
 AliEveVSDCreator.cxx:217
 AliEveVSDCreator.cxx:218
 AliEveVSDCreator.cxx:219
 AliEveVSDCreator.cxx:220
 AliEveVSDCreator.cxx:221
 AliEveVSDCreator.cxx:222
 AliEveVSDCreator.cxx:223
 AliEveVSDCreator.cxx:224
 AliEveVSDCreator.cxx:225
 AliEveVSDCreator.cxx:226
 AliEveVSDCreator.cxx:227
 AliEveVSDCreator.cxx:228
 AliEveVSDCreator.cxx:229
 AliEveVSDCreator.cxx:230
 AliEveVSDCreator.cxx:231
 AliEveVSDCreator.cxx:232
 AliEveVSDCreator.cxx:233
 AliEveVSDCreator.cxx:234
 AliEveVSDCreator.cxx:235
 AliEveVSDCreator.cxx:236
 AliEveVSDCreator.cxx:237
 AliEveVSDCreator.cxx:238
 AliEveVSDCreator.cxx:239
 AliEveVSDCreator.cxx:240
 AliEveVSDCreator.cxx:241
 AliEveVSDCreator.cxx:242
 AliEveVSDCreator.cxx:243
 AliEveVSDCreator.cxx:244
 AliEveVSDCreator.cxx:245
 AliEveVSDCreator.cxx:246
 AliEveVSDCreator.cxx:247
 AliEveVSDCreator.cxx:248
 AliEveVSDCreator.cxx:249
 AliEveVSDCreator.cxx:250
 AliEveVSDCreator.cxx:251
 AliEveVSDCreator.cxx:252
 AliEveVSDCreator.cxx:253
 AliEveVSDCreator.cxx:254
 AliEveVSDCreator.cxx:255
 AliEveVSDCreator.cxx:256
 AliEveVSDCreator.cxx:257
 AliEveVSDCreator.cxx:258
 AliEveVSDCreator.cxx:259
 AliEveVSDCreator.cxx:260
 AliEveVSDCreator.cxx:261
 AliEveVSDCreator.cxx:262
 AliEveVSDCreator.cxx:263
 AliEveVSDCreator.cxx:264
 AliEveVSDCreator.cxx:265
 AliEveVSDCreator.cxx:266
 AliEveVSDCreator.cxx:267
 AliEveVSDCreator.cxx:268
 AliEveVSDCreator.cxx:269
 AliEveVSDCreator.cxx:270
 AliEveVSDCreator.cxx:271
 AliEveVSDCreator.cxx:272
 AliEveVSDCreator.cxx:273
 AliEveVSDCreator.cxx:274
 AliEveVSDCreator.cxx:275
 AliEveVSDCreator.cxx:276
 AliEveVSDCreator.cxx:277
 AliEveVSDCreator.cxx:278
 AliEveVSDCreator.cxx:279
 AliEveVSDCreator.cxx:280
 AliEveVSDCreator.cxx:281
 AliEveVSDCreator.cxx:282
 AliEveVSDCreator.cxx:283
 AliEveVSDCreator.cxx:284
 AliEveVSDCreator.cxx:285
 AliEveVSDCreator.cxx:286
 AliEveVSDCreator.cxx:287
 AliEveVSDCreator.cxx:288
 AliEveVSDCreator.cxx:289
 AliEveVSDCreator.cxx:290
 AliEveVSDCreator.cxx:291
 AliEveVSDCreator.cxx:292
 AliEveVSDCreator.cxx:293
 AliEveVSDCreator.cxx:294
 AliEveVSDCreator.cxx:295
 AliEveVSDCreator.cxx:296
 AliEveVSDCreator.cxx:297
 AliEveVSDCreator.cxx:298
 AliEveVSDCreator.cxx:299
 AliEveVSDCreator.cxx:300
 AliEveVSDCreator.cxx:301
 AliEveVSDCreator.cxx:302
 AliEveVSDCreator.cxx:303
 AliEveVSDCreator.cxx:304
 AliEveVSDCreator.cxx:305
 AliEveVSDCreator.cxx:306
 AliEveVSDCreator.cxx:307
 AliEveVSDCreator.cxx:308
 AliEveVSDCreator.cxx:309
 AliEveVSDCreator.cxx:310
 AliEveVSDCreator.cxx:311
 AliEveVSDCreator.cxx:312
 AliEveVSDCreator.cxx:313
 AliEveVSDCreator.cxx:314
 AliEveVSDCreator.cxx:315
 AliEveVSDCreator.cxx:316
 AliEveVSDCreator.cxx:317
 AliEveVSDCreator.cxx:318
 AliEveVSDCreator.cxx:319
 AliEveVSDCreator.cxx:320
 AliEveVSDCreator.cxx:321
 AliEveVSDCreator.cxx:322
 AliEveVSDCreator.cxx:323
 AliEveVSDCreator.cxx:324
 AliEveVSDCreator.cxx:325
 AliEveVSDCreator.cxx:326
 AliEveVSDCreator.cxx:327
 AliEveVSDCreator.cxx:328
 AliEveVSDCreator.cxx:329
 AliEveVSDCreator.cxx:330
 AliEveVSDCreator.cxx:331
 AliEveVSDCreator.cxx:332
 AliEveVSDCreator.cxx:333
 AliEveVSDCreator.cxx:334
 AliEveVSDCreator.cxx:335
 AliEveVSDCreator.cxx:336
 AliEveVSDCreator.cxx:337
 AliEveVSDCreator.cxx:338
 AliEveVSDCreator.cxx:339
 AliEveVSDCreator.cxx:340
 AliEveVSDCreator.cxx:341
 AliEveVSDCreator.cxx:342
 AliEveVSDCreator.cxx:343
 AliEveVSDCreator.cxx:344
 AliEveVSDCreator.cxx:345
 AliEveVSDCreator.cxx:346
 AliEveVSDCreator.cxx:347
 AliEveVSDCreator.cxx:348
 AliEveVSDCreator.cxx:349
 AliEveVSDCreator.cxx:350
 AliEveVSDCreator.cxx:351
 AliEveVSDCreator.cxx:352
 AliEveVSDCreator.cxx:353
 AliEveVSDCreator.cxx:354
 AliEveVSDCreator.cxx:355
 AliEveVSDCreator.cxx:356
 AliEveVSDCreator.cxx:357
 AliEveVSDCreator.cxx:358
 AliEveVSDCreator.cxx:359
 AliEveVSDCreator.cxx:360
 AliEveVSDCreator.cxx:361
 AliEveVSDCreator.cxx:362
 AliEveVSDCreator.cxx:363
 AliEveVSDCreator.cxx:364
 AliEveVSDCreator.cxx:365
 AliEveVSDCreator.cxx:366
 AliEveVSDCreator.cxx:367
 AliEveVSDCreator.cxx:368
 AliEveVSDCreator.cxx:369
 AliEveVSDCreator.cxx:370
 AliEveVSDCreator.cxx:371
 AliEveVSDCreator.cxx:372
 AliEveVSDCreator.cxx:373
 AliEveVSDCreator.cxx:374
 AliEveVSDCreator.cxx:375
 AliEveVSDCreator.cxx:376
 AliEveVSDCreator.cxx:377
 AliEveVSDCreator.cxx:378
 AliEveVSDCreator.cxx:379
 AliEveVSDCreator.cxx:380
 AliEveVSDCreator.cxx:381
 AliEveVSDCreator.cxx:382
 AliEveVSDCreator.cxx:383
 AliEveVSDCreator.cxx:384
 AliEveVSDCreator.cxx:385
 AliEveVSDCreator.cxx:386
 AliEveVSDCreator.cxx:387
 AliEveVSDCreator.cxx:388
 AliEveVSDCreator.cxx:389
 AliEveVSDCreator.cxx:390
 AliEveVSDCreator.cxx:391
 AliEveVSDCreator.cxx:392
 AliEveVSDCreator.cxx:393
 AliEveVSDCreator.cxx:394
 AliEveVSDCreator.cxx:395
 AliEveVSDCreator.cxx:396
 AliEveVSDCreator.cxx:397
 AliEveVSDCreator.cxx:398
 AliEveVSDCreator.cxx:399
 AliEveVSDCreator.cxx:400
 AliEveVSDCreator.cxx:401
 AliEveVSDCreator.cxx:402
 AliEveVSDCreator.cxx:403
 AliEveVSDCreator.cxx:404
 AliEveVSDCreator.cxx:405
 AliEveVSDCreator.cxx:406
 AliEveVSDCreator.cxx:407
 AliEveVSDCreator.cxx:408
 AliEveVSDCreator.cxx:409
 AliEveVSDCreator.cxx:410
 AliEveVSDCreator.cxx:411
 AliEveVSDCreator.cxx:412
 AliEveVSDCreator.cxx:413
 AliEveVSDCreator.cxx:414
 AliEveVSDCreator.cxx:415
 AliEveVSDCreator.cxx:416
 AliEveVSDCreator.cxx:417
 AliEveVSDCreator.cxx:418
 AliEveVSDCreator.cxx:419
 AliEveVSDCreator.cxx:420
 AliEveVSDCreator.cxx:421
 AliEveVSDCreator.cxx:422
 AliEveVSDCreator.cxx:423
 AliEveVSDCreator.cxx:424
 AliEveVSDCreator.cxx:425
 AliEveVSDCreator.cxx:426
 AliEveVSDCreator.cxx:427
 AliEveVSDCreator.cxx:428
 AliEveVSDCreator.cxx:429
 AliEveVSDCreator.cxx:430
 AliEveVSDCreator.cxx:431
 AliEveVSDCreator.cxx:432
 AliEveVSDCreator.cxx:433
 AliEveVSDCreator.cxx:434
 AliEveVSDCreator.cxx:435
 AliEveVSDCreator.cxx:436
 AliEveVSDCreator.cxx:437
 AliEveVSDCreator.cxx:438
 AliEveVSDCreator.cxx:439
 AliEveVSDCreator.cxx:440
 AliEveVSDCreator.cxx:441
 AliEveVSDCreator.cxx:442
 AliEveVSDCreator.cxx:443
 AliEveVSDCreator.cxx:444
 AliEveVSDCreator.cxx:445
 AliEveVSDCreator.cxx:446
 AliEveVSDCreator.cxx:447
 AliEveVSDCreator.cxx:448
 AliEveVSDCreator.cxx:449
 AliEveVSDCreator.cxx:450
 AliEveVSDCreator.cxx:451
 AliEveVSDCreator.cxx:452
 AliEveVSDCreator.cxx:453
 AliEveVSDCreator.cxx:454
 AliEveVSDCreator.cxx:455
 AliEveVSDCreator.cxx:456
 AliEveVSDCreator.cxx:457
 AliEveVSDCreator.cxx:458
 AliEveVSDCreator.cxx:459
 AliEveVSDCreator.cxx:460
 AliEveVSDCreator.cxx:461
 AliEveVSDCreator.cxx:462
 AliEveVSDCreator.cxx:463
 AliEveVSDCreator.cxx:464
 AliEveVSDCreator.cxx:465
 AliEveVSDCreator.cxx:466
 AliEveVSDCreator.cxx:467
 AliEveVSDCreator.cxx:468
 AliEveVSDCreator.cxx:469
 AliEveVSDCreator.cxx:470
 AliEveVSDCreator.cxx:471
 AliEveVSDCreator.cxx:472
 AliEveVSDCreator.cxx:473
 AliEveVSDCreator.cxx:474
 AliEveVSDCreator.cxx:475
 AliEveVSDCreator.cxx:476
 AliEveVSDCreator.cxx:477
 AliEveVSDCreator.cxx:478
 AliEveVSDCreator.cxx:479
 AliEveVSDCreator.cxx:480
 AliEveVSDCreator.cxx:481
 AliEveVSDCreator.cxx:482
 AliEveVSDCreator.cxx:483
 AliEveVSDCreator.cxx:484
 AliEveVSDCreator.cxx:485
 AliEveVSDCreator.cxx:486
 AliEveVSDCreator.cxx:487
 AliEveVSDCreator.cxx:488
 AliEveVSDCreator.cxx:489
 AliEveVSDCreator.cxx:490
 AliEveVSDCreator.cxx:491
 AliEveVSDCreator.cxx:492
 AliEveVSDCreator.cxx:493
 AliEveVSDCreator.cxx:494
 AliEveVSDCreator.cxx:495
 AliEveVSDCreator.cxx:496
 AliEveVSDCreator.cxx:497
 AliEveVSDCreator.cxx:498
 AliEveVSDCreator.cxx:499
 AliEveVSDCreator.cxx:500
 AliEveVSDCreator.cxx:501
 AliEveVSDCreator.cxx:502
 AliEveVSDCreator.cxx:503
 AliEveVSDCreator.cxx:504
 AliEveVSDCreator.cxx:505
 AliEveVSDCreator.cxx:506
 AliEveVSDCreator.cxx:507
 AliEveVSDCreator.cxx:508
 AliEveVSDCreator.cxx:509
 AliEveVSDCreator.cxx:510
 AliEveVSDCreator.cxx:511
 AliEveVSDCreator.cxx:512
 AliEveVSDCreator.cxx:513
 AliEveVSDCreator.cxx:514
 AliEveVSDCreator.cxx:515
 AliEveVSDCreator.cxx:516
 AliEveVSDCreator.cxx:517
 AliEveVSDCreator.cxx:518
 AliEveVSDCreator.cxx:519
 AliEveVSDCreator.cxx:520
 AliEveVSDCreator.cxx:521
 AliEveVSDCreator.cxx:522
 AliEveVSDCreator.cxx:523
 AliEveVSDCreator.cxx:524
 AliEveVSDCreator.cxx:525
 AliEveVSDCreator.cxx:526
 AliEveVSDCreator.cxx:527
 AliEveVSDCreator.cxx:528
 AliEveVSDCreator.cxx:529
 AliEveVSDCreator.cxx:530
 AliEveVSDCreator.cxx:531
 AliEveVSDCreator.cxx:532
 AliEveVSDCreator.cxx:533
 AliEveVSDCreator.cxx:534
 AliEveVSDCreator.cxx:535
 AliEveVSDCreator.cxx:536
 AliEveVSDCreator.cxx:537
 AliEveVSDCreator.cxx:538
 AliEveVSDCreator.cxx:539
 AliEveVSDCreator.cxx:540
 AliEveVSDCreator.cxx:541
 AliEveVSDCreator.cxx:542
 AliEveVSDCreator.cxx:543
 AliEveVSDCreator.cxx:544
 AliEveVSDCreator.cxx:545
 AliEveVSDCreator.cxx:546
 AliEveVSDCreator.cxx:547
 AliEveVSDCreator.cxx:548
 AliEveVSDCreator.cxx:549
 AliEveVSDCreator.cxx:550
 AliEveVSDCreator.cxx:551
 AliEveVSDCreator.cxx:552
 AliEveVSDCreator.cxx:553
 AliEveVSDCreator.cxx:554
 AliEveVSDCreator.cxx:555
 AliEveVSDCreator.cxx:556
 AliEveVSDCreator.cxx:557
 AliEveVSDCreator.cxx:558
 AliEveVSDCreator.cxx:559
 AliEveVSDCreator.cxx:560
 AliEveVSDCreator.cxx:561
 AliEveVSDCreator.cxx:562
 AliEveVSDCreator.cxx:563
 AliEveVSDCreator.cxx:564
 AliEveVSDCreator.cxx:565
 AliEveVSDCreator.cxx:566
 AliEveVSDCreator.cxx:567
 AliEveVSDCreator.cxx:568
 AliEveVSDCreator.cxx:569
 AliEveVSDCreator.cxx:570
 AliEveVSDCreator.cxx:571
 AliEveVSDCreator.cxx:572
 AliEveVSDCreator.cxx:573
 AliEveVSDCreator.cxx:574
 AliEveVSDCreator.cxx:575
 AliEveVSDCreator.cxx:576
 AliEveVSDCreator.cxx:577
 AliEveVSDCreator.cxx:578
 AliEveVSDCreator.cxx:579
 AliEveVSDCreator.cxx:580
 AliEveVSDCreator.cxx:581
 AliEveVSDCreator.cxx:582
 AliEveVSDCreator.cxx:583
 AliEveVSDCreator.cxx:584
 AliEveVSDCreator.cxx:585
 AliEveVSDCreator.cxx:586
 AliEveVSDCreator.cxx:587
 AliEveVSDCreator.cxx:588
 AliEveVSDCreator.cxx:589
 AliEveVSDCreator.cxx:590
 AliEveVSDCreator.cxx:591
 AliEveVSDCreator.cxx:592
 AliEveVSDCreator.cxx:593
 AliEveVSDCreator.cxx:594
 AliEveVSDCreator.cxx:595
 AliEveVSDCreator.cxx:596
 AliEveVSDCreator.cxx:597
 AliEveVSDCreator.cxx:598
 AliEveVSDCreator.cxx:599
 AliEveVSDCreator.cxx:600
 AliEveVSDCreator.cxx:601
 AliEveVSDCreator.cxx:602
 AliEveVSDCreator.cxx:603
 AliEveVSDCreator.cxx:604
 AliEveVSDCreator.cxx:605
 AliEveVSDCreator.cxx:606
 AliEveVSDCreator.cxx:607
 AliEveVSDCreator.cxx:608
 AliEveVSDCreator.cxx:609
 AliEveVSDCreator.cxx:610
 AliEveVSDCreator.cxx:611
 AliEveVSDCreator.cxx:612
 AliEveVSDCreator.cxx:613
 AliEveVSDCreator.cxx:614
 AliEveVSDCreator.cxx:615
 AliEveVSDCreator.cxx:616
 AliEveVSDCreator.cxx:617
 AliEveVSDCreator.cxx:618
 AliEveVSDCreator.cxx:619
 AliEveVSDCreator.cxx:620
 AliEveVSDCreator.cxx:621
 AliEveVSDCreator.cxx:622
 AliEveVSDCreator.cxx:623
 AliEveVSDCreator.cxx:624
 AliEveVSDCreator.cxx:625
 AliEveVSDCreator.cxx:626
 AliEveVSDCreator.cxx:627
 AliEveVSDCreator.cxx:628
 AliEveVSDCreator.cxx:629
 AliEveVSDCreator.cxx:630
 AliEveVSDCreator.cxx:631
 AliEveVSDCreator.cxx:632
 AliEveVSDCreator.cxx:633
 AliEveVSDCreator.cxx:634
 AliEveVSDCreator.cxx:635
 AliEveVSDCreator.cxx:636
 AliEveVSDCreator.cxx:637
 AliEveVSDCreator.cxx:638
 AliEveVSDCreator.cxx:639
 AliEveVSDCreator.cxx:640
 AliEveVSDCreator.cxx:641
 AliEveVSDCreator.cxx:642
 AliEveVSDCreator.cxx:643
 AliEveVSDCreator.cxx:644
 AliEveVSDCreator.cxx:645
 AliEveVSDCreator.cxx:646
 AliEveVSDCreator.cxx:647
 AliEveVSDCreator.cxx:648
 AliEveVSDCreator.cxx:649
 AliEveVSDCreator.cxx:650
 AliEveVSDCreator.cxx:651
 AliEveVSDCreator.cxx:652
 AliEveVSDCreator.cxx:653
 AliEveVSDCreator.cxx:654
 AliEveVSDCreator.cxx:655
 AliEveVSDCreator.cxx:656
 AliEveVSDCreator.cxx:657
 AliEveVSDCreator.cxx:658
 AliEveVSDCreator.cxx:659
 AliEveVSDCreator.cxx:660
 AliEveVSDCreator.cxx:661
 AliEveVSDCreator.cxx:662
 AliEveVSDCreator.cxx:663
 AliEveVSDCreator.cxx:664
 AliEveVSDCreator.cxx:665
 AliEveVSDCreator.cxx:666
 AliEveVSDCreator.cxx:667
 AliEveVSDCreator.cxx:668
 AliEveVSDCreator.cxx:669
 AliEveVSDCreator.cxx:670
 AliEveVSDCreator.cxx:671
 AliEveVSDCreator.cxx:672
 AliEveVSDCreator.cxx:673
 AliEveVSDCreator.cxx:674
 AliEveVSDCreator.cxx:675
 AliEveVSDCreator.cxx:676
 AliEveVSDCreator.cxx:677
 AliEveVSDCreator.cxx:678
 AliEveVSDCreator.cxx:679
 AliEveVSDCreator.cxx:680
 AliEveVSDCreator.cxx:681
 AliEveVSDCreator.cxx:682
 AliEveVSDCreator.cxx:683
 AliEveVSDCreator.cxx:684
 AliEveVSDCreator.cxx:685
 AliEveVSDCreator.cxx:686
 AliEveVSDCreator.cxx:687
 AliEveVSDCreator.cxx:688
 AliEveVSDCreator.cxx:689
 AliEveVSDCreator.cxx:690
 AliEveVSDCreator.cxx:691
 AliEveVSDCreator.cxx:692
 AliEveVSDCreator.cxx:693
 AliEveVSDCreator.cxx:694
 AliEveVSDCreator.cxx:695
 AliEveVSDCreator.cxx:696
 AliEveVSDCreator.cxx:697
 AliEveVSDCreator.cxx:698
 AliEveVSDCreator.cxx:699
 AliEveVSDCreator.cxx:700
 AliEveVSDCreator.cxx:701
 AliEveVSDCreator.cxx:702
 AliEveVSDCreator.cxx:703
 AliEveVSDCreator.cxx:704
 AliEveVSDCreator.cxx:705
 AliEveVSDCreator.cxx:706
 AliEveVSDCreator.cxx:707
 AliEveVSDCreator.cxx:708
 AliEveVSDCreator.cxx:709
 AliEveVSDCreator.cxx:710
 AliEveVSDCreator.cxx:711
 AliEveVSDCreator.cxx:712
 AliEveVSDCreator.cxx:713
 AliEveVSDCreator.cxx:714
 AliEveVSDCreator.cxx:715
 AliEveVSDCreator.cxx:716
 AliEveVSDCreator.cxx:717
 AliEveVSDCreator.cxx:718
 AliEveVSDCreator.cxx:719
 AliEveVSDCreator.cxx:720
 AliEveVSDCreator.cxx:721
 AliEveVSDCreator.cxx:722
 AliEveVSDCreator.cxx:723
 AliEveVSDCreator.cxx:724
 AliEveVSDCreator.cxx:725
 AliEveVSDCreator.cxx:726
 AliEveVSDCreator.cxx:727
 AliEveVSDCreator.cxx:728
 AliEveVSDCreator.cxx:729
 AliEveVSDCreator.cxx:730
 AliEveVSDCreator.cxx:731
 AliEveVSDCreator.cxx:732
 AliEveVSDCreator.cxx:733
 AliEveVSDCreator.cxx:734
 AliEveVSDCreator.cxx:735
 AliEveVSDCreator.cxx:736
 AliEveVSDCreator.cxx:737
 AliEveVSDCreator.cxx:738
 AliEveVSDCreator.cxx:739
 AliEveVSDCreator.cxx:740
 AliEveVSDCreator.cxx:741
 AliEveVSDCreator.cxx:742
 AliEveVSDCreator.cxx:743
 AliEveVSDCreator.cxx:744
 AliEveVSDCreator.cxx:745
 AliEveVSDCreator.cxx:746
 AliEveVSDCreator.cxx:747
 AliEveVSDCreator.cxx:748
 AliEveVSDCreator.cxx:749
 AliEveVSDCreator.cxx:750
 AliEveVSDCreator.cxx:751
 AliEveVSDCreator.cxx:752
 AliEveVSDCreator.cxx:753
 AliEveVSDCreator.cxx:754
 AliEveVSDCreator.cxx:755
 AliEveVSDCreator.cxx:756
 AliEveVSDCreator.cxx:757
 AliEveVSDCreator.cxx:758
 AliEveVSDCreator.cxx:759
 AliEveVSDCreator.cxx:760
 AliEveVSDCreator.cxx:761
 AliEveVSDCreator.cxx:762
 AliEveVSDCreator.cxx:763
 AliEveVSDCreator.cxx:764
 AliEveVSDCreator.cxx:765
 AliEveVSDCreator.cxx:766
 AliEveVSDCreator.cxx:767
 AliEveVSDCreator.cxx:768
 AliEveVSDCreator.cxx:769
 AliEveVSDCreator.cxx:770
 AliEveVSDCreator.cxx:771
 AliEveVSDCreator.cxx:772
 AliEveVSDCreator.cxx:773
 AliEveVSDCreator.cxx:774
 AliEveVSDCreator.cxx:775
 AliEveVSDCreator.cxx:776
 AliEveVSDCreator.cxx:777
 AliEveVSDCreator.cxx:778
 AliEveVSDCreator.cxx:779
 AliEveVSDCreator.cxx:780
 AliEveVSDCreator.cxx:781
 AliEveVSDCreator.cxx:782
 AliEveVSDCreator.cxx:783
 AliEveVSDCreator.cxx:784
 AliEveVSDCreator.cxx:785
 AliEveVSDCreator.cxx:786
 AliEveVSDCreator.cxx:787
 AliEveVSDCreator.cxx:788
 AliEveVSDCreator.cxx:789
 AliEveVSDCreator.cxx:790
 AliEveVSDCreator.cxx:791
 AliEveVSDCreator.cxx:792
 AliEveVSDCreator.cxx:793
 AliEveVSDCreator.cxx:794
 AliEveVSDCreator.cxx:795
 AliEveVSDCreator.cxx:796
 AliEveVSDCreator.cxx:797
 AliEveVSDCreator.cxx:798
 AliEveVSDCreator.cxx:799
 AliEveVSDCreator.cxx:800
 AliEveVSDCreator.cxx:801
 AliEveVSDCreator.cxx:802
 AliEveVSDCreator.cxx:803
 AliEveVSDCreator.cxx:804
 AliEveVSDCreator.cxx:805
 AliEveVSDCreator.cxx:806
 AliEveVSDCreator.cxx:807
 AliEveVSDCreator.cxx:808
 AliEveVSDCreator.cxx:809
 AliEveVSDCreator.cxx:810
 AliEveVSDCreator.cxx:811
 AliEveVSDCreator.cxx:812
 AliEveVSDCreator.cxx:813
 AliEveVSDCreator.cxx:814
 AliEveVSDCreator.cxx:815
 AliEveVSDCreator.cxx:816
 AliEveVSDCreator.cxx:817
 AliEveVSDCreator.cxx:818
 AliEveVSDCreator.cxx:819
 AliEveVSDCreator.cxx:820
 AliEveVSDCreator.cxx:821
 AliEveVSDCreator.cxx:822
 AliEveVSDCreator.cxx:823
 AliEveVSDCreator.cxx:824
 AliEveVSDCreator.cxx:825
 AliEveVSDCreator.cxx:826
 AliEveVSDCreator.cxx:827
 AliEveVSDCreator.cxx:828
 AliEveVSDCreator.cxx:829
 AliEveVSDCreator.cxx:830
 AliEveVSDCreator.cxx:831
 AliEveVSDCreator.cxx:832
 AliEveVSDCreator.cxx:833
 AliEveVSDCreator.cxx:834
 AliEveVSDCreator.cxx:835
 AliEveVSDCreator.cxx:836
 AliEveVSDCreator.cxx:837
 AliEveVSDCreator.cxx:838
 AliEveVSDCreator.cxx:839
 AliEveVSDCreator.cxx:840
 AliEveVSDCreator.cxx:841
 AliEveVSDCreator.cxx:842
 AliEveVSDCreator.cxx:843
 AliEveVSDCreator.cxx:844
 AliEveVSDCreator.cxx:845
 AliEveVSDCreator.cxx:846
 AliEveVSDCreator.cxx:847
 AliEveVSDCreator.cxx:848
 AliEveVSDCreator.cxx:849
 AliEveVSDCreator.cxx:850
 AliEveVSDCreator.cxx:851
 AliEveVSDCreator.cxx:852
 AliEveVSDCreator.cxx:853
 AliEveVSDCreator.cxx:854
 AliEveVSDCreator.cxx:855
 AliEveVSDCreator.cxx:856
 AliEveVSDCreator.cxx:857
 AliEveVSDCreator.cxx:858
 AliEveVSDCreator.cxx:859
 AliEveVSDCreator.cxx:860
 AliEveVSDCreator.cxx:861
 AliEveVSDCreator.cxx:862
 AliEveVSDCreator.cxx:863
 AliEveVSDCreator.cxx:864
 AliEveVSDCreator.cxx:865
 AliEveVSDCreator.cxx:866
 AliEveVSDCreator.cxx:867
 AliEveVSDCreator.cxx:868
 AliEveVSDCreator.cxx:869
 AliEveVSDCreator.cxx:870
 AliEveVSDCreator.cxx:871