er  dev
ERTelescopeTrackFinder.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 ERTelescopeTrackFinder_H
10 #define ERTelescopeTrackFinder_H
11 
12 #include <utility>
13 #include <limits>
14 #include "TClonesArray.h"
15 
16 #include "ERTask.h"
17 #include "ERTelescopeTrack.h"
18 #include "ERTelescopeSetup.h"
19 
27 public:
32  ERTelescopeTrackFinder(Int_t verbose);
34  ~ERTelescopeTrackFinder() = default;
35  /* Modifiers */
36  void SetHitStation(TString subassemblyName, TString componentIdX, TString componentIdY);
37  void SetHitStation(TString subassemblyName, TString componentId);
38  void SetTrackPositionCorrection(const TString& station_name, ERChannel channel,
39  float strip_fraction);
40  void SetStripEdepRange(Double_t edepMin, Double_t edepMax);
41  void SetEdepMaxDiffXY(Double_t edepDiff) {fEdepDiffXY = edepDiff;}
42  void SetInteractionPosition(double x, double y, double z);
43 public:
46  virtual InitStatus Init();
49  virtual void Exec(Option_t* opt);
51  virtual void Reset();
52 protected:
53  //Paramaters
55  //Input arrays
56  std::map<TString, TClonesArray*> fQTelescopeDigi;
57  TClonesArray* fBeamDetTrack = nullptr;
58  //Output arrays
59  std::map<TString, TClonesArray*> fQTelescopeTrack;
61  std::map<TString, std::map<TString, std::pair<TString, TString>>> fSiHitStationsPair;
62  std::map<TString, std::map<ERChannel, float>> track_position_corrections_;
63  Double_t fSiDigiEdepMin = std::numeric_limits<double>::min();
64  Double_t fSiDigiEdepMax = std::numeric_limits<double>::max();
65  Double_t fEdepDiffXY = std::numeric_limits<double>::max();
66  double interaction_x_ = 0.;
67  double interaction_y_ = 0.;
68  double interaction_z_ = 0.;
69  bool interaction_position_is_set_ = false;
70 private:
72  ERTelescopeTrack* AddTrack(const TVector3& targetVertex, const TVector3& xStationVertex, const TVector3& yStationVertex,
73  const TVector3& xStationLocalVertex, const TVector3& yStationLocalVertex,
74  Int_t xChannel, Int_t yChannel, Double_t xEdep, Double_t yEdep,
75  const TString& digiBranchName);
76  void CreateTrackInQTelescope(Int_t xChannelIndex, Int_t yChannelIndex, Int_t xChannel, Int_t yChannel, Double_t xEdep, Double_t yEdep,
77  const TString& xBranchName, const TString& yBranchName, const TString& trackBranchName);
78  void CreateTrackInRTelescope(Int_t xChannelIndex, Int_t yChannelIndex, Int_t phiChannel, Int_t RChannel, Double_t phiEdep, Double_t rEdep,
79  const TString& phiBranchName, const TString& rBranchName, const TString& trackBranchName);
80  TVector3 GetGlobalTrackPositionByStrip(const TString& branch_name, ERChannel channel) const;
81  ClassDef(ERTelescopeTrackFinder, 1)
82 };
83 #endif
virtual void Reset()
Resets all output data.
ERTelescopeTrackFinder()
Default constructor.
~ERTelescopeTrackFinder()=default
Destructor.
virtual InitStatus Init()
Defines all input and output object colletions participates in track finding.
ERTelescopeSetup * fQTelescopeSetup
access to ERTelescopeSetup class instance
ERTelescopeTrack * AddTrack(const TVector3 &targetVertex, const TVector3 &xStationVertex, const TVector3 &yStationVertex, const TVector3 &xStationLocalVertex, const TVector3 &yStationLocalVertex, Int_t xChannel, Int_t yChannel, Double_t xEdep, Double_t yEdep, const TString &digiBranchName)
Adds a ERTelescopeTrack to the output Collection.
Base abstract class for all tasks in er.
Definition: ERTask.h:27
virtual void Exec(Option_t *opt)
Defines the transformation actions for all input data (Digi) to output data (Track) for each event...