HighLAND
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ToFSenseCorrector Class Reference

Public Types

enum  ToFTopology {
  kToFTopo_FGD1FGD2 = 0, kToFTopo_FGD1P0D_Track, kToFTopo_FGD1ECAL_LAStartFgd_Track, kToFTopo_FGD1ECAL_LAStartFgd_Shower,
  kToFTopo_FGD1ECAL_LAEndFgd_Track, kToFTopo_FGD1ECAL_LAEndFgd_Shower, kToFTopo_FGD1ECAL_HAStartFgd_Track, kToFTopo_FGD1ECAL_HAStartFgd_Shower,
  kToFTopo_FGD1ECAL_HAEndFgd_Track, kToFTopo_FGD1ECAL_HAEndFgd_Shower, kToFInvalid
}
 

Public Member Functions

bool CheckNeedApplyToFBasedFlip (const AnaTrackB &track, ToFTopology topo) const
 Check whether a direction(sense) matches ToF.
 
Float_t GetCutValue (ToFSenseCorrector::ToFTopology cut) const
 Setters and getters.
 
void SetCutValue (ToFSenseCorrector::ToFTopology cut, Float_t value)
 

Static Public Member Functions

static bool IsForward (const AnaTrackB &track)
 Check whether a track is forward going.
 
static bool IsForward (const AnaTrueParticleB &track)
 Check whether a track is forward going.
 
static void ForceForward (AnaTrackB &track)
 Force a track to be forward going (if needed)
 
static void ForceForward (AnaTrackB *Tracks[], int nTracks)
 Force a collection of tracks to be forward going (if needed)
 
static void FlipTrack (AnaTrackB &track)
 Flip a track.
 
static ToFTopology GetToFTopology (const AnaTrackB &track)
 
static bool IsBarrelECAL (const AnaTrackB &track)
 Check whether a given track has ECAL segment, if so only BarrelECAL.
 

Detailed Description

Definition at line 6 of file ToFSenseCorrector.hxx.

Member Enumeration Documentation

§ ToFTopology

Various bits to check which ToF relevant topology has to be checked/present etc ToF was studied with specific samples and this id why it matters, more details will be provided in the dedicated TNs

Definition at line 11 of file ToFSenseCorrector.hxx.

11  {
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  };

Member Function Documentation

§ GetToFTopology()

ToFSenseCorrector::ToFTopology ToFSenseCorrector::GetToFTopology ( const AnaTrackB track)
static

Get the relevant ToF topology that should be used later to apply any ToF based business to this track

Definition at line 165 of file ToFSenseCorrector.cxx.

165  {
166  //********************************************************************
167 
168  // This function returns which type of ToF check/cut (there may be several involved since a
169  // track can cross several sub-detectors and the check/cut can also depend on the type of track,
170  // e.g. track/shower for the same topology)
171 
172 
173  // The current values (Sept 2016, details in TN-) used were retrieved using the track being forced to be forward going in Z
174  // hence the relevant type should be checked based on the position of the upstream/downstream (in Z) ends, no matter there correspondence
175  // to an actual start/end point
176 
177  const Float_t* pos_upstream;
178  const Float_t* pos_downstream;
179  bool forward = IsForward(track);
180  pos_upstream = forward ? track.PositionStart : track.PositionEnd;
181  pos_downstream = forward ? track.PositionEnd : track.PositionStart;
182 
183  // Four different topologies -> Fwd, HAFwd, Bwd, HABwd
184  if (anaUtils::InDetVolume(SubDetId::kFGD1, pos_upstream)) {
185  if (cutUtils::TrackQualityCut(track)) {
186  if (track.ToF.Flag_FGD1_FGD2) return kToFTopo_FGD1FGD2;
187  else if (track.ToF.Flag_ECal_FGD1) {
188  if (ToFSenseCorrector::IsBarrelECAL(track)) {
189  if (track.ECALSegments[0]->NNodes == 1) return kToFTopo_FGD1ECAL_LAStartFgd_Shower;
190  if (track.ECALSegments[0]->NNodes > 1) return kToFTopo_FGD1ECAL_LAStartFgd_Track;
191  }
192  }
193  }
194  else {
195  if (cutUtils::StoppingBrECALorSMRDCut(pos_downstream)!=-1) {
196  if (track.ToF.Flag_ECal_FGD1) {
197  if (ToFSenseCorrector::IsBarrelECAL(track)) {
198  if (track.ECALSegments[0]->NNodes == 1) return kToFTopo_FGD1ECAL_HAStartFgd_Shower;
199  if (track.ECALSegments[0]->NNodes > 1) return kToFTopo_FGD1ECAL_HAStartFgd_Track;
200  }
201  }
202  }
203  }
204  }
205  else if (anaUtils::InDetVolume(SubDetId::kFGD1, pos_downstream)) {
206  if (cutUtils::TrackQualityCut(track)) {
207  if (track.ToF.Flag_P0D_FGD1) {
208  if (track.nP0DSegments > 0) {
209  if (track.P0DSegments[0]) {
210  if (track.P0DSegments[0]->NNodes > 1) return kToFTopo_FGD1P0D_Track;
211  }
212  }
213  }
214  else if (track.ToF.Flag_ECal_FGD1) {
215  if (ToFSenseCorrector::IsBarrelECAL(track)) {
216  if (track.ECALSegments[0]->NNodes == 1) return kToFTopo_FGD1ECAL_LAEndFgd_Shower;
217  if (track.ECALSegments[0]->NNodes > 1) return kToFTopo_FGD1ECAL_LAEndFgd_Track;
218  }
219  }
220  }
221  else {
222  if (cutUtils::StoppingBrECALorSMRDCut(pos_upstream)!=-1) {
223  if (track.ToF.Flag_ECal_FGD1) {
224  if (ToFSenseCorrector::IsBarrelECAL(track)) {
225  if (track.ECALSegments[0]->NNodes == 1) return kToFTopo_FGD1ECAL_HAEndFgd_Shower;
226  if (track.ECALSegments[0]->NNodes > 1) return kToFTopo_FGD1ECAL_HAEndFgd_Track;
227  }
228  }
229  }
230  }
231  }
232 
233  return kToFInvalid;
234 
235 }
int nP0DSegments
How many P0D tracks are associated with this track.
Float_t PositionStart[4]
The reconstructed start position of the particle.
AnaP0DParticleB * P0DSegments[NMAXP0DS]
The P0D segments that contributed to this global track.
AnaECALParticleB * ECALSegments[NMAXECALS]
The ECAL segments that contributed to this global track.
static bool IsForward(const AnaTrackB &track)
Check whether a track is forward going.
Int_t NNodes
The number of nodes in the reconstructed object.
AnaToF ToF
Times of flight between pairs of detectors.
bool InDetVolume(SubDetId::SubDetEnum det, const Float_t *pos)
static bool IsBarrelECAL(const AnaTrackB &track)
Check whether a given track has ECAL segment, if so only BarrelECAL.
Float_t PositionEnd[4]
The reconstructed end position of the particle.

The documentation for this class was generated from the following files: