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,

That's right.  But in trying to implement Slava's suggested named 
constexpr quantities (I'm not familiar with the use of constexpr), in 
the header,

   static constexpr uint16_t stripIndexMask = 0x7FFF;  // The first 
strip index is in the low 15 bits of firstStrip_
   static constexpr uint16_t mergedValueMask = 0x8000;  // The merged 
state is given by the high bit of firstStrip_

I'm getting

error: ISO C++ forbids in-class initialization of non-const static 
member 'stripIndexMask'
(without "static" it seems to make it static, then give the above errror).

I could put the definitions inside the functions, but that would 
duplicate code and defeat the purpose I think.

It does seem to accept
   static const uint16_t stripIndexMask = 0x7FFF;  // The first strip 
index is in the low 15 bits of firstStrip_
   static const uint16_t mergedValueMask = 0x8000;  // The merged state 
is given by the high bit of firstStrip_

That's what I have at this point.

Bill

On 11/12/2014 12:20 PM, 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;}
>
> ok, given an object xy, w/ x=0 or 1 and y whatever
> & 0x7FFF --> return y, setting x to 0
> & 0x8000 --> return x, setting y to 0
> |= 0x8000 --> set x to 1, leaving y unchanged
> &= 0x7FFF --> set x to 0, leaving y unchanged
>
> right ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cms-sw/cmssw/pull/6349/files#r20242922>.
>