- dig = fInput->Digit(cath, ndig);
- Int_t i=dig->PadX();
- Int_t j=dig->PadY();
- if (fHitMap[cath]->TestHit(i,j)==kUsed ||fHitMap[0]->TestHit(i,j)==kEmpty) {
- nskip++;
- continue;
- }
- if (fDebugLevel)
- fprintf(stderr,"\n CATHODE %d CLUSTER %d\n",cath,ncls);
- AliMUONRawCluster c;
- c.SetMultiplicity(0, 0);
- c.SetMultiplicity(1, 0);
- c.SetPeakSignal(cath,dig->Signal());
- c.SetTrack(0, dig->Hit());
- c.SetTrack(1, dig->Track(0));
- c.SetTrack(2, dig->Track(1));
- // tag the beginning of cluster list in a raw cluster
- c.SetNcluster(0,-1);
- Float_t xcu, ycu;
- fSeg[cath]->GetPadC(i,j,xcu, ycu, fZPlane);
- fSector= fSeg[cath]->Sector(i,j)/100;
- if (fDebugLevel)
- printf("\n New Seed %d %d ", i,j);
-
-
- FindCluster(i,j,cath,c);
-// ^^^^^^^^^^^^^^^^^^^^^^^^
- // center of gravity
- if (c.GetX(0)!=0.) c.SetX(0, c.GetX(0)/c.GetCharge(0)); // c.fX[0] /= c.fQ[0];
-// Force on anod
- c.SetX(0,fSeg[0]->GetAnod(c.GetX(0)));
- if (c.GetY(0)!=0.) c.SetY(0, c.GetY(0)/c.GetCharge(0)); // c.fY[0] /= c.fQ[0];
-
- if(c.GetCharge(1)!=0.) c.SetX(1, c.GetX(1)/c.GetCharge(1)); // c.fX[1] /= c.fQ[1];
-
- // Force on anod
- c.SetX(1, fSeg[0]->GetAnod(c.GetX(1)));
- if(c.GetCharge(1)!=0.) c.SetY(1, c.GetY(1)/c.GetCharge(1));// c.fY[1] /= c.fQ[1];
-
- c.SetZ(0, fZPlane);
- c.SetZ(1, fZPlane);
-
- if (fDebugLevel) {
- fprintf(stderr,"\n Cathode 1 multiplicite %d X(CG) %f Y(CG) %f\n",
- c.GetMultiplicity(0),c.GetX(0),c.GetY(0));
- fprintf(stderr," Cathode 2 multiplicite %d X(CG) %f Y(CG) %f\n",
- c.GetMultiplicity(1),c.GetX(1),c.GetY(1));
- }
-// Analyse cluster and decluster if necessary
-//
- ncls++;
- c.SetNcluster(1,fNRawClusters);
- c.SetClusterType(c.PhysicsContribution());
-
- fNPeaks=0;
-//
-//
- Decluster(&c);
-//
-// reset Cluster object
- { // begin local scope
- for (int k=0;k<c.GetMultiplicity(0);k++) c.SetIndex(k, 0, 0);
- } // end local scope
-
- { // begin local scope
- for (int k=0;k<c.GetMultiplicity(1);k++) c.SetIndex(k, 1, 0);
- } // end local scope
-
- c.SetMultiplicity(0,0);
- c.SetMultiplicity(1,0);
-
+ dig = fInput->Digit(cath, ndig);
+ Int_t padx = dig->PadX();
+ Int_t pady = dig->PadY();
+ if (fDigitMap[cath]->TestHit(padx,pady)==kUsed ||fDigitMap[0]->TestHit(padx,pady)==kEmpty) {
+ nskip++;
+ continue;
+ }
+ AliDebug(1,Form("\n CATHODE %d CLUSTER %d\n",cath,ncls));
+ AliMUONRawCluster clus;
+ clus.SetMultiplicity(0, 0);
+ clus.SetMultiplicity(1, 0);
+ clus.SetPeakSignal(cath,dig->Signal());
+ clus.SetTrack(0, dig->Hit());
+ clus.SetTrack(1, dig->Track(0));
+ clus.SetTrack(2, dig->Track(1));
+
+ AliDebug(1,Form("idDE %d Padx %d Pady %d", fInput->DetElemId(), padx, pady));
+
+ // tag the beginning of cluster list in a raw cluster
+ clus.SetNcluster(0,-1);
+ Float_t xcu, ycu;
+ fSeg2[cath]->GetPadC(fInput->DetElemId(), padx, pady, xcu, ycu, fZPlane);
+ fSector= fSeg2[cath]->Sector(fInput->DetElemId(), padx, pady)/100;
+
+
+
+
+ FindCluster(padx,pady,cath,clus);
+ //^^^^^^^^^^^^^^^^^^^^^^^^
+ // center of gravity
+ if (clus.GetX(0)!=0.) clus.SetX(0, clus.GetX(0)/clus.GetCharge(0)); // clus.fX[0] /= clus.fQ[0];
+
+ // Force on anod
+ clus.SetX(0,fSeg2[0]->GetAnod(fInput->DetElemId(), clus.GetX(0)));
+ if (clus.GetY(0)!=0.) clus.SetY(0, clus.GetY(0)/clus.GetCharge(0)); // clus.fY[0] /= clus.fQ[0];
+
+ if(clus.GetCharge(1)!=0.) clus.SetX(1, clus.GetX(1)/clus.GetCharge(1)); // clus.fX[1] /= clus.fQ[1];
+
+ // Force on anod
+ clus.SetX(1, fSeg2[0]->GetAnod(fInput->DetElemId(),clus.GetX(1)));
+ if(clus.GetCharge(1)!=0.) clus.SetY(1, clus.GetY(1)/clus.GetCharge(1));// clus.fY[1] /= clus.fQ[1];
+
+ clus.SetZ(0, fZPlane);
+ clus.SetZ(1, fZPlane);
+
+ AliDebug(1,Form("\n Cathode 1 multiplicite %d X(CG) %f Y(CG) %f\n",
+ clus.GetMultiplicity(0),clus.GetX(0),clus.GetY(0)));
+ AliDebug(1,Form(" Cathode 2 multiplicite %d X(CG) %f Y(CG) %f\n",
+ clus.GetMultiplicity(1),clus.GetX(1),clus.GetY(1)));
+ // Analyse cluster and decluster if necessary
+ //
+ ncls++;
+ clus.SetNcluster(1,fNRawClusters);
+ clus.SetClusterType(clus.PhysicsContribution());
+
+ fNPeaks=0;
+ //
+ //
+ Decluster(&clus);
+ //
+ // reset Cluster object
+ { // begin local scope
+ for (int k=0;k<clus.GetMultiplicity(0);k++) clus.SetIndex(k, 0, 0);
+ } // end local scope
+
+ { // begin local scope
+ for (int k=0;k<clus.GetMultiplicity(1);k++) clus.SetIndex(k, 1, 0);
+ } // end local scope
+
+ clus.SetMultiplicity(0,0);
+ clus.SetMultiplicity(1,0);
+