#include "AliMpDEManager.h"
#include "AliMpPad.h"
-#include "AliMpStationType.h"
#include "AliMpVSegmentation.h"
+#include "AliMpEncodePair.h"
#include "AliLog.h"
#include "AliRunLoader.h"
{
/// Constructor
- fSegmentation[1] = fSegmentation[0] = 0x0;
+ fkSegmentation[1] = fkSegmentation[0] = 0x0;
if (fPlot) fDebug = 1;
}
const AliMpArea& area, const AliMpVSegmentation* seg[2])
{
/// Prepare for clustering
-// AliCodeTimerAuto("")
+// AliCodeTimerAuto("",0)
for ( Int_t i = 0; i < 2; ++i )
{
- fSegmentation[i] = seg[i];
+ fkSegmentation[i] = seg[i];
}
// Find out the DetElemId
fDetElemId = detElemId;
// find out current event number, and reset the cluster number
- fEventNumber = AliRunLoader::GetRunLoader()->GetEventNumber();
+ AliRunLoader *runLoader = AliRunLoader::Instance();
+ fEventNumber = runLoader ? runLoader->GetEventNumber() : 0;
fClusterNumber = -1;
fClusterList.Delete();
AliDebug(3,Form("EVT %d DE %d",fEventNumber,fDetElemId));
- AliMp::StationType stationType = AliMpDEManager::GetStationType(fDetElemId);
+ AliMq::Station12Type stationType = AliMpDEManager::GetStation12Type(fDetElemId);
Float_t kx3 = AliMUONConstants::SqrtKx3();
Float_t ky3 = AliMUONConstants::SqrtKy3();
Float_t pitch = AliMUONConstants::Pitch();
- if ( stationType == AliMp::kStation1 )
+ if ( stationType == AliMq::kStation1 )
{
kx3 = AliMUONConstants::SqrtKx3St1();
ky3 = AliMUONConstants::SqrtKy3St1();
AliMUONClusterFinderPeakFit::NextCluster()
{
/// Return next cluster
-// AliCodeTimerAuto("")
+// AliCodeTimerAuto("",0)
// if the list of clusters is not void, pick one from there
TObject* o = fClusterList.At(++fClusterNumber);
/// Starting from a precluster, builds a pixel array, and then
/// extract clusters from this array
- // AliCodeTimerAuto("")
+ // AliCodeTimerAuto("",0)
if (fDebug) {
- cout << " *** Event # " << AliRunLoader::GetRunLoader()->GetEventNumber()
+ cout << " *** Event # " << fEventNumber
<< " det. elem.: " << fDetElemId << endl;
for (Int_t j = 0; j < fPreCluster->Multiplicity(); ++j) {
AliMUONPad* pad = fPreCluster->Pad(j);
/// Check precluster in order to attempt to simplify it (mostly for
/// two-cathode preclusters)
- // AliCodeTimerAuto("")
+ // AliCodeTimerAuto("",0)
// Disregard small clusters (leftovers from splitting or noise)
if ((origCluster.Multiplicity()==1 || origCluster.Multiplicity()==2) &&
Int_t cath = pad->Cathode();
Int_t cath1 = TMath::Even(cath);
// Check for edge effect (missing pads on the _other_ cathode)
- AliMpPad mpPad = fSegmentation[cath1]->PadByPosition(pad->Position(),kFALSE);
+ AliMpPad mpPad
+ = fkSegmentation[cath1]->PadByPosition(pad->Position().X(),pad->Position().Y(),kFALSE);
if (!mpPad.IsValid()) continue;
//if (nFlags == 1 && pad->Charge() < fgkZeroSuppression * 3) continue;
if (nFlags == 1 && pad->Charge() < 20) continue;
if (cluster.Multiplicity(0) == 0) cath0 = 1;
else if (cluster.Multiplicity(1) == 0) cath1 = 0;
- TVector2 leftDown = cluster.Area(cath0).LeftDownCorner();
- TVector2 rightUp = cluster.Area(cath0).RightUpCorner();
- min[0] = leftDown.X();
- min[1] = leftDown.Y();
- max[0] = rightUp.X();
- max[1] = rightUp.Y();
+ Double_t leftDownX, leftDownY;
+ cluster.Area(cath0).LeftDownCorner(leftDownX, leftDownY);
+ Double_t rightUpX, rightUpY;
+ cluster.Area(cath0).RightUpCorner(rightUpX, rightUpY);
+ min[0] = leftDownX;
+ min[1] = leftDownY;
+ max[0] = rightUpX;
+ max[1] = rightUpY;
if (cath1 != cath0) {
- leftDown = cluster.Area(cath1).LeftDownCorner();
- rightUp = cluster.Area(cath1).RightUpCorner();
- min[0] = TMath::Max (min[0], leftDown.X());
- min[1] = TMath::Max (min[1], leftDown.Y());
- max[0] = TMath::Min (max[0], rightUp.X());
- max[1] = TMath::Min (max[1], rightUp.Y());
+ cluster.Area(cath1).LeftDownCorner(leftDownX, leftDownY);
+ cluster.Area(cath1).RightUpCorner(rightUpX, rightUpY);
+ min[0] = TMath::Max (min[0], leftDownX);
+ min[1] = TMath::Max (min[1], leftDownY);
+ max[0] = TMath::Min (max[0], rightUpX);
+ max[1] = TMath::Min (max[1], rightUpY);
}
// Adjust limits
}
//_____________________________________________________________________________
-void AliMUONClusterFinderPeakFit::FindClusterFit(AliMUONCluster& cluster, Int_t *localMax,
- Int_t *maxPos, Int_t nMax)
+void AliMUONClusterFinderPeakFit::FindClusterFit(AliMUONCluster& cluster, const Int_t *localMax,
+ const Int_t *maxPos, Int_t nMax)
{
/// Fit pad charge distribution with nMax hit hypothesis
//_____________________________________________________________________________
void AliMUONClusterFinderPeakFit::FindClusterCOG(AliMUONCluster& cluster,
- Int_t *localMax, Int_t iMax)
+ const Int_t *localMax, Int_t iMax)
{
/// Find COG of pad charge distribution around local maximum \a iMax
Bool_t mustMatch(kTRUE);
- AliMpIntPair cn = cluster.NofPads(statusToTest,mustMatch);
+ Long_t cn = cluster.NofPads(statusToTest,mustMatch);
- nInX = cn.GetFirst();
- nInY = cn.GetSecond();
+ nInX = AliMp::PairFirst(cn);
+ nInY = AliMp::PairSecond(cn);
}
//_____________________________________________________________________________