99 : TrackCollectionTag_(iConfig.getParameter<edm::
InputTag>(
"TrackCollectionTag")),
100 PVtxCollectionTag_(iConfig.getParameter<edm::
InputTag>(
"PVtxCollectionTag")),
101 debug_(iConfig.getParameter<bool>(
"Debug")),
102 acceptedBX_(iConfig.getParameter<std::
vector<unsigned int>>(
"acceptedBX")),
103 filename_(iConfig.getParameter<std::
string>(
"OutputFileName")) {
118 using namespace reco;
153 edm::LogInfo(
"LhcTrackAnalyzer") <<
"LhcTrackAnalyzer::analyze() looping over " <<
tracks.size() <<
"tracks."
160 <<
" LhcTrackAnalyzer::analyze() : Warning - Run " <<
run_ <<
" Event " <<
event_
161 <<
"\tNumber of tracks: " << tracks.size() <<
" , greater than " <<
nMaxtracks_ << std::endl;
222 <<
"LhcTrackAnalyzer does not support all types of tracks, encountered one from algo "
262 rootTree_ =
new TTree(
"tree",
"Lhc Track tree");
265 rootTree_->Branch(
"run", &
run_,
"run/I");
266 rootTree_->Branch(
"event", &
event_,
"event/I");
267 rootTree_->Branch(
"goodbx", &
goodbx_,
"goodbx/O");
268 rootTree_->Branch(
"goodvtx", &
goodvtx_,
"goodvtx/O");
269 rootTree_->Branch(
"nTracks", &
nTracks_,
"nTracks/I");
270 rootTree_->Branch(
"pt", &
pt_,
"pt[nTracks]/D");
271 rootTree_->Branch(
"eta", &
eta_,
"eta[nTracks]/D");
272 rootTree_->Branch(
"phi", &
phi_,
"phi[nTracks]/D");
273 rootTree_->Branch(
"chi2", &
chi2_,
"chi2[nTracks]/D");
274 rootTree_->Branch(
"chi2ndof", &
chi2ndof_,
"chi2ndof[nTracks]/D");
275 rootTree_->Branch(
"charge", &
charge_,
"charge[nTracks]/I");
276 rootTree_->Branch(
"qoverp", &
qoverp_,
"qoverp[nTracks]/D");
277 rootTree_->Branch(
"dz", &
dz_,
"dz[nTracks]/D");
278 rootTree_->Branch(
"dxy", &
dxy_,
"dxy[nTracks]/D");
279 rootTree_->Branch(
"xPCA", &
xPCA_,
"xPCA[nTracks]/D");
280 rootTree_->Branch(
"yPCA", &
yPCA_,
"yPCA[nTracks]/D");
281 rootTree_->Branch(
"zPCA", &
zPCA_,
"zPCA[nTracks]/D");
282 rootTree_->Branch(
"isHighPurity", &
isHighPurity_,
"isHighPurity[nTracks]/I");
283 rootTree_->Branch(
"trkQuality", &
trkQuality_,
"trkQuality[nTracks]/I");
284 rootTree_->Branch(
"trkAlgo", &
trkAlgo_,
"trkAlgo[nTracks]/I");
285 rootTree_->Branch(
"nValidHits", &
validhits_,
"nValidHits[nTracks][7]/I");
306 desc.
add<
bool>(
"Debug",
false);
307 desc.
add<std::vector<unsigned int>>(
"acceptedBX", {});
308 desc.
add<
std::string>(
"OutputFileName",
"LhcTrackAnalyzer_Output_default.root");
335 for (
int j = 0;
j < 7;
j++) {
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken
EventNumber_t event() const
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
int validhits_[nMaxtracks_][7]
#define DEFINE_FWK_MODULE(type)
int bunchCrossing() const
auto const & tracks
cannot be loose
int isHighPurity_[nMaxtracks_]
double zPCA_[nMaxtracks_]
edm::InputTag TrackCollectionTag_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int trkQuality_[nMaxtracks_]
double qoverp_[nMaxtracks_]
std::vector< unsigned int > acceptedBX_
edm::EDGetTokenT< reco::VertexCollection > theVertexCollectionToken
~LhcTrackAnalyzer() override=default
void setComment(std::string const &value)
double chi2ndof_[nMaxtracks_]
double yPCA_[nMaxtracks_]
Abs< T >::type abs(const T &t)
bool get(ProductID const &oid, Handle< PROD > &result) const
static constexpr int nMaxtracks_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Log< level::Info, false > LogInfo
int trkAlgo_[nMaxtracks_]
edm::InputTag PVtxCollectionTag_
std::string algoName() const
double xPCA_[nMaxtracks_]
double chi2_[nMaxtracks_]
Log< level::Warning, false > LogWarning
LhcTrackAnalyzer(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override