|
| AlignmentStats (const edm::ParameterSet &iConfig) |
|
void | analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) override |
|
void | beginJob () override |
|
void | beginRun (edm::Run const &, edm::EventSetup const &) override |
|
void | endJob () override |
|
void | endRun (edm::Run const &iRun, edm::EventSetup const &iSetup) override |
|
| ~AlignmentStats () override=default |
|
| EDAnalyzer ()=default |
|
| EDAnalyzer (const EDAnalyzer &)=delete |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
const EDAnalyzer & | operator= (const EDAnalyzer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const noexcept final |
|
bool | wantsGlobalRuns () const noexcept final |
|
bool | wantsInputProcessBlocks () const noexcept final |
|
bool | wantsProcessBlocks () const noexcept final |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
bool | wantsStreamLuminosityBlocks () const noexcept |
|
bool | wantsStreamRuns () const noexcept |
|
| ~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 |
|
ESResolverIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESResolverIndex > 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 |
|
void | selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProductResolverIndices 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 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 69 of file AlignmentStats.cc.
Implements edm::one::EDAnalyzerBase.
Definition at line 278 of file AlignmentStats.cc.
References Chi2n, className(), SiStripRecHit1D::cluster(), SiStripRecHit2D::cluster(), Eta, event_, Exception, hitmap_, iEvent, AlignmentClusterFlag::isOverlap(), dqmiolumiharvest::j, dqmdumpme::k, mapToken_, MAXTRKS_, Nhits, ntracks, outtree_, overlapmap_, Phi, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, pixelClusterTagInfos_cfi::pixelhit, prescale_, Pt, nano_mu_digi_cff::rawId, run_, DetId::subdetId(), SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, tmpPresc_, SiStripDetId::TOB, gather_cfg::Tracks, and trackToken_.
297 unsigned int trk_cnt = 0;
305 for (
int k = 0;
k < 7;
k++) {
313 for (
const auto &ittrk : *
Tracks) {
314 Eta[trk_cnt] = ittrk.eta();
315 Phi[trk_cnt] = ittrk.phi();
316 Chi2n[trk_cnt] = ittrk.normalizedChi2();
317 P[trk_cnt] = ittrk.p();
318 Pt[trk_cnt] = ittrk.pt();
319 Nhits[trk_cnt][0] = ittrk.numberOfValidHits();
322 edm::LogVerbatim(
"AlignmenStats") <<
"Track #" << trk_cnt + 1 <<
" params: Eta=" <<
Eta[trk_cnt]
323 <<
" Phi=" <<
Phi[trk_cnt] <<
" P=" <<
P[trk_cnt]
324 <<
" Nhits=" <<
Nhits[trk_cnt][0];
328 for (
auto const &
hit : ittrk.recHits()) {
331 DetId detid =
hit->geographicalId();
333 uint32_t
rawId =
hit->geographicalId().rawId();
338 DetHitMap::iterator mapiter;
340 if (mapiter !=
hitmap_.end()) {
353 if (!(hitInPixel || hitInStrip)) {
355 edm::LogError(
"AlignmentStats") <<
"Hit not belonging neither to pixels nor to strips! Skipping it. SubDet= " 362 const std::type_info &
type =
typeid(*hit);
367 if (striphit !=
nullptr) {
369 inval = OverlapMap[stripclust];
373 <<
"ERROR in <AlignmentStats::analyze>: Dynamic cast of Strip RecHit1D failed! TypeId of the RecHit: " 379 if (striphit !=
nullptr) {
381 inval = OverlapMap[stripclust];
385 <<
"ERROR in <AlignmentStats::analyze>: Dynamic cast of Strip RecHit2D failed! TypeId of the RecHit: " 396 inval = OverlapMap[pixclust];
400 <<
"ERROR in <AlignmentStats::analyze>: Dynamic cast of Pixel RecHit failed! TypeId of the RecHit: " 409 DetHitMap::iterator overlapiter;
420 int subdethit =
static_cast<int>(
hit->geographicalId().subdetId());
423 Nhits[trk_cnt][subdethit] =
Nhits[trk_cnt][subdethit] + 1;
Log< level::Info, true > LogVerbatim
static constexpr auto TID
Log< level::Error, false > LogError
ClusterRef cluster() const
const edm::EDGetTokenT< reco::TrackCollection > trackToken_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr auto TOB
const edm::EDGetTokenT< AliClusterValueMap > mapToken_
static const int MAXTRKS_
std::pair< OmniClusterRef, TrackingParticleRef > P
static constexpr auto TIB
ClusterRef cluster() const
static constexpr auto TEC
std::string className(const T &t)
void AlignmentStats::beginJob |
( |
| ) |
|
|
overridevirtual |
Reimplemented from edm::one::EDAnalyzerBase.
Definition at line 162 of file AlignmentStats.cc.
References Chi2n, Eta, event_, hitsfile_, hitstree_, hitsTreeName_, id_, is2D_, isStereo_, layer_, Nhits, nhits_, noverlaps_, ntracks, outtree_, Phi, posEta_, posPhi_, posR_, posX_, posY_, posZ_, prescale_, Pt, run_, statsTreeName_, subdet_, tmpPresc_, and treefile_.
167 outtree_ =
new TTree(
"AlignmentTrackStats",
"Statistics of Tracks used for Alignment");
175 outtree_->Branch(
"P", &
P,
"P[Ntracks]/F");
194 hitstree_ =
new TTree(
"AlignmentHitMap",
"Maps of Hits used for Alignment");
const std::string hitsTreeName_
const std::string statsTreeName_
std::pair< OmniClusterRef, TrackingParticleRef > P
void AlignmentStats::endJob |
( |
| ) |
|
|
overridevirtual |
Reimplemented from edm::one::EDAnalyzerBase.
Definition at line 442 of file AlignmentStats.cc.
References geomInfoList_, hitmap_, hitsfile_, hitstree_, id_, is2D_, isStereo_, layer_, nhits_, noverlaps_, outtree_, overlapmap_, posEta_, posPhi_, posR_, posX_, posY_, posZ_, subdet_, and treefile_.
Referenced by o2olib.O2ORunMgr::executeJob().
444 edm::LogInfo(
"AlignmentStats") <<
"Writing out the TrackStatistics in " << gDirectory->GetPath();
449 edm::LogInfo(
"AlignmentStats") << __PRETTY_FUNCTION__ <<
"Number of DetUnits in the AlignableTracker: " << ndetunits
455 detUnitInfo.printAll();
458 id_ = detUnitInfo.id_;
459 posX_ = detUnitInfo.posX_;
460 posY_ = detUnitInfo.posY_;
461 posZ_ = detUnitInfo.posZ_;
464 posR_ = detUnitInfo.posR_;
466 layer_ = detUnitInfo.layer_;
467 is2D_ = detUnitInfo.is2D_;
476 hitmap_.insert(pair<uint32_t, uint32_t>(
id_, 0));
std::vector< aliStats::GeoInfo > geomInfoList_
Log< level::Info, false > LogInfo
Definition at line 211 of file AlignmentStats.cc.
References esTokenTkGeoER_, esTokenTTopoER_, PV3DBase< T, PVType, FrameType >::eta(), geomInfoList_, edm::EventSetup::getData(), hitsfile_, aliStats::GeoInfo::id_, aliStats::GeoInfo::is2D_, aliStats::GeoInfo::isStereo_, aliStats::GeoInfo::layer_, LogDebug, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, aliStats::GeoInfo::posEta_, aliStats::GeoInfo::posPhi_, aliStats::GeoInfo::posR_, aliStats::GeoInfo::posX_, aliStats::GeoInfo::posY_, aliStats::GeoInfo::posZ_, DetId::rawId(), aliStats::GeoInfo::subdet_, DetId::subdetId(), SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, and trackerTopology_.
215 auto theAliTracker = std::make_unique<AlignableTracker>(trackerGeometry_,
trackerTopology_.get());
218 for (
const auto &detUnit : theAliTracker->deepComponents()) {
220 detUnitInfo.
id_ =
static_cast<uint32_t
>(detUnit->id());
222 detUnitInfo.
subdet_ = detid.subdetId();
225 detUnitInfo.
posX_ = detUnit->globalPosition().x();
226 detUnitInfo.
posY_ = detUnit->globalPosition().y();
227 detUnitInfo.
posZ_ = detUnit->globalPosition().z();
230 detUnitInfo.
posR_ = vec.perp();
231 detUnitInfo.
posPhi_ = vec.phi();
232 detUnitInfo.
posEta_ = vec.eta();
238 detUnitInfo.
is2D_ =
true;
242 detUnitInfo.
is2D_ =
true;
262 <<
"Detector not belonging neither to pixels nor to strips! Skipping it. SubDet= " << detUnitInfo.
subdet_;
265 LogDebug(
"AlignmentStats") <<
"id " << detUnitInfo.
id_ <<
" detid.rawId()" << detid.rawId() <<
" subdet " 274 <<
" Number of DetUnits in the AlignableTracker: " << ndetunits;
static constexpr auto TID
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > esTokenTkGeoER_
std::vector< aliStats::GeoInfo > geomInfoList_
Log< level::Error, false > LogError
static constexpr auto TOB
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > esTokenTTopoER_
Log< level::Info, false > LogInfo
static constexpr auto TIB
std::unique_ptr< TrackerTopology > trackerTopology_
static constexpr auto TEC