#include "TCanvas.h"
#include "AliHLTEveBase.h"
#include "TEveBoxSet.h"
-#include "AliPHOSGeometry.h"
#include "TVector3.h"
-#include "AliEveHOMERManager.h"
+#include "AliEveHLTEventManager.h"
#include "TEveManager.h"
#include "AliHLTCaloDigitDataStruct.h"
#include "AliHLTCaloClusterDataStruct.h"
#include "TEveTrans.h"
#include "TGeoNode.h"
#include "AliEMCALGeoUtils.h"
+#include "TGeoManager.h"
+
+#include "TEveGeoShapeExtract.h"
+#include "TEveGeoNode.h"
ClassImp(AliHLTEveEmcal)
{
//Constructor
fGeoUtils = new AliEMCALGeoUtils("EMCAL_COMPLETE","EMCAL");
+ CreateElementList();
}
//Destructor, not implemented
}
-TEveElementList * AliHLTEveEmcal::CreateElementList() {
+void AliHLTEveEmcal::CreateElementList() {
- TGeoNode * gEMCALNode = fEventManager->GetGeoManager()->GetTopVolume()->FindNode("XEN1_1");
-
- fElementList = new TEveElementList("EMCAL Digits / Clusters");
- fElementList->SetTitle("Tooltip");
+ TGeoNode * gEMCALNode = gGeoManager->GetTopVolume()->FindNode("XEN1_1");
//gStyle->SetPalette(1, 0);
TEveRGBAPalette* pal = new TEveRGBAPalette(0, 512);
fBoxSetDigits[sm].RefMainTrans().SetFrom(*gEMCALNode->GetDaughter(sm)->GetMatrix());
fBoxSetDigits[sm].SetPalette(pal);
- fElementList->AddElement(&fBoxSetDigits[sm]);
+ AddElement(&fBoxSetDigits[sm]);
//Clusters
fBoxSetClusters[sm].SetTitle(Form("Clusters Module %d", sm));
fBoxSetClusters[sm].SetOwnIds(kTRUE);
fBoxSetClusters[sm].Reset(TEveBoxSet::kBT_AABox, kFALSE, 64);
- // fBoxSetClusters[sm].RefMainTrans().SetFrom(*gEMCALNode->GetDaughter(sm)->GetMatrix());
+ fBoxSetClusters[sm].RefMainTrans().SetFrom(*gEMCALNode->GetDaughter(sm)->GetMatrix());
fBoxSetClusters[sm].SetPalette(pal);
- fElementList->AddElement(&fBoxSetClusters[sm]);
+ AddElement(&fBoxSetClusters[sm]);
}
-
- return fElementList;
}
void AliHLTEveEmcal::AddClusters(Float_t * pos, Int_t module, Float_t energy) {
//See header file for documentation
- fBoxSetClusters[module].AddBox(pos[0], pos[1], pos[2], 6.1, 200*energy, 6.1);
+ TVector3 vec(pos);
+ Int_t absId = -1;
+ fGeoUtils->GetAbsCellIdFromEtaPhi(vec.Eta(), vec.Phi(), absId);
+
+ TVector3 localVec;
+ fGeoUtils->RelPosCellInSModule(absId, localVec);
+ fBoxSetClusters[module].AddBox(15, localVec[0], localVec[2], energy, 6.0, 6.0);
fBoxSetClusters[module].DigitValue(static_cast<Int_t>(energy));
- cout << "Cluster " << pos[0] << " " << pos[1] << " " << pos[2] << endl;
+ //cout << "Cluster " << pos[0] << " " << pos[1] << " " << pos[2] << endl;
}
void AliHLTEveEmcal::AddDigits(UShort_t fX, UShort_t fZ, Int_t module, Float_t energy) {
//See header file for documentation
- Int_t absid = fGeoUtils->GetAbsCellIdFromCellIndexes(module, fZ, fX);
+ //Float_t x = (fX - 24)* 6.0;
+ //Float_t z = (fZ - 48) * 6.0;
+
+ Int_t absid = fGeoUtils->GetAbsCellIdFromCellIndexes(module, fX, fZ);
Double_t posX, posY, posZ;
if(fGeoUtils->RelPosCellInSModule(absid, posX, posY, posZ)) {
cout << "digits " << posX << " " << posY << " " << posZ << endl;
- fBoxSetDigits[module].AddBox(15, posY, posZ, energy*100, 6.1, 6.1);
+ fBoxSetDigits[module].AddBox(15, posY, posZ, energy*10, 6.0, 6.0);
+
fBoxSetDigits[module].DigitValue(static_cast<Int_t>(energy));
} else {
cout <<"AliHLTEveEmcal::AddClusters: fail"<<endl;