appear in 2 neighbouring eta slices. The tracks are matching if they have
identical kappa and psi; they appear in the same bin. The one with the
lower threshold are removed from the track array.
There is also a bugfix in AliL3HoughTransformer::GetEta, the sign should
not be swicthed on the other half of TPC, because the sign is already included
in the (GetEtaMax() - GetEtaMin()).
Also the DoMC flag in the AliL3HoughTransformer ctor.
fMemHandler[i] = new AliL3FileHandler();
if(!fBinary)
{
fMemHandler[i] = new AliL3FileHandler();
if(!fBinary)
{
sprintf(filename,"%s/digitfile.root",fPath);
fMemHandler[i]->SetAliInput(filename);
}
sprintf(filename,"%s/digitfile.root",fPath);
fMemHandler[i]->SetAliInput(filename);
}
-void AliL3Hough::EvaluateWithEta()
+void AliL3Hough::MergeEtaSlices()
+ //Merge tracks found in neighbouring eta slices.
+ //Removes the track with the lower weight.
+
+ AliL3TrackArray *tracks = fTracks[0];
+ if(!tracks)
- printf("AliL3Hough::EvaluateWithEta: NO TRACKS\n");
+ cerr<<"AliL3Hough::MergeEtaSlices : No tracks "<<endl;
- printf("Number of tracks before evaluation %d\n",fTracks[0]->GetNTracks());
-
- for(Int_t i=0; i<fNPatches; i++)
+ for(Int_t j=0; j<tracks->GetNTracks(); j++)
- fEval[i]->InitTransformer(fHoughTransformer[i]);
- fEval[i]->FindEta(fTracks[0]);
+ AliL3HoughTrack *track1 = (AliL3HoughTrack*)tracks->GetCheckedTrack(j);
+ if(!track1) continue;
+ for(Int_t k=j+1; k<tracks->GetNTracks(); k++)
+ {
+ AliL3HoughTrack *track2 = (AliL3HoughTrack*)tracks->GetCheckedTrack(k);
+ if(!track2) continue;
+ if(abs(track1->GetEtaIndex() - track2->GetEtaIndex()) != 1) continue;
+ if(track1->GetKappa() == track2->GetKappa() && track1->GetPsi() == track2->GetPsi())
+ {
+ cout<<"Merging track in slices "<<track1->GetEtaIndex()<<" "<<track2->GetEtaIndex()<<endl;
+ if(track1->GetWeight() > track2->GetWeight())
+ tracks->Remove(k);
+ else
+ tracks->Remove(j);
+ }
+ }
- fMerger->FillTracks(fTracks[0],0);
}
void AliL3Hough::WriteTracks(Int_t slice,Char_t *path)
}
void AliL3Hough::WriteTracks(Int_t slice,Char_t *path)
void ProcessPatchIter(Int_t patch);
void MergePatches();
void MergeInternally();
void ProcessPatchIter(Int_t patch);
void MergePatches();
void MergeInternally();
+ void MergeEtaSlices();
+
void FindTrackCandidates();
void AddAllHistograms();
Int_t Evaluate(Int_t road_width=1,Int_t nrowstomiss=1);
void EvaluatePatch(Int_t i,Int_t road_width,Int_t nrowstomiss);
void FindTrackCandidates();
void AddAllHistograms();
Int_t Evaluate(Int_t road_width=1,Int_t nrowstomiss=1);
void EvaluatePatch(Int_t i,Int_t road_width,Int_t nrowstomiss);
- void EvaluateWithEta();
void WriteTracks(Int_t slice,Char_t *path="./");
void WriteDigits(Char_t *outfile="output_digits.root");
void InitEvaluate();
void WriteTracks(Int_t slice,Char_t *path="./");
void WriteDigits(Char_t *outfile="output_digits.root");
void InitEvaluate();
{
//Default constructor
fParamSpace = 0;
{
//Default constructor
fParamSpace = 0;
#ifdef do_mc
fTrackID = 0;
#endif
}
#ifdef do_mc
fTrackID = 0;
#endif
}
-AliL3HoughTransformer::AliL3HoughTransformer(Int_t slice,Int_t patch,Int_t n_eta_segments) : AliL3HoughBaseTransformer(slice,patch,n_eta_segments)
+AliL3HoughTransformer::AliL3HoughTransformer(Int_t slice,Int_t patch,Int_t n_eta_segments,Bool_t DoMC) : AliL3HoughBaseTransformer(slice,patch,n_eta_segments)
{
//Normal constructor
fParamSpace = 0;
{
//Normal constructor
fParamSpace = 0;
+ if(DoMC)
+ {
+ if(patch==0)
+ fDoMC = kTRUE;
+ else
+ fDoMC = kFALSE;
+ }
#ifdef do_mc
fTrackID = 0;
#endif
#ifdef do_mc
fTrackID = 0;
#endif
for(Int_t i=0; i<GetNEtaSegments(); i++)
{
sprintf(histname,"paramspace_%d",i);
for(Int_t i=0; i<GetNEtaSegments(); i++)
{
sprintf(histname,"paramspace_%d",i);
- //fParamSpace[i] = new AliL3HistogramAdaptive(histname,0.1,1,0.05,64,ymin,ymax);
+ //fParamSpace[i] = new AliL3HistogramAdaptive(histname,0.1,2,0.02,nybin,ymin,ymax);
fParamSpace[i] = new AliL3Histogram(histname,"",nxbin,xmin,xmax,nybin,ymin,ymax);
}
fParamSpace[i] = new AliL3Histogram(histname,"",nxbin,xmin,xmax,nybin,ymin,ymax);
}
{
Double_t eta_slice = (GetEtaMax()-GetEtaMin())/GetNEtaSegments();
Double_t eta=(Double_t)((eta_index+0.5)*eta_slice);
{
Double_t eta_slice = (GetEtaMax()-GetEtaMin())/GetNEtaSegments();
Double_t eta=(Double_t)((eta_index+0.5)*eta_slice);
cerr<<"AliL3HoughTransform::TransformCircle : Mismatching padrow numbering "<<i<<" "<<(Int_t)tempPt->fRow<<endl;
continue;
}
cerr<<"AliL3HoughTransform::TransformCircle : Mismatching padrow numbering "<<i<<" "<<(Int_t)tempPt->fRow<<endl;
continue;
}
//Loop over the data on this padrow:
for(UInt_t j=0; j<tempPt->fNDigit; j++)
{
//Loop over the data on this padrow:
for(UInt_t j=0; j<tempPt->fNDigit; j++)
{
UShort_t time = digPt[j].fTime;
if((Int_t)charge <= GetLowerThreshold() || (Int_t)charge > GetUpperThreshold())
continue;
UShort_t time = digPt[j].fTime;
if((Int_t)charge <= GetLowerThreshold() || (Int_t)charge > GetUpperThreshold())
continue;
Int_t sector,row;
Float_t xyz[3];
Int_t sector,row;
Float_t xyz[3];
{
Float_t phi0 = hist->GetBinCenterY(b);
Float_t kappa = 2*sin(phi - phi0)/R;
{
Float_t phi0 = hist->GetBinCenterY(b);
Float_t kappa = 2*sin(phi - phi0)/R;
- hist->Fill(kappa,phi0,charge);
+ hist->Fill(kappa,phi0,1);//charge);
phi_0 = atan( (r2*sin(phi1)-r1*sin(phi2))/(r2*cos(phi1)-r1*cos(phi2)) );
kappa = 2*sin(phi2-phi_0)/r2;
tot_charge = digits[i].charge + digits[j].charge;
phi_0 = atan( (r2*sin(phi1)-r1*sin(phi2))/(r2*cos(phi1)-r1*cos(phi2)) );
kappa = 2*sin(phi2-phi_0)/r2;
tot_charge = digits[i].charge + digits[j].charge;
- hist->Fill(kappa,phi_0,tot_charge);
+ hist->Fill(kappa,phi_0,1);//tot_charge);
public:
AliL3HoughTransformer();
public:
AliL3HoughTransformer();
- AliL3HoughTransformer(Int_t slice,Int_t patch,Int_t n_eta_segments);
+ AliL3HoughTransformer(Int_t slice,Int_t patch,Int_t n_eta_segments,Bool_t DoMC=kFALSE);
virtual ~AliL3HoughTransformer();
void CreateHistograms(Int_t nxbin,Double_t ptmin,Int_t nybin,Double_t phimin,Double_t phimax);
virtual ~AliL3HoughTransformer();
void CreateHistograms(Int_t nxbin,Double_t ptmin,Int_t nybin,Double_t phimin,Double_t phimax);