14 #ifndef L1_TRACK_TRIGGER_STUB_FORMAT_H
15 #define L1_TRACK_TRIGGER_STUB_FORMAT_H
123 template <
typename T>
128 theDisplacement = dummyBend;
130 theBendBE = dummyBend;
134 template <
typename T>
137 this->setDetId(aDetId);
140 theDisplacement = dummyBend;
142 theBendBE = dummyBend;
146 template <
typename T>
149 template <
typename T>
151 unsigned int hitStackMember)
const {
152 return (hitStackMember == 0) ? theClusterRef0 : theClusterRef1;
155 template <
typename T>
157 if (aTTCluster->getStackMember() == 0)
158 theClusterRef0 = aTTCluster;
159 else if (aTTCluster->getStackMember() == 1)
160 theClusterRef1 = aTTCluster;
164 template <
typename T>
166 return 0.5 * theDisplacement;
169 template <
typename T>
171 theDisplacement = aDisplacement;
174 template <
typename T>
176 return 0.5 * theOffset;
179 template <
typename T>
181 theOffset = anOffset;
184 template <
typename T>
189 template <
typename T>
191 thePSModule = isPSModule;
193 template <
typename T>
197 template <
typename T>
199 return this->clusterRef(0)->findAverageLocalCoordinates().x();
202 template <
typename T>
204 if (theDisplacement == dummyBend)
205 return theDisplacement;
207 return 0.5 * (theDisplacement - theOffset);
210 template <
typename T>
212 if (theBendBE == dummyBend)
213 return this->bendFE();
219 template <
typename T>
222 for (
unsigned int j = 0;
j !=
i; ++
j) {
227 output << padding <<
"TTStub:\n";
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';
239 template <
typename T>
240 std::ostream& operator<<(std::ostream& os, const TTStub<T>& aTTStub) {
241 return (os << aTTStub.print());
static constexpr float dummyBend
void setBendOffset(int anOffset)
void setModuleTypePS(bool isPSModule)
set whether this is a PS module or not;
double rawBend() const
Trigger info.
void setBendBE(float aBend)
setBendBE(): In HALF-STRIP units! Reduced resolution in BE boards. Rename of setHardwareBend() ...
double innerClusterPosition() const
DetId getDetId() const
Detector element.
double bendOffset() const
void setRawBend(int aDisplacement)
Class to store the L1 Track Trigger stubs.
void setDetId(DetId aDetId)
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/SLHCTrackerTriggerSWTo...
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef1
NOTE: this is needed even if it seems not.
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) ...
DetId theDetId
Data members.
double bendBE() const
BendBE(): In FULL-STRIP units! Reduced resolution from BE boards. Rename of getHardwareBend() ...
std::string print(unsigned int i=0) const
Print Stub information for debugging purposes.
double bendFE() const
BendFE(): In FULL-STRIP units from FE! Rename of getTriggerBend()
edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > theClusterRef0
bool moduleTypePS() const
check if a PS module