CMS 3D CMS Logo

DTCLink.cc
Go to the documentation of this file.
2 
3 using namespace std;
4 using namespace trklet;
5 
6 DTCLink::DTCLink(double phimin, double phimax) {
7  if (phimin > M_PI) {
8  phimin -= 2 * M_PI;
9  phimax -= 2 * M_PI;
10  }
11  assert(phimax > phimin);
12  phimin_ = phimin;
13  phimax_ = phimax;
14 }
15 
16 void DTCLink::addStub(std::pair<Stub*, L1TStub*> stub) { stubs_.push_back(stub); }
17 
18 bool DTCLink::inRange(double phi, bool overlaplayer) {
19  double phimax = phimax_;
20  double phimin = phimin_;
21  if (overlaplayer) {
22  double dphi = phimax - phimin;
23  assert(dphi > 0.0);
24  assert(dphi < M_PI);
25  phimin -= dphi / 6.0;
26  phimax += dphi / 6.0;
27  }
28  return (phi < phimax && phi > phimin) || (phi + 2 * M_PI < phimax && phi + 2 * M_PI > phimin);
29 }
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
cms::cuda::assert
assert(be >=bs)
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
trklet
Definition: AllProjectionsMemory.h:9
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106
std
Definition: JetResolutionObject.h:76