for(Int_t k = 0; k < npoints; k++){
//Take the cluster
AliTRDcluster *cl = (AliTRDcluster *) t->GetCluster(k+index0);
- Short_t *signals = cl->GetSignals(); // signal
- Double_t time = cl->GetPadTime(); // time bin
+ Short_t *signals = cl->GetSignals(); // signal
+ Double_t time = cl->GetPadTime(); // time bin
Float_t padPosTracklet = line[0]+line[1]*time; // reconstruct position from fit
Float_t padPos = cl->GetPadCol(); // middle pad
Double_t dpad = padPosTracklet - padPos; // reconstruct position relative to middle pad from fit
} \r
} \r
\r
+\r
if (det != lastdet) \r
{ \r
// If new detector found\r
// //
////////////////////////////////////////////////////////////////////////////
-#include <stdlib.h>
-
#include <TH1.h>
#include <TRandom.h>
#include <TMath.h>
-#include <TParticle.h>
#include <TVirtualMC.h>
#include <TVirtualMCStack.h>
#include "AliModule.h"
-#include "AliLog.h"
-#include "AliMC.h"
#include "AliTRDsimTR.h"
//_____________________________________________________________________________
Double_t AliTRDsimTR::Interpolate(Double_t energyMeV
- , Double_t *en, Double_t *mu, Int_t n)
+ , Double_t *en
+ , const Double_t * const mu
+ , Int_t n)
{
//
// Interpolates the photon absorbtion cross section
//_____________________________________________________________________________
Int_t AliTRDsimTR::Locate(Double_t *xv, Int_t n, Double_t xval
- , Int_t &kl, Double_t &dx)
+ , Int_t &kl, Double_t &dx)
{
//
// Locates a point (xval) in a 1-dim grid (xv(n))
, Int_t &nPhoton, Float_t *ePhoton);
virtual Double_t Sigma(Double_t energykeV);
virtual Double_t Interpolate(Double_t energyMeV
- , Double_t *en, Double_t *mu, Int_t n);
+ , Double_t *en, const Double_t * const mu, Int_t n);
virtual Int_t Locate(Double_t *xv, Int_t n, Double_t xval
, Int_t &kl, Double_t &dx);
virtual Double_t Omega(Float_t rho, Float_t z, Float_t a) { return (28.8 * TMath::Sqrt(rho * z / a)); };
// //
////////////////////////////////////////////////////////////////////////////
-#include <stdlib.h>
-
#include <TLorentzVector.h>
#include <TMath.h>
#include <TRandom.h>
-#include <TVector.h>
#include <TVirtualMC.h>
#include <TGeoManager.h>
#include <TGeoMatrix.h>
#include <TGeoPhysicalNode.h>
-#include "AliConst.h"
-#include "AliLog.h"
#include "AliTrackReference.h"
#include "AliMC.h"
#include "AliRun.h"
#include "AliTRDgeometry.h"
#include "AliTRDCommonParam.h"
-#include "AliTRDhit.h"
#include "AliTRDsimTR.h"
#include "AliTRDv1.h"
-#ifndef AliTRDCalChamberStatus_H
-#define AliTRDCalChamberStatus_H
+#ifndef ALITRDCalChamberStatus_H
+#define ALITRDCalChamberStatus_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
//_____________________________________________________________________________
void AliTRDCalDCS::EvaluateGlobalParameters()
{
+ //
+ // Do an evaluation of all global parameters
+ //
+
for(Int_t i=0; i<540; i++) {
AliTRDCalDCSFEE *iDCSFEEObj;
iDCSFEEObj = GetCalDCSFEEObj(i);
-#ifndef AliTRDCALDCS_H
-#define AliTRDCALDCS_H
+#ifndef ALITRDCALDCS_H
+#define ALITRDCALDCS_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
virtual ~AliTRDCalDCS() { };
void EvaluateGlobalParameters();
- void SetFEEArr(TObjArray *fa) { fFEEArr = fa; }
- void SetPTRArr(TObjArray *pa) { fPTRArr = pa; }
- void SetGTUArr(TObjArray *ga) { fGTUArr = ga; }
+ void SetFEEArr(TObjArray * const fa) { fFEEArr = fa; }
+ void SetPTRArr(TObjArray * const pa) { fPTRArr = pa; }
+ void SetGTUArr(TObjArray * const ga) { fGTUArr = ga; }
Int_t GetGlobalNumberOfTimeBins() const { return fGNumberOfTimeBins; }
Int_t GetGlobalConfigTag() const { return fGConfigTag; }
//\r
// AliTRDCalDCSFEE default constructor\r
//\r
- for(Int_t i=0; i<nROB; i++) {\r
- for(Int_t j=0; j<nMCM; j++) {\r
+ for(Int_t i=0; i<fgkROB; i++) {\r
+ for(Int_t j=0; j<fgkMCM; j++) {\r
fRStateGSM[i][j] = -1;\r
fRStateNI[i][j] = -1;\r
fRStateEV[i][j] = -1;\r
//\r
// AliTRDCalDCSFEE constructor\r
//\r
- for(Int_t i=0; i<nROB; i++) {\r
- for(Int_t j=0; j<nMCM; j++) {\r
+ for(Int_t i=0; i<fgkROB; i++) {\r
+ for(Int_t j=0; j<fgkMCM; j++) {\r
fRStateGSM[i][j] = -1;\r
fRStateNI[i][j] = -1;\r
fRStateEV[i][j] = -1;\r
-#ifndef AliTRDCALDCSFEE_H\r
-#define AliTRDCALDCSFEE_H\r
+#ifndef ALITRDCALDCSFEE_H\r
+#define ALITRDCALDCSFEE_H\r
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
* See cxx source for full Copyright notice */\r
\r
Int_t GetMCMPtCnt(Int_t r,Int_t m) const { return fRStatePTRG[r][m]; }\r
\r
protected:\r
- static const Int_t nROB = 8;\r
- static const Int_t nMCM = 18;\r
+\r
+ static const Int_t fgkROB = 8; // Number of readout boards\r
+ static const Int_t fgkMCM = 18; // Number of MCMs\r
\r
- Int_t fStatusBit; // 0 if everything is OK, otherwise !=0 (see impl. file)\r
- Int_t fDCSID; // ID of the DCS-Board\r
- Int_t fSM; // the number of the supermode 0..17\r
- Int_t fStack; // the number of the stack 0..4\r
- Int_t fLayer; // the number of the layer 0..5\r
- Int_t fNumberOfTimeBins; // Number of timebins \r
- Int_t fConfigTag; // Configuration tag\r
- Int_t fSingleHitThres; // threshold of single hits (arg of readout param)\r
- Int_t fThrPdClsThres; // threshold of 3-pad clusters (arg of readout param)\r
- Int_t fSelNoZS; // write every fSelNoZS'th event without ZS\r
- Int_t fTCFilterWeight; // tail cancellation filter weight\r
- Int_t fTCFilterShortDecPar; // tail cancellation filter short decay parameter\r
- Int_t fTCFilterLongDecPar; // tail cancellation filter long decay parameter\r
- Int_t fFastStatNoise; // collect statistics for fast noise mode\r
- Int_t fRStateGSM[nROB][nMCM]; // array of the global states of the MCMs\r
- Int_t fRStateNI[nROB][nMCM]; // array of the network interface states of the MCMs\r
- Int_t fRStateEV[nROB][nMCM]; // array of the event counters of the MCMs\r
- Int_t fRStatePTRG[nROB][nMCM]; // array of the pretrigger counters of the MCMs\r
- TString fFilterType; // filter type (p, pgt, nf)\r
- TString fReadoutParam; // readout parameter (zs, nozs, testpattern)\r
- TString fTestPattern; // value of testpattern (for readout param)\r
- TString fTrackletMode; // tracklet mode (trk, csmtrk, notrk)\r
- TString fTrackletDef; // definition for tracklet mode trk\r
- TString fTriggerSetup; // trigger setup (ptrg, autotrg, autol0)\r
- TString fAddOptions; // additional options (nopm, nion)\r
- TString fConfigName; // Configuration name\r
- TString fConfigVersion; // Configuration version\r
+ Int_t fStatusBit; // 0 if everything is OK, otherwise !=0 (see impl. file)\r
+ Int_t fDCSID; // ID of the DCS-Board\r
+ Int_t fSM; // the number of the supermode 0..17\r
+ Int_t fStack; // the number of the stack 0..4\r
+ Int_t fLayer; // the number of the layer 0..5\r
+ Int_t fNumberOfTimeBins; // Number of timebins \r
+ Int_t fConfigTag; // Configuration tag\r
+ Int_t fSingleHitThres; // threshold of single hits (arg of readout param)\r
+ Int_t fThrPdClsThres; // threshold of 3-pad clusters (arg of readout param)\r
+ Int_t fSelNoZS; // write every fSelNoZS'th event without ZS\r
+ Int_t fTCFilterWeight; // tail cancellation filter weight\r
+ Int_t fTCFilterShortDecPar; // tail cancellation filter short decay parameter\r
+ Int_t fTCFilterLongDecPar; // tail cancellation filter long decay parameter\r
+ Int_t fFastStatNoise; // collect statistics for fast noise mode\r
+ Int_t fRStateGSM[fgkROB][fgkMCM]; // array of the global states of the MCMs\r
+ Int_t fRStateNI[fgkROB][fgkMCM]; // array of the network interface states of the MCMs\r
+ Int_t fRStateEV[fgkROB][fgkMCM]; // array of the event counters of the MCMs\r
+ Int_t fRStatePTRG[fgkROB][fgkMCM]; // array of the pretrigger counters of the MCMs\r
+ TString fFilterType; // filter type (p, pgt, nf)\r
+ TString fReadoutParam; // readout parameter (zs, nozs, testpattern)\r
+ TString fTestPattern; // value of testpattern (for readout param)\r
+ TString fTrackletMode; // tracklet mode (trk, csmtrk, notrk)\r
+ TString fTrackletDef; // definition for tracklet mode trk\r
+ TString fTriggerSetup; // trigger setup (ptrg, autotrg, autol0)\r
+ TString fAddOptions; // additional options (nopm, nion)\r
+ TString fConfigName; // Configuration name\r
+ TString fConfigVersion; // Configuration version\r
\r
- ClassDef(AliTRDCalDCSFEE,3) // TRD calibration class for TRD FEE parameters\r
+ ClassDef(AliTRDCalDCSFEE,3) // TRD calibration class for TRD FEE parameters\r
};\r
#endif\r
-#ifndef AliTRDCALDCSGTU_H
-#define AliTRDCALDCSGTU_H
+#ifndef ALITRDCALDCSGTU_H
+#define ALITRDCALDCSGTU_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-#ifndef AliTRDCALDCSPTR_H
-#define AliTRDCALDCSPTR_H
+#ifndef ALITRDCALDCSPTR_H
+#define ALITRDCALDCSPTR_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
}
//___________________________________________________________________________________
-Double_t AliTRDCalDet::GetMean(AliTRDCalDet* outlierDet)
+Double_t AliTRDCalDet::GetMean(AliTRDCalDet * const outlierDet) const
{
//
// Calculate the mean
if (!outlierDet) return TMath::Mean(kNdet,fData);
Double_t *ddata = new Double_t[kNdet];
- Int_t NPoints = 0;
+ Int_t nPoints = 0;
for (Int_t i=0;i<kNdet;i++) {
if (!(outlierDet->GetValue(i))) {
- ddata[NPoints]= fData[NPoints];
- NPoints++;
+ ddata[nPoints]= fData[nPoints];
+ nPoints++;
}
}
- Double_t mean = TMath::Mean(NPoints,ddata);
+ Double_t mean = TMath::Mean(nPoints,ddata);
delete [] ddata;
return mean;
}
//_______________________________________________________________________________________
-Double_t AliTRDCalDet::GetMedian(AliTRDCalDet* outlierDet)
+Double_t AliTRDCalDet::GetMedian(AliTRDCalDet * const outlierDet) const
{
//
// Calculate the median
if (!outlierDet) return (Double_t) TMath::Median(kNdet,fData);
Double_t *ddata = new Double_t[kNdet];
- Int_t NPoints = 0;
+ Int_t nPoints = 0;
for (Int_t i=0;i<kNdet;i++) {
if (!(outlierDet->GetValue(i))) {
- ddata[NPoints]= fData[NPoints];
- NPoints++;
+ ddata[nPoints]= fData[nPoints];
+ nPoints++;
}
}
- Double_t mean = TMath::Median(NPoints,ddata);
+ Double_t mean = TMath::Median(nPoints,ddata);
delete [] ddata;
return mean;
}
//____________________________________________________________________________________________
-Double_t AliTRDCalDet::GetRMS(AliTRDCalDet* outlierDet)
+Double_t AliTRDCalDet::GetRMS(AliTRDCalDet * const outlierDet) const
{
//
// Calculate the RMS
if (!outlierDet) return TMath::RMS(kNdet,fData);
Double_t *ddata = new Double_t[kNdet];
- Int_t NPoints = 0;
+ Int_t nPoints = 0;
for (Int_t i=0;i<kNdet;i++) {
if (!(outlierDet->GetValue(i))) {
- ddata[NPoints]= fData[NPoints];
- NPoints++;
+ ddata[nPoints]= fData[nPoints];
+ nPoints++;
}
}
- Double_t mean = TMath::RMS(NPoints,ddata);
+ Double_t mean = TMath::RMS(nPoints,ddata);
delete [] ddata;
return mean;
}
//______________________________________________________________________________________________
-Double_t AliTRDCalDet::GetLTM(Double_t *sigma, Double_t fraction, AliTRDCalDet* outlierDet)
+Double_t AliTRDCalDet::GetLTM(Double_t *sigma
+ , Double_t fraction
+ , AliTRDCalDet * const outlierDet)
{
//
// Calculate LTM mean and sigma
Double_t *ddata = new Double_t[kNdet];
Double_t mean=0, lsigma=0;
- UInt_t NPoints = 0;
+ UInt_t nPoints = 0;
for (Int_t i=0;i<kNdet;i++) {
if (!outlierDet || !(outlierDet->GetValue(i))) {
- ddata[NPoints]= fData[NPoints];
- NPoints++;
+ ddata[nPoints]= fData[nPoints];
+ nPoints++;
}
}
- Int_t hh = TMath::Min(TMath::Nint(fraction *NPoints), Int_t(NPoints));
- AliMathBase::EvaluateUni(NPoints,ddata, mean, lsigma, hh);
+ Int_t hh = TMath::Min(TMath::Nint(fraction *nPoints), Int_t(nPoints));
+ AliMathBase::EvaluateUni(nPoints,ddata, mean, lsigma, hh);
if (sigma) *sigma=lsigma;
delete [] ddata;
return mean;
///////////////////////////////////////////////////////////////////////////////
#include "TNamed.h"
-#include "TMath.h"
+
#include "../AliTRDgeometry.h"
class TH1F;
{ fData[AliTRDgeometry::GetDetector(p,c,s)] = value; };
// statistic
- Double_t GetMean(AliTRDCalDet *outlierDet=0);
- Double_t GetRMS(AliTRDCalDet *outlierDet=0);
- Double_t GetMedian(AliTRDCalDet *outlierDet=0);
- Double_t GetLTM(Double_t *sigma=0, Double_t fraction=0.9, AliTRDCalDet *outlierDet=0);
+ Double_t GetMean(AliTRDCalDet * const outlierDet=0) const;
+ Double_t GetRMS(AliTRDCalDet * const outlierDet=0) const;
+ Double_t GetMedian(AliTRDCalDet * const outlierDet=0) const;
+ Double_t GetLTM(Double_t * sigma=0, Double_t fraction=0.9, AliTRDCalDet * const outlierDet=0);
// Plot functions
TH1F * MakeHisto1Distribution(Float_t min=4, Float_t max=-4, Int_t type=0);
-#ifndef AliTRDCALFEE_H
-#define AliTRDCALFEE_H
+#ifndef ALITRDCALFEE_H
+#define ALITRDCALFEE_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-#ifndef AliTRDCALMONITORING_H
-#define AliTRDCALMONITORING_H
+#ifndef ALITRDCALMONITORING_H
+#define ALITRDCALMONITORING_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
// //
//////////////////////////////////////////////////////////////////////////
-#include <TH1F.h>
-#include <TH2F.h>
-#include <TFile.h>
-#include <TROOT.h>
-
-#include "AliLog.h"
-#include "AliESD.h"
-#include "AliESDtrack.h"
+#include <TObjArray.h>
#include "AliTRDCalPID.h"
-#include "AliTRDcalibDB.h"
ClassImp(AliTRDCalPID)
-const Char_t* AliTRDCalPID::fPartName[AliPID::kSPECIES] = { "electron", "muon", "pion", "kaon", "proton"};
-const Char_t* AliTRDCalPID::fPartSymb[AliPID::kSPECIES] = { "EL", "MU", "PI", "KA", "PR"};
-Color_t AliTRDCalPID::fPartColor[AliPID::kSPECIES] = { kRed, kGreen, kBlue, kYellow, kMagenta};
-Float_t AliTRDCalPID::fTrackMomentum[kNMom] = {
- 0.6, 0.8, 1.0, 1.5, 2.0
- ,3.0, 4.0, 5.0, 6.0, 8.0, 10.0};
-Float_t AliTRDCalPID::fTrackMomentumBinning[kNMom+1] = {
- 0.5, 0.7, 0.9, 1.25, 1.75, 2.5,
- 3.5, 4.5, 5.5, 7.0, 9.0, 12.0};
+const Char_t* AliTRDCalPID::fPartName[AliPID::kSPECIES] = { "electron", "muon", "pion", "kaon", "proton"};
+const Char_t* AliTRDCalPID::fPartSymb[AliPID::kSPECIES] = { "EL", "MU", "PI", "KA", "PR"};
+Color_t AliTRDCalPID::fgPartColor[AliPID::kSPECIES] = { kRed, kGreen, kBlue, kYellow, kMagenta};
+Float_t AliTRDCalPID::fgTrackMomentum[kNMom] = { 0.6, 0.8, 1.0, 1.5, 2.0
+ , 3.0, 4.0, 5.0, 6.0, 8.0, 10.0 };
+Float_t AliTRDCalPID::fgTrackMomentumBinning[kNMom+1] = { 0.5, 0.7, 0.9, 1.25, 1.75, 2.5
+ , 3.5, 4.5, 5.5, 7.0, 9.0, 12.0 };
//_________________________________________________________________________
AliTRDCalPID::AliTRDCalPID()
//_________________________________________________________________________
Int_t AliTRDCalPID::GetPartIndex(Int_t pdg)
{
+ //
+ // Return the index to a given particle, defined by its PDG code
+ //
+
for(Int_t is=0; is<AliPID::kSPECIES; is++){
if(TMath::Abs(pdg) == AliPID::ParticleCode(is)) return is;
}
// //
///////////////////////////////////////////////////////////////////////////////
-#ifndef ROOT_TNamed
#include <TNamed.h>
-#endif
-#ifndef ALIPID_H
#include "AliPID.h"
-#endif
class AliTRDCalPID : public TNamed
{
virtual Bool_t LoadReferences(Char_t *refFile) = 0;
static Double_t GetMomentum(Int_t ip) {
- return (ip<0 || ip>=kNMom) ? -1.0 : fTrackMomentum[ip]; }
+ return (ip<0 || ip>=kNMom) ? -1.0 : fgTrackMomentum[ip]; }
static Double_t GetMomentumBinning(Int_t ip) {
- return (ip<0 || ip>=kNMom+1) ? -1.0 : fTrackMomentumBinning[ip]; }
+ return (ip<0 || ip>=kNMom+1) ? -1.0 : fgTrackMomentumBinning[ip]; }
virtual TObject *GetModel(Int_t ip, Int_t iType, Int_t iPlane) const = 0;
- virtual Double_t GetProbability(Int_t spec, Float_t mom, Float_t *dedx
+ virtual Double_t GetProbability(Int_t spec, Float_t mom
+ , const Float_t * const dedx
, Float_t length, Int_t plane) const = 0;
- static Color_t GetPartColor(Int_t i) { return fPartColor[i]; }
+ static Color_t GetPartColor(Int_t i) { return fgPartColor[i]; }
static Int_t GetPartIndex(Int_t pdg);
- static const Char_t *GetPartName(Int_t i) { return fPartName[i]; }
- static const Char_t *GetPartSymb(Int_t i) { return fPartSymb[i]; }
+ static const Char_t *GetPartName(Int_t i) { return fPartName[i]; }
+ static const Char_t *GetPartSymb(Int_t i) { return fPartSymb[i]; }
- void SetPartName(Int_t i, const Char_t *name) { fPartName[i] = name; }
- void SetPartSymb(Int_t i, const Char_t *symb) { fPartSymb[i] = symb; }
+ void SetPartName(Int_t i, const Char_t *name) { fPartName[i] = name; }
+ void SetPartSymb(Int_t i, const Char_t *symb) { fPartSymb[i] = symb; }
protected:
virtual void Init() = 0;
virtual Int_t GetModelID(Int_t mom, Int_t spec, Int_t plane) const = 0;
+ static const Char_t *fPartName[AliPID::kSPECIES]; //! Names of particle species
+ static const Char_t *fPartSymb[AliPID::kSPECIES]; //! Symbols of particle species
+ static Color_t fgPartColor[AliPID::kSPECIES]; //! Colors of particle species
+ static Float_t fgTrackMomentum[kNMom]; // Track momenta for which response functions are available
+ static Float_t fgTrackMomentumBinning[kNMom+1]; // Defines the start and the endpoints of the momentum bins
+ TObjArray *fModel; // Model for probability estimate
+
private:
AliTRDCalPID(const AliTRDCalPID& pd);
AliTRDCalPID &operator=(const AliTRDCalPID &c);
- protected:
-
- static const Char_t *fPartName[AliPID::kSPECIES]; //! Names of particle species
- static const Char_t *fPartSymb[AliPID::kSPECIES]; //! Symbols of particle species
- static Color_t fPartColor[AliPID::kSPECIES]; //! Colors of particle species
- static Float_t fTrackMomentum[kNMom]; // Track momenta for which response functions are available
- static Float_t fTrackMomentumBinning[kNMom+1]; // Defines the start and the endpoints of the momentum bins
- TObjArray *fModel; // Model for probability estimate
-
- ClassDef(AliTRDCalPID, 3) // Base class for TRD PID methods
+ ClassDef(AliTRDCalPID, 4) // Base class for TRD PID methods
};
#endif
// //
//////////////////////////////////////////////////////////////////////////
-#include <TH1F.h>
#include <TH2F.h>
#include <TFile.h>
#include <TROOT.h>
ClassImp(AliTRDCalPIDLQ)
-Float_t AliTRDCalPIDLQ::fTrackSegLength[kNLength] = { 3.7, 3.9, 4.2, 5.0 };
+Float_t AliTRDCalPIDLQ::fgTrackSegLength[kNLength] = { 3.7, 3.9, 4.2, 5.0 };
//_________________________________________________________________________
AliTRDCalPIDLQ::AliTRDCalPIDLQ()
if (iType < 0 || iType >= AliPID::kSPECIES) return 0x0;
if(ip<0 || ip>= kNMom ) return 0x0;
- AliInfo(Form("Retrive dEdx histogram for %s of %5.2f GeV/c", fPartName[iType], fTrackMomentum[ip]));
+ AliInfo(Form("Retrive dEdx histogram for %s of %5.2f GeV/c", fPartName[iType], fgTrackMomentum[ip]));
return fModel->At(GetModelID(ip, iType, iplane));
}
// find the interval in momentum and track segment length which applies for this data
Int_t ilength = 1;
- while(ilength<kNLength-1 && length>fTrackSegLength[ilength]){
+ while(ilength<kNLength-1 && length>fgTrackSegLength[ilength]){
ilength++;
}
Int_t imom = 1;
- while(imom<kNMom-1 && mom>fTrackMomentum[imom]) imom++;
+ while(imom<kNMom-1 && mom>fgTrackMomentum[imom]) imom++;
Int_t nbinsx, nbinsy;
TAxis *ax = 0x0, *ay = 0x0;
- Double_t LQ1, LQ2;
- Double_t mom1 = fTrackMomentum[imom-1], mom2 = fTrackMomentum[imom];
+ Double_t lq1, lq2;
+ Double_t mom1 = fgTrackMomentum[imom-1], mom2 = fgTrackMomentum[imom];
TH2 *hist = 0x0;
if(!(hist = (TH2D*)fModel->At(GetModelID(imom-1, spec, iplane)))){
AliInfo(Form("Looking for spec(%d) mom(%f) Ex(%f) Ey(%f) length(%f)", spec, mom, dedx[0], dedx[1], length));
Bool_t kX = (x < ax->GetBinUpEdge(nbinsx));
Bool_t kY = (y < ay->GetBinUpEdge(nbinsy));
if(kX)
- if(kY) LQ1 = hist->GetBinContent( hist->FindBin(x, y));
+ if(kY) lq1 = hist->GetBinContent( hist->FindBin(x, y));
//fEstimator->Estimate2D2(hist, x, y);
- else LQ1 = hist->GetBinContent(ax->FindBin(x), nbinsy);
+ else lq1 = hist->GetBinContent(ax->FindBin(x), nbinsy);
else
- if(kY) LQ1 = hist->GetBinContent(nbinsx, ay->FindBin(y));
- else LQ1 = hist->GetBinContent(nbinsx, nbinsy);
+ if(kY) lq1 = hist->GetBinContent(nbinsx, ay->FindBin(y));
+ else lq1 = hist->GetBinContent(nbinsx, nbinsy);
if(!(hist = (TH2D*)fModel->At(GetModelID(imom, spec, iplane)))){
AliInfo(Form("Looking for spec(%d) mom(%f) Ex(%f) Ey(%f) length(%f)", spec, mom, dedx[0], dedx[1], length));
AliError(Form("EHistogram id %d not found in DB.", GetModelID(imom, spec, iplane)));
- return LQ1;
+ return lq1;
}
if(kX)
- if(kY) LQ2 = hist->GetBinContent( hist->FindBin(x, y));
+ if(kY) lq2 = hist->GetBinContent( hist->FindBin(x, y));
//fEstimator->Estimate2D2(hist, x, y);
- else LQ2 = hist->GetBinContent(ax->FindBin(x), nbinsy);
+ else lq2 = hist->GetBinContent(ax->FindBin(x), nbinsy);
else
- if(kY) LQ2 = hist->GetBinContent(nbinsx, ay->FindBin(y));
- else LQ2 = hist->GetBinContent(nbinsx, nbinsy);
+ if(kY) lq2 = hist->GetBinContent(nbinsx, ay->FindBin(y));
+ else lq2 = hist->GetBinContent(nbinsx, nbinsy);
// return interpolation over momentum binning
- if(mom < fTrackMomentum[0]) return LQ1;
- else if(mom > fTrackMomentum[kNMom-1]) return LQ2;
- else return LQ1 + (LQ2 - LQ1)*(mom - mom1)/(mom2 - mom1);
+ if(mom < fgTrackMomentum[0]) return lq1;
+ else if(mom > fgTrackMomentum[kNMom-1]) return lq2;
+ else return lq1 + (lq2 - lq1)*(mom - mom1)/(mom2 - mom1);
}
}
//_________________________________________________________________________
-Int_t AliTRDCalPIDLQ::GetModelID(Int_t mom, Int_t spec, Int_t) const
+Int_t AliTRDCalPIDLQ::GetModelID(Int_t mom, Int_t spec, Int_t /*ii*/) const
{
// returns the ID of the LQ distribution (55 Histos, ID from 1 to 55)
// //
////////////////////////////////////////////////////////////////////////////
-#ifndef ALITRDCALPID_H
#include "AliTRDCalPID.h"
-#endif
class AliTRDCalPIDLQ : public AliTRDCalPID
{
Bool_t LoadReferences(Char_t* refFile);
TObject* GetModel(Int_t ip, Int_t iType, Int_t iPlane) const;
- static Double_t GetLength(Int_t il) { return (il<0 || il>=kNLength) ? -1. : fTrackSegLength[il]; }
+ static Double_t GetLength(Int_t il) { return (il<0 || il>=kNLength) ? -1. : fgTrackSegLength[il]; }
Double_t GetProbability(Int_t spec, Float_t mom, Float_t *dedx
, Float_t length, Int_t plane) const;
+ protected:
+
+ static Float_t fgTrackSegLength[kNLength]; // Track segment lengths
+
private:
AliTRDCalPIDLQ(const AliTRDCalPIDLQ& pd);
AliTRDCalPIDLQ& operator=(const AliTRDCalPIDLQ &c);
void Init();
- Int_t GetModelID(Int_t mom, Int_t , Int_t) const;
-
- protected:
-
- static Float_t fTrackSegLength[kNLength]; // Track segment lengths
+ Int_t GetModelID(Int_t mom, Int_t spec, Int_t ii) const;
- ClassDef(AliTRDCalPIDLQ, 1) // LQ PID reference manager
+ ClassDef(AliTRDCalPIDLQ, 2) // LQ PID reference manager
};
#endif
#include <TFile.h>
#include <TROOT.h>
-#include <TObject.h>
#include <TMultiLayerPerceptron.h>
-#include "AliLog.h"
#include "AliPID.h"
-#include "AliESD.h"
-#include "AliESDtrack.h"
#include "AliTRDtrack.h"
#include "AliTRDgeometry.h"
if (ip<0 || ip>= kNMom) return 0x0;
AliInfo(Form("Retrive MultiLayerPerceptron for %5.2f GeV/c for plane %d"
- ,fTrackMomentum[ip]
+ ,fgTrackMomentum[ip]
,iplane));
return fModel->At(GetModelID(ip, 0, iplane));
}
//_________________________________________________________________________
-Double_t AliTRDCalPIDNN::GetProbability(Int_t spec, Float_t mom, Float_t *dedx
+Double_t AliTRDCalPIDNN::GetProbability(Int_t spec, Float_t mom
+ , const Float_t * const dedx
, Float_t, Int_t iplane) const
{
//
// find the interval in momentum and track segment length which applies for this data
Int_t imom = 1;
- while (imom<AliTRDCalPID::kNMom-1 && mom>fTrackMomentum[imom]) imom++;
+ while (imom<AliTRDCalPID::kNMom-1 && mom>fgTrackMomentum[imom]) imom++;
Double_t lNN1, lNN2;
- Double_t mom1 = fTrackMomentum[imom-1], mom2 = fTrackMomentum[imom];
+ Double_t mom1 = fgTrackMomentum[imom-1], mom2 = fgTrackMomentum[imom];
TMultiLayerPerceptron *nn = 0x0;
if(!(nn = (TMultiLayerPerceptron *) fModel->At(GetModelID(imom-1, spec, iplane/*, ilength*/)))){
lNN2 = nn->Evaluate(spec, ddedx);
// return interpolation over momentum binning
- if (mom < fTrackMomentum[0]) {
+ if (mom < fgTrackMomentum[0]) {
return lNN1;
}
- else if (mom > fTrackMomentum[AliTRDCalPID::kNMom-1]) {
+ else if (mom > fgTrackMomentum[AliTRDCalPID::kNMom-1]) {
return lNN2;
}
else {
}
//_________________________________________________________________________
-Int_t AliTRDCalPIDNN::GetModelID(Int_t mom, Int_t, Int_t plane) const
+Int_t AliTRDCalPIDNN::GetModelID(Int_t mom, Int_t /*ii*/, Int_t plane) const
{
// returns the ID of the NN distribution (66 MLPs, ID from 56 to 121)
// //
////////////////////////////////////////////////////////////////////////////
-#ifndef ALITRDCALPID_H
#include "AliTRDCalPID.h"
-#endif
class AliTRDCalPIDNN : public AliTRDCalPID
{
virtual ~AliTRDCalPIDNN();
Bool_t LoadReferences(Char_t *refFile);
TObject *GetModel(Int_t ip, Int_t iType, Int_t iPlane) const;
- Double_t GetProbability(Int_t spec, Float_t mom, Float_t *dedx, Float_t length, Int_t plane) const;
+ Double_t GetProbability(Int_t spec, Float_t mom
+ , const Float_t * const dedx
+ , Float_t length, Int_t plane) const;
private:
AliTRDCalPIDNN &operator=(const AliTRDCalPIDNN &c);
void Init();
- Int_t GetModelID(Int_t mom, Int_t , Int_t) const;
+ Int_t GetModelID(Int_t mom, Int_t ii, Int_t plane) const;
ClassDef(AliTRDCalPIDNN, 1) // NN PID reference manager