CMS 3D CMS Logo

TrackAssociatorParameters.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: TrackAssociator
4 // Class: TrackAssociatorParameters
5 //
6 /*
7 
8  Description: track associator parameters
9 
10 */
11 //
12 // Original Author: Dmytro Kovalskyi
13 //
14 //
17 
19  dREcal = iConfig.getParameter<double>("dREcal");
20  dRHcal = iConfig.getParameter<double>("dRHcal");
21  dRMuon = iConfig.getParameter<double>("dRMuon");
22 
23  dREcalPreselection = iConfig.getParameter<double>("dREcalPreselection");
24  dRHcalPreselection = iConfig.getParameter<double>("dRHcalPreselection");
25  dRMuonPreselection = iConfig.getParameter<double>("dRMuonPreselection");
26  dRPreshowerPreselection = iConfig.getParameter<double>("dRPreshowerPreselection");
27 
28  muonMaxDistanceX = iConfig.getParameter<double>("muonMaxDistanceX");
29  muonMaxDistanceY = iConfig.getParameter<double>("muonMaxDistanceY");
30  muonMaxDistanceSigmaX = iConfig.getParameter<double>("muonMaxDistanceSigmaX");
31  muonMaxDistanceSigmaY = iConfig.getParameter<double>("muonMaxDistanceSigmaY");
32 
33  useEcal = iConfig.getParameter<bool>("useEcal");
34  useHcal = iConfig.getParameter<bool>("useHcal");
35  useHO = iConfig.getParameter<bool>("useHO");
36  useCalo = iConfig.getParameter<bool>("useCalo");
37  useMuon = iConfig.getParameter<bool>("useMuon");
38  usePreshower = iConfig.getParameter<bool>("usePreshower");
39  useGEM = iConfig.getParameter<bool>("useGEM");
40  useME0 = iConfig.getParameter<bool>("useME0");
41  preselectMuonTracks = iConfig.getParameter<bool>("preselectMuonTracks");
42 
43  theEBRecHitCollectionLabel = iConfig.getParameter<edm::InputTag>("EBRecHitCollectionLabel");
44  theEERecHitCollectionLabel = iConfig.getParameter<edm::InputTag>("EERecHitCollectionLabel");
45  theCaloTowerCollectionLabel = iConfig.getParameter<edm::InputTag>("CaloTowerCollectionLabel");
46  theHBHERecHitCollectionLabel = iConfig.getParameter<edm::InputTag>("HBHERecHitCollectionLabel");
47  theHORecHitCollectionLabel = iConfig.getParameter<edm::InputTag>("HORecHitCollectionLabel");
48  theDTRecSegment4DCollectionLabel = iConfig.getParameter<edm::InputTag>("DTRecSegment4DCollectionLabel");
49  theCSCSegmentCollectionLabel = iConfig.getParameter<edm::InputTag>("CSCSegmentCollectionLabel");
50  theGEMSegmentCollectionLabel = iConfig.getParameter<edm::InputTag>("GEMSegmentCollectionLabel");
51  theME0SegmentCollectionLabel = iConfig.getParameter<edm::InputTag>("ME0SegmentCollectionLabel");
52  if (preselectMuonTracks) {
53  theRPCHitCollectionLabel = iConfig.getParameter<edm::InputTag>("RPCHitCollectionLabel");
54  theGEMHitCollectionLabel = iConfig.getParameter<edm::InputTag>("GEMHitCollectionLabel");
55  theME0HitCollectionLabel = iConfig.getParameter<edm::InputTag>("ME0HitCollectionLabel");
56  }
57 
58  accountForTrajectoryChangeCalo = iConfig.getParameter<bool>("accountForTrajectoryChangeCalo");
59  // accountForTrajectoryChangeMuon = iConfig.getParameter<bool>("accountForTrajectoryChangeMuon");
60 
61  truthMatch = iConfig.getParameter<bool>("truthMatch");
62  muonMaxDistanceSigmaY = iConfig.getParameter<double>("trajectoryUncertaintyTolerance");
63 
64  if (useEcal) {
67  }
68  if (useCalo)
70  if (useHcal)
72  if (useHO)
74  if (useMuon) {
77  if (useGEM)
79  if (useME0)
81  if (preselectMuonTracks) {
85  }
86  }
87  if (truthMatch) {
90  simEcalHitsEBToken = iC.consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEB"));
91  simEcalHitsEEToken = iC.consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEE"));
92  simHcalHitsToken = iC.consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "HcalHits"));
93  }
94 
95  ecalDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "EcalDetIdAssociator"));
96  hcalDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "HcalDetIdAssociator"));
97  hoDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "HODetIdAssociator"));
98  caloDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "CaloDetIdAssociator"));
99  muonDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "MuonDetIdAssociator"));
100  preshowerDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "PreshowerDetIdAssociator"));
103  bFieldToken = iC.esConsumes();
104 }
105 
107  loadParameters(iConfig, iC);
108 }
109 
111  desc.setComment("Auxilliary class to store parameters for track association");
112  // the following setup is the one from TrackingTools/TrackAssociator/python/default_cfi.py
113  desc.add<bool>("accountForTrajectoryChangeCalo", false);
114  desc.add<bool>("propagateAllDirections", true);
115  desc.add<bool>("truthMatch", false);
116  desc.add<bool>("useCalo", false);
117  desc.add<bool>("useEcal", true);
118  desc.add<bool>("useGEM", false);
119  desc.add<bool>("useHO", true);
120  desc.add<bool>("useHcal", true);
121  desc.add<bool>("useME0", false);
122  desc.add<bool>("useMuon", true);
123  desc.add<bool>("usePreshower", false);
124  desc.add<bool>("preselectMuonTracks", false);
125  desc.add<double>("dREcal", 9999.0);
126  desc.add<double>("dREcalPreselection", 0.05);
127  desc.add<double>("dRHcal", 9999.0);
128  desc.add<double>("dRHcalPreselection", 0.2);
129  desc.add<double>("dRMuon", 9999.0);
130  desc.add<double>("dRMuonPreselection", 0.2);
131  desc.add<double>("dRPreshowerPreselection", 0.2);
132  desc.add<double>("muonMaxDistanceSigmaX", 0.0);
133  desc.add<double>("muonMaxDistanceSigmaY", 0.0);
134  desc.add<double>("muonMaxDistanceX", 5.0);
135  desc.add<double>("muonMaxDistanceY", 5.0);
136  desc.add<double>("trajectoryUncertaintyTolerance", -1.0);
137  desc.add<edm::InputTag>("CSCSegmentCollectionLabel", edm::InputTag("cscSegments"));
138  desc.add<edm::InputTag>("CaloTowerCollectionLabel", edm::InputTag("towerMaker"));
139  desc.add<edm::InputTag>("DTRecSegment4DCollectionLabel", edm::InputTag("dt4DSegments"));
140  desc.add<edm::InputTag>("EBRecHitCollectionLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
141  desc.add<edm::InputTag>("EERecHitCollectionLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
142  desc.add<edm::InputTag>("GEMSegmentCollectionLabel", edm::InputTag("gemSegments"));
143  desc.add<edm::InputTag>("HBHERecHitCollectionLabel", edm::InputTag("hbreco"));
144  desc.add<edm::InputTag>("HORecHitCollectionLabel", edm::InputTag("horeco"));
145  desc.add<edm::InputTag>("ME0SegmentCollectionLabel", edm::InputTag("me0Segments"));
146  desc.add<edm::InputTag>("RPCHitCollectionLabel", edm::InputTag("rpcRecHits"));
147  desc.add<edm::InputTag>("GEMHitCollectionLabel", edm::InputTag("gemRecHits"));
148  desc.add<edm::InputTag>("ME0HitCollectionLabel", edm::InputTag("me0RecHits"));
149 }
edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > hoDetIdAssociatorToken
edm::EDGetTokenT< CaloTowerCollection > caloTowersToken
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > caloDetIdAssociatorToken
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< PCaloHit > PCaloHitContainer
edm::EDGetTokenT< GEMRecHitCollection > gemHitsToken
static void fillPSetDescription(edm::ParameterSetDescription &descriptions)
edm::EDGetTokenT< ME0RecHitCollection > me0HitsToken
edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > preshowerDetIdAssociatorToken
edm::EDGetTokenT< GEMSegmentCollection > gemSegmentsToken
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
edm::EDGetTokenT< EBRecHitCollection > EBRecHitsToken
edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > ecalDetIdAssociatorToken
edm::EDGetTokenT< edm::PCaloHitContainer > simEcalHitsEBToken
edm::EDGetTokenT< HORecHitCollection > HOcollToken
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > theCaloGeometryToken
edm::EDGetTokenT< ME0SegmentCollection > me0SegmentsToken
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > theTrackingGeometryToken
edm::EDGetTokenT< DTRecSegment4DCollection > dtSegmentsToken
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > bFieldToken
edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > muonDetIdAssociatorToken
edm::EDGetTokenT< edm::SimTrackContainer > simTracksToken
edm::EDGetTokenT< EERecHitCollection > EERecHitsToken
edm::EDGetTokenT< HBHERecHitCollection > HBHEcollToken
edm::EDGetTokenT< edm::SimVertexContainer > simVerticesToken
std::vector< SimVertex > SimVertexContainer
edm::EDGetTokenT< RPCRecHitCollection > rpcHitsToken
edm::EDGetTokenT< edm::PCaloHitContainer > simHcalHitsToken
edm::InputTag theEBRecHitCollectionLabel
Labels of the detector EDProducts.
edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > hcalDetIdAssociatorToken
edm::EDGetTokenT< CSCSegmentCollection > cscSegmentsToken
std::vector< SimTrack > SimTrackContainer
edm::EDGetTokenT< edm::PCaloHitContainer > simEcalHitsEEToken