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 | Static Public Member Functions | Private Attributes
VectorHitBuilderEDProducer Class Reference
Inheritance diagram for VectorHitBuilderEDProducer:
edm::stream::EDProducer<>

Public Member Functions

const VectorHitBuilderAlgorithmalgo () const
 
void produce (edm::Event &, const edm::EventSetup &) override
 
void run (edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D >> clusters, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersAcc, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersRej, VectorHitCollection &outputAcc, VectorHitCollection &outputRej)
 
 VectorHitBuilderEDProducer (const edm::ParameterSet &)
 
 ~VectorHitBuilderEDProducer () override=default
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::EDGetTokenT
< edmNew::DetSetVector
< Phase2TrackerCluster1D > > 
clusterProducer_
 
unsigned int maxOfflinestubs_
 
std::string offlinestubsTag_
 
const VectorHitBuilderAlgorithmstubsBuilder_
 
edm::ESGetToken
< VectorHitBuilderAlgorithm,
TkPhase2OTCPERecord
stubsBuilderToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 16 of file VectorHitBuilderEDProducer.cc.

Constructor & Destructor Documentation

VectorHitBuilderEDProducer::VectorHitBuilderEDProducer ( const edm::ParameterSet conf)
explicit

Definition at line 37 of file VectorHitBuilderEDProducer.cc.

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

38  : offlinestubsTag_(conf.getParameter<std::string>("offlinestubs")),
39  maxOfflinestubs_(conf.getParameter<int>("maxVectorHits")),
42  consumes<edmNew::DetSetVector<Phase2TrackerCluster1D>>(edm::InputTag(conf.getParameter<std::string>("Clusters")));
43 
44  produces<edmNew::DetSetVector<Phase2TrackerCluster1D>>("accepted");
45  produces<edmNew::DetSetVector<Phase2TrackerCluster1D>>("rejected");
46  produces<VectorHitCollection>("accepted");
47  produces<VectorHitCollection>("rejected");
48 }
edm::ESGetToken< VectorHitBuilderAlgorithm, TkPhase2OTCPERecord > stubsBuilderToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< edmNew::DetSetVector< Phase2TrackerCluster1D > > clusterProducer_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
VectorHitBuilderEDProducer::~VectorHitBuilderEDProducer ( )
overridedefault

Member Function Documentation

const VectorHitBuilderAlgorithm* VectorHitBuilderEDProducer::algo ( ) const
inline

Definition at line 27 of file VectorHitBuilderEDProducer.cc.

References stubsBuilder_.

27 { return stubsBuilder_; }
const VectorHitBuilderAlgorithm * stubsBuilder_
void VectorHitBuilderEDProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 94 of file VectorHitBuilderEDProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

94  {
96  desc.add<std::string>("offlinestubs", "vectorHits");
97  desc.add<int>("maxVectorHits", 999999999);
98  desc.add<edm::ESInputTag>("Algorithm", edm::ESInputTag("", "SiPhase2VectorHitMatcher"));
99  desc.add<edm::ESInputTag>("CPE", edm::ESInputTag("phase2StripCPEESProducer", "Phase2StripCPE"));
100  desc.add<std::vector<double>>("BarrelCut",
101  {
102  0.0,
103  0.05,
104  0.06,
105  0.08,
106  0.09,
107  0.12,
108  0.2,
109  });
110  desc.add<std::string>("Clusters", "siPhase2Clusters");
111  desc.add<int>("maxVectorHitsInAStack", 999);
112  desc.add<std::vector<double>>("EndcapCut",
113  {
114  0.0,
115  0.1,
116  0.1,
117  0.1,
118  0.1,
119  0.1,
120  });
121  descriptions.add("siPhase2VectorHits", desc);
122 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void VectorHitBuilderEDProducer::produce ( edm::Event event,
const edm::EventSetup es 
)
override

Definition at line 50 of file VectorHitBuilderEDProducer.cc.

References clusterProducer_, edm::EventSetup::getData(), LogDebug, eostools::move(), VectorHitBuilderAlgorithmBase::printClusters(), run(), stubsBuilder_, stubsBuilderToken_, and vh.

50  {
51  LogDebug("VectorHitBuilderEDProducer") << "VectorHitBuilderEDProducer::produce() begin";
52 
53  // get input clusters data
54  auto clustersHandle = event.getHandle(clusterProducer_);
55  // create the final output collection
56  auto outputClustersAccepted = std::make_unique<edmNew::DetSetVector<Phase2TrackerCluster1D>>();
57  auto outputClustersRejected = std::make_unique<edmNew::DetSetVector<Phase2TrackerCluster1D>>();
58  std::unique_ptr<VectorHitCollection> outputVHAccepted(new VectorHitCollection());
59  std::unique_ptr<VectorHitCollection> outputVHRejected(new VectorHitCollection());
60 
62 #ifdef EDM_ML_DEBUG
63  // check on the input clusters
64  stubsBuilder_->printClusters(*clustersHandle);
65 #endif //EDM_ML_DEBUG
66 
67  // running the stub building algorithm
68  //ERICA::output should be moved in the different algo classes?
69  run(clustersHandle, *outputClustersAccepted, *outputClustersRejected, *outputVHAccepted, *outputVHRejected);
70 #ifdef EDM_ML_DEBUG
71  unsigned int numberOfVectorHits = 0;
72  for (const auto& dSViter : *outputVHAccepted) {
73  for (const auto& vh : dSViter) {
74  numberOfVectorHits++;
75  LogDebug("VectorHitBuilderEDProducer") << "\t vectorhit in output " << vh;
76  }
77  }
78  LogDebug("VectorHitBuilderEDProducer") << "found\n" << numberOfVectorHits << " .\n";
79 #endif //EDM_ML_DEBUG
80  // write output to file
81  event.put(std::move(outputClustersAccepted), "accepted");
82  event.put(std::move(outputClustersRejected), "rejected");
83  event.put(std::move(outputVHAccepted), "accepted");
84  event.put(std::move(outputVHRejected), "rejected");
85 }
edm::ESGetToken< VectorHitBuilderAlgorithm, TkPhase2OTCPERecord > stubsBuilderToken_
const VectorHitBuilderAlgorithm * stubsBuilder_
bool getData(T &iHolder) const
Definition: EventSetup.h:128
void run(edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D >> clusters, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersAcc, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersRej, VectorHitCollection &outputAcc, VectorHitCollection &outputRej)
def move
Definition: eostools.py:511
ValidHit vh
Definition: classes.h:14
edmNew::DetSetVector< VectorHit > VectorHitCollection
Definition: VectorHit.h:151
edm::EDGetTokenT< edmNew::DetSetVector< Phase2TrackerCluster1D > > clusterProducer_
void printClusters(const edmNew::DetSetVector< Phase2TrackerCluster1D > &clusters) const
#define LogDebug(id)
void VectorHitBuilderEDProducer::run ( edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D >>  clusters,
edmNew::DetSetVector< Phase2TrackerCluster1D > &  clustersAcc,
edmNew::DetSetVector< Phase2TrackerCluster1D > &  clustersRej,
VectorHitCollection outputAcc,
VectorHitCollection outputRej 
)

Definition at line 87 of file VectorHitBuilderEDProducer.cc.

References HLT_FULL_cff::clusters, VectorHitBuilderAlgorithm::run(), and stubsBuilder_.

Referenced by produce().

91  {
92  stubsBuilder_->run(clusters, outputAcc, outputRej, clustersAcc, clustersRej);
93 }
const VectorHitBuilderAlgorithm * stubsBuilder_
void run(edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D >> clusters, VectorHitCollection &vhAcc, VectorHitCollection &vhRej, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersAcc, edmNew::DetSetVector< Phase2TrackerCluster1D > &clustersRej) const override

Member Data Documentation

edm::EDGetTokenT<edmNew::DetSetVector<Phase2TrackerCluster1D> > VectorHitBuilderEDProducer::clusterProducer_
private

Definition at line 34 of file VectorHitBuilderEDProducer.cc.

Referenced by produce(), and VectorHitBuilderEDProducer().

unsigned int VectorHitBuilderEDProducer::maxOfflinestubs_
private

Definition at line 32 of file VectorHitBuilderEDProducer.cc.

std::string VectorHitBuilderEDProducer::offlinestubsTag_
private

Definition at line 31 of file VectorHitBuilderEDProducer.cc.

const VectorHitBuilderAlgorithm* VectorHitBuilderEDProducer::stubsBuilder_
private

Definition at line 30 of file VectorHitBuilderEDProducer.cc.

Referenced by algo(), produce(), and run().

edm::ESGetToken<VectorHitBuilderAlgorithm, TkPhase2OTCPERecord> VectorHitBuilderEDProducer::stubsBuilderToken_
private

Definition at line 33 of file VectorHitBuilderEDProducer.cc.

Referenced by produce().