er  dev
ERNDTrackFinder.h
1 /********************************************************************************
2  * Copyright (C) Joint Institute for Nuclear Research *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef ERNDTrackFinder_H
10 #define ERNDTrackFinder_H
11 
12 #include "TClonesArray.h"
13 #include "TVector3.h"
14 
15 #include "ERTask.h"
16 #include "ERNDTrack.h"
17 #include "ERNDSetup.h"
18 
19 class ERNDTrackFinder : public ERTask {
20  public:
22  virtual InitStatus Init();
23  virtual void Exec(Option_t* opt);
24  virtual void Reset();
25  void SetTargetVertex(const TVector3& vertex);
26  protected:
27  //Input arrays
28  TClonesArray* fNDDigis = nullptr;
29  TClonesArray* fBeamDetTrack = nullptr;
30  //Output arrays
31  TClonesArray *fNDTracks = nullptr;
32  ERNDSetup* fSetup = nullptr;
33  TVector3 fTargetVertex;
34  bool fUserTargetVertexIsSet = false;
35  ERNDTrack* AddTrack(const TVector3& detectorVertex, const TVector3& targetVertex,
36  float edep, float time, float tac);
37  ClassDef(ERNDTrackFinder,1)
38 };
39 
40 #endif
virtual InitStatus Init()
virtual void Reset()
Base abstract class for all tasks in er.
Definition: ERTask.h:27