}
+void AliTPCCorrection::GetDistortionIntegralDz(const Float_t x[],const Short_t roc,Float_t dx[], Float_t delta){
+ //
+ // Integrate 3D distortion along drift lines
+ // To define the drift lines virtual function AliTPCCorrection::GetCorrectionDz is used
+ //
+ // Input parameters:
+ // x[] - space point corrdinate
+ // roc - readout chamber identifier (important e.g to do not miss the side of detector)
+ // delta - define the size of neighberhood
+ // Output parameter:
+ // dx[] - array { integral(dx'/dz), integral(dy'/dz) , integral(dz'/dz) }
+
+ Float_t zroc= ((roc%36)<18) ? fgkTPCZ0:-fgkTPCZ0;
+ Double_t zdrift = TMath::Abs(x[2]-zroc);
+ Int_t nsteps = Int_t(zdrift/delta)+1;
+ //
+ //
+ Float_t xyz[3]={x[0],x[1],x[2]};
+ Float_t dxyz[3]={x[0],x[1],x[2]};
+ Float_t sign=((roc%36)<18) ? 1.:-1.;
+ Double_t sumdz=0;
+ for (Int_t i=0;i<nsteps; i++){
+ Float_t deltaZ=delta;
+ if (xyz[2]+deltaZ>fgkTPCZ0) deltaZ=TMath::Abs(xyz[2]-fgkTPCZ0);
+ if (xyz[2]-deltaZ<-fgkTPCZ0) deltaZ=TMath::Abs(xyz[2]-fgkTPCZ0);
+ deltaZ*=sign;
+ GetCorrectionDz(xyz,roc,dxyz,delta);
+ xyz[0]-=deltaZ*dxyz[0];
+ xyz[1]-=deltaZ*dxyz[1];
+ xyz[2]-=deltaZ; //
+ sumdz-=deltaZ*dxyz[2];
+ }
+ //
+ dx[0]=x[0]-xyz[0];
+ dx[1]=x[1]-xyz[1];
+ dx[2]= dxyz[2];
+
+}
void AliTPCCorrection::Init() {
virtual void GetCorrectionDz(const Float_t x[],const Short_t roc,Float_t dx[], Float_t delta);
virtual void GetCorrectionIntegralDz(const Float_t x[],const Short_t roc,Float_t dx[], Float_t delta);
-
+
// functions to distort a space point
void DistortPoint ( Float_t x[],const Short_t roc);
void DistortPointLocal(Float_t x[],const Short_t roc);
void DistortPoint (const Float_t x[],const Short_t roc,Float_t xp[]);
virtual void GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]);
-
+ virtual void GetDistortionIntegralDz(const Float_t x[],const Short_t roc,Float_t dx[], Float_t delta);
+
// initialization and update functions
virtual void Init();
virtual void Update(const TTimeStamp &timeStamp);
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+#include <TMath.h>
+#include <TMatrixF.h>
+
+#include <AliLog.h>
+#include <AliTPCROC.h>
+
+#include "AliTPCCorrection.h"
+
+#include "AliTPCCorrectionLookupTable.h"
+
+ClassImp(AliTPCCorrectionLookupTable)
+
+//_________________________________________________________________________________________
+AliTPCCorrectionLookupTable::AliTPCCorrectionLookupTable()
+: AliTPCCorrection()
+, fNR(90)
+, fNPhi(144)
+, fNZ(130)
+, fLimitsRows()
+, fLimitsPhiSlices()
+, fLimitsColumns()
+, fLookUpDxDist(0x0)
+, fLookUpDyDist(0x0)
+, fLookUpDzDist(0x0)
+, fLookUpDxCorr(0x0)
+, fLookUpDyCorr(0x0)
+, fLookUpDzCorr(0x0)
+{
+ //
+ //
+ //
+}
+//_________________________________________________________________________________________
+AliTPCCorrectionLookupTable::~AliTPCCorrectionLookupTable()
+{
+ //
+ // dtor
+ //
+
+ ResetTables();
+}
+
+//_________________________________________________________________________________________
+void AliTPCCorrectionLookupTable::GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]) {
+ //
+ // Get interpolated Distortion
+ //
+
+ GetInterpolation(x,roc,dx,fLookUpDxDist,fLookUpDyDist,fLookUpDzDist,1);
+}
+
+//_________________________________________________________________________________________
+void AliTPCCorrectionLookupTable::GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]) {
+ //
+ // Get interplolated correction
+ //
+ GetInterpolation(x,roc,dx,fLookUpDxCorr,fLookUpDyCorr,fLookUpDzCorr,0);
+}
+
+//_________________________________________________________________________________________
+void AliTPCCorrectionLookupTable::GetInterpolation(const Float_t x[],const Short_t roc,Float_t dx[],
+ TMatrixF **mDx, TMatrixF **mDy, TMatrixF **mDz,
+ Int_t type)
+{
+ //
+ // Calculates the correction/distotring from a lookup table
+ // type: 0 = correction
+ // 1 = distortion
+ //
+
+// Float_t typeSign=-1;
+// if (type==1) typeSign=1;
+
+ Int_t order = 1 ; // FIXME: hardcoded? Linear interpolation = 1, Quadratic = 2
+
+ Double_t r, phi, z ;
+ Int_t sign;
+
+ r = TMath::Sqrt( x[0]*x[0] + x[1]*x[1] ) ;
+ phi = TMath::ATan2(x[1],x[0]) ;
+ if ( phi < 0 ) phi += TMath::TwoPi() ; // Table uses phi from 0 to 2*Pi
+ z = x[2] ; // Create temporary copy of x[2]
+
+ if ( (roc%36) < 18 ) {
+ sign = 1; // (TPC A side)
+ } else {
+ sign = -1; // (TPC C side)
+ }
+
+ if ( sign==1 && z < fgkZOffSet ) z = fgkZOffSet; // Protect against discontinuity at CE
+ if ( sign==-1 && z > -fgkZOffSet ) z = -fgkZOffSet; // Protect against discontinuity at CE
+
+
+ if ( (sign==1 && z<0) || (sign==-1 && z>0) ) // just a consistency check
+ AliError("ROC number does not correspond to z coordinate! Calculation of distortions is most likely wrong!");
+
+ // Get the Er and Ephi field integrals plus the integral over Z
+ dx[0] = Interpolate3DTable(order, r, z, phi,
+ fNR, fNZ, fNPhi,
+ fLimitsRows.GetMatrixArray(),
+ fLimitsColumns.GetMatrixArray(),
+ fLimitsPhiSlices.GetMatrixArray(),
+ mDx );
+ dx[1] = Interpolate3DTable(order, r, z, phi,
+ fNR, fNZ, fNPhi,
+ fLimitsRows.GetMatrixArray(),
+ fLimitsColumns.GetMatrixArray(),
+ fLimitsPhiSlices.GetMatrixArray(),
+ mDy);
+ dx[2] = Interpolate3DTable(order, r, z, phi,
+ fNR, fNZ, fNPhi,
+ fLimitsRows.GetMatrixArray(),
+ fLimitsColumns.GetMatrixArray(),
+ fLimitsPhiSlices.GetMatrixArray(),
+ mDz );
+}
+
+//_________________________________________________________________________________________
+void AliTPCCorrectionLookupTable::CreateLookupTable(AliTPCCorrection &tpcCorr, Int_t /*rows*//*=90*/, Int_t /*phiSlices*//*=144*/, Int_t /*columns*//*=130*/ )
+{
+ //
+ //
+ //
+
+ // create distortion lookup table
+
+ const Float_t delta=5.; // 5cm
+ Float_t x[3]={0.,0.,0.};
+ Float_t dx[3]={0.,0.,0.};
+
+ for (Int_t iPhi=0; iPhi<fNPhi; ++iPhi){
+ Double_t phi=fLimitsPhiSlices(iPhi);
+ //
+ TMatrixF &mDxDist = *fLookUpDxDist[iPhi];
+ TMatrixF &mDyDist = *fLookUpDyDist[iPhi];
+ TMatrixF &mDzDist = *fLookUpDzDist[iPhi];
+ //
+ TMatrixF &mDxCorr = *fLookUpDxCorr[iPhi];
+ TMatrixF &mDyCorr = *fLookUpDyCorr[iPhi];
+ TMatrixF &mDzCorr = *fLookUpDzCorr[iPhi];
+
+ for (Int_t ir=0; ir<fNR; ++ir){
+ Double_t r=fLimitsRows(ir);
+ x[0]=r * TMath::Cos(phi);
+ x[1]=r * TMath::Sin(phi);
+
+ for (Int_t iz=0; iz<fNZ; ++iz){
+ Double_t z=fLimitsColumns(iz);
+ x[2]=z;
+ //TODO: change hardcoded value for r>133.?
+ Int_t roc=TMath::Nint(phi*TMath::RadToDeg()/20.)%18;
+ if (r>133.) roc+=36;
+ if (z<0) roc+=18;
+
+ tpcCorr.GetDistortionIntegralDz(x,roc,dx,delta);
+ mDxDist(ir,iz)=dx[0];
+ mDyDist(ir,iz)=dx[1];
+ mDzDist(ir,iz)=dx[2];
+
+ tpcCorr.GetCorrectionIntegralDz(x,roc,dx,delta);
+ mDxCorr(ir,iz)=dx[0];
+ mDyCorr(ir,iz)=dx[1];
+ mDzCorr(ir,iz)=dx[2];
+
+ }
+ }
+ }
+
+ // create correction lookup table
+}
+
+//_________________________________________________________________________________________
+void AliTPCCorrectionLookupTable::InitTables()
+{
+ //
+ //
+ //
+ fLookUpDxCorr = new TMatrixF*[fNPhi];
+ fLookUpDyCorr = new TMatrixF*[fNPhi];
+ fLookUpDzCorr = new TMatrixF*[fNPhi];
+
+ fLookUpDxDist = new TMatrixF*[fNPhi];
+ fLookUpDyDist = new TMatrixF*[fNPhi];
+ fLookUpDzDist = new TMatrixF*[fNPhi];
+
+ for (Int_t iPhi=0; iPhi<fNPhi; ++iPhi){
+ fLookUpDxCorr[iPhi] = new TMatrixF(fNR,fNZ);
+ fLookUpDyCorr[iPhi] = new TMatrixF(fNR,fNZ);
+ fLookUpDzCorr[iPhi] = new TMatrixF(fNR,fNZ);
+
+ fLookUpDxDist[iPhi] = new TMatrixF(fNR,fNZ);
+ fLookUpDyDist[iPhi] = new TMatrixF(fNR,fNZ);
+ fLookUpDzDist[iPhi] = new TMatrixF(fNR,fNZ);
+ }
+
+ SetupDefaultLimits();
+}
+
+//_________________________________________________________________________________________
+void AliTPCCorrectionLookupTable::ResetTables()
+{
+ //
+ // Reset the lookup tables
+ //
+
+ if (!fLookUpDxCorr) return;
+
+ for (Int_t iPhi=0; iPhi<fNPhi; ++iPhi){
+ delete fLookUpDxCorr[iPhi];
+ delete fLookUpDyCorr[iPhi];
+ delete fLookUpDzCorr[iPhi];
+
+ delete fLookUpDxDist[iPhi];
+ delete fLookUpDyDist[iPhi];
+ delete fLookUpDzDist[iPhi];
+ }
+
+ delete [] fLookUpDxCorr;
+ delete [] fLookUpDyCorr;
+ delete [] fLookUpDzCorr;
+
+ delete [] fLookUpDxDist;
+ delete [] fLookUpDyDist;
+ delete [] fLookUpDzDist;
+
+ fLookUpDxCorr = 0x0;
+ fLookUpDyCorr = 0x0;
+ fLookUpDzCorr = 0x0;
+
+ fLookUpDxDist = 0x0;
+ fLookUpDyDist = 0x0;
+ fLookUpDzDist = 0x0;
+
+ fLimitsRows.ResizeTo(1);
+ fLimitsPhiSlices.ResizeTo(1);
+ fLimitsColumns.ResizeTo(1);
+}
+
+//_________________________________________________________________________________________
+void AliTPCCorrectionLookupTable::SetupDefaultLimits()
+{
+ //
+ // Set default limits for tables
+ //
+
+ fLimitsRows.ResizeTo(fNR);
+ fLimitsPhiSlices.ResizeTo(fNPhi);
+ fLimitsColumns.ResizeTo(fNZ);
+
+ Double_t *limRList = fLimitsRows.GetMatrixArray();
+ Double_t *limPhiList = fLimitsPhiSlices.GetMatrixArray();
+ Double_t *limZList = fLimitsColumns.GetMatrixArray();
+
+ AliTPCROC * roc = AliTPCROC::Instance();
+ const Double_t rLow = TMath::Floor(roc->GetPadRowRadii(0,0))-1; // first padRow plus some margin
+
+ // fulcrums in R
+ limRList[0] = rLow;
+ for (Int_t i = 1; i<fNR; i++) {
+ limRList[i] = limRList[i-1] + 3.5; // 3.5 cm spacing
+ if (limRList[i]<90 ||limRList[i]>245){
+ limRList[i] = limRList[i-1] + 0.5; // 0.5 cm spacing
+ } else if (limRList[i]<100 || limRList[i]>235){
+ limRList[i] = limRList[i-1] + 1.5; // 1.5 cm spacing
+ } else if (limRList[i]<120 || limRList[i]>225){
+ limRList[i] = limRList[i-1] + 2.5; // 2.5 cm spacing
+ }
+ }
+
+ // fulcrums in Z
+ limZList[0] = -249.5;
+ limZList[fNZ-1] = 249.5;
+ for (Int_t j = 1; j<fNZ/2; j++) {
+ limZList[j] = limZList[j-1];
+ if (TMath::Abs(limZList[j])< 0.15){
+ limZList[j] = limZList[j-1] + 0.09; // 0.09 cm spacing
+ } else if(TMath::Abs(limZList[j])< 0.6){
+ limZList[j] = limZList[j-1] + 0.4; // 0.4 cm spacing
+ } else if (TMath::Abs(limZList[j])< 2.5 || TMath::Abs(limZList[j])>248){
+ limZList[j] = limZList[j-1] + 0.5; // 0.5 cm spacing
+ } else if (TMath::Abs(limZList[j])<10 || TMath::Abs(limZList[j])>235){
+ limZList[j] = limZList[j-1] + 1.5; // 1.5 cm spacing
+ } else if (TMath::Abs(limZList[j])<25 || TMath::Abs(limZList[j])>225){
+ limZList[j] = limZList[j-1] + 2.5; // 2.5 cm spacing
+ } else{
+ limZList[j] = limZList[j-1] + 4; // 4 cm spacing
+ }
+
+ limZList[fNZ-j-1] = -limZList[j];
+ }
+
+ // fulcrums in phi
+ for (Int_t k = 0; k<fNPhi; k++)
+ limPhiList[k] = TMath::TwoPi()*k/(fNPhi-1);
+
+}
--- /dev/null
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+////////////////////////////////////////////////////////////////////////////
+// AliTPCCorrectionLookupTable class //
+// Authors: Jens Wiechula //
+////////////////////////////////////////////////////////////////////////////
+
+#include "AliTPCCorrection.h"
+#include <TVectorD.h>
+#include <TMatrixFfwd.h>
+
+class AliTPCCorrectionLookupTable : public AliTPCCorrection {
+
+public:
+ AliTPCCorrectionLookupTable();
+ virtual ~AliTPCCorrectionLookupTable();
+
+
+ virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
+ virtual void GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]);
+
+ void CreateLookupTable(AliTPCCorrection &tpcCorr, Int_t rows=90, Int_t phiSlices=144, Int_t columns=130 );
+
+
+// private:
+
+ // sizes of lookup tables
+ Int_t fNR; // number of rows (r) used for lookup table
+ Int_t fNPhi; // number of phi slices used for lookup table
+ Int_t fNZ; // number of columns (z) used for lookup table
+ //
+ TVectorD fLimitsRows; // bin limits in row direction
+ TVectorD fLimitsPhiSlices; // bin limits in phi direction
+ TVectorD fLimitsColumns; // bin limits in z direction
+ // for distortion
+ TMatrixF **fLookUpDxDist; //[fNPhi] Array to store electric field integral (int Er/Ez)
+ TMatrixF **fLookUpDyDist; //[fNPhi] Array to store electric field integral (int Er/Ez)
+ TMatrixF **fLookUpDzDist; //[fNPhi] Array to store electric field integral (int Er/Ez)
+
+ // for correction
+ TMatrixF **fLookUpDxCorr; //[fNPhi] Array to store electric field integral (int Er/Ez)
+ TMatrixF **fLookUpDyCorr; //[fNPhi] Array to store electric field integral (int Er/Ez)
+ TMatrixF **fLookUpDzCorr; //[fNPhi] Array to store electric field integral (int Er/Ez)
+
+ void InitTables();
+ void ResetTables();
+ void SetupDefaultLimits();
+
+ void GetInterpolation(const Float_t x[],const Short_t roc,Float_t dx[],
+ TMatrixF **mR, TMatrixF **mPhi, TMatrixF **mZ,
+ Int_t type);
+
+ AliTPCCorrectionLookupTable(const AliTPCCorrectionLookupTable &corr);
+ AliTPCCorrectionLookupTable& operator= (const AliTPCCorrectionLookupTable &corr);
+ ClassDef(AliTPCCorrectionLookupTable,1); // TPC corrections dumped into a lookup table
+};
+
+
Base/AliTPCROCVoltError3D.cxx
Base/AliTPCSpaceCharge.cxx
Base/AliTPCSpaceCharge3D.cxx
+ Base/AliTPCCorrectionLookupTable.cxx
Base/AliXRDPROOFtoolkit.cxx
Base/AliTPCExBEffective.cxx
Base/AliTPCExBEffectiveSector.cxx
return point;
}
+
+void AliTPCclusterMI::MakePoint( AliTrackPoint &point ) {
+ //
+ // make AliTrackPoint out of AliTPCclusterMI
+ //
+
+ Float_t xyz[3]={0.};
+ Float_t cov[6]={0.};
+ GetGlobalXYZ(xyz);
+ GetGlobalCov(cov);
+ // voluem ID to add later ....
+ point.SetXYZ(xyz);
+ point.SetCov(cov);
+}
#include "AliCluster.h"
#include "TMath.h"
#include "AliTPCclusterInfo.h"
-
-class AliTrackPoint;
+#include <AliTrackPointArray.h>
//_____________________________________________________________________________
class AliTPCclusterMI : public AliCluster {
//
AliTPCclusterMI* MakeCluster(AliTrackPoint* point);
AliTrackPoint* MakePoint();
+ void MakePoint(AliTrackPoint &point);
private:
AliTPCclusterInfo * fInfo; // pointer to the cluster debug info
// + OROC qudarant (OROC has 4 separate pad planes) alignment
#pragma link C++ class AliTPCSpaceCharge+; // Distortions due to space charge in the TPC - rotational symetric
#pragma link C++ class AliTPCSpaceCharge3D+; // Distortions due to space charge in the TPC - 3D calculation
-
+#pragma link C++ class AliTPCCorrectionLookupTable+; // Lookup table created from distortions
#pragma link C++ class AliTPCExBEffective+; // Cover ExB effect of non-explained physical model - not used
// --- still used in CalibMacros --- move to attic if removed there
#pragma link C++ class AliTPCExBEffectiveSector+; // sectorwise above
track.GetXYZ(xyz);
//!!! Why is this smeared
- xyz[0]+=gRandom->Gaus(0,0.000005);
- xyz[1]+=gRandom->Gaus(0,0.000005);
- xyz[2]+=gRandom->Gaus(0,0.000005);
+// xyz[0]+=gRandom->Gaus(0,0.000005);
+// xyz[1]+=gRandom->Gaus(0,0.000005);
+// xyz[2]+=gRandom->Gaus(0,0.000005);
xyzf[0]=Float_t(xyz[0]);
xyzf[1]=Float_t(xyz[1]);
grXZ=(TGraph*)arrGraphsXZ.At(sec);
if (!grXY) continue;
- if(grXY->GetN()>1 && grXZ->GetN()>1) { //causes segmentation violation if N==1
- splXY=new TSpline3("splXY",grXY);
- splXZ=new TSpline3("splXZ",grXZ);
- }
- else {
+// if(grXY->GetN()>1 && grXZ->GetN()>1) { //causes segmentation violation if N==1
+// splXY=new TSpline3("splXY",grXY);
+// splXZ=new TSpline3("splXZ",grXZ);
+// }
+// else {
//TODO: make a cluster also in the sector w only one space point?
- continue;
+// continue;
// Double_t tempX=0., tempY = 0., tempZ = 0.;
// grXY->GetPoint(0,tempX,localY);
// grXZ->GetPoint(0,tempX,localZ);
- }
+// }
}
secOld=sec;
// check we are in an active area
- if (splXY->FindX(localX)<1 || splXZ->FindX(localX)<1) continue;
+// if (splXY->FindX(localX)<1 || splXZ->FindX(localX)<1) continue;
+ if ( localX<grXY->GetX()[0] || localX>grXY->GetX()[grXY->GetN()-1] || localX<grXZ->GetX()[0] || localX>grXZ->GetX()[grXZ->GetN()-1]) continue;
//get interpolated value at the center for the pad row
// using splines
- const Double_t localY=splXY->Eval(localX/*,0x0,"S"*/);
- const Double_t localZ=splXZ->Eval(localX/*,0x0,"S"*/);
+// const Double_t localY=splXY->Eval(localX/*,0x0,"S"*/);
+// const Double_t localZ=splXZ->Eval(localX/*,0x0,"S"*/);
+ const Double_t localY=grXY->Eval(localX/*,0x0,"S"*/);
+ const Double_t localZ=grXZ->Eval(localX/*,0x0,"S"*/);
Float_t xyz[3]={localX,localY,localZ};
if (!SetupCluster(tempCl,xyz,sec,t0)) continue;
#include "AliToyMCReconstruction.h"
+/*
+
+
+
+*/
//____________________________________________________________________________________
AliToyMCReconstruction::AliToyMCReconstruction() : TObject()
Float_t zLength=GetZLength(0);
// crate time0 seed, steered by fCreateT0seed
- printf("t0 seed\n");
+// printf("t0 seed\n");
fTime0=-1.;
fCreateT0seed=kTRUE;
dummy = GetSeedFromTrack(tr);
// set fCreateT0seed now to false to get the seed in z coordinates
fTime0 = t0seed.GetZ()-zLength/vdrift;
fCreateT0seed = kFALSE;
- printf("seed (%.2g)\n",fTime0);
+// printf("seed (%.2g)\n",fTime0);
dummy = GetSeedFromTrack(tr);
if (dummy) {
seed = *dummy;
// create fitted track
if (fDoTrackFit){
- printf("track\n");
+// printf("track\n");
dummy = GetFittedTrackFromSeed(tr, &seed);
track = *dummy;
delete dummy;
// propagate seed to 0
const Double_t kMaxSnp = 0.85;
const Double_t kMass = TDatabasePDG::Instance()->GetParticle("pi+")->Mass();
-// AliTrackerBase::PropagateTrackTo(&seed,0,kMass,5,kTRUE,kMaxSnp,0,kFALSE,kFALSE);
+ AliTrackerBase::PropagateTrackTo(&seed,0,kMass,5,kTRUE,kMaxSnp,0,kFALSE,fUseMaterial);
}
}
const Int_t sign=1-2*((sector/18)%2);
if ( (fClusterType == 1) && (fCorrectionType != kNoCorrection) ) {
- printf("correction type: %d\n",(Int_t)fCorrectionType);
+// printf("correction type: %d\n",(Int_t)fCorrectionType);
// the settings below are for the T0 seed
// for known T0 the z position is already calculated in SetTrackPointFromCluster
// if fTime0 < 0 we assume that we create a seed for the T0 estimate
AliTrackerBase::PropagateTrackTo(seed,0,kMass,5,kTRUE,kMaxSnp,0,kFALSE,kFALSE);
if (TMath::Abs(seed->GetX())>3) {
- printf("Could not propagate track to 0, %.2f, %.2f, %.2f\n",seed->GetX(),seed->GetAlpha(),seed->Pt());
+// printf("Could not propagate track to 0, %.2f, %.2f, %.2f\n",seed->GetX(),seed->GetAlpha(),seed->Pt());
}
}
const Int_t sector=cl->GetDetector();
const Int_t sign=1-2*((sector/18)%2);
const Float_t zT0=( GetZLength(sector) - (cl->GetTimeBin()-fTime0)*GetVDrift() )*sign;
- printf(" z: %.2f %.2f\n",xyz[2],zT0);
+// printf(" z: %.2f %.2f\n",xyz[2],zT0);
xyz[2]=zT0;
p.SetXYZ(xyz);
}
if (TMath::Abs(prot.GetX())<kRTPC0) continue;
if (TMath::Abs(prot.GetX())>kRTPC1) continue;
//
- Bool_t res=kTRUE;
- if (fUseMaterial) res=AliTrackerBase::PropagateTrackTo(track,prot.GetX(),kMass,5,kFALSE,kMaxSnp);
- else res=AliTrackerBase::PropagateTrackTo(track,prot.GetX(),kMass,5,kFALSE,kMaxSnp,0,kFALSE,kFALSE);
+ Bool_t res=AliTrackerBase::PropagateTrackTo(track,prot.GetX(),kMass,5,kFALSE,kMaxSnp,0,kFALSE,fUseMaterial);
if (!res) break;
if (!track->Update(pointPos,pointCov)) {printf("no update\n"); break;}
}
- if (fUseMaterial) AliTrackerBase::PropagateTrackTo2(track,refX,kMass,5.,kTRUE,kMaxSnp);
- else AliTrackerBase::PropagateTrackTo2(track,refX,kMass,5.,kTRUE,kMaxSnp,0,kFALSE,kFALSE);
+ AliTrackerBase::PropagateTrackTo2(track,refX,kMass,5.,kTRUE,kMaxSnp,0,kFALSE,fUseMaterial);
// rotate fittet track to the frame of the original track and propagate to same reference
track->Rotate(tr->GetAlpha());
- if (fUseMaterial) AliTrackerBase::PropagateTrackTo2(track,refX,kMass,1.,kFALSE,kMaxSnp);
- else AliTrackerBase::PropagateTrackTo2(track,refX,kMass,1.,kFALSE,kMaxSnp,0,kFALSE,kFALSE);
+ AliTrackerBase::PropagateTrackTo2(track,refX,kMass,1.,kFALSE,kMaxSnp,0,kFALSE,fUseMaterial);
return track;
}
TPRegexp reg(".*([0-9]_[0-9]_[0-9]_[0-9]{3}_[0-9]{2}).debug.root");
TObjArray *arrMatch=0x0;
arrMatch=reg.MatchS(name);
+ TString matchName;
+ if (arrMatch && arrMatch->At(1)) matchName=arrMatch->At(1)->GetName();
+ else matchName=Form("%02d",ifile);
+ delete arrMatch;
if (!tFirst) {
TFile *f=TFile::Open(name.Data());
continue;
}
- t->SetName(arrMatch->At(1)->GetName());
+ t->SetName(matchName.Data());
tFirst=t;
} else {
- tFirst->AddFriend(Form("t%s=Tracks",arrMatch->At(1)->GetName()), name.Data());
+ tFirst->AddFriend(Form("t%s=Tracks",matchName.Data()), name.Data());
// tFirst->AddFriend(Form("t%d=Tracks",ifile), name.Data());
}
}
void RunRecoAllClustersStandardTracking(const char* file, Int_t nmaxEv=-1);
// reconstruction settings
- void SetRecoSettings(Int_t clusterType, Int_t seedingRow, Int_t seedingDist, ECorrType correctionType)
- { fClusterType=clusterType; fSeedingRow=seedingRow, fSeedingDist=seedingDist, fCorrectionType=correctionType; }
+ void SetRecoSettings(Bool_t idealTracking, Int_t clusterType, ECorrType correctionType, Int_t seedingRow=140, Int_t seedingDist=10)
+ { fIdealTracking=idealTracking; fClusterType=clusterType; fSeedingRow=seedingRow, fSeedingDist=seedingDist, fCorrectionType=correctionType; }
void SetClusterType(Int_t type) { fClusterType = type; }
Int_t GetClusterType() const { return fClusterType; }
}
//____________________________________________________________________________
-void ConnectTrees (const char* files, TObjArray &arr) {
+void ConnectTrees (const char* files, TObjArray &arrTrees) {
TString s=gSystem->GetFromPipe(Form("ls %s",files));
-
+ TObjArray *arrFiles=s.Tokenize("\n");
+ for (Int_t ifile=0; ifile<arrFiles->GetEntriesFast(); ++ifile){
+ TFile f(arrFiles->At(ifile)->GetName());
+ if (!f.IsOpen() || f.IsZombie()) continue;
+ TTree *t=f.Get("Tracks");
+ if (!t) continue;
+ arrTrees.Add
+ }
}