CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 55 of file TrackerHitAssociator.h.

Constructor & Destructor Documentation

TrackerHitAssociator::Config::Config ( )
inline

Definition at line 56 of file TrackerHitAssociator.h.

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

Definition at line 70 of file TrackerHitAssociator.cc.

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

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 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
std::vector< edm::EDGetTokenT< CrossingFrame< PSimHit > > > cfTokens_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > ph2OTrToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripToken_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TrackerHitAssociator::Config::Config ( edm::ConsumesCollector &&  iC)

Definition at line 29 of file TrackerHitAssociator.cc.

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

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 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< edm::EDGetTokenT< CrossingFrame< PSimHit > > > cfTokens_
void reserve(size_t s)
Definition: DetSetVector.h:147
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > ph2OTrToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripToken_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_

Member Data Documentation

bool TrackerHitAssociator::Config::assocHitbySimTrack_

Definition at line 59 of file TrackerHitAssociator.h.

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

Definition at line 62 of file TrackerHitAssociator.h.

Referenced by Config(), and TrackerHitAssociator::makeMaps().

bool TrackerHitAssociator::Config::doPixel_

Definition at line 59 of file TrackerHitAssociator.h.

Referenced by Config().

bool TrackerHitAssociator::Config::doStrip_

Definition at line 59 of file TrackerHitAssociator.h.

Referenced by Config().

bool TrackerHitAssociator::Config::doTrackAssoc_

Definition at line 59 of file TrackerHitAssociator.h.

Referenced by Config().

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

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config(), and TrackerHitAssociator::TrackerHitAssociator().

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

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config(), and TrackerHitAssociator::TrackerHitAssociator().

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

Definition at line 63 of file TrackerHitAssociator.h.

Referenced by Config(), and TrackerHitAssociator::makeMaps().

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

Definition at line 60 of file TrackerHitAssociator.h.

Referenced by Config(), and TrackerHitAssociator::TrackerHitAssociator().

bool TrackerHitAssociator::Config::useOTph2_

Definition at line 59 of file TrackerHitAssociator.h.

Referenced by Config().