CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TrackingRecoMaterialAnalyser Class Reference
Inheritance diagram for TrackingRecoMaterialAnalyser:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
 TrackingRecoMaterialAnalyser (const edm::ParameterSet &)
 
 ~TrackingRecoMaterialAnalyser () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

bool isDoubleSided (SiStripDetId strip_id)
 

Private Attributes

const edm::EDGetTokenT< reco::BeamSpotbeamspotToken_
 
MonitorElementdeltaP_in_out_vs_eta_
 
MonitorElementdeltaP_in_out_vs_eta_2d_
 
MonitorElementdeltaP_in_out_vs_eta_vs_phi_2d_
 
MonitorElementdeltaP_in_out_vs_z_
 
MonitorElementdeltaP_in_out_vs_z_2d_
 
MonitorElementdeltaPl_in_out_vs_eta_
 
MonitorElementdeltaPl_in_out_vs_z_
 
MonitorElementdeltaPt_in_out_2d_
 
MonitorElementdeltaPt_in_out_vs_eta_
 
MonitorElementdeltaPt_in_out_vs_z_
 
std::string folder_
 
MonitorElementhisto_RZ_
 
MonitorElementhisto_RZ_Ori_
 
std::unordered_map< std::string, MonitorElement * > histosEta_
 
std::unordered_map< std::string, MonitorElement * > histosOriEta_
 
MonitorElementP_vs_eta_2d_
 
TrackTransformer refitter_
 
const edm::EDGetTokenT< reco::TrackCollectiontracksToken_
 
bool usePV_
 
const edm::EDGetTokenT< reco::VertexCollectionverticesToken_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 35 of file TrackingRecoMaterialAnalyser.cc.

Constructor & Destructor Documentation

TrackingRecoMaterialAnalyser::TrackingRecoMaterialAnalyser ( const edm::ParameterSet iPSet)
explicit

Definition at line 70 of file TrackingRecoMaterialAnalyser.cc.

71  : refitter_(iPSet),
72  tracksToken_(consumes<reco::TrackCollection>(iPSet.getParameter<edm::InputTag>("tracks"))),
73  beamspotToken_(consumes<reco::BeamSpot>(iPSet.getParameter<edm::InputTag>("beamspot"))),
74  verticesToken_(mayConsume<reco::VertexCollection>(iPSet.getParameter<edm::InputTag>("vertices"))),
75  usePV_(iPSet.getParameter<bool>("usePV")),
76  folder_(iPSet.getParameter<std::string>("folder")),
77  histo_RZ_(nullptr),
78  histo_RZ_Ori_(nullptr),
79  deltaPt_in_out_2d_(nullptr),
80  deltaP_in_out_vs_eta_(nullptr),
81  deltaP_in_out_vs_z_(nullptr),
82  deltaP_in_out_vs_eta_2d_(nullptr),
84  deltaP_in_out_vs_z_2d_(nullptr),
85  deltaPt_in_out_vs_eta_(nullptr),
86  deltaPt_in_out_vs_z_(nullptr),
87  deltaPl_in_out_vs_eta_(nullptr),
88  deltaPl_in_out_vs_z_(nullptr),
89  P_vs_eta_2d_(nullptr) {}
T getParameter(std::string const &) const
const edm::EDGetTokenT< reco::VertexCollection > verticesToken_
const edm::EDGetTokenT< reco::TrackCollection > tracksToken_
const edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
TrackingRecoMaterialAnalyser::~TrackingRecoMaterialAnalyser ( void  )
override

Definition at line 92 of file TrackingRecoMaterialAnalyser.cc.

92 {}

Member Function Documentation

void TrackingRecoMaterialAnalyser::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
override

Definition at line 173 of file TrackingRecoMaterialAnalyser.cc.

References funct::abs(), pwdgSkimBPark_cfi::beamSpot, beamspotToken_, DEFINE_FWK_MODULE, deltaP_in_out_vs_eta_, deltaP_in_out_vs_eta_2d_, deltaP_in_out_vs_eta_vs_phi_2d_, deltaP_in_out_vs_z_, deltaP_in_out_vs_z_2d_, deltaPl_in_out_vs_eta_, deltaPl_in_out_vs_z_, deltaPt_in_out_2d_, deltaPt_in_out_vs_eta_, deltaPt_in_out_vs_z_, reco::TrackBase::dxy(), PV3DBase< T, PVType, FrameType >::eta(), reco::TrackBase::eta(), dqm::impl::MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::EventSetup::get(), TrajectoryStateOnSurface::globalPosition(), histo_RZ_, histo_RZ_Ori_, histosEta_, histosOriEta_, reco::TrackBase::hitPattern(), SurfaceOrientation::inner, reco::Track::innerMomentum(), isDoubleSided(), reco::Vertex::isFake(), MediumProperties::isValid(), TrajectoryStateOnSurface::isValid(), edm::HandleBase::isValid(), TrackerTopology::layer(), TrajectoryStateOnSurface::localMomentum(), LogTrace, Surface::mediumProperties(), TrackingRecHit::missing, reco::Vertex::ndof(), reco::HitPattern::numberOfLostTrackerHits(), SurfaceOrientation::outer, reco::Track::outerMomentum(), reco::Track::outerPosition(), reco::Track::outerZ(), reco::TrackBase::p(), p2, P_vs_eta_2d_, PV3DBase< T, PVType, FrameType >::perp(), reco::BeamSpot::position(), reco::Vertex::position(), MetAnalyzer::pv(), reco::TrackBase::quality(), reco::TrackBase::qualityByName(), MediumProperties::radLen(), fastSimProducer_cff::radLen, refitter_, sDETS, TrackTransformer::setServices(), mathSSE::sqrt(), DetId::subdetId(), TrajectoryStateOnSurface::surface(), HLT_2018_cff::track, PDWG_EXOHSCP_cff::tracks, tracksToken_, TrackTransformer::transform(), usePV_, findQualityFiles::v, TrackingRecHit::valid, pwdgSkimBPark_cfi::vertices, verticesToken_, hybridSuperClusters_cfi::xi, MediumProperties::xi(), PV3DBase< T, PVType, FrameType >::z(), and reco::Vertex::z().

173  {
174  using namespace edm;
175  using namespace reco;
176  using namespace std;
177 
178  refitter_.setServices(setup);
179 
182  ESHandle<TrackerTopology> trk_topology;
183 
184  // Get the TrackerTopology
185  setup.get<TrackerTopologyRcd>().get(trk_topology);
186 
187  // Get Tracks
188  event.getByToken(tracksToken_, tracks);
189  if (!tracks.isValid() || tracks->empty()) {
190  LogInfo("TrackingRecoMaterialAnalyser") << "Invalid or empty track collection" << endl;
191  return;
192  }
193 
194  // Track Selector
195  auto selector = [](const Track &track, const reco::Vertex::Point &pv) -> bool {
196  return (track.quality(track.qualityByName("highPurity")) && track.dxy(pv) < 0.01 &&
197  track.hitPattern().numberOfLostTrackerHits(HitPattern::MISSING_OUTER_HITS) == 0);
198  };
199 
200  // Get BeamSpot
202  event.getByToken(beamspotToken_, beamSpot);
203  // Bail out if missing
204  if (!beamSpot.isValid())
205  return;
206 
207  reco::Vertex::Point pv(beamSpot->position());
208  if (usePV_) {
209  event.getByToken(verticesToken_, vertices);
210  if (vertices.isValid() && !vertices->empty()) {
211  // Since we need to use eta and Z information from the tracks, in
212  // order not to have the reco material distribution washed out due
213  // to geometrical effects, we need to confine the PV to some small
214  // region.
215  const Vertex &v = (*vertices)[0];
216  if (!v.isFake() && v.ndof() > 4 && std::fabs(v.z()) < 24 && std::fabs(v.position().rho()) < 2)
217  pv = v.position();
218  }
219  }
220 
221  // Main idea:
222  // * select first good tracks in input, according to reasonable criteria
223  // * refit the tracks so that we have access to the TrajectoryMeasurements
224  // that internally have all the information about the TSOS on all
225  // crossed layers. We need the refit track and not the original one so
226  // that we are able to correctly compute the path travelled by the track
227  // within the detector, using its updated TSOS. The material description
228  // can in principle be derived also directly from the rechits, via the
229  // det()[(->)GeomDet *]->mediumProperties chain, but that would simply give the
230  // face values, not the "real" ones used while propagating the track.
231  // * Loop on all measurements, extract the information about the TSOS,
232  // its surface and its mediumProperties
233  // * Make plots for the untouched material properties, but also for the
234  // ones corrected by the track direction, since the material properties,
235  // according to the documentation, should refer to normal incidence of
236  // the track, which is seldom the case, according to the current direction
237  TrajectoryStateOnSurface current_tsos;
238  DetId current_det;
239  for (auto const track : *tracks) {
240  if (!selector(track, pv))
241  continue;
242  auto const &inner = track.innerMomentum();
243  auto const &outer = track.outerMomentum();
244  deltaP_in_out_vs_eta_->Fill(inner.eta(), inner.R() - outer.R());
245  deltaP_in_out_vs_z_->Fill(track.outerZ(), inner.R() - outer.R());
246  deltaP_in_out_vs_eta_2d_->Fill(inner.eta(), inner.R() - outer.R());
247  deltaP_in_out_vs_eta_vs_phi_2d_->Fill(inner.eta(), inner.phi(), inner.R() - outer.R());
248  deltaP_in_out_vs_z_2d_->Fill(track.outerZ(), inner.R() - outer.R());
249  deltaPt_in_out_vs_eta_->Fill(inner.eta(), inner.rho() - outer.rho());
250  deltaPt_in_out_vs_z_->Fill(track.outerZ(), inner.rho() - outer.rho());
251  deltaPl_in_out_vs_eta_->Fill(inner.eta(), inner.z() - outer.z());
252  deltaPl_in_out_vs_z_->Fill(track.outerZ(), inner.z() - outer.z());
253  deltaPt_in_out_2d_->Fill(track.outerZ(), track.outerPosition().rho(), inner.rho() - outer.rho());
254  P_vs_eta_2d_->Fill(track.eta(), track.p());
255  vector<Trajectory> traj = refitter_.transform(track);
256  if (traj.size() > 1 || traj.empty())
257  continue;
258  for (auto const &tm : traj.front().measurements()) {
259  if (tm.recHit().get() &&
260  (tm.recHitR().type() == TrackingRecHit::valid || tm.recHitR().type() == TrackingRecHit::missing)) {
261  current_tsos = tm.updatedState().isValid() ? tm.updatedState() : tm.forwardPredictedState();
262  auto const &localP = current_tsos.localMomentum();
263  current_det = tm.recHit()->geographicalId();
264  const Surface &surface = current_tsos.surface();
265  assert(tm.recHit()->surface() == &surface);
266  if (!surface.mediumProperties().isValid()) {
267  LogError("TrackingRecoMaterialAnalyser")
268  << "Medium properties for material linked to detector"
269  << " are invalid at: " << current_tsos.globalPosition() << " " << (SiStripDetId)current_det << endl;
270  assert(0);
271  continue;
272  }
273  float p2 = localP.mag2();
274  float xf = std::abs(std::sqrt(p2) / localP.z());
275  float ori_xi = surface.mediumProperties().xi();
276  float ori_radLen = surface.mediumProperties().radLen();
277  float xi = ori_xi * xf;
278  float radLen = ori_radLen * xf;
279 
280  // NOTA BENE: THIS ASSUMES THAT THE TRACKS HAVE BEEN PRODUCED
281  // WITH SPLITTING, AS IS THE CASE FOR THE generalTracks
282  // collection.
283 
284  // Since there are double-sided (glued) modules all over the
285  // tracker, the material budget has been internally
286  // partitioned in two equal components, so that each single
287  // layer will receive half of the correct radLen. For this
288  // reason, only for the double-sided components, we rescale
289  // the obtained radLen by 2.
290 
291  // In particular see code here:
292  // http://cmslxr.fnal.gov/dxr/CMSSW_8_0_5/source/Geometry/TrackerGeometryBuilder/src/TrackerGeomBuilderFromGeometricDet.cc#213
293  // where, in the SiStrip Tracker, if the module has a partner
294  // (i.e. it's a glued detector) the plane is built with a
295  // scaling of 0.5. The actual plane is built few lines below:
296  // http://cmslxr.fnal.gov/dxr/CMSSW_8_0_5/source/Geometry/TrackerGeometryBuilder/src/TrackerGeomBuilderFromGeometricDet.cc#287
297 
298  if (isDoubleSided(current_det)) {
299  LogTrace("TrackingRecoMaterialAnalyser")
300  << "Eta: " << track.eta() << " " << sDETS[current_det.subdetId()] << trk_topology->layer(current_det)
301  << " has ori_radLen: " << ori_radLen << " and ori_xi: " << xi << " and has radLen: " << radLen
302  << " and xi: " << xi << endl;
303  ori_radLen *= 2.;
304  radLen *= 2.;
305  }
306 
307  histosOriEta_[sDETS[current_det.subdetId()] + to_string(trk_topology->layer(current_det))]->Fill(
308  current_tsos.globalPosition().eta(), ori_radLen);
309  histosEta_[sDETS[current_det.subdetId()] + to_string(trk_topology->layer(current_det))]->Fill(
310  current_tsos.globalPosition().eta(), radLen);
311  histo_RZ_Ori_->Fill(current_tsos.globalPosition().z(), current_tsos.globalPosition().perp(), ori_radLen);
312  histo_RZ_->Fill(current_tsos.globalPosition().z(), current_tsos.globalPosition().perp(), radLen);
313  LogInfo("TrackingRecoMaterialAnalyser")
314  << "Eta: " << track.eta() << " " << sDETS[current_det.subdetId()] << trk_topology->layer(current_det)
315  << " has ori_radLen: " << ori_radLen << " and ori_xi: " << xi << " and has radLen: " << radLen
316  << " and xi: " << xi << endl;
317  }
318  }
319  }
320 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:599
const edm::EDGetTokenT< reco::VertexCollection > verticesToken_
float radLen() const
T perp() const
Definition: PV3DBase.h:69
void setServices(const edm::EventSetup &) override
set the services needed by the TrackTransformer
GlobalPoint globalPosition() const
std::unordered_map< std::string, MonitorElement * > histosEta_
const edm::EDGetTokenT< reco::TrackCollection > tracksToken_
const edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:62
const Point & position() const
position
Definition: Vertex.h:113
static const std::vector< std::string > sDETS
double outerZ() const
z coordinate of the outermost hit position
Definition: Track.h:115
int numberOfLostTrackerHits(HitCategory category) const
Definition: HitPattern.h:863
std::unordered_map< std::string, MonitorElement * > histosOriEta_
LocalVector localMomentum() const
void Fill(long long x)
const SurfaceType & surface() const
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:617
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
def pv(vc)
Definition: MetAnalyzer.py:7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double z() const
z coordinate
Definition: Vertex.h:119
math::XYZPoint Point
point in the space
Definition: Vertex.h:39
std::vector< Trajectory > transform(const reco::Track &) const override
Convert a reco::Track into Trajectory.
bool isValid() const
Definition: HandleBase.h:70
double p2[4]
Definition: TauolaWrapper.h:90
#define LogTrace(id)
double ndof() const
Definition: Vertex.h:109
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
Definition: DetId.h:17
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
Definition: Track.h:65
bool isFake() const
Definition: Vertex.h:75
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:483
float xi() const
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:531
unsigned int layer(const DetId &id) const
T eta() const
Definition: PV3DBase.h:73
fixed size matrix
HLT enums.
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:59
T get() const
Definition: EventSetup.h:73
bool isDoubleSided(SiStripDetId strip_id)
const Point & position() const
position
Definition: BeamSpot.h:59
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:587
bool isValid() const
const MediumProperties & mediumProperties() const
Definition: Surface.h:85
void TrackingRecoMaterialAnalyser::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &  setup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 95 of file TrackingRecoMaterialAnalyser.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), dqm::dqmstoreimpl::DQMStore::IBooker::bookProfile(), dqm::dqmstoreimpl::DQMStore::IBooker::bookProfile2D(), data, deltaP_in_out_vs_eta_, deltaP_in_out_vs_eta_2d_, deltaP_in_out_vs_eta_vs_phi_2d_, deltaP_in_out_vs_z_, deltaP_in_out_vs_z_2d_, deltaPl_in_out_vs_eta_, deltaPl_in_out_vs_z_, deltaPt_in_out_2d_, deltaPt_in_out_vs_eta_, deltaPt_in_out_vs_z_, folder_, edm::EventSetup::get(), histo_RZ_, histo_RZ_Ori_, histosEta_, histosOriEta_, crabWrapper::key, TrackerGeometry::numberOfLayers(), P_vs_eta_2d_, sDETS, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and overlapproblemtsosanalyzer_cfi::title.

97  {
98  using namespace std;
99  edm::ESHandle<TrackerGeometry> trackerGeometry;
100  setup.get<TrackerDigiGeometryRecord>().get(trackerGeometry);
101 
102  ibook.setCurrentFolder(folder_);
103 
104  // Histogram to store the radiation length map, in the R-Z plane,
105  // gathering numbers directly from the trackerRecoMaterial.xml
106  // file. The numbers are not corrected for the track angle.
107  histo_RZ_Ori_ = ibook.bookProfile2D("OriRadLen", "Original_RadLen", 600, -300., 300, 120, 0., 120., 0., 1.);
108 
109  // Histogram to store the radiation length map, as before, but
110  // correcting the numbers with the track angle. This represents the
111  // real material seen by the track.
112  histo_RZ_ = ibook.bookProfile2D("RadLen", "RadLen", 600, -300., 300, 120, 0., 120., 0., 1.);
113 
114  // Histogram to show the deltaP Out-In in the eta-phi plane.
115  deltaP_in_out_vs_eta_vs_phi_2d_ = ibook.bookProfile2D(
116  "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.);
117 
118  // Histogram to show the deltaP Out-In vs eta.
120  ibook.book2D("DeltaP_in_out_vs_eta_2d", "DeltaP_in_out_vs_eta_2d", 100, -3.0, 3.0, 100, 0., 1);
121 
122  // Histogram to show the deltaP Out-In vs Z. The Z coordinate is the
123  // one computed at the outermost hit.
124  deltaP_in_out_vs_z_2d_ = ibook.book2D("DeltaP_in_out_vs_z_2d", "DeltaP_in_out_vs_z_2d", 600, -300, 300, 200., -1, 1.);
125 
126  // Histogram to show the deltaP Out-In vs eta. The eta is the one
127  // computed at the innermost hit.
129  ibook.bookProfile("DeltaP_in_out_vs_eta", "DeltaP_in_out_vs_eta", 100, -3.0, 3.0, -100., 100.);
130  deltaP_in_out_vs_z_ = ibook.bookProfile("DeltaP_in_out_vs_z", "DeltaP_in_out_vs_z", 600, -300, 300, -100., 100.);
131 
132  // Histogram to show the delta_Pt Out-In vs eta. The eta is the one
133  // computed at the innermost hit.
135  ibook.bookProfile("DeltaPt_in_out_vs_eta", "DeltaPt_in_out_vs_eta", 100, -3.0, 3.0, -100., 100.);
136 
137  // Histogram to show the delta_Pt Out-In vs Z. The Z is the one
138  // computed at the outermost hit.
139  deltaPt_in_out_vs_z_ = ibook.bookProfile("DeltaPt_in_out_vs_z", "DeltaPt_in_out_vs_z", 600, -300, 300, -100., 100);
140 
141  // Histogram to show the delta_Pl Out-In vs eta. The eta is the one
142  // computed at the innermost hit.
144  ibook.bookProfile("DeltaPz_in_out_vs_eta", "DeltaPz_in_out_vs_eta", 100, -3.0, 3.0, -100., 100.);
145 
146  // Histogram to show the delta_Pl Out-In vs Z. The Z is the one
147  // computed at the outermost hit.
148  deltaPl_in_out_vs_z_ = ibook.bookProfile("DeltaPz_in_out_vs_z", "DeltaPz_in_out_vs_z", 600, -300, 300, -100., 100.);
149 
150  // Histogram to show the delta_Pt Out-In in the Z-R plane. Z and R
151  // are related to the outermost hit.
152  deltaPt_in_out_2d_ = ibook.bookProfile2D("DeltaPt 2D", "DeltaPt 2D", 600, -300., 300, 120, 0., 120., -100., 100.);
153 
154  // Histogram to show the distribution of p vs eta for all tracks.
155  P_vs_eta_2d_ = ibook.book2D("P_vs_eta_2d", "P_vs_eta_2d", 100, -3.0, 3.0, 100., 0., 5.);
156  char title[50];
157  char key[20];
158  for (unsigned int det = 1; det < sDETS.size(); ++det) {
159  for (unsigned int sub_det = 1; sub_det <= trackerGeometry->numberOfLayers(det); ++sub_det) {
160  memset(title, 0, sizeof(title));
161  snprintf(title, sizeof(title), "Original_RadLen_vs_Eta_%s%d", sDETS[det].data(), sub_det);
162  snprintf(key, sizeof(key), "%s%d", sDETS[det].data(), sub_det);
163  histosOriEta_.insert(
164  make_pair<string, MonitorElement *>(key, ibook.bookProfile(title, title, 250, -5.0, 5.0, 0., 1.)));
165  snprintf(title, sizeof(title), "RadLen_vs_Eta_%s%d", sDETS[det].data(), sub_det);
166  histosEta_.insert(
167  make_pair<string, MonitorElement *>(key, ibook.bookProfile(title, title, 250, -5.0, 5.0, 0., 1.)));
168  }
169  }
170 }
std::unordered_map< std::string, MonitorElement * > histosEta_
static const std::vector< std::string > sDETS
unsigned int numberOfLayers(int subdet) const
std::unordered_map< std::string, MonitorElement * > histosOriEta_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
bool TrackingRecoMaterialAnalyser::isDoubleSided ( SiStripDetId  strip_id)
inlineprivate

Definition at line 43 of file TrackingRecoMaterialAnalyser.cc.

References SiStripDetId::glued(), SiStripDetId::subDetector(), and SiStripDetId::UNKNOWN.

Referenced by analyze().

43  {
44  return ((strip_id.subDetector() != SiStripDetId::UNKNOWN) && strip_id.glued());
45  }
static constexpr auto UNKNOWN
Definition: SiStripDetId.h:36
SubDetector subDetector() const
Definition: SiStripDetId.h:105
uint32_t glued() const
Definition: SiStripDetId.h:163

Member Data Documentation

const edm::EDGetTokenT<reco::BeamSpot> TrackingRecoMaterialAnalyser::beamspotToken_
private

Definition at line 48 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze().

MonitorElement* TrackingRecoMaterialAnalyser::deltaP_in_out_vs_eta_
private

Definition at line 57 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::deltaP_in_out_vs_eta_2d_
private

Definition at line 59 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::deltaP_in_out_vs_eta_vs_phi_2d_
private

Definition at line 60 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::deltaP_in_out_vs_z_
private

Definition at line 58 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::deltaP_in_out_vs_z_2d_
private

Definition at line 61 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::deltaPl_in_out_vs_eta_
private

Definition at line 64 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::deltaPl_in_out_vs_z_
private

Definition at line 65 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::deltaPt_in_out_2d_
private

Definition at line 56 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::deltaPt_in_out_vs_eta_
private

Definition at line 62 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::deltaPt_in_out_vs_z_
private

Definition at line 63 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

std::string TrackingRecoMaterialAnalyser::folder_
private

Definition at line 51 of file TrackingRecoMaterialAnalyser.cc.

Referenced by bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::histo_RZ_
private

Definition at line 54 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::histo_RZ_Ori_
private

Definition at line 55 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

std::unordered_map<std::string, MonitorElement *> TrackingRecoMaterialAnalyser::histosEta_
private

Definition at line 53 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

std::unordered_map<std::string, MonitorElement *> TrackingRecoMaterialAnalyser::histosOriEta_
private

Definition at line 52 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackingRecoMaterialAnalyser::P_vs_eta_2d_
private

Definition at line 66 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze(), and bookHistograms().

TrackTransformer TrackingRecoMaterialAnalyser::refitter_
private

Definition at line 46 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze().

const edm::EDGetTokenT<reco::TrackCollection> TrackingRecoMaterialAnalyser::tracksToken_
private

Definition at line 47 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze().

bool TrackingRecoMaterialAnalyser::usePV_
private

Definition at line 50 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze().

const edm::EDGetTokenT<reco::VertexCollection> TrackingRecoMaterialAnalyser::verticesToken_
private

Definition at line 49 of file TrackingRecoMaterialAnalyser.cc.

Referenced by analyze().