27 #include <unordered_map> 32 static const std::vector<std::string>
sDETS{
"",
"PXB",
"PXF",
"TIB",
"TID",
"TOB",
"TEC" };
53 std::unordered_map<std::string, MonitorElement *>
histosEta_;
112 600, -300., 300, 120, 0., 120., 0., 1.);
118 600, -300., 300, 120, 0., 120., 0., 1.);
122 "DeltaP_in_out_vs_eta_vs_phi_2d",
129 100, -3.0, 3.0, 100, 0., 1);
134 600, -300, 300, 200., -1, 1.);
139 100, -3.0, 3.0, -100., 100.);
141 600, -300, 300, -100., 100.);
146 100, -3.0, 3.0, -100., 100.);
151 600, -300, 300, -100., 100);
156 100, -3.0, 3.0, -100., 100.);
161 600, -300, 300, -100., 100.);
166 600, -300., 300, 120, 0., 120., -100., 100.);
170 100, -3.0, 3.0, 100., 0., 5.);
173 for (
unsigned int det = 1; det <
sDETS.size(); ++det ) {
174 for (
unsigned int sub_det = 1;
176 memset(title, 0,
sizeof(title));
177 snprintf(title,
sizeof(title),
"Original_RadLen_vs_Eta_%s%d",
sDETS[det].
data(), sub_det);
178 snprintf(key,
sizeof(key),
"%s%d",
sDETS[det].
data(), sub_det);
180 ibook.
bookProfile(title, title, 250, -5.0, 5.0, 0., 1.)));
181 snprintf(title,
sizeof(title),
"RadLen_vs_Eta_%s%d",
sDETS[det].
data(), sub_det);
182 histosEta_.insert(make_pair<string, MonitorElement*>(key,
183 ibook.
bookProfile(title, title, 250, -5.0, 5.0, 0., 1.)));
193 using namespace reco;
207 if (!tracks.
isValid() || tracks->empty()) {
208 LogInfo(
"TrackingRecoMaterialAnalyser") <<
"Invalid or empty track collection" << endl;
215 && track.
dxy(
pv) < 0.01
229 if (vertices.
isValid() && !vertices->empty()) {
234 const Vertex &
v = (*vertices)[0];
236 && std::fabs(v.
z()) < 24
237 && std::fabs(v.
position().rho()) < 2)
260 for (
auto const track : *tracks) {
261 if (!selector(track,
pv))
277 if (traj.size() > 1 || traj.empty())
279 for (
auto const &tm : traj.front().measurements()) {
280 if (tm.recHit().get() &&
283 current_tsos = tm.updatedState().
isValid() ? tm.updatedState() : tm.forwardPredictedState();
285 current_det = tm.recHit()->geographicalId();
287 assert(tm.recHit()->surface() == &surface);
289 LogError(
"TrackingRecoMaterialAnalyser")
290 <<
"Medium properties for material linked to detector" 291 <<
" are invalid at: " 297 float p2 = localP.mag2();
301 float xi = ori_xi*xf;
302 float radLen = ori_radLen*xf;
323 LogTrace(
"TrackingRecoMaterialAnalyser") <<
"Eta: " << track.
eta() <<
" " 325 <<
" has ori_radLen: " << ori_radLen <<
" and ori_xi: " << xi
326 <<
" and has radLen: " << radLen <<
" and xi: " << xi << endl;
335 LogInfo(
"TrackingRecoMaterialAnalyser") <<
"Eta: " << track.
eta() <<
" " 337 <<
" has ori_radLen: " << ori_radLen <<
" and ori_xi: " << xi
338 <<
" and has radLen: " << radLen <<
" and xi: " << xi << endl;
double p() const
momentum vector magnitude
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_
~TrackingRecoMaterialAnalyser() override
MonitorElement * bookProfile(Args &&...args)
#define DEFINE_FWK_MODULE(type)
std::vector< Track > TrackCollection
collection of Tracks
def setup(process, global_tag, zero_tesla=False)
GlobalPoint globalPosition() const
std::vector< Vertex > VertexCollection
collection of Vertex objects
std::unordered_map< std::string, MonitorElement * > histosEta_
const edm::EDGetTokenT< reco::TrackCollection > tracksToken_
MonitorElement * deltaPt_in_out_2d_
const edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
const math::XYZPoint & outerPosition() const
position of the outermost hit
const Point & position() const
position
static const std::vector< std::string > sDETS
unsigned int numberOfLayers(int subdet) const
double outerZ() const
z coordinate of the outermost hit position
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
int numberOfLostTrackerHits(HitCategory category) const
std::unordered_map< std::string, MonitorElement * > histosOriEta_
LocalVector localMomentum() const
MonitorElement * deltaPl_in_out_vs_z_
const SurfaceType & surface() const
double eta() const
pseudorapidity of momentum vector
MonitorElement * deltaP_in_out_vs_eta_
MonitorElement * histo_RZ_
MonitorElement * histo_RZ_Ori_
MonitorElement * bookProfile2D(Args &&...args)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Abs< T >::type abs(const T &t)
double z() const
z coordinate
math::XYZPoint Point
point in the space
TrackingRecoMaterialAnalyser(const edm::ParameterSet &)
Detector identifier class for the strip tracker.
MonitorElement * deltaPt_in_out_vs_z_
SubDetector subDetector() const
static TrackQuality qualityByName(const std::string &name)
void setCurrentFolder(const std::string &fullpath)
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
MonitorElement * book2D(Args &&...args)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
MonitorElement * deltaPt_in_out_vs_eta_
TrackTransformer refitter_
MonitorElement * deltaP_in_out_vs_eta_2d_
bool quality(const TrackQuality) const
Track quality.
unsigned int layer(const DetId &id) const
char data[epos_bytes_allocation]
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
bool isDoubleSided(SiStripDetId strip_id)
MonitorElement * deltaPl_in_out_vs_eta_
MonitorElement * deltaP_in_out_vs_z_
const Point & position() const
position
MonitorElement * P_vs_eta_2d_
void analyze(const edm::Event &, const edm::EventSetup &) override
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
const MediumProperties & mediumProperties() const