fDeconvTime = kTRUE;
}
-AliL3ClustFinderNew::AliL3ClustFinderNew(AliL3Transform *transform)
-{
- fTransform = transform;
- fMatch = 4;
- fThreshold =10;
- fDeconvTime = kTRUE;
- fDeconvPad = kTRUE;
-}
-
AliL3ClustFinderNew::~AliL3ClustFinderNew()
{
while(1) //Loop over current sequence
{
- if(data[bin].fTime >= fTransform->GetNTimeBins())
+ if(data[bin].fTime >= AliL3Transform::GetNTimeBins())
{
LOG(AliL3Log::kFatal,"AliL3ClustFinderNew::ProcessRow","Digits")
<<"Timebin out of range "<<(Int_t)data[bin].fTime<<ENDLOG;
Float_t fpad=(Float_t)list[j].fPad/(Float_t)list[j].fTotalCharge;
Float_t ftime=(Float_t)list[j].fTime/(Float_t)list[j].fTotalCharge;
//printf("padrow %d number of pads %d totalcharge %d\n",fCurrentRow,list[j].fFlags,list[j].fTotalCharge);
- fTransform->Slice2Sector(fCurrentSlice,fCurrentRow,thissector,thisrow);
- fTransform->Raw2Local(xyz,thissector,thisrow,fpad,ftime);
+ AliL3Transform::Slice2Sector(fCurrentSlice,fCurrentRow,thissector,thisrow);
+ AliL3Transform::Raw2Local(xyz,thissector,thisrow,fpad,ftime);
if(xyz[0]==0) LOG(AliL3Log::kError,"AliL3ClustFinder","Cluster Finder")
<<AliL3Log::kDec<<"Zero cluster"<<ENDLOG;
if(fNClusters >= fMaxNClusters)
typedef struct ClusterData ClusterData;
class AliL3DigitRowData;
-class AliL3Transform;
class AliL3SpacePointData;
class AliL3ClustFinderNew {
private:
AliL3DigitRowData *fDigitRowData; //!
- AliL3Transform *fTransform; //!
AliL3SpacePointData *fSpacePointData; //!
Bool_t fDeconvTime;
Bool_t fDeconvPad;
public:
AliL3ClustFinderNew();
- AliL3ClustFinderNew(AliL3Transform *transform);
virtual ~AliL3ClustFinderNew();
void Read(UInt_t ndigits,AliL3DigitRowData *ptr);
void SetXYError(Float_t f) {fXYErr = f;}
void SetZError(Float_t f) {fZErr = f;}
- void SetTransformer(AliL3Transform *transform) {fTransform = transform;}
void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
Int_t GetNumberOfClusters() {return fNClusters;}
#include "AliL3Defs.h"
#include "AliL3Logging.h"
-#include "AliL3Transform.h"
#include "AliL3Vertex.h"
#include "AliL3ConfMapTrack.h"
#include "AliL3ConfMapPoint.h"
memset(fVolume,0,fBounds*sizeof(AliL3ConfMapContainer));
memset(fRow,0,fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer));
- Int_t max_num_of_tracks = 150;
- Int_t max_num_of_hits = 3000;
+ Int_t max_num_of_tracks = 1000;
+ Int_t max_num_of_hits = 50000;
if(fHit)
delete [] fHit;
else
{
fEtaMin = 0;
- fEtaMax = sector < 18 ? 1 : -1;
- //fEtaMax = sector < 18 ? 0.9 : -0.9;
+ //fEtaMax = sector < 18 ? 1 : -1;
+ fEtaMax = sector < 18 ? 0.9 : -0.9;
}
//Set the angles to sector 2:
{
//Ctor. Specify which slices you want to look at.
- TFile *file = new TFile("/prog/alice/data/GEO/alice.geom");
+ TFile *file = new TFile("$(LEVEL3)/GEO/alice.geom");
if(!file) printf("NO FILE\n");
if(!file->IsOpen())
LOG(AliL3Log::kError,"AliL3Display::AliL3Display","File Open")
fMinSlice = slice[0];
fMaxSlice = slice[1];
- fTransform = new AliL3Transform();
file->Close();
delete file;
}
if(fTracks)
delete fTracks;
- if(fTransform)
- delete fTransform;
}
void AliL3Display::Setup(Char_t *trackfile,Char_t *path)
v->SetRange(-430,-560,-430,430,560,1710);
c1->Clear();
c1->SetFillColor(1);
- c1->SetTheta(180.);
+ c1->SetTheta(90.);
c1->SetPhi(0.);
for(Int_t s=fMinSlice; s<=fMaxSlice; s++)
TTree *TD=(TTree*)file->Get("TreeD_75x40_100x60_0");
AliSimDigits da, *digits=&da;
TD->GetBranch("Segment")->SetAddress(&digits); //Return pointer to branch segment.
- AliL3Transform *transform = new AliL3Transform();
Int_t sector,row;
- transform->Slice2Sector(slice,padrow,sector,row);
+ AliL3Transform::Slice2Sector(slice,padrow,sector,row);
Int_t npads = param->GetNPads(sector,row);
Int_t ntimes = param->GetMaxTBin();
TH2F *histdig = new TH2F("histdig","",npads,0,npads-1,ntimes,0,ntimes-1);
xyz[0] = points[i].fX;
xyz[1] = points[i].fY;
xyz[2] = points[i].fZ;
- transform->Global2Raw(xyz,sector,row);
+ AliL3Transform::Global2Raw(xyz,sector,row);
histfast->Fill(xyz[1],xyz[2],1);
class AliL3SpacePointData;
class AliL3TrackArray;
-class AliL3Transform;
class AliL3Display : public TObject {
AliL3SpacePointData *fClusters[36][6]; //!
AliL3TrackArray *fTracks; //!
UInt_t fNcl[36][6];
- AliL3Transform *fTransform; //!
Int_t fMinSlice;
Int_t fMaxSlice;
fMcId = 0;
fMinSlice=0;
fMaxSlice=0;
- fTransform = new AliL3Transform();
}
AliL3Evaluate::AliL3Evaluate(Char_t *mcfile,Int_t *slice)
fEventFile = new TFile(mcfile,"READ");
fParam = (AliTPCParam*)fEventFile->Get("75x40_100x60");
- fTransform = new AliL3Transform();
fMinSlice = slice[0];
fMaxSlice = slice[1];
fMinSlice = slice[0];
fMaxSlice = slice[1];
- fTransform = new AliL3Transform();
}
fDigitsFile->Close();
delete fDigitsFile;
}
- if(fTransform) delete fTransform;
if(fTracks) delete fTracks;
if(fPtRes) delete fPtRes;
if(fNGoodTracksPt) delete fNGoodTracksPt;
if(!fDigitsTree->GetEvent(i)) continue;
Int_t se,ro,slice,slicerow;
fParam->AdjustSectorRow(fDigits->GetID(),se,ro);
- fTransform->Sector2Slice(slice,slicerow,se,ro);
+ AliL3Transform::Sector2Slice(slice,slicerow,se,ro);
fRowid[slice][slicerow] = i;
}
}
Int_t sec,row,sl,lr;
AliSegmentID *s = carray.LoadEntry(i);
fParam->AdjustSectorRow(s->GetID(),sec,row);
- fTransform->Sector2Slice(sl,lr,sec,row);
+ AliL3Transform::Sector2Slice(sl,lr,sec,row);
if(sl != slice[0]) {carray.ClearRow(sec,row); continue;}
if(lr < padrow[0]) {carray.ClearRow(sec,row); continue;}
&& fDigits->GetDigit(it-1,ip) <= fParam->GetZeroSup())
continue;
- fTransform->Raw2Local(xyz,sec,row,ip,it);
+ AliL3Transform::Raw2Local(xyz,sec,row,ip,it);
if(fParam->GetPadRowRadii(sec,row)<230./250.*fabs(xyz[2]))
continue;
//Returns the MCtrackID of the belonging clusters.
//If MCLabel < 0, means that track is fake.
//Fake track means that more than 10 percent of clusters are assigned incorrectly.
-
+
+#ifdef do_mc
Int_t num_of_clusters = track->GetNumberOfPoints();
S *s=new S[num_of_clusters];
Int_t i;
}
return lab;
+#else //If we are running with mc_ids or not
+ return 0;
+#endif
+
}
//sector = points[pos].fSector;
padrow = points[pos].fPadRow;
Int_t se,ro;
- fTransform->Slice2Sector(slice,padrow,se,ro);
- fTransform->Global2Raw(xyz,se,ro);
+ AliL3Transform::Slice2Sector(slice,padrow,se,ro);
+ AliL3Transform::Global2Raw(xyz,se,ro);
if(fIsSlow)
{
xyz[1] = points[pos].fY;
xyz[2] = points[pos].fZ;
padrow = points[pos].fPadRow;
- //fTransform->Global2Local(xyz,slice);
+ //AliL3Transform::Global2Local(xyz,slice);
Float_t xyz_cross[3];
track->GetCrossingPoint(padrow,xyz_cross);
//Get the found clusters:
Int_t slice,padrow;
- fTransform->Sector2Slice(slice,padrow,cursec,currow);
+ AliL3Transform::Sector2Slice(slice,padrow,cursec,currow);
if(slice<fMinSlice || slice>fMaxSlice) continue;
AliL3SpacePointData *points = fClusters[slice][0];
Float_t xyz_cl[3] = {points[c].fX,points[c].fY,points[c].fZ};
Float_t xyz_ex[3];
- fTransform->Global2Raw(xyz_cl,cursec,currow);
+ AliL3Transform::Global2Raw(xyz_cl,cursec,currow);
if(fDigits->GetTrackID((Int_t)rint(xyz_cl[2]),(Int_t)rint(xyz_cl[1]),0)!=mcId &&
fDigits->GetTrackID((Int_t)rint(xyz_cl[2]),(Int_t)rint(xyz_cl[1]),1)!=mcId &&
fDigits->GetTrackID((Int_t)rint(xyz_cl[2]),(Int_t)rint(xyz_cl[1]),2)!=mcId)
continue;
- fTransform->Raw2Local(xyz_ex,cursec,currow,cluster->fY,cluster->fX);
- fTransform->Raw2Local(xyz_cl,cursec,currow,xyz_cl[1],xyz_cl[2]);
+ AliL3Transform::Raw2Local(xyz_ex,cursec,currow,cluster->fY,cluster->fX);
+ AliL3Transform::Raw2Local(xyz_cl,cursec,currow,xyz_cl[1],xyz_cl[2]);
Float_t resy = xyz_cl[1] - xyz_ex[1];//cluster->GetY()
Float_t resz = xyz_cl[2] - xyz_ex[2];//cluster->GetZ()
TPC->SetParam(fParam);
Int_t ver = TPC->IsVersion();
- LOG(AliL3Log::kInformational,"AliL3Evaluate::DefineGoodTracks","TPC version")
+ LOG(AliL3Log::kInformational,"AliL3Evaluate::GetCFeff","TPC version")
<<"TPC version "<<ver<<" found on file"<<ENDLOG;
Int_t zero=TPC->GetParam()->GetZeroSup();
&& fDigits->GetDigit(it-1,ip) <= fParam->GetZeroSup())
continue;
- fTransform->Raw2Local(xyz,sec,row,ip,it);
+ AliL3Transform::Raw2Local(xyz,sec,row,ip,it);
if(fParam->GetPadRowRadii(sec,row)<230./250.*fabs(xyz[2]))
continue;
for (Int_t j=0; j<np; j++)
{
if (count[j]>1) //at least two digits at this padrow
- crossed++;
- count[j]=0;
+ {
+ crossed++;
+ count[j]=0;
+ }
}
AliL3SpacePointData *points = fClusters[sl][0];
- for(Int_t l=0; l<fNcl[sl][0]; l++)
+ for(UInt_t k=0; k<fNcl[sl][0]; k++)
{
- if(points[l].fPadRow != i) continue;
+ if(points[k].fPadRow!=i) continue;
recs++;
}
ntuppel->Fill(i,crossed,recs);
}
+
}
delete[] count;
Float_t angl[1] = {part->Phi()};
- fTransform->Global2LocalAngle(angl,slice);
+ AliL3Transform::Global2LocalAngle(angl,slice);
Double_t charge = -1.*kappa;
Double_t trackPhi0 = angl[0] + charge*0.5*Pi/fabs(charge);
//printf("radius %f xc %f yc %f\n",radius,xc,yc);
- Double_t xHit = fTransform->Row2X(padrow);
+ Double_t xHit = AliL3Transform::Row2X(padrow);
xyz[0] = xHit;
Double_t aa = (xHit - xc)*(xHit - xc);
Double_t r2 = radius*radius;
class AliL3TrackArray;
class AliL3SpacePointData;
class TH1F;
-class AliL3Transform;
class AliTPCParam;
class TTree;
class AliSimDigits;
AliL3TrackArray *fTracks; //!
AliTPCParam *fParam;
AliL3SpacePointData *fClusters[36][6]; //!
- AliL3Transform *fTransform; //!
AliSimDigits *fDigits;
TTree *fDigitsTree;
Int_t fMinSlice;
<<"No Input avalible: TFile not opend"<<ENDLOG;
return 0;
}
- if(!fTransformer)
- {
- LOG(AliL3Log::kWarning,"AliL3FileHandler::AliDigits2Memory","Transformer")
- <<"No transformer object"<<ENDLOG;
- return 0;
- }
if(!fDigitsTree)
GetDigitsTree(event);
{
fDigitsTree->GetEvent(n);
fParam->AdjustSectorRow(fDigits->GetID(),sector,row);
- fTransformer->Sector2Slice(lslice,lrow,sector,row);
+ AliL3Transform::Sector2Slice(lslice,lrow,sector,row);
//if(fSlice != lslice || lrow<fRowMin || lrow>fRowMax) continue;
if(lslice < fSlice) continue;
if(lslice != fSlice) break;
&& fDigits->GetDigit(time-1,pad) <= fParam->GetZeroSup())
continue;
- fTransformer->Raw2Local(xyz,sector,row,pad,time);
+ AliL3Transform::Raw2Local(xyz,sector,row,pad,time);
if(fParam->GetPadRowRadii(sector,row)<230./250.*fabs(xyz[2]))
continue;
fDigitsTree->GetEvent(n);
Float_t xyz[3];
fParam->AdjustSectorRow(fDigits->GetID(),sector,row);
- fTransformer->Sector2Slice(lslice,lrow,sector,row);
+ AliL3Transform::Sector2Slice(lslice,lrow,sector,row);
//if(fSlice != lslice || lrow<fRowMin || lrow>fRowMax) continue;
if(lslice < fSlice) continue;
if(lslice != fSlice) break;
fDigits->GetDigit(time+1,pad) <= fParam->GetZeroSup()) continue;
//Exclude data outside cone:
- fTransformer->Raw2Local(xyz,sector,row,pad,time);
+ AliL3Transform::Raw2Local(xyz,sector,row,pad,time);
if(fParam->GetPadRowRadii(sector,row)<230./250.*fabs(xyz[2]))
continue;
printf("AliL3FileHandler::AliDigits2RootFile : No parameter object. Run on rootfile\n");
return;
}
- if(!fTransformer)
- {
- printf("AliL3FileHandler::AliDigits2RootFile : No transform object\n");
- return;
- }
//Get the original digitstree:
fInAli->cd();
if((Int_t)rowPt->fRow != i) printf("AliL3FileHandler::AliDigits2RootFile : Mismatching row numbering!!!\n");
Int_t sector,row;
- fTransformer->Slice2Sector(fSlice,i,sector,row);
+ AliL3Transform::Slice2Sector(fSlice,i,sector,row);
AliSimDigits * dig = (AliSimDigits*)arr->CreateRow(sector,row);
AliSimDigits *old_dig = (AliSimDigits*)old_array->LoadRow(sector,row);
if(!old_dig)
Int_t s_time = time - 1;
while(trackID[0] < 0)
{
- if(s_time >= 0 && s_time < fTransformer->GetNTimeBins() && s_pad >= 0 && s_pad < fTransformer->GetNPads(i))
+ if(s_time >= 0 && s_time < AliL3Transform::GetNTimeBins() && s_pad >= 0 && s_pad < AliL3Transform::GetNPads(i))
{
if(old_dig->GetTrackID(s_time,s_pad,0) > 0)
{
<<"No Input avalible: TFile not opend"<<ENDLOG;
return 0;
}
- if(!fTransformer)
- {
- LOG(AliL3Log::kWarning,"AliL3FileHandler::AliPoints2Memory","Transformer")
- <<"No transformer object"<<ENDLOG;
- return 0;
- }
+
TDirectory *savedir = gDirectory;
fInAli->cd();
rows[i] = row;
sects[i] = sector;
clusterrow[i] = 0;
- fTransformer->Sector2Slice(lslice,lrow,sector,row);
+ AliL3Transform::Sector2Slice(lslice,lrow,sector,row);
if(fSlice != lslice || lrow<fRowMin || lrow>fRowMax) continue;
clusterrow[i] = carray.GetRow(sector,row);
if(clusterrow[i])
if(!clusterrow[i]) continue;
Int_t row = rows[i];
Int_t sector = sects[i];
- fTransformer->Sector2Slice(lslice,lrow,sector,row);
+ AliL3Transform::Sector2Slice(lslice,lrow,sector,row);
Int_t entries_in_row = clusterrow[i]->GetArray()->GetEntriesFast();
for(Int_t j = 0;j<entries_in_row;j++){
AliTPCcluster *c = (AliTPCcluster*)(*clusterrow[i])[j];
Float_t angle = PI/36;//5 degrees = perpendicular to padrowplane (in local system)
- fTransformer->Local2GlobalAngle(&angle,slice);
+ AliL3Transform::Local2GlobalAngle(&angle,slice);
Double_t dx[2],dy[2],dz[2];
Double_t diff =-1;
AliL3Track *tracks[2];
point[0]=innertrack->GetLastPointX();
point[1]=innertrack->GetLastPointY();
point[2]=innertrack->GetLastPointZ();
- fTransformer->Global2Local(point,slice,kTRUE);
+ AliL3Transform::Global2Local(point,slice,kTRUE);
outertrack->CalculateReferencePoint(angle,point[0]);//local x = global distance to padrowplane
if(!outertrack->IsPoint()) return diff;
point[0]=innertrack->GetFirstPointX();
point[1]=innertrack->GetFirstPointY();
point[2]=innertrack->GetFirstPointZ();
- fTransformer->Global2Local(point,slice,kTRUE);
+ AliL3Transform::Global2Local(point,slice,kTRUE);
outertrack->CalculateReferencePoint(angle,point[0]);//local x = global distance to padrowplane
if(!outertrack->IsPoint()) return diff;
if(slice2==fNSlices) slice2 =0;
AliL3TrackArray *ttt1=GetInTracks(slice2);
Float_t angle = PI/18.; //10 degrees -> the border of the slices
- fTransformer->Local2GlobalAngle(&angle,slice);
+ AliL3Transform::Local2GlobalAngle(&angle,slice);
if(i==0)
ttt0->QSort();
ttt1->QSort();
if(slice2==fNSlices) slice2 =0;
AliL3TrackArray *ttt1=GetInTracks(slice2);
Float_t angle = PI/18.; //10 degrees -> the border of the slices
- fTransformer->Local2GlobalAngle(&angle,slice);
+ AliL3Transform::Local2GlobalAngle(&angle,slice);
if(i==0)
ttt0->QSort();
ttt1->QSort();
Int_t AliL3InterMerger::Merge(){
Int_t nrow= fRowMax-fRowMin+1;
- Double_t xval =fTransformer->Row2X((fRowMax+fRowMin)/2);
+ Double_t xval =AliL3Transform::Row2X((fRowMax+fRowMin)/2);
AliL3TrackArray * tracks = GetInTracks(0);
const Int_t kNIn =tracks->GetNTracks();
AliL3Track *tr[2];
fNGenerate = 0;
fNUsed = 0;
fNDigits = 0;
- fTransformer = 0;
Int_t row[2] = {0,175};
Init(0,0,row);
ResetROI();
Float_t thetamax = 2*atan(exp(-1.*eta[1]));
- xyz[0] = fTransformer->Row2X(i);
+ xyz[0] = AliL3Transform::Row2X(i);
xyz[1]=0;
xyz[2] = xyz[0]/tan(thetamax);
- fTransformer->Slice2Sector(fSlice,i,sector,row);
- fTransformer->Local2Raw(xyz,sector,row);
+ AliL3Transform::Slice2Sector(fSlice,i,sector,row);
+ AliL3Transform::Local2Raw(xyz,sector,row);
fEtaMinTimeBin[i] = (Int_t)xyz[2];
else
{
Float_t thetamin = 2*atan(exp(-1.*eta[0]));
- xyz[0] = fTransformer->Row2X(i);
- xyz[1] = fTransformer->GetMaxY(i);
+ xyz[0] = AliL3Transform::Row2X(i);
+ xyz[1] = AliL3Transform::GetMaxY(i);
Float_t radii = sqrt(pow(xyz[0],2) + pow(xyz[1],2));
xyz[2] = radii/tan(thetamin);
- fTransformer->Local2Raw(xyz,sector,row);
+ AliL3Transform::Local2Raw(xyz,sector,row);
fEtaMaxTimeBin[i] = (Int_t)xyz[2];
}
}
{
Int_t nrandom = 0;
for(Int_t r=fRowMin;r<=fRowMax;r++){
- Int_t npad=fTransformer->GetNPads(r);
+ Int_t npad=AliL3Transform::GetNPads(r);
nrandom += Int_t (fNGenerate * ((Double_t) npad/141.));
}
return 9 * nrandom * sizeof(AliL3DigitData);
if(!IsRandom) return;
ResetRandom();
fNDigits = 0;
- Int_t npad=fTransformer->GetNPads(row);
+ Int_t npad=AliL3Transform::GetNPads(row);
Int_t ntime = fEtaMaxTimeBin[row] - fEtaMinTimeBin[row];
Int_t nrandom = Int_t (fNGenerate * ((Double_t) npad/141.) *
- (Double_t) ntime/(Double_t) fTransformer->GetNTimeBins() );
+ (Double_t) ntime/(Double_t) AliL3Transform::GetNTimeBins() );
for(Int_t n=0;n<nrandom;n++){
Int_t pad = (int)((float)rand()/RAND_MAX*npad);
Int_t dpad = j + pad;
Int_t dtime = k + time;
- if(dpad<0||dpad>=fTransformer->GetNPads(row)) continue;
- if(dtime<0||dtime>=fTransformer->GetNTimeBins()) continue;
+ if(dpad<0||dpad>=AliL3Transform::GetNPads(row)) continue;
+ if(dtime<0||dtime>=AliL3Transform::GetNTimeBins()) continue;
fDigits[fNDigits].fCharge = dcharge;
fDigits[fNDigits].fRow = row;
<<"Pointer to AliL3SpacePointData = 0x0 "<<ENDLOG;
return kFALSE;
}
- if(!fTransformer){
- LOG(AliL3Log::kError,"AliL3MemHandler::Transform","Object")
- <<"Pointer to AliL3Transform = 0x0 "<<ENDLOG;
- return kFALSE;
- }
+
for(UInt_t i=0;i<npoint;i++){
Float_t xyz[3];
xyz[0] = data[i].fX;
xyz[1] = data[i].fY;
xyz[2] = data[i].fZ;
- fTransformer->Local2Global(xyz,slice);
+ AliL3Transform::Local2Global(xyz,slice);
data[i].fX = xyz[0];
data[i].fY = xyz[1];
data[i].fZ = xyz[2];
<<"Pointer to AliL3TrackArray = 0x0 "<<ENDLOG;
return kFALSE;
}
- if(!fTransformer){
- LOG(AliL3Log::kError,"AliL3MemHandler::Memory2TrackArray","Object")
- <<"Pointer to AliL3Transform = 0x0 "<<ENDLOG;
- return kFALSE;
- }
- array->FillTracks(ntrack,data,slice,fTransformer);
+ array->FillTracks(ntrack,data,slice);
return kTRUE;
}
#include <stdio.h>
#include <stdlib.h>
#include "AliL3DigitData.h"
-#include "AliL3Transform.h"
+
class AliL3SpacePointData;
class AliL3DigitRowData;
class AliL3TrackSegmentData;
Int_t fEtaMinTimeBin[176];
Int_t fEtaMaxTimeBin[176];
- AliL3Transform *fTransformer;//!
public:
AliL3MemHandler();
virtual ~AliL3MemHandler();
void Reset(){CloseBinaryInput();CloseBinaryOutput();Free();}
- void SetTransformer(AliL3Transform *t){fTransformer = t;}
void Init(Int_t s,Int_t p,const Int_t* row){fSlice=s;fPatch=p;fRowMin=row[0];fRowMax=row[1]; ResetROI();}
Bool_t SetBinaryInput(char *name);
AliL3Merger::AliL3Merger(){
//Default constructor
- fTransformer= 0;
SetArray(0);
}
//Read tracks from shared memory (or memory)
AliL3TrackArray *destination = GetInTracks(fCurrentTracks);
if(Is2Global())
- destination->FillTracks(ntracks, tr, fSlice, fTransformer);
+ destination->FillTracks(ntracks, tr, fSlice);
+ //destination->FillTracks(ntracks, tr, fSlice, fTransformer);
else
destination->FillTracks(ntracks, tr);
}
class AliL3Track;
class AliL3TrackSegmentData;
class AliL3Vertex;
-class AliL3Transform;
class AliL3TrackArray;
class AliL3Merger {
Int_t fCurrentTracks;
Int_t fSlice;
AliL3Vertex *fVertex;//!
- AliL3Transform *fTransformer;//!
Bool_t f2Global;
Bool_t Is2Global(Bool_t is){f2Global=is;return f2Global;}
AliL3TrackArray *GetOutTracks(){return fOutTrack;}
Bool_t Is2Global(){return f2Global;}
- void SetTransformer(AliL3Transform *trans){fTransformer = trans;}
void SetVertex(AliL3Vertex *vertex){fVertex=vertex;}
void Reset();
void SetParameter(Double_t maxy=1., Double_t maxz=1., Double_t maxkappa=0.001, Double_t maxpsi=0.05, Double_t maxtgl=0.1);
//If flag tolocal is set, the track is rotated
//to local coordinates.
- AliL3Transform *transform = new AliL3Transform();
Float_t psi[1] = {GetPsi()};
if(!tolocal)
- transform->Local2GlobalAngle(psi,slice);
+ AliL3Transform::Local2GlobalAngle(psi,slice);
else
- transform->Global2LocalAngle(psi,slice);
+ AliL3Transform::Global2LocalAngle(psi,slice);
SetPsi(psi[0]);
Float_t first[3];
first[0] = GetFirstPointX();
first[1] = GetFirstPointY();
first[2] = GetFirstPointZ();
if(!tolocal)
- transform->Local2Global(first,slice);
+ AliL3Transform::Local2Global(first,slice);
else
- transform->Global2Local(first,slice,kTRUE);
+ AliL3Transform::Global2Local(first,slice,kTRUE);
SetFirstPoint(first[0],first[1],first[2]);
Float_t last[3];
last[1] = GetLastPointY();
last[2] = GetLastPointZ();
if(!tolocal)
- transform->Local2Global(last,slice);
+ AliL3Transform::Local2Global(last,slice);
else
- transform->Global2Local(last,slice,kTRUE);
+ AliL3Transform::Global2Local(last,slice,kTRUE);
SetLastPoint(last[0],last[1],last[2]);
Float_t center[3] = {GetCenterX(),GetCenterY(),0};
if(!tolocal)
- transform->Local2Global(center,slice);
+ AliL3Transform::Local2Global(center,slice);
else
- transform->Global2Local(center,slice,kTRUE);
+ AliL3Transform::Global2Local(center,slice,kTRUE);
SetCenterX(center[0]);
SetCenterY(center[1]);
fIsLocal=kFALSE;
else
fIsLocal=kTRUE;
- delete transform;
}
void AliL3Track::CalculateHelix(){
{
//Assumes the track is given in local coordinates
- AliL3Transform *transform = new AliL3Transform();
-
if(!IsLocal())
{
printf("GetCrossingPoint: Track is given on global coordinates\n");
return false;
}
- Double_t xHit = transform->Row2X(padrow);
+ Double_t xHit = AliL3Transform::Row2X(padrow);
xyz[0] = xHit;
Double_t aa = (xHit - GetCenterX())*(xHit - GetCenterX());
Double_t zHit = GetFirstPointZ() + s_tot*GetTgl();
xyz[2] = zHit;
- delete transform;
return true;
}
}
}
-void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice, AliL3Transform* trans){
+void AliL3TrackArray::FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice){
//Read tracks from shared memory (or memory)
AliL3TrackSegmentData *trs = tr;
for(Int_t i=0; i<ntracks; i++){
track->SetPt(trs->fPt);
Float_t psi[1];
psi[0]=trs->fPsi;
- trans->Local2GlobalAngle(psi,slice);
+ AliL3Transform::Local2GlobalAngle(psi,slice);
track->SetPsi(psi[0]);
track->SetTgl(trs->fTgl);
track->SetNHits(trs->fNPoints);
track->SetCharge(trs->fCharge);
Float_t first[3];
first[0]=trs->fX;first[1]=trs->fY;first[2]=trs->fZ;
- trans->Local2Global(first,slice);
+ AliL3Transform::Local2Global(first,slice);
track->SetFirstPoint(first[0],first[1],first[2]);
Float_t last[3];
last[0]=trs->fLastX;last[1]=trs->fLastY;last[2]=trs->fLastZ;
- trans->Local2Global(last,slice);
+ AliL3Transform::Local2Global(last,slice);
track->SetLastPoint(last[0],last[1],last[2]);
track->SetHits( trs->fNPoints, trs->fPointIDs );
UChar_t *tmpP = (UChar_t*)trs;
class AliL3ConfMapTrack;
class AliL3Track;
class AliL3TrackSegmentData;
-class AliL3Transform;
class AliL3TrackArray{
private:
Int_t TrackCompare(AliL3Track *a, AliL3Track *b);
- void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice,
- AliL3Transform* trans); //Fill tracks and transform
+ void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr,Int_t slice); //Fill tracks and transform
void FillTracks(Int_t ntracks, AliL3TrackSegmentData* tr); //Fill tracks
UInt_t WriteTracks(AliL3TrackSegmentData* tr); //Write tracks
UInt_t WriteTracks(UInt_t & ntracks,AliL3TrackSegmentData* tr); //Write tracks
for(Int_t patch=0;patch< GetNIn();patch++){
AliL3TrackArray * tracks = GetInTracks(patch);
- Double_t xval = fTransformer->Row2X((fRowMax[patch]+fRowMin[patch])/2);
+ Double_t xval = AliL3Transform::Row2X((fRowMax[patch]+fRowMin[patch])/2);
Int_t nrow= fRowMax[patch]-fRowMin[patch]+1;
const Int_t kNIn =tracks->GetNTracks();
AliL3Track *tr[2];
AliL3TrackArray *tout = GetOutTracks();
if(i==subsec) tout = GetInTracks(subsec+1);
AliL3TrackArray *tin = GetInTracks(i);
- Double_t xval = fTransformer->Row2X(fRowMax[i]);
- Double_t xmax = fTransformer->Row2X(fRowMax[i+1]);
+ Double_t xval = AliL3Transform::Row2X(fRowMax[i]);
+ Double_t xmax = AliL3Transform::Row2X(fRowMax[i+1]);
Double_t ymax = xval*tan(edge0);
for(Int_t out=0;out<tout->GetNTracks();out++){
AliL3Track *outtrack=tout->GetCheckedTrack(out);
/* $Id$
// Author: Anders Vestbo <mailto:vestbo@fi.uib.no>, Uli Frankenfeld <mailto:franken@fi.uib.no>
-// -- Copyright © AV
+//*-- Copyright © ASV
// changes done by Constantin Loizides <mailto:loizides@ikf.physik.uni-frankfurt.de>
*/
// AliL3Transform
//
// Transformation class for ALICE TPC.
-
-ClassImp(AliL3Transform);
-
-
-AliL3Transform::AliL3Transform()
-{
- //constructor
-
- LOG(AliL3Log::kWarning,"AliL3Transform::AliL3Transform()","Init")
- <<"You are using the _old_ version of parameter inits. V3.06 only! Use the constructor AliL3Transform(char*) instead."<<ENDLOG;
- Init();
-}
-
-AliL3Transform::AliL3Transform(const Char_t* pathname){
- //constructor
- Init(pathname);
-}
-
-AliL3Transform::~AliL3Transform(){
-}
-
-/// old init function used by Anders for AliRoot version 3.06
-void AliL3Transform::Init()
+//
+// Class which contains all detector specific parameters for the TPC,
+// and different useful functions for coordinate transforms.
+//
+// The class is completely static, which means that no object needs
+// to be instantiated. Function calls should then be done like:
+//
+// AliL3Transform::GetEta(xyz);
+//
+// IMPORTANT: If used as is, default detector parameters will be used,
+// and you really have to make sure that these correspond to
+// the AliROOT version you are currently working on!!
+// You should therefore always initialize the parameters by
+//
+// AliL3Transform::Init(path);
+//
+// where path is a char*, giving the path to where file containing
+// the detector parameter is located. This file should be called
+// "l3transform.config", and can be created with macro exa/Make_Init.C.
+
+ClassImp(AliL3Transform)
+
+Int_t AliL3Transform::fVersion = 0;
+Int_t AliL3Transform::fNTimeBins = 446 ;
+Int_t AliL3Transform::fNRowLow = 64 ;
+Int_t AliL3Transform::fNRowUp = 112 ;
+Int_t AliL3Transform::fNSectorLow = 36 ;
+Int_t AliL3Transform::fNSectorUp = 36 ;
+Int_t AliL3Transform::fNSector = 72 ;
+Double_t AliL3Transform::fPadPitchWidthLow = 0.400000 ;
+Double_t AliL3Transform::fPadPitchWidthUp = 0.600000 ;
+Double_t AliL3Transform::fZWidth = 0.56599998474121093750 ;
+Double_t AliL3Transform::fZSigma = 0.22880849748219134199 ;
+Double_t AliL3Transform::fZOffset = 0.68642549244657402596;
+Double_t AliL3Transform::fZLength = 250.;
+Int_t AliL3Transform::fNSlice = 36 ;
+Int_t AliL3Transform::fNRow = 176 ;
+Double_t AliL3Transform::fNRotShift = 0.5 ;
+Double_t AliL3Transform::fPi = 3.141592653589793 ;
+Double_t AliL3Transform::fX[176] = {84.570007324218750,
+ 85.320007324218750,
+ 86.070007324218750,
+ 86.820007324218750,
+ 87.570007324218750,
+ 88.320007324218750,
+ 89.070007324218750,
+ 89.820007324218750,
+ 90.570007324218750,
+ 91.320007324218750,
+ 92.070007324218750,
+ 92.820007324218750,
+ 93.570007324218750,
+ 94.320007324218750,
+ 95.070007324218750,
+ 95.820007324218750,
+ 96.570007324218750,
+ 97.320007324218750,
+ 98.070007324218750,
+ 98.820007324218750,
+ 99.570007324218750,
+ 100.320007324218750,
+ 101.070007324218750,
+ 101.820007324218750,
+ 102.570007324218750,
+ 103.320007324218750,
+ 104.070007324218750,
+ 104.820007324218750,
+ 105.570007324218750,
+ 106.320007324218750,
+ 107.070007324218750,
+ 107.820007324218750,
+ 108.570007324218750,
+ 109.320007324218750,
+ 110.070007324218750,
+ 110.820007324218750,
+ 111.570007324218750,
+ 112.320007324218750,
+ 113.070007324218750,
+ 113.820007324218750,
+ 114.570007324218750,
+ 115.320007324218750,
+ 116.070007324218750,
+ 116.820007324218750,
+ 117.570007324218750,
+ 118.320007324218750,
+ 119.070007324218750,
+ 119.820007324218750,
+ 120.570007324218750,
+ 121.320007324218750,
+ 122.070007324218750,
+ 122.820007324218750,
+ 123.570007324218750,
+ 124.320007324218750,
+ 125.070007324218750,
+ 125.820007324218750,
+ 126.570007324218750,
+ 127.320007324218750,
+ 128.070007324218750,
+ 128.820007324218750,
+ 129.570007324218750,
+ 130.320007324218750,
+ 131.070007324218750,
+ 131.820007324218750,
+ 135.054992675781250,
+ 136.054992675781250,
+ 137.054992675781250,
+ 138.054992675781250,
+ 139.054992675781250,
+ 140.054992675781250,
+ 141.054992675781250,
+ 142.054992675781250,
+ 143.054992675781250,
+ 144.054992675781250,
+ 145.054992675781250,
+ 146.054992675781250,
+ 147.054992675781250,
+ 148.054992675781250,
+ 149.054992675781250,
+ 150.054992675781250,
+ 151.054992675781250,
+ 152.054992675781250,
+ 153.054992675781250,
+ 154.054992675781250,
+ 155.054992675781250,
+ 156.054992675781250,
+ 157.054992675781250,
+ 158.054992675781250,
+ 159.054992675781250,
+ 160.054992675781250,
+ 161.054992675781250,
+ 162.054992675781250,
+ 163.054992675781250,
+ 164.054992675781250,
+ 165.054992675781250,
+ 166.054992675781250,
+ 167.054992675781250,
+ 168.054992675781250,
+ 169.054992675781250,
+ 170.054992675781250,
+ 171.054992675781250,
+ 172.054992675781250,
+ 173.054992675781250,
+ 174.054992675781250,
+ 175.054992675781250,
+ 176.054992675781250,
+ 177.054992675781250,
+ 178.054992675781250,
+ 179.054992675781250,
+ 180.054992675781250,
+ 181.054992675781250,
+ 182.054992675781250,
+ 183.054992675781250,
+ 184.054992675781250,
+ 185.054992675781250,
+ 186.054992675781250,
+ 187.054992675781250,
+ 188.054992675781250,
+ 189.054992675781250,
+ 190.054992675781250,
+ 191.054992675781250,
+ 192.054992675781250,
+ 193.054992675781250,
+ 194.054992675781250,
+ 195.054992675781250,
+ 196.054992675781250,
+ 197.054992675781250,
+ 198.054992675781250,
+ 199.054992675781250,
+ 200.054992675781250,
+ 201.054992675781250,
+ 202.054992675781250,
+ 203.054992675781250,
+ 204.054992675781250,
+ 205.054992675781250,
+ 206.054992675781250,
+ 207.054992675781250,
+ 208.054992675781250,
+ 209.054992675781250,
+ 210.054992675781250,
+ 211.054992675781250,
+ 212.054992675781250,
+ 213.054992675781250,
+ 214.054992675781250,
+ 215.054992675781250,
+ 216.054992675781250,
+ 217.054992675781250,
+ 218.054992675781250,
+ 219.054992675781250,
+ 220.054992675781250,
+ 221.054992675781250,
+ 222.054992675781250,
+ 223.054992675781250,
+ 224.054992675781250,
+ 225.054992675781250,
+ 226.054992675781250,
+ 227.054992675781250,
+ 228.054992675781250,
+ 229.054992675781250,
+ 230.054992675781250,
+ 231.054992675781250,
+ 232.054992675781250,
+ 233.054992675781250,
+ 234.054992675781250,
+ 235.054992675781250,
+ 236.054992675781250,
+ 237.054992675781250,
+ 238.054992675781250,
+ 239.054992675781250,
+ 240.054992675781250,
+ 241.054992675781250,
+ 242.054992675781250,
+ 243.054992675781250,
+ 244.054992675781250,
+ 245.054992675781250,
+ 246.054992675781250,
+};
+
+Int_t AliL3Transform::fNPads[176] = {67,
+ 67,
+ 67,
+ 69,
+ 69,
+ 69,
+ 71,
+ 71,
+ 71,
+ 73,
+ 73,
+ 73,
+ 75,
+ 75,
+ 75,
+ 77,
+ 77,
+ 77,
+ 79,
+ 79,
+ 79,
+ 81,
+ 81,
+ 81,
+ 83,
+ 83,
+ 83,
+ 85,
+ 85,
+ 85,
+ 87,
+ 87,
+ 87,
+ 89,
+ 89,
+ 89,
+ 91,
+ 91,
+ 91,
+ 93,
+ 93,
+ 93,
+ 95,
+ 95,
+ 95,
+ 97,
+ 97,
+ 97,
+ 99,
+ 99,
+ 99,
+ 101,
+ 101,
+ 101,
+ 103,
+ 103,
+ 103,
+ 105,
+ 105,
+ 105,
+ 107,
+ 107,
+ 107,
+ 109,
+ 73,
+ 75,
+ 75,
+ 75,
+ 77,
+ 77,
+ 77,
+ 77,
+ 79,
+ 79,
+ 79,
+ 81,
+ 81,
+ 81,
+ 83,
+ 83,
+ 83,
+ 83,
+ 85,
+ 85,
+ 85,
+ 87,
+ 87,
+ 87,
+ 87,
+ 89,
+ 89,
+ 89,
+ 91,
+ 91,
+ 91,
+ 93,
+ 93,
+ 93,
+ 93,
+ 95,
+ 95,
+ 95,
+ 97,
+ 97,
+ 97,
+ 97,
+ 99,
+ 99,
+ 99,
+ 101,
+ 101,
+ 101,
+ 103,
+ 103,
+ 103,
+ 103,
+ 105,
+ 105,
+ 105,
+ 107,
+ 107,
+ 107,
+ 107,
+ 109,
+ 109,
+ 109,
+ 111,
+ 111,
+ 111,
+ 113,
+ 113,
+ 113,
+ 113,
+ 115,
+ 115,
+ 115,
+ 117,
+ 117,
+ 117,
+ 117,
+ 119,
+ 119,
+ 119,
+ 121,
+ 121,
+ 121,
+ 123,
+ 123,
+ 123,
+ 123,
+ 125,
+ 125,
+ 125,
+ 127,
+ 127,
+ 127,
+ 127,
+ 129,
+ 129,
+ 129,
+ 131,
+ 131,
+ 131,
+ 133,
+ 133,
+ 133,
+ 133,
+ 135,
+ 135,
+ 135,
+ 137,
+ 137,
+ 137,
+ 137,
+ 139,
+ 139,
+};
+
+
+
+void AliL3Transform::Init(const Char_t* path)
{
- fVersion = 0;
+ //Overwrite the parameters with values stored in file "l3transform.config" in path.
+ //If file does not exist, old default values will be used.
- //sector:
- fNTimeBins = 446;
- fNRowLow = 64;
- fNRowUp = 112;
- fNSectorLow = 36;
- fNSectorUp = 36;
- fNSector = 72;
- fPadPitchWidthLow = 0.400000;
- fPadPitchWidthUp = 0.600000;
- fZWidth = 0.56599998474121093750;
- fZSigma = 0.22880849748219134199;
- fZOffset = 0.68642549244657402596;
- fZLength = 250.;
-
- //slices:
- fNSlice = 36;
- fNRow = 176;
- fPi = 3.141592653589793;
-
- fNRotShift=0.5;
- for(Int_t i=0;i<36;i++){
- fCos[i] = cos( (2*fPi/18) * (i+fNRotShift) );
- fSin[i] = sin( (2*fPi/18) * (i+fNRotShift) );
- }
-
- fX[0] = 84.570007324218750;
- fX[1] = 85.320007324218750;
- fX[2] = 86.070007324218750;
- fX[3] = 86.820007324218750;
- fX[4] = 87.570007324218750;
- fX[5] = 88.320007324218750;
- fX[6] = 89.070007324218750;
- fX[7] = 89.820007324218750;
- fX[8] = 90.570007324218750;
- fX[9] = 91.320007324218750;
- fX[10] = 92.070007324218750;
- fX[11] = 92.820007324218750;
- fX[12] = 93.570007324218750;
- fX[13] = 94.320007324218750;
- fX[14] = 95.070007324218750;
- fX[15] = 95.820007324218750;
- fX[16] = 96.570007324218750;
- fX[17] = 97.320007324218750;
- fX[18] = 98.070007324218750;
- fX[19] = 98.820007324218750;
- fX[20] = 99.570007324218750;
- fX[21] = 100.320007324218750;
- fX[22] = 101.070007324218750;
- fX[23] = 101.820007324218750;
- fX[24] = 102.570007324218750;
- fX[25] = 103.320007324218750;
- fX[26] = 104.070007324218750;
- fX[27] = 104.820007324218750;
- fX[28] = 105.570007324218750;
- fX[29] = 106.320007324218750;
- fX[30] = 107.070007324218750;
- fX[31] = 107.820007324218750;
- fX[32] = 108.570007324218750;
- fX[33] = 109.320007324218750;
- fX[34] = 110.070007324218750;
- fX[35] = 110.820007324218750;
- fX[36] = 111.570007324218750;
- fX[37] = 112.320007324218750;
- fX[38] = 113.070007324218750;
- fX[39] = 113.820007324218750;
- fX[40] = 114.570007324218750;
- fX[41] = 115.320007324218750;
- fX[42] = 116.070007324218750;
- fX[43] = 116.820007324218750;
- fX[44] = 117.570007324218750;
- fX[45] = 118.320007324218750;
- fX[46] = 119.070007324218750;
- fX[47] = 119.820007324218750;
- fX[48] = 120.570007324218750;
- fX[49] = 121.320007324218750;
- fX[50] = 122.070007324218750;
- fX[51] = 122.820007324218750;
- fX[52] = 123.570007324218750;
- fX[53] = 124.320007324218750;
- fX[54] = 125.070007324218750;
- fX[55] = 125.820007324218750;
- fX[56] = 126.570007324218750;
- fX[57] = 127.320007324218750;
- fX[58] = 128.070007324218750;
- fX[59] = 128.820007324218750;
- fX[60] = 129.570007324218750;
- fX[61] = 130.320007324218750;
- fX[62] = 131.070007324218750;
- fX[63] = 131.820007324218750;
- fX[64] = 135.054992675781250;
- fX[65] = 136.054992675781250;
- fX[66] = 137.054992675781250;
- fX[67] = 138.054992675781250;
- fX[68] = 139.054992675781250;
- fX[69] = 140.054992675781250;
- fX[70] = 141.054992675781250;
- fX[71] = 142.054992675781250;
- fX[72] = 143.054992675781250;
- fX[73] = 144.054992675781250;
- fX[74] = 145.054992675781250;
- fX[75] = 146.054992675781250;
- fX[76] = 147.054992675781250;
- fX[77] = 148.054992675781250;
- fX[78] = 149.054992675781250;
- fX[79] = 150.054992675781250;
- fX[80] = 151.054992675781250;
- fX[81] = 152.054992675781250;
- fX[82] = 153.054992675781250;
- fX[83] = 154.054992675781250;
- fX[84] = 155.054992675781250;
- fX[85] = 156.054992675781250;
- fX[86] = 157.054992675781250;
- fX[87] = 158.054992675781250;
- fX[88] = 159.054992675781250;
- fX[89] = 160.054992675781250;
- fX[90] = 161.054992675781250;
- fX[91] = 162.054992675781250;
- fX[92] = 163.054992675781250;
- fX[93] = 164.054992675781250;
- fX[94] = 165.054992675781250;
- fX[95] = 166.054992675781250;
- fX[96] = 167.054992675781250;
- fX[97] = 168.054992675781250;
- fX[98] = 169.054992675781250;
- fX[99] = 170.054992675781250;
- fX[100] = 171.054992675781250;
- fX[101] = 172.054992675781250;
- fX[102] = 173.054992675781250;
- fX[103] = 174.054992675781250;
- fX[104] = 175.054992675781250;
- fX[105] = 176.054992675781250;
- fX[106] = 177.054992675781250;
- fX[107] = 178.054992675781250;
- fX[108] = 179.054992675781250;
- fX[109] = 180.054992675781250;
- fX[110] = 181.054992675781250;
- fX[111] = 182.054992675781250;
- fX[112] = 183.054992675781250;
- fX[113] = 184.054992675781250;
- fX[114] = 185.054992675781250;
- fX[115] = 186.054992675781250;
- fX[116] = 187.054992675781250;
- fX[117] = 188.054992675781250;
- fX[118] = 189.054992675781250;
- fX[119] = 190.054992675781250;
- fX[120] = 191.054992675781250;
- fX[121] = 192.054992675781250;
- fX[122] = 193.054992675781250;
- fX[123] = 194.054992675781250;
- fX[124] = 195.054992675781250;
- fX[125] = 196.054992675781250;
- fX[126] = 197.054992675781250;
- fX[127] = 198.054992675781250;
- fX[128] = 199.054992675781250;
- fX[129] = 200.054992675781250;
- fX[130] = 201.054992675781250;
- fX[131] = 202.054992675781250;
- fX[132] = 203.054992675781250;
- fX[133] = 204.054992675781250;
- fX[134] = 205.054992675781250;
- fX[135] = 206.054992675781250;
- fX[136] = 207.054992675781250;
- fX[137] = 208.054992675781250;
- fX[138] = 209.054992675781250;
- fX[139] = 210.054992675781250;
- fX[140] = 211.054992675781250;
- fX[141] = 212.054992675781250;
- fX[142] = 213.054992675781250;
- fX[143] = 214.054992675781250;
- fX[144] = 215.054992675781250;
- fX[145] = 216.054992675781250;
- fX[146] = 217.054992675781250;
- fX[147] = 218.054992675781250;
- fX[148] = 219.054992675781250;
- fX[149] = 220.054992675781250;
- fX[150] = 221.054992675781250;
- fX[151] = 222.054992675781250;
- fX[152] = 223.054992675781250;
- fX[153] = 224.054992675781250;
- fX[154] = 225.054992675781250;
- fX[155] = 226.054992675781250;
- fX[156] = 227.054992675781250;
- fX[157] = 228.054992675781250;
- fX[158] = 229.054992675781250;
- fX[159] = 230.054992675781250;
- fX[160] = 231.054992675781250;
- fX[161] = 232.054992675781250;
- fX[162] = 233.054992675781250;
- fX[163] = 234.054992675781250;
- fX[164] = 235.054992675781250;
- fX[165] = 236.054992675781250;
- fX[166] = 237.054992675781250;
- fX[167] = 238.054992675781250;
- fX[168] = 239.054992675781250;
- fX[169] = 240.054992675781250;
- fX[170] = 241.054992675781250;
- fX[171] = 242.054992675781250;
- fX[172] = 243.054992675781250;
- fX[173] = 244.054992675781250;
- fX[174] = 245.054992675781250;
- fX[175] = 246.054992675781250;
- fNPads[0] = 67;
- fNPads[1] = 67;
- fNPads[2] = 67;
- fNPads[3] = 69;
- fNPads[4] = 69;
- fNPads[5] = 69;
- fNPads[6] = 71;
- fNPads[7] = 71;
- fNPads[8] = 71;
- fNPads[9] = 73;
- fNPads[10] = 73;
- fNPads[11] = 73;
- fNPads[12] = 75;
- fNPads[13] = 75;
- fNPads[14] = 75;
- fNPads[15] = 77;
- fNPads[16] = 77;
- fNPads[17] = 77;
- fNPads[18] = 79;
- fNPads[19] = 79;
- fNPads[20] = 79;
- fNPads[21] = 81;
- fNPads[22] = 81;
- fNPads[23] = 81;
- fNPads[24] = 83;
- fNPads[25] = 83;
- fNPads[26] = 83;
- fNPads[27] = 85;
- fNPads[28] = 85;
- fNPads[29] = 85;
- fNPads[30] = 87;
- fNPads[31] = 87;
- fNPads[32] = 87;
- fNPads[33] = 89;
- fNPads[34] = 89;
- fNPads[35] = 89;
- fNPads[36] = 91;
- fNPads[37] = 91;
- fNPads[38] = 91;
- fNPads[39] = 93;
- fNPads[40] = 93;
- fNPads[41] = 93;
- fNPads[42] = 95;
- fNPads[43] = 95;
- fNPads[44] = 95;
- fNPads[45] = 97;
- fNPads[46] = 97;
- fNPads[47] = 97;
- fNPads[48] = 99;
- fNPads[49] = 99;
- fNPads[50] = 99;
- fNPads[51] = 101;
- fNPads[52] = 101;
- fNPads[53] = 101;
- fNPads[54] = 103;
- fNPads[55] = 103;
- fNPads[56] = 103;
- fNPads[57] = 105;
- fNPads[58] = 105;
- fNPads[59] = 105;
- fNPads[60] = 107;
- fNPads[61] = 107;
- fNPads[62] = 107;
- fNPads[63] = 109;
- fNPads[64] = 73;
- fNPads[65] = 75;
- fNPads[66] = 75;
- fNPads[67] = 75;
- fNPads[68] = 77;
- fNPads[69] = 77;
- fNPads[70] = 77;
- fNPads[71] = 77;
- fNPads[72] = 79;
- fNPads[73] = 79;
- fNPads[74] = 79;
- fNPads[75] = 81;
- fNPads[76] = 81;
- fNPads[77] = 81;
- fNPads[78] = 83;
- fNPads[79] = 83;
- fNPads[80] = 83;
- fNPads[81] = 83;
- fNPads[82] = 85;
- fNPads[83] = 85;
- fNPads[84] = 85;
- fNPads[85] = 87;
- fNPads[86] = 87;
- fNPads[87] = 87;
- fNPads[88] = 87;
- fNPads[89] = 89;
- fNPads[90] = 89;
- fNPads[91] = 89;
- fNPads[92] = 91;
- fNPads[93] = 91;
- fNPads[94] = 91;
- fNPads[95] = 93;
- fNPads[96] = 93;
- fNPads[97] = 93;
- fNPads[98] = 93;
- fNPads[99] = 95;
- fNPads[100] = 95;
- fNPads[101] = 95;
- fNPads[102] = 97;
- fNPads[103] = 97;
- fNPads[104] = 97;
- fNPads[105] = 97;
- fNPads[106] = 99;
- fNPads[107] = 99;
- fNPads[108] = 99;
- fNPads[109] = 101;
- fNPads[110] = 101;
- fNPads[111] = 101;
- fNPads[112] = 103;
- fNPads[113] = 103;
- fNPads[114] = 103;
- fNPads[115] = 103;
- fNPads[116] = 105;
- fNPads[117] = 105;
- fNPads[118] = 105;
- fNPads[119] = 107;
- fNPads[120] = 107;
- fNPads[121] = 107;
- fNPads[122] = 107;
- fNPads[123] = 109;
- fNPads[124] = 109;
- fNPads[125] = 109;
- fNPads[126] = 111;
- fNPads[127] = 111;
- fNPads[128] = 111;
- fNPads[129] = 113;
- fNPads[130] = 113;
- fNPads[131] = 113;
- fNPads[132] = 113;
- fNPads[133] = 115;
- fNPads[134] = 115;
- fNPads[135] = 115;
- fNPads[136] = 117;
- fNPads[137] = 117;
- fNPads[138] = 117;
- fNPads[139] = 117;
- fNPads[140] = 119;
- fNPads[141] = 119;
- fNPads[142] = 119;
- fNPads[143] = 121;
- fNPads[144] = 121;
- fNPads[145] = 121;
- fNPads[146] = 123;
- fNPads[147] = 123;
- fNPads[148] = 123;
- fNPads[149] = 123;
- fNPads[150] = 125;
- fNPads[151] = 125;
- fNPads[152] = 125;
- fNPads[153] = 127;
- fNPads[154] = 127;
- fNPads[155] = 127;
- fNPads[156] = 127;
- fNPads[157] = 129;
- fNPads[158] = 129;
- fNPads[159] = 129;
- fNPads[160] = 131;
- fNPads[161] = 131;
- fNPads[162] = 131;
- fNPads[163] = 133;
- fNPads[164] = 133;
- fNPads[165] = 133;
- fNPads[166] = 133;
- fNPads[167] = 135;
- fNPads[168] = 135;
- fNPads[169] = 135;
- fNPads[170] = 137;
- fNPads[171] = 137;
- fNPads[172] = 137;
- fNPads[173] = 137;
- fNPads[174] = 139;
- fNPads[175] = 139;
-}
-
-void AliL3Transform::Init(const Char_t* path){
- Init(); //call the old init function to have some initial values
-
Char_t *pathname=new Char_t[1024];
strcpy(pathname,path);
strcat(pathname,"/l3transform.config");
-
+
FILE *fptr=fopen(pathname,"r");
if(!fptr){
LOG(AliL3Log::kWarning,"AliL3Transform::Init","File Open")
}
}
- for(Int_t i=0;i<36;i++){
- fCos[i] = cos( (2*fPi/18) * (i+fNRotShift) );
- fSin[i] = sin( (2*fPi/18) * (i+fNRotShift) );
- }
-
fclose(fptr);
delete pathname;
fVersion=1; //new version
+
}
return phi;
}
-Bool_t AliL3Transform::Slice2Sector(Int_t slice, Int_t slicerow, Int_t & sector, Int_t &row) const{
+Bool_t AliL3Transform::Slice2Sector(Int_t slice, Int_t slicerow, Int_t & sector, Int_t &row)
+{
if(slicerow<0&&slicerow>=fNRow) return kFALSE;
if(slice<0||slice>=fNSlice) return kFALSE;
return kTRUE;
}
-Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t sector) const{
+Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t sector)
+{
if(sector<0||sector>=fNSector) return kFALSE;
if(sector<fNSectorLow) slice = sector;
else slice = sector - fNSectorLow;
return kTRUE;
}
-Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t & slicerow,Int_t sector, Int_t row) const{
+Bool_t AliL3Transform::Sector2Slice(Int_t & slice, Int_t & slicerow,Int_t sector, Int_t row)
+{
if(sector<0||sector>=fNSector||row<0) return kFALSE;
if(sector<fNSectorLow){
if(row>=fNRowLow) return kFALSE;
Float_t x0 = xyz[0];
Float_t y0 = xyz[1];
Float_t cs,sn;
- cs = fCos[slice];
- sn = fSin[slice];
+ cs = cos( (2*fPi/18) * (slice+fNRotShift) );
+ sn = sin( (2*fPi/18) * (slice+fNRotShift) );
xyz[0]=x0*cs-y0*sn;
xyz[1]=x0*sn+y0*cs;
xyz[2]=xyz[2];//global z=local z
xyz[2]=fZLength-xyz[2];
else
xyz[2]=xyz[2]-fZLength;
+
}
void AliL3Transform::Local2Global(Float_t *xyz,Int_t sector,Int_t row)
Int_t slice,slicerow;
Sector2Slice(slice, slicerow, sector, row);
Float_t r=Row2X(slicerow);
- Float_t cs = fCos[slice];
- Float_t sn = fSin[slice];
+ Float_t cs = cos( (2*fPi/18) * (slice+fNRotShift) );
+ Float_t sn = sin( (2*fPi/18) * (slice+fNRotShift) );
xyz[0]=r*cs-xyz[1]*sn;
xyz[1]=r*sn+xyz[1]*cs;
Double_t AliL3Transform::GetMaxY(Int_t slicerow)
{
-
+
if(slicerow < fNRowLow)
return fPadPitchWidthLow*fNPads[slicerow]/2;
else
return fPadPitchWidthUp*fNPads[slicerow]/2;
+
}
void AliL3Transform::Global2Local(Float_t *xyz,Int_t sector,Bool_t isSlice)
Sector2Slice(slice, sector);
else
slice = sector;
- Float_t cs = fCos[slice];
- Float_t sn = fSin[slice];
+ Float_t cs = cos( (2*fPi/18) * (slice+fNRotShift) );
+ Float_t sn = sin( (2*fPi/18) * (slice+fNRotShift) );
Float_t x1 = xyz[0]*cs + xyz[1]*sn;
Float_t y1 = -xyz[0]*sn + xyz[1]*cs;
xyz[0] = x1;
void AliL3Transform::Local2Raw(Float_t *xyz,Int_t sector,Int_t row)
{
//Transformation from local coordinates to raw
-
+
Int_t slice,slicerow;
Sector2Slice(slice, slicerow, sector, row);
if ((sector<nis/2) || ((sector-nis)<nos/2)) sign=1;
xyz[2]=fZLength-sign*xyz[2];
xyz[2]=(xyz[2]+fZOffset)/fZWidth;
+
}
void AliL3Transform::Global2Raw(Float_t *xyz,Int_t sector,Int_t row)
#define ALIL3TRANSFORM_H
#include "AliL3RootTypes.h"
-class TFile;
class AliL3Transform {
+
private:
- Int_t fNTimeBins;
- Int_t fNRowLow;
- Int_t fNRowUp;
- Int_t fNSectorLow;
- Int_t fNSectorUp;
- Double_t fPadPitchWidthLow;
- Double_t fPadPitchWidthUp;
- Double_t fZWidth;
- Double_t fZSigma;
- Int_t fNSector;
- Int_t fNSlice;
- Int_t fNRow;
- Double_t fPi;
- Double_t fNRotShift;
- Double_t fZLength;
- Double_t fZOffset;
- Double_t fCos[36]; //fill this following Init
- Double_t fSin[36]; //fill this following Init
- Double_t fX[176]; //fill this following Init
- Int_t fNPads[176]; //fill this following Init
- Int_t fVersion; //flags which version one is using
- void Init(); //old init used by Anders for AliRoot <= 3.06
- public:
- AliL3Transform();
- AliL3Transform(const char *pathname);
- virtual ~AliL3Transform();
- Int_t GetVersion(){return fVersion;}
- void Init(const Char_t* path); //new init for all AliRoot versions
+
+ static Int_t fNTimeBins;
+ static Int_t fNRowLow;
+ static Int_t fNRowUp;
+ static Int_t fNSectorLow;
+ static Int_t fNSectorUp;
+ static Double_t fPadPitchWidthLow;
+ static Double_t fPadPitchWidthUp;
+ static Double_t fZWidth;
+ static Double_t fZSigma;
+ static Int_t fNSector;
+ static Int_t fNSlice;
+ static Int_t fNRow;
+ static Double_t fPi;
+ static Double_t fNRotShift;
+ static Double_t fZLength;
+ static Double_t fZOffset;
+ static Int_t fNPads[176]; //fill this following Init
+ static Double_t fX[176]; //fill this following Init
+ static Int_t fVersion; //flags which version one is using
- Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
- Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}
- Double_t GetPadPitchWidth(Int_t patch) {if(patch<=2) return fPadPitchWidthLow; else return fPadPitchWidthUp;}
- Double_t GetZWidth() {return fZWidth;}
- Double_t GetZLength() {return fZLength;}
- Double_t GetZOffset() {return fZOffset;}
- Int_t GetNSectorLow() {return fNSectorLow;}
- Int_t GetNSectorUp() {return fNSectorUp;}
+ public:
+
+ static void Init(const Char_t* path); //new init for all AliRoot versions
+
+ static Int_t GetVersion(){return fVersion;}
+ static Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
+ static Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}
+ static Double_t GetPadPitchWidth(Int_t patch) {if(patch<=2) return fPadPitchWidthLow; else return fPadPitchWidthUp;}
+ static Double_t GetZWidth() {return fZWidth;}
+ static Double_t GetZLength() {return fZLength;}
+ static Double_t GetZOffset() {return fZOffset;}
+ static Int_t GetNSectorLow() {return fNSectorLow;}
+ static Int_t GetNSectorUp() {return fNSectorUp;}
- Bool_t Slice2Sector(Int_t slice, Int_t slicerow, Int_t §or, Int_t &row) const;
- Bool_t Sector2Slice(Int_t &slice, Int_t sector) const;
- Bool_t Sector2Slice(Int_t &slice, Int_t &slicerow, Int_t sector, Int_t row) const;
+ static Bool_t Slice2Sector(Int_t slice, Int_t slicerow, Int_t §or, Int_t &row);
+ static Bool_t Sector2Slice(Int_t &slice, Int_t sector);
+ static Bool_t Sector2Slice(Int_t &slice, Int_t &slicerow, Int_t sector, Int_t row);
- Int_t GetNPads(Int_t row){return (row<fNRow)?fNPads[row]:0;}
- Int_t GetNTimeBins(){return fNTimeBins;}
- Double_t Row2X(Int_t slicerow);
- Double_t GetMaxY(Int_t slicerow);
- Double_t GetEta(Float_t *xyz);
- Double_t GetEta(Int_t row, Int_t pad, Int_t time);
- Double_t GetPhi(Float_t *xyz);
+ static Int_t GetNPads(Int_t row){return (row<fNRow)?fNPads[row]:0;}
+ static Int_t GetNTimeBins(){return fNTimeBins;}
+ static Double_t Row2X(Int_t slicerow);
+ static Double_t GetMaxY(Int_t slicerow);
+ static Double_t GetEta(Float_t *xyz);
+ static Double_t GetEta(Int_t row, Int_t pad, Int_t time);
+ static Double_t GetPhi(Float_t *xyz);
- void XYZtoRPhiEta(Float_t *rpe, Float_t *xyz);
- void Local2Global(Float_t *xyz, Int_t slice);
- void Local2GlobalAngle(Float_t *angle, Int_t slice);
- void Global2LocalAngle(Float_t *angle, Int_t slice);
+ static void XYZtoRPhiEta(Float_t *rpe, Float_t *xyz);
+ static void Local2Global(Float_t *xyz, Int_t slice);
+ static void Local2GlobalAngle(Float_t *angle, Int_t slice);
+ static void Global2LocalAngle(Float_t *angle, Int_t slice);
- void Raw2Local(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
- void Local2Global(Float_t *xyz, Int_t sector, Int_t row);
- void Global2Local(Float_t *xyz, Int_t sector, Bool_t isSlice=kFALSE);
- void Raw2Global(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
- void Local2Raw(Float_t *xyz, Int_t sector, Int_t row);
- void Global2Raw(Float_t *xyz, Int_t sector, Int_t row);
+ static void Raw2Local(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
+ static void Local2Global(Float_t *xyz, Int_t sector, Int_t row);
+ static void Global2Local(Float_t *xyz, Int_t sector, Bool_t isSlice=kFALSE);
+ static void Raw2Global(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
+ static void Local2Raw(Float_t *xyz, Int_t sector, Int_t row);
+ static void Global2Raw(Float_t *xyz, Int_t sector, Int_t row);
ClassDef(AliL3Transform,1) //Transformation class for ALICE TPC
};
<<"You have not supplied the input rootfile; use the appropriate ctor!"<<ENDLOG;
return;
}
+
+ AliL3Transform::Init(path);//Initialize the detector parameters.
fWriteOut = kFALSE;
fGlobalMerger=0;
- fTransformer = new AliL3Transform(path);
fDoRoi = kFALSE;
fDoNonVertex = kFALSE;
fClusterDeconv = kTRUE;
if(fVertexFinder) delete fVertexFinder;
if(fVertex) delete fVertex;
if(fTracker) delete fTracker;
- if(fTransformer) delete fTransformer;
if(fTrackMerger) delete fTrackMerger;
if(fInterMerger) delete fInterMerger;
if(fFileHandler) delete fFileHandler;
for(Int_t i=first; i<=last; i++){
ProcessSlice(i);
fGlobalMerger->SetVertex(fVertex);
- fGlobalMerger->SetTransformer(fTransformer);
fGlobalMerger->InitSlice(i);
fGlobalMerger->FillTracks(fNTrackData,fTrackData);
fFileHandler->Free(); //free the memory
}
fBenchmark->Start("Global Merger");
//fGlobalMerger->AddAllTracks();
- //fGlobalMerger->Merge();
- fGlobalMerger->SlowMerge();
+ fGlobalMerger->Merge();
+ //fGlobalMerger->SlowMerge();
fBenchmark->Stop("Global Merger");
if(fWriteOut) WriteResults();
AliL3MemHandler *memory = new AliL3MemHandler();
fTrackMerger->Reset();
- fTrackMerger->SetTransformer(fTransformer);
fTrackMerger->SetRows(fRow[0]);
for(Int_t patch=fNPatch-1;patch>=0;patch--){
fFileHandler->Init(slice,patch,fRow[patch]);
- fFileHandler->SetTransformer(fTransformer);
UInt_t npoints=0;
AliL3SpacePointData *points =0;
UInt_t ndigits=0;
points = (AliL3SpacePointData *) memory->Allocate(pointsize);
- fClusterFinder = new AliL3ClustFinderNew(fTransformer);
+ fClusterFinder = new AliL3ClustFinderNew();
fClusterFinder->InitSlice(slice,patch,fRow[patch][0],fRow[patch][1]
,maxpoints);
fClusterFinder->SetDeconv(fClusterDeconv);
}
*/
fInterMerger->Reset();
- fInterMerger->SetTransformer(fTransformer);
fInterMerger->Init(fRow[patch],patch);
fInterMerger->FillTracks(ntracks0,trackdata0);
char name[256];
sprintf(name,"%spoints_%d_%d.raw",fWriteOutPath,slice,patch);
AliL3MemHandler * memory = new AliL3MemHandler();
- memory->SetTransformer(fTransformer);
memory->SetBinaryOutput(name);
memory->Transform(npoints,points,slice);
memory->Memory2Binary(npoints,points);
class AliL3DigitRowData;
class AliL3TrackSegmentData;
class AliL3DigitData;
-class AliL3Transform;
class AliL3ConfMapper;
class AliL3Vertex;
class AliL3VertexFinder;
class AliL3TrackMerger;
class AliL3GlobalMerger;
class TDirectory;
-class AliL3Transform;
class AliL3ClustFinderNew;
class AliL3Merger;
class AliL3InterMerger;
Int_t fRow[6][2];
Char_t fPath[256];
Char_t fWriteOutPath[256];
- AliL3Transform *fTransformer; //!
TDirectory *savedir;
TFile *fInputFile;
Bool_t fFindVertex;