|
|
Go to the documentation of this file.
23 const std::vector<RectangularEtaPhiRegion> &
regions) {
37 ecalPart_string =
"EndCap";
42 ecalPart_string =
"Barrel";
47 std::cout <<
"-------------------------------------------------------------" << std::endl;
48 std::cout <<
"Island algorithm invoked for ECAL" << ecalPart_string << std::endl;
49 std::cout <<
"Looking for seeds, threshold used = " <<
threshold <<
" ADC" << std::endl;
56 if (!regional || nregions) {
61 std::cout <<
"-------------------------------------------------------------" << std::endl;
62 std::cout <<
"No Uncalibrated RecHits no Uncalibrated rec hit collection available" << std::endl;
69 uint32_t rhFlag = (*it).recoFlag();
77 std::cout <<
"-------------------------------------------------------------" << std::endl;
78 std::cout <<
"No Uncalibrated RecHit associated with the RecHit Probably no Uncalibrated rec hit collection "
95 bool withinRegion =
false;
97 std::vector<RectangularEtaPhiRegion>::const_iterator
region;
99 if (
region->inRegion(thisCell->etaPos(), thisCell->phiPos())) {
106 if (!regional || withinRegion) {
113 sort(
seeds.begin(),
seeds.end(), [](
auto const &
x,
auto const &
y) {
return x.energy() >
y.energy(); });
116 std::cout <<
"JH Total number of seeds found in event = " <<
seeds.size() << std::endl;
122 mainSearch(geometry_p, topology_p, geometryES_p, ecalPart);
126 std::cout <<
"---------- end of main search. clusters have been sorted ----" << std::endl;
139 std::cout <<
"Building clusters............" << std::endl;
143 std::vector<EcalRecHit>::iterator it;
144 for (it =
seeds.begin(); it !=
seeds.end(); it++) {
147 bool usedButCanSeed =
false;
149 usedButCanSeed =
true;
152 if ((
used_s.find(it->id()) !=
used_s.end()) && (usedButCanSeed ==
false)) {
153 if (it ==
seeds.begin()) {
155 std::cout <<
"##############################################################" << std::endl;
156 std::cout <<
"DEBUG ALERT: Highest energy seed already belongs to a cluster!" << std::endl;
157 std::cout <<
"##############################################################" << std::endl;
198 double energySecond = 0.;
199 double energyMax = 0.;
204 std::vector<DetId>::iterator it;
213 uint32_t rhFlag = (*itt).recoFlag();
224 detSec = uhit_p.
id();
226 if (energySecond > energyMax) {
261 std::cout <<
"JH******** NEW CLUSTER ********" << std::endl;
266 std::cout <<
"JH*****************************" << std::endl;
279 double thisEnergy = 0.;
280 double seedEnergy = seedHit->energy();
282 std::vector<DetId> swissCrossVec;
283 swissCrossVec.clear();
285 swissCrossVec.push_back(
navigator.west());
287 swissCrossVec.push_back(
navigator.east());
289 swissCrossVec.push_back(
navigator.north());
291 swissCrossVec.push_back(
navigator.south());
294 for (
unsigned int i = 0;
i < swissCrossVec.size(); ++
i) {
299 thisEnergy = thisHit->energy();
300 if (thisEnergy > seedEnergy) {
311 std::set<DetId>::iterator setItr;
318 for (
int dx = -2;
dx < 3; ++
dx)
320 for (
int dy = -2;
dy < 3; ++
dy)
365 if ((thisIt->energy() >= -1.) && !(thisItu->chi2() < -1.)) {
std::vector< reco::BasicCluster > clusters_v
math::XYZPoint Point
point in the space
std::vector< DetId > current_v9
std::vector< EcalRecHit >::const_iterator const_iterator
void mainSearch(const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart)
DetId id() const
get the id
double ecalEndcapSeedThreshold
double ecalEndcapSupThreshold
void prepareCluster(CaloNavigator< DetId > &navigator, const CaloSubdetectorGeometry *geometry)
double ecalBarrelSingleThreshold
double ecalBarrelSupThreshold
const EcalRecHitCollection * recHits_
double ecalBarrelSecondThreshold
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const EcalUncalibratedRecHitCollection *uncalibhits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart, bool regional=false, const std::vector< RectangularEtaPhiRegion > ®ions=std::vector< RectangularEtaPhiRegion >())
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
const_iterator begin() const
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=nullptr)
double ecalEndcapSecondThreshold
std::vector< EcalRecHit > seeds
double ecalEndcapSingleThreshold
Structure Point Contains parameters of Gaussian fits to DMRs.
std::vector< DetId > current_v25
std::set< DetId > canSeed_s
const_iterator end() const
static int position[264][3]
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
bool checkMaxima(CaloNavigator< DetId > &navigator)
bool isClusterEtLess(const reco::CaloCluster &x, const reco::CaloCluster &y)
iterator find(key_type k)
double ecalBarrelSeedThreshold
const EcalUncalibratedRecHitCollection * uncalibRecHits_
PositionCalc posCalculator_
std::vector< std::pair< DetId, float > > current_v25Sup
Abs< T >::type abs(const T &t)
void makeCluster(const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p, DetId seedId)
void addCrystal(const DetId &det, const bool in9)