28 #include <unordered_map>
33 static const std::vector<std::string>
sDETS{
"",
"PXB",
"PXF",
"TIB",
"TID",
"TOB",
"TEC" };
34 static const std::vector<std::string>
sLAYS{
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11" };
55 std::unordered_map<std::string, MonitorElement *>
histosEta_;
77 usePV_(iPSet.getParameter<bool>(
"usePV")),
78 folder_(iPSet.getParameter<std::
string>(
"folder")),
81 deltaPt_in_out_2d_(0),
82 deltaP_in_out_vs_eta_(0),
83 deltaP_in_out_vs_z_(0),
84 deltaP_in_out_vs_eta_2d_(0),
85 deltaP_in_out_vs_eta_vs_phi_2d_(0),
86 deltaP_in_out_vs_z_2d_(0),
87 deltaPt_in_out_vs_eta_(0),
88 deltaPt_in_out_vs_z_(0),
89 deltaPl_in_out_vs_eta_(0),
90 deltaPl_in_out_vs_z_(0),
114 600, -300., 300, 120, 0., 120., 0., 1.);
120 600, -300., 300, 120, 0., 120., 0., 1.);
124 "DeltaP_in_out_vs_eta_vs_phi_2d",
131 100, -3.0, 3.0, 100, 0., 1);
136 600, -300, 300, 200., -1, 1.);
141 100, -3.0, 3.0, -100., 100.);
143 600, -300, 300, -100., 100.);
148 100, -3.0, 3.0, -100., 100.);
153 600, -300, 300, -100., 100);
158 100, -3.0, 3.0, -100., 100.);
163 600, -300, 300, -100., 100.);
168 600, -300., 300, 120, 0., 120., -100., 100.);
172 100, -3.0, 3.0, 100., 0., 5.);
175 for (
unsigned int det = 1; det <
sDETS.size(); ++det ) {
176 for (
unsigned int sub_det = 1;
177 sub_det <= trackerGeometry->numberOfLayers(det); ++sub_det) {
195 using namespace reco;
210 LogInfo(
"TrackingRecoMaterialAnalyser") <<
"Invalid or empty track collection" << endl;
216 return (track.quality(track.qualityByName(
"highPurity"))
217 && track.dxy(
pv) < 0.01
218 && track.hitPattern().numberOfLostTrackerHits(HitPattern::MISSING_OUTER_HITS) == 0);
236 const Vertex &
v = (*vertices)[0];
238 && std::fabs(v.
z()) < 24
239 && std::fabs(v.
position().rho()) < 2)
262 for (
auto const track : *
tracks) {
263 if (!selector(track,
pv))
265 auto const inner = track.innerMomentum();
266 auto const outer = track.outerMomentum();
279 if (traj.size() > 1 || traj.size() == 0)
281 for (
auto const &tm : traj.front().measurements()) {
282 if (tm.recHit().get() &&
285 current_tsos = tm.updatedState().isValid() ? tm.updatedState() : tm.forwardPredictedState();
286 auto const & localP = current_tsos.localMomentum();
287 current_det = tm.recHit()->geographicalId();
288 const Surface& surface = current_tsos.surface();
289 assert(tm.recHit()->surface() == &surface);
291 LogError(
"TrackingRecoMaterialAnalyser")
292 <<
"Medium properties for material linked to detector"
293 <<
" are invalid at: "
294 << current_tsos.globalPosition() <<
" "
299 float p2 = localP.mag2();
303 float xi = ori_xi*xf;
304 float radLen = ori_radLen*xf;
325 LogTrace(
"TrackingRecoMaterialAnalyser") <<
"Eta: " << track.eta() <<
" "
326 <<
sDETS[current_det.subdetId()]+
sLAYS[trk_topology->layer(current_det)]
327 <<
" has ori_radLen: " << ori_radLen <<
" and ori_xi: " << xi
328 <<
" and has radLen: " << radLen <<
" and xi: " << xi << endl;
333 histosOriEta_[
sDETS[current_det.subdetId()]+
sLAYS[trk_topology->layer(current_det)]]->Fill(current_tsos.globalPosition().eta(), ori_radLen);
334 histosEta_[
sDETS[current_det.subdetId()]+
sLAYS[trk_topology->layer(current_det)]]->Fill(current_tsos.globalPosition().eta(), radLen);
335 histo_RZ_Ori_->
Fill(current_tsos.globalPosition().z(), current_tsos.globalPosition().perp(), ori_radLen);
336 histo_RZ_->
Fill(current_tsos.globalPosition().z(), current_tsos.globalPosition().perp(), radLen);
337 LogInfo(
"TrackingRecoMaterialAnalyser") <<
"Eta: " << track.eta() <<
" "
338 <<
sDETS[current_det.subdetId()]+
sLAYS[trk_topology->layer(current_det)]
339 <<
" has ori_radLen: " << ori_radLen <<
" and ori_xi: " << xi
340 <<
" and has radLen: " << radLen <<
" and xi: " << xi << endl;
virtual ~TrackingRecoMaterialAnalyser()
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
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 Point & position() const
position
static const std::vector< std::string > sDETS
std::unordered_map< std::string, MonitorElement * > histosOriEta_
MonitorElement * deltaPl_in_out_vs_z_
MonitorElement * deltaP_in_out_vs_eta_
MonitorElement * histo_RZ_
MonitorElement * histo_RZ_Ori_
MonitorElement * bookProfile2D(Args &&...args)
Abs< T >::type abs(const T &t)
double z() const
z coordinate
math::XYZPoint Point
point in the space
TrackingRecoMaterialAnalyser(const edm::ParameterSet &)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
Detector identifier class for the strip tracker.
MonitorElement * deltaPt_in_out_vs_z_
SubDetector subDetector() const
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
MonitorElement * deltaPt_in_out_vs_eta_
TrackTransformer refitter_
MonitorElement * deltaP_in_out_vs_eta_2d_
char data[epos_bytes_allocation]
bool isDoubleSided(SiStripDetId strip_id)
MonitorElement * deltaPl_in_out_vs_eta_
MonitorElement * deltaP_in_out_vs_z_
MonitorElement * P_vs_eta_2d_
static const std::vector< std::string > sLAYS
void analyze(const edm::Event &, const edm::EventSetup &) override
const MediumProperties & mediumProperties() const