49 produces<edm::DetSetVector<TotemTimingLocalTrack> >();
51 for (
unsigned short armNo = 0; armNo < 2; armNo++ )
52 for (
unsigned short rpNo = 0; rpNo < 2; rpNo++ ) {
62 auto pOut = std::make_unique<edm::DetSetVector<TotemTimingLocalTrack> >();
68 pOut->find_or_insert( trk_algo_entry.first );
70 std::map<TotemTimingDetId,int> planeActivityMap;
79 for (
const auto& vec: *recHits )
80 planeActivityMap[
motherId(vec.detId())] += vec.size();
83 for (
const auto& vec : *recHits ) {
84 auto detId =
motherId( vec.detId() );
89 for (
const auto&
hit : vec ) {
90 if ( trk_algo_map_.find( detId ) == trk_algo_map_.end() )
92 <<
"Invalid detId for rechit: arm=" << detId.arm() <<
", rp=" << detId.rp();
93 trk_algo_map_.find( detId )->second.addHit(
hit );
98 for (
auto& trk_algo_entry : trk_algo_map_ )
99 trk_algo_entry.second.produceTracks( pOut->operator[]( trk_algo_entry.first ) );
104 for (
auto& trk_algo_entry : trk_algo_map_ )
105 trk_algo_entry.second.clear();
113 ->setComment(
"input rechits collection to retrieve" );
114 desc.
add<
int>(
"maxPlaneActiveChannels", 2 )
115 ->setComment(
"threshold for discriminating noisy planes" );
118 trackingAlgoParams.
add<
double>(
"threshold", 1.5 )
119 ->setComment(
"minimal number of rechits to be observed before launching the track recognition algorithm" );
120 trackingAlgoParams.
add<
double>(
"thresholdFromMaximum", 0.5 )
121 ->setComment(
"threshold relative to hit profile function local maximum for determining the width of the track" );
122 trackingAlgoParams.
add<
double>(
"resolution", 0.01 )
123 ->setComment(
"spatial resolution on the horizontal coordinate (in mm)" );
124 trackingAlgoParams.
add<
double>(
"sigma", 0. )
125 ->setComment(
"pixel efficiency function parameter determining the smoothness of the step" );
126 trackingAlgoParams.
add<
double>(
"tolerance", 0.1 )
127 ->setComment(
"tolerance used for checking if the track contains certain hit" );
129 trackingAlgoParams.
add<
std::string>(
"pixelEfficiencyFunction",
"(x>[0]-0.5*[1]-0.05)*(x<[0]+0.5*[1]-0.05)+0*[2]" )
130 ->setComment(
"efficiency function for single pixel\n" 131 "can be defined as:\n" 132 " * Precise: (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" 133 " * Fast: (x>[0]-0.5*([1]-0.05))*(x<[0]+0.5*([1]-0.05))+((x-[0]+0.5*([1]-0.05)+[2])/[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])/[2])*(x>[0]+0.5*([1]-0.05))*(x<[0]+0.5*([1]-0.05)+[2])\n" 134 " * Legacy: (1/(1+exp(-(x-[0]+0.5*([1]-0.05))/[2])))*(1/(1+exp((x-[0]-0.5*([1]-0.05))/[2])))\n" 135 " * Default (sigma ignored): (x>[0]-0.5*[1]-0.05)*(x<[0]+0.5*[1]-0.05)+0*[2]\n" 137 " [0]: centre of pad\n" 138 " [1]: width of pad\n" 139 " [2]: sigma: distance between efficiency ~100 -> 0 outside width" );
141 trackingAlgoParams.
add<
double>(
"yPosition", 0.0 )
142 ->setComment(
"vertical offset of the outcoming track centre" );
143 trackingAlgoParams.
add<
double>(
"yWidth", 0.0 )
144 ->setComment(
"vertical track width" );
146 ->setComment(
"list of parameters associated to the track recognition algorithm" );
148 descr.
add(
"totemTimingLocalTracks", desc );
T getParameter(std::string const &) const
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 ...