Constructor.
23 produces<PEcalTBInfo>();
31 beamEta = (fMaxEta + fMinEta) / 2.;
32 beamPhi = (fMaxPhi + fMinPhi) / 2.;
37 string fullMapName = CrystalMapFile.fullPath();
47 if (fabs(beamEta - eta) < deltaEta && fabs(
beamPhi - phi) < deltaPhi) {
48 deltaEta = fabs(beamEta - eta);
51 }
else if (fabs(beamEta - eta) < deltaEta && fabs(
beamPhi - phi) > deltaPhi) {
52 if (fabs(
beamPhi - phi) < 0.017) {
53 deltaEta = fabs(beamEta - eta);
57 }
else if (fabs(beamEta - eta) > deltaEta && fabs(
beamPhi - phi) < deltaPhi) {
58 if (fabs(beamEta - eta) < 0.017) {
59 deltaEta = fabs(beamEta - eta);
66 edm::LogInfo(
"EcalTBInfo") <<
"Initialize TB MC ECAL info producer with parameters: \n" 67 <<
"Crystal map file: " << CrystalMapFile <<
"\n" 68 <<
"Beam average eta = " << beamEta <<
"\n" 69 <<
"Beam average phi = " <<
beamPhi <<
"\n" 70 <<
"Corresponding to crystal number = " <<
crysNumber <<
"\n" 71 <<
"Beam X offset = " <<
beamXoff <<
"\n" 88 fromCMStoTB =
new ROOT::Math::Rotation3D(xx, xy, xz, yx, yy, yz, zx, zy, zz);
93 throw cms::Exception(
"Configuration") <<
"EcalTBMCInfoProducer requires the RandomNumberGeneratorService\n" 94 "which is not present in the configuration file. You must add the " 96 "in the configuration file or remove the modules that require it.";
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::HepMCProduct > GenVtxToken
static const int NCRYSTAL
Sin< T >::type sin(const T &t)
static const double deltaEta
Cos< T >::type cos(const T &t)
EcalTBCrystalMap * theTestMap
void findCrystalAngles(const int thisCrysIndex, double &thisEta, double &thisPhi)
ROOT::Math::Rotation3D * fromCMStoTB