28 #include <unordered_map> 33 static const std::vector<std::string>
sDETS{
"",
"PXB",
"PXF",
"TIB",
"TID",
"TOB",
"TEC" };
54 std::unordered_map<std::string, MonitorElement *>
histosEta_;
76 usePV_(iPSet.getParameter<bool>(
"usePV")),
113 600, -300., 300, 120, 0., 120., 0., 1.);
119 600, -300., 300, 120, 0., 120., 0., 1.);
123 "DeltaP_in_out_vs_eta_vs_phi_2d",
130 100, -3.0, 3.0, 100, 0., 1);
135 600, -300, 300, 200., -1, 1.);
140 100, -3.0, 3.0, -100., 100.);
142 600, -300, 300, -100., 100.);
147 100, -3.0, 3.0, -100., 100.);
152 600, -300, 300, -100., 100);
157 100, -3.0, 3.0, -100., 100.);
162 600, -300, 300, -100., 100.);
167 600, -300., 300, 120, 0., 120., -100., 100.);
171 100, -3.0, 3.0, 100., 0., 5.);
174 for (
unsigned int det = 1; det <
sDETS.size(); ++det ) {
175 for (
unsigned int sub_det = 1;
177 memset(title, 0,
sizeof(title));
178 snprintf(title,
sizeof(title),
"Original_RadLen_vs_Eta_%s%d",
sDETS[det].
data(), sub_det);
179 snprintf(key,
sizeof(key),
"%s%d",
sDETS[det].
data(), sub_det);
181 ibook.
bookProfile(title, title, 250, -5.0, 5.0, 0., 1.)));
182 snprintf(title,
sizeof(title),
"RadLen_vs_Eta_%s%d",
sDETS[det].
data(), sub_det);
183 histosEta_.insert(make_pair<string, MonitorElement*>(key,
184 ibook.
bookProfile(title, title, 250, -5.0, 5.0, 0., 1.)));
194 using namespace reco;
208 if (!tracks.
isValid() || tracks->size() == 0) {
209 LogInfo(
"TrackingRecoMaterialAnalyser") <<
"Invalid or empty track collection" << endl;
216 && track.
dxy(
pv) < 0.01
230 if (vertices.
isValid() && vertices->size() != 0) {
235 const Vertex &
v = (*vertices)[0];
237 && std::fabs(v.
z()) < 24
238 && std::fabs(v.
position().rho()) < 2)
261 for (
auto const track : *tracks) {
262 if (!selector(track,
pv))
278 if (traj.size() > 1 || traj.size() == 0)
280 for (
auto const &tm : traj.front().measurements()) {
281 if (tm.recHit().get() &&
284 current_tsos = tm.updatedState().
isValid() ? tm.updatedState() : tm.forwardPredictedState();
286 current_det = tm.recHit()->geographicalId();
288 assert(tm.recHit()->surface() == &surface);
290 LogError(
"TrackingRecoMaterialAnalyser")
291 <<
"Medium properties for material linked to detector" 292 <<
" are invalid at: " 298 float p2 = localP.mag2();
302 float xi = ori_xi*xf;
303 float radLen = ori_radLen*xf;
324 LogTrace(
"TrackingRecoMaterialAnalyser") <<
"Eta: " << track.
eta() <<
" " 326 <<
" has ori_radLen: " << ori_radLen <<
" and ori_xi: " << xi
327 <<
" and has radLen: " << radLen <<
" and xi: " << xi << endl;
336 LogInfo(
"TrackingRecoMaterialAnalyser") <<
"Eta: " << track.
eta() <<
" " 338 <<
" has ori_radLen: " << ori_radLen <<
" and ori_xi: " << xi
339 <<
" and has radLen: " << radLen <<
" and xi: " << xi << endl;
virtual ~TrackingRecoMaterialAnalyser()
double p() const
momentum vector magnitude
virtual 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 * 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)
Abs< T >::type abs(const T &t)
double z() const
z coordinate
math::XYZPoint Point
point in the space
TrackingRecoMaterialAnalyser(const edm::ParameterSet &)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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