|
|
Go to the documentation of this file.
51 pixelFlag_(config_.getParameter<
bool>(
"PixelPlotFillingFlag")),
52 geomType_(config_.getParameter<
std::
string>(
"GeometryType")),
53 otDigiSrc_(config_.getParameter<
edm::
InputTag>(
"OuterTrackerDigiSource")),
54 otDigiSimLinkSrc_(config_.getParameter<
edm::
InputTag>(
"OuterTrackerDigiSimLinkSource")),
55 itPixelDigiSrc_(config_.getParameter<
edm::
InputTag>(
"InnerPixelDigiSource")),
56 itPixelDigiSimLinkSrc_(config_.getParameter<
edm::
InputTag>(
"InnerPixelDigiSimLinkSource")),
57 pSimHitSrc_(config_.getParameter<
std::vector<
edm::
InputTag> >(
"PSimHitSource")),
58 simTrackSrc_(config_.getParameter<
edm::
InputTag>(
"SimTrackSource")),
59 simVertexSrc_(config_.getParameter<
edm::
InputTag>(
"SimVertexSource")),
62 itPixelDigiToken_(consumes<
edm::DetSetVector<
PixelDigi> >(itPixelDigiSrc_)),
63 itPixelDigiSimLinkToken_(consumes<
edm::DetSetVector<
PixelDigiSimLink> >(itPixelDigiSimLinkSrc_)),
66 GeVperElectron(3.61E-09),
69 simHitTokens_.push_back(consumes<edm::PSimHitContainer>(itag));
76 edm::LogInfo(
"Phase2TrackerValidateDigi") <<
">>> Construct Phase2TrackerValidateDigi ";
85 edm::LogInfo(
"Phase2TrackerValidateDigi") <<
">>> Destroy Phase2TrackerValidateDigi ";
115 if (theTkDigiGeomWatcher.
check(iSetup)) {
127 for (edm::SimTrackContainer::const_iterator simTrkItr =
simTracks->begin(); simTrkItr !=
simTracks->end();
129 if (simTrkItr->charge() == 0)
131 int vtxIndex = simTrkItr->vertIndex();
135 if (!
vtx.noParent()) {
136 int trkId =
vtx.parentIndex();
141 if (vtxIndex == 0 || vtxParent == 0)
151 float simTk_pt = simTrkItr->momentum().pt();
152 float simTk_eta = simTrkItr->momentum().eta();
153 float simTk_phi = simTrkItr->momentum().phi();
164 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_)
202 unsigned int id = simTrk.
trackId();
205 iEvent.getByToken(itoken, simHitHandle);
209 for (edm::PSimHitContainer::const_iterator isim =
simHits.begin(); isim !=
simHits.end(); ++isim) {
210 if ((*isim).trackId() !=
id)
217 unsigned int rawid = (*isim).detUnitId();
231 const DetId detId(rawid);
232 float dZ = (*isim).entryPoint().z() - (*isim).exitPoint().z();
233 if (fabs(dZ) <= 0.01)
254 int nColumns = tkDetUnit->specificTopology().ncolumns();
263 local_mes.
SimHitDx->
Fill(std::fabs((*isim).entryPoint().x() - (*isim).exitPoint().x()));
265 local_mes.
SimHitDy->
Fill(std::fabs((*isim).entryPoint().y() - (*isim).exitPoint().y()));
267 local_mes.
SimHitDz->
Fill(std::fabs((*isim).entryPoint().z() - (*isim).exitPoint().z()));
310 pos->second.nDigis++;
338 if (DSVIter != digis->
end()) {
340 int col = di->column();
358 if (DSVIter != digis->
end()) {
360 int col = di->column();
402 HistoName <<
"NumberOfSimulatedVertices";
599 HistoName <<
"NumberOfSimHitsPerTrackVsLayer";
607 if (theTkDigiGeomWatcher.
check(iSetup)) {
612 for (
auto const& det_u : tGeom->
detUnits()) {
613 unsigned int detId_raw = det_u->geographicalId().rawId();
668 std::map<uint32_t, DigiMEs>::iterator
pos =
layerMEs.find(layer);
673 std::ostringstream fname1, fname2,
tag;
676 fname2 <<
"Layer_" << layer;
678 int side = layer / 100;
679 int idisc = layer - side * 100;
680 fname1 <<
"EndCap_Side_" << side;
681 fname2 <<
"Disc_" << idisc;
687 <<
"/" << fname1.str() <<
"/" << fname2.str();
698 HistoName <<
"SimTrackPt_" << fname2.str();
708 HistoName <<
"MatchedTrackPt_" << fname2.str();
718 HistoName <<
"MissedHitTrackPt_" << fname2.str();
728 HistoName <<
"MissedDigiTrackPt_" << fname2.str();
740 HistoName <<
"SimTrackEta_" << fname2.str();
750 HistoName <<
"MatchedTrackEta_" << fname2.str();
760 HistoName <<
"MissedHitTrackEta_" << fname2.str();
770 HistoName <<
"MissedDigiTrackEta_" << fname2.str();
782 HistoName <<
"SimTrackPhi_" << fname2.str();
792 HistoName <<
"MatchedTrackPhi_" << fname2.str();
802 HistoName <<
"MissedHitTrackPhi_" << fname2.str();
812 HistoName <<
"MissedDigiTrackPhi_" << fname2.str();
824 HistoName <<
"MatchedSimHitElossS_" << fname2.str();
834 HistoName <<
"MatchedSimHitElossP_" << fname2.str();
844 HistoName <<
"MissedDigiSimHitElossS_" << fname2.str();
854 HistoName <<
"MissedDigiSimHitElossP_" << fname2.str();
866 HistoName <<
"SimHitDx_" << fname2.str();
878 HistoName <<
"SimHitDy_" << fname2.str();
890 HistoName <<
"SimHitDz_" << fname2.str();
901 HistoName <<
"BunchXingWindow_" << fname2.str();
905 HistoName <<
"FractionOfOOTPUDigi_" << fname2.str();
909 HistoName <<
"MissedDigiLocalXPosvsYPos_" << fname2.str();
915 HistoName <<
"MissedDigiTimeWindow_" << fname2.str();
921 layerMEs.insert(std::make_pair(layer, local_mes));
929 unsigned int& channel) {
932 unsigned int simTrkId(0);
933 if (isearch == simLinks->
end())
941 if (channel == it->channel()) {
942 simTrkId = it->SimTrackId();
953 unsigned int rawid = DSViter->id;
960 std::map<uint32_t, DigiMEs>::iterator
pos =
layerMEs.find(layer);
965 std::map<int, float> bxMap;
968 int bx = di->eventId().bunchCrossing();
969 std::map<int, float>::iterator ic = bxMap.find(
bx);
970 if (ic == bxMap.end())
975 for (
const auto&
v : bxMap) {
988 unsigned int rawid = DSViter->id;
995 std::map<uint32_t, DigiMEs>::iterator
pos =
layerMEs.find(layer);
1000 std::map<int, float> bxMap;
1003 int bx = di->eventId().bunchCrossing();
1004 std::map<int, float>::iterator ic = bxMap.find(
bx);
1005 if (ic == bxMap.end())
1010 for (
const auto&
v : bxMap) {
1023 for (
unsigned int it = 0; it < sim_tracks.size(); it++) {
1024 if (sim_tracks[it].trackId() == simTrkId) {
1034 bool retval =
false;
1035 unsigned int trkId = simTrk.
trackId();
1036 if (trkId !=
simHit.trackId())
1040 if ((vtxIndex == 0) && (
ptype == 0))
1051 if (th2 && primary == 1)
1053 if (th3 && primary != 1)
1061 const DigiMEs& local_mes = it.second;
1062 unsigned int layer = it.first;
1066 else if (layer / 100 == 1)
1067 lval = 100 - (layer + 10);
1068 else if (layer / 100 == 2)
1069 lval = (layer + 10) - 200;
MonitorElement * nSimHitsPerTrack
const TrackerGeomDet * idToDet(DetId) const override
bool check(const edm::EventSetup &iSetup)
T const * product() const
const float GeVperElectron
MonitorElement * MatchedTrackEta
const unsigned int nTracks(const reco::Vertex &sv)
const math::XYZTLorentzVectorD & momentum() const
MonitorElement * MissedHitTrackPhi
unsigned int getSimTrackId(const edm::DetSetVector< PixelDigiSimLink > *simLinks, const DetId &detId, unsigned int &channel)
MonitorElement * MatchedRZPositionMap
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)
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, const TrackerTopology *tTopo, bool flag)
edm::Handle< edm::DetSetVector< Phase2TrackerDigi > > otDigiHandle_
iterator begin()
Return an iterator to the first DetSet.
MonitorElement * MissedDigiTrackPhi
MonitorElement * MatchedTrackPhi
MonitorElement * MatchedSimHitElossS
MonitorElement * SimHitDx
MonitorElement * SimHitDz
MonitorElement * BunchXTimeBin
edm::Handle< edm::DetSetVector< PixelDigi > > itPixelDigiHandle_
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 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.
edm::ESHandle< TrackerTopology > tTopoHandle_
MonitorElement * SimulatedTrackPhiP
bool isPrimary(const SimTrack &simTrk, const PSimHit &simHit)
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
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)
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > itPixelDigiToken_
std::vector< edm::InputTag > pSimHitSrc_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > itPixelDigiSimLinkToken_
MonitorElement * nSimulatedTracksP
MonitorElement * MissedDigiLocalXposVsYPos
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > otSimLinkHandle_
MonitorElement * SimTrackEta
int fillSimHitInfo(const edm::Event &iEvent, const SimTrack simTrk, const edm::ESHandle< TrackerGeometry > gHandle)
MonitorElement * SimTrackPt
MonitorElement * SimulatedTrackPhi
MonitorElement * MissedDigiSimHitElossP
MonitorElement * nSimulatedTracksS
unsigned int trackId() const
T getParameter(std::string const &) const
MonitorElement * MatchedSimHitElossP
edm::Handle< edm::SimVertexContainer > simVertices
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)
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
std::map< unsigned int, DigiMEs > layerMEs
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