Skip to content

Commit e1fda72

Browse files
authored
Merge branch 'master' into dl210316rc
2 parents 64e8872 + 53993f8 commit e1fda72

File tree

1,405 files changed

+48321
-43743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,405 files changed

+48321
-43743
lines changed

Alignment/CommonAlignment/interface/AlignableObjectId.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
class TrackerGeometry;
88
class DTGeometry;
99
class CSCGeometry;
10+
class GEMGeometry;
1011

1112
/// Allows conversion between type and name, and vice-versa
1213
class AlignableObjectId {
@@ -15,7 +16,7 @@ class AlignableObjectId {
1516
enum class Geometry { RunI, PhaseI, PhaseII, General, Unspecified };
1617

1718
AlignableObjectId(Geometry);
18-
AlignableObjectId(const TrackerGeometry*, const DTGeometry*, const CSCGeometry*);
19+
AlignableObjectId(const TrackerGeometry*, const DTGeometry*, const CSCGeometry*, const GEMGeometry*);
1920
AlignableObjectId(const AlignableObjectId&) = default;
2021
AlignableObjectId& operator=(const AlignableObjectId&) = default;
2122
AlignableObjectId(AlignableObjectId&&) = default;
@@ -43,7 +44,7 @@ class AlignableObjectId {
4344

4445
private:
4546
static Geometry trackerGeometry(const TrackerGeometry*);
46-
static Geometry muonGeometry(const DTGeometry*, const CSCGeometry*);
47+
static Geometry muonGeometry(const DTGeometry*, const CSCGeometry*, const GEMGeometry*);
4748

4849
const entry* entries_{nullptr};
4950
Geometry geometry_{Geometry::Unspecified};

Alignment/CommonAlignment/interface/StructureType.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ namespace align {
8181
AlignableCSCRing,
8282
AlignableCSCChamber,
8383
AlignableCSCLayer, // = 110
84+
AlignableGEMEndcap,
85+
AlignableGEMStation,
86+
AlignableGEMRing,
87+
AlignableGEMSuperChamber,
88+
AlignableGEMChamber,
89+
AlignableGEMEtaPartition,
8490
AlignableMuon,
8591

8692
Detector, // = 112 (what for?)

Alignment/CommonAlignment/src/AlignableCompositeBuilder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ AlignableCompositeBuilder ::AlignableCompositeBuilder(const TrackerTopology* tra
1818
const TrackerGeometry* trackerGeometry,
1919
const AlignableIndexer& alignableIndexer)
2020
: trackerTopology_(trackerTopology),
21-
alignableObjectId_(trackerGeometry, nullptr, nullptr),
21+
alignableObjectId_(trackerGeometry, nullptr, nullptr, nullptr),
2222
alignableIndexer_(alignableIndexer) {}
2323

2424
//_____________________________________________________________________________

Alignment/CommonAlignment/src/AlignableObjectId.cc

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ namespace {
135135
{align::AlignableCSCRing, "CSCRing"},
136136
{align::AlignableCSCChamber, "CSCChamber"},
137137
{align::AlignableCSCLayer, "CSCLayer"},
138+
{align::AlignableGEMEndcap, "GEMEndcap"},
139+
{align::AlignableGEMStation, "GEMStation"},
140+
{align::AlignableGEMRing, "GEMRing"},
141+
{align::AlignableGEMSuperChamber, "GEMSuperChamber"},
142+
{align::AlignableGEMChamber, "GEMChamber"},
143+
{align::AlignableGEMEtaPartition, "GEMEtaPartition"},
138144
{align::AlignableMuon, "Muon"},
139145

140146
{align::BeamSpot, "BeamSpot"},
@@ -201,6 +207,12 @@ namespace {
201207
{align::AlignableCSCRing, "CSCRing"},
202208
{align::AlignableCSCChamber, "CSCChamber"},
203209
{align::AlignableCSCLayer, "CSCLayer"},
210+
{align::AlignableGEMEndcap, "GEMEndcap"},
211+
{align::AlignableGEMStation, "GEMStation"},
212+
{align::AlignableGEMRing, "GEMRing"},
213+
{align::AlignableGEMSuperChamber, "GEMSuperChamber"},
214+
{align::AlignableGEMChamber, "GEMChamber"},
215+
{align::AlignableGEMEtaPartition, "GEMEtaPartition"},
204216
{align::AlignableMuon, "Muon"},
205217

206218
{align::BeamSpot, "BeamSpot"},
@@ -246,8 +258,9 @@ AlignableObjectId ::AlignableObjectId(AlignableObjectId::Geometry geometry) : ge
246258
//_____________________________________________________________________________
247259
AlignableObjectId ::AlignableObjectId(const TrackerGeometry *tracker,
248260
const DTGeometry *muonDt,
249-
const CSCGeometry *muonCsc)
250-
: AlignableObjectId(commonGeometry(trackerGeometry(tracker), muonGeometry(muonDt, muonCsc))) {}
261+
const CSCGeometry *muonCsc,
262+
const GEMGeometry *muonGem)
263+
: AlignableObjectId(commonGeometry(trackerGeometry(tracker), muonGeometry(muonDt, muonCsc, muonGem))) {}
251264

252265
//_____________________________________________________________________________
253266
align::StructureType AlignableObjectId::nameToType(const std::string &name) const { return stringToId(name.c_str()); }
@@ -299,7 +312,9 @@ AlignableObjectId::Geometry AlignableObjectId ::trackerGeometry(const TrackerGeo
299312
}
300313
}
301314

302-
AlignableObjectId::Geometry AlignableObjectId ::muonGeometry(const DTGeometry *, const CSCGeometry *) {
315+
AlignableObjectId::Geometry AlignableObjectId ::muonGeometry(const DTGeometry *,
316+
const CSCGeometry *,
317+
const GEMGeometry *) {
303318
// muon alignment structure types are identical for all kinds of geometries
304319
return Geometry::General;
305320
}

Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorAsAnalyzer.cc

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeomBuilderFromGeometricDet.h"
4040
#include "Geometry/DTGeometry/interface/DTGeometry.h"
4141
#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
42+
#include "Geometry/GEMGeometry/interface/GEMGeometry.h"
4243
#include "Geometry/Records/interface/TrackerTopologyRcd.h"
4344
#include "Geometry/CommonTopologies/interface/GeometryAligner.h"
4445
#include "CondFormats/GeometryObjects/interface/PTrackerParameters.h"
@@ -50,6 +51,8 @@
5051
#include "CondFormats/AlignmentRecord/interface/DTAlignmentErrorExtendedRcd.h"
5152
#include "CondFormats/AlignmentRecord/interface/CSCAlignmentRcd.h"
5253
#include "CondFormats/AlignmentRecord/interface/CSCAlignmentErrorExtendedRcd.h"
54+
#include "CondFormats/AlignmentRecord/interface/GEMAlignmentRcd.h"
55+
#include "CondFormats/AlignmentRecord/interface/GEMAlignmentErrorExtendedRcd.h"
5356
#include "CondFormats/AlignmentRecord/interface/GlobalPositionRcd.h"
5457
#include "CondFormats/Alignment/interface/DetectorGlobalPosition.h"
5558

@@ -81,7 +84,16 @@ class AlignmentMonitorAsAnalyzer : public edm::EDAnalyzer {
8184
std::unique_ptr<AlignmentParameterStore> m_alignmentParameterStore;
8285

8386
std::vector<std::unique_ptr<AlignmentMonitorBase>> m_monitors;
84-
std::string idealGeometryLabel;
87+
edm::ESGetToken<DTGeometry, MuonGeometryRecord> esTokenDT_;
88+
edm::ESGetToken<CSCGeometry, MuonGeometryRecord> esTokenCSC_;
89+
edm::ESGetToken<GEMGeometry, MuonGeometryRecord> esTokenGEM_;
90+
edm::ESGetToken<Alignments, GlobalPositionRcd> esTokenGPR_;
91+
edm::ESGetToken<Alignments, DTAlignmentRcd> esTokenDTAl_;
92+
edm::ESGetToken<AlignmentErrorsExtended, DTAlignmentErrorExtendedRcd> esTokenDTAPE_;
93+
edm::ESGetToken<Alignments, CSCAlignmentRcd> esTokenCSCAl_;
94+
edm::ESGetToken<AlignmentErrorsExtended, CSCAlignmentErrorExtendedRcd> esTokenCSCAPE_;
95+
edm::ESGetToken<Alignments, GEMAlignmentRcd> esTokenGEMAl_;
96+
edm::ESGetToken<AlignmentErrorsExtended, GEMAlignmentErrorExtendedRcd> esTokenGEMAPE_;
8597
bool m_firstEvent;
8698
};
8799

@@ -99,7 +111,9 @@ class AlignmentMonitorAsAnalyzer : public edm::EDAnalyzer {
99111
AlignmentMonitorAsAnalyzer::AlignmentMonitorAsAnalyzer(const edm::ParameterSet& iConfig)
100112
: m_tjTag(iConfig.getParameter<edm::InputTag>("tjTkAssociationMapTag")),
101113
m_aliParamStoreCfg(iConfig.getParameter<edm::ParameterSet>("ParameterStore")),
102-
idealGeometryLabel("idealForAlignmentMonitorAsAnalyzer") {
114+
esTokenDT_(esConsumes(edm::ESInputTag("", "idealForAlignmentMonitorAsAnalyzer"))),
115+
esTokenCSC_(esConsumes(edm::ESInputTag("", "idealForAlignmentMonitorAsAnalyzer"))),
116+
esTokenGEM_(esConsumes(edm::ESInputTag("", "idealForAlignmentMonitorAsAnalyzer"))) {
103117
std::vector<std::string> monitors = iConfig.getUntrackedParameter<std::vector<std::string>>("monitors");
104118

105119
for (auto const& mon : monitors) {
@@ -129,13 +143,11 @@ void AlignmentMonitorAsAnalyzer::analyze(const edm::Event& iEvent, const edm::Ev
129143
TrackerGeomBuilderFromGeometricDet trackerBuilder;
130144
std::shared_ptr<TrackerGeometry> theTracker(trackerBuilder.build(&(*theGeometricDet), *ptp, tTopo));
131145

132-
edm::ESHandle<DTGeometry> theMuonDT;
133-
edm::ESHandle<CSCGeometry> theMuonCSC;
134-
iSetup.get<MuonGeometryRecord>().get(idealGeometryLabel, theMuonDT);
135-
iSetup.get<MuonGeometryRecord>().get(idealGeometryLabel, theMuonCSC);
146+
edm::ESHandle<DTGeometry> theMuonDT = iSetup.getHandle(esTokenDT_);
147+
edm::ESHandle<CSCGeometry> theMuonCSC = iSetup.getHandle(esTokenCSC_);
148+
edm::ESHandle<GEMGeometry> theMuonGEM = iSetup.getHandle(esTokenGEM_);
136149

137-
edm::ESHandle<Alignments> globalPositionRcd;
138-
iSetup.get<GlobalPositionRcd>().get(globalPositionRcd);
150+
edm::ESHandle<Alignments> globalPositionRcd = iSetup.getHandle(esTokenGPR_);
139151

140152
edm::ESHandle<Alignments> alignments;
141153
iSetup.get<TrackerAlignmentRcd>().get(alignments);
@@ -146,29 +158,33 @@ void AlignmentMonitorAsAnalyzer::analyze(const edm::Event& iEvent, const edm::Ev
146158
&(*alignmentErrors),
147159
align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Tracker)));
148160

149-
edm::ESHandle<Alignments> dtAlignments;
150-
iSetup.get<DTAlignmentRcd>().get(dtAlignments);
151-
edm::ESHandle<AlignmentErrorsExtended> dtAlignmentErrorsExtended;
152-
iSetup.get<DTAlignmentErrorExtendedRcd>().get(dtAlignmentErrorsExtended);
161+
edm::ESHandle<Alignments> dtAlignments = iSetup.getHandle(esTokenDTAl_);
162+
;
163+
edm::ESHandle<AlignmentErrorsExtended> dtAlignmentErrorsExtended = iSetup.getHandle(esTokenDTAPE_);
153164
aligner.applyAlignments<DTGeometry>(&(*theMuonDT),
154165
&(*dtAlignments),
155166
&(*dtAlignmentErrorsExtended),
156167
align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Muon)));
157168

158-
edm::ESHandle<Alignments> cscAlignments;
159-
iSetup.get<CSCAlignmentRcd>().get(cscAlignments);
160-
edm::ESHandle<AlignmentErrorsExtended> cscAlignmentErrorsExtended;
161-
iSetup.get<CSCAlignmentErrorExtendedRcd>().get(cscAlignmentErrorsExtended);
169+
edm::ESHandle<Alignments> cscAlignments = iSetup.getHandle(esTokenCSCAl_);
170+
edm::ESHandle<AlignmentErrorsExtended> cscAlignmentErrorsExtended = iSetup.getHandle(esTokenCSCAPE_);
162171
aligner.applyAlignments<CSCGeometry>(&(*theMuonCSC),
163172
&(*cscAlignments),
164173
&(*cscAlignmentErrorsExtended),
165174
align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Muon)));
166175

176+
edm::ESHandle<Alignments> gemAlignments = iSetup.getHandle(esTokenGEMAl_);
177+
edm::ESHandle<AlignmentErrorsExtended> gemAlignmentErrorsExtended = iSetup.getHandle(esTokenGEMAPE_);
178+
aligner.applyAlignments<GEMGeometry>(&(*theMuonGEM),
179+
&(*gemAlignments),
180+
&(*gemAlignmentErrorsExtended),
181+
align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Muon)));
182+
167183
// within an analyzer, modules can't expect to see any selected alignables!
168184
align::Alignables empty_alignables;
169185

170186
m_alignableTracker = std::make_unique<AlignableTracker>(&(*theTracker), tTopo);
171-
m_alignableMuon = std::make_unique<AlignableMuon>(&(*theMuonDT), &(*theMuonCSC));
187+
m_alignableMuon = std::make_unique<AlignableMuon>(&(*theMuonDT), &(*theMuonCSC), &(*theMuonGEM));
172188
m_alignmentParameterStore = std::make_unique<AlignmentParameterStore>(empty_alignables, m_aliParamStoreCfg);
173189

174190
for (auto const& monitor : m_monitors) {

Alignment/CommonAlignmentProducer/interface/AlignmentProducerBase.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
#include "Geometry/DTGeometry/interface/DTGeometry.h"
5353
#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
54+
#include "Geometry/GEMGeometry/interface/GEMGeometry.h"
5455
#include "Geometry/CommonTopologies/interface/GeometryAligner.h"
5556
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
5657
#include "Geometry/Records/interface/IdealGeometryRecord.h"
@@ -114,6 +115,7 @@ class AlignmentProducerBase {
114115
std::shared_ptr<TrackerGeometry> trackerGeometry_;
115116
edm::ESHandle<DTGeometry> muonDTGeometry_;
116117
edm::ESHandle<CSCGeometry> muonCSCGeometry_;
118+
edm::ESHandle<GEMGeometry> muonGEMGeometry_;
117119
const bool doTracker_, doMuon_, useExtras_;
118120

119121
/// Map with tracks/trajectories

Alignment/CommonAlignmentProducer/src/AlignmentProducerBase.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ void AlignmentProducerBase::createGeometries(const edm::EventSetup& iSetup, cons
425425
if (doMuon_) {
426426
iSetup.get<MuonGeometryRecord>().get(idealGeometryLabel, muonDTGeometry_);
427427
iSetup.get<MuonGeometryRecord>().get(idealGeometryLabel, muonCSCGeometry_);
428+
iSetup.get<MuonGeometryRecord>().get(idealGeometryLabel, muonGEMGeometry_);
428429
}
429430
}
430431

@@ -452,6 +453,9 @@ void AlignmentProducerBase::applyAlignmentsToDB(const edm::EventSetup& setup) {
452453

453454
applyDB<CSCGeometry, CSCAlignmentRcd, CSCAlignmentErrorExtendedRcd>(
454455
&*muonCSCGeometry_, setup, align::DetectorGlobalPosition(*globalPositions_, DetId(DetId::Muon)));
456+
457+
applyDB<GEMGeometry, GEMAlignmentRcd, GEMAlignmentErrorExtendedRcd>(
458+
&*muonGEMGeometry_, setup, align::DetectorGlobalPosition(*globalPositions_, DetId(DetId::Muon)));
455459
}
456460
}
457461
}
@@ -468,9 +472,9 @@ void AlignmentProducerBase::createAlignables(const TrackerTopology* tTopo, bool
468472

469473
if (doMuon_) {
470474
if (update) {
471-
alignableMuon_->update(&*muonDTGeometry_, &*muonCSCGeometry_);
475+
alignableMuon_->update(&*muonDTGeometry_, &*muonCSCGeometry_, &*muonGEMGeometry_);
472476
} else {
473-
alignableMuon_ = std::make_unique<AlignableMuon>(&*muonDTGeometry_, &*muonCSCGeometry_);
477+
alignableMuon_ = std::make_unique<AlignableMuon>(&*muonDTGeometry_, &*muonCSCGeometry_, &*muonGEMGeometry_);
474478
}
475479
}
476480

@@ -646,12 +650,15 @@ void AlignmentProducerBase::applyAlignmentsToGeometry() {
646650

647651
std::unique_ptr<Alignments> dtAlignments{alignableMuon_->dtAlignments()};
648652
std::unique_ptr<Alignments> cscAlignments{alignableMuon_->cscAlignments()};
653+
std::unique_ptr<Alignments> gemAlignments{alignableMuon_->gemAlignments()};
649654

650655
std::unique_ptr<AlignmentErrorsExtended> dtAlignmentErrExt{alignableMuon_->dtAlignmentErrorsExtended()};
651656
std::unique_ptr<AlignmentErrorsExtended> cscAlignmentErrExt{alignableMuon_->cscAlignmentErrorsExtended()};
657+
std::unique_ptr<AlignmentErrorsExtended> gemAlignmentErrExt{alignableMuon_->gemAlignmentErrorsExtended()};
652658

653659
aligner.applyAlignments(&*muonDTGeometry_, dtAlignments.get(), dtAlignmentErrExt.get(), AlignTransform());
654660
aligner.applyAlignments(&*muonCSCGeometry_, cscAlignments.get(), cscAlignmentErrExt.get(), AlignTransform());
661+
aligner.applyAlignments(&*muonGEMGeometry_, gemAlignments.get(), gemAlignmentErrExt.get(), AlignTransform());
655662
}
656663
}
657664

Alignment/LaserAlignmentSimulation/plugins/LaserOpticalPhysics.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include "G4HadronPhysicsQGSP_FTFP_BERT.hh"
1414

1515
#include "SimG4Core/Physics/interface/PhysicsListFactory.h"
16-
#include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysics.h"
1716

17+
#include "G4EmStandardPhysics_option1.hh"
1818
#include "G4DecayPhysics.hh"
1919
#include "G4EmExtraPhysics.hh"
2020
#include "G4HadronElasticPhysics.hh"
@@ -29,7 +29,7 @@ LaserOpticalPhysics::LaserOpticalPhysics(const edm::ParameterSet &p) : PhysicsLi
2929
<< std::endl;
3030

3131
// EM Physics
32-
RegisterPhysics(new CMSEmStandardPhysics(ver));
32+
RegisterPhysics(new G4EmStandardPhysics_option1(ver));
3333
// Synchroton Radiation & GN Physics
3434
RegisterPhysics(new G4EmExtraPhysics(ver));
3535
// Decays

Alignment/MuonAlignment/BuildFile.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<use name="DataFormats/GeometryCommonDetAlgo"/>
66
<use name="Geometry/DTGeometry"/>
77
<use name="Geometry/CSCGeometry"/>
8+
<use name="Geometry/GEMGeometry"/>
89
<use name="Geometry/CommonTopologies"/>
910
<use name="Geometry/Records"/>
1011
<use name="FWCore/Framework"/>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#ifndef Alignment_MuonAlignment_AlignableGEMChamber_H
2+
#define Alignment_MuonAlignment_AlignableGEMChamber_H
3+
4+
/* \class AlignableGEMChamber
5+
* \author Hyunyong Kim - TAMU
6+
*/
7+
8+
#include <iosfwd>
9+
#include <iostream>
10+
#include <vector>
11+
12+
#include "Alignment/CommonAlignment/interface/StructureType.h"
13+
#include "Alignment/CommonAlignment/interface/AlignableDet.h"
14+
15+
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
16+
#include "Alignment/CommonAlignment/interface/AlignableComposite.h"
17+
18+
class AlignableGEMChamber : public AlignableDet {
19+
public:
20+
friend std::ostream& operator<<(std::ostream&, const AlignableGEMChamber&);
21+
22+
AlignableGEMChamber(const GeomDet* geomDet);
23+
24+
void update(const GeomDet* geomDet);
25+
};
26+
27+
#endif

0 commit comments

Comments
 (0)