///////////////////////////////////////////////////////////////////////////////
// //
-// Particles stack class
+// Particles stack class //
+// Implements the TMCVirtualStack of the Virtual Monte Carlo //
+// Holds the particles transported during simulation //
+// Is used to compare results of reconstruction with simulation //
+// Author A.Morsch //
// //
///////////////////////////////////////////////////////////////////////////////
-#include <TFile.h>
-#include <TFolder.h>
#include <TObjArray.h>
#include <TParticle.h>
#include <TParticlePDG.h>
#include "AliHit.h"
#include "AliModule.h"
#include "AliRun.h"
+#include "AliMC.h"
#include "AliRunLoader.h"
#include "AliStack.h"
fCurrentPrimary(-1),
fHgwmk(0),
fLoadPoint(0),
- fEventFolderName(AliConfig::fgkDefaultEventFolderName)
+ fEventFolderName(AliConfig::GetDefaultEventFolderName())
{
//
// Default constructor
}
//_______________________________________________________________________
-void AliStack::Copy(AliStack&) const
+void AliStack::Copy(TObject&) const
{
Fatal("Copy","Not implemented!\n");
}
}
// Now loop on all registered hit lists
- TList* hitLists = gAlice->GetHitLists();
+ TList* hitLists = gAlice->GetMCApp()->GetHitLists();
TIter next(hitLists);
TCollection *hitList;
while((hitList = dynamic_cast<TCollection*>(next()))) {
// This for detectors which have a special mapping mechanism
// for hits, such as TPC and TRD
//
-
+
TObjArray* modules = gAlice->Modules();
TIter nextmod(modules);
AliModule *detector;
detector->RemapTrackHitIDs(map.GetArray());
detector->RemapTrackReferencesIDs(map.GetArray());
}
-
+ //
+ gAlice->GetMCApp()->RemapTrackReferencesIDs(map.GetArray());
+
// Now the output bit, from fHgwmk to nkeep we write everything and we erase
if(nkeep>fParticleFileMap.GetSize()) fParticleFileMap.Set(Int_t (nkeep*1.5));
return 0x0;//pro forma
}
fTreeK = rl->TreeK();
- if ( fTreeK == 0x0)
+ if ( fTreeK )
{
- Error("TreeK","Can not get TreeK from RL. Ev. Folder is %s",fEventFolderName.Data());
+ ConnectTree();
}
else
{
- ConnectTree();
+ //don't panic - could be Lego
+ if (AliLoader::GetDebug())
+ {
+ Warning("TreeK","Can not get TreeK from RL. Ev. Folder is %s",fEventFolderName.Data());
+ }
}
}
return fTreeK;//never reached
//
// Creates branch for writing particles
//
- if (AliLoader::fgDebug) Info("ConnectTree","Connecting TreeK");
+ if (AliLoader::GetDebug()) Info("ConnectTree","Connecting TreeK");
if (fTreeK == 0x0)
{
if (TreeK() == 0x0)
// Create a branch for particles
- if (AliLoader::fgDebug)
+ if (AliLoader::GetDebug())
Info("ConnectTree","Tree name is %s",fTreeK->GetName());
if (fTreeK->GetDirectory())
{
- if (AliLoader::fgDebug)
+ if (AliLoader::GetDebug())
Info("ConnectTree","and dir is %s",fTreeK->GetDirectory()->GetName());
}
else
Warning("ConnectTree","DIR IS NOT SET !!!");
- TBranch *branch=fTreeK->GetBranch(AliRunLoader::fgkKineBranchName);
+ TBranch *branch=fTreeK->GetBranch(AliRunLoader::GetKineBranchName());
if(branch == 0x0)
{
- branch = fTreeK->Branch(AliRunLoader::fgkKineBranchName, "TParticle", &fParticleBuffer, 4000);
- if (AliLoader::fgDebug) Info("ConnectTree","Creating Branch in Tree");
+ branch = fTreeK->Branch(AliRunLoader::GetKineBranchName(), "TParticle", &fParticleBuffer, 4000);
+ if (AliLoader::GetDebug()) Info("ConnectTree","Creating Branch in Tree");
}
else
{
- if (AliLoader::fgDebug) Info("ConnectTree","Branch Found in Tree");
+ if (AliLoader::GetDebug()) Info("ConnectTree","Branch Found in Tree");
branch->SetAddress(&fParticleBuffer);
}
if (branch->GetDirectory())
{
- if (AliLoader::fgDebug)
+ if (AliLoader::GetDebug())
Info("ConnectTree","Branch Dir Name is %s",branch->GetDirectory()->GetName());
}
else