*/
#include <iostream.h>
+#include <TArrayI.h>
#include "AliRun.h"
//
-AliITSClusterFinderSSD::AliITSClusterFinderSSD(AliITSsegmentation *seg, TClonesArray *digits, TClonesArray *recp)
+AliITSClusterFinderSSD::AliITSClusterFinderSSD(AliITSsegmentation *seg, TClonesArray *digits)
{
//Standard constructor
fSegmentation=seg;
fDigits=digits;
- fRecPoints=recp;
fMap = new AliITSMapA1(fSegmentation,fDigits);
Int_t currentstripNo;
Int_t *dbuffer = new Int_t [300]; //buffer for strip numbers
Int_t dnumber; //curent number of digits in buffer
- TArrayI &lDigitsIndexP = *fDigitsIndexP;
- TArrayI &lDigitsIndexN = *fDigitsIndexN;
- TObjArray &lDigits=*fDigits;
- TClonesArray &lClusterP = *fClusterP;
- TClonesArray &lClusterN = *fClusterN;
+ TArrayI &lDigitsIndexP = *fDigitsIndexP;
+ TArrayI &lDigitsIndexN = *fDigitsIndexN;
+ TObjArray &lDigits = *(Digits());
+ TClonesArray &lClusterP = *fClusterP;
+ TClonesArray &lClusterN = *fClusterN;
//process P side
dnumber = 1;
== (currentstripNo-1) ) dbuffer[dnumber++]=lDigitsIndexP[i];
else {
//create a new one side cluster
- new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,fDigits,fgkSIDEP);
+ new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,Digits(),fgkSIDEP);
dbuffer[0]=lDigitsIndexP[i];
dnumber = 1;
}
} // end loop over fNDigitsP
- new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,fDigits,fgkSIDEP);
+ new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,Digits(),fgkSIDEP);
//process N side
if ( (((AliITSdigitSSD*)lDigits[lDigitsIndexN[i-1]])->GetStripNumber())
== (currentstripNo-1) ) dbuffer[dnumber++]=lDigitsIndexN[i];
else {
- new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,fDigits,fgkSIDEN);
+ new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,Digits(),fgkSIDEN);
dbuffer[0]=lDigitsIndexN[i];
dnumber = 1;
}
} // end loop over fNDigitsN
- new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,fDigits,fgkSIDEN);
+ new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,Digits(),fgkSIDEN);
delete [] dbuffer;
} // end condition on NDigits
curentcluster =((AliITSclusterSSD*)((*fClusterP)[index])) ;
for (i = nsplits; i>0 ;i--) {
NN=curentcluster->SplitCluster((*list)[(i-1)],tmpdigits);
- new ((*fClusterP)[fNClusterP]) AliITSclusterSSD(NN,tmpdigits,fDigits,side);
+ new ((*fClusterP)[fNClusterP]) AliITSclusterSSD(NN,tmpdigits,Digits(),side);
( (AliITSclusterSSD*)((*fClusterP)[fNClusterP]) )->
SetLeftNeighbour(kTRUE);
//if left cluster had neighbour on the right before split
curentcluster =((AliITSclusterSSD*)((*fClusterN)[index]));
for (i = nsplits; i>0 ;i--) {
NN=curentcluster->SplitCluster((*list)[(i-1)],tmpdigits);
- new ((*fClusterN)[fNClusterN]) AliITSclusterSSD(NN,tmpdigits,fDigits,side);
+ new ((*fClusterN)[fNClusterN]) AliITSclusterSSD(NN,tmpdigits,Digits(),side);
((AliITSclusterSSD*)((*fClusterN)[fNClusterN]))->
SetRightNeighbour(kTRUE);
if (curentcluster->GetRightNeighbour())
}
else
{
- left = ((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndexP)[start]]))->GetStripNumber();
- right= ((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndexP)[end]]))->GetStripNumber();
+ left = ((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexP)[start]]))->GetStripNumber();
+ right= ((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexP)[end]]))->GetStripNumber();
if( left > right )
{
Int_t tmp = (*fDigitsIndexP)[start];
}
else
{
- left =((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndexN)[start]]))->GetStripNumber();
- right=((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndexN)[end]]))->GetStripNumber();
+ left =((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexN)[start]]))->GetStripNumber();
+ right=((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexN)[end]]))->GetStripNumber();
if ( left > right )
{
Int_t tmp = (*fDigitsIndexN)[start];
AliITSdigitSSD *dig;
for ( i = 0 ; i< N; i++ ) {
- dig=(AliITSdigitSSD*)fDigits->UncheckedAt(i);
+ dig = (AliITSdigitSSD*)GetDigit(i);
if(dig->IsSideP()) {
bit=1;
tmp=dig->GetStripNumber();
{
// create the recpoints
+
const Float_t kdEdXtoQ = 2.778e+8;
const Float_t kconv = 1.0e-4;
const Float_t kRMSx = 20.0*kconv; // microns->cm ITS TDR Table 1.3
fSegmentation->GetPadIxz(P,N,stripP,stripN);
digP = (AliITSdigitSSD*)fMap->GetHit(1,stripP);
digN = (AliITSdigitSSD*)fMap->GetHit(0,stripN);
- printf("SSD: digP digN %p %p\n",digP,digN);
+ //printf("SSD: digP digN %p %p\n",digP,digN);
if(digP) sigP = digP->fSignal;
else sigP=0;
if(digN) sigN = digN->fSignal;
{
// reconstruct remaining non-crossing clusters
+ //printf("ReconstructNotConsumedClusters !!!\n");
+
Int_t i;
AliITSclusterSSD *cluster;
Float_t pos;
GetCrossing (x2,z2);
fSegmentation->GetPadIxz((x1+x2)/2,(z1+z2)/2,stripP,stripN);
dig = (AliITSdigitSSD*)fMap->GetHit(1,stripP);
+ //printf("dig %p\n",dig);
if (!dig) printf("SSD: check the digit! dig %p\n",dig);
if(!dig) continue;
AliITSRawClusterSSD cnew;
*/
cnew.fQErr=sigerr;
//cnew.fProbability=0.75;
+ //printf("AddCluster: %p nstripsP %d\n",&cnew,nstripsP);
fITS->AddCluster(2,&cnew);
// add the rec point info
AliITSRecPoint rnew;