csc bad channels handling in rechit building updated for unganged me11a

[Directed at  73X]. This updates CSC bad channel handling in local reco to allow extension to unganged ME11A channels. Amazingly tricky to do this because the extra channels are appended to the bad channels conditions data. At the same time I decided it was more sensible to change the way the bad channels data are handled. Until now, each time the conditions data changes, the bad channels information was unpacked and stored in a large vector - one 80-bit bitset for the 80 strip channels of each layer in the CSC system: there are 3240 layers in the system. There is also a 112-bitset for the possible bad wiregroups in each layer. However, with unganged ME11A instead of 80 strip channels, we'd have to increase to 64+48=112 bits for the bad strip channels too. So I've changed the approach so the bitsets for a given layer are filled only when that layer is being reconstructed. This saves on storage at the expense of computing time, which is basically trivial. This change is made in CSCConditions, a class in CalibMuon/CSCCalibration, which is our interface to CSC conditions data. There are NO changes to actual conditions data handling - just how the local reco accesses it once it is available. This is done in RecoLocalMuon/CSCRecHitD, where rechits are built. CSCConditions is also used in SimMuon/CSCDigitizer, but the bad channels part is NOT used there (since we don't know how to simulate bad channels even if we know somewhere in the complex change from detector element to read-out signal something is broken.) So there is NO change to Sim code. I added a new test analyzer for the bad channels handling in CSCRecHitD, called CSCRecoBadChannelsAnalyzer. This has a new config in CSCRecHitD/test. I also updated the sample config file for the rechit builder to 72X/73X level. This is run_on_raw_72X.py also in CSCRecHitD/test. I have run on 2500 events from a real data 2012 SingleMu raw relval sample and dumped all rechits built and find identical output for the new code and the old code. I have also run runTheMatrix.py -s --useInput all and this completes with no errors.
Just because I never did. Feel free to do so!

Tim
________________________________
From: StoyanStoynev [notifications@github.com]
Sent: 07 October 2014 11:26
To: cms-sw/cmssw
Cc: Tim Cox
Subject: Re: [cmssw] csc bad channels handling in rechit building updated for unganged me11a (#5713)


In CalibMuon/CSCCalibration/interface/CSCConditions.h:

> @@ -85,9 +85,20 @@ class CSCConditions
>    /// anode bx offset in bx given detId of chamber
>    float anodeBXoffset( const CSCDetId & detId) const;
>
> -  /// bad channel words per CSCLayer - 1 bit per channel
> -  const std::bitset<80>& badStripWord( const CSCDetId& id ) const;
> -  const std::bitset<112>& badWireWord( const CSCDetId& id ) const;
> +  /// bad strip channel word for a CSCLayer - 1 bit per channel
> +  const std::bitset<112>& badStripWord() const {


Why not defining (once) the 112 as a constant somewhere to be used from all the files. Apparently it is an important one.

—
Reply to this email directly or view it on GitHub<https://github.com/cms-sw/cmssw/pull/5713/files#r18508505>.