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, 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 |
Definition at line 30 of file CbmTrdSetTracksPidLike.h.
|
private |
Enumerator | |
---|---|
kElectron | |
kPion | |
kKaon | |
kProton | |
kMuon |
Definition at line 87 of file CbmTrdSetTracksPidLike.h.
CbmTrdSetTracksPidLike::CbmTrdSetTracksPidLike | ( | ) |
Default constructor
Definition at line 28 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 34 of file CbmTrdSetTracksPidLike.cxx.
|
virtual |
Destructor
Definition at line 40 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 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().
|
virtual |
Finish at the end of each event
Definition at line 428 of file CbmTrdSetTracksPidLike.cxx.
|
inline |
|
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().
|
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().
|
private |
|
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().
|
inline |
|
virtual |
SetParContainers
Definition at line 44 of file CbmTrdSetTracksPidLike.cxx.
|
inline |
Definition at line 69 of file CbmTrdSetTracksPidLike.h.
References fMCinput.
|
inline |
Definition at line 70 of file CbmTrdSetTracksPidLike.h.
References fMomDep.
|
private |
Definition at line 76 of file CbmTrdSetTracksPidLike.h.
Referenced by ReadData(), and SetInputFileName().
|
staticprivate |
Definition at line 86 of file CbmTrdSetTracksPidLike.h.
Referenced by Exec(), GetProbability(), and Init().
|
private |
Input array of TRD Hits
Definition at line 81 of file CbmTrdSetTracksPidLike.h.
|
private |
Input array of global tracks
Definition at line 83 of file CbmTrdSetTracksPidLike.h.
Referenced by GetProbability(), Init(), and ReadData().
|
private |
Definition at line 77 of file CbmTrdSetTracksPidLike.h.
Referenced by ReadData(), and SetUseMCInfo().
|
private |
Definition at line 78 of file CbmTrdSetTracksPidLike.h.
Referenced by ReadData(), and SetUseMomDependence().
|
private |
Definition at line 84 of file CbmTrdSetTracksPidLike.h.
Referenced by Exec(), and GetNofTracks().
|
private |
Definition at line 79 of file CbmTrdSetTracksPidLike.h.
|
private |
Input array of TRD tracks
Definition at line 80 of file CbmTrdSetTracksPidLike.h.