Skip to content

Commit

Permalink
additional data members added (Johannes)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed May 12, 2015
1 parent 0995bdb commit 825d89e
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 32 deletions.
99 changes: 72 additions & 27 deletions ITS/UPGRADE/FT2/FT2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ FTProbe::FTProbe()
,fProbeChi2ITS(0)
,fIsDecayed(0)
,fIsAbsorbed(0)
,fDecayRadius(0)
,fAbsorbtionRadius(0)
,fTrackToClusterChi2CutITS(0)
{
// def. c-tor
}
Expand Down Expand Up @@ -108,12 +111,20 @@ fITSRec(0)
const double accAmp[kMaxITSLr] = {0.017,0.013,0.013,0.014,0.016,0.015,0.015};
const double accSigY[kMaxITSLr] = { 9e-2, 9e-2, 9e-2, 9e-2, 9e-2, 9e-2, 9e-2};
const double accSigZ[kMaxITSLr] = { 9e-2, 9e-2, 9e-2, 9e-2, 9e-2, 9e-2, 9e-2};
//
float c0tr2clChi2[7] = {20,25,30,40,45,45,70}; // cut on cluster to track chi2
float c0gloChi2[7] = {6,10,20,30,60,60,70}; // cut on seed global norm chi2
float c0missPen[7] = {2.,2.,2.,2.,2.,2.,2.}; // missing cluster penalty

for (int i=0;i<kMaxITSLr;i++) {
fNCorrelITSFakes[i] = accAmp[i]; // integral of accompanying hits
fCorrelITSFakesSigY[i] = accSigY[i]; // width in rphi
fCorrelITSFakesSigZ[i] = accSigZ[i]; // width in z
fNCorrelITSFakes[i] = accAmp[i]; // integral of accompanying hits
fCorrelITSFakesSigY[i] = accSigY[i]; // width in rphi
fCorrelITSFakesSigZ[i] = accSigZ[i]; // width in z
fC0tr2clChi2[i] = c0tr2clChi2[i]; // cut on cluster to track chi2
fC0gloChi2[i] = c0gloChi2[i]; // cut on seed global norm chi2
fC0missPen[i] = c0missPen[i]; // missing cluster penalty

}
//
}

//________________________________________________
Expand Down Expand Up @@ -358,6 +369,10 @@ Bool_t FT2::ProcessTrack(TParticle* part, AliVertex* vtx)
#endif
return kFALSE;
}

// check if tracks are rejected by ITS chi2 per layer
fProbe.fTrackToClusterChi2CutITS = CutOnTrackToClusterChi2ITS();

//
// go to innermost radius of ITS (including beam pipe)
if (!PropagateToR(fITS->GetRMin(),-1, kTRUE, kFALSE, kTRUE)) {
Expand All @@ -381,13 +396,13 @@ Bool_t FT2::ProcessTrack(TParticle* part, AliVertex* vtx)
}
#endif

fProbe.fProbeNClTPC = fNClTPC;
fProbe.fProbeNClITS = fNClITS;
fProbe.fProbeNClITSFakes = fNClITSFakes;
fProbe.fProbeNClTPC = fNClTPC;
fProbe.fProbeNClITS = fNClITS;
fProbe.fProbeNClITSFakes = fNClITSFakes;
fProbe.fProbeITSPatternFake = fITSPatternFake;
fProbe.fProbeITSPattern = fITSPattern;
fProbe.fProbeChi2TPC = fChi2TPC;
fProbe.fProbeChi2ITS = fChi2ITS;
fProbe.fProbeITSPattern = fITSPattern;
fProbe.fProbeChi2TPC = fChi2TPC;
fProbe.fProbeChi2ITS = fChi2ITS;
//
/*
printf("Tracking done: NclITS: %d (chi2ITS=%.3f) NclTPC: %3d (chi2TPC=%.3f)\n",fNClITS,fChi2ITS,fNClTPC,fChi2TPC);
Expand Down Expand Up @@ -418,6 +433,24 @@ Bool_t FT2::InitProbe(TParticle* part)
fChi2TPC = fChi2ITS = 0;
fDCA[0] = fDCA[1] = fDCACov[0] = fDCACov[1] = fDCACov[2] = 0.;
//
Int_t pdgCode = part->GetPdgCode();
TParticlePDG* pdgp = TDatabasePDG::Instance()->GetParticle(pdgCode);
Double_t charge = pdgp->Charge();
fProbe.fProbeMass = pdgp->Mass();
fProbe.fAbsPdgCode = TMath::Abs(pdgCode);
fProbe.fPdgCode = pdgCode;
fProbe.fTrueMass = fProbe.fProbeMass;
//
fProbe.fProbeNClTPC = fNClTPC;
fProbe.fProbeNClITS = fNClITS;
fProbe.fProbeNClITSFakes = fNClITSFakes;
fProbe.fProbeITSPatternFake = fITSPatternFake;
fProbe.fProbeITSPattern = fITSPattern;
fProbe.fProbeChi2TPC = fChi2TPC;
fProbe.fProbeChi2ITS = fChi2ITS;
fProbe.fIsDecayed = fProbe.fIsAbsorbed = 0;
fProbe.fTrackToClusterChi2CutITS = 0;
//
// Calculate alpha: the rotation angle of the corresponding local system (TPC sector)
alpha = part->Phi()*180./TMath::Pi();
if (alpha<0) alpha+= 360.;
Expand All @@ -439,21 +472,6 @@ Bool_t FT2::InitProbe(TParticle* part)
// X of the referense plane
xref = ver.X();

Int_t pdgCode = part->GetPdgCode();
TParticlePDG* pdgp = TDatabasePDG::Instance()->GetParticle(pdgCode);
Double_t charge = pdgp->Charge();
fProbe.fProbeMass = pdgp->Mass();
fProbe.fAbsPdgCode = TMath::Abs(pdgCode);
fProbe.fPdgCode = pdgCode;
fProbe.fTrueMass = fProbe.fProbeMass;

fProbe.fProbeNClTPC = fNClTPC;
fProbe.fProbeNClITS = fNClITS;
fProbe.fProbeNClITSFakes = fNClITSFakes;
fProbe.fProbeITSPatternFake = fITSPatternFake;
fProbe.fProbeITSPattern = fITSPattern;
fProbe.fProbeChi2TPC = fChi2TPC;
fProbe.fProbeChi2ITS = fChi2ITS;
//
param[0] = ver.Y();
param[1] = ver.Z();
Expand Down Expand Up @@ -484,16 +502,22 @@ Int_t FT2::ProbeDecayAbsorb(double* posIni)
#if DEBUG>5
printf("New step length %.2f from XYZ= %+.2f %+.2f %+.2f\n",dist,posIni[0],posIni[1],posIni[2]);
#endif
//
//
if(gRandom->Rndm()<ParticleDecayProbability(dist)) {
fProbe.fIsDecayed=kTRUE;
return 1;
fProbe.fIsAbsorbed=kFALSE;
fProbe.fDecayRadius=TMath::Sqrt(posIni[0]*posIni[0]+posIni[1]*posIni[1]);
return 1;
}
if(gRandom->Rndm()<ParticleAbsorptionProbability(params[4],params[0],params[2],params[3])){
fProbe.fIsDecayed=kFALSE;
fProbe.fIsAbsorbed=kTRUE;
fProbe.fAbsorbtionRadius=TMath::Sqrt(posIni[0]*posIni[0]+posIni[1]*posIni[1]);
return -1;
}
for (int j=3;j--;) posIni[j] = posCurr[j];
fProbe.fIsAbsorbed = fProbe.fIsDecayed = 0;
fProbe.fAbsorbtionRadius = fProbe.fDecayRadius = 0;
return 0;
//
}
Expand Down Expand Up @@ -1359,6 +1383,7 @@ Int_t FT2::ReconstructOnITSLayer(int ilr, double chi2Cut)
//
if (winOK<0) return 0; // no update on this layer
double chiw = UpdateKalman(&fProbe,yzw[0],yzw[1],fSigYITS,fSigZITS,kTRUE,fITSerrSclY,fITSerrSclZ);
fProbe.chiwITS[ilr]=chiw;
#if DEBUG>5
AliInfoF("Updated at ITS Lr%d, chi2:%f NclITS:%d Fakes: %d",ilr,chiw,fNClITS,fNClITSFakes);
#endif
Expand Down Expand Up @@ -1541,3 +1566,23 @@ Double_t FT2::ParticleAbsorptionProbability(Double_t length,Double_t rho, Double
return (1.-TMath::Exp(-length*rho/lambda));

}
//_________________________________________________________
Int_t FT2::CutOnTrackToClusterChi2ITS(){

float gloChi2 = 0, penalty=0;
int ncl=0;

Int_t accept = 8;
for (int ilr=7;ilr--;) {
if (fProbe.chiwITS[ilr]<0){penalty+=fC0missPen[ilr];}
else {
if (fProbe.chiwITS[ilr]>fC0tr2clChi2[ilr]) {accept = ilr; break;}
gloChi2 += fProbe.chiwITS[ilr];
ncl++;
}
int ndf = TMath::Max(2*ncl-5,1);
float gloChi2norm = gloChi2/ndf + penalty;
if (gloChi2norm>fC0gloChi2[ilr]) {accept = ilr; break;}
}
return accept;
}
21 changes: 16 additions & 5 deletions ITS/UPGRADE/FT2/FT2.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class FTProbe : public AliExternalTrackParam
virtual Double_t GetTPCsignal() const {return fTPCSignal;}
virtual UShort_t GetTPCsignalN() const {return fTPCSignalN;}
virtual Int_t GetTPCTrackingPID() const {return fAbsPdgCodeForTracking;}
virtual Double_t GetDecayInfo() const {return fIsDecayed;}
virtual Double_t GetAbsorbtionInfo() const {return fIsAbsorbed;}

virtual void GetInnerTrackParam(Double_t iTP[7]) const {
for(Int_t i=0;i<7;i++){
iTP[i]=fInnerTrackParameters[i];
Expand All @@ -53,10 +56,13 @@ class FTProbe : public AliExternalTrackParam
Int_t fProbeITSPatternFake; // fakes pattern for ITS
Int_t fProbeITSPattern; // pattern for ITS clusters
Double_t fProbeChi2TPC; // total chi2 in TPC
Double_t fProbeChi2ITS; // total chi2 in ITS
Bool_t fIsDecayed; // is particle decayed?
Bool_t fIsAbsorbed; // is particle absorbed?

Double_t fProbeChi2ITS; // total chi2 in ITS
Bool_t fIsDecayed; // is particle decayed?
Bool_t fIsAbsorbed; // is particle absorbed?
Double_t fDecayRadius; // radius when particle decayed
Double_t fAbsorbtionRadius; // radius when particle was absorbed
Int_t fTrackToClusterChi2CutITS; // is particle rejected by ITS track to cluster chi2?
Double_t chiwITS[7]; // chi2 for each layer of the ITS

ClassDef(FTProbe,1)
};
Expand Down Expand Up @@ -150,6 +156,7 @@ class FT2 : public TObject
Double_t ParticleDecayProbability(Double_t step);
Double_t ParticleAbsorptionProbability(Double_t length,Double_t rho, Double_t A, Double_t Z);
//
Int_t CutOnTrackToClusterChi2ITS();
protected:
void AddTPC(Float_t sigY=0.1, Float_t sigZ=0.1, Float_t eff=1.00, Float_t scEdge=2.6); // eff=0.99
void AddTPCLayer(Int_t rowID, Float_t x, Float_t x2x0,Float_t sigY, Float_t sigZ, Float_t eff);
Expand Down Expand Up @@ -196,7 +203,7 @@ class FT2 : public TObject
//Double_t fProbeMass; // probe mass
Double_t fBz; // bz
Bool_t fSimMat; // simulate material effects in probe preparation
Bool_t fAllowDecay; // necessary for standlone FT2 mode
Bool_t fAllowDecay; // necessary for standlone FT2 mode
Int_t fCurrITSLr; //! current ITS layer under tracking
Int_t fNClTPC; //! N used TPC clusters
Int_t fNClITS; //! N used ITS clusters
Expand Down Expand Up @@ -226,6 +233,10 @@ class FT2 : public TObject
Double_t fCorrelITSFakesSigY[kMaxITSLr]; // their width in Y
Double_t fCorrelITSFakesSigZ[kMaxITSLr]; // their width in Z
//
Float_t fC0tr2clChi2[kMaxITSLr]; // cut on cluster to track chi2
Float_t fC0gloChi2[kMaxITSLr]; // cut on seed global norm chi2
Float_t fC0missPen[kMaxITSLr]; // missing cluster penalty
//
static float fgMaxStepTGeo; // max step for tracking accounting for TGeo materials

ClassDef(FT2,1)
Expand Down

0 comments on commit 825d89e

Please sign in to comment.