LCOV - code coverage report
Current view: top level - STEER/STEERBase - AliITSPidParams.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 97 1.0 %
Date: 2016-06-14 17:26:59 Functions: 1 53 1.9 %

          Line data    Source code
       1             : #ifndef ALIITSPIDPARAMS_H
       2             : #define ALIITSPIDPARAMS_H
       3             : /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id: $ */
       7             : 
       8             : ///////////////////////////////////////////////////////////////////
       9             : //                                                               //
      10             : // Class to store parameters of ITS response functions           //
      11             : // Origin: F.Prino, Torino, prino@to.infn.it                     //
      12             : // Modified by: Y. Corrales Morales                              //
      13             : //              Torino, corrales@to.infn.it                      //
      14             : //                                                               //
      15             : ///////////////////////////////////////////////////////////////////
      16             : 
      17             : #include <TFormula.h>
      18             : #include <TNamed.h>
      19             : #include "AliPID.h"
      20             : 
      21             : class AliITSPidParams : public TNamed {
      22             : 
      23             :  public:
      24             :   AliITSPidParams(Bool_t isMC = kFALSE);
      25             :   AliITSPidParams(Char_t * name, Bool_t isMC = kFALSE);
      26             :   ~AliITSPidParams();
      27             : 
      28             :   void InitMC();
      29             :   void InitData();
      30             :   Double_t GetLandauGausNormPdgCode(Double_t dedx, Int_t pdgCode, Double_t mom, Int_t lay) const;
      31             :   Double_t GetLandauGausNorm(Double_t dedx, Int_t partType, Double_t mom, Int_t lay) const;
      32             : 
      33             :   // electron setters SDD
      34             :   void SetSDDElecMPV(const TFormula* form){
      35           0 :     if(fSDDElecMPV) delete fSDDElecMPV;
      36           0 :     fSDDElecMPV=new TFormula(*form);
      37           0 :   }
      38             :   void SetSDDElecLandauWidth(const TFormula* form){
      39           0 :     if(fSDDElecLandauWidth) delete fSDDElecLandauWidth;
      40           0 :     fSDDElecLandauWidth=new TFormula(*form);
      41           0 :   }
      42             :   void SetSDDElecGaussWidth(const TFormula* form){
      43           0 :     if(fSDDElecGaussWidth) delete fSDDElecGaussWidth;
      44           0 :     fSDDElecGaussWidth=new TFormula(*form);
      45           0 :   }
      46             :   // electron setters SSD
      47             :   void SetSSDElecMPV(const TFormula* form){
      48           0 :     if(fSSDElecMPV) delete fSSDElecMPV;
      49           0 :     fSSDElecMPV=new TFormula(*form);
      50           0 :   }
      51             :   void SetSSDElecLandauWidth(const TFormula* form){
      52           0 :     if(fSSDElecLandauWidth) delete fSSDElecLandauWidth;
      53           0 :     fSSDElecLandauWidth=new TFormula(*form);
      54           0 :   }
      55             :   void SetSSDElecGaussWidth(const TFormula* form){
      56           0 :     if(fSSDElecGaussWidth) delete fSSDElecGaussWidth;
      57           0 :     fSSDElecGaussWidth=new TFormula(*form);
      58           0 :   }
      59             : 
      60             :   //Pion setters SDD
      61             :   void SetSDDPionMPV(const TFormula* form){
      62           0 :     if(fSDDPionMPV) delete fSDDPionMPV;
      63           0 :     fSDDPionMPV=new TFormula(*form);
      64           0 :   }
      65             :   void SetSDDPionLandauWidth(const TFormula* form){
      66           0 :     if(fSDDPionLandauWidth) delete fSDDPionLandauWidth;
      67           0 :     fSDDPionLandauWidth=new TFormula(*form);
      68           0 :   }
      69             :   void SetSDDPionGaussWidth(const TFormula* form){
      70           0 :     if(fSDDPionGaussWidth) delete fSDDPionGaussWidth;
      71           0 :     fSDDPionGaussWidth=new TFormula(*form);
      72           0 :   }
      73             :   //Pion setters SSD
      74             :   void SetSSDPionMPV(const TFormula* form){
      75           0 :     if(fSSDPionMPV) delete fSSDPionMPV;
      76           0 :     fSSDPionMPV=new TFormula(*form);
      77           0 :   }
      78             :   void SetSSDPionLandauWidth(const TFormula* form){
      79           0 :     if(fSSDPionLandauWidth) delete fSSDPionLandauWidth;
      80           0 :     fSSDPionLandauWidth=new TFormula(*form);
      81           0 :   }
      82             :   void SetSSDPionGaussWidth(const TFormula* form){
      83           0 :     if(fSSDPionGaussWidth) delete fSSDPionGaussWidth;
      84           0 :     fSSDPionGaussWidth=new TFormula(*form);
      85           0 :   }
      86             : 
      87             :   // kaon setters SDD
      88             :   void SetSDDKaonMPV(const TFormula* form){
      89           0 :     if(fSDDKaonMPV) delete fSDDKaonMPV;
      90           0 :     fSDDKaonMPV=new TFormula(*form);
      91           0 :   }
      92             :   void SetSDDKaonLandauWidth(const TFormula* form){
      93           0 :     if(fSDDKaonLandauWidth) delete fSDDKaonLandauWidth;
      94           0 :     fSDDKaonLandauWidth=new TFormula(*form);
      95           0 :   }
      96             :   void SetSDDKaonGaussWidth(const TFormula* form){
      97           0 :     if(fSDDKaonGaussWidth) delete fSDDKaonGaussWidth;
      98           0 :     fSDDKaonGaussWidth=new TFormula(*form);
      99           0 :   }
     100             :   // kaon setters SSD
     101             :   void SetSSDKaonMPV(const TFormula* form){
     102           0 :     if(fSSDKaonMPV) delete fSSDKaonMPV;
     103           0 :     fSSDKaonMPV=new TFormula(*form);
     104           0 :   }
     105             :   void SetSSDKaonLandauWidth(const TFormula* form){
     106           0 :     if(fSSDKaonLandauWidth) delete fSSDKaonLandauWidth;
     107           0 :     fSSDKaonLandauWidth=new TFormula(*form);
     108           0 :   }
     109             :   void SetSSDKaonGaussWidth(const TFormula* form){
     110           0 :     if(fSSDKaonGaussWidth) delete fSSDKaonGaussWidth;
     111           0 :     fSSDKaonGaussWidth=new TFormula(*form);
     112           0 :   }
     113             : 
     114             :   // proton setters SDD
     115             :   void SetSDDProtMPV(const TFormula* form){
     116           0 :     if(fSDDProtMPV) delete fSDDProtMPV;
     117           0 :     fSDDProtMPV=new TFormula(*form);
     118           0 :   }
     119             :   void SetSDDProtLandauWidth(const TFormula* form){
     120           0 :     if(fSDDProtLandauWidth) delete fSDDProtLandauWidth;
     121           0 :     fSDDProtLandauWidth=new TFormula(*form);
     122           0 :   }
     123             :   void SetSDDProtGaussWidth(const TFormula* form){
     124           0 :     if(fSDDProtGaussWidth) delete fSDDProtGaussWidth;
     125           0 :     fSDDProtGaussWidth=new TFormula(*form);
     126           0 :   }
     127             :   // proton setters SSD
     128             :   void SetSSDProtMPV(const TFormula* form){
     129           0 :     if(fSSDProtMPV) delete fSSDProtMPV;
     130           0 :     fSSDProtMPV=new TFormula(*form);
     131           0 :   }
     132             :   void SetSSDProtLandauWidth(const TFormula* form){
     133           0 :     if(fSSDProtLandauWidth) delete fSSDProtLandauWidth;
     134           0 :     fSSDProtLandauWidth=new TFormula(*form);
     135           0 :   }
     136             :   void SetSSDProtGaussWidth(const TFormula* form){
     137           0 :     if(fSSDProtGaussWidth) delete fSSDProtGaussWidth;
     138           0 :     fSSDProtGaussWidth=new TFormula(*form);
     139           0 :   }
     140             : 
     141             :   // electron getters
     142             :   Double_t GetSDDElecMPV(Double_t mom) const {
     143           0 :     return  fSDDElecMPV->Eval(mom);
     144             :   }
     145             :   Double_t GetSDDElecLandauWidth(Double_t mom) const {
     146           0 :     return fSDDElecLandauWidth->Eval(mom);
     147             :   }
     148             :   Double_t GetSDDElecGaussWidth(Double_t mom) const {
     149           0 :     return fSDDElecGaussWidth->Eval(mom);
     150             :   }
     151             :   Double_t GetSSDElecMPV(Double_t mom) const {
     152           0 :     return  fSSDElecMPV->Eval(mom);
     153             :   }
     154             :   Double_t GetSSDElecLandauWidth(Double_t mom) const {
     155           0 :     return fSSDElecLandauWidth->Eval(mom);
     156             :   }
     157             :   Double_t GetSSDElecGaussWidth(Double_t mom) const {
     158           0 :     return fSSDElecGaussWidth->Eval(mom);
     159             :   }
     160             : 
     161             :   // pion getters
     162             :   Double_t GetSDDPionMPV(Double_t mom) const {
     163           0 :     return  fSDDPionMPV->Eval(mom);
     164             :   }
     165             :   Double_t GetSDDPionLandauWidth(Double_t mom) const {
     166           0 :     return fSDDPionLandauWidth->Eval(mom);
     167             :   }
     168             :   Double_t GetSDDPionGaussWidth(Double_t mom) const {
     169           0 :     return fSDDPionGaussWidth->Eval(mom);
     170             :   }
     171             :   Double_t GetSSDPionMPV(Double_t mom) const {
     172           0 :     return  fSSDPionMPV->Eval(mom);
     173             :   }
     174             :   Double_t GetSSDPionLandauWidth(Double_t mom) const {
     175           0 :     return fSSDPionLandauWidth->Eval(mom);
     176             :   }
     177             :   Double_t GetSSDPionGaussWidth(Double_t mom) const {
     178           0 :     return fSSDPionGaussWidth->Eval(mom);
     179             :   }
     180             : 
     181             :   // kaon getters
     182             :   Double_t GetSDDKaonMPV(Double_t mom) const {
     183           0 :     return fSDDKaonMPV->Eval(mom);
     184             :   }
     185             :   Double_t GetSDDKaonLandauWidth(Double_t mom) const {
     186           0 :     return fSDDKaonLandauWidth->Eval(mom);
     187             :   }
     188             :   Double_t GetSDDKaonGaussWidth(Double_t mom) const {
     189           0 :     return fSDDKaonGaussWidth->Eval(mom);
     190             :   }
     191             :   Double_t GetSSDKaonMPV(Double_t mom) const {
     192           0 :     return fSSDKaonMPV->Eval(mom);
     193             :   }
     194             :   Double_t GetSSDKaonLandauWidth(Double_t mom) const {
     195           0 :     return fSSDKaonLandauWidth->Eval(mom);
     196             :   }
     197             :   Double_t GetSSDKaonGaussWidth(Double_t mom) const {
     198           0 :     return fSSDKaonGaussWidth->Eval(mom);
     199             :   }
     200             : 
     201             :   // proton getters
     202             :   Double_t GetSDDProtMPV(Double_t mom) const {
     203           0 :     return fSDDProtMPV->Eval(mom);
     204             :   }
     205             :   Double_t GetSDDProtLandauWidth(Double_t mom) const {
     206           0 :     return fSDDProtLandauWidth->Eval(mom);
     207             :   }
     208             :   Double_t GetSDDProtGaussWidth(Double_t mom) const {
     209           0 :     return fSDDProtGaussWidth->Eval(mom);
     210             :   }
     211             :   Double_t GetSSDProtMPV(Double_t mom) const {
     212           0 :     return fSSDProtMPV->Eval(mom);
     213             :   }
     214             :   Double_t GetSSDProtLandauWidth(Double_t mom) const {
     215           0 :     return fSSDProtLandauWidth->Eval(mom);
     216             :   }
     217             :   Double_t GetSSDProtGaussWidth(Double_t mom) const {
     218           0 :     return fSSDProtGaussWidth->Eval(mom);
     219             :   }
     220             : 
     221             :  private:
     222             : 
     223             :   AliITSPidParams(const AliITSPidParams& rec);
     224             :   AliITSPidParams& operator=(const AliITSPidParams &source);
     225             : 
     226             :   // Electron parameterizations
     227             :   TFormula* fSDDElecMPV;          // Electron dE/dx Most Probable vs. p in SDD
     228             :   TFormula* fSDDElecLandauWidth;  // Electron dE/dx Landau width vs. p in SDD
     229             :   TFormula* fSDDElecGaussWidth;   // Electron dE/dx Gaussian width vs. p in SDD
     230             : 
     231             :   TFormula* fSSDElecMPV;          // Electron dE/dx Most Probable vs. p in SSD
     232             :   TFormula* fSSDElecLandauWidth;  // Electron dE/dx Landau width vs. p in SSD
     233             :   TFormula* fSSDElecGaussWidth;   // Electron dE/dx Gaussian width vs. p in SSD
     234             : 
     235             :   // Pion parameterizations
     236             :   TFormula* fSDDPionMPV;          // Pion dE/dx Most Probable vs. p in SDD
     237             :   TFormula* fSDDPionLandauWidth;  // pion dE/dx Landau width vs. p in SDD
     238             :   TFormula* fSDDPionGaussWidth;   // pion dE/dx Gaussian width vs. p in SDD
     239             : 
     240             :   TFormula* fSSDPionMPV;          // Pion dE/dx Most Probable vs. p in SSD
     241             :   TFormula* fSSDPionLandauWidth;  // pion dE/dx Landau width vs. p in SSD
     242             :   TFormula* fSSDPionGaussWidth;   // pion dE/dx Gaussian width vs. p in SSD
     243             : 
     244             :   // Kaon parameterizations
     245             :   TFormula* fSDDKaonMPV;          // Kaon dE/dx Most Probable vs. p in SDD
     246             :   TFormula* fSDDKaonLandauWidth;  // kaon dE/dx Landau width vs. p in SDD
     247             :   TFormula* fSDDKaonGaussWidth;   // kaon dE/dx Gaussian width vs. p in SDD
     248             : 
     249             :   TFormula* fSSDKaonMPV;          // Kaon dE/dx Most Probable vs. p in SSD
     250             :   TFormula* fSSDKaonLandauWidth;  // kaon dE/dx Landau width vs. p in SSD
     251             :   TFormula* fSSDKaonGaussWidth;   // kaon dE/dx Gaussian width vs. p in SSD
     252             : 
     253             :   // Proton parameterizations
     254             :   TFormula* fSDDProtMPV;          // Proton dE/dx Most Probable vs. p in SSD
     255             :   TFormula* fSDDProtLandauWidth;  // Proton dE/dx Landau width vs. p in SDD
     256             :   TFormula* fSDDProtGaussWidth;   // Proton dE/dx Gaussian width vs. p in SDD
     257             : 
     258             :   TFormula* fSSDProtMPV;          // Proton dE/dx Most Probable vs. p in SSD
     259             :   TFormula* fSSDProtLandauWidth;  // Proton dE/dx Landau width vs. p in SSD
     260             :   TFormula* fSSDProtGaussWidth;   // Proton dE/dx Gaussian width vs. p in SSD
     261             : 
     262         176 :   ClassDef(AliITSPidParams, 3);
     263             : };
     264             : #endif

Generated by: LCOV version 1.11