20 #ifndef PndFtsHoughTrackerTask_H 21 #define PndFtsHoughTrackerTask_H 31 #include "TClonesArray.h" 43 #include "FairMCPoint.h" 69 virtual InitStatus
Init();
71 virtual InitStatus
ReInit();
76 virtual void Exec(Option_t *opt);
116 throwError(
"GetFtsHit was not able to get the hit.");
122 Int_t mcPointId = ftsHit->GetRefIndex();
124 throwError(
"getMcTruthIdForHitId: negative mcPointId.");
125 FairMCPoint *myPoint = (FairMCPoint *)(
fFtsMcPoints->At(mcPointId));
127 throwError(
"getMcTruthIdForHitId: Could not get point belonging to hit.");
128 Int_t mcTrackId = myPoint->GetTrackID();
130 throwError(
"getMcTruthIdForHitId: negative mcTrackId.");
226 void throwError(
const TString s)
const {
throw std::runtime_error(s.Data()); };
230 for (
int iHit1 = 0; iHit1 <
GetNFtsHits(); ++iHit1) {
233 const Int_t tubeIdHit1 = myHit1->
GetTubeID();
235 for (
int iHit2 = iHit1 + 1; iHit2 <
GetNFtsHits(); ++iHit2) {
238 const Int_t tubeIdHit2 = myHit2->
GetTubeID();
240 if (tubeIdHit1 == tubeIdHit2)
241 std::cout <<
"Event " <<
GetEventNr() <<
"tubeID1=" << tubeIdHit1 <<
" tubeID2=" << tubeIdHit2 <<
": HitIdx " << iHit1 <<
" and HitIdx " << iHit2 <<
" are duplicate!\n";
virtual void FinishEvent()
When is this executed? After each event?
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 ...
virtual InitStatus ReInit()
ReInitiliazation of task when the runID changes.
UInt_t fEventNr
Event number for debugging purposes.
const PndFtsTube * GetFtsTube(const PndFtsHit *const myHit) const
Returns pointer to the FTS tube corresponding to input FTS hit.
FairField * fField
For B field access.
virtual void Exec(Option_t *opt)
Executed for each event.
Interface between PandaRoot (data input and output) and PndFtsHoughTrackFinder (implementation of PR ...
Int_t GetSaveDebugInfo() const
Returns the verbosity level.
ClassDef(PndFtsHoughTrackerTask, 1)
const PndFtsHit * GetFtsHit(UInt_t hitId) const
Returns pointer to the hit with index hitId in the FTS hit array.
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)
void SetSaveDebugInfo(Int_t saveDebugInfo)
UInt_t GetEventNr() const
Returns the save debug flag.
Int_t getMcTruthIdForHitId(UInt_t hitId) const
Int_t fFtsBranchId
Detector Id of FTS.
TClonesArray * fFtsMcPoints
Input array of McPoints.
TString fTracksArrayName
Branch name where to store the Track candidates.
FairField * getMagneticFieldPtr() const
PndFtsHoughTrackerTask(Int_t verbose=0, Bool_t persistence=kTRUE)
Constructor with flags. Can also be used as standard constructor.
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()
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 SetVerbose(Int_t verbose)
virtual void Finish()
Writes output to root file, I guess. Called at the end of the run.
PndGeoFtsPar * fFtsParameters
Needed for FTS map creator.
~PndFtsHoughTrackerTask()
Destructor.
Int_t getFtsBranchId() const
Returns detector Id of FTS. Try not to use it.
void throwError(const TString s) const
For error reporting.
TClonesArray * getFtsHitArrayPtr() const
Returns pointer to the hit array in which FTS hits are saved as PndFtsHit. Try not to use it...
Class for saving a FTS track cand. for Hough transform based FTS PR.
virtual InitStatus Init()
Initialization of task at the beginning of a run.
Int_t GetNFtsHits() const
Returns the event number.
PndFtsHoughTrackerTask operator=(const PndFtsHoughTrackerTask &)
Int_t fSaveDebugInfo
Debug information will be created if >0.
TClonesArray * fFtsTubeArray
Input array of PndFtsTube (map of FTS tubes).
TClonesArray * fTrackCands
Array of found track candidates in PndTrackCand (for output)
virtual void SetParContainers()
Loads the parameter container from the runtime database.