CMS 3D CMS Logo

List of all members | Public Member Functions | 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 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 FULL-STRIP units! More...
 
void setDetId (DetId aDetId)
 
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
 
int theOffset
 

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

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

78 {
80  theDetId = 0;
81  theDisplacement = 999999;
82  theOffset = 0;
83 }
int theOffset
Definition: TTStub.h:64
int theDisplacement
Definition: TTStub.h:63
DetId theDetId
Data members.
Definition: TTStub.h:60
template<typename T >
TTStub< T >::TTStub ( DetId  aDetId)

Another Constructor.

Set data members

Set default data members

Definition at line 87 of file TTStub.h.

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

88 {
90  this->setDetId( aDetId );
91 
93  theDisplacement = 999999;
94  theOffset = 0;
95 }
int theOffset
Definition: TTStub.h:64
void setDetId(DetId aDetId)
Definition: TTStub.h:41
int theDisplacement
Definition: TTStub.h:63
template<typename T >
TTStub< T >::~TTStub ( )

Destructor.

Definition at line 99 of file TTStub.h.

99 {}

Member Function Documentation

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

Definition at line 109 of file TTStub.h.

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

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

110 {
111  if(aTTCluster->getStackMember() == 0) theClusterRef0 = aTTCluster;
112  else if (aTTCluster->getStackMember() == 1) theClusterRef1 = aTTCluster;
113 }
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
Definition: TTStub.h:61
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
Definition: TTStub.h:62
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 103 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().

104 {
105  return hitIdentifier==0 ? theClusterRef0 : theClusterRef1;
106 }
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
Definition: TTStub.h:61
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
Definition: TTStub.h:62
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().

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

In FULL-STRIP units!

Definition at line 136 of file TTStub.h.

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

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

137 {
138  if ( theDisplacement == 999999 )
139  return theDisplacement;
140 
141  return 0.5*( theDisplacement - theOffset );
142 }
int theOffset
Definition: TTStub.h:64
int theDisplacement
Definition: TTStub.h:63
template<typename T >
double TTStub< T >::getTriggerDisplacement ( ) const

Trigger information.

Trigger info.

Definition at line 117 of file TTStub.h.

References TTStub< T >::theDisplacement.

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

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

In HALF-STRIP units!

Definition at line 123 of file TTStub.h.

References TTStub< T >::theOffset.

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

123 { return 0.5*theOffset; }
int theOffset
Definition: TTStub.h:64
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 130 of file TTStub.h.

References TTStub< T >::getClusterRef().

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

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

In FULL-STRIP units!

Information.

Information

Definition at line 146 of file TTStub.h.

References edm::Ref< C, T, F >::get(), 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().

147 {
148  std::string padding("");
149  for ( unsigned int j = 0; j != i; ++j )
150  {
151  padding+="\t";
152  }
153 
154  std::stringstream output;
155  output<<padding<<"TTStub:\n";
156  padding+='\t';
157  output << padding << "DetId: " << theDetId.rawId() << ", position: " << this->getTriggerPosition();
158  output << ", bend: " << this->getTriggerBend() << '\n';
159  unsigned int iClu = 0;
160  output << padding << "cluster 0: address: " << theClusterRef0.get();
161  output << ", cluster size: " << theClusterRef0->getHits().size() << '\n';
162  output << padding << "cluster 1: address: " << theClusterRef1.get();
163  output << ", cluster size: " << theClusterRef1->getHits().size() << '\n';
164  return output.str();
165 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
Definition: TTStub.h:61
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
Definition: TTStub.h:62
double getTriggerBend() const
In FULL-STRIP units!
Definition: TTStub.h:136
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:244
DetId theDetId
Data members.
Definition: TTStub.h:60
double getTriggerPosition() const
In HALF-STRIP units!
Definition: TTStub.h:130
template<typename T>
void TTStub< T >::setDetId ( DetId  aDetId)
inline
template<typename T >
void TTStub< T >::setTriggerDisplacement ( int  aDisplacement)

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

Definition at line 120 of file TTStub.h.

References TTStub< T >::theDisplacement.

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

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

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

Definition at line 126 of file TTStub.h.

References TTStub< T >::theOffset.

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

126 { theOffset = anOffset; }
int theOffset
Definition: TTStub.h:64

Member Data Documentation

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 60 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>
int TTStub< T >::theOffset
private