9 #include <TLorentzVector.h> 19 : triggerResultsInputTag_(iConfig.getParameter<
edm::
InputTag>(
"TriggerResults")),
21 iConfig.getUntrackedParameter<
std::
string>(
"edmPVName",
"offlinePrimaryVertices"))),
24 fGsfElectronName_token(consumes<
edm::
View<
reco::GsfElectron>>(
25 iConfig.getUntrackedParameter<
std::
string>(
"edmGsfEleName",
"gedGsfElectrons"))),
26 fSCName_token(consumes<
edm::
View<
reco::SuperCluster>>(
27 iConfig.getUntrackedParameter<
std::
string>(
"edmSCName",
"particleFlowEGamma"))),
30 fRhoToken(consumes<double>(iConfig.getParameter<
edm::
InputTag>(
"rhoname"))),
35 PtCutL1_(iConfig.getUntrackedParameter<double>(
"PtCutL1")),
36 PtCutL2_(iConfig.getUntrackedParameter<double>(
"PtCutL2")),
37 EtaCutL1_(iConfig.getUntrackedParameter<double>(
"EtaCutL1")),
38 EtaCutL2_(iConfig.getUntrackedParameter<double>(
"EtaCutL2")),
40 MassBin_(iConfig.getUntrackedParameter<double>(
"MassBin")),
41 MassMin_(iConfig.getUntrackedParameter<double>(
"MassMin")),
42 MassMax_(iConfig.getUntrackedParameter<double>(
"MassMax")),
44 LumiBin_(iConfig.getUntrackedParameter<double>(
"LumiBin")),
45 LumiMin_(iConfig.getUntrackedParameter<double>(
"LumiMin")),
46 LumiMax_(iConfig.getUntrackedParameter<double>(
"LumiMax")),
48 PVBin_(iConfig.getUntrackedParameter<
int>(
"PVBin")),
49 PVMin_(iConfig.getUntrackedParameter<double>(
"PVMin")),
50 PVMax_(iConfig.getUntrackedParameter<double>(
"PVMax")),
52 VtxNTracksFitCut_(iConfig.getUntrackedParameter<double>(
"VtxNTracksFitMin")),
53 VtxNdofCut_(iConfig.getUntrackedParameter<double>(
"VtxNdofMin")),
54 VtxAbsZCut_(iConfig.getUntrackedParameter<double>(
"VtxAbsZMax")),
55 VtxRhoCut_(iConfig.getUntrackedParameter<double>(
"VtxRhoMax")),
57 ELE_ID_WP(iConfig.getUntrackedParameter<
std::
string>(
"ElectronIDType",
"TIGHT")),
59 edm::LogInfo(
"ZCounting") <<
"Constructor ZCountingElectrons::ZCounting " << std::endl;
68 const std::vector<std::string> patterns_ = iConfig.
getParameter<std::vector<std::string>>(
"ElectronTriggerNames");
80 edm::LogInfo(
"ZCountingElectrons") <<
"Destructor ZCountingElectrons::~ZCountingElectrons " << std::endl;
87 edm::LogInfo(
"ZCountingElectrons") <<
"ZCountingElectrons::beginRun" << std::endl;
91 edm::LogVerbatim(
"ZCountingElectrons") <<
"ZCountingElectrons::dqmBeginRun now at " << iRun.
id();
93 bool hltChanged_ =
true;
96 <<
"ZCountingElectrons::dqmBeginRun [TriggerObjMatchValueMapsProducer::beginRun] " 97 "HLTConfigProvider initialized [processName() = \"" 102 <<
"ZCountingElectrons::dqmBeginRun Initialization of HLTConfigProvider failed for Run=" << iRun.
id()
113 edm::LogInfo(
"ZCountingElectrons") <<
"ZCountingElectrons::bookHistograms" << std::endl;
125 "h_ee_mass_id_pass_central",
133 "h_ee_mass_id_fail_central",
141 "h_ee_mass_id_pass_forward",
149 "h_ee_mass_id_fail_forward",
158 "h_ee_mass_HLT_pass_central",
166 "h_ee_mass_HLT_fail_central",
174 "h_ee_mass_HLT_pass_forward",
182 "h_ee_mass_HLT_fail_forward",
201 edm::LogInfo(
"ZCountingElectrons") <<
"ZCountingElectrons::analyze" << std::endl;
208 if (!hVertexProduct.
isValid()) {
209 edm::LogWarning(
"ZCounting") <<
"ZCountingElectrons::analyze - no valid primary vertex product found" << std::endl;
216 for (
auto const& itVtx : *hVertexProduct) {
267 enum { eEleEle2HLT = 1, eEleEle1HLT1L1, eEleEle1HLT, eEleEleNoSel, eEleSC };
270 for (
size_t itag = 0; itag <
electrons->size(); ++itag) {
272 if (not
EleID_.
passID(el1, beamspotHandle, conversionsHandle))
275 float pt1 = el1->pt();
276 float eta1 = el1->eta();
277 float phi1 = el1->phi();
281 TLorentzVector vTag(0., 0., 0., 0.);
285 double tag_pt = vTag.Pt();
286 double tag_abseta = fabs(vTag.Eta());
291 if (not(tag_is_valid_tag
or tag_is_valid_probe))
295 for (
size_t iprobe = 0; iprobe < superclusters->size(); ++iprobe) {
297 const auto sc = superclusters->ptrAt(iprobe);
298 if (*sc == *(el1->superCluster())) {
303 for (
size_t iele = 0; iele <
electrons->size(); ++iele) {
307 if (*sc == *(ele->superCluster())) {
314 TLorentzVector vProbe(0., 0., 0., 0.);
318 double pt = sc->energy() *
sqrt(1 -
pow(
tanh(sc->eta()), 2));
323 double probe_pt = vProbe.Pt();
324 double probe_abseta = fabs(sc->eta());
326 if (!probe_is_valid_probe)
332 TLorentzVector vDilep = vTag + vProbe;
341 bool probe_pass_trigger =
triggers->
passObj(vProbe.Eta(), vProbe.Phi());
342 bool probe_pass_id = eleProbe.
isNonnull() and
EleID_.
passID(eleProbe, beamspotHandle, conversionsHandle);
349 if (probe_is_forward and tag_is_forward) {
351 }
else if (!probe_is_forward and !tag_is_forward) {
358 if (!tag_is_valid_tag)
363 if (probe_is_forward) {
369 if (probe_is_forward) {
377 if (probe_pass_id and probe_pass_trigger) {
378 if (probe_is_forward) {
383 }
else if (probe_pass_id) {
384 if (probe_is_forward) {
Log< level::Info, true > LogVerbatim
MonitorElement * h_ee_yield_Z_ebeb
T getParameter(std::string const &) const
MonitorElement * h_ee_mass_id_pass_forward
void tanh(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in])
MonitorElement * h_ee_mass_HLT_pass_forward
double pt() const final
transverse momentum
virtual void setCurrentFolder(std::string const &fullpath)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_ee_yield_Z_ebee
const edm::InputTag triggerResultsInputTag_
const std::string ELE_ID_WP
const float ELE_ETA_CRACK_LOW
MonitorElement * h_ee_yield_Z_eeee
edm::EDGetTokenT< edm::View< reco::GsfElectron > > fGsfElectronName_token
Log< level::Error, false > LogError
std::vector< Vertex > VertexCollection
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
bool ele_probe_selection(double pt, double abseta)
edm::EDGetTokenT< reco::BeamSpot > fBeamspotToken
edm::EDGetTokenT< double > fRhoToken
MonitorElement * h_ee_mass_HLT_fail_central
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
bool ele_tag_selection(double pt, double abseta)
unsigned int size() const
number of trigger paths in trigger table
bool isNonnull() const
Checks for non-null.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
edm::EDGetTokenT< reco::ConversionCollection > fConversionToken
bool passID(const reco::GsfElectronPtr &ele, edm::Handle< reco::BeamSpot > beamspot, edm::Handle< reco::ConversionCollection > conversions)
HLTConfigProvider hltConfigProvider_
#define DEFINE_FWK_MODULE(type)
MonitorElement * h_ee_mass_HLT_fail_forward
MonitorElement * h_ee_mass_HLT_pass_central
const float ELE_ETA_CRACK_HIGH
MonitorElement * h_ee_mass_id_pass_central
MonitorElement * h_ee_mass_id_fail_central
const float ELECTRON_MASS
Log< level::Info, false > LogInfo
ZCountingElectrons(const edm::ParameterSet &ps)
~ZCountingElectrons() override
const std::string & processName() const
process name
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
const std::string & tableName() const
HLT ConfDB table name.
void setID(std::string ID)
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
ElectronIdentifier EleID_
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
double phi() const final
momentum azimuthal angle
MonitorElement * h_ee_mass_id_fail_forward
edm::EDGetTokenT< edm::View< reco::SuperCluster > > fSCName_token
Power< A, B >::type pow(const A &a, const B &b)
int charge() const final
electric charge
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
double eta() const final
momentum pseudorapidity