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 
42  theEBRecHitCollectionLabel = iConfig.getParameter<edm::InputTag>("EBRecHitCollectionLabel");
43  theEERecHitCollectionLabel = iConfig.getParameter<edm::InputTag>("EERecHitCollectionLabel");
44  theCaloTowerCollectionLabel = iConfig.getParameter<edm::InputTag>("CaloTowerCollectionLabel");
45  theHBHERecHitCollectionLabel = iConfig.getParameter<edm::InputTag>("HBHERecHitCollectionLabel");
46  theHORecHitCollectionLabel = iConfig.getParameter<edm::InputTag>("HORecHitCollectionLabel");
47  theDTRecSegment4DCollectionLabel = iConfig.getParameter<edm::InputTag>("DTRecSegment4DCollectionLabel");
48  theCSCSegmentCollectionLabel = iConfig.getParameter<edm::InputTag>("CSCSegmentCollectionLabel");
49  theGEMSegmentCollectionLabel = iConfig.getParameter<edm::InputTag>("GEMSegmentCollectionLabel");
50  theME0SegmentCollectionLabel = iConfig.getParameter<edm::InputTag>("ME0SegmentCollectionLabel");
51 
52  accountForTrajectoryChangeCalo = iConfig.getParameter<bool>("accountForTrajectoryChangeCalo");
53  // accountForTrajectoryChangeMuon = iConfig.getParameter<bool>("accountForTrajectoryChangeMuon");
54 
55  truthMatch = iConfig.getParameter<bool>("truthMatch");
56  muonMaxDistanceSigmaY = iConfig.getParameter<double>("trajectoryUncertaintyTolerance");
57 
58  if (useEcal) {
61  }
62  if (useCalo)
64  if (useHcal)
66  if (useHO)
68  if (useMuon) {
71  if (useGEM)
73  if (useME0)
75  }
76  if (truthMatch) {
79  simEcalHitsEBToken = iC.consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEB"));
80  simEcalHitsEEToken = iC.consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEE"));
81  simHcalHitsToken = iC.consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "HcalHits"));
82  }
83 
84  ecalDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "EcalDetIdAssociator"));
85  hcalDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "HcalDetIdAssociator"));
86  hoDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "HODetIdAssociator"));
87  caloDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "CaloDetIdAssociator"));
88  muonDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "MuonDetIdAssociator"));
89  preshowerDetIdAssociatorToken = iC.esConsumes(edm::ESInputTag("", "PreshowerDetIdAssociator"));
92  bFieldToken = iC.esConsumes();
93 }
94 
96  loadParameters(iConfig, iC);
97 }
98 
100  desc.setComment("Auxilliary class to store parameters for track association");
101  // the following setup is the one from TrackingTools/TrackAssociator/python/default_cfi.py
102  desc.add<bool>("accountForTrajectoryChangeCalo", false);
103  desc.add<bool>("propagateAllDirections", true);
104  desc.add<bool>("truthMatch", false);
105  desc.add<bool>("useCalo", false);
106  desc.add<bool>("useEcal", true);
107  desc.add<bool>("useGEM", false);
108  desc.add<bool>("useHO", true);
109  desc.add<bool>("useHcal", true);
110  desc.add<bool>("useME0", false);
111  desc.add<bool>("useMuon", true);
112  desc.add<bool>("usePreshower", false);
113  desc.add<double>("dREcal", 9999.0);
114  desc.add<double>("dREcalPreselection", 0.05);
115  desc.add<double>("dRHcal", 9999.0);
116  desc.add<double>("dRHcalPreselection", 0.2);
117  desc.add<double>("dRMuon", 9999.0);
118  desc.add<double>("dRMuonPreselection", 0.2);
119  desc.add<double>("dRPreshowerPreselection", 0.2);
120  desc.add<double>("muonMaxDistanceSigmaX", 0.0);
121  desc.add<double>("muonMaxDistanceSigmaY", 0.0);
122  desc.add<double>("muonMaxDistanceX", 5.0);
123  desc.add<double>("muonMaxDistanceY", 5.0);
124  desc.add<double>("trajectoryUncertaintyTolerance", -1.0);
125  desc.add<edm::InputTag>("CSCSegmentCollectionLabel", edm::InputTag("cscSegments"));
126  desc.add<edm::InputTag>("CaloTowerCollectionLabel", edm::InputTag("towerMaker"));
127  desc.add<edm::InputTag>("DTRecSegment4DCollectionLabel", edm::InputTag("dt4DSegments"));
128  desc.add<edm::InputTag>("EBRecHitCollectionLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
129  desc.add<edm::InputTag>("EERecHitCollectionLabel", edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
130  desc.add<edm::InputTag>("GEMSegmentCollectionLabel", edm::InputTag("gemSegments"));
131  desc.add<edm::InputTag>("HBHERecHitCollectionLabel", edm::InputTag("hbreco"));
132  desc.add<edm::InputTag>("HORecHitCollectionLabel", edm::InputTag("horeco"));
133  desc.add<edm::InputTag>("ME0SegmentCollectionLabel", edm::InputTag("me0Segments"));
134 }
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
static void fillPSetDescription(edm::ParameterSetDescription &descriptions)
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< 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