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"
31 AliTPCseed::AliTPCseed():AliTPCtrack(){
35 for (Int_t i=0;i<200;i++) SetClusterIndex2(i,-3);
36 for (Int_t i=0;i<160;i++) fClusterPointer[i]=0;
37 for (Int_t i=0;i<3;i++) fKinkIndexes[i]=0;
38 for (Int_t i=0;i<5;i++) fTPCr[i]=0.2;
53 fCircular = 0; // not curling track
55 AliTPCseed::AliTPCseed(const AliTPCseed &s):AliTPCtrack(s){
56 //---------------------
57 // dummy copy constructor
58 //-------------------------
59 for (Int_t i=0;i<160;i++) fClusterPointer[i] = s.fClusterPointer[i];
60 for (Int_t i=0;i<160;i++) fIndex[i] = s.fIndex[i];
66 AliTPCseed::AliTPCseed(const AliTPCtrack &t):AliTPCtrack(t){
75 for (Int_t i=0;i<3;i++) fKinkIndexes[i]=t.GetKinkIndex(i);
76 for (Int_t i=0;i<5;i++) fTPCr[i]=0.2;
77 for (Int_t i=0;i<160;i++) {
78 fClusterPointer[i] = 0;
79 Int_t index = t.GetClusterIndex(i);
81 SetClusterIndex2(i,index);
84 SetClusterIndex2(i,-3);
98 AliTPCseed::AliTPCseed(UInt_t index, const Double_t xx[5], const Double_t cc[15],
99 Double_t xr, Double_t alpha):
100 AliTPCtrack(index, xx, cc, xr, alpha) {
105 for (Int_t i=0;i<200;i++) SetClusterIndex2(i,-3);
106 for (Int_t i=0;i<160;i++) fClusterPointer[i]=0;
107 for (Int_t i=0;i<3;i++) fKinkIndexes[i]=0;
108 for (Int_t i=0;i<5;i++) fTPCr[i]=0.2;
118 // fHelixIn = new TClonesArray("AliHelix",0);
119 //fHelixOut = new TClonesArray("AliHelix",0);
129 AliTPCseed::~AliTPCseed(){
132 if (fPoints) delete fPoints;
134 if (fEPoints) delete fEPoints;
139 AliTPCTrackerPoint * AliTPCseed::GetTrackPoint(Int_t i)
143 return &fTrackPoints[i];
146 void AliTPCseed::RebuildSeed()
149 // rebuild seed to be ready for storing
150 AliTPCclusterMI cldummy;
152 AliTPCTrackPoint pdummy;
153 pdummy.GetTPoint().fIsShared = 10;
154 for (Int_t i=0;i<160;i++){
155 AliTPCclusterMI * cl0 = fClusterPointer[i];
156 AliTPCTrackPoint *trpoint = (AliTPCTrackPoint*)fPoints->UncheckedAt(i);
158 trpoint->GetTPoint() = *(GetTrackPoint(i));
159 trpoint->GetCPoint() = *cl0;
160 trpoint->GetCPoint().SetQ(TMath::Abs(cl0->GetQ()));
164 trpoint->GetCPoint()= cldummy;
172 Double_t AliTPCseed::GetDensityFirst(Int_t n)
176 // return cluster for n rows bellow first point
177 Int_t nfoundable = 1;
179 for (Int_t i=fLastPoint-1;i>0&&nfoundable<n; i--){
180 Int_t index = GetClusterIndex2(i);
181 if (index!=-1) nfoundable++;
182 if (index>0) nfound++;
184 if (nfoundable<n) return 0;
185 return Double_t(nfound)/Double_t(nfoundable);
190 void AliTPCseed::GetClusterStatistic(Int_t first, Int_t last, Int_t &found, Int_t &foundable, Int_t &shared, Bool_t plus2)
192 // get cluster stat. on given region
197 for (Int_t i=first;i<last; i++){
198 Int_t index = GetClusterIndex2(i);
199 if (index!=-1) foundable++;
200 if (fClusterPointer[i]) {
206 if (fClusterPointer[i]->IsUsed(10)) {
210 if (!plus2) continue; //take also neighborhoud
212 if ( (i>0) && fClusterPointer[i-1]){
213 if (fClusterPointer[i-1]->IsUsed(10)) {
218 if ( fClusterPointer[i+1]){
219 if (fClusterPointer[i+1]->IsUsed(10)) {
227 //Error("AliTPCseed::GetClusterStatistic","problem\n");
235 void AliTPCseed::Reset(Bool_t all)
239 SetNumberOfClusters(0);
245 for (Int_t i=0;i<8;i++){
246 delete [] fTrackPoints[i];
254 for (Int_t i=0;i<200;i++) SetClusterIndex2(i,-3);
255 for (Int_t i=0;i<160;i++) fClusterPointer[i]=0;
261 void AliTPCseed::Modify(Double_t factor)
264 //------------------------------------------------------------------
265 //This function makes a track forget its history :)
266 //------------------------------------------------------------------
272 fC10*=0; fC11*=factor;
273 fC20*=0; fC21*=0; fC22*=factor;
274 fC30*=0; fC31*=0; fC32*=0; fC33*=factor;
275 fC40*=0; fC41*=0; fC42*=0; fC43*=0; fC44*=factor;
276 SetNumberOfClusters(0);
280 fCurrentSigmaY2 = 0.000005;
281 fCurrentSigmaZ2 = 0.000005;
290 Int_t AliTPCseed::GetProlongation(Double_t xk, Double_t &y, Double_t & z) const
292 //-----------------------------------------------------------------
293 // This function find proloncation of a track to a reference plane x=xk.
294 // doesn't change internal state of the track
295 //-----------------------------------------------------------------
297 Double_t x1=fX, x2=x1+(xk-x1), dx=x2-x1;
299 if (TMath::Abs(fP4*xk - fP2) >= 0.999) {
303 // Double_t y1=fP0, z1=fP1;
304 Double_t c1=fP4*x1 - fP2, r1=sqrt(1.- c1*c1);
305 Double_t c2=fP4*x2 - fP2, r2=sqrt(1.- c2*c2);
309 //y += dx*(c1+c2)/(r1+r2);
310 //z += dx*(c1+c2)/(c1*r2 + c2*r1)*fP3;
312 Double_t dy = dx*(c1+c2)/(r1+r2);
315 Double_t delta = fP4*dx*(c1+c2)/(c1*r2 + c2*r1);
317 if (TMath::Abs(delta)>0.0001){
318 dz = fP3*TMath::ASin(delta)/fP4;
320 dz = dx*fP3*(c1+c2)/(c1*r2 + c2*r1);
323 // dz = fP3*AliTPCFastMath::FastAsin(delta)/fP4;
324 dz = fP3*TMath::ASin(delta)/fP4;
334 //_____________________________________________________________________________
335 Double_t AliTPCseed::GetPredictedChi2(const AliCluster *c) const
337 //-----------------------------------------------------------------
338 // This function calculates a predicted chi2 increment.
339 //-----------------------------------------------------------------
340 //Double_t r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2();
341 Double_t r00=fErrorY2, r01=0., r11=fErrorZ2;
342 r00+=fC00; r01+=fC10; r11+=fC11;
344 Double_t det=r00*r11 - r01*r01;
345 if (TMath::Abs(det) < 1.e-10) {
346 //Int_t n=GetNumberOfClusters();
347 //if (n>4) cerr<<n<<" AliKalmanTrack warning: Singular matrix !\n";
350 Double_t tmp=r00; r00=r11; r11=tmp; r01=-r01;
352 Double_t dy=c->GetY() - fP0, dz=c->GetZ() - fP1;
354 return (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det;
358 //_________________________________________________________________________________________
361 Int_t AliTPCseed::Compare(const TObject *o) const {
362 //-----------------------------------------------------------------
363 // This function compares tracks according to the sector - for given sector according z
364 //-----------------------------------------------------------------
365 AliTPCseed *t=(AliTPCseed*)o;
368 if (t->fRelativeSector>fRelativeSector) return -1;
369 if (t->fRelativeSector<fRelativeSector) return 1;
370 Double_t z2 = t->GetZ();
371 Double_t z1 = GetZ();
373 if (z2<z1) return -1;
378 f2 = 1-20*TMath::Sqrt(t->fC44)/(TMath::Abs(t->GetC())+0.0066);
379 if (t->fBConstrain) f2=1.2;
382 f1 = 1-20*TMath::Sqrt(fC44)/(TMath::Abs(GetC())+0.0066);
384 if (fBConstrain) f1=1.2;
386 if (t->GetNumberOfClusters()*f2 <GetNumberOfClusters()*f1) return -1;
394 //_____________________________________________________________________________
395 Int_t AliTPCseed::Update(const AliCluster *c, Double_t chisq, UInt_t /*index*/) {
396 //-----------------------------------------------------------------
397 // This function associates a cluster with this track.
398 //-----------------------------------------------------------------
399 Double_t r00=fErrorY2, r01=0., r11=fErrorZ2;
401 r00+=fC00; r01+=fC10; r11+=fC11;
402 Double_t det=r00*r11 - r01*r01;
403 Double_t tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
405 Double_t k00=fC00*r00+fC10*r01, k01=fC00*r01+fC10*r11;
406 Double_t k10=fC10*r00+fC11*r01, k11=fC10*r01+fC11*r11;
407 Double_t k20=fC20*r00+fC21*r01, k21=fC20*r01+fC21*r11;
408 Double_t k30=fC30*r00+fC31*r01, k31=fC30*r01+fC31*r11;
409 Double_t k40=fC40*r00+fC41*r01, k41=fC40*r01+fC41*r11;
411 Double_t dy=c->GetY() - fP0, dz=c->GetZ() - fP1;
412 Double_t cur=fP4 + k40*dy + k41*dz, eta=fP2 + k20*dy + k21*dz;
413 if (TMath::Abs(cur*fX-eta) >= 0.9) {
417 fP0 += k00*dy + k01*dz;
418 fP1 += k10*dy + k11*dz;
420 fP3 += k30*dy + k31*dz;
423 Double_t c01=fC10, c02=fC20, c03=fC30, c04=fC40;
424 Double_t c12=fC21, c13=fC31, c14=fC41;
426 fC00-=k00*fC00+k01*fC10; fC10-=k00*c01+k01*fC11;
427 fC20-=k00*c02+k01*c12; fC30-=k00*c03+k01*c13;
428 fC40-=k00*c04+k01*c14;
430 fC11-=k10*c01+k11*fC11;
431 fC21-=k10*c02+k11*c12; fC31-=k10*c03+k11*c13;
432 fC41-=k10*c04+k11*c14;
434 fC22-=k20*c02+k21*c12; fC32-=k20*c03+k21*c13;
435 fC42-=k20*c04+k21*c14;
437 fC33-=k30*c03+k31*c13;
438 fC43-=k40*c03+k41*c13;
440 fC44-=k40*c04+k41*c14;
442 Int_t n=GetNumberOfClusters();
444 SetNumberOfClusters(n+1);
445 SetChi2(GetChi2()+chisq);
452 //_____________________________________________________________________________
453 Float_t AliTPCseed::CookdEdx(Double_t low, Double_t up,Int_t i1, Int_t i2, Bool_t onlyused) {
454 //-----------------------------------------------------------------
455 // This funtion calculates dE/dX within the "low" and "up" cuts.
456 //-----------------------------------------------------------------
459 Float_t angular[200];
463 // TClonesArray & arr = *fPoints;
464 Float_t meanlog = 100.;
466 Float_t mean[4] = {0,0,0,0};
467 Float_t sigma[4] = {1000,1000,1000,1000};
468 Int_t nc[4] = {0,0,0,0};
469 Float_t norm[4] = {1000,1000,1000,1000};
474 for (Int_t of =0; of<4; of++){
475 for (Int_t i=of+i1;i<i2;i+=4)
477 Int_t index = fIndex[i];
478 if (index<0||index&0x8000) continue;
480 //AliTPCTrackPoint * point = (AliTPCTrackPoint *) arr.At(i);
481 AliTPCTrackerPoint * point = GetTrackPoint(i);
482 //AliTPCTrackerPoint * pointm = GetTrackPoint(i-1);
483 //AliTPCTrackerPoint * pointp = 0;
484 //if (i<159) pointp = GetTrackPoint(i+1);
486 if (point==0) continue;
487 AliTPCclusterMI * cl = fClusterPointer[i];
489 if (onlyused && (!cl->IsUsed(10))) continue;
490 if (cl->IsUsed(11)) {
494 Int_t type = cl->GetType();
495 //if (point->fIsShared){
500 // if (pointm->fIsShared) continue;
502 // if (pointp->fIsShared) continue;
504 if (type<0) continue;
505 //if (type>10) continue;
506 //if (point->GetErrY()==0) continue;
507 //if (point->GetErrZ()==0) continue;
509 //Float_t ddy = (point->GetY()-cl->GetY())/point->GetErrY();
510 //Float_t ddz = (point->GetZ()-cl->GetZ())/point->GetErrZ();
511 //if ((ddy*ddy+ddz*ddz)>10) continue;
514 // if (point->GetCPoint().GetMax()<5) continue;
515 if (cl->GetMax()<5) continue;
516 Float_t angley = point->GetAngleY();
517 Float_t anglez = point->GetAngleZ();
519 Float_t rsigmay2 = point->GetSigmaY();
520 Float_t rsigmaz2 = point->GetSigmaZ();
524 rsigmay += pointm->GetTPoint().GetSigmaY();
525 rsigmaz += pointm->GetTPoint().GetSigmaZ();
529 rsigmay += pointp->GetTPoint().GetSigmaY();
530 rsigmaz += pointp->GetTPoint().GetSigmaZ();
537 Float_t rsigma = TMath::Sqrt(rsigmay2*rsigmaz2);
539 Float_t ampc = 0; // normalization to the number of electrons
541 // ampc = 1.*point->GetCPoint().GetMax();
542 ampc = 1.*cl->GetMax();
543 //ampc = 1.*point->GetCPoint().GetQ();
544 // AliTPCClusterPoint & p = point->GetCPoint();
545 // Float_t dy = TMath::Abs(Int_t( TMath::Abs(p.GetY()/0.6)) - TMath::Abs(p.GetY()/0.6)+0.5);
546 // Float_t iz = (250.0-TMath::Abs(p.GetZ())+0.11)/0.566;
548 // TMath::Abs( Int_t(iz) - iz + 0.5);
549 //ampc *= 1.15*(1-0.3*dy);
550 //ampc *= 1.15*(1-0.3*dz);
551 // Float_t zfactor = (AliTPCReconstructor::GetCtgRange()-0.0004*TMath::Abs(point->GetCPoint().GetZ()));
555 //ampc = 1.0*point->GetCPoint().GetMax();
556 ampc = 1.0*cl->GetMax();
557 //ampc = 1.0*point->GetCPoint().GetQ();
558 //AliTPCClusterPoint & p = point->GetCPoint();
559 // Float_t dy = TMath::Abs(Int_t( TMath::Abs(p.GetY()/0.4)) - TMath::Abs(p.GetY()/0.4)+0.5);
560 //Float_t iz = (250.0-TMath::Abs(p.GetZ())+0.11)/0.566;
562 // TMath::Abs( Int_t(iz) - iz + 0.5);
564 //ampc *= 1.15*(1-0.3*dy);
565 //ampc *= 1.15*(1-0.3*dz);
566 // Float_t zfactor = (1.02-0.000*TMath::Abs(point->GetCPoint().GetZ()));
570 ampc *= 2.0; // put mean value to channel 50
571 //ampc *= 0.58; // put mean value to channel 50
573 // if (type>0) w = 1./(type/2.-0.5);
574 // Float_t z = TMath::Abs(cl->GetZ());
577 //ampc /= (1+0.0008*z);
581 //ampc /= (1+0.0008*z);
583 //ampc /= (1+0.0008*z);
586 if (type<0) { //amp at the border - lower weight
591 if (rsigma>1.5) ampc/=1.3; // if big backround
593 angular[nc[of]] = TMath::Sqrt(1.+angley*angley+anglez*anglez);
598 TMath::Sort(nc[of],amp,index,kFALSE);
602 //meanlog = amp[index[Int_t(nc[of]*0.33)]];
604 for (Int_t i=int(nc[of]*low+0.5);i<int(nc[of]*up+0.5);i++){
605 Float_t ampl = amp[index[i]]/angular[index[i]];
606 ampl = meanlog*TMath::Log(1.+ampl/meanlog);
608 sumw += weight[index[i]];
609 sumamp += weight[index[i]]*ampl;
610 sumamp2 += weight[index[i]]*ampl*ampl;
611 norm[of] += angular[index[i]]*weight[index[i]];
618 mean[of] = sumamp/sumw;
619 sigma[of] = sumamp2/sumw-mean[of]*mean[of];
621 sigma[of] = TMath::Sqrt(sigma[of]);
625 mean[of] = (TMath::Exp(mean[of]/meanlog)-1)*meanlog;
626 //mean *=(1-0.02*(sigma/(mean*0.17)-1.));
627 //mean *=(1-0.1*(norm-1.));
634 // mean[0]*= (1-0.05*(sigma[0]/(0.01+mean[1]*0.18)-1));
635 // mean[1]*= (1-0.05*(sigma[1]/(0.01+mean[0]*0.18)-1));
638 // dedx = (mean[0]* TMath::Sqrt((1.+nc[0]))+ mean[1]* TMath::Sqrt((1.+nc[1])) )/
639 // ( TMath::Sqrt((1.+nc[0]))+TMath::Sqrt((1.+nc[1])));
643 for (Int_t i =0;i<4;i++){
644 if (nc[i]>2&&nc[i]<1000){
645 dedx += mean[i] *nc[i];
646 fSdEdx += sigma[i]*(nc[i]-2);
647 fMAngular += norm[i] *nc[i];
652 fSDEDX[i] = sigma[i];
665 // Float_t dedx1 =dedx;
668 for (Int_t i =0;i<4;i++){
669 if (nc[i]>2&&nc[i]<1000){
670 mean[i] = mean[i]*(1-0.12*(sigma[i]/(fSdEdx)-1.));
671 dedx += mean[i] *nc[i];
686 Double_t p=TMath::Sqrt((1.+ GetTgl()*GetTgl())/(Get1Pt()*Get1Pt()));
689 if (dedx < 39.+ 12./(p+0.25)/(p+0.25)) { SetMass(0.13957); return dedx;}
690 if (dedx < 39.+ 12./p/p) { SetMass(0.49368); return dedx;}
691 SetMass(0.93827); return dedx;
695 if (dedx < 39.+ 12./(p+0.25)/(p+0.25)) { SetMass(0.13957); return dedx;}
696 SetMass(0.93827); return dedx;
699 SetMass(0.13957); return dedx;
702 Double_t AliTPCseed::Bethe(Double_t bg){
704 // This is the Bethe-Bloch function normalised to 1 at the minimum
709 bethe=(1.+ bg2)/bg2*(log(5940*bg2) - bg2/(1.+ bg2));
710 else // Density effect ( approximately :)
711 bethe=1.15*(1.+ bg2)/bg2*(log(3.5*5940*bg) - bg2/(1.+ bg2));
715 void AliTPCseed::CookPID()
718 // cook PID information according dEdx
720 Double_t fRange = 10.;
724 Int_t ns=AliPID::kSPECIES;
726 for (Int_t j=0; j<ns; j++) {
727 Double_t mass=AliPID::ParticleMass(j);
729 Double_t dedx=fdEdx/fMIP;
730 Double_t bethe=Bethe(mom/mass);
731 Double_t sigma=fRes*bethe;
733 if (TMath::Abs(dedx-bethe) > fRange*sigma) {
734 fTPCr[j]=TMath::Exp(-0.5*fRange*fRange)/sigma;
738 fTPCr[j]=TMath::Exp(-0.5*(dedx-bethe)*(dedx-bethe)/(sigma*sigma))/sigma;
746 for (Int_t j=0; j<ns; j++) {
747 fTPCr[j]/=sumr; //normalize
752 void AliTPCseed::CookdEdx2(Double_t low, Double_t up) {
753 //-----------------------------------------------------------------
754 // This funtion calculates dE/dX within the "low" and "up" cuts.
755 //-----------------------------------------------------------------
758 Float_t angular[200];
762 for (Int_t i=0;i<200;i++) inlimit[i]=kFALSE;
763 for (Int_t i=0;i<200;i++) amp[i]=10000;
764 for (Int_t i=0;i<200;i++) angular[i]= 1;;
768 Float_t meanlog = 100.;
769 Int_t indexde[4]={0,64,128,160};
776 Float_t mean[4] = {0,0,0,0};
777 Float_t sigma[4] = {1000,1000,1000,1000};
778 Int_t nc[4] = {0,0,0,0};
779 Float_t norm[4] = {1000,1000,1000,1000};
784 // for (Int_t of =0; of<3; of++){
785 // for (Int_t i=indexde[of];i<indexde[of+1];i++)
786 for (Int_t i =0; i<160;i++)
788 AliTPCTrackPoint * point = GetTrackPoint(i);
789 if (point==0) continue;
790 if (point->fIsShared){
794 Int_t type = point->GetCPoint().GetType();
795 if (type<0) continue;
796 if (point->GetCPoint().GetMax()<5) continue;
797 Float_t angley = point->GetTPoint().GetAngleY();
798 Float_t anglez = point->GetTPoint().GetAngleZ();
799 Float_t rsigmay = point->GetCPoint().GetSigmaY();
800 Float_t rsigmaz = point->GetCPoint().GetSigmaZ();
801 Float_t rsigma = TMath::Sqrt(rsigmay*rsigmaz);
803 Float_t ampc = 0; // normalization to the number of electrons
805 ampc = point->GetCPoint().GetMax();
808 ampc = point->GetCPoint().GetMax();
810 ampc *= 2.0; // put mean value to channel 50
811 // ampc *= 0.565; // put mean value to channel 50
814 Float_t z = TMath::Abs(point->GetCPoint().GetZ());
821 if (type<0) { //amp at the border - lower weight
824 if (rsigma>1.5) ampc/=1.3; // if big backround
825 angular[i] = TMath::Sqrt(1.+angley*angley+anglez*anglez);
826 amp[i] = ampc/angular[i];
831 TMath::Sort(159,amp,index,kFALSE);
832 for (Int_t i=int(anc*low+0.5);i<int(anc*up+0.5);i++){
833 inlimit[index[i]] = kTRUE; // take all clusters
836 // meanlog = amp[index[Int_t(anc*0.3)]];
838 for (Int_t of =0; of<3; of++){
842 for (Int_t i=indexde[of];i<indexde[of+1];i++)
844 if (inlimit[i]==kFALSE) continue;
845 Float_t ampl = amp[i];
847 ampl = meanlog*TMath::Log(1.+ampl/meanlog);
850 sumamp += weight[i]*ampl;
851 sumamp2 += weight[i]*ampl*ampl;
852 norm[of] += angular[i]*weight[i];
860 mean[of] = sumamp/sumw;
861 sigma[of] = sumamp2/sumw-mean[of]*mean[of];
863 sigma[of] = TMath::Sqrt(sigma[of]);
866 mean[of] = (TMath::Exp(mean[of]/meanlog)-1)*meanlog;
876 Float_t www[3] = {12.,14.,17.};
877 //Float_t www[3] = {1.,1.,1.};
879 for (Int_t i =0;i<3;i++){
880 if (nc[i]>2&&nc[i]<1000){
881 dedx += mean[i] *nc[i]*www[i]/sigma[i];
882 fSdEdx += sigma[i]*(nc[i]-2)*www[i]/sigma[i];
883 fMAngular += norm[i] *nc[i];
884 norm2 += nc[i]*www[i]/sigma[i];
885 norm3 += (nc[i]-2)*www[i]/sigma[i];
888 fSDEDX[i] = sigma[i];
901 // Float_t dedx1 =dedx;
905 for (Int_t i =0;i<3;i++){
906 if (nc[i]>2&&nc[i]<1000&&sigma[i]>3){
907 //mean[i] = mean[i]*(1+0.08*(sigma[i]/(fSdEdx)-1.));
908 dedx += mean[i] *(nc[i])/(sigma[i]);
909 norm4 += (nc[i])/(sigma[i]);
913 if (norm4>0) dedx /= norm4;