13 #include "TDirectory.h"
15 #include "TLorentzVector.h"
16 #include "TInterpreter.h"
79 : pTrackLow_(iConfig.getParameter<double>(
"momentumLow")),
80 pTrackHigh_(iConfig.getParameter<double>(
"momentumHigh")),
81 useRaw_(iConfig.getUntrackedParameter<int>(
"useRaw", 0)),
82 dataType_(iConfig.getUntrackedParameter<int>(
"dataType", 0)),
83 labelIsoTkVar_(iConfig.getParameter<edm::
InputTag>(
"isoTrackVarLabel")),
84 labelIsoTkEvt_(iConfig.getParameter<edm::
InputTag>(
"isoTrackEvtLabel")),
85 debEvents_(iConfig.getParameter<std::
vector<int>>(
"debugEvents")),
100 <<
" events to be debugged";
119 if (isotrkCalibColl.isValid()) {
120 auto isotrkCalib = isotrkCalibColl.product();
123 edm::LogVerbatim(
"HcalIsoTrack") <<
"Finds HcalIsoTrkCalibVariablesCollection with " << isotrkCalib->size()
127 for (
auto itr = isotrkCalib->begin(); itr != isotrkCalib->end(); ++itr) {
186 <<
" qltyFlag:qltyMissFlag:qltyPVFlag:selectTk " <<
t_qltyFlag <<
":"
231 edm::LogVerbatim(
"HcalIsoTrack") <<
"Cannot find HcalIsoTrkCalibVariablesCollection";
236 if (isotrkEventColl.isValid()) {
237 auto isotrkEvent = isotrkEventColl.product();
240 edm::LogVerbatim(
"HcalIsoTrack") <<
"Finds HcalIsoTrkEventVariablesCollection with " << isotrkEvent->size()
243 auto itr = isotrkEvent->begin();
244 if (itr != isotrkEvent->end()) {
263 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);
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
EventNumber_t event() const
const std::vector< int > debEvents_
void beginRun(edm::Run const &, edm::EventSetup const &) override
std::vector< double > t_HitEnergies3
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
edm::EDGetTokenT< HcalIsoTrkEventVariablesCollection > tokIsoTrkEvt_
std::vector< int > t_ietaGood
#define DEFINE_FWK_MODULE(type)
void endRun(edm::Run const &, edm::EventSetup const &) override
int bunchCrossing() const
std::vector< unsigned int > t_DetIds3
edm::LuminosityBlockNumber_t luminosityBlock() const
std::vector< unsigned int > t_DetIds
std::vector< double > t_HitEnergies
T * make(const Args &...args) const
make new ROOT object
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
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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
edm::Service< TFileService > fs