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 **************************************************************************/
19 //-----------------------------------------------------------------
20 // Implementation of the TPC seed class
21 // This class is used by the AliTPCtrackerMI class
22 // Origin: Marian Ivanov, CERN, Marian.Ivanov@cern.ch
23 //-----------------------------------------------------------------
24 #include "TClonesArray.h"
25 #include "AliTPCseed.h"
26 #include "AliTPCReconstructor.h"
32 AliTPCseed::AliTPCseed():
40 fCurrentSigmaY2(1e10),
41 fCurrentSigmaZ2(1e10),
45 fCurrentClusterIndex1(-1),
58 for (Int_t i=0;i<200;i++) SetClusterIndex2(i,-3);
59 for (Int_t i=0;i<160;i++) fClusterPointer[i]=0;
60 for (Int_t i=0;i<3;i++) fKinkIndexes[i]=0;
61 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTPCr[i]=0.2;
62 for (Int_t i=0;i<4;i++) {
67 for (Int_t i=0;i<12;i++) fOverlapLabels[i] = -1;
70 AliTPCseed::AliTPCseed(const AliTPCseed &s):
78 fCurrentSigmaY2(1e10),
79 fCurrentSigmaZ2(1e10),
83 fCurrentClusterIndex1(-1),
95 //---------------------
96 // dummy copy constructor
97 //-------------------------
98 for (Int_t i=0;i<160;i++) fClusterPointer[i] = s.fClusterPointer[i];
99 for (Int_t i=0;i<160;i++) fIndex[i] = s.fIndex[i];
101 AliTPCseed::AliTPCseed(const AliTPCtrack &t):
109 fCurrentSigmaY2(1e10),
110 fCurrentSigmaZ2(1e10),
113 fCurrentCluster(0x0),
114 fCurrentClusterIndex1(-1),
127 // Constructor from AliTPCtrack
130 for (Int_t i=0;i<3;i++) fKinkIndexes[i]=t.GetKinkIndex(i);
131 for (Int_t i=0;i<5;i++) fTPCr[i]=0.2;
132 for (Int_t i=0;i<160;i++) {
133 fClusterPointer[i] = 0;
134 Int_t index = t.GetClusterIndex(i);
136 SetClusterIndex2(i,index);
139 SetClusterIndex2(i,-3);
142 for (Int_t i=0;i<4;i++) {
147 for (Int_t i=0;i<12;i++) fOverlapLabels[i] = -1;
150 AliTPCseed::AliTPCseed(UInt_t index, const Double_t xx[5],
151 const Double_t cc[15],
152 Double_t xr, Double_t alpha):
153 AliTPCtrack(index, xx, cc, xr, alpha),
160 fCurrentSigmaY2(1e10),
161 fCurrentSigmaZ2(1e10),
164 fCurrentCluster(0x0),
165 fCurrentClusterIndex1(-1),
181 for (Int_t i=0;i<200;i++) SetClusterIndex2(i,-3);
182 for (Int_t i=0;i<160;i++) fClusterPointer[i]=0;
183 for (Int_t i=0;i<3;i++) fKinkIndexes[i]=0;
184 for (Int_t i=0;i<5;i++) fTPCr[i]=0.2;
185 for (Int_t i=0;i<4;i++) {
190 for (Int_t i=0;i<12;i++) fOverlapLabels[i] = -1;
193 AliTPCseed::~AliTPCseed(){
196 if (fPoints) delete fPoints;
198 if (fEPoints) delete fEPoints;
203 AliTPCTrackerPoint * AliTPCseed::GetTrackPoint(Int_t i)
207 return &fTrackPoints[i];
210 void AliTPCseed::RebuildSeed()
213 // rebuild seed to be ready for storing
214 AliTPCclusterMI cldummy;
216 AliTPCTrackPoint pdummy;
217 pdummy.GetTPoint().fIsShared = 10;
218 for (Int_t i=0;i<160;i++){
219 AliTPCclusterMI * cl0 = fClusterPointer[i];
220 AliTPCTrackPoint *trpoint = (AliTPCTrackPoint*)fPoints->UncheckedAt(i);
222 trpoint->GetTPoint() = *(GetTrackPoint(i));
223 trpoint->GetCPoint() = *cl0;
224 trpoint->GetCPoint().SetQ(TMath::Abs(cl0->GetQ()));
228 trpoint->GetCPoint()= cldummy;
236 Double_t AliTPCseed::GetDensityFirst(Int_t n)
240 // return cluster for n rows bellow first point
241 Int_t nfoundable = 1;
243 for (Int_t i=fLastPoint-1;i>0&&nfoundable<n; i--){
244 Int_t index = GetClusterIndex2(i);
245 if (index!=-1) nfoundable++;
246 if (index>0) nfound++;
248 if (nfoundable<n) return 0;
249 return Double_t(nfound)/Double_t(nfoundable);
254 void AliTPCseed::GetClusterStatistic(Int_t first, Int_t last, Int_t &found, Int_t &foundable, Int_t &shared, Bool_t plus2)
256 // get cluster stat. on given region
261 for (Int_t i=first;i<last; i++){
262 Int_t index = GetClusterIndex2(i);
263 if (index!=-1) foundable++;
264 if (fClusterPointer[i]) {
270 if (fClusterPointer[i]->IsUsed(10)) {
274 if (!plus2) continue; //take also neighborhoud
276 if ( (i>0) && fClusterPointer[i-1]){
277 if (fClusterPointer[i-1]->IsUsed(10)) {
282 if ( fClusterPointer[i+1]){
283 if (fClusterPointer[i+1]->IsUsed(10)) {
291 //Error("AliTPCseed::GetClusterStatistic","problem\n");
299 void AliTPCseed::Reset(Bool_t all)
303 SetNumberOfClusters(0);
309 for (Int_t i=0;i<8;i++){
310 delete [] fTrackPoints[i];
318 for (Int_t i=0;i<200;i++) SetClusterIndex2(i,-3);
319 for (Int_t i=0;i<160;i++) fClusterPointer[i]=0;
325 void AliTPCseed::Modify(Double_t factor)
328 //------------------------------------------------------------------
329 //This function makes a track forget its history :)
330 //------------------------------------------------------------------
336 fC10*=0; fC11*=factor;
337 fC20*=0; fC21*=0; fC22*=factor;
338 fC30*=0; fC31*=0; fC32*=0; fC33*=factor;
339 fC40*=0; fC41*=0; fC42*=0; fC43*=0; fC44*=factor;
340 SetNumberOfClusters(0);
344 fCurrentSigmaY2 = 0.000005;
345 fCurrentSigmaZ2 = 0.000005;
354 Int_t AliTPCseed::GetProlongation(Double_t xk, Double_t &y, Double_t & z) const
356 //-----------------------------------------------------------------
357 // This function find proloncation of a track to a reference plane x=xk.
358 // doesn't change internal state of the track
359 //-----------------------------------------------------------------
361 Double_t x1=fX, x2=x1+(xk-x1), dx=x2-x1;
363 if (TMath::Abs(fP4*xk - fP2) >= AliTPCReconstructor::GetMaxSnpTrack()) {
367 // Double_t y1=fP0, z1=fP1;
368 Double_t c1=fP4*x1 - fP2, r1=sqrt(1.- c1*c1);
369 Double_t c2=fP4*x2 - fP2, r2=sqrt(1.- c2*c2);
373 //y += dx*(c1+c2)/(r1+r2);
374 //z += dx*(c1+c2)/(c1*r2 + c2*r1)*fP3;
376 Double_t dy = dx*(c1+c2)/(r1+r2);
379 Double_t delta = fP4*dx*(c1+c2)/(c1*r2 + c2*r1);
381 if (TMath::Abs(delta)>0.0001){
382 dz = fP3*TMath::ASin(delta)/fP4;
384 dz = dx*fP3*(c1+c2)/(c1*r2 + c2*r1);
387 // dz = fP3*AliTPCFastMath::FastAsin(delta)/fP4;
388 dz = fP3*TMath::ASin(delta)/fP4;
398 //_____________________________________________________________________________
399 Double_t AliTPCseed::GetPredictedChi2(const AliCluster *c) const
401 //-----------------------------------------------------------------
402 // This function calculates a predicted chi2 increment.
403 //-----------------------------------------------------------------
404 //Double_t r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2();
405 Double_t r00=fErrorY2, r01=0., r11=fErrorZ2;
406 r00+=fC00; r01+=fC10; r11+=fC11;
408 Double_t det=r00*r11 - r01*r01;
409 if (TMath::Abs(det) < 1.e-10) {
410 //Int_t n=GetNumberOfClusters();
411 //if (n>4) cerr<<n<<" AliKalmanTrack warning: Singular matrix !\n";
414 Double_t tmp=r00; r00=r11; r11=tmp; r01=-r01;
416 Double_t dy=c->GetY() - fP0, dz=c->GetZ() - fP1;
418 return (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det;
422 //_________________________________________________________________________________________
425 Int_t AliTPCseed::Compare(const TObject *o) const {
426 //-----------------------------------------------------------------
427 // This function compares tracks according to the sector - for given sector according z
428 //-----------------------------------------------------------------
429 AliTPCseed *t=(AliTPCseed*)o;
432 if (t->fRelativeSector>fRelativeSector) return -1;
433 if (t->fRelativeSector<fRelativeSector) return 1;
434 Double_t z2 = t->GetZ();
435 Double_t z1 = GetZ();
437 if (z2<z1) return -1;
442 f2 = 1-20*TMath::Sqrt(t->fC44)/(TMath::Abs(t->GetC())+0.0066);
443 if (t->fBConstrain) f2=1.2;
446 f1 = 1-20*TMath::Sqrt(fC44)/(TMath::Abs(GetC())+0.0066);
448 if (fBConstrain) f1=1.2;
450 if (t->GetNumberOfClusters()*f2 <GetNumberOfClusters()*f1) return -1;
458 //_____________________________________________________________________________
459 Int_t AliTPCseed::Update(const AliCluster *c, Double_t chisq, UInt_t /*index*/) {
460 //-----------------------------------------------------------------
461 // This function associates a cluster with this track.
462 //-----------------------------------------------------------------
463 Double_t r00=fErrorY2, r01=0., r11=fErrorZ2;
465 r00+=fC00; r01+=fC10; r11+=fC11;
466 Double_t det=r00*r11 - r01*r01;
467 Double_t tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
469 Double_t k00=fC00*r00+fC10*r01, k01=fC00*r01+fC10*r11;
470 Double_t k10=fC10*r00+fC11*r01, k11=fC10*r01+fC11*r11;
471 Double_t k20=fC20*r00+fC21*r01, k21=fC20*r01+fC21*r11;
472 Double_t k30=fC30*r00+fC31*r01, k31=fC30*r01+fC31*r11;
473 Double_t k40=fC40*r00+fC41*r01, k41=fC40*r01+fC41*r11;
475 Double_t dy=c->GetY() - fP0, dz=c->GetZ() - fP1;
476 Double_t cur=fP4 + k40*dy + k41*dz, eta=fP2 + k20*dy + k21*dz;
477 if (TMath::Abs(cur*fX-eta) >= AliTPCReconstructor::GetMaxSnpTrack()) {
481 fP0 += k00*dy + k01*dz;
482 fP1 += k10*dy + k11*dz;
484 fP3 += k30*dy + k31*dz;
487 Double_t c01=fC10, c02=fC20, c03=fC30, c04=fC40;
488 Double_t c12=fC21, c13=fC31, c14=fC41;
490 fC00-=k00*fC00+k01*fC10; fC10-=k00*c01+k01*fC11;
491 fC20-=k00*c02+k01*c12; fC30-=k00*c03+k01*c13;
492 fC40-=k00*c04+k01*c14;
494 fC11-=k10*c01+k11*fC11;
495 fC21-=k10*c02+k11*c12; fC31-=k10*c03+k11*c13;
496 fC41-=k10*c04+k11*c14;
498 fC22-=k20*c02+k21*c12; fC32-=k20*c03+k21*c13;
499 fC42-=k20*c04+k21*c14;
501 fC33-=k30*c03+k31*c13;
502 fC43-=k40*c03+k41*c13;
504 fC44-=k40*c04+k41*c14;
506 Int_t n=GetNumberOfClusters();
508 SetNumberOfClusters(n+1);
509 SetChi2(GetChi2()+chisq);
516 //_____________________________________________________________________________
517 Float_t AliTPCseed::CookdEdx(Double_t low, Double_t up,Int_t i1, Int_t i2, Bool_t onlyused) {
518 //-----------------------------------------------------------------
519 // This funtion calculates dE/dX within the "low" and "up" cuts.
520 //-----------------------------------------------------------------
523 Float_t angular[200];
527 // TClonesArray & arr = *fPoints;
528 Float_t meanlog = 100.;
530 Float_t mean[4] = {0,0,0,0};
531 Float_t sigma[4] = {1000,1000,1000,1000};
532 Int_t nc[4] = {0,0,0,0};
533 Float_t norm[4] = {1000,1000,1000,1000};
538 for (Int_t of =0; of<4; of++){
539 for (Int_t i=of+i1;i<i2;i+=4)
541 Int_t index = fIndex[i];
542 if (index<0||index&0x8000) continue;
544 //AliTPCTrackPoint * point = (AliTPCTrackPoint *) arr.At(i);
545 AliTPCTrackerPoint * point = GetTrackPoint(i);
546 //AliTPCTrackerPoint * pointm = GetTrackPoint(i-1);
547 //AliTPCTrackerPoint * pointp = 0;
548 //if (i<159) pointp = GetTrackPoint(i+1);
550 if (point==0) continue;
551 AliTPCclusterMI * cl = fClusterPointer[i];
553 if (onlyused && (!cl->IsUsed(10))) continue;
554 if (cl->IsUsed(11)) {
558 Int_t type = cl->GetType();
559 //if (point->fIsShared){
564 // if (pointm->fIsShared) continue;
566 // if (pointp->fIsShared) continue;
568 if (type<0) continue;
569 //if (type>10) continue;
570 //if (point->GetErrY()==0) continue;
571 //if (point->GetErrZ()==0) continue;
573 //Float_t ddy = (point->GetY()-cl->GetY())/point->GetErrY();
574 //Float_t ddz = (point->GetZ()-cl->GetZ())/point->GetErrZ();
575 //if ((ddy*ddy+ddz*ddz)>10) continue;
578 // if (point->GetCPoint().GetMax()<5) continue;
579 if (cl->GetMax()<5) continue;
580 Float_t angley = point->GetAngleY();
581 Float_t anglez = point->GetAngleZ();
583 Float_t rsigmay2 = point->GetSigmaY();
584 Float_t rsigmaz2 = point->GetSigmaZ();
588 rsigmay += pointm->GetTPoint().GetSigmaY();
589 rsigmaz += pointm->GetTPoint().GetSigmaZ();
593 rsigmay += pointp->GetTPoint().GetSigmaY();
594 rsigmaz += pointp->GetTPoint().GetSigmaZ();
601 Float_t rsigma = TMath::Sqrt(rsigmay2*rsigmaz2);
603 Float_t ampc = 0; // normalization to the number of electrons
605 // ampc = 1.*point->GetCPoint().GetMax();
606 ampc = 1.*cl->GetMax();
607 //ampc = 1.*point->GetCPoint().GetQ();
608 // AliTPCClusterPoint & p = point->GetCPoint();
609 // Float_t dy = TMath::Abs(Int_t( TMath::Abs(p.GetY()/0.6)) - TMath::Abs(p.GetY()/0.6)+0.5);
610 // Float_t iz = (250.0-TMath::Abs(p.GetZ())+0.11)/0.566;
612 // TMath::Abs( Int_t(iz) - iz + 0.5);
613 //ampc *= 1.15*(1-0.3*dy);
614 //ampc *= 1.15*(1-0.3*dz);
615 // Float_t zfactor = (AliTPCReconstructor::GetCtgRange()-0.0004*TMath::Abs(point->GetCPoint().GetZ()));
619 //ampc = 1.0*point->GetCPoint().GetMax();
620 ampc = 1.0*cl->GetMax();
621 //ampc = 1.0*point->GetCPoint().GetQ();
622 //AliTPCClusterPoint & p = point->GetCPoint();
623 // Float_t dy = TMath::Abs(Int_t( TMath::Abs(p.GetY()/0.4)) - TMath::Abs(p.GetY()/0.4)+0.5);
624 //Float_t iz = (250.0-TMath::Abs(p.GetZ())+0.11)/0.566;
626 // TMath::Abs( Int_t(iz) - iz + 0.5);
628 //ampc *= 1.15*(1-0.3*dy);
629 //ampc *= 1.15*(1-0.3*dz);
630 // Float_t zfactor = (1.02-0.000*TMath::Abs(point->GetCPoint().GetZ()));
634 ampc *= 2.0; // put mean value to channel 50
635 //ampc *= 0.58; // put mean value to channel 50
637 // if (type>0) w = 1./(type/2.-0.5);
638 // Float_t z = TMath::Abs(cl->GetZ());
641 //ampc /= (1+0.0008*z);
645 //ampc /= (1+0.0008*z);
647 //ampc /= (1+0.0008*z);
650 if (type<0) { //amp at the border - lower weight
655 if (rsigma>1.5) ampc/=1.3; // if big backround
657 angular[nc[of]] = TMath::Sqrt(1.+angley*angley+anglez*anglez);
662 TMath::Sort(nc[of],amp,index,kFALSE);
666 //meanlog = amp[index[Int_t(nc[of]*0.33)]];
668 for (Int_t i=int(nc[of]*low+0.5);i<int(nc[of]*up+0.5);i++){
669 Float_t ampl = amp[index[i]]/angular[index[i]];
670 ampl = meanlog*TMath::Log(1.+ampl/meanlog);
672 sumw += weight[index[i]];
673 sumamp += weight[index[i]]*ampl;
674 sumamp2 += weight[index[i]]*ampl*ampl;
675 norm[of] += angular[index[i]]*weight[index[i]];
682 mean[of] = sumamp/sumw;
683 sigma[of] = sumamp2/sumw-mean[of]*mean[of];
685 sigma[of] = TMath::Sqrt(sigma[of]);
689 mean[of] = (TMath::Exp(mean[of]/meanlog)-1)*meanlog;
690 //mean *=(1-0.02*(sigma/(mean*0.17)-1.));
691 //mean *=(1-0.1*(norm-1.));
698 // mean[0]*= (1-0.05*(sigma[0]/(0.01+mean[1]*0.18)-1));
699 // mean[1]*= (1-0.05*(sigma[1]/(0.01+mean[0]*0.18)-1));
702 // dedx = (mean[0]* TMath::Sqrt((1.+nc[0]))+ mean[1]* TMath::Sqrt((1.+nc[1])) )/
703 // ( TMath::Sqrt((1.+nc[0]))+TMath::Sqrt((1.+nc[1])));
707 for (Int_t i =0;i<4;i++){
708 if (nc[i]>2&&nc[i]<1000){
709 dedx += mean[i] *nc[i];
710 fSdEdx += sigma[i]*(nc[i]-2);
711 fMAngular += norm[i] *nc[i];
716 fSDEDX[i] = sigma[i];
729 // Float_t dedx1 =dedx;
732 for (Int_t i =0;i<4;i++){
733 if (nc[i]>2&&nc[i]<1000){
734 mean[i] = mean[i]*(1-0.12*(sigma[i]/(fSdEdx)-1.));
735 dedx += mean[i] *nc[i];
746 Double_t AliTPCseed::Bethe(Double_t bg){
748 // This is the Bethe-Bloch function normalised to 1 at the minimum
753 bethe=(1.+ bg2)/bg2*(log(5940*bg2) - bg2/(1.+ bg2));
754 else // Density effect ( approximately :)
755 bethe=1.15*(1.+ bg2)/bg2*(log(3.5*5940*bg) - bg2/(1.+ bg2));
759 void AliTPCseed::CookPID()
762 // cook PID information according dEdx
764 Double_t fRange = 10.;
768 Int_t ns=AliPID::kSPECIES;
770 for (Int_t j=0; j<ns; j++) {
771 Double_t mass=AliPID::ParticleMass(j);
773 Double_t dedx=fdEdx/fMIP;
774 Double_t bethe=Bethe(mom/mass);
775 Double_t sigma=fRes*bethe;
777 if (TMath::Abs(dedx-bethe) > fRange*sigma) {
778 fTPCr[j]=TMath::Exp(-0.5*fRange*fRange)/sigma;
782 fTPCr[j]=TMath::Exp(-0.5*(dedx-bethe)*(dedx-bethe)/(sigma*sigma))/sigma;
790 for (Int_t j=0; j<ns; j++) {
791 fTPCr[j]/=sumr; //normalize
796 void AliTPCseed::CookdEdx2(Double_t low, Double_t up) {
797 //-----------------------------------------------------------------
798 // This funtion calculates dE/dX within the "low" and "up" cuts.
799 //-----------------------------------------------------------------
802 Float_t angular[200];
806 for (Int_t i=0;i<200;i++) inlimit[i]=kFALSE;
807 for (Int_t i=0;i<200;i++) amp[i]=10000;
808 for (Int_t i=0;i<200;i++) angular[i]= 1;;
812 Float_t meanlog = 100.;
813 Int_t indexde[4]={0,64,128,160};
820 Float_t mean[4] = {0,0,0,0};
821 Float_t sigma[4] = {1000,1000,1000,1000};
822 Int_t nc[4] = {0,0,0,0};
823 Float_t norm[4] = {1000,1000,1000,1000};
828 // for (Int_t of =0; of<3; of++){
829 // for (Int_t i=indexde[of];i<indexde[of+1];i++)
830 for (Int_t i =0; i<160;i++)
832 AliTPCTrackPoint * point = GetTrackPoint(i);
833 if (point==0) continue;
834 if (point->fIsShared){
838 Int_t type = point->GetCPoint().GetType();
839 if (type<0) continue;
840 if (point->GetCPoint().GetMax()<5) continue;
841 Float_t angley = point->GetTPoint().GetAngleY();
842 Float_t anglez = point->GetTPoint().GetAngleZ();
843 Float_t rsigmay = point->GetCPoint().GetSigmaY();
844 Float_t rsigmaz = point->GetCPoint().GetSigmaZ();
845 Float_t rsigma = TMath::Sqrt(rsigmay*rsigmaz);
847 Float_t ampc = 0; // normalization to the number of electrons
849 ampc = point->GetCPoint().GetMax();
852 ampc = point->GetCPoint().GetMax();
854 ampc *= 2.0; // put mean value to channel 50
855 // ampc *= 0.565; // put mean value to channel 50
858 Float_t z = TMath::Abs(point->GetCPoint().GetZ());
865 if (type<0) { //amp at the border - lower weight
868 if (rsigma>1.5) ampc/=1.3; // if big backround
869 angular[i] = TMath::Sqrt(1.+angley*angley+anglez*anglez);
870 amp[i] = ampc/angular[i];
875 TMath::Sort(159,amp,index,kFALSE);
876 for (Int_t i=int(anc*low+0.5);i<int(anc*up+0.5);i++){
877 inlimit[index[i]] = kTRUE; // take all clusters
880 // meanlog = amp[index[Int_t(anc*0.3)]];
882 for (Int_t of =0; of<3; of++){
886 for (Int_t i=indexde[of];i<indexde[of+1];i++)
888 if (inlimit[i]==kFALSE) continue;
889 Float_t ampl = amp[i];
891 ampl = meanlog*TMath::Log(1.+ampl/meanlog);
894 sumamp += weight[i]*ampl;
895 sumamp2 += weight[i]*ampl*ampl;
896 norm[of] += angular[i]*weight[i];
904 mean[of] = sumamp/sumw;
905 sigma[of] = sumamp2/sumw-mean[of]*mean[of];
907 sigma[of] = TMath::Sqrt(sigma[of]);
910 mean[of] = (TMath::Exp(mean[of]/meanlog)-1)*meanlog;
920 Float_t www[3] = {12.,14.,17.};
921 //Float_t www[3] = {1.,1.,1.};
923 for (Int_t i =0;i<3;i++){
924 if (nc[i]>2&&nc[i]<1000){
925 dedx += mean[i] *nc[i]*www[i]/sigma[i];
926 fSdEdx += sigma[i]*(nc[i]-2)*www[i]/sigma[i];
927 fMAngular += norm[i] *nc[i];
928 norm2 += nc[i]*www[i]/sigma[i];
929 norm3 += (nc[i]-2)*www[i]/sigma[i];
932 fSDEDX[i] = sigma[i];
945 // Float_t dedx1 =dedx;
949 for (Int_t i =0;i<3;i++){
950 if (nc[i]>2&&nc[i]<1000&&sigma[i]>3){
951 //mean[i] = mean[i]*(1+0.08*(sigma[i]/(fSdEdx)-1.));
952 dedx += mean[i] *(nc[i])/(sigma[i]);
953 norm4 += (nc[i])/(sigma[i]);
957 if (norm4>0) dedx /= norm4;