1 #ifndef ALIITSUTRACKERSAAUX_H
2 #define ALIITSUTRACKERSAAUX_H
12 #include "AliExternalTrackParam.h"
13 #include "AliITSUAux.h"
16 itsCluster():isUsed(false),x(0.f),y(0.f),z(0.f),varx(0.f),covxy(0.f),vary(0.f),phi(0.f),phiM(0.f) {}
17 itsCluster(const float &X,const float &Y, const float &Z, const float &varX, const float &covXY, const float &varY,const float &Phi, const float &PhiM) :
18 isUsed(false),x(X),y(Y),z(Z),varx(varX),covxy(covXY),vary(varY),phi(Phi),phiM(PhiM) {}
20 float x,y,z; // Global coordinates
21 float varx,covxy,vary; // Local covariance matrix
22 float phi,phiM; // phi of the cluster and phi angle of the module containing the cluster
25 friend ostream& operator<<(ostream& out, const itsCluster& cl) {
26 out << "pos = (" << cl.x << ", " << cl.y << ", "<< cl.z <<")"<<" phi="<<cl.phi <<endl;
33 nPlets() : id0(-1),id1(-1),id2(-1),level(1),tanPhi(),tanLambda(),neighbours() {}
34 nPlets(int arg0,int arg1) : id0(arg0),id1(arg1),id2(-1),level(1),tanPhi(),tanLambda(),neighbours() {}
37 float tanPhi,tanLambda;
38 vector<int> neighbours;
40 friend ostream& operator<<(ostream& out, const nPlets& cl) {
41 out << "id = (" << cl.id0 << ", " << cl.id1 << ", "<< cl.id2 <<")"<< endl;
42 out << "tanPhi="<< cl.tanPhi <<" tanLambda="<<cl.tanLambda << " level=" << cl.level <<endl;
43 out << "neighbours= ";
44 for( unsigned int i = 0; i< cl.neighbours.size(); ++i ) out << cl.neighbours[i];
51 class trackC : public AliExternalTrackParam {
53 trackC() : AliExternalTrackParam(), fChi2( 0. ), fPoints() {
54 for ( unsigned int i = 0; i < 2*AliITSUAux::kMaxLayers; ++i ) fPoints[i]=-1;
57 friend ostream& operator<<(ostream& out, const trackC& cl) {
59 for( unsigned int i = 0; i < 2*AliITSUAux::kMaxLayers; ++i ) out << cl.fPoints[i] << " ";
60 out << "), chi2: " << cl.fChi2 <<endl;
61 const double* par = cl.GetParameter();
62 const double* cov = cl.GetCovariance();
63 out << "X: " << cl.GetX() << " Alpha: " << cl.GetAlpha() << endl;
65 for (int i=0;i<5;i++) out << par[i] << " "; out << endl;
68 for (int i=0;i<5;i++) {for (int j=i+1;j--;) out << cov[cnt++] << " "; out << endl;}
73 /* bool operator < ( const trackC &t ) { return fChi2 < t.fChi2; } */
74 /* bool operator <= ( const trackC &t ) { return fChi2 <= t.fChi2; } */
75 /* bool operator > ( const trackC &t ) { return fChi2 > t.fChi2; } */
76 /* bool operator >= ( const trackC &t ) { return fChi2 >= t.fChi2; } */
77 /* bool operator == ( const trackC &t ) { return fChi2 == t.fChi2; } */
78 /* bool operator != ( const trackC &t ) { return fChi2 != t.fChi2; } */
80 Int_t fPoints[2*AliITSUAux::kMaxLayers];
85 struct CompDesc { //Adapted from TMath ROOT code
86 CompDesc(vector<trackC> *d) : fData(d) {}
88 bool operator()(int i1, int i2) {
89 return fData->at(i1).fChi2 > fData->at(i2).fChi2;
92 vector<trackC> *fData;