52 virtual void endJob()
override ;
79 produces<CastorCellCollection>();
100 using namespace reco;
101 using namespace TMath;
108 auto OutputCells = std::make_unique<CastorCellCollection>();
113 <<
"1. entering CastorCellProducer ";
115 for (
size_t i = 0;
i < InputRecHits->size(); ++
i) {
130 if (module == 1) zCell = 14415;
131 if (module == 2) zCell = 14464;
134 zCell = 14534 + (module - 3)*92;
138 double castorphi[16];
139 for (
int j = 0;
j < 16;
j++) {
140 castorphi[
j] = -2.94524 +
j*0.3927;
143 phiCell = castorphi[sector - 9];
145 phiCell = castorphi[sector + 7];
149 if (zside <= 0) zCell = -1*zCell;
155 CellPoint tempcellposition(rhoCell,zCell,phiCell);
156 Point cellposition(tempcellposition);
159 <<
"cell number: "<<
i+1<<std::endl
160 <<
"rho: "<<cellposition.rho()<<
" phi: "<<cellposition.phi()*
MYR2D<<
" eta: "<<cellposition.eta()<<std::endl
161 <<
"x: "<<cellposition.x()<<
" y: "<<cellposition.y()<<
" z: "<<cellposition.z();
165 OutputCells->push_back(newCell);
171 <<
"total number of cells in the event: "<<InputRecHits->size();
181 <<
"Starting CastorCellProducer";
187 <<
"Ending CastorCellProducer";
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
int sector() const
get the sector (1-16)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual void endJob() override
int module() const
get the module (1-2 for EM, 1-12 for HAD)
HcalCastorDetId id() const
get the id
edm::EDGetTokenT< CastorRecHitCollection > tok_input_
int zside() const
get the z-side of the cell (1/-1)
std::vector< reco::CastorCell > CastorCellCollection
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double > > XYZPointD
point in space with cartesian internal representation
virtual void beginJob() override
virtual void produce(edm::Event &, const edm::EventSetup &) override
CastorCellProducer(const edm::ParameterSet &)
ROOT::Math::RhoZPhiPoint CellPoint