#include <iostream.h>
#include <time.h>
#include <math.h>
+#include <sys/time.h>
#include "AliL3ConfMapper.h"
#include "AliL3Defs.h"
-#include "AliL3Logging.h"
+#include "AliL3Logging.h"
#include "AliL3Transform.h"
#include "AliL3Vertex.h"
#include "AliL3ConfMapTrack.h"
}
}
+
+void AliL3ConfMapper::InitVolumes()
+{
+ //Data organization.
+ //Allocate volumes, set conformal coordinates and pointers.
+
+ //Should be done after setting the track parameters
+
+ fNumRowSegmentPlusOne = 176;//NumRows[0]; //Maximum 32.
+ fNumPhiSegmentPlusOne = fNumPhiSegment+1;
+ fNumEtaSegmentPlusOne = fNumEtaSegment+1;
+ fNumPhiEtaSegmentPlusOne = fNumPhiSegmentPlusOne*fNumEtaSegmentPlusOne;
+ fBounds = fNumRowSegmentPlusOne * fNumPhiSegmentPlusOne * fNumEtaSegmentPlusOne;
+
+ //Allocate volumes:
+ if(fVolume) delete [] fVolume;
+ if(fRow) delete [] fRow;
+
+ LOG(AliL3Log::kInformational,"AliL3ConfMapper::InitVolumes","Memory")<<AliL3Log::kDec<<
+ "Allocating "<<fBounds*sizeof(AliL3ConfMapContainer)<<" Bytes to fVolume"<<ENDLOG;
+ LOG(AliL3Log::kInformational,"AliL3ConfMapper::InitVolumes","Memory")<<AliL3Log::kDec<<
+ "Allocating "<<fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer)<<" Bytes to fRow"<<ENDLOG;
+
+ fVolume = new AliL3ConfMapContainer[fBounds];
+ fRow = new AliL3ConfMapContainer[fNumRowSegmentPlusOne];
+
+ 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;
+
+ if(fHit)
+ delete [] fHit;
+ if(fTrack)
+ delete fTrack;
+
+ fHit = new AliL3ConfMapPoint[max_num_of_hits];
+ fTrack = new AliL3TrackArray("AliL3ConfMapTrack",max_num_of_tracks);
+}
void AliL3ConfMapper::InitSector(Int_t sector,Int_t *rowrange,Float_t *etarange)
{
//rowrange[0]=innermost row;
//rowrange[1]=outermostrow;
//Finally you can specify etaslices to save time (assuming a good seed from TRD...)
-
- if(fHit)
- {
- delete [] fHit;
- }
-
- if(fTrack)
- {
- delete fTrack;
- }
-
+
//Define tracking area:
if(rowrange)
{
fPhiMin = -1.*10/todeg;//fParam->GetAngle(sector) - 10/todeg;
fPhiMax = 10/todeg;//fParam->GetAngle(sector) + 10/todeg;
- //rotation angles for sector 2:
- //cos: 0.766044 sin: 0.642788
-
- Int_t max_num_of_tracks = 3000;
- Int_t max_num_of_hits = 150000;
-
- fHit = new AliL3ConfMapPoint[max_num_of_hits];
- fTrack = new AliL3TrackArray("AliL3ConfMapTrack",max_num_of_tracks);
-
nTracks=0;
fMainVertexTracks = 0;
fClustersUnused = 0;
fNumRowSegment = fRowMax - fRowMin; //number of rows to be considered by tracker
LOG(AliL3Log::kInformational,"AliL3ConfMapper::InitSector","B-field")
<<"Tracker initializing assuming magnetic field of "<<BField<<ENDLOG;
+
+ fTrack->Reset();
}
{
Int_t nhit=(Int_t)count;
for (Int_t i=0;i<nhit;i++)
- fHit[i].ReadHits(&(hits[i]));
+ {
+ fHit[i].Reset();
+ fHit[i].ReadHits(&(hits[i]));
+ }
fClustersUnused += nhit;
- LOG(AliL3Log::kInformational,"AliL3ConfMapper::ReadHits","#hits")<<AliL3Log::kDec
- <<"hit_counter: "<<nhit<<" count: "<<count<<ENDLOG;
-
+ LOG(AliL3Log::kInformational,"AliL3ConfMapper::ReadHits","#hits")
+ <<AliL3Log::kDec<<"hit_counter: "<<nhit<<" count: "<<count<<ENDLOG;
+
return true;
}
void AliL3ConfMapper::SetPointers()
{
- //Data organization.
- //Allocate volumes, set conformal coordinates and pointers.
- fNumRowSegmentPlusOne = 176;//fNumRowSegment+1;
- fNumPhiSegmentPlusOne = fNumPhiSegment+1;
- fNumEtaSegmentPlusOne = fNumEtaSegment+1;
- fNumPhiEtaSegmentPlusOne = fNumPhiSegmentPlusOne*fNumEtaSegmentPlusOne;
- fBounds = fNumRowSegmentPlusOne * fNumPhiSegmentPlusOne * fNumEtaSegmentPlusOne;
-
- //Allocate volumes:
- if(fVolume) delete [] fVolume;
- if(fRow) delete [] fRow;
-
- LOG(AliL3Log::kInformational,"AliL3ConfMapper::SetPointers","Memory")<<AliL3Log::kDec<<
- "Allocating "<<fBounds*sizeof(AliL3ConfMapContainer)<<" Bytes to fVolume"<<ENDLOG;
- LOG(AliL3Log::kInformational,"AliL3ConfMapper::SetPointers","Memory")<<AliL3Log::kDec<<
- "Allocating "<<fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer)<<" Bytes to fRow"<<ENDLOG;
- fVolume = new AliL3ConfMapContainer[fBounds];
- fRow = new AliL3ConfMapContainer[fNumRowSegmentPlusOne];
-
- //set volumes to zero:
+ //Reset detector volumes
memset(fVolume,0,fBounds*sizeof(AliL3ConfMapContainer));
memset(fRow,0,fNumRowSegmentPlusOne*sizeof(AliL3ConfMapContainer));
Float_t phiSlice = (fPhiMax-fPhiMin)/fNumPhiSegment;
Float_t etaSlice = (fEtaMax-fEtaMin)/fNumEtaSegment;
-
+
Int_t volumeIndex;
Int_t local_counter=0;
for(Int_t j=0; j<fClustersUnused; j++)
Int_t localrow = thisHit->GetPadRow();
- //reset pointers:
- thisHit->nextVolumeHit=thisHit->nextRowHit=0;
-
if(localrow < fRowMin || localrow > fRowMax)
continue;
-
//Get indexes:
thisHit->phiIndex=(Int_t)((thisHit->GetPhi()-fPhiMin)/phiSlice +1);
continue;
}
local_counter++;
-
- //set volume pointers
- volumeIndex = localrow*fNumPhiEtaSegmentPlusOne+thisHit->phiIndex*fNumEtaSegmentPlusOne+thisHit->etaIndex;
+
+ volumeIndex = (localrow-fRowMin)*fNumPhiEtaSegmentPlusOne+thisHit->phiIndex*fNumEtaSegmentPlusOne+thisHit->etaIndex;
+
if(fVolume[volumeIndex].first == NULL)
fVolume[volumeIndex].first = (void *)thisHit;
else
- ((AliL3ConfMapPoint *)fVolume[volumeIndex].last)->nextVolumeHit=thisHit;
+ ((AliL3ConfMapPoint *)fVolume[volumeIndex].last)->nextVolumeHit=thisHit;
fVolume[volumeIndex].last = (void *)thisHit;
//set row pointers
- if(fRow[localrow].first == NULL)
- fRow[localrow].first = (void *)thisHit;
+ if(fRow[(localrow-fRowMin)].first == NULL)
+ fRow[(localrow-fRowMin)].first = (void *)thisHit;
else
- ((AliL3ConfMapPoint *)(fRow[localrow].last))->nextRowHit = thisHit;
- fRow[localrow].last = (void *)thisHit;
-
+ ((AliL3ConfMapPoint *)(fRow[(localrow-fRowMin)].last))->nextRowHit = thisHit;
+ fRow[(localrow-fRowMin)].last = (void *)thisHit;
+
+
}
if(fClustersUnused>0 && local_counter==0)
LOG(AliL3Log::kError,"AliL3ConfMapper::SetPointers","Parameters")
<<AliL3Log::kDec<<"No points passed to track finder, hits out of range: "
<<fEtaHitsOutOfRange+fPhiHitsOutOfRange<<ENDLOG;
-
+
+ LOG(AliL3Log::kInformational,"AliL3ConfMapper::SetPointers","Setup")
+ <<"Setup finished, hits out of range: "<<fEtaHitsOutOfRange+fPhiHitsOutOfRange
+ <<" hits accepted "<<fClustersUnused<<ENDLOG;
}
void AliL3ConfMapper::MainVertexTracking_a()
return;
}
-
+ Double_t initCpuTime,cpuTime;
+ initCpuTime = CpuTime();
SetPointers();
SetVertexConstraint(true);
+ cpuTime = CpuTime() - initCpuTime;
+ if(fBench)
+ LOG(AliL3Log::kInformational,"AliL3ConfMapper::MainVertexTracking_a","Timing")
+ <<AliL3Log::kDec<<"Setup finished in "<<cpuTime*1000<<" ms"<<ENDLOG;
+
}
void AliL3ConfMapper::MainVertexTracking_b()
"Tracking parameters not set!"<<ENDLOG;
return;
}
-
+ Double_t initCpuTime,cpuTime;
+ initCpuTime = CpuTime();
+
ClusterLoop();
+
+ cpuTime = CpuTime() - initCpuTime;
+ if(fBench)
+ LOG(AliL3Log::kInformational,"AliL3ConfMapper::MainVertexTracking_b","Timing")
+ <<AliL3Log::kDec<<"Main Tracking finished in "<<cpuTime*1000<<" ms"<<ENDLOG;
}
void AliL3ConfMapper::MainVertexTracking()
if(fBench)
LOG(AliL3Log::kInformational,"AliL3ConfMapper::MainVertexTracking","Timing")<<AliL3Log::kDec<<
"Tracking finished in "<<cpuTime*1000<<" ms"<<ENDLOG;
-
+
return;
}
for(row_segm = fRowMax; row_segm >= lastrow; row_segm--)
{
- if(fRow[row_segm].first && ((AliL3ConfMapPoint*)fRow[row_segm].first)->GetPadRow() < fRowMin + 1)
+ if(fRow[(row_segm-fRowMin)].first && ((AliL3ConfMapPoint*)fRow[(row_segm-fRowMin)].first)->GetPadRow() < fRowMin + 1)
break;
- for(hit = (AliL3ConfMapPoint*)fRow[row_segm].first; hit!=0; hit=hit->nextRowHit)
+ for(hit = (AliL3ConfMapPoint*)fRow[(row_segm-fRowMin)].first; hit!=0; hit=hit->nextRowHit)
{
if(hit->GetUsage() == true)
continue;
if(TrackletAngle(track) > fMaxAngleTracklet[fVertexConstraint])
{//proof if the first points seem to be a beginning of a track
-
track->SetProperties(false);
track->DeleteCandidate();
fTrack->RemoveLast();
continue;//segment exceeds bounds->skip it
//loop over hits in this sub segment:
- volumeIndex= sub_row_segm*fNumPhiEtaSegmentPlusOne +
+ volumeIndex= (sub_row_segm-fRowMin)*fNumPhiEtaSegmentPlusOne +
sub_phi_segm*fNumEtaSegmentPlusOne + sub_eta_segm;
if(volumeIndex<0)
Double_t AliL3ConfMapper::CpuTime()
{
//Return the Cputime in seconds.
-
- return (Double_t)(clock()) / CLOCKS_PER_SEC;
+ struct timeval tv;
+ gettimeofday( &tv, NULL );
+ return tv.tv_sec+(((Double_t)tv.tv_usec)/1000000.);
+ //return (Double_t)(clock()) / CLOCKS_PER_SEC;
}
<<"TPC version "<<ver<<" does not match."<<ENDLOG;
Int_t *count = new Int_t[np]; //np number of particles.
Int_t i;
+ Float_t xyz[3];
for (i=0; i<np; i++) count[i]=0;
for(Int_t sl=slice[0]; sl<=slice[1]; sl++)
{
do {
Int_t it=fDigits->CurrentRow(), ip=fDigits->CurrentColumn();
Short_t dig = fDigits->GetDigit(it,ip);
+
+ if(dig<=fParam->GetZeroSup()) continue;
+ if(it < fParam->GetMaxTBin()-1 && it > 0)
+ if(fDigits->GetDigit(it+1,ip) <= fParam->GetZeroSup()
+ && fDigits->GetDigit(it-1,ip) <= fParam->GetZeroSup())
+ continue;
+
+ fTransform->Raw2Local(xyz,sec,row,ip,it);
+ if(fParam->GetPadRowRadii(sec,row)<230./250.*fabs(xyz[2]))
+ continue;
+
Int_t idx0=fDigits->GetTrackID(it,ip,0);
Int_t idx1=fDigits->GetTrackID(it,ip,1);
Int_t idx2=fDigits->GetTrackID(it,ip,2);
//printf("Checking particle %d with code %d\n",i,p->GetPdgCode());
if (p->GetFirstMother()>=0) continue; //secondary particle
- if (good[i] < good_number) continue;
+ if (good[i] < good_number || good[i]>176) continue;
if (p->Pt()<fMinGoodPt) continue;
if (TMath::Abs(p->Pz()/p->Pt())>0.999) continue;
printf("Found good particle %d, nHits %d\n",i,good[i]);
Int_t slice[2] = {fMinSlice,fMaxSlice};
DefineGoodTracks(slice,row,good_number,fname);
AssignIDs();
- CreateHistos(20,0,5);
+ CreateHistos(5,0,2);
printf("filling histos\n");
FillEffHistos();
printf("done fillling\n");
UInt_t *hitnum = track->GetHitNumbers();
UInt_t id;
- Int_t **trackID = GetClusterIDs(track);
+ //Int_t **trackID = GetClusterIDs(track);
Int_t lab=123456789;
for (i=0; i<num_of_clusters; i++)
}
//Get the label of the cluster:
- //printf("label %d %d %d\n",trackID[i][0],trackID[i][1],trackID[i][2]);
- lab=abs(trackID[i][0]);
+
+ lab=abs(points[pos].fTrackID[0]);
Int_t j;
for (j=0; j<num_of_clusters; j++)
if (s[j].lab==lab || s[j].max==0) break;
continue;
}
- if (abs(trackID[i][1]) == lab ||
- abs(trackID[i][2]) == lab ) max++;
+ if (abs(points[pos].fTrackID[1]) == lab ||
+ abs(points[pos].fTrackID[2]) == lab ) max++;
}
//check if more than 10% of the clusters are incorrectly assigned (fake track):
return -lab;
}
- for(Int_t j=0; j<track->GetNumberOfPoints(); j++)
- delete [] trackID[j];
- delete [] trackID;
return lab;
}
fFakeTrackEffEta = new TH1F("fFakeTrackEffEta","Efficiency for fake tracks vs eta",20,-50,50);
printf("finished creating histos\n");
}
-
+/*
void AliL3Evaluate::FillEffHistos()
{
//Fill the efficiency histograms.
-
+
for(Int_t i=0; i<fGoodGen; i++)
{
Double_t ptg=fGoodTracks[i].pt,pzg=fGoodTracks[i].pz;
Float_t dipangle=TMath::ATan2(pzg,ptg)*180./TMath::Pi();
- printf("filling particle with pt %f and dipangle %f\n",ptg,dipangle);
+ //printf("filling particle with pt %f and dipangle %f\n",ptg,dipangle);
fNGoodTracksPt->Fill(ptg);
fNGoodTracksEta->Fill(dipangle);
Int_t found = 0;
Int_t tracklabel;
tracklabel = track->GetMCid();
- printf("evaluating track id %d\n",tracklabel);
+ //printf("evaluating track id %d\n",tracklabel);
if(TMath::Abs(tracklabel) != fGoodTracks[i].label) continue;
found=1;
if(tracklabel == fGoodTracks[i].label) {fNFoundTracksPt->Fill(ptg); fNFoundTracksEta->Fill(dipangle);}
}
}
}
+*/
+void AliL3Evaluate::FillEffHistos()
+{
+ //Fill the efficiency histograms.
+
+ cout<<endl<<"Note: Doing NAIVE evaluation "<<endl;
+ for(Int_t i=0; i<fGoodGen; i++)
+ {
+ Double_t ptg=fGoodTracks[i].pt,pzg=fGoodTracks[i].pz;
+ Float_t dipangle=TMath::ATan2(pzg,ptg)*180./TMath::Pi();
+ //printf("filling particle with pt %f and dipangle %f\n",ptg,dipangle);
+ fNGoodTracksPt->Fill(ptg);
+ fNGoodTracksEta->Fill(dipangle);
+
+ }
+
+ for(Int_t k=0; k<fTracks->GetNTracks(); k++)
+ {
+ AliL3Track *track = fTracks->GetCheckedTrack(k);
+ if(!track) continue;
+ Int_t nHits = track->GetNumberOfPoints();
+ if(nHits < fMinPointsOnTrack) break;
+ if(track->GetPt()<fMinGoodPt) continue;
+ if(fabs(track->GetPseudoRapidity())>0.9) continue;
+
+ fNFoundTracksPt->Fill(track->GetPt()); fNFoundTracksEta->Fill(track->GetPseudoRapidity());
+ //Float_t pt=track->GetPt();
+ //fPtRes->Fill((pt-ptg)/ptg*100.);
+ //fNtuppel->Fill(ptg,pt,nHits);
+
+ }
+}
void AliL3Evaluate::CalcEffHistos(){
LOG(AliL3Log::kInformational,"AliL3Evaluate::FillEffHistos","Efficiency")
<<AliL3Log::kDec<<"Fake tracks relative is about "<<nfake/ngood*100<<ENDLOG;
+ LOG(AliL3Log::kInformational,"AliL3Evaluate::FillEffHistos","Efficiency")
+ <<AliL3Log::kDec<<"Naive efficiency "<<(Double_t)fGoodFound/(Double_t)fGoodGen<<ENDLOG;
+
+
fNFoundTracksPt->Sumw2(); fNGoodTracksPt->Sumw2();
fTrackEffPt->Divide(fNFoundTracksPt,fNGoodTracksPt,1,1.,"b");
fFakeTrackEffPt->Divide(fNFakeTracksPt,fNGoodTracksPt,1,1.,"b");
//The input file to this function, contains the exact clusters calculated
//in AliTPC::Hits2ExactClusters.
-
+ cout<<"Evaluating points"<<endl;
TNtuple *ntuppel = new TNtuple("ntuppel","residuals","slice:padrow:resy:resz:zHit:pt");
- TFile *exfile = new TFile(rootfile);
-
+ TFile *exfile = TFile::Open(rootfile);
+ if(!exfile)
+ {
+ cerr<<"Error opening rootfile "<<rootfile<<endl;
+ return 0;
+ }
+
AliTPCParam *param = (AliTPCParam*)exfile->Get("75x40_100x60");
//Get the exact clusters from file:
Bool_t clusterok = arr->ConnectTree(treeName);//Segment Tree (for offline clusters)
if(!clusterok) {printf("AliL3Evaluate::EvaluatePoints : Error in clusterloading\n"); return 0;}
+ cout<<"Entering loop with "<<(Int_t)arr->GetTree()->GetEntries()<<endl;
for(Int_t i=0; i<arr->GetTree()->GetEntries(); i++)
{
//Get the exact clusters for this row:
return ntuppel;
}
-/*
-TNtuple *AliL3Evaluate::EvaluateGEANT()
+
+void AliL3Evaluate::GetCFeff(Char_t *outfile)
{
- TNtuple *ntuppel = new TNtuple("ntuppel","residuals","resy:ptgen:padrow:zHit:slice");
- Int_t good_number=175;
- Int_t row[2] = {0,175};
-
- Float_t xyz_cross[3];
- Float_t xyz_cl[3];
+ TNtuple *ntuppel = new TNtuple("ntuppel","Cluster finder efficiency","row:ncrossings:nclusters");
+
+ AliTPC *TPC = (AliTPC*)gAlice->GetDetector("TPC");
+
+ TPC->SetParam(fParam);
- for(Int_t slice=fMinSlice; slice<=fMaxSlice; slice++)
+ Int_t ver = TPC->IsVersion();
+ LOG(AliL3Log::kInformational,"AliL3Evaluate::DefineGoodTracks","TPC version")
+ <<"TPC version "<<ver<<" found on file"<<ENDLOG;
+
+ Int_t zero=TPC->GetParam()->GetZeroSup();
+
+ Int_t np = gAlice->GetNtrack();
+
+ Int_t crossed,recs;
+ Int_t *count = new Int_t[np]; //np number of particles.
+ Int_t i;
+ Float_t xyz[3];
+ for (i=0; i<np; i++) count[i]=0;
+ for(Int_t sl=fMinSlice; sl<=fMaxSlice; sl++)
{
- Int_t *particle_id = new Int_t[fParticles->GetEntriesFast()];
- TObjArray *good_particles = DefineGoodTracks(slice,row,good_number,particle_id);
-
- if(fMCclusterfile)
+ for (i=0; i<=175; i++)
{
- fMCclusterfile->Close();
- delete fMCclusterfile;
- fMCclusterfile = new TFile("/nfs/david/subatom/alice/data/V3.04/fast/clusters/hg_8k_v0_s1-3_e0_cl.root");
- fMCclusterfile->cd();
- }
- AliTPCClustersArray arr;
- arr.Setup(fParam);
- arr.SetClusterType("AliTPCcluster");
- Bool_t clusterok = arr.ConnectTree("Segment Tree");
- if(!clusterok)
- LOG(AliL3Log::kError,"AliL3Evaluate::DefineGoodTracks","Cluster Array")
- <<"Error loading clusters from rootfile"<<ENDLOG;
-
- for(Int_t ci=0; ci<arr.GetTree()->GetEntries(); ci++)
- {
- Int_t sec,row,sl,lr;
- AliSegmentID *s = arr.LoadEntry(ci);
- fParam->AdjustSectorRow(s->GetID(),sec,row);
- fTransform->Sector2Slice(sl,lr,sec,row);
- if(sl != slice) {arr.ClearRow(sec,row); continue;}
- //if(lr!=pr) {carray.ClearRow(sec,row); continue;}
- AliTPCClustersRow *cRow = arr.GetRow(sec,row);
- printf("evaluating slice %d row %d\n",slice,lr);
- for(Int_t j=0; j<cRow->GetArray()->GetEntriesFast(); j++)
+ crossed=0;
+ recs=0;
+ Int_t index = fRowid[sl][i];
+ if (!fDigitsTree->GetEvent(index)) continue;
+ Int_t sec,row;
+ fParam->AdjustSectorRow(fDigits->GetID(),sec,row);
+ fDigits->First();
+ do {
+ Int_t it=fDigits->CurrentRow(), ip=fDigits->CurrentColumn();
+ Short_t dig = fDigits->GetDigit(it,ip);
+
+ if(dig<=fParam->GetZeroSup()) continue;
+ if(it < fParam->GetMaxTBin()-1 && it > 0)
+ if(fDigits->GetDigit(it+1,ip) <= fParam->GetZeroSup()
+ && fDigits->GetDigit(it-1,ip) <= fParam->GetZeroSup())
+ continue;
+
+ fTransform->Raw2Local(xyz,sec,row,ip,it);
+ if(fParam->GetPadRowRadii(sec,row)<230./250.*fabs(xyz[2]))
+ continue;
+
+
+ Int_t idx0=fDigits->GetTrackID(it,ip,0);
+ Int_t idx1=fDigits->GetTrackID(it,ip,1);
+ Int_t idx2=fDigits->GetTrackID(it,ip,2);
+
+ if (idx0>=0 && dig>=zero) count[idx0]+=1;
+ if (idx1>=0 && dig>=zero) count[idx1]+=1;
+ if (idx2>=0 && dig>=zero) count[idx2]+=1;
+ } while (fDigits->Next());
+
+ for (Int_t j=0; j<np; j++)
{
-
- AliTPCcluster *cluster=(AliTPCcluster*)(*cRow)[j];
- xyz_cl[1] = cluster->GetY();
- xyz_cl[2] = cluster->GetZ();
- Int_t lab=cluster->GetLabel(0);
- if(lab<0) continue;
-
- for(Int_t pa=0; pa<good_particles->GetEntriesFast(); pa++)
- {
- if(particle_id[pa]!=lab) continue;
- TParticle *part = (TParticle*)good_particles->UncheckedAt(pa);
- GetParticleCrossingPoint(part,slice,lr,xyz_cross);
- Double_t yres = xyz_cl[1] - xyz_cross[1];
- ntuppel->Fill(yres,part->Pt(),lr,xyz_cl[2],slice);
- }
+ if (count[j]>1) //at least two digits at this padrow
+ crossed++;
+ count[j]=0;
+ }
+ AliL3SpacePointData *points = fClusters[sl][0];
+ for(Int_t l=0; l<fNcl[sl][0]; l++)
+ {
+ if(points[l].fPadRow != i) continue;
+ recs++;
}
- if(arr.GetRow(sec,row))
- arr.ClearRow(sec,row);
+ ntuppel->Fill(i,crossed,recs);
}
- delete [] particle_id;
- delete good_particles;
}
- return ntuppel;
+ delete[] count;
+
+ TFile *file = TFile::Open(outfile,"RECREATE");
+ ntuppel->Write();
+ file->Close();
+
}
-*/
+
Bool_t AliL3Evaluate::GetParticleCrossingPoint(TParticle *part,Int_t slice,Int_t padrow,Float_t *xyz)
{
//Calcluate the crossing point between a generated particle and given padrow.