HighLAND
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MomRangeCorrection Class Reference
Inheritance diagram for MomRangeCorrection:
CorrectionBase

Public Member Functions

 MomRangeCorrection (SubDetId::SubDetEnum det=SubDetId::kFGD1)
 
void Apply (AnaSpillC &spill)
 
- Public Member Functions inherited from CorrectionBase
 CorrectionBase (const CorrectionBase &corr)
 Copy constructor.
 
virtual ~CorrectionBase ()
 Everyone should have a destructor.
 
virtual const char * GetName () const
 Return the name of this correction. This overrides the TObject::GetName() interface.
 
const std::string & Name () const
 Return the name of this correction.
 
void SetName (const std::string &name)
 Set the name of this correction.
 
void Enable ()
 Enable the correction.
 
void Disable ()
 Disable the correction.
 
bool IsEnabled () const
 Is the correction enabled.
 
void SetAppliedInInput (bool ap)
 Set the correction as applied in the input file.
 
bool IsAppliedInInput () const
 Is the correction already applied in the input file ?
 
Int_t GetIndex () const
 Return the index of this correction.
 
void SetIndex (Int_t index)
 Set the index of this correction.
 
 ClassDef (CorrectionBase, 2)
 

Protected Member Functions

bool IsRelevantTrack (const AnaTrackB &track) const
 

Protected Attributes

SubDetId::SubDetEnum _det
 
- Protected Attributes inherited from CorrectionBase
std::string _name
 The name of this correction.
 
bool _enabled
 Is the correction enabled?
 
bool _appliedInInput
 Is the correction already applied in the input file ?
 
Int_t _index
 The index of the correction.
 

Detailed Description

Definition at line 9 of file MomRangeCorrection.hxx.

Member Function Documentation

§ Apply()

void MomRangeCorrection::Apply ( AnaSpillC spill)
virtual

This is the function that applies the correction to the input data. This MUST be overridden in the derived class.

Reimplemented from CorrectionBase.

Definition at line 18 of file MomRangeCorrection.cxx.

18  {
19  //********************************************************************
20 
21  AnaSpill& spill = *static_cast<AnaSpill*>(&spillBB);
22 
23  for (UInt_t i = 0; i < spill.Bunches.size(); i++) {
24  AnaBunch* bunch = static_cast<AnaBunch*>(spill.Bunches[i]);
25  for (UInt_t j = 0; j < bunch->Particles.size(); j++) {
26 
27  AnaTrackB* track = static_cast<AnaTrackB*>(bunch->Particles[j]);
28  if (!track) continue;
29 
30  // Check whether a track is relevant to apply the correction
31  if (!IsRelevantTrack(*track)) continue;
32 
33 #ifdef UseRecPack
34  double mom_range;
35  track->RangeMomentumMuon = -999.;
36  if (ND::tman().GetMomentumFromRangeLinear(*track, mom_range, ParticleId::kMuon))
37  track->RangeMomentumMuon = (Float_t)mom_range;
38 #endif
39 
40  }
41  }
42 }
std::vector< AnaBunchC * > Bunches
The reconstructed objects, split into timing bunches.
Float_t RangeMomentumMuon
Momentum by range calculated with muon hypothesis.
Representation of a global track.
std::vector< AnaParticleB * > Particles

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