|
|
|
| HGCalTimingAnalyzer (edm::ParameterSet const &) |
|
| ~HGCalTimingAnalyzer () override |
|
| EDAnalyzer ()=default |
|
| EDAnalyzer (const EDAnalyzer &)=delete |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
const EDAnalyzer & | operator= (const EDAnalyzer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () const final |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
bool | wantsStreamLuminosityBlocks () const |
|
bool | wantsStreamRuns () const |
|
| ~EDAnalyzerBase () override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
void | selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDAnalyzerBase | ModuleType |
|
typedef ProductLabels | Labels |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
Definition at line 44 of file HGCalTimingAnalyzer.cc.
◆ HGCalTimingAnalyzer()
Definition at line 78 of file HGCalTimingAnalyzer.cc.
81 tokDDD_(esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
83 usesResource(
"TFileService");
87 groupHits_ = iConfig.getParameter<
bool>(
"GroupHits");
88 timeUnit_ = iConfig.getParameter<
double>(
"TimeUnit");
90 idBeams_ = iConfig.getParameter<std::vector<int>>(
"IDBeams");
91 doTree_ = iConfig.getUntrackedParameter<
bool>(
"DoTree",
false);
105 tok_hepMC_ = consumes<edm::HepMCProduct>(tmp0);
107 std::cout <<
"HGCalTimingAnalyzer:: GeneratorSource = " << tmp0 << std::endl;
114 std::cout <<
"HGCalTimingAnalyzer:: Detector " <<
detectorEE_ <<
" with tags " << tmp1 << std::endl;
116 tmp1 = iConfig.getParameter<
std::string>(
"CaloHitSrcBeam");
References gather_cfg::cout, detectorBeam_, detectorEE_, doTree_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), groupHits_, triggerObjects_cff::id, idBeams_, AlCaHLTBitMon_QueryRunRegistry::string, timeUnit_, tok_hepMC_, tok_hitsBeam_, tok_hitsEE_, tok_simTk_, and tok_simVtx_.
◆ ~HGCalTimingAnalyzer()
HGCalTimingAnalyzer::~HGCalTimingAnalyzer |
( |
| ) |
|
|
override |
◆ analyze()
Implements edm::one::EDAnalyzerBase.
Definition at line 166 of file HGCalTimingAnalyzer.cc.
176 for (HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
p != myGenEvent->particles_end();
178 std::cout <<
"Particle[" <<
k <<
"] with p " << (*p)->momentum().rho() <<
" theta " << (*p)->momentum().theta()
179 <<
" phi " << (*p)->momentum().phi() << std::endl;
199 std::vector<PCaloHit> caloHits;
201 if (theCaloHitContainers.
isValid()) {
203 std::cout <<
"PcalohitContainer for " <<
detectorEE_ <<
" has " << theCaloHitContainers->size() <<
" hits"
207 caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
216 if (theCaloHitContainers.
isValid()) {
218 std::cout <<
"PcalohitContainer for " <<
detectorBeam_ <<
" has " << theCaloHitContainers->size() <<
" hits"
222 caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
References analyzeSimHits(), analyzeSimTracks(), edm::HandleBase::clear(), gather_cfg::cout, detectorBeam_, detectorEE_, doTree_, edm::HepMCProduct::GetEvent(), iEvent, edm::HandleBase::isValid(), dqmdumpme::k, AlCaHLTBitMon_ParallelJobs::p, simHitCellEnBeam_, simHitCellEnEE_, simHitCellIdBeam_, simHitCellIdEE_, simHitCellTmBeam_, simHitCellTmEE_, tok_hepMC_, tok_hitsBeam_, tok_hitsEE_, tok_simTk_, tok_simVtx_, and tree_.
◆ analyzeSimHits()
void HGCalTimingAnalyzer::analyzeSimHits |
( |
int |
type, |
|
|
std::vector< PCaloHit > const & |
hits |
|
) |
| |
|
private |
Definition at line 233 of file HGCalTimingAnalyzer.cc.
237 std::map<std::pair<uint32_t, uint64_t>, std::pair<double, double>> map_hits;
241 uint32_t
id =
hit.
id();
243 int subdet,
zside,
layer, sector, subsector, cell;
249 std::cout <<
"SimHit:Hit[" <<
i <<
"] Id " << subdet <<
":" <<
zside <<
":" <<
layer <<
":" << sector <<
":"
250 << subsector <<
":" << recoLayerCell.first <<
":" << recoLayerCell.second <<
" Energy " <<
energy
251 <<
" Time " <<
time << std::endl;
257 std::cout <<
"SimHit:Hit[" <<
i <<
"] Beam Subdet " << subdet <<
" Layer " <<
layer <<
" x|y " <<
x <<
":" <<
y
258 <<
" Energy " <<
energy <<
" Time " <<
time << std::endl;
262 std::pair<uint32_t, uint64_t>
key(
id, tid);
263 auto itr = map_hits.find(
key);
264 if (itr == map_hits.end()) {
265 map_hits[
key] = std::pair<double, double>(
time, 0.0);
266 itr = map_hits.find(
key);
269 map_hits[
key] = std::pair<double, double>((itr->second).first,
energy);
276 std::cout <<
"analyzeSimHits: Finds " << map_hits.size() <<
" hits "
277 <<
" from the Hit Vector of size " <<
hits.size() <<
" for type " <<
type << std::endl;
279 for (
const auto& itr : map_hits) {
280 uint32_t
id = (itr.first).
first;
References gather_cfg::cout, TauDecayModes::dec, HCALHighEnergyHPDFilter_cfi::energy, first, hgcons_, hfClusterShapes_cfi::hits, mps_fire::i, hit::id, crabWrapper::key, phase1PixelTopology::layer, DetId::rawId(), edm::second(), simHitCellEnBeam_, simHitCellEnEE_, simHitCellIdBeam_, simHitCellIdEE_, simHitCellTmBeam_, simHitCellTmEE_, HGCalDDDConstants::simToReco(), protons_cff::time, timeUnit_, HGCalTestNumbering::unpackHexagonIndex(), HcalTestBeamNumbering::unpackIndex(), x, y, and ecaldqm::zside().
Referenced by analyze().
◆ analyzeSimTracks()
Definition at line 298 of file HGCalTimingAnalyzer.cc.
302 for (edm::SimTrackContainer::const_iterator simTrkItr = SimTk->begin(); simTrkItr != SimTk->end(); simTrkItr++) {
304 std::cout <<
"Track " << simTrkItr->trackId() <<
" Vertex " << simTrkItr->vertIndex() <<
" Type "
305 << simTrkItr->type() <<
" Charge " << simTrkItr->charge() <<
" momentum " << simTrkItr->momentum() <<
" "
306 << simTrkItr->momentum().P() << std::endl;
308 if (vertIndex == -1) {
309 vertIndex = simTrkItr->vertIndex();
310 pBeam_ = simTrkItr->momentum().P();
313 if (vertIndex != -1 && vertIndex < (
int)SimVtx->size()) {
314 edm::SimVertexContainer::const_iterator simVtxItr = SimVtx->begin();
315 for (
int iv = 0;
iv < vertIndex;
iv++)
318 std::cout <<
"Vertex " << vertIndex <<
" position " << simVtxItr->position() << std::endl;
320 xBeam_ = simVtxItr->position().X();
321 yBeam_ = simVtxItr->position().Y();
322 zBeam_ = simVtxItr->position().Z();
References gather_cfg::cout, gpuVertexFinder::iv, pBeam_, xBeam_, yBeam_, and zBeam_.
Referenced by analyze().
◆ beginJob()
void HGCalTimingAnalyzer::beginJob |
( |
void |
| ) |
|
|
overrideprivatevirtual |
Reimplemented from edm::one::EDAnalyzerBase.
Definition at line 140 of file HGCalTimingAnalyzer.cc.
References detectorEE_, doTree_, fs_, TFileService::make(), pBeam_, simHitCellEnBeam_, simHitCellEnEE_, simHitCellIdBeam_, simHitCellIdEE_, simHitCellTmBeam_, simHitCellTmEE_, AlCaHLTBitMon_QueryRunRegistry::string, tree_, xBeam_, yBeam_, and zBeam_.
◆ beginRun()
◆ endRun()
◆ fillDescriptions()
Definition at line 125 of file HGCalTimingAnalyzer.cc.
129 desc.add<
bool>(
"GroupHits",
false);
130 desc.add<
double>(
"TimeUnit", 0.001);
131 std::vector<int> ids = {1001, 1002, 1003, 1004, 1005};
132 desc.add<std::vector<int>>(
"IDBeams", ids);
133 desc.addUntracked<
bool>(
"DoTree",
true);
137 descriptions.
add(
"HGCalTimingAnalyzer",
desc);
References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.
◆ detectorBeam_
const std::string HGCalTimingAnalyzer::detectorBeam_ |
|
private |
◆ detectorEE_
const std::string HGCalTimingAnalyzer::detectorEE_ |
|
private |
◆ doTree_
bool HGCalTimingAnalyzer::doTree_ |
|
private |
◆ fs_
◆ groupHits_
bool HGCalTimingAnalyzer::groupHits_ |
|
private |
◆ hgcons_
◆ idBeams_
std::vector<int> HGCalTimingAnalyzer::idBeams_ |
|
private |
◆ pBeam_
double HGCalTimingAnalyzer::pBeam_ |
|
private |
◆ simHitCellEnBeam_
std::vector<float> HGCalTimingAnalyzer::simHitCellEnBeam_ |
|
private |
◆ simHitCellEnEE_
std::vector<float> HGCalTimingAnalyzer::simHitCellEnEE_ |
|
private |
◆ simHitCellIdBeam_
std::vector<uint32_t> HGCalTimingAnalyzer::simHitCellIdBeam_ |
|
private |
◆ simHitCellIdEE_
std::vector<uint32_t> HGCalTimingAnalyzer::simHitCellIdEE_ |
|
private |
◆ simHitCellTmBeam_
std::vector<float> HGCalTimingAnalyzer::simHitCellTmBeam_ |
|
private |
◆ simHitCellTmEE_
std::vector<float> HGCalTimingAnalyzer::simHitCellTmEE_ |
|
private |
◆ timeUnit_
double HGCalTimingAnalyzer::timeUnit_ |
|
private |
◆ tok_hepMC_
◆ tok_hitsBeam_
◆ tok_hitsEE_
◆ tok_simTk_
◆ tok_simVtx_
◆ tokDDD_
◆ tree_
TTree* HGCalTimingAnalyzer::tree_ |
|
private |
◆ xBeam_
double HGCalTimingAnalyzer::xBeam_ |
|
private |
◆ yBeam_
double HGCalTimingAnalyzer::yBeam_ |
|
private |
◆ zBeam_
double HGCalTimingAnalyzer::zBeam_ |
|
private |
const std::string detectorBeam_
std::vector< int > idBeams_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
std::vector< uint32_t > simHitCellIdBeam_
std::vector< uint32_t > simHitCellIdEE_
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
U second(std::pair< T, U > const &p)
std::vector< float > simHitCellTmBeam_
void analyzeSimTracks(edm::Handle< edm::SimTrackContainer > const &SimTk, edm::Handle< edm::SimVertexContainer > const &SimVtx)
Log< level::Warning, false > LogWarning
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBeam_
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::Service< TFileService > fs_
void analyzeSimHits(int type, std::vector< PCaloHit > const &hits)
const std::string detectorEE_
constexpr std::array< uint8_t, layerIndexSize > layer
static void unpackIndex(const uint32_t &idx, int &det, int &lay, int &x, int &y)
unsigned int layers(bool reco) const
const HGCalDDDConstants * hgcons_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDD_
const HepMC::GenEvent * GetEvent() const
T * make(const Args &...args) const
make new ROOT object
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
constexpr uint32_t rawId() const
get the raw id
unsigned long long uint64_t
std::vector< float > simHitCellEnBeam_
std::vector< float > simHitCellTmEE_
std::vector< float > simHitCellEnEE_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_