HighLAND
ToFSenseCorrector.hxx
1 #ifndef ToFSenseCorrector_h
2 #define ToFSenseCorrector_h
3 
4 #include "BaseDataClasses.hxx"
5 
7 public:
8  /// Various bits to check which ToF relevant topology has to be checked/present etc
9  /// ToF was studied with specific samples and this id why it matters, more details will
10  /// be provided in the dedicated TNs
12  kToFTopo_FGD1FGD2 = 0,
13  kToFTopo_FGD1P0D_Track,
14  kToFTopo_FGD1ECAL_LAStartFgd_Track,
15  kToFTopo_FGD1ECAL_LAStartFgd_Shower,
16  kToFTopo_FGD1ECAL_LAEndFgd_Track,
17  kToFTopo_FGD1ECAL_LAEndFgd_Shower,
18  kToFTopo_FGD1ECAL_HAStartFgd_Track,
19  kToFTopo_FGD1ECAL_HAStartFgd_Shower,
20  kToFTopo_FGD1ECAL_HAEndFgd_Track,
21  kToFTopo_FGD1ECAL_HAEndFgd_Shower,
22  kToFInvalid, // will use it for array counter...
23  };
24 
26 
27  virtual ~ToFSenseCorrector(){}
28 
29  /// Check whether a track is forward going
30  static bool IsForward(const AnaTrackB& track);
31 
32  /// Check whether a track is forward going
33  static bool IsForward(const AnaTrueParticleB& track);
34 
35  /// Force a track to be forward going (if needed)
36  static void ForceForward(AnaTrackB& track);
37 
38  /// Force a collection of tracks to be forward going (if needed)
39  static void ForceForward(AnaTrackB* Tracks[], int nTracks);
40 
41  /// Check whether a direction(sense) matches ToF
42  bool CheckNeedApplyToFBasedFlip(const AnaTrackB& track, ToFTopology topo) const;
43 
44  /// Flip a track
45  static void FlipTrack(AnaTrackB& track);
46 
47  /// Get the relevant ToF topology that should be used later
48  /// to apply any ToF based business to this track
49  static ToFTopology GetToFTopology(const AnaTrackB& track);
50 
51  /// Check whether a given track has ECAL segment, if so only BarrelECAL
52  static bool IsBarrelECAL(const AnaTrackB& track);
53 
54  /// Setters and getters
56  if (cut == ToFSenseCorrector::kToFInvalid){
57  std::cout << " ToFSenseCorrector::GetCutValue() is called for wrong index " << std::endl;
58  return 0XDEADBEEF;
59  }
60  return ToFCutValues[cut];
61  }
62 
63  void SetCutValue(ToFSenseCorrector::ToFTopology cut, Float_t value){
64  if (cut == ToFSenseCorrector::kToFInvalid){
65  std::cout << " ToFSenseCorrector::SetCutValue() is called for wrong index " << std::endl;
66  return;
67  }
68  ToFCutValues[cut] = value;
69  }
70 
71 
72 
73 private:
74 
75  Float_t ToFCutValues[kToFInvalid];
76 
77 };
78 
79 #endif
static void ForceForward(AnaTrackB &track)
Force a track to be forward going (if needed)
Float_t GetCutValue(ToFSenseCorrector::ToFTopology cut) const
Setters and getters.
static bool IsForward(const AnaTrackB &track)
Check whether a track is forward going.
static void FlipTrack(AnaTrackB &track)
Flip a track.
Representation of a true Monte Carlo trajectory/particle.
static ToFTopology GetToFTopology(const AnaTrackB &track)
bool CheckNeedApplyToFBasedFlip(const AnaTrackB &track, ToFTopology topo) const
Check whether a direction(sense) matches ToF.
Representation of a global track.
static bool IsBarrelECAL(const AnaTrackB &track)
Check whether a given track has ECAL segment, if so only BarrelECAL.