test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
TrackerHitAssociator::Config Struct Reference

#include <TrackerHitAssociator.h>

Public Member Functions

 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 > > 
pixelToken_
 
std::vector< edm::EDGetTokenT
< std::vector< PSimHit > > > 
simHitTokens_
 
edm::EDGetTokenT
< edm::DetSetVector
< StripDigiSimLink > > 
stripToken_
 

Detailed Description

Definition at line 57 of file TrackerHitAssociator.h.

Constructor & Destructor Documentation

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

Definition at line 61 of file TrackerHitAssociator.cc.

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

61  :
62  doPixel_( conf.getParameter<bool>("associatePixel") ),
63  doStrip_( conf.getParameter<bool>("associateStrip") ),
64  doTrackAssoc_( conf.getParameter<bool>("associateRecoTracks") ),
65  assocHitbySimTrack_(conf.existsAs<bool>("associateHitbySimTrack") ? conf.getParameter<bool>("associateHitbySimTrack") : false) {
66 
69  if(!doTrackAssoc_) {
70  std::vector<std::string> trackerContainers(conf.getParameter<std::vector<std::string> >("ROUList"));
71  cfTokens_.reserve(trackerContainers.size());
72  simHitTokens_.reserve(trackerContainers.size());
73  for(auto const& trackerContainer : trackerContainers) {
74  cfTokens_.push_back(iC.consumes<CrossingFrame<PSimHit> >(edm::InputTag("mix", trackerContainer)));
75  simHitTokens_.push_back(iC.consumes<std::vector<PSimHit> >(edm::InputTag("g4SimHits", trackerContainer)));
76  }
77  }
78  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
std::vector< edm::EDGetTokenT< CrossingFrame< PSimHit > > > cfTokens_
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > pixelToken_
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > stripToken_
std::vector< edm::EDGetTokenT< std::vector< PSimHit > > > simHitTokens_
TrackerHitAssociator::Config::Config ( edm::ConsumesCollector &&  iC)

Definition at line 26 of file TrackerHitAssociator.cc.

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

26  :
27  doPixel_(true),
28  doStrip_(true),
29  doTrackAssoc_(false),
30  assocHitbySimTrack_(false) {
31 
34  if(!doTrackAssoc_) {
35  std::vector<std::string> trackerContainers;
36  trackerContainers.reserve(12);
37  trackerContainers.emplace_back("g4SimHitsTrackerHitsTIBLowTof");
38  trackerContainers.emplace_back("g4SimHitsTrackerHitsTIBHighTof");
39  trackerContainers.emplace_back("g4SimHitsTrackerHitsTIDLowTof");
40  trackerContainers.emplace_back("g4SimHitsTrackerHitsTIDHighTof");
41  trackerContainers.emplace_back("g4SimHitsTrackerHitsTOBLowTof");
42  trackerContainers.emplace_back("g4SimHitsTrackerHitsTOBHighTof");
43  trackerContainers.emplace_back("g4SimHitsTrackerHitsTECLowTof");
44  trackerContainers.emplace_back("g4SimHitsTrackerHitsTECHighTof");
45  trackerContainers.emplace_back("g4SimHitsTrackerHitsPixelBarrelLowTof");
46  trackerContainers.emplace_back("g4SimHitsTrackerHitsPixelBarrelHighTof");
47  trackerContainers.emplace_back("g4SimHitsTrackerHitsPixelEndcapLowTof");
48  trackerContainers.emplace_back("g4SimHitsTrackerHitsPixelEndcapHighTof");
49  cfTokens_.reserve(trackerContainers.size());
50  simHitTokens_.reserve(trackerContainers.size());
51  for(auto const& trackerContainer : trackerContainers) {
52  cfTokens_.push_back(iC.consumes<CrossingFrame<PSimHit> >(edm::InputTag("mix", trackerContainer)));
53  simHitTokens_.push_back(iC.consumes<std::vector<PSimHit> >(edm::InputTag("g4SimHits", trackerContainer)));
54  }
55  }
56 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< edm::EDGetTokenT< CrossingFrame< PSimHit > > > cfTokens_
void reserve(size_t s)
Definition: DetSetVector.h:150
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 60 of file TrackerHitAssociator.h.

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

Definition at line 63 of file TrackerHitAssociator.h.

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

bool TrackerHitAssociator::Config::doPixel_

Definition at line 60 of file TrackerHitAssociator.h.

Referenced by Config().

bool TrackerHitAssociator::Config::doStrip_

Definition at line 60 of file TrackerHitAssociator.h.

Referenced by Config().

bool TrackerHitAssociator::Config::doTrackAssoc_

Definition at line 60 of file TrackerHitAssociator.h.

Referenced by Config().

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

Definition at line 62 of file TrackerHitAssociator.h.

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

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

Definition at line 64 of file TrackerHitAssociator.h.

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

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

Definition at line 61 of file TrackerHitAssociator.h.

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