Flag merged clusters for relaxed CPE errors

Add a function "refineCluster" in SiStripClusterizer to mark SiStrip clusters as merged. Use this information StripCPEfromTrackAngle to fall back to the larger "legacy" CPE errors for these clusters. The flag lives on the high bit of the firstStrip_ private data member of the SiStripCluster. Configurable thresholds in the sensor occupancy and strip width are used to discriminate between un- and merged candidates. The cluster refiner is turned off as configured for this PR. (Note that it's also overridden by useLegacyError = cms.bool(True) in StripCPEfromTrackingAngle_cfi.)

I'm closing PR #6348, which was based on 7_2_0_pre6, in favor of this one, based on 7_3_0_pre2, though I haven't tested execution in this release.
Hi Mia,

Sure.  I've just made the following edits in my working directory.  Let 
me know if you think it's clear.  I decided that one could conceivably 
want to set the merged bit via the constructor as well:


   template<typename Iter>
   SiStripCluster(const uint16_t& firstStrip, Iter begin, Iter end, bool 
merged):
	 amplitudes_(begin,end), firstStrip_(firstStrip), error_x(-99999.9) {
	   if (merged) firstStrip_ |= 0x8000;  // if this is a candidate merged 
cluster
	 }

   /** The number of the first strip in the cluster
    *  The high bit of firstStrip_ is set by setMerged() to indicate that
    *  the cluster is a candidate for being merged.
    */
   uint16_t firstStrip() const {return firstStrip_ & 0x7FFF;}


   /** Test (set) the merged status of the cluster
    *
    */
   bool isMerged() const {return (firstStrip_ & 0x8000) != 0;}
   void setMerged(bool mergedState) {mergedState ? firstStrip_ |= 0x8000 
: firstStrip_ &= 0x7FFF;}


   // strip centers are offcet by half pitch w.r.t. strip numbers,
   // so one has to add 0.5 to get the correct barycenter position.
   // Need to mask off the high bit of firstStrip_, which contains the 
merged status.
   return float((firstStrip_ & 0x7FFF)) + float(sumx) / float(suma) + 0.5f;

Bill

On 11/12/2014 10:19 AM, mia tosi wrote:
> In DataFormats/SiStripCluster/interface/SiStripCluster.h:
>
>> @@ -33,7 +33,7 @@ class SiStripCluster  {
>>
>>    /** The number of the first strip in the cluster
>>     */
>> -  uint16_t firstStrip() const {return firstStrip_;}
>> +  uint16_t firstStrip() const {return firstStrip_ & 0x7FFF;}
>
> I'm sorry for this, but is it possible to add a comment which explains a
> little bit what stands for ?
> thanks much
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cms-sw/cmssw/pull/6349/files#r20234011>.
>