CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
TrackerHitAssociator::Config Struct Reference

#include <TrackerHitAssociator.h>

Public Member Functions

 Config ()
 
 Config (const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
 
 Config (edm::ConsumesCollector &&iC)
 

Public Attributes

bool assocHitbySimTrack_
 
std::vector< edm::EDGetTokenT< CrossingFrame< PSimHit > > > cfTokens_
 
bool doPixel_
 
bool doStrip_
 
bool doTrackAssoc_
 
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > ph2OTrToken_
 
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelToken_
 
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
 
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripToken_
 
bool useOTph2_
 

Detailed Description

Definition at line 57 of file TrackerHitAssociator.h.

Constructor & Destructor Documentation

◆ Config() [1/3]

TrackerHitAssociator::Config::Config ( )
inline

Definition at line 58 of file TrackerHitAssociator.h.

58 {}

◆ Config() [2/3]

TrackerHitAssociator::Config::Config ( const edm::ParameterSet conf,
edm::ConsumesCollector &&  iC 
)

Definition at line 70 of file TrackerHitAssociator.cc.

71  : doPixel_(conf.getParameter<bool>("associatePixel")),
72  doStrip_(conf.getParameter<bool>("associateStrip")),
73  useOTph2_(conf.existsAs<bool>("usePhase2Tracker") ? conf.getParameter<bool>("usePhase2Tracker") : false),
74  //
75  doTrackAssoc_(conf.getParameter<bool>("associateRecoTracks")),
77  conf.existsAs<bool>("associateHitbySimTrack") ? conf.getParameter<bool>("associateHitbySimTrack") : false) {
78  if (doStrip_) {
79  if (useOTph2_)
81  conf.getParameter<edm::InputTag>("phase2TrackerSimLinkSrc"));
82  else
83  stripToken_ =
85  }
86  if (doPixel_)
87  pixelToken_ =
89  if (!doTrackAssoc_) {
90  std::vector<std::string> trackerContainers(conf.getParameter<std::vector<std::string> >("ROUList"));
91  cfTokens_.reserve(trackerContainers.size());
92  simHitTokens_.reserve(trackerContainers.size());
93  for (auto const& trackerContainer : trackerContainers) {
94  cfTokens_.push_back(iC.consumes<CrossingFrame<PSimHit> >(edm::InputTag("mix", trackerContainer)));
95  simHitTokens_.push_back(iC.consumes<std::vector<PSimHit> >(edm::InputTag("g4SimHits", trackerContainer)));
96  }
97  }
98 }

References cfTokens_, doPixel_, doStrip_, doTrackAssoc_, edm::ParameterSet::getParameter(), ph2OTrToken_, pixelToken_, simHitTokens_, stripToken_, and useOTph2_.

◆ Config() [3/3]

TrackerHitAssociator::Config::Config ( edm::ConsumesCollector &&  iC)

Definition at line 29 of file TrackerHitAssociator.cc.

30  : doPixel_(true), doStrip_(true), useOTph2_(false), doTrackAssoc_(false), assocHitbySimTrack_(false) {
31  if (doStrip_) {
32  if (useOTph2_)
33  ph2OTrToken_ = iC.consumes<edm::DetSetVector<PixelDigiSimLink> >(edm::InputTag("simSiPixelDigis", "Tracker"));
34  else
36  }
37  if (doPixel_) {
38  if (useOTph2_)
39  pixelToken_ = iC.consumes<edm::DetSetVector<PixelDigiSimLink> >(edm::InputTag("simSiPixelDigis", "Pixel"));
40  else
42  }
43  if (!doTrackAssoc_) {
44  std::vector<std::string> trackerContainers;
45  trackerContainers.reserve(12);
46  trackerContainers.emplace_back("g4SimHitsTrackerHitsTIBLowTof");
47  trackerContainers.emplace_back("g4SimHitsTrackerHitsTIBHighTof");
48  trackerContainers.emplace_back("g4SimHitsTrackerHitsTIDLowTof");
49  trackerContainers.emplace_back("g4SimHitsTrackerHitsTIDHighTof");
50  trackerContainers.emplace_back("g4SimHitsTrackerHitsTOBLowTof");
51  trackerContainers.emplace_back("g4SimHitsTrackerHitsTOBHighTof");
52  trackerContainers.emplace_back("g4SimHitsTrackerHitsTECLowTof");
53  trackerContainers.emplace_back("g4SimHitsTrackerHitsTECHighTof");
54  trackerContainers.emplace_back("g4SimHitsTrackerHitsPixelBarrelLowTof");
55  trackerContainers.emplace_back("g4SimHitsTrackerHitsPixelBarrelHighTof");
56  trackerContainers.emplace_back("g4SimHitsTrackerHitsPixelEndcapLowTof");
57  trackerContainers.emplace_back("g4SimHitsTrackerHitsPixelEndcapHighTof");
58  cfTokens_.reserve(trackerContainers.size());
59  simHitTokens_.reserve(trackerContainers.size());
60  for (auto const& trackerContainer : trackerContainers) {
61  cfTokens_.push_back(iC.consumes<CrossingFrame<PSimHit> >(edm::InputTag("mix", trackerContainer)));
62  simHitTokens_.push_back(iC.consumes<std::vector<PSimHit> >(edm::InputTag("g4SimHits", trackerContainer)));
63  }
64  }
65 }

References cfTokens_, doPixel_, doStrip_, doTrackAssoc_, HLT_FULL_cff::InputTag, ph2OTrToken_, pixelToken_, edm::DetSetVector< T >::reserve(), simHitTokens_, stripToken_, and useOTph2_.

Member Data Documentation

◆ assocHitbySimTrack_

bool TrackerHitAssociator::Config::assocHitbySimTrack_

Definition at line 61 of file TrackerHitAssociator.h.

◆ cfTokens_

std::vector<edm::EDGetTokenT<CrossingFrame<PSimHit> > > TrackerHitAssociator::Config::cfTokens_

Definition at line 64 of file TrackerHitAssociator.h.

Referenced by Config().

◆ doPixel_

bool TrackerHitAssociator::Config::doPixel_

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config().

◆ doStrip_

bool TrackerHitAssociator::Config::doStrip_

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config().

◆ doTrackAssoc_

bool TrackerHitAssociator::Config::doTrackAssoc_

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config().

◆ ph2OTrToken_

edm::EDGetTokenT<edm::DetSetVector<PixelDigiSimLink> > TrackerHitAssociator::Config::ph2OTrToken_

Definition at line 63 of file TrackerHitAssociator.h.

Referenced by Config().

◆ pixelToken_

edm::EDGetTokenT<edm::DetSetVector<PixelDigiSimLink> > TrackerHitAssociator::Config::pixelToken_

Definition at line 63 of file TrackerHitAssociator.h.

Referenced by Config().

◆ simHitTokens_

std::vector<edm::EDGetTokenT<std::vector<PSimHit> > > TrackerHitAssociator::Config::simHitTokens_

Definition at line 65 of file TrackerHitAssociator.h.

Referenced by Config().

◆ stripToken_

edm::EDGetTokenT<edm::DetSetVector<StripDigiSimLink> > TrackerHitAssociator::Config::stripToken_

Definition at line 62 of file TrackerHitAssociator.h.

Referenced by Config().

◆ useOTph2_

bool TrackerHitAssociator::Config::useOTph2_

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config().

TrackerHitAssociator::Config::doStrip_
bool doStrip_
Definition: TrackerHitAssociator.h:61
TrackerHitAssociator::Config::assocHitbySimTrack_
bool assocHitbySimTrack_
Definition: TrackerHitAssociator.h:61
edm::DetSetVector
Definition: DetSetVector.h:61
TrackerHitAssociator::Config::ph2OTrToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > ph2OTrToken_
Definition: TrackerHitAssociator.h:63
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
edm::DetSetVector::reserve
void reserve(size_t s)
Definition: DetSetVector.h:147
TrackerHitAssociator::Config::doTrackAssoc_
bool doTrackAssoc_
Definition: TrackerHitAssociator.h:61
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
CrossingFrame
Definition: CrossingFrame.h:37
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
TrackerHitAssociator::Config::stripToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripToken_
Definition: TrackerHitAssociator.h:62
TrackerHitAssociator::Config::simHitTokens_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
Definition: TrackerHitAssociator.h:65
TrackerHitAssociator::Config::pixelToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelToken_
Definition: TrackerHitAssociator.h:63
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TrackerHitAssociator::Config::doPixel_
bool doPixel_
Definition: TrackerHitAssociator.h:61
TrackerHitAssociator::Config::cfTokens_
std::vector< edm::EDGetTokenT< CrossingFrame< PSimHit > > > cfTokens_
Definition: TrackerHitAssociator.h:64
edm::InputTag
Definition: InputTag.h:15
TrackerHitAssociator::Config::useOTph2_
bool useOTph2_
Definition: TrackerHitAssociator.h:61