23 : fullconf_( iConfig )
25 , doAllPlots_ ( conf_.getParameter<
bool>(
"doAllPlots") )
26 , doDeDxPlots_ ( conf_.getParameter<
bool>(
"doDeDxPlots") )
34 for (
auto const&
tag : dEdxInputList_) {
90 dEdxMEsVector[
i].ME_StripHitDeDx->setAxisTitle(
"dEdx of on-track strip cluster (ADC)");
91 dEdxMEsVector[
i].ME_StripHitDeDx->setAxisTitle(
"Number of Strip clusters", 2);
95 dEdxMEsVector[
i].ME_PixelHitDeDx->setAxisTitle(
"dEdx of on-track pixel cluster (ADC)");
96 dEdxMEsVector[
i].ME_PixelHitDeDx->setAxisTitle(
"Number of Pixel clusters", 2);
98 histname =
"NumberOfdEdxHitsPerTrack_";
100 dEdxMEsVector[
i].ME_NHitDeDx->setAxisTitle(
"Number of dEdxHits per Track");
101 dEdxMEsVector[
i].ME_NHitDeDx->setAxisTitle(
"Number of Tracks", 2);
105 dEdxMEsVector[
i].ME_Harm2DeDx->setAxisTitle(
"Harmonic2 dEdx estimator for each Track");
106 dEdxMEsVector[
i].ME_Harm2DeDx->setAxisTitle(
"Number of Tracks", 2);
112 if(!dedxHits)
return -1;
113 std::vector<double> vect;
114 for(
unsigned int h=0;
h<dedxHits->
size();
h++){
116 double Norm = (detid.subdetId()<3)?3.61
e-06:3.61
e-06*265;
118 vect.push_back(ChargeOverPathlength);
121 int size = vect.size();
122 if(size<=0)
return -1;
126 result+=
pow(vect[
i],expo);
128 return pow(result/size,1./expo);
144 if(!trackCollectionHandle.
isValid())
return;
149 if(!dEdxObjectHandle.
isValid())
continue;
151 for(
unsigned int t=0;
t<trackCollectionHandle->size();
t++){
158 if(!dedxHitsRef.
isNull())dedxHits = &(*dedxHitsRef);
160 if(!dedxHits)
continue;
162 for(
unsigned int h=0;
h<dedxHits->
size();
h++){
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#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
dEdxHitAnalyzer(const edm::ParameterSet &)
void addDefault(ParameterSetDescription const &psetDescription)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::InputTag trackInputTag_
bool accept(const edm::Event &event, const edm::EventSetup &setup)
To be called from analyze/filter() methods.
MonitorElement * book1D(Args &&...args)
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
void setCurrentFolder(const std::string &fullpath)
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
float pathlength(size_t i) const
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
Power< A, B >::type pow(const A &a, const B &b)
DetId detId(size_t i) const
std::vector< dEdxMEs > dEdxMEsVector