24 #ifndef PndFtsHoughTrackerTask_H
25 #define PndFtsHoughTrackerTask_H
35 #include "TClonesArray.h"
47 #include "FairMCPoint.h"
67 virtual InitStatus
Init();
69 virtual InitStatus
ReInit();
75 virtual void Exec(Option_t* opt);
114 if (0 == myHit)
throwError(
"GetFtsHit was not able to get the hit.");
119 Int_t mcPointId=ftsHit->GetRefIndex();
120 if(0 > mcPointId)
throwError(
"getMcTruthIdForHitId: negative mcPointId.");
121 FairMCPoint* myPoint = (FairMCPoint*)(
fFtsMcPoints->At(mcPointId));
122 if(0==myPoint)
throwError(
"getMcTruthIdForHitId: Could not get point belonging to hit.");
123 Int_t mcTrackId = myPoint->GetTrackID();
124 if(mcTrackId<0)
throwError(
"getMcTruthIdForHitId: negative mcTrackId.");
229 for (
int iHit1 = 0; iHit1 <
GetNFtsHits(); ++iHit1)
233 const Int_t tubeIdHit1 = myHit1->
GetTubeID();
235 for (
int iHit2 = iHit1+1; iHit2 <
GetNFtsHits(); ++iHit2)
239 const Int_t tubeIdHit2 = myHit2->
GetTubeID();
241 if ( tubeIdHit1 == tubeIdHit2 ) std::cout <<
"Event " <<
GetEventNr() <<
"tubeID1="<<tubeIdHit1<<
" tubeID2="<<tubeIdHit2 <<
": HitIdx " << iHit1 <<
" and HitIdx " << iHit2 <<
" are duplicate!\n";
virtual InitStatus ReInit()
ReInitiliazation of task when the runID changes.
UInt_t fEventNr
Event number for debugging purposes.
virtual void Finish()
Writes output to root file, I guess. Called at the end of the run.
Int_t getMcTruthIdForHitId(UInt_t hitId) const
FairField * fField
For B field access.
Interface between PandaRoot (data input and output) and PndFtsHoughTrackFinder (implementation of PR ...
Double_t val[nBoxes][nFEBox]
ClassDef(PndFtsHoughTrackerTask, 1)
const TMatrixT< Double_t > GetFtsHitCovMatrix(const PndFtsHit *const ftsHit) const
Returns the position covariance matrix (based on FTS straw geometry) for the hit with index hitId in ...
void SetPersistency(Bool_t val=kTRUE)
TClonesArray * fFtsHitArray
Input array of PndFtsHit.
void SetPersistence(Bool_t val)
TClonesArray * fTracks
Array of found tracks in PndTrack (for output)
TClonesArray * getFtsHitArrayPtr() const
Returns pointer to the hit array in which FTS hits are saved as PndFtsHit. Try not to use it...
FairField * getMagneticFieldPtr() const
void SetSaveDebugInfo(Int_t saveDebugInfo)
void throwError(const TString s) const
For error reporting.
Int_t GetNFtsHits() const
Returns the event number.
virtual void FinishEvent()
When is this executed? After each event?
Int_t fFtsBranchId
Detector Id of FTS.
TClonesArray * fFtsMcPoints
Input array of McPoints.
Int_t GetSaveDebugInfo() const
Returns the verbosity level.
TString fTracksArrayName
Branch name where to store the Track candidates.
PndFtsHoughTrackerTask(Int_t verbose=0, Bool_t persistence=kTRUE)
Constructor with flags. Can also be used as standard constructor.
virtual void SetParContainers()
Loads the parameter container from the runtime database.
Class for Hough space based on TH2S (for the moment). Saves the hits which enter this Hough space and...
FairLogger * fLogger
Returns pointer to the B field.
void CheckForDuplicateFtsHits()
void SetVerbose(Int_t verbose)
PndGeoFtsPar * fFtsParameters
Needed for FTS map creator.
virtual InitStatus Init()
Initialization of task at the beginning of a run.
~PndFtsHoughTrackerTask()
Destructor.
const PndFtsHit * GetFtsHit(UInt_t hitId) const
Returns pointer to the hit with index hitId in the FTS hit array.
const PndFtsTube * GetFtsTube(const PndFtsHit *const myHit) const
Returns pointer to the FTS tube corresponding to input FTS hit.
Class for saving a FTS track cand. for Hough transform based FTS PR.
PndFtsHoughTrackerTask operator=(const PndFtsHoughTrackerTask &)
virtual void Exec(Option_t *opt)
Executed for each event.
Int_t fSaveDebugInfo
Debug information will be created if >0.
UInt_t GetEventNr() const
Returns the save debug flag.
const TVector3 GetFtsHitPosErrors(const PndFtsHit *const ftsHit) const
Returns the position error (based on FTS straw geometry) for the hit with index hitId in the FTS hit ...
TClonesArray * fFtsTubeArray
Input array of PndFtsTube (map of FTS tubes).
Int_t getFtsBranchId() const
Returns detector Id of FTS. Try not to use it.
TClonesArray * fTrackCands
Array of found track candidates in PndTrackCand (for output)