|
|
#include <TrackAssociator.h>
|
void | addDataLabels (const std::string className, const std::string moduleLabel, const std::string productInstanceLabel="") |
| specify names of EDProducts to use for different input data types More...
|
|
HTrackDetMatchInfo | associate (const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const HAssociatorParameters &) |
|
std::vector< EcalRecHit > | associateEcal (const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1) |
|
std::vector< CaloTower > | associateHcal (const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1) |
|
double | getEcalEnergy (const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1) |
|
FreeTrajectoryState | getFreeTrajectoryState (const edm::EventSetup &, const reco::Track &) |
| get FreeTrajectoryState from different track representations More...
|
|
FreeTrajectoryState | getFreeTrajectoryState (const edm::EventSetup &, const SimTrack &, const SimVertex &) |
|
double | getHcalEnergy (const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const double dR=-1) |
|
| HTrackAssociator () |
|
void | setPropagator (Propagator *) |
| use a user configured propagator More...
|
|
void | useDefaultPropagator () |
| use the default propagator More...
|
|
| ~HTrackAssociator () |
|
|
void | fillCaloTowers (const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double) |
|
void | fillEcal (const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double) |
|
void | fillHcal (const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double) |
|
void | fillHcalTowers (const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double) |
|
math::XYZPoint | getPoint (const GlobalPoint &point) |
|
math::XYZPoint | getPoint (const LocalPoint &point) |
|
math::XYZVector | getVector (const GlobalVector &vec) |
|
math::XYZVector | getVector (const LocalVector &vec) |
|
void | init (const edm::EventSetup &) |
|
Definition at line 46 of file TrackAssociator.h.
◆ HTrackAssociator()
HTrackAssociator::HTrackAssociator |
( |
| ) |
|
◆ ~HTrackAssociator()
HTrackAssociator::~HTrackAssociator |
( |
| ) |
|
◆ addDataLabels()
void HTrackAssociator::addDataLabels |
( |
const std::string |
className, |
|
|
const std::string |
moduleLabel, |
|
|
const std::string |
productInstanceLabel = "" |
|
) |
| |
◆ associate()
◆ associateEcal()
◆ associateHcal()
◆ fillCaloTowers()
Definition at line 275 of file TrackAssociator.cc.
285 std::vector<GlobalPoint> hcalPoints;
296 if (hcalTrajectory.empty()) {
297 LogTrace(
"HTrackAssociator::fillEcal") <<
"Failed to propagate a track to ECAL; moving on\n";
298 info.isGoodCalo =
false;
299 info.isGoodEcal =
false;
300 std::cout <<
" HTrackAssociator::fillCaloTowers::Failed to propagate a track to ECAL " << std::endl;
304 info.isGoodCalo =
true;
305 info.isGoodEcal =
true;
308 if (hcalTrajectory.size() < 4) {
309 LogTrace(
"HTrackAssociator::fillEcal") <<
"Failed to propagate a track to HCAL; moving on\n";
310 info.isGoodHcal =
false;
313 info.isGoodHcal =
true;
321 throw cms::Exception(
"FatalError") <<
"Module lable is not set for CaloTowers.\n";
325 throw cms::Exception(
"FatalError") <<
"Unable to find CaloTowers in event!\n";
331 std::set<DetId> caloTowerIdsInACone;
332 std::set<DetId> crossedCaloTowerIds;
333 std::set<DetId> caloTowerIdsInBox;
358 for (std::set<DetId>::const_iterator
itr = crossedCaloTowerIds.begin();
itr != crossedCaloTowerIds.end();
itr++) {
361 if (
tower != (*caloTowers).end())
364 LogTrace(
"HTrackAssociator::fillEcal") <<
"CaloTower is not found for DetId: " <<
id.rawId() <<
"\n";
367 for (std::set<DetId>::const_iterator
itr = caloTowerIdsInACone.begin();
itr != caloTowerIdsInACone.end();
itr++) {
370 if (
tower != (*caloTowers).end()) {
373 LogTrace(
"HTrackAssociator::fillEcal") <<
"CaloTower is not found for DetId: " <<
id.rawId() <<
"\n";
376 for (std::set<DetId>::const_iterator
itr = caloTowerIdsInBox.begin();
itr != caloTowerIdsInBox.end();
itr++) {
379 if (
tower != (*caloTowers).end()) {
382 LogTrace(
"HTrackAssociator::fillEcal") <<
"CaloTower is not found for DetId: " <<
id.rawId() <<
"\n";
385 for (std::set<DetId>::const_iterator
itr = caloTowerIdsInRegion.begin();
itr != caloTowerIdsInRegion.end();
itr++) {
388 if (
tower != (*caloTowers).end()) {
391 LogTrace(
"HTrackAssociator::fillEcal") <<
"CaloTower is not found for DetId: " <<
id.rawId() <<
"\n";
References eleHcalExtractorBlocks_cff::caloTowers, gather_cfg::cout, HGC3DClusterGenMatchSelector_cfi::dR, triggerObjects_cff::id, iEvent, info(), LogTrace, and hgcalTowerProducer_cfi::tower.
◆ fillEcal()
Definition at line 198 of file TrackAssociator.cc.
207 std::vector<GlobalPoint> ecalPoints;
215 if (ecalTrajectory.empty()) {
216 LogTrace(
"HTrackAssociator::fillEcal") <<
"Failed to propagate a track to ECAL; moving on\n";
217 info.isGoodEcal =
false;
221 info.isGoodEcal =
true;
242 for (std::set<DetId>::const_iterator
itr = crossedEcalIds.begin();
itr != crossedEcalIds.end();
itr++) {
243 std::vector<EcalRecHit>::const_iterator
hit = (*EBRecHits).find(*
itr);
244 if (
hit != (*EBRecHits).end())
245 info.crossedEcalRecHits.push_back(*
hit);
247 LogTrace(
"HTrackAssociator::fillEcal") <<
"EcalRecHit is not found for DetId: " <<
itr->rawId() <<
"\n";
249 for (std::set<DetId>::const_iterator
itr = ecalIdsInACone.begin();
itr != ecalIdsInACone.end();
itr++) {
250 std::vector<EcalRecHit>::const_iterator
hit = (*EBRecHits).find(*
itr);
251 if (
hit != (*EBRecHits).end()) {
252 info.coneEcalRecHits.push_back(*
hit);
254 LogTrace(
"HTrackAssociator::fillEcal") <<
"EcalRecHit is not found for DetId: " <<
itr->rawId() <<
"\n";
258 for (std::set<DetId>::const_iterator
itr = crossedEcalIds.begin();
itr != crossedEcalIds.end();
itr++) {
259 std::vector<EcalRecHit>::const_iterator
hit = (*EERecHits).find(*
itr);
260 if (
hit != (*EERecHits).end())
261 info.crossedEcalRecHits.push_back(*
hit);
263 LogTrace(
"HTrackAssociator::fillEcal") <<
"EcalRecHit is not found for DetId: " <<
itr->rawId() <<
"\n";
265 for (std::set<DetId>::const_iterator
itr = ecalIdsInACone.begin();
itr != ecalIdsInACone.end();
itr++) {
266 std::vector<EcalRecHit>::const_iterator
hit = (*EERecHits).find(*
itr);
267 if (
hit != (*EERecHits).end()) {
268 info.coneEcalRecHits.push_back(*
hit);
270 LogTrace(
"HTrackAssociator::fillEcal") <<
"EcalRecHit is not found for DetId: " <<
itr->rawId() <<
"\n";
References HGC3DClusterGenMatchSelector_cfi::dR, filterRecHits_cfi::EBRecHits, filterRecHits_cfi::EERecHits, iEvent, info(), and LogTrace.
◆ fillHcal()
Definition at line 396 of file TrackAssociator.cc.
405 std::vector<GlobalPoint> hcalPoints;
413 if (hcalTrajectory.empty()) {
414 LogTrace(
"HTrackAssociator::fillHcal") <<
"Failed to propagate a track to HCAL; moving on\n";
415 info.isGoodHcal =
false;
420 info.isGoodHcal =
true;
430 throw cms::Exception(
"FatalError") <<
"Unable to find HBHERecHitCollection in event!\n";
436 std::set<DetId> hcalIdsInACone;
437 std::set<DetId> crossedHcalIds;
438 std::set<DetId> hcalIdsInBox;
446 for (std::set<DetId>::const_iterator
itr = crossedHcalIds.begin();
itr != crossedHcalIds.end();
itr++) {
447 std::vector<HBHERecHit>::const_iterator
hit = (*HBHERecHits).find(*
itr);
448 if (
hit != (*HBHERecHits).end())
449 info.crossedHcalRecHits.push_back(*
hit);
451 LogTrace(
"HTrackAssociator::fillHcal") <<
"HcalRecHit is not found for DetId: " <<
itr->rawId() <<
"\n";
453 for (std::set<DetId>::const_iterator
itr = hcalIdsInACone.begin();
itr != hcalIdsInACone.end();
itr++) {
454 std::vector<HBHERecHit>::const_iterator
hit = (*HBHERecHits).find(*
itr);
455 if (
hit != (*HBHERecHits).end())
456 info.coneHcalRecHits.push_back(*
hit);
458 LogTrace(
"HTrackAssociator::fillHcal") <<
"HcalRecHit is not found for DetId: " <<
itr->rawId() <<
"\n";
460 for (std::set<DetId>::const_iterator
itr = hcalIdsInBox.begin();
itr != hcalIdsInBox.end();
itr++) {
461 std::vector<HBHERecHit>::const_iterator
hit = (*HBHERecHits).find(*
itr);
462 if (
hit != (*HBHERecHits).end())
463 info.boxHcalRecHits.push_back(*
hit);
465 LogTrace(
"HTrackAssociator::fillHcal") <<
"HcalRecHit is not found for DetId: " <<
itr->rawId() <<
"\n";
467 for (std::set<DetId>::const_iterator
itr = hcalIdsInRegion.begin();
itr != hcalIdsInRegion.end();
itr++) {
468 std::vector<HBHERecHit>::const_iterator
hit = (*HBHERecHits).find(*
itr);
469 if (
hit != (*HBHERecHits).end())
470 info.regionHcalRecHits.push_back(*
hit);
472 LogTrace(
"HTrackAssociator::fillHcal") <<
"HcalRecHit is not found for DetId: " <<
itr->rawId() <<
"\n";
References HGC3DClusterGenMatchSelector_cfi::dR, egHLT::errCodes::HBHERecHits, iEvent, info(), and LogTrace.
◆ fillHcalTowers()
◆ getEcalEnergy()
◆ getFreeTrajectoryState() [1/2]
◆ getFreeTrajectoryState() [2/2]
◆ getHcalEnergy()
◆ getPoint() [1/2]
◆ getPoint() [2/2]
◆ getVector() [1/2]
◆ getVector() [2/2]
◆ init()
◆ setPropagator()
void HTrackAssociator::setPropagator |
( |
Propagator * |
ptr | ) |
|
◆ useDefaultPropagator()
void HTrackAssociator::useDefaultPropagator |
( |
| ) |
|
◆ caloDetIdAssociator_
◆ CaloTowerCollectionLabels
std::vector<std::string> HTrackAssociator::CaloTowerCollectionLabels |
|
private |
◆ caloTowerMap_
std::vector<std::vector<std::set<uint32_t> > >* HTrackAssociator::caloTowerMap_ |
|
private |
◆ debug_
int HTrackAssociator::debug_ |
|
private |
◆ defProp_
◆ EBRecHitCollectionLabels
std::vector<std::string> HTrackAssociator::EBRecHitCollectionLabels |
|
private |
Labels of the detector EDProducts (empty by default) ECAL
Definition at line 184 of file TrackAssociator.h.
◆ ecalDetIdAssociator_
◆ EERecHitCollectionLabels
std::vector<std::string> HTrackAssociator::EERecHitCollectionLabels |
|
private |
◆ HBHERecHitCollectionLabels
std::vector<std::string> HTrackAssociator::HBHERecHitCollectionLabels |
|
private |
◆ hcalDetIdAssociator_
◆ ivProp_
◆ theCaloGeometry_
◆ useDefaultPropagator_
bool HTrackAssociator::useDefaultPropagator_ |
|
private |
virtual std::set< DetId > getMaxEDetId(const std::set< DetId > &, edm::Handle< CaloTowerCollection > caloTowers)
HEcalDetIdAssociator ecalDetIdAssociator_
std::vector< CaloTower >::const_iterator const_iterator
void fillEcal(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
HTrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const HAssociatorParameters &)
void fillHcal(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
virtual std::set< DetId > getDetIdsInACone(const std::set< DetId > &, const std::vector< GlobalPoint > &trajectory, const double)
void fillCaloTowers(const edm::Event &, const edm::EventSetup &, HTrackDetMatchInfo &, const FreeTrajectoryState &, const int, const double)
void init(const edm::EventSetup &)
virtual void setPropagator(Propagator *ptr)
HHcalDetIdAssociator hcalDetIdAssociator_
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
math::XYZPoint getPoint(const GlobalPoint &point)
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Global3DPoint GlobalPoint
bool useDefaultPropagator_
std::vector< std::string > CaloTowerCollectionLabels
CaloTowers.
edm::ESHandle< CaloGeometry > theCaloGeometry_
XYZPointD XYZPoint
point in space with cartesian internal representation
virtual std::set< DetId > getDetIdsCloseToAPoint(const GlobalPoint &, const int idR=0)
void applyRadX0Correction(bool applyRadX0Correction)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
std::vector< std::string > EERecHitCollectionLabels
std::vector< std::string > EBRecHitCollectionLabels
std::vector< std::vector< std::set< uint32_t > > > * caloTowerMap_
std::vector< std::pair< float, float > >::iterator itr
void setMaterialMode(bool noMaterial)
Switch for material effects mode: no material effects if true.
virtual std::vector< GlobalPoint > getTrajectory(const FreeTrajectoryState &, const std::vector< GlobalPoint > &)
virtual void setGeometry(const CaloGeometry *ptr)
std::string className(const T &t)
void setPropagator(Propagator *)
use a user configured propagator
virtual std::set< DetId > getCrossedDetIds(const std::set< DetId > &, const std::vector< GlobalPoint > &trajectory)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
std::vector< std::string > HBHERecHitCollectionLabels
HCAL.
HCaloDetIdAssociator caloDetIdAssociator_