1 #include <unordered_map> 31 "extraHitRPhitolerance")),
34 caThetaCut(cfg.getParameter<double>(
"CAThetaCut")),
35 caPhiCut(cfg.getParameter<double>(
"CAPhiCut")),
36 caHardPtCut(cfg.getParameter<double>(
"CAHardPtCut")) {
39 if (comparitorName !=
"none") {
45 desc.
add<
double>(
"extraHitRPhitolerance", 0.06);
46 desc.
add<
bool>(
"useBendingCorrection",
false);
47 desc.
add<
double>(
"CAThetaCut", 0.00125);
48 desc.
add<
double>(
"CAPhiCut", 0.1);
49 desc.
add<
double>(
"CAHardPtCut", 0);
52 descMaxChi2.
add<
double>(
"pt1", 0.8);
53 descMaxChi2.add<
double>(
"pt2", 2);
54 descMaxChi2.add<
double>(
"value1", 50);
55 descMaxChi2.add<
double>(
"value2", 8);
56 descMaxChi2.add<
bool>(
"enabled",
true);
61 descComparitor.setAllowAnything();
72 for (
unsigned int i = 0;
i < layers.
size();
i++) {
73 for (
unsigned int j = 0;
j < 3; ++
j) {
106 std::vector<const HitDoublets*>& hitDoublets) {
107 for (
unsigned int i = 0;
i < layers.
size();
i++) {
108 for (
unsigned int j = 0;
j < 3; ++
j) {
124 auto found = std::find_if(regionLayerPairs.
begin(),
125 regionLayerPairs.
end(),
127 return pair.innerLayerIndex() == layers[
i][
j - 1].index() &&
128 pair.outerLayerIndex() == layers[
i][
j].index();
130 if (
found != regionLayerPairs.
end()) {
131 hitDoublets.emplace_back(&(
found->doublets()));
134 innerVertex->theOuterLayers.push_back(
vertexIndex);
136 innerVertex->theOuterLayerPairs.push_back(g.
theLayerPairs.size() - 1);
146 std::vector<OrderedHitSeeds>&
result,
151 std::vector<const HitDoublets*> hitDoublets;
153 std::vector<CACell::CAntuplet> foundTriplets;
156 for (
const auto& regionLayerPairs : regionDoublets) {
159 foundTriplets.clear();
162 createGraphStructure(layers, g);
164 clearGraphStructure(layers, g);
166 fillGraph(layers, regionLayerPairs, g, hitDoublets);
175 std::array<float, 3> bc_r;
176 std::array<float, 3> bc_z;
177 std::array<float, 3> bc_errZ2;
178 std::array<GlobalPoint, 3> gps;
179 std::array<GlobalError, 3> ges;
180 std::array<bool, 3> barrels;
182 unsigned int numberOfFoundTriplets = foundTriplets.size();
183 for (
unsigned int tripletId = 0; tripletId < numberOfFoundTriplets; ++tripletId) {
184 OrderedHitTriplet tmpTriplet(allCells[foundTriplets[tripletId][0]].getInnerHit(),
185 allCells[foundTriplets[tripletId][0]].getOuterHit(),
186 allCells[foundTriplets[tripletId][1]].getOuterHit());
189 for (
unsigned int i = 0;
i < 2; ++
i) {
190 auto const& ahit = allCells[foundTriplets[tripletId][
i]].getInnerHit();
191 gps[
i] = ahit->globalPosition();
192 ges[
i] = ahit->globalPositionError();
193 barrels[
i] =
isBarrel(ahit->geographicalId().subdetId());
196 auto const& ahit = allCells[foundTriplets[tripletId][1]].getOuterHit();
197 gps[2] = ahit->globalPosition();
198 ges[2] = ahit->globalPositionError();
199 barrels[2] =
isBarrel(ahit->geographicalId().subdetId());
204 const float abscurv =
std::abs(curvature);
205 const float thisMaxChi2 = maxChi2Eval.
value(abscurv);
206 float chi2 = std::numeric_limits<float>::quiet_NaN();
211 const float simpleCot = (gps.back().z() - gps.front().z()) / (gps.back().perp() - gps.front().perp());
213 for (
int i = 0;
i < 3; ++
i) {
218 bc_z[
i] = point.
z() - region.
origin().
z();
219 bc_errZ2[
i] = (barrels[
i]) ? error.
czz() : error.
rerr(point) *
sqr(simpleCot);
222 chi2 = rzLine.
chi2();
224 RZLine rzLine(gps, ges, barrels);
225 chi2 = rzLine.
chi2();
237 result[
index].emplace_back(tmpTriplet);
T getParameter(std::string const &) const
const QuantityDependsPt maxChi2
const_iterator begin() const
GlobalPoint const & origin() const
constexpr bool isNotFinite(T x)
const_iterator end() const
std::vector< CACell > & getAllCells()
void hitNtuplets(const IntermediateHitDoublets ®ionDoublets, std::vector< OrderedHitSeeds > &result, const edm::EventSetup &es, const SeedingLayerSetsHits &layers)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
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
const bool useBendingCorrection
CAHitTripletGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Range curvature(double transverseIP) const
T inversePt(T curvature, const edm::EventSetup &iSetup)
QuantityDependsPtEval evaluator(const edm::EventSetup &es) const
T curvature(T InversePt, const edm::EventSetup &iSetup)
std::vector< CALayer > theLayers
Abs< T >::type abs(const T &t)
void initEvent(const edm::Event &ev, const edm::EventSetup &es)
float value(float curvature) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< CALayerPair > theLayerPairs
T rerr(const GlobalPoint &aPoint) const
Square< F >::type sqr(const F &f)
std::vector< int > theRootLayers
static void fillDescriptions(edm::ParameterSetDescription &desc)
const float extraHitRPhitolerance
void findTriplets(const std::vector< const HitDoublets * > &hitDoublets, std::vector< CACell::CAntuplet > &foundTriplets, const TrackingRegion ®ion, const float thetaCut, const float phiCut, const float hardPtCut)
std::unique_ptr< SeedComparitor > theComparitor
unsigned short size() const
Get the number of SeedingLayerSets.
static unsigned int minLayers
*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