1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15 ///////////////////////////////////////////////////////////////////////////////
16 // **************************************************************************//
17 // * The package was revised and changed by Boris Batiounia in the time //
18 // * period of March - June 2001 //
19 // **************************************************************************//
20 ///////////////////////////////////////////////////////////////////////////////
21 #include <Riostream.h>
25 #include "AliITSdigitSSD.h"
26 #include "AliITSRawClusterSSD.h"
27 #include "AliITSRecPoint.h"
28 #include "AliITSMapA1.h"
29 #include "AliITSClusterFinderSSD.h"
30 #include "AliITSclusterSSD.h"
31 #include "AliITSpackageSSD.h"
32 #include "AliITSresponseSSD.h"
33 #include "AliITSsegmentationSSD.h"
34 #include "AliITSgeom.h"
36 const Bool_t AliITSClusterFinderSSD::fgkSIDEP=kTRUE;
37 const Bool_t AliITSClusterFinderSSD::fgkSIDEN=kFALSE;
39 ClassImp(AliITSClusterFinderSSD)
41 //____________________________________________________________________
44 //______________________________________________________________________
45 AliITSClusterFinderSSD::AliITSClusterFinderSSD():
46 AliITSClusterFinder(),
65 //______________________________________________________________________
66 AliITSClusterFinderSSD::AliITSClusterFinderSSD(AliITSsegmentation *seg,
67 TClonesArray *digits):
68 AliITSClusterFinder(seg,0),
85 //Standard constructor
88 SetMap(new AliITSMapA1(GetSeg(),Digits()));
89 fClusterP = new TClonesArray ("AliITSclusterSSD",200);
91 fClusterN = new TClonesArray ("AliITSclusterSSD",200);
93 fPackages = new TClonesArray ("AliITSpackageSSD",200); //packages
95 fDigitsIndexP = new TArrayI(300);
97 fDigitsIndexN = new TArrayI(300);
99 fPitch = GetSeg()->Dpx(0);
100 fPNsignalRatio= 7./8.; // warning: hard-wired number
102 //______________________________________________________________________}
103 AliITSClusterFinderSSD::AliITSClusterFinderSSD(AliITSsegmentation *seg,
104 AliITSresponse *res):
105 AliITSClusterFinder(seg,res),
122 //Standard constructor
124 fClusterP = new TClonesArray ("AliITSclusterSSD",200);
126 fClusterN = new TClonesArray ("AliITSclusterSSD",200);
128 fPackages = new TClonesArray ("AliITSpackageSSD",200); //packages
130 fDigitsIndexP = new TArrayI(300);
132 fDigitsIndexN = new TArrayI(300);
134 fPitch = GetSeg()->Dpx(0);
135 fPNsignalRatio= 7./8.; // warning: hard-wired number
138 //______________________________________________________________________
139 AliITSClusterFinderSSD::AliITSClusterFinderSSD(const AliITSClusterFinderSSD &source) : AliITSClusterFinder(source) {
141 // Copies are not allowed. The method is protected to avoid misuse.
142 Fatal("AliITSClusterFinderSSD","Copy constructor not allowed\n");
145 //______________________________________________________________________
146 AliITSClusterFinderSSD& AliITSClusterFinderSSD::operator=(const AliITSClusterFinderSSD& /* source */){
147 // Assignment operator
148 // Assignment is not allowed. The method is protected to avoid misuse.
149 Fatal("= operator","Assignment operator not allowed\n");
153 //______________________________________________________________________
154 AliITSClusterFinderSSD::~AliITSClusterFinderSSD(){
155 // Default destructor
160 delete fDigitsIndexP;
161 delete fDigitsIndexN;
163 //______________________________________________________________________
164 void AliITSClusterFinderSSD::InitReconstruction(){
165 // initialization of the cluster finder
167 register Int_t i; //iterator
169 for (i=0;i<fNClusterP;i++) fClusterP->RemoveAt(i);
171 for (i=0;i<fNClusterN;i++) fClusterN->RemoveAt(i);
173 for (i=0;i<fNPackages;i++) fPackages->RemoveAt(i);
177 Float_t stereoP,stereoN;
178 GetSeg()->Angles(stereoP,stereoN);
179 CalcStepFactor(stereoP,stereoN);
180 if(GetDebug(1)) cout<<"fSFF = "<<fSFF<<" fSFB = "<<fSFB<<"\n";
182 //______________________________________________________________________
183 void AliITSClusterFinderSSD::FindRawClusters(Int_t module){
184 // This function findes out all clusters belonging to one module
185 // 1. Zeroes all space after previous module reconstruction
186 // 2. Finds all neighbouring digits, create clusters
187 // 3. If necesery, resolves for each group of neighbouring digits
188 // how many clusters creates it.
189 // 4. Colculate the x and z coordinate
190 Int_t lay, lad, detect;
191 AliITSgeom *geom = fITS->GetITSgeom();
194 geom->GetModuleId(GetModule(),lay, lad, detect);
195 if ( lay == 6 ) ((AliITSsegmentationSSD*)GetSeg())->SetLayer(6);
196 if ( lay == 5 ) ((AliITSsegmentationSSD*)GetSeg())->SetLayer(5);
198 InitReconstruction(); //ad. 1
202 FindNeighbouringDigits(); //ad. 2
203 //SeparateOverlappedClusters(); //ad. 3
204 ClustersToPackages(); //ad. 4
207 //______________________________________________________________________
208 void AliITSClusterFinderSSD::FindNeighbouringDigits(){
209 //If there are any digits on this side, create 1st Cluster,
210 // add to it this digit, and increment number of clusters
213 if ((fNDigitsP>0 ) && (fNDigitsN > 0 )) {
214 Int_t currentstripNo;
215 Int_t *dbuffer = new Int_t [300]; //buffer for strip numbers
216 Int_t dnumber; //curent number of digits in buffer
217 TArrayI &lDigitsIndexP = *fDigitsIndexP;
218 TArrayI &lDigitsIndexN = *fDigitsIndexN;
219 TObjArray &lDigits = *(Digits());
220 TClonesArray &lClusterP = *fClusterP;
221 TClonesArray &lClusterN = *fClusterN;
224 dbuffer[0]=lDigitsIndexP[0];
225 //If next digit is a neigh. of previous, adds to last clust. this digit
226 for (i=1; i<fNDigitsP; i++) {
228 currentstripNo = ((AliITSdigitSSD*)lDigits[lDigitsIndexP[i]])->
230 //check if it is a neighbour of a previous one
231 if((((AliITSdigitSSD*)lDigits[lDigitsIndexP[i-1]])->
233 == (currentstripNo-1) ) dbuffer[dnumber++]=lDigitsIndexP[i];
235 //create a new one side cluster
236 new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,
239 dbuffer[0]=lDigitsIndexP[i];
242 } // end loop over fNDigitsP
243 new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,
246 //for comments, see above
248 dbuffer[0]=lDigitsIndexN[0];
249 //If next digit is a neigh. of previous, adds to last clust. this digit
250 for (i=1; i<fNDigitsN; i++) {
251 currentstripNo = ((AliITSdigitSSD*)(lDigits[lDigitsIndexN[i]]))->
253 if ( (((AliITSdigitSSD*)lDigits[lDigitsIndexN[i-1]])->
255 == (currentstripNo-1) ) dbuffer[dnumber++]=lDigitsIndexN[i];
257 new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,
260 dbuffer[0]=lDigitsIndexN[i];
263 } // end loop over fNDigitsN
264 new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,
268 } // end condition on NDigits
270 if (GetDebug(1)) cout<<"\n Found clusters: fNClusterP = "<<fNClusterP
271 <<" fNClusterN ="<<fNClusterN<<"\n";
273 //______________________________________________________________________
274 void AliITSClusterFinderSSD::SeparateOverlappedClusters(){
275 // overlapped clusters separation
276 register Int_t i; //iterator
277 Double_t factor=0.75; // How many percent must be lower signal
278 // on the middle one digit
279 // from its neighbours
280 Int_t signal0; //signal on the strip before the current one
281 Int_t signal1; //signal on the current one signal
282 Int_t signal2; //signal on the strip after the current one
283 TArrayI *splitlist; // List of splits
284 Int_t numerofsplits=0; // number of splits
285 Int_t initPsize = fNClusterP; //initial size of the arrays
286 Int_t initNsize = fNClusterN; //we have to keep it because it will grow
287 // in this function and it doasn't make
288 // sense to pass through it again
289 splitlist = new TArrayI(300);
291 for (i=0;i<initPsize;i++){
292 if (( ((AliITSclusterSSD*)(*fClusterP)[i])->
293 GetNumOfDigits())==1) continue;
294 if (( ((AliITSclusterSSD*)(*fClusterP)[i])->
295 GetNumOfDigits())==2) continue;
296 Int_t nj=(((AliITSclusterSSD*)(*fClusterP)[i])->GetNumOfDigits()-1);
297 for (Int_t j=1; j<nj; j++){
298 signal1=((AliITSclusterSSD*)(*fClusterP)[i])->GetDigitSignal(j);
299 signal0=((AliITSclusterSSD*)(*fClusterP)[i])->GetDigitSignal(j-1);
300 signal2=((AliITSclusterSSD*)(*fClusterP)[i])->GetDigitSignal(j+1);
301 //if signal is less then factor*signal of its neighbours
302 if ( (signal1<(factor*signal0)) && (signal1<(factor*signal2)) ){
303 (*splitlist)[numerofsplits++]=j;
305 } // end loop over number of digits
306 //split this cluster if necessary
307 if(numerofsplits>0) SplitCluster(splitlist,numerofsplits,i,fgkSIDEP);
309 //in signed places (splitlist)
310 } // end loop over clusters on Pside
312 for (i=0;i<initNsize;i++) {
313 if (( ((AliITSclusterSSD*)(*fClusterN)[i])->
314 GetNumOfDigits())==1) continue;
315 if (( ((AliITSclusterSSD*)(*fClusterN)[i])->
316 GetNumOfDigits())==2) continue;
317 Int_t nj=(((AliITSclusterSSD*)(*fClusterN)[i])->GetNumOfDigits()-1);
318 for (Int_t j=1; j<nj; j++){
319 signal1=((AliITSclusterSSD*)(*fClusterN)[i])->GetDigitSignal(j);
320 signal0=((AliITSclusterSSD*)(*fClusterN)[i])->GetDigitSignal(j-1);
321 signal2=((AliITSclusterSSD*)(*fClusterN)[i])->GetDigitSignal(j+1);
322 //if signal is less then factor*signal of its neighbours
323 if ( (signal1<(factor*signal0)) && (signal1<(factor*signal2)) )
324 (*splitlist)[numerofsplits++]=j;
325 } // end loop over number of digits
326 //split this cluster into more clusters
327 if(numerofsplits>0) SplitCluster(splitlist,numerofsplits,i,fgkSIDEN);
329 //in signed places (splitlist)
330 } // end loop over clusters on Nside
334 //______________________________________________________________________
335 void AliITSClusterFinderSSD::SplitCluster(TArrayI *list, Int_t nsplits,
336 Int_t index, Bool_t side){
337 //This function splits one side cluster into more clusters
338 //number of splits is defined by "nsplits"
339 //Place of splits are defined in the TArray "list"
340 // For further optimisation: Replace this function by two
341 // specialised ones (each for one side)
343 //For comlete comments see AliITSclusterSSD::SplitCluster
344 register Int_t i; //iterator
345 AliITSclusterSSD* curentcluster;
346 Int_t *tmpdigits = new Int_t[100];
349 // side true means P side
351 curentcluster =((AliITSclusterSSD*)((*fClusterP)[index])) ;
352 for (i = nsplits; i>0 ;i--) {
353 nn=curentcluster->SplitCluster((*list)[(i-1)],tmpdigits);
354 new ((*fClusterP)[fNClusterP]) AliITSclusterSSD(nn,tmpdigits,
356 ( (AliITSclusterSSD*)((*fClusterP)[fNClusterP]) )->
357 SetLeftNeighbour(kTRUE);
358 //if left cluster had neighbour on the right before split
359 //new should have it too
360 if ( curentcluster->GetRightNeighbour() )
361 ( (AliITSclusterSSD*)((*fClusterP)[fNClusterP]) )->
362 SetRightNeighbour(kTRUE);
363 else curentcluster->SetRightNeighbour(kTRUE);
365 } // end loop over nplits
367 curentcluster =((AliITSclusterSSD*)((*fClusterN)[index]));
368 for (i = nsplits; i>0 ;i--) {
369 nn=curentcluster->SplitCluster((*list)[(i-1)],tmpdigits);
370 new ((*fClusterN)[fNClusterN]) AliITSclusterSSD(nn,tmpdigits,
372 ((AliITSclusterSSD*)((*fClusterN)[fNClusterN]))->
373 SetRightNeighbour(kTRUE);
374 if (curentcluster->GetRightNeighbour())
375 ( (AliITSclusterSSD*)( (*fClusterN)[fNClusterN]) )->
376 SetRightNeighbour(kTRUE);
377 else curentcluster->SetRightNeighbour(kTRUE);
379 } // end loop over nplits
383 //______________________________________________________________________
384 Int_t AliITSClusterFinderSSD::SortDigitsP(Int_t start, Int_t end){
385 // sort digits on the P side
389 if (start != (end - 1) ){
390 left=this->SortDigitsP(start,(start+end)/2);
391 right=this->SortDigitsP((start+end)/2,end);
392 return (left || right);
394 left = ((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexP)[start]]))->
396 right= ((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexP)[end]]))->
399 Int_t tmp = (*fDigitsIndexP)[start];
400 (*fDigitsIndexP)[start]=(*fDigitsIndexP)[end];
401 (*fDigitsIndexP)[end]=tmp;
406 //______________________________________________________________________
407 Int_t AliITSClusterFinderSSD::SortDigitsN(Int_t start, Int_t end){
408 // sort digits on the N side
412 if (start != (end - 1)){
413 left=this->SortDigitsN(start,(start+end)/2);
414 right=this->SortDigitsN((start+end)/2,end);
415 return (left || right);
417 left =((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexN)[start]]))->
419 right=((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexN)[end]]))->
422 Int_t tmp = (*fDigitsIndexN)[start];
423 (*fDigitsIndexN)[start]=(*fDigitsIndexN)[end];
424 (*fDigitsIndexN)[end]=tmp;
429 //______________________________________________________________________
430 void AliITSClusterFinderSSD::FillDigitsIndex(){
431 //Fill the indexes of the clusters belonging to a given ITS module
437 noentries = NDigits();
439 Int_t* psidx = new Int_t [noentries*sizeof(Int_t)];
440 Int_t* nsidx = new Int_t [noentries*sizeof(Int_t)];
441 if (fDigitsIndexP==NULL) fDigitsIndexP = new TArrayI(noentries);
442 if (fDigitsIndexN==NULL) fDigitsIndexN = new TArrayI(noentries);
446 for ( i = 0 ; i< noentries; i++ ) {
447 dig = (AliITSdigitSSD*)GetDigit(i);
450 tmp=dig->GetStripNumber();
451 // I find this totally unnecessary - it's just a
452 // CPU consuming double check
455 if (GetDebug(1)) cout<<"Such a digit exists \n";
461 fDigitsIndexP->AddAt(i,fNDigitsP++);
466 tmp=dig->GetStripNumber();
470 if (GetDebug(1)) cout<<"Such a digit exists \n";
476 fDigitsIndexN->AddAt(i,fNDigitsN++);
485 if(GetDebug(1)) cout<<"Digits: P = "<<fNDigitsP<<" N = "<<fNDigitsN<<endl;
487 //______________________________________________________________________
488 void AliITSClusterFinderSSD::SortDigits(){
492 if(fNDigitsP>1) for (i=0;i<fNDigitsP-1;i++)
493 if (SortDigitsP(0,(fNDigitsP-1-i))==0) break;
494 if(fNDigitsN>1) for (i=0;i<fNDigitsN-1;i++)
495 if(SortDigitsN(0,(fNDigitsN-1-i))==0) break;
497 //______________________________________________________________________
498 void AliITSClusterFinderSSD::FillClIndexArrays(Int_t* arrayP,Int_t *arrayN)
500 // fill cluster index array
503 for (i=0; i<fNClusterP;i++) arrayP[i]=i;
504 for (i=0; i<fNClusterN;i++) arrayN[i]=i;
506 //______________________________________________________________________
507 void AliITSClusterFinderSSD::SortClusters(Int_t* arrayP, Int_t *arrayN){
511 if(fNClusterP>1) for (i=0;i<fNClusterP-1;i++)
512 if (SortClustersP(0,(fNClusterP-1),arrayP)==0) break;
513 if(fNClusterN>1) for (i=0;i<fNClusterN-1;i++)
514 if (SortClustersN(0,(fNClusterN-1),arrayN)==0) break;
516 //______________________________________________________________________
517 Int_t AliITSClusterFinderSSD::SortClustersP(Int_t start, Int_t end,
519 //Sort P side clusters
523 if (start != (end - 1) ) {
524 left=this->SortClustersP(start,(start+end)/2,array);
525 right=this->SortClustersP((start+end)/2,end,array);
526 return (left || right);
528 left =((AliITSclusterSSD*)((*fClusterP)[array[start]]))->
530 right=((AliITSclusterSSD*)((*fClusterP)[array[ end ]]))->
533 Int_t tmp = array[start];
534 array[start]=array[end];
540 //______________________________________________________________________
541 Int_t AliITSClusterFinderSSD::SortClustersN(Int_t start, Int_t end,
543 //Sort N side clusters
547 if (start != (end - 1) ) {
548 left=this->SortClustersN(start,(start+end)/2,array);
549 right=this->SortClustersN((start+end)/2,end,array);
550 return (left || right);
552 left =((AliITSclusterSSD*)((*fClusterN)[array[start]]))->
554 right=((AliITSclusterSSD*)((*fClusterN)[array[ end ]]))->
557 Int_t tmp = array[start];
558 array[start]=array[end];
564 //______________________________________________________________________
565 void AliITSClusterFinderSSD::ClustersToPackages(){
568 Int_t *oneSclP = new Int_t[fNClusterP];//I want to have sorted 1 S clusters
569 Int_t *oneSclN = new Int_t[fNClusterN];//I can not sort it in TClonesArray
570 //so, I create table of indexes and
572 //I do not use TArrayI on purpose
573 //MB: well, that's not true that one
574 //cannot sort objs in TClonesArray
575 AliITSclusterSSD *currentP;
576 AliITSclusterSSD *currentN;
579 //Fills in One Side Clusters Index Array
580 FillClIndexArrays(oneSclP,oneSclN);
581 //Sorts filled Arrays
582 //SortClusters(oneSclP,oneSclN);
585 new ((*fPackages)[0]) AliITSpackageSSD(fClusterP,fClusterN);
587 //This part was includede by Boris Batiounia in March 2001.
588 // Take all recpoint pairs (x coordinates) in both P and N sides
589 // to calculate z coordinates of the recpoints
591 for (j1=0;j1<fNClusterP;j1++) {
592 currentP = GetPSideCluster(oneSclP[j1]);
593 Double_t xP = currentP->GetPosition();
594 Double_t signalP = currentP->GetTotalSignal();
595 for (j2=0;j2<fNClusterN;j2++) {
596 currentN = GetNSideCluster(oneSclN[j2]);
597 Double_t xN = currentN->GetPosition();
598 Double_t signalN = currentN->GetTotalSignal();
599 CreateNewRecPoint(xP,1,xN,1,signalP,signalN,currentP,currentN,
607 //______________________________________________________________________
608 Bool_t AliITSClusterFinderSSD::CreateNewRecPoint(Double_t P,Double_t dP,
609 Double_t N, Double_t dN,
610 Double_t SigP,Double_t SigN,
611 AliITSclusterSSD *clusterP,
612 AliITSclusterSSD *clusterN,
614 // create the recpoints
615 const Double_t kADCtoKeV = 2.16;
616 // 50 ADC units -> 30000 e-h pairs; 1e-h pair -> 3.6e-3 KeV;
617 // 1 ADC unit -> (30000/50)*3.6e-3 = 2.16 KeV
618 const Double_t kconv = 1.0e-4;
619 const Double_t kRMSx = 20.0*kconv;
620 const Double_t kRMSz = 800.0*kconv;
625 if (GetCrossing(P,N)) {
626 //GetCrossingError(dP,dN);
627 dP = dN = prob = 0.0; // to remove unused variable warning.
628 AliITSRawClusterSSD cnew;
629 Int_t nstripsP=clusterP->GetNumOfDigits();
630 Int_t nstripsN=clusterN->GetNumOfDigits();
635 dedx = SigP*kADCtoKeV;
638 dedx = SigN*kADCtoKeV;
639 } // end if SigP>SigN
640 tr = (Int_t*) clusterP->GetTracks(n);
641 ntracks = clusterP->GetNTracks();
642 cnew.SetSignalP(SigP);
643 cnew.SetSignalN(SigN);
644 cnew.SetMultiplicity(nstripsP);
645 cnew.SetMultN(nstripsN);
646 cnew.SetQErr(TMath::Abs(SigP-SigN));
647 cnew.SetNTrack(ntracks);
648 fITS->AddCluster(2,&cnew);
654 rnew.SetSigmaX2( kRMSx* kRMSx);
655 rnew.SetSigmaZ2( kRMSz* kRMSz);
656 rnew.fTracks[0]=tr[0];
657 rnew.fTracks[1]=tr[1];
658 rnew.fTracks[2]=tr[2];
659 fITS->AddRecPoint(rnew);
664 //______________________________________________________________________
665 void AliITSClusterFinderSSD::CalcStepFactor(Double_t Psteo, Double_t Nsteo){
666 // calculate the step factor for matching clusters
667 // 95 is the pitch, 4000 - dimension along z ?
668 Double_t dz=GetSeg()->Dz();
670 fSFF = ( (Int_t) (Psteo*dz/fPitch ) );// +1;
671 fSFB = ( (Int_t) (Nsteo*dz/fPitch ) );// +1;
673 //______________________________________________________________________
674 AliITSclusterSSD* AliITSClusterFinderSSD::GetPSideCluster(Int_t idx){
675 // get P side clusters
677 if((idx<0)||(idx>=fNClusterP)){
678 Info("GetPSideCluster","0<index=%d<=%d out of range",idx,fNClusterP);
681 return (AliITSclusterSSD*)((*fClusterP)[idx]);
684 //______________________________________________________________________
685 AliITSclusterSSD* AliITSClusterFinderSSD::GetNSideCluster(Int_t idx){
686 // get N side clusters
688 if((idx<0)||(idx>=fNClusterN)){
689 Info("GetNSideCluster","0<index=%d >= %d out of range",idx,fNClusterN);
692 return (AliITSclusterSSD*)((*fClusterN)[idx]);
695 //______________________________________________________________________
696 Bool_t AliITSClusterFinderSSD::GetCrossing (Double_t &P, Double_t &N){
698 // This function was rivised and changed by Boris Batiounia in March 2001
699 Double_t dx = GetSeg()->Dx(); // detector size in x direction, microns
700 Double_t dz = GetSeg()->Dz(); // detector size in z direction, microns
701 Double_t xL; // x local coordinate
702 Double_t zL; // z local coordinate
703 Double_t x; // x = xL + dx/2
704 Double_t z; // z = zL + dz/2
705 Double_t xP; // x coordinate in the P side from the first P strip
706 Double_t xN; // x coordinate in the N side from the first N strip
707 Float_t stereoP,stereoN;
709 GetSeg()->Angles(stereoP,stereoN);
710 fTanP=TMath::Tan(stereoP);
711 fTanN=TMath::Tan(stereoN);
712 Double_t kP = fTanP; // Tangent of 0.0075 mrad
713 Double_t kN = fTanN; // Tangent of 0.0275 mrad
717 xP = N; // change the mistake for the P/N
718 xN = P; // coordinates correspondence in this function
720 x = xP + kP*(dz*kN-xP+xN)/(kP+kN);
721 z = (dz*kN-xP+xN)/(kP+kN);
727 if(TMath::Abs(xL) > dx/2 || TMath::Abs(zL) > dz/2) return kFALSE;
729 // Check that xL and zL are inside the detector for the
730 // correspondent xP and xN coordinates
734 //______________________________________________________________________
735 void AliITSClusterFinderSSD::GetCrossingError(Double_t& dP, Double_t& dN){
736 // get crossing error
739 dz = TMath::Abs(( dP + dN )*fPitch/(fTanP + fTanN) );
740 dx = fPitch*(TMath::Abs(dP*(1 - fTanP/(fTanP + fTanN))) +
741 TMath::Abs(dN *fTanP/(fTanP + fTanN) ));