-// $Id: tpc_clusters.C 23497 2008-01-23 20:43:14Z mtadel $
+// $Id$
// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/**************************************************************************
* full copyright notice. *
**************************************************************************/
-#ifdef __CINT__
-class TEvePointSet;
-class TEveElement;
-#else
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TObjArray.h>
+#include <TTree.h>
#include <TEveManager.h>
+#include <TEveElement.h>
#include <TEvePointSet.h>
-#include <EveBase/AliEveEventManager.h>
+#include <TGeoMatrix.h>
-#include "AliRunLoader.h"
-#include "AliCluster.h"
-#include "TRD/AliTRDcluster.h"
+#include <AliCluster.h>
+#include <AliGeomManager.h>
+#include <AliRunLoader.h>
+#include <AliTRDcluster.h>
+#include <AliEveEventManager.h>
+#else
+class TEvePointSet;
+class TEveElement;
#endif
TEvePointSet* trd_clusters(TEveElement *cont = 0)
TEvePointSet *clusters = new TEvePointSet(kMaxClusters);
clusters->SetOwnIds(kTRUE);
-
Int_t nentr=(Int_t)recPoints->GetEntries();
for (Int_t i=0; i<nentr; i++) {
if (!recPoints->GetEvent(i)) continue;
while (ncl--) {
AliTRDcluster *c = (AliTRDcluster*)TRDcluster->UncheckedAt(ncl);
- Float_t g[3]; //global coordinates
- c->GetGlobalXYZ(g);
- clusters->SetNextPoint(g[0], g[1], g[2]);
+ //Float_t g[3]; //global coordinates
+ //c->GetGlobalXYZ(g);
+
+ Int_t fVolumeId = c->GetVolumeId();
+ const TGeoHMatrix *mt =AliGeomManager::GetTracking2LocalMatrix(fVolumeId);;
+ Double_t txyz[3] = {c->GetX(), c->GetY(), c->GetZ()};
+ Double_t lxyz[3] = {0, 0, 0};
+ mt->LocalToMaster(txyz,lxyz);
+
+ TGeoHMatrix *mlIdeal = AliGeomManager::GetOrigGlobalMatrix(fVolumeId);
+ Double_t gxyzIdeal[3] = {0, 0, 0};
+ mlIdeal->LocalToMaster(lxyz,gxyzIdeal);
+
+ clusters->SetNextPoint(gxyzIdeal[0], gxyzIdeal[1], gxyzIdeal[2]);
+
AliCluster *atp = new AliCluster(*c);
clusters->SetPointId(atp);
}
return 0;
}
- char form[1000];
- sprintf(form,"TRD Clusters");
- clusters->SetName(form);
+ clusters->SetName("TRD Clusters");
+
+ clusters->SetTitle(Form("N=%d", clusters->Size()));
- char tip[1000];
- sprintf(tip,"N=%d", clusters->Size());
- clusters->SetTitle(tip);
+ const TString viz_tag("REC Clusters TRD");
- const TString viz_tag("TRD Clusters");
- // when going to new root call:
- // clusters->ApplyVizTag(viz_tag, "Clusters");
- clusters->ApplyVizTag(viz_tag);
+ clusters->ApplyVizTag(viz_tag, "Clusters");
gEve->AddElement(clusters, cont);