13 #include "TDirectory.h" 15 #include "TLorentzVector.h" 16 #include "TInterpreter.h" 78 : pTrackLow_(iConfig.getParameter<double>(
"momentumLow")),
79 pTrackHigh_(iConfig.getParameter<double>(
"momentumHigh")),
80 useRaw_(iConfig.getUntrackedParameter<
int>(
"useRaw", 0)),
81 dataType_(iConfig.getUntrackedParameter<
int>(
"dataType", 0)),
82 labelIsoTkVar_(iConfig.getParameter<
edm::
InputTag>(
"isoTrackVarLabel")),
83 labelIsoTkEvt_(iConfig.getParameter<
edm::
InputTag>(
"isoTrackEvtLabel")),
84 debEvents_(iConfig.getParameter<
std::
vector<
int>>(
"debugEvents")),
99 <<
" events to be debugged";
112 <<
" Luminosity " <<
iEvent.luminosityBlock() <<
" Bunch " 113 <<
iEvent.bunchCrossing();
118 if (isotrkCalibColl.isValid()) {
119 auto isotrkCalib = *isotrkCalibColl.product();
122 edm::LogVerbatim(
"HcalIsoTrack") <<
"Finds HcalIsoTrkCalibVariablesCollection with " << isotrkCalib.size()
126 for (
const auto& itr : isotrkCalib) {
185 <<
" qltyFlag:qltyMissFlag:qltyPVFlag:selectTk " <<
t_qltyFlag <<
":" 230 edm::LogVerbatim(
"HcalIsoTrack") <<
"Cannot find HcalIsoTrkCalibVariablesCollection";
235 if (isotrkEventColl.isValid()) {
236 auto isotrkEvent = isotrkEventColl.product();
239 edm::LogVerbatim(
"HcalIsoTrack") <<
"Finds HcalIsoTrkEventVariablesCollection with " << isotrkEvent->size()
242 auto itr = isotrkEvent->begin();
243 if (itr != isotrkEvent->end()) {
262 edm::LogVerbatim(
"HcalIsoTrack") <<
"Cannot find HcalIsoTrkEventVariablesCollections";
268 tree =
fs->make<TTree>(
"CalibTree",
"CalibTree");
270 tree->Branch(
"t_Run", &
t_Run,
"t_Run/I");
285 tree->Branch(
"t_p", &
t_p,
"t_p/D");
286 tree->Branch(
"t_pt", &
t_pt,
"t_pt/D");
287 tree->Branch(
"t_phi", &
t_phi,
"t_phi/D");
317 tree2 =
fs->make<TTree>(
"EventInfo",
"Event Information");
342 <<
" events with p < " <<
pTrackLow_ <<
", " <<
nHigh_ <<
" events with p > " 348 desc.add<
double>(
"momentumLow", 40.0);
349 desc.add<
double>(
"momentumHigh", 60.0);
350 desc.addUntracked<
int>(
"useRaw", 0);
351 desc.addUntracked<
int>(
"dataType", 0);
355 desc.add<std::vector<int>>(
"debugEvents",
events);
356 descriptions.
add(
"hcalIsoTrackAnalyzer",
desc);
static const std::string kSharedResource
Log< level::Info, true > LogVerbatim
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< double > t_HitEnergies1
const std::vector< int > debEvents_
void beginRun(edm::Run const &, edm::EventSetup const &) override
std::vector< double > t_HitEnergies3
edm::EDGetTokenT< HcalIsoTrkEventVariablesCollection > tokIsoTrkEvt_
std::vector< int > t_ietaGood
void endRun(edm::Run const &, edm::EventSetup const &) override
std::vector< unsigned int > t_DetIds3
std::vector< unsigned int > t_DetIds
std::vector< double > t_HitEnergies
const edm::InputTag labelIsoTkEvt_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< HcalIsoTrkEventVariables > HcalIsoTrkEventVariablesCollection
HcalIsoTrackAnalyzer(edm::ParameterSet const &)
~HcalIsoTrackAnalyzer() override
#define DEFINE_FWK_MODULE(type)
std::vector< bool > t_trgbits
edm::EDGetTokenT< HcalIsoTrkCalibVariablesCollection > tokIsoTrkVar_
std::vector< int > t_ietaAll
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::InputTag labelIsoTkVar_
std::vector< HcalIsoTrkCalibVariables > HcalIsoTrkCalibVariablesCollection
void analyze(edm::Event const &, edm::EventSetup const &) override
std::vector< int > t_trackType
std::vector< bool > t_hltbits
std::vector< unsigned int > t_DetIds1