25 #include <unordered_map> 30 static const std::vector<std::string>
sDETS{
"",
"PXB",
"PXF",
"TIB",
"TID",
"TOB",
"TEC"};
50 std::unordered_map<std::string, MonitorElement *>
histosEta_;
68 : refitter_(iPSet, consumesCollector()),
74 usePV_(iPSet.getParameter<
bool>(
"usePV")),
77 histo_RZ_Ori_(nullptr),
78 deltaPt_in_out_2d_(nullptr),
79 deltaP_in_out_vs_eta_(nullptr),
80 deltaP_in_out_vs_z_(nullptr),
81 deltaP_in_out_vs_eta_2d_(nullptr),
82 deltaP_in_out_vs_eta_vs_phi_2d_(nullptr),
83 deltaP_in_out_vs_z_2d_(nullptr),
84 deltaPt_in_out_vs_eta_(nullptr),
85 deltaPt_in_out_vs_z_(nullptr),
86 deltaPl_in_out_vs_eta_(nullptr),
87 deltaPl_in_out_vs_z_(nullptr),
88 P_vs_eta_2d_(nullptr) {}
114 "DeltaP_in_out_vs_eta_vs_phi_2d",
"DeltaP_in_out_vs_eta_vs_phi_2d", 100, -3.0, 3.0, 100, -3.15, 3.15, 0., 100.);
118 ibook.
book2D(
"DeltaP_in_out_vs_eta_2d",
"DeltaP_in_out_vs_eta_2d", 100, -3.0, 3.0, 100, 0., 1);
127 ibook.
bookProfile(
"DeltaP_in_out_vs_eta",
"DeltaP_in_out_vs_eta", 100, -3.0, 3.0, -100., 100.);
133 ibook.
bookProfile(
"DeltaPt_in_out_vs_eta",
"DeltaPt_in_out_vs_eta", 100, -3.0, 3.0, -100., 100.);
142 ibook.
bookProfile(
"DeltaPz_in_out_vs_eta",
"DeltaPz_in_out_vs_eta", 100, -3.0, 3.0, -100., 100.);
153 P_vs_eta_2d_ = ibook.
book2D(
"P_vs_eta_2d",
"P_vs_eta_2d", 100, -3.0, 3.0, 100., 0., 5.);
156 for (
unsigned int det = 1; det <
sDETS.size(); ++det) {
157 for (
unsigned int sub_det = 1; sub_det <= trackerGeometry.
numberOfLayers(det); ++sub_det) {
173 using namespace reco;
186 LogInfo(
"TrackingRecoMaterialAnalyser") <<
"Invalid or empty track collection" << endl;
192 return (
track.quality(
track.qualityByName(
"highPurity")) &&
track.dxy(
pv) < 0.01 &&
193 track.hitPattern().numberOfLostTrackerHits(HitPattern::MISSING_OUTER_HITS) == 0);
209 const Vertex &
v = (*vertices)[0];
210 if (!
v.isFake() &&
v.ndof() > 4 && std::fabs(
v.z()) < 24 && std::fabs(
v.position().rho()) < 2)
250 if (traj.size() > 1 || traj.empty())
252 for (
auto const &tm : traj.front().measurements()) {
253 if (tm.recHit().get() &&
255 current_tsos = tm.updatedState().
isValid() ? tm.updatedState() : tm.forwardPredictedState();
257 current_det = tm.recHit()->geographicalId();
259 assert(tm.recHit()->surface() == &surface);
261 LogError(
"TrackingRecoMaterialAnalyser")
262 <<
"Medium properties for material linked to detector" 267 float p2 = localP.mag2();
271 float xi = ori_xi * xf;
272 float radLen = ori_radLen * xf;
293 LogTrace(
"TrackingRecoMaterialAnalyser")
295 <<
" has ori_radLen: " << ori_radLen <<
" and ori_xi: " <<
xi <<
" and has radLen: " <<
radLen 296 <<
" and xi: " <<
xi << endl;
307 LogInfo(
"TrackingRecoMaterialAnalyser")
309 <<
" has ori_radLen: " << ori_radLen <<
" and ori_xi: " <<
xi <<
" and has radLen: " <<
radLen 310 <<
" and xi: " <<
xi << endl;
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
const edm::EDGetTokenT< reco::VertexCollection > verticesToken_
MonitorElement * deltaP_in_out_vs_z_2d_
MonitorElement * deltaP_in_out_vs_eta_vs_phi_2d_
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
~TrackingRecoMaterialAnalyser() override
virtual void setCurrentFolder(std::string const &fullpath)
unsigned int numberOfLayers(int subdet) const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryTokenRun_
std::vector< Track > TrackCollection
collection of Tracks
bool isDoubleSided(const TrackerTopology *tTopo, DetId id)
std::string to_string(const V &value)
std::unordered_map< std::string, MonitorElement * > histosEta_
const edm::EDGetTokenT< reco::TrackCollection > tracksToken_
MonitorElement * deltaPt_in_out_2d_
const edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
Log< level::Error, false > LogError
const SurfaceType & surface() const
std::vector< Vertex > VertexCollection
unsigned int layer(const DetId &id) const
static const std::vector< std::string > sDETS
std::unordered_map< std::string, MonitorElement * > histosOriEta_
MonitorElement * deltaPl_in_out_vs_z_
GlobalPoint globalPosition() const
MonitorElement * deltaP_in_out_vs_eta_
MonitorElement * histo_RZ_
MonitorElement * histo_RZ_Ori_
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())
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
LocalVector localMomentum() const
Abs< T >::type abs(const T &t)
math::XYZPoint Point
point in the space
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
TrackingRecoMaterialAnalyser(const edm::ParameterSet &)
uint32_t glued(const DetId &id) const
Log< level::Info, false > LogInfo
Detector identifier class for the strip tracker.
MonitorElement * deltaPt_in_out_vs_z_
auto const & tracks
cannot be loose
MonitorElement * deltaPt_in_out_vs_eta_
TrackTransformer refitter_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * deltaP_in_out_vs_eta_2d_
char data[epos_bytes_allocation]
MonitorElement * deltaPl_in_out_vs_eta_
MonitorElement * deltaP_in_out_vs_z_
MonitorElement * P_vs_eta_2d_
const MediumProperties & mediumProperties() const
void analyze(const edm::Event &, const edm::EventSetup &) override