CMS 3D CMS Logo

Functions | Variables
fwrapper Namespace Reference

Functions

void transfer_cluster_transfer (const double *p, const int &npart, const JetDefinition &jet_def, const double &ptmin, double *f77jets, int &njets, int *whichjet, const double &ghost_maxrap=0.0, const int &nrepeat=0, const double &ghost_area=0.0)
 
void transfer_input_particles (const double *p, const int &npart)
 helper routine to transfer fortran input particles into More...
 
void transfer_jets (double *f77jets, int &njets)
 helper routine to help transfer jets -> f77jets[4*ijet+0..3] More...
 

Variables

unique_ptr< ClusterSequence > cs
 
vector< PseudoJet > input_particles
 
JetDefinition jet_def
 
vector< PseudoJet > jets
 
unique_ptr< JetDefinition::Plugin > plugin
 

Detailed Description

a namespace for the fortran-wrapper which contains commonly-used structures and means to transfer fortran <-> C++

Function Documentation

◆ transfer_cluster_transfer()

void fwrapper::transfer_cluster_transfer ( const double *  p,
const int &  npart,
const JetDefinition &  jet_def,
const double &  ptmin,
double *  f77jets,
int &  njets,
int *  whichjet,
const double &  ghost_maxrap = 0.0,
const int &  nrepeat = 0,
const double &  ghost_area = 0.0 
)

helper routine packaging the transfers, the clustering and the extraction of the jets

Definition at line 79 of file fastjetfortran_madfks.cc.

84  {
85 
86  // transfer p[4*ipart+0..3] -> input_particles[i]
88 
89  // perform the clustering
90  if ( ghost_maxrap == 0.0 ) {
91  // cluster without areas
92  cs.reset(new ClusterSequence(input_particles,jet_def));
93  } else {
94  // cluster with areas
95  GhostedAreaSpec area_spec(ghost_maxrap,nrepeat,ghost_area);
96  AreaDefinition area_def(active_area, area_spec);
97  cs.reset(new ClusterSequenceArea(input_particles,jet_def,area_def));
98  }
99  // extract jets (pt-ordered)
100  jets = sorted_by_pt(cs->inclusive_jets(ptmin));
101 
102  // transfer jets -> f77jets[4*ijet+0..3]
103  transfer_jets(f77jets, njets);
104 
105  // Determine which parton/particle ended-up in which jet
106  // set all jet entrie to zero first
107  for(int ii=0; ii<npart; ++ii) whichjet[ii]=0;
108 
109  // Loop over jets and find constituents
110  for (int kk=0; kk<njets; ++kk) {
111  vector<PseudoJet> constit = cs->constituents(jets[kk]);
112  for(unsigned int ll=0; ll<constit.size(); ++ll)
113  whichjet[constit[ll].user_index()]=kk+1;
114  }
115 
116  }

References cs, cuy::ii, input_particles, jet_def, jets, GetRecoTauVFromDQM_MC_cff::kk, BTaggingMonitoring_cff::njets, npart, AlCaHLTBitMon_ParallelJobs::p, ptmin, transfer_input_particles(), and transfer_jets().

Referenced by fastjetppgenkt_().

◆ transfer_input_particles()

void fwrapper::transfer_input_particles ( const double *  p,
const int &  npart 
)

helper routine to transfer fortran input particles into

Definition at line 48 of file fastjetfortran_madfks.cc.

48  {
49  input_particles.resize(0);
50  input_particles.reserve(npart);
51  for (int i=0; i<npart; i++) {
52  valarray<double> mom(4); // mom[0..3]
53  for (int j=0;j<=3; j++) {
54  mom[j] = *(p++);
55  // RF-MZ: reorder the arguments because in madfks energy goes first; in fastjet last.
56  // mom[(j+3) % 4] = *(p++);
57  }
58  PseudoJet psjet(mom);
59  psjet.set_user_index(i);
60  input_particles.push_back(psjet);
61  }
62  }

References mps_fire::i, input_particles, dqmiolumiharvest::j, npart, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by transfer_cluster_transfer().

◆ transfer_jets()

void fwrapper::transfer_jets ( double *  f77jets,
int &  njets 
)

helper routine to help transfer jets -> f77jets[4*ijet+0..3]

Definition at line 65 of file fastjetfortran_madfks.cc.

65  {
66  njets = jets.size();
67  for (int i=0; i<njets; i++) {
68  for (int j=0;j<=3; j++) {
69  *f77jets = jets[i][j];
70  // RF-MZ: reorder the arguments because in madfks energy goes first; in fastjet last.
71  //*f77jets = jets[i][(j+3) % 4];
72  f77jets++;
73  }
74  }
75  }

References mps_fire::i, dqmiolumiharvest::j, jets, and BTaggingMonitoring_cff::njets.

Referenced by transfer_cluster_transfer().

Variable Documentation

◆ cs

unique_ptr<ClusterSequence> fwrapper::cs

Definition at line 45 of file fastjetfortran_madfks.cc.

Referenced by PedestalTask::_dump(), RawTask::_process(), DigiTask::_process(), cond::DataProxyWrapperBase::addInfo(), ESElectronicsSim::analogToDigital(), ESElectronicsSimFast::analogToDigital(), DigiTask::bookHistograms(), CSCGeometryBuilder::build(), CmsShowCommonPopup::changeGeomColor(), CmsShowCommonPopup::changeSelectionColorSet(), CmsShowModelPopup::clicked(), Qjets::Cluster(), Qjets::computeDCut(), Qjets::ComputeNewDistanceMeasures(), XrdAdaptor::XrdStatisticsService::condorUpdate(), edmNew::copyDetSetRange(), PFClusterEMEnergyCorrector::correctEnergies(), HcalTimeSlewSim::delay(), ESElectronicsSim::digitalToAnalog(), edm::CosMuoGenProducer::endRunProduce(), CSCStripTopology::equationOfStrip(), fastjetarea_(), fastjetconstituents_(), fastjetdmerge_(), fastjetdmergemax_(), fastjetglobalrhoandsigma_(), FFTJetPatRecoProducer::FFTJetPatRecoProducer(), LHEJetFilter::filter(), EcalDeadCellBoundaryEnergyFilter::filter(), gen::Pythia6Hadronizer::finalizeEvent(), LagrangeParentParticleFitter::fit(), KinematicParticleFitter::fit(), KinematicConstrainedVertexFitter::fit(), KinematicConstrainedVertexFitterT< nTrk, nConstraint >::fit(), AnomalousECALVariables::isDeadEcalCluster(), DataProxyWrapper< ExDwarfListRcd, cond::persistency::KeyList >::lateInit(), TkRadialStripTopology::localError(), CSCRadialStripTopology::localError(), CSCRadialStripTopology::measurementError(), TkRadialStripTopology::measurementError(), cms::cuda::numberOfDevices(), combinedConstraintHelpers::PlaceValue< DIM >::operator()(), combinedConstraintHelpers::PlaceParDer< DIM, NTRK >::operator()(), combinedConstraintHelpers::PlacePosDer< DIM >::operator()(), l1t::ClusterShapes::operator+(), Model::printCocoaStatus(), HBHEPhase1Reconstructor::processData(), Qjets::Prune(), edm::DataFrameContainer::push_back(), HFPreRecAlgo::reconstruct(), HcalSimpleRecAlgoImpl::removePileup(), SubjetFilterAlgorithm::run(), QjetsPlugin::run_clustering(), edm::DataFrameContainer::set_back(), cscdqm::Configuration::setChamberCounterValue(), Model::setCocoaStatus(), HBHENegativeFlagSetter::setPulseShapeFlags(), gen::ExhumeHadronizer::statistics(), gen::Pythia6Hadronizer::statistics(), TestCUDAAnalyzerGPU::TestCUDAAnalyzerGPU(), transfer_cluster_transfer(), KinematicConstrainedVertexUpdator::update(), KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >::update(), and L1RCTProducer::updateFedVector().

◆ input_particles

vector<PseudoJet> fwrapper::input_particles

Definition at line 42 of file fastjetfortran_madfks.cc.

Referenced by transfer_cluster_transfer(), and transfer_input_particles().

◆ jet_def

JetDefinition fwrapper::jet_def

◆ jets

vector<PseudoJet> fwrapper::jets

◆ plugin

unique_ptr<JetDefinition::Plugin> fwrapper::plugin
mps_fire.i
i
Definition: mps_fire.py:355
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:45
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
fwrapper::input_particles
vector< PseudoJet > input_particles
Definition: fastjetfortran_madfks.cc:42
npart
double npart
Definition: HydjetWrapper.h:46
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
fwrapper::transfer_jets
void transfer_jets(double *f77jets, int &njets)
helper routine to help transfer jets -> f77jets[4*ijet+0..3]
Definition: fastjetfortran_madfks.cc:65
fwrapper::jet_def
JetDefinition jet_def
Definition: fastjetfortran_madfks.cc:44
fwrapper::transfer_input_particles
void transfer_input_particles(const double *p, const int &npart)
helper routine to transfer fortran input particles into
Definition: fastjetfortran_madfks.cc:48
BTaggingMonitoring_cff.njets
njets
Definition: BTaggingMonitoring_cff.py:10
ptmin
double ptmin
Definition: HydjetWrapper.h:84
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
cuy.ii
ii
Definition: cuy.py:590
fwrapper::jets
vector< PseudoJet > jets
Definition: fastjetfortran_madfks.cc:42