CMS 3D CMS Logo

Classes | Namespaces | Functions
TrapezoidalGrouping.h File Reference
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DataFormats/MuonDetId/interface/DTChamberId.h"
#include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
#include "DataFormats/MuonDetId/interface/DTLayerId.h"
#include "DataFormats/MuonDetId/interface/DTWireId.h"
#include "DataFormats/DTDigi/interface/DTDigiCollection.h"
#include "L1Trigger/DTTriggerPhase2/interface/MuonPath.h"
#include "L1Trigger/DTTriggerPhase2/interface/constants.h"
#include "L1Trigger/DTTriggerPhase2/interface/MotherGrouping.h"
#include <iostream>
#include <fstream>
#include <stack>

Go to the source code of this file.

Classes

class  TrapezoidalGrouping
 

Namespaces

 dtamgrouping
 

Functions

bool hitLayerSort (const DTPrimitive &hit1, const DTPrimitive &hit2)
 
bool hitTimeSort (const DTPrimitive &hit1, const DTPrimitive &hit2)
 
bool hitWireSort (const DTPrimitive &hit1, const DTPrimitive &hit2)
 

Function Documentation

◆ hitLayerSort()

bool hitLayerSort ( const DTPrimitive hit1,
const DTPrimitive hit2 
)
inline

Definition at line 49 of file TrapezoidalGrouping.h.

References hitWireSort(), and DTPrimitive::layerId().

Referenced by hitTimeSort(), and TrapezoidalGrouping::run().

49  {
50  int lay1 = hit1.layerId();
51  int lay2 = hit2.layerId();
52 
53  if (lay1 < lay2)
54  return true;
55  else if (lay1 > lay2)
56  return false;
57  else
58  return hitWireSort(hit1, hit2);
59 }
const int layerId() const
Definition: DTprimitive.h:35
bool hitWireSort(const DTPrimitive &hit1, const DTPrimitive &hit2)

◆ hitTimeSort()

bool hitTimeSort ( const DTPrimitive hit1,
const DTPrimitive hit2 
)
inline

Definition at line 61 of file TrapezoidalGrouping.h.

References hitLayerSort(), and DTPrimitive::tdcTimeStamp().

Referenced by TrapezoidalGrouping::group_hits(), and TrapezoidalGrouping::setInChannels().

61  {
62  int tdc1 = hit1.tdcTimeStamp();
63  int tdc2 = hit2.tdcTimeStamp();
64 
65  if (tdc1 < tdc2)
66  return true;
67  else if (tdc1 > tdc2)
68  return false;
69  else
70  return hitLayerSort(hit1, hit2);
71 }
bool hitLayerSort(const DTPrimitive &hit1, const DTPrimitive &hit2)
const int tdcTimeStamp() const
Definition: DTprimitive.h:30

◆ hitWireSort()

bool hitWireSort ( const DTPrimitive hit1,
const DTPrimitive hit2 
)
inline

Definition at line 39 of file TrapezoidalGrouping.h.

References DTPrimitive::channelId().

Referenced by hitLayerSort().

39  {
40  int wi1 = hit1.channelId();
41  int wi2 = hit2.channelId();
42 
43  if (wi1 < wi2)
44  return true;
45  else
46  return false;
47 }
const int channelId() const
Definition: DTprimitive.h:34