#include <TFile.h>
#include <TObjArray.h>
#include <TTree.h>
+#include <TGraphErrors.h>
#include "AliLog.h"
#include "AliComplexCluster.h"
#include "AliESDEvent.h"
#include "AliTrackPointArray.h"
#include "TRandom.h"
#include "AliTPCcalibDB.h"
+#include "AliTPCcalibDButil.h"
#include "AliTPCTransform.h"
#include "AliTPCClusterParam.h"
// dummy copy constructor
//------------------------------------------------------------------
fOutput=t.fOutput;
+ for (Int_t irow=0; irow<200; irow++){
+ fXRow[irow]=0;
+ fYMax[irow]=0;
+ fPadLength[irow]=0;
+ }
+
}
AliTPCtrackerMI & AliTPCtrackerMI::operator=(const AliTPCtrackerMI& /*r*/)
{
//
//
//
- AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
+ AliTPCcalibDB * calibDB = AliTPCcalibDB::Instance();
+ AliTPCTransform *transform = calibDB->GetTransform() ;
if (!transform) {
AliFatal("Tranformations not in calibDB");
return;
cluster->SetY(x[1]);
cluster->SetZ(x[2]);
// The old stuff:
-
//
//
//
//if (!fkParam->IsGeoRead()) fkParam->ReadGeoMatrices();
- TGeoHMatrix *mat = fkParam->GetClusterMatrix(cluster->GetDetector());
- //TGeoHMatrix mat;
- Double_t pos[3]= {cluster->GetX(),cluster->GetY(),cluster->GetZ()};
- Double_t posC[3]={cluster->GetX(),cluster->GetY(),cluster->GetZ()};
- if (mat) mat->LocalToMaster(pos,posC);
- else{
- // chack Loading of Geo matrices from GeoManager - TEMPORARY FIX
- }
- cluster->SetX(posC[0]);
- cluster->SetY(posC[1]);
- cluster->SetZ(posC[2]);
+ if (AliTPCReconstructor::GetRecoParam()->GetUseSectorAlignment() && (!calibDB->HasAlignmentOCDB())){
+ TGeoHMatrix *mat = fkParam->GetClusterMatrix(cluster->GetDetector());
+ //TGeoHMatrix mat;
+ Double_t pos[3]= {cluster->GetX(),cluster->GetY(),cluster->GetZ()};
+ Double_t posC[3]={cluster->GetX(),cluster->GetY(),cluster->GetZ()};
+ if (mat) mat->LocalToMaster(pos,posC);
+ else{
+ // chack Loading of Geo matrices from GeoManager - TEMPORARY FIX
+ }
+ cluster->SetX(posC[0]);
+ cluster->SetY(posC[1]);
+ cluster->SetZ(posC[2]);
+ }
}
//_____________________________________________________________________________
if (!event) return 0;
const Int_t kMaxFriendTracks=2000;
fEvent = event;
+ // extract correction object for multiplicity dependence of dEdx
+ TObjArray * gainCalibArray = AliTPCcalibDB::Instance()->GetTimeGainSplinesRun(event->GetRunNumber());
+
+ AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
+ if (!transform) {
+ AliFatal("Tranformations not in RefitInward");
+ return 0;
+ }
+ transform->SetCurrentRecoParam((AliTPCRecoParam*)AliTPCReconstructor::GetRecoParam());
+ const AliTPCRecoParam * recoParam = AliTPCcalibDB::Instance()->GetTransform()->GetCurrentRecoParam();
+ Int_t nContribut = event->GetNumberOfTracks();
+ TGraphErrors * graphMultDependenceDeDx = 0x0;
+ if (recoParam && recoParam->GetUseMultiplicityCorrectionDedx() && gainCalibArray) {
+ if (recoParam->GetUseTotCharge()) {
+ graphMultDependenceDeDx = (TGraphErrors *) gainCalibArray->FindObject("TGRAPHERRORS_MEANQTOT_MULTIPLICITYDEPENDENCE_BEAM_ALL");
+ } else {
+ graphMultDependenceDeDx = (TGraphErrors *) gainCalibArray->FindObject("TGRAPHERRORS_MEANQMAX_MULTIPLICITYDEPENDENCE_BEAM_ALL");
+ }
+ }
+ //
ReadSeeds(event,2);
fIteration=2;
//PrepareForProlongation(fSeeds,1);
Int_t ndedx = seed->GetNCDEDX(0);
Float_t sdedx = seed->GetSDEDX(0);
Float_t dedx = seed->GetdEdx();
+ // apply mutliplicity dependent dEdx correction if available
+ if (graphMultDependenceDeDx) {
+ Double_t corrGain = AliTPCcalibDButil::EvalGraphConst(graphMultDependenceDeDx, nContribut);
+ dedx += (1 - corrGain)*50.; // MIP is normalized to 50
+ }
esd->SetTPCsignal(dedx, sdedx, ndedx);
//
// add seed to the esd track in Calib level
Int_t AliTPCtrackerMI::Clusters2Tracks (AliESDEvent *const esd)
{
//
+
if (fSeeds) DeleteSeeds();
fEvent = esd;
Clusters2Tracks();
Float_t angle2 = pt->GetAlpha();
if (TMath::Abs(angle1-angle2)>0.001){
- pt->Rotate(angle1-angle2);
+ if (!pt->Rotate(angle1-angle2)) return;
//angle2 = pt->GetAlpha();
//pt->fRelativeSector = pt->GetAlpha()/fInnerSec->GetAlpha();
//if (pt->GetAlpha()<0)
}
}
noc = current;
- if (noc<5) return -1;
+ //if (noc<5) return -1;
Int_t lab=123456789;
for (i=0; i<noc; i++) {
AliTPCclusterMI *c=clusters[i];