47 caThetaCut(cfg.getParameter<double>(
"CAThetaCut")),
48 caPhiCut(cfg.getParameter<double>(
"CAPhiCut")),
49 caHardPtCut(cfg.getParameter<double>(
"CAHardPtCut"))
53 if (comparitorName !=
"none")
60 desc.
add<
double>(
"extraHitRPhitolerance", 0.1);
61 desc.
add<
bool>(
"fitFastCircle",
false);
62 desc.
add<
bool>(
"fitFastCircleChi2Cut",
false);
63 desc.
add<
bool>(
"useBendingCorrection",
false);
64 desc.
add<
double>(
"CAThetaCut", 0.00125);
65 desc.
add<
double>(
"CAPhiCut", 10);
66 desc.
add<
double>(
"CAHardPtCut", 0);
67 desc.
addOptional<
bool>(
"CAOnlyOneLastHitPerLayerFilter")->setComment(
"Deprecated and has no effect. To be fully removed later when the parameter is no longer used in HLT configurations.");
69 descMaxChi2.
add<
double>(
"pt1", 0.2);
70 descMaxChi2.
add<
double>(
"pt2", 1.5);
71 descMaxChi2.
add<
double>(
"value1", 500);
72 descMaxChi2.
add<
double>(
"value2", 50);
73 descMaxChi2.
add<
bool>(
"enabled",
true);
78 descComparitor.setAllowAnything();
87 for (
unsigned int i = 0;
i < layers.
size();
i++)
89 for (
unsigned int j = 0; j < 4; ++j)
124 for (
auto &
v : g.
theLayers[
i].isOuterHitOfCell)
v.clear();
129 CAGraph& g, std::vector<const HitDoublets *>& hitDoublets) {
130 for (
unsigned int i = 0;
i < layers.
size();
i++)
132 for (
unsigned int j = 0; j < 4; ++j)
136 layers[
i][j].name());
160 return pair.innerLayerIndex() == layers[
i][j - 1].index() && pair.outerLayerIndex() == layers[
i][j].index();
162 if(
found != regionLayerPairs.
end()) {
163 hitDoublets.emplace_back(&(
found->doublets()));
167 innerVertex->theOuterLayers.push_back(
vertexIndex);
170 innerVertex->theOuterLayerPairs.push_back(
184 std::vector<OrderedHitSeeds>&
result,
189 std::vector<const HitDoublets *> hitDoublets;
191 const int numberOfHitsInNtuplet = 4;
192 std::vector<CACell::CAntuplet> foundQuadruplets;
197 for(
const auto& regionLayerPairs: regionDoublets) {
201 foundQuadruplets.clear();
203 createGraphStructure(layers, g);
206 clearGraphStructure(layers, g);
209 fillGraph(layers, regionLayerPairs, g, hitDoublets);
216 ca.
evolve(numberOfHitsInNtuplet);
218 ca.
findNtuplets(foundQuadruplets, numberOfHitsInNtuplet);
225 std::array<float, 4> bc_r;
226 std::array<float, 4> bc_z;
227 std::array<float, 4> bc_errZ2;
228 std::array<GlobalPoint, 4> gps;
229 std::array<GlobalError, 4> ges;
230 std::array<bool, 4> barrels;
232 unsigned int numberOfFoundQuadruplets = foundQuadruplets.size();
235 for (
unsigned int quadId = 0; quadId < numberOfFoundQuadruplets; ++quadId)
242 for(
unsigned int i = 0;
i< 3; ++
i)
244 auto const& ahit = allCells[foundQuadruplets[quadId][
i]].getInnerHit();
245 gps[
i] = ahit->globalPosition();
246 ges[
i] = ahit->globalPositionError();
247 barrels[
i] =
isBarrel(ahit->geographicalId().subdetId());
250 auto const& ahit = allCells[foundQuadruplets[quadId][2]].getOuterHit();
251 gps[3] = ahit->globalPosition();
252 ges[3] = ahit->globalPositionError();
253 barrels[3] =
isBarrel(ahit->geographicalId().subdetId());
260 const float abscurv =
std::abs(curvature);
261 const float thisMaxChi2 = maxChi2Eval.
value(abscurv);
264 SeedingHitSet tmpTriplet(allCells[foundQuadruplets[quadId][0]].getInnerHit(),
265 allCells[foundQuadruplets[quadId][2]].getInnerHit(),
266 allCells[foundQuadruplets[quadId][2]].getOuterHit());
275 float chi2 = std::numeric_limits<float>::quiet_NaN();
280 const float simpleCot = ( gps.back().z() - gps.front().z() ) / (gps.back().perp() - gps.front().perp() );
282 for (
int i=0;
i < 4; ++
i)
288 bc_z[
i] = point.
z() - region.
origin().
z();
289 bc_errZ2[
i] = (barrels[
i]) ? error.
czz() : error.
rerr(point)*
sqr(simpleCot);
292 chi2 = rzLine.
chi2();
296 RZLine rzLine(gps, ges, barrels);
297 chi2 = rzLine.
chi2();
312 result[
index].emplace_back(allCells[foundQuadruplets[quadId][0]].getInnerHit(),
313 allCells[foundQuadruplets[quadId][1]].getInnerHit(),
314 allCells[foundQuadruplets[quadId][2]].getInnerHit(),
315 allCells[foundQuadruplets[quadId][2]].getOuterHit());
T getParameter(std::string const &) const
void findNtuplets(std::vector< CACell::CAntuplet > &, const unsigned int)
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
float value(float curvature) const
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
const bool useBendingCorrection
const_iterator begin() const
void createAndConnectCells(const std::vector< const HitDoublets * > &, const TrackingRegion &, const float, const float, const float)
GlobalPoint const & origin() const
def create(alignables, pedeDump, additionalData, outputFile, config)
const_iterator end() const
std::vector< CACell > & getAllCells()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::unique_ptr< SeedComparitor > theComparitor
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
T inversePt(T curvature, const edm::EventSetup &iSetup)
T x() const
Cartesian x coordinate.
static unsigned int minLayers
T curvature(T InversePt, const edm::EventSetup &iSetup)
std::vector< CALayer > theLayers
void initEvent(const edm::Event &ev, const edm::EventSetup &es)
Abs< T >::type abs(const T &t)
const float extraHitRPhitolerance
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< CALayerPair > theLayerPairs
const bool fitFastCircleChi2Cut
CAHitQuadrupletGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
const QuantityDependsPt maxChi2
T rerr(const GlobalPoint &aPoint) const
Square< F >::type sqr(const F &f)
std::vector< int > theRootLayers
void hitNtuplets(const IntermediateHitDoublets ®ionDoublets, std::vector< OrderedHitSeeds > &result, const edm::EventSetup &es, const SeedingLayerSetsHits &layers)
static void fillDescriptions(edm::ParameterSetDescription &desc)
QuantityDependsPtEval evaluator(const edm::EventSetup &es) const
unsigned short size() const
Get the number of SeedingLayerSets.
T get(const Candidate &c)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
void evolve(const unsigned int)