#include <AliMUONDigitMaker.h>
#include <AliMUONHit.h>
-#include <AliMUONRawCluster.h>
+#include <AliMUONVCluster.h>
+#include "AliMUONVClusterStore.h"
#include <AliMUONVDigit.h>
#include "AliMUONDigitStoreV1.h"
#include "AliMUONVDigitStore.h"
// load local trigger information
//
- Char_t branchname[30];
- TClonesArray *clusters = 0;
- Int_t nclusters;
- AliMUONRawCluster *mcls;
+ AliMUONVClusterStore *clusterStore = AliMUONVClusterStore::Create(*tree);
+ clusterStore->Clear();
+ clusterStore->Connect(*tree,kFALSE);
+
+ tree->GetEvent(0);
+
+ AliMUONVCluster *cluster;
Int_t detElemId;
- Float_t clsX, clsY, clsZ, charge;
-
- for (Int_t c = 0; c < 10; ++c) {
-
- if (fChambers[c] == 0) continue;
- sprintf(branchname,"MUONRawClusters%d",c+1);
- tree->SetBranchAddress(branchname,&clusters);
- tree->GetEntry(0);
+ Double_t clsX, clsY, clsZ, charge;
- nclusters = clusters->GetEntriesFast();
+ for (Int_t ch = 0; ch < 10; ++ch) {
- for (Int_t ic = 0; ic < nclusters; ic++) {
- mcls = (AliMUONRawCluster*)clusters->UncheckedAt(ic);
+ if (fChambers[ch] == 0) continue;
+
+ TIter next(clusterStore->CreateChamberIterator(ch,ch));
+
+ while ( ( cluster = static_cast<AliMUONVCluster*>(next()) ) ) {
- detElemId = mcls->GetDetElemId();
- for (Int_t icath = 0; icath < 2; icath++) {
- clsX = mcls->GetX(icath);
- clsY = mcls->GetY(icath);
- clsZ = mcls->GetZ(icath);
- charge = mcls->GetCharge(icath);
+ detElemId = cluster->GetDetElemId();
+
+ clsX = cluster->GetX();
+ clsY = cluster->GetY();
+ clsZ = cluster->GetZ();
+ charge = cluster->GetCharge();
- fChambers[c]->RegisterCluster(detElemId,icath,clsX,clsY,clsZ,charge);
- }
+ fChambers[ch]->RegisterCluster(detElemId,0,clsX,clsY,clsZ,charge);
+ fChambers[ch]->RegisterCluster(detElemId,1,clsX,clsY,clsZ,charge);
}
}
+ delete clusterStore;
+
}
//______________________________________________________________________
#include "AliMUONMCDataInterface.h"
#include "AliMUONDataInterface.h"
#include "AliMUONHit.h"
-#include "AliMUONRawCluster.h"
+#include "AliMUONVCluster.h"
#include "AliMUONConstants.h"
#include "AliMUONVClusterStore.h"
#include "AliMUONVHitStore.h"
if (not fServeChamber[chamber]) continue;
TIter next(clusterStore->CreateChamberIterator(chamber,chamber));
- AliMUONRawCluster* cluster;
- while ( ( cluster = static_cast<AliMUONRawCluster*>(next()) ) )
+ AliMUONVCluster* cluster;
+ while ( ( cluster = static_cast<AliMUONVCluster*>(next()) ) )
{
// Only select hits from the given part of the plane
if (fSelection == kLeftPlane and not (cluster->GetX() < 0)) continue;
rechit->fZ = cluster->GetZ();
// Workout which DDL this hit will be readout of.
- AliMpDetElement* de = AliMpDEManager::GetDetElement(cluster->DetElemId());
+ AliMpDetElement* de = AliMpDEManager::GetDetElement(cluster->GetDetElemId());
if (de != NULL and (0 <= de->GetDdlId() and de->GetDdlId() < 22))
ddlList[de->GetDdlId()] = true;
else