Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions src/DetectorK/DetectorK.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,13 @@ void DetectorK::AddTPC(Float_t phiResMean, Float_t zResMean, Int_t skip) {
// skip=1: Use every padrow, skip=2: Signal in every 2nd padrow


AddLayer((char*)"tpcIFC", 77.8, 0.01367); // Inner Field cage
AddLayer((char*)"tpcOFC", 254.0, 0.01367); // Outer Field cage
AddLayer((char*)"tpcIFC", 77.8, 9.279967e-02, 3.325701e+00); // Inner Field cage
AddLayer((char*)"tpcOFC", 254.0, 9.279967e-02, 3.325701e+00); // Outer Field cage

// % Radiation Lengths ... Average per TPC row (i.e. total/159 )
const int kNPassiveBound = 2;
const Float_t radLBoubdary[kNPassiveBound] = {0.05, 0.0165};
const Float_t radLBoundary[kNPassiveBound] = {1.692612e-01, 8.711904e-02};
const Float_t xrhoBoundary[kNPassiveBound] = {6.795774e+00, 3.111401e+00};
const Float_t rBoundary[kNPassiveBound] = {50, 70.0}; // cm

Float_t radLPerRow = 0.000036;
Expand All @@ -551,7 +552,7 @@ void DetectorK::AddTPC(Float_t phiResMean, Float_t zResMean, Int_t skip) {

// add boundaries between ITS and TPC
for (int i=0;i<kNPassiveBound;i++) {
AddLayer(Form("tpc_boundary%d",i),rBoundary[i],radLBoubdary[i]); // dummy errors
AddLayer(Form("tpc_boundary%d",i),rBoundary[i],radLBoundary[i], xrhoBoundary[i]); // dummy errors
}

for ( Int_t k = 0 ; k < tpcRows ; k++ ) {
Expand All @@ -565,9 +566,9 @@ void DetectorK::AddTPC(Float_t phiResMean, Float_t zResMean, Int_t skip) {
rowRadius = row128Radius + (k-innerRows-middleRows+1)*tpcOuterRadialPitch ;

if ( k%skip == 0 )
AddLayer(Form("tpc_%d",k),rowRadius,radLPerRow,phiResMean,zResMean);
AddLayer(Form("tpc_%d",k),rowRadius,radLPerRow, 0, phiResMean,zResMean);
else
AddLayer(Form("tpc_%d",k),rowRadius,radLPerRow); // non "active" row
AddLayer(Form("tpc_%d",k),rowRadius,radLPerRow, 0); // non "active" row


}
Expand Down Expand Up @@ -791,12 +792,12 @@ void DetectorK::SolveViaBilloir(Double_t selPt, double ptmin) {
// Calculate track parameters using Billoirs method of matrices

Double_t pt,tgl, lambda, deltaPoverP ;
Double_t charge ;
Double_t charge = 1;
Int_t printOnce = 1 ;

Int_t mStart =0;

if ( TMath::Abs(charge)>1.2) fParticleMass = -TMath::Abs(fParticleMass);

// Prepare Probability Kombinations
Int_t nLayer = fNumberOfActiveITSLayers;
Expand Down Expand Up @@ -890,7 +891,7 @@ void DetectorK::SolveViaBilloir(Double_t selPt, double ptmin) {
trCov[kY2] = trCov[kZ2] = trCov[kSnp2] = trCov[kTgl2] = trCov[kPtI2] = 1e-9;
//
// find max layer this track can reach
double rmx = (TMath::Abs(fBField)>1e-5) ? pt*100./(0.3*TMath::Abs(fBField)) : 9999;
double rmx = (TMath::Abs(fBField)>1e-5) ? TMath::Abs(charge)*pt*100./(0.3*TMath::Abs(fBField)) : 9999;
Int_t lastActiveLayer = -1;
for (Int_t j=fLayers.GetEntries(); j--;) {
CylLayerK *l = (CylLayerK*) fLayers.At(j);
Expand Down Expand Up @@ -928,10 +929,13 @@ void DetectorK::SolveViaBilloir(Double_t selPt, double ptmin) {
lastReached = il;
prepLrOK[il] = 1.; // flag successfully passed layer
}
if ( ((CylLayerK*)fLayers.At(lastReached))->radius < fMinRadTrack) continue;
// if ( ((CylLayerK*)fLayers.At(lastReached))->radius < fMinRadTrack) continue;
if (!PropagateToR(&probTr,probTr.GetX() + kTrackingMargin,bGauss,1)) continue;
if (probTr.GetX()<fMinRadTrack) continue;
// if (probTr.GetX()<fMinRadTrack) continue;
lastActiveLayer = lastReached;
if (lastActiveLayer<fNumberOfActiveITSLayers) {
continue;
}

// if (!PropagateToR(&probTr,last->radius + kTrackingMargin,bGauss,1)) continue;
//if (!probTr.PropagateTo(last->radius,bGauss)) continue;
Expand Down