CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
TTStub< T > Class Template Reference

Class to store the L1 Track Trigger stubs. More...

#include <TTStub.h>

Public Member Functions

void addClusterRef (edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > aTTCluster)
 Add a cluster reference, depending on which stack member it is on (inner = 0, outer = 1) More...
 
double bendBE () const
 BendBE(): In FULL-STRIP units! Reduced resolution from BE boards. Rename of getHardwareBend() More...
 
double bendFE () const
 BendFE(): In FULL-STRIP units from FE! Rename of getTriggerBend() More...
 
double bendOffset () const
 
const edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > & clusterRef (unsigned int hitStackMember) const
 Clusters composing the Stub – see https://twiki.cern.ch/twiki/bin/viewauth/CMS/SLHCTrackerTriggerSWTools#TTCluster. More...
 
DetId getDetId () const
 Detector element. More...
 
double innerClusterPosition () const
 
bool moduleTypePS () const
 check if a PS module More...
 
std::string print (unsigned int i=0) const
 Print Stub information for debugging purposes. More...
 
double rawBend () const
 Trigger info. More...
 
void setBendBE (float aBend)
 setBendBE(): In HALF-STRIP units! Reduced resolution in BE boards. Rename of setHardwareBend() More...
 
void setBendOffset (int anOffset)
 
void setDetId (DetId aDetId)
 
void setModuleTypePS (bool isPSModule)
 set whether this is a PS module or not; More...
 
void setRawBend (int aDisplacement)
 
 TTStub ()
 Constructors. More...
 
 TTStub (DetId aDetId)
 Another Constructor using a given DetId. More...
 
 ~TTStub ()
 Destructor. More...
 

Private Attributes

float theBendBE
 
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
 
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
 
DetId theDetId
 Data members. More...
 
int theDisplacement
 
int theOffset
 
bool thePSModule
 

Static Private Attributes

static constexpr float dummyBend = 999999
 

Detailed Description

template<typename T>
class TTStub< T >

Class to store the L1 Track Trigger stubs.

After moving from SimDataFormats to DataFormats, the template structure of the class was maintained in order to accomodate any types other than Phase2TrackerDigis in case there is such a need in the future.

Author
Andrew W. Rose
Nicola Pozzobon
Date
2013, Jul 12

Definition at line 22 of file TTStub.h.

Constructor & Destructor Documentation

◆ TTStub() [1/2]

template<typename T >
TTStub< T >::TTStub ( )

Constructors.

Close class.

Implementation of methods

Here, in the header file, the methods which do not depend on the specific type <T> that can fit the template. Other methods, with type-specific features, are implemented in the source file.Default Constructor

Set default data members

Definition at line 125 of file TTStub.h.

125  {
127  theDetId = 0;
129  theOffset = 0;
131 }
static constexpr float dummyBend
Definition: TTStub.h:113
float theBendBE
Definition: TTStub.h:110
int theOffset
Definition: TTStub.h:109
int theDisplacement
Definition: TTStub.h:108
DetId theDetId
Data members.
Definition: TTStub.h:105

◆ TTStub() [2/2]

template<typename T >
TTStub< T >::TTStub ( DetId  aDetId)

Another Constructor using a given DetId.

Set data members

Set default data members

Definition at line 135 of file TTStub.h.

References HLT_2023v12_cff::setDetId.

135  {
137  this->setDetId(aDetId);
138 
141  theOffset = 0;
143 }
static constexpr float dummyBend
Definition: TTStub.h:113
float theBendBE
Definition: TTStub.h:110
int theOffset
Definition: TTStub.h:109
void setDetId(DetId aDetId)
Definition: TTStub.h:45
int theDisplacement
Definition: TTStub.h:108

◆ ~TTStub()

template<typename T >
TTStub< T >::~TTStub ( )

Destructor.

Definition at line 147 of file TTStub.h.

147 {}

Member Function Documentation

◆ addClusterRef()

template<typename T >
void TTStub< T >::addClusterRef ( edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > >  aTTCluster)

Add a cluster reference, depending on which stack member it is on (inner = 0, outer = 1)

Definition at line 156 of file TTStub.h.

Referenced by TTStubBuilder< T >::produce().

156  {
157  if (aTTCluster->getStackMember() == 0)
158  theClusterRef0 = aTTCluster;
159  else if (aTTCluster->getStackMember() == 1)
160  theClusterRef1 = aTTCluster;
161 }
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
Definition: TTStub.h:107
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
Definition: TTStub.h:106

◆ bendBE()

template<typename T >
double TTStub< T >::bendBE ( ) const

BendBE(): In FULL-STRIP units! Reduced resolution from BE boards. Rename of getHardwareBend()

Definition at line 211 of file TTStub.h.

211  {
212  if (theBendBE == dummyBend)
213  return this->bendFE(); // If not set make it transparent
214 
215  return theBendBE;
216 }
static constexpr float dummyBend
Definition: TTStub.h:113
double bendFE() const
BendFE(): In FULL-STRIP units from FE! Rename of getTriggerBend()
Definition: TTStub.h:203
float theBendBE
Definition: TTStub.h:110

◆ bendFE()

template<typename T >
double TTStub< T >::bendFE ( ) const

BendFE(): In FULL-STRIP units from FE! Rename of getTriggerBend()

Definition at line 203 of file TTStub.h.

Referenced by TTStubBuilder< T >::SortStubsBend().

203  {
204  if (theDisplacement == dummyBend)
205  return theDisplacement;
206 
207  return 0.5 * (theDisplacement - theOffset);
208 }
static constexpr float dummyBend
Definition: TTStub.h:113
int theOffset
Definition: TTStub.h:109
int theDisplacement
Definition: TTStub.h:108

◆ bendOffset()

template<typename T >
double TTStub< T >::bendOffset ( ) const

BendOffset() [rename of getTriggerOffset()]: In FULL strip units! Returns the correction offset calculated while accepting/rejecting the stub Offset is the projection of a straight line from the beam-spot through the innermost hit to the outermost stack member, again in terms of outer member pitch. It is calculated taking the centre of the module at (NROWS/2)-0.5.

Definition at line 175 of file TTStub.h.

175  {
176  return 0.5 * theOffset;
177 }
int theOffset
Definition: TTStub.h:109

◆ clusterRef()

template<typename T >
const edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > & TTStub< T >::clusterRef ( unsigned int  hitStackMember) const

Clusters composing the Stub – see https://twiki.cern.ch/twiki/bin/viewauth/CMS/SLHCTrackerTriggerSWTools#TTCluster.

Data members: aBc( ... ) Helper methods: findAbc( ... )Returns the permanent references of the cluster in the sensor stack identified by hitStackMember which should be either 0 or 1 for the innermost and outermost sensor, respectively

Definition at line 150 of file TTStub.h.

Referenced by tmtt::StubKiller::killStub(), TTStubAlgorithm_official< T >::PatternHitCorrelation(), pTFrom2Stubs::rInvFrom2(), and tmtt::Stub::Stub().

151  {
152  return (hitStackMember == 0) ? theClusterRef0 : theClusterRef1;
153 }
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
Definition: TTStub.h:107
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
Definition: TTStub.h:106

◆ getDetId()

template<typename T>
DetId TTStub< T >::getDetId ( void  ) const
inline

Detector element.

Definition at line 44 of file TTStub.h.

References TTStub< T >::theDetId.

Referenced by tmtt::StubKiller::killStub(), tmtt::StubKiller::killStubInDeadModule(), and TTStubAlgorithm_official< T >::PatternHitCorrelation().

44 { return theDetId; }
DetId theDetId
Data members.
Definition: TTStub.h:105

◆ innerClusterPosition()

template<typename T >
double TTStub< T >::innerClusterPosition ( ) const

CBC3-style trigger information for sake of simplicity, these methods are slightly out of the ABC(...)/findABC(...) rule InnerClusterPosition() [rename of getTriggerPosition()]: In FULL strip units! Returns the average local x coordinate of hits in the inner stack member

Definition at line 198 of file TTStub.h.

198  {
199  return this->clusterRef(0)->findAverageLocalCoordinates().x(); //CBC3-style trigger info
200 }
const edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > & clusterRef(unsigned int hitStackMember) const
Clusters composing the Stub – see https://twiki.cern.ch/twiki/bin/viewauth/CMS/SLHCTrackerTriggerSWT...
Definition: TTStub.h:150

◆ moduleTypePS()

template<typename T >
bool TTStub< T >::moduleTypePS ( ) const

check if a PS module

Definition at line 194 of file TTStub.h.

Referenced by TTStubAlgorithm_official< T >::PatternHitCorrelation().

194  {
195  return thePSModule;
196 } // check if a PS module
bool thePSModule
Definition: TTStub.h:111

◆ print()

template<typename T >
std::string TTStub< T >::print ( unsigned int  i = 0) const

Print Stub information for debugging purposes.

Information.

Definition at line 220 of file TTStub.h.

References mps_fire::i, dqmiolumiharvest::j, convertSQLitetoXML_cfg::output, and AlCaHLTBitMon_QueryRunRegistry::string.

220  {
221  std::string padding("");
222  for (unsigned int j = 0; j != i; ++j) {
223  padding += "\t";
224  }
225 
226  std::stringstream output;
227  output << padding << "TTStub:\n";
228  padding += '\t';
229  output << padding << "DetId: " << theDetId.rawId() << ", position: " << this->InnerClusterPosition();
230  output << ", bend: " << this->BendFE() << '\n';
231  output << ", hardware bend: " << this->BendBE() << '\n';
232  output << padding << "cluster 0: address: " << theClusterRef0.get();
233  output << ", cluster size: " << theClusterRef0->getHits().size() << '\n';
234  output << padding << "cluster 1: address: " << theClusterRef1.get();
235  output << ", cluster size: " << theClusterRef1->getHits().size() << '\n';
236  return output.str();
237 }
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
Definition: TTStub.h:107
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DetId theDetId
Data members.
Definition: TTStub.h:105
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
Definition: output.py:1
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
Definition: TTStub.h:106

◆ rawBend()

template<typename T >
double TTStub< T >::rawBend ( ) const

Trigger info.

Trigger information; see, e.g., TTStubAlgorithm_official::PatternHitCorrelation for definitions Values are passed back from there via the TTStubBuilder, be careful to choose the right one. In particular note the difference between values passed as "full" strip units (i.e. the strip number or difference between strip numbers) and "half" strip units, which have a 2X finer granularity. RawBend() [rename of getTriggerDisplacement()]: In FULL strip units! Returns the relative displacement between the two cluster centroids, i.e. the difference between average row coordinates in inner and outer stack member, in terms of outer member pitch (if both pitches are the same, this is just the coordinate difference). Flag for rejected stubs: +500 if rejected by FE, +1000 if rejected by CIC chip.

Definition at line 165 of file TTStub.h.

165  {
166  return 0.5 * theDisplacement;
167 }
int theDisplacement
Definition: TTStub.h:108

◆ setBendBE()

template<typename T >
void TTStub< T >::setBendBE ( float  aBend)

setBendBE(): In HALF-STRIP units! Reduced resolution in BE boards. Rename of setHardwareBend()

Definition at line 185 of file TTStub.h.

Referenced by TTStubBuilder< T >::produce().

185  {
186  theBendBE = aBend;
187 }
float theBendBE
Definition: TTStub.h:110

◆ setBendOffset()

template<typename T >
void TTStub< T >::setBendOffset ( int  anOffset)

setBendOffset() [rename of setTriggerOffset()]: In HALF strip units! Again restricted to builder code.

Definition at line 180 of file TTStub.h.

Referenced by TTStubBuilder< T >::produce().

180  {
181  theOffset = anOffset;
182 }
int theOffset
Definition: TTStub.h:109

◆ setDetId()

template<typename T>
void TTStub< T >::setDetId ( DetId  aDetId)
inline

Definition at line 45 of file TTStub.h.

References TTStub< T >::theDetId.

45 { theDetId = aDetId; }
DetId theDetId
Data members.
Definition: TTStub.h:105

◆ setModuleTypePS()

template<typename T >
void TTStub< T >::setModuleTypePS ( bool  isPSModule)

set whether this is a PS module or not;

Definition at line 190 of file TTStub.h.

Referenced by TTStubBuilder< T >::produce().

190  {
191  thePSModule = isPSModule;
192 } // set whether this is a PS module or not;
bool thePSModule
Definition: TTStub.h:111

◆ setRawBend()

template<typename T >
void TTStub< T >::setRawBend ( int  aDisplacement)

setRawBend [rename of setTriggerDisplacement()]: In HALF strip units! Sets relative displacement between the two cluster centroids, as above. Flag for rejected stubs: +500 if rejected by FE, +1000 if rejected by CIC chip. NB: Should probably only be used in TTStubBuilder or very similar.

Definition at line 170 of file TTStub.h.

Referenced by TTStubBuilder< T >::produce().

170  {
171  theDisplacement = aDisplacement;
172 }
int theDisplacement
Definition: TTStub.h:108

Member Data Documentation

◆ dummyBend

template<typename T>
constexpr float TTStub< T >::dummyBend = 999999
staticprivate

Definition at line 113 of file TTStub.h.

◆ theBendBE

template<typename T>
float TTStub< T >::theBendBE
private

Definition at line 110 of file TTStub.h.

◆ theClusterRef0

template<typename T>
edm::Ref<edmNew::DetSetVector<TTCluster<T> >, TTCluster<T> > TTStub< T >::theClusterRef0
private

Definition at line 106 of file TTStub.h.

◆ theClusterRef1

template<typename T>
edm::Ref<edmNew::DetSetVector<TTCluster<T> >, TTCluster<T> > TTStub< T >::theClusterRef1
private

Definition at line 107 of file TTStub.h.

◆ theDetId

template<typename T>
DetId TTStub< T >::theDetId
private

Data members.

Definition at line 105 of file TTStub.h.

Referenced by TTStub< T >::getDetId(), and TTStub< T >::setDetId().

◆ theDisplacement

template<typename T>
int TTStub< T >::theDisplacement
private

Definition at line 108 of file TTStub.h.

◆ theOffset

template<typename T>
int TTStub< T >::theOffset
private

Definition at line 109 of file TTStub.h.

◆ thePSModule

template<typename T>
bool TTStub< T >::thePSModule
private

Definition at line 111 of file TTStub.h.