21 theMaxSeeds(conf.getParameter<int32_t>(
"maxSeeds")),
22 check(conf, consumesCollector())
26 edm::LogVerbatim(
"CtfSpecialSeedGenerator") <<
"Constructing CtfSpecialSeedGenerator";
27 produces<TrajectorySeedCollection>();
34 std::vector<edm::ParameterSet> pSets =
conf_.
getParameter<std::vector<edm::ParameterSet>>(
"OrderedHitsFactoryPSets");
35 std::vector<edm::ParameterSet>::const_iterator iPSet;
37 for (iPSet = pSets.begin(); iPSet != pSets.end(); iPSet++) {
63 edm::LogVerbatim(
"CtfSpecialSeedGenerator") <<
"Upper Scintillator position x, y, z " << upperPosition.
x() <<
", "
64 << upperPosition.
y() <<
", " << upperPosition.
z();
66 lowerScintPar.getParameter<
double>(
"WidthInX"), lowerScintPar.getParameter<
double>(
"LenghtInZ"), 1);
67 GlobalPoint lowerPosition(lowerScintPar.getParameter<
double>(
"GlobalX"),
68 lowerScintPar.getParameter<
double>(
"GlobalY"),
69 lowerScintPar.getParameter<
double>(
"GlobalZ"));
70 edm::LogVerbatim(
"CtfSpecialSeedGenerator") <<
"Lower Scintillator position x, y, z " << lowerPosition.
x() <<
", "
71 << lowerPosition.
y() <<
", " << lowerPosition.
z();
82 std::vector<edm::ParameterSet> pSets =
conf_.
getParameter<std::vector<edm::ParameterSet>>(
"OrderedHitsFactoryPSets");
83 std::vector<edm::ParameterSet>::const_iterator iPSet;
84 for (iPSet = pSets.begin(); iPSet != pSets.end(); iPSet++) {
86 if (propagationDirection ==
"alongMomentum")
91 if (navigationDirection ==
"insideOut")
105 propagatorAlongHandle.
product(),
106 propagatorOppositeHandle.
product(),
119 auto output = std::make_unique<TrajectorySeedCollection>();
129 edm::LogError(
"TooManyClusters") <<
"Found too many clusters (" << clustsOrZero <<
"), bailing out.\n";
141 for (
auto iReg =
regions.begin(); iReg !=
regions.end(); iReg++) {
165 for (
unsigned int i = 0;
i < osh.
size();
i++) {
169 for (std::vector<TrajectorySeed*>::const_iterator iSeed =
seeds.begin(); iSeed !=
seeds.end(); iSeed++) {
171 edm::LogError(
"CtfSpecialSeedGenerator") <<
"a seed pointer is null. skipping.";
175 output.push_back(**iSeed);
194 std::vector<std::pair<unsigned int, unsigned int>> vSubdetLayer;
200 bool checkHitsOnDifferentLayers =
conf_.
getParameter<
bool>(
"CheckHitsAreOnDifferentLayers");
202 for (
unsigned int iHit = 0; iHit <
nHits; ++iHit) {
204 auto trh = shs[iHit];
209 if (checkHitsAtPositiveY) {
214 if (checkHitsAtNegativeY) {
221 unsigned int subid = (*trh).geographicalId().subdetId();
222 unsigned int layer = tTopo->
layer((*trh).geographicalId());
223 std::vector<std::pair<unsigned int, unsigned int>>::const_iterator iter;
225 if (checkHitsOnDifferentLayers) {
226 for (iter = vSubdetLayer.begin(); iter != vSubdetLayer.end(); iter++) {
227 if (iter->first == subid && iter->second ==
layer)
237 vSubdetLayer.push_back(std::make_pair(subid,
layer));
254 std::pair<bool, StraightLinePlaneCrossing::PositionType> positionUpper =
256 std::pair<bool, StraightLinePlaneCrossing::PositionType> positionLower =
258 if (!(positionUpper.first && positionLower.first)) {
259 edm::LogVerbatim(
"CtfSpecialSeedGenerator::checkDirection") <<
"Scintillator plane not crossed";
267 <<
"position on Upper scintillator " << positionUpper.second;
269 <<
"position on Lower scintillator " << positionLower.second;
274 <<
"scintillator not crossed in bounds: position on Upper scintillator " << positionUpper.second
275 <<
" position on Lower scintillator " << positionLower.second;