From: abercuci Date: Tue, 31 Aug 2010 09:22:33 +0000 (+0000) Subject: fix codding convention violations (Markus H & Alex B) X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=64d572999cb7f4338e513ead7d445dea78643a50;p=u%2Fmrichter%2FAliRoot.git fix codding convention violations (Markus H & Alex B) --- diff --git a/PWG1/TRD/AliTRDcheckESD.cxx b/PWG1/TRD/AliTRDcheckESD.cxx index 137faf5483d..707131d044c 100644 --- a/PWG1/TRD/AliTRDcheckESD.cxx +++ b/PWG1/TRD/AliTRDcheckESD.cxx @@ -463,8 +463,8 @@ Bool_t AliTRDcheckESD::GetRefFigure(Int_t ifig) pad->SetLeftMargin(0.15); pad->SetRightMargin(0.02); pad->SetTopMargin(0.02); pad->SetBottomMargin(0.15); pad->SetGridx(kFALSE); pad->SetGridy(kFALSE); - hFeffP = TRDEfficiency(+1); - hFeffN = TRDEfficiency(-1); + hFeffP = EfficiencyTRD(1); + hFeffN = EfficiencyTRD(-1); h2F=new TH2F("rangeEffPt", "",10,0.,10.,10,0.,1.1); h2F->SetStats(kFALSE); h2F->GetXaxis()->SetTitle("p_{T} [GeV/c]"); @@ -1701,7 +1701,7 @@ TH2F* AliTRDcheckESD::Proj3D(TH3F* hist, TH2F* accMap, Int_t zbinLow, Int_t zbin return projHisto; } //____________________________________________________________________ -TH1F* AliTRDcheckESD::TRDEfficiency(Short_t positives) { +TH1F* AliTRDcheckESD::EfficiencyTRD(Short_t positives) { // // Calculate the TRD-TPC matching efficiency as function of pt // diff --git a/PWG1/TRD/AliTRDcheckESD.h b/PWG1/TRD/AliTRDcheckESD.h index 0327637a98b..09888703e6e 100644 --- a/PWG1/TRD/AliTRDcheckESD.h +++ b/PWG1/TRD/AliTRDcheckESD.h @@ -22,6 +22,9 @@ class AliESDEvent; class AliMCEvent; class TH1; class TH2; +class TH1F; +class TH2F; +class TH3F; class TH3; class TObjArray; class TGraph; @@ -113,7 +116,7 @@ private: void Process2D(TH2 * const h, TGraphErrors **g); void PrintStatus(ULong_t s); TH2F* Proj3D(TH3F* hist, TH2F* accMap, Int_t binLow, Int_t binHigh, Float_t &entries); - TH1F* TRDEfficiency(Short_t positives=+1); + TH1F* EfficiencyTRD(Short_t positives=1); Int_t fStatus; // bit mask for controlling the task Int_t fNRefFigures; // number of current ref plots diff --git a/PWG1/TRD/AliTRDcheckPID.cxx b/PWG1/TRD/AliTRDcheckPID.cxx index 7c62f2347e9..7194d97cb27 100644 --- a/PWG1/TRD/AliTRDcheckPID.cxx +++ b/PWG1/TRD/AliTRDcheckPID.cxx @@ -1182,7 +1182,7 @@ Bool_t AliTRDcheckPID::PostProcess() } //________________________________________________________________________ -void AliTRDcheckPID::EvaluateEfficiency(TObjArray * const histoContainer, TObjArray *results, Int_t species, Float_t electronEfficiency){ +void AliTRDcheckPID::EvaluateEfficiency(const TObjArray * const histoContainer, TObjArray *results, Int_t species, Float_t electronEfficiency){ // Process PID information for pion efficiency fUtil->SetElectronEfficiency(electronEfficiency); diff --git a/PWG1/TRD/AliTRDcheckPID.h b/PWG1/TRD/AliTRDcheckPID.h index 5be080ff077..daf6a2c2ff6 100644 --- a/PWG1/TRD/AliTRDcheckPID.h +++ b/PWG1/TRD/AliTRDcheckPID.h @@ -72,7 +72,7 @@ public: static Char_t const* MethodName(Int_t id) { return fgMethod[id]; }; //TObjArray *GetHistos() { return fContainer; }; virtual TObjArray *Histos(); - void EvaluateEfficiency(TObjArray* const histoContainer, TObjArray *results, Int_t species, Float_t electronEfficiency); + void EvaluateEfficiency(const TObjArray* const histoContainer, TObjArray *results, Int_t species, Float_t electronEfficiency); inline void SetMomentumBinning(Int_t nBins, Double_t *bins); inline Int_t FindBin(Int_t species, Double_t momentum); inline Bool_t IsInRange(Double_t momentum); diff --git a/PWG1/TRD/AliTRDclusterResolution.cxx b/PWG1/TRD/AliTRDclusterResolution.cxx index c5cef2d8dbd..f4578d79e57 100644 --- a/PWG1/TRD/AliTRDclusterResolution.cxx +++ b/PWG1/TRD/AliTRDclusterResolution.cxx @@ -575,6 +575,17 @@ void AliTRDclusterResolution::UserExec(Option_t *) //_______________________________________________________ Bool_t AliTRDclusterResolution::PostProcess() { +// Steer processing of various cluster resolution dependences : +// +// - process resolution dependency cluster charge +// if(HasProcess(kQRes)) ProcessCharge(); +// - process resolution dependency on y displacement +// if(HasProcess(kCenter)) ProcessCenterPad(); +// - process resolution dependency on drift legth and drift cell width +// if(HasProcess(kSigm)) ProcessSigma(); +// - process systematic shift on drift legth and drift cell width +// if(HasProcess(kMean)) ProcessMean(); + if(!fContainer) return kFALSE; if(!IsCalibrated()){ AliWarning("Not calibrated."); diff --git a/PWG1/TRD/AliTRDclusterResolution.h b/PWG1/TRD/AliTRDclusterResolution.h index b330b89fda1..de4ef9c6166 100644 --- a/PWG1/TRD/AliTRDclusterResolution.h +++ b/PWG1/TRD/AliTRDclusterResolution.h @@ -11,7 +11,9 @@ #ifndef ALITRDRECOTASK_H #include "AliTRDrecoTask.h" #endif +#ifndef ALILOG_H #include "AliLog.h" +#endif class TCanvas; class TObjArray; diff --git a/PWG1/TRD/AliTRDefficiencyMC.cxx b/PWG1/TRD/AliTRDefficiencyMC.cxx index a0fd549bd4f..0b74913ab96 100644 --- a/PWG1/TRD/AliTRDefficiencyMC.cxx +++ b/PWG1/TRD/AliTRDefficiencyMC.cxx @@ -562,7 +562,7 @@ void AliTRDefficiencyMC::FillStreamTrackWOMC(AliTRDtrackInfo * const trkInf){ } //_____________________________________________________________________________ -Int_t AliTRDefficiencyMC::IsRegistered(AliTRDtrackInfo * const trkInf, Int_t *indices, Int_t nTracks){ +Int_t AliTRDefficiencyMC::IsRegistered(const AliTRDtrackInfo * const trkInf, Int_t *indices, Int_t nTracks){ // // Checks if track is registered in a given mode // diff --git a/PWG1/TRD/AliTRDefficiencyMC.h b/PWG1/TRD/AliTRDefficiencyMC.h index ace77f66236..6e0c1dc7a49 100644 --- a/PWG1/TRD/AliTRDefficiencyMC.h +++ b/PWG1/TRD/AliTRDefficiencyMC.h @@ -55,7 +55,7 @@ private: void FillStreamTrackWOMC(AliTRDtrackInfo * const trkInf); Int_t IsFindableNot(AliTRDtrackInfo * const trkInf); - Int_t IsRegistered(AliTRDtrackInfo * const trkInf, Int_t *indices, Int_t nTracks); + Int_t IsRegistered(const AliTRDtrackInfo * const trkInf, Int_t *indices, Int_t nTracks); static Float_t fgPCut; // lower momentum cut static Float_t fgPhiCut; // higher phi cut diff --git a/PWG1/TRD/AliTRDinfoGen.cxx b/PWG1/TRD/AliTRDinfoGen.cxx index b1777cba7a3..79d28f5f36e 100644 --- a/PWG1/TRD/AliTRDinfoGen.cxx +++ b/PWG1/TRD/AliTRDinfoGen.cxx @@ -508,7 +508,7 @@ void AliTRDinfoGen::UserExec(Option_t *){ // set V0pid info for(Int_t iv(0); ivGetEntriesFast(); iv++){ if(!(v0info = (AliTRDv0Info*)fV0List->At(iv))) continue; - if(!v0info->fTrackP && !v0info->fTrackN) continue; + if(!v0info->GetV0Daughter(1) && !v0info->GetV0Daughter(-1)) continue; if(!v0info->HasTrack(fTrackInfo)) continue; memset(v0pid, 0, AliPID::kSPECIES*sizeof(Int_t)); fTrackInfo->SetV0(); diff --git a/PWG1/TRD/AliTRDpidRefMaker.h b/PWG1/TRD/AliTRDpidRefMaker.h index 24b9cb3867f..d4698680d6b 100644 --- a/PWG1/TRD/AliTRDpidRefMaker.h +++ b/PWG1/TRD/AliTRDpidRefMaker.h @@ -16,18 +16,9 @@ #ifndef ALITRDRECOTASK_H #include "AliTRDrecoTask.h" #endif -#ifndef ALIPID_H -#include "AliPID.h" -#endif -#ifndef ALITRDCALPID_H -#include "AliTRDCalPID.h" -#endif #ifndef ALITRDPIDUTIL_H #include "AliTRDpidUtil.h" #endif -#ifndef ALITRDGEOMETRY_H -#include "AliTRDgeometry.h" -#endif class TTree; class TObjArray; diff --git a/PWG1/TRD/AliTRDpidRefMakerLQ.cxx b/PWG1/TRD/AliTRDpidRefMakerLQ.cxx index 91aa95859f5..77fbda72962 100644 --- a/PWG1/TRD/AliTRDpidRefMakerLQ.cxx +++ b/PWG1/TRD/AliTRDpidRefMakerLQ.cxx @@ -193,6 +193,8 @@ Bool_t AliTRDpidRefMakerLQ::GetRefFigure(Int_t ifig) //________________________________________________________________________ Bool_t AliTRDpidRefMakerLQ::Load(const Char_t *file, const Char_t *dir) { +// Load tree with data in case of detached PostProcess processing. + if(gSystem->AccessPathName(file, kReadPermission)){ AliError(Form("File %s not readable", file)); return kFALSE; diff --git a/PWG1/TRD/AliTRDpidRefMakerLQ.h b/PWG1/TRD/AliTRDpidRefMakerLQ.h index 808bcac7a06..37e359c763b 100644 --- a/PWG1/TRD/AliTRDpidRefMakerLQ.h +++ b/PWG1/TRD/AliTRDpidRefMakerLQ.h @@ -11,17 +11,16 @@ // // /////////////////////////////////////////////////////////////////////////////// -#ifndef ALIPID_H -#include "AliPID.h" -#endif - #ifndef ALITRDPIDREFMAKER_H #include "AliTRDpidRefMaker.h" #endif -#ifndef ALITRDPIDUTIL_H -#include "AliTRDpidUtil.h" -#endif +// #ifndef ALITRDPIDUTIL_H +// #include "AliTRDpidUtil.h" +// #endif +// #ifndef ALIPID_H +// #include "AliPID.h" +// #endif class TKDNodeInfo; class TKDInterpolator; diff --git a/PWG1/TRD/AliTRDpidRefMakerNN.cxx b/PWG1/TRD/AliTRDpidRefMakerNN.cxx index 9899f831401..c7d727ebf25 100644 --- a/PWG1/TRD/AliTRDpidRefMakerNN.cxx +++ b/PWG1/TRD/AliTRDpidRefMakerNN.cxx @@ -220,7 +220,7 @@ Bool_t AliTRDpidRefMakerNN::PostProcess() //________________________________________________________________________ Bool_t AliTRDpidRefMakerNN::MakeTrainingSample() { - + // convert AnalysisResults.root to training file TFile *fCalib = TFile::Open(Form("AnalysisResults.root")); if (!fCalib) { AliError("Calibration file not available"); @@ -525,7 +525,7 @@ void AliTRDpidRefMakerNN::MonitorTraining(Int_t mombin) for(Int_t iEvent = 0; iEvent < fTrain[mombin] -> GetN(); iEvent++ ){ fTrainData[mombin] -> GetEntry(fTrain[mombin] -> GetEntry(iEvent)); // use event only if it is electron or pion - if(!(fPID[is] == 1.0)) continue; + if(fPID[is] <1.e-5) continue; // get the probabilities for each particle type in each chamber for(Int_t iPart = 0; iPart < AliPID::kSPECIES; iPart++){ like[iPart][iChamb] = fNet -> Result(fTrain[mombin] -> GetEntry(iEvent), iPart); @@ -588,7 +588,7 @@ void AliTRDpidRefMakerNN::MonitorTraining(Int_t mombin) for(Int_t iEvent = 0; iEvent < fTest[mombin] -> GetN(); iEvent++ ){ fTrainData[mombin] -> GetEntry(fTest[mombin] -> GetEntry(iEvent)); // use event only if it is electron or pion - if(!(fPID[is] == 1.0)) continue; + if(TMath::Abs(fPID[is]- 1.)<1.e-5) continue; // get the probabilities for each particle type in each chamber for(Int_t iPart = 0; iPart < AliPID::kSPECIES; iPart++){ diff --git a/PWG1/TRD/AliTRDpidRefMakerNN.h b/PWG1/TRD/AliTRDpidRefMakerNN.h index 2d3940394a2..fea1044be89 100644 --- a/PWG1/TRD/AliTRDpidRefMakerNN.h +++ b/PWG1/TRD/AliTRDpidRefMakerNN.h @@ -18,6 +18,9 @@ #ifndef ALITRDPIDREFMAKER_H #include "AliTRDpidRefMaker.h" #endif +#ifndef ALITRDCALPID_H +#include "Cal/AliTRDCalPID.h" +#endif class TEventList; class TMultiLayerPerceptron; @@ -82,13 +85,13 @@ private: Bool_t fContinueTraining; // checks if training from an older run should be continued Int_t fTrainPath; // sets the path for continuing the training - Float_t fScale; + Float_t fScale; // scaling factor Int_t fLy; // TRD layer Int_t fNtrkl; // No. tracklets - TTree *fTrainData[AliTRDCalPID::kNMom]; - TFile *fRef; + TTree *fTrainData[AliTRDCalPID::kNMom];//Tree for reference data for all momentum bins + TFile *fRef; //file containing reference data - ClassDef(AliTRDpidRefMakerNN, 3); // TRD reference maker for NN + ClassDef(AliTRDpidRefMakerNN, 3); // TRD reference maker for NN }; #endif diff --git a/PWG1/TRD/AliTRDrecoTask.cxx b/PWG1/TRD/AliTRDrecoTask.cxx index c8114454536..f8fe77bdb05 100644 --- a/PWG1/TRD/AliTRDrecoTask.cxx +++ b/PWG1/TRD/AliTRDrecoTask.cxx @@ -239,7 +239,8 @@ Bool_t AliTRDrecoTask::PostProcess() } //_______________________________________________________ -void AliTRDrecoTask::MakeSummary(){ +void AliTRDrecoTask::MakeSummary() +{ // To be implemented by particular tasks AliWarning("Summary not available"); } diff --git a/PWG1/TRD/AliTRDv0Monitor.cxx b/PWG1/TRD/AliTRDv0Monitor.cxx index fa5bba802d0..820aa6eb899 100644 --- a/PWG1/TRD/AliTRDv0Monitor.cxx +++ b/PWG1/TRD/AliTRDv0Monitor.cxx @@ -20,18 +20,12 @@ // Authors: // Markus Heide ////////////////////////////////////////////////////// - -//#include "TPDGCode.h" -/*#include "TFile.h" -#include "TTree.h" -#include "TEventList.h"*/ + #include "TObjArray.h" #include "TH2.h" #include "TH2F.h" #include "TH1I.h" #include "TCanvas.h" -// #include "TPad.h" -// #include "TLegend.h" #include "AliLog.h" #include "AliESDtrack.h" @@ -76,21 +70,22 @@ AliTRDv0Monitor::AliTRDv0Monitor(const char *name) //____________________________________________________________________ -void AliTRDv0Monitor::MakeSummary(){ - TCanvas *cOut = new TCanvas("v0MonitorSummary1", "Summary 1 for task V0Monitor", 1024, 768); - cOut->cd(); +void AliTRDv0Monitor::MakeSummary(){//makes a summary with potentially nice reference figures + //TCanvas *cOut = new TCanvas("v0MonitorSummary1", "Summary 1 for task V0Monitor", 1024, 768); + //cOut->cd(); //GetRefFigure(4); - cOut->SaveAs("V0MonitorSummary.gif"); + //cOut->SaveAs("V0MonitorSummary.gif"); - cOut = new TCanvas("v0MonitorSummary2","Summary 2 for task V0Monitor", 1024, 768); - cOut->cd(); + //cOut = new TCanvas("v0MonitorSummary2","Summary 2 for task V0Monitor", 1024, 768); + //cOut->cd(); //GetRefFigure(5); - cOut->SaveAs("V0MonitorSummary2.gif"); + //cOut->SaveAs("V0MonitorSummary2.gif"); } //________________________________________________________________________ Bool_t AliTRDv0Monitor::GetRefFigure(Int_t /*ifig*/) { + //creating reference figures AliInfo("Implementation on going ..."); return kTRUE; @@ -101,7 +96,6 @@ TObjArray* AliTRDv0Monitor::Histos() { // Create histograms // Called once - if(fContainer) return fContainer; fContainer = new TObjArray(kNPlots); @@ -185,7 +179,6 @@ void AliTRDv0Monitor::UserExec(Option_t *) { // Main loop // Called for each event - if(!(fTracks = dynamic_cast(GetInputData(1)))) return; if(!(fV0s = dynamic_cast(GetInputData(2)))) return; if(!(fInfo = dynamic_cast(GetInputData(3)))) return; @@ -194,8 +187,6 @@ void AliTRDv0Monitor::UserExec(Option_t *) AliTRDtrackInfo *track = NULL; AliTRDv0Info *v0(NULL); - - for(Int_t itrk=0; itrkGetEntriesFast(); itrk++){ track = (AliTRDtrackInfo*)fTracks->UncheckedAt(itrk); for(Int_t iv(0); ivGetEntriesFast(); iv++){ @@ -204,9 +195,9 @@ void AliTRDv0Monitor::UserExec(Option_t *) ULong_t status = track->GetStatus(); if(!(status&AliESDtrack::kTRDpid)) continue; - fhQualityReductions->Fill(v0->fQuality);//fills integer codes for tracks cut out by track/V0 quality cuts + fhQualityReductions->Fill(v0->GetQuality());//fills integer codes for tracks cut out by track/V0 quality cuts - if(!(v0->fQuality == 1)) continue; + if(!(v0->GetQuality() == 1)) continue; for(Int_t part = 0; part < AliPID::kSPECIES; part++){ fhCutReductions[part]->Fill(v0->GetPID(part,track));//fill in numbers of tracks eliminated by different PID cuts @@ -225,47 +216,47 @@ void AliTRDv0Monitor::UserExec(Option_t *) } //fill histograms with track/V0 quality cuts only - fhPsiPair[idecay][0]->Fill(v0->fV0Momentum,v0->fPsiPair);//Angle between daughter momentum plane and plane perpendicular to magnetic field - fhInvMass[idecay]->Fill(v0->fV0Momentum,v0->fInvMass[idecay]);//Invariant mass - fhPointAngle[idecay][0]->Fill(v0->fV0Momentum,v0->fPointingAngle);// = TMath::ACos(esdv0->GetV0CosineOfPointingAngle()); // Cosine of pointing angle - fhOpenAngle[idecay][0]->Fill(v0->fV0Momentum,v0->fOpenAngle);// opening angle between daughters - fhDCA[idecay][0]->Fill(v0->fV0Momentum,v0->fDCA);// Distance of closest approach of daughter tracks - fhV0Chi2ndf[idecay][0]->Fill(v0->fV0Momentum,v0->fChi2ndf[idecay]);//Kalman Filter Chi2/NDF - fhRadius[idecay][0]->Fill(v0->fV0Momentum,v0->fRadius);//distance of decay/conversion from primary vertex in x-y plane + fhPsiPair[idecay][0]->Fill(v0->GetV0Momentum(),v0->GetPsiPair());//Angle between daughter momentum plane and plane perpendicular to magnetic field + fhInvMass[idecay]->Fill(v0->GetV0Momentum(),v0->GetInvMass(idecay));//Invariant mass + fhPointAngle[idecay][0]->Fill(v0->GetV0Momentum(),v0->GetPointingAngle());// = TMath::ACos(esdv0->GetV0CosineOfPointingAngle()); // Cosine of pointing angle + fhOpenAngle[idecay][0]->Fill(v0->GetV0Momentum(),v0->GetOpenAngle());// opening angle between daughters + fhDCA[idecay][0]->Fill(v0->GetV0Momentum(),v0->GetDCA());// Distance of closest approach of daughter tracks + fhV0Chi2ndf[idecay][0]->Fill(v0->GetV0Momentum(),v0->GetChi2ndf(idecay));//Kalman Filter Chi2/NDF + fhRadius[idecay][0]->Fill(v0->GetV0Momentum(),v0->GetRadius());//distance of decay/conversion from primary vertex in x-y plane if(v0->HasTrack(track) == -1){ - fhTPCdEdx[part][0]->Fill(v0->fTrackN->P(),v0->fTPCdEdx[AliTRDv0Info::kNeg]);//TPC dE/dx for negative track + fhTPCdEdx[part][0]->Fill(v0->GetV0Daughter(-1)->P(),v0->GetTPCdEdx(AliTRDv0Info::kNeg));//TPC dE/dx for negative track } else if(v0->HasTrack(track) == 1){ - fhTPCdEdx[part][0]->Fill(v0->fTrackP->P(),v0->fTPCdEdx[AliTRDv0Info::kPos]);//TPC dE/dx for positive track + fhTPCdEdx[part][0]->Fill(v0->GetV0Daughter(1)->P(),v0->GetTPCdEdx(AliTRDv0Info::kPos));//TPC dE/dx for positive track } //fill histograms after invariant mass cuts - if((v0->fInvMass[idecay] < v0->fUpInvMass[idecay][0])&&(v0->fInvMass[idecay]> v0->fDownInvMass[idecay])){ - fhV0Chi2ndf[idecay][1]->Fill(v0->fV0Momentum,v0->fChi2ndf[idecay]); - fhPsiPair[idecay][1]->Fill(v0->fV0Momentum,v0->fPsiPair); - fhPointAngle[idecay][1]->Fill(v0->fV0Momentum,v0->fPointingAngle); - fhOpenAngle[idecay][1]->Fill(v0->fV0Momentum,v0->fOpenAngle); - fhDCA[idecay][1]->Fill(v0->fV0Momentum,v0->fDCA); - fhRadius[idecay][1]->Fill(v0->fV0Momentum,v0->fRadius); + if((v0->GetInvMass(idecay) < v0->GetUpInvMass(idecay,0))&&(v0->GetInvMass(idecay)> v0->GetDownInvMass(idecay))){ + fhV0Chi2ndf[idecay][1]->Fill(v0->GetV0Momentum(),v0->GetChi2ndf(idecay)); + fhPsiPair[idecay][1]->Fill(v0->GetV0Momentum(),v0->GetPsiPair()); + fhPointAngle[idecay][1]->Fill(v0->GetV0Momentum(),v0->GetPointingAngle()); + fhOpenAngle[idecay][1]->Fill(v0->GetV0Momentum(),v0->GetOpenAngle()); + fhDCA[idecay][1]->Fill(v0->GetV0Momentum(),v0->GetDCA()); + fhRadius[idecay][1]->Fill(v0->GetV0Momentum(),v0->GetRadius()); if(v0->HasTrack(track) == -1) - fhTPCdEdx[part][1]->Fill(v0->fTrackN->P(),v0->fTPCdEdx[AliTRDv0Info::kNeg]); + fhTPCdEdx[part][1]->Fill(v0->GetV0Daughter(-1)->P(),v0->GetTPCdEdx(AliTRDv0Info::kNeg)); else if(v0->HasTrack(track) == 1) - fhTPCdEdx[part][1]->Fill(v0->fTrackP->P(),v0->fTPCdEdx[AliTRDv0Info::kPos]); + fhTPCdEdx[part][1]->Fill(v0->GetV0Daughter(1)->P(),v0->GetTPCdEdx(AliTRDv0Info::kPos)); } //fill histograms after all reference selection cuts if(v0->GetPID(part,track)==1){ - fhV0Chi2ndf[idecay][2]->Fill(v0->fV0Momentum,v0->fChi2ndf[idecay]); - fhPsiPair[idecay][2]->Fill(v0->fV0Momentum,v0->fPsiPair); - fhPointAngle[idecay][2]->Fill(v0->fV0Momentum,v0->fPointingAngle); - fhOpenAngle[idecay][2]->Fill(v0->fV0Momentum,v0->fOpenAngle); - fhDCA[idecay][2]->Fill(v0->fV0Momentum,v0->fDCA); - fhRadius[idecay][2]->Fill(v0->fV0Momentum,v0->fRadius); + fhV0Chi2ndf[idecay][2]->Fill(v0->GetV0Momentum(),v0->GetChi2ndf(idecay)); + fhPsiPair[idecay][2]->Fill(v0->GetV0Momentum(),v0->GetPsiPair()); + fhPointAngle[idecay][2]->Fill(v0->GetV0Momentum(),v0->GetPointingAngle()); + fhOpenAngle[idecay][2]->Fill(v0->GetV0Momentum(),v0->GetOpenAngle()); + fhDCA[idecay][2]->Fill(v0->GetV0Momentum(),v0->GetDCA()); + fhRadius[idecay][2]->Fill(v0->GetV0Momentum(),v0->GetRadius()); if(v0->HasTrack(track) == -1) - fhTPCdEdx[part][2]->Fill(v0->fTrackN->P(),v0->fTPCdEdx[AliTRDv0Info::kNeg]); + fhTPCdEdx[part][2]->Fill(v0->GetV0Daughter(-1)->P(),v0->GetTPCdEdx(AliTRDv0Info::kNeg)); else if(v0->HasTrack(track) == 1) - fhTPCdEdx[part][2]->Fill(v0->fTrackP->P(),v0->fTPCdEdx[AliTRDv0Info::kPos]); + fhTPCdEdx[part][2]->Fill(v0->GetV0Daughter(1)->P(),v0->GetTPCdEdx(AliTRDv0Info::kPos)); } } } diff --git a/PWG1/TRD/info/AliTRDv0Info.cxx b/PWG1/TRD/info/AliTRDv0Info.cxx index cc4f1fbc7c4..446ea06a03f 100644 --- a/PWG1/TRD/info/AliTRDv0Info.cxx +++ b/PWG1/TRD/info/AliTRDv0Info.cxx @@ -61,19 +61,17 @@ AliTRDv0Info::AliTRDv0Info() ,fMagField(0) ,fRadius(0) ,fV0Momentum(0) - ,fTrackP(NULL) - ,fTrackN(NULL) ,fNindex(0) ,fPindex(0) ,fInputEvent(NULL) ,fPrimaryVertex(NULL) + ,fTrackP(NULL) + ,fTrackN(NULL) { // // Default constructor // - memset(fPplus, 0, 2*kNlayer*sizeof(Float_t)); - memset(fPminus, 0, 2*kNlayer*sizeof(Float_t)); memset(fDetPID, 0, 2*kNDaughters*kNDetectors*AliPID::kSPECIES*sizeof(Float_t)); memset(fComPID, 0, 2*kNDaughters*AliPID::kSPECIES*sizeof(Float_t)); memset(fInvMass, 0, kNDecays*sizeof(Double_t)); @@ -249,19 +247,17 @@ AliTRDv0Info::AliTRDv0Info(const AliTRDv0Info &ref) ,fMagField(ref.fMagField) ,fRadius(ref.fRadius) ,fV0Momentum(ref.fV0Momentum) - ,fTrackP(ref.fTrackP) - ,fTrackN(ref.fTrackN) ,fNindex(ref.fNindex) ,fPindex(ref.fPindex) ,fInputEvent(ref.fInputEvent) ,fPrimaryVertex(ref.fPrimaryVertex) + ,fTrackP(ref.fTrackP) + ,fTrackN(ref.fTrackN) { // // Copy constructor // - - memcpy(fPplus, ref.fPplus, 2*kNlayer*sizeof(Float_t)); - memcpy(fPminus, ref.fPminus, 2*kNlayer*sizeof(Float_t)); + memcpy(fDetPID, ref.fDetPID, 2*kNDaughters*kNDetectors*AliPID::kSPECIES*sizeof(Float_t)); memcpy(fComPID, ref.fComPID, 2*kNDaughters*AliPID::kSPECIES*sizeof(Float_t)); memcpy(fInvMass, ref.fInvMass, kNDecays*sizeof(Double_t)); @@ -291,7 +287,8 @@ AliTRDv0Info::AliTRDv0Info(const AliTRDv0Info &ref) //_________________________________________________ void AliTRDv0Info::SetV0Info(AliESDv0 *esdv0) -{//Gets values of ESDv0 and daughter track properties +{ + //Gets values of ESDv0 and daughter track properties //See header file for description of variables fQuality = Quality(esdv0);//Attributes an Int_t to the V0 due to quality cuts (= 1 if V0 is accepted, other integers depending on cut which excludes the vertex) @@ -401,7 +398,8 @@ Double_t AliTRDv0Info::InvMass(Int_t part1, Int_t part2, AliESDv0 *esdv0) const } //_________________________________________________ Float_t AliTRDv0Info::OpenAngle(AliESDv0 *esdv0) -{//Opening angle between two daughter tracks +{ + //Opening angle between two daughter tracks Double_t mn[3] = {0,0,0}; Double_t mp[3] = {0,0,0}; @@ -417,7 +415,8 @@ Float_t AliTRDv0Info::OpenAngle(AliESDv0 *esdv0) //_________________________________________________ Float_t AliTRDv0Info::PsiPair(AliESDv0 *esdv0) -{//Angle between daughter momentum plane and plane perpendicular to magnetic field +{ + //Angle between daughter momentum plane and plane perpendicular to magnetic field Double_t x, y, z; esdv0->GetXYZ(x,y,z);//Reconstructed coordinates of V0; to be replaced by Markus Rammler's method in case of conversions! @@ -487,7 +486,7 @@ Double_t AliTRDv0Info::KFChi2ndf(Int_t part1, Int_t part2,Int_t decay){ return chi2ndf; } //________________________________________________________________ -AliKFParticle *AliTRDv0Info::CreateMotherParticle(AliESDtrack *pdaughter, AliESDtrack *ndaughter, Int_t pspec, Int_t nspec){ +AliKFParticle *AliTRDv0Info::CreateMotherParticle(const AliESDtrack *pdaughter, const AliESDtrack *ndaughter, Int_t pspec, Int_t nspec){ // // Creates a mother particle // @@ -506,9 +505,9 @@ AliKFParticle *AliTRDv0Info::CreateMotherParticle(AliESDtrack *pdaughter, AliESD return m; } //_________________________________________________ -Int_t AliTRDv0Info::HasTrack(AliTRDtrackInfo * const track) +Int_t AliTRDv0Info::HasTrack(const AliTRDtrackInfo * const track) const { -//Checks if track is a secondary vertex daughter (due to V0 finder) + //Checks if track is a secondary vertex daughter (due to V0 finder) if(!track) return 0; if(!fTrackP->GetID()) return 0; @@ -519,7 +518,7 @@ Int_t AliTRDv0Info::HasTrack(AliTRDtrackInfo * const track) } //_________________________________________________ -Int_t AliTRDv0Info::HasTrack(Int_t trackID) +Int_t AliTRDv0Info::HasTrack(Int_t trackID) const { //comparing index of track with indices of pos./neg. V0 daughter : if(fNindex==trackID) return -1; @@ -529,7 +528,8 @@ Int_t AliTRDv0Info::HasTrack(Int_t trackID) //_________________________________________________ void AliTRDv0Info::GetDetectorPID() -{//PID likelihoods from TPC, TOF, and ITS, for all particle species +{ + //PID likelihoods from TPC, TOF, and ITS, for all particle species fTrackN->GetTPCpid(fDetPID[kNeg][kTPC]); fTrackP->GetTPCpid(fDetPID[kPos][kTPC]); @@ -578,6 +578,7 @@ void AliTRDv0Info::GetDetectorPID() //____________________________________________________________________________________ void AliTRDv0Info::CombinePID() { + //combined bayesian PID from TPC and TOF Double_t partrat[AliPID::kSPECIES] = {0.208, 0.010, 0.662, 0.019, 0.101}; for(Int_t iSign = 0; iSign < kNDaughters; iSign++) @@ -592,6 +593,7 @@ void AliTRDv0Info::CombinePID() //_________________________________________________ Bool_t AliTRDv0Info::GetTPCdEdx() { + //gets the TPC dE/dx for both daughter tracks if(!fTrackP->GetID()) return 0; if(!fTrackN->GetID()) return 0; @@ -603,6 +605,7 @@ Bool_t AliTRDv0Info::GetTPCdEdx() //_________________________________________________ Bool_t AliTRDv0Info::TPCdEdxCuts(Int_t part, AliTRDtrackInfo * const track) { + //applies cuts on TPC dE/dx according to particle species; cutting lines are drawn shifted to the Bethe-Bloch paremeterization if(!fTrackP->GetID()) return 0; if(!fTrackN->GetID()) return 0; @@ -659,7 +662,8 @@ Bool_t AliTRDv0Info::TPCdEdxCuts(Int_t part, AliTRDtrackInfo * const track) } //_________________________________________________ Float_t AliTRDv0Info::Radius(AliESDv0 *esdv0) -{//distance from secondary vertex to primary vertex in x-y plane +{ + //distance from secondary vertex to primary vertex in x-y plane Double_t x, y, z; esdv0->GetXYZ(x,y,z); //Reconstructed coordinates of V0 fRadius = TMath::Sqrt(x*x + y*y); @@ -770,7 +774,7 @@ Bool_t AliTRDv0Info::Armenteros(AliESDv0 *esdv0, Int_t decay){ ap[0] = alfa; ap[1] = qt; - Double_t LcutAP[2];//Lambda/Anti-Lambda cuts + Double_t lCutAP[2];//Lambda/Anti-Lambda cuts if(decay == 0){ // armenteros cuts const Double_t cutAlpha[2] = {0.35, 0.45}; // [0.35, 0.45] @@ -789,19 +793,19 @@ Bool_t AliTRDv0Info::Armenteros(AliESDv0 *esdv0, Int_t decay){ else if(decay == 2){ const Double_t cutQT = 0.03; const Double_t cutAlpha = 0.7; // VERY strong - should supress the overlap with K0 - LcutAP[0] = 1.0 - (ap[0]-0.7 * ap[0]-0.7)*1.1 - 0.87; + lCutAP[0] = 1.0 - (ap[0]-0.7 * ap[0]-0.7)*1.1 - 0.87; if(TMath::Abs(ap[0]) > cutAlpha) return kFALSE; if(ap[1] < cutQT) return kFALSE; - if(ap[1] > LcutAP[0]) return kFALSE; + if(ap[1] > lCutAP[0]) return kFALSE; } else if(decay == 3){ const Double_t cutQT = 0.03; const Double_t cutAlpha = 0.7; // VERY strong - should supress the overlap with K0 - LcutAP[1] = 1.0 - (ap[0]+0.7 * ap[0]+0.7)*1.1 - 0.87; + lCutAP[1] = 1.0 - (ap[0]+0.7 * ap[0]+0.7)*1.1 - 0.87; if(TMath::Abs(ap[0]) > cutAlpha) return kFALSE; if(ap[1] < cutQT) return kFALSE; - if(ap[1] > LcutAP[1]) return kFALSE; + if(ap[1] > lCutAP[1]) return kFALSE; } return kTRUE; } @@ -953,6 +957,7 @@ Int_t AliTRDv0Info::GetPID(Int_t ipart, AliTRDtrackInfo *track) //_________________________________________________ void AliTRDv0Info::Print(Option_t *opt) const { + //prints text for debugging etc. printf("V0 P[%d] N[%d]\n", fPindex, fNindex); printf(" DCA[%5.3f] Radius[%5.3f]\n", fDCA, fRadius); printf(" Angles : Pointing[%5.3f] Open[%5.3f] Psi[%5.3f]\n", fPointingAngle, fOpenAngle, fPsiPair); @@ -974,8 +979,19 @@ void AliTRDv0Info::Print(Option_t *opt) const //_________________________________________________ void AliTRDv0Info::SetV0tracks(AliESDtrack *p, AliESDtrack *n) { + //sets the two daughter trex and their indices fTrackP = p; fPindex = p->GetID(); fTrackN = n; fNindex = n->GetID(); } +//_________________________________________________ +AliESDtrack *AliTRDv0Info::GetV0Daughter(Int_t sign) +{ + //Gets positive of negative daughter of decay + if(sign>0) + return fTrackP; + else if(sign < 0) + return fTrackN; + return 0; +} diff --git a/PWG1/TRD/info/AliTRDv0Info.h b/PWG1/TRD/info/AliTRDv0Info.h index 040cb710262..a03ed482d6c 100644 --- a/PWG1/TRD/info/AliTRDv0Info.h +++ b/PWG1/TRD/info/AliTRDv0Info.h @@ -68,21 +68,54 @@ public: AliTRDv0Info(const AliTRDv0Info &ref); virtual ~AliTRDv0Info(){} - Int_t GetPID(Int_t ipart, AliTRDtrackInfo *track); - Int_t HasTrack(AliTRDtrackInfo * const track); - Int_t HasTrack(Int_t ti); + Int_t GetQuality(){return fQuality;} + Float_t GetDCA(){return fDCA;} + Float_t GetPointingAngle(){return fPointingAngle;} + Float_t GetOpenAngle(){return fOpenAngle;} + Float_t GetPsiPair(){return fPsiPair;} + Float_t GetRadius(){return fRadius;} + Float_t GetV0Momentum(){return fV0Momentum;} + Double_t GetInvMass(Int_t iDecay){return fInvMass[iDecay];} + Float_t GetDetPID(Int_t iDaughter, Int_t iDetector, Int_t iSpecies){return fDetPID[iDaughter][iDetector][iSpecies];} + Float_t GetComPID(Int_t iDaughter, Int_t iSpecies){return fComPID[iDaughter][iSpecies];} + Float_t GetTPCdEdx(Int_t iDaughter){return fTPCdEdx[iDaughter];} + Float_t GetChi2ndf(Int_t decay){return fChi2ndf[decay];} + + //Get Cut values: + + Float_t GetUpDCA(Int_t iDecay){return fUpDCA[iDecay];} + Float_t GetUpPointingAngle(Int_t iDecay){return fUpPointingAngle[iDecay];} + Float_t GetUpOpenAngle(Int_t iDecay){return fUpOpenAngle[iDecay];} + Float_t GetDownOpenAngle(Int_t iDecay){return fDownOpenAngle[iDecay];} + Float_t GetUpPsiPair(Int_t iDecay){return fUpPsiPair[iDecay];} + Float_t GetDownPsiPair(Int_t iDecay){return fDownPsiPair[iDecay];} + Float_t GetUpRadius(Int_t iDecay){return fUpRadius[iDecay];} + Float_t GetDownRadius(Int_t iDecay){return fDownRadius[iDecay];} + Double_t GetUpInvMass(Int_t iDecay, Int_t iMomentum){return fUpInvMass[iDecay][iMomentum];} + Double_t GetDownInvMass(Int_t iDecay){return fDownInvMass[iDecay];} + Float_t GetDownTPCPIDneg(Int_t iPart){return fDownTPCPIDneg[iPart];} + Float_t GetDownTPCPIDpos(Int_t iPart){return fDownTPCPIDpos[iPart];} + Float_t GetDownComPIDneg(Int_t iPart){return fDownComPIDneg[iPart];} + Float_t GetDownComPIDpos(Int_t iPart){return fDownComPIDpos[iPart];} + Float_t GetDownComPIDnegPart(Int_t iPart){return fDownComPIDnegPart[iPart];} + Float_t GetDownComPIDposPart(Int_t iPart){return fDownComPIDposPart[iPart];} + + + Int_t GetPID(Int_t ipart, AliTRDtrackInfo *track); + Int_t HasTrack(const AliTRDtrackInfo * const track) const; + Int_t HasTrack(Int_t ti) const; + AliESDtrack *GetV0Daughter(Int_t sign); //Get positive of negative daughter of decay + void Print(Option_t *opt="") const; - + void SetMagField(Float_t b) {fMagField = b;} void SetV0tracks(AliESDtrack *p, AliESDtrack *n); void SetInputEvent(AliVEvent *e) { fInputEvent = e; }; void SetPrimaryVertex(AliKFVertex *v) { fPrimaryVertex = v; }; - + //Set values of measured/calculated variables: void SetQuality(Int_t SQuality){fQuality = SQuality;} - void SetPplus(Int_t iLayer, Float_t SPplus){fPplus[iLayer] = SPplus;} - void SetPminus(Int_t iLayer, Float_t SPminus){fPminus[iLayer] = SPminus;} void SetDCA(Float_t SDCA){fDCA = SDCA;} void SetPointingAngle(Float_t SPointingAngle){fPointingAngle = SPointingAngle;} void SetOpenAngle(Float_t SOpenAngle){fOpenAngle = SOpenAngle;} @@ -92,6 +125,8 @@ public: void SetDetPID(Int_t iDaughter, Int_t iDetector, Int_t iSpecies, Float_t SDetPID){fDetPID[iDaughter][iDetector][iSpecies] = SDetPID;} void SetComPID(Int_t iDaughter, Int_t iSpecies, Float_t SComPID){fComPID[iDaughter][iSpecies] = SComPID;} void SetTPCdEdx(Int_t iDaughter, Float_t STpcdEdx){fTPCdEdx[iDaughter] = STpcdEdx;} + void SetV0Momentum(Float_t SV0Momentum){fV0Momentum = SV0Momentum;} + void SetChi2ndf(Int_t decay, Float_t SChi2ndf){fChi2ndf[decay]=SChi2ndf;} //____________________________________________________________ //Set cut values: @@ -112,35 +147,12 @@ public: void SetDownComPIDpos(Int_t iPart, Double_t DownComPIDpos){fDownComPIDpos[iPart] = DownComPIDpos;} void SetDownComPIDnegPart(Int_t iPart, Double_t DownComPIDnegPart){fDownComPIDnegPart[iPart] = DownComPIDnegPart;} void SetDownComPIDposPart(Int_t iPart, Double_t DownComPIDposPart){fDownComPIDposPart[iPart] = DownComPIDposPart;} - + + void SetV0Info(AliESDv0 *v0);//gets most of the variables below - Double_t fChi2ndf[kNDecays];//Chi2/NDF from KF - Double_t fInvMass[kNDecays]; // invariant mass for different decay scenarios (conversions, K0s, Lambda->p+pi-, Lambda->p-pi+) - Int_t fQuality; // track quality status for both V0 daughters; OnFly, TPCrefit, Kinks, TPC clusters - - Double_t fDetPID[kNDaughters][kNDetectors][AliPID::kSPECIES]; // PID provided by TPC, TOF and ITS - Double_t fComPID[kNDaughters][AliPID::kSPECIES];//Combined PID, momentarily from TPC and TOF only - - Float_t fDCA; // Distance of closest approach of daughter tracks - Float_t fPointingAngle;// = TMath::ACos(esdv0->GetV0CosineOfPointingAngle()); // Cosine of pointing angle - Float_t fOpenAngle; // opening angle between daughters - Float_t fPsiPair; // /Angle between daughter momentum plane and plane perpendicular to magnetic field - - Bool_t fArmenteros[kNDecays];// Array for the Armenteros yes/no decision for all decays - Double_t fMagField; //magnetic field strength - Float_t fRadius; //distance of decay/conversion from primary vertex in x-y plane - Float_t fV0Momentum; //V0 mother's momentum - Float_t fTPCdEdx[kNDaughters]; //Energy deposition in the TPC - - Double_t fUpInvMass[kNDecays][kNMomBins]; // invariant mass, upper limit - Double_t fDownInvMass[kNDecays]; // invariant mass, lower limit - - AliESDtrack *fTrackP; //!positive daughter - AliESDtrack *fTrackN; //!negative daughter - private: AliTRDv0Info& operator=(const AliTRDv0Info&); @@ -160,10 +172,7 @@ private: Bool_t V0SignCheck();//checks if daughters have opposite signs Bool_t Armenteros(AliESDv0 *esdv0, Int_t species);//the famous Armenteros-Polanski cut Double_t KFChi2ndf(Int_t part1, Int_t part2,Int_t decay);//Chi2ndf from KF - AliKFParticle *CreateMotherParticle(AliESDtrack *pdaughter, AliESDtrack *ndaughter, Int_t pspec, Int_t nspec);//Mother Particle from KF - - Float_t fPplus[2*kNlayer]; // momentum and variance for the positive daughter - Float_t fPminus[2*kNlayer]; // momentum and variance for the negative daughter + AliKFParticle *CreateMotherParticle(const AliESDtrack *pdaughter, const AliESDtrack *ndaughter, Int_t pspec, Int_t nspec);//Mother Particle from KF //____________________________________________________________ @@ -176,7 +185,7 @@ private: Float_t fUpPsiPair[kNDecays]; // psi angle, upper limit Float_t fDownPsiPair[kNDecays]; // psi angle, lower limit - Double_t fUpChi2ndf[kNDecays]; + Double_t fUpChi2ndf[kNDecays]; // upper Chi2/NDF limit Float_t fUpRadius[kNDecays]; // radius, upper limit Float_t fDownRadius[kNDecays]; // radius, lower limit Float_t fDownTPCPIDneg[AliPID::kSPECIES]; // TPC PID negatives, lower limit @@ -185,14 +194,42 @@ private: Float_t fDownComPIDpos[AliPID::kSPECIES]; // Combined PID positives, lower limit Float_t fDownComPIDnegPart[AliPID::kSPECIES]; // Combined PID positive partner daughters (NOT the daughter track that would go into the reference data; here: pion daughters from Lambda decays; lower limit Float_t fDownComPIDposPart[AliPID::kSPECIES]; // Combined PID positive partner daughters (NOT the daughter track that would go into the reference data; here: pion daughters from Lambda decays; lower limit + Double_t fUpInvMass[kNDecays][kNMomBins]; // invariant mass, upper limit + Double_t fDownInvMass[kNDecays]; // invariant mass, lower limit + + + Double_t fChi2ndf[kNDecays];//Chi2/NDF from KF + + + Double_t fInvMass[kNDecays]; // invariant mass for different decay scenarios (conversions, K0s, Lambda->p+pi-, Lambda->p-pi+) + Int_t fQuality; // track quality status for both V0 daughters; OnFly, TPCrefit, Kinks, TPC clusters + + Double_t fDetPID[kNDaughters][kNDetectors][AliPID::kSPECIES]; // PID provided by TPC, TOF and ITS + Double_t fComPID[kNDaughters][AliPID::kSPECIES];//Combined PID, momentarily from TPC and TOF only + Float_t fDCA; // Distance of closest approach of daughter tracks + Float_t fPointingAngle;// = TMath::ACos(esdv0->GetV0CosineOfPointingAngle()); // Cosine of pointing angle + Float_t fOpenAngle; // opening angle between daughters + Float_t fPsiPair; // /Angle between daughter momentum plane and plane perpendicular to magnetic field + + Bool_t fArmenteros[kNDecays];// Array for the Armenteros yes/no decision for all decays + Double_t fMagField; //magnetic field strength + Float_t fRadius; //distance of decay/conversion from primary vertex in x-y plane + Float_t fV0Momentum; //V0 mother's momentum Int_t fNindex; //indices of positive and negative daughter track Int_t fPindex; //indices of positive and negative daughter track + Float_t fTPCdEdx[kNDaughters]; //Energy deposition in the TPC + + AliVEvent *fInputEvent; // Input Event AliKFVertex *fPrimaryVertex; // primary vertex + AliESDtrack *fTrackP; //!positive daughter + AliESDtrack *fTrackN; //!negative daughter + + ClassDef(AliTRDv0Info, 1) // extracted V0 MC information }; diff --git a/PWG1/TRD/macros/mergeResults.C b/PWG1/TRD/macros/mergeResults.C index ea8a9359e00..1a0fb175d00 100644 --- a/PWG1/TRD/macros/mergeResults.C +++ b/PWG1/TRD/macros/mergeResults.C @@ -1,4 +1,9 @@ -#include "AliTRDpwg1Helper.h" -void mergeResults(Char_t *files, Char_t *file="QAresults.root"){ +void mergeResults(Char_t *files, Char_t *file="QAresults.root") +{ + gSystem->Load("libANALYSIS.so"); + gSystem->Load("libANALYSISalice.so"); + gSystem->Load("libTENDER.so"); + gSystem->Load("libPWG1.so"); + AliTRDpwg1Helper::MergeProd(file, files, 10); } \ No newline at end of file