Skip to content

Commit

Permalink
Option to compactify TPC.Recpoints.root avoiding Transform in clusterer
Browse files Browse the repository at this point in the history
The Transform will be avoided in clusterization if static AliTPCReconstructor::SetCompactClusters(kTRUE) is called from rec.C
  • Loading branch information
shahor02 committed Nov 16, 2015
1 parent 0685274 commit 7066ff9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions TPC/TPCrec/AliTPCReconstructor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ TVectorD * AliTPCReconstructor::fgExtendedRoads=0;
TVectorD * AliTPCReconstructor::fgPrimaryDCACut=0;
Double_t AliTPCReconstructor::fgPrimaryZ2XCut = 0;
Double_t AliTPCReconstructor::fgZOutSectorCut = 0;
Bool_t AliTPCReconstructor::fgCompactClusters = kFALSE;

AliTPCReconstructor::AliTPCReconstructor():
AliReconstructor(),
Expand Down
3 changes: 3 additions & 0 deletions TPC/TPCrec/AliTPCReconstructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ class AliTPCReconstructor: public AliReconstructor {
static const Double_t * GetPrimaryDCACut() { return (fgPrimaryDCACut)? fgPrimaryDCACut->GetMatrixArray():0; }
static Double_t GetPrimaryZ2XCut() { return fgPrimaryZ2XCut; }
static Double_t GetZOutSectorCut() { return fgZOutSectorCut; }
static Bool_t GetCompactClusters() { return fgCompactClusters;}

static void SetSystematicError( TVectorD *vec) { fSystematicErrors=vec;}
static void SetSystematicErrorCluster( TVectorD *vec ) { fSystematicErrorClusters=vec;}
static void SetExtendedRoads( TVectorD *extendedRoads ) { fgExtendedRoads=extendedRoads;}
static void SetPrimaryDCACut( TVectorD *dcacut ) { fgPrimaryDCACut=dcacut;}
static void SetPrimaryZ2XCut( double v ) { fgPrimaryZ2XCut=v; }
static void SetZOutSectorCut( double v ) { fgZOutSectorCut=v; }
static void SetCompactClusters(Bool_t v) { fgCompactClusters=v;}

private:
AliTPCReconstructor(const AliTPCReconstructor&); //Not implemented
Expand All @@ -80,6 +82,7 @@ class AliTPCReconstructor: public AliReconstructor {
static TVectorD * fgPrimaryDCACut; // only primaries passing DCAYZ cut are reconstructed
static Double_t fgPrimaryZ2XCut; // cut on Z2X for fast primaries reco
static Double_t fgZOutSectorCut; // cut on Z going on other side of CE
static Bool_t fgCompactClusters; // if true, cluster coordinates will be set to 0 in clusterizer
TObjArray *fArrSplines; // array of pid splines

void SetSplinesFromOADB(const char* tmplt, AliESDpid *esdPID);
Expand Down
26 changes: 13 additions & 13 deletions TPC/TPCrec/AliTPCclusterer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -611,20 +611,20 @@ void AliTPCclusterer::AddCluster(AliTPCclusterMI &c, bool addtoarray, Float_t *
//
//
//

AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
if (!transform) {
AliFatal("Tranformations not in calibDB");
return;
if ( !AliTPCReconstructor::GetCompactClusters() ) {
AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
if (!transform) {
AliFatal("Tranformations not in calibDB");
return;
}
transform->SetCurrentRecoParam((AliTPCRecoParam*)fRecoParam);
Double_t x[3]={static_cast<Double_t>(c.GetRow()),static_cast<Double_t>(c.GetPad()),static_cast<Double_t>(c.GetTimeBin())};
Int_t i[1]={fSector};
transform->Transform(x,i,0,1);
c.SetX(x[0]);
c.SetY(x[1]);
c.SetZ(x[2]);
}
transform->SetCurrentRecoParam((AliTPCRecoParam*)fRecoParam);
Double_t x[3]={static_cast<Double_t>(c.GetRow()),static_cast<Double_t>(c.GetPad()),static_cast<Double_t>(c.GetTimeBin())};
Int_t i[1]={fSector};
transform->Transform(x,i,0,1);
c.SetX(x[0]);
c.SetY(x[1]);
c.SetZ(x[2]);
//
//
if (ki<=1 || ki>=fMaxPad-1 || kj==1 || kj==fMaxTime-2) {
c.SetType(-(c.GetType()+3)); //edge clusters
Expand Down

0 comments on commit 7066ff9

Please sign in to comment.