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)
 
const edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > & getClusterRef (unsigned int hitIdentifier) const
 Clusters composing the Stub. More...
 
DetId getDetId () const
 Detector element. More...
 
double getHardwareBend () const
 In FULL-STRIP units! More...
 
double getRealTriggerOffset () const
 In HALF-STRIP units! More...
 
double getTriggerBend () const
 In FULL-STRIP units! More...
 
double getTriggerDisplacement () const
 Trigger information. More...
 
double getTriggerOffset () const
 In HALF-STRIP units! More...
 
double getTriggerPosition () const
 In HALF-STRIP units! More...
 
std::string print (unsigned int i=0) const
 In HALF-STRIP units! More...
 
void setDetId (DetId aDetId)
 
void setHardwareBend (float aBend)
 In FULL-STRIP units! More...
 
void setRealTriggerOffset (float anOffset)
 In FULL-STRIP units! (hence, not implemented herein) More...
 
void setTriggerDisplacement (int aDisplacement)
 In FULL-STRIP units! (hence, not implemented herein) More...
 
void setTriggerOffset (int anOffset)
 In FULL-STRIP units! (hence, not implemented herein) More...
 
 TTStub ()
 Constructors. More...
 
 TTStub (DetId aDetId)
 Another Constructor. More...
 
 ~TTStub ()
 Destructor. More...
 

Private Attributes

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
 
float theHardwareBend
 
int theOffset
 
float theRealOffset
 

Static Private Attributes

static 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

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 86 of file TTStub.h.

References TTStub< T >::dummyBend, TTStub< T >::theDetId, TTStub< T >::theDisplacement, TTStub< T >::theHardwareBend, TTStub< T >::theOffset, and TTStub< T >::theRealOffset.

87 {
89  theDetId = 0;
91  theOffset = 0;
92  theRealOffset = 0;
94 }
float theRealOffset
Definition: TTStub.h:71
int theOffset
Definition: TTStub.h:70
static float dummyBend
Definition: TTStub.h:74
int theDisplacement
Definition: TTStub.h:69
DetId theDetId
Data members.
Definition: TTStub.h:66
float theHardwareBend
Definition: TTStub.h:72
template<typename T >
TTStub< T >::TTStub ( DetId  aDetId)

Another Constructor.

Set data members

Set default data members

Definition at line 98 of file TTStub.h.

References TTStub< T >::dummyBend, TTStub< T >::setDetId(), TTStub< T >::theDisplacement, TTStub< T >::theHardwareBend, TTStub< T >::theOffset, and TTStub< T >::theRealOffset.

99 {
101  this->setDetId( aDetId );
102 
105  theOffset = 0;
106  theRealOffset = 0;
108 }
float theRealOffset
Definition: TTStub.h:71
int theOffset
Definition: TTStub.h:70
static float dummyBend
Definition: TTStub.h:74
void setDetId(DetId aDetId)
Definition: TTStub.h:41
int theDisplacement
Definition: TTStub.h:69
float theHardwareBend
Definition: TTStub.h:72
template<typename T >
TTStub< T >::~TTStub ( )

Destructor.

Definition at line 112 of file TTStub.h.

112 {}

Member Function Documentation

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

Definition at line 122 of file TTStub.h.

References TTStub< T >::theClusterRef0, and TTStub< T >::theClusterRef1.

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

123 {
124  if(aTTCluster->getStackMember() == 0) theClusterRef0 = aTTCluster;
125  else if (aTTCluster->getStackMember() == 1) theClusterRef1 = aTTCluster;
126 }
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
Definition: TTStub.h:67
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
Definition: TTStub.h:68
template<typename T >
const edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > & TTStub< T >::getClusterRef ( unsigned int  hitIdentifier) const

Clusters composing the Stub.

Get the Reference to a Cluster.

Data members: getABC( ... ) Helper methods: findABC( ... )

Definition at line 116 of file TTStub.h.

References TTStub< T >::theClusterRef0, and TTStub< T >::theClusterRef1.

Referenced by TTStub< T >::getTriggerPosition(), TTStubAlgorithm_official< T >::PatternHitCorrelation(), and TTStubBuilder< T >::produce().

117 {
118  return hitIdentifier==0 ? theClusterRef0 : theClusterRef1;
119 }
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
Definition: TTStub.h:67
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
Definition: TTStub.h:68
template<typename T>
DetId TTStub< T >::getDetId ( void  ) const
inline

Detector element.

Definition at line 40 of file TTStub.h.

References TTStub< T >::theDetId.

Referenced by TTStubAlgorithm_official< T >::PatternHitCorrelation(), and TTStubBuilder< T >::produce().

40 { return theDetId; }
DetId theDetId
Data members.
Definition: TTStub.h:66
template<typename T >
double TTStub< T >::getHardwareBend ( ) const

In FULL-STRIP units!

Definition at line 168 of file TTStub.h.

References TTStub< T >::dummyBend, TTStub< T >::getTriggerBend(), and TTStub< T >::theHardwareBend.

Referenced by TTStub< T >::print(), TTStubBuilder< T >::produce(), and TTStub< T >::setDetId().

169 {
170  if ( theHardwareBend == dummyBend )
171  return this->getTriggerBend(); // If not set make it transparent
172 
173  return theHardwareBend;
174 }
double getTriggerBend() const
In FULL-STRIP units!
Definition: TTStub.h:159
static float dummyBend
Definition: TTStub.h:74
float theHardwareBend
Definition: TTStub.h:72
template<typename T >
double TTStub< T >::getRealTriggerOffset ( ) const

In HALF-STRIP units!

Definition at line 142 of file TTStub.h.

References TTStub< T >::theRealOffset.

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

142 { return 0.5*theRealOffset; }
float theRealOffset
Definition: TTStub.h:71
template<typename T >
double TTStub< T >::getTriggerBend ( ) const

In FULL-STRIP units!

Definition at line 159 of file TTStub.h.

References TTStub< T >::dummyBend, TTStub< T >::theDisplacement, and TTStub< T >::theOffset.

Referenced by TTStub< T >::getHardwareBend(), TTStub< T >::print(), TTStub< T >::setDetId(), and TTStubBuilder< T >::SortStubsBend().

160 {
161  if ( theDisplacement == dummyBend )
162  return theDisplacement;
163 
164  return 0.5*( theDisplacement - theOffset );
165 }
int theOffset
Definition: TTStub.h:70
static float dummyBend
Definition: TTStub.h:74
int theDisplacement
Definition: TTStub.h:69
template<typename T >
double TTStub< T >::getTriggerDisplacement ( ) const

Trigger information.

Trigger info.

Definition at line 130 of file TTStub.h.

References TTStub< T >::theDisplacement.

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

130 { return 0.5*theDisplacement; }
int theDisplacement
Definition: TTStub.h:69
template<typename T >
double TTStub< T >::getTriggerOffset ( ) const

In HALF-STRIP units!

Definition at line 136 of file TTStub.h.

References TTStub< T >::theOffset.

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

136 { return 0.5*theOffset; }
int theOffset
Definition: TTStub.h:70
template<typename T >
double TTStub< T >::getTriggerPosition ( ) const

In HALF-STRIP units!

CBC3-style trigger info.

CBC3-style trigger information for sake of simplicity, these methods are slightly out of the getABC(...)/findABC(...) rule

Definition at line 153 of file TTStub.h.

References TTStub< T >::getClusterRef().

Referenced by TTStub< T >::print(), TTStubBuilder< T >::produce(), and TTStub< T >::setDetId().

154 {
155  return this->getClusterRef(0)->findAverageLocalCoordinates().x();
156 }
const edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > & getClusterRef(unsigned int hitIdentifier) const
Clusters composing the Stub.
Definition: TTStub.h:116
template<typename T >
std::string TTStub< T >::print ( unsigned int  i = 0) const

In HALF-STRIP units!

Information.

Information

Definition at line 179 of file TTStub.h.

References edm::Ref< C, T, F >::get(), TTStub< T >::getHardwareBend(), TTStub< T >::getTriggerBend(), TTStub< T >::getTriggerPosition(), mps_fire::i, convertSQLitetoXML_cfg::output, DetId::rawId(), AlCaHLTBitMon_QueryRunRegistry::string, TTStub< T >::theClusterRef0, TTStub< T >::theClusterRef1, and TTStub< T >::theDetId.

Referenced by TTStub< T >::setDetId().

180 {
181  std::string padding("");
182  for ( unsigned int j = 0; j != i; ++j )
183  {
184  padding+="\t";
185  }
186 
187  std::stringstream output;
188  output<<padding<<"TTStub:\n";
189  padding+='\t';
190  output << padding << "DetId: " << theDetId.rawId() << ", position: " << this->getTriggerPosition();
191  output << ", bend: " << this->getTriggerBend() << '\n';
192  output << ", hardware bend: " << this->getHardwareBend() << '\n';
193  unsigned int iClu = 0;
194  output << padding << "cluster 0: address: " << theClusterRef0.get();
195  output << ", cluster size: " << theClusterRef0->getHits().size() << '\n';
196  output << padding << "cluster 1: address: " << theClusterRef1.get();
197  output << ", cluster size: " << theClusterRef1->getHits().size() << '\n';
198  return output.str();
199 }
double getHardwareBend() const
In FULL-STRIP units!
Definition: TTStub.h:168
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
Definition: TTStub.h:67
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
Definition: TTStub.h:68
double getTriggerBend() const
In FULL-STRIP units!
Definition: TTStub.h:159
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:245
DetId theDetId
Data members.
Definition: TTStub.h:66
double getTriggerPosition() const
In HALF-STRIP units!
Definition: TTStub.h:153
template<typename T>
void TTStub< T >::setDetId ( DetId  aDetId)
inline
template<typename T >
void TTStub< T >::setHardwareBend ( float  aBend)

In FULL-STRIP units!

Definition at line 148 of file TTStub.h.

References TTStub< T >::theHardwareBend.

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

148 { theHardwareBend = aBend; }
float theHardwareBend
Definition: TTStub.h:72
template<typename T >
void TTStub< T >::setRealTriggerOffset ( float  anOffset)

In FULL-STRIP units! (hence, not implemented herein)

Definition at line 145 of file TTStub.h.

References TTStub< T >::theRealOffset.

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

145 { theRealOffset = anOffset; }
float theRealOffset
Definition: TTStub.h:71
template<typename T >
void TTStub< T >::setTriggerDisplacement ( int  aDisplacement)

In FULL-STRIP units! (hence, not implemented herein)

Definition at line 133 of file TTStub.h.

References TTStub< T >::theDisplacement.

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

133 { theDisplacement = aDisplacement; }
int theDisplacement
Definition: TTStub.h:69
template<typename T >
void TTStub< T >::setTriggerOffset ( int  anOffset)

In FULL-STRIP units! (hence, not implemented herein)

Definition at line 139 of file TTStub.h.

References TTStub< T >::theOffset.

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

139 { theOffset = anOffset; }
int theOffset
Definition: TTStub.h:70

Member Data Documentation

template<typename T>
float TTStub< T >::dummyBend = 999999
staticprivate
template<typename T>
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > TTStub< T >::theClusterRef0
private
template<typename T>
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > TTStub< T >::theClusterRef1
private
template<typename T>
DetId TTStub< T >::theDetId
private

Data members.

Definition at line 66 of file TTStub.h.

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

template<typename T>
int TTStub< T >::theDisplacement
private
template<typename T>
float TTStub< T >::theHardwareBend
private
template<typename T>
int TTStub< T >::theOffset
private
template<typename T>
float TTStub< T >::theRealOffset
private