#include <EcalTBMCInfoProducer.h>
|
| EcalTBMCInfoProducer (const edm::ParameterSet &ps) |
| Constructor. More...
|
|
void | produce (edm::Event &event, const edm::EventSetup &eventSetup) |
| Produce digis out of raw data. More...
|
|
virtual | ~EcalTBMCInfoProducer () |
| Destructor. More...
|
|
| EDProducer () |
|
ModuleDescription const & | moduleDescription () const |
|
virtual | ~EDProducer () |
|
| ProducerBase () |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription
const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
virtual | ~ProducerBase () |
|
| EDConsumerBase () |
|
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
|
std::vector
< ProductHolderIndexAndSkipBit >
const & | itemsToGetFromEvent () const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const |
|
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
|
virtual | ~EDConsumerBase () |
|
Definition at line 29 of file EcalTBMCInfoProducer.h.
Constructor.
Definition at line 18 of file EcalTBMCInfoProducer.cc.
References funct::cos(), reco_application_tbsim_DetSim-Digi_cfg::CrystalMapFile, HLTFastRecoForTau_cff::deltaEta, SiPixelRawToDigiRegional_cfi::deltaPhi, eta(), edm::hlt::Exception, create_public_lumi_plots::exp, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), edm::Service< T >::isAvailable(), EcalTBCrystalMap::NCRYSTAL, phi, funct::sin(), and create_public_lumi_plots::xy.
20 produces<PEcalTBInfo>();
34 string fullMapName = CrystalMapFile.fullPath();
44 if ( fabs(beamEta - eta) < deltaEta && fabs(
beamPhi - phi) < deltaPhi ) {
45 deltaEta = fabs(beamEta - eta);
49 else if (fabs(beamEta - eta)<deltaEta && fabs(
beamPhi - phi)>deltaPhi ) {
50 if ( fabs(
beamPhi - phi) < 0.017 ) {
51 deltaEta = fabs(beamEta - eta);
56 else if (fabs(beamEta - eta)>deltaEta && fabs(
beamPhi - phi)<deltaPhi ) {
57 if ( fabs(beamEta - eta) < 0.017 ) {
58 deltaEta = fabs(beamEta - eta);
65 edm::LogInfo(
"EcalTBInfo") <<
"Initialize TB MC ECAL info producer with parameters: \n"
66 <<
"Crystal map file: " << CrystalMapFile <<
"\n"
67 <<
"Beam average eta = " << beamEta <<
"\n"
68 <<
"Beam average phi = " <<
beamPhi <<
"\n"
69 <<
"Corresponding to crystal number = " <<
crysNumber <<
"\n"
70 <<
"Beam X offset = " <<
beamXoff <<
"\n"
87 fromCMStoTB =
new ROOT::Math::Rotation3D(xx, xy, xz, yx, yy, yz, zx, zy, zz);
93 <<
"EcalTBMCInfoProducer requires the RandomNumberGeneratorService\n"
94 "which is not present in the configuration file. You must add the service\n"
95 "in the configuration file or remove the modules that require it.";
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)
Cos< T >::type cos(const T &t)
EcalTBCrystalMap * theTestMap
void findCrystalAngles(const int thisCrysIndex, double &thisEta, double &thisPhi)
ROOT::Math::Rotation3D * fromCMStoTB
EcalTBMCInfoProducer::~EcalTBMCInfoProducer |
( |
| ) |
|
|
virtual |
Produce digis out of raw data.
Implements edm::EDProducer.
Definition at line 103 of file EcalTBMCInfoProducer.cc.
References edm::RandomNumberGenerator::getEngine(), LogDebug, and edm::Event::streamID().
125 const HepMC::GenEvent* Evt = GenEvt->GetEvent() ;
126 HepMC::GenEvent::vertex_const_iterator Vtx = Evt->vertices_begin();
129 (*Vtx)->position().y(),
130 (*Vtx)->position().z());
132 LogDebug(
"EcalTBInfo") <<
"Generated vertex position = "
133 << eventCMSVertex.x() <<
" "
134 << eventCMSVertex.y() <<
" "
135 << eventCMSVertex.z();
139 LogDebug(
"EcalTBInfo") <<
"Rotated vertex position = "
140 << eventTBVertex.x() <<
" "
141 << eventTBVertex.y() <<
" "
142 << eventTBVertex.z();
150 double thisPhaseShift = CLHEP::RandFlat::shoot(engine);
152 product->setPhaseShift(thisPhaseShift);
153 LogDebug(
"EcalTBInfo") <<
"Asynchronous Phaseshift = " << thisPhaseShift;
XYZPointD XYZPoint
point in space with cartesian internal representation
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &) const =0
Use this engine in event methods.
StreamID streamID() const
double EcalTBMCInfoProducer::beamEta |
|
private |
double EcalTBMCInfoProducer::beamPhi |
|
private |
double EcalTBMCInfoProducer::beamTheta |
|
private |
double EcalTBMCInfoProducer::beamXoff |
|
private |
double EcalTBMCInfoProducer::beamYoff |
|
private |
int EcalTBMCInfoProducer::crysNumber |
|
private |
ROOT::Math::Rotation3D* EcalTBMCInfoProducer::fromCMStoTB |
|
private |
std::string EcalTBMCInfoProducer::GenVtxLabel |
|
private |
double EcalTBMCInfoProducer::partXhodo |
|
private |
double EcalTBMCInfoProducer::partYhodo |
|
private |