CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CtfSpecialSeedGenerator Class Reference

#include <CtfSpecialSeedGenerator.h>

Inheritance diagram for CtfSpecialSeedGenerator:
edm::stream::EDProducer<>

Public Types

typedef TrajectoryStateOnSurface TSOS
 
- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Public Member Functions

void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 CtfSpecialSeedGenerator (const edm::ParameterSet &conf)
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~CtfSpecialSeedGenerator () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

bool buildSeeds (const edm::EventSetup &iSetup, const edm::Event &e, const OrderedSeedingHits &osh, const NavigationDirection &navdir, const PropagationDirection &dir, TrajectorySeedCollection &output)
 
bool postCheck (const TrajectorySeed &seed)
 
bool preliminaryCheck (const SeedingHitSet &shs, const edm::EventSetup &es)
 
bool run (const edm::EventSetup &c, const edm::Event &e, TrajectorySeedCollection &output)
 

Private Attributes

ClusterChecker check
 
edm::ParameterSet conf_
 
BoundPlane::BoundPlanePointer lowerScintillator
 
bool requireBOFF
 
edm::ESHandle< TransientTrackingRecHitBuildertheBuilder
 
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecordtheBuilderToken
 
std::vector< std::unique_ptr< OrderedHitsGenerator > > theGenerators
 
edm::ESHandle< MagneticFieldtheMagfield
 
int32_t theMaxSeeds
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordtheMFToken
 
std::vector< NavigationDirectiontheNavDirs
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordthePropAlongToken
 
std::vector< PropagationDirectionthePropDirs
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordthePropOppositeToken
 
std::unique_ptr< TrackingRegionProducertheRegionProducer
 
std::unique_ptr< SeedFromGenericPairOrTriplettheSeedBuilder
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtheTopoToken
 
edm::ESHandle< TrackerGeometrytheTracker
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtheTrackerToken
 
BoundPlane::BoundPlanePointer upperScintillator
 
bool useScintillatorsConstraint
 

Detailed Description

Definition at line 40 of file CtfSpecialSeedGenerator.h.

Member Typedef Documentation

◆ TSOS

Definition at line 42 of file CtfSpecialSeedGenerator.h.

Constructor & Destructor Documentation

◆ CtfSpecialSeedGenerator()

CtfSpecialSeedGenerator::CtfSpecialSeedGenerator ( const edm::ParameterSet conf)

Definition at line 18 of file CtfSpecialSeedGenerator.cc.

References conf_, beamerCreator::create(), get, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theGenerators, theRegionProducer, and useScintillatorsConstraint.

19  : conf_(conf),
20  theMFToken(esConsumes<edm::Transition::BeginRun>()),
22  esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", conf_.getParameter<std::string>("TTRHBuilder")))),
23  theTrackerToken(esConsumes<edm::Transition::BeginRun>()),
24  thePropAlongToken(esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "PropagatorWithMaterial"))),
26  esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "PropagatorWithMaterialOpposite"))),
28  requireBOFF(conf.getParameter<bool>("requireBOFF")),
29  theMaxSeeds(conf.getParameter<int32_t>("maxSeeds")),
30  check(conf, consumesCollector())
31 
32 {
33  useScintillatorsConstraint = conf_.getParameter<bool>("UseScintillatorsConstraint");
34  edm::LogVerbatim("CtfSpecialSeedGenerator") << "Constructing CtfSpecialSeedGenerator";
35  produces<TrajectorySeedCollection>();
36 
37  edm::ParameterSet regfactoryPSet = conf_.getParameter<edm::ParameterSet>("RegionFactoryPSet");
38  std::string regfactoryName = regfactoryPSet.getParameter<std::string>("ComponentName");
39  theRegionProducer = std::unique_ptr<TrackingRegionProducer>{
40  TrackingRegionProducerFactory::get()->create(regfactoryName, regfactoryPSet, consumesCollector())};
41 
42  std::vector<edm::ParameterSet> pSets = conf_.getParameter<std::vector<edm::ParameterSet>>("OrderedHitsFactoryPSets");
43  std::vector<edm::ParameterSet>::const_iterator iPSet;
44  edm::ConsumesCollector iC = consumesCollector();
45  for (iPSet = pSets.begin(); iPSet != pSets.end(); iPSet++) {
46  std::string hitsfactoryName = iPSet->getParameter<std::string>("ComponentName");
47  theGenerators.emplace_back(OrderedHitsGeneratorFactory::get()->create(hitsfactoryName, *iPSet, iC));
48  }
49 }
Log< level::Info, true > LogVerbatim
std::unique_ptr< TrackingRegionProducer > theRegionProducer
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
def create(alignables, pedeDump, additionalData, outputFile, config)
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theBuilderToken
const edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropOppositeToken
const edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropAlongToken
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theTrackerToken
#define get
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > theTopoToken
std::vector< std::unique_ptr< OrderedHitsGenerator > > theGenerators
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theMFToken

◆ ~CtfSpecialSeedGenerator()

CtfSpecialSeedGenerator::~CtfSpecialSeedGenerator ( )
overridedefault

Member Function Documentation

◆ beginRun()

void CtfSpecialSeedGenerator::beginRun ( edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
override

Definition at line 55 of file CtfSpecialSeedGenerator.cc.

References alongMomentum, newFWLiteAna::build, CosmicGenFilterHelix_cfi::charges, conf_, edm::EventSetup::getHandle(), edm::ParameterSet::getParameter(), insideOut, lowerScintillator, oppositeToMomentum, outsideIn, AlCaHLTBitMon_ParallelJobs::p, edm::ESHandle< T >::product(), makeMuonMisalignmentScenario::rot, AlCaHLTBitMon_QueryRunRegistry::string, theBuilder, theBuilderToken, theMagfield, theMFToken, theNavDirs, thePropAlongToken, thePropDirs, thePropOppositeToken, theSeedBuilder, theTracker, theTrackerToken, upperScintillator, useScintillatorsConstraint, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

55  {
56  theMagfield = iSetup.getHandle(theMFToken);
57  theBuilder = iSetup.getHandle(theBuilderToken);
58  theTracker = iSetup.getHandle(theTrackerToken);
59 
60  edm::LogVerbatim("CtfSpecialSeedGenerator") << "Initializing...";
62  edm::ParameterSet upperScintPar = conf_.getParameter<edm::ParameterSet>("UpperScintillatorParameters");
63  edm::ParameterSet lowerScintPar = conf_.getParameter<edm::ParameterSet>("LowerScintillatorParameters");
64  RectangularPlaneBounds upperBounds(
65  upperScintPar.getParameter<double>("WidthInX"), upperScintPar.getParameter<double>("LenghtInZ"), 1);
66  GlobalPoint upperPosition(upperScintPar.getParameter<double>("GlobalX"),
67  upperScintPar.getParameter<double>("GlobalY"),
68  upperScintPar.getParameter<double>("GlobalZ"));
69  edm::LogVerbatim("CtfSpecialSeedGenerator") << "Upper Scintillator position x, y, z " << upperPosition.x() << ", "
70  << upperPosition.y() << ", " << upperPosition.z();
71  RectangularPlaneBounds lowerBounds(
72  lowerScintPar.getParameter<double>("WidthInX"), lowerScintPar.getParameter<double>("LenghtInZ"), 1);
73  GlobalPoint lowerPosition(lowerScintPar.getParameter<double>("GlobalX"),
74  lowerScintPar.getParameter<double>("GlobalY"),
75  lowerScintPar.getParameter<double>("GlobalZ"));
76  edm::LogVerbatim("CtfSpecialSeedGenerator") << "Lower Scintillator position x, y, z " << lowerPosition.x() << ", "
77  << lowerPosition.y() << ", " << lowerPosition.z();
78  TkRotation<float> rot(1, 0, 0, 0, 0, 1, 0, 1, 0);
79  upperScintillator = BoundPlane::build(upperPosition, rot, &upperBounds);
80  lowerScintillator = BoundPlane::build(lowerPosition, rot, &lowerBounds);
81  }
82 
83  edm::ESHandle<Propagator> propagatorAlongHandle = iSetup.getHandle(thePropAlongToken);
84  edm::ESHandle<Propagator> propagatorOppositeHandle = iSetup.getHandle(thePropOppositeToken);
85 
86  std::vector<edm::ParameterSet> pSets = conf_.getParameter<std::vector<edm::ParameterSet>>("OrderedHitsFactoryPSets");
87  std::vector<edm::ParameterSet>::const_iterator iPSet;
88  for (iPSet = pSets.begin(); iPSet != pSets.end(); iPSet++) {
89  std::string propagationDirection = iPSet->getParameter<std::string>("PropagationDirection");
90  if (propagationDirection == "alongMomentum")
91  thePropDirs.push_back(alongMomentum);
92  else
94  std::string navigationDirection = iPSet->getParameter<std::string>("NavigationDirection");
95  if (navigationDirection == "insideOut")
96  theNavDirs.push_back(insideOut);
97  else
98  theNavDirs.push_back(outsideIn);
99  edm::LogVerbatim("CtfSpecialSeedGenerator") << "hitsGenerator done";
100  }
101  bool setMomentum = conf_.getParameter<bool>("SetMomentum");
102  std::vector<int> charges;
103  if (setMomentum) {
104  charges = conf_.getParameter<std::vector<int>>("Charges");
105  }
106  theSeedBuilder = std::make_unique<SeedFromGenericPairOrTriplet>(theMagfield.product(),
109  propagatorAlongHandle.product(),
110  propagatorOppositeHandle.product(),
111  charges,
112  setMomentum,
113  conf_.getParameter<double>("ErrorRescaling"));
114  double p = 1;
115  if (setMomentum) {
116  p = conf_.getParameter<double>("SeedMomentum");
117  theSeedBuilder->setMomentumTo(p);
118  }
119 }
Log< level::Info, true > LogVerbatim
std::unique_ptr< SeedFromGenericPairOrTriplet > theSeedBuilder
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BoundPlane::BoundPlanePointer lowerScintillator
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theBuilderToken
const edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropOppositeToken
BoundPlane::BoundPlanePointer upperScintillator
T const * product() const
Definition: ESHandle.h:86
const edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropAlongToken
edm::ESHandle< MagneticField > theMagfield
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > theTrackerToken
edm::ESHandle< TrackerGeometry > theTracker
edm::ESHandle< TransientTrackingRecHitBuilder > theBuilder
charges
only generated particles of these IDs are considered
std::vector< NavigationDirection > theNavDirs
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theMFToken
std::vector< PropagationDirection > thePropDirs

◆ buildSeeds()

bool CtfSpecialSeedGenerator::buildSeeds ( const edm::EventSetup iSetup,
const edm::Event e,
const OrderedSeedingHits osh,
const NavigationDirection navdir,
const PropagationDirection dir,
TrajectorySeedCollection output 
)
private

Definition at line 161 of file CtfSpecialSeedGenerator.cc.

References DeadROC_duringRun::dir, mps_fire::i, convertSQLitetoXML_cfg::output, postCheck(), preliminaryCheck(), DetachedQuadStep_cff::seeds, OrderedSeedingHits::size(), theMaxSeeds, and theSeedBuilder.

Referenced by run().

166  {
167  //SeedFromGenericPairOrTriplet seedBuilder(conf_, magfield.product(), tracker.product(), theBuilder.product());
168  edm::LogInfo("CtfSpecialSeedGenerator") << "osh.size() " << osh.size();
169  for (unsigned int i = 0; i < osh.size(); i++) {
170  const SeedingHitSet& shs = osh[i];
171  if (preliminaryCheck(shs, iSetup)) {
172  std::vector<TrajectorySeed*> seeds = theSeedBuilder->seed(shs, dir, navdir, iSetup);
173  for (std::vector<TrajectorySeed*>::const_iterator iSeed = seeds.begin(); iSeed != seeds.end(); iSeed++) {
174  if (!*iSeed) {
175  edm::LogError("CtfSpecialSeedGenerator") << "a seed pointer is null. skipping.";
176  continue;
177  }
178  if (postCheck(**iSeed)) {
179  output.push_back(**iSeed);
180  }
181  delete *iSeed;
182  edm::LogVerbatim("CtfSpecialSeedGenerator") << "Seed built";
183  }
184  }
185  }
186  if ((theMaxSeeds > 0) && (output.size() > size_t(theMaxSeeds))) {
187  edm::LogWarning("TooManySeeds") << "Too many seeds (" << output.size() << "), bailing out.\n";
188  output.clear();
189  return false;
190  }
191  return true;
192 }
Log< level::Info, true > LogVerbatim
std::unique_ptr< SeedFromGenericPairOrTriplet > theSeedBuilder
virtual unsigned int size() const =0
Log< level::Error, false > LogError
Log< level::Info, false > LogInfo
bool preliminaryCheck(const SeedingHitSet &shs, const edm::EventSetup &es)
bool postCheck(const TrajectorySeed &seed)
Log< level::Warning, false > LogWarning

◆ endRun()

void CtfSpecialSeedGenerator::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
override

Definition at line 53 of file CtfSpecialSeedGenerator.cc.

References theSeedBuilder.

53 { theSeedBuilder.reset(); }
std::unique_ptr< SeedFromGenericPairOrTriplet > theSeedBuilder

◆ postCheck()

bool CtfSpecialSeedGenerator::postCheck ( const TrajectorySeed seed)
private

Definition at line 245 of file CtfSpecialSeedGenerator.cc.

References alongMomentum, PTrajectoryStateOnDet::detId(), TrajectoryStateOnSurface::freeState(), TrackerGeometry::idToDet(), lowerScintillator, oppositeToMomentum, StraightLinePlaneCrossing::position(), fileCollector::seed, GeomDet::surface(), theMagfield, theTracker, trajectoryStateTransform::transientState(), upperScintillator, and useScintillatorsConstraint.

Referenced by buildSeeds().

245  {
247  return true;
248 
249  PTrajectoryStateOnDet pstate = seed.startingState();
251  pstate, &(theTracker->idToDet(DetId(pstate.detId()))->surface()), &(*theMagfield));
252  const FreeTrajectoryState* state = theTSOS.freeState();
253  StraightLinePlaneCrossing planeCrossingLower(
255  StraightLinePlaneCrossing planeCrossingUpper(
257  std::pair<bool, StraightLinePlaneCrossing::PositionType> positionUpper =
258  planeCrossingUpper.position(*upperScintillator);
259  std::pair<bool, StraightLinePlaneCrossing::PositionType> positionLower =
260  planeCrossingLower.position(*lowerScintillator);
261  if (!(positionUpper.first && positionLower.first)) {
262  edm::LogVerbatim("CtfSpecialSeedGenerator::checkDirection") << "Scintillator plane not crossed";
263  return false;
264  }
265  LocalPoint positionUpperLocal = upperScintillator->toLocal((GlobalPoint)(positionUpper.second));
266  LocalPoint positionLowerLocal = lowerScintillator->toLocal((GlobalPoint)(positionLower.second));
267  if (upperScintillator->bounds().inside(positionUpperLocal) &&
268  lowerScintillator->bounds().inside(positionLowerLocal)) {
269  edm::LogVerbatim("CtfSpecialSeedGenerator::checkDirection")
270  << "position on Upper scintillator " << positionUpper.second;
271  edm::LogVerbatim("CtfSpecialSeedGenerator::checkDirection")
272  << "position on Lower scintillator " << positionLower.second;
273 
274  return true;
275  }
276  edm::LogVerbatim("CtfSpecialSeedGenerator::checkDirection")
277  << "scintillator not crossed in bounds: position on Upper scintillator " << positionUpper.second
278  << " position on Lower scintillator " << positionLower.second;
279  return false;
280 }
Log< level::Info, true > LogVerbatim
BoundPlane::BoundPlanePointer lowerScintillator
unsigned int detId() const
BoundPlane::BoundPlanePointer upperScintillator
const TrackerGeomDet * idToDet(DetId) const override
Definition: DetId.h:17
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
edm::ESHandle< MagneticField > theMagfield
edm::ESHandle< TrackerGeometry > theTracker
FreeTrajectoryState const * freeState(bool withErrors=true) const

◆ preliminaryCheck()

bool CtfSpecialSeedGenerator::preliminaryCheck ( const SeedingHitSet shs,
const edm::EventSetup es 
)
private

Definition at line 194 of file CtfSpecialSeedGenerator.cc.

References conf_, edm::EventSetup::getHandle(), edm::ParameterSet::getParameter(), pixelTopology::layer, TrackerTopology::layer(), nHits, rpcPointValidation_cfi::recHit, SeedingHitSet::size(), theTopoToken, and PV3DBase< T, PVType, FrameType >::y().

Referenced by buildSeeds().

194  {
196 
197  std::vector<std::pair<unsigned int, unsigned int>> vSubdetLayer;
198  //std::vector<std::string> vSeedLayerNames;
199  bool checkHitsAtPositiveY = conf_.getParameter<bool>("SeedsFromPositiveY");
200  //***top-bottom
201  bool checkHitsAtNegativeY = conf_.getParameter<bool>("SeedsFromNegativeY");
202  //***
203  bool checkHitsOnDifferentLayers = conf_.getParameter<bool>("CheckHitsAreOnDifferentLayers");
204  unsigned int nHits = shs.size();
205  for (unsigned int iHit = 0; iHit < nHits; ++iHit) {
206  //hits for the seeds must be at positive y
207  auto trh = shs[iHit];
208  auto recHit = trh;
209  GlobalPoint hitPos = recHit->globalPosition();
210  //GlobalPoint point =
211  // theTracker->idToDet(iHits->geographicalId() )->surface().toGlobal(iHits->localPosition());
212  if (checkHitsAtPositiveY) {
213  if (hitPos.y() < 0)
214  return false;
215  }
216  //***top-bottom
217  if (checkHitsAtNegativeY) {
218  if (hitPos.y() > 0)
219  return false;
220  }
221  //***
222  //std::string name = iHits->seedinglayer().name();
223  //hits for the seeds must be in different layers
224  unsigned int subid = (*trh).geographicalId().subdetId();
225  unsigned int layer = tTopo->layer((*trh).geographicalId());
226  std::vector<std::pair<unsigned int, unsigned int>>::const_iterator iter;
227  //std::vector<std::string>::const_iterator iNames;
228  if (checkHitsOnDifferentLayers) {
229  for (iter = vSubdetLayer.begin(); iter != vSubdetLayer.end(); iter++) {
230  if (iter->first == subid && iter->second == layer)
231  return false;
232  }
233  /*
234  for (iNames = vSeedLayerNames.begin(); iNames != vSeedLayerNames.end(); iNames++){
235  if (*iNames == name) return false;
236  }
237  */
238  }
239  //vSeedLayerNames.push_back(iHits->seedinglayer().name());
240  vSubdetLayer.push_back(std::make_pair(subid, layer));
241  }
242  return true;
243 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
unsigned int layer(const DetId &id) const
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
T y() const
Definition: PV3DBase.h:60
unsigned int size() const
Definition: SeedingHitSet.h:52
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > theTopoToken

◆ produce()

void CtfSpecialSeedGenerator::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 121 of file CtfSpecialSeedGenerator.cc.

References check, MillePedeFileConverter_cfg::e, MagneticField::inTesla(), PV3DBase< T, PVType, FrameType >::mag(), eostools::move(), convertSQLiteXML::ok, convertSQLitetoXML_cfg::output, requireBOFF, run(), theMagfield, and ClusterChecker::tooManyClusters().

121  {
122  // get Inputs
123  auto output = std::make_unique<TrajectorySeedCollection>();
124 
125  //check on the number of clusters
126  if (!requireBOFF || (theMagfield->inTesla(GlobalPoint(0, 0, 0)).mag() == 0.00)) {
127  size_t clustsOrZero = check.tooManyClusters(e);
128  if (!clustsOrZero) {
129  bool ok = run(iSetup, e, *output);
130  if (!ok) {
131  } // nothing to do
132  } else
133  edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.\n";
134  }
135 
136  edm::LogVerbatim("CtfSpecialSeedGenerator") << " number of seeds = " << output->size();
137  e.put(std::move(output));
138 }
Log< level::Info, true > LogVerbatim
size_t tooManyClusters(const edm::Event &e) const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
bool run(const edm::EventSetup &c, const edm::Event &e, TrajectorySeedCollection &output)
Log< level::Error, false > LogError
T mag() const
Definition: PV3DBase.h:64
edm::ESHandle< MagneticField > theMagfield
def move(src, dest)
Definition: eostools.py:511

◆ run()

bool CtfSpecialSeedGenerator::run ( const edm::EventSetup c,
const edm::Event e,
TrajectorySeedCollection output 
)
private

Definition at line 140 of file CtfSpecialSeedGenerator.cc.

References buildSeeds(), MillePedeFileConverter_cfg::e, mps_fire::i, convertSQLiteXML::ok, convertSQLitetoXML_cfg::output, theGenerators, theNavDirs, thePropDirs, theRegionProducer, and theSeedBuilder.

Referenced by produce().

142  {
143  std::vector<std::unique_ptr<TrackingRegion>> regions = theRegionProducer->regions(e, iSetup);
144  bool ok = true;
145  for (auto iReg = regions.begin(); iReg != regions.end(); iReg++) {
146  if (!theSeedBuilder->momentumFromPSet())
147  theSeedBuilder->setMomentumTo((*iReg)->ptMin());
148  int i = 0;
149  for (auto iGen = theGenerators.begin(); iGen != theGenerators.end(); iGen++) {
150  ok = buildSeeds(iSetup, e, (*iGen)->run(**iReg, e, iSetup), theNavDirs[i], thePropDirs[i], output);
151  i++;
152  if (!ok)
153  break;
154  }
155  if (!ok)
156  break;
157  }
158  return ok;
159 }
std::unique_ptr< SeedFromGenericPairOrTriplet > theSeedBuilder
std::unique_ptr< TrackingRegionProducer > theRegionProducer
bool buildSeeds(const edm::EventSetup &iSetup, const edm::Event &e, const OrderedSeedingHits &osh, const NavigationDirection &navdir, const PropagationDirection &dir, TrajectorySeedCollection &output)
std::vector< NavigationDirection > theNavDirs
std::vector< std::unique_ptr< OrderedHitsGenerator > > theGenerators
std::vector< PropagationDirection > thePropDirs

Member Data Documentation

◆ check

ClusterChecker CtfSpecialSeedGenerator::check
private

Definition at line 99 of file CtfSpecialSeedGenerator.h.

Referenced by produce().

◆ conf_

edm::ParameterSet CtfSpecialSeedGenerator::conf_
private

Definition at line 69 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun(), CtfSpecialSeedGenerator(), and preliminaryCheck().

◆ lowerScintillator

BoundPlane::BoundPlanePointer CtfSpecialSeedGenerator::lowerScintillator
private

Definition at line 96 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun(), and postCheck().

◆ requireBOFF

bool CtfSpecialSeedGenerator::requireBOFF
private

Definition at line 97 of file CtfSpecialSeedGenerator.h.

Referenced by produce().

◆ theBuilder

edm::ESHandle<TransientTrackingRecHitBuilder> CtfSpecialSeedGenerator::theBuilder
private

Definition at line 80 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun().

◆ theBuilderToken

const edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> CtfSpecialSeedGenerator::theBuilderToken
private

Definition at line 72 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun().

◆ theGenerators

std::vector<std::unique_ptr<OrderedHitsGenerator> > CtfSpecialSeedGenerator::theGenerators
private

Definition at line 88 of file CtfSpecialSeedGenerator.h.

Referenced by CtfSpecialSeedGenerator(), and run().

◆ theMagfield

edm::ESHandle<MagneticField> CtfSpecialSeedGenerator::theMagfield
private

Definition at line 78 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun(), postCheck(), and produce().

◆ theMaxSeeds

int32_t CtfSpecialSeedGenerator::theMaxSeeds
private

Definition at line 98 of file CtfSpecialSeedGenerator.h.

Referenced by buildSeeds().

◆ theMFToken

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> CtfSpecialSeedGenerator::theMFToken
private

Definition at line 71 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun().

◆ theNavDirs

std::vector<NavigationDirection> CtfSpecialSeedGenerator::theNavDirs
private

Definition at line 90 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun(), and run().

◆ thePropAlongToken

const edm::ESGetToken<Propagator, TrackingComponentsRecord> CtfSpecialSeedGenerator::thePropAlongToken
private

Definition at line 74 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun().

◆ thePropDirs

std::vector<PropagationDirection> CtfSpecialSeedGenerator::thePropDirs
private

Definition at line 89 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun(), and run().

◆ thePropOppositeToken

const edm::ESGetToken<Propagator, TrackingComponentsRecord> CtfSpecialSeedGenerator::thePropOppositeToken
private

Definition at line 75 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun().

◆ theRegionProducer

std::unique_ptr<TrackingRegionProducer> CtfSpecialSeedGenerator::theRegionProducer
private

Definition at line 91 of file CtfSpecialSeedGenerator.h.

Referenced by CtfSpecialSeedGenerator(), and run().

◆ theSeedBuilder

std::unique_ptr<SeedFromGenericPairOrTriplet> CtfSpecialSeedGenerator::theSeedBuilder
private

Definition at line 93 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun(), buildSeeds(), endRun(), and run().

◆ theTopoToken

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> CtfSpecialSeedGenerator::theTopoToken
private

Definition at line 76 of file CtfSpecialSeedGenerator.h.

Referenced by preliminaryCheck().

◆ theTracker

edm::ESHandle<TrackerGeometry> CtfSpecialSeedGenerator::theTracker
private

Definition at line 79 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun(), and postCheck().

◆ theTrackerToken

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> CtfSpecialSeedGenerator::theTrackerToken
private

Definition at line 73 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun().

◆ upperScintillator

BoundPlane::BoundPlanePointer CtfSpecialSeedGenerator::upperScintillator
private

Definition at line 95 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun(), and postCheck().

◆ useScintillatorsConstraint

bool CtfSpecialSeedGenerator::useScintillatorsConstraint
private

Definition at line 94 of file CtfSpecialSeedGenerator.h.

Referenced by beginRun(), CtfSpecialSeedGenerator(), and postCheck().