ClassImp(AliTRDseedV1)
+TLinearFitter *AliTRDseedV1::fgFitterY = 0x0;
+TLinearFitter *AliTRDseedV1::fgFitterZ = 0x0;
+
//____________________________________________________________________
AliTRDseedV1::AliTRDseedV1(Int_t det)
:AliTRDtrackletBase()
//
// Constructor
//
- for(Int_t ic=kNclusters; ic--;) fIndexes[ic] = -1;
+ memset(fIndexes,0xFF,kNclusters*sizeof(fIndexes[0]));
memset(fClusters, 0, kNclusters*sizeof(AliTRDcluster*));
memset(fPad, 0, 3*sizeof(Float_t));
fYref[0] = 0.; fYref[1] = 0.;
CookdEdx(fReconstructor->GetNdEdxSlices());
// Sets the a priori probabilities
- for(int ispec=0; ispec<AliPID::kSPECIES; ispec++) {
- fProb[ispec] = pd->GetProbability(ispec, GetMomentum(), &fdEdx[0], length, GetPlane());
+ if(fReconstructor->IsHLT()){
+ // this can be done here, because in HLT we have another NN
+ // don't run HLT with the normal NN because here we assume that the NN was trained with only two output neurons!
+ memset(fProb,0,AliPID::kSPECIES*sizeof(fProb[0]));
+ fProb[AliPID::kElectron] = pd->GetProbability(AliPID::kElectron, GetMomentum(), &fdEdx[0], length, GetPlane());
+ fProb[AliPID::kPion] = 1 - fProb[AliPID::kElectron];
}
-
+ else
+ for(int ispec=0; ispec<AliPID::kSPECIES; ispec++)
+ fProb[ispec] = pd->GetProbability(ispec, GetMomentum(), &fdEdx[0], length, GetPlane());
+
return kTRUE;
}
return fClusters[ic] ? fClusters[ic]->GetVolumeId() : 0;
}
+//____________________________________________________________________
+TLinearFitter* AliTRDseedV1::GetFitterY()
+{
+ if(!fgFitterY) fgFitterY = new TLinearFitter(1, "pol1");
+ fgFitterY->ClearPoints();
+ return fgFitterY;
+}
+
+//____________________________________________________________________
+TLinearFitter* AliTRDseedV1::GetFitterZ()
+{
+ if(!fgFitterZ) fgFitterZ = new TLinearFitter(1, "pol1");
+ fgFitterZ->ClearPoints();
+ return fgFitterZ;
+}
//____________________________________________________________________
void AliTRDseedV1::Calibrate()
Double_t yt, zt;
//AliTRDtrackerV1::AliTRDLeastSquare fitterZ;
- TLinearFitter fitterY(1, "pol1");
- TLinearFitter fitterZ(1, "pol1");
-
+ TLinearFitter& fitterY=*GetFitterY();
+ TLinearFitter& fitterZ=*GetFitterZ();
+
// book cluster information
Double_t qc[kNclusters], xc[kNclusters], yc[kNclusters], zc[kNclusters], sy[kNclusters];
#include "AliTRDReconstructor.h"
class TTreeSRedirector;
+class TLinearFitter;
class AliRieman;
void GetCalibParam(Float_t &exb, Float_t &vd, Float_t &t0, Float_t &s2, Float_t &dl, Float_t &dt) const {
exb = fExB; vd = fVD; t0 = fT0; s2 = fS2PRF; dl = fDiffL; dt = fDiffT;}
AliTRDcluster* GetClusters(Int_t i) const { return i<0 || i>=kNclusters ? 0x0 : fClusters[i];}
+ static TLinearFitter* GetFitterY();
+ static TLinearFitter* GetFitterZ();
Int_t GetIndexes(Int_t i) const{ return i<0 || i>=kNclusters ? -1 : fIndexes[i];}
Int_t GetLabels(Int_t i) const { return fLabels[i];}
Float_t GetMomentum(Float_t *err = 0x0) const;
Int_t fLabels[3]; // most frequent MC labels and total number of different labels
Double_t fRefCov[7]; // covariance matrix of the track in the yz plane + the rest of the diagonal elements
Double_t fCov[3]; // covariance matrix of the tracklet in the xy plane
+ static TLinearFitter *fgFitterY;
+ static TLinearFitter *fgFitterZ;
ClassDef(AliTRDseedV1, 7) // The offline TRD tracklet
};