File indexing completed on 2022-07-08 22:42:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <fstream>
0013 #include <iostream>
0014 #include <memory>
0015 #include <sstream>
0016 #include <string>
0017 #include <utility>
0018 #include <vector>
0019 #include <unistd.h>
0020 #include <cmath>
0021 #include <iostream>
0022
0023
0024 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0025 #include "DQMServices/Core/interface/DQMStore.h"
0026 #include "DQMOffline/Trigger/plugins/TriggerDQMBase.h"
0027 #include "DataFormats/Common/interface/TriggerResults.h"
0028 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
0029 #include "DataFormats/HLTReco/interface/TriggerObject.h"
0030 #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
0031 #include "DataFormats/VertexReco/interface/Vertex.h"
0032 #include "DataFormats/BTauReco/interface/JetTag.h"
0033 #include "DataFormats/BTauReco/interface/ShallowTagInfo.h"
0034 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
0035 #include "FWCore/Framework/interface/MakerMacros.h"
0036 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0037 #include "FWCore/ServiceRegistry/interface/Service.h"
0038 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0039 #include "FWCore/Common/interface/TriggerNames.h"
0040 #include "CommonTools/UtilAlgos/interface/DeltaR.h"
0041 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0042 #include "DataFormats/BTauReco/interface/SecondaryVertexTagInfo.h"
0043 #include "DataFormats/TrackReco/interface/Track.h"
0044
0045 #include "TMath.h"
0046 #include "TPRegexp.h"
0047
0048 class BTVHLTOfflineSource : public DQMEDAnalyzer {
0049 public:
0050 explicit BTVHLTOfflineSource(const edm::ParameterSet&);
0051 ~BTVHLTOfflineSource() override;
0052
0053 private:
0054 void analyze(const edm::Event&, const edm::EventSetup&) override;
0055
0056 std::vector<const reco::Track*> getOfflineBTagTracks(float hltJetEta,
0057 float hltJetPhi,
0058 edm::Handle<edm::View<reco::BaseTagInfo>> offlineIPTagHandle,
0059 std::vector<float>& offlineIP3D,
0060 std::vector<float>& offlineIP3DSig);
0061
0062 typedef reco::TemplatedSecondaryVertexTagInfo<reco::CandIPTagInfo, reco::VertexCompositePtrCandidate> SVTagInfo;
0063
0064 template <class Base>
0065 std::vector<const reco::Track*> getOnlineBTagTracks(float hltJetEta,
0066 float hltJetPhi,
0067 edm::Handle<std::vector<Base>> jetSVTagsColl,
0068 std::vector<float>& onlineIP3D,
0069 std::vector<float>& onlineIP3DSig);
0070
0071 void bookHistograms(DQMStore::IBooker&, edm::Run const& run, edm::EventSetup const& c) override;
0072
0073 void dqmBeginRun(edm::Run const& run, edm::EventSetup const& c) override;
0074
0075 std::string dirname_;
0076 std::string processname_;
0077 bool verbose_;
0078
0079 std::vector<std::pair<std::string, std::string>> custompathnamepairs_;
0080
0081 edm::InputTag triggerSummaryLabel_;
0082 edm::InputTag triggerResultsLabel_;
0083
0084 float turnon_threshold_loose_;
0085 float turnon_threshold_medium_;
0086 float turnon_threshold_tight_;
0087
0088 edm::EDGetTokenT<reco::JetTagCollection> offlineDiscrTokenb_;
0089 edm::EDGetTokenT<reco::JetTagCollection> offlineDiscrTokenbb_;
0090 edm::EDGetTokenT<edm::View<reco::BaseTagInfo>> offlineIPToken_;
0091
0092 edm::EDGetTokenT<std::vector<reco::Vertex>> hltFastPVToken_;
0093 edm::EDGetTokenT<std::vector<reco::Vertex>> hltPFPVToken_;
0094 edm::EDGetTokenT<std::vector<reco::Vertex>> hltCaloPVToken_;
0095 edm::EDGetTokenT<std::vector<reco::Vertex>> offlinePVToken_;
0096
0097 edm::EDGetTokenT<edm::TriggerResults> triggerResultsToken;
0098 edm::EDGetTokenT<edm::TriggerResults> triggerResultsFUToken;
0099 edm::EDGetTokenT<trigger::TriggerEvent> triggerSummaryToken;
0100 edm::EDGetTokenT<trigger::TriggerEvent> triggerSummaryFUToken;
0101
0102 edm::EDGetTokenT<std::vector<reco::ShallowTagInfo>> shallowTagInfosTokenCalo_;
0103 edm::EDGetTokenT<std::vector<reco::ShallowTagInfo>> shallowTagInfosTokenPf_;
0104
0105 edm::EDGetTokenT<std::vector<reco::SecondaryVertexTagInfo>> SVTagInfosTokenCalo_;
0106 edm::EDGetTokenT<std::vector<SVTagInfo>> SVTagInfosTokenPf_;
0107
0108 edm::EDGetTokenT<reco::JetTagCollection> caloTagsToken_;
0109 edm::EDGetTokenT<reco::JetTagCollection> pfTagsToken_;
0110 edm::Handle<reco::JetTagCollection> caloTags;
0111 edm::Handle<reco::JetTagCollection> pfTags;
0112
0113 float minDecayLength_;
0114 float maxDecayLength_;
0115 float minJetDistance_;
0116 float maxJetDistance_;
0117 float dRTrackMatch_;
0118
0119 HLTConfigProvider hltConfig_;
0120
0121 class PathInfo : public TriggerDQMBase {
0122 public:
0123 PathInfo()
0124 : prescaleUsed_(-1),
0125 pathName_("unset"),
0126 filterName_("unset"),
0127 processName_("unset"),
0128 objectType_(-1),
0129 triggerType_("unset") {}
0130
0131 ~PathInfo() override = default;
0132
0133 PathInfo(const int prescaleUsed,
0134 const std::string& pathName,
0135 const std::string& filterName,
0136 const std::string& processName,
0137 const int type,
0138 const std::string& triggerType)
0139 : prescaleUsed_(prescaleUsed),
0140 pathName_(pathName),
0141 filterName_(filterName),
0142 processName_(processName),
0143 objectType_(type),
0144 triggerType_(triggerType) {}
0145
0146 const std::string getLabel() const { return filterName_; }
0147 void setLabel(std::string labelName) { filterName_ = std::move(labelName); }
0148 const std::string getPath() const { return pathName_; }
0149 const int getprescaleUsed() const { return prescaleUsed_; }
0150 const std::string getProcess() const { return processName_; }
0151 const int getObjectType() const { return objectType_; }
0152 const std::string getTriggerType() const { return triggerType_; }
0153 const edm::InputTag getTag() const { return edm::InputTag(filterName_, "", processName_); }
0154 const bool operator==(const std::string& v) const { return v == pathName_; }
0155
0156 MonitorElement* Discr = nullptr;
0157 MonitorElement* Pt = nullptr;
0158 MonitorElement* Eta = nullptr;
0159 MonitorElement* Discr_HLTvsRECO = nullptr;
0160 MonitorElement* Discr_HLTMinusRECO = nullptr;
0161 ObjME Discr_turnon_loose;
0162 ObjME Discr_turnon_medium;
0163 ObjME Discr_turnon_tight;
0164 MonitorElement* PVz = nullptr;
0165 MonitorElement* fastPVz = nullptr;
0166 MonitorElement* PVz_HLTMinusRECO = nullptr;
0167 MonitorElement* fastPVz_HLTMinusRECO = nullptr;
0168 MonitorElement* n_vtx = nullptr;
0169 MonitorElement* vtx_mass = nullptr;
0170 MonitorElement* n_vtx_trks = nullptr;
0171 MonitorElement* n_sel_tracks = nullptr;
0172 MonitorElement* h_3d_ip_distance = nullptr;
0173 MonitorElement* h_3d_ip_error = nullptr;
0174 MonitorElement* h_3d_ip_sig = nullptr;
0175
0176
0177 MonitorElement* h_jetNSecondaryVertices = nullptr;
0178 MonitorElement* h_jet_pt = nullptr;
0179 MonitorElement* h_jet_eta = nullptr;
0180 MonitorElement* h_trackSumJetEtRatio = nullptr;
0181 MonitorElement* h_trackSip2dValAboveCharm = nullptr;
0182 MonitorElement* h_trackSip2dSigAboveCharm = nullptr;
0183 MonitorElement* h_trackSip3dValAboveCharm = nullptr;
0184 MonitorElement* h_trackSip3dSigAboveCharm = nullptr;
0185 MonitorElement* h_jetNSelectedTracks = nullptr;
0186 MonitorElement* h_jetNTracksEtaRel = nullptr;
0187 MonitorElement* h_vertexCategory = nullptr;
0188 MonitorElement* h_trackSumJetDeltaR = nullptr;
0189
0190 MonitorElement* h_trackJetDistVal = nullptr;
0191 MonitorElement* h_trackPtRel = nullptr;
0192 MonitorElement* h_trackDeltaR = nullptr;
0193 MonitorElement* h_trackPtRatio = nullptr;
0194 MonitorElement* h_trackSip3dSig = nullptr;
0195 MonitorElement* h_trackSip2dSig = nullptr;
0196 MonitorElement* h_trackDecayLenVal = nullptr;
0197 MonitorElement* h_trackEtaRel = nullptr;
0198
0199 MonitorElement* h_vertexEnergyRatio = nullptr;
0200 MonitorElement* h_vertexJetDeltaR = nullptr;
0201 MonitorElement* h_flightDistance2dVal = nullptr;
0202 MonitorElement* h_flightDistance2dSig = nullptr;
0203 MonitorElement* h_flightDistance3dVal = nullptr;
0204 MonitorElement* h_flightDistance3dSig = nullptr;
0205
0206 ObjME OnlineTrkEff_Pt;
0207 ObjME OnlineTrkEff_Eta;
0208 ObjME OnlineTrkEff_3d_ip_distance;
0209 ObjME OnlineTrkEff_3d_ip_sig;
0210 ObjME OnlineTrkFake_Pt;
0211 ObjME OnlineTrkFake_Eta;
0212 ObjME OnlineTrkFake_3d_ip_distance;
0213 ObjME OnlineTrkFake_3d_ip_sig;
0214
0215
0216
0217 private:
0218 int prescaleUsed_;
0219 std::string pathName_;
0220 std::string filterName_;
0221 std::string processName_;
0222 int objectType_;
0223 std::string triggerType_;
0224 };
0225
0226 class PathInfoCollection : public std::vector<PathInfo> {
0227 public:
0228 PathInfoCollection() : std::vector<PathInfo>(){};
0229 std::vector<PathInfo>::iterator find(const std::string& pathName) { return std::find(begin(), end(), pathName); }
0230 };
0231
0232 PathInfoCollection hltPathsAll_;
0233 };
0234
0235 using namespace edm;
0236 using namespace reco;
0237 using namespace std;
0238 using namespace trigger;
0239
0240 BTVHLTOfflineSource::BTVHLTOfflineSource(const edm::ParameterSet& iConfig)
0241 : dirname_(iConfig.getUntrackedParameter("dirname", std::string("HLT/BTV/"))),
0242 processname_(iConfig.getParameter<std::string>("processname")),
0243 verbose_(iConfig.getUntrackedParameter<bool>("verbose", false)),
0244 triggerSummaryLabel_(iConfig.getParameter<edm::InputTag>("triggerSummaryLabel")),
0245 triggerResultsLabel_(iConfig.getParameter<edm::InputTag>("triggerResultsLabel")),
0246 turnon_threshold_loose_(iConfig.getParameter<double>("turnon_threshold_loose")),
0247 turnon_threshold_medium_(iConfig.getParameter<double>("turnon_threshold_medium")),
0248 turnon_threshold_tight_(iConfig.getParameter<double>("turnon_threshold_tight")),
0249 offlineDiscrTokenb_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("offlineDiscrLabelb"))),
0250 offlineDiscrTokenbb_(
0251 consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("offlineDiscrLabelbb"))),
0252 offlineIPToken_(consumes<View<BaseTagInfo>>(iConfig.getParameter<edm::InputTag>("offlineIPLabel"))),
0253
0254 hltFastPVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("hltFastPVLabel"))),
0255 hltPFPVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("hltPFPVLabel"))),
0256 hltCaloPVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("hltCaloPVLabel"))),
0257 offlinePVToken_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("offlinePVLabel"))),
0258 triggerResultsToken(consumes<edm::TriggerResults>(triggerResultsLabel_)),
0259 triggerResultsFUToken(consumes<edm::TriggerResults>(
0260 edm::InputTag(triggerResultsLabel_.label(), triggerResultsLabel_.instance(), std::string("FU")))),
0261 triggerSummaryToken(consumes<trigger::TriggerEvent>(triggerSummaryLabel_)),
0262 triggerSummaryFUToken(consumes<trigger::TriggerEvent>(
0263 edm::InputTag(triggerSummaryLabel_.label(), triggerSummaryLabel_.instance(), std::string("FU")))),
0264 shallowTagInfosTokenCalo_(
0265 consumes<vector<reco::ShallowTagInfo>>(edm::InputTag("hltDeepCombinedSecondaryVertexBJetTagsInfosCalo"))),
0266 shallowTagInfosTokenPf_(
0267 consumes<vector<reco::ShallowTagInfo>>(edm::InputTag("hltDeepCombinedSecondaryVertexBJetTagsInfos"))),
0268 SVTagInfosTokenCalo_(consumes<std::vector<reco::SecondaryVertexTagInfo>>(
0269 edm::InputTag("hltInclusiveSecondaryVertexFinderTagInfos"))),
0270 SVTagInfosTokenPf_(consumes<std::vector<SVTagInfo>>(edm::InputTag("hltDeepSecondaryVertexTagInfosPF"))),
0271 caloTagsToken_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("onlineDiscrLabelCalo"))),
0272 pfTagsToken_(consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("onlineDiscrLabelPF"))),
0273 minDecayLength_(iConfig.getParameter<double>("minDecayLength")),
0274 maxDecayLength_(iConfig.getParameter<double>("maxDecayLength")),
0275 minJetDistance_(iConfig.getParameter<double>("minJetDistance")),
0276 maxJetDistance_(iConfig.getParameter<double>("maxJetDistance")),
0277 dRTrackMatch_(iConfig.getParameter<double>("dRTrackMatch")) {
0278 std::vector<edm::ParameterSet> paths = iConfig.getParameter<std::vector<edm::ParameterSet>>("pathPairs");
0279 for (const auto& path : paths) {
0280 custompathnamepairs_.push_back(
0281 make_pair(path.getParameter<std::string>("pathname"), path.getParameter<std::string>("pathtype")));
0282 }
0283 }
0284
0285 BTVHLTOfflineSource::~BTVHLTOfflineSource() = default;
0286
0287 void BTVHLTOfflineSource::dqmBeginRun(const edm::Run& run, const edm::EventSetup& c) {
0288 bool changed = true;
0289 if (!hltConfig_.init(run, c, processname_, changed)) {
0290 LogDebug("BTVHLTOfflineSource") << "HLTConfigProvider failed to initialize.";
0291 }
0292
0293 for (unsigned int idx = 0; idx != hltConfig_.size(); ++idx) {
0294 const auto& pathname = hltConfig_.triggerName(idx);
0295
0296 for (const auto& custompathnamepair : custompathnamepairs_) {
0297 if (pathname.find(custompathnamepair.first) != std::string::npos) {
0298 hltPathsAll_.push_back(PathInfo(1, pathname, "dummy", processname_, 0, custompathnamepair.second));
0299 }
0300 }
0301 }
0302 }
0303
0304 void BTVHLTOfflineSource::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0305 edm::Handle<edm::TriggerResults> triggerResults;
0306 iEvent.getByToken(triggerResultsToken, triggerResults);
0307 if (!triggerResults.isValid()) {
0308 iEvent.getByToken(triggerResultsFUToken, triggerResults);
0309 if (!triggerResults.isValid()) {
0310 edm::LogInfo("BTVHLTOfflineSource") << "TriggerResults not found, skipping event";
0311 return;
0312 }
0313 }
0314
0315 const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
0316
0317 edm::Handle<trigger::TriggerEvent> triggerObj;
0318 iEvent.getByToken(triggerSummaryToken, triggerObj);
0319 if (!triggerObj.isValid()) {
0320 iEvent.getByToken(triggerSummaryFUToken, triggerObj);
0321 if (!triggerObj.isValid()) {
0322 edm::LogInfo("BTVHLTOfflineSource") << "TriggerEvent not found, skipping event";
0323 return;
0324 }
0325 }
0326
0327 edm::Handle<reco::JetTagCollection> caloTags;
0328 iEvent.getByToken(caloTagsToken_, caloTags);
0329
0330 edm::Handle<reco::JetTagCollection> pfTags;
0331 iEvent.getByToken(pfTagsToken_, pfTags);
0332
0333 Handle<reco::VertexCollection> VertexHandler;
0334
0335 Handle<reco::JetTagCollection> offlineJetTagHandlerb;
0336 iEvent.getByToken(offlineDiscrTokenb_, offlineJetTagHandlerb);
0337
0338 Handle<reco::JetTagCollection> offlineJetTagHandlerbb;
0339 iEvent.getByToken(offlineDiscrTokenbb_, offlineJetTagHandlerbb);
0340
0341 Handle<View<BaseTagInfo>> offlineIPTagHandle;
0342 iEvent.getByToken(offlineIPToken_, offlineIPTagHandle);
0343
0344 Handle<reco::VertexCollection> offlineVertexHandler;
0345 iEvent.getByToken(offlinePVToken_, offlineVertexHandler);
0346
0347 if (verbose_ && iEvent.id().event() % 10000 == 0)
0348 cout << "Run = " << iEvent.id().run() << ", LS = " << iEvent.luminosityBlock()
0349 << ", Event = " << iEvent.id().event() << endl;
0350
0351 if (!triggerResults.isValid())
0352 return;
0353
0354 edm::Handle<std::vector<SVTagInfo>> jetSVTagsCollPF;
0355 edm::Handle<std::vector<reco::SecondaryVertexTagInfo>> jetSVTagsCollCalo;
0356
0357 for (auto& v : hltPathsAll_) {
0358 unsigned index = triggerNames.triggerIndex(v.getPath());
0359 if (!(index < triggerNames.size())) {
0360 edm::LogInfo("BTVHLTOfflineSource") << "Path " << v.getPath() << " not in menu, skipping event";
0361 continue;
0362 }
0363
0364 if (!triggerResults->accept(index)) {
0365 edm::LogInfo("BTVHLTOfflineSource") << "Path " << v.getPath() << " not accepted, skipping event";
0366 continue;
0367 }
0368
0369 if (v.getTriggerType() == "PF") {
0370 iEvent.getByToken(SVTagInfosTokenPf_, jetSVTagsCollPF);
0371 } else {
0372 iEvent.getByToken(SVTagInfosTokenCalo_, jetSVTagsCollCalo);
0373 }
0374
0375
0376 if ((v.getTriggerType() == "PF" && pfTags.isValid()) ||
0377 (v.getTriggerType() == "Calo" && caloTags.isValid() && !caloTags->empty())) {
0378 const auto& iter = (v.getTriggerType() == "PF") ? pfTags->begin() : caloTags->begin();
0379
0380 float Discr_online = iter->second;
0381 if (Discr_online < 0)
0382 Discr_online = -0.05;
0383
0384 v.Discr->Fill(Discr_online);
0385 v.Pt->Fill(iter->first->pt());
0386 v.Eta->Fill(iter->first->eta());
0387
0388 if (offlineJetTagHandlerb.isValid()) {
0389 for (auto const& iterOffb : *offlineJetTagHandlerb) {
0390 float DR = reco::deltaR(iterOffb.first->eta(), iterOffb.first->phi(), iter->first->eta(), iter->first->phi());
0391 if (DR < 0.3) {
0392 float Discr_offline = iterOffb.second;
0393
0394
0395 if (offlineJetTagHandlerbb.isValid()) {
0396 for (auto const& iterOffbb : *offlineJetTagHandlerbb) {
0397 DR = reco::deltaR(
0398 iterOffbb.first->eta(), iterOffbb.first->phi(), iter->first->eta(), iter->first->phi());
0399 if (DR < 0.3) {
0400 Discr_offline += iterOffbb.second;
0401 break;
0402 }
0403 }
0404 }
0405
0406 if (Discr_offline < 0)
0407 Discr_offline = -0.05;
0408 v.Discr_HLTvsRECO->Fill(Discr_online, Discr_offline);
0409 v.Discr_HLTMinusRECO->Fill(Discr_online - Discr_offline);
0410
0411 v.Discr_turnon_loose.denominator->Fill(Discr_offline);
0412 v.Discr_turnon_medium.denominator->Fill(Discr_offline);
0413 v.Discr_turnon_tight.denominator->Fill(Discr_offline);
0414
0415 if (Discr_online > turnon_threshold_loose_)
0416 v.Discr_turnon_loose.numerator->Fill(Discr_offline);
0417 if (Discr_online > turnon_threshold_medium_)
0418 v.Discr_turnon_medium.numerator->Fill(Discr_offline);
0419 if (Discr_online > turnon_threshold_tight_)
0420 v.Discr_turnon_tight.numerator->Fill(Discr_offline);
0421
0422 break;
0423 }
0424 }
0425 }
0426
0427 bool pfSVTagCollValid = (v.getTriggerType() == "PF" && jetSVTagsCollPF.isValid());
0428 bool caloSVTagCollValid = (v.getTriggerType() == "Calo" && jetSVTagsCollCalo.isValid());
0429 if (offlineIPTagHandle.isValid() && (pfSVTagCollValid || caloSVTagCollValid)) {
0430 std::vector<float> offlineIP3D;
0431 std::vector<float> offlineIP3DSig;
0432 std::vector<const reco::Track*> offlineTracks = getOfflineBTagTracks(
0433 iter->first->eta(), iter->first->phi(), offlineIPTagHandle, offlineIP3D, offlineIP3DSig);
0434 std::vector<const reco::Track*> onlineTracks;
0435 std::vector<float> onlineIP3D;
0436 std::vector<float> onlineIP3DSig;
0437 if (pfSVTagCollValid)
0438 onlineTracks = getOnlineBTagTracks<SVTagInfo>(
0439 iter->first->eta(), iter->first->phi(), jetSVTagsCollPF, onlineIP3D, onlineIP3DSig);
0440 if (caloSVTagCollValid)
0441 onlineTracks = getOnlineBTagTracks<reco::SecondaryVertexTagInfo>(
0442 iter->first->eta(), iter->first->phi(), jetSVTagsCollCalo, onlineIP3D, onlineIP3DSig);
0443
0444 for (unsigned int iOffTrk = 0; iOffTrk < offlineTracks.size(); ++iOffTrk) {
0445 const reco::Track* offTrk = offlineTracks.at(iOffTrk);
0446 bool hasMatch = false;
0447 float offTrkEta = offTrk->eta();
0448 float offTrkPhi = offTrk->phi();
0449
0450 for (const reco::Track* onTrk : onlineTracks) {
0451 float DR = reco::deltaR(offTrkEta, offTrkPhi, onTrk->eta(), onTrk->phi());
0452 if (DR < dRTrackMatch_) {
0453 hasMatch = true;
0454 }
0455 }
0456
0457 float offTrkPt = offTrk->pt();
0458 v.OnlineTrkEff_Pt.denominator->Fill(offTrkPt);
0459 if (hasMatch)
0460 v.OnlineTrkEff_Pt.numerator->Fill(offTrkPt);
0461
0462 v.OnlineTrkEff_Eta.denominator->Fill(offTrkEta);
0463 if (hasMatch)
0464 v.OnlineTrkEff_Eta.numerator->Fill(offTrkEta);
0465
0466 v.OnlineTrkEff_3d_ip_distance.denominator->Fill(offlineIP3D.at(iOffTrk));
0467 if (hasMatch)
0468 v.OnlineTrkEff_3d_ip_distance.numerator->Fill(offlineIP3D.at(iOffTrk));
0469
0470 v.OnlineTrkEff_3d_ip_sig.denominator->Fill(offlineIP3DSig.at(iOffTrk));
0471 if (hasMatch)
0472 v.OnlineTrkEff_3d_ip_sig.numerator->Fill(offlineIP3DSig.at(iOffTrk));
0473 }
0474
0475 for (unsigned int iOnTrk = 0; iOnTrk < onlineTracks.size(); ++iOnTrk) {
0476 const reco::Track* onTrk = onlineTracks.at(iOnTrk);
0477 bool hasMatch = false;
0478 float onTrkEta = onTrk->eta();
0479 float onTrkPhi = onTrk->phi();
0480
0481 for (const reco::Track* offTrk : offlineTracks) {
0482 float DR = reco::deltaR(onTrkEta, onTrkPhi, offTrk->eta(), offTrk->phi());
0483 if (DR < dRTrackMatch_) {
0484 hasMatch = true;
0485 }
0486 }
0487
0488 float onTrkPt = onTrk->pt();
0489 v.OnlineTrkFake_Pt.denominator->Fill(onTrkPt);
0490 if (!hasMatch)
0491 v.OnlineTrkFake_Pt.numerator->Fill(onTrkPt);
0492
0493 v.OnlineTrkFake_Eta.denominator->Fill(onTrkEta);
0494 if (!hasMatch)
0495 v.OnlineTrkFake_Eta.numerator->Fill(onTrkEta);
0496
0497 v.OnlineTrkFake_3d_ip_distance.denominator->Fill(onlineIP3D.at(iOnTrk));
0498 if (!hasMatch)
0499 v.OnlineTrkFake_3d_ip_distance.numerator->Fill(onlineIP3D.at(iOnTrk));
0500
0501 v.OnlineTrkFake_3d_ip_sig.denominator->Fill(onlineIP3DSig.at(iOnTrk));
0502 if (!hasMatch)
0503 v.OnlineTrkFake_3d_ip_sig.numerator->Fill(onlineIP3DSig.at(iOnTrk));
0504 }
0505 }
0506
0507 if (v.getTriggerType() == "PF") {
0508 iEvent.getByToken(hltPFPVToken_, VertexHandler);
0509 } else {
0510 iEvent.getByToken(hltFastPVToken_, VertexHandler);
0511 }
0512 if (VertexHandler.isValid()) {
0513 v.PVz->Fill(VertexHandler->begin()->z());
0514 if (offlineVertexHandler.isValid()) {
0515 v.PVz_HLTMinusRECO->Fill(VertexHandler->begin()->z() - offlineVertexHandler->begin()->z());
0516 }
0517 }
0518 }
0519
0520
0521 if (caloTags.isValid() && v.getTriggerType() == "Calo" && !caloTags->empty()) {
0522 iEvent.getByToken(hltCaloPVToken_, VertexHandler);
0523 if (VertexHandler.isValid()) {
0524 v.fastPVz->Fill(VertexHandler->begin()->z());
0525 if (offlineVertexHandler.isValid()) {
0526 v.fastPVz_HLTMinusRECO->Fill(VertexHandler->begin()->z() - offlineVertexHandler->begin()->z());
0527 }
0528 }
0529 }
0530
0531
0532
0533
0534 edm::Handle<std::vector<reco::ShallowTagInfo>> shallowTagInfosCalo;
0535 iEvent.getByToken(shallowTagInfosTokenCalo_, shallowTagInfosCalo);
0536
0537 edm::Handle<std::vector<reco::ShallowTagInfo>> shallowTagInfosPf;
0538 iEvent.getByToken(shallowTagInfosTokenPf_, shallowTagInfosPf);
0539
0540
0541
0542
0543
0544
0545
0546
0547 if ((v.getTriggerType() == "PF" && shallowTagInfosPf.isValid()) ||
0548 (v.getTriggerType() == "Calo" && shallowTagInfosCalo.isValid())) {
0549 const auto& shallowTagInfoCollection = (v.getTriggerType() == "PF") ? shallowTagInfosPf : shallowTagInfosCalo;
0550 for (const auto& shallowTagInfo : *shallowTagInfoCollection) {
0551 const auto& tagVars = shallowTagInfo.taggingVariables();
0552
0553
0554 for (const auto& tagVar : tagVars.getList(reco::btau::jetNSecondaryVertices, false)) {
0555 v.h_jetNSecondaryVertices->Fill(tagVar);
0556 v.n_vtx->Fill(tagVar);
0557 }
0558
0559 for (const auto& tagVar : tagVars.getList(reco::btau::jetNSelectedTracks, false)) {
0560 v.n_sel_tracks->Fill(tagVar);
0561 v.h_jetNSelectedTracks->Fill(tagVar);
0562 }
0563
0564 for (const auto& tagVar : tagVars.getList(reco::btau::jetPt, false)) {
0565 v.h_jet_pt->Fill(tagVar);
0566 }
0567
0568 for (const auto& tagVar : tagVars.getList(reco::btau::jetEta, false)) {
0569 v.h_jet_eta->Fill(tagVar);
0570 }
0571
0572 for (const auto& tagVar : tagVars.getList(reco::btau::trackSumJetEtRatio, false)) {
0573 v.h_trackSumJetEtRatio->Fill(tagVar);
0574 }
0575
0576 for (const auto& tagVar : tagVars.getList(reco::btau::trackSumJetDeltaR, false)) {
0577 v.h_trackSumJetDeltaR->Fill(tagVar);
0578 }
0579
0580 for (const auto& tagVar : tagVars.getList(reco::btau::vertexCategory, false)) {
0581 v.h_vertexCategory->Fill(tagVar);
0582 }
0583
0584 for (const auto& tagVar : tagVars.getList(reco::btau::trackSip2dValAboveCharm, false)) {
0585 v.h_trackSip2dValAboveCharm->Fill(tagVar);
0586 }
0587
0588 for (const auto& tagVar : tagVars.getList(reco::btau::trackSip2dSigAboveCharm, false)) {
0589 v.h_trackSip2dSigAboveCharm->Fill(tagVar);
0590 }
0591
0592 for (const auto& tagVar : tagVars.getList(reco::btau::trackSip3dValAboveCharm, false)) {
0593 v.h_trackSip3dValAboveCharm->Fill(tagVar);
0594 }
0595
0596 for (const auto& tagVar : tagVars.getList(reco::btau::trackSip3dSigAboveCharm, false)) {
0597 v.h_trackSip3dSigAboveCharm->Fill(tagVar);
0598 }
0599
0600 for (const auto& tagVar : tagVars.getList(reco::btau::jetNTracksEtaRel, false)) {
0601 v.h_jetNTracksEtaRel->Fill(tagVar);
0602 }
0603
0604
0605
0606 const auto& trackSip3dVal = tagVars.getList(reco::btau::trackSip3dVal, false);
0607 const auto& trackSip3dSig = tagVars.getList(reco::btau::trackSip3dSig, false);
0608 const auto& trackJetDistVal = tagVars.getList(reco::btau::trackJetDistVal, false);
0609 const auto& trackPtRel = tagVars.getList(reco::btau::trackPtRel, false);
0610 const auto& trackSip2dSig = tagVars.getList(reco::btau::trackSip2dSig, false);
0611 const auto& trackDeltaR = tagVars.getList(reco::btau::trackDeltaR, false);
0612 const auto& trackPtRatio = tagVars.getList(reco::btau::trackPtRatio, false);
0613 const auto& trackDecayLenVal = tagVars.getList(reco::btau::trackDecayLenVal, false);
0614 const auto& trackEtaRel = tagVars.getList(reco::btau::trackEtaRel, false);
0615
0616 for (unsigned i_trk = 0; i_trk < trackEtaRel.size(); i_trk++) {
0617 v.h_trackEtaRel->Fill(trackEtaRel[i_trk]);
0618 }
0619
0620 for (unsigned i_trk = 0; i_trk < trackJetDistVal.size(); i_trk++) {
0621 v.h_trackJetDistVal->Fill(trackJetDistVal[i_trk]);
0622 }
0623
0624 for (unsigned i_trk = 0; i_trk < trackPtRel.size(); i_trk++) {
0625 v.h_trackPtRel->Fill(trackPtRel[i_trk]);
0626 }
0627
0628 for (unsigned i_trk = 0; i_trk < trackDeltaR.size(); i_trk++) {
0629 v.h_trackDeltaR->Fill(trackDeltaR[i_trk]);
0630 }
0631
0632 for (unsigned i_trk = 0; i_trk < trackPtRatio.size(); i_trk++) {
0633 v.h_trackPtRatio->Fill(trackPtRatio[i_trk]);
0634 }
0635
0636 for (unsigned i_trk = 0; i_trk < trackDecayLenVal.size(); i_trk++) {
0637 v.h_trackDecayLenVal->Fill(trackDecayLenVal[i_trk]);
0638 }
0639
0640 for (unsigned i_trk = 0; i_trk < trackSip3dVal.size(); i_trk++) {
0641 float val = trackSip3dVal[i_trk];
0642 float sig = trackSip3dSig[i_trk];
0643 v.h_3d_ip_distance->Fill(val);
0644 v.h_3d_ip_error->Fill(val / sig);
0645 v.h_3d_ip_sig->Fill(sig);
0646
0647 v.h_trackSip2dSig->Fill(trackSip2dSig[i_trk]);
0648 }
0649
0650
0651 for (const auto& tagVar : tagVars.getList(reco::btau::vertexMass, false)) {
0652 v.vtx_mass->Fill(tagVar);
0653 }
0654 for (const auto& tagVar : tagVars.getList(reco::btau::vertexNTracks, false)) {
0655 v.n_vtx_trks->Fill(tagVar);
0656 }
0657
0658 for (const auto& tagVar : tagVars.getList(reco::btau::vertexEnergyRatio, false)) {
0659 v.h_vertexEnergyRatio->Fill(tagVar);
0660 }
0661
0662 for (const auto& tagVar : tagVars.getList(reco::btau::vertexJetDeltaR, false)) {
0663 v.h_vertexJetDeltaR->Fill(tagVar);
0664 }
0665
0666 for (const auto& tagVar : tagVars.getList(reco::btau::flightDistance2dVal, false)) {
0667 v.h_flightDistance2dVal->Fill(tagVar);
0668 }
0669
0670 for (const auto& tagVar : tagVars.getList(reco::btau::flightDistance2dSig, false)) {
0671 v.h_flightDistance2dSig->Fill(tagVar);
0672 }
0673
0674 for (const auto& tagVar : tagVars.getList(reco::btau::flightDistance3dVal, false)) {
0675 v.h_flightDistance3dVal->Fill(tagVar);
0676 }
0677
0678 for (const auto& tagVar : tagVars.getList(reco::btau::flightDistance3dSig, false)) {
0679 v.h_flightDistance3dSig->Fill(tagVar);
0680 }
0681
0682
0683
0684
0685
0686
0687 }
0688 }
0689
0690
0691
0692
0693
0694
0695
0696
0697
0698
0699
0700
0701
0702
0703
0704
0705
0706
0707
0708
0709
0710
0711
0712
0713
0714
0715
0716
0717
0718
0719
0720
0721
0722
0723
0724
0725 }
0726 }
0727
0728 std::vector<const reco::Track*> BTVHLTOfflineSource::getOfflineBTagTracks(float hltJetEta,
0729 float hltJetPhi,
0730 Handle<View<BaseTagInfo>> offlineIPTagHandle,
0731 std::vector<float>& offlineIP3D,
0732 std::vector<float>& offlineIP3DSig) {
0733 std::vector<const reco::Track*> offlineTracks;
0734
0735 for (auto const& iterOffIP : *offlineIPTagHandle) {
0736 float DR = reco::deltaR(iterOffIP.jet()->eta(), iterOffIP.jet()->phi(), hltJetEta, hltJetPhi);
0737
0738 if (DR > 0.3)
0739 continue;
0740
0741 const reco::IPTagInfo<vector<reco::CandidatePtr>, reco::JetTagInfo>* tagInfo =
0742 dynamic_cast<const reco::IPTagInfo<vector<reco::CandidatePtr>, reco::JetTagInfo>*>(&iterOffIP);
0743
0744 if (!tagInfo) {
0745 throw cms::Exception("Configuration")
0746 << "BTagPerformanceAnalyzer: Extended TagInfo not of type TrackIPTagInfo. " << std::endl;
0747 }
0748
0749 const GlobalPoint pv(tagInfo->primaryVertex()->position().x(),
0750 tagInfo->primaryVertex()->position().y(),
0751 tagInfo->primaryVertex()->position().z());
0752
0753 const std::vector<reco::btag::TrackIPData>& ip = tagInfo->impactParameterData();
0754
0755 std::vector<std::size_t> sortedIndices = tagInfo->sortedIndexes(reco::btag::IP2DSig);
0756 std::vector<reco::CandidatePtr> sortedTracks = tagInfo->sortedTracks(sortedIndices);
0757 std::vector<std::size_t> selectedIndices;
0758 vector<reco::CandidatePtr> selectedTracks;
0759 for (unsigned int n = 0; n != sortedIndices.size(); ++n) {
0760 double decayLength = (ip[sortedIndices[n]].closestToJetAxis - pv).mag();
0761 double jetDistance = ip[sortedIndices[n]].distanceToJetAxis.value();
0762 if (decayLength > minDecayLength_ && decayLength < maxDecayLength_ && fabs(jetDistance) >= minJetDistance_ &&
0763 fabs(jetDistance) < maxJetDistance_) {
0764 selectedIndices.push_back(sortedIndices[n]);
0765 selectedTracks.push_back(sortedTracks[n]);
0766 }
0767 }
0768
0769 for (unsigned int n = 0; n != selectedIndices.size(); ++n) {
0770 const reco::Track* track = reco::btag::toTrack(selectedTracks[n]);
0771 offlineTracks.push_back(track);
0772 offlineIP3D.push_back(ip[n].ip3d.value());
0773 offlineIP3DSig.push_back(ip[n].ip3d.significance());
0774 }
0775 }
0776 return offlineTracks;
0777 }
0778
0779 template <class Base>
0780 std::vector<const reco::Track*> BTVHLTOfflineSource::getOnlineBTagTracks(float hltJetEta,
0781 float hltJetPhi,
0782 edm::Handle<std::vector<Base>> jetSVTagsColl,
0783 std::vector<float>& onlineIP3D,
0784 std::vector<float>& onlineIP3DSig) {
0785 std::vector<const reco::Track*> onlineTracks;
0786
0787 for (auto iterTI = jetSVTagsColl->begin(); iterTI != jetSVTagsColl->end(); ++iterTI) {
0788 float DR = reco::deltaR(iterTI->jet()->eta(), iterTI->jet()->phi(), hltJetEta, hltJetPhi);
0789 if (DR > 0.3)
0790 continue;
0791
0792 const auto& ipInfo = *(iterTI->trackIPTagInfoRef().get());
0793 const std::vector<reco::btag::TrackIPData>& ip = ipInfo.impactParameterData();
0794
0795 unsigned int trackSize = ipInfo.selectedTracks().size();
0796 for (unsigned int itt = 0; itt < trackSize; ++itt) {
0797 const auto ptrackRef = (ipInfo.selectedTracks()[itt]);
0798
0799 if (ptrackRef.isAvailable()) {
0800 const reco::Track* ptrackPtr = reco::btag::toTrack(ptrackRef);
0801 onlineTracks.push_back(ptrackPtr);
0802 onlineIP3D.push_back(ip[itt].ip3d.value());
0803 onlineIP3DSig.push_back(ip[itt].ip3d.significance());
0804 }
0805 }
0806 }
0807 return onlineTracks;
0808 }
0809
0810 void BTVHLTOfflineSource::bookHistograms(DQMStore::IBooker& iBooker, edm::Run const& run, edm::EventSetup const& c) {
0811 iBooker.setCurrentFolder(dirname_);
0812 for (auto& v : hltPathsAll_) {
0813 std::string trgPathName = HLTConfigProvider::removeVersion(v.getPath());
0814 std::string subdirName = dirname_ + "/" + trgPathName + v.getTriggerType();
0815 std::string trigPath = "(" + trgPathName + ")";
0816 iBooker.setCurrentFolder(subdirName);
0817
0818 std::string labelname("HLT");
0819 std::string histoname(labelname + "");
0820 std::string title(labelname + "");
0821
0822 histoname = labelname + "_Discr";
0823 title = labelname + "_Discr " + trigPath;
0824 v.Discr = iBooker.book1D(histoname.c_str(), title.c_str(), 110, -0.1, 1);
0825
0826 histoname = labelname + "_Pt";
0827 title = labelname + "_Pt " + trigPath;
0828 v.Pt = iBooker.book1D(histoname.c_str(), title.c_str(), 100, 0, 400);
0829
0830 histoname = labelname + "_Eta";
0831 title = labelname + "_Eta " + trigPath;
0832 v.Eta = iBooker.book1D(histoname.c_str(), title.c_str(), 60, -3.0, 3.0);
0833
0834 histoname = "HLTvsRECO_Discr";
0835 title = "online discr vs offline discr " + trigPath;
0836 v.Discr_HLTvsRECO = iBooker.book2D(histoname.c_str(), title.c_str(), 110, -0.1, 1, 110, -0.1, 1);
0837
0838 histoname = "HLTMinusRECO_Discr";
0839 title = "online discr minus offline discr " + trigPath;
0840 v.Discr_HLTMinusRECO = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -1, 1);
0841
0842 histoname = "Turnon_loose_Discr";
0843 title = "turn-on with loose threshold " + trigPath;
0844 v.bookME(iBooker, v.Discr_turnon_loose, histoname, title, 22, -0.1, 1.);
0845
0846 histoname = "Turnon_medium_Discr";
0847 title = "turn-on with medium threshold " + trigPath;
0848 v.bookME(iBooker, v.Discr_turnon_medium, histoname, title, 22, -0.1, 1.);
0849
0850 histoname = "Turnon_tight_Discr";
0851 title = "turn-on with tight threshold " + trigPath;
0852 v.bookME(iBooker, v.Discr_turnon_tight, histoname, title, 22, -0.1, 1.);
0853
0854 histoname = labelname + "_PVz";
0855 title = "online z(PV) " + trigPath;
0856 v.PVz = iBooker.book1D(histoname.c_str(), title.c_str(), 80, -20, 20);
0857
0858 histoname = labelname + "_fastPVz";
0859 title = "online z(fastPV) " + trigPath;
0860 v.fastPVz = iBooker.book1D(histoname.c_str(), title.c_str(), 80, -20, 20);
0861
0862 histoname = "HLTMinusRECO_PVz";
0863 title = "online z(PV) - offline z(PV) " + trigPath;
0864 v.PVz_HLTMinusRECO = iBooker.book1D(histoname.c_str(), title.c_str(), 200, -0.5, 0.5);
0865
0866 histoname = "HLTMinusRECO_fastPVz";
0867 title = "online z(fastPV) - offline z(PV) " + trigPath;
0868 v.fastPVz_HLTMinusRECO = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -2, 2);
0869
0870 histoname = "n_vtx";
0871 title = "N vertex candidates " + trigPath;
0872 v.n_vtx = iBooker.book1D(histoname.c_str(), title.c_str(), 10, -0.5, 9.5);
0873
0874 histoname = "vtx_mass";
0875 title = "secondary vertex mass (GeV)" + trigPath;
0876 v.vtx_mass = iBooker.book1D(histoname.c_str(), title.c_str(), 20, 0, 10);
0877
0878 histoname = "n_vtx_trks";
0879 title = "N tracks associated to secondary vertex" + trigPath;
0880 v.n_vtx_trks = iBooker.book1D(histoname.c_str(), title.c_str(), 20, -0.5, 19.5);
0881
0882 histoname = "n_sel_tracks";
0883 title = "N selected tracks" + trigPath;
0884 v.n_sel_tracks = iBooker.book1D(histoname.c_str(), title.c_str(), 25, -0.5, 24.5);
0885
0886 histoname = "3d_ip_distance";
0887 title = "3D IP distance of tracks (cm)" + trigPath;
0888 v.h_3d_ip_distance = iBooker.book1D(histoname.c_str(), title.c_str(), 40, -0.1, 0.1);
0889
0890 histoname = "3d_ip_error";
0891 title = "3D IP error of tracks (cm)" + trigPath;
0892 v.h_3d_ip_error = iBooker.book1D(histoname.c_str(), title.c_str(), 40, 0., 0.1);
0893
0894 histoname = "3d_ip_sig";
0895 title = "3D IP significance of tracks (cm)" + trigPath;
0896 v.h_3d_ip_sig = iBooker.book1D(histoname.c_str(), title.c_str(), 40, -40, 40);
0897
0898
0899 histoname = "jetNSecondaryVertices";
0900 title = "jet N Secondary Vertices" + trigPath;
0901 v.h_jetNSecondaryVertices = iBooker.book1D(histoname.c_str(), title.c_str(), 10, -0.5, 9.5);
0902
0903 histoname = "jet_pt";
0904 title = "jet pt" + trigPath;
0905 v.h_jet_pt = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 100);
0906
0907 histoname = "jet_eta";
0908 title = "jet eta" + trigPath;
0909 v.h_jet_eta = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -2.5, 2.5);
0910
0911 histoname = "trackSumJetEtRatio";
0912 title = "trackSumJetEtRatio" + trigPath;
0913 v.h_trackSumJetEtRatio = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 1.5);
0914
0915 histoname = "trackSip2dValAboveCharm";
0916 title = "trackSip2dSigAboveCharm" + trigPath;
0917 v.h_trackSip2dSigAboveCharm = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.2, 0.2);
0918
0919 histoname = "trackSip2dSigAboveCharm";
0920 title = "trackSip2dSigAboveCharm" + trigPath;
0921 v.h_trackSip2dValAboveCharm = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -50, 50);
0922
0923 histoname = "trackSip3dValAboveCharm";
0924 title = "trackSip3dValAboveCharm" + trigPath;
0925 v.h_trackSip3dValAboveCharm = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.2, 0.2);
0926
0927 histoname = "trackSip3dSigAboveCharm";
0928 title = "trackSip3dSigAboveCharm" + trigPath;
0929 v.h_trackSip3dSigAboveCharm = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -50, 50);
0930
0931 histoname = "jetNSelectedTracks";
0932 title = "jet N Selected Tracks" + trigPath;
0933 v.h_jetNSelectedTracks = iBooker.book1D(histoname.c_str(), title.c_str(), 42, -1.5, 40.5);
0934
0935 histoname = "jetNTracksEtaRel";
0936 title = "jetNTracksEtaRel" + trigPath;
0937 v.h_jetNTracksEtaRel = iBooker.book1D(histoname.c_str(), title.c_str(), 42, -1.5, 40.5);
0938
0939 histoname = "vertexCategory";
0940 title = "vertex category" + trigPath;
0941 v.h_vertexCategory = iBooker.book1D(histoname.c_str(), title.c_str(), 4, -1.5, 2.5);
0942
0943 histoname = "trackSumJetDeltaR";
0944 title = "trackSumJetDeltaR" + trigPath;
0945 v.h_trackSumJetDeltaR = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 0.35);
0946
0947
0948 histoname = "trackJetDistVal";
0949 title = "trackJetDistVal" + trigPath;
0950 v.h_trackJetDistVal = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -1, 0.01);
0951
0952 histoname = "trackPtRel";
0953 title = "track pt rel" + trigPath;
0954 v.h_trackPtRel = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 7);
0955
0956 histoname = "trackDeltaR";
0957 title = "trackDeltaR" + trigPath;
0958 v.h_trackDeltaR = iBooker.book1D(histoname.c_str(), title.c_str(), 160, -0.05, .47);
0959
0960 histoname = "trackPtRatio";
0961 title = "trackPtRatio" + trigPath;
0962 v.h_trackPtRatio = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.01, 0.3);
0963
0964 histoname = "trackSip2dSig";
0965 title = "trackSip2dSig" + trigPath;
0966 v.h_trackSip2dSig = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -55, 55);
0967
0968 histoname = "trackDecayLenVal";
0969 title = "trackDecayLenVal" + trigPath;
0970 v.h_trackDecayLenVal = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 22);
0971
0972 histoname = "trackEtaRel";
0973 title = "trackEtaRel" + trigPath;
0974 v.h_trackEtaRel = iBooker.book1D(histoname.c_str(), title.c_str(), 31, 0, 30);
0975
0976
0977 histoname = "vertexEnergyRatio";
0978 title = "vertexEnergyRatio" + trigPath;
0979 v.h_vertexEnergyRatio = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 3);
0980
0981 histoname = "vertexJetDeltaR";
0982 title = "vertexJetDeltaR" + trigPath;
0983 v.h_vertexJetDeltaR = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.01, 0.4);
0984
0985 histoname = "flightDistance2dVal";
0986 title = "flightDistance2dVal" + trigPath;
0987 v.h_flightDistance2dVal = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 5);
0988
0989 histoname = "flightDistance2dSig";
0990 title = "flightDistance2dSig" + trigPath;
0991 v.h_flightDistance2dSig = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -10, 150);
0992
0993 histoname = "flightDistance3dVal";
0994 title = "flightDistance3dVal" + trigPath;
0995 v.h_flightDistance3dVal = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -0.1, 5);
0996
0997 histoname = "flightDistance3dSig";
0998 title = "flightDistance3dSig" + trigPath;
0999 v.h_flightDistance3dSig = iBooker.book1D(histoname.c_str(), title.c_str(), 100, -10, 150);
1000
1001
1002
1003 histoname = "OnlineTrkEff_Pt";
1004 title = "Relative Online Trk Efficiency vs Pt " + trigPath;
1005 v.bookME(iBooker, v.OnlineTrkEff_Pt, histoname, title, 50, -0.5, 20.);
1006
1007 histoname = "OnlineTrkEff_Eta";
1008 title = "Relative Online Trk Efficiency vs Eta " + trigPath;
1009 v.bookME(iBooker, v.OnlineTrkEff_Eta, histoname, title, 60, -3.0, 3.0);
1010
1011 histoname = "OnlineTrkEff_3d_ip_distance";
1012 title = "Relative Online Trk Efficiency vs IP3D " + trigPath;
1013 v.bookME(iBooker, v.OnlineTrkEff_3d_ip_distance, histoname, title, 40, -0.1, 0.1);
1014
1015 histoname = "OnlineTrkEff_3d_ip_sig";
1016 title = "Relative Online Trk Efficiency vs IP3D significance " + trigPath;
1017 v.bookME(iBooker, v.OnlineTrkEff_3d_ip_sig, histoname, title, 40, -40, 40);
1018
1019 histoname = "OnlineTrkFake_Pt";
1020 title = "Relative Online Trk Fake Rate vs Pt " + trigPath;
1021 v.bookME(iBooker, v.OnlineTrkFake_Pt, histoname, title, 50, -0.5, 20.);
1022
1023 histoname = "OnlineTrkFake_Eta";
1024 title = "Relative Online Trk Fake Rate vs Eta " + trigPath;
1025 v.bookME(iBooker, v.OnlineTrkFake_Eta, histoname, title, 60, -3.0, 3.0);
1026
1027 histoname = "OnlineTrkFake_3d_ip_distance";
1028 title = "Relative Online Trk Fake Rate vs IP3D " + trigPath;
1029 v.bookME(iBooker, v.OnlineTrkFake_3d_ip_distance, histoname, title, 40, -0.1, 0.1);
1030
1031 histoname = "OnlineTrkFake_3d_ip_sig";
1032 title = "Relative Online Trk Fake Rate vs IP3D significance " + trigPath;
1033 v.bookME(iBooker, v.OnlineTrkFake_3d_ip_sig, histoname, title, 40, -40, 40);
1034
1035
1036
1037
1038
1039
1040
1041
1042 }
1043 }
1044
1045
1046 DEFINE_FWK_MODULE(BTVHLTOfflineSource);