24 conf_(fullconf_.getParameter<edm::
ParameterSet>(
"dEdxParameters")),
25 doAllPlots_(conf_.getParameter<bool>(
"doAllPlots")),
26 doDeDxPlots_(conf_.getParameter<bool>(
"doDeDxPlots")),
28 conf_.getParameter<edm::
ParameterSet>(
"genericTriggerEventPSet"), consumesCollector(), *this)) {
33 for (
auto const&
tag : dEdxInputList_) {
83 dEdxMEsVector[
i].ME_StripHitDeDx->setAxisTitle(
"dEdx of on-track strip cluster (ADC)");
84 dEdxMEsVector[
i].ME_StripHitDeDx->setAxisTitle(
"Number of Strip clusters", 2);
88 dEdxMEsVector[
i].ME_PixelHitDeDx->setAxisTitle(
"dEdx of on-track pixel cluster (ADC)");
89 dEdxMEsVector[
i].ME_PixelHitDeDx->setAxisTitle(
"Number of Pixel clusters", 2);
91 histname =
"NumberOfdEdxHitsPerTrack_";
93 dEdxMEsVector[
i].ME_NHitDeDx->setAxisTitle(
"Number of dEdxHits per Track");
98 dEdxMEsVector[
i].ME_Harm2DeDx->setAxisTitle(
"Harmonic2 dEdx estimator for each Track");
99 dEdxMEsVector[
i].ME_Harm2DeDx->setAxisTitle(
"Number of Tracks", 2);
107 std::vector<double> vect;
108 for (
unsigned int h = 0;
h < dedxHits->
size();
h++) {
110 double Norm = (detid.subdetId() < 3) ? 3.61
e-06 : 3.61
e-06 * 265;
112 vect.push_back(ChargeOverPathlength);
115 int size = vect.size();
120 for (
int i = 0;
i <
size;
i++) {
121 result +=
pow(vect[
i], expo);
123 return pow(result / size, 1. / expo);
135 if (!trackCollectionHandle.
isValid())
140 if (!dEdxObjectHandle.
isValid())
143 for (
unsigned int t = 0;
t < trackCollectionHandle->size();
t++) {
150 if (!dedxHitsRef.
isNull())
151 dedxHits = &(*dedxHitsRef);
156 for (
unsigned int h = 0;
h < dedxHits->
size();
h++) {
158 if (detid.subdetId() >= 3)
160 if (detid.subdetId() < 3)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void setCurrentFolder(std::string const &fullpath)
#define DEFINE_FWK_MODULE(type)
float charge(size_t i) const
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::TrackCollection > trackToken_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
std::vector< std::string > dEdxInputList_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
~dEdxHitAnalyzer() override
std::vector< dEdxMEs > dEdxMEsVector
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
dEdxHitAnalyzer(const edm::ParameterSet &)
void addDefault(ParameterSetDescription const &psetDescription)
edm::InputTag trackInputTag_
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
GenericTriggerEventFlag * genTriggerEventFlag_
std::vector< edm::EDGetTokenT< reco::DeDxHitInfoAss > > dEdxTokenList_
bool isNull() const
Checks for null.
double harmonic2(const reco::DeDxHitInfo *dedxHits)
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
T getParameter(std::string const &) const
float pathlength(size_t i) const
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)
DetId detId(size_t i) const