|
|
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)) {
126 for (edm::SimTrackContainer::const_iterator simTrkItr =
simTracks->begin(); simTrkItr !=
simTracks->end();
128 if (simTrkItr->charge() == 0)
130 int vtxIndex = simTrkItr->vertIndex();
134 if (!
vtx.noParent()) {
135 int trkId =
vtx.parentIndex();
140 if (vtxIndex == 0 || vtxParent == 0)
150 float simTk_pt = simTrkItr->momentum().pt();
151 float simTk_eta = simTrkItr->momentum().eta();
152 float simTk_phi = simTrkItr->momentum().phi();
163 it.second.nDigis = 0;
172 DigiMEs& local_mes = it.second;
173 if (it.second.nHits < nHitCutoff) {
174 if (std::fabs(simTk_eta) < 1.0)
176 if (simTk_pt >
ptCut_ && std::fabs(simTk_eta) < 1.0)
178 if (std::fabs(simTk_eta) < 1.0 && simTk_pt >
ptCut_)
194 unsigned int id = simTrk.
trackId();
198 const auto& simHitHandle =
iEvent.getHandle(itoken);
199 if (!simHitHandle.isValid())
202 for (edm::PSimHitContainer::const_iterator isim =
simHits.begin(); isim !=
simHits.end(); ++isim) {
203 if ((*isim).trackId() !=
id)
210 unsigned int rawid = (*isim).detUnitId();
224 const DetId detId(rawid);
225 float dZ = (*isim).entryPoint().z() - (*isim).exitPoint().z();
226 if (fabs(dZ) <= 0.01)
247 int nColumns = tkDetUnit->specificTopology().ncolumns();
256 local_mes.
SimHitDx->
Fill(std::fabs((*isim).entryPoint().x() - (*isim).exitPoint().x()));
258 local_mes.
SimHitDy->
Fill(std::fabs((*isim).entryPoint().y() - (*isim).exitPoint().y()));
260 local_mes.
SimHitDz->
Fill(std::fabs((*isim).entryPoint().z() - (*isim).exitPoint().z()));
303 pos->second.nDigis++;
331 int col = di->column();
348 int col = di->column();
390 HistoName <<
"NumberOfSimulatedVertices";
587 if (theTkDigiGeomWatcher.
check(iSetup)) {
589 unsigned int detId_raw = det_u->geographicalId().rawId();
643 std::map<std::string, DigiMEs>::iterator
pos =
layerMEs.find(
key);
649 bool isPStypeModForTEDD_1 =
651 bool isPStypeModForTEDD_2 =
655 (
flag || (
layer < 4 || (
layer > 6 && (isPStypeModForTEDD_1 || isPStypeModForTEDD_2)))) ?
true :
false;
659 edm::LogInfo(
"Phase2TrackerValidateDigi") <<
" Booking Histograms in : " <<
key;
880 HistoName <<
"MissedDigiLocalXPosvsYPos";
900 unsigned int& channel) {
903 unsigned int simTrkId(0);
904 if (isearch == simLinks->
end())
912 if (channel == it->channel()) {
913 simTrkId = it->SimTrackId();
923 unsigned int rawid = DSViter->id;
932 std::map<std::string, DigiMEs>::iterator
pos =
layerMEs.find(
key);
937 std::map<int, float> bxMap;
940 int bx = di->eventId().bunchCrossing();
941 std::map<int, float>::iterator ic = bxMap.find(
bx);
942 if (ic == bxMap.end())
947 for (
const auto&
v : bxMap) {
959 unsigned int rawid = DSViter->id;
968 std::map<std::string, DigiMEs>::iterator
pos =
layerMEs.find(
key);
973 std::map<int, float> bxMap;
976 int bx = di->eventId().bunchCrossing();
977 std::map<int, float>::iterator ic = bxMap.find(
bx);
978 if (ic == bxMap.end())
983 for (
const auto&
v : bxMap) {
996 for (
unsigned int it = 0; it < sim_tracks.size(); it++) {
997 if (sim_tracks[it].trackId() == simTrkId) {
1007 bool retval =
false;
1008 unsigned int trkId = simTrk.
trackId();
1009 if (trkId !=
simHit.trackId())
1013 if ((vtxIndex == 0) && (
ptype == 0))
1024 if (th2 && primary == 1)
1026 if (th3 && primary != 1)
const TrackerGeomDet * idToDet(DetId) const override
bool check(const edm::EventSetup &iSetup)
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)
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
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
const edm::DetSetVector< PixelDigiSimLink > * itSimLink_
constexpr std::array< uint8_t, layerIndexSize > layer
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
MonitorElement * SimTrackEta
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, bool flag)
MonitorElement * SimTrackPt
MonitorElement * SimulatedTrackPhi
MonitorElement * MissedDigiSimHitElossP
MonitorElement * nSimulatedTracksS
bool getData(T &iHolder) const
unsigned int trackId() const
const TrackerTopology * tTopo_
const edm::DetSetVector< PixelDigi > * itdigis_
MonitorElement * MatchedSimHitElossP
edm::Handle< edm::SimVertexContainer > simVertices
const edm::DetSetVector< Phase2TrackerDigi > * otdigis_
const edm::DetSetVector< PixelDigiSimLink > * otSimLink_
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())
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