CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
tmtt::DegradeBend Class Reference

#include <DegradeBend.h>

Public Types

typedef TTStubAlgorithm_official< Ref_Phase2TrackerDigi_StubAlgorithmOfficial
 

Public Member Functions

void degrade (float bend, bool psModule, const DetId &stDetId, float windowFEnew, float &degradedBend, unsigned int &numInGroup) const
 
 DegradeBend (const TrackerTopology *trackerTopo, const StubFEWindows *sw, const StubAlgorithmOfficial *stubAlgo)
 

Private Member Functions

void work (float bend, bool psModule, const DetId &stDetId, float windowFEnew, float &degradedBend, unsigned int &numInGroup, unsigned int &windowHalfStrips) const
 

Private Attributes

const StubAlgorithmOfficialstubAlgo_
 
const StubFEWindowssw_
 
const TrackerTopologytheTrackerTopo_
 

Detailed Description

Definition at line 15 of file DegradeBend.h.

Member Typedef Documentation

◆ StubAlgorithmOfficial

Definition at line 32 of file DegradeBend.h.

Constructor & Destructor Documentation

◆ DegradeBend()

tmtt::DegradeBend::DegradeBend ( const TrackerTopology trackerTopo,
const StubFEWindows sw,
const StubAlgorithmOfficial stubAlgo 
)
inline

Definition at line 34 of file DegradeBend.h.

35  : theTrackerTopo_(trackerTopo), sw_(sw), stubAlgo_(stubAlgo) {}
const StubFEWindows * sw_
Definition: DegradeBend.h:67
const StubAlgorithmOfficial * stubAlgo_
Definition: DegradeBend.h:70
const TrackerTopology * theTrackerTopo_
Definition: DegradeBend.h:64

Member Function Documentation

◆ degrade()

void tmtt::DegradeBend::degrade ( float  bend,
bool  psModule,
const DetId stDetId,
float  windowFEnew,
float &  degradedBend,
unsigned int &  numInGroup 
) const

Definition at line 24 of file DegradeBend.cc.

References edmIntegrityCheck::work.

Referenced by tmtt::Stub::degradeResolution().

29  {
30  // Get degraded bend value.
31  unsigned int windowHalfStrips;
32  this->work(bend, psModule, stDetId, windowFEnew, degradedBend, numInGroup, windowHalfStrips);
33  }
void work(float bend, bool psModule, const DetId &stDetId, float windowFEnew, float &degradedBend, unsigned int &numInGroup, unsigned int &windowHalfStrips) const
Definition: DegradeBend.cc:37

◆ work()

void tmtt::DegradeBend::work ( float  bend,
bool  psModule,
const DetId stDetId,
float  windowFEnew,
float &  degradedBend,
unsigned int &  numInGroup,
unsigned int &  windowHalfStrips 
) const
private

Definition at line 37 of file DegradeBend.cc.

References funct::abs(), b, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), createfilelist::int, SiStripPI::min, and svgfig::window().

43  {
44  // Calculate stub window size in half-strip units used to produce stubs.
45  // Code accessing geometry inspired by L1Trigger/TrackTrigger/src/TTStubAlgorithm_official.cc
46 
47  const double* storedHalfWindow = sw_->storedWindowSize(theTrackerTopo_, stDetId);
48 
49  // Compare this with the possibly tighter window provided by the user, converting to half-strip units.
50  const double window = std::min(*storedHalfWindow, double(windowFEnew));
51  windowHalfStrips = (unsigned int)(2 * window);
52 
53  // Bend is measured with granularity of 0.5 strips.
54  // Convert it to integer measured in half-strip units for this calculation!
55  int b = std::round(2 * bend);
56 
57  if ((unsigned int)(std::abs(b)) <= windowHalfStrips) {
58  // Call the official CMS bend encoding algorithm.
59  degradedBend = stubAlgo_->degradeBend(psModule, windowHalfStrips, b);
60  } else {
61  // This should only happen for stubs subsequently rejected by the FE.
62  numInGroup = 0;
63  constexpr float rejectedStubBend = 99999.;
64  degradedBend = rejectedStubBend;
65  }
66  }
const StubFEWindows * sw_
Definition: DegradeBend.h:67
const StubAlgorithmOfficial * stubAlgo_
Definition: DegradeBend.h:70
const TrackerTopology * theTrackerTopo_
Definition: DegradeBend.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float degradeBend(bool psModule, int window, int bend) const
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
const double * storedWindowSize(const TrackerTopology *trackerTopo, const DetId &detId) const
double b
Definition: hdecay.h:120

Member Data Documentation

◆ stubAlgo_

const StubAlgorithmOfficial* tmtt::DegradeBend::stubAlgo_
private

Definition at line 70 of file DegradeBend.h.

◆ sw_

const StubFEWindows* tmtt::DegradeBend::sw_
private

Definition at line 67 of file DegradeBend.h.

◆ theTrackerTopo_

const TrackerTopology* tmtt::DegradeBend::theTrackerTopo_
private

Definition at line 64 of file DegradeBend.h.