1 #include <unordered_map> 41 caThetaCut( cfg.getParameter<double>(
"CAThetaCut")),
42 caPhiCut(cfg.getParameter<double>(
"CAPhiCut")),
43 caHardPtCut(cfg.getParameter<double>(
"CAHardPtCut"))
47 if (comparitorName !=
"none")
56 desc.
add<
double>(
"extraHitRPhitolerance", 0.06);
57 desc.
add<
bool>(
"useBendingCorrection",
false);
58 desc.
add<
double>(
"CAThetaCut", 0.00125);
59 desc.
add<
double>(
"CAPhiCut", 0.1);
60 desc.
add<
double>(
"CAHardPtCut", 0);
63 descMaxChi2.
add<
double>(
"pt1", 0.8);
64 descMaxChi2.add<
double>(
"pt2", 2);
65 descMaxChi2.add<
double>(
"value1", 50);
66 descMaxChi2.add<
double>(
"value2", 8);
67 descMaxChi2.add<
bool>(
"enabled",
true);
72 descComparitor.setAllowAnything();
82 for (
unsigned int i = 0;
i < layers.
size();
i++)
84 for (
unsigned int j = 0; j < 3; ++j)
121 for (
auto &
v : g.
theLayers[
i].isOuterHitOfCell)
v.clear();
127 CAGraph& g, std::vector<const HitDoublets *>& hitDoublets) {
128 for (
unsigned int i = 0;
i < layers.
size();
i++)
130 for (
unsigned int j = 0; j < 3; ++j)
134 layers[
i][j].name());
159 return pair.innerLayerIndex() == layers[
i][j - 1].index() && pair.outerLayerIndex() == layers[
i][j].index();
161 if(
found != regionLayerPairs.
end()) {
162 hitDoublets.emplace_back(&(
found->doublets()));
166 innerVertex->theOuterLayers.push_back(
vertexIndex);
169 innerVertex->theOuterLayerPairs.push_back(
182 std::vector<OrderedHitSeeds>&
result,
187 std::vector<const HitDoublets *> hitDoublets;
189 std::vector<CACell::CAntuplet> foundTriplets;
192 for(
const auto& regionLayerPairs: regionDoublets) {
196 foundTriplets.clear();
199 createGraphStructure(layers, g);
202 clearGraphStructure(layers, g);
204 fillGraph(layers, regionLayerPairs, g, hitDoublets);
214 std::array<float, 3> bc_r;
215 std::array<float, 3> bc_z;
216 std::array<float, 3> bc_errZ2;
217 std::array<GlobalPoint, 3> gps;
218 std::array<GlobalError, 3> ges;
219 std::array<bool, 3> barrels;
221 unsigned int numberOfFoundTriplets = foundTriplets.size();
222 for (
unsigned int tripletId = 0; tripletId < numberOfFoundTriplets;
226 OrderedHitTriplet tmpTriplet(allCells[foundTriplets[tripletId][0]].getInnerHit(),
227 allCells[foundTriplets[tripletId][0]].getOuterHit(),
228 allCells[foundTriplets[tripletId][1]].getOuterHit());
234 for (
unsigned int i = 0;
i < 2; ++
i)
236 auto const& ahit = allCells[foundTriplets[tripletId][
i]].getInnerHit();
237 gps[
i] = ahit->globalPosition();
238 ges[
i] = ahit->globalPositionError();
239 barrels[
i] =
isBarrel(ahit->geographicalId().subdetId());
242 auto const& ahit = allCells[foundTriplets[tripletId][1]].getOuterHit();
243 gps[2] = ahit->globalPosition();
244 ges[2] = ahit->globalPositionError();
245 barrels[2] =
isBarrel(ahit->geographicalId().subdetId());
252 const float abscurv =
std::abs(curvature);
253 const float thisMaxChi2 = maxChi2Eval.
value(abscurv);
254 float chi2 = std::numeric_limits<float>::quiet_NaN();
260 const float simpleCot = (gps.back().z() - gps.front().z())
261 / (gps.back().perp() - gps.front().perp());
263 for (
int i = 0;
i < 3; ++
i)
272 bc_z[
i] = point.
z() - region.
origin().
z();
276 error.
rerr(point) *
sqr(simpleCot);
279 chi2 = rzLine.
chi2();
283 RZLine rzLine(gps, ges, barrels);
284 chi2 = rzLine.
chi2();
301 result[
index].emplace_back(tmpTriplet);
T getParameter(std::string const &) const
const QuantityDependsPt maxChi2
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
const_iterator begin() const
GlobalPoint const & origin() const
def create(alignables, pedeDump, additionalData, outputFile, config)
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)
T x() const
Cartesian x coordinate.
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
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