1) Centrality dependent thresholds parameters
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Sep 2012 13:41:30 +0000 (13:41 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Sep 2012 13:41:30 +0000 (13:41 +0000)
2) The PID method is now an argument in the functions. In the current implementation the PID method is a class member and can be modified by anybody which is
dangerous if many users are interacting.
The user can now select the method in the functions in AliPIDResponse, 1D is chosen by default. These changes require some small changes in the TRD folder and
the tender supply.
3) As a consequence, only for the 1D PID cached values are used and the 2D PID is recalculated (1D is standard method and 2D is only used by some users so far)

17 files changed:
ANALYSIS/TenderSupplies/AliTRDTenderSupply.cxx
STEER/STEER/AliSimulation.cxx
STEER/STEERBase/AliGenDPMjetEventHeader.cxx
STEER/STEERBase/AliGenDPMjetEventHeader.h
STEER/STEERBase/AliPIDResponse.cxx
STEER/STEERBase/AliPIDResponse.h
STEER/STEERBase/AliTRDPIDParams.cxx
STEER/STEERBase/AliTRDPIDParams.h
STEER/STEERBase/AliTRDPIDResponse.cxx
STEER/STEERBase/AliTRDPIDResponse.h
STEER/STEERBase/AliTRDPIDResponseObject.cxx
STEER/STEERBase/AliTRDPIDResponseObject.h
STEER/STEERBase/AliTRDTKDInterpolator.cxx
STEER/STEERBase/AliTRDTKDInterpolator.h
STEER/STEERBaseLinkDef.h
TRD/AliTRDcalibDB.cxx
TRD/AliTRDtrackV1.cxx

index 0f798f71be08b7f7997e218c73a46953b956dd7d..61645c24cb17ab4ad1971157a0e808f1bbe3cafa 100644 (file)
@@ -144,7 +144,7 @@ void AliTRDTenderSupply::Init()
   // Load References
   if(fLoadReferences && !fLoadReferencesFromCDB) LoadReferences();
   //fESDpid->GetTRDResponse().SetGainNormalisationFactor(fNormalizationFactor);
-  fESDpid->SetTRDslicesForPID(fSlicesForPID[0], fSlicesForPID[1]);
+  //fESDpid->SetTRDslicesForPID(fSlicesForPID[0], fSlicesForPID[1]);
 
   if(fNameRunByRunCorrection.Length()) LoadRunByRunCorrection(fNameRunByRunCorrection.Data());
 
index 9c19de17b6f25c830a0fe9ceeac755930a05fc3b..7ffa636e5266e8f7664110c907925d7779cfb486 100644 (file)
@@ -1091,8 +1091,9 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents)
 
    gMC->SetMagField(TGeoGlobalMagField::Instance()->GetField());
    AliSysInfo::AddStamp("RunSimulation_GetField");
-   
+   printf("Init() called \n");
    gAlice->GetMCApp()->Init();
+   printf("Init() back \n");
    AliSysInfo::AddStamp("RunSimulation_InitMCApp");
 
    //Must be here because some MCs (G4) adds detectors here and not in Config.C
@@ -1211,7 +1212,7 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents)
 
   // Create the Root Tree with one branch per detector
   //Hits moved to begin event -> now we are crating separate tree for each event
-
+  printf("AliSimulation::ProcessRun called \n");
   gMC->ProcessRun(nEvents);
 
   // End of this run, close files
index ea2a8071c72bace4fba4a476749536e88412a28b..db143c6beda74d0f6c295f6bb57a6c355f4ab6a2 100644 (file)
@@ -22,7 +22,10 @@ AliGenDPMjetEventHeader::AliGenDPMjetEventHeader():
     AliCollisionGeometry(),
     fTotalEnergy(0.),
     fTrials(0), 
-    fProcessType(0)
+    fProcessType(0),
+    fNSD1(0),
+    fNSD2(0),
+    fNDD(0)
 {
     // Default constructor
 }
@@ -33,7 +36,10 @@ AliGenDPMjetEventHeader::AliGenDPMjetEventHeader(const char* name):
     AliCollisionGeometry(),
     fTotalEnergy(0.),
     fTrials(0), 
-    fProcessType(0)
+    fProcessType(0),
+    fNSD1(0),
+    fNSD2(0),
+    fNDD(0)
 {
     // Constructor
 }
index 11443bbff0e0eab901bce6f3eb561aa14f9f352d..7225bfc046d588d02c9a546571c6707eaec0b3e4 100644 (file)
@@ -20,8 +20,8 @@ class AliGenDPMjetEventHeader : public AliGenEventHeader, public AliCollisionGeo
   Float_t TotalEnergy()  const {return fTotalEnergy;} 
   Int_t   Trials()       const {return fTrials;}
   Int_t   ProcessType()  const {return fProcessType;}
-  
-         
+  void    SetNDiffractive(Int_t sd1, Int_t sd2, Int_t sdd) {fNSD1 = sd1; fNSD2 = sd2; fNDD = sdd;}
+  void    GetNDiffractive(Int_t& sd1, Int_t& sd2, Int_t& sdd) {sd1 = fNSD1; sd2 = fNSD2; sdd = fNDD;}
   // Setters
   void SetTotalEnergy(Float_t energy)  {fTotalEnergy = energy;}
   void SetTrials(Int_t trials)         {fTrials      = trials;}
@@ -31,7 +31,9 @@ protected:
   Float_t fTotalEnergy;              // Total energy of produced particles
   Int_t   fTrials;                   // Number of trials to fulfill trigger condition
   Int_t   fProcessType;              // Process Type 
-  
+  Int_t   fNSD1;                     // number of SD1 in pA, AA 
+  Int_t   fNSD2;                     // number of SD2 in pA, AA
+  Int_t   fNDD;                      // number of DD  in pA, AA
   ClassDef(AliGenDPMjetEventHeader,1) // Event header for dpmjet event
 };
 
index 138c29b85c20acaefc39dfd089deaa991fa32f1d..f8cd94558ef4475da01e6b867cac6e9e4f703293 100644 (file)
@@ -86,7 +86,6 @@ fTuneMConData(kFALSE)
   AliLog::SetClassDebugLevel("AliESDpid",0);
   AliLog::SetClassDebugLevel("AliAODpidUtil",0);
 
-  memset(fTRDslicesForPID,0,sizeof(UInt_t)*2);
 }
 
 //______________________________________________________________________________
@@ -136,7 +135,6 @@ fTuneMConData(kFALSE)
   //
   // copy ctor
   //
-  memset(fTRDslicesForPID,0,sizeof(UInt_t)*2);
 }
 
 //______________________________________________________________________________
@@ -172,10 +170,10 @@ AliPIDResponse& AliPIDResponse::operator=(const AliPIDResponse &other)
     fOADBvoltageMaps=NULL;
     fTRDPIDResponseObject=NULL;
     fEMCALPIDParams=NULL;
-    memset(fTRDslicesForPID,0,sizeof(UInt_t)*2);
     fTOFtail=1.1;
     fTOFPIDParams=NULL;
     fCurrentEvent=other.fCurrentEvent;
+
   }
   return *this;
 }
@@ -579,32 +577,34 @@ AliPIDResponse::EDetPidStatus AliPIDResponse::ComputeTOFProbability  (const AliV
   return kDetPidOk;
 }
 //______________________________________________________________________________
-AliPIDResponse::EDetPidStatus AliPIDResponse::ComputeTRDProbability  (const AliVTrack *track, Int_t nSpecies, Double_t p[]) const
+AliPIDResponse::EDetPidStatus AliPIDResponse::ComputeTRDProbability  (const AliVTrack *track, Int_t nSpecies, Double_t p[],AliTRDPIDResponse::ETRDPIDMethod PIDmethod) const
 {
   //
   // Compute PID response for the
-  //
-  
+    //
   // look for cached value first
-  if (track->GetDetectorPID()){
-    return track->GetDetectorPID()->GetRawProbability(kTRD, p, nSpecies);
+    if (track->GetDetectorPID()&&PIDmethod==AliTRDPIDResponse::kLQ1D){
+      AliDebug(3,"Return Cached Value");
+      return track->GetDetectorPID()->GetRawProbability(kTRD, p, nSpecies);
   }
   
+    UInt_t TRDslicesForPID[2];
+    SetTRDSlices(TRDslicesForPID,PIDmethod);
   // set flat distribution (no decision)
   for (Int_t j=0; j<nSpecies; j++) p[j]=1./nSpecies;
   if((track->GetStatus()&AliVTrack::kTRDout)==0) return kDetNoSignal;
 
   Float_t mom[6]={0.};
   Double_t dedx[48]={0.};  // Allocate space for the maximum number of TRD slices
-  Int_t nslices = fTRDslicesForPID[1] - fTRDslicesForPID[0] + 1;
-  AliDebug(1, Form("First Slice: %d, Last Slice: %d, Number of slices: %d",  fTRDslicesForPID[0], fTRDslicesForPID[1], nslices));
+  Int_t nslices = TRDslicesForPID[1] - TRDslicesForPID[0] + 1;
+  AliDebug(1, Form("First Slice: %d, Last Slice: %d, Number of slices: %d",  TRDslicesForPID[0], TRDslicesForPID[1], nslices));
   for(UInt_t ilayer = 0; ilayer < 6; ilayer++){
     mom[ilayer] = track->GetTRDmomentum(ilayer);
-    for(UInt_t islice = fTRDslicesForPID[0]; islice <= fTRDslicesForPID[1]; islice++){
-      dedx[ilayer*nslices+islice-fTRDslicesForPID[0]] = track->GetTRDslice(ilayer, islice);
+    for(UInt_t islice = TRDslicesForPID[0]; islice <= TRDslicesForPID[1]; islice++){
+      dedx[ilayer*nslices+islice-TRDslicesForPID[0]] = track->GetTRDslice(ilayer, islice);
     }
   }
-  fTRDResponse.GetResponse(nslices, dedx, mom, p);
+  fTRDResponse.GetResponse(nslices, dedx, mom, p,PIDmethod);
   return kDetPidOk;
 }
 //______________________________________________________________________________
@@ -1084,28 +1084,27 @@ void AliPIDResponse::InitializeTRDResponse(){
   // Set PID Params and references to the TRD PID response
   // 
     fTRDResponse.SetPIDResponseObject(fTRDPIDResponseObject);
-    SetTRDPIDmethod();
 }
 
-void AliPIDResponse::SetTRDPIDmethod(AliTRDPIDResponse::ETRDPIDMethod method){
-  
-  fTRDResponse.SetPIDmethod(method);
-  if(fLHCperiod == "LHC10d" || fLHCperiod == "LHC10e"){
-    // backward compatibility for setting with 8 slices
-    fTRDslicesForPID[0] = 0;
-    fTRDslicesForPID[1] = 7;
-  }
-  else{
-    if(method==AliTRDPIDResponse::kLQ1D){
-      fTRDslicesForPID[0] = 0; // first Slice contains normalized dEdx
-      fTRDslicesForPID[1] = 0;
+//______________________________________________________________________________
+void AliPIDResponse::SetTRDSlices(UInt_t TRDslicesForPID[2],AliTRDPIDResponse::ETRDPIDMethod method) const{
+
+    if(fLHCperiod == "LHC10d" || fLHCperiod == "LHC10e"){
+       // backward compatibility for setting with 8 slices
+       TRDslicesForPID[0] = 0;
+       TRDslicesForPID[1] = 7;
     }
-    if(method==AliTRDPIDResponse::kLQ2D){
-      fTRDslicesForPID[0] = 1;
-      fTRDslicesForPID[1] = 7;
+    else{
+       if(method==AliTRDPIDResponse::kLQ1D){
+           TRDslicesForPID[0] = 0; // first Slice contains normalized dEdx
+           TRDslicesForPID[1] = 0;
+       }
+       if(method==AliTRDPIDResponse::kLQ2D){
+           TRDslicesForPID[0] = 1;
+           TRDslicesForPID[1] = 7;
+       }
     }
-  }
-  AliDebug(1,Form("Slice Range set to %d - %d",fTRDslicesForPID[0],fTRDslicesForPID[1]));
+    AliDebug(1,Form("Slice Range set to %d - %d",TRDslicesForPID[0],TRDslicesForPID[1]));
 }
 
 //______________________________________________________________________________
@@ -1152,12 +1151,13 @@ void AliPIDResponse::InitializeTOFResponse(){
 
 
 //_________________________________________________________________________
-Bool_t AliPIDResponse::IdentifiedAsElectronTRD(const AliVTrack *vtrack, Double_t efficiencyLevel) const {
+Bool_t AliPIDResponse::IdentifiedAsElectronTRD(const AliVTrack *vtrack, Double_t efficiencyLevel,Double_t centrality,AliTRDPIDResponse::ETRDPIDMethod PIDmethod) const {
   //
   // Check whether track is identified as electron under a given electron efficiency hypothesis
-  //
+    //
+
   Double_t probs[AliPID::kSPECIES];
-  ComputeTRDProbability(vtrack, AliPID::kSPECIES, probs);
+  ComputeTRDProbability(vtrack, AliPID::kSPECIES, probs,PIDmethod);
 
   Int_t ntracklets = vtrack->GetTRDntrackletsPID();
   // Take mean of the TRD momenta in the given tracklets
@@ -1170,7 +1170,7 @@ Bool_t AliPIDResponse::IdentifiedAsElectronTRD(const AliVTrack *vtrack, Double_t
   }
   p = TMath::Mean(nmomenta, trdmomenta);
 
-  return fTRDResponse.IdentifiedAsElectron(ntracklets, probs, p, efficiencyLevel);
+  return fTRDResponse.IdentifiedAsElectron(ntracklets, probs, p, efficiencyLevel,centrality,PIDmethod);
 }
 
 //______________________________________________________________________________
index 82f158b851ae3d0f25373a1e6f7a5bc467d7df73..f0fadd32003484062b98c0d681190a9f27b9be94 100644 (file)
@@ -83,7 +83,7 @@ public:
   virtual Float_t NumberOfSigmasTOF  (const AliVParticle *track, AliPID::EParticleType type) const = 0;
   virtual Float_t NumberOfSigmasEMCAL(const AliVParticle *track, AliPID::EParticleType type) const;
 
-  virtual Bool_t IdentifiedAsElectronTRD(const AliVTrack *track, Double_t efficiencyLevel) const;
+  virtual Bool_t IdentifiedAsElectronTRD(const AliVTrack *track, Double_t efficiencyLevel,Double_t centrality=-1,AliTRDPIDResponse::ETRDPIDMethod PIDmethod=AliTRDPIDResponse::kLQ1D) const;
 
   EDetPidStatus ComputePIDProbability  (EDetector detCode, const AliVTrack *track, Int_t nSpecies, Double_t p[]) const;
   EDetPidStatus ComputePIDProbability  (EDetCode  detCode, const AliVTrack *track, Int_t nSpecies, Double_t p[]) const;
@@ -91,15 +91,12 @@ public:
   EDetPidStatus ComputeITSProbability  (const AliVTrack *track, Int_t nSpecies, Double_t p[]) const;
   EDetPidStatus ComputeTPCProbability  (const AliVTrack *track, Int_t nSpecies, Double_t p[]) const;
   EDetPidStatus ComputeTOFProbability  (const AliVTrack *track, Int_t nSpecies, Double_t p[]) const;
-  EDetPidStatus ComputeTRDProbability  (const AliVTrack *track, Int_t nSpecies, Double_t p[]) const;
+  EDetPidStatus ComputeTRDProbability  (const AliVTrack *track, Int_t nSpecies, Double_t p[],AliTRDPIDResponse::ETRDPIDMethod PIDmethod=AliTRDPIDResponse::kLQ1D) const;
   EDetPidStatus ComputeEMCALProbability(const AliVTrack *track, Int_t nSpecies, Double_t p[]) const;
   EDetPidStatus ComputePHOSProbability (const AliVTrack *track, Int_t nSpecies, Double_t p[]) const;
   EDetPidStatus ComputeHMPIDProbability(const AliVTrack *track, Int_t nSpecies, Double_t p[]) const;
 
-  void SetTRDPIDmethod(AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D);
-  
   void SetITSPIDmethod(ITSPIDmethod pmeth) { fITSPIDmethod = pmeth; }
-  void SetTRDslicesForPID(UInt_t slice1, UInt_t slice2) {fTRDslicesForPID[0]=slice1;fTRDslicesForPID[1]=slice2;}
   
   void SetOADBPath(const char* path) {fOADBPath=path;}
   const char *GetOADBPath() const {return fOADBPath.Data();}
@@ -165,7 +162,6 @@ private:
   AliOADBContainer* fOADBvoltageMaps;  //! container with the voltage maps
 
   AliTRDPIDResponseObject *fTRDPIDResponseObject; //! TRD PID Response Object
-  UInt_t fTRDslicesForPID[2];           //! TRD PID slices
 
   Float_t fTOFtail;                    //! TOF tail effect used in TOF probability
   AliTOFPIDParams *fTOFPIDParams;      //! TOF PID Params - period depending (OADB loaded)
@@ -195,6 +191,7 @@ private:
   //TRD
   void SetTRDPidResponseMaster();
   void InitializeTRDResponse();
+  void SetTRDSlices(UInt_t TRDslicesForPID[2],AliTRDPIDResponse::ETRDPIDMethod method) const;
 
   //TOF
   void SetTOFPidResponseMaster();
index 4d8a38b0ac86e4a8fa036b3081b6f7a9f4ba061a..a421a4892d879fe1c637fdeea73b0381c34f8b8c 100644 (file)
@@ -17,6 +17,7 @@
 //
 // Author: Markus Fasel <M.Fasel@gsi.de>
 //
+#include <TList.h>
 #include <TMath.h>
 #include <TSortedList.h>
 
@@ -25,6 +26,8 @@
 #include "AliTRDPIDParams.h"
 
 ClassImp(AliTRDPIDParams)
+//ClassImp(AliTRDPIDParams::AliTRDPIDThresholds)
+//ClassImp(AliTRDPIDParams::AliTRDPIDCentrality)
 
 const Double_t AliTRDPIDParams::kVerySmall = 1e-5;
 
@@ -46,7 +49,7 @@ AliTRDPIDParams::AliTRDPIDParams(const char *name) :
   //
   // Default constructor
   //
-  fEntries = new TSortedList;
+  fEntries = new TList;
 }
 
 //____________________________________________________________
@@ -58,7 +61,7 @@ fEntries(NULL)
     // Copy constructor
     //
 
-    fEntries=(TSortedList*)ref.fEntries->Clone();
+    fEntries=(TList*)ref.fEntries->Clone();
 }
 
 //____________________________________________________________
@@ -70,45 +73,65 @@ AliTRDPIDParams::~AliTRDPIDParams(){
 }
 
 //____________________________________________________________
-Bool_t AliTRDPIDParams::GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params) const{
+void AliTRDPIDParams::AddCentralityClass(Double_t minCentrality, Double_t maxCentrality){
+  // 
+  // Add new centrality class
+  //
+  
+  // check whether centrality class already exists
+  AliTRDPIDCentrality *checklow = FindCentrality(minCentrality + 0.01),
+                      *checkhigh = FindCentrality(maxCentrality - 0.01);
+
+  if(!checklow && ! checkhigh)
+    fEntries->Add(new AliTRDPIDCentrality(minCentrality, maxCentrality));
+}
+
+//____________________________________________________________ 
+AliTRDPIDParams::AliTRDPIDCentrality *AliTRDPIDParams::FindCentrality(Double_t val) const {
+  //
+  // Find centrality bin
+  //
+  TIter centralities(fEntries);
+  AliTRDPIDCentrality *obj(NULL), *tmp(NULL);
+  while((obj = dynamic_cast<AliTRDPIDCentrality *>(centralities()))){
+    if(val >= obj->GetMinCentrality() && val <= obj->GetMaxCentrality()){
+      tmp = obj;
+      break;
+    }
+  }
+  return tmp;
+}
+
+//____________________________________________________________
+Bool_t AliTRDPIDParams::GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params, Double_t centrality) const{
   //
   // Retrieve params
   // Use IsEqual definition
   //
-  AliTRDPIDThresholds test(ntracklets, efficiency);
-  TObject *result = fEntries->FindObject(&test);
-  if(!result){ 
-    AliDebug(1, Form("No threshold params found for %d tracklets and an electron efficiency of %f", ntracklets, efficiency));
+  AliTRDPIDCentrality *cent = FindCentrality(centrality);
+  if(!cent){
+    AliDebug(1, "Centrality class not available");
     return kFALSE;
   }
-  AliTRDPIDThresholds *parResult = static_cast<AliTRDPIDThresholds *>(result);
-  AliDebug(1, Form("Threshold params found: NTracklets %d, Electron Efficiency %f", parResult->GetNTracklets(), parResult->GetElectronEfficiency()));
-  memcpy(params, parResult->GetThresholdParams(), sizeof(Double_t) * 4);
+  cent->GetThresholdParameters(ntracklets, efficiency, params);
   return kTRUE;
 }
 
 //____________________________________________________________
-void AliTRDPIDParams::SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params){
-  // 
-  // Store new Params in the Object
+void AliTRDPIDParams::SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params, Double_t centrality){
   //
-  if(effMin > effMax){
-    AliError("Min. efficiency has to be >= max. efficiency");
-    return;
-  }
-  AliDebug(1, Form("Save Parameters for %d tracklets at and electron efficiency of [%f|%f]", ntracklets, effMin, effMax));
-  fEntries->Add(new AliTRDPIDThresholds(ntracklets, effMin, effMax, params));
+  // Set new threshold parameters
+  //
+  AliTRDPIDCentrality *cent = FindCentrality(centrality);
+  if(cent) cent->SetThresholdParameters(ntracklets, effMin, effMax, params);
+  else AliDebug(1, "Centrality class not available");
 }
 
 //____________________________________________________________
 void AliTRDPIDParams::Print(Option_t *) const {
-  printf("Available thresholds:\n");
-  printf("_________________________________________\n");
-  TIter objects(fEntries);
-  AliTRDPIDThresholds *par;
-  while((par = dynamic_cast<AliTRDPIDThresholds *>(objects()))){
-    printf("Number of tracklets %d, Electron efficiency %f\n", par->GetNTracklets(), par->GetElectronEfficiency());
-  }
+  TIter centIter(fEntries);
+  AliTRDPIDCentrality *cent;
+  while((cent = dynamic_cast<AliTRDPIDCentrality *>(centIter()))) cent->Print(NULL);
 }
 
 //____________________________________________________________
@@ -219,3 +242,112 @@ Bool_t AliTRDPIDParams::AliTRDPIDThresholds::IsEqual(const TObject *ref) const {
   
   return  eqNTracklets && eqEff;
 }
+
+//____________________________________________________________
+AliTRDPIDParams::AliTRDPIDCentrality::AliTRDPIDCentrality():
+  fEntries(NULL),
+  fMinCentrality(-1.),
+  fMaxCentrality(-1.)
+{
+  //
+  // Dummy constructor
+  //
+}
+
+//____________________________________________________________
+AliTRDPIDParams::AliTRDPIDCentrality::AliTRDPIDCentrality(Double_t minCentrality, Double_t maxCentrality):
+  fEntries(NULL),
+  fMinCentrality(minCentrality),
+  fMaxCentrality(maxCentrality)
+{
+  //
+  // Default constructor
+  //
+  fEntries = new TSortedList;
+  fEntries->SetOwner();
+}
+
+//____________________________________________________________
+AliTRDPIDParams::AliTRDPIDCentrality::AliTRDPIDCentrality(const AliTRDPIDParams::AliTRDPIDCentrality &ref):
+TObject(),
+fEntries(NULL),
+  fMinCentrality(ref.fMinCentrality),
+  fMaxCentrality(ref.fMaxCentrality)
+{
+  //
+  // Copy constructor
+  //
+  fEntries = new TSortedList;
+  // Coply entries to the new list
+  TIter entries(ref.fEntries);
+  TObject *o;
+  while((o = entries())) fEntries->Add(o);
+}
+
+//____________________________________________________________
+AliTRDPIDParams::AliTRDPIDCentrality &AliTRDPIDParams::AliTRDPIDCentrality::operator=(const AliTRDPIDCentrality &ref){
+  //
+  // Assignment operator
+  //
+  if(&ref != this){
+    if(fEntries) delete fEntries;
+    fEntries = new TSortedList;
+    TIter entries(ref.fEntries);
+    TObject *o;
+    while((o = entries())) fEntries->Add(o);
+    fMinCentrality = ref.fMinCentrality;
+    fMaxCentrality = ref.fMaxCentrality;
+  }
+  return *this;
+}
+
+//____________________________________________________________
+AliTRDPIDParams::AliTRDPIDCentrality::~AliTRDPIDCentrality(){
+  //
+  // Destructor
+  //
+  if(fEntries) delete fEntries;
+}
+
+//____________________________________________________________
+Bool_t AliTRDPIDParams::AliTRDPIDCentrality::GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params) const{
+  // 
+  // Get the threshold parameters
+  //
+  AliTRDPIDThresholds test(ntracklets, efficiency);
+  TObject *result = fEntries->FindObject(&test);
+  if(!result){ 
+    AliDebug(1, Form("No threshold params found for %d tracklets and an electron efficiency of %f", ntracklets, efficiency));
+    return kFALSE;
+  }
+  AliTRDPIDThresholds *parResult = static_cast<AliTRDPIDThresholds *>(result);
+  AliDebug(1, Form("Threshold params found: NTracklets %d, Electron Efficiency %f", parResult->GetNTracklets(), parResult->GetElectronEfficiency()));
+  memcpy(params, parResult->GetThresholdParams(), sizeof(Double_t) * 4);
+  return kTRUE;
+}
+
+//____________________________________________________________
+void AliTRDPIDParams::AliTRDPIDCentrality::SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params){
+  // 
+  // Store new Params in the Object
+  //
+  if(effMin > effMax){
+    AliError("Min. efficiency has to be >= max. efficiency");
+    return;
+  }
+  AliDebug(1, Form("Save Parameters for %d tracklets at and electron efficiency of [%f|%f]", ntracklets, effMin, effMax));
+  fEntries->Add(new AliTRDPIDThresholds(ntracklets, effMin, effMax, params));
+}
+
+//____________________________________________________________
+void AliTRDPIDParams::AliTRDPIDCentrality::Print(Option_t *) const {
+  printf("Min. Centrality: %f, Max. Centrality: %f\n", fMinCentrality, fMaxCentrality);
+  printf("Available thresholds:\n");
+  printf("_________________________________________\n");
+  TIter objects(fEntries);
+  AliTRDPIDThresholds *par;
+  while((par = dynamic_cast<AliTRDPIDThresholds *>(objects()))){
+    printf("Number of tracklets %d, Electron efficiency %f\n", par->GetNTracklets(), 0.5*(par->GetElectronEfficiency(0)+par->GetElectronEfficiency(1)));
+  }
+}
+
index 8dbff9ff8519eeff46f5b7ea224a63fe532e6fa9..c8c4e7349c7bb20d84b4711abbf4d4db0671f6c5 100644 (file)
@@ -22,6 +22,7 @@
 #include <TNamed.h>
 #endif
 
+class TList;
 class TSortedList;
 
 class AliTRDPIDParams : public TNamed{
@@ -32,40 +33,64 @@ class AliTRDPIDParams : public TNamed{
     virtual ~AliTRDPIDParams();
     virtual void Print(Option_t *) const;
 
-    Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params) const;
-    void SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params);
+    void AddCentralityClass(Double_t minCentrality, Double_t maxCentrality);
+    Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params, Double_t centrality = -1) const;
+    void SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params, Double_t centrality = -1);
 
   private:
     class AliTRDPIDThresholds : public TObject{
     public:
-       AliTRDPIDThresholds();
-       AliTRDPIDThresholds(Int_t nTracklets, Double_t effMin, Double_t effMax, Double_t *params = NULL);
-       AliTRDPIDThresholds(Int_t nTracklets, Double_t eff, Double_t *params = NULL);
-       AliTRDPIDThresholds(const AliTRDPIDThresholds &);
-       AliTRDPIDThresholds &operator=(const AliTRDPIDThresholds &);
-       virtual ~AliTRDPIDThresholds() {}
+      AliTRDPIDThresholds();
+      AliTRDPIDThresholds(Int_t nTracklets, Double_t effMin, Double_t effMax, Double_t *params = NULL);
+      AliTRDPIDThresholds(Int_t nTracklets, Double_t eff, Double_t *params = NULL);
+      AliTRDPIDThresholds(const AliTRDPIDThresholds &);
+      AliTRDPIDThresholds &operator=(const AliTRDPIDThresholds &);
+      virtual ~AliTRDPIDThresholds() {}
 
-        Int_t GetNTracklets() const { return fNTracklets; }
-       Double_t GetElectronEfficiency(Int_t step = 0) const { if(step == 0) return fEfficiency[0]; else return fEfficiency[1]; }
-       const Double_t *GetThresholdParams() const { return fParams; }
+      Int_t GetNTracklets() const { return fNTracklets; }
+      Double_t GetElectronEfficiency(Int_t step = 0) const { if(step == 0) return fEfficiency[0]; else return fEfficiency[1]; }
+      const Double_t *GetThresholdParams() const { return fParams; }
 
-       virtual Bool_t IsSortable() const { return kTRUE; }
-       virtual Int_t Compare(const TObject *ref) const;
-        virtual Bool_t IsEqual(const TObject *ref) const;
+      virtual Bool_t IsSortable() const { return kTRUE; }
+      virtual Int_t Compare(const TObject *ref) const;
+      virtual Bool_t IsEqual(const TObject *ref) const;
 
     private:
-       Int_t fNTracklets;          //
-       Double_t fEfficiency[2];    //
-       Double_t fParams[4];        //
+      Int_t fNTracklets;          //
+      Double_t fEfficiency[2];    //
+      Double_t fParams[4];        //
 
-       ClassDef(AliTRDPIDThresholds, 1);
+      ClassDef(AliTRDPIDThresholds, 1);
     };
 
+    class AliTRDPIDCentrality : public TObject{
+    public:
+       AliTRDPIDCentrality();
+       AliTRDPIDCentrality(Double_t minCentrality, Double_t maxCentrality);
+       AliTRDPIDCentrality(const AliTRDPIDCentrality &ref);
+       AliTRDPIDCentrality &operator=(const AliTRDPIDCentrality &ref);
+       virtual ~AliTRDPIDCentrality();
+
+       Double_t GetMinCentrality() const { return fMinCentrality; };
+       Double_t GetMaxCentrality() const { return fMaxCentrality; };
+        
+       void SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params);
+       Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params) const;
+       void Print(Option_t *) const;
+    private: 
+       TSortedList *fEntries;       //
+       Double_t fMinCentrality;     //
+       Double_t fMaxCentrality;     //
+       ClassDef(AliTRDPIDCentrality, 1);
+    };
+
+    AliTRDPIDCentrality *FindCentrality(Double_t centrality) const;
     AliTRDPIDParams &operator=(const AliTRDPIDParams &);
     static const Double_t kVerySmall;
-    TSortedList *fEntries; //
+    TList *fEntries; //
 
-    ClassDef(AliTRDPIDParams, 1);
+    ClassDef(AliTRDPIDParams, 2);
 };
 #endif
 
+
index 7d5605d3cbf7be2a54dbff3e431098c67656b6ca..b304ea3c03c64d9b10c69e44505166f39d7819b6 100644 (file)
@@ -47,7 +47,6 @@ AliTRDPIDResponse::AliTRDPIDResponse():
   TObject()
   ,fkPIDResponseObject(NULL)
   ,fGainNormalisationFactor(1.)
-  ,fPIDmethod(kLQ1D)
 {
   //
   // Default constructor
@@ -59,7 +58,6 @@ AliTRDPIDResponse::AliTRDPIDResponse(const AliTRDPIDResponse &ref):
   TObject(ref)
   ,fkPIDResponseObject(NULL)
   ,fGainNormalisationFactor(ref.fGainNormalisationFactor)
-  ,fPIDmethod(ref.fPIDmethod)
 {
   //
   // Copy constructor
@@ -77,7 +75,6 @@ AliTRDPIDResponse &AliTRDPIDResponse::operator=(const AliTRDPIDResponse &ref){
   TObject::operator=(ref);
   fGainNormalisationFactor = ref.fGainNormalisationFactor;
   fkPIDResponseObject = ref.fkPIDResponseObject;
-  fPIDmethod = ref.fPIDmethod;
   
   return *this;
 }
@@ -116,7 +113,7 @@ Bool_t AliTRDPIDResponse::Load(const Char_t * filename){
 }
 
 //____________________________________________________________
-Bool_t AliTRDPIDResponse::GetResponse(Int_t n, const Double_t * const dedx, const Float_t * const p, Double_t prob[AliPID::kSPECIES], Bool_t kNorm) const
+Bool_t AliTRDPIDResponse::GetResponse(Int_t n, const Double_t * const dedx, const Float_t * const p, Double_t prob[AliPID::kSPECIES],ETRDPIDMethod PIDmethod,Bool_t kNorm) const
 {
   //
   // Calculate TRD likelihood values for the track based on dedx and 
@@ -134,7 +131,9 @@ Bool_t AliTRDPIDResponse::GetResponse(Int_t n, const Double_t * const dedx, cons
   // 
   // Return value
   //   true if calculation success
-  // 
+    //
+    AliDebug(3,Form(" Response for PID method: %d",PIDmethod));
+
 
     if(!fkPIDResponseObject){
        AliWarning("Missing reference data. PID calculation not possible.");
@@ -146,13 +145,13 @@ Bool_t AliTRDPIDResponse::GetResponse(Int_t n, const Double_t * const dedx, cons
     Double_t dE[10], s(0.);
     for(Int_t il(kNlayer); il--;){
        memset(prLayer, 0, AliPID::kSPECIES*sizeof(Double_t));
-       if(!CookdEdx(n, &dedx[il*n], &dE[0])) continue;
+       if(!CookdEdx(n, &dedx[il*n], &dE[0],PIDmethod)) continue;
 
        s=0.;
         Bool_t filled=kTRUE;
        for(Int_t is(AliPID::kSPECIES); is--;){
-           if((fPIDmethod==kLQ2D)&&(!(is==0||is==2)))continue;
-           if((dE[0] > 0.) && (p[il] > 0.)) prLayer[is] = GetProbabilitySingleLayer(is, p[il], &dE[0]);
+           if((PIDmethod==kLQ2D)&&(!(is==0||is==2)))continue;
+           if((dE[0] > 0.) && (p[il] > 0.)) prLayer[is] = GetProbabilitySingleLayer(is, p[il], &dE[0],PIDmethod);
            AliDebug(3, Form("Probability for Species %d in Layer %d: %e", is, il, prLayer[is]));
            if(prLayer[is]<1.e-30){
                AliDebug(2, Form("Null for species %d species prob layer[%d].",is,il));
@@ -186,7 +185,7 @@ Bool_t AliTRDPIDResponse::GetResponse(Int_t n, const Double_t * const dedx, cons
 }
 
 //____________________________________________________________
-Double_t AliTRDPIDResponse::GetProbabilitySingleLayer(Int_t species, Double_t plocal, Double_t *dEdx) const {
+Double_t AliTRDPIDResponse::GetProbabilitySingleLayer(Int_t species, Double_t plocal, Double_t *dEdx,ETRDPIDMethod PIDmethod) const {
   //
   // Get the non-normalized probability for a certain particle species as coming
   // from the reference histogram
@@ -197,7 +196,7 @@ Double_t AliTRDPIDResponse::GetProbabilitySingleLayer(Int_t species, Double_t pl
   Double_t probLayer = 0.;
   Float_t pLower, pUpper;
        
-  switch(fPIDmethod){
+  switch(PIDmethod){
   case kNN: // NN
       break;
   case kLQ2D: // 2D LQ
@@ -259,12 +258,12 @@ void AliTRDPIDResponse::SetOwner(){
 }
 
 //____________________________________________________________
-Bool_t AliTRDPIDResponse::CookdEdx(Int_t nSlice, const Double_t * const in, Double_t *out) const
+Bool_t AliTRDPIDResponse::CookdEdx(Int_t nSlice, const Double_t * const in, Double_t *out,ETRDPIDMethod PIDmethod) const
 {
     //
     // Recalculate dE/dx
     //
-  switch(fPIDmethod){
+  switch(PIDmethod){
   case kNN: // NN 
       break;
   case kLQ2D: // 2D LQ
@@ -292,7 +291,7 @@ Bool_t AliTRDPIDResponse::CookdEdx(Int_t nSlice, const Double_t * const in, Doub
 }
 
 //____________________________________________________________
-Bool_t AliTRDPIDResponse::IdentifiedAsElectron(Int_t nTracklets, const Double_t *like, Double_t p, Double_t level) const {
+Bool_t AliTRDPIDResponse::IdentifiedAsElectron(Int_t nTracklets, const Double_t *like, Double_t p, Double_t level,Double_t centrality,ETRDPIDMethod PIDmethod) const {
     //
     // Check whether particle is identified as electron assuming a certain electron efficiency level
     // Only electron and pion hypothesis is taken into account
@@ -311,7 +310,7 @@ Bool_t AliTRDPIDResponse::IdentifiedAsElectron(Int_t nTracklets, const Double_t
   } 
   Double_t probEle = like[AliPID::kElectron]/(like[AliPID::kElectron] + like[AliPID::kPion]);
   Double_t params[4];
-  if(!fkPIDResponseObject->GetThresholdParameters(nTracklets, level, params,fPIDmethod)){
+  if(!fkPIDResponseObject->GetThresholdParameters(nTracklets, level, params,centrality,PIDmethod)){
     AliError("No Params found for the given configuration");
     return kTRUE;
   }
index 8c2582b1c6dabd49729fde9c50b6b1ca202e2dcc..cb85fa93cf892a109fe27c4226cf237fab7242d8 100644 (file)
@@ -59,38 +59,35 @@ class AliTRDPIDResponse : public TObject {
     AliTRDPIDResponse& operator=(const AliTRDPIDResponse &ref);
     ~AliTRDPIDResponse();
     
-    ETRDPIDMethod     GetPIDmethod() const { return fPIDmethod;}
-    Bool_t    GetResponse(Int_t n, const Double_t * const dedx, const Float_t * const p, Double_t prob[AliPID::kSPECIES], Bool_t kNorm=kTRUE) const;
-    inline ETRDNslices  GetNumberOfSlices() const;
+    Bool_t    GetResponse(Int_t n, const Double_t * const dedx, const Float_t * const p, Double_t prob[AliPID::kSPECIES],ETRDPIDMethod PIDmethod=kLQ1D, Bool_t kNorm=kTRUE) const;
+    inline ETRDNslices  GetNumberOfSlices(ETRDPIDMethod PIDmethod=kLQ1D) const;
     
     Bool_t    IsOwner() const {return TestBit(kIsOwner);}
     
     void      SetOwner();
-    void      SetPIDmethod(ETRDPIDMethod m) {fPIDmethod=m;}
     void      SetGainNormalisationFactor(Double_t gainFactor) { fGainNormalisationFactor = gainFactor; }
 
     Bool_t SetPIDResponseObject(const AliTRDPIDResponseObject * obj);
     
     Bool_t    Load(const Char_t *filename = NULL);
   
-    Bool_t    IdentifiedAsElectron(Int_t nTracklets, const Double_t *like, Double_t p, Double_t level) const;
+    Bool_t    IdentifiedAsElectron(Int_t nTracklets, const Double_t *like, Double_t p, Double_t level,Double_t centrality=-1,ETRDPIDMethod PIDmethod=kLQ1D) const;
   
   private:
-    Bool_t    CookdEdx(Int_t nSlice, const Double_t * const in, Double_t *out) const;
-    Double_t  GetProbabilitySingleLayer(Int_t species, Double_t plocal, Double_t *dEdx) const;
+    Bool_t    CookdEdx(Int_t nSlice, const Double_t * const in, Double_t *out,ETRDPIDMethod PIDmethod=kLQ1D) const;
+    Double_t  GetProbabilitySingleLayer(Int_t species, Double_t plocal, Double_t *dEdx,ETRDPIDMethod PIDmethod=kLQ1D) const;
     
     const AliTRDPIDResponseObject *fkPIDResponseObject;   // PID References and Params
     Double_t  fGainNormalisationFactor;         // Gain normalisation factor
-    ETRDPIDMethod   fPIDmethod;                 // PID method selector
       
   
   ClassDef(AliTRDPIDResponse, 3)    // Tool for TRD PID
 };
 
-AliTRDPIDResponse::ETRDNslices AliTRDPIDResponse::GetNumberOfSlices() const {
+AliTRDPIDResponse::ETRDNslices AliTRDPIDResponse::GetNumberOfSlices(ETRDPIDMethod PIDmethod) const {
   // Get the current number of slices
   ETRDNslices slices = kNslicesLQ1D;
-  switch(fPIDmethod){
+  switch(PIDmethod){
     case kLQ1D: slices = kNslicesLQ1D; break;
     case kLQ2D: slices = kNslicesLQ2D; break;
     case kNN:   slices = kNslicesNN; break;
index 2080fc843e3e28ef079ab9377af5a7ebdfb86b3e..bd8387ef9e763c75e2ad6b0d4d58a8c6267c314d 100644 (file)
@@ -190,7 +190,7 @@ TObject *AliTRDPIDResponseObject::GetLowerReference(AliPID::EParticleType spec,
 }
 
 //____________________________________________________________
-Bool_t AliTRDPIDResponseObject::GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params,AliTRDPIDResponse::ETRDPIDMethod method) const{
+Bool_t AliTRDPIDResponseObject::GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params,Double_t centrality,AliTRDPIDResponse::ETRDPIDMethod method) const{
 
     if(Int_t(method)>=Int_t(AliTRDPIDResponse::kNMethod)||Int_t(method)<0){
        AliError("Method does not exist");
@@ -198,7 +198,7 @@ Bool_t AliTRDPIDResponseObject::GetThresholdParameters(Int_t ntracklets, Double_
     }
 
     if(fPIDParams[method]){
-       return fPIDParams[method]->GetThresholdParameters(ntracklets,efficiency,params);
+       return fPIDParams[method]->GetThresholdParameters(ntracklets,efficiency,params,centrality);
     }
     return kFALSE;
 }
@@ -226,6 +226,6 @@ void AliTRDPIDResponseObject::Print(const Option_t* opt) const{
    
     for(Int_t method=0;method<AliTRDPIDResponse::kNMethod;method++){
        if(fPIDReference[method])fPIDReference[method]->Print(opt);
-       if(fPIDParams[method])printf("+ Threshold Parameters \n");
+       if(fPIDParams[method])fPIDParams[method]->Print(opt);
     }
 }
index 95e0ebcd115e9f7097f09ccc924be2f9057e0c42..ec96fe2f47f92218e4b5b49b680994bd772e8673 100644 (file)
@@ -55,7 +55,7 @@ public:
     Int_t GetNumberOfMomentumBins(AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D) const;
 
     // Derive threshold params
-    Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params,AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D) const;
+    Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params,Double_t centrality = -1,AliTRDPIDResponse::ETRDPIDMethod method=AliTRDPIDResponse::kLQ1D) const;
 
     // Number of SlicesQ0
     Int_t GetNSlicesQ0() const{return fNSlicesQ0;}
index a671f002331ced4e0b44838c48c39f22689e042d..f3474673d16afa26280215a9b46396014319c18a 100644 (file)
@@ -21,7 +21,8 @@ fLambda(0),
 fNPointsI(0),
 fUseHelperNodes(kFALSE),
 fUseWeights(kFALSE),
-fPDFMode(kInterpolation)
+fPDFMode(kInterpolation),
+fStoreCov(kFALSE)
 {
   // default constructor
 }
@@ -35,7 +36,8 @@ fLambda(1 + ndim + (ndim*(ndim+1)>>1)),
 fNPointsI(100),
 fUseHelperNodes(kFALSE),
 fUseWeights(kFALSE),
-fPDFMode(kInterpolation)
+fPDFMode(kInterpolation),
+fStoreCov(kFALSE)
 {
 }
 
@@ -57,7 +59,8 @@ fLambda(ref.fLambda),
 fNPointsI(ref.fNPointsI),
 fUseHelperNodes(ref.fUseHelperNodes),
 fUseWeights(ref.fUseWeights),
-fPDFMode(ref.fPDFMode)
+fPDFMode(ref.fPDFMode),
+fStoreCov(ref.fStoreCov)
 {
     // Copy constructor
     this->Print("");
@@ -358,7 +361,7 @@ void AliTRDTKDInterpolator::BuildInterpolation()
        fitter.GetParameters(par);
 
        // store results
-       node->Store(&par,&cov);
+       node->Store(&par,&cov,fStoreCov);
     }
 
     delete KDhelper;
@@ -532,7 +535,7 @@ void AliTRDTKDInterpolator::AliTRDTKDNodeInfo::Print(const Option_t *opt) const
 }
 
 //_________________________________________________________________
-void AliTRDTKDInterpolator::AliTRDTKDNodeInfo::Store(TVectorD const *par, TMatrixD const *cov)
+void AliTRDTKDInterpolator::AliTRDTKDNodeInfo::Store(TVectorD const *par, TMatrixD const *cov,Bool_t storeCov)
 {
     // Store the parameters and the covariance in the node
 
@@ -545,7 +548,7 @@ void AliTRDTKDInterpolator::AliTRDTKDNodeInfo::Store(TVectorD const *par, TMatri
 
      if(!fPar){fPar = new Double_t[fNPar];}
      for(int ip=0; ip<fNPar; ip++) fPar[ip] = (*par)[ip];
-     if(!cov) return;
+     if(!cov||!storeCov) return;
      if(!fCov){fCov = new Double_t[fNCov];}
      for(int ip(0), np(0); ip<fNPar; ip++)
         for(int jp=ip; jp<fNPar; jp++) fCov[np++] = (*cov)(ip,jp);
@@ -600,6 +603,7 @@ Bool_t AliTRDTKDInterpolator::AliTRDTKDNodeInfo::CookPDF(const Double_t *point,
        if(error<fVal[1]){
            return kTRUE;
        }
+       if(error==1)AliWarning("Covariance not available, always choose bin content");
        error=fVal[1];
        result=fVal[0];
        return kTRUE;
index a425bdc7e1d95a4b45ca355ffc9121da3abdfb5e..98ae35eb993952479ac1039714c4a2ad1a40a9fb 100644 (file)
@@ -37,7 +37,7 @@ public:
        Bool_t        CookPDF(const Double_t *point, Double_t &result, Double_t &error,TRDTKDMode mod=kInterpolation) const;
        Bool_t Has(const Float_t *p) const;
        void          Print(const Option_t * = "") const;
-       void          Store(TVectorD const *par, TMatrixD const *cov=NULL);
+       void          Store(TVectorD const *par, TMatrixD const *cov,Bool_t storeCov);
 
     private:
        Int_t fNDim;              // Dimension of Points
@@ -72,6 +72,7 @@ public:
 
     void          SetUseWeights(Bool_t k=kTRUE){fUseWeights=k;}
     void          SetPDFMode(TRDTKDMode mod){fPDFMode=mod;}
+    void          SetStoreCov(Bool_t k){fStoreCov=k;}
 
     Bool_t        Build();
 
@@ -94,8 +95,9 @@ private:
     Bool_t        fUseHelperNodes; // Build Helper nodes to ensure boundary conditions
     Bool_t fUseWeights; // Use tricubic weights
     TRDTKDMode    fPDFMode; // Mode for PDF calculation
+    Bool_t        fStoreCov;
 
-    ClassDef(AliTRDTKDInterpolator, 1)   // data interpolator based on KD tree
+    ClassDef(AliTRDTKDInterpolator, 2)   // data interpolator based on KD tree
 };
 
 #endif
index e4240fa71427410079f5cebcfd7db46aad3ea5ad..95fbff5067ae77b77eaf4e3e26a20b243c0a5391 100644 (file)
@@ -87,6 +87,7 @@
 #pragma link C++ class AliTRDPIDReference+;
 #pragma link C++ class AliTRDPIDParams+;
 #pragma link C++ class AliTRDPIDParams::AliTRDPIDThresholds+;
+#pragma link C++ class AliTRDPIDParams::AliTRDPIDCentrality+;
 #pragma link C++ class AliTRDPIDResponseObject+;
 #pragma link C++ class AliTRDTKDInterpolator+;
 #pragma link C++ class AliTRDTKDInterpolator::AliTRDTKDNodeInfo+;
 #pragma link C++ class AliTOFPIDParams+;
 
 #endif
+
index 9ef5b3b0e7ea28376f30dc6c681cdae7cdd03bdc..4255765c3908fd90d0a5dea8bffb70a5947e5a62 100644 (file)
@@ -1564,7 +1564,7 @@ AliTRDPIDResponse *AliTRDcalibDB::GetPIDResponse(AliTRDPIDResponse::ETRDPIDMetho
 
     // Load Reference Histos from OCDB
 //    if(method == AliTRDPIDResponse::kLQ1D){
-    fPIDResponse->SetPIDmethod(AliTRDPIDResponse::kLQ1D);
+    //fPIDResponse->SetPIDmethod(AliTRDPIDResponse::kLQ1D);
     const TObjArray *references = dynamic_cast<const TObjArray *>(GetCachedCDBObject(kIDPIDLQ1D));
 
     TIter refs(references);
index 113910bbdbea6a5dec2d5cec25c7deba94eb0ae3..ef5e8f43c0a2840a06b27045f5a2d6f0b887afc5 100644 (file)
@@ -387,15 +387,15 @@ Bool_t AliTRDtrackV1::CookPID()
     if(!fTracklet[iseed]) continue;
     trackletP[iseed] = fTracklet[iseed]->GetMomentum();
     fTracklet[iseed]->SetPID();
-    if(pidResponse->GetPIDmethod() == AliTRDPIDResponse::kLQ1D){
+    //if(pidResponse->GetPIDmethod() == AliTRDPIDResponse::kLQ1D){
       dEdx[iseed] = fTracklet[iseed]->GetdQdl();
-    } else {
+   /* } else {
       fTracklet[iseed]->CookdEdx(nslices);
       const Float_t *trackletdEdx = fTracklet[iseed]->GetdEdx();
       for(Int_t islice = 0; islice < nslices; islice++){
         dEdx[iseed*nslices + islice] = trackletdEdx[islice];
       }
-    }
+  } */
   }
   pidResponse->GetResponse(nslices, dEdx, trackletP, fPID);