CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
CondDBCmsMTDConstruction Class Reference

#include <CondDBCmsMTDConstruction.h>

Public Member Functions

 CondDBCmsMTDConstruction ()=delete
 

Static Public Member Functions

static std::unique_ptr< GeometricTimingDetconstruct (const PGeometricTimingDet &pgd)
 

Detailed Description

High level class to build a tracker. It will only build subdets, then call subdet builders

Definition at line 18 of file CondDBCmsMTDConstruction.h.

Constructor & Destructor Documentation

◆ CondDBCmsMTDConstruction()

CondDBCmsMTDConstruction::CondDBCmsMTDConstruction ( )
delete

Member Function Documentation

◆ construct()

std::unique_ptr< GeometricTimingDet > CondDBCmsMTDConstruction::construct ( const PGeometricTimingDet pgd)
static

Definition at line 10 of file CondDBCmsMTDConstruction.cc.

References PGeometricTimingDet::pgeomdets_.

Referenced by MTDGeometricTimingDetESModule::produce().

10  {
11  auto mtd = std::make_unique<GeometricTimingDet>(pgd.pgeomdets_[0], GeometricTimingDet::MTD);
12 
13  size_t detMax = pgd.pgeomdets_.size();
14  size_t tri = 1;
15  std::vector<GeometricTimingDet*> hier;
16  GeometricTimingDet* subdet = mtd.get();
17  hier.emplace_back(subdet);
18  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 1) {
19  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
20  ++tri;
21  hier.back()->addComponent(subdet);
22  hier.emplace_back(subdet);
23  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 2) {
24  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
25  ++tri;
26  hier.back()->addComponent(subdet);
27  hier.emplace_back(subdet);
28  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 3) {
29  subdet =
30  new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
31  ++tri;
32  hier.back()->addComponent(subdet);
33  hier.emplace_back(subdet);
34  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 4) {
35  subdet =
36  new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
37  ++tri;
38  hier.back()->addComponent(subdet);
39  hier.emplace_back(subdet);
40  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 5) {
41  subdet =
42  new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
43  ++tri;
44  hier.back()->addComponent(subdet);
45  hier.emplace_back(subdet);
46  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 6) {
47  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri],
48  GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
49  ++tri;
50  hier.back()->addComponent(subdet);
51  }
52  hier.pop_back();
53  }
54  hier.pop_back();
55  }
56  hier.pop_back();
57  }
58  hier.pop_back();
59  }
60  hier.pop_back();
61  }
62  return mtd;
63 }
std::vector< Item > pgeomdets_