263 <<
"Run " <<
t_Run <<
" Event " <<
t_Event <<
" Luminosity " 265 <<
" starts ==========";
283 reco::TrackCollection::const_iterator trkItr;
295 for (
unsigned iGenJet = 0; iGenJet < genJets->size(); ++iGenJet) {
297 double genJetPt = genJet.
pt();
298 double genJetEta = genJet.
eta();
301 if (genJetEta>-2.5 && genJetEta<2.5) {
312 reco::PFJetCollection::const_iterator pfItr;
320 if (!recVtxs->empty() && !((*recVtxs)[0].isFake())) {
321 leadPV =
math::XYZPoint( (*recVtxs)[0].
x(),(*recVtxs)[0].
y(), (*recVtxs)[0].
z() );
322 }
else if (beamSpotH.
isValid()) {
327 edm::LogInfo(
"IsoTrack") <<
"Primary Vertex " << leadPV;
341 for (rhitItr=hbhe->
begin();rhitItr!=hbhe->
end();rhitItr++) {
342 double rec_energy = rhitItr->energy();
343 int rec_ieta = rhitItr->id().ieta();
344 int rec_depth = rhitItr->id().depth();
345 int rec_zside = rhitItr->id().zside();
346 double num1_1 = rec_zside*(rec_ieta+0.2*(rec_depth-1));
348 edm::LogInfo(
"IsoTrack") <<
"detid/rechit/ieta/zside/depth/num " <<
" = " 349 << rhitItr->id() <<
"/" << rec_energy <<
"/" 350 << rec_ieta <<
"/" << rec_zside <<
"/" 351 << rec_depth <<
"/" << num1_1;
359 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
362 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
363 for (trkDetItr = trkCaloDirections.begin();
364 trkDetItr != trkCaloDirections.end(); trkDetItr++) {
365 if (trkDetItr->okHCAL) {
367 int tk_ieta = detId.
ieta();
368 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
369 double tk_p = pTrack->
p();
371 for (
unsigned int k=1;
k<
pbin.size(); ++
k) {
390 edm::LogInfo(
"IsoTrack") <<
"\nL1 configuration code:" << l1ConfCode
391 <<
"\nNo valid L1 trigger configuration available." 392 <<
"\nSee text above for error code interpretation" 393 <<
"\nNo return here, in order to test each method" 394 <<
", protected against configuration error.";
400 edm::LogInfo(
"IsoTrack") <<
"menuName " << menuName << std::endl;
402 std::vector<int> algbits;
403 for (
CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end();
406 int algBitNumber = ( itAlgo->second ).algoBitNumber();
411 edm::LogInfo(
"IsoTrack") << algName <<
" "<< algBitNumber <<
" " 414 if (algName.find(
l1Names_[
i])!=std::string::npos){
416 edm::LogInfo(
"IsoTrack") <<
"match found" <<
" " << algName <<
" " 419 if (decision > 0) l1ok =
true;
427 l1extra::L1JetParticleCollection::const_iterator itr;
428 double ptTriggered = -10;
429 double etaTriggered = -100;
430 double phiTriggered = -100;
432 for(itr = l1TauHandle->begin(); itr != l1TauHandle->end(); ++itr) {
433 if(itr->pt()>ptTriggered){
434 ptTriggered = itr->pt();
435 etaTriggered = itr->eta();
436 phiTriggered = itr->phi() ;
439 edm::LogInfo(
"IsoTrack") <<
"tauJ pt " << itr->pt() <<
" eta/phi " 440 << itr->eta() <<
" " << itr->phi();
444 for (itr = l1CenJetHandle->begin(); itr != l1CenJetHandle->end(); ++itr){
445 if (itr->pt()>ptTriggered) {
446 ptTriggered = itr->pt();
447 etaTriggered = itr->eta();
448 phiTriggered = itr->phi() ;
452 <<
" eta/phi " << itr->eta() <<
" " 457 for (itr = l1FwdJetHandle->begin(); itr != l1FwdJetHandle->end(); ++itr) {
458 if (itr->pt()>ptTriggered) {
459 ptTriggered = itr->pt();
460 etaTriggered = itr->eta();
461 phiTriggered = itr->phi() ;
464 edm::LogInfo(
"IsoTrack") <<
"forJ pt " << itr->pt() <<
" eta/phi " 465 << itr->eta() <<
" " << itr->phi();
468 edm::LogInfo(
"IsoTrack") <<
"jets pt/eta/phi = " << ptTriggered <<
"/" 469 << etaTriggered <<
"/" <<phiTriggered;
471 unsigned int nTracks(0),nselTracks(0);
472 for (trkDetItr = trkCaloDirections.begin(),
nTracks=0;
473 trkDetItr != trkCaloDirections.end(); trkDetItr++,
nTracks++) {
474 const reco::Track* pTrack = &(*(trkDetItr->trkItr));
476 pTrack->
pz(), pTrack->
p());
482 << pTrack->
pt() <<
"/" << pTrack->
eta() <<
"/" 483 << pTrack->
phi() <<
"/" << pTrack->
p();
498 oneCutParameters.
maxDzPV = 100;
504 oneCutParameters.
maxDzPV = 100;
511 if (trkDetItr->okHCAL) {
516 edm::LogInfo(
"IsoTrack") <<
"qltyFlag|okECAL|okHCAL : " << qltyFlag <<
"|" 517 << trkDetItr->okECAL <<
"/" << trkDetItr->okHCAL;
518 t_qltyFlag = (qltyFlag && trkDetItr->okECAL && trkDetItr->okHCAL);
521 for (
unsigned int k=1;
k<
pbin.size(); ++
k) {
530 for (
unsigned int k=1; k<
pbin.size(); ++
k) {
536 int nRH_eMipDR(0), nNearTRKs(0), nRecHits(-999);
539 trkDetItr->pointHCAL,
540 trkDetItr->pointECAL,
541 a_mipR_, trkDetItr->directionECAL,
544 std::vector<DetId>
ids;
547 trkDetItr->directionHCAL,nRecHits,
549 for (
unsigned int k=0; k<ids.size(); ++
k) {
550 t_DetIds->push_back(ids[k].rawId());
557 for (
unsigned int k=1; k<
pbin.size(); ++
k) {
565 for (
unsigned int k=1; k<
pbin.size(); ++
k) {
573 for (
unsigned int k=1; k<
pbin.size(); ++
k) {
584 << pTrack->
pt() <<
"/" << pTrack->
eta() <<
"/" 585 << pTrack->
phi() <<
"/" <<
t_p;
590 for (
unsigned int lll=0;lll<
t_DetIds->size();lll++) {
double p() const
momentum vector magnitude
EventNumber_t event() const
spr::trackSelectionParameters selectionParameters_
std::vector< double > * t_HitEnergies
const unsigned int nTracks(const reco::Vertex &sv)
const L1GtTriggerMenu * m_l1GtMenu
std::vector< unsigned int > * t_DetIds
double eta() const final
momentum pseudorapidity
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extCenJet_
edm::EDGetTokenT< reco::GenJetCollection > tok_jets_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
std::vector< HBHERecHit >::const_iterator const_iterator
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
double phi() const
azimuthal angle of momentum vector
double pt() const final
transverse momentum
const bool decision(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
edm::EDGetTokenT< reco::PFJetCollection > tok_pfjets_
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
double px() const
x coordinate of momentum vector
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extTauJet_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
double eta() const
pseudorapidity of momentum vector
std::vector< double > pbin
static const bool useL1GtTriggerMenuLite(true)
double deltaR(double eta1, double eta2, double phi1, double phi2)
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
std::vector< bool > * t_l1bits
double pt() const
track transverse momentum
std::string theTrackQuality_
int ieta() const
get the cell ieta
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
Jets made from MC generator particles.
double eCone_ecal(const CaloGeometry *geo, edm::Handle< T > &barrelhits, edm::Handle< T > &endcaphits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_L1extFwdJet_
double pz() const
z coordinate of momentum vector
const_iterator end() const
XYZPointD XYZPoint
point in space with cartesian internal representation
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
std::vector< std::string > l1Names_
void getL1GtRunCache(const edm::Run &, const edm::EventSetup &, const bool, const bool)
get all the run-constant quantities for L1 trigger and cache them
const Point & position() const
position
T const * product() const
const_iterator begin() const
double py() const
y coordinate of momentum vector
static const bool useL1EventSetup(true)
double eCone_hcal(const CaloGeometry *geo, edm::Handle< T > &hits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int detOnly=-1, bool useRaw=false, bool debug=false)