CMS 3D CMS Logo

MTDDetLayerGeometryESProducer.cc
Go to the documentation of this file.
1 
9 
11 
14 
17 
20 
21 #include <memory>
22 #include <iostream>
23 
24 
25 using namespace edm;
26 
28  setWhatProduced(this);
29 }
30 
31 
33 
34 
35 std::unique_ptr<MTDDetLayerGeometry>
37 
38  const std::string metname = "MTD|RecoMTD|RecoMTDDetLayers|MTDDetLayerGeometryESProducer";
39  auto mtdDetLayerGeometry = std::make_unique<MTDDetLayerGeometry>();
40 
42  record.getRecord<MTDDigiGeometryRecord>().get(mtd);
43  if (mtd.isValid()) {
44  // Build BTL layers
46  // Build ETL layers
48  } else {
49  LogInfo(metname) << "No MTD geometry is available.";
50  }
51 
52  // Sort layers properly
53  mtdDetLayerGeometry->sortLayers();
54 
55  return mtdDetLayerGeometry;
56 }
static std::vector< DetLayer * > buildLayers(const MTDGeometry &geo)
Operations.
JetCorrectorParameters::Record record
Definition: classes.h:7
const std::string metname
MTDDetLayerGeometryESProducer(const edm::ParameterSet &p)
Constructor.
std::unique_ptr< MTDDetLayerGeometry > produce(const MTDRecoGeometryRecord &record)
Produce MuonDeLayerGeometry.
HLT enums.
static std::pair< std::vector< DetLayer * >, std::vector< DetLayer * > > buildLayers(const MTDGeometry &geo)
~MTDDetLayerGeometryESProducer() override
Destructor.