|
|
Go to the documentation of this file.
14 #include "TDirectory.h"
17 #include <Math/GenVector/VectorUtil.h>
157 : doMC_(iConfig.getUntrackedParameter<
bool>(
"DoMC",
false)),
158 myverbose_(iConfig.getUntrackedParameter<
int>(
"Verbosity", 5)),
159 theTrackQuality_(iConfig.getUntrackedParameter<
std::
string>(
"TrackQuality",
"highPurity")),
160 a_mipR_(iConfig.getUntrackedParameter<double>(
"ConeRadiusMIP", 14.0)),
161 a_coneR_(iConfig.getUntrackedParameter<double>(
"ConeRadius", 34.98)),
162 tMinE_(iConfig.getUntrackedParameter<double>(
"TimeMinCutECAL", -500.)),
163 tMaxE_(iConfig.getUntrackedParameter<double>(
"TimeMaxCutECAL", 500.)),
164 trackerHitAssociatorConfig_(consumesCollector()) {
229 descriptions.
add(
"isolatedTracksHcalScale", desc);
274 if (!recVtxs->empty() && !((*recVtxs)[0].isFake())) {
275 leadPV =
math::XYZPoint((*recVtxs)[0].
x(), (*recVtxs)[0].
y(), (*recVtxs)[0].
z());
276 }
else if (beamSpotH.
isValid()) {
286 std::vector<spr::propagatedTrackDirection> trkCaloDirections;
288 std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
309 std::unique_ptr<TrackerHitAssociator> associate;
321 for (trkDetItr = trkCaloDirections.begin(),
nTracks = 0; trkDetItr != trkCaloDirections.end();
323 const reco::Track *pTrack = &(*(trkDetItr->trkItr));
326 int nRH_eMipDR = 0, nRH_eDR = 0, nNearTRKs = 0, nRecHitsCone = -99;
327 double distFromHotCell = -99.0, distFromHotCell2 = -99.0;
328 int ietaHotCell = -99, iphiHotCell = -99;
329 int ietaHotCell2 = -99, iphiHotCell2 = -99;
330 GlobalPoint gposHotCell(0., 0., 0.), gposHotCell2(0., 0., 0.);
331 std::vector<DetId> coneRecHitDetIds, coneRecHitDetIds2;
332 std::pair<double, bool> e11x11_20SigP, e15x15_20SigP;
335 trkDetItr->pointHCAL,
336 trkDetItr->pointECAL,
338 trkDetItr->directionHCAL,
348 trkDetItr->pointHCAL,
349 trkDetItr->pointECAL,
351 trkDetItr->directionHCAL,
361 trkDetItr->pointHCAL,
362 trkDetItr->pointECAL,
364 trkDetItr->directionHCAL,
374 trkDetItr->pointHCAL,
375 trkDetItr->pointECAL,
377 trkDetItr->directionHCAL,
386 double conehmaxNearP =
392 trkDetItr->pointHCAL,
393 trkDetItr->pointECAL,
395 trkDetItr->directionECAL,
400 trkDetItr->pointHCAL,
401 trkDetItr->pointECAL,
403 trkDetItr->directionECAL,
408 trkDetItr->pointHCAL,
409 trkDetItr->pointECAL,
411 trkDetItr->directionECAL,
418 trkDetItr->pointHCAL,
419 trkDetItr->pointECAL,
421 trkDetItr->directionECAL,
428 trkDetItr->pointHCAL,
429 trkDetItr->pointECAL,
431 trkDetItr->directionECAL,
438 trkDetItr->pointHCAL,
439 trkDetItr->pointECAL,
441 trkDetItr->directionECAL,
500 edm::LogVerbatim(
"IsoTrack") <<
"Track p " << pTrack->
p() <<
" pt " << pTrack->
pt() <<
" eta "
502 <<
" ieta/iphi (" << closestCell.
ieta() <<
", " << closestCell.
iphi()
503 <<
") Energy in cone " << hCone <<
" Charge Isolation " << conehmaxNearP
504 <<
" eMIP (" << eMipDR <<
", " << eMipDR_1 <<
", " << eMipDR_2 <<
")"
505 <<
" Neutral isolation (ECAL) (" << eECALDR - eMipDR <<
", "
506 << eECALDR_1 - eMipDR_1 <<
", " << eECALDR_2 - eMipDR_2 <<
") (ECAL NxN) "
507 << e15x15_20SigP.first - e11x11_20SigP.first <<
" (HCAL) " << eHCALDR - hCone;
513 std::map<std::string, double> hsimInfo;
514 std::vector<int> multiplicity;
516 geo, pcalohh, trkDetItr->pointHCAL, trkDetItr->pointECAL,
a_coneR_, trkDetItr->directionHCAL, nSimHits);
517 hsimInfo = spr::eHCALSimInfoCone(
iEvent,
524 trkDetItr->pointHCAL,
525 trkDetItr->pointECAL,
527 trkDetItr->directionHCAL,
549 edm::LogVerbatim(
"IsoTrack") <<
"Matched (E) " << hsimInfo[
"eMatched"] <<
" (N) " << multiplicity.at(0)
550 <<
" Rest (E) " << hsimInfo[
"eRest"] <<
" (N) " << multiplicity.at(1)
551 <<
" Gamma (E) " << hsimInfo[
"eGamma"] <<
" (N) " << multiplicity.at(2)
552 <<
" Neutral Had (E) " << hsimInfo[
"eNeutralHad"] <<
" (N) "
553 << multiplicity.at(3) <<
" Charged Had (E) " << hsimInfo[
"eChargedHad"]
554 <<
" (N) " << multiplicity.at(4) <<
" Total (E) " << hsimInfo[
"eTotal"]
555 <<
" (N) " << multiplicity.at(5) <<
" PDG " << hsimInfo[
"pdgMatched"]
556 <<
" Total E " << hsim <<
" NHit " << nSimHits;
571 tree_->SetAutoSave(10000);
577 t_trackP =
new std::vector<double>();
583 t_hCone =
new std::vector<double>();
585 t_eMipDR =
new std::vector<double>();
603 tree_->Branch(
"t_hCone",
"std::vector<double>", &
t_hCone);
631 t_hsim =
new std::vector<double>();
647 tree_->Branch(
"t_hsim",
"std::vector<double>", &
t_hsim);
T const * product() const
const unsigned int nTracks(const reco::Vertex &sv)
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
std::vector< double > * t_hConeHB
std::vector< int > * t_hsimInfoNPhoton
constexpr int iphi() const
get the cell iphi
double p() const
momentum vector magnitude
std::vector< double > * t_hsimInfoTotal
std::string theTrackQuality_
std::vector< double > * t_hsim
std::vector< int > * t_hsimInfoNTotal
std::vector< int > * t_hsimInfoNMatched
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
TrackQuality
track quality
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > * t_hsimInfoNNeutHad
std::vector< double > * t_eMipDR_2
std::vector< double > * t_hCone
double pt() const
track transverse momentum
std::vector< double > * t_trackEta
#define DEFINE_FWK_MODULE(type)
std::vector< double > * t_hsimInfoNeutHad
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::vector< double > * t_trackPt
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
IsolatedTracksHcalScale(const edm::ParameterSet &)
const Point & position() const
position
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
std::vector< int > * t_hsimInfoNCharHad
void analyze(const edm::Event &, const edm::EventSetup &) override
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::vector< double > * t_trackP
constexpr int ieta() const
get the cell ieta
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< double > * t_hsimInfoCharHad
~IsolatedTracksHcalScale() override
std::vector< double > * t_eMipDR_1
std::vector< double > * t_conehmaxNearP
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, int useRaw=0, bool debug=false)
spr::trackSelectionParameters selectionParameters_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
std::vector< double > * t_eECALDR_1
std::vector< double > * t_trackHcalPhi
std::vector< double > * t_eECALDR_2
std::vector< double > * t_eHCALDR
reco::TrackBase::TrackQuality minQuality
std::vector< double > * t_eECALDR
std::vector< double > * t_e11x11_20Sig
std::vector< int > * t_hsimInfoNRest
std::vector< double > * t_hsimInfoPdgMatched
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
static TrackQuality qualityByName(const std::string &name)
std::vector< double > * t_eMipDR
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
static const std::string kSharedResource
std::vector< double > * t_eHCALDRHB
std::vector< double > * t_e15x15_20Sig
std::vector< double > * t_trackHcalEta
std::vector< int > * t_nSimHits
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
std::vector< double > * t_hsimInfoRest
const Vector & momentum() const
track momentum vector
std::vector< double > * t_hsimInfoPhoton
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)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< double > * t_hsimInfoMatched
T * make(const Args &... args) const
make new ROOT object
std::vector< double > * t_trackPhi