CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
DMRChecker Class Reference

#include <Alignment/OfflineValidation/plugins/DMRChecker.cc>

Inheritance diagram for DMRChecker:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

template<typename T , typename... Args>
Tbook (const Args &...args) const
 
 DMRChecker (const edm::ParameterSet &pset)
 
template<class OBJECT_TYPE >
int index (const std::vector< OBJECT_TYPE *> &vec, const std::string &name)
 
 ~DMRChecker () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () 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
 
EDConsumerBaseoperator= (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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void adjustCanvases (TCanvas &canvas, bool isBarrel)
 
void analyze (const edm::Event &event, const edm::EventSetup &setup) override
 
void beginJob () override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) override
 
std::map< unsigned int, TH1D * > bookResidualsHistogram (TFileDirectory dir, unsigned int theNLayers, std::string resType, std::string varType, std::string detType)
 
std::array< TH1D *, 2 > bookSplitDMRHistograms (TFileDirectory dir, std::string subdet, std::string vartype, bool isBarrel)
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void fillByIndex (std::map< unsigned int, TH1D *> &h, unsigned int index, double x)
 
void fillDMRs (const running::estimatorMap &myDetails, TH1D *DMR, TH1D *DRnR, std::array< TH1D *, 2 > DMRSplit, std::unique_ptr< PixelRegions::PixelRegionContainers > regionalDMR)
 
bool isHit2D (const TrackingRecHit &hit)
 
void updateOnlineMomenta (running::estimatorMap &myDetails, uint32_t theID, float the_data, float the_pull)
 

Private Attributes

std::map< unsigned int, TH1D * > barrelLayersPullsX
 
std::map< unsigned int, TH1D * > barrelLayersPullsY
 
std::map< unsigned int, TH1D * > barrelLayersResidualsX
 
std::map< unsigned int, TH1D * > barrelLayersResidualsY
 
edm::InputTag BeamSpotTag_
 
edm::EDGetTokenT< reco::BeamSpotbeamspotToken_
 
std::map< int, std::pair< int, float > > conditionsMap_
 
TH1D * DMRBPixX_
 
std::array< TH1D *, 2 > DMRBPixXSplit_
 
TH1D * DMRBPixY_
 
std::array< TH1D *, 2 > DMRBPixYSplit_
 
TH1D * DMRFPixX_
 
std::array< TH1D *, 2 > DMRFPixXSplit_
 
TH1D * DMRFPixY_
 
std::array< TH1D *, 2 > DMRFPixYSplit_
 
TH1D * DMRTEC_
 
TH1D * DMRTIB_
 
std::array< TH1D *, 2 > DMRTIBSplit_
 
TH1D * DMRTID_
 
TH1D * DMRTOB_
 
std::array< TH1D *, 2 > DMRTOBSplit_
 
TH1D * DRnRBPixX_
 
TH1D * DRnRBPixY_
 
TH1D * DRnRFPixX_
 
TH1D * DRnRFPixY_
 
TH1D * DRnRTEC_
 
TH1D * DRnRTIB_
 
TH1D * DRnRTID_
 
TH1D * DRnRTOB_
 
std::map< unsigned int, TH1D * > endcapDisksPullsX
 
std::map< unsigned int, TH1D * > endcapDisksPullsY
 
std::map< unsigned int, TH1D * > endcapDisksResidualsX
 
std::map< unsigned int, TH1D * > endcapDisksResidualsY
 
float etaMax_
 
TH1D * eventRatesByRun_
 
TH1D * evtsByTrigger_
 
TH1D * fieldByRun_
 
bool firstEvent_
 
edm::Service< TFileServicefs
 
std::unique_ptr< Phase1PixelSummaryMapfullPixelmapXDMR
 
std::unique_ptr< Phase1PixelSummaryMapfullPixelmapYDMR
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomToken_
 
TH1D * hBPixResXPrime
 
TH1D * hBPixResXPull
 
TH1D * hBPixResYPrime
 
TH1D * hBPixResYPull
 
TH1D * hCharge
 
TH1D * hchi2ndof
 
TH1D * hchi2ndofhp
 
TH1D * hchi2Probhp
 
TH1D * hd0
 
TH1D * hd0BS
 
TH1D * hd0PV
 
TH2D * hd0PVvseta
 
TH2D * hd0PVvsphi
 
TH2D * hd0PVvspt
 
TH2D * hd0vseta
 
TH2D * hd0vsphi
 
TH2D * hd0vspt
 
TH1D * hDeltaEta
 
TH1D * hDeltaPhi
 
TH1D * hDeltaR
 
TH1D * hdxy
 
TH1D * hdxyBS
 
TH1D * hdxyPV
 
TH1D * hdz
 
TH1D * hdzBS
 
TH1D * hdzPV
 
TH1D * hEta
 
TH1D * hEtahp
 
TH1D * hEtaMinus
 
TH1D * hEtaPlus
 
TH1D * hFPixResXPrime
 
TH1D * hFPixResXPull
 
TH1D * hFPixResYPrime
 
TH1D * hFPixResYPull
 
TH1D * hFPixZMinusResXPrime
 
TH1D * hFPixZMinusResXPull
 
TH1D * hFPixZMinusResYPrime
 
TH1D * hFPixZMinusResYPull
 
TH1D * hFPixZPlusResXPrime
 
TH1D * hFPixZPlusResXPull
 
TH1D * hFPixZPlusResYPrime
 
TH1D * hFPixZPlusResYPull
 
TH1D * hHit
 
TH1D * hHit2D
 
TH1D * hHitComposition
 
TH1D * hHitCountVsPhiBPix
 
TH1D * hHitCountVsPhiFPix
 
TH1D * hHitCountVsPhiFPixMinus
 
TH1D * hHitCountVsPhiFPixPlus
 
TH1D * hHitCountVsThetaBPix
 
TH1D * hHitCountVsThetaFPix
 
TH1D * hHitCountVsThetaFPixMinus
 
TH1D * hHitCountVsThetaFPixPlus
 
TH1D * hHitCountVsXBPix
 
TH1D * hHitCountVsXFPix
 
TH1D * hHitCountVsXFPixMinus
 
TH1D * hHitCountVsXFPixPlus
 
TH1D * hHitCountVsYBPix
 
TH1D * hHitCountVsYFPix
 
TH1D * hHitCountVsYFPixMinus
 
TH1D * hHitCountVsYFPixPlus
 
TH1D * hHitCountVsZBPix
 
TH1D * hHitCountVsZFPix
 
TH1D * hHitCountVsZFPixMinus
 
TH1D * hHitCountVsZFPixPlus
 
TH1D * hHithp
 
TH1D * hHitMinus
 
TH1D * hHitPlus
 
TH1D * hitsByRun_
 
TH1D * hitsinBPixByRun_
 
TH1D * hitsinFPixByRun_
 
edm::EDGetTokenT< edm::TriggerResultshltresultsToken_
 
TH1D * hlumi
 
TH1D * hMinPt
 
TH1D * hMultCand
 
TH1D * hNhighPurity
 
TH1D * hnhpxb
 
TH1D * hnhpxe
 
TH1D * hnhTEC
 
TH1D * hnhTIB
 
TH1D * hnhTID
 
TH1D * hnhTOB
 
TH1D * hNtrk
 
TH1D * hNtrkZoom
 
TH1D * hP
 
TH1D * hPhi
 
TH1D * hPhiBarrel
 
TH1D * hPhiEndcapMinus
 
TH1D * hPhiEndcapPlus
 
TH1D * hPhihp
 
TH1D * hPhiMinus
 
TH1D * hPhiOverlapMinus
 
TH1D * hPhiOverlapPlus
 
TH1D * hPhiPlus
 
TH1D * hPhp
 
TH1D * hPMinus
 
TH1D * hPPlus
 
TH1D * hPt
 
TH1D * hPthp
 
TH1D * hPtMinus
 
TH1D * hPtPlus
 
TH1D * hQoverP
 
TH1D * hQoverPZoom
 
TH1D * hrun
 
TH1D * hTECResXPrime
 
TH1D * hTECResXPull
 
TH1D * hTIBResXPrime
 
TH1D * hTIBResXPull
 
TH1D * hTIDResXPrime
 
TH1D * hTIDResXPull
 
TH1D * hTOBResXPrime
 
TH1D * hTOBResXPull
 
TH1I * htrkAlgo
 
TH1I * htrkQuality
 
TH1D * hvx
 
TH1D * hvy
 
TH1D * hvz
 
int ievt
 
const bool isCosmics_
 
int itrks
 
const edm::ESGetToken< SiStripLatency, SiStripLatencyRcdlatencyToken_
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagFieldToken_
 
const MagneticFieldmagneticField_
 
int mode
 
TH1D * modeByRun_
 
SiPixelPI::phase phase_
 
std::unique_ptr< PixelRegions::PixelRegionContainersPixelDMRS_x_ByLayer
 
std::unique_ptr< PixelRegions::PixelRegionContainersPixelDMRS_y_ByLayer
 
std::unique_ptr< Phase1PixelMapspixelmap
 
std::unique_ptr< TrackerMappmap
 
TProfile * pNBpixHitsVsVx
 
TProfile * pNBpixHitsVsVy
 
TProfile * pNBpixHitsVsVz
 
running::estimatorMap resDetailsBPixX_
 
running::estimatorMap resDetailsBPixY_
 
running::estimatorMap resDetailsFPixX_
 
running::estimatorMap resDetailsFPixY_
 
running::estimatorMap resDetailsTEC_
 
running::estimatorMap resDetailsTIB_
 
running::estimatorMap resDetailsTID_
 
running::estimatorMap resDetailsTOB_
 
std::map< int, std::array< int, 6 > > runHitsMap_
 
std::map< int, std::pair< int, int > > runInfoMap_
 
const edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
edm::EDGetTokenT< reco::TrackCollectiontheTrackCollectionToken_
 
std::map< int, float > timeMap_
 
TH1D * tksByTrigger_
 
edm::InputTag TkTag_
 
std::unique_ptr< TrackerMaptmap
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtopoToken_
 
const TrackerGeometrytrackerGeometry_
 
const TrackerTopologytrackerTopology_
 
TH1D * trackRatesByRun_
 
TH1D * tracksByRun_
 
std::map< std::string, std::pair< int, int > > triggerMap_
 
edm::InputTag TriggerResultsTag_
 
edm::EDGetTokenT< reco::VertexCollectionvertexToken_
 
edm::InputTag VerticesTag_
 
std::vector< TH1 * > vTrack2DHistos_
 
std::vector< TH1 * > vTrackHistos_
 
std::vector< TH1 * > vTrackProfiles_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (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)
 

Detailed Description

Definition at line 150 of file DMRChecker.cc.

Constructor & Destructor Documentation

◆ DMRChecker()

DMRChecker::DMRChecker ( const edm::ParameterSet pset)
inline

Definition at line 152 of file DMRChecker.cc.

References edm::BeginRun, TFileService::kSharedResource, and muonDTDigis_cfi::pset.

153  : geomToken_(esConsumes<edm::Transition::BeginRun>()),
154  runInfoToken_(esConsumes<edm::Transition::BeginRun>()),
155  magFieldToken_(esConsumes<edm::Transition::BeginRun>()),
156  topoToken_(esConsumes<edm::Transition::BeginRun>()),
157  latencyToken_(esConsumes<edm::Transition::BeginRun>()),
158  isCosmics_(pset.getParameter<bool>("isCosmics")) {
159  usesResource(TFileService::kSharedResource);
160 
161  TkTag_ = pset.getParameter<edm::InputTag>("TkTag");
162  theTrackCollectionToken_ = consumes<reco::TrackCollection>(TkTag_);
163 
164  TriggerResultsTag_ = pset.getParameter<edm::InputTag>("TriggerResultsTag");
165  hltresultsToken_ = consumes<edm::TriggerResults>(TriggerResultsTag_);
166 
167  BeamSpotTag_ = pset.getParameter<edm::InputTag>("BeamSpotTag");
168  beamspotToken_ = consumes<reco::BeamSpot>(BeamSpotTag_);
169 
170  VerticesTag_ = pset.getParameter<edm::InputTag>("VerticesTag");
171  vertexToken_ = consumes<reco::VertexCollection>(VerticesTag_);
172 
173  // initialize conventional Tracker maps
174 
175  pmap = std::make_unique<TrackerMap>("Pixel");
176  pmap->onlyPixel(true);
177  pmap->setTitle("Pixel Hit entries");
178  pmap->setPalette(1);
179 
180  tmap = std::make_unique<TrackerMap>("Strip");
181  tmap->setTitle("Strip Hit entries");
182  tmap->setPalette(1);
183 
184  // initialize Phase1 Pixel Maps
185 
186  pixelmap = std::make_unique<Phase1PixelMaps>("COLZ0 L");
187  pixelmap->bookBarrelHistograms("DMRsX", "Median Residuals x-direction", "Median Residuals");
188  pixelmap->bookForwardHistograms("DMRsX", "Median Residuals x-direction", "Median Residuals");
189 
190  pixelmap->bookBarrelHistograms("DMRsY", "Median Residuals y-direction", "Median Residuals");
191  pixelmap->bookForwardHistograms("DMRsY", "Median Residuals y-direction", "Median Residuals");
192 
193  // set no rescale
194  pixelmap->setNoRescale();
195 
196  // initialize Full Pixel Map
197  fullPixelmapXDMR = std::make_unique<Phase1PixelSummaryMap>("", "DMR-x", "median of residuals [#mum]");
198  fullPixelmapYDMR = std::make_unique<Phase1PixelSummaryMap>("", "DMR-y", "median of residuals [#mum]");
199  }
static const std::string kSharedResource
Definition: TFileService.h:76
std::unique_ptr< Phase1PixelSummaryMap > fullPixelmapXDMR
Definition: DMRChecker.cc:243
edm::InputTag TriggerResultsTag_
Definition: DMRChecker.cc:474
edm::InputTag BeamSpotTag_
Definition: DMRChecker.cc:475
edm::InputTag TkTag_
Definition: DMRChecker.cc:473
std::unique_ptr< Phase1PixelSummaryMap > fullPixelmapYDMR
Definition: DMRChecker.cc:244
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken_
Definition: DMRChecker.cc:478
std::unique_ptr< TrackerMap > pmap
Definition: DMRChecker.cc:250
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: DMRChecker.cc:481
edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
Definition: DMRChecker.cc:480
std::unique_ptr< TrackerMap > tmap
Definition: DMRChecker.cc:249
const edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DMRChecker.cc:231
const edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
Definition: DMRChecker.cc:234
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: DMRChecker.cc:233
std::unique_ptr< Phase1PixelMaps > pixelmap
Definition: DMRChecker.cc:242
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: DMRChecker.cc:232
edm::EDGetTokenT< edm::TriggerResults > hltresultsToken_
Definition: DMRChecker.cc:479
const bool isCosmics_
Definition: DMRChecker.cc:471
edm::InputTag VerticesTag_
Definition: DMRChecker.cc:476
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: DMRChecker.cc:230

◆ ~DMRChecker()

DMRChecker::~DMRChecker ( )
overridedefault

Member Function Documentation

◆ adjustCanvases()

void DMRChecker::adjustCanvases ( TCanvas &  canvas,
bool  isBarrel 
)
inlineprivate

Definition at line 1848 of file DMRChecker.cc.

References SiPixelPI::adjustCanvasMargins(), c, svgfig::canvas(), PixelRegions::IDlabels, PixelPluginsPhase0_cfi::isBarrel, and AlCaHLTBitMon_QueryRunRegistry::string.

1848  {
1849  unsigned int maxPads = isBarrel ? 4 : 12;
1850  for (unsigned int c = 1; c <= maxPads; c++) {
1851  canvas.cd(c);
1852  SiPixelPI::adjustCanvasMargins(canvas.cd(c), 0.06, 0.12, 0.12, 0.05);
1853  }
1854 
1855  auto ltx = TLatex();
1856  ltx.SetTextFont(62);
1857  ltx.SetTextSize(0.05);
1858  ltx.SetTextAlign(11);
1859 
1860  std::string toAppend = canvas.GetTitle();
1861 
1862  for (unsigned int c = 1; c <= maxPads; c++) {
1863  auto index = isBarrel ? c - 1 : c + 3;
1864  canvas.cd(c);
1865  ltx.DrawLatexNDC(gPad->GetLeftMargin(),
1866  1 - gPad->GetTopMargin() + 0.01,
1867  (PixelRegions::IDlabels.at(index) + " " + toAppend).c_str());
1868  }
1869  }
const std::vector< std::string > IDlabels
int index(const std::vector< OBJECT_TYPE *> &vec, const std::string &name)
Definition: DMRChecker.cc:211
void adjustCanvasMargins(TVirtualPad *pad, float top, float bottom, float left, float right)
def canvas(sub, attr)
Definition: svgfig.py:482

◆ analyze()

void DMRChecker::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
inlineoverrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 504 of file DMRChecker.cc.

References funct::abs(), accept(), PV3DBase< T, PVType, FrameType >::barePhi(), pwdgSkimBPark_cfi::beamSpot, cmToUm, reco::TrackBase::confirmed, DEBUG, SiPixelRawToDigiRegional_cfi::deltaPhi, PVValHelper::dxy, PVValHelper::dz, F(), HcalObjRepresent::Fill(), PVValHelper::fillByIndex(), reco::TrackBase::goodIterative, reco::TrackBase::highPurity, HLTBitAnalyser_cfi::hltresults, TrackerGeometry::idToDet(), MagneticField::inInverseGeV(), MagneticField::inTesla(), TrackerGeometry::isThere(), edm::HandleBase::isValid(), TrackingRecHit::isValid(), hgcalLayerClusters_cfi::kappa, reco::TrackBase::loose, SiPixelPI::one, GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, GeomDetEnumerators::P2PXB, GeomDetEnumerators::P2PXEC, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, point, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), DetId::rawId(), DetId::subdetId(), StripSubdetector::TEC, PV3DBase< T, PVType, FrameType >::theta(), StripSubdetector::TIB, StripSubdetector::TID, reco::TrackBase::tight, StripSubdetector::TOB, HLT_2022v14_cff::track, duplicaterechits_cfi::trackCollection, edm::TriggerNames::triggerName(), edm::TriggerNames::triggerNames(), cscTnPEfficiencyTask_cfi::trigName, SiPixelPI::two, reco::TrackBase::undefQuality, PV3DBase< T, PVType, FrameType >::x(), reco::Vertex::x(), PV3DBase< T, PVType, FrameType >::y(), reco::Vertex::y(), PV3DBase< T, PVType, FrameType >::z(), reco::Vertex::z(), and SiPixelPI::zero.

504  {
505  ievt++;
506 
508 
509  if (firstEvent_) {
516  } else {
518  }
519  firstEvent_ = false;
520  }
521 
522  GlobalPoint zeroPoint(0, 0, 0);
523  if (DEBUG)
524  edm::LogVerbatim("DMRChecker") << "event #" << ievt << " Event ID = " << event.id()
525  << " magnetic field: " << magneticField_->inTesla(zeroPoint) << std::endl;
526 
527  const reco::TrackCollection tC = *(trackCollection.product());
528  itrks += tC.size();
529 
530  runInfoMap_[event.run()].first += 1;
531  runInfoMap_[event.run()].second += tC.size();
532 
533  if (DEBUG)
534  edm::LogVerbatim("DMRChecker") << "Reconstructed " << tC.size() << " tracks" << std::endl;
535 
537  if (hltresults.isValid()) {
538  const edm::TriggerNames &triggerNames_ = event.triggerNames(*hltresults);
539  int ntrigs = hltresults->size();
540 
541  for (int itrig = 0; itrig != ntrigs; ++itrig) {
542  const string &trigName = triggerNames_.triggerName(itrig);
543  bool accept = hltresults->accept(itrig);
544  if (accept == 1) {
545  if (DEBUG)
546  edm::LogVerbatim("DMRChecker") << trigName << " " << accept << " ,track size: " << tC.size() << endl;
547  triggerMap_[trigName].first += 1;
548  triggerMap_[trigName].second += tC.size();
549  }
550  }
551  }
552 
553  hrun->Fill(event.run());
554  hlumi->Fill(event.luminosityBlock());
555 
556  int nHighPurityTracks = 0;
557 
558  for (const auto &track : tC) {
559  auto const &residuals = track.extra()->residuals();
560 
561  unsigned int nHit2D = 0;
562  int h_index = 0;
563  for (trackingRecHit_iterator iHit = track.recHitsBegin(); iHit != track.recHitsEnd(); ++iHit, ++h_index) {
564  if (this->isHit2D(**iHit))
565  ++nHit2D;
566 
567  double resX = residuals.residualX(h_index);
568  double resY = residuals.residualY(h_index);
569  double pullX = residuals.pullX(h_index);
570  double pullY = residuals.pullY(h_index);
571 
572  const DetId &detId = (*iHit)->geographicalId();
573 
574  unsigned int subid = detId.subdetId();
575  uint32_t detid_db = detId.rawId();
576 
577  const GeomDet *geomDet(trackerGeometry_->idToDet(detId));
578 
579  float uOrientation(-999.F), vOrientation(-999.F);
580  LocalPoint lPModule(0., 0., 0.), lUDirection(1., 0., 0.), lVDirection(0., 1., 0.), lWDirection(0., 0., 1.);
581 
582  // do all the transformations here
583  GlobalPoint gUDirection = geomDet->surface().toGlobal(lUDirection);
584  GlobalPoint gVDirection = geomDet->surface().toGlobal(lVDirection);
585  GlobalPoint gWDirection = geomDet->surface().toGlobal(lWDirection);
586  GlobalPoint gPModule = geomDet->surface().toGlobal(lPModule);
587 
588  if (!(*iHit)->detUnit())
589  continue; // is it a single physical module?
590 
591  if ((*iHit)->isValid() && (subid > PixelSubdetector::PixelEndcap)) {
592  tmap->fill(detid_db, 1);
593 
594  //LocalPoint lp = (*iHit)->localPosition();
595  //LocalError le = (*iHit)->localPositionError();
596 
597  // fill DMRs and DrNRs
598  if (subid == StripSubdetector::TIB) {
599  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
600  //vOrientation = gVDirection.z() - gPModule.z() >= 0 ? +1.F : -1.F; // not used for Strips
601 
602  // if the detid has never occcurred yet, set the local orientations
603  if (resDetailsTIB_.find(detid_db) == resDetailsTIB_.end()) {
604  resDetailsTIB_[detid_db].rDirection = gWDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
605  resDetailsTIB_[detid_db].zDirection = gVDirection.z() - gPModule.z() >= 0 ? +1 : -1;
606  resDetailsTIB_[detid_db].rOrZDirection = resDetailsTIB_[detid_db].rDirection; // barrel (split in r)
607  }
608 
609  hTIBResXPrime->Fill(uOrientation * resX * cmToUm);
610  hTIBResXPull->Fill(pullX);
611 
612  // update residuals
613  this->updateOnlineMomenta(resDetailsTIB_, detid_db, uOrientation * resX * cmToUm, pullX);
614 
615  } else if (subid == StripSubdetector::TOB) {
616  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
617  //vOrientation = gVDirection.z() - gPModule.z() >= 0 ? +1.F : -1.F; // not used for Strips
618 
619  hTOBResXPrime->Fill(uOrientation * resX * cmToUm);
620  hTOBResXPull->Fill(pullX);
621 
622  // if the detid has never occcurred yet, set the local orientations
623  if (resDetailsTOB_.find(detid_db) == resDetailsTOB_.end()) {
624  resDetailsTOB_[detid_db].rDirection = gWDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
625  resDetailsTOB_[detid_db].zDirection = gVDirection.z() - gPModule.z() >= 0 ? +1 : -1;
626  resDetailsTOB_[detid_db].rOrZDirection = resDetailsTOB_[detid_db].rDirection; // barrel (split in r)
627  }
628 
629  // update residuals
630  this->updateOnlineMomenta(resDetailsTOB_, detid_db, uOrientation * resX * cmToUm, pullX);
631 
632  } else if (subid == StripSubdetector::TID) {
633  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
634  //vOrientation = gVDirection.perp() - gPModule.perp() >= 0. ? +1.F : -1.F; // not used for Strips
635 
636  hTIDResXPrime->Fill(uOrientation * resX * cmToUm);
637  hTIDResXPull->Fill(pullX);
638 
639  // update residuals
640  this->updateOnlineMomenta(resDetailsTID_, detid_db, uOrientation * resX * cmToUm, pullX);
641 
642  } else if (subid == StripSubdetector::TEC) {
643  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
644  //vOrientation = gVDirection.perp() - gPModule.perp() >= 0. ? +1.F : -1.F; // not used for Strips
645 
646  hTECResXPrime->Fill(uOrientation * resX * cmToUm);
647  hTECResXPull->Fill(pullX);
648 
649  // update residuals
650  this->updateOnlineMomenta(resDetailsTEC_, detid_db, uOrientation * resX * cmToUm, pullX);
651  }
652  }
653 
654  const SiPixelRecHit *pixhit = dynamic_cast<const SiPixelRecHit *>(*iHit);
655 
656  if (pixhit) {
657  if (pixhit->isValid()) {
659  pmap->fill(detid_db, 1);
660  }
661 
662  LocalPoint lp = (*iHit)->localPosition();
663  //LocalError le = (*iHit)->localPositionError();
664  GlobalPoint GP = geomDet->surface().toGlobal(lp);
665 
666  if ((subid == PixelSubdetector::PixelBarrel) || (subid == PixelSubdetector::PixelEndcap)) {
667  // 1 = PXB, 2 = PXF
668  if (subid == PixelSubdetector::PixelBarrel) {
669  int layer_num = trackerTopology_->pxbLayer(detid_db);
670 
671  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
672  vOrientation = gVDirection.z() - gPModule.z() >= 0 ? +1.F : -1.F;
673 
674  // if the detid has never occcurred yet, set the local orientations
675  if (resDetailsBPixX_.find(detid_db) == resDetailsBPixX_.end()) {
676  resDetailsBPixX_[detid_db].rDirection = gWDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
677  resDetailsBPixX_[detid_db].zDirection = gVDirection.z() - gPModule.z() >= 0 ? +1 : -1;
678  resDetailsBPixX_[detid_db].rOrZDirection =
679  resDetailsBPixX_[detid_db].rDirection; // barrel (split in r)
680  }
681 
682  // if the detid has never occcurred yet, set the local orientations
683  if (resDetailsBPixY_.find(detid_db) == resDetailsBPixY_.end()) {
684  resDetailsBPixY_[detid_db].rDirection = gWDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
685  resDetailsBPixY_[detid_db].zDirection = gVDirection.z() - gPModule.z() >= 0 ? +1 : -1;
686  resDetailsBPixY_[detid_db].rOrZDirection =
687  resDetailsBPixY_[detid_db].rDirection; // barrel (split in r)
688  }
689 
690  hHitCountVsThetaBPix->Fill(GP.theta());
691  hHitCountVsPhiBPix->Fill(GP.phi());
692 
693  hHitCountVsZBPix->Fill(GP.z());
694  hHitCountVsXBPix->Fill(GP.x());
695  hHitCountVsYBPix->Fill(GP.y());
696 
697  hBPixResXPrime->Fill(uOrientation * resX * cmToUm);
698  hBPixResYPrime->Fill(vOrientation * resY * cmToUm);
699  hBPixResXPull->Fill(pullX);
700  hBPixResYPull->Fill(pullY);
701 
702  if (DEBUG)
703  edm::LogVerbatim("DMRChecker") << "layer: " << layer_num << std::endl;
704 
705  // update residuals X
706  this->updateOnlineMomenta(resDetailsBPixX_, detid_db, uOrientation * resX * cmToUm, pullX);
707 
708  // update residuals Y
709  this->updateOnlineMomenta(resDetailsBPixY_, detid_db, vOrientation * resY * cmToUm, pullY);
710 
711  fillByIndex(barrelLayersResidualsX, layer_num, uOrientation * resX * cmToUm);
712  fillByIndex(barrelLayersPullsX, layer_num, pullX);
713  fillByIndex(barrelLayersResidualsY, layer_num, vOrientation * resY * cmToUm);
714  fillByIndex(barrelLayersPullsY, layer_num, pullY);
715 
716  } else if (subid == PixelSubdetector::PixelEndcap) {
717  uOrientation = gUDirection.perp() - gPModule.perp() >= 0 ? +1.F : -1.F;
718  vOrientation = deltaPhi(gVDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
719 
720  int side_num = trackerTopology_->pxfSide(detid_db);
721  int disk_num = trackerTopology_->pxfDisk(detid_db);
722 
723  int packedTopo = disk_num + 3 * (side_num - 1);
724 
725  if (DEBUG)
726  edm::LogVerbatim("DMRChecker") << "side: " << side_num << " disk: " << disk_num
727  << " packedTopo: " << packedTopo << " GP.z(): " << GP.z() << std::endl;
728 
729  hHitCountVsThetaFPix->Fill(GP.theta());
730  hHitCountVsPhiFPix->Fill(GP.phi());
731 
732  hHitCountVsZFPix->Fill(GP.z());
733  hHitCountVsXFPix->Fill(GP.x());
734  hHitCountVsYFPix->Fill(GP.y());
735 
736  hFPixResXPrime->Fill(uOrientation * resX * cmToUm);
737  hFPixResYPrime->Fill(vOrientation * resY * cmToUm);
738  hFPixResXPull->Fill(pullX);
739  hFPixResYPull->Fill(pullY);
740 
741  fillByIndex(endcapDisksResidualsX, packedTopo, uOrientation * resX * cmToUm);
742  fillByIndex(endcapDisksPullsX, packedTopo, pullX);
743  fillByIndex(endcapDisksResidualsY, packedTopo, vOrientation * resY * cmToUm);
744  fillByIndex(endcapDisksPullsY, packedTopo, pullY);
745 
746  // if the detid has never occcurred yet, set the local orientations
747  if (resDetailsFPixX_.find(detid_db) == resDetailsFPixX_.end()) {
748  resDetailsFPixX_[detid_db].rDirection = gUDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
749  resDetailsFPixX_[detid_db].zDirection = gWDirection.z() - gPModule.z() >= 0 ? +1 : -1;
750  resDetailsFPixX_[detid_db].rOrZDirection =
751  resDetailsFPixX_[detid_db].zDirection; // endcaps (split in z)
752  }
753 
754  // if the detid has never occcurred yet, set the local orientations
755  if (resDetailsFPixY_.find(detid_db) == resDetailsFPixY_.end()) {
756  resDetailsFPixY_[detid_db].rDirection = gUDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
757  resDetailsFPixY_[detid_db].zDirection = gWDirection.z() - gPModule.z() >= 0 ? +1 : -1;
758  resDetailsFPixY_[detid_db].rOrZDirection =
759  resDetailsFPixY_[detid_db].zDirection; // endcaps (split in z)
760  }
761 
762  // update residuals X
763  this->updateOnlineMomenta(resDetailsFPixX_, detid_db, uOrientation * resX * cmToUm, pullX);
764 
765  // update residuals Y
766  this->updateOnlineMomenta(resDetailsFPixY_, detid_db, vOrientation * resY * cmToUm, pullY);
767 
768  if (side_num == 1) {
769  hHitCountVsXFPixMinus->Fill(GP.x());
770  hHitCountVsYFPixMinus->Fill(GP.y());
771  hHitCountVsZFPixMinus->Fill(GP.z());
772  hHitCountVsThetaFPixMinus->Fill(GP.theta());
773  hHitCountVsPhiFPixMinus->Fill(GP.phi());
774 
775  hFPixZMinusResXPrime->Fill(uOrientation * resX * cmToUm);
776  hFPixZMinusResYPrime->Fill(vOrientation * resY * cmToUm);
777  hFPixZMinusResXPull->Fill(pullX);
778  hFPixZMinusResYPull->Fill(pullY);
779 
780  } else {
781  hHitCountVsXFPixPlus->Fill(GP.x());
782  hHitCountVsYFPixPlus->Fill(GP.y());
783  hHitCountVsZFPixPlus->Fill(GP.z());
784  hHitCountVsThetaFPixPlus->Fill(GP.theta());
785  hHitCountVsPhiFPixPlus->Fill(GP.phi());
786 
787  hFPixZPlusResXPrime->Fill(uOrientation * resX * cmToUm);
788  hFPixZPlusResYPrime->Fill(vOrientation * resY * cmToUm);
789  hFPixZPlusResXPull->Fill(pullX);
790  hFPixZPlusResYPull->Fill(pullY);
791  }
792  }
793  }
794  }
795  }
796  }
797 
798  hHit2D->Fill(nHit2D);
799  hHit->Fill(track.numberOfValidHits());
800  hnhpxb->Fill(track.hitPattern().numberOfValidPixelBarrelHits());
801  hnhpxe->Fill(track.hitPattern().numberOfValidPixelEndcapHits());
802  hnhTIB->Fill(track.hitPattern().numberOfValidStripTIBHits());
803  hnhTID->Fill(track.hitPattern().numberOfValidStripTIDHits());
804  hnhTOB->Fill(track.hitPattern().numberOfValidStripTOBHits());
805  hnhTEC->Fill(track.hitPattern().numberOfValidStripTECHits());
806 
807  runHitsMap_[event.run()][0] += track.hitPattern().numberOfValidPixelBarrelHits();
808  runHitsMap_[event.run()][1] += track.hitPattern().numberOfValidPixelEndcapHits();
809  runHitsMap_[event.run()][2] += track.hitPattern().numberOfValidStripTIBHits();
810  runHitsMap_[event.run()][3] += track.hitPattern().numberOfValidStripTIDHits();
811  runHitsMap_[event.run()][4] += track.hitPattern().numberOfValidStripTOBHits();
812  runHitsMap_[event.run()][5] += track.hitPattern().numberOfValidStripTECHits();
813 
814  // fill hit composition histogram
815  if (track.hitPattern().numberOfValidPixelBarrelHits() != 0) {
816  hHitComposition->Fill(0., track.hitPattern().numberOfValidPixelBarrelHits());
817 
818  pNBpixHitsVsVx->Fill(track.vx(), track.hitPattern().numberOfValidPixelBarrelHits());
819  pNBpixHitsVsVy->Fill(track.vy(), track.hitPattern().numberOfValidPixelBarrelHits());
820  pNBpixHitsVsVz->Fill(track.vz(), track.hitPattern().numberOfValidPixelBarrelHits());
821  }
822  if (track.hitPattern().numberOfValidPixelEndcapHits() != 0) {
823  hHitComposition->Fill(1., track.hitPattern().numberOfValidPixelEndcapHits());
824  }
825  if (track.hitPattern().numberOfValidStripTIBHits() != 0) {
826  hHitComposition->Fill(2., track.hitPattern().numberOfValidStripTIBHits());
827  }
828  if (track.hitPattern().numberOfValidStripTIDHits() != 0) {
829  hHitComposition->Fill(3., track.hitPattern().numberOfValidStripTIDHits());
830  }
831  if (track.hitPattern().numberOfValidStripTOBHits() != 0) {
832  hHitComposition->Fill(4., track.hitPattern().numberOfValidStripTOBHits());
833  }
834  if (track.hitPattern().numberOfValidStripTECHits() != 0) {
835  hHitComposition->Fill(5., track.hitPattern().numberOfValidStripTECHits());
836  }
837 
838  hCharge->Fill(track.charge());
839  hQoverP->Fill(track.qoverp());
840  hQoverPZoom->Fill(track.qoverp());
841  hPt->Fill(track.pt());
842  hP->Fill(track.p());
843  hchi2ndof->Fill(track.normalizedChi2());
844  hEta->Fill(track.eta());
845  hPhi->Fill(track.phi());
846 
847  if (fabs(track.eta()) < 0.8)
848  hPhiBarrel->Fill(track.phi());
849  if (track.eta() > 0.8 && track.eta() < 1.4)
850  hPhiOverlapPlus->Fill(track.phi());
851  if (track.eta() < -0.8 && track.eta() > -1.4)
852  hPhiOverlapMinus->Fill(track.phi());
853  if (track.eta() > 1.4)
854  hPhiEndcapPlus->Fill(track.phi());
855  if (track.eta() < -1.4)
856  hPhiEndcapMinus->Fill(track.phi());
857 
858  hd0->Fill(track.d0());
859  hdz->Fill(track.dz());
860  hdxy->Fill(track.dxy());
861  hvx->Fill(track.vx());
862  hvy->Fill(track.vy());
863  hvz->Fill(track.vz());
864 
865  htrkAlgo->Fill(track.algo());
866 
867  int myquality = -99;
868  if (track.quality(reco::TrackBase::undefQuality)) {
869  myquality = -1;
870  htrkQuality->Fill(myquality);
871  }
872  if (track.quality(reco::TrackBase::loose)) {
873  myquality = 0;
874  htrkQuality->Fill(myquality);
875  }
876  if (track.quality(reco::TrackBase::tight)) {
877  myquality = 1;
878  htrkQuality->Fill(myquality);
879  }
880  if (track.quality(reco::TrackBase::highPurity) && (!isCosmics_)) {
881  myquality = 2;
882  htrkQuality->Fill(myquality);
883  hPhp->Fill(track.p());
884  hPthp->Fill(track.pt());
885  hHithp->Fill(track.numberOfValidHits());
886  hEtahp->Fill(track.eta());
887  hPhihp->Fill(track.phi());
888  hchi2ndofhp->Fill(track.normalizedChi2());
889  hchi2Probhp->Fill(TMath::Prob(track.chi2(), track.ndof()));
890  nHighPurityTracks++;
891  }
892  if (track.quality(reco::TrackBase::confirmed)) {
893  myquality = 3;
894  htrkQuality->Fill(myquality);
895  }
896  if (track.quality(reco::TrackBase::goodIterative)) {
897  myquality = 4;
898  htrkQuality->Fill(myquality);
899  }
900 
901  // Fill 1D track histos
902  static const int etaindex = this->index(vTrackHistos_, "h_tracketa");
903  vTrackHistos_[etaindex]->Fill(track.eta());
904  static const int phiindex = this->index(vTrackHistos_, "h_trackphi");
905  vTrackHistos_[phiindex]->Fill(track.phi());
906  static const int numOfValidHitsindex = this->index(vTrackHistos_, "h_trackNumberOfValidHits");
907  vTrackHistos_[numOfValidHitsindex]->Fill(track.numberOfValidHits());
908  static const int numOfLostHitsindex = this->index(vTrackHistos_, "h_trackNumberOfLostHits");
909  vTrackHistos_[numOfLostHitsindex]->Fill(track.numberOfLostHits());
910 
911  GlobalPoint gPoint(track.vx(), track.vy(), track.vz());
912  double theLocalMagFieldInInverseGeV = magneticField_->inInverseGeV(gPoint).z();
913  double kappa = -track.charge() * theLocalMagFieldInInverseGeV / track.pt();
914 
915  static const int kappaindex = this->index(vTrackHistos_, "h_curvature");
916  vTrackHistos_[kappaindex]->Fill(kappa);
917  static const int kappaposindex = this->index(vTrackHistos_, "h_curvature_pos");
918  if (track.charge() > 0)
919  vTrackHistos_[kappaposindex]->Fill(fabs(kappa));
920  static const int kappanegindex = this->index(vTrackHistos_, "h_curvature_neg");
921  if (track.charge() < 0)
922  vTrackHistos_[kappanegindex]->Fill(fabs(kappa));
923 
924  double chi2Prob = TMath::Prob(track.chi2(), track.ndof());
925  double normchi2 = track.normalizedChi2();
926 
927  static const int normchi2index = this->index(vTrackHistos_, "h_normchi2");
928  vTrackHistos_[normchi2index]->Fill(normchi2);
929  static const int chi2index = this->index(vTrackHistos_, "h_chi2");
930  vTrackHistos_[chi2index]->Fill(track.chi2());
931  static const int chi2Probindex = this->index(vTrackHistos_, "h_chi2Prob");
932  vTrackHistos_[chi2Probindex]->Fill(chi2Prob);
933  static const int ptindex = this->index(vTrackHistos_, "h_pt");
934  static const int pt2index = this->index(vTrackHistos_, "h_ptrebin");
935  vTrackHistos_[ptindex]->Fill(track.pt());
936  vTrackHistos_[pt2index]->Fill(track.pt());
937  if (track.ptError() != 0.) {
938  static const int ptResolutionindex = this->index(vTrackHistos_, "h_ptResolution");
939  vTrackHistos_[ptResolutionindex]->Fill(track.ptError() / track.pt());
940  }
941  // Fill track profiles
942  static const int d0phiindex = this->index(vTrackProfiles_, "p_d0_vs_phi");
943  vTrackProfiles_[d0phiindex]->Fill(track.phi(), track.d0());
944  static const int dzphiindex = this->index(vTrackProfiles_, "p_dz_vs_phi");
945  vTrackProfiles_[dzphiindex]->Fill(track.phi(), track.dz());
946  static const int d0etaindex = this->index(vTrackProfiles_, "p_d0_vs_eta");
947  vTrackProfiles_[d0etaindex]->Fill(track.eta(), track.d0());
948  static const int dzetaindex = this->index(vTrackProfiles_, "p_dz_vs_eta");
949  vTrackProfiles_[dzetaindex]->Fill(track.eta(), track.dz());
950  static const int chiProbphiindex = this->index(vTrackProfiles_, "p_chi2Prob_vs_phi");
951  vTrackProfiles_[chiProbphiindex]->Fill(track.phi(), chi2Prob);
952  static const int chiProbabsd0index = this->index(vTrackProfiles_, "p_chi2Prob_vs_d0");
953  vTrackProfiles_[chiProbabsd0index]->Fill(fabs(track.d0()), chi2Prob);
954  static const int chiProbabsdzindex = this->index(vTrackProfiles_, "p_chi2Prob_vs_dz");
955  vTrackProfiles_[chiProbabsdzindex]->Fill(track.dz(), chi2Prob);
956  static const int chiphiindex = this->index(vTrackProfiles_, "p_chi2_vs_phi");
957  vTrackProfiles_[chiphiindex]->Fill(track.phi(), track.chi2());
958  static const int normchiphiindex = this->index(vTrackProfiles_, "p_normchi2_vs_phi");
959  vTrackProfiles_[normchiphiindex]->Fill(track.phi(), normchi2);
960  static const int chietaindex = this->index(vTrackProfiles_, "p_chi2_vs_eta");
961  vTrackProfiles_[chietaindex]->Fill(track.eta(), track.chi2());
962  static const int normchiptindex = this->index(vTrackProfiles_, "p_normchi2_vs_pt");
963  vTrackProfiles_[normchiptindex]->Fill(track.pt(), normchi2);
964  static const int normchipindex = this->index(vTrackProfiles_, "p_normchi2_vs_p");
965  vTrackProfiles_[normchipindex]->Fill(track.p(), normchi2);
966  static const int chiProbetaindex = this->index(vTrackProfiles_, "p_chi2Prob_vs_eta");
967  vTrackProfiles_[chiProbetaindex]->Fill(track.eta(), chi2Prob);
968  static const int normchietaindex = this->index(vTrackProfiles_, "p_normchi2_vs_eta");
969  vTrackProfiles_[normchietaindex]->Fill(track.eta(), normchi2);
970  static const int kappaphiindex = this->index(vTrackProfiles_, "p_kappa_vs_phi");
971  vTrackProfiles_[kappaphiindex]->Fill(track.phi(), kappa);
972  static const int kappaetaindex = this->index(vTrackProfiles_, "p_kappa_vs_eta");
973  vTrackProfiles_[kappaetaindex]->Fill(track.eta(), kappa);
974  static const int ptResphiindex = this->index(vTrackProfiles_, "p_ptResolution_vs_phi");
975  vTrackProfiles_[ptResphiindex]->Fill(track.phi(), track.ptError() / track.pt());
976  static const int ptResetaindex = this->index(vTrackProfiles_, "p_ptResolution_vs_eta");
977  vTrackProfiles_[ptResetaindex]->Fill(track.eta(), track.ptError() / track.pt());
978 
979  // Fill 2D track histos
980  static const int etaphiindex_2d = this->index(vTrack2DHistos_, "h2_phi_vs_eta");
981  vTrack2DHistos_[etaphiindex_2d]->Fill(track.eta(), track.phi());
982  static const int d0phiindex_2d = this->index(vTrack2DHistos_, "h2_d0_vs_phi");
983  vTrack2DHistos_[d0phiindex_2d]->Fill(track.phi(), track.d0());
984  static const int dzphiindex_2d = this->index(vTrack2DHistos_, "h2_dz_vs_phi");
985  vTrack2DHistos_[dzphiindex_2d]->Fill(track.phi(), track.dz());
986  static const int d0etaindex_2d = this->index(vTrack2DHistos_, "h2_d0_vs_eta");
987  vTrack2DHistos_[d0etaindex_2d]->Fill(track.eta(), track.d0());
988  static const int dzetaindex_2d = this->index(vTrack2DHistos_, "h2_dz_vs_eta");
989  vTrack2DHistos_[dzetaindex_2d]->Fill(track.eta(), track.dz());
990  static const int chiphiindex_2d = this->index(vTrack2DHistos_, "h2_chi2_vs_phi");
991  vTrack2DHistos_[chiphiindex_2d]->Fill(track.phi(), track.chi2());
992  static const int chiProbphiindex_2d = this->index(vTrack2DHistos_, "h2_chi2Prob_vs_phi");
993  vTrack2DHistos_[chiProbphiindex_2d]->Fill(track.phi(), chi2Prob);
994  static const int chiProbabsd0index_2d = this->index(vTrack2DHistos_, "h2_chi2Prob_vs_d0");
995  vTrack2DHistos_[chiProbabsd0index_2d]->Fill(fabs(track.d0()), chi2Prob);
996  static const int normchiphiindex_2d = this->index(vTrack2DHistos_, "h2_normchi2_vs_phi");
997  vTrack2DHistos_[normchiphiindex_2d]->Fill(track.phi(), normchi2);
998  static const int chietaindex_2d = this->index(vTrack2DHistos_, "h2_chi2_vs_eta");
999  vTrack2DHistos_[chietaindex_2d]->Fill(track.eta(), track.chi2());
1000  static const int chiProbetaindex_2d = this->index(vTrack2DHistos_, "h2_chi2Prob_vs_eta");
1001  vTrack2DHistos_[chiProbetaindex_2d]->Fill(track.eta(), chi2Prob);
1002  static const int normchietaindex_2d = this->index(vTrack2DHistos_, "h2_normchi2_vs_eta");
1003  vTrack2DHistos_[normchietaindex_2d]->Fill(track.eta(), normchi2);
1004  static const int kappaphiindex_2d = this->index(vTrack2DHistos_, "h2_kappa_vs_phi");
1005  vTrack2DHistos_[kappaphiindex_2d]->Fill(track.phi(), kappa);
1006  static const int kappaetaindex_2d = this->index(vTrack2DHistos_, "h2_kappa_vs_eta");
1007  vTrack2DHistos_[kappaetaindex_2d]->Fill(track.eta(), kappa);
1008  static const int normchi2kappa_2d = this->index(vTrack2DHistos_, "h2_normchi2_vs_kappa");
1009  vTrack2DHistos_[normchi2kappa_2d]->Fill(normchi2, kappa);
1010 
1011  if (DEBUG)
1012  edm::LogVerbatim("DMRChecker") << "filling histos" << std::endl;
1013 
1014  //dxy with respect to the beamspot
1016  edm::Handle<reco::BeamSpot> beamSpotHandle = event.getHandle(beamspotToken_);
1017  if (beamSpotHandle.isValid()) {
1018  beamSpot = *beamSpotHandle;
1019  math::XYZPoint point(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
1020  double dxy = track.dxy(point);
1021  double dz = track.dz(point);
1022  hdxyBS->Fill(dxy);
1023  hd0BS->Fill(-dxy);
1024  hdzBS->Fill(dz);
1025  }
1026 
1027  //dxy with respect to the primary vertex
1028  reco::Vertex pvtx;
1029  edm::Handle<reco::VertexCollection> vertexHandle = event.getHandle(vertexToken_);
1030  double mindxy = 100.;
1031  double dz = 100;
1032  if (vertexHandle.isValid() && !isCosmics_) {
1033  for (reco::VertexCollection::const_iterator pvtx = vertexHandle->begin(); pvtx != vertexHandle->end(); ++pvtx) {
1034  math::XYZPoint mypoint(pvtx->x(), pvtx->y(), pvtx->z());
1035  if (abs(mindxy) > abs(track.dxy(mypoint))) {
1036  mindxy = track.dxy(mypoint);
1037  dz = track.dz(mypoint);
1038  if (DEBUG)
1039  edm::LogVerbatim("DMRChecker") << "dxy: " << mindxy << " dz: " << dz << std::endl;
1040  }
1041  }
1042 
1043  hdxyPV->Fill(mindxy);
1044  hd0PV->Fill(-mindxy);
1045  hdzPV->Fill(dz);
1046 
1047  hd0PVvsphi->Fill(track.phi(), -mindxy);
1048  hd0PVvseta->Fill(track.eta(), -mindxy);
1049  hd0PVvspt->Fill(track.pt(), -mindxy);
1050 
1051  } else {
1052  hdxyPV->Fill(100);
1053  hd0PV->Fill(100);
1054  hdzPV->Fill(100);
1055  }
1056 
1057  if (DEBUG)
1058  edm::LogVerbatim("DMRChecker") << "end of track loop" << std::endl;
1059  }
1060 
1061  if (DEBUG)
1062  edm::LogVerbatim("DMRChecker") << "end of analysis" << std::endl;
1063 
1064  hNtrk->Fill(tC.size());
1065  hNtrkZoom->Fill(tC.size());
1066  hNhighPurity->Fill(nHighPurityTracks);
1067 
1068  if (DEBUG)
1069  edm::LogVerbatim("DMRChecker") << "end of analysis" << std::endl;
1070  }
TH1D * hTECResXPrime
Definition: DMRChecker.cc:291
TH1D * hPhihp
Definition: DMRChecker.cc:331
running::estimatorMap resDetailsTEC_
Definition: DMRChecker.cc:502
Log< level::Info, true > LogVerbatim
static constexpr auto TEC
TH1D * hPhiOverlapMinus
Definition: DMRChecker.cc:344
const TrackerTopology * trackerTopology_
Definition: DMRChecker.cc:238
TH1D * hFPixZMinusResYPull
Definition: DMRChecker.cc:286
TH1D * hHitCountVsXFPix
Definition: DMRChecker.cc:299
TH1D * hHitCountVsYFPixPlus
Definition: DMRChecker.cc:313
unsigned int pxbLayer(const DetId &id) const
TH1D * hFPixZPlusResXPrime
Definition: DMRChecker.cc:270
TH1D * hHitCountVsXFPixPlus
Definition: DMRChecker.cc:311
TH1D * hHitCountVsYFPixMinus
Definition: DMRChecker.cc:314
T perp() const
Definition: PV3DBase.h:69
TH1D * hFPixZMinusResXPrime
Definition: DMRChecker.cc:271
std::vector< TH1 * > vTrackProfiles_
Definition: DMRChecker.cc:394
TH1D * hHitCountVsZFPixMinus
Definition: DMRChecker.cc:316
TH1D * hnhpxe
Definition: DMRChecker.cc:370
running::estimatorMap resDetailsBPixX_
Definition: DMRChecker.cc:492
std::map< std::string, std::pair< int, int > > triggerMap_
Definition: DMRChecker.cc:483
double z() const
z coordinate
Definition: Vertex.h:133
TH1D * hPhiEndcapMinus
Definition: DMRChecker.cc:346
TH1D * hEta
Definition: DMRChecker.cc:338
T z() const
Definition: PV3DBase.h:61
std::map< int, std::array< int, 6 > > runHitsMap_
Definition: DMRChecker.cc:486
TH1D * hdxyBS
Definition: DMRChecker.cc:384
Strings const & triggerNames() const
Definition: TriggerNames.cc:48
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
TH1D * hd0
Definition: DMRChecker.cc:357
std::map< unsigned int, TH1D * > endcapDisksPullsX
Definition: DMRChecker.cc:459
running::estimatorMap resDetailsTOB_
Definition: DMRChecker.cc:500
TH1D * hvz
Definition: DMRChecker.cc:356
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
running::estimatorMap resDetailsBPixY_
Definition: DMRChecker.cc:493
TH1D * hTOBResXPrime
Definition: DMRChecker.cc:289
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:36
TH1I * htrkQuality
Definition: DMRChecker.cc:255
TH1D * hFPixZPlusResYPull
Definition: DMRChecker.cc:285
TH1D * hHit
Definition: DMRChecker.cc:265
bool firstEvent_
Definition: DMRChecker.cc:466
running::estimatorMap resDetailsFPixY_
Definition: DMRChecker.cc:495
TH1D * hFPixResYPull
Definition: DMRChecker.cc:284
TH1D * hd0BS
Definition: DMRChecker.cc:385
TH1D * hCharge
Definition: DMRChecker.cc:335
TH1D * hTECResXPull
Definition: DMRChecker.cc:296
TProfile * pNBpixHitsVsVx
Definition: DMRChecker.cc:378
TProfile * pNBpixHitsVsVz
Definition: DMRChecker.cc:380
TH1D * hHitCountVsThetaFPix
Definition: DMRChecker.cc:308
TH1D * hNtrkZoom
Definition: DMRChecker.cc:254
void fillByIndex(std::map< unsigned int, TH1D *> &h, unsigned int index, double x)
Definition: DMRChecker.cc:2016
std::map< int, std::pair< int, int > > runInfoMap_
Definition: DMRChecker.cc:485
std::map< unsigned int, TH1D * > endcapDisksResidualsX
Definition: DMRChecker.cc:458
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
TH1D * hHitComposition
Definition: DMRChecker.cc:376
TH1D * hPhiBarrel
Definition: DMRChecker.cc:342
TH1D * hHithp
Definition: DMRChecker.cc:329
TH1D * hHitCountVsZFPixPlus
Definition: DMRChecker.cc:315
int index(const std::vector< OBJECT_TYPE *> &vec, const std::string &name)
Definition: DMRChecker.cc:211
TH1D * hvx
Definition: DMRChecker.cc:354
TH1D * hHitCountVsZBPix
Definition: DMRChecker.cc:302
TH1D * hHitCountVsYFPix
Definition: DMRChecker.cc:301
running::estimatorMap resDetailsTID_
Definition: DMRChecker.cc:501
TH1D * hchi2ndofhp
Definition: DMRChecker.cc:332
T barePhi() const
Definition: PV3DBase.h:65
TH1D * hFPixZPlusResYPrime
Definition: DMRChecker.cc:275
TH1D * hFPixZPlusResXPull
Definition: DMRChecker.cc:280
TH1D * hTOBResXPull
Definition: DMRChecker.cc:294
TH1D * hPthp
Definition: DMRChecker.cc:328
TH1D * hHitCountVsPhiFPix
Definition: DMRChecker.cc:309
TH1D * hchi2Probhp
Definition: DMRChecker.cc:333
TH1D * hFPixResYPrime
Definition: DMRChecker.cc:274
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
TH1D * hHitCountVsPhiBPix
Definition: DMRChecker.cc:306
TH1D * hBPixResYPull
Definition: DMRChecker.cc:283
const MagneticField * magneticField_
Definition: DMRChecker.cc:236
TH1D * hHitCountVsXFPixMinus
Definition: DMRChecker.cc:312
TH1D * hHitCountVsPhiFPixPlus
Definition: DMRChecker.cc:319
TH1D * hQoverPZoom
Definition: DMRChecker.cc:337
TH1D * hPhiEndcapPlus
Definition: DMRChecker.cc:345
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken_
Definition: DMRChecker.cc:478
TH1D * hHitCountVsThetaFPixPlus
Definition: DMRChecker.cc:318
TH1D * hFPixZMinusResXPull
Definition: DMRChecker.cc:281
TH1D * hHitCountVsZFPix
Definition: DMRChecker.cc:303
TH1D * hdzBS
Definition: DMRChecker.cc:386
bool isValid() const
TH1D * hP
Definition: DMRChecker.cc:258
TH1D * hNtrk
Definition: DMRChecker.cc:253
TH1D * hnhTOB
Definition: DMRChecker.cc:373
std::map< unsigned int, TH1D * > barrelLayersPullsX
Definition: DMRChecker.cc:454
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
bool isThere(GeomDetEnumerators::SubDetector subdet) const
constexpr float cmToUm
Definition: DMRChecker.cc:127
std::unique_ptr< TrackerMap > pmap
Definition: DMRChecker.cc:250
TH1D * hHitCountVsYBPix
Definition: DMRChecker.cc:300
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: DMRChecker.cc:481
std::vector< TH1 * > vTrackHistos_
Definition: DMRChecker.cc:393
edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
Definition: DMRChecker.cc:480
unsigned int pxfDisk(const DetId &id) const
TH1D * hvy
Definition: DMRChecker.cc:355
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TH1D * hdzPV
Definition: DMRChecker.cc:389
TH1D * hPhiOverlapPlus
Definition: DMRChecker.cc:343
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
void updateOnlineMomenta(running::estimatorMap &myDetails, uint32_t theID, float the_data, float the_pull)
Definition: DMRChecker.cc:2036
std::unique_ptr< TrackerMap > tmap
Definition: DMRChecker.cc:249
std::map< unsigned int, TH1D * > endcapDisksResidualsY
Definition: DMRChecker.cc:460
double x() const
x coordinate
Definition: Vertex.h:129
static constexpr auto TOB
const TrackerGeometry * trackerGeometry_
Definition: DMRChecker.cc:237
TH1D * hEtahp
Definition: DMRChecker.cc:330
running::estimatorMap resDetailsFPixX_
Definition: DMRChecker.cc:494
running::estimatorMap resDetailsTIB_
Definition: DMRChecker.cc:499
TH1D * hPt
Definition: DMRChecker.cc:261
const TrackerGeomDet * idToDet(DetId) const override
TH1D * hlumi
Definition: DMRChecker.cc:391
double y() const
y coordinate
Definition: Vertex.h:131
TH1D * hrun
Definition: DMRChecker.cc:390
TH1D * hFPixResXPrime
Definition: DMRChecker.cc:269
TH1D * hchi2ndof
Definition: DMRChecker.cc:252
std::map< unsigned int, TH1D * > barrelLayersResidualsX
Definition: DMRChecker.cc:453
TH1D * hnhTID
Definition: DMRChecker.cc:372
TH1D * hPhi
Definition: DMRChecker.cc:341
TH1D * hHitCountVsPhiFPixMinus
Definition: DMRChecker.cc:322
TH1D * hFPixZMinusResYPrime
Definition: DMRChecker.cc:276
TH1D * hd0PV
Definition: DMRChecker.cc:388
TH1D * hnhTEC
Definition: DMRChecker.cc:374
TH2D * hd0PVvseta
Definition: DMRChecker.cc:362
Definition: DetId.h:17
TH1D * hHitCountVsThetaFPixMinus
Definition: DMRChecker.cc:321
unsigned int pxfSide(const DetId &id) const
static constexpr auto TIB
std::map< unsigned int, TH1D * > barrelLayersResidualsY
Definition: DMRChecker.cc:455
std::map< unsigned int, TH1D * > barrelLayersPullsY
Definition: DMRChecker.cc:456
TH1D * hBPixResYPrime
Definition: DMRChecker.cc:273
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
SiPixelPI::phase phase_
Definition: DMRChecker.cc:468
TH1D * hTIBResXPrime
Definition: DMRChecker.cc:288
edm::EDGetTokenT< edm::TriggerResults > hltresultsToken_
Definition: DMRChecker.cc:479
TH1D * hTIDResXPull
Definition: DMRChecker.cc:295
TProfile * pNBpixHitsVsVy
Definition: DMRChecker.cc:379
TH1D * hPhp
Definition: DMRChecker.cc:327
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:50
TH1D * hnhTIB
Definition: DMRChecker.cc:371
TH1D * hFPixResXPull
Definition: DMRChecker.cc:279
bool isValid() const
Definition: HandleBase.h:70
TH1D * hdz
Definition: DMRChecker.cc:358
const bool isCosmics_
Definition: DMRChecker.cc:471
TH1D * hQoverP
Definition: DMRChecker.cc:336
TH1D * hdxyPV
Definition: DMRChecker.cc:387
#define DEBUG
Definition: DMRChecker.cc:120
TH1D * hBPixResXPrime
Definition: DMRChecker.cc:268
TH1D * hdxy
Definition: DMRChecker.cc:359
TH1I * htrkAlgo
Definition: DMRChecker.cc:256
TH1D * hHit2D
Definition: DMRChecker.cc:266
TH1D * hHitCountVsThetaBPix
Definition: DMRChecker.cc:305
TH1D * hBPixResXPull
Definition: DMRChecker.cc:278
TH1D * hHitCountVsXBPix
Definition: DMRChecker.cc:298
TH1D * hnhpxb
Definition: DMRChecker.cc:369
TH1D * hTIDResXPrime
Definition: DMRChecker.cc:290
TH2D * hd0PVvspt
Definition: DMRChecker.cc:363
std::map< unsigned int, TH1D * > endcapDisksPullsY
Definition: DMRChecker.cc:461
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
static constexpr auto TID
TH1D * hTIBResXPull
Definition: DMRChecker.cc:293
TH2D * hd0PVvsphi
Definition: DMRChecker.cc:361
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
Definition: event.py:1
bool isHit2D(const TrackingRecHit &hit)
Definition: DMRChecker.cc:1874
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
Our base class.
Definition: SiPixelRecHit.h:23
std::vector< TH1 * > vTrack2DHistos_
Definition: DMRChecker.cc:395
TH1D * hNhighPurity
Definition: DMRChecker.cc:257

◆ beginJob()

void DMRChecker::beginJob ( )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 1128 of file DMRChecker.cc.

References reco::TrackBase::algoNames, reco::TrackBase::algoSize, DEBUG, compareTotals::fs, mps_fire::i, M_PI, qualities, AlCaHLTBitMon_QueryRunRegistry::string, and multiplicitycorr_cfi::xBins.

1128  {
1129  if (DEBUG)
1130  edm::LogVerbatim("DMRChecker") << __LINE__ << endl;
1131 
1132  TH1D::SetDefaultSumw2(kTRUE);
1133 
1134  etaMax_ = 3.; // assign max value to eta
1135 
1136  // intialize counters
1137  ievt = 0;
1138  itrks = 0;
1139 
1140  hrun = book<TH1D>("h_run", "run", 100000, 230000, 240000);
1141  hlumi = book<TH1D>("h_lumi", "lumi", 1000, 0, 1000);
1142 
1143  // clang-format off
1144 
1145  hchi2ndof = book<TH1D>("h_chi2ndof", "chi2/ndf;#chi^{2}/ndf;tracks", 100, 0, 5.);
1146  hCharge = book<TH1D>("h_charge", "charge;Charge of the track;tracks", 5, -2.5, 2.5);
1147  hNtrk = book<TH1D>("h_Ntrk", "ntracks;Number of Tracks;events", 200, 0., 200.);
1148  hNtrkZoom = book<TH1D>("h_NtrkZoom", "Number of tracks; number of tracks;events", 10, 0., 10.);
1149  hNhighPurity = book<TH1D>("h_NhighPurity", "n. high purity tracks;Number of high purity tracks;events", 200, 0., 200.);
1150 
1151  int nAlgos = reco::TrackBase::algoSize;
1152  htrkAlgo = book<TH1I>("h_trkAlgo", "tracking step;iterative tracking step;tracks", nAlgos, -0.5, nAlgos - 0.5);
1153  for (int nbin = 1; nbin <= htrkAlgo->GetNbinsX(); nbin++) {
1154  htrkAlgo->GetXaxis()->SetBinLabel(nbin, reco::TrackBase::algoNames[nbin - 1].c_str());
1155  }
1156 
1157  htrkQuality = book<TH1I>("h_trkQuality", "track quality;track quality;tracks", 6, -1, 5);
1158  std::string qualities[7] = {"undef", "loose", "tight", "highPurity", "confirmed", "goodIterative"};
1159  for (int nbin = 1; nbin <= htrkQuality->GetNbinsX(); nbin++) {
1160  htrkQuality->GetXaxis()->SetBinLabel(nbin, qualities[nbin - 1].c_str());
1161  }
1162 
1163  hP = book<TH1D>("h_P", "Momentum;track momentum [GeV];tracks", 100, 0., 100.);
1164  hQoverP = book<TH1D>("h_qoverp", "Track q/p; track q/p [GeV^{-1}];tracks", 100, -1., 1.);
1165  hQoverPZoom = book<TH1D>("h_qoverpZoom", "Track q/p; track q/p [GeV^{-1}];tracks", 100, -0.1, 0.1);
1166  hPt = book<TH1D>("h_Pt", "Transverse Momentum;track p_{T} [GeV];tracks", 100, 0., 100.);
1167  hHit = book<TH1D>("h_nHits", "Number of hits;track n. hits;tracks", 50, -0.5, 49.5);
1168  hHit2D = book<TH1D>("h_nHit2D", "Number of 2D hits; number of 2D hits;tracks", 20, 0, 20);
1169 
1170  // Pixel
1171 
1172  hBPixResXPrime = book<TH1D>("h_BPixResXPrime", "BPix track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1173  hFPixResXPrime = book<TH1D>("h_FPixResXPrime", "FPix track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1174  hFPixZPlusResXPrime = book<TH1D>("h_FPixZPlusResXPrime", "FPix (Z+) track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1175  hFPixZMinusResXPrime = book<TH1D>("h_FPixZMinusResXPrime", "FPix (Z-) track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1176 
1177  hBPixResYPrime = book<TH1D>("h_BPixResYPrime", "BPix track Y-residuals;res_{Y'} [#mum];hits", 100, -1000., 1000.);
1178  hFPixResYPrime = book<TH1D>("h_FPixResYPrime", "FPix track Y-residuals;res_{Y'} [#mum];hits", 100, -1000., 1000.);
1179  hFPixZPlusResYPrime = book<TH1D>("h_FPixZPlusResYPrime", "FPix (Z+) track Y-residuals;res_{Y'} [#mum];hits", 100, -1000., 1000.);
1180  hFPixZMinusResYPrime = book<TH1D>("h_FPixZMinusResYPrime", "FPix (Z-) track Y-residuals;res_{Y'} [#mum];hits", 100, -1000., 1000.);
1181 
1182  hBPixResXPull = book<TH1D>("h_BPixResXPull", "BPix track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1183  hFPixResXPull = book<TH1D>("h_FPixResXPull", "FPix track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1184  hFPixZPlusResXPull = book<TH1D>("h_FPixZPlusResXPull", "FPix (Z+) track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1185  hFPixZMinusResXPull = book<TH1D>("h_FPixZMinusResXPull", "FPix (Z-) track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1186 
1187  hBPixResYPull = book<TH1D>("h_BPixResYPull", "BPix track Y-pulls;res_{Y'}/#sigma_{res_{Y'}};hits", 100, -5., 5.);
1188  hFPixResYPull = book<TH1D>("h_FPixResYPull", "FPix track Y-pulls;res_{Y'}/#sigma_{res_{Y'}};hits", 100, -5., 5.);
1189  hFPixZPlusResYPull = book<TH1D>("h_FPixZPlusResYPull", "FPix (Z+) track Y-pulls;res_{Y'}/#sigma_{res_{Y'}};hits", 100, -5., 5.);
1190  hFPixZMinusResYPull = book<TH1D>("h_FPixZMinusResYPull", "FPix (Z-) track Y-pulls;res_{Y'}/#sigma_{res_{Y'}};hits", 100, -5., 5.);
1191 
1192  // Strips
1193 
1194  hTIBResXPrime = book<TH1D>("h_TIBResXPrime", "TIB track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1195  hTOBResXPrime = book<TH1D>("h_TOBResXPrime", "TOB track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1196  hTIDResXPrime = book<TH1D>("h_TIDResXPrime", "TID track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1197  hTECResXPrime = book<TH1D>("h_TECResXPrime", "TEC track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1198 
1199  hTIBResXPull = book<TH1D>("h_TIBResXPull", "TIB track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1200  hTOBResXPull = book<TH1D>("h_TOBResXPull", "TOB track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1201  hTIDResXPull = book<TH1D>("h_TIDResXPull", "TID track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1202  hTECResXPull = book<TH1D>("h_TECResXPull", "TEC track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1203 
1204  // hit counts
1205 
1206  hHitCountVsZBPix = book<TH1D>("h_HitCountVsZBpix", "Number of BPix hits vs z;hit global z;hits", 60, -30, 30);
1207  hHitCountVsZFPix = book<TH1D>("h_HitCountVsZFpix", "Number of FPix hits vs z;hit global z;hits", 100, -100, 100);
1208 
1209  hHitCountVsXBPix = book<TH1D>("h_HitCountVsXBpix", "Number of BPix hits vs x;hit global x;hits", 20, -20, 20);
1210  hHitCountVsXFPix = book<TH1D>("h_HitCountVsXFpix", "Number of FPix hits vs x;hit global x;hits", 20, -20, 20);
1211 
1212  hHitCountVsYBPix = book<TH1D>("h_HitCountVsYBpix", "Number of BPix hits vs y;hit global y;hits", 20, -20, 20);
1213  hHitCountVsYFPix = book<TH1D>("h_HitCountVsYFpix", "Number of FPix hits vs y;hit global y;hits", 20, -20, 20);
1214 
1215  hHitCountVsThetaBPix = book<TH1D>("h_HitCountVsThetaBpix", "Number of BPix hits vs #theta;hit global #theta;hits", 20, 0., M_PI);
1216  hHitCountVsPhiBPix = book<TH1D>("h_HitCountVsPhiBpix", "Number of BPix hits vs #phi;hit global #phi;hits", 20, -M_PI, M_PI);
1217 
1218  hHitCountVsThetaFPix = book<TH1D>("h_HitCountVsThetaFpix", "Number of FPix hits vs #theta;hit global #theta;hits", 40, 0., M_PI);
1219  hHitCountVsPhiFPix = book<TH1D>("h_HitCountVsPhiFpix", "Number of FPix hits vs #phi;hit global #phi;hits", 20, -M_PI, M_PI);
1220 
1221  // two sides of FPix
1222 
1223  hHitCountVsZFPixPlus = book<TH1D>("h_HitCountVsZFPixPlus", "Number of FPix(Z+) hits vs z;hit global z;hits", 60, 15., 60);
1224  hHitCountVsZFPixMinus = book<TH1D>("h_HitCountVsZFPixMinus", "Number of FPix(Z-) hits vs z;hit global z;hits", 100, -60., -15.);
1225 
1226  hHitCountVsXFPixPlus = book<TH1D>("h_HitCountVsXFPixPlus", "Number of FPix(Z+) hits vs x;hit global x;hits", 20, -20, 20);
1227  hHitCountVsXFPixMinus = book<TH1D>("h_HitCountVsXFPixMinus", "Number of FPix(Z-) hits vs x;hit global x;hits", 20, -20, 20);
1228 
1229  hHitCountVsYFPixPlus = book<TH1D>("h_HitCountVsYFPixPlus", "Number of FPix(Z+) hits vs y;hit global y;hits", 20, -20, 20);
1230  hHitCountVsYFPixMinus = book<TH1D>("h_HitCountVsYFPixMinus", "Number of FPix(Z-) hits vs y;hit global y;hits", 20, -20, 20);
1231 
1232  hHitCountVsThetaFPixPlus = book<TH1D>("h_HitCountVsThetaFPixPlus", "Number of FPix(Z+) hits vs #theta;hit global #theta;hits", 20, 0., M_PI);
1233  hHitCountVsPhiFPixPlus = book<TH1D>("h_HitCountVsPhiFPixPlus","Number of FPix(Z+) hits vs #phi;hit global #phi;hits",20,-M_PI,M_PI);
1234 
1235  hHitCountVsThetaFPixMinus = book<TH1D>("h_HitCountVsThetaFPixMinus", "Number of FPix(Z+) hits vs #theta;hit global #theta;hits", 40, 0., M_PI);
1236  hHitCountVsPhiFPixMinus = book<TH1D>("h_HitCountVsPhiFPixMinus","Number of FPix(Z+) hits vs #phi;hit global #phi;hits",20,-M_PI,M_PI);
1237 
1238  TFileDirectory ByLayerResiduals = fs->mkdir("ByLayerResiduals");
1239  barrelLayersResidualsX = bookResidualsHistogram(ByLayerResiduals, 4, "X", "Res", "BPix");
1240  endcapDisksResidualsX = bookResidualsHistogram(ByLayerResiduals, 6, "X", "Res", "FPix");
1241  barrelLayersResidualsY = bookResidualsHistogram(ByLayerResiduals, 4, "Y", "Res", "BPix");
1242  endcapDisksResidualsY = bookResidualsHistogram(ByLayerResiduals, 6, "Y", "Res", "FPix");
1243 
1244  TFileDirectory ByLayerPulls = fs->mkdir("ByLayerPulls");
1245  barrelLayersPullsX = bookResidualsHistogram(ByLayerPulls, 4, "X", "Pull", "BPix");
1246  endcapDisksPullsX = bookResidualsHistogram(ByLayerPulls, 6, "X", "Pull", "FPix");
1247  barrelLayersPullsY = bookResidualsHistogram(ByLayerPulls, 4, "Y", "Pull", "BPix");
1248  endcapDisksPullsY = bookResidualsHistogram(ByLayerPulls, 6, "Y", "Pull", "FPix");
1249 
1250  hEta = book<TH1D>("h_Eta", "Track pseudorapidity; track #eta;tracks", 100, -etaMax_, etaMax_);
1251  hPhi = book<TH1D>("h_Phi", "Track azimuth; track #phi;tracks", 100, -M_PI, M_PI);
1252 
1253  hPhiBarrel = book<TH1D>("h_PhiBarrel", "hPhiBarrel (0<|#eta|<0.8);track #Phi;tracks", 100, -M_PI, M_PI);
1254  hPhiOverlapPlus = book<TH1D>("h_PhiOverlapPlus", "hPhiOverlapPlus (0.8<#eta<1.4);track #phi;tracks", 100, -M_PI, M_PI);
1255  hPhiOverlapMinus = book<TH1D>("h_PhiOverlapMinus", "hPhiOverlapMinus (-1.4<#eta<-0.8);track #phi;tracks", 100, -M_PI, M_PI);
1256  hPhiEndcapPlus = book<TH1D>("h_PhiEndcapPlus", "hPhiEndcapPlus (#eta>1.4);track #phi;track", 100, -M_PI, M_PI);
1257  hPhiEndcapMinus = book<TH1D>("h_PhiEndcapMinus", "hPhiEndcapMinus (#eta<1.4);track #phi;tracks", 100, -M_PI, M_PI);
1258 
1259  if (!isCosmics_) {
1260  hPhp = book<TH1D>("h_P_hp", "Momentum (high purity);track momentum [GeV];tracks", 100, 0., 100.);
1261  hPthp = book<TH1D>("h_Pt_hp", "Transverse Momentum (high purity);track p_{T} [GeV];tracks", 100, 0., 100.);
1262  hHithp = book<TH1D>("h_nHit_hp", "Number of hits (high purity);track n. hits;tracks", 30, 0, 30);
1263  hEtahp = book<TH1D>("h_Eta_hp", "Track pseudorapidity (high purity); track #eta;tracks", 100, -etaMax_, etaMax_);
1264  hPhihp = book<TH1D>("h_Phi_hp", "Track azimuth (high purity); track #phi;tracks", 100, -M_PI, M_PI);
1265  hchi2ndofhp = book<TH1D>("h_chi2ndof_hp", "chi2/ndf (high purity);#chi^{2}/ndf;tracks", 100, 0, 5.);
1266  hchi2Probhp = book<TH1D>("hchi2_Prob_hp", "#chi^{2} probability (high purity);#chi^{2}prob_{Track};Number of Tracks", 100, 0.0, 1.);
1267 
1268  hvx = book<TH1D>("h_vx", "Track v_{x} ; track v_{x} [cm];tracks", 100, -1.5, 1.5);
1269  hvy = book<TH1D>("h_vy", "Track v_{y} ; track v_{y} [cm];tracks", 100, -1.5, 1.5);
1270  hvz = book<TH1D>("h_vz", "Track v_{z} ; track v_{z} [cm];tracks", 100, -20., 20.);
1271  hd0 = book<TH1D>("h_d0", "Track d_{0} ; track d_{0} [cm];tracks", 100, -1., 1.);
1272  hdxy = book<TH1D>("h_dxy", "Track d_{xy}; track d_{xy} [cm]; tracks", 100, -0.5, 0.5);
1273  hdz = book<TH1D>("h_dz", "Track d_{z} ; track d_{z} [cm]; tracks", 100, -20, 20);
1274 
1275  hd0PVvsphi = book<TH2D>("h2_d0PVvsphi", "hd0PVvsphi;track #phi;track d_{0}(PV) [cm]", 160, -M_PI, M_PI, 100, -1., 1.);
1276  hd0PVvseta = book<TH2D>("h2_d0PVvseta", "hdPV0vseta;track #eta;track d_{0}(PV) [cm]", 160, -etaMax_, etaMax_, 100, -1., 1.);
1277  hd0PVvspt = book<TH2D>("h2_d0PVvspt", "hdPV0vspt;track p_{T};d_{0}(PV) [cm]", 50, 0., 100., 100, -1, 1.);
1278 
1279  hdxyBS = book<TH1D>("h_dxyBS", "hdxyBS; track d_{xy}(BS) [cm];tracks", 100, -0.1, 0.1);
1280  hd0BS = book<TH1D>("h_d0BS", "hd0BS ; track d_{0}(BS) [cm];tracks", 100, -0.1, 0.1);
1281  hdzBS = book<TH1D>("h_dzBS", "hdzBS ; track d_{z}(BS) [cm];tracks", 100, -12, 12);
1282  hdxyPV = book<TH1D>("h_dxyPV", "hdxyPV; track d_{xy}(PV) [cm];tracks", 100, -0.1, 0.1);
1283  hd0PV = book<TH1D>("h_d0PV", "hd0PV ; track d_{0}(PV) [cm];tracks", 100, -0.15, 0.15);
1284  hdzPV = book<TH1D>("h_dzPV", "hdzPV ; track d_{z}(PV) [cm];tracks", 100, -0.1, 0.1);
1285 
1286  hnhTIB = book<TH1D>("h_nHitTIB", "nhTIB;# hits in TIB; tracks", 20, 0., 20.);
1287  hnhTID = book<TH1D>("h_nHitTID", "nhTID;# hits in TID; tracks", 20, 0., 20.);
1288  hnhTOB = book<TH1D>("h_nHitTOB", "nhTOB;# hits in TOB; tracks", 20, 0., 20.);
1289  hnhTEC = book<TH1D>("h_nHitTEC", "nhTEC;# hits in TEC; tracks", 20, 0., 20.);
1290 
1291  } else {
1292  hvx = book<TH1D>("h_vx", "Track v_{x};track v_{x} [cm];tracks", 100, -100., 100.);
1293  hvy = book<TH1D>("h_vy", "Track v_{y};track v_{y} [cm];tracks", 100, -100., 100.);
1294  hvz = book<TH1D>("h_vz", "Track v_{z};track v_{z} [cm];track", 100, -100., 100.);
1295  hd0 = book<TH1D>("h_d0", "Track d_{0};track d_{0} [cm];track", 100, -100., 100.);
1296  hdxy = book<TH1D>("h_dxy", "Track d_{xy};track d_{xy} [cm];tracks", 100, -100, 100);
1297  hdz = book<TH1D>("h_dz", "Track d_{z};track d_{z} [cm];tracks", 100, -200, 200);
1298 
1299  hd0vsphi = book<TH2D>("h2_d0vsphi", "Track d_{0} vs #phi; track #phi;track d_{0} [cm]", 160, -M_PI, M_PI, 100, -100., 100.);
1300  hd0vseta = book<TH2D>("h2_d0vseta", "Track d_{0} vs #eta; track #eta;track d_{0} [cm]", 160, -etaMax_, etaMax_, 100, -100., 100.);
1301  hd0vspt = book<TH2D>("h2_d0vspt", "Track d_{0} vs p_{T};track p_{T};track d_{0} [cm]", 50, 0., 100., 100, -100, 100);
1302 
1303  hdxyBS = book<TH1D>("h_dxyBS", "Track d_{xy}(BS);d_{xy}(BS) [cm];tracks", 100, -100., 100.);
1304  hd0BS = book<TH1D>("h_d0BS", "Track d_{0}(BS);d_{0}(BS) [cm];tracks", 100, -100., 100.);
1305  hdzBS = book<TH1D>("h_dzBS", "Track d_{z}(BS);d_{z}(BS) [cm];tracks", 100, -100., 100.);
1306  hdxyPV = book<TH1D>("h_dxyPV", "Track d_{xy}(PV); d_{xy}(PV) [cm];tracks", 100, -100., 100.);
1307  hd0PV = book<TH1D>("h_d0PV", "Track d_{0}(PV); d_{0}(PV) [cm];tracks", 100, -100., 100.);
1308  hdzPV = book<TH1D>("h_dzPV", "Track d_{z}(PV); d_{z}(PV) [cm];tracks", 100, -100., 100.);
1309 
1310  hnhTIB = book<TH1D>("h_nHitTIB", "nhTIB;# hits in TIB; tracks", 30, 0., 30.);
1311  hnhTID = book<TH1D>("h_nHitTID", "nhTID;# hits in TID; tracks", 30, 0., 30.);
1312  hnhTOB = book<TH1D>("h_nHitTOB", "nhTOB;# hits in TOB; tracks", 30, 0., 30.);
1313  hnhTEC = book<TH1D>("h_nHitTEC", "nhTEC;# hits in TEC; tracks", 30, 0., 30.);
1314  }
1315 
1316  hnhpxb = book<TH1D>("h_nHitPXB", "nhpxb;# hits in Pixel Barrel; tracks", 10, 0., 10.);
1317  hnhpxe = book<TH1D>("h_nHitPXE", "nhpxe;# hits in Pixel Endcap; tracks", 10, 0., 10.);
1318 
1319  hHitComposition = book<TH1D>("h_hitcomposition", "track hit composition;;# hits", 6, -0.5, 5.5);
1320  pNBpixHitsVsVx = book<TProfile>("p_NpixHits_vs_Vx", "n. Barrel Pixel hits vs. v_{x};v_{x} (cm);n. BPix hits", 20, -20, 20);
1321  pNBpixHitsVsVy = book<TProfile>("p_NpixHits_vs_Vy", "n. Barrel Pixel hits vs. v_{y};v_{y} (cm);n. BPix hits", 20, -20, 20);
1322  pNBpixHitsVsVz = book<TProfile>("p_NpixHits_vs_Vz", "n. Barrel Pixel hits vs. v_{z};v_{z} (cm);n. BPix hits", 20, -100, 100);
1323 
1324  std::string dets[6] = {"PXB", "PXF", "TIB", "TID", "TOB", "TEC"};
1325  for (int i = 1; i <= hHitComposition->GetNbinsX(); i++) {
1326  hHitComposition->GetXaxis()->SetBinLabel(i, dets[i - 1].c_str());
1327  }
1328 
1329  vTrackHistos_.push_back(book<TH1F>("h_tracketa", "Track #eta;#eta_{Track};Number of Tracks", 90, -etaMax_, etaMax_));
1330  vTrackHistos_.push_back(book<TH1F>("h_trackphi", "Track #phi;#phi_{Track};Number of Tracks", 90, -M_PI, M_PI));
1331  vTrackHistos_.push_back(book<TH1F>("h_trackNumberOfValidHits", "Track # of valid hits;# of valid hits _{Track};Number of Tracks", 40, 0., 40.));
1332  vTrackHistos_.push_back(book<TH1F>("h_trackNumberOfLostHits", "Track # of lost hits;# of lost hits _{Track};Number of Tracks", 10, 0., 10.));
1333  vTrackHistos_.push_back(book<TH1F>("h_curvature", "Curvature #kappa;#kappa_{Track};Number of Tracks", 100, -.05, .05));
1334  vTrackHistos_.push_back(book<TH1F>("h_curvature_pos", "Curvature |#kappa| Positive Tracks;|#kappa_{pos Track}|;Number of Tracks", 100, .0, .05));
1335  vTrackHistos_.push_back(book<TH1F>("h_curvature_neg", "Curvature |#kappa| Negative Tracks;|#kappa_{neg Track}|;Number of Tracks", 100, .0, .05));
1336  vTrackHistos_.push_back(book<TH1F>("h_diff_curvature", "Curvature |#kappa| Tracks Difference;|#kappa_{Track}|;# Pos Tracks - # Neg Tracks", 100,.0,.05));
1337 
1338  vTrackHistos_.push_back(book<TH1F>("h_chi2", "Track #chi^{2};#chi^{2}_{Track};Number of Tracks", 500, -0.01, 500.));
1339  vTrackHistos_.push_back(book<TH1F>("h_chi2Prob", "#chi^{2} probability;Track Prob(#chi^{2},ndof);Number of Tracks", 100, 0.0, 1.));
1340  vTrackHistos_.push_back(book<TH1F>("h_normchi2", "#chi^{2}/ndof;#chi^{2}/ndof;Number of Tracks", 100, -0.01, 10.));
1341 
1342  //variable binning for chi2/ndof vs. pT
1343  double xBins[19] = {0., 0.15, 0.5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5., 7., 10., 15., 25., 40., 100., 200.};
1344  vTrackHistos_.push_back(book<TH1F>("h_pt", "Track p_{T};p_{T}^{track} [GeV];Number of Tracks", 250, 0., 250));
1345  vTrackHistos_.push_back(book<TH1F>("h_ptrebin", "Track p_{T};p_{T}^{track} [GeV];Number of Tracks", 18, xBins));
1346 
1347  vTrackHistos_.push_back(book<TH1F>("h_ptResolution", "#delta_{p_{T}}/p_{T}^{track};#delta_{p_{T}}/p_{T}^{track};Number of Tracks", 100, 0., 0.5));
1348  vTrackProfiles_.push_back(book<TProfile>("p_d0_vs_phi", "Transverse Impact Parameter vs. #phi;#phi_{Track};#LT d_{0} #GT [cm]", 100, -M_PI, M_PI));
1349  vTrackProfiles_.push_back(book<TProfile>("p_dz_vs_phi", "Longitudinal Impact Parameter vs. #phi;#phi_{Track};#LT d_{z} #GT [cm]", 100, -M_PI, M_PI));
1350  vTrackProfiles_.push_back(book<TProfile>("p_d0_vs_eta", "Transverse Impact Parameter vs. #eta;#eta_{Track};#LT d_{0} #GT [cm]", 100, -etaMax_, etaMax_));
1351  vTrackProfiles_.push_back(book<TProfile>("p_dz_vs_eta", "Longitudinal Impact Parameter vs. #eta;#eta_{Track};#LT d_{z} #GT [cm]", 100, -etaMax_, etaMax_));
1352  vTrackProfiles_.push_back(book<TProfile>("p_chi2_vs_phi", "#chi^{2} vs. #phi;#phi_{Track};#LT #chi^{2} #GT", 100, -M_PI, M_PI));
1353  vTrackProfiles_.push_back(book<TProfile>("p_chi2Prob_vs_phi","#chi^{2} probablility vs. #phi;#phi_{Track};#LT #chi^{2} probability#GT",100,-M_PI,M_PI));
1354  vTrackProfiles_.push_back(book<TProfile>("p_chi2Prob_vs_d0", "#chi^{2} probablility vs. |d_{0}|;|d_{0}|[cm];#LT #chi^{2} probability#GT", 100, 0, 80));
1355  vTrackProfiles_.push_back(book<TProfile>("p_chi2Prob_vs_dz", "#chi^{2} probablility vs. dz;d_{z} [cm];#LT #chi^{2} probability#GT", 100, -30, 30));
1356  vTrackProfiles_.push_back(book<TProfile>("p_normchi2_vs_phi", "#chi^{2}/ndof vs. #phi;#phi_{Track};#LT #chi^{2}/ndof #GT", 100, -M_PI, M_PI));
1357  vTrackProfiles_.push_back(book<TProfile>("p_chi2_vs_eta", "#chi^{2} vs. #eta;#eta_{Track};#LT #chi^{2} #GT", 100, -etaMax_, etaMax_));
1358  vTrackProfiles_.push_back(book<TProfile>("p_normchi2_vs_pt", "norm #chi^{2} vs. p_{T}_{Track}; p_{T}_{Track};#LT #chi^{2}/ndof #GT", 18, xBins));
1359  vTrackProfiles_.push_back(book<TProfile>("p_normchi2_vs_p", "#chi^{2}/ndof vs. p_{Track};p_{Track};#LT #chi^{2}/ndof #GT", 18, xBins));
1360  vTrackProfiles_.push_back(book<TProfile>("p_chi2Prob_vs_eta","#chi^{2} probability vs. #eta;#eta_{Track};#LT #chi^{2} probability #GT",100,-etaMax_, etaMax_));
1361  vTrackProfiles_.push_back(book<TProfile>("p_normchi2_vs_eta", "#chi^{2}/ndof vs. #eta;#eta_{Track};#LT #chi^{2}/ndof #GT", 100, -etaMax_, etaMax_));
1362  vTrackProfiles_.push_back(book<TProfile>("p_kappa_vs_phi", "#kappa vs. #phi;#phi_{Track};#kappa", 100, -M_PI, M_PI));
1363  vTrackProfiles_.push_back(book<TProfile>("p_kappa_vs_eta", "#kappa vs. #eta;#eta_{Track};#kappa", 100, -etaMax_, etaMax_));
1364  vTrackProfiles_.push_back(book<TProfile>("p_ptResolution_vs_phi","#delta_{p_{T}}/p_{T}^{track};#phi^{track};#delta_{p_{T}}/p_{T}^{track}", 100,-M_PI,M_PI));
1365  vTrackProfiles_.push_back(book<TProfile>("p_ptResolution_vs_eta","#delta_{p_{T}}/p_{T}^{track};#eta^{track};#delta_{p_{T}}/p_{T}^{track}", 100, -etaMax_, etaMax_));
1366  vTrack2DHistos_.push_back(book<TH2F>("h2_d0_vs_phi","Transverse Impact Parameter vs. #phi;#phi_{Track};d_{0} [cm]", 100, -M_PI, M_PI, 100, -1., 1.));
1367  vTrack2DHistos_.push_back(book<TH2F>("h2_phi_vs_eta", "Track #phi vs. #eta;#eta_{Track};#phi_{Track}",50, -etaMax_, etaMax_, 50, -M_PI, M_PI));
1368  vTrack2DHistos_.push_back(book<TH2F>("h2_dz_vs_phi","Longitudinal Impact Parameter vs. #phi;#phi_{Track};d_{z} [cm]",100,-M_PI,M_PI,100,-100.,100.));
1369  vTrack2DHistos_.push_back(book<TH2F>("h2_d0_vs_eta","Transverse Impact Parameter vs. #eta;#eta_{Track};d_{0} [cm]", 100, -etaMax_, etaMax_, 100, -1., 1.));
1370  vTrack2DHistos_.push_back(book<TH2F>("h2_dz_vs_eta","Longitudinal Impact Parameter vs. #eta;#eta_{Track};d_{z} [cm]",100, -etaMax_, etaMax_, 100,-100.,100.));
1371  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2_vs_phi", "#chi^{2} vs. #phi;#phi_{Track};#chi^{2}", 100, -M_PI, M_PI, 500, 0., 500.));
1372  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2Prob_vs_phi","#chi^{2} probability vs. #phi;#phi_{Track};#chi^{2} probability",100,-M_PI,M_PI,100,0.,1.));
1373  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2Prob_vs_d0","#chi^{2} probability vs. |d_{0}|;|d_{0}| [cm];#chi^{2} probability",100,0,80,100,0.,1.));
1374  vTrack2DHistos_.push_back(book<TH2F>("h2_normchi2_vs_phi", "#chi^{2}/ndof vs. #phi;#phi_{Track};#chi^{2}/ndof", 100, -M_PI, M_PI, 100, 0., 10.));
1375  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2_vs_eta", "#chi^{2} vs. #eta;#eta_{Track};#chi^{2}", 100, -etaMax_, etaMax_, 500, 0., 500.));
1376  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2Prob_vs_eta","#chi^{2} probaility vs. #eta;#eta_{Track};#chi^{2} probability",100,-M_PI,M_PI,100,0.,1.));
1377  vTrack2DHistos_.push_back(book<TH2F>("h2_normchi2_vs_eta", "#chi^{2}/ndof vs. #eta;#eta_{Track};#chi^{2}/ndof", 100, -etaMax_, etaMax_, 100, 0., 10.));
1378  vTrack2DHistos_.push_back(book<TH2F>("h2_kappa_vs_phi", "#kappa vs. #phi;#phi_{Track};#kappa", 100, -M_PI, M_PI, 100, .0, .05));
1379  vTrack2DHistos_.push_back(book<TH2F>("h2_kappa_vs_eta", "#kappa vs. #eta;#eta_{Track};#kappa", 100, -etaMax_, etaMax_, 100, .0, .05));
1380  vTrack2DHistos_.push_back(book<TH2F>("h2_normchi2_vs_kappa", "#kappa vs. #chi^{2}/ndof;#chi^{2}/ndof;#kappa", 100, 0., 10, 100, -.03, .03));
1381 
1382  // clang-format on
1383 
1384  firstEvent_ = true;
1385 
1386  // create the full maps
1387  fullPixelmapXDMR->createTrackerBaseMap();
1388  fullPixelmapYDMR->createTrackerBaseMap();
1389 
1390  } //beginJob
TH1D * hTECResXPrime
Definition: DMRChecker.cc:291
TH1D * hPhihp
Definition: DMRChecker.cc:331
Log< level::Info, true > LogVerbatim
TH1D * hPhiOverlapMinus
Definition: DMRChecker.cc:344
TH1D * hFPixZMinusResYPull
Definition: DMRChecker.cc:286
TH1D * hHitCountVsXFPix
Definition: DMRChecker.cc:299
TH1D * hHitCountVsYFPixPlus
Definition: DMRChecker.cc:313
TH1D * hFPixZPlusResXPrime
Definition: DMRChecker.cc:270
TH1D * hHitCountVsXFPixPlus
Definition: DMRChecker.cc:311
TH1D * hHitCountVsYFPixMinus
Definition: DMRChecker.cc:314
TH1D * hFPixZMinusResXPrime
Definition: DMRChecker.cc:271
std::unique_ptr< Phase1PixelSummaryMap > fullPixelmapXDMR
Definition: DMRChecker.cc:243
std::vector< TH1 * > vTrackProfiles_
Definition: DMRChecker.cc:394
TH1D * hHitCountVsZFPixMinus
Definition: DMRChecker.cc:316
TH1D * hnhpxe
Definition: DMRChecker.cc:370
TH1D * hPhiEndcapMinus
Definition: DMRChecker.cc:346
TH1D * hEta
Definition: DMRChecker.cc:338
TH1D * hdxyBS
Definition: DMRChecker.cc:384
TH1D * hd0
Definition: DMRChecker.cc:357
std::map< unsigned int, TH1D * > endcapDisksPullsX
Definition: DMRChecker.cc:459
TH1D * hvz
Definition: DMRChecker.cc:356
TH1D * hTOBResXPrime
Definition: DMRChecker.cc:289
TH1I * htrkQuality
Definition: DMRChecker.cc:255
TH1D * hFPixZPlusResYPull
Definition: DMRChecker.cc:285
TH1D * hHit
Definition: DMRChecker.cc:265
bool firstEvent_
Definition: DMRChecker.cc:466
TH1D * hFPixResYPull
Definition: DMRChecker.cc:284
TH1D * hd0BS
Definition: DMRChecker.cc:385
TH1D * hCharge
Definition: DMRChecker.cc:335
TH1D * hTECResXPull
Definition: DMRChecker.cc:296
TProfile * pNBpixHitsVsVx
Definition: DMRChecker.cc:378
TProfile * pNBpixHitsVsVz
Definition: DMRChecker.cc:380
TH1D * hHitCountVsThetaFPix
Definition: DMRChecker.cc:308
TH1D * hNtrkZoom
Definition: DMRChecker.cc:254
std::map< unsigned int, TH1D * > endcapDisksResidualsX
Definition: DMRChecker.cc:458
TH1D * hHitComposition
Definition: DMRChecker.cc:376
std::map< unsigned int, TH1D * > bookResidualsHistogram(TFileDirectory dir, unsigned int theNLayers, std::string resType, std::string varType, std::string detType)
Definition: DMRChecker.cc:1949
TH1D * hPhiBarrel
Definition: DMRChecker.cc:342
TH1D * hHithp
Definition: DMRChecker.cc:329
TH1D * hHitCountVsZFPixPlus
Definition: DMRChecker.cc:315
TH1D * hvx
Definition: DMRChecker.cc:354
TH1D * hHitCountVsZBPix
Definition: DMRChecker.cc:302
TH1D * hHitCountVsYFPix
Definition: DMRChecker.cc:301
TH1D * hchi2ndofhp
Definition: DMRChecker.cc:332
TH1D * hFPixZPlusResYPrime
Definition: DMRChecker.cc:275
TH2D * hd0vspt
Definition: DMRChecker.cc:367
TH1D * hFPixZPlusResXPull
Definition: DMRChecker.cc:280
TH1D * hTOBResXPull
Definition: DMRChecker.cc:294
TH1D * hPthp
Definition: DMRChecker.cc:328
TH1D * hHitCountVsPhiFPix
Definition: DMRChecker.cc:309
TH1D * hchi2Probhp
Definition: DMRChecker.cc:333
TH1D * hFPixResYPrime
Definition: DMRChecker.cc:274
std::unique_ptr< Phase1PixelSummaryMap > fullPixelmapYDMR
Definition: DMRChecker.cc:244
TH1D * hHitCountVsPhiBPix
Definition: DMRChecker.cc:306
TH1D * hBPixResYPull
Definition: DMRChecker.cc:283
TH1D * hHitCountVsXFPixMinus
Definition: DMRChecker.cc:312
TH1D * hHitCountVsPhiFPixPlus
Definition: DMRChecker.cc:319
TH1D * hQoverPZoom
Definition: DMRChecker.cc:337
TH1D * hPhiEndcapPlus
Definition: DMRChecker.cc:345
TH1D * hHitCountVsThetaFPixPlus
Definition: DMRChecker.cc:318
TH1D * hFPixZMinusResXPull
Definition: DMRChecker.cc:281
TH1D * hHitCountVsZFPix
Definition: DMRChecker.cc:303
TH1D * hdzBS
Definition: DMRChecker.cc:386
TH1D * hP
Definition: DMRChecker.cc:258
TH1D * hNtrk
Definition: DMRChecker.cc:253
TH1D * hnhTOB
Definition: DMRChecker.cc:373
std::map< unsigned int, TH1D * > barrelLayersPullsX
Definition: DMRChecker.cc:454
TH1D * hHitCountVsYBPix
Definition: DMRChecker.cc:300
std::vector< TH1 * > vTrackHistos_
Definition: DMRChecker.cc:393
TH1D * hvy
Definition: DMRChecker.cc:355
TH1D * hdzPV
Definition: DMRChecker.cc:389
TH1D * hPhiOverlapPlus
Definition: DMRChecker.cc:343
std::map< unsigned int, TH1D * > endcapDisksResidualsY
Definition: DMRChecker.cc:460
TH1D * hEtahp
Definition: DMRChecker.cc:330
TH1D * hPt
Definition: DMRChecker.cc:261
TH1D * hlumi
Definition: DMRChecker.cc:391
TH1D * hrun
Definition: DMRChecker.cc:390
TH1D * hFPixResXPrime
Definition: DMRChecker.cc:269
const char * qualities[3]
TH1D * hchi2ndof
Definition: DMRChecker.cc:252
#define M_PI
std::map< unsigned int, TH1D * > barrelLayersResidualsX
Definition: DMRChecker.cc:453
TH1D * hnhTID
Definition: DMRChecker.cc:372
TH1D * hPhi
Definition: DMRChecker.cc:341
TH1D * hHitCountVsPhiFPixMinus
Definition: DMRChecker.cc:322
TH1D * hFPixZMinusResYPrime
Definition: DMRChecker.cc:276
TH1D * hd0PV
Definition: DMRChecker.cc:388
TH1D * hnhTEC
Definition: DMRChecker.cc:374
TH2D * hd0PVvseta
Definition: DMRChecker.cc:362
TH1D * hHitCountVsThetaFPixMinus
Definition: DMRChecker.cc:321
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
std::map< unsigned int, TH1D * > barrelLayersResidualsY
Definition: DMRChecker.cc:455
std::map< unsigned int, TH1D * > barrelLayersPullsY
Definition: DMRChecker.cc:456
TH1D * hBPixResYPrime
Definition: DMRChecker.cc:273
TH1D * hTIBResXPrime
Definition: DMRChecker.cc:288
TH1D * hTIDResXPull
Definition: DMRChecker.cc:295
TProfile * pNBpixHitsVsVy
Definition: DMRChecker.cc:379
TH1D * hPhp
Definition: DMRChecker.cc:327
TH1D * hnhTIB
Definition: DMRChecker.cc:371
TH1D * hFPixResXPull
Definition: DMRChecker.cc:279
static const std::string algoNames[]
Definition: TrackBase.h:147
TH1D * hdz
Definition: DMRChecker.cc:358
const bool isCosmics_
Definition: DMRChecker.cc:471
TH1D * hQoverP
Definition: DMRChecker.cc:336
TH2D * hd0vseta
Definition: DMRChecker.cc:366
TH1D * hdxyPV
Definition: DMRChecker.cc:387
edm::Service< TFileService > fs
Definition: DMRChecker.cc:240
#define DEBUG
Definition: DMRChecker.cc:120
TH1D * hBPixResXPrime
Definition: DMRChecker.cc:268
TH1D * hdxy
Definition: DMRChecker.cc:359
TH1I * htrkAlgo
Definition: DMRChecker.cc:256
TH1D * hHit2D
Definition: DMRChecker.cc:266
TH1D * hHitCountVsThetaBPix
Definition: DMRChecker.cc:305
TH1D * hBPixResXPull
Definition: DMRChecker.cc:278
TH1D * hHitCountVsXBPix
Definition: DMRChecker.cc:298
TH1D * hnhpxb
Definition: DMRChecker.cc:369
TH1D * hTIDResXPrime
Definition: DMRChecker.cc:290
TH2D * hd0PVvspt
Definition: DMRChecker.cc:363
std::map< unsigned int, TH1D * > endcapDisksPullsY
Definition: DMRChecker.cc:461
TH2D * hd0vsphi
Definition: DMRChecker.cc:365
float etaMax_
Definition: DMRChecker.cc:469
TH1D * hTIBResXPull
Definition: DMRChecker.cc:293
TH2D * hd0PVvsphi
Definition: DMRChecker.cc:361
std::vector< TH1 * > vTrack2DHistos_
Definition: DMRChecker.cc:395
TH1D * hNhighPurity
Definition: DMRChecker.cc:257

◆ beginRun()

void DMRChecker::beginRun ( edm::Run const &  run,
edm::EventSetup const &  setup 
)
inlineoverrideprivate

Definition at line 1073 of file DMRChecker.cc.

References MagneticField::inTesla(), PV3DBase< T, PVType, FrameType >::mag(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, dqmiodumpmetadata::n, writedatasetfile::run, seconds(), singleTopDQM_cfi::setup, SiStripLatency::singleReadOutMode(), and edmLumisInFiles::summary.

1075  {
1076  // initialize runInfoMap_
1077  runInfoMap_[run.run()].first = 0;
1078  runInfoMap_[run.run()].second = 0;
1079 
1080  // initialize runHitsMap
1081  for (int n : {0, 1, 2, 3, 4, 5}) {
1082  runHitsMap_[run.run()][n] = 0; // 6 subdets
1083  }
1084 
1085  // Magnetic Field setup
1086  magneticField_ = &setup.getData(magFieldToken_);
1087  float B_ = magneticField_->inTesla(GlobalPoint(0, 0, 0)).mag();
1088 
1089  edm::LogInfo("DMRChecker") << "run number:" << run.run() << " magnetic field: " << B_ << " [T]" << std::endl;
1090 
1091  const RunInfo *summary = &setup.getData(runInfoToken_);
1092  time_t start_time = summary->m_start_time_ll;
1093  ctime(&start_time);
1094  time_t end_time = summary->m_stop_time_ll;
1095  ctime(&end_time);
1096 
1097  float average_current = summary->m_avg_current;
1098  float uptimeInSeconds = summary->m_run_intervall_micros;
1099  edm::LogVerbatim("DMRChecker") << " start_time: " << start_time << " ( " << summary->m_start_time_str << " )"
1100  << " | end_time: " << end_time << " ( " << summary->m_stop_time_str << " )"
1101  << " | average current: " << average_current
1102  << " | uptime in seconds: " << uptimeInSeconds << std::endl;
1103 
1104  double seconds = difftime(end_time, start_time) / 1.0e+6; // convert from micros-seconds
1105  edm::LogVerbatim("DMRChecker") << "time difference: " << seconds << " s" << std::endl;
1106  timeMap_[run.run()] = seconds;
1107 
1108  //SiStrip Latency
1109  const SiStripLatency *apvlat = &setup.getData(latencyToken_);
1110  if (apvlat->singleReadOutMode() == 1) {
1111  mode = 1; // peak mode
1112  } else if (apvlat->singleReadOutMode() == 0) {
1113  mode = -1; // deco mode
1114  }
1115 
1116  conditionsMap_[run.run()].first = mode;
1117  conditionsMap_[run.run()].second = B_;
1118 
1119  // set geometry and topology
1120  trackerGeometry_ = &setup.getData(geomToken_);
1121  trackerTopology_ = &setup.getData(topoToken_);
1122  }
Log< level::Info, true > LogVerbatim
const TrackerTopology * trackerTopology_
Definition: DMRChecker.cc:238
double seconds()
std::map< int, std::array< int, 6 > > runHitsMap_
Definition: DMRChecker.cc:486
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::map< int, std::pair< int, int > > runInfoMap_
Definition: DMRChecker.cc:485
std::map< int, float > timeMap_
Definition: DMRChecker.cc:488
const MagneticField * magneticField_
Definition: DMRChecker.cc:236
T mag() const
Definition: PV3DBase.h:64
std::map< int, std::pair< int, float > > conditionsMap_
Definition: DMRChecker.cc:484
const TrackerGeometry * trackerGeometry_
Definition: DMRChecker.cc:237
Log< level::Info, false > LogInfo
const edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DMRChecker.cc:231
int16_t singleReadOutMode() const
const edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
Definition: DMRChecker.cc:234
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: DMRChecker.cc:233
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: DMRChecker.cc:232
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: DMRChecker.cc:230

◆ book()

template<typename T , typename... Args>
T* DMRChecker::book ( const Args &...  args) const
inline

Definition at line 223 of file DMRChecker.cc.

References writedatasetfile::args, compareTotals::fs, and submitPVValidationJobs::t.

223  {
224  T *t = fs->make<T>(args...);
225  return t;
226  }
edm::Service< TFileService > fs
Definition: DMRChecker.cc:240
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
long double T

◆ bookResidualsHistogram()

std::map<unsigned int, TH1D *> DMRChecker::bookResidualsHistogram ( TFileDirectory  dir,
unsigned int  theNLayers,
std::string  resType,
std::string  varType,
std::string  detType 
)
inlineprivate

Definition at line 1949 of file DMRChecker.cc.

References DeadROC_duringRun::dir, h, mps_fire::i, TH2PolyOfflineMaps::limits, AlCaHLTBitMon_QueryRunRegistry::string, and dumpRecoGeometry_cfg::varType.

1950  {
1951  TH1F::SetDefaultSumw2(kTRUE);
1952 
1953  std::pair<double, double> limits;
1954 
1955  if (varType.find("Res") != std::string::npos) {
1956  limits = std::make_pair(-1000., 1000);
1957  } else {
1958  limits = std::make_pair(-3., 3.);
1959  }
1960 
1961  std::map<unsigned int, TH1D *> h;
1962 
1963  for (unsigned int i = 1; i <= theNLayers; i++) {
1964  const char *name_;
1965  const char *title_;
1966  std::string xAxisTitle_;
1967 
1968  if (varType.find("Res") != std::string::npos) {
1969  xAxisTitle_ = fmt::sprintf("res_{%s'} [#mum]", resType);
1970  } else {
1971  xAxisTitle_ = fmt::sprintf("res_{%s'}/#sigma_{res_{%s`}}", resType, resType);
1972  }
1973 
1974  unsigned int side = -1;
1975  if (detType.find("FPix") != std::string::npos) {
1976  side = (i - 1) / 3 + 1;
1977  unsigned int plane = (i - 1) % 3 + 1;
1978 
1979  std::string theSide = "";
1980  if (side == 1) {
1981  theSide = "Z-";
1982  } else {
1983  theSide = "Z+";
1984  }
1985 
1986  name_ = Form("h_%s%s%s_side%i_disk%i", detType.c_str(), varType.c_str(), resType.c_str(), side, plane);
1987  title_ = Form("%s (%s, disk %i) track %s-%s;%s;hits",
1988  detType.c_str(),
1989  theSide.c_str(),
1990  plane,
1991  resType.c_str(),
1992  varType.c_str(),
1993  xAxisTitle_.c_str());
1994 
1995  } else {
1996  name_ = Form("h_%s%s%s_layer%i", detType.c_str(), varType.c_str(), resType.c_str(), i);
1997  title_ = Form("%s (layer %i) track %s-%s;%s;hits",
1998  detType.c_str(),
1999  i,
2000  resType.c_str(),
2001  varType.c_str(),
2002  xAxisTitle_.c_str());
2003 
2004  //edm::LogPrint("DMRChecker")<<"bookResidualsHistogram(): "<<i<<" layer:"<<i<<std::endl;
2005  }
2006 
2007  h[i] = dir.make<TH1D>(name_, title_, 100, limits.first, limits.second);
2008  }
2009 
2010  return h;
2011  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ bookSplitDMRHistograms()

std::array<TH1D *, 2> DMRChecker::bookSplitDMRHistograms ( TFileDirectory  dir,
std::string  subdet,
std::string  vartype,
bool  isBarrel 
)
inlineprivate

Definition at line 1917 of file DMRChecker.cc.

References DeadROC_duringRun::dir, mps_fire::i, PixelPluginsPhase0_cfi::isBarrel, MillePedeFileConverter_cfg::out, and Validation_hcalonly_cfi::sign.

1920  {
1921  TH1F::SetDefaultSumw2(kTRUE);
1922 
1923  std::array<TH1D *, 2> out;
1924  std::array<std::string, 2> sign_name = {{"plus", "minus"}};
1925  std::array<std::string, 2> sign = {{">0", "<0"}};
1926  for (unsigned int i = 0; i < 2; i++) {
1927  const char *name_;
1928  const char *title_;
1929  const char *axisTitle_;
1930 
1931  if (isBarrel) {
1932  name_ = Form("DMR%s_%s_rDir%s", subdet.c_str(), vartype.c_str(), sign_name[i].c_str());
1933  title_ = Form("Split DMR of %s-%s (rDir%s)", subdet.c_str(), vartype.c_str(), sign[i].c_str());
1934  axisTitle_ = Form("mean of %s-residuals (rDir%s);modules", vartype.c_str(), sign[i].c_str());
1935  } else {
1936  name_ = Form("DMR%s_%s_zDir%s", subdet.c_str(), vartype.c_str(), sign_name[i].c_str());
1937  title_ = Form("Split DMR of %s-%s (zDir%s)", subdet.c_str(), vartype.c_str(), sign[i].c_str());
1938  axisTitle_ = Form("mean of %s-residuals (zDir%s);modules", vartype.c_str(), sign[i].c_str());
1939  }
1940 
1941  out[i] = dir.make<TH1D>(name_, fmt::sprintf("%s;%s", title_, axisTitle_).c_str(), 100., -200, 200);
1942  }
1943  return out;
1944  }

◆ endJob()

void DMRChecker::endJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 1392 of file DMRChecker.cc.

References PixelRegions::attachedDets(), c, gather_cfg::cout, DEBUG, mps_splice::entry, first, alignBH_cfg::fixed, StandaloneTrackerTopology::fromTrackerParametersXMLFile(), compareTotals::fs, contentValuesFiles::fullPath, mps_fire::i, PixelRegions::L1, TFileDirectory::make(), SiPixelPI::one, SiPixelPI::PhaseInfo::pathToTopoXML(), SiPixelPI::PhaseInfo::phase(), crab_NZS2018C_1::runRange, edm::second(), jetUpdater_cfi::sort, mathSSE::sqrt(), fireworks::subdets, and SiPixelPI::zero.

Referenced by o2olib.O2ORunMgr::executeJob().

1392  {
1393  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1394  edm::LogPrint("DMRChecker") << "Events run in total: " << ievt << std::endl;
1395  edm::LogPrint("DMRChecker") << "n. tracks: " << itrks << std::endl;
1396  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1397 
1398  int nFiringTriggers = triggerMap_.size();
1399  edm::LogPrint("DMRChecker") << "firing triggers: " << nFiringTriggers << std::endl;
1400  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1401 
1402  tksByTrigger_ =
1403  book<TH1D>("tksByTrigger", "tracks by HLT path;;% of # traks", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
1404  evtsByTrigger_ =
1405  book<TH1D>("evtsByTrigger", "events by HLT path;;% of # events", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
1406 
1407  if (DEBUG)
1408  edm::LogPrint("DMRChecker") << __FILE__ << "@" << __FUNCTION__ << " L-" << __LINE__ << std::endl;
1409 
1410  int i = 0;
1411  for (const auto &it : triggerMap_) {
1412  i++;
1413 
1414  double trkpercent = ((it.second).second) * 100. / double(itrks);
1415  double evtpercent = ((it.second).first) * 100. / double(ievt);
1416 
1417  std::cout.precision(4);
1418 
1419  edm::LogPrint("DMRChecker") << "HLT path: " << std::setw(60) << left << it.first << " | events firing: " << right
1420  << std::setw(8) << (it.second).first << " (" << setw(8) << fixed << evtpercent << "%)"
1421  << " | tracks collected: " << std::setw(10) << (it.second).second << " (" << setw(8)
1422  << fixed << trkpercent << "%)";
1423 
1424  tksByTrigger_->SetBinContent(i, trkpercent);
1425  tksByTrigger_->GetXaxis()->SetBinLabel(i, (it.first).c_str());
1426 
1427  evtsByTrigger_->SetBinContent(i, evtpercent);
1428  evtsByTrigger_->GetXaxis()->SetBinLabel(i, (it.first).c_str());
1429  }
1430 
1431  if (DEBUG)
1432  edm::LogPrint("DMRChecker") << __FILE__ << "@" << __FUNCTION__ << " L-" << __LINE__ << std::endl;
1433 
1434  int nRuns = conditionsMap_.size();
1435  if (nRuns < 1)
1436  return;
1437 
1438  vector<int> theRuns_;
1439  for (const auto &it : conditionsMap_) {
1440  theRuns_.push_back(it.first);
1441  }
1442 
1443  std::sort(theRuns_.begin(), theRuns_.end());
1444  int runRange = theRuns_.back() - theRuns_.front() + 1;
1445 
1446  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1447  edm::LogPrint("DMRChecker") << "first run: " << theRuns_.front() << std::endl;
1448  edm::LogPrint("DMRChecker") << "last run: " << theRuns_.back() << std::endl;
1449  edm::LogPrint("DMRChecker") << "considered runs: " << nRuns << std::endl;
1450  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1451 
1452  modeByRun_ = book<TH1D>("modeByRun",
1453  "Strip APV mode by run number;;APV mode (-1=deco,+1=peak)",
1454  runRange,
1455  theRuns_.front() - 0.5,
1456  theRuns_.back() + 0.5);
1457  fieldByRun_ = book<TH1D>("fieldByRun",
1458  "CMS B-field intensity by run number;;B-field intensity [T]",
1459  runRange,
1460  theRuns_.front() - 0.5,
1461  theRuns_.back() + 0.5);
1462 
1463  tracksByRun_ = book<TH1D>("tracksByRun",
1464  "n. AlCaReco Tracks by run number;;n. of tracks",
1465  runRange,
1466  theRuns_.front() - 0.5,
1467  theRuns_.back() + 0.5);
1468  hitsByRun_ = book<TH1D>(
1469  "histByRun", "n. of hits by run number;;n. of hits", runRange, theRuns_.front() - 0.5, theRuns_.back() + 0.5);
1470 
1471  trackRatesByRun_ = book<TH1D>("trackRatesByRun",
1472  "rate of AlCaReco Tracks by run number;;n. of tracks/s",
1473  runRange,
1474  theRuns_.front() - 0.5,
1475  theRuns_.back() + 0.5);
1476  eventRatesByRun_ = book<TH1D>("eventRatesByRun",
1477  "rate of AlCaReco Events by run number;;n. of events/s",
1478  runRange,
1479  theRuns_.front() - 0.5,
1480  theRuns_.back() + 0.5);
1481 
1482  hitsinBPixByRun_ = book<TH1D>("histinBPixByRun",
1483  "n. of hits in BPix by run number;;n. of BPix hits",
1484  runRange,
1485  theRuns_.front() - 0.5,
1486  theRuns_.back() + 0.5);
1487  hitsinFPixByRun_ = book<TH1D>("histinFPixByRun",
1488  "n. of hits in FPix by run number;;n. of FPix hits",
1489  runRange,
1490  theRuns_.front() - 0.5,
1491  theRuns_.back() + 0.5);
1492 
1493  for (const auto &the_r : theRuns_) {
1494  if (conditionsMap_.find(the_r)->second.first != 0) {
1495  auto indexing = (the_r - theRuns_.front()) + 1;
1496  double runTime = timeMap_.find(the_r)->second;
1497 
1498  edm::LogPrint("DMRChecker") << "run:" << the_r << " | isPeak: " << std::setw(4)
1499  << conditionsMap_.find(the_r)->second.first
1500  << "| B-field: " << conditionsMap_.find(the_r)->second.second << " [T]"
1501  << "| events: " << setw(10) << runInfoMap_.find(the_r)->second.first
1502  << "(rate: " << setw(10) << (runInfoMap_.find(the_r)->second.first) / runTime
1503  << " ev/s)"
1504  << ", tracks " << setw(10) << runInfoMap_.find(the_r)->second.second
1505  << "(rate: " << setw(10) << (runInfoMap_.find(the_r)->second.second) / runTime
1506  << " trk/s)" << std::endl;
1507 
1508  // int the_bin = modeByRun_->GetXaxis()->FindBin(the_r);
1509  modeByRun_->SetBinContent(indexing, conditionsMap_.find(the_r)->second.first);
1510  modeByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1511  fieldByRun_->SetBinContent(indexing, conditionsMap_.find(the_r)->second.second);
1512  fieldByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1513 
1514  tracksByRun_->SetBinContent(indexing, runInfoMap_.find(the_r)->second.first);
1515  tracksByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1516  hitsByRun_->SetBinContent(indexing, runInfoMap_.find(the_r)->second.second);
1517  hitsByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1518 
1519  hitsinBPixByRun_->SetBinContent(indexing, (runHitsMap_.find(the_r)->second)[0]);
1520  hitsinBPixByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1521  hitsinFPixByRun_->SetBinContent(indexing, (runHitsMap_.find(the_r)->second)[1]);
1522  hitsinFPixByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1523 
1524  trackRatesByRun_->SetBinContent(indexing, (runInfoMap_.find(the_r)->second.second) / runTime);
1525  trackRatesByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1526  eventRatesByRun_->SetBinContent(indexing, (runInfoMap_.find(the_r)->second.first) / runTime);
1527  eventRatesByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1528 
1529  constexpr const char *subdets[]{"BPix", "FPix", "TIB", "TID", "TOB", "TEC"};
1530 
1531  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1532  edm::LogPrint("DMRChecker") << "Hits by SubDetector" << std::endl;
1533  int si = 0;
1534  for (const auto &entry : runHitsMap_.find(the_r)->second) {
1535  edm::LogPrint("DMRChecker") << subdets[si] << " " << entry << std::endl;
1536  si++;
1537  }
1538  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1539  }
1540 
1541  // modeByRun_->GetXaxis()->SetBinLabel(the_r-theRuns_[0]+1,(const char*)the_r);
1542  }
1543 
1544  if (DEBUG)
1545  edm::LogPrint("DMRChecker") << __FILE__ << "@" << __FUNCTION__ << " L-" << __LINE__ << std::endl;
1546 
1547  // DMRs
1548 
1549  TFileDirectory DMeanR = fs->mkdir("DMRs");
1550 
1551  DMRBPixX_ = DMeanR.make<TH1D>("DMRBPix-X", "DMR of BPix-X;mean of X-residuals;modules", 100., -200, 200);
1552  DMRBPixY_ = DMeanR.make<TH1D>("DMRBPix-Y", "DMR of BPix-Y;mean of Y-residuals;modules", 100., -200, 200);
1553 
1554  DMRFPixX_ = DMeanR.make<TH1D>("DMRFPix-X", "DMR of FPix-X;mean of X-residuals;modules", 100., -200, 200);
1555  DMRFPixY_ = DMeanR.make<TH1D>("DMRFPix-Y", "DMR of FPix-Y;mean of Y-residuals;modules", 100., -200, 200);
1556 
1557  DMRTIB_ = DMeanR.make<TH1D>("DMRTIB", "DMR of TIB;mean of X-residuals;modules", 100., -200, 200);
1558  DMRTOB_ = DMeanR.make<TH1D>("DMRTOB", "DMR of TOB;mean of X-residuals;modules", 100., -200, 200);
1559 
1560  DMRTID_ = DMeanR.make<TH1D>("DMRTID", "DMR of TID;mean of X-residuals;modules", 100., -200, 200);
1561  DMRTEC_ = DMeanR.make<TH1D>("DMRTEC", "DMR of TEC;mean of X-residuals;modules", 100., -200, 200);
1562 
1563  TFileDirectory DMeanRSplit = fs->mkdir("SplitDMRs");
1564 
1565  DMRBPixXSplit_ = bookSplitDMRHistograms(DMeanRSplit, "BPix", "X", true);
1566  DMRBPixYSplit_ = bookSplitDMRHistograms(DMeanRSplit, "BPix", "Y", true);
1567 
1568  DMRFPixXSplit_ = bookSplitDMRHistograms(DMeanRSplit, "FPix", "X", false);
1569  DMRFPixYSplit_ = bookSplitDMRHistograms(DMeanRSplit, "FPix", "Y", false);
1570 
1571  DMRTIBSplit_ = bookSplitDMRHistograms(DMeanRSplit, "TIB", "X", true);
1572  DMRTOBSplit_ = bookSplitDMRHistograms(DMeanRSplit, "TOB", "X", true);
1573 
1574  // DRnRs
1575  TFileDirectory DRnRs = fs->mkdir("DRnRs");
1576 
1577  DRnRBPixX_ = DRnRs.make<TH1D>("DRnRBPix-X", "DRnR of BPix-X;rms of normalized X-residuals;modules", 100., 0., 3.);
1578  DRnRBPixY_ = DRnRs.make<TH1D>("DRnRBPix-Y", "DRnR of BPix-Y;rms of normalized Y-residuals;modules", 100., 0., 3.);
1579 
1580  DRnRFPixX_ = DRnRs.make<TH1D>("DRnRFPix-X", "DRnR of FPix-X;rms of normalized X-residuals;modules", 100., 0., 3.);
1581  DRnRFPixY_ = DRnRs.make<TH1D>("DRnRFPix-Y", "DRnR of FPix-Y;rms of normalized Y-residuals;modules", 100., 0., 3.);
1582 
1583  DRnRTIB_ = DRnRs.make<TH1D>("DRnRTIB", "DRnR of TIB;rms of normalized X-residuals;modules", 100., 0., 3.);
1584  DRnRTOB_ = DRnRs.make<TH1D>("DRnRTOB", "DRnR of TOB;rms of normalized Y-residuals;modules", 100., 0., 3.);
1585 
1586  DRnRTID_ = DRnRs.make<TH1D>("DRnRTID", "DRnR of TID;rms of normalized X-residuals;modules", 100., 0., 3.);
1587  DRnRTEC_ = DRnRs.make<TH1D>("DRnRTEC", "DRnR of TEC;rms of normalized Y-residuals;modules", 100., 0., 3.);
1588 
1589  // initialize the topology first
1590 
1591  SiPixelPI::PhaseInfo ph_info(phase_);
1592  const char *path_toTopologyXML = ph_info.pathToTopoXML();
1593  const TrackerTopology standaloneTopo =
1595 
1596  // initialize PixelRegionContainers
1597  PixelDMRS_x_ByLayer = std::make_unique<PixelRegions::PixelRegionContainers>(&standaloneTopo, ph_info.phase());
1598  PixelDMRS_y_ByLayer = std::make_unique<PixelRegions::PixelRegionContainers>(&standaloneTopo, ph_info.phase());
1599 
1600  // book PixelRegionContainers
1601  PixelDMRS_x_ByLayer->bookAll("Barrel Pixel DMRs", "median(x'_{pred}-x'_{hit}) [#mum]", "# modules", 100, -50, 50);
1602  PixelDMRS_y_ByLayer->bookAll("Barrel Pixel DMRs", "median(y'_{pred}-y'_{hit}) [#mum]", "# modules", 100, -50, 50);
1603 
1604  if (DEBUG) {
1605  auto dets = PixelRegions::attachedDets(PixelRegions::PixelId::L1, &standaloneTopo, phase_);
1606  for (const auto &det : dets) {
1607  auto myLocalTopo = PixelDMRS_x_ByLayer->getTheTopo();
1608  edm::LogVerbatim("DMRChecker") << myLocalTopo->print(det) << std::endl;
1609  }
1610  }
1611 
1612  // pixel
1613 
1614  for (auto &bpixid : resDetailsBPixX_) {
1615  DMRBPixX_->Fill(bpixid.second.runningMeanOfRes_);
1616  if (phase_ == SiPixelPI::phase::one) {
1617  pixelmap->fillBarrelBin("DMRsX", bpixid.first, bpixid.second.runningMeanOfRes_);
1618  fullPixelmapXDMR->fillTrackerMap(bpixid.first, bpixid.second.runningMeanOfRes_);
1619  }
1620 
1621  if (DEBUG) {
1622  auto myLocalTopo = PixelDMRS_x_ByLayer->getTheTopo();
1623  edm::LogPrint("DMRChecker") << myLocalTopo->print(bpixid.first) << std::endl;
1624  }
1625 
1626  PixelDMRS_x_ByLayer->fill(bpixid.first, bpixid.second.runningMeanOfRes_);
1627 
1628  // split DMR
1629  if (bpixid.second.rDirection > 0) {
1630  DMRBPixXSplit_[0]->Fill(bpixid.second.runningMeanOfRes_);
1631  } else {
1632  DMRBPixXSplit_[1]->Fill(bpixid.second.runningMeanOfRes_);
1633  }
1634 
1635  if (bpixid.second.hitCount < 2)
1636  DRnRBPixX_->Fill(-1);
1637  else
1638  DRnRBPixX_->Fill(sqrt(bpixid.second.runningNormVarOfRes_ / (bpixid.second.hitCount - 1)));
1639  }
1640 
1641  for (auto &bpixid : resDetailsBPixY_) {
1642  DMRBPixY_->Fill(bpixid.second.runningMeanOfRes_);
1643  if (phase_ == SiPixelPI::phase::one) {
1644  pixelmap->fillBarrelBin("DMRsY", bpixid.first, bpixid.second.runningMeanOfRes_);
1645  fullPixelmapYDMR->fillTrackerMap(bpixid.first, bpixid.second.runningMeanOfRes_);
1646  }
1647 
1648  PixelDMRS_y_ByLayer->fill(bpixid.first, bpixid.second.runningMeanOfRes_);
1649 
1650  // split DMR
1651  if (bpixid.second.rDirection > 0) {
1652  DMRBPixYSplit_[0]->Fill(bpixid.second.runningMeanOfRes_);
1653  } else {
1654  DMRBPixYSplit_[1]->Fill(bpixid.second.runningMeanOfRes_);
1655  }
1656 
1657  if (bpixid.second.hitCount < 2)
1658  DRnRBPixY_->Fill(-1);
1659  else
1660  DRnRBPixY_->Fill(sqrt(bpixid.second.runningNormVarOfRes_ / (bpixid.second.hitCount - 1)));
1661  }
1662 
1663  for (auto &fpixid : resDetailsFPixX_) {
1664  DMRFPixX_->Fill(fpixid.second.runningMeanOfRes_);
1665  if (phase_ == SiPixelPI::phase::one) {
1666  pixelmap->fillForwardBin("DMRsX", fpixid.first, fpixid.second.runningMeanOfRes_);
1667  fullPixelmapXDMR->fillTrackerMap(fpixid.first, fpixid.second.runningMeanOfRes_);
1668  }
1669  PixelDMRS_x_ByLayer->fill(fpixid.first, fpixid.second.runningMeanOfRes_);
1670 
1671  // split DMR
1672  if (fpixid.second.zDirection > 0) {
1673  DMRFPixXSplit_[0]->Fill(fpixid.second.runningMeanOfRes_);
1674  } else {
1675  DMRFPixXSplit_[1]->Fill(fpixid.second.runningMeanOfRes_);
1676  }
1677 
1678  if (fpixid.second.hitCount < 2)
1679  DRnRFPixX_->Fill(-1);
1680  else
1681  DRnRFPixX_->Fill(sqrt(fpixid.second.runningNormVarOfRes_ / (fpixid.second.hitCount - 1)));
1682  }
1683 
1684  for (auto &fpixid : resDetailsFPixY_) {
1685  DMRFPixY_->Fill(fpixid.second.runningMeanOfRes_);
1686  if (phase_ == SiPixelPI::phase::one) {
1687  pixelmap->fillForwardBin("DMRsY", fpixid.first, fpixid.second.runningMeanOfRes_);
1688  fullPixelmapXDMR->fillTrackerMap(fpixid.first, fpixid.second.runningMeanOfRes_);
1689  }
1690  PixelDMRS_y_ByLayer->fill(fpixid.first, fpixid.second.runningMeanOfRes_);
1691 
1692  // split DMR
1693  if (fpixid.second.zDirection > 0) {
1694  DMRFPixYSplit_[0]->Fill(fpixid.second.runningMeanOfRes_);
1695  } else {
1696  DMRFPixYSplit_[1]->Fill(fpixid.second.runningMeanOfRes_);
1697  }
1698 
1699  if (fpixid.second.hitCount < 2)
1700  DRnRFPixY_->Fill(-1);
1701  else
1702  DRnRFPixY_->Fill(sqrt(fpixid.second.runningNormVarOfRes_ / (fpixid.second.hitCount - 1)));
1703  }
1704 
1705  // strips
1706 
1707  for (auto &tibid : resDetailsTIB_) {
1708  DMRTIB_->Fill(tibid.second.runningMeanOfRes_);
1709 
1710  // split DMR
1711  if (tibid.second.rDirection > 0) {
1712  DMRTIBSplit_[0]->Fill(tibid.second.runningMeanOfRes_);
1713  } else {
1714  DMRTIBSplit_[1]->Fill(tibid.second.runningMeanOfRes_);
1715  }
1716 
1717  if (tibid.second.hitCount < 2)
1718  DRnRTIB_->Fill(-1);
1719  else
1720  DRnRTIB_->Fill(sqrt(tibid.second.runningNormVarOfRes_ / (tibid.second.hitCount - 1)));
1721  }
1722 
1723  for (auto &tobid : resDetailsTOB_) {
1724  DMRTOB_->Fill(tobid.second.runningMeanOfRes_);
1725 
1726  // split DMR
1727  if (tobid.second.rDirection > 0) {
1728  DMRTOBSplit_[0]->Fill(tobid.second.runningMeanOfRes_);
1729  } else {
1730  DMRTOBSplit_[1]->Fill(tobid.second.runningMeanOfRes_);
1731  }
1732 
1733  if (tobid.second.hitCount < 2)
1734  DRnRTOB_->Fill(-1);
1735  else
1736  DRnRTOB_->Fill(sqrt(tobid.second.runningNormVarOfRes_ / (tobid.second.hitCount - 1)));
1737  }
1738 
1739  for (auto &tidid : resDetailsTID_) {
1740  DMRTID_->Fill(tidid.second.runningMeanOfRes_);
1741 
1742  if (tidid.second.hitCount < 2)
1743  DRnRTID_->Fill(-1);
1744  else
1745  DRnRTID_->Fill(sqrt(tidid.second.runningNormVarOfRes_ / (tidid.second.hitCount - 1)));
1746  }
1747 
1748  for (auto &tecid : resDetailsTEC_) {
1749  DMRTEC_->Fill(tecid.second.runningMeanOfRes_);
1750 
1751  if (tecid.second.hitCount < 2)
1752  DRnRTEC_->Fill(-1);
1753  else
1754  DRnRTEC_->Fill(sqrt(tecid.second.runningNormVarOfRes_ / (tecid.second.hitCount - 1)));
1755  }
1756 
1757  edm::LogPrint("DMRChecker") << "n. of bpix modules " << resDetailsBPixX_.size() << std::endl;
1758  edm::LogPrint("DMRChecker") << "n. of fpix modules " << resDetailsFPixX_.size() << std::endl;
1759 
1760  if (phase_ == SiPixelPI::phase::zero) {
1761  pmap->save(true, 0, 0, "PixelHitMap.pdf", 600, 800);
1762  pmap->save(true, 0, 0, "PixelHitMap.png", 500, 750);
1763  }
1764 
1765  tmap->save(true, 0, 0, "StripHitMap.pdf");
1766  tmap->save(true, 0, 0, "StripHitMap.png");
1767 
1768  if (phase_ == SiPixelPI::phase::one) {
1769  gStyle->SetPalette(kRainBow);
1770  pixelmap->beautifyAllHistograms();
1771 
1772  TCanvas cBX("CanvXBarrel", "CanvXBarrel", 1200, 1000);
1773  pixelmap->drawBarrelMaps("DMRsX", cBX);
1774  cBX.SaveAs("pixelBarrelDMR_x.png");
1775 
1776  TCanvas cFX("CanvXForward", "CanvXForward", 1600, 1000);
1777  pixelmap->drawForwardMaps("DMRsX", cFX);
1778  cFX.SaveAs("pixelForwardDMR_x.png");
1779 
1780  TCanvas cBY("CanvYBarrel", "CanvYBarrel", 1200, 1000);
1781  pixelmap->drawBarrelMaps("DMRsY", cBY);
1782  cBY.SaveAs("pixelBarrelDMR_y.png");
1783 
1784  TCanvas cFY("CanvXForward", "CanvXForward", 1600, 1000);
1785  pixelmap->drawForwardMaps("DMRsY", cFY);
1786  cFY.SaveAs("pixelForwardDMR_y.png");
1787 
1788  TCanvas cFullPixelxDMR("CanvFullPixelX", "CanvFullPixelX", 3000, 2000);
1789  fullPixelmapXDMR->printTrackerMap(cFullPixelxDMR);
1790  cFullPixelxDMR.SaveAs("fullPixelDMR_x.png");
1791 
1792  TCanvas cFullPixelyDMR("CanvFullPixelX", "CanvFullPixelY", 3000, 2000);
1793  fullPixelmapXDMR->printTrackerMap(cFullPixelyDMR);
1794  cFullPixelyDMR.SaveAs("fullPixelDMR_y.png");
1795  }
1796 
1797  // take care now of the 1D histograms
1798  gStyle->SetOptStat("emr");
1799  PixelDMRS_x_ByLayer->beautify(2, 0);
1800  PixelDMRS_y_ByLayer->beautify(2, 0);
1801 
1802  TCanvas DMRxBarrel("DMRxBarrelCanv", "x-coordinate", 1400, 1200);
1803  DMRxBarrel.Divide(2, 2);
1804  PixelDMRS_x_ByLayer->draw(DMRxBarrel, true, "HISTS");
1805  adjustCanvases(DMRxBarrel, true);
1806  for (unsigned int c = 1; c <= 4; c++) {
1807  DMRxBarrel.cd(c)->Update();
1808  }
1809  PixelDMRS_x_ByLayer->stats();
1810 
1811  TCanvas DMRxForward("DMRxForwardCanv", "x-coordinate", 1400, 1200);
1812  DMRxForward.Divide(4, 3);
1813  PixelDMRS_x_ByLayer->draw(DMRxForward, false, "HISTS");
1814  adjustCanvases(DMRxForward, false);
1815  for (unsigned int c = 1; c <= 12; c++) {
1816  DMRxForward.cd(c)->Update();
1817  }
1818  PixelDMRS_x_ByLayer->stats();
1819 
1820  DMRxBarrel.SaveAs("DMR_x_Barrel_ByLayer.png");
1821  DMRxForward.SaveAs("DMR_x_Forward_ByRing.png");
1822 
1823  TCanvas DMRyBarrel("DMRyBarrelCanv", "y-coordinate", 1400, 1200);
1824  DMRyBarrel.Divide(2, 2);
1825  PixelDMRS_y_ByLayer->draw(DMRyBarrel, true, "HISTS");
1826  adjustCanvases(DMRyBarrel, true);
1827  for (unsigned int c = 1; c <= 4; c++) {
1828  DMRyBarrel.cd(c)->Update();
1829  }
1830  PixelDMRS_y_ByLayer->stats();
1831 
1832  TCanvas DMRyForward("DMRyForwardCanv", "y-coordinate", 1400, 1200);
1833  DMRyForward.Divide(4, 3);
1834  PixelDMRS_y_ByLayer->draw(DMRyForward, false, "HISTS");
1835  adjustCanvases(DMRyForward, false);
1836  for (unsigned int c = 1; c <= 12; c++) {
1837  DMRyForward.cd(c)->Update();
1838  }
1839  PixelDMRS_y_ByLayer->stats();
1840 
1841  DMRyBarrel.SaveAs("DMR_y_Barrel_ByLayer.png");
1842  DMRyForward.SaveAs("DMR_y_Forward_ByRing.png");
1843  }
std::array< TH1D *, 2 > bookSplitDMRHistograms(TFileDirectory dir, std::string subdet, std::string vartype, bool isBarrel)
Definition: DMRChecker.cc:1917
running::estimatorMap resDetailsTEC_
Definition: DMRChecker.cc:502
Log< level::Info, true > LogVerbatim
TH1D * eventRatesByRun_
Definition: DMRChecker.cc:407
TH1D * modeByRun_
Definition: DMRChecker.cc:400
TH1D * tracksByRun_
Definition: DMRChecker.cc:403
TH1D * hitsinFPixByRun_
Definition: DMRChecker.cc:410
std::unique_ptr< Phase1PixelSummaryMap > fullPixelmapXDMR
Definition: DMRChecker.cc:243
running::estimatorMap resDetailsBPixX_
Definition: DMRChecker.cc:492
std::map< std::string, std::pair< int, int > > triggerMap_
Definition: DMRChecker.cc:483
std::map< int, std::array< int, 6 > > runHitsMap_
Definition: DMRChecker.cc:486
running::estimatorMap resDetailsTOB_
Definition: DMRChecker.cc:500
running::estimatorMap resDetailsBPixY_
Definition: DMRChecker.cc:493
running::estimatorMap resDetailsFPixY_
Definition: DMRChecker.cc:495
TH1D * DRnRFPixY_
Definition: DMRChecker.cc:424
std::map< int, std::pair< int, int > > runInfoMap_
Definition: DMRChecker.cc:485
running::estimatorMap resDetailsTID_
Definition: DMRChecker.cc:501
TH1D * trackRatesByRun_
Definition: DMRChecker.cc:406
TH1D * DMRTID_
Definition: DMRChecker.cc:431
std::map< int, float > timeMap_
Definition: DMRChecker.cc:488
TH1D * DRnRFPixX_
Definition: DMRChecker.cc:423
std::array< TH1D *, 2 > DMRTIBSplit_
Definition: DMRChecker.cc:448
U second(std::pair< T, U > const &p)
T * make(const Args &...args) const
make new ROOT object
std::unique_ptr< Phase1PixelSummaryMap > fullPixelmapYDMR
Definition: DMRChecker.cc:244
TH1D * DRnRBPixX_
Definition: DMRChecker.cc:420
std::unique_ptr< PixelRegions::PixelRegionContainers > PixelDMRS_x_ByLayer
Definition: DMRChecker.cc:246
TH1D * DMRBPixY_
Definition: DMRChecker.cc:415
TH1D * DMRTIB_
Definition: DMRChecker.cc:428
std::unique_ptr< TrackerMap > pmap
Definition: DMRChecker.cc:250
std::array< TH1D *, 2 > DMRBPixXSplit_
Definition: DMRChecker.cc:442
T sqrt(T t)
Definition: SSEVec.h:19
TH1D * DRnRTEC_
Definition: DMRChecker.cc:438
TH1D * fieldByRun_
Definition: DMRChecker.cc:401
TH1D * DMRTOB_
Definition: DMRChecker.cc:429
std::map< int, std::pair< int, float > > conditionsMap_
Definition: DMRChecker.cc:484
std::array< TH1D *, 2 > DMRFPixXSplit_
Definition: DMRChecker.cc:445
std::unique_ptr< TrackerMap > tmap
Definition: DMRChecker.cc:249
TH1D * DRnRTIB_
Definition: DMRChecker.cc:434
TH1D * DMRBPixX_
Definition: DMRChecker.cc:414
running::estimatorMap resDetailsFPixX_
Definition: DMRChecker.cc:494
running::estimatorMap resDetailsTIB_
Definition: DMRChecker.cc:499
Log< level::Warning, true > LogPrint
TH1D * DMRFPixY_
Definition: DMRChecker.cc:418
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
TH1D * tksByTrigger_
Definition: DMRChecker.cc:397
std::unique_ptr< Phase1PixelMaps > pixelmap
Definition: DMRChecker.cc:242
SiPixelPI::phase phase_
Definition: DMRChecker.cc:468
TH1D * DRnRTID_
Definition: DMRChecker.cc:437
TH1D * DRnRTOB_
Definition: DMRChecker.cc:435
std::array< TH1D *, 2 > DMRFPixYSplit_
Definition: DMRChecker.cc:446
TH1D * DMRFPixX_
Definition: DMRChecker.cc:417
edm::Service< TFileService > fs
Definition: DMRChecker.cc:240
#define DEBUG
Definition: DMRChecker.cc:120
void adjustCanvases(TCanvas &canvas, bool isBarrel)
Definition: DMRChecker.cc:1848
std::array< TH1D *, 2 > DMRTOBSplit_
Definition: DMRChecker.cc:449
TrackerTopology fromTrackerParametersXMLFile(const std::string &xmlFileName)
std::unique_ptr< PixelRegions::PixelRegionContainers > PixelDMRS_y_ByLayer
Definition: DMRChecker.cc:247
TH1D * DMRTEC_
Definition: DMRChecker.cc:432
TH1D * DRnRBPixY_
Definition: DMRChecker.cc:421
TH1D * evtsByTrigger_
Definition: DMRChecker.cc:398
TH1D * hitsinBPixByRun_
Definition: DMRChecker.cc:409
static const std::string subdets[7]
Definition: TrackUtils.cc:60
static const std::vector< uint32_t > attachedDets(const PixelRegions::PixelId theId, const TrackerTopology *trackTopo, const SiPixelPI::phase &ph)
std::array< TH1D *, 2 > DMRBPixYSplit_
Definition: DMRChecker.cc:443
TH1D * hitsByRun_
Definition: DMRChecker.cc:404

◆ endRun()

void DMRChecker::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivate

Definition at line 1125 of file DMRChecker.cc.

1125 {}

◆ fillByIndex()

void DMRChecker::fillByIndex ( std::map< unsigned int, TH1D *> &  h,
unsigned int  index,
double  x 
)
inlineprivate

Definition at line 2016 of file DMRChecker.cc.

References h, SiStripPI::max, SiStripPI::min, and x.

2016  {
2017  if (h.count(index) != 0) {
2018  //if(TString(h[index]->GetName()).Contains("BPix"))
2019  //edm::LogPrint("DMRChecker")<<"fillByIndex() index: "<< index << " filling histogram: "<< h[index]->GetName() << std::endl;
2020 
2021  double min = h[index]->GetXaxis()->GetXmin();
2022  double max = h[index]->GetXaxis()->GetXmax();
2023  if (x < min)
2024  h[index]->Fill(min);
2025  else if (x >= max)
2026  h[index]->Fill(0.99999 * max);
2027  else
2028  h[index]->Fill(x);
2029  }
2030  }
int index(const std::vector< OBJECT_TYPE *> &vec, const std::string &name)
Definition: DMRChecker.cc:211
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ fillDescriptions()

void DMRChecker::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 2094 of file DMRChecker.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and HLT_2022v14_cff::InputTag.

2096 {
2098  desc.setComment("Generic track analyzer to check ALCARECO sample quantities / compute fast DMRs");
2099  desc.add<edm::InputTag>("TkTag", edm::InputTag("generalTracks"));
2100  desc.add<edm::InputTag>("TriggerResultsTag", edm::InputTag("TriggerResults", "", "HLT"));
2101  desc.add<edm::InputTag>("BeamSpotTag", edm::InputTag("offlineBeamSpot"));
2102  desc.add<edm::InputTag>("VerticesTag", edm::InputTag("offlinePrimaryVertices"));
2103  desc.add<bool>("isCosmics", false);
2104  descriptions.add("DMRChecker", desc);
2105 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillDMRs()

void DMRChecker::fillDMRs ( const running::estimatorMap myDetails,
TH1D *  DMR,
TH1D *  DRnR,
std::array< TH1D *, 2 >  DMRSplit,
std::unique_ptr< PixelRegions::PixelRegionContainers regionalDMR 
)
inlineprivate

Definition at line 2062 of file DMRChecker.cc.

References mathSSE::sqrt().

2066  {
2067  for (const auto &element : myDetails) {
2068  // DMR
2069  DMR->Fill(element.second.runningMeanOfRes_);
2070 
2071  // DMR by layer
2072  if (regionalDMR.get()) {
2073  regionalDMR->fill(element.first, element.second.runningMeanOfRes_);
2074  }
2075 
2076  // split DMR
2077  if (element.second.rOrZDirection > 0) {
2078  DMRSplit[0]->Fill(element.second.runningMeanOfRes_);
2079  } else {
2080  DMRSplit[1]->Fill(element.second.runningMeanOfRes_);
2081  }
2082 
2083  // DRnR
2084  if (element.second.hitCount < 2) {
2085  DRnR->Fill(-1);
2086  } else {
2087  DRnR->Fill(sqrt(element.second.runningNormVarOfRes_ / (element.second.hitCount - 1)));
2088  }
2089  }
2090  }
T sqrt(T t)
Definition: SSEVec.h:19

◆ index()

template<class OBJECT_TYPE >
int DMRChecker::index ( const std::vector< OBJECT_TYPE *> &  vec,
const std::string &  name 
)
inline

Definition at line 211 of file DMRChecker.cc.

References Skims_PA_cff::name.

Referenced by BeautifulSoup.PageElement::insert().

211  {
212  for (const auto &iter : vec | boost::adaptors::indexed(0)) {
213  if (iter.value() && iter.value()->GetName() == name) {
214  return iter.index();
215  }
216  }
217  edm::LogError("Alignment") << "@SUB=DMRChecker::index"
218  << " could not find " << name;
219  return -1;
220  }
Log< level::Error, false > LogError

◆ isHit2D()

bool DMRChecker::isHit2D ( const TrackingRecHit hit)
inlineprivate

Definition at line 1874 of file DMRChecker.cc.

References kBPIX, kFPIX, ProjectedSiStripRecHit2D::originalHit(), SiStripDetId::stereo(), and DetId::Tracker.

1874  {
1875  bool countStereoHitAs2D_ = true;
1876  // we count SiStrip stereo modules as 2D if selected via countStereoHitAs2D_
1877  // (since they provide theta information)
1878  if (!hit.isValid() ||
1879  (hit.dimension() < 2 && !countStereoHitAs2D_ && !dynamic_cast<const SiStripRecHit1D *>(&hit))) {
1880  return false; // real RecHit1D - but SiStripRecHit1D depends on countStereoHitAs2D_
1881  } else {
1882  const DetId detId(hit.geographicalId());
1883  if (detId.det() == DetId::Tracker) {
1884  if (detId.subdetId() == kBPIX || detId.subdetId() == kFPIX) {
1885  return true; // pixel is always 2D
1886  } else { // should be SiStrip now
1887  const SiStripDetId stripId(detId);
1888  if (stripId.stereo())
1889  return countStereoHitAs2D_; // stereo modules
1890  else if (dynamic_cast<const SiStripRecHit1D *>(&hit) || dynamic_cast<const SiStripRecHit2D *>(&hit))
1891  return false; // rphi modules hit
1892  //the following two are not used any more since ages...
1893  else if (dynamic_cast<const SiStripMatchedRecHit2D *>(&hit))
1894  return true; // matched is 2D
1895  else if (dynamic_cast<const ProjectedSiStripRecHit2D *>(&hit)) {
1896  const ProjectedSiStripRecHit2D *pH = static_cast<const ProjectedSiStripRecHit2D *>(&hit);
1897  return (countStereoHitAs2D_ && this->isHit2D(pH->originalHit())); // depends on original...
1898  } else {
1899  edm::LogError("UnknownType") << "@SUB=DMRChecker::isHit2D"
1900  << "Tracker hit not in pixel, neither SiStripRecHit[12]D nor "
1901  << "SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
1902  return false;
1903  }
1904  }
1905  } else { // not tracker??
1906  edm::LogWarning("DetectorMismatch") << "@SUB=DMRChecker::isHit2D"
1907  << "Hit not in tracker with 'official' dimension >=2.";
1908  return true; // dimension() >= 2 so accept that...
1909  }
1910  }
1911  // never reached...
1912  }
Log< level::Error, false > LogError
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
Definition: DetId.h:17
SiStripRecHit2D originalHit() const
Log< level::Warning, false > LogWarning
const int kFPIX
Definition: DMRChecker.cc:126
bool isHit2D(const TrackingRecHit &hit)
Definition: DMRChecker.cc:1874
const int kBPIX
Definition: DMRChecker.cc:125

◆ updateOnlineMomenta()

void DMRChecker::updateOnlineMomenta ( running::estimatorMap myDetails,
uint32_t  theID,
float  the_data,
float  the_pull 
)
inlineprivate

Definition at line 2036 of file DMRChecker.cc.

References dumpMFGeometry_cfg::delta.

2036  {
2037  myDetails[theID].hitCount += 1;
2038 
2039  float delta = 0;
2040  float n_delta = 0;
2041 
2042  if (myDetails[theID].hitCount != 1) {
2043  delta = the_data - myDetails[theID].runningMeanOfRes_;
2044  n_delta = the_pull - myDetails[theID].runningNormMeanOfRes_;
2045  myDetails[theID].runningMeanOfRes_ += (delta / myDetails[theID].hitCount);
2046  myDetails[theID].runningNormMeanOfRes_ += (n_delta / myDetails[theID].hitCount);
2047  } else {
2048  myDetails[theID].runningMeanOfRes_ = the_data;
2049  myDetails[theID].runningNormMeanOfRes_ = the_pull;
2050  }
2051 
2052  float delta2 = the_data - myDetails[theID].runningMeanOfRes_;
2053  float n_delta2 = the_pull - myDetails[theID].runningNormMeanOfRes_;
2054 
2055  myDetails[theID].runningVarOfRes_ += delta * delta2;
2056  myDetails[theID].runningNormVarOfRes_ += n_delta * n_delta2;
2057  }

Member Data Documentation

◆ barrelLayersPullsX

std::map<unsigned int, TH1D *> DMRChecker::barrelLayersPullsX
private

Definition at line 454 of file DMRChecker.cc.

◆ barrelLayersPullsY

std::map<unsigned int, TH1D *> DMRChecker::barrelLayersPullsY
private

Definition at line 456 of file DMRChecker.cc.

◆ barrelLayersResidualsX

std::map<unsigned int, TH1D *> DMRChecker::barrelLayersResidualsX
private

Definition at line 453 of file DMRChecker.cc.

◆ barrelLayersResidualsY

std::map<unsigned int, TH1D *> DMRChecker::barrelLayersResidualsY
private

Definition at line 455 of file DMRChecker.cc.

◆ BeamSpotTag_

edm::InputTag DMRChecker::BeamSpotTag_
private

Definition at line 475 of file DMRChecker.cc.

◆ beamspotToken_

edm::EDGetTokenT<reco::BeamSpot> DMRChecker::beamspotToken_
private

Definition at line 480 of file DMRChecker.cc.

◆ conditionsMap_

std::map<int, std::pair<int, float> > DMRChecker::conditionsMap_
private

Definition at line 484 of file DMRChecker.cc.

◆ DMRBPixX_

TH1D* DMRChecker::DMRBPixX_
private

Definition at line 414 of file DMRChecker.cc.

◆ DMRBPixXSplit_

std::array<TH1D *, 2> DMRChecker::DMRBPixXSplit_
private

Definition at line 442 of file DMRChecker.cc.

◆ DMRBPixY_

TH1D* DMRChecker::DMRBPixY_
private

Definition at line 415 of file DMRChecker.cc.

◆ DMRBPixYSplit_

std::array<TH1D *, 2> DMRChecker::DMRBPixYSplit_
private

Definition at line 443 of file DMRChecker.cc.

◆ DMRFPixX_

TH1D* DMRChecker::DMRFPixX_
private

Definition at line 417 of file DMRChecker.cc.

◆ DMRFPixXSplit_

std::array<TH1D *, 2> DMRChecker::DMRFPixXSplit_
private

Definition at line 445 of file DMRChecker.cc.

◆ DMRFPixY_

TH1D* DMRChecker::DMRFPixY_
private

Definition at line 418 of file DMRChecker.cc.

◆ DMRFPixYSplit_

std::array<TH1D *, 2> DMRChecker::DMRFPixYSplit_
private

Definition at line 446 of file DMRChecker.cc.

◆ DMRTEC_

TH1D* DMRChecker::DMRTEC_
private

Definition at line 432 of file DMRChecker.cc.

◆ DMRTIB_

TH1D* DMRChecker::DMRTIB_
private

Definition at line 428 of file DMRChecker.cc.

◆ DMRTIBSplit_

std::array<TH1D *, 2> DMRChecker::DMRTIBSplit_
private

Definition at line 448 of file DMRChecker.cc.

◆ DMRTID_

TH1D* DMRChecker::DMRTID_
private

Definition at line 431 of file DMRChecker.cc.

◆ DMRTOB_

TH1D* DMRChecker::DMRTOB_
private

Definition at line 429 of file DMRChecker.cc.

◆ DMRTOBSplit_

std::array<TH1D *, 2> DMRChecker::DMRTOBSplit_
private

Definition at line 449 of file DMRChecker.cc.

◆ DRnRBPixX_

TH1D* DMRChecker::DRnRBPixX_
private

Definition at line 420 of file DMRChecker.cc.

◆ DRnRBPixY_

TH1D* DMRChecker::DRnRBPixY_
private

Definition at line 421 of file DMRChecker.cc.

◆ DRnRFPixX_

TH1D* DMRChecker::DRnRFPixX_
private

Definition at line 423 of file DMRChecker.cc.

◆ DRnRFPixY_

TH1D* DMRChecker::DRnRFPixY_
private

Definition at line 424 of file DMRChecker.cc.

◆ DRnRTEC_

TH1D* DMRChecker::DRnRTEC_
private

Definition at line 438 of file DMRChecker.cc.

◆ DRnRTIB_

TH1D* DMRChecker::DRnRTIB_
private

Definition at line 434 of file DMRChecker.cc.

◆ DRnRTID_

TH1D* DMRChecker::DRnRTID_
private

Definition at line 437 of file DMRChecker.cc.

◆ DRnRTOB_

TH1D* DMRChecker::DRnRTOB_
private

Definition at line 435 of file DMRChecker.cc.

◆ endcapDisksPullsX

std::map<unsigned int, TH1D *> DMRChecker::endcapDisksPullsX
private

Definition at line 459 of file DMRChecker.cc.

◆ endcapDisksPullsY

std::map<unsigned int, TH1D *> DMRChecker::endcapDisksPullsY
private

Definition at line 461 of file DMRChecker.cc.

◆ endcapDisksResidualsX

std::map<unsigned int, TH1D *> DMRChecker::endcapDisksResidualsX
private

Definition at line 458 of file DMRChecker.cc.

◆ endcapDisksResidualsY

std::map<unsigned int, TH1D *> DMRChecker::endcapDisksResidualsY
private

Definition at line 460 of file DMRChecker.cc.

◆ etaMax_

float DMRChecker::etaMax_
private

Definition at line 469 of file DMRChecker.cc.

◆ eventRatesByRun_

TH1D* DMRChecker::eventRatesByRun_
private

Definition at line 407 of file DMRChecker.cc.

◆ evtsByTrigger_

TH1D* DMRChecker::evtsByTrigger_
private

Definition at line 398 of file DMRChecker.cc.

◆ fieldByRun_

TH1D* DMRChecker::fieldByRun_
private

Definition at line 401 of file DMRChecker.cc.

◆ firstEvent_

bool DMRChecker::firstEvent_
private

Definition at line 466 of file DMRChecker.cc.

◆ fs

edm::Service<TFileService> DMRChecker::fs
private

Definition at line 240 of file DMRChecker.cc.

◆ fullPixelmapXDMR

std::unique_ptr<Phase1PixelSummaryMap> DMRChecker::fullPixelmapXDMR
private

Definition at line 243 of file DMRChecker.cc.

◆ fullPixelmapYDMR

std::unique_ptr<Phase1PixelSummaryMap> DMRChecker::fullPixelmapYDMR
private

Definition at line 244 of file DMRChecker.cc.

◆ geomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> DMRChecker::geomToken_
private

Definition at line 230 of file DMRChecker.cc.

◆ hBPixResXPrime

TH1D* DMRChecker::hBPixResXPrime
private

Definition at line 268 of file DMRChecker.cc.

◆ hBPixResXPull

TH1D* DMRChecker::hBPixResXPull
private

Definition at line 278 of file DMRChecker.cc.

◆ hBPixResYPrime

TH1D* DMRChecker::hBPixResYPrime
private

Definition at line 273 of file DMRChecker.cc.

◆ hBPixResYPull

TH1D* DMRChecker::hBPixResYPull
private

Definition at line 283 of file DMRChecker.cc.

◆ hCharge

TH1D* DMRChecker::hCharge
private

Definition at line 335 of file DMRChecker.cc.

◆ hchi2ndof

TH1D* DMRChecker::hchi2ndof
private

Definition at line 252 of file DMRChecker.cc.

◆ hchi2ndofhp

TH1D* DMRChecker::hchi2ndofhp
private

Definition at line 332 of file DMRChecker.cc.

◆ hchi2Probhp

TH1D* DMRChecker::hchi2Probhp
private

Definition at line 333 of file DMRChecker.cc.

◆ hd0

TH1D* DMRChecker::hd0
private

Definition at line 357 of file DMRChecker.cc.

◆ hd0BS

TH1D* DMRChecker::hd0BS
private

Definition at line 385 of file DMRChecker.cc.

◆ hd0PV

TH1D* DMRChecker::hd0PV
private

Definition at line 388 of file DMRChecker.cc.

◆ hd0PVvseta

TH2D* DMRChecker::hd0PVvseta
private

Definition at line 362 of file DMRChecker.cc.

◆ hd0PVvsphi

TH2D* DMRChecker::hd0PVvsphi
private

Definition at line 361 of file DMRChecker.cc.

◆ hd0PVvspt

TH2D* DMRChecker::hd0PVvspt
private

Definition at line 363 of file DMRChecker.cc.

◆ hd0vseta

TH2D* DMRChecker::hd0vseta
private

Definition at line 366 of file DMRChecker.cc.

◆ hd0vsphi

TH2D* DMRChecker::hd0vsphi
private

Definition at line 365 of file DMRChecker.cc.

◆ hd0vspt

TH2D* DMRChecker::hd0vspt
private

Definition at line 367 of file DMRChecker.cc.

◆ hDeltaEta

TH1D* DMRChecker::hDeltaEta
private

Definition at line 351 of file DMRChecker.cc.

◆ hDeltaPhi

TH1D* DMRChecker::hDeltaPhi
private

Definition at line 350 of file DMRChecker.cc.

◆ hDeltaR

TH1D* DMRChecker::hDeltaR
private

Definition at line 352 of file DMRChecker.cc.

◆ hdxy

TH1D* DMRChecker::hdxy
private

Definition at line 359 of file DMRChecker.cc.

◆ hdxyBS

TH1D* DMRChecker::hdxyBS
private

Definition at line 384 of file DMRChecker.cc.

◆ hdxyPV

TH1D* DMRChecker::hdxyPV
private

Definition at line 387 of file DMRChecker.cc.

◆ hdz

TH1D* DMRChecker::hdz
private

Definition at line 358 of file DMRChecker.cc.

◆ hdzBS

TH1D* DMRChecker::hdzBS
private

Definition at line 386 of file DMRChecker.cc.

◆ hdzPV

TH1D* DMRChecker::hdzPV
private

Definition at line 389 of file DMRChecker.cc.

◆ hEta

TH1D* DMRChecker::hEta
private

Definition at line 338 of file DMRChecker.cc.

◆ hEtahp

TH1D* DMRChecker::hEtahp
private

Definition at line 330 of file DMRChecker.cc.

◆ hEtaMinus

TH1D* DMRChecker::hEtaMinus
private

Definition at line 340 of file DMRChecker.cc.

◆ hEtaPlus

TH1D* DMRChecker::hEtaPlus
private

Definition at line 339 of file DMRChecker.cc.

◆ hFPixResXPrime

TH1D* DMRChecker::hFPixResXPrime
private

Definition at line 269 of file DMRChecker.cc.

◆ hFPixResXPull

TH1D* DMRChecker::hFPixResXPull
private

Definition at line 279 of file DMRChecker.cc.

◆ hFPixResYPrime

TH1D* DMRChecker::hFPixResYPrime
private

Definition at line 274 of file DMRChecker.cc.

◆ hFPixResYPull

TH1D* DMRChecker::hFPixResYPull
private

Definition at line 284 of file DMRChecker.cc.

◆ hFPixZMinusResXPrime

TH1D* DMRChecker::hFPixZMinusResXPrime
private

Definition at line 271 of file DMRChecker.cc.

◆ hFPixZMinusResXPull

TH1D* DMRChecker::hFPixZMinusResXPull
private

Definition at line 281 of file DMRChecker.cc.

◆ hFPixZMinusResYPrime

TH1D* DMRChecker::hFPixZMinusResYPrime
private

Definition at line 276 of file DMRChecker.cc.

◆ hFPixZMinusResYPull

TH1D* DMRChecker::hFPixZMinusResYPull
private

Definition at line 286 of file DMRChecker.cc.

◆ hFPixZPlusResXPrime

TH1D* DMRChecker::hFPixZPlusResXPrime
private

Definition at line 270 of file DMRChecker.cc.

◆ hFPixZPlusResXPull

TH1D* DMRChecker::hFPixZPlusResXPull
private

Definition at line 280 of file DMRChecker.cc.

◆ hFPixZPlusResYPrime

TH1D* DMRChecker::hFPixZPlusResYPrime
private

Definition at line 275 of file DMRChecker.cc.

◆ hFPixZPlusResYPull

TH1D* DMRChecker::hFPixZPlusResYPull
private

Definition at line 285 of file DMRChecker.cc.

◆ hHit

TH1D* DMRChecker::hHit
private

Definition at line 265 of file DMRChecker.cc.

◆ hHit2D

TH1D* DMRChecker::hHit2D
private

Definition at line 266 of file DMRChecker.cc.

◆ hHitComposition

TH1D* DMRChecker::hHitComposition
private

Definition at line 376 of file DMRChecker.cc.

◆ hHitCountVsPhiBPix

TH1D* DMRChecker::hHitCountVsPhiBPix
private

Definition at line 306 of file DMRChecker.cc.

◆ hHitCountVsPhiFPix

TH1D* DMRChecker::hHitCountVsPhiFPix
private

Definition at line 309 of file DMRChecker.cc.

◆ hHitCountVsPhiFPixMinus

TH1D* DMRChecker::hHitCountVsPhiFPixMinus
private

Definition at line 322 of file DMRChecker.cc.

◆ hHitCountVsPhiFPixPlus

TH1D* DMRChecker::hHitCountVsPhiFPixPlus
private

Definition at line 319 of file DMRChecker.cc.

◆ hHitCountVsThetaBPix

TH1D* DMRChecker::hHitCountVsThetaBPix
private

Definition at line 305 of file DMRChecker.cc.

◆ hHitCountVsThetaFPix

TH1D* DMRChecker::hHitCountVsThetaFPix
private

Definition at line 308 of file DMRChecker.cc.

◆ hHitCountVsThetaFPixMinus

TH1D* DMRChecker::hHitCountVsThetaFPixMinus
private

Definition at line 321 of file DMRChecker.cc.

◆ hHitCountVsThetaFPixPlus

TH1D* DMRChecker::hHitCountVsThetaFPixPlus
private

Definition at line 318 of file DMRChecker.cc.

◆ hHitCountVsXBPix

TH1D* DMRChecker::hHitCountVsXBPix
private

Definition at line 298 of file DMRChecker.cc.

◆ hHitCountVsXFPix

TH1D* DMRChecker::hHitCountVsXFPix
private

Definition at line 299 of file DMRChecker.cc.

◆ hHitCountVsXFPixMinus

TH1D* DMRChecker::hHitCountVsXFPixMinus
private

Definition at line 312 of file DMRChecker.cc.

◆ hHitCountVsXFPixPlus

TH1D* DMRChecker::hHitCountVsXFPixPlus
private

Definition at line 311 of file DMRChecker.cc.

◆ hHitCountVsYBPix

TH1D* DMRChecker::hHitCountVsYBPix
private

Definition at line 300 of file DMRChecker.cc.

◆ hHitCountVsYFPix

TH1D* DMRChecker::hHitCountVsYFPix
private

Definition at line 301 of file DMRChecker.cc.

◆ hHitCountVsYFPixMinus

TH1D* DMRChecker::hHitCountVsYFPixMinus
private

Definition at line 314 of file DMRChecker.cc.

◆ hHitCountVsYFPixPlus

TH1D* DMRChecker::hHitCountVsYFPixPlus
private

Definition at line 313 of file DMRChecker.cc.

◆ hHitCountVsZBPix

TH1D* DMRChecker::hHitCountVsZBPix
private

Definition at line 302 of file DMRChecker.cc.

◆ hHitCountVsZFPix

TH1D* DMRChecker::hHitCountVsZFPix
private

Definition at line 303 of file DMRChecker.cc.

◆ hHitCountVsZFPixMinus

TH1D* DMRChecker::hHitCountVsZFPixMinus
private

Definition at line 316 of file DMRChecker.cc.

◆ hHitCountVsZFPixPlus

TH1D* DMRChecker::hHitCountVsZFPixPlus
private

Definition at line 315 of file DMRChecker.cc.

◆ hHithp

TH1D* DMRChecker::hHithp
private

Definition at line 329 of file DMRChecker.cc.

◆ hHitMinus

TH1D* DMRChecker::hHitMinus
private

Definition at line 325 of file DMRChecker.cc.

◆ hHitPlus

TH1D* DMRChecker::hHitPlus
private

Definition at line 324 of file DMRChecker.cc.

◆ hitsByRun_

TH1D* DMRChecker::hitsByRun_
private

Definition at line 404 of file DMRChecker.cc.

◆ hitsinBPixByRun_

TH1D* DMRChecker::hitsinBPixByRun_
private

Definition at line 409 of file DMRChecker.cc.

◆ hitsinFPixByRun_

TH1D* DMRChecker::hitsinFPixByRun_
private

Definition at line 410 of file DMRChecker.cc.

◆ hltresultsToken_

edm::EDGetTokenT<edm::TriggerResults> DMRChecker::hltresultsToken_
private

Definition at line 479 of file DMRChecker.cc.

◆ hlumi

TH1D* DMRChecker::hlumi
private

Definition at line 391 of file DMRChecker.cc.

◆ hMinPt

TH1D* DMRChecker::hMinPt
private

Definition at line 262 of file DMRChecker.cc.

◆ hMultCand

TH1D* DMRChecker::hMultCand
private

Definition at line 382 of file DMRChecker.cc.

◆ hNhighPurity

TH1D* DMRChecker::hNhighPurity
private

Definition at line 257 of file DMRChecker.cc.

◆ hnhpxb

TH1D* DMRChecker::hnhpxb
private

Definition at line 369 of file DMRChecker.cc.

◆ hnhpxe

TH1D* DMRChecker::hnhpxe
private

Definition at line 370 of file DMRChecker.cc.

◆ hnhTEC

TH1D* DMRChecker::hnhTEC
private

Definition at line 374 of file DMRChecker.cc.

◆ hnhTIB

TH1D* DMRChecker::hnhTIB
private

Definition at line 371 of file DMRChecker.cc.

◆ hnhTID

TH1D* DMRChecker::hnhTID
private

Definition at line 372 of file DMRChecker.cc.

◆ hnhTOB

TH1D* DMRChecker::hnhTOB
private

Definition at line 373 of file DMRChecker.cc.

◆ hNtrk

TH1D* DMRChecker::hNtrk
private

Definition at line 253 of file DMRChecker.cc.

◆ hNtrkZoom

TH1D* DMRChecker::hNtrkZoom
private

Definition at line 254 of file DMRChecker.cc.

◆ hP

TH1D* DMRChecker::hP
private

Definition at line 258 of file DMRChecker.cc.

◆ hPhi

TH1D* DMRChecker::hPhi
private

Definition at line 341 of file DMRChecker.cc.

◆ hPhiBarrel

TH1D* DMRChecker::hPhiBarrel
private

Definition at line 342 of file DMRChecker.cc.

◆ hPhiEndcapMinus

TH1D* DMRChecker::hPhiEndcapMinus
private

Definition at line 346 of file DMRChecker.cc.

◆ hPhiEndcapPlus

TH1D* DMRChecker::hPhiEndcapPlus
private

Definition at line 345 of file DMRChecker.cc.

◆ hPhihp

TH1D* DMRChecker::hPhihp
private

Definition at line 331 of file DMRChecker.cc.

◆ hPhiMinus

TH1D* DMRChecker::hPhiMinus
private

Definition at line 348 of file DMRChecker.cc.

◆ hPhiOverlapMinus

TH1D* DMRChecker::hPhiOverlapMinus
private

Definition at line 344 of file DMRChecker.cc.

◆ hPhiOverlapPlus

TH1D* DMRChecker::hPhiOverlapPlus
private

Definition at line 343 of file DMRChecker.cc.

◆ hPhiPlus

TH1D* DMRChecker::hPhiPlus
private

Definition at line 347 of file DMRChecker.cc.

◆ hPhp

TH1D* DMRChecker::hPhp
private

Definition at line 327 of file DMRChecker.cc.

◆ hPMinus

TH1D* DMRChecker::hPMinus
private

Definition at line 260 of file DMRChecker.cc.

◆ hPPlus

TH1D* DMRChecker::hPPlus
private

Definition at line 259 of file DMRChecker.cc.

◆ hPt

TH1D* DMRChecker::hPt
private

Definition at line 261 of file DMRChecker.cc.

◆ hPthp

TH1D* DMRChecker::hPthp
private

Definition at line 328 of file DMRChecker.cc.

◆ hPtMinus

TH1D* DMRChecker::hPtMinus
private

Definition at line 264 of file DMRChecker.cc.

◆ hPtPlus

TH1D* DMRChecker::hPtPlus
private

Definition at line 263 of file DMRChecker.cc.

◆ hQoverP

TH1D* DMRChecker::hQoverP
private

Definition at line 336 of file DMRChecker.cc.

◆ hQoverPZoom

TH1D* DMRChecker::hQoverPZoom
private

Definition at line 337 of file DMRChecker.cc.

◆ hrun

TH1D* DMRChecker::hrun
private

Definition at line 390 of file DMRChecker.cc.

◆ hTECResXPrime

TH1D* DMRChecker::hTECResXPrime
private

Definition at line 291 of file DMRChecker.cc.

◆ hTECResXPull

TH1D* DMRChecker::hTECResXPull
private

Definition at line 296 of file DMRChecker.cc.

◆ hTIBResXPrime

TH1D* DMRChecker::hTIBResXPrime
private

Definition at line 288 of file DMRChecker.cc.

◆ hTIBResXPull

TH1D* DMRChecker::hTIBResXPull
private

Definition at line 293 of file DMRChecker.cc.

◆ hTIDResXPrime

TH1D* DMRChecker::hTIDResXPrime
private

Definition at line 290 of file DMRChecker.cc.

◆ hTIDResXPull

TH1D* DMRChecker::hTIDResXPull
private

Definition at line 295 of file DMRChecker.cc.

◆ hTOBResXPrime

TH1D* DMRChecker::hTOBResXPrime
private

Definition at line 289 of file DMRChecker.cc.

◆ hTOBResXPull

TH1D* DMRChecker::hTOBResXPull
private

Definition at line 294 of file DMRChecker.cc.

◆ htrkAlgo

TH1I* DMRChecker::htrkAlgo
private

Definition at line 256 of file DMRChecker.cc.

◆ htrkQuality

TH1I* DMRChecker::htrkQuality
private

Definition at line 255 of file DMRChecker.cc.

◆ hvx

TH1D* DMRChecker::hvx
private

Definition at line 354 of file DMRChecker.cc.

◆ hvy

TH1D* DMRChecker::hvy
private

Definition at line 355 of file DMRChecker.cc.

◆ hvz

TH1D* DMRChecker::hvz
private

Definition at line 356 of file DMRChecker.cc.

◆ ievt

int DMRChecker::ievt
private

Definition at line 463 of file DMRChecker.cc.

◆ isCosmics_

const bool DMRChecker::isCosmics_
private

Definition at line 471 of file DMRChecker.cc.

◆ itrks

int DMRChecker::itrks
private

Definition at line 464 of file DMRChecker.cc.

◆ latencyToken_

const edm::ESGetToken<SiStripLatency, SiStripLatencyRcd> DMRChecker::latencyToken_
private

Definition at line 234 of file DMRChecker.cc.

◆ magFieldToken_

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> DMRChecker::magFieldToken_
private

Definition at line 232 of file DMRChecker.cc.

◆ magneticField_

const MagneticField* DMRChecker::magneticField_
private

Definition at line 236 of file DMRChecker.cc.

◆ mode

int DMRChecker::mode
private

Definition at line 465 of file DMRChecker.cc.

Referenced by alignment.Alignment::restrictTo().

◆ modeByRun_

TH1D* DMRChecker::modeByRun_
private

Definition at line 400 of file DMRChecker.cc.

◆ phase_

SiPixelPI::phase DMRChecker::phase_
private

Definition at line 468 of file DMRChecker.cc.

◆ PixelDMRS_x_ByLayer

std::unique_ptr<PixelRegions::PixelRegionContainers> DMRChecker::PixelDMRS_x_ByLayer
private

Definition at line 246 of file DMRChecker.cc.

◆ PixelDMRS_y_ByLayer

std::unique_ptr<PixelRegions::PixelRegionContainers> DMRChecker::PixelDMRS_y_ByLayer
private

Definition at line 247 of file DMRChecker.cc.

◆ pixelmap

std::unique_ptr<Phase1PixelMaps> DMRChecker::pixelmap
private

Definition at line 242 of file DMRChecker.cc.

◆ pmap

std::unique_ptr<TrackerMap> DMRChecker::pmap
private

Definition at line 250 of file DMRChecker.cc.

◆ pNBpixHitsVsVx

TProfile* DMRChecker::pNBpixHitsVsVx
private

Definition at line 378 of file DMRChecker.cc.

◆ pNBpixHitsVsVy

TProfile* DMRChecker::pNBpixHitsVsVy
private

Definition at line 379 of file DMRChecker.cc.

◆ pNBpixHitsVsVz

TProfile* DMRChecker::pNBpixHitsVsVz
private

Definition at line 380 of file DMRChecker.cc.

◆ resDetailsBPixX_

running::estimatorMap DMRChecker::resDetailsBPixX_
private

Definition at line 492 of file DMRChecker.cc.

◆ resDetailsBPixY_

running::estimatorMap DMRChecker::resDetailsBPixY_
private

Definition at line 493 of file DMRChecker.cc.

◆ resDetailsFPixX_

running::estimatorMap DMRChecker::resDetailsFPixX_
private

Definition at line 494 of file DMRChecker.cc.

◆ resDetailsFPixY_

running::estimatorMap DMRChecker::resDetailsFPixY_
private

Definition at line 495 of file DMRChecker.cc.

◆ resDetailsTEC_

running::estimatorMap DMRChecker::resDetailsTEC_
private

Definition at line 502 of file DMRChecker.cc.

◆ resDetailsTIB_

running::estimatorMap DMRChecker::resDetailsTIB_
private

Definition at line 499 of file DMRChecker.cc.

◆ resDetailsTID_

running::estimatorMap DMRChecker::resDetailsTID_
private

Definition at line 501 of file DMRChecker.cc.

◆ resDetailsTOB_

running::estimatorMap DMRChecker::resDetailsTOB_
private

Definition at line 500 of file DMRChecker.cc.

◆ runHitsMap_

std::map<int, std::array<int, 6> > DMRChecker::runHitsMap_
private

Definition at line 486 of file DMRChecker.cc.

◆ runInfoMap_

std::map<int, std::pair<int, int> > DMRChecker::runInfoMap_
private

Definition at line 485 of file DMRChecker.cc.

◆ runInfoToken_

const edm::ESGetToken<RunInfo, RunInfoRcd> DMRChecker::runInfoToken_
private

Definition at line 231 of file DMRChecker.cc.

◆ theTrackCollectionToken_

edm::EDGetTokenT<reco::TrackCollection> DMRChecker::theTrackCollectionToken_
private

Definition at line 478 of file DMRChecker.cc.

◆ timeMap_

std::map<int, float> DMRChecker::timeMap_
private

Definition at line 488 of file DMRChecker.cc.

◆ tksByTrigger_

TH1D* DMRChecker::tksByTrigger_
private

Definition at line 397 of file DMRChecker.cc.

◆ TkTag_

edm::InputTag DMRChecker::TkTag_
private

Definition at line 473 of file DMRChecker.cc.

◆ tmap

std::unique_ptr<TrackerMap> DMRChecker::tmap
private

Definition at line 249 of file DMRChecker.cc.

◆ topoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> DMRChecker::topoToken_
private

Definition at line 233 of file DMRChecker.cc.

◆ trackerGeometry_

const TrackerGeometry* DMRChecker::trackerGeometry_
private

Definition at line 237 of file DMRChecker.cc.

◆ trackerTopology_

const TrackerTopology* DMRChecker::trackerTopology_
private

Definition at line 238 of file DMRChecker.cc.

◆ trackRatesByRun_

TH1D* DMRChecker::trackRatesByRun_
private

Definition at line 406 of file DMRChecker.cc.

◆ tracksByRun_

TH1D* DMRChecker::tracksByRun_
private

Definition at line 403 of file DMRChecker.cc.

◆ triggerMap_

std::map<std::string, std::pair<int, int> > DMRChecker::triggerMap_
private

Definition at line 483 of file DMRChecker.cc.

◆ TriggerResultsTag_

edm::InputTag DMRChecker::TriggerResultsTag_
private

Definition at line 474 of file DMRChecker.cc.

◆ vertexToken_

edm::EDGetTokenT<reco::VertexCollection> DMRChecker::vertexToken_
private

Definition at line 481 of file DMRChecker.cc.

◆ VerticesTag_

edm::InputTag DMRChecker::VerticesTag_
private

Definition at line 476 of file DMRChecker.cc.

◆ vTrack2DHistos_

std::vector<TH1 *> DMRChecker::vTrack2DHistos_
private

Definition at line 395 of file DMRChecker.cc.

◆ vTrackHistos_

std::vector<TH1 *> DMRChecker::vTrackHistos_
private

Definition at line 393 of file DMRChecker.cc.

◆ vTrackProfiles_

std::vector<TH1 *> DMRChecker::vTrackProfiles_
private

Definition at line 394 of file DMRChecker.cc.