CMS 3D CMS Logo

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 > > 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 58 of file TrackerHitAssociator.h.

Constructor & Destructor Documentation

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

Definition at line 68 of file TrackerHitAssociator.cc.

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

68  :
69  doPixel_( conf.getParameter<bool>("associatePixel") ),
70  doStrip_( conf.getParameter<bool>("associateStrip") ),
71  useOTph2_( conf.existsAs<bool>("usePhase2Tracker") ? conf.getParameter<bool>("usePhase2Tracker") : false),
72  //
73  doTrackAssoc_( conf.getParameter<bool>("associateRecoTracks") ),
74  assocHitbySimTrack_(conf.existsAs<bool>("associateHitbySimTrack") ? conf.getParameter<bool>("associateHitbySimTrack") : false) {
75 
76  if(doStrip_) {
79  }
81  if(!doTrackAssoc_) {
82  std::vector<std::string> trackerContainers(conf.getParameter<std::vector<std::string> >("ROUList"));
83  cfTokens_.reserve(trackerContainers.size());
84  simHitTokens_.reserve(trackerContainers.size());
85  for(auto const& trackerContainer : trackerContainers) {
86  cfTokens_.push_back(iC.consumes<CrossingFrame<PSimHit> >(edm::InputTag("mix", trackerContainer)));
87  simHitTokens_.push_back(iC.consumes<std::vector<PSimHit> >(edm::InputTag("g4SimHits", trackerContainer)));
88  }
89  }
90  }
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 > > ph2OTrToken_
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_, ph2OTrToken_, pixelToken_, edm::DetSetVector< T >::reserve(), simHitTokens_, stripToken_, and useOTph2_.

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

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

Definition at line 64 of file TrackerHitAssociator.h.

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

bool TrackerHitAssociator::Config::doPixel_

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config().

bool TrackerHitAssociator::Config::doStrip_

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config().

bool TrackerHitAssociator::Config::doTrackAssoc_

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config().

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

Definition at line 63 of file TrackerHitAssociator.h.

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

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

Definition at line 63 of file TrackerHitAssociator.h.

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

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

Definition at line 65 of file TrackerHitAssociator.h.

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

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

Definition at line 62 of file TrackerHitAssociator.h.

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

bool TrackerHitAssociator::Config::useOTph2_

Definition at line 61 of file TrackerHitAssociator.h.

Referenced by Config().