39 std::unordered_map<CTPPSDetId, std::unique_ptr<CTPPSDiamondTrackRecognition> >
trk_algo_;
45 trk_algo_params_(iConfig.getParameter<
edm::
ParameterSet>(
"trackingAlgorithmParams")) {
46 produces<edm::DetSetVector<CTPPSDiamondLocalTrack> >();
51 auto pOut = std::make_unique<edm::DetSetVector<CTPPSDiamondLocalTrack> >();
58 algo_vs_id.second->clear();
61 for (
const auto& vec : *
recHits) {
62 const CTPPSDiamondDetId raw_detid(vec.detId()), detid(raw_detid.arm(), raw_detid.station(), raw_detid.rp());
66 for (
const auto&
hit : vec)
74 auto&
tracks = pOut->find_or_insert(algo_vs_id.first);
75 algo_vs_id.second->produceTracks(
tracks);
84 ->setComment(
"input rechits collection to retrieve");
87 trackingAlgoParams.
add<
double>(
"threshold", 1.5)
88 ->
setComment(
"minimal number of rechits to be observed before launching the track recognition algorithm");
89 trackingAlgoParams.
add<
double>(
"thresholdFromMaximum", 0.5);
90 trackingAlgoParams.
add<
double>(
"resolution", 0.01 )
91 ->setComment(
"spatial resolution on the horizontal coordinate (in mm)");
92 trackingAlgoParams.
add<
double>(
"sigma", 0.1);
93 trackingAlgoParams.
add<
double>(
"startFromX", -0.5 )
94 ->setComment(
"starting horizontal coordinate of rechits for the track recognition");
95 trackingAlgoParams.
add<
double>(
"stopAtX", 19.5 )
96 ->setComment(
"ending horizontal coordinate of rechits for the track recognition");
97 trackingAlgoParams.
add<
double>(
"tolerance", 0.1 )
98 ->setComment(
"tolerance used for checking if the track contains certain hit");
100 trackingAlgoParams.
add<
std::string>(
"pixelEfficiencyFunction",
"(x>[0]-0.5*[1])*(x<[0]+0.5*[1])+0*[2]")
102 "efficiency function for single pixel\n" 103 "can be defined as:\n" 104 " * Precise: (TMath::Erf((x-[0]+0.5*[1])/([2]/4)+2)+1)*TMath::Erfc((x-[0]-0.5*[1])/([2]/4)-2)/4\n" 106 "(x>[0]-0.5*[1])*(x<[0]+0.5*[1])+((x-[0]+0.5*[1]+[2])/" 107 "[2])*(x>[0]-0.5*[1]-[2])*(x<[0]-0.5*[1])+(2-(x-[0]-0.5*[1]+[2])/[2])*(x>[0]+0.5*[1])*(x<[0]+0.5*[1]+[2])\n" 108 " * Legacy: (1/(1+exp(-(x-[0]+0.5*[1])/[2])))*(1/(1+exp((x-[0]-0.5*[1])/[2])))\n" 109 " * Default (sigma ignored): (x>[0]-0.5*[1])*(x<[0]+0.5*[1])+0*[2]\n" 111 " [0]: centre of pad\n" 112 " [1]: width of pad\n" 113 " [2]: sigma: distance between efficiency ~100 -> 0 outside width");
115 trackingAlgoParams.
add<
double>(
"yPosition", 0.0)->
setComment(
"vertical offset of the outcoming track centre");
116 trackingAlgoParams.
add<
double>(
"yWidth", 0.0)->
setComment(
"vertical track width");
117 trackingAlgoParams.
add<
bool>(
"excludeSingleEdgeHits",
true)
118 ->setComment(
"exclude rechits with missing leading/trailing edge");
121 ->setComment(
"list of parameters associated to the track recognition algorithm");
123 descr.
add(
"ctppsDiamondLocalTracks",
desc);
static void fillDescriptions(edm::ConfigurationDescriptions &)
void setComment(std::string const &value)
Reconstructed hit in diamond detectors.
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > recHitsToken_
const edm::ParameterSet trk_algo_params_
void produce(edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unordered_map< CTPPSDetId, std::unique_ptr< CTPPSDiamondTrackRecognition > > trk_algo_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static constexpr int TIMESLICE_WITHOUT_LEADING
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
CTPPSDiamondLocalTrackFitter(const edm::ParameterSet &)