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

Constructor & Destructor Documentation

TrackerHitAssociator::Config::Config ( )
inline

Definition at line 59 of file TrackerHitAssociator.h.

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

Definition at line 71 of file TrackerHitAssociator.cc.

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

71  :
72  doPixel_( conf.getParameter<bool>("associatePixel") ),
73  doStrip_( conf.getParameter<bool>("associateStrip") ),
74  useOTph2_( conf.existsAs<bool>("usePhase2Tracker") ? conf.getParameter<bool>("usePhase2Tracker") : false),
75  //
76  doTrackAssoc_( conf.getParameter<bool>("associateRecoTracks") ),
77  assocHitbySimTrack_(conf.existsAs<bool>("associateHitbySimTrack") ? conf.getParameter<bool>("associateHitbySimTrack") : false) {
78 
79  if(doStrip_) {
82  }
84  if(!doTrackAssoc_) {
85  std::vector<std::string> trackerContainers(conf.getParameter<std::vector<std::string> >("ROUList"));
86  cfTokens_.reserve(trackerContainers.size());
87  simHitTokens_.reserve(trackerContainers.size());
88  for(auto const& trackerContainer : trackerContainers) {
89  cfTokens_.push_back(iC.consumes<CrossingFrame<PSimHit> >(edm::InputTag("mix", trackerContainer)));
90  simHitTokens_.push_back(iC.consumes<std::vector<PSimHit> >(edm::InputTag("g4SimHits", trackerContainer)));
91  }
92  }
93  }
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 29 of file TrackerHitAssociator.cc.

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

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

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

Definition at line 65 of file TrackerHitAssociator.h.

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

bool TrackerHitAssociator::Config::doPixel_

Definition at line 62 of file TrackerHitAssociator.h.

Referenced by Config().

bool TrackerHitAssociator::Config::doStrip_

Definition at line 62 of file TrackerHitAssociator.h.

Referenced by Config().

bool TrackerHitAssociator::Config::doTrackAssoc_

Definition at line 62 of file TrackerHitAssociator.h.

Referenced by Config().

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

Definition at line 64 of file TrackerHitAssociator.h.

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

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

Definition at line 64 of file TrackerHitAssociator.h.

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

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

Definition at line 66 of file TrackerHitAssociator.h.

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

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

Definition at line 63 of file TrackerHitAssociator.h.

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

bool TrackerHitAssociator::Config::useOTph2_

Definition at line 62 of file TrackerHitAssociator.h.

Referenced by Config().