CbmRoot
CbmTrdSetTracksPidLike Class Reference

#include <CbmTrdSetTracksPidLike.h>

Inheritance diagram for CbmTrdSetTracksPidLike:
[legend]
Collaboration diagram for CbmTrdSetTracksPidLike:
[legend]

Public Member Functions

 CbmTrdSetTracksPidLike ()
 
 CbmTrdSetTracksPidLike (const char *name, const char *title="FairTask")
 
virtual ~CbmTrdSetTracksPidLike ()
 
virtual InitStatus Init ()
 
virtual void Exec (Option_t *opt)
 
virtual void Finish ()
 
virtual void SetParContainers ()
 
Int_t GetNofTracks () const
 
void SetInputFileName (const char *file)
 
void SetUseMCInfo (Bool_t use=kTRUE)
 
void SetUseMomDependence (Bool_t use=kTRUE)
 

Private Types

enum  EParticleType {
  kElectron = 0, kPion = 1, kKaon = 2, kProton = 3,
  kMuon = 4
}
 

Private Member Functions

CbmTrdSetTracksPidLikeoperator= (const CbmTrdSetTracksPidLike &)
 
 CbmTrdSetTracksPidLike (const CbmTrdSetTracksPidLike &)
 
Bool_t ReadData ()
 
Double_t GetProbability (Int_t iType, Double_t mom, Double_t dedx) const
 
 ClassDef (CbmTrdSetTracksPidLike, 1)
 

Private Attributes

TString fFileName = ""
 
Bool_t fMCinput = kFALSE
 
Bool_t fMomDep = kTRUE
 
TClonesArray * fTrackArray = NULL
 
TClonesArray * fTrdHitArray = NULL
 
TClonesArray * fglobalTrackArray = NULL
 
TObjArray * fHistdEdx = NULL
 
Int_t fNofTracks = 0
 

Static Private Attributes

static const Int_t fgkNParts = 5
 

Detailed Description

Definition at line 30 of file CbmTrdSetTracksPidLike.h.

Member Enumeration Documentation

◆ EParticleType

Enumerator
kElectron 
kPion 
kKaon 
kProton 
kMuon 

Definition at line 87 of file CbmTrdSetTracksPidLike.h.

Constructor & Destructor Documentation

◆ CbmTrdSetTracksPidLike() [1/3]

CbmTrdSetTracksPidLike::CbmTrdSetTracksPidLike ( )

Default constructor

Definition at line 28 of file CbmTrdSetTracksPidLike.cxx.

◆ CbmTrdSetTracksPidLike() [2/3]

CbmTrdSetTracksPidLike::CbmTrdSetTracksPidLike ( const char *  name,
const char *  title = "FairTask" 
)

Standard constructor

Parameters
nameName of class
titleTask title

Definition at line 34 of file CbmTrdSetTracksPidLike.cxx.

◆ ~CbmTrdSetTracksPidLike()

CbmTrdSetTracksPidLike::~CbmTrdSetTracksPidLike ( )
virtual

Destructor

Definition at line 40 of file CbmTrdSetTracksPidLike.cxx.

◆ CbmTrdSetTracksPidLike() [3/3]

CbmTrdSetTracksPidLike::CbmTrdSetTracksPidLike ( const CbmTrdSetTracksPidLike )
private

Member Function Documentation

◆ ClassDef()

CbmTrdSetTracksPidLike::ClassDef ( CbmTrdSetTracksPidLike  ,
 
)
private

◆ Exec()

void CbmTrdSetTracksPidLike::Exec ( Option_t *  opt)
virtual

Task execution

loop over global tracks

get trd track

only trd tracks with mimimum 1 reconstructed point

Get the momentum from the first trd station

loop over all hits

calculate denominator for reasonable probabilities

normalize to 1

fill track values

Definition at line 266 of file CbmTrdSetTracksPidLike.cxx.

References fgkNParts, fglobalTrackArray, fNofTracks, fTrackArray, fTrdHitArray, CbmTrdHit::GetELoss(), CbmTrack::GetHitIndex(), CbmTrack::GetNofHits(), CbmTrack::GetParamFirst(), CbmTrack::GetParamLast(), GetProbability(), CbmGlobalTrack::GetTrdTrackIndex(), kElectron, kKaon, kMuon, kPion, kProton, CbmTrdTrack::SetELoss(), CbmTrdTrack::SetPidLikeEL(), CbmTrdTrack::SetPidLikeKA(), CbmTrdTrack::SetPidLikeMU(), CbmTrdTrack::SetPidLikePI(), and CbmTrdTrack::SetPidLikePR().

◆ Finish()

void CbmTrdSetTracksPidLike::Finish ( )
virtual

Finish at the end of each event

Definition at line 428 of file CbmTrdSetTracksPidLike.cxx.

◆ GetNofTracks()

Int_t CbmTrdSetTracksPidLike::GetNofTracks ( ) const
inline

Accessors

Definition at line 65 of file CbmTrdSetTracksPidLike.h.

References fNofTracks.

◆ GetProbability()

Double_t CbmTrdSetTracksPidLike::GetProbability ( Int_t  iType,
Double_t  mom,
Double_t  dedx 
) const
private

Calculate probability for particle (with momentum) and dEdx

useless protection

histogram has TRD momentum at inner point vs. dedx sinal [keV]

check for entries/ non-empty histograms

check for overlow

use bin width of last bin (correct in case of logarithmic, arbitrary binnning)

find bin depending on overflow in X,Y

interpolate empty bins or overflow bins

Definition at line 364 of file CbmTrdSetTracksPidLike.cxx.

References fgkNParts, and fHistdEdx.

Referenced by Exec().

◆ Init()

InitStatus CbmTrdSetTracksPidLike::Init ( )
virtual

Initialisation at beginning of each event

input array

Definition at line 219 of file CbmTrdSetTracksPidLike.cxx.

References fgkNParts, fglobalTrackArray, fHistdEdx, fTrackArray, fTrdHitArray, and ReadData().

◆ operator=()

CbmTrdSetTracksPidLike& CbmTrdSetTracksPidLike::operator= ( const CbmTrdSetTracksPidLike )
private

◆ ReadData()

Bool_t CbmTrdSetTracksPidLike::ReadData ( )
private

Read the histograms from file

mc pid method

data driven method

clean up

Definition at line 49 of file CbmTrdSetTracksPidLike.cxx.

References fFileName, fHistdEdx, fMCinput, fMomDep, CbmTrdGas::GetFileName(), i, CbmTrdGas::Init(), CbmTrdGas::Instance(), kElectron, kKaon, kMuon, kPion, kProton, x, and y.

Referenced by Init().

◆ SetInputFileName()

void CbmTrdSetTracksPidLike::SetInputFileName ( const char *  file)
inline

Setters

Definition at line 68 of file CbmTrdSetTracksPidLike.h.

References fFileName.

◆ SetParContainers()

void CbmTrdSetTracksPidLike::SetParContainers ( )
virtual

SetParContainers

Definition at line 44 of file CbmTrdSetTracksPidLike.cxx.

◆ SetUseMCInfo()

void CbmTrdSetTracksPidLike::SetUseMCInfo ( Bool_t  use = kTRUE)
inline

Definition at line 69 of file CbmTrdSetTracksPidLike.h.

References fMCinput.

◆ SetUseMomDependence()

void CbmTrdSetTracksPidLike::SetUseMomDependence ( Bool_t  use = kTRUE)
inline

Definition at line 70 of file CbmTrdSetTracksPidLike.h.

References fMomDep.

Member Data Documentation

◆ fFileName

TString CbmTrdSetTracksPidLike::fFileName = ""
private

Definition at line 76 of file CbmTrdSetTracksPidLike.h.

Referenced by ReadData(), and SetInputFileName().

◆ fgkNParts

const Int_t CbmTrdSetTracksPidLike::fgkNParts = 5
staticprivate

Definition at line 86 of file CbmTrdSetTracksPidLike.h.

Referenced by Exec(), GetProbability(), and Init().

◆ fglobalTrackArray

TClonesArray* CbmTrdSetTracksPidLike::fglobalTrackArray = NULL
private

Input array of TRD Hits

Definition at line 81 of file CbmTrdSetTracksPidLike.h.

Referenced by Exec(), and Init().

◆ fHistdEdx

TObjArray* CbmTrdSetTracksPidLike::fHistdEdx = NULL
private

Input array of global tracks

Definition at line 83 of file CbmTrdSetTracksPidLike.h.

Referenced by GetProbability(), Init(), and ReadData().

◆ fMCinput

Bool_t CbmTrdSetTracksPidLike::fMCinput = kFALSE
private

Definition at line 77 of file CbmTrdSetTracksPidLike.h.

Referenced by ReadData(), and SetUseMCInfo().

◆ fMomDep

Bool_t CbmTrdSetTracksPidLike::fMomDep = kTRUE
private

Definition at line 78 of file CbmTrdSetTracksPidLike.h.

Referenced by ReadData(), and SetUseMomDependence().

◆ fNofTracks

Int_t CbmTrdSetTracksPidLike::fNofTracks = 0
private

Definition at line 84 of file CbmTrdSetTracksPidLike.h.

Referenced by Exec(), and GetNofTracks().

◆ fTrackArray

TClonesArray* CbmTrdSetTracksPidLike::fTrackArray = NULL
private

Definition at line 79 of file CbmTrdSetTracksPidLike.h.

Referenced by Exec(), and Init().

◆ fTrdHitArray

TClonesArray* CbmTrdSetTracksPidLike::fTrdHitArray = NULL
private

Input array of TRD tracks

Definition at line 80 of file CbmTrdSetTracksPidLike.h.

Referenced by Exec(), and Init().


The documentation for this class was generated from the following files: