|
void | analyze (const edm::Event &, const edm::EventSetup &) override |
|
void | beginJob () override |
|
void | endJob () override |
|
| TkAlCaSkimTreeMerger (const edm::ParameterSet &iConfig) |
|
| ~TkAlCaSkimTreeMerger () 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 const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
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 const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
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 |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
void | resetItemsToGetFrom (BranchType iType) |
|
Definition at line 22 of file TkAlCaSkimTreeMerger.cc.
void TkAlCaSkimTreeMerger::beginJob |
( |
| ) |
|
|
overridevirtual |
Reimplemented from edm::one::EDAnalyzerBase.
Definition at line 76 of file TkAlCaSkimTreeMerger.cc.
References ch_, filelist_, corrVsCorr::filename, first, firstfilename_, hitmap_, recoMuon::in, LogDebug, myclock, overlapmap_, AlCaHLTBitMon_QueryRunRegistry::string, and treename_.
81 LogDebug(
"TkAlCaSkimTreeMerger") <<
"The chain contains " <<
ch_->GetNtrees() <<
" trees" << std::endl;
88 while (!flist.eof()) {
100 LogDebug(
"TkAlCaSkimTreeMerger") <<
"Now the chain contains " <<
ch_->GetNtrees() <<
" trees (" <<
ch_->GetEntries()
101 <<
" entries)" << std::endl;
103 unsigned int id_ch = 0;
104 uint32_t nhits_ch = 0, noverlaps_ch = 0;
105 ch_->SetBranchAddress(
"DetId", &id_ch);
106 ch_->SetBranchAddress(
"Nhits", &nhits_ch);
107 ch_->SetBranchAddress(
"Noverlaps", &noverlaps_ch);
109 ch_->SetBranchStatus(
"SubDet",
false);
110 ch_->SetBranchStatus(
"Layer",
false);
111 ch_->SetBranchStatus(
"is2D",
false);
112 ch_->SetBranchStatus(
"isStereo",
false);
113 ch_->SetBranchStatus(
"posX",
false);
114 ch_->SetBranchStatus(
"posY",
false);
115 ch_->SetBranchStatus(
"posZ",
false);
116 ch_->SetBranchStatus(
"posR",
false);
117 ch_->SetBranchStatus(
"posEta",
false);
118 ch_->SetBranchStatus(
"posPhi",
false);
120 int totnhits(0), totnoverlaps(0);
123 DetHitMap::iterator mapiter;
124 DetHitMap::iterator overlapiter;
126 for (
int ent = 0; ent <
ch_->GetEntries(); ++ent) {
129 totnhits += nhits_ch;
130 totnoverlaps += noverlaps_ch;
133 if (mapiter !=
hitmap_.end()) {
136 hitmap_.insert(std::pair<uint32_t, uint32_t>(id_ch, nhits_ch));
143 overlapmap_.insert(std::pair<uint32_t, uint32_t>(id_ch, noverlaps_ch));
148 LogDebug(
"TkAlCaSkimTreeMerger") <<
"Nhits in the chain: " << totnhits << std::endl;
149 LogDebug(
"TkAlCaSkimTreeMerger") <<
"NOverlaps in the chain: " << totnoverlaps << std::endl;
152 LogDebug(
"TkAlCaSkimTreeMerger") <<
"Finished beginJob after " <<
myclock.RealTime() <<
" s (real time) / " 153 <<
myclock.CpuTime() <<
" s (cpu time)" << std::endl;
std::string firstfilename_
void TkAlCaSkimTreeMerger::endJob |
( |
void |
| ) |
|
|
overridevirtual |
Reimplemented from edm::one::EDAnalyzerBase.
Definition at line 163 of file TkAlCaSkimTreeMerger.cc.
References firstfilename_, firsttree_, dqmMemoryStats::float, hitmap_, triggerObjects_cff::id, phase1PixelTopology::layer, LogDebug, maxhits_, maxPXBhits_, maxPXFhits_, maxTEChits_, maxTIBhits_, maxTIDhits_, maxTOBhits_, mod(), myclock, nhits, out_, timingPdfMaker::outfile, outfilename_, overlapmap_, RecoTauValidation_cfi::posX, RecoTauValidation_cfi::posY, and treename_.
Referenced by o2olib.O2ORunMgr::executeJob().
167 LogDebug(
"TkAlCaSkimTreeMerger") <<
"the first tree has " <<
firsttree_->GetEntries() <<
" entries" << std::endl;
169 uint32_t
nhits = 0, noverlaps = 0;
170 float posX(-99999.0),
posY(-77777.0), posZ(-88888.0);
171 float posEta(-6666.0), posPhi(-5555.0), posR(-4444.0);
173 unsigned int layer = 0;
177 firsttree_->SetBranchAddress(
"Noverlaps", &noverlaps);
178 firsttree_->SetBranchAddress(
"SubDet", &subdet);
186 firsttree_->SetBranchAddress(
"posEta", &posEta);
187 firsttree_->SetBranchAddress(
"posPhi", &posPhi);
192 out_ =
new TTree(
treename_.c_str(),
"AlignmentHitMapsTOTAL");
193 unsigned int id_out = 0;
194 uint32_t nhits_out = 0, noverlaps_out = 0;
195 float posX_out(-99999.0), posY_out(-77777.0), posZ_out(-88888.0);
196 float posEta_out(-6666.0), posPhi_out(-5555.0), posR_out(-4444.0);
198 unsigned int layer_out = 0;
199 bool is2D_out =
false, isStereo_out =
false;
200 float prescfact_out = 1.0;
201 float prescfact_overlap_out = 1.0;
203 out_->Branch(
"DetId", &id_out,
"DetId/i");
204 out_->Branch(
"Nhits", &nhits_out,
"Nhits/i");
205 out_->Branch(
"Noverlaps", &noverlaps_out,
"Noverlaps/i");
206 out_->Branch(
"SubDet", &subdet_out,
"SubDet/I");
207 out_->Branch(
"Layer", &layer_out,
"Layer/i");
208 out_->Branch(
"is2D", &is2D_out,
"is2D/B");
209 out_->Branch(
"isStereo", &isStereo_out,
"isStereo/B");
210 out_->Branch(
"posX", &posX_out,
"posX/F");
211 out_->Branch(
"posY", &posY_out,
"posY/F");
212 out_->Branch(
"posZ", &posZ_out,
"posZ/F");
213 out_->Branch(
"posR", &posR_out,
"posR/F");
214 out_->Branch(
"posEta", &posEta_out,
"posEta/F");
215 out_->Branch(
"posPhi", &posPhi_out,
"posPhi/F");
216 out_->Branch(
"PrescaleFactor", &prescfact_out,
"PrescaleFact/F");
217 out_->Branch(
"PrescaleFactorOverlap", &prescfact_overlap_out,
"PrescaleFactOverlap/F");
220 DetHitMap::iterator mapiter;
245 else if (subdet_out == 2)
247 else if (subdet_out == 3)
249 else if (subdet_out == 4)
251 else if (subdet_out == 5)
253 else if (subdet_out == 6)
262 if (
int(noverlaps_out) >
maxhits_) {
265 }
else if (subdetmax > 0) {
266 if (
int(nhits_out) > subdetmax) {
267 prescfact_out =
float(subdetmax / nhits_out);
269 if (
int(noverlaps_out) > subdetmax) {
270 prescfact_overlap_out =
float(subdetmax) /
float(noverlaps_out);
274 prescfact_overlap_out = 1.0;
281 LogDebug(
"TkAlCaSkimTreeMerger") <<
"Finished endJob after " <<
myclock.RealTime() <<
" s (real time) / " 282 <<
myclock.CpuTime() <<
" s (cpu time)" << std::endl;
283 LogDebug(
"TkAlCaSkimTreeMerger") <<
"Ending the tree merging." << std::endl;
285 LogDebug(
"TkAlCaSkimTreeMerger") <<
"Deleting..." << std::flush;
std::string firstfilename_
constexpr std::array< uint8_t, layerIndexSize > layer
T mod(const T &a, const T &b)