56 double phiangle(
double testphi)
const;
85 : input_(iConfig.getUntrackedParameter<
std::
string>(
"inputtowers",
"")),
86 basicjets_(iConfig.getUntrackedParameter<
std::
string>(
"basicjets",
"")),
87 clusteralgo_(iConfig.getUntrackedParameter<
bool>(
"ClusterAlgo",
false)) {
93 produces<CastorClusterCollection>();
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++) {
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;
228 double sigmaz2 = z2mean - zmean * zmean;
230 sigmaz =
sqrt(sigmaz2);
234 OutputClustersfromBasicJets->push_back(
cc);
243 double phi = testphi;
edm::EDGetTokenT< CastorTowerCollection > tok_input_
~CastorClusterProducer() override
ProductID id() const
Accessor for product ID.
static constexpr int nTowers
uint32_t cc[maxCellsPerHit]
edm::EDGetTokenT< CastorTowerCollection > tok_tower_
CastorRecHitRefs::iterator rechitsBegin() const
fist iterator over CastorRecHit constituents
double depth() const
tower depth in z
edm::Ref< CastorTowerCollection > CastorTowerRef
Jets made from CaloTowers.
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
CastorClusterProducer(const edm::ParameterSet &)
virtual Constituents getJetConstituents() const
list of constituents
double emEnergy() const
tower em energy
double hadEnergy() const
tower had energy
std::vector< reco::CastorCluster > CastorClusterCollection
Abs< T >::type abs(const T &t)
std::vector< reco::CastorTower > CastorTowerCollection
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::BasicJetCollection > tok_jets_
ROOT::Math::RhoEtaPhiPoint TowerPoint
double fhot() const
tower hotcell/tot ratio
double phiangle(double testphi) const
ROOT::Math::RhoZPhiPoint CellPoint
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double > > XYZPointD
point in space with cartesian internal representation
CastorRecHitRefs::iterator rechitsEnd() const
last iterator over CastorRecHit constituents
Structure Point Contains parameters of Gaussian fits to DMRs.
static int position[264][3]
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)
double energy() const final
energy
double eta() const final
momentum pseudorapidity