47 produces<edm::DetSetVector<TotemTimingLocalTrack> >();
49 for (
unsigned short armNo = 0; armNo < 2; armNo++)
50 for (
unsigned short rpNo = 0; rpNo < 2; rpNo++) {
58 auto pOut = std::make_unique<edm::DetSetVector<TotemTimingLocalTrack> >();
64 pOut->find_or_insert(trk_algo_entry.first);
66 std::map<TotemTimingDetId, int> planeActivityMap;
75 for (
const auto& vec : *recHits)
76 planeActivityMap[
motherId(vec.detId())] += vec.size();
79 for (
const auto& vec : *recHits) {
85 for (
const auto&
hit : vec) {
86 if (trk_algo_map_.find(detId) == trk_algo_map_.end())
88 <<
"Invalid detId for rechit: arm=" << detId.arm() <<
", rp=" << detId.rp();
89 trk_algo_map_.find(detId)->second.addHit(
hit);
94 for (
auto& trk_algo_entry : trk_algo_map_)
95 trk_algo_entry.second.produceTracks(pOut->operator[](trk_algo_entry.first));
100 for (
auto& trk_algo_entry : trk_algo_map_)
101 trk_algo_entry.second.clear();
107 ->setComment(
"input rechits collection to retrieve");
108 desc.
add<
int>(
"maxPlaneActiveChannels", 2)->setComment(
"threshold for discriminating noisy planes");
111 trackingAlgoParams.
add<
double>(
"threshold", 1.5)
112 ->
setComment(
"minimal number of rechits to be observed before launching the track recognition algorithm");
113 trackingAlgoParams.
add<
double>(
"thresholdFromMaximum", 0.5)
114 ->
setComment(
"threshold relative to hit profile function local maximum for determining the width of the track");
115 trackingAlgoParams.
add<
double>(
"resolution", 0.01 )
116 ->setComment(
"spatial resolution on the horizontal coordinate (in mm)");
117 trackingAlgoParams.
add<
double>(
"sigma", 0.)
118 ->
setComment(
"pixel efficiency function parameter determining the smoothness of the step");
119 trackingAlgoParams.
add<
double>(
"tolerance", 0.1 )
120 ->setComment(
"tolerance used for checking if the track contains certain hit");
122 trackingAlgoParams.
add<
std::string>(
"pixelEfficiencyFunction",
"(x>[0]-0.5*[1]-0.05)*(x<[0]+0.5*[1]-0.05)+0*[2]")
124 "efficiency function for single pixel\n" 125 "can be defined as:\n" 127 "(TMath::Erf((x-[0]+0.5*([1]-0.05))/([2]/4)+2)+1)*TMath::Erfc((x-[0]-0.5*([1]-0.05))/([2]/4)-2)/4\n" 129 "(x>[0]-0.5*([1]-0.05))*(x<[0]+0.5*([1]-0.05))+((x-[0]+0.5*([1]-0.05)+[2])/" 130 "[2])*(x>[0]-0.5*([1]-0.05)-[2])*(x<[0]-0.5*([1]-0.05))+(2-(x-[0]-0.5*([1]-0.05)+[2])/" 131 "[2])*(x>[0]+0.5*([1]-0.05))*(x<[0]+0.5*([1]-0.05)+[2])\n" 132 " * Legacy: (1/(1+exp(-(x-[0]+0.5*([1]-0.05))/[2])))*(1/(1+exp((x-[0]-0.5*([1]-0.05))/[2])))\n" 133 " * Default (sigma ignored): (x>[0]-0.5*[1]-0.05)*(x<[0]+0.5*[1]-0.05)+0*[2]\n" 135 " [0]: centre of pad\n" 136 " [1]: width of pad\n" 137 " [2]: sigma: distance between efficiency ~100 -> 0 outside width");
139 trackingAlgoParams.
add<
double>(
"yPosition", 0.0)->
setComment(
"vertical offset of the outcoming track centre");
140 trackingAlgoParams.
add<
double>(
"yWidth", 0.0)->
setComment(
"vertical track width");
142 ->setComment(
"list of parameters associated to the track recognition algorithm");
144 descr.
add(
"totemTimingLocalTracks", desc);
T getParameter(std::string const &) const
void setComment(std::string const &value)
TotemTimingLocalTrackFitter(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void setChannel(uint32_t channel)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const int maxPlaneActiveChannels_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setStation(uint32_t station)
static void fillDescriptions(edm::ConfigurationDescriptions &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< edm::DetSetVector< TotemTimingRecHit > > recHitsToken_
std::map< TotemTimingDetId, TotemTimingTrackRecognition > trk_algo_map_
Detector ID class for CTPPS Totem Timing detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bits ...