#include <BremRecoveryClusterAlgo.h>
Public Types | |
enum | VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 } |
Public Member Functions | |
BremRecoveryClusterAlgo (double eb_sc_road_etasize=0.06, double eb_sc_road_phisize=0.80, double ec_sc_road_etasize=0.14, double ec_sc_road_phisize=0.40, double theSeedTransverseEnergyThreshold=0.40, VerbosityLevel the_verbosity=pERROR) | |
reco::SuperClusterCollection | makeSuperClusters (reco::CaloClusterPtrVector &clusters) |
void | setVerbosity (VerbosityLevel the_verbosity) |
Private Member Functions | |
void | makeIslandSuperClusters (reco::CaloClusterPtrVector &clusters_v, double etaRoad, double phiRoad) |
bool | match (reco::CaloClusterPtr seed_p, reco::CaloClusterPtr cluster_p, double etaRoad, double phiRoad) |
Private Attributes | |
double | eb_rdeta_ |
double | eb_rdphi_ |
double | ec_rdeta_ |
double | ec_rdphi_ |
double | seedTransverseEnergyThreshold |
reco::SuperClusterCollection | superclusters_v |
VerbosityLevel | verbosity |
Definition at line 22 of file BremRecoveryClusterAlgo.h.
BremRecoveryClusterAlgo::BremRecoveryClusterAlgo | ( | double | eb_sc_road_etasize = 0.06 , |
double | eb_sc_road_phisize = 0.80 , |
||
double | ec_sc_road_etasize = 0.14 , |
||
double | ec_sc_road_phisize = 0.40 , |
||
double | theSeedTransverseEnergyThreshold = 0.40 , |
||
VerbosityLevel | the_verbosity = pERROR |
||
) | [inline] |
Definition at line 28 of file BremRecoveryClusterAlgo.h.
References eb_rdeta_, eb_rdphi_, ec_rdeta_, ec_rdphi_, seedTransverseEnergyThreshold, and verbosity.
{ // e*_rdeta_ and e*_rdphi_ are half the total window // because they correspond to one direction (positive or negative) eb_rdeta_ = eb_sc_road_etasize / 2; eb_rdphi_ = eb_sc_road_phisize / 2; ec_rdeta_ = ec_sc_road_etasize / 2; ec_rdphi_ = ec_sc_road_phisize / 2; seedTransverseEnergyThreshold = theSeedTransverseEnergyThreshold; verbosity = the_verbosity; }
void BremRecoveryClusterAlgo::makeIslandSuperClusters | ( | reco::CaloClusterPtrVector & | clusters_v, |
double | etaRoad, | ||
double | phiRoad | ||
) | [private] |
Definition at line 42 of file BremRecoveryClusterAlgo.cc.
References edm::PtrVector< T >::begin(), edm::PtrVectorBase::clear(), gather_cfg::cout, edm::PtrVector< T >::end(), match(), pINFO, edm::PtrVector< T >::push_back(), seedTransverseEnergyThreshold, funct::sin(), superclusters_v, and verbosity.
Referenced by makeSuperClusters().
{ for ( reco::CaloCluster_iterator currentSeed = clusters_v.begin(); currentSeed != clusters_v.end(); ++currentSeed) { // Does our highest energy cluster have high enough energy? if ((*currentSeed)->energy() * sin((*currentSeed)->position().theta()) < seedTransverseEnergyThreshold) break; // if yes, make it a seed for a new SuperCluster: double energy_ = (*currentSeed)->energy(); math::XYZVector position_((*currentSeed)->position().X(), (*currentSeed)->position().Y(), (*currentSeed)->position().Z()); position_ *= energy_; if (verbosity <= pINFO) { std::cout << "*****************************" << std::endl; std::cout << "******NEW SUPERCLUSTER*******" << std::endl; std::cout << "Seed R = " << (*currentSeed)->position().Rho() << std::endl; } // and add the matching clusters: reco::CaloClusterPtrVector constituentClusters; constituentClusters.push_back( *currentSeed ); reco::CaloCluster_iterator currentCluster = currentSeed + 1; while (currentCluster != clusters_v.end()) { if (match(*currentSeed, *currentCluster, etaRoad, phiRoad)) { constituentClusters.push_back(*currentCluster); energy_ += (*currentCluster)->energy(); position_ += (*currentCluster)->energy() * math::XYZVector((*currentCluster)->position().X(), (*currentCluster)->position().Y(), (*currentCluster)->position().Z()); if (verbosity <= pINFO) { std::cout << "Cluster R = " << (*currentCluster)->position().Rho() << std::endl; } } ++currentCluster; } position_ /= energy_; if (verbosity <= pINFO) { std::cout << "Final SuperCluster R = " << position_.Rho() << std::endl; } reco::SuperCluster newSuperCluster(energy_, math::XYZPoint(position_.X(), position_.Y(), position_.Z()), (*currentSeed), constituentClusters); superclusters_v.push_back(newSuperCluster); if (verbosity <= pINFO) { std::cout << "created a new supercluster of: " << std::endl; std::cout << "Energy = " << newSuperCluster.energy() << std::endl; std::cout << "Position in (R, phi, theta) = (" << newSuperCluster.position().Rho() << ", " << newSuperCluster.position().phi() << ", " << newSuperCluster.position().theta() << ")" << std::endl; } } clusters_v.clear(); }
reco::SuperClusterCollection BremRecoveryClusterAlgo::makeSuperClusters | ( | reco::CaloClusterPtrVector & | clusters | ) |
Definition at line 5 of file BremRecoveryClusterAlgo.cc.
References edm::PtrVector< T >::begin(), eb_rdeta_, eb_rdphi_, ec_rdeta_, ec_rdphi_, edm::PtrVector< T >::end(), reco::CaloCluster::island, makeIslandSuperClusters(), edm::PtrVector< T >::push_back(), and superclusters_v.
Referenced by SuperClusterProducer::produceSuperclustersForECALPart().
{ const float etaBorder = 1.479; superclusters_v.clear(); // create vectors of references to clusters of a specific origin... reco::CaloClusterPtrVector islandClustersBarrel_v; reco::CaloClusterPtrVector islandClustersEndCap_v; // ...and populate them: for (reco::CaloCluster_iterator it = clustersCollection.begin(); it != clustersCollection.end(); it++) { reco::CaloClusterPtr cluster_p = *it; if (cluster_p->algo() == reco::CaloCluster::island) { if (fabs(cluster_p->position().eta()) < etaBorder) { islandClustersBarrel_v.push_back(cluster_p); } else { islandClustersEndCap_v.push_back(cluster_p); } } } // make the superclusters from the Barrel clusters - Island makeIslandSuperClusters(islandClustersBarrel_v, eb_rdeta_, eb_rdphi_); // make the superclusters from the EndCap clusters - Island makeIslandSuperClusters(islandClustersEndCap_v, ec_rdeta_, ec_rdphi_); return superclusters_v; }
bool BremRecoveryClusterAlgo::match | ( | reco::CaloClusterPtr | seed_p, |
reco::CaloClusterPtr | cluster_p, | ||
double | etaRoad, | ||
double | phiRoad | ||
) | [private] |
Definition at line 115 of file BremRecoveryClusterAlgo.cc.
References funct::cos(), and dPhi().
Referenced by makeIslandSuperClusters().
{ math::XYZPoint clusterPosition = cluster_p->position(); math::XYZPoint seedPosition = seed_p->position(); double dPhi = acos(cos(seedPosition.phi() - clusterPosition.phi())); double dEta = fabs(seedPosition.eta() - clusterPosition.eta()); if (dEta > dEtaMax) return false; if (dPhi > dPhiMax) return false; return true; }
void BremRecoveryClusterAlgo::setVerbosity | ( | VerbosityLevel | the_verbosity | ) | [inline] |
Definition at line 47 of file BremRecoveryClusterAlgo.h.
References verbosity.
{ verbosity = the_verbosity; }
double BremRecoveryClusterAlgo::eb_rdeta_ [private] |
Definition at line 70 of file BremRecoveryClusterAlgo.h.
Referenced by BremRecoveryClusterAlgo(), and makeSuperClusters().
double BremRecoveryClusterAlgo::eb_rdphi_ [private] |
Definition at line 71 of file BremRecoveryClusterAlgo.h.
Referenced by BremRecoveryClusterAlgo(), and makeSuperClusters().
double BremRecoveryClusterAlgo::ec_rdeta_ [private] |
Definition at line 72 of file BremRecoveryClusterAlgo.h.
Referenced by BremRecoveryClusterAlgo(), and makeSuperClusters().
double BremRecoveryClusterAlgo::ec_rdphi_ [private] |
Definition at line 73 of file BremRecoveryClusterAlgo.h.
Referenced by BremRecoveryClusterAlgo(), and makeSuperClusters().
double BremRecoveryClusterAlgo::seedTransverseEnergyThreshold [private] |
Definition at line 75 of file BremRecoveryClusterAlgo.h.
Referenced by BremRecoveryClusterAlgo(), and makeIslandSuperClusters().
Definition at line 77 of file BremRecoveryClusterAlgo.h.
Referenced by makeIslandSuperClusters(), and makeSuperClusters().
Definition at line 68 of file BremRecoveryClusterAlgo.h.
Referenced by BremRecoveryClusterAlgo(), makeIslandSuperClusters(), and setVerbosity().