public:
//ctor&dtor
- AliHMPIDDigit( ):AliDigit( ),fPad(AliHMPIDParam::Abs(-1,-1,-1,-1)),fQ(-1) {} //default ctor
- AliHMPIDDigit(Int_t pad,Int_t q,Int_t *t):AliDigit(t),fPad(pad ),fQ(q ) {if(fQ>4095)fQ=4095;} //digit ctor
- AliHMPIDDigit(Int_t pad,Int_t q ):AliDigit( ),fPad(pad ),fQ(q ) {if(fQ>4095)fQ=4095;} //digit ctor
- AliHMPIDDigit(const AliHMPIDDigit &d ):AliDigit(d),fPad(d.fPad),fQ(d.fQ) {} //copy ctor
- virtual ~AliHMPIDDigit() {} //dtor
+AliHMPIDDigit():
+ AliDigit( ),
+ fPad(AliHMPIDParam::Abs(-1,-1,-1,-1)),
+ fQ(-1)
+ {} //default ctor
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDDigit(Int_t pad,Int_t q,Int_t *t):
+ AliDigit(t),
+ fPad(pad),
+ fQ(q)
+ {if(fQ>4095) fQ=4095;} //digit ctor
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDDigit(Int_t pad,Int_t q):
+ AliDigit( ),
+ fPad(pad),
+ fQ(q )
+ {if(fQ>4095) fQ=4095;} //digit ctor
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDDigit& operator=(const AliHMPIDDigit& d)
+{
+ //
+ // Assignment operator
+ //
+ if(this!=&d){
+ AliDigit::operator=(d);
+ fPad = d.fPad;
+ fQ = d.fQ;
+ }
+ return *this;
+}
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDDigit(const AliHMPIDDigit &d):
+ AliDigit(d),
+ fPad(d.fPad),
+ fQ(d.fQ)
+ {} //copy ctor
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+virtual ~AliHMPIDDigit() {} //dtor
+
//framework part
Bool_t IsSortable ( )const{return kTRUE;} //provision to use TObject::Sort()
inline Int_t Compare (const TObject *pObj )const; //provision to use TObject::Sort()
class AliHMPIDHit : public AliHit // TObject-AliHit-AliHMPIDHit
{
public:
- AliHMPIDHit( ):AliHit( ),fCh(-1),fPid(-1 ),fQ(-1),fLx(0),fLy(0),fT(0) {} //default ctor
- AliHMPIDHit(Int_t c,Float_t &e,Int_t pid,Int_t tid,Float_t x,Float_t y, Float_t time, const TVector3 &p):AliHit(0,tid),fCh(c ),fPid(pid),fQ(0 ),fLx(x),fLy(y),fT(time) {e=QdcTot(e,time);fX=p.X();fY=p.Y();fZ=p.Z();}
- AliHMPIDHit(Int_t c,Float_t &e,Int_t pid,Int_t tid,Float_t x,Float_t y, Float_t time ):AliHit( ),fCh(c ),fPid(pid),fQ(0 ),fLx(x),fLy(y),fT(time){e=QdcTot(e,time);fTrack=tid;}//manual ctor
- AliHMPIDHit(const AliHMPIDHit &h):AliHit(h),fCh(h.fCh),fPid(h.fPid),fQ(h.fQ),fLx(h.fLx),fLy(h.fLy),fT(h.fT) {}//copy ctor
- virtual ~AliHMPIDHit() {}
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDHit():
+ AliHit(),
+ fCh(-1),
+ fPid(-1),
+ fQ(-1),
+ fLx(0),
+ fLy(0),
+ fT(0)
+ {} //default ctor
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDHit(Int_t c,Float_t &e,Int_t pid,Int_t tid,Float_t x,Float_t y, Float_t time, const TVector3 &p):
+ AliHit(0,tid),
+ fCh(c),
+ fPid(pid),
+ fQ(0 ),
+ fLx(x),
+ fLy(y),
+ fT(time)
+ {e=QdcTot(e,time);fX=p.X();fY=p.Y();fZ=p.Z();}
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDHit(Int_t c,Float_t &e,Int_t pid,Int_t tid,Float_t x,Float_t y, Float_t time):
+ AliHit(),
+ fCh(c),
+ fPid(pid),
+ fQ(0),
+ fLx(x),
+ fLy(y),
+ fT(time)
+ {e=QdcTot(e,time);fTrack=tid;}//manual ctor
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDHit& operator=(const AliHMPIDHit& h)
+{
+ //
+ // Assignment operator
+ //
+ if(this!=&h){
+ AliHit::operator=(h);
+ fCh = h.fCh;
+ fPid = h.fPid;
+ fQ = h.fQ;
+ fLx = h.fLx;
+ fLy = h.fLy;
+ fT = h.fT;
+ }
+ return *this;
+}
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+AliHMPIDHit(const AliHMPIDHit &h):
+ AliHit(h),
+ fCh(h.fCh),
+ fPid(h.fPid),
+ fQ(h.fQ),
+ fLx(h.fLx),
+ fLy(h.fLy),
+ fT(h.fT)
+ {}//copy ctor
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+virtual ~AliHMPIDHit() {}
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//framework part
void Print(Option_t *opt="")const; //from TObject to print current status
void Draw (Option_t *opt=""); //from TObject to Draw this hit
//
// assign. operator
//
- AliDetectorRecoParam::operator=(p);
- this->fHmpRecoMode= p.fHmpRecoMode;
- this->fHmpFixedDistCut=p.fHmpFixedDistCut;
- for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) this->fHmpUserCut[iCh] = p.fHmpUserCut[iCh];
- this->fHmpTrackMatchingDist=p.fHmpTrackMatchingDist;
- for(Int_t iPol=0;iPol<5;iPol++) this->fHmpTrackMatchingDistParas[iPol]=p.fHmpTrackMatchingDistParas[iPol];
+ if(this!=&p){
+ AliDetectorRecoParam::operator=(p);
+ this->fHmpRecoMode= p.fHmpRecoMode;
+ this->fHmpFixedDistCut=p.fHmpFixedDistCut;
+ for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) this->fHmpUserCut[iCh] = p.fHmpUserCut[iCh];
+ this->fHmpTrackMatchingDist=p.fHmpTrackMatchingDist;
+ for(Int_t iPol=0;iPol<5;iPol++) this->fHmpTrackMatchingDistParas[iPol]=p.fHmpTrackMatchingDistParas[iPol];
+ }
return *this;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
{
//
// assign. operator
-//
- AliDetectorRecoParam::operator=(p);
- this->fHmpRecoMode= p.fHmpRecoMode;
- this->fHmpFixedDistCut=p.fHmpFixedDistCut;
- for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) this->fHmpUserCut[iCh] = p.fHmpUserCut[iCh];
- this->fHmpTrackMatchingDist=p.fHmpTrackMatchingDist;
- for(Int_t iPol=0;iPol<5;iPol++) this->fHmpTrackMatchingDistParas[iPol]=p.fHmpTrackMatchingDistParas[iPol];
+ if(this!=&p){
+ AliDetectorRecoParam::operator=(p);
+ this->fHmpRecoMode= p.fHmpRecoMode;
+ this->fHmpFixedDistCut=p.fHmpFixedDistCut;
+ for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) this->fHmpUserCut[iCh] = p.fHmpUserCut[iCh];
+ this->fHmpTrackMatchingDist=p.fHmpTrackMatchingDist;
+ for(Int_t iPol=0;iPol<5;iPol++) this->fHmpTrackMatchingDistParas[iPol]=p.fHmpTrackMatchingDistParas[iPol];
+ }
return *this;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dMean2+=dist[indphi[i]]*dist[indphi[i]];
np++;
}
-
- dMean /=(Double_t)np;
- dMean2 /=(Double_t)np;
+
+ if(np>0){
+ dMean /=(Double_t)np;
+ dMean2 /=(Double_t)np;}
Double_t rms = TMath::Sqrt(dMean2 - dMean*dMean);
for(Int_t i=0;i<fNClu;i++) {
//_____calc. met min quadr using effective distance _________________________________________________
- coeff2ord = xy-xrotsumm*yrotsumm/np;
- coeff1ord = yrotsumm*yrotsumm/np - xrotsumm*xrotsumm/np - yy + xx;
+ if(np>0){
+ coeff2ord = xy-xrotsumm*yrotsumm/np;
+ coeff1ord = yrotsumm*yrotsumm/np - xrotsumm*xrotsumm/np - yy + xx;
+ }
coeff0ord = -coeff2ord;
AliDebug(1,Form(" a = %f b = %f c = %f",coeff2ord,coeff1ord,coeff0ord));
r2(coeff,m1,m2);
- n1=(yrotsumm-m1*xrotsumm)/np;
- n2=(yrotsumm-m2*xrotsumm)/np;
+ if(np>0){
+ n1=(yrotsumm-m1*xrotsumm)/np;
+ n2=(yrotsumm-m2*xrotsumm)/np;}
// 2 solutions.................
// negative angles solved...