CbmRoot
|
#include <CbmTrdSetTracksPidLike.h>
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 | |
CbmTrdSetTracksPidLike & | operator= (const CbmTrdSetTracksPidLike &) |
CbmTrdSetTracksPidLike (const CbmTrdSetTracksPidLike &) | |
Bool_t | ReadData () |
Double_t | GetProbability (Int_t iType, Double_t mom, Double_t dedx) const |
ClassDef (CbmTrdSetTracksPidLike, 2) | |
Private Attributes | |
TString | fFileName = "" |
Bool_t | fMCinput = kFALSE |
Bool_t | fMomDep = kTRUE |
TClonesArray * | fTrackArray = nullptr |
TClonesArray * | fTrdHitArray = nullptr |
TClonesArray * | fglobalTrackArray = nullptr |
TObjArray * | fHistdEdx = nullptr |
Int_t | fNofTracks = 0 |
CbmTrdParSetGas * | fGasPar = nullptr |
Static Private Attributes | |
static const Int_t | fgkNParts = 5 |
Definition at line 35 of file CbmTrdSetTracksPidLike.h.
|
private |
Enumerator | |
---|---|
kElectron | |
kPion | |
kKaon | |
kProton | |
kMuon |
Definition at line 94 of file CbmTrdSetTracksPidLike.h.
CbmTrdSetTracksPidLike::CbmTrdSetTracksPidLike | ( | ) |
Default constructor
Definition at line 34 of file CbmTrdSetTracksPidLike.cxx.
CbmTrdSetTracksPidLike::CbmTrdSetTracksPidLike | ( | const char * | name, |
const char * | title = "FairTask" ) |
Standard constructor
name | Name of class |
title | Task title |
Definition at line 39 of file CbmTrdSetTracksPidLike.cxx.
|
virtual |
Destructor
Definition at line 44 of file CbmTrdSetTracksPidLike.cxx.
|
private |
|
private |
|
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 285 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().
|
virtual |
Finish at the end of each event
Definition at line 453 of file CbmTrdSetTracksPidLike.cxx.
|
inline |
|
private |
Calculate probability for particle (with momentum) and dEdx
check for undefined dedx (dedx = -1. is sometimes passed in)
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 386 of file CbmTrdSetTracksPidLike.cxx.
References fgkNParts, and fHistdEdx.
Referenced by Exec().
|
virtual |
Initialisation at beginning of each event
input array
Definition at line 237 of file CbmTrdSetTracksPidLike.cxx.
References Error, fgkNParts, fglobalTrackArray, fHistdEdx, fTrackArray, fTrdHitArray, and ReadData().
|
private |
|
private |
Read the histograms from file
Save old global file and folder pointer to avoid messing with FairRoot
mc pid method
data driven method
Restore old global file and folder pointer to avoid messing with FairRoot
clean up
Definition at line 56 of file CbmTrdSetTracksPidLike.cxx.
References fFileName, fGasPar, fHistdEdx, fMCinput, fMomDep, kElectron, kKaon, kMuon, kPion, kProton, CbmTrdParSetGas::putParams(), x, and y.
Referenced by Init().
|
inline |
|
virtual |
|
inline |
Definition at line 74 of file CbmTrdSetTracksPidLike.h.
References fMCinput.
Referenced by cbm::atconverter::TaskFactory::RegisterTrdPid(), and cbm::reco::offline::TaskFactory::RegisterTrdPid().
|
inline |
Definition at line 75 of file CbmTrdSetTracksPidLike.h.
References fMomDep.
Referenced by cbm::atconverter::TaskFactory::RegisterTrdPid(), and cbm::reco::offline::TaskFactory::RegisterTrdPid().
|
private |
Definition at line 81 of file CbmTrdSetTracksPidLike.h.
Referenced by ReadData(), and SetInputFileName().
|
private |
Definition at line 91 of file CbmTrdSetTracksPidLike.h.
Referenced by ReadData(), and SetParContainers().
|
staticprivate |
Definition at line 93 of file CbmTrdSetTracksPidLike.h.
Referenced by Exec(), GetProbability(), and Init().
|
private |
Input array of TRD Hits
Definition at line 86 of file CbmTrdSetTracksPidLike.h.
|
private |
Input array of global tracks
Definition at line 88 of file CbmTrdSetTracksPidLike.h.
Referenced by GetProbability(), Init(), and ReadData().
|
private |
Definition at line 82 of file CbmTrdSetTracksPidLike.h.
Referenced by ReadData(), and SetUseMCInfo().
|
private |
Definition at line 83 of file CbmTrdSetTracksPidLike.h.
Referenced by ReadData(), and SetUseMomDependence().
|
private |
Definition at line 89 of file CbmTrdSetTracksPidLike.h.
Referenced by Exec(), and GetNofTracks().
|
private |
Definition at line 84 of file CbmTrdSetTracksPidLike.h.
|
private |
Input array of TRD tracks
Definition at line 85 of file CbmTrdSetTracksPidLike.h.