X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=TRD%2FCal%2FAliTRDCalPIDRefMaker.cxx;h=bd1408cb7e3d394d00e54e635c1fc3605c5c515e;hb=33c3c91a040995417ea28c5ae034899b77cca3a6;hp=65e32f1b3cf086fb2331144bd75bb11eb06aeec4;hpb=6984f7c1fd9fc774da1ae7db8d4635d37a02037b;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/Cal/AliTRDCalPIDRefMaker.cxx b/TRD/Cal/AliTRDCalPIDRefMaker.cxx index 65e32f1b3cf..bd1408cb7e3 100644 --- a/TRD/Cal/AliTRDCalPIDRefMaker.cxx +++ b/TRD/Cal/AliTRDCalPIDRefMaker.cxx @@ -130,7 +130,7 @@ AliTRDCalPIDRefMaker& AliTRDCalPIDRefMaker::operator=(const AliTRDCalPIDRefMaker //__________________________________________________________________ -Bool_t AliTRDCalPIDRefMaker::BuildLQReferences(Char_t *File, Char_t *dir) +Bool_t AliTRDCalPIDRefMaker::BuildLQReferences(const Char_t *File, const Char_t *dir) { // Build, Fill and write to file the histograms used for PID. // The simulations are looked in the @@ -238,7 +238,7 @@ Bool_t AliTRDCalPIDRefMaker::BuildLQReferences(Char_t *File, Char_t *dir) // Load MC info fRunLoader->GetEvent(iEvent); - AliStack* stack = gAlice->Stack(); + AliStack* stack = AliRunLoader::Instance()->Stack(); TArrayF vertex(3); fRunLoader->GetHeader()->GenEventHeader()->PrimaryVertex(vertex); @@ -293,18 +293,18 @@ Bool_t AliTRDCalPIDRefMaker::BuildLQReferences(Char_t *File, Char_t *dir) //Float_t length; Double_t dedx[AliTRDtrack::kNslice], dEdx; Int_t timebin; - for (Int_t iPlane=0; iPlaneGetTRDslice(iPlane, iSlice); - dEdx = esdTrack->GetTRDslice(iPlane, -1); - timebin = esdTrack->GetTRDTimBin(iPlane); + dedx[iSlice] = esdTrack->GetTRDslice(iLayer, iSlice); + dEdx = esdTrack->GetTRDslice(iLayer, -1); + timebin = esdTrack->GetTRDTimBin(iLayer); // check data if ((dEdx <= 0.) || (timebin <= -1.)) continue; // retrive kinematic info for this track segment - //if(!AliTRDpidESD::RecalculateTrackSegmentKine(esdTrack, iPlane, mom, length)) continue; + //if(!AliTRDpidESD::RecalculateTrackSegmentKine(esdTrack, iLayer, mom, length)) continue; mom = esdTrack->GetOuterParam()->GetP(); // find segment length and momentum bin @@ -313,7 +313,7 @@ Bool_t AliTRDCalPIDRefMaker::BuildLQReferences(Char_t *File, Char_t *dir) if(TMath::Abs(trackMomentum[jmom-1] - mom) < trackMomentum[jmom-1] * .2) refMom = jmom-1; else if(TMath::Abs(trackMomentum[jmom] - mom) < trackMomentum[jmom] * .2) refMom = jmom; if(refMom<0){ - AliInfo(Form("Momentum at plane %d entrance not in momentum window. [@ momentum %3.1f batch %03d event %d track %d]", iPlane, trackMomentum[imom], ibatch, iEvent, iTrack)); + AliInfo(Form("Momentum at plane %d entrance not in momentum window. [@ momentum %3.1f batch %03d event %d track %d]", iLayer, trackMomentum[imom], ibatch, iEvent, iTrack)); continue; } /*while(jlengtrackSegLength[jleng]) jleng++;*/ @@ -364,7 +364,7 @@ Bool_t AliTRDCalPIDRefMaker::BuildLQReferences(Char_t *File, Char_t *dir) } //__________________________________________________________________ -Bool_t AliTRDCalPIDRefMaker::BuildNNReferences(Char_t* /*File*/, Char_t* /*dir*/) +Bool_t AliTRDCalPIDRefMaker::BuildNNReferences(const Char_t* /*File*/, const Char_t* /*dir*/) { return kTRUE; } @@ -503,7 +503,7 @@ Double_t AliTRDCalPIDRefMaker::Estimate2D1(TH2 *h, Float_t &x, Float_t &y ///////////// Private functions /////////////////////////////////// //__________________________________________________________________ -Int_t AliTRDCalPIDRefMaker::CheckProdDirTree(Char_t *dir) +Int_t AliTRDCalPIDRefMaker::CheckProdDirTree(const Char_t *dir) { // Scan directory tree for momenta. Returns the smallest number of // batches found in all directories or 0 if one momentum is missing.