CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
RoadMaker Class Reference

#include <RoadMaker.h>

Public Types

enum  GeometryStructure {
  FullDetector, FullDetectorII, MTCC, TIF,
  TIFTOB, TIFTIB, TIFTIBTOB, TIFTOBTEC,
  P5
}
 
enum  SeedingType { FourRingSeeds, TwoRingSeeds }
 

Public Member Functions

std::pair< Roads::RoadSeed,
Roads::RoadSet
AddInnerSeedRing (std::pair< Roads::RoadSeed, Roads::RoadSet > input)
 
std::pair< Roads::RoadSeed,
Roads::RoadSet
AddOuterSeedRing (std::pair< Roads::RoadSeed, Roads::RoadSet > input)
 
bool AddRoad (Roads::RoadSeed seed, Roads::RoadSet set)
 
Roads::RoadSeed CloneSeed (Roads::RoadSeed seed)
 
void collectInnerSeedRings ()
 
void collectInnerSeedRings1 ()
 
void collectInnerSeedRings2 ()
 
void collectInnerTECSeedRings ()
 
void collectInnerTECSeedRings1 ()
 
void collectInnerTECSeedRings2 ()
 
void collectInnerTIBSeedRings ()
 
void collectInnerTIBSeedRings1 ()
 
void collectInnerTIBSeedRings2 ()
 
void collectInnerTIDSeedRings ()
 
void collectInnerTIDSeedRings1 ()
 
void collectInnerTIDSeedRings2 ()
 
void collectInnerTOBSeedRings ()
 
void collectInnerTOBSeedRings1 ()
 
void collectInnerTOBSeedRings2 ()
 
void collectOuterSeedRings ()
 
void collectOuterSeedRings1 ()
 
void collectOuterTECSeedRings ()
 
void collectOuterTECSeedRings1 ()
 
void collectOuterTIBSeedRings ()
 
void collectOuterTIBSeedRings1 ()
 
void collectOuterTOBSeedRings ()
 
void collectOuterTOBSeedRings1 ()
 
bool CompatibleWithLines (std::vector< std::pair< double, double > > lines, const Ring *ring)
 
void constructRoads ()
 
RoadsgetRoads ()
 
std::vector< std::pair< double,
double > > 
LinesThroughRingAndBS (const Ring *ring)
 
std::vector< std::pair< double,
double > > 
LinesThroughRings (const Ring *ring1, const Ring *ring2)
 
bool RingInBarrel (const Ring *ring)
 
Roads::RoadSet RingsCompatibleWithSeed (Roads::RoadSeed seed)
 
bool RingsOnSameLayer (const Ring *ring1, const Ring *ring2)
 
bool RingsOnSameLayer (std::pair< const Ring *, const Ring * > seed1, std::pair< const Ring *, const Ring * > seed2)
 
 RoadMaker (const Rings *rings, GeometryStructure structure=FullDetector, SeedingType seedingType=FourRingSeeds)
 
bool SameRoadSet (Roads::RoadSet set1, Roads::RoadSet set2)
 
Roads::RoadSet SortRingsIntoLayers (std::vector< const Ring * > input)
 
 ~RoadMaker ()
 

Private Attributes

std::vector< const Ring * > innerSeedRings1_
 
std::vector< const Ring * > innerSeedRings2_
 
std::vector< const Ring * > innerSeedRings_
 
std::vector< const Ring * > outerSeedRings1_
 
std::vector< const Ring * > outerSeedRings_
 
const Ringsrings_
 
Roadsroads_
 
SeedingType seedingType_
 
GeometryStructure structure_
 
float zBS_
 

Detailed Description

Definition at line 29 of file RoadMaker.h.

Member Enumeration Documentation

Enumerator
FullDetector 
FullDetectorII 
MTCC 
TIF 
TIFTOB 
TIFTIB 
TIFTIBTOB 
TIFTOBTEC 
P5 

Definition at line 33 of file RoadMaker.h.

Enumerator
FourRingSeeds 
TwoRingSeeds 

Definition at line 45 of file RoadMaker.h.

Constructor & Destructor Documentation

RoadMaker::RoadMaker ( const Rings rings,
RoadMaker::GeometryStructure  structure = FullDetector,
RoadMaker::SeedingType  seedingType = FourRingSeeds 
)

Definition at line 41 of file RoadMaker.cc.

References constructRoads(), FullDetector, FullDetectorII, MTCC, P5, roads_, structure_, TIF, TIFTIB, TIFTIBTOB, TIFTOB, TIFTOBTEC, and zBS_.

43  :
44  rings_(rings),
45  structure_(structure),
46  seedingType_(seedingType) {
47 
48  // define beamspot z extnsion
49  zBS_ = 0;
51  zBS_ = 3*5.3; // cm
52  } else if (structure_==FullDetectorII) {
53  zBS_ = 3*5.3; // cm
54  } else if (structure_==MTCC) {
55  zBS_ = 3*75.; // cm
56  } else if (structure_==TIF) {
57  zBS_ = 3*75.; // cm
58  } else if (structure_==TIFTIB) {
59  zBS_ = 5*75.; // cm
60  } else if (structure_==TIFTOB) {
61  zBS_ = 5*75.; // cm
62  } else if (structure_==TIFTIBTOB) {
63  zBS_ = 5*75.; // cm
64  } else if (structure_==TIFTOBTEC) {
65  zBS_ = 5*75.; // cm
66  } else if (structure_==P5) {
67  zBS_ = 5*75.; // cm
68  }
69 
70  roads_ = new Roads();
71 
73 
74  }
SeedingType seedingType_
Definition: RoadMaker.h:112
Definition: Roads.h:34
float zBS_
Definition: RoadMaker.h:120
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
void constructRoads()
Definition: RoadMaker.cc:80
Roads * roads_
Definition: RoadMaker.h:110
RoadMaker::~RoadMaker ( )

Definition at line 76 of file RoadMaker.cc.

76  {
77 
78 }

Member Function Documentation

std::pair< Roads::RoadSeed, Roads::RoadSet > RoadMaker::AddInnerSeedRing ( std::pair< Roads::RoadSeed, Roads::RoadSet input)

Definition at line 2302 of file RoadMaker.cc.

References AddRoad(), CloneSeed(), innerSeedRings_, collect_tpl::input, query::result, RingsCompatibleWithSeed(), RingsOnSameLayer(), and SameRoadSet().

2302  {
2303  //
2304  // add another inner seed ring
2305  // check for inner seed ring which is in input RoadSet and on another layer than the first seed ring
2306  for ( std::vector<const Ring*>::iterator innerSeedRing = innerSeedRings_.begin();
2307  innerSeedRing != innerSeedRings_.end();
2308  ++innerSeedRing ) {
2309  for ( Roads::RoadSet::iterator roadSetVector = input.second.begin();
2310  roadSetVector != input.second.end();
2311  ++roadSetVector ) {
2312  for ( std::vector<const Ring*>::iterator roadSetRing = roadSetVector->begin();
2313  roadSetRing != roadSetVector->end();
2314  ++roadSetRing) {
2315  // check for same ring
2316  if ( (*innerSeedRing) == (*roadSetRing) ) {
2317  // check that new ring is not on same layer as previous inner seed rings
2318  bool onSameLayer = false;
2319  for ( std::vector<const Ring*>::iterator roadSeedRing = input.first.first.begin();
2320  roadSeedRing != input.first.first.end();
2321  ++roadSeedRing ) {
2322  if ( RingsOnSameLayer((*roadSeedRing),(*innerSeedRing)) ) {
2323  onSameLayer = true;
2324  }
2325  }
2326  if ( !onSameLayer ) {
2327 
2328  Roads::RoadSeed seed = CloneSeed(input.first);
2329  seed.first.push_back((*innerSeedRing));
2330 
2332 
2333  if ( SameRoadSet(input.second,set) ) {
2334 
2335  AddRoad(seed,set);
2336 
2337  std::pair<Roads::RoadSeed, Roads::RoadSet> result(seed,set);
2338 
2339  return result;
2340  }
2341  }
2342  }
2343  }
2344  }
2345  }
2346 
2347  // if no ring could be added, return input
2348  return input;
2349 
2350 }
bool SameRoadSet(Roads::RoadSet set1, Roads::RoadSet set2)
Definition: RoadMaker.cc:2399
Roads::RoadSeed CloneSeed(Roads::RoadSeed seed)
Definition: RoadMaker.cc:2212
bool AddRoad(Roads::RoadSeed seed, Roads::RoadSet set)
Definition: RoadMaker.cc:2234
std::vector< std::vector< const Ring * > > RoadSet
Definition: Roads.h:39
tuple result
Definition: query.py:137
Roads::RoadSet RingsCompatibleWithSeed(Roads::RoadSeed seed)
Definition: RoadMaker.cc:2158
tuple input
Definition: collect_tpl.py:10
std::pair< std::vector< const Ring * >, std::vector< const Ring * > > RoadSeed
Definition: Roads.h:38
std::vector< const Ring * > innerSeedRings_
Definition: RoadMaker.h:114
bool RingsOnSameLayer(const Ring *ring1, const Ring *ring2)
Definition: RoadMaker.cc:1960
std::pair< Roads::RoadSeed, Roads::RoadSet > RoadMaker::AddOuterSeedRing ( std::pair< Roads::RoadSeed, Roads::RoadSet input)

Definition at line 2352 of file RoadMaker.cc.

References AddRoad(), CloneSeed(), collect_tpl::input, outerSeedRings_, query::result, RingsCompatibleWithSeed(), and RingsOnSameLayer().

2352  {
2353  //
2354  // add another outer seed ring
2355  // check for outer seed ring which is in input RoadSet and on another layer than the first seed ring
2356  for ( std::vector<const Ring*>::iterator outerSeedRing = outerSeedRings_.begin();
2357  outerSeedRing != outerSeedRings_.end();
2358  ++outerSeedRing ) {
2359  for ( Roads::RoadSet::iterator roadSetVector = input.second.begin();
2360  roadSetVector != input.second.end();
2361  ++roadSetVector ) {
2362  for ( std::vector<const Ring*>::iterator roadSetRing = roadSetVector->begin();
2363  roadSetRing != roadSetVector->end();
2364  ++roadSetRing) {
2365  // check for same ring
2366  if ( (*outerSeedRing) == (*roadSetRing) ) {
2367  // check that new ring is not on same layer as previous outer seed rings
2368  bool onSameLayer = false;
2369  for ( std::vector<const Ring*>::iterator roadSeedRing = input.first.second.begin();
2370  roadSeedRing != input.first.second.end();
2371  ++roadSeedRing ) {
2372  if ( RingsOnSameLayer((*roadSeedRing),(*outerSeedRing)) ) {
2373  onSameLayer = true;
2374  }
2375  }
2376  if ( !onSameLayer ) {
2377 
2378  Roads::RoadSeed seed = CloneSeed(input.first);
2379  seed.second.push_back((*outerSeedRing));
2380 
2382 
2383  AddRoad(seed,set);
2384 
2385  std::pair<Roads::RoadSeed, Roads::RoadSet> result(seed,set);
2386 
2387  return result;
2388  }
2389  }
2390  }
2391  }
2392  }
2393 
2394  // if no ring could be added, return input
2395  return input;
2396 
2397 }
Roads::RoadSeed CloneSeed(Roads::RoadSeed seed)
Definition: RoadMaker.cc:2212
bool AddRoad(Roads::RoadSeed seed, Roads::RoadSet set)
Definition: RoadMaker.cc:2234
std::vector< std::vector< const Ring * > > RoadSet
Definition: Roads.h:39
tuple result
Definition: query.py:137
Roads::RoadSet RingsCompatibleWithSeed(Roads::RoadSeed seed)
Definition: RoadMaker.cc:2158
tuple input
Definition: collect_tpl.py:10
std::pair< std::vector< const Ring * >, std::vector< const Ring * > > RoadSeed
Definition: Roads.h:38
std::vector< const Ring * > outerSeedRings_
Definition: RoadMaker.h:117
bool RingsOnSameLayer(const Ring *ring1, const Ring *ring2)
Definition: RoadMaker.cc:1960
bool RoadMaker::AddRoad ( Roads::RoadSeed  seed,
Roads::RoadSet  set 
)

Definition at line 2234 of file RoadMaker.cc.

References Roads::begin(), Roads::end(), Roads::erase(), Roads::insert(), query::result, roads_, and python.multivaluedict::sort().

Referenced by AddInnerSeedRing(), and AddOuterSeedRing().

2235  {
2236  //
2237  // add road
2238  // check if seed rings are included in seeds of other roads or if they are new
2239  // add road if new
2240  // take road with larger seed and discard older seed
2241  // assumption: increasing number of seed rings while adding during the program
2242  //
2243 
2244  // return value
2245  bool result = true;
2246 
2247  for ( Roads::iterator existingRoad = roads_->begin();
2248  existingRoad != roads_->end();
2249  ++existingRoad ) {
2250 
2251  Roads::RoadSeed existingSeed = existingRoad->first;
2252 
2253  // check if existing inner seed is included in new seed
2254  unsigned int includedInner = 0;
2255  unsigned int includedOuter = 0;
2256  for ( std::vector<const Ring*>::iterator existingInnerRing = existingSeed.first.begin();
2257  existingInnerRing != existingSeed.first.end();
2258  ++existingInnerRing ) {
2259  bool ringIncluded = false;
2260  for ( std::vector<const Ring*>::iterator innerRing = seed.first.begin();
2261  innerRing != seed.first.end();
2262  ++innerRing ) {
2263  if ( (*existingInnerRing) == (*innerRing) ) {
2264  ringIncluded = true;
2265  }
2266  }
2267  if ( ringIncluded ) {
2268  ++includedInner;
2269  }
2270  }
2271  for ( std::vector<const Ring*>::iterator existingOuterRing = existingSeed.second.begin();
2272  existingOuterRing != existingSeed.second.end();
2273  ++existingOuterRing ) {
2274  bool ringIncluded = false;
2275  for ( std::vector<const Ring*>::iterator outerRing = seed.second.begin();
2276  outerRing != seed.second.end();
2277  ++outerRing ) {
2278  if ( (*existingOuterRing) == (*outerRing) ) {
2279  ringIncluded = true;
2280  }
2281  }
2282  if ( ringIncluded ) {
2283  ++includedOuter;
2284  }
2285  }
2286 
2287  if ( includedInner == existingSeed.first.size() &&
2288  includedOuter == existingSeed.second.size() ) {
2289  // existing road included in new road, remove
2290  roads_->erase(existingRoad);
2291  }
2292  }
2293 
2294  // sort seeds
2295  std::sort(seed.first.begin(),seed.first.end(),SortRingsByZR());
2296  std::sort(seed.second.begin(),seed.second.end(),SortRingsByZR());
2297 
2298  roads_->insert(seed,set);
2299  return result;
2300 }
void insert(RoadSeed *seed, RoadSet *set)
Definition: Roads.h:55
RoadMap::iterator iterator
Definition: Roads.h:42
tuple result
Definition: query.py:137
iterator begin()
Definition: Roads.h:58
void erase(iterator entry)
Definition: Roads.h:88
std::pair< std::vector< const Ring * >, std::vector< const Ring * > > RoadSeed
Definition: Roads.h:38
iterator end()
Definition: Roads.h:59
Roads * roads_
Definition: RoadMaker.h:110
Roads::RoadSeed RoadMaker::CloneSeed ( Roads::RoadSeed  seed)

Definition at line 2212 of file RoadMaker.cc.

References query::result, and relativeConstraints::ring.

Referenced by AddInnerSeedRing(), and AddOuterSeedRing().

2212  {
2213  //
2214  // clone seed
2215  //
2216 
2218 
2219  for ( std::vector<const Ring*>::iterator ring = seed.first.begin();
2220  ring != seed.first.end();
2221  ++ring ) {
2222  result.first.push_back((*ring));
2223  }
2224 
2225  for ( std::vector<const Ring*>::iterator ring = seed.second.begin();
2226  ring != seed.second.end();
2227  ++ring ) {
2228  result.second.push_back((*ring));
2229  }
2230 
2231  return result;
2232 }
tuple result
Definition: query.py:137
std::pair< std::vector< const Ring * >, std::vector< const Ring * > > RoadSeed
Definition: Roads.h:38
void RoadMaker::collectInnerSeedRings ( )

Definition at line 258 of file RoadMaker.cc.

References collectInnerTECSeedRings(), collectInnerTIBSeedRings(), collectInnerTIDSeedRings(), collectInnerTOBSeedRings(), FullDetector, FullDetectorII, innerSeedRings_, LogDebug, MTCC, P5, structure_, TIF, TIFTIB, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by constructRoads().

258  {
259 
264  } else if(structure_==MTCC) {
266  } else if(structure_==TIF) {
271  } else if(structure_==TIFTOB) {
273  } else if(structure_==TIFTIB) {
276  } else if(structure_==TIFTIBTOB) {
280  } else if(structure_==TIFTOBTEC) {
283  } else if(structure_==P5) {
286  }
287 
288  LogDebug("RoadSearch") << "collected " << innerSeedRings_.size() << " inner seed rings";
289 
290 }
#define LogDebug(id)
void collectInnerTECSeedRings()
Definition: RoadMaker.cc:413
void collectInnerTOBSeedRings()
Definition: RoadMaker.cc:522
GeometryStructure structure_
Definition: RoadMaker.h:111
void collectInnerTIBSeedRings()
Definition: RoadMaker.cc:292
std::vector< const Ring * > innerSeedRings_
Definition: RoadMaker.h:114
void collectInnerTIDSeedRings()
Definition: RoadMaker.cc:361
void RoadMaker::collectInnerSeedRings1 ( )

Definition at line 613 of file RoadMaker.cc.

References collectInnerTECSeedRings1(), collectInnerTIBSeedRings1(), collectInnerTIDSeedRings1(), collectInnerTOBSeedRings1(), FullDetector, FullDetectorII, innerSeedRings1_, LogDebug, MTCC, structure_, TIF, TIFTIB, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by constructRoads().

613  {
614 
619  } else if(structure_==MTCC) {
621  } else if(structure_==TIF) {
626  } else if(structure_==TIFTOB) {
628  } else if(structure_==TIFTIB) {
631  } else if(structure_==TIFTIBTOB) {
635  } else if(structure_==TIFTOBTEC) {
638  }
639 
640  LogDebug("RoadSearch") << "collected " << innerSeedRings1_.size() << " inner seed rings";
641 
642 }
#define LogDebug(id)
void collectInnerTIDSeedRings1()
Definition: RoadMaker.cc:712
void collectInnerTECSeedRings1()
Definition: RoadMaker.cc:764
std::vector< const Ring * > innerSeedRings1_
Definition: RoadMaker.h:115
GeometryStructure structure_
Definition: RoadMaker.h:111
void collectInnerTIBSeedRings1()
Definition: RoadMaker.cc:644
void collectInnerTOBSeedRings1()
Definition: RoadMaker.cc:847
void RoadMaker::collectInnerSeedRings2 ( )

Definition at line 930 of file RoadMaker.cc.

References collectInnerTECSeedRings2(), collectInnerTIBSeedRings2(), collectInnerTIDSeedRings2(), collectInnerTOBSeedRings2(), FullDetector, FullDetectorII, innerSeedRings2_, LogDebug, MTCC, structure_, TIF, TIFTIB, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by constructRoads().

930  {
931 
932  if(structure_==FullDetector) {
936  } else if(structure_==FullDetectorII) {
940  } else if(structure_==MTCC) {
942  } else if(structure_==TIF) {
947  } else if(structure_==TIFTOB) {
949  } else if(structure_==TIFTIB) {
952  } else if(structure_==TIFTIBTOB) {
956  } else if(structure_==TIFTOBTEC) {
959  }
960 
961 
962  LogDebug("RoadSearch") << "collected " << innerSeedRings2_.size() << " inner seed rings";
963 
964 }
#define LogDebug(id)
std::vector< const Ring * > innerSeedRings2_
Definition: RoadMaker.h:116
void collectInnerTIDSeedRings2()
Definition: RoadMaker.cc:1043
GeometryStructure structure_
Definition: RoadMaker.h:111
void collectInnerTOBSeedRings2()
Definition: RoadMaker.cc:1178
void collectInnerTECSeedRings2()
Definition: RoadMaker.cc:1095
void collectInnerTIBSeedRings2()
Definition: RoadMaker.cc:966
void RoadMaker::collectInnerTECSeedRings ( )

Definition at line 413 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTECRing(), innerSeedRings_, LogDebug, P5, relativeConstraints::ring, rings_, structure_, TIF, and TIFTOBTEC.

Referenced by collectInnerSeedRings().

413  {
414 
415  // TEC
416  unsigned int counter = 0;
417 
418  unsigned int fw_bw_min = 1;
419  unsigned int fw_bw_max = 1;
420  unsigned int wheel_min = 1;
421  unsigned int wheel_max = 9;
422  unsigned int ring_min[9];
423  unsigned int ring_max[9];
424 
426  fw_bw_max = 3;
427  // TEC WHEEL 1
428  ring_min[1] = 1;
429  ring_max[1] = 3;
430  // TEC WHEEL 2
431  ring_min[2] = 1;
432  ring_max[2] = 3;
433  // TEC WHEEL 3
434  ring_min[3] = 1;
435  ring_max[3] = 3;
436  // TEC WHEEL 4
437  ring_min[4] = 2;
438  ring_max[4] = 3;
439  // TEC WHEEL 5
440  ring_min[5] = 2;
441  ring_max[5] = 3;
442  // TEC WHEEL 6
443  ring_min[6] = 2;
444  ring_max[6] = 3;
445  // TEC WHEEL 7
446  ring_min[7] = 1;
447  ring_max[7] = 1;
448  // TEC WHEEL 8
449  ring_min[8] = 1;
450  ring_max[8] = 1;
451  } else if (structure_==TIFTOBTEC || structure_==TIF) {
452  fw_bw_min = 2;
453  fw_bw_max = 3;
454  // TEC WHEEL 1
455  ring_min[1] = 1;
456  ring_max[1] = 4;
457  // TEC WHEEL 2
458  ring_min[2] = 1;
459  ring_max[2] = 4;
460  // TEC WHEEL 3
461  ring_min[3] = 1;
462  ring_max[3] = 4;
463  // TEC WHEEL 4
464  ring_min[4] = 2;
465  ring_max[4] = 4;
466  // TEC WHEEL 5
467  ring_min[5] = 2;
468  ring_max[5] = 4;
469  // TEC WHEEL 6
470  ring_min[6] = 2;
471  ring_max[6] = 4;
472  // TEC WHEEL 7
473  ring_min[7] = 3;
474  ring_max[7] = 4;
475  // TEC WHEEL 8
476  ring_min[8] = 3;
477  ring_max[8] = 4;
478  } else if (structure_==P5) {
479  fw_bw_min = 1;
480  fw_bw_max = 3;
481  // TEC WHEEL 1
482  ring_min[1] = 4;
483  ring_max[1] = 6;
484  // TEC WHEEL 2
485  ring_min[2] = 4;
486  ring_max[2] = 6;
487  // TEC WHEEL 3
488  ring_min[3] = 4;
489  ring_max[3] = 6;
490  // TEC WHEEL 4
491  ring_min[4] = 4;
492  ring_max[4] = 6;
493  // TEC WHEEL 5
494  ring_min[5] = 4;
495  ring_max[5] = 6;
496  // TEC WHEEL 6
497  ring_min[6] = 4;
498  ring_max[6] = 6;
499  // TEC WHEEL 7
500  ring_min[7] = 4;
501  ring_max[7] = 6;
502  // TEC WHEEL 8
503  ring_min[8] = 4;
504  ring_max[8] = 6;
505  }
506 
507  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
508  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
509  for ( unsigned int ring = ring_min[wheel]; ring < ring_max[wheel]; ++ring ) {
510  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,ring);
511  innerSeedRings_.push_back(temp_ring);
512  ++counter;
513  LogDebug("RoadSearch") << "collected TEC inner seed ring with index: " << temp_ring->getindex();
514  }
515  }
516  }
517 
518  LogDebug("RoadSearch") << "collected " << counter << " TEC inner seed rings";
519 
520 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > innerSeedRings_
Definition: RoadMaker.h:114
const Ring * getTECRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:257
void RoadMaker::collectInnerTECSeedRings1 ( )

Definition at line 764 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTECRing(), innerSeedRings1_, LogDebug, relativeConstraints::ring, rings_, structure_, TIF, and TIFTOBTEC.

Referenced by collectInnerSeedRings1().

764  {
765 
766  // TEC
767  unsigned int counter = 0;
768 
769  unsigned int fw_bw_min = 1;
770  unsigned int fw_bw_max = 1;
771  unsigned int wheel_min = 1;
772  unsigned int wheel_max = 4;
773  unsigned int ring_min[9];
774  unsigned int ring_max[9];
775 
777  fw_bw_min = 1;
778  fw_bw_max = 3;
779  // TEC WHEEL 1
780  ring_min[1] = 1;
781  ring_max[1] = 2;
782  // TEC WHEEL 2
783  ring_min[2] = 1;
784  ring_max[2] = 2;
785  // TEC WHEEL 3
786  ring_min[3] = 1;
787  ring_max[3] = 2;
788  // TEC WHEEL 4
789  ring_min[4] = 1;
790  ring_max[4] = 1;
791  // TEC WHEEL 5
792  ring_min[5] = 1;
793  ring_max[5] = 1;
794  // TEC WHEEL 6
795  ring_min[6] = 1;
796  ring_max[6] = 1;
797  // TEC WHEEL 7
798  ring_min[7] = 1;
799  ring_max[7] = 1;
800  // TEC WHEEL 8
801  ring_min[8] = 1;
802  ring_max[8] = 1;
803  } else if (structure_==TIFTOBTEC || structure_==TIF) {
804  fw_bw_min = 2;
805  fw_bw_max = 3;
806  // TEC WHEEL 1
807  ring_min[1] = 1;
808  ring_max[1] = 2;
809  // TEC WHEEL 2
810  ring_min[2] = 1;
811  ring_max[2] = 2;
812  // TEC WHEEL 3
813  ring_min[3] = 1;
814  ring_max[3] = 2;
815  // TEC WHEEL 4
816  ring_min[4] = 1;
817  ring_max[4] = 1;
818  // TEC WHEEL 5
819  ring_min[5] = 1;
820  ring_max[5] = 1;
821  // TEC WHEEL 6
822  ring_min[6] = 1;
823  ring_max[6] = 1;
824  // TEC WHEEL 7
825  ring_min[7] = 1;
826  ring_max[7] = 1;
827  // TEC WHEEL 8
828  ring_min[8] = 1;
829  ring_max[8] = 1;
830  }
831 
832  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
833  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
834  for ( unsigned int ring = ring_min[wheel]; ring < ring_max[wheel]; ++ring ) {
835  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,ring);
836  innerSeedRings1_.push_back(temp_ring);
837  ++counter;
838  LogDebug("RoadSearch") << "collected TEC inner seed ring with index: " << temp_ring->getindex();
839  }
840  }
841  }
842 
843  LogDebug("RoadSearch") << "collected " << counter << " TEC inner seed rings";
844 
845 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
Definition: Ring.h:31
std::vector< const Ring * > innerSeedRings1_
Definition: RoadMaker.h:115
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
const Ring * getTECRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:257
void RoadMaker::collectInnerTECSeedRings2 ( )

Definition at line 1095 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTECRing(), innerSeedRings2_, LogDebug, relativeConstraints::ring, rings_, structure_, TIF, and TIFTOBTEC.

Referenced by collectInnerSeedRings2().

1095  {
1096 
1097  // TEC
1098  unsigned int counter = 0;
1099 
1100  unsigned int fw_bw_min = 1;
1101  unsigned int fw_bw_max = 1;
1102  unsigned int wheel_min = 1;
1103  unsigned int wheel_max = 9;
1104  unsigned int ring_min[9];
1105  unsigned int ring_max[9];
1106 
1108  fw_bw_min = 1;
1109  fw_bw_max = 3;
1110  // TEC WHEEL 1
1111  ring_min[1] = 2;
1112  ring_max[1] = 3;
1113  // TEC WHEEL 2
1114  ring_min[2] = 2;
1115  ring_max[2] = 3;
1116  // TEC WHEEL 3
1117  ring_min[3] = 2;
1118  ring_max[3] = 3;
1119  // TEC WHEEL 4
1120  ring_min[4] = 2;
1121  ring_max[4] = 3;
1122  // TEC WHEEL 5
1123  ring_min[5] = 2;
1124  ring_max[5] = 3;
1125  // TEC WHEEL 6
1126  ring_min[6] = 2;
1127  ring_max[6] = 3;
1128  // TEC WHEEL 7
1129  ring_min[7] = 1;
1130  ring_max[7] = 1;
1131  // TEC WHEEL 8
1132  ring_min[8] = 1;
1133  ring_max[8] = 1;
1134  } else if (structure_==TIFTOBTEC || structure_==TIF) {
1135  fw_bw_min = 2;
1136  fw_bw_max = 3;
1137  // TEC WHEEL 1
1138  ring_min[1] = 3;
1139  ring_max[1] = 4;
1140  // TEC WHEEL 2
1141  ring_min[2] = 3;
1142  ring_max[2] = 4;
1143  // TEC WHEEL 3
1144  ring_min[3] = 3;
1145  ring_max[3] = 4;
1146  // TEC WHEEL 4
1147  ring_min[4] = 3;
1148  ring_max[4] = 4;
1149  // TEC WHEEL 5
1150  ring_min[5] = 3;
1151  ring_max[5] = 4;
1152  // TEC WHEEL 6
1153  ring_min[6] = 3;
1154  ring_max[6] = 4;
1155  // TEC WHEEL 6
1156  ring_min[7] = 3;
1157  ring_max[7] = 4;
1158  // TEC WHEEL 7
1159  ring_min[8] = 3;
1160  ring_max[8] = 4;
1161  }
1162 
1163  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1164  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1165  for ( unsigned int ring = ring_min[wheel]; ring < ring_max[wheel]; ++ring ) {
1166  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,ring);
1167  innerSeedRings2_.push_back(temp_ring);
1168  ++counter;
1169  LogDebug("RoadSearch") << "collected TEC inner seed ring with index: " << temp_ring->getindex();
1170  }
1171  }
1172  }
1173 
1174  LogDebug("RoadSearch") << "collected " << counter << " TEC inner seed rings";
1175 
1176 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
std::vector< const Ring * > innerSeedRings2_
Definition: RoadMaker.h:116
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
const Ring * getTECRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:257
void RoadMaker::collectInnerTIBSeedRings ( )

Definition at line 292 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTIBRing(), innerSeedRings_, LogDebug, MTCC, rings_, structure_, TIF, TIFTIB, and TIFTIBTOB.

Referenced by collectInnerSeedRings().

292  {
293 
294  // TIB
295  unsigned int counter = 0, layer_min=0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min = 0, detector_max=0;
297  layer_min = 1;
298  layer_max = 3;
299  fw_bw_min = 1;
300  fw_bw_max = 3;
301  ext_int_min = 1;
302  ext_int_max = 3;
303  detector_min = 1;
304  detector_max = 4;
305  } else if(structure_==MTCC) {
306  layer_min = 1;
307  layer_max = 2;
308  fw_bw_min = 2;
309  fw_bw_max = 3;
310  ext_int_min = 1;
311  ext_int_max = 3;
312  detector_min = 1;
313  detector_max = 4;
314  } else if (structure_==TIF) {
315  layer_min = 1;
316  layer_max = 3;
317  fw_bw_min = 1;
318  fw_bw_max = 3;
319  ext_int_min = 1;
320  ext_int_max = 3;
321  detector_min = 1;
322  detector_max = 4;
323  } else if (structure_==TIFTIB) {
324  layer_min = 1;
325  layer_max = 2;
326  fw_bw_min = 1;
327  fw_bw_max = 3;
328  ext_int_min = 1;
329  ext_int_max = 3;
330  detector_min = 1;
331  detector_max = 4;
332  } else if (structure_==TIFTIBTOB) {
333  layer_min = 1;
334  layer_max = 3;
335  fw_bw_min = 1;
336  fw_bw_max = 3;
337  ext_int_min = 1;
338  ext_int_max = 3;
339  detector_min = 1;
340  detector_max = 4;
341  }
342 
343 
344  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
345  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
346  for ( unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
347  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
348  const Ring* temp_ring = rings_->getTIBRing(layer,fw_bw,ext_int,detector);
349  innerSeedRings_.push_back(temp_ring);
350  ++counter;
351  LogDebug("RoadSearch") << "collected TIB inner seed ring with index: " << temp_ring->getindex();
352  }
353  }
354  }
355  }
356 
357  LogDebug("RoadSearch") << "collected " << counter << " TIB inner seed rings";
358 
359 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
const Ring * getTIBRing(unsigned int layer, unsigned int fw_bw, unsigned int ext_int, unsigned int detector) const
Definition: Rings.cc:201
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > innerSeedRings_
Definition: RoadMaker.h:114
void RoadMaker::collectInnerTIBSeedRings1 ( )

Definition at line 644 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTIBRing(), innerSeedRings1_, LogDebug, MTCC, rings_, structure_, TIF, TIFTIB, and TIFTIBTOB.

Referenced by collectInnerSeedRings1().

644  {
645 
646  // TIB
647  unsigned int counter = 0, layer_min=0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min=0, detector_max=0;
649  layer_min = 1;
650  layer_max = 2;
651  fw_bw_min = 1;
652  fw_bw_max = 3;
653  ext_int_min = 1;
654  ext_int_max = 3;
655  detector_min = 1;
656  detector_max = 4;
657  } else if(structure_==MTCC) {
658  layer_min = 1;
659  layer_max = 2;
660  fw_bw_min = 2;
661  fw_bw_max = 3;
662  ext_int_min = 1;
663  ext_int_max = 3;
664  detector_min = 1;
665  detector_max = 4;
666  } else if (structure_==TIF) {
667  layer_min = 1;
668  layer_max = 2;
669  fw_bw_min = 1;
670  fw_bw_max = 3;
671  ext_int_min = 1;
672  ext_int_max = 3;
673  detector_min = 1;
674  detector_max = 4;
675  } else if (structure_==TIFTIB) {
676  layer_min = 1;
677  layer_max = 2;
678  fw_bw_min = 1;
679  fw_bw_max = 3;
680  ext_int_min = 1;
681  ext_int_max = 3;
682  detector_min = 1;
683  detector_max = 4;
684  } else if (structure_==TIFTIBTOB) {
685  layer_min = 1;
686  layer_max = 2;
687  fw_bw_min = 1;
688  fw_bw_max = 3;
689  ext_int_min = 1;
690  ext_int_max = 3;
691  detector_min = 1;
692  detector_max = 4;
693  }
694 
695  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
696  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
697  for ( unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
698  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
699  const Ring* temp_ring = rings_->getTIBRing(layer,fw_bw,ext_int,detector);
700  innerSeedRings1_.push_back(temp_ring);
701  ++counter;
702  LogDebug("RoadSearch") << "collected TIB inner seed ring with index: " << temp_ring->getindex();
703  }
704  }
705  }
706  }
707 
708  LogDebug("RoadSearch") << "collected " << counter << " TIB inner seed rings";
709 
710 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
const Ring * getTIBRing(unsigned int layer, unsigned int fw_bw, unsigned int ext_int, unsigned int detector) const
Definition: Rings.cc:201
Definition: Ring.h:31
std::vector< const Ring * > innerSeedRings1_
Definition: RoadMaker.h:115
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
void RoadMaker::collectInnerTIBSeedRings2 ( )

Definition at line 966 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTIBRing(), innerSeedRings2_, LogDebug, MTCC, rings_, structure_, TIF, TIFTIB, TIFTIBTOB, and TIFTOBTEC.

Referenced by collectInnerSeedRings2().

966  {
967 
968  // TIB
969  unsigned int counter = 0, layer_min = 0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min=0, detector_max=0;
971  layer_min = 2;
972  layer_max = 3;
973  fw_bw_min = 1;
974  fw_bw_max = 3;
975  ext_int_min = 1;
976  ext_int_max = 3;
977  detector_min = 1;
978  detector_max = 4;
979  } else if(structure_==MTCC) {
980  layer_min = 1;
981  layer_max = 2;
982  fw_bw_min = 2;
983  fw_bw_max = 3;
984  ext_int_min = 1;
985  ext_int_max = 3;
986  detector_min = 1;
987  detector_max = 4;
988  } else if(structure_==TIF) {
989  layer_min = 2;
990  layer_max = 3;
991  fw_bw_min = 1;
992  fw_bw_max = 3;
993  ext_int_min = 1;
994  ext_int_max = 3;
995  detector_min = 1;
996  detector_max = 4;
997  } else if(structure_==TIFTIB) {
998  layer_min = 1;
999  layer_max = 2;
1000  fw_bw_min = 1;
1001  fw_bw_max = 3;
1002  ext_int_min = 1;
1003  ext_int_max = 3;
1004  detector_min = 1;
1005  detector_max = 4;
1006  } else if(structure_==TIFTIBTOB) {
1007  layer_min = 2;
1008  layer_max = 3;
1009  fw_bw_min = 1;
1010  fw_bw_max = 3;
1011  ext_int_min = 1;
1012  ext_int_max = 3;
1013  detector_min = 1;
1014  detector_max = 4;
1015  } else if(structure_==TIFTOBTEC) {
1016  layer_min = 2;
1017  layer_max = 3;
1018  fw_bw_min = 1;
1019  fw_bw_max = 3;
1020  ext_int_min = 1;
1021  ext_int_max = 3;
1022  detector_min = 1;
1023  detector_max = 4;
1024  }
1025 
1026  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1027  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1028  for ( unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
1029  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1030  const Ring* temp_ring = rings_->getTIBRing(layer,fw_bw,ext_int,detector);
1031  innerSeedRings2_.push_back(temp_ring);
1032  ++counter;
1033  LogDebug("RoadSearch") << "collected TIB inner seed ring with index: " << temp_ring->getindex();
1034  }
1035  }
1036  }
1037  }
1038 
1039  LogDebug("RoadSearch") << "collected " << counter << " TIB inner seed rings";
1040 
1041 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
std::vector< const Ring * > innerSeedRings2_
Definition: RoadMaker.h:116
const Ring * getTIBRing(unsigned int layer, unsigned int fw_bw, unsigned int ext_int, unsigned int detector) const
Definition: Rings.cc:201
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
void RoadMaker::collectInnerTIDSeedRings ( )

Definition at line 361 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTIDRing(), innerSeedRings_, LogDebug, relativeConstraints::ring, rings_, structure_, TIF, TIFTIB, and TIFTIBTOB.

Referenced by collectInnerSeedRings().

361  {
362 
363  // TID
364  unsigned int counter = 0;
365 
366  unsigned int fw_bw_min =0, fw_bw_max = 0,wheel_min = 0, wheel_max = 0, ring_min=0, ring_max = 0;
367 
369  fw_bw_min = 1;
370  fw_bw_max = 3;
371  wheel_min = 1;
372  wheel_max = 4;
373  ring_min = 1;
374  ring_max = 3;
375  } else if(structure_==TIF) {
376  fw_bw_min = 2;
377  fw_bw_max = 3;
378  wheel_min = 1;
379  wheel_max = 4;
380  ring_min = 1;
381  ring_max = 3;
382  } else if(structure_==TIFTIBTOB) {
383  fw_bw_min = 2;
384  fw_bw_max = 3;
385  wheel_min = 1;
386  wheel_max = 4;
387  ring_min = 1;
388  ring_max = 3;
389  } else if(structure_==TIFTIB) {
390  fw_bw_min = 2;
391  fw_bw_max = 3;
392  wheel_min = 1;
393  wheel_max = 4;
394  ring_min = 1;
395  ring_max = 2;
396  }
397 
398  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
399  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
400  for ( unsigned int ring = ring_min; ring < ring_max; ++ring ) {
401  const Ring* temp_ring = rings_->getTIDRing(fw_bw,wheel,ring);
402  innerSeedRings_.push_back(temp_ring);
403  ++counter;
404  LogDebug("RoadSearch") << "collected TID inner seed ring with index: " << temp_ring->getindex();
405  }
406  }
407  }
408 
409  LogDebug("RoadSearch") << "collected " << counter << " TID inner seed rings";
410 
411 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
const Ring * getTIDRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:230
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > innerSeedRings_
Definition: RoadMaker.h:114
void RoadMaker::collectInnerTIDSeedRings1 ( )

Definition at line 712 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTIDRing(), innerSeedRings1_, LogDebug, relativeConstraints::ring, rings_, structure_, TIF, TIFTIB, and TIFTIBTOB.

Referenced by collectInnerSeedRings1().

712  {
713 
714  // TID
715  unsigned int counter = 0;
716 
717  unsigned int fw_bw_min = 0, fw_bw_max = 0, wheel_min=0, wheel_max = 0, ring_min=0, ring_max = 0;
718 
720  fw_bw_min = 1;
721  fw_bw_max = 3;
722  wheel_min = 1;
723  wheel_max = 4;
724  ring_min = 1;
725  ring_max = 2;
726  } else if(structure_==TIF) {
727  fw_bw_min = 2;
728  fw_bw_max = 3;
729  wheel_min = 1;
730  wheel_max = 4;
731  ring_min = 1;
732  ring_max = 2;
733  } else if(structure_==TIFTIBTOB) {
734  fw_bw_min = 2;
735  fw_bw_max = 3;
736  wheel_min = 1;
737  wheel_max = 4;
738  ring_min = 1;
739  ring_max = 2;
740  } else if(structure_==TIFTIB) {
741  fw_bw_min = 2;
742  fw_bw_max = 3;
743  wheel_min = 1;
744  wheel_max = 4;
745  ring_min = 1;
746  ring_max = 2;
747  }
748 
749  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
750  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
751  for ( unsigned int ring = ring_min; ring < ring_max; ++ring ) {
752  const Ring* temp_ring = rings_->getTIDRing(fw_bw,wheel,ring);
753  innerSeedRings1_.push_back(temp_ring);
754  ++counter;
755  LogDebug("RoadSearch") << "collected TID inner seed ring with index: " << temp_ring->getindex();
756  }
757  }
758  }
759 
760  LogDebug("RoadSearch") << "collected " << counter << " TID inner seed rings";
761 
762 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
const Ring * getTIDRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:230
Definition: Ring.h:31
std::vector< const Ring * > innerSeedRings1_
Definition: RoadMaker.h:115
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
void RoadMaker::collectInnerTIDSeedRings2 ( )

Definition at line 1043 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTIDRing(), innerSeedRings2_, LogDebug, relativeConstraints::ring, rings_, structure_, TIF, TIFTIB, and TIFTIBTOB.

Referenced by collectInnerSeedRings2().

1043  {
1044 
1045  // TID
1046  unsigned int counter = 0;
1047 
1048  unsigned int fw_bw_min = 0, fw_bw_max = 0, wheel_min=0, wheel_max = 0, ring_min = 0, ring_max = 0;
1049 
1050  if(structure_==FullDetector) {
1051  fw_bw_min = 1;
1052  fw_bw_max = 3;
1053  wheel_min = 1;
1054  wheel_max = 4;
1055  ring_min = 2;
1056  ring_max = 3;
1057  } else if(structure_==FullDetectorII) {
1058  fw_bw_min = 1;
1059  fw_bw_max = 3;
1060  wheel_min = 1;
1061  wheel_max = 4;
1062  ring_min = 2;
1063  ring_max = 4;
1064  } else if(structure_==TIFTIBTOB || structure_==TIF) {
1065  fw_bw_min = 2;
1066  fw_bw_max = 3;
1067  wheel_min = 1;
1068  wheel_max = 4;
1069  ring_min = 2;
1070  ring_max = 3;
1071  } else if(structure_==TIFTIB) {
1072  fw_bw_min = 2;
1073  fw_bw_max = 3;
1074  wheel_min = 1;
1075  wheel_max = 4;
1076  ring_min = 2;
1077  ring_max = 2;
1078  }
1079 
1080  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1081  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1082  for ( unsigned int ring = ring_min; ring < ring_max; ++ring ) {
1083  const Ring* temp_ring = rings_->getTIDRing(fw_bw,wheel,ring);
1084  innerSeedRings2_.push_back(temp_ring);
1085  ++counter;
1086  LogDebug("RoadSearch") << "collected TID inner seed ring with index: " << temp_ring->getindex();
1087  }
1088  }
1089  }
1090 
1091  LogDebug("RoadSearch") << "collected " << counter << " TID inner seed rings";
1092 
1093 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
std::vector< const Ring * > innerSeedRings2_
Definition: RoadMaker.h:116
const Ring * getTIDRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:230
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
void RoadMaker::collectInnerTOBSeedRings ( )

Definition at line 522 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTOBRing(), innerSeedRings_, LogDebug, MTCC, P5, rings_, structure_, TIF, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by collectInnerSeedRings().

522  {
523 
524  // TOB
525  unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
527  layer_min = 5;
528  layer_max = 7;
529  rod_fw_bw_min = 1;
530  rod_fw_bw_max = 3;
531  detector_min = 1;
532  detector_max = 7;
533  } else if (structure_==MTCC) {
534  layer_min = 1;
535  layer_max = 3;
536  rod_fw_bw_min = 2;
537  rod_fw_bw_max = 3;
538  detector_min = 1;
539  detector_max = 7;
540  } else if (structure_==TIFTOB || structure_==TIFTIBTOB || structure_==TIF) {
541  layer_min = 1;
542  layer_max = 3;
543  rod_fw_bw_min = 1;
544  rod_fw_bw_max = 3;
545  detector_min = 1;
546  detector_max = 7;
547  } else if (structure_==TIFTOBTEC) {
548  layer_min = 1;
549  layer_max = 3;
550  rod_fw_bw_min = 1;
551  rod_fw_bw_max = 3;
552  detector_min = 1;
553  detector_max = 7;
554  } else if (structure_==P5) {
555  layer_min = 3;
556  layer_max = 5;
557  rod_fw_bw_min = 1;
558  rod_fw_bw_max = 3;
559  detector_min = 1;
560  detector_max = 7;
561  }
562 
563 
564  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
565  for ( unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
566  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
567  const Ring* temp_ring = rings_->getTOBRing(layer,rod_fw_bw,detector);
568  innerSeedRings_.push_back(temp_ring);
569  ++counter;
570  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
571  }
572  }
573  }
574 
576  // add most outer rings
577  const Ring* temp_ring = rings_->getTOBRing(2,1,6);
578  innerSeedRings_.push_back(temp_ring);
579  ++counter;
580  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
581 
582  temp_ring = rings_->getTOBRing(2,2,6);
583  innerSeedRings_.push_back(temp_ring);
584  ++counter;
585  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
586 
587  temp_ring = rings_->getTOBRing(3,1,6);
588  innerSeedRings_.push_back(temp_ring);
589  ++counter;
590  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
591 
592  temp_ring = rings_->getTOBRing(3,2,6);
593  innerSeedRings_.push_back(temp_ring);
594  ++counter;
595  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
596 
597  temp_ring = rings_->getTOBRing(4,1,6);
598  innerSeedRings_.push_back(temp_ring);
599  ++counter;
600  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
601 
602  temp_ring = rings_->getTOBRing(4,2,6);
603  innerSeedRings_.push_back(temp_ring);
604  ++counter;
605  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
606 
607  }
608 
609  LogDebug("RoadSearch") << "collected " << counter << " TOB inner seed rings";
610 
611 }
#define LogDebug(id)
const Ring * getTOBRing(unsigned int layer, unsigned int rod_fw_bw, unsigned int detector) const
Definition: Rings.cc:291
unsigned int getindex() const
Definition: Ring.h:185
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > innerSeedRings_
Definition: RoadMaker.h:114
void RoadMaker::collectInnerTOBSeedRings1 ( )

Definition at line 847 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTOBRing(), innerSeedRings1_, LogDebug, MTCC, rings_, structure_, TIF, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by collectInnerSeedRings1().

847  {
848 
849  // TOB
850  unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
852  layer_min = 5;
853  layer_max = 6;
854  rod_fw_bw_min = 1;
855  rod_fw_bw_max = 3;
856  detector_min = 1;
857  detector_max = 7;
858  } else if (structure_==MTCC) {
859  layer_min = 1;
860  layer_max = 3;
861  rod_fw_bw_min = 2;
862  rod_fw_bw_max = 3;
863  detector_min = 1;
864  detector_max = 7;
865  } else if (structure_==TIFTOB || structure_==TIFTIBTOB || structure_==TIF) {
866  layer_min = 1;
867  layer_max = 2;
868  rod_fw_bw_min = 1;
869  rod_fw_bw_max = 3;
870  detector_min = 1;
871  detector_max = 7;
872  } else if (structure_==TIFTOBTEC) {
873  layer_min = 1;
874  layer_max = 2;
875  rod_fw_bw_min = 1;
876  rod_fw_bw_max = 3;
877  detector_min = 1;
878  detector_max = 7;
879  }
880 
881  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
882  for ( unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
883  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
884  const Ring* temp_ring = rings_->getTOBRing(layer,rod_fw_bw,detector);
885  innerSeedRings1_.push_back(temp_ring);
886  ++counter;
887  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
888  }
889  }
890  }
891 
892  if(structure_==FullDetector) {
893  // add most outer rings
894  const Ring* temp_ring = rings_->getTOBRing(2,1,6);
895  innerSeedRings1_.push_back(temp_ring);
896  ++counter;
897  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
898 
899  temp_ring = rings_->getTOBRing(2,2,6);
900  innerSeedRings1_.push_back(temp_ring);
901  ++counter;
902  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
903 
904  temp_ring = rings_->getTOBRing(3,1,6);
905  innerSeedRings1_.push_back(temp_ring);
906  ++counter;
907  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
908 
909  temp_ring = rings_->getTOBRing(3,2,6);
910  innerSeedRings1_.push_back(temp_ring);
911  ++counter;
912  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
913 
914  temp_ring = rings_->getTOBRing(4,1,6);
915  innerSeedRings1_.push_back(temp_ring);
916  ++counter;
917  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
918 
919  temp_ring = rings_->getTOBRing(4,2,6);
920  innerSeedRings1_.push_back(temp_ring);
921  ++counter;
922  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
923 
924  }
925 
926  LogDebug("RoadSearch") << "collected " << counter << " TOB inner seed rings";
927 
928 }
#define LogDebug(id)
const Ring * getTOBRing(unsigned int layer, unsigned int rod_fw_bw, unsigned int detector) const
Definition: Rings.cc:291
unsigned int getindex() const
Definition: Ring.h:185
Definition: Ring.h:31
std::vector< const Ring * > innerSeedRings1_
Definition: RoadMaker.h:115
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
void RoadMaker::collectInnerTOBSeedRings2 ( )

Definition at line 1178 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTOBRing(), innerSeedRings2_, LogDebug, MTCC, rings_, structure_, TIF, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by collectInnerSeedRings2().

1178  {
1179 
1180  // TOB
1181  unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
1183  layer_min = 5;
1184  layer_max = 7;
1185  rod_fw_bw_min = 1;
1186  rod_fw_bw_max = 3;
1187  detector_max = 1;
1188  detector_max = 7;
1189  } else if (structure_==MTCC) {
1190  layer_min = 1;
1191  layer_max = 3;
1192  rod_fw_bw_min = 2;
1193  rod_fw_bw_max = 3;
1194  detector_max = 1;
1195  detector_max = 7;
1197  layer_min = 2;
1198  layer_max = 3;
1199  rod_fw_bw_min = 1;
1200  rod_fw_bw_max = 3;
1201  detector_max = 1;
1202  detector_max = 7;
1203  }
1204 
1205  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1206  for ( unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
1207  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1208  const Ring* temp_ring = rings_->getTOBRing(layer,rod_fw_bw,detector);
1209  innerSeedRings2_.push_back(temp_ring);
1210  ++counter;
1211  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1212  }
1213  }
1214  }
1215 
1217  // add most outer rings
1218  const Ring* temp_ring = rings_->getTOBRing(2,1,6);
1219  innerSeedRings2_.push_back(temp_ring);
1220  ++counter;
1221  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1222 
1223  temp_ring = rings_->getTOBRing(2,2,6);
1224  innerSeedRings2_.push_back(temp_ring);
1225  ++counter;
1226  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1227 
1228  temp_ring = rings_->getTOBRing(3,1,6);
1229  innerSeedRings2_.push_back(temp_ring);
1230  ++counter;
1231  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1232 
1233  temp_ring = rings_->getTOBRing(3,2,6);
1234  innerSeedRings2_.push_back(temp_ring);
1235  ++counter;
1236  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1237 
1238  temp_ring = rings_->getTOBRing(4,1,6);
1239  innerSeedRings2_.push_back(temp_ring);
1240  ++counter;
1241  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1242 
1243  temp_ring = rings_->getTOBRing(4,2,6);
1244  innerSeedRings2_.push_back(temp_ring);
1245  ++counter;
1246  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1247 
1248  }
1249 
1250  LogDebug("RoadSearch") << "collected " << counter << " TOB inner seed rings";
1251 
1252 }
#define LogDebug(id)
const Ring * getTOBRing(unsigned int layer, unsigned int rod_fw_bw, unsigned int detector) const
Definition: Rings.cc:291
unsigned int getindex() const
Definition: Ring.h:185
std::vector< const Ring * > innerSeedRings2_
Definition: RoadMaker.h:116
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
void RoadMaker::collectOuterSeedRings ( )

Definition at line 1254 of file RoadMaker.cc.

References collectOuterTECSeedRings(), collectOuterTIBSeedRings(), collectOuterTOBSeedRings(), FullDetector, FullDetectorII, LogDebug, MTCC, outerSeedRings_, P5, structure_, TIF, TIFTIB, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by constructRoads().

1254  {
1255 
1256  if(structure_==FullDetector) {
1259  } else if(structure_==FullDetectorII) {
1262  } else if (structure_==MTCC) {
1264  } else if (structure_==TIF) {
1267  } else if (structure_==TIFTOB) {
1269  } else if (structure_==TIFTIB) {
1271  } else if (structure_==TIFTIBTOB) {
1273  } else if (structure_==TIFTOBTEC) {
1276  } else if (structure_==P5) {
1279  }
1280 
1281 
1282 
1283  LogDebug("RoadSearch") << "collected " << outerSeedRings_.size() << " outer seed rings";
1284 }
#define LogDebug(id)
void collectOuterTECSeedRings()
Definition: RoadMaker.cc:1439
void collectOuterTIBSeedRings()
Definition: RoadMaker.cc:1286
GeometryStructure structure_
Definition: RoadMaker.h:111
void collectOuterTOBSeedRings()
Definition: RoadMaker.cc:1318
std::vector< const Ring * > outerSeedRings_
Definition: RoadMaker.h:117
void RoadMaker::collectOuterSeedRings1 ( )

Definition at line 1620 of file RoadMaker.cc.

References collectOuterTECSeedRings1(), collectOuterTIBSeedRings1(), collectOuterTOBSeedRings1(), FullDetector, FullDetectorII, LogDebug, MTCC, outerSeedRings1_, structure_, TIF, TIFTIB, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by constructRoads().

1620  {
1621 
1622  if(structure_==FullDetector) {
1625  } else if(structure_==FullDetectorII) {
1628  } else if (structure_==MTCC) {
1630  } else if (structure_==TIF) {
1633  } else if (structure_==TIFTOB) {
1635  } else if (structure_==TIFTIB) {
1637  } else if (structure_==TIFTIBTOB) {
1639  } else if (structure_==TIFTOBTEC) {
1642 
1643  }
1644 
1645  LogDebug("RoadSearch") << "collected " << outerSeedRings1_.size() << " outer seed rings";
1646 }
#define LogDebug(id)
void collectOuterTOBSeedRings1()
Definition: RoadMaker.cc:1680
GeometryStructure structure_
Definition: RoadMaker.h:111
void collectOuterTECSeedRings1()
Definition: RoadMaker.cc:1805
void collectOuterTIBSeedRings1()
Definition: RoadMaker.cc:1648
std::vector< const Ring * > outerSeedRings1_
Definition: RoadMaker.h:118
void RoadMaker::collectOuterTECSeedRings ( )

Definition at line 1439 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTECRing(), LogDebug, outerSeedRings_, P5, relativeConstraints::ring, rings_, structure_, TIF, and TIFTOBTEC.

Referenced by collectOuterSeedRings().

1439  {
1440 
1441  // TEC
1442  unsigned int counter = 0;
1443 
1444  if(structure_==FullDetector) {
1445  // outer and second outer ring in all wheels except those treated in the following
1446  unsigned int fw_bw_min = 1;
1447  unsigned int fw_bw_max = 3;
1448  unsigned int wheel_min = 1;
1449  unsigned int wheel_max = 8;
1450 
1451  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1452  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1453  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,6);
1454  outerSeedRings_.push_back(temp_ring);
1455  ++counter;
1456  temp_ring = rings_->getTECRing(fw_bw,wheel,7);
1457  outerSeedRings_.push_back(temp_ring);
1458  ++counter;
1459  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1460  }
1461  }
1462 
1463  // add last two wheels
1464  fw_bw_min = 1;
1465  fw_bw_max = 3;
1466  wheel_min = 1;
1467  unsigned int wheel_start = 8;
1468  wheel_max = 10;
1469  unsigned int second_ring_min[10];
1470  unsigned int second_ring_max[10];
1471 
1472  // TEC WHEEL 1
1473  second_ring_min[1] = 1;
1474  second_ring_max[1] = 8;
1475  // TEC WHEEL 2
1476  second_ring_min[2] = 1;
1477  second_ring_max[2] = 8;
1478  // TEC WHEEL 3
1479  second_ring_min[3] = 1;
1480  second_ring_max[3] = 8;
1481  // TEC WHEEL 4
1482  second_ring_min[4] = 2;
1483  second_ring_max[4] = 8;
1484  // TEC WHEEL 5
1485  second_ring_min[5] = 2;
1486  second_ring_max[5] = 8;
1487  // TEC WHEEL 6
1488  second_ring_min[6] = 2;
1489  second_ring_max[6] = 8;
1490  // TEC WHEEL 7
1491  second_ring_min[7] = 3;
1492  second_ring_max[7] = 8;
1493  // TEC WHEEL 8
1494  second_ring_min[8] = 3;
1495  second_ring_max[8] = 8;
1496  // TEC WHEEL 9
1497  second_ring_min[9] = 4;
1498  second_ring_max[9] = 8;
1499 
1500  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1501  for ( unsigned int wheel = wheel_start; wheel < wheel_max; ++wheel ) {
1502  for ( unsigned int second_ring = second_ring_min[wheel]; second_ring < second_ring_max[wheel]; ++second_ring ) {
1503  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,second_ring);
1504  outerSeedRings_.push_back(temp_ring);
1505  ++counter;
1506  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1507  }
1508  }
1509  }
1510  } else if(structure_==FullDetectorII) {
1511  // outer and second outer ring in all wheels except those treated in the following
1512  unsigned int fw_bw_min = 1;
1513  unsigned int fw_bw_max = 3;
1514  unsigned int wheel_min = 1;
1515  unsigned int wheel_max = 8;
1516 
1517  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1518  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1519  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,5);
1520  outerSeedRings_.push_back(temp_ring);
1521  ++counter;
1522  temp_ring = rings_->getTECRing(fw_bw,wheel,4);
1523  outerSeedRings_.push_back(temp_ring);
1524  ++counter;
1525  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1526  }
1527  }
1528 
1529  // add last two wheels
1530  fw_bw_min = 1;
1531  fw_bw_max = 3;
1532  wheel_min = 1;
1533  unsigned int wheel_start = 8;
1534  wheel_max = 10;
1535  unsigned int second_ring_min[10];
1536  unsigned int second_ring_max[10];
1537 
1538  // TEC WHEEL 1
1539  second_ring_min[1] = 1;
1540  second_ring_max[1] = 8;
1541  // TEC WHEEL 2
1542  second_ring_min[2] = 1;
1543  second_ring_max[2] = 8;
1544  // TEC WHEEL 3
1545  second_ring_min[3] = 1;
1546  second_ring_max[3] = 8;
1547  // TEC WHEEL 4
1548  second_ring_min[4] = 2;
1549  second_ring_max[4] = 8;
1550  // TEC WHEEL 5
1551  second_ring_min[5] = 2;
1552  second_ring_max[5] = 8;
1553  // TEC WHEEL 6
1554  second_ring_min[6] = 2;
1555  second_ring_max[6] = 8;
1556  // TEC WHEEL 7
1557  second_ring_min[7] = 3;
1558  second_ring_max[7] = 8;
1559  // TEC WHEEL 8
1560  second_ring_min[8] = 3;
1561  second_ring_max[8] = 6;
1562  // TEC WHEEL 9
1563  second_ring_min[9] = 4;
1564  second_ring_max[9] = 6;
1565 
1566  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1567  for ( unsigned int wheel = wheel_start; wheel < wheel_max; ++wheel ) {
1568  for ( unsigned int second_ring = second_ring_min[wheel]; second_ring < second_ring_max[wheel]; ++second_ring ) {
1569  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,second_ring);
1570  outerSeedRings_.push_back(temp_ring);
1571  ++counter;
1572  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1573  }
1574  }
1575  }
1576  } else if (structure_==TIFTOBTEC || structure_==TIF) {
1577  unsigned int fw_bw_min = 2;
1578  unsigned int fw_bw_max = 3;
1579  unsigned int wheel_min = 1;
1580  unsigned int wheel_max = 10;
1581  unsigned int ring_min = 6;
1582  unsigned int ring_max = 8;
1583 
1584  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1585  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1586  for ( unsigned int ring = ring_min; ring < ring_max; ++ring ) {
1587  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,ring);
1588  outerSeedRings_.push_back(temp_ring);
1589  ++counter;
1590  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1591  }
1592  }
1593  }
1594 
1595  } else if (structure_==P5) {
1596  unsigned int fw_bw_min = 1;
1597  unsigned int fw_bw_max = 3;
1598  unsigned int wheel_min = 1;
1599  unsigned int wheel_max = 10;
1600  unsigned int ring_min = 6;
1601  unsigned int ring_max = 8;
1602 
1603  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1604  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1605  for ( unsigned int ring = ring_min; ring < ring_max; ++ring ) {
1606  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,ring);
1607  outerSeedRings_.push_back(temp_ring);
1608  ++counter;
1609  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1610  }
1611  }
1612  }
1613 
1614  }
1615 
1616  LogDebug("RoadSearch") << "collected " << counter << " TEC outer seed rings";
1617 
1618 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > outerSeedRings_
Definition: RoadMaker.h:117
const Ring * getTECRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:257
void RoadMaker::collectOuterTECSeedRings1 ( )

Definition at line 1805 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTECRing(), LogDebug, outerSeedRings1_, relativeConstraints::ring, rings_, structure_, TIF, and TIFTOBTEC.

Referenced by collectOuterSeedRings1().

1805  {
1806 
1807  // TEC
1808  unsigned int counter = 0;
1809 
1810  if(structure_==FullDetector) {
1811  // outer ring in all wheels except those treated in the following
1812  unsigned int fw_bw_min = 1;
1813  unsigned int fw_bw_max = 3;
1814  unsigned int wheel_min = 1;
1815  unsigned int wheel_max = 9;
1816 
1817  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1818  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1819  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,7);
1820  outerSeedRings1_.push_back(temp_ring);
1821  ++counter;
1822  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1823  }
1824  }
1825 
1826  // add last two wheels
1827  fw_bw_min = 1;
1828  fw_bw_max = 3;
1829  wheel_min = 1;
1830  unsigned int wheel_start = 9;
1831  wheel_max = 10;
1832  unsigned int second_ring_min[10];
1833  unsigned int second_ring_max[10];
1834 
1835  // TEC WHEEL 1
1836  second_ring_min[1] = 1;
1837  second_ring_max[1] = 8;
1838  // TEC WHEEL 2
1839  second_ring_min[2] = 1;
1840  second_ring_max[2] = 8;
1841  // TEC WHEEL 3
1842  second_ring_min[3] = 1;
1843  second_ring_max[3] = 8;
1844  // TEC WHEEL 4
1845  second_ring_min[4] = 2;
1846  second_ring_max[4] = 8;
1847  // TEC WHEEL 5
1848  second_ring_min[5] = 2;
1849  second_ring_max[5] = 8;
1850  // TEC WHEEL 6
1851  second_ring_min[6] = 2;
1852  second_ring_max[6] = 8;
1853  // TEC WHEEL 7
1854  second_ring_min[7] = 3;
1855  second_ring_max[7] = 8;
1856  // TEC WHEEL 8
1857  second_ring_min[8] = 3;
1858  second_ring_max[8] = 8;
1859  // TEC WHEEL 9
1860  second_ring_min[9] = 4;
1861  second_ring_max[9] = 8;
1862 
1863  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1864  for ( unsigned int wheel = wheel_start; wheel < wheel_max; ++wheel ) {
1865  for ( unsigned int second_ring = second_ring_min[wheel]; second_ring < second_ring_max[wheel]; ++second_ring ) {
1866  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,second_ring);
1867  outerSeedRings1_.push_back(temp_ring);
1868  ++counter;
1869  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1870  }
1871  }
1872  }
1873  } else if(structure_==FullDetectorII) {
1874  // outer ring in all wheels except those treated in the following
1875  unsigned int fw_bw_min = 1;
1876  unsigned int fw_bw_max = 3;
1877  unsigned int wheel_min = 1;
1878  unsigned int wheel_max = 9;
1879 
1880  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1881  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1882  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,5);
1883  outerSeedRings1_.push_back(temp_ring);
1884  ++counter;
1885  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1886  }
1887  }
1888 
1889  // add last two wheels
1890  fw_bw_min = 1;
1891  fw_bw_max = 3;
1892  wheel_min = 1;
1893  unsigned int wheel_start = 9;
1894  wheel_max = 10;
1895  unsigned int second_ring_min[10];
1896  unsigned int second_ring_max[10];
1897 
1898  // TEC WHEEL 1
1899  second_ring_min[1] = 1;
1900  second_ring_max[1] = 8;
1901  // TEC WHEEL 2
1902  second_ring_min[2] = 1;
1903  second_ring_max[2] = 8;
1904  // TEC WHEEL 3
1905  second_ring_min[3] = 1;
1906  second_ring_max[3] = 8;
1907  // TEC WHEEL 4
1908  second_ring_min[4] = 2;
1909  second_ring_max[4] = 8;
1910  // TEC WHEEL 5
1911  second_ring_min[5] = 2;
1912  second_ring_max[5] = 8;
1913  // TEC WHEEL 6
1914  second_ring_min[6] = 2;
1915  second_ring_max[6] = 8;
1916  // TEC WHEEL 7
1917  second_ring_min[7] = 3;
1918  second_ring_max[7] = 8;
1919  // TEC WHEEL 8
1920  second_ring_min[8] = 3;
1921  second_ring_max[8] = 8;
1922  // TEC WHEEL 9
1923  second_ring_min[9] = 4;
1924  second_ring_max[9] = 6;
1925 
1926  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1927  for ( unsigned int wheel = wheel_start; wheel < wheel_max; ++wheel ) {
1928  for ( unsigned int second_ring = second_ring_min[wheel]; second_ring < second_ring_max[wheel]; ++second_ring ) {
1929  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,second_ring);
1930  outerSeedRings1_.push_back(temp_ring);
1931  ++counter;
1932  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1933  }
1934  }
1935  }
1936  } else if (structure_==TIFTOBTEC || structure_==TIF) {
1937  unsigned int fw_bw_min = 2;
1938  unsigned int fw_bw_max = 3;
1939  unsigned int wheel_min = 1;
1940  unsigned int wheel_max = 10;
1941  unsigned int ring_min = 7;
1942  unsigned int ring_max = 8;
1943 
1944  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1945  for ( unsigned int wheel = wheel_min; wheel < wheel_max; ++wheel ) {
1946  for ( unsigned int ring = ring_min; ring < ring_max; ++ring ) {
1947  const Ring* temp_ring = rings_->getTECRing(fw_bw,wheel,ring);
1948  outerSeedRings1_.push_back(temp_ring);
1949  ++counter;
1950  LogDebug("RoadSearch") << "collected TEC outer seed ring with index: " << temp_ring->getindex();
1951  }
1952  }
1953  }
1954 
1955  }
1956  LogDebug("RoadSearch") << "collected " << counter << " TEC outer seed rings";
1957 
1958 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > outerSeedRings1_
Definition: RoadMaker.h:118
const Ring * getTECRing(unsigned int fw_bw, unsigned int wheel, unsigned int ring) const
Definition: Rings.cc:257
void RoadMaker::collectOuterTIBSeedRings ( )

Definition at line 1286 of file RoadMaker.cc.

References cmsDriverOptions::counter, Ring::getindex(), Rings::getTIBRing(), LogDebug, outerSeedRings_, rings_, structure_, and TIFTIB.

Referenced by collectOuterSeedRings().

1286  {
1287 
1288  // TIB
1289  unsigned int counter = 0, layer_min=0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min=0, detector_max=0;
1290  if(structure_==TIFTIB) {
1291  layer_min = 3;
1292  layer_max = 5;
1293  fw_bw_min = 1;
1294  fw_bw_max = 3;
1295  ext_int_min = 1;
1296  ext_int_max = 3;
1297  detector_min = 1;
1298  detector_max = 4;
1299  }
1300 
1301  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1302  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1303  for ( unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
1304  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1305  const Ring* temp_ring = rings_->getTIBRing(layer,fw_bw,ext_int,detector);
1306  outerSeedRings_.push_back(temp_ring);
1307  ++counter;
1308  LogDebug("RoadSearch") << "collected TIB outer seed ring with index: " << temp_ring->getindex();
1309  }
1310  }
1311  }
1312  }
1313 
1314  LogDebug("RoadSearch") << "collected " << counter << " TIB outer seed rings";
1315 
1316 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
const Ring * getTIBRing(unsigned int layer, unsigned int fw_bw, unsigned int ext_int, unsigned int detector) const
Definition: Rings.cc:201
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > outerSeedRings_
Definition: RoadMaker.h:117
void RoadMaker::collectOuterTIBSeedRings1 ( )

Definition at line 1648 of file RoadMaker.cc.

References cmsDriverOptions::counter, Ring::getindex(), Rings::getTIBRing(), LogDebug, outerSeedRings1_, rings_, structure_, and TIFTIB.

Referenced by collectOuterSeedRings1().

1648  {
1649 
1650  // TIB
1651  unsigned int counter = 0, layer_min=0, layer_max=0, fw_bw_min=0, fw_bw_max=0, ext_int_min=0, ext_int_max=0, detector_min=0, detector_max=0;
1652  if(structure_==TIFTIB) {
1653  layer_min = 4;
1654  layer_max = 5;
1655  fw_bw_min = 1;
1656  fw_bw_max = 3;
1657  ext_int_min = 1;
1658  ext_int_max = 3;
1659  detector_min = 1;
1660  detector_max = 4;
1661  }
1662 
1663  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1664  for ( unsigned int fw_bw = fw_bw_min; fw_bw < fw_bw_max; ++fw_bw ) {
1665  for ( unsigned int ext_int = ext_int_min; ext_int < ext_int_max; ++ext_int ) {
1666  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1667  const Ring* temp_ring = rings_->getTIBRing(layer,fw_bw,ext_int,detector);
1668  outerSeedRings1_.push_back(temp_ring);
1669  ++counter;
1670  LogDebug("RoadSearch") << "collected TIB outer seed ring with index: " << temp_ring->getindex();
1671  }
1672  }
1673  }
1674  }
1675 
1676  LogDebug("RoadSearch") << "collected " << counter << " TIB outer seed rings";
1677 
1678 }
#define LogDebug(id)
unsigned int getindex() const
Definition: Ring.h:185
const Ring * getTIBRing(unsigned int layer, unsigned int fw_bw, unsigned int ext_int, unsigned int detector) const
Definition: Rings.cc:201
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > outerSeedRings1_
Definition: RoadMaker.h:118
void RoadMaker::collectOuterTOBSeedRings ( )

Definition at line 1318 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTOBRing(), LogDebug, MTCC, outerSeedRings_, P5, rings_, structure_, TIF, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by collectOuterSeedRings().

1318  {
1319 
1320  // TOB
1321  unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
1322  if(structure_==FullDetector) {
1323  layer_min = 5;
1324  layer_max = 7;
1325  rod_fw_bw_min = 1;
1326  rod_fw_bw_max = 3;
1327  detector_min = 1;
1328  detector_max = 7;
1329  } else if(structure_==FullDetectorII) {
1330  layer_min = 1;
1331  layer_max = 2;
1332  rod_fw_bw_min = 1;
1333  rod_fw_bw_max = 3;
1334  detector_min = 1;
1335  detector_max = 7;
1336  } else if (structure_==MTCC) {
1337  layer_min = 1;
1338  layer_max = 3;
1339  rod_fw_bw_min = 2;
1340  rod_fw_bw_max = 3;
1341  detector_min = 1;
1342  detector_max = 7;
1343  } else if (structure_==TIF) {
1344  layer_min = 5;
1345  layer_max = 7;
1346  rod_fw_bw_min = 1;
1347  rod_fw_bw_max = 3;
1348  detector_min = 1;
1349  detector_max = 7;
1350  } else if (structure_==TIFTOB) {
1351  layer_min = 5;
1352  layer_max = 7;
1353  rod_fw_bw_min = 1;
1354  rod_fw_bw_max = 3;
1355  detector_min = 1;
1356  detector_max = 7;
1357  } else if (structure_==TIFTIBTOB) {
1358  layer_min = 5;
1359  layer_max = 7;
1360  rod_fw_bw_min = 1;
1361  rod_fw_bw_max = 3;
1362  detector_min = 1;
1363  detector_max = 7;
1364  } else if (structure_==TIFTOBTEC) {
1365  layer_min = 5;
1366  layer_max = 7;
1367  rod_fw_bw_min = 1;
1368  rod_fw_bw_max = 3;
1369  detector_min = 1;
1370  detector_max = 7;
1371  } else if (structure_==P5) {
1372  layer_min = 5;
1373  layer_max = 7;
1374  rod_fw_bw_min = 1;
1375  rod_fw_bw_max = 3;
1376  detector_min = 1;
1377  detector_max = 7;
1378  }
1379 
1380  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1381  for ( unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
1382  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1383  const Ring* temp_ring = rings_->getTOBRing(layer,rod_fw_bw,detector);
1384  outerSeedRings_.push_back(temp_ring);
1385  ++counter;
1386  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1387  }
1388  }
1389  }
1390 
1391  if(structure_==FullDetector) {
1392  // add most outer rings
1393  const Ring* temp_ring = rings_->getTOBRing(1,1,6);
1394  outerSeedRings_.push_back(temp_ring);
1395  ++counter;
1396  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1397 
1398  temp_ring = rings_->getTOBRing(1,2,6);
1399  outerSeedRings_.push_back(temp_ring);
1400  ++counter;
1401  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1402 
1403  temp_ring = rings_->getTOBRing(2,1,6);
1404  outerSeedRings_.push_back(temp_ring);
1405  ++counter;
1406  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1407 
1408  temp_ring = rings_->getTOBRing(2,2,6);
1409  outerSeedRings_.push_back(temp_ring);
1410  ++counter;
1411  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1412 
1413  temp_ring = rings_->getTOBRing(3,1,6);
1414  outerSeedRings_.push_back(temp_ring);
1415  ++counter;
1416  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1417 
1418  temp_ring = rings_->getTOBRing(3,2,6);
1419  outerSeedRings_.push_back(temp_ring);
1420  ++counter;
1421  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1422 
1423  temp_ring = rings_->getTOBRing(4,1,6);
1424  outerSeedRings_.push_back(temp_ring);
1425  ++counter;
1426  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1427 
1428  temp_ring = rings_->getTOBRing(4,2,6);
1429  outerSeedRings_.push_back(temp_ring);
1430  ++counter;
1431  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1432 
1433  }
1434 
1435  LogDebug("RoadSearch") << "collected " << counter << " TOB outer seed rings";
1436 
1437 }
#define LogDebug(id)
const Ring * getTOBRing(unsigned int layer, unsigned int rod_fw_bw, unsigned int detector) const
Definition: Rings.cc:291
unsigned int getindex() const
Definition: Ring.h:185
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > outerSeedRings_
Definition: RoadMaker.h:117
void RoadMaker::collectOuterTOBSeedRings1 ( )

Definition at line 1680 of file RoadMaker.cc.

References cmsDriverOptions::counter, FullDetector, FullDetectorII, Ring::getindex(), Rings::getTOBRing(), LogDebug, MTCC, outerSeedRings1_, rings_, structure_, TIF, TIFTIBTOB, TIFTOB, and TIFTOBTEC.

Referenced by collectOuterSeedRings1().

1680  {
1681 
1682  // TOB
1683  unsigned int counter = 0, layer_min=0, layer_max=0, rod_fw_bw_min=0, rod_fw_bw_max=0, detector_min=0, detector_max=0;
1684  if(structure_==FullDetector) {
1685  layer_min = 6;
1686  layer_max = 7;
1687  rod_fw_bw_min = 1;
1688  rod_fw_bw_max = 3;
1689  detector_min = 1;
1690  detector_max = 7;
1691  } else if(structure_==FullDetectorII) {
1692  layer_min = 2;
1693  layer_max = 3;
1694  rod_fw_bw_min = 1;
1695  rod_fw_bw_max = 3;
1696  detector_min = 1;
1697  detector_max = 7;
1698  } else if (structure_==MTCC) {
1699  layer_min = 1;
1700  layer_max = 3;
1701  rod_fw_bw_min = 2;
1702  rod_fw_bw_max = 3;
1703  detector_min = 1;
1704  detector_max = 7;
1705  } else if (structure_==TIF) {
1706  layer_min = 6;
1707  layer_max = 7;
1708  rod_fw_bw_min = 1;
1709  rod_fw_bw_max = 3;
1710  detector_min = 1;
1711  detector_max = 7;
1712  } else if (structure_==TIFTOB) {
1713  layer_min = 5;
1714  layer_max = 7;
1715  rod_fw_bw_min = 1;
1716  rod_fw_bw_max = 3;
1717  detector_min = 1;
1718  detector_max = 7;
1719  } else if (structure_==TIFTIBTOB) {
1720  layer_min = 6;
1721  layer_max = 7;
1722  rod_fw_bw_min = 1;
1723  rod_fw_bw_max = 3;
1724  detector_min = 1;
1725  detector_max = 7;
1726  } else if (structure_==TIFTOBTEC) {
1727  layer_min = 6;
1728  layer_max = 7;
1729  rod_fw_bw_min = 1;
1730  rod_fw_bw_max = 3;
1731  detector_min = 1;
1732  detector_max = 7;
1733  }
1734 
1735 
1736  for ( unsigned int layer = layer_min; layer < layer_max; ++layer ) {
1737  for ( unsigned int rod_fw_bw = rod_fw_bw_min; rod_fw_bw < rod_fw_bw_max; ++rod_fw_bw ) {
1738  for ( unsigned int detector = detector_min; detector < detector_max; ++detector ) {
1739  const Ring* temp_ring = rings_->getTOBRing(layer,rod_fw_bw,detector);
1740  outerSeedRings1_.push_back(temp_ring);
1741  ++counter;
1742  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1743  }
1744  }
1745  }
1746 
1747  if(structure_==FullDetector) {
1748  // add most outer rings
1749  const Ring* temp_ring = rings_->getTOBRing(1,1,6);
1750  outerSeedRings1_.push_back(temp_ring);
1751  ++counter;
1752  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1753 
1754  temp_ring = rings_->getTOBRing(1,2,6);
1755  outerSeedRings1_.push_back(temp_ring);
1756  ++counter;
1757  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1758 
1759  temp_ring = rings_->getTOBRing(2,1,6);
1760  outerSeedRings1_.push_back(temp_ring);
1761  ++counter;
1762  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1763 
1764  temp_ring = rings_->getTOBRing(2,2,6);
1765  outerSeedRings1_.push_back(temp_ring);
1766  ++counter;
1767  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1768 
1769  temp_ring = rings_->getTOBRing(3,1,6);
1770  outerSeedRings1_.push_back(temp_ring);
1771  ++counter;
1772  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1773 
1774  temp_ring = rings_->getTOBRing(3,2,6);
1775  outerSeedRings1_.push_back(temp_ring);
1776  ++counter;
1777  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1778 
1779  temp_ring = rings_->getTOBRing(4,1,6);
1780  outerSeedRings1_.push_back(temp_ring);
1781  ++counter;
1782  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1783 
1784  temp_ring = rings_->getTOBRing(4,2,6);
1785  outerSeedRings1_.push_back(temp_ring);
1786  ++counter;
1787  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1788 
1789  temp_ring = rings_->getTOBRing(5,1,6);
1790  outerSeedRings1_.push_back(temp_ring);
1791  ++counter;
1792  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1793 
1794  temp_ring = rings_->getTOBRing(5,2,6);
1795  outerSeedRings1_.push_back(temp_ring);
1796  ++counter;
1797  LogDebug("RoadSearch") << "collected TOB outer seed ring with index: " << temp_ring->getindex();
1798 
1799  }
1800 
1801  LogDebug("RoadSearch") << "collected " << counter << " TOB outer seed rings";
1802 
1803 }
#define LogDebug(id)
const Ring * getTOBRing(unsigned int layer, unsigned int rod_fw_bw, unsigned int detector) const
Definition: Rings.cc:291
unsigned int getindex() const
Definition: Ring.h:185
Definition: Ring.h:31
GeometryStructure structure_
Definition: RoadMaker.h:111
const Rings * rings_
Definition: RoadMaker.h:108
std::vector< const Ring * > outerSeedRings1_
Definition: RoadMaker.h:118
bool RoadMaker::CompatibleWithLines ( std::vector< std::pair< double, double > >  lines,
const Ring ring 
)

Definition at line 2129 of file RoadMaker.cc.

References Ring::getrmax(), Ring::getrmin(), Ring::getzmax(), Ring::getzmin(), geometryCSVtoXML::line, beamvalidation::lines, m, csvReporter::r, query::result, and detailsBasic3DVector::z.

Referenced by constructRoads(), and RingsCompatibleWithSeed().

2130  {
2131  //
2132  // check compatibility of ring z extension with extrapolation of lines to ring radius
2133  //
2134 
2135  // return value
2136  bool result = true;
2137 
2138  // calculate zmin, zmax at the radius of the ring
2139  double zmin = 999;
2140  double zmax = -zmin;
2141  for (int m=0; m<2; ++m) {
2142  double r = m==0 ? ring->getrmin() : ring->getrmax();
2143  for (std::vector<std::pair<double,double> >::iterator line = lines.begin();
2144  line != lines.end();
2145  ++line ) {
2146  double z = line->first*r + line->second;
2147  if (zmin>z) zmin = z;
2148  if (zmax<z) zmax = z;
2149  }
2150  }
2151  if (ring->getzmax()<zmin || ring->getzmin()>zmax) {
2152  result = false;
2153  }
2154 
2155  return result;
2156 }
double double double z
float getzmax() const
Definition: Ring.h:158
tuple result
Definition: query.py:137
float getrmin() const
Definition: Ring.h:155
float getzmin() const
Definition: Ring.h:157
float getrmax() const
Definition: Ring.h:156
void RoadMaker::constructRoads ( )

Definition at line 80 of file RoadMaker.cc.

References abs, collectInnerSeedRings(), collectInnerSeedRings1(), collectInnerSeedRings2(), collectOuterSeedRings(), collectOuterSeedRings1(), CompatibleWithLines(), diffTreeTool::diff, FourRingSeeds, innerSeedRings1_, innerSeedRings2_, innerSeedRings_, Roads::insert(), LinesThroughRingAndBS(), LinesThroughRings(), outerSeedRings1_, outerSeedRings_, csvReporter::r, relativeConstraints::ring, RingInBarrel(), RingsCompatibleWithSeed(), RingsOnSameLayer(), roads_, seedingType_, Roads::size(), findQualityFiles::size, slope, python.multivaluedict::sort(), TwoRingSeeds, and detailsBasic3DVector::z.

Referenced by RoadMaker().

80  {
81 
82  // fill vector of inner Rings
86 
87  // fill vector of outer Rings
90 
91  if ( seedingType_ == TwoRingSeeds ) {
92  // loop over inner-outer ring pairs
93  for ( std::vector<const Ring*>::iterator innerRing = innerSeedRings_.begin();
94  innerRing != innerSeedRings_.end();
95  ++innerRing ) {
96  // draw lines (z = a*r + b) through all corners and beam spot
97  std::vector<std::pair<double,double> > linesInnerSeedRingAndBS = LinesThroughRingAndBS((*innerRing));
98  for ( std::vector<const Ring*>::iterator outerRing = outerSeedRings_.begin();
99  outerRing != outerSeedRings_.end();
100  ++outerRing ) {
101  // check if ring is compatible with extrapolation of lines
102  if ( CompatibleWithLines(linesInnerSeedRingAndBS, (*outerRing) ) ) {
103  // construct road
104  Roads::RoadSeed seed;
105 
106  // fill first inner seed ring
107  seed.first.push_back((*innerRing));
108 
109  // fill first outer seed ring
110  seed.second.push_back((*outerRing));
111 
113 
114  // sort seeds
115  std::sort(seed.first.begin(),seed.first.end(),SortRingsByZR());
116  std::sort(seed.second.begin(),seed.second.end(),SortRingsByZR());
117 
118  roads_->insert(seed,set);
119  }
120  }
121  }
122 
123  } else if (seedingType_ == FourRingSeeds ) {
124 
125  // loop over inner-outer ring pairs
126  for ( std::vector<const Ring*>::iterator innerRing1 = innerSeedRings1_.begin();
127  innerRing1 != innerSeedRings1_.end();
128  ++innerRing1 ) {
129 
130  // draw lines (z = a*r + b) through all corners and beam spot
131  std::vector<std::pair<double,double> > linesInnerSeedRing1AndBS = LinesThroughRingAndBS((*innerRing1));
132 
133  for ( std::vector<const Ring*>::iterator innerRing2 = innerSeedRings2_.begin();
134  innerRing2 != innerSeedRings2_.end();
135  ++innerRing2 ) {
136 
137  // check if ring is compatible with extrapolation of lines
138  if ( CompatibleWithLines(linesInnerSeedRing1AndBS, (*innerRing2) ) ) {
139 
140  // draw lines (z = a*r + b) through all corners and beam spot
141  std::vector<std::pair<double,double> > linesInnerSeedRing2AndBS = LinesThroughRingAndBS((*innerRing2));
142 
143  // draw lines (z = a*r + b) through all corners of both inner seed rings
144  std::vector<std::pair<double,double> > linesInnerSeedRing1AndInnerSeedRing2 = LinesThroughRings(*innerRing1,*innerRing2);
145 
146  for ( std::vector<const Ring*>::iterator outerRing1 = outerSeedRings1_.begin();
147  outerRing1 != outerSeedRings1_.end();
148  ++outerRing1 ) {
149 
150  // check if ring is compatible with extrapolation of lines
151  if ( CompatibleWithLines(linesInnerSeedRing1AndBS, (*outerRing1) ) &&
152  CompatibleWithLines(linesInnerSeedRing2AndBS, (*outerRing1) ) &&
153  CompatibleWithLines(linesInnerSeedRing1AndInnerSeedRing2, (*outerRing1) ) ) {
154 
155  std::vector<std::pair<double,double> > linesOuterSeedRing1AndBS = LinesThroughRingAndBS((*outerRing1));
156  std::vector<std::pair<double,double> > linesInnerSeedRing1AndOuterSeedRing1 = LinesThroughRings(*innerRing1,*outerRing1);
157  std::vector<std::pair<double,double> > linesInnerSeedRing2AndOuterSeedRing1 = LinesThroughRings(*innerRing2,*outerRing1);
158 
159  // construct road
160  Roads::RoadSeed seed;
161 
162  // fill first inner seed ring
163  seed.first.push_back((*innerRing1));
164  seed.first.push_back((*innerRing2));
165 
166  // fill first outer seed ring
167  seed.second.push_back((*outerRing1));
168 
169 
170  std::vector<const Ring*> outerRing2Candidates;
171  // try to add second outer seed ring from all outer seed rings if compatible with other three seeds
172  for ( std::vector<const Ring*>::iterator outerRing = outerSeedRings_.begin();
173  outerRing != outerSeedRings_.end();
174  ++outerRing ) {
175  if ( CompatibleWithLines(linesInnerSeedRing1AndBS, (*outerRing) ) &&
176  CompatibleWithLines(linesInnerSeedRing2AndBS, (*outerRing) ) &&
177  CompatibleWithLines(linesOuterSeedRing1AndBS, (*outerRing) ) &&
178  CompatibleWithLines(linesInnerSeedRing1AndInnerSeedRing2, (*outerRing) ) &&
179  CompatibleWithLines(linesInnerSeedRing1AndOuterSeedRing1, (*outerRing) ) &&
180  CompatibleWithLines(linesInnerSeedRing2AndOuterSeedRing1, (*outerRing) ) ) {
181  if ( (*outerRing)->getindex() < (*outerRing1)->getindex() ) {
182  if ( !RingsOnSameLayer((*outerRing),(*outerRing1)) ) {
183  outerRing2Candidates.push_back((*outerRing));
184  }
185  }
186  }
187  }
188 
189  unsigned int size = outerRing2Candidates.size();
190  if ( size > 0 ) {
191  if ( size == 1 ) {
192  seed.second.push_back(outerRing2Candidates[0]);
193  } else {
194  // extrapolate center of outerRing1 throigh 0,0 to candidates
195  // candidate with center clostest to extrapolation willl be taken
196  const Ring *selectedRing = 0;
197  double z_2 = ((*outerRing1)->getzmax()+(*outerRing1)->getzmin())/2;
198  double r_2 = ((*outerRing1)->getrmax()+(*outerRing1)->getrmin())/2;
199  double z_1 = ((*innerRing1)->getzmax()+(*innerRing1)->getzmin())/2;
200  double r_1 = ((*innerRing1)->getrmax()+(*innerRing1)->getrmin())/2;
201  if ( RingInBarrel(*outerRing1) ) {
202  double slope = (z_2-z_1) /(r_2-r_1);
203  double intercept = z_1 - slope * r_1;
204  double zDifference = 999;
205  for ( std::vector<const Ring*>::iterator ring = outerRing2Candidates.begin();
206  ring != outerRing2Candidates.end();
207  ++ring ) {
208  double z = slope * (((*ring)->getrmax()+(*ring)->getrmin())/2) + intercept;
209  double diff = std::abs(z-(((*ring)->getzmax()+(*ring)->getzmin())/2));
210  if ( diff < zDifference ) {
211  selectedRing = *ring;
212  zDifference = diff;
213  }
214  }
215  } else {
216  double slope = (r_2-r_1) /(z_2-z_1);
217  double intercept = r_1 - slope * z_1;
218  double rDifference = 999;
219  for ( std::vector<const Ring*>::iterator ring = outerRing2Candidates.begin();
220  ring != outerRing2Candidates.end();
221  ++ring ) {
222  double r = slope * (((*ring)->getzmax()+(*ring)->getzmin())/2) + intercept;
223  double diff = std::abs(r-(((*ring)->getrmax()+(*ring)->getrmin())/2));
224  if ( diff < rDifference ) {
225  selectedRing = *ring;
226  rDifference = diff;
227  }
228  }
229  }
230  seed.second.push_back(selectedRing);
231  }
232  }
233 
234 
235  // collect all rings compatible with temporary seed from inner seed ring 1 and outer seed ring 1
236  Roads::RoadSeed tempSeed;
237  tempSeed.first.push_back((*innerRing1));
238  tempSeed.second.push_back((*outerRing1));
239  Roads::RoadSet set = RingsCompatibleWithSeed(tempSeed);
240 
241  // sort seeds
242  std::sort(seed.first.begin(),seed.first.end(),SortRingsByZR());
243  std::sort(seed.second.begin(),seed.second.end(),SortRingsByZR());
244 
245  roads_->insert(seed,set);
246 
247  }
248  }
249  }
250  }
251  }
252  }
253 
254  edm::LogInfo("RoadSearch") << "Constructed " << roads_->size() << " roads.";
255 
256 }
void insert(RoadSeed *seed, RoadSet *set)
Definition: Roads.h:55
void collectInnerSeedRings2()
Definition: RoadMaker.cc:930
void collectOuterSeedRings()
Definition: RoadMaker.cc:1254
static const double slope[3]
std::vector< const Ring * > innerSeedRings2_
Definition: RoadMaker.h:116
#define abs(x)
Definition: mlp_lapack.h:159
SeedingType seedingType_
Definition: RoadMaker.h:112
void collectInnerSeedRings1()
Definition: RoadMaker.cc:613
double double double z
std::vector< std::vector< const Ring * > > RoadSet
Definition: Roads.h:39
Definition: Ring.h:31
std::vector< const Ring * > innerSeedRings1_
Definition: RoadMaker.h:115
std::vector< std::pair< double, double > > LinesThroughRings(const Ring *ring1, const Ring *ring2)
Definition: RoadMaker.cc:2094
std::vector< std::pair< double, double > > LinesThroughRingAndBS(const Ring *ring)
Definition: RoadMaker.cc:2067
Roads::RoadSet RingsCompatibleWithSeed(Roads::RoadSeed seed)
Definition: RoadMaker.cc:2158
std::pair< std::vector< const Ring * >, std::vector< const Ring * > > RoadSeed
Definition: Roads.h:38
std::vector< const Ring * > outerSeedRings_
Definition: RoadMaker.h:117
std::vector< const Ring * > innerSeedRings_
Definition: RoadMaker.h:114
RoadMap::size_type size() const
Definition: Roads.h:64
std::vector< const Ring * > outerSeedRings1_
Definition: RoadMaker.h:118
bool RingsOnSameLayer(const Ring *ring1, const Ring *ring2)
Definition: RoadMaker.cc:1960
bool CompatibleWithLines(std::vector< std::pair< double, double > > lines, const Ring *ring)
Definition: RoadMaker.cc:2129
Roads * roads_
Definition: RoadMaker.h:110
bool RingInBarrel(const Ring *ring)
Definition: RoadMaker.cc:2032
tuple size
Write out results.
void collectInnerSeedRings()
Definition: RoadMaker.cc:258
void collectOuterSeedRings1()
Definition: RoadMaker.cc:1620
Roads* RoadMaker::getRoads ( )
inline

Definition at line 86 of file RoadMaker.h.

References roads_.

Referenced by RoadMapMakerESProducer::produce().

86 { return roads_; }
Roads * roads_
Definition: RoadMaker.h:110
std::vector< std::pair< double, double > > RoadMaker::LinesThroughRingAndBS ( const Ring ring)

Definition at line 2067 of file RoadMaker.cc.

References Ring::getrmax(), Ring::getrmin(), Ring::getzmax(), Ring::getzmin(), csvReporter::r, query::result, detailsBasic3DVector::z, and zBS_.

Referenced by constructRoads(), and RingsCompatibleWithSeed().

2067  {
2068  //
2069  // calculate lines through all 4 corners of the ring and the BS
2070  //
2071 
2072  // return value
2073  std::vector<std::pair<double,double> > result;
2074 
2075  double z = 0;
2076  double r = 0;;
2077 
2078  for (int ic1 = 0; ic1<4; ++ic1) {
2079  switch (ic1) {
2080  case 0: z = ring->getzmin(); r = ring->getrmin(); break;
2081  case 1: z = ring->getzmin(); r = ring->getrmax(); break;
2082  case 2: z = ring->getzmax(); r = ring->getrmax(); break;
2083  case 3: z = ring->getzmax(); r = ring->getrmin(); break;
2084  }
2085  for (int ib = 0; ib<2; ++ib) {
2086  double zb = zBS_*(2*ib-1);
2087  result.push_back(std::pair<double,double>((z-zb)/r,zb));
2088  }
2089  }
2090 
2091  return result;
2092 }
double double double z
float getzmax() const
Definition: Ring.h:158
float zBS_
Definition: RoadMaker.h:120
tuple result
Definition: query.py:137
float getrmin() const
Definition: Ring.h:155
float getzmin() const
Definition: Ring.h:157
float getrmax() const
Definition: Ring.h:156
std::vector< std::pair< double, double > > RoadMaker::LinesThroughRings ( const Ring ring1,
const Ring ring2 
)

Definition at line 2094 of file RoadMaker.cc.

References Ring::getrmax(), Ring::getrmin(), Ring::getzmax(), Ring::getzmin(), and query::result.

Referenced by constructRoads(), and RingsCompatibleWithSeed().

2095  {
2096  //
2097  // calculate lines through all 4 corners of the rings
2098  //
2099 
2100  // return value
2101  std::vector<std::pair<double,double> > result;
2102 
2103  double z1 = 0;
2104  double r1 = 0;;
2105  double z2 = 0;
2106  double r2 = 0;
2107 
2108  for (int ic1 = 0; ic1<4; ++ic1) {
2109  switch (ic1) {
2110  case 0: z1 = ring1->getzmin(); r1 = ring1->getrmin(); break;
2111  case 1: z1 = ring1->getzmin(); r1 = ring1->getrmax(); break;
2112  case 2: z1 = ring1->getzmax(); r1 = ring1->getrmax(); break;
2113  case 3: z1 = ring1->getzmax(); r1 = ring1->getrmin(); break;
2114  }
2115  for (int ic2 = 0; ic2<4; ++ic2) {
2116  switch (ic2) {
2117  case 0: z2 = ring2->getzmin(); r2 = ring2->getrmin(); break;
2118  case 1: z2 = ring2->getzmin(); r2 = ring2->getrmax(); break;
2119  case 2: z2 = ring2->getzmax(); r2 = ring2->getrmax(); break;
2120  case 3: z2 = ring2->getzmax(); r2 = ring2->getrmin(); break;
2121  }
2122  result.push_back(std::pair<double,double>((z2 - z1)/(r2 - r1),(r2*z1 - r1*z2)/(r2 - r1)));
2123  }
2124  }
2125 
2126  return result;
2127 }
float getzmax() const
Definition: Ring.h:158
tuple result
Definition: query.py:137
float getrmin() const
Definition: Ring.h:155
float getzmin() const
Definition: Ring.h:157
float getrmax() const
Definition: Ring.h:156
bool RoadMaker::RingInBarrel ( const Ring ring)

Definition at line 2032 of file RoadMaker.cc.

References Ring::getFirst(), query::result, DetId::subdetId(), StripSubdetector::TIB, and StripSubdetector::TOB.

Referenced by constructRoads().

2032  {
2033  //
2034  // check if the ring is a TIB or TOB ring
2035  //
2036 
2037  // return value
2038  bool result = false;
2039 
2040  // get first DetId of ring
2041  const DetId ringDetId = ring->getFirst();
2042 
2043  // check if both rings belong to same subdetector
2044  if ( (unsigned int)ringDetId.subdetId() == StripSubdetector::TIB ) {
2045  result = true;
2046  } else if ( (unsigned int)ringDetId.subdetId() == StripSubdetector::TOB ) {
2047  result = true;
2048  }
2049 
2050  return result;
2051 }
DetId getFirst() const
Definition: Ring.h:181
tuple result
Definition: query.py:137
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
Definition: DetId.h:20
Roads::RoadSet RoadMaker::RingsCompatibleWithSeed ( Roads::RoadSeed  seed)

Definition at line 2158 of file RoadMaker.cc.

References Rings::begin(), CompatibleWithLines(), Rings::end(), geometryCSVtoXML::line, beamvalidation::lines, LinesThroughRingAndBS(), LinesThroughRings(), relativeConstraints::ring, rings_, and SortRingsIntoLayers().

Referenced by AddInnerSeedRing(), AddOuterSeedRing(), and constructRoads().

2158  {
2159  //
2160  // collect all rings which are compatible with the seed
2161  //
2162 
2163  // return value
2164  std::vector<const Ring*> tempRings;
2165 
2166  // calculate lines
2167  std::vector<std::vector<std::pair<double,double> > > lines;
2168 
2169  for ( std::vector<const Ring*>::iterator innerRing = seed.first.begin();
2170  innerRing != seed.first.end();
2171  ++innerRing) {
2172  // calculate lines between inner seed rings and BS
2173  lines.push_back(LinesThroughRingAndBS(*innerRing));
2174 
2175  for ( std::vector<const Ring*>::iterator outerRing = seed.second.begin();
2176  outerRing != seed.second.end();
2177  ++outerRing) {
2178  // calculate lines between inner and outer seed rings
2179  lines.push_back(LinesThroughRings((*innerRing),(*outerRing)));
2180  }
2181  }
2182 
2183  for ( std::vector<const Ring*>::iterator outerRing = seed.second.begin();
2184  outerRing != seed.second.end();
2185  ++outerRing) {
2186  // calculate lines between outer seed rings and BS
2187  lines.push_back(LinesThroughRingAndBS(*outerRing));
2188  }
2189 
2191  ring != rings_->end();
2192  ++ring ) {
2193  bool compatible = true;
2194  for ( std::vector<std::vector<std::pair<double,double> > >::iterator line = lines.begin();
2195  line != lines.end();
2196  ++line ) {
2197  if ( !CompatibleWithLines(*line, &(ring->second))) {
2198  compatible = false;
2199  }
2200  }
2201  if ( compatible ) {
2202  tempRings.push_back(&(ring->second));
2203  }
2204  }
2205 
2206 
2207 
2208  return SortRingsIntoLayers(tempRings);
2209 }
RingMap::const_iterator const_iterator
Definition: Rings.h:33
iterator begin()
Definition: Rings.h:42
Roads::RoadSet SortRingsIntoLayers(std::vector< const Ring * > input)
Definition: RoadMaker.cc:2452
std::vector< std::pair< double, double > > LinesThroughRings(const Ring *ring1, const Ring *ring2)
Definition: RoadMaker.cc:2094
std::vector< std::pair< double, double > > LinesThroughRingAndBS(const Ring *ring)
Definition: RoadMaker.cc:2067
const Rings * rings_
Definition: RoadMaker.h:108
bool CompatibleWithLines(std::vector< std::pair< double, double > > lines, const Ring *ring)
Definition: RoadMaker.cc:2129
iterator end()
Definition: Rings.h:43
bool RoadMaker::RingsOnSameLayer ( const Ring ring1,
const Ring ring2 
)

Definition at line 1960 of file RoadMaker.cc.

References Ring::getFirst(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::rawId(), query::result, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, and StripSubdetector::TOB.

Referenced by AddInnerSeedRing(), AddOuterSeedRing(), constructRoads(), RingsOnSameLayer(), and SortRingsIntoLayers().

1960  {
1961  //
1962  // check whether two input rings are on the same layer
1963  //
1964 
1965  // return value
1966  bool result = false;
1967 
1968  // get first DetId of ring
1969  const DetId ring1DetId = ring1->getFirst();
1970  const DetId ring2DetId = ring2->getFirst();
1971 
1972  // check if both rings belong to same subdetector
1973  if ( (unsigned int)ring1DetId.subdetId() == StripSubdetector::TIB &&
1974  (unsigned int)ring2DetId.subdetId() == StripSubdetector::TIB ) {
1975  // make TIBDetId instance
1976  TIBDetId ring1DetIdTIB(ring1DetId.rawId());
1977  TIBDetId ring2DetIdTIB(ring2DetId.rawId());
1978  // check whether both rings are on the same TIB layer
1979  if ( ring1DetIdTIB.layer() == ring2DetIdTIB.layer() ) {
1980  result = true;
1981  }
1982  } else if ( (unsigned int)ring1DetId.subdetId() == StripSubdetector::TOB &&
1983  (unsigned int)ring2DetId.subdetId() == StripSubdetector::TOB ) {
1984  // make TOBDetId instance
1985  TOBDetId ring1DetIdTOB(ring1DetId.rawId());
1986  TOBDetId ring2DetIdTOB(ring2DetId.rawId());
1987  // check whether both rings are on the same TOB layer
1988  if ( ring1DetIdTOB.layer() == ring2DetIdTOB.layer() ) {
1989  result = true;
1990  }
1991  } else if ( (unsigned int)ring1DetId.subdetId() == StripSubdetector::TID &&
1992  (unsigned int)ring2DetId.subdetId() == StripSubdetector::TID) {
1993  // make TIDDetId instance
1994  TIDDetId ring1DetIdTID(ring1DetId.rawId());
1995  TIDDetId ring2DetIdTID(ring2DetId.rawId());
1996  // check whether both rings are on the same TID wheel
1997  if ( ring1DetIdTID.wheel() == ring2DetIdTID.wheel() ) {
1998  result = true;
1999  }
2000  } else if ( (unsigned int)ring1DetId.subdetId() == StripSubdetector::TEC &&
2001  (unsigned int)ring2DetId.subdetId() == StripSubdetector::TEC ) {
2002  // make TECDetId instance
2003  TECDetId ring1DetIdTEC(ring1DetId.rawId());
2004  TECDetId ring2DetIdTEC(ring2DetId.rawId());
2005  // check whether both rings are on the same TEC wheel
2006  if ( ring1DetIdTEC.wheel() == ring2DetIdTEC.wheel() ) {
2007  result = true;
2008  }
2009  } else if ( (unsigned int)ring1DetId.subdetId() == PixelSubdetector::PixelBarrel &&
2010  (unsigned int)ring2DetId.subdetId() == PixelSubdetector::PixelBarrel) {
2011  // make PXBDetId instance
2012  PXBDetId ring1DetIdPXB(ring1DetId.rawId());
2013  PXBDetId ring2DetIdPXB(ring2DetId.rawId());
2014  // check whether both rings are on the same PXB layer
2015  if ( ring1DetIdPXB.layer() == ring2DetIdPXB.layer() ) {
2016  result = true;
2017  }
2018  } else if ( (unsigned int)ring1DetId.subdetId() == PixelSubdetector::PixelEndcap &&
2019  (unsigned int)ring2DetId.subdetId() == PixelSubdetector::PixelEndcap) {
2020  // make PXFDetId instance
2021  PXFDetId ring1DetIdPXF(ring1DetId.rawId());
2022  PXFDetId ring2DetIdPXF(ring2DetId.rawId());
2023  // check whether both rings are on the same PXF disk
2024  if ( ring1DetIdPXF.disk() == ring2DetIdPXF.disk() ) {
2025  result = true;
2026  }
2027  }
2028 
2029  return result;
2030 }
DetId getFirst() const
Definition: Ring.h:181
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
tuple result
Definition: query.py:137
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
Definition: DetId.h:20
bool RoadMaker::RingsOnSameLayer ( std::pair< const Ring *, const Ring * >  seed1,
std::pair< const Ring *, const Ring * >  seed2 
)

Definition at line 2053 of file RoadMaker.cc.

References query::result, and RingsOnSameLayer().

2053  {
2054  //
2055  // check whether two input seeds (two ring seeds) are on the same layer
2056  //
2057 
2058  // return value
2059  bool result = false;
2060 
2061  result = RingsOnSameLayer(seed1.first,seed2.first) &&
2062  RingsOnSameLayer(seed1.second,seed2.second);
2063 
2064  return result;
2065 }
tuple result
Definition: query.py:137
bool RingsOnSameLayer(const Ring *ring1, const Ring *ring2)
Definition: RoadMaker.cc:1960
bool RoadMaker::SameRoadSet ( Roads::RoadSet  set1,
Roads::RoadSet  set2 
)

Definition at line 2399 of file RoadMaker.cc.

Referenced by AddInnerSeedRing().

2399  {
2400  //
2401  // check if input roadsets contains exactly the same rings
2402  //
2403 
2404  // calculate how many rings are in both input sets
2405  unsigned int nRingsSet1 = 0;
2406  unsigned int nRingsSet2 = 0;
2407  for ( Roads::RoadSet::iterator vector1 = set1.begin();
2408  vector1 != set1.end();
2409  ++vector1 ) {
2410  nRingsSet1 += vector1->size();
2411  }
2412 
2413  for ( Roads::RoadSet::iterator vector2 = set2.begin();
2414  vector2 != set2.end();
2415  ++vector2 ) {
2416  nRingsSet2 += vector2->size();
2417  }
2418 
2419  // if one of the input sets has more rings than the other, they cannot be the same
2420  if ( nRingsSet1 != nRingsSet2 ) {
2421  return false;
2422  }
2423 
2424  bool different = false;
2425  for ( Roads::RoadSet::iterator vector1 = set1.begin();
2426  vector1 != set1.end();
2427  ++vector1 ) {
2428  for ( std::vector<const Ring*>::iterator ring1 = vector1->begin();
2429  ring1 != vector1->end();
2430  ++ring1 ) {
2431  bool included = false;
2432  for ( Roads::RoadSet::iterator vector2 = set2.begin();
2433  vector2 != set2.end();
2434  ++vector2 ) {
2435  for ( std::vector<const Ring*>::iterator ring2 = vector2->begin();
2436  ring2 != vector2->end();
2437  ++ring2 ) {
2438  if ( (*ring1) == (*ring2) ) {
2439  included = true;
2440  }
2441  }
2442  }
2443  if ( !included ) {
2444  different = true;
2445  }
2446  }
2447  }
2448 
2449  return !different;
2450 }
Roads::RoadSet RoadMaker::SortRingsIntoLayers ( std::vector< const Ring * >  input)

Definition at line 2452 of file RoadMaker.cc.

References relativeConstraints::ring, RingsOnSameLayer(), python.multivaluedict::sort(), and tmp.

Referenced by RingsCompatibleWithSeed().

2452  {
2453  //
2454  // sort rings from input into layer structure of RoadSet
2455  //
2456 
2457  // return value
2458  Roads::RoadSet set;
2459 
2460  // sort rings in input by their center in rz, do it twice
2461  std::sort(input.begin(),input.end(),SortRingsByZR());
2462 
2463  const Ring *reference = (*(input.begin()));
2464  std::vector<const Ring*> tmp;
2465  tmp.push_back(reference);
2466  for (std::vector<const Ring*>::iterator ring = ++input.begin();
2467  ring != input.end();
2468  ++ring ) {
2469  if ( RingsOnSameLayer(reference,(*ring)) ) {
2470  reference = (*ring);
2471  tmp.push_back(reference);
2472  } else {
2473  set.push_back(tmp);
2474  tmp.clear();
2475  reference = (*ring);
2476  tmp.push_back(reference);
2477  }
2478  }
2479 
2480  if ( tmp.size() > 0 ) {
2481  set.push_back(tmp);
2482  }
2483 
2484  // order layers in set
2485  std::sort(set.begin(),set.end(),SortLayersByZR());
2486 
2487 // set.push_back(input);
2488  return set;
2489 }
std::vector< std::vector< const Ring * > > RoadSet
Definition: Roads.h:39
Definition: Ring.h:31
tuple input
Definition: collect_tpl.py:10
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
bool RingsOnSameLayer(const Ring *ring1, const Ring *ring2)
Definition: RoadMaker.cc:1960

Member Data Documentation

std::vector<const Ring*> RoadMaker::innerSeedRings1_
private
std::vector<const Ring*> RoadMaker::innerSeedRings2_
private
std::vector<const Ring*> RoadMaker::innerSeedRings_
private
std::vector<const Ring*> RoadMaker::outerSeedRings1_
private
std::vector<const Ring*> RoadMaker::outerSeedRings_
private
const Rings* RoadMaker::rings_
private
Roads* RoadMaker::roads_
private

Definition at line 110 of file RoadMaker.h.

Referenced by AddRoad(), constructRoads(), getRoads(), and RoadMaker().

SeedingType RoadMaker::seedingType_
private

Definition at line 112 of file RoadMaker.h.

Referenced by constructRoads().

GeometryStructure RoadMaker::structure_
private
float RoadMaker::zBS_
private

Definition at line 120 of file RoadMaker.h.

Referenced by LinesThroughRingAndBS(), and RoadMaker().