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 Andrea,

It appears to me that to getting the total number of strips in a sensor 
could be accomplished along the lines sketched here:

In SiStripClusterizer.h

#include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h"
#include "CalibTracker/Records/interface/SiStripDetCablingRcd.h"

void beginRun(const edm::Run& run, const edm::EventSetup& es ) override;
Declare a map(detId, Nstrips) NstripMap_;

In the .cc file

void SiStripClusterizer::beginRun(const edm::Run& run, const 
edm::EventSetup& es ) {
   edm::ESHandle<SiStripDetCabling> SiStripDetCabling;
   es.get<SiStripDetCablingRcd>().get( SiStripDetCabling);
   Loop over strip detIds {
     int Nstrips =  SiStripDetCabling.nAPvPairs(detId) * 2 * 128;
     fill NstripMap_
       }
}

(I suppose this could be under ESWatcher if it's worth while.)

Then in the existing refineCluster function we just have

int nchannideal = NstripMap(detId);

Do you see any gotchas with this?

(I'm assuming that EDProducer has a BeginRun().)

Bill

On 11/12/14 6:26 AM, venturia wrote:
> In RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.cc:
>
>> @@ -24,8 +31,18 @@ produce(edm::Event& event, const edm::EventSetup& es)  {
>>
>>    algorithm->initialize(es);
>>
>> +  edm::ESHandle<SiStripQuality> quality = 0;
>> +  SiStripDetInfoFileReader* reader = 0;
>> +  if (doRefineCluster_) {
>> +    es.get<SiStripQualityRcd>().get("", quality);
>
> I think that combining _properly_ the information from the cabling (ES
> object) and from SiStripQuality (ES object), it should be possible to
> achieve what is now done with SiStripDetInfoFileReader and
> SiStripQuality. But I acknowledge that it may require some quiet time to
> be sure that all the cases are handled correctly. Andrea On Nov 12,
> 2014, at 14:19 , Chris Jones
> <notifications@github.com<mailto:notifications@github.com>> wrote: In
> RecoLocalTracker/SiStripClusterizer/plugins/SiStripClusterizer.cc:
> @@ -24,8 +31,18 @@ produce(edm::Event& event, const edm::EventSetup& es)
> { algorithm->initialize(es); + edm::ESHandle<SiStripQuality> quality =
> 0; + SiStripDetInfoFileReader* reader = 0; + if (doRefineCluster_) { +
> es.get<SiStripQualityRcd>().get("", quality);
> @slava77 <https://github.com/slava77><https://github.com/slava77> as I
> stated in the previous pull request, I believe this to be an illegal use
> of a Service since it can modify the physics results. — Reply to this
> email directly or view it on
> GitHub<https://github.com/cms-sw/cmssw/pull/6349/files#r20217700>.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/cms-sw/cmssw/pull/6349/files#r20217984>.
>