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.

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  int lev = 1;
17  GeometricTimingDet* subdet = mtd.get();
18  hier.emplace_back(subdet);
19  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 1) {
20  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
21  ++tri;
22  hier.back()->addComponent(subdet);
23  hier.emplace_back(subdet);
24  ++lev;
25  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 2) {
26  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri], GeometricTimingDet::GTDEnumType(pgd.pgeomdets_[tri].type_));
27  ++tri;
28  hier.back()->addComponent(subdet);
29  hier.emplace_back(subdet);
30  ++lev;
31  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 3) {
32  subdet =
34  ++tri;
35  hier.back()->addComponent(subdet);
36  hier.emplace_back(subdet);
37  ++lev;
38  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 4) {
39  subdet =
41  ++tri;
42  hier.back()->addComponent(subdet);
43  hier.emplace_back(subdet);
44  ++lev;
45  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 5) {
46  subdet =
48  ++tri;
49  hier.back()->addComponent(subdet);
50  hier.emplace_back(subdet);
51  ++lev;
52  while (tri < detMax && pgd.pgeomdets_[tri].level_ == 6) {
53  subdet = new GeometricTimingDet(pgd.pgeomdets_[tri],
55  ++tri;
56  hier.back()->addComponent(subdet);
57  }
58  --lev;
59  hier.pop_back();
60  }
61  --lev;
62  hier.pop_back();
63  }
64  --lev;
65  hier.pop_back();
66  }
67  --lev;
68  hier.pop_back();
69  }
70  --lev;
71  hier.pop_back();
72  }
73  return mtd;
74 }

References GeometricTimingDet::MTD, and PGeometricTimingDet::pgeomdets_.

Referenced by MTDGeometricTimingDetESModule::produce().

GeometricTimingDet::GTDEnumType
GTDEnumType
Definition: GeometricTimingDet.h:50
PGeometricTimingDet::pgeomdets_
std::vector< Item > pgeomdets_
Definition: PGeometricTimingDet.h:50
GeometricTimingDet::MTD
Definition: GeometricTimingDet.h:52
GeometricTimingDet
Definition: GeometricTimingDet.h:28
mtd_digitizer
Definition: MTDDigitizer.h:35