109 using namespace reco;
110 using namespace TMath;
112 LogDebug(
"CastorClusterProducer") <<
"3. entering CastorClusterProducer";
120 auto OutputClustersfromClusterAlgo = std::make_unique<CastorClusterCollection>();
123 int nTowers = InputTowers->size();
126 LogDebug(
"CastorClusterProducer") <<
"Warning: You are trying to run the Cluster algorithm with 0 input towers.";
130 for (
size_t i = 0;
i < InputTowers->size(); ++
i) {
132 if (tower_p->eta() > 0.)
134 if (tower_p->eta() < 0.)
152 auto OutputClustersfromBasicJets = std::make_unique<CastorClusterCollection>();
154 if (bjCollection->empty())
156 <<
"Warning: You are trying to run the Cluster algorithm with 0 input basicjets.";
158 for (
unsigned i = 0;
i < bjCollection->size();
i++) {
159 const BasicJet* bj = &(*bjCollection)[
i];
164 double emEnergy = 0.;
165 double hadEnergy = 0.;
175 std::vector<CandidatePtr>::const_iterator itParticle;
176 for (itParticle = ccp.begin(); itParticle != ccp.end(); ++itParticle) {
188 for (
size_t l = 0;
l < ctCollection->size();
l++) {
199 depth += castorcand->
depth() * castorcand->
energy();
201 fhot += castorcand->
fhot() * castorcand->
energy();
208 double Erechit = rechit_p->energy();
213 zrechit = -14390 - 24.75 - 49.5 * (module - 1);
215 zrechit = -14390 - 99 - 49.5 - 99 * (module - 3);
216 zmean += Erechit * zrechit;
217 z2mean += Erechit * zrechit * zrechit;
223 width =
sqrt(width / energy);
228 double sigmaz2 = z2mean - zmean * zmean;
230 sigmaz =
sqrt(sigmaz2);
233 energy,
position, emEnergy, hadEnergy, emEnergy / energy, width, depth, fhot, sigmaz, usedTowers);
234 OutputClustersfromBasicJets->push_back(cc);
edm::EDGetTokenT< CastorTowerCollection > tok_input_
double emEnergy() const
tower em energy
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double eta() const final
momentum pseudorapidity
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< CastorTowerCollection > tok_tower_
double phiangle(double testphi)
edm::Ref< CastorTowerCollection > CastorTowerRef
CastorRecHitRefs::iterator rechitsBegin() const
fist iterator over CastorRecHit constituents
virtual Constituents getJetConstituents() const
list of constituents
Jets made from CaloTowers.
ProductID id() const
Accessor for product ID.
double energy() const final
energy
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< reco::BasicJetCollection > tok_jets_
ROOT::Math::RhoEtaPhiPoint TowerPoint
double fhot() const
tower hotcell/tot ratio
double depth() const
tower depth in z
double hadEnergy() const
tower had energy
Structure Point Contains parameters of Gaussian fits to DMRs.
static int position[264][3]
CastorRecHitRefs::iterator rechitsEnd() const
last iterator over CastorRecHit constituents
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
double phi() const final
momentum azimuthal angle
Power< A, B >::type pow(const A &a, const B &b)