* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.4.6.1 2002/07/24 10:09:30 alibrary
-Updating VirtualMC
-
-Revision 1.5 2002/06/12 09:54:35 cblume
-Update of tracking code provided by Sergei
-
-Revision 1.4 2001/11/19 08:44:08 cblume
-Fix bugs reported by Rene
-
-Revision 1.3 2001/11/14 10:50:46 cblume
-Changes in digits IO. Add merging of summable digits
-
-Revision 1.2 2001/11/06 17:19:41 cblume
-Add detailed geometry and simple simulator
-
-Revision 1.1 2001/05/07 08:08:05 cblume
-Update of TRD code
-
-*/
+/* $Id$ */
///////////////////////////////////////////////////////////////////////////////
// //
#include <TParticle.h>
#include "AliRun.h"
-#include "AliTRD.h"
#include "AliTRDpid.h"
#include "AliTRDcluster.h"
#include "AliTRDtrack.h"
#include "AliTRDtracker.h"
#include "AliTRDgeometry.h"
+#include "AliMC.h"
ClassImp(AliTRDpid)
}
//_____________________________________________________________________________
-AliTRDpid::AliTRDpid(const AliTRDpid &p)
+AliTRDpid::AliTRDpid(const AliTRDpid &p):TNamed(p)
{
//
// AliTRDpid copy constructor
}
gAlice->GetEvent(event);
- AliTRD *trd = (AliTRD *) gAlice->GetDetector("TRD");
- if (!trd) {
- printf("AliTRDpid::ReadKine -- ");
- printf("No TRD object found\n");
- return kFALSE;
- }
-
- fGeometry = trd->GetGeometry();
+ fGeometry = AliTRDgeometry::GetGeometry(gAlice->GetRunLoader());
if (!fGeometry) {
printf("AliTRDpid::ReadKine -- ");
printf("No TRD geometry found\n");
printf("Open file %s\n",name);
AliTRDtracker *tracker = new AliTRDtracker();
- tracker->ReadClusters(fClusterArray,name);
+ TFile* file = TFile::Open(name);
+ file->cd("Event0");
+ TTree* tree = (TTree*) file->Get("TreeD");
+ tracker->ReadClusters(fClusterArray,tree);
+ file->Close();
+ delete file;
if (!fClusterArray) {
printf("AliTRDpid::ReadCluster -- ");
}
if (accept) {
- particle = gAlice->Particle(track0);
+ particle = gAlice->GetMCApp()->Particle(track0);
if (particle->GetFirstMother() == -1) {
switch (TMath::Abs(particle->GetPdgCode())) {
case kPdgEl:
Int_t trackIndex = cluster->GetLabel(iTrack);
if (trackIndex >= 0) {
- particle = gAlice->Particle(trackIndex);
+ particle = gAlice->GetMCApp()->Particle(trackIndex);
Int_t pdgCode = particle->GetPdgCode();
Bool_t newPart = kTRUE;
for (iPart = 0; iPart < nPart; iPart++) {