CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::DataMixingGeneralTrackWorker Class Reference

#include <DataMixingGeneralTrackWorker.h>

Public Member Functions

void addGeneralTrackPileups (const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
 
void addGeneralTrackSignals (const edm::Event &e)
 
 DataMixingGeneralTrackWorker ()
 
 DataMixingGeneralTrackWorker (const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
 
void putGeneralTrack (edm::Event &e)
 
virtual ~DataMixingGeneralTrackWorker ()
 

Private Attributes

std::string GeneralTrackCollectionDM_
 
edm::InputTag GeneralTrackcollectionSig_
 
edm::InputTag GeneralTrackLabelSig_
 
edm::InputTag GeneralTrackPileInputTag_
 
edm::EDGetTokenT< reco::TrackCollectionGTrackPileToken_
 
edm::EDGetTokenT< reco::TrackCollectionGTrackSigToken_
 
std::unique_ptr< reco::TrackCollectionNewTrackList_
 

Detailed Description

Definition at line 36 of file DataMixingGeneralTrackWorker.h.

Constructor & Destructor Documentation

◆ DataMixingGeneralTrackWorker() [1/2]

DataMixingGeneralTrackWorker::DataMixingGeneralTrackWorker ( )

Definition at line 22 of file DataMixingGeneralTrackWorker.cc.

22 {}

◆ DataMixingGeneralTrackWorker() [2/2]

DataMixingGeneralTrackWorker::DataMixingGeneralTrackWorker ( const edm::ParameterSet ps,
edm::ConsumesCollector &&  iC 
)
explicit

standard constructor

Definition at line 25 of file DataMixingGeneralTrackWorker.cc.

25  {
26  // get the subdetector names
27  // this->getSubdetectorNames(); //something like this may be useful to
28  // check what we are supposed to do...
29 
30  // declare the products to produce
31 
32  GeneralTrackLabelSig_ = ps.getParameter<edm::InputTag>("GeneralTrackLabelSig");
33 
34  GeneralTrackPileInputTag_ = ps.getParameter<edm::InputTag>("GeneralTrackPileInputTag");
35 
36  GeneralTrackCollectionDM_ = ps.getParameter<std::string>("GeneralTrackDigiCollectionDM");
37 
40  }

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~DataMixingGeneralTrackWorker()

DataMixingGeneralTrackWorker::~DataMixingGeneralTrackWorker ( )
virtual

Default destructor

Definition at line 43 of file DataMixingGeneralTrackWorker.cc.

43 {}

Member Function Documentation

◆ addGeneralTrackPileups()

void DataMixingGeneralTrackWorker::addGeneralTrackPileups ( const int  bcr,
const edm::EventPrincipal ep,
unsigned int  EventId,
ModuleCallingContext const *  mcc 
)

Definition at line 66 of file DataMixingGeneralTrackWorker.cc.

69  {
70  LogDebug("DataMixingGeneralTrackWorker")
71  << "\n===============> adding pileups from event " << ep->id() << " for bunchcrossing " << bcr;
72 
73  std::shared_ptr<Wrapper<reco::TrackCollection> const> inputPTR =
74  getProductByTag<reco::TrackCollection>(*ep, GeneralTrackPileInputTag_, mcc);
75 
76  if (inputPTR) {
77  const reco::TrackCollection *tracks = const_cast<reco::TrackCollection *>(inputPTR->product());
78 
79  // grab tracks, store copy
80 
81  for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
82  NewTrackList_->push_back(*track);
83  }
84  }
85  }

References SiStripBadComponentsDQMServiceTemplate_cfg::ep, LogDebug, HLT_FULL_cff::track, and tracks.

◆ addGeneralTrackSignals()

void DataMixingGeneralTrackWorker::addGeneralTrackSignals ( const edm::Event e)

Definition at line 45 of file DataMixingGeneralTrackWorker.cc.

45  {
46  // Create new track list; Rely on the fact that addSignals gets called
47  // first...
48 
49  NewTrackList_ = std::make_unique<reco::TrackCollection>();
50 
51  // grab tracks, store copy
52 
53  // edm::Handle<reco::TrackCollection> generalTrkHandle;
54  // e.getByLabel("generalTracks", generalTrkHandle);
56  e.getByToken(GTrackSigToken_, tracks);
57 
58  if (tracks.isValid()) {
59  for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) {
60  NewTrackList_->push_back(*track);
61  }
62  }
63 
64  } // end of addGeneralTrackSignals

References MillePedeFileConverter_cfg::e, HLT_FULL_cff::track, and tracks.

◆ putGeneralTrack()

void DataMixingGeneralTrackWorker::putGeneralTrack ( edm::Event e)

Definition at line 87 of file DataMixingGeneralTrackWorker.cc.

87  {
88  // collection of Tracks to put in the event
89 
90  // put the collection of digis in the event
91  LogInfo("DataMixingGeneralTrackWorker") << "total # Merged Tracks: " << NewTrackList_->size();
92 
93  // put collection
94 
96 
97  // clear local storage for this event
98  // NewTrackList_.clear();
99  }

References MillePedeFileConverter_cfg::e, and eostools::move().

Member Data Documentation

◆ GeneralTrackCollectionDM_

std::string edm::DataMixingGeneralTrackWorker::GeneralTrackCollectionDM_
private

Definition at line 61 of file DataMixingGeneralTrackWorker.h.

◆ GeneralTrackcollectionSig_

edm::InputTag edm::DataMixingGeneralTrackWorker::GeneralTrackcollectionSig_
private

Definition at line 56 of file DataMixingGeneralTrackWorker.h.

◆ GeneralTrackLabelSig_

edm::InputTag edm::DataMixingGeneralTrackWorker::GeneralTrackLabelSig_
private

Definition at line 58 of file DataMixingGeneralTrackWorker.h.

◆ GeneralTrackPileInputTag_

edm::InputTag edm::DataMixingGeneralTrackWorker::GeneralTrackPileInputTag_
private

Definition at line 60 of file DataMixingGeneralTrackWorker.h.

◆ GTrackPileToken_

edm::EDGetTokenT<reco::TrackCollection> edm::DataMixingGeneralTrackWorker::GTrackPileToken_
private

Definition at line 65 of file DataMixingGeneralTrackWorker.h.

◆ GTrackSigToken_

edm::EDGetTokenT<reco::TrackCollection> edm::DataMixingGeneralTrackWorker::GTrackSigToken_
private

Definition at line 64 of file DataMixingGeneralTrackWorker.h.

◆ NewTrackList_

std::unique_ptr<reco::TrackCollection> edm::DataMixingGeneralTrackWorker::NewTrackList_
private

Definition at line 69 of file DataMixingGeneralTrackWorker.h.

edm::DataMixingGeneralTrackWorker::NewTrackList_
std::unique_ptr< reco::TrackCollection > NewTrackList_
Definition: DataMixingGeneralTrackWorker.h:69
edm::DataMixingGeneralTrackWorker::GeneralTrackCollectionDM_
std::string GeneralTrackCollectionDM_
Definition: DataMixingGeneralTrackWorker.h:61
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
edm::DataMixingGeneralTrackWorker::GTrackSigToken_
edm::EDGetTokenT< reco::TrackCollection > GTrackSigToken_
Definition: DataMixingGeneralTrackWorker.h:64
edm::DataMixingGeneralTrackWorker::GeneralTrackLabelSig_
edm::InputTag GeneralTrackLabelSig_
Definition: DataMixingGeneralTrackWorker.h:58
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle< reco::TrackCollection >
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
edm::DataMixingGeneralTrackWorker::GTrackPileToken_
edm::EDGetTokenT< reco::TrackCollection > GTrackPileToken_
Definition: DataMixingGeneralTrackWorker.h:65
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::DataMixingGeneralTrackWorker::GeneralTrackPileInputTag_
edm::InputTag GeneralTrackPileInputTag_
Definition: DataMixingGeneralTrackWorker.h:60
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37