|
|
Go to the documentation of this file.
52 pixelFlag_(config_.getParameter<
bool>(
"PixelPlotFillingFlag")),
53 geomType_(config_.getParameter<
std::
string>(
"GeometryType")),
54 otDigiSrc_(config_.getParameter<
edm::
InputTag>(
"OuterTrackerDigiSource")),
55 otDigiSimLinkSrc_(config_.getParameter<
edm::
InputTag>(
"OuterTrackerDigiSimLinkSource")),
56 itPixelDigiSrc_(config_.getParameter<
edm::
InputTag>(
"InnerPixelDigiSource")),
57 itPixelDigiSimLinkSrc_(config_.getParameter<
edm::
InputTag>(
"InnerPixelDigiSimLinkSource")),
59 simTrackSrc_(config_.getParameter<
edm::
InputTag>(
"SimTrackSource")),
60 simVertexSrc_(config_.getParameter<
edm::
InputTag>(
"SimVertexSource")),
63 itPixelDigiToken_(consumes<
edm::DetSetVector<
PixelDigi> >(itPixelDigiSrc_)),
64 itPixelDigiSimLinkToken_(consumes<
edm::DetSetVector<
PixelDigiSimLink> >(itPixelDigiSimLinkSrc_)),
69 GeVperElectron(3.61E-09),
72 simHitTokens_.push_back(consumes<edm::PSimHitContainer>(itag));
79 edm::LogInfo(
"Phase2TrackerValidateDigi") <<
">>> Construct Phase2TrackerValidateDigi ";
88 edm::LogInfo(
"Phase2TrackerValidateDigi") <<
">>> Destroy Phase2TrackerValidateDigi ";
95 if (theTkDigiGeomWatcher.
check(iSetup)) {
129 for (edm::SimTrackContainer::const_iterator simTrkItr =
simTracks->begin(); simTrkItr !=
simTracks->end();
131 if (simTrkItr->charge() == 0)
133 int vtxIndex = simTrkItr->vertIndex();
137 if (!
vtx.noParent()) {
138 int trkId =
vtx.parentIndex();
143 if (vtxIndex == 0 || vtxParent == 0)
153 float simTk_pt = simTrkItr->momentum().pt();
154 float simTk_eta = simTrkItr->momentum().eta();
155 float simTk_phi = simTrkItr->momentum().phi();
166 it.second.nDigis = 0;
175 DigiMEs& local_mes = it.second;
176 if (it.second.nHits < nHitCutoff) {
177 if (std::fabs(simTk_eta) < 1.0)
179 if (simTk_pt >
ptCut_ && std::fabs(simTk_eta) < 1.0)
181 if (std::fabs(simTk_eta) < 1.0 && simTk_pt >
ptCut_)
198 unsigned int id = simTrk.
trackId();
201 iEvent.getByToken(itoken, simHitHandle);
205 for (edm::PSimHitContainer::const_iterator isim =
simHits.begin(); isim !=
simHits.end(); ++isim) {
206 if ((*isim).trackId() !=
id)
213 unsigned int rawid = (*isim).detUnitId();
227 const DetId detId(rawid);
228 float dZ = (*isim).entryPoint().z() - (*isim).exitPoint().z();
229 if (fabs(dZ) <= 0.01)
250 int nColumns = tkDetUnit->specificTopology().ncolumns();
259 local_mes.
SimHitDx->
Fill(std::fabs((*isim).entryPoint().x() - (*isim).exitPoint().x()));
261 local_mes.
SimHitDy->
Fill(std::fabs((*isim).entryPoint().y() - (*isim).exitPoint().y()));
263 local_mes.
SimHitDz->
Fill(std::fabs((*isim).entryPoint().z() - (*isim).exitPoint().z()));
306 pos->second.nDigis++;
334 if (DSVIter != digis->
end()) {
336 int col = di->column();
354 if (DSVIter != digis->
end()) {
356 int col = di->column();
398 HistoName <<
"NumberOfSimulatedVertices";
595 if (theTkDigiGeomWatcher.
check(iSetup)) {
597 unsigned int detId_raw = det_u->geographicalId().rawId();
651 std::map<std::string, DigiMEs>::iterator
pos =
layerMEs.find(
key);
657 bool isPStypeModForTEDD_1 =
659 bool isPStypeModForTEDD_2 =
663 (
flag || (layer < 4 || (layer > 6 && (isPStypeModForTEDD_1 || isPStypeModForTEDD_2)))) ?
true :
false;
667 edm::LogInfo(
"Phase2TrackerValidateDigi") <<
" Booking Histograms in : " <<
key;
888 HistoName <<
"MissedDigiLocalXPosvsYPos";
908 unsigned int& channel) {
911 unsigned int simTrkId(0);
912 if (isearch == simLinks->
end())
920 if (channel == it->channel()) {
921 simTrkId = it->SimTrackId();
931 unsigned int rawid = DSViter->id;
940 std::map<std::string, DigiMEs>::iterator
pos =
layerMEs.find(
key);
945 std::map<int, float> bxMap;
948 int bx = di->eventId().bunchCrossing();
949 std::map<int, float>::iterator ic = bxMap.find(
bx);
950 if (ic == bxMap.end())
955 for (
const auto&
v : bxMap) {
967 unsigned int rawid = DSViter->id;
976 std::map<std::string, DigiMEs>::iterator
pos =
layerMEs.find(
key);
981 std::map<int, float> bxMap;
984 int bx = di->eventId().bunchCrossing();
985 std::map<int, float>::iterator ic = bxMap.find(
bx);
986 if (ic == bxMap.end())
991 for (
const auto&
v : bxMap) {
1004 for (
unsigned int it = 0; it < sim_tracks.size(); it++) {
1005 if (sim_tracks[it].trackId() == simTrkId) {
1015 bool retval =
false;
1016 unsigned int trkId = simTrk.
trackId();
1017 if (trkId !=
simHit.trackId())
1021 if ((vtxIndex == 0) && (
ptype == 0))
1032 if (th2 && primary == 1)
1034 if (th3 && primary != 1)
const TrackerGeomDet * idToDet(DetId) const override
bool check(const edm::EventSetup &iSetup)
T const * product() const
const float GeVperElectron
MonitorElement * MatchedTrackEta
const math::XYZTLorentzVectorD & momentum() const
MonitorElement * MissedHitTrackPhi
unsigned int getSimTrackId(const edm::DetSetVector< PixelDigiSimLink > *simLinks, const DetId &detId, unsigned int &channel)
MonitorElement * MatchedRZPositionMap
std::string getHistoId(uint32_t det_id, bool flag)
MonitorElement * MatchedTrackPt
T const * product() const
iterator end()
Return the off-the-end iterator.
int matchedSimTrack(edm::Handle< edm::SimTrackContainer > &SimTk, unsigned int simTrkId)
MonitorElement * SimulatedTrackPtP
int getITPixelLayerNumber(const DetId &id) const
int getOTLayerNumber(const DetId &id) const
~Phase2TrackerValidateDigi() override
std::vector< edm::EDGetTokenT< edm::PSimHitContainer > > simHitTokens_
virtual void setCurrentFolder(std::string const &fullpath)
int fillSimHitInfo(const edm::Event &iEvent, const SimTrack simTrk)
edm::Handle< edm::DetSetVector< Phase2TrackerDigi > > otDigiHandle_
iterator begin()
Return an iterator to the first DetSet.
MonitorElement * MissedDigiTrackPhi
MonitorElement * MatchedTrackPhi
MonitorElement * MatchedSimHitElossS
MonitorElement * SimHitDx
Log< level::Info, false > LogInfo
MonitorElement * SimHitDz
MonitorElement * BunchXTimeBin
edm::Handle< edm::DetSetVector< PixelDigi > > itPixelDigiHandle_
unsigned int tidRing(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
MonitorElement * SimulatedTOFZMap
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const TrackerGeometry * tkGeom_
const Plane & surface() const
The nominal surface of the GeomDet.
MonitorElement * SimulatedTOFPhiMap
bool findITPixelDigi(unsigned int detid, unsigned int id)
MonitorElement * SimulatedTOFRMap
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< edm::SimVertexContainer > simVertexToken_
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
MonitorElement * SimulatedTrackPhiP
bool isPrimary(const SimTrack &simTrk, const PSimHit &simHit)
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
std::map< std::string, DigiMEs > layerMEs
MonitorElement * nSimVertices
MonitorElement * SimulatedTrackPtS
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * MissedDigiSimHitElossS
MonitorElement * MissedHitTrackEta
Phase2TrackerValidateDigi(const edm::ParameterSet &)
const edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken_
static int pixelToChannel(int row, int col)
MonitorElement * FractionOfOOTDigis
MonitorElement * MissedDigiTimeWindow
MonitorElement * MissedDigiTrackPt
MonitorElement * SimHitDy
MonitorElement * SimulatedRZPositionMap
MonitorElement * nSimulatedTracks
MonitorElement * SimulatedTrackEtaP
MonitorElement * MatchedXYPositionMap
MonitorElement * MissedHitTrackPt
MonitorElement * SimulatedTOFEtaMap
MonitorElement * SimulatedTrackEta
const edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > otDigiToken_
MonitorElement * SimulatedTrackPhiS
MonitorElement * SimTrackPhi
MonitorElement * SimulatedTrackEtaS
collection_type::const_iterator const_iterator
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
iterator find(det_id_type id)
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > itPixelDigiToken_
std::vector< edm::InputTag > pSimHitSrc_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > itPixelDigiSimLinkToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
MonitorElement * nSimulatedTracksP
MonitorElement * MissedDigiLocalXposVsYPos
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > otSimLinkHandle_
MonitorElement * SimTrackEta
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, bool flag)
MonitorElement * SimTrackPt
MonitorElement * SimulatedTrackPhi
MonitorElement * MissedDigiSimHitElossP
MonitorElement * nSimulatedTracksS
unsigned int trackId() const
const TrackerTopology * tTopo_
MonitorElement * MatchedSimHitElossP
edm::Handle< edm::SimVertexContainer > simVertices
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
edm::Handle< edm::PSimHitContainer > simHits
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
std::vector< SimTrack > SimTrackContainer
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > itPixelSimLinkHandle_
int vertIndex() const
index of the vertex in the Event container (-1 if no vertex)
T getParameter(std::string const &) const
void fillHistogram(MonitorElement *th1, MonitorElement *th2, MonitorElement *th3, float val, int primary)
MonitorElement * MissedDigiTrackEta
std::vector< PSimHit > PSimHitContainer
MonitorElement * SimulatedTrackPt
edm::ParameterSet config_
MonitorElement * SimulatedXYPositionMap
vector< ParameterSet > Parameters
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > otDigiSimLinkToken_
bool findOTDigi(unsigned int detid, unsigned int id)
std::vector< SimVertex > SimVertexContainer
Geom::Phi< T > phi() const
edm::Handle< edm::SimTrackContainer > simTracks
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
collection_type::const_iterator const_iterator