11 #include "CLHEP/Random/RandFlat.h"
21 produces<PEcalTBInfo>();
35 string fullMapName = CrystalMapFile.fullPath();
45 if ( fabs(beamEta - eta) < deltaEta && fabs(
beamPhi - phi) < deltaPhi ) {
46 deltaEta = fabs(beamEta - eta);
50 else if (fabs(beamEta - eta)<deltaEta && fabs(
beamPhi - phi)>deltaPhi ) {
51 if ( fabs(
beamPhi - phi) < 0.017 ) {
52 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);
94 <<
"EcalTBMCInfoProducer requires the RandomNumberGeneratorService\n"
95 "which is not present in the configuration file. You must add the service\n"
96 "in the configuration file or remove the modules that require it.";
98 CLHEP::HepRandomEngine& engine = rng->
getEngine();
129 const HepMC::GenEvent* Evt = GenEvt->GetEvent() ;
130 HepMC::GenEvent::vertex_const_iterator Vtx = Evt->vertices_begin();
133 (*Vtx)->position().y(),
134 (*Vtx)->position().z());
136 LogDebug(
"EcalTBInfo") <<
"Generated vertex position = "
137 << eventCMSVertex.x() <<
" "
138 << eventCMSVertex.y() <<
" "
139 << eventCMSVertex.z();
143 LogDebug(
"EcalTBInfo") <<
"Rotated vertex position = "
144 << eventTBVertex.x() <<
" "
145 << eventTBVertex.y() <<
" "
146 << eventTBVertex.z();
156 product->setPhaseShift(thisPhaseShift);
157 LogDebug(
"EcalTBInfo") <<
"Asynchronous Phaseshift = " << thisPhaseShift;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static const int NCRYSTAL
Sin< T >::type sin(const T &t)
CLHEP::RandFlat * flatDistribution_
virtual ~EcalTBMCInfoProducer()
Destructor.
Cos< T >::type cos(const T &t)
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
EcalTBCrystalMap * theTestMap
void produce(edm::Event &event, const edm::EventSetup &eventSetup)
Produce digis out of raw data.
XYZPointD XYZPoint
point in space with cartesian internal representation
void findCrystalAngles(const int thisCrysIndex, double &thisEta, double &thisPhi)
ROOT::Math::Rotation3D * fromCMStoTB
EcalTBMCInfoProducer(const edm::ParameterSet &ps)
Constructor.