CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
CSCOfflineMonitor Class Reference

#include <CSCOfflineMonitor.h>

Inheritance diagram for CSCOfflineMonitor:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Types

enum  AxisType { X =1, Y =2, Z =3 }
 
enum  LabelType { SMALL, EXTENDED }
 
- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 CSCOfflineMonitor (const edm::ParameterSet &pset)
 
 ~CSCOfflineMonitor () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

void applyCSClabels (MonitorElement *meHisto, LabelType t, AxisType a)
 
int chamberSerial (CSCDetId id)
 
void doBXMonitor (edm::Handle< CSCALCTDigiCollection > alcts, edm::Handle< CSCCLCTDigiCollection > clcts, const edm::Event &event, const edm::EventSetup &eventSetup)
 
void doEfficiencies (edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
 
void doOccupancies (edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::Handle< CSCCLCTDigiCollection > clcts)
 
void doPedestalNoise (edm::Handle< CSCStripDigiCollection > strips, edm::ESHandle< CSCGeometry > cscGeom)
 
void doRecHits (edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCStripDigiCollection > strips, edm::ESHandle< CSCGeometry > cscGeom)
 
void doResolution (edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
 
void doSegments (edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
 
void doStripDigis (edm::Handle< CSCStripDigiCollection > strips)
 
void doWireDigis (edm::Handle< CSCWireDigiCollection > wires)
 
double extrapolate1D (double initPosition, double initDirection, double parameterOfTheLine)
 
void fillEfficiencyHistos (int bin, int flag)
 
float fitX (const CLHEP::HepMatrix &sp, const CLHEP::HepMatrix &ep)
 
float getSignal (const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip)
 
double lineParametrization (double z1Position, double z2Position, double z1Direction)
 
int typeIndex (CSCDetId id, int flag=1)
 
bool withinSensitiveRegion (LocalPoint localPos, const std::array< const float, 4 > &layerBounds, int station, int ring, float shiftFromEdge, float shiftFromDeadZone)
 

Private Attributes

edm::EDGetTokenT< CSCALCTDigiCollectional_token
 
edm::EDGetTokenT< CSCCLCTDigiCollectioncl_token
 
MonitorElementhALCTgetBX
 
MonitorElementhALCTgetBX2Denominator
 
MonitorElementhALCTgetBX2DNumerator
 
MonitorElementhALCTgetBXSerial
 
MonitorElementhALCTMatch
 
MonitorElementhALCTMatch2Denominator
 
MonitorElementhALCTMatch2DNumerator
 
MonitorElementhALCTMatchSerial
 
MonitorElementhCLCTL1A
 
MonitorElementhCLCTL1A2Denominator
 
MonitorElementhCLCTL1A2DNumerator
 
MonitorElementhCLCTL1ASerial
 
MonitorElementhCSCOccupancy
 
MonitorElementhEffDenominator
 
MonitorElementhORecHits
 
MonitorElementhORecHitsSerial
 
MonitorElementhOSegments
 
MonitorElementhOSegmentsSerial
 
MonitorElementhOStrips
 
MonitorElementhOStripsAndWiresAndCLCT
 
MonitorElementhOStripSerial
 
MonitorElementhOWires
 
MonitorElementhOWiresAndCLCT
 
MonitorElementhOWireSerial
 
MonitorElementhRHden
 
std::vector< MonitorElement * > hRHGlobal
 
MonitorElementhRHnrechits
 
MonitorElementhRHnum
 
std::vector< MonitorElement * > hRHRatioQ
 
MonitorElementhRHSTE2
 
std::vector< MonitorElement * > hRHsterr
 
std::vector< MonitorElement * > hRHstpos
 
std::vector< MonitorElement * > hRHSumQ
 
std::vector< MonitorElement * > hRHTiming
 
std::vector< MonitorElement * > hRHTimingAnode
 
std::vector< MonitorElement * > hSChiSq
 
MonitorElementhSChiSqAll
 
std::vector< MonitorElement * > hSChiSqProb
 
MonitorElementhSChiSqProbAll
 
MonitorElementhSden
 
MonitorElementhSensitiveAreaEvt
 
MonitorElementhSGlobalPhi
 
MonitorElementhSGlobalTheta
 
std::vector< MonitorElement * > hSnhits
 
MonitorElementhSnhitsAll
 
MonitorElementhSnSegments
 
MonitorElementhSnum
 
std::vector< MonitorElement * > hSResid
 
MonitorElementhSSTE2
 
MonitorElementhSTimeAnode
 
std::vector< MonitorElement * > hSTimeAnodeByChamberType
 
MonitorElementhSTimeAnodeSerial
 
MonitorElementhSTimeCathode
 
std::vector< MonitorElement * > hSTimeCathodeByChamberType
 
MonitorElementhSTimeCathodeSerial
 
MonitorElementhSTimeCombined
 
std::vector< MonitorElement * > hSTimeCombinedByChamberType
 
MonitorElementhSTimeCombinedSerial
 
MonitorElementhSTimeDiff
 
std::vector< MonitorElement * > hSTimeDiffByChamberType
 
MonitorElementhSTimeDiffSerial
 
MonitorElementhSTimeVsTOF
 
MonitorElementhSTimeVsZ
 
MonitorElementhStripNFired
 
std::vector< MonitorElement * > hStripNumber
 
std::vector< MonitorElement * > hStripPed
 
MonitorElementhStripSTE2
 
MonitorElementhWirenGroupsTotal
 
std::vector< MonitorElement * > hWireNumber
 
MonitorElementhWireSTE2
 
std::vector< MonitorElement * > hWireTBin
 
edm::ParameterSet param
 
edm::EDGetTokenT< FEDRawDataCollectionrd_token
 
edm::EDGetTokenT< CSCRecHit2DCollectionrh_token
 
edm::EDGetTokenT< CSCStripDigiCollectionsd_token
 
edm::EDGetTokenT< CSCSegmentCollectionse_token
 
edm::EDGetTokenT< CSCWireDigiCollectionwd_token
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Simple package for offline CSC DQM based on RecoLocalMuon/CSCValidation: digis, rechits, segments

Andrew Kubik, Northwestern University, Oct 2008

Definition at line 72 of file CSCOfflineMonitor.h.

Member Enumeration Documentation

Enumerator

Definition at line 80 of file CSCOfflineMonitor.h.

Enumerator
SMALL 
EXTENDED 

Definition at line 79 of file CSCOfflineMonitor.h.

Constructor & Destructor Documentation

CSCOfflineMonitor::CSCOfflineMonitor ( const edm::ParameterSet pset)

Definition at line 13 of file CSCOfflineMonitor.cc.

References edm::ParameterSet::getParameter().

14 {
15 
16  rd_token = consumes<FEDRawDataCollection>( pset.getParameter<edm::InputTag>("FEDRawDataCollectionTag") );
17  sd_token = consumes<CSCStripDigiCollection>( pset.getParameter<edm::InputTag>("stripDigiTag") );
18  wd_token = consumes<CSCWireDigiCollection>( pset.getParameter<edm::InputTag>("wireDigiTag") );
19  al_token = consumes<CSCALCTDigiCollection>( pset.getParameter<edm::InputTag>("alctDigiTag") );
20  cl_token = consumes<CSCCLCTDigiCollection>( pset.getParameter<edm::InputTag>("clctDigiTag") );
21  rh_token = consumes<CSCRecHit2DCollection>( pset.getParameter<edm::InputTag>("cscRecHitTag") );
22  se_token = consumes<CSCSegmentCollection>( pset.getParameter<edm::InputTag>("cscSegTag") );
23 
24 }
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
T getParameter(std::string const &) const
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
edm::EDGetTokenT< FEDRawDataCollection > rd_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
edm::EDGetTokenT< CSCSegmentCollection > se_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
CSCOfflineMonitor::~CSCOfflineMonitor ( )
inlineoverride

Definition at line 77 of file CSCOfflineMonitor.h.

77 { };

Member Function Documentation

void CSCOfflineMonitor::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overrideprotected

Definition at line 564 of file CSCOfflineMonitor.cc.

References cscSegments_cfi::cscSegments, edm::EventSetup::get(), RecoTauPiZeroBuilderPlugins_cfi::strips, and muonCSCDigis_cfi::wires.

564  {
565 
570  event.getByToken( sd_token, strips );
571  event.getByToken( wd_token, wires );
572  event.getByToken( al_token, alcts );
573  event.getByToken( cl_token, clcts );
574 
575  // Get the CSC Geometry :
577  eventSetup.get<MuonGeometryRecord>().get(cscGeom);
578 
579  // Get the RecHits collection :
581  event.getByToken( rh_token, recHits );
582 
583  // get CSC segment collection
585  event.getByToken( se_token, cscSegments );
586 
587  doOccupancies(strips,wires,recHits,cscSegments,clcts);
588  doStripDigis(strips);
589  doWireDigis(wires);
590  doRecHits(recHits,strips,cscGeom);
591  doSegments(cscSegments,cscGeom);
592  doResolution(cscSegments,cscGeom);
593  doPedestalNoise(strips, cscGeom);
594  doEfficiencies(wires,strips, recHits, cscSegments,cscGeom);
595  doBXMonitor(alcts, clcts, event, eventSetup);
596 }
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
void doResolution(edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
edm::EDGetTokenT< CSCSegmentCollection > se_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
void doSegments(edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
void doWireDigis(edm::Handle< CSCWireDigiCollection > wires)
const T & get() const
Definition: EventSetup.h:55
void doBXMonitor(edm::Handle< CSCALCTDigiCollection > alcts, edm::Handle< CSCCLCTDigiCollection > clcts, const edm::Event &event, const edm::EventSetup &eventSetup)
void doStripDigis(edm::Handle< CSCStripDigiCollection > strips)
void doPedestalNoise(edm::Handle< CSCStripDigiCollection > strips, edm::ESHandle< CSCGeometry > cscGeom)
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
void doEfficiencies(edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
void doOccupancies(edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::Handle< CSCCLCTDigiCollection > clcts)
void doRecHits(edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCStripDigiCollection > strips, edm::ESHandle< CSCGeometry > cscGeom)
void CSCOfflineMonitor::applyCSClabels ( MonitorElement meHisto,
LabelType  t,
AxisType  a 
)
private

Definition at line 1904 of file CSCOfflineMonitor.cc.

References DEFINE_FWK_MODULE, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and SMALL.

1904  {
1905  if (me != nullptr)
1906  {
1907  me->setAxisTitle("Chamber #");
1908  if (t == EXTENDED)
1909  {
1910  me->setBinLabel(1,"ME -4/2",a);
1911  me->setBinLabel(2,"ME -4/1",a);
1912  me->setBinLabel(3,"ME -3/2",a);
1913  me->setBinLabel(4,"ME -3/1",a);
1914  me->setBinLabel(5,"ME -2/2",a);
1915  me->setBinLabel(6,"ME -2/1",a);
1916  me->setBinLabel(7,"ME -1/3",a);
1917  me->setBinLabel(8,"ME -1/2",a);
1918  me->setBinLabel(9,"ME -1/1b",a);
1919  me->setBinLabel(10,"ME -1/1a",a);
1920  me->setBinLabel(11,"ME +1/1a",a);
1921  me->setBinLabel(12,"ME +1/1b",a);
1922  me->setBinLabel(13,"ME +1/2",a);
1923  me->setBinLabel(14,"ME +1/3",a);
1924  me->setBinLabel(15,"ME +2/1",a);
1925  me->setBinLabel(16,"ME +2/2",a);
1926  me->setBinLabel(17,"ME +3/1",a);
1927  me->setBinLabel(18,"ME +3/2",a);
1928  me->setBinLabel(19,"ME +4/1",a);
1929  me->setBinLabel(20,"ME +4/2",a);
1930  }
1931  else if (t == SMALL)
1932  {
1933  me->setBinLabel(1,"ME -4/1",a);
1934  me->setBinLabel(2,"ME -3/2",a);
1935  me->setBinLabel(3,"ME -3/1",a);
1936  me->setBinLabel(4,"ME -2/2",a);
1937  me->setBinLabel(5,"ME -2/1",a);
1938  me->setBinLabel(6,"ME -1/3",a);
1939  me->setBinLabel(7,"ME -1/2",a);
1940  me->setBinLabel(8,"ME -1/1b",a);
1941  me->setBinLabel(9,"ME -1/1a",a);
1942  me->setBinLabel(10,"ME +1/1a",a);
1943  me->setBinLabel(11,"ME +1/1b",a);
1944  me->setBinLabel(12,"ME +1/2",a);
1945  me->setBinLabel(13,"ME +1/3",a);
1946  me->setBinLabel(14,"ME +2/1",a);
1947  me->setBinLabel(15,"ME +2/2",a);
1948  me->setBinLabel(16,"ME +3/1",a);
1949  me->setBinLabel(17,"ME +3/2",a);
1950  me->setBinLabel(18,"ME +4/1",a);
1951  }
1952  }
1953 }
double a
Definition: hdecay.h:121
void CSCOfflineMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 26 of file CSCOfflineMonitor.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::cd(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), X, and DOFs::Y.

29 {
30  // occupancies
31  ibooker.cd();
32  ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/Occupancy");
33 
34  hCSCOccupancy = ibooker.book1D("hCSCOccupancy","overall CSC occupancy",13,-0.5,12.5);
35  hCSCOccupancy->setBinLabel(2,"Total Events");
36  hCSCOccupancy->setBinLabel(4,"# Events with Wires");
37  hCSCOccupancy->setBinLabel(6,"# Events with Strips");
38  hCSCOccupancy->setBinLabel(8,"# Events with Wires&Strips");
39  hCSCOccupancy->setBinLabel(10,"# Events with Rechits");
40  hCSCOccupancy->setBinLabel(12,"# Events with Segments");
41  hOWiresAndCLCT = ibooker.book2D("hOWiresAndCLCT","Wire and CLCT Digi Occupancy ",36,0.5,36.5,20,0.5,20.5);
42  hOWires = ibooker.book2D("hOWires","Wire Digi Occupancy",36,0.5,36.5,20,0.5,20.5);
43  hOWireSerial = ibooker.book1D("hOWireSerial","Wire Occupancy by Chamber Serial",601,-0.5,600.5);
44  hOWireSerial->setAxisTitle("Chamber Serial Number");
45  hOStrips = ibooker.book2D("hOStrips","Strip Digi Occupancy",36,0.5,36.5,20,0.5,20.5);
46  hOStripSerial = ibooker.book1D("hOStripSerial","Strip Occupancy by Chamber Serial",601,-0.5,600.5);
47  hOStripSerial->setAxisTitle("Chamber Serial Number");
48  hOStripsAndWiresAndCLCT = ibooker.book2D("hOStripsAndWiresAndCLCT","Strip And Wire And CLCT Digi Occupancy",36,0.5,36.5,20,0.5,20.5);
50  hORecHits = ibooker.book2D("hORecHits","RecHit Occupancy",36,0.5,36.5,20,0.5,20.5);
51  hORecHitsSerial = ibooker.book1D("hORecHitSerial","RecHit Occupancy by Chamber Serial",601,-0.5,600.5);
52  hORecHitsSerial->setAxisTitle("Chamber Serial Number");
53  hOSegments = ibooker.book2D("hOSegments","Segment Occupancy",36,0.5,36.5,20,0.5,20.5);
54  hOSegmentsSerial = ibooker.book1D("hOSegmentSerial","Segment Occupancy by Chamber Serial",601,-0.5,600.5);
55  hOSegmentsSerial->setAxisTitle("Chamber Serial Number");
56 
57  // wire digis
58  ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/Digis");
59 
60  hWirenGroupsTotal = ibooker.book1D("hWirenGroupsTotal","Fired Wires per Event; # Wiregroups Fired",500,-0.5,499.5);
61  hWireTBin.push_back(ibooker.book1D("hWireTBin_m42","Wire TBin Fired (ME -4/2); Time Bin (25ns)",17,-0.5,16.5));
62  hWireTBin.push_back(ibooker.book1D("hWireTBin_m41","Wire TBin Fired (ME -4/1); Time Bin (25ns)",17,-0.5,16.5));
63  hWireTBin.push_back(ibooker.book1D("hWireTBin_m32","Wire TBin Fired (ME -3/2); Time Bin (25ns)",17,-0.5,16.5));
64  hWireTBin.push_back(ibooker.book1D("hWireTBin_m31","Wire TBin Fired (ME -3/1); Time Bin (25ns)",17,-0.5,16.5));
65  hWireTBin.push_back(ibooker.book1D("hWireTBin_m22","Wire TBin Fired (ME -2/2); Time Bin (25ns)",17,-0.5,16.5));
66  hWireTBin.push_back(ibooker.book1D("hWireTBin_m21","Wire TBin Fired (ME -2/1); Time Bin (25ns)",17,-0.5,16.5));
67  hWireTBin.push_back(ibooker.book1D("hWireTBin_m11a","Wire TBin Fired (ME -1/1a); Time Bin (25ns)",17,-0.5,16.5));
68  hWireTBin.push_back(ibooker.book1D("hWireTBin_m13","Wire TBin Fired (ME -1/3); Time Bin (25ns)",17,-0.5,16.5));
69  hWireTBin.push_back(ibooker.book1D("hWireTBin_m12","Wire TBin Fired (ME -1/2); Time Bin (25ns)",17,-0.5,16.5));
70  hWireTBin.push_back(ibooker.book1D("hWireTBin_m11b","Wire TBin Fired (ME -1/1b); Time Bin (25ns)",17,-0.5,16.5));
71  hWireTBin.push_back(ibooker.book1D("hWireTBin_p11b","Wire TBin Fired (ME +1/1b); Time Bin (25ns)",17,-0.5,16.5));
72  hWireTBin.push_back(ibooker.book1D("hWireTBin_p12","Wire TBin Fired (ME +1/2); Time Bin (25ns)",17,-0.5,16.5));
73  hWireTBin.push_back(ibooker.book1D("hWireTBin_p13","Wire TBin Fired (ME +1/3); Time Bin (25ns)",17,-0.5,16.5));
74  hWireTBin.push_back(ibooker.book1D("hWireTBin_p11a","Wire TBin Fired (ME +1/1a); Time Bin (25ns)",17,-0.5,16.5));
75  hWireTBin.push_back(ibooker.book1D("hWireTBin_p21","Wire TBin Fired (ME +2/1); Time Bin (25ns)",17,-0.5,16.5));
76  hWireTBin.push_back(ibooker.book1D("hWireTBin_p22","Wire TBin Fired (ME +2/2); Time Bin (25ns)",17,-0.5,16.5));
77  hWireTBin.push_back(ibooker.book1D("hWireTBin_p31","Wire TBin Fired (ME +3/1); Time Bin (25ns)",17,-0.5,16.5));
78  hWireTBin.push_back(ibooker.book1D("hWireTBin_p32","Wire TBin Fired (ME +3/2); Time Bin (25ns)",17,-0.5,16.5));
79  hWireTBin.push_back(ibooker.book1D("hWireTBin_p41","Wire TBin Fired (ME +4/1); Time Bin (25ns)",17,-0.5,16.5));
80  hWireTBin.push_back(ibooker.book1D("hWireTBin_p42","Wire TBin Fired (ME +4/2); Time Bin (25ns)",17,-0.5,16.5));
81  hWireNumber.push_back(ibooker.book1D("hWireNumber_m42","Wiregroup Number Fired (ME -4/2); Wiregroup #",113,-0.5,112.5));
82  hWireNumber.push_back(ibooker.book1D("hWireNumber_m41","Wiregroup Number Fired (ME -4/1); Wiregroup #",113,-0.5,112.5));
83  hWireNumber.push_back(ibooker.book1D("hWireNumber_m32","Wiregroup Number Fired (ME -3/2); Wiregroup #",113,-0.5,112.5));
84  hWireNumber.push_back(ibooker.book1D("hWireNumber_m31","Wiregroup Number Fired (ME -3/1); Wiregroup #",113,-0.5,112.5));
85  hWireNumber.push_back(ibooker.book1D("hWireNumber_m22","Wiregroup Number Fired (ME -2/2); Wiregroup #",113,-0.5,112.5));
86  hWireNumber.push_back(ibooker.book1D("hWireNumber_m21","Wiregroup Number Fired (ME -2/1); Wiregroup #",113,-0.5,112.5));
87  hWireNumber.push_back(ibooker.book1D("hWireNumber_m11a","Wiregroup Number Fired (ME -1/1a); Wiregroup #",113,-0.5,112.5));
88  hWireNumber.push_back(ibooker.book1D("hWireNumber_m13","Wiregroup Number Fired (ME -1/3); Wiregroup #",113,-0.5,112.5));
89  hWireNumber.push_back(ibooker.book1D("hWireNumber_m12","Wiregroup Number Fired (ME -1/2); Wiregroup #",113,-0.5,112.5));
90  hWireNumber.push_back(ibooker.book1D("hWireNumber_m11b","Wiregroup Number Fired (ME -1/1b); Wiregroup #",113,-0.5,112.5));
91  hWireNumber.push_back(ibooker.book1D("hWireNumber_p11b","Wiregroup Number Fired (ME +1/1b); Wiregroup #",113,-0.5,112.5));
92  hWireNumber.push_back(ibooker.book1D("hWireNumber_p12","Wiregroup Number Fired (ME +1/2); Wiregroup #",113,-0.5,112.5));
93  hWireNumber.push_back(ibooker.book1D("hWireNumber_p13","Wiregroup Number Fired (ME +1/3); Wiregroup #",113,-0.5,112.5));
94  hWireNumber.push_back(ibooker.book1D("hWireNumber_p11a","Wiregroup Number Fired (ME +1/1a); Wiregroup #",113,-0.5,112.5));
95  hWireNumber.push_back(ibooker.book1D("hWireNumber_p21","Wiregroup Number Fired (ME +2/1); Wiregroup #",113,-0.5,112.5));
96  hWireNumber.push_back(ibooker.book1D("hWireNumber_p22","Wiregroup Number Fired (ME +2/2); Wiregroup #",113,-0.5,112.5));
97  hWireNumber.push_back(ibooker.book1D("hWireNumber_p31","Wiregroup Number Fired (ME +3/1); Wiregroup #",113,-0.5,112.5));
98  hWireNumber.push_back(ibooker.book1D("hWireNumber_p32","Wiregroup Number Fired (ME +3/2); Wiregroup #",113,-0.5,112.5));
99  hWireNumber.push_back(ibooker.book1D("hWireNumber_p41","Wiregroup Number Fired (ME +4/1); Wiregroup #",113,-0.5,112.5));
100  hWireNumber.push_back(ibooker.book1D("hWireNumber_p42","Wiregroup Number Fired (ME +4/2); Wiregroup #",113,-0.5,112.5));
101 
102  // strip digis
103  hStripNFired = ibooker.book1D("hStripNFired","Fired Strips per Event; # Strips Fired (above 13 ADC)",1000,-0.5,999.5);
104  hStripNumber.push_back(ibooker.book1D("hStripNumber_m42","Strip Number Fired (ME -4/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
105  hStripNumber.push_back(ibooker.book1D("hStripNumber_m41","Strip Number Fired (ME -4/1); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
106  hStripNumber.push_back(ibooker.book1D("hStripNumber_m32","Strip Number Fired (ME -3/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
107  hStripNumber.push_back(ibooker.book1D("hStripNumber_m31","Strip Number Fired (ME -3/1); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
108  hStripNumber.push_back(ibooker.book1D("hStripNumber_m22","Strip Number Fired (ME -2/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
109  hStripNumber.push_back(ibooker.book1D("hStripNumber_m21","Strip Number Fired (ME -2/1); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
110  hStripNumber.push_back(ibooker.book1D("hStripNumber_m11a","Strip Number Fired (ME -1/1a); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
111  hStripNumber.push_back(ibooker.book1D("hStripNumber_m13","Strip Number Fired (ME -1/3); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
112  hStripNumber.push_back(ibooker.book1D("hStripNumber_m12","Strip Number Fired (ME -1/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
113  hStripNumber.push_back(ibooker.book1D("hStripNumber_m11b","Strip Number Fired (ME -1/1b); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
114  hStripNumber.push_back(ibooker.book1D("hStripNumber_p11b","Strip Number Fired (ME +1/1b); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
115  hStripNumber.push_back(ibooker.book1D("hStripNumber_p12","Strip Number Fired (ME +1/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
116  hStripNumber.push_back(ibooker.book1D("hStripNumber_p13","Strip Number Fired (ME +1/3); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
117  hStripNumber.push_back(ibooker.book1D("hStripNumber_p11a","Strip Number Fired (ME +1/1a); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
118  hStripNumber.push_back(ibooker.book1D("hStripNumber_p21","Strip Number Fired (ME +2/1); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
119  hStripNumber.push_back(ibooker.book1D("hStripNumber_p22","Strip Number Fired (ME +2/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
120  hStripNumber.push_back(ibooker.book1D("hStripNumber_p31","Strip Number Fired (ME +3/1); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
121  hStripNumber.push_back(ibooker.book1D("hStripNumber_p32","Strip Number Fired (ME +3/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
122  hStripNumber.push_back(ibooker.book1D("hStripNumber_p41","Strip Number Fired (ME +4/1); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
123  hStripNumber.push_back(ibooker.book1D("hStripNumber_p42","Stripgroup Number Fired (ME +4/2); Strip # Fired (above 13 ADC)",81,-0.5,80.5));
124 
125  // pedestal noise
126  ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/PedestalNoise");
127 
128  hStripPed.push_back(ibooker.book1D("hStripPedMEm42","Pedestal Noise Distribution Chamber ME -4/2; ADC Counts",50,-25.,25.));
129  hStripPed.push_back(ibooker.book1D("hStripPedMEm41","Pedestal Noise Distribution Chamber ME -4/1; ADC Counts",50,-25.,25.));
130  hStripPed.push_back(ibooker.book1D("hStripPedMEm32","Pedestal Noise Distribution Chamber ME -3/2; ADC Counts",50,-25.,25.));
131  hStripPed.push_back(ibooker.book1D("hStripPedMEm31","Pedestal Noise Distribution Chamber ME -3/1; ADC Counts",50,-25.,25.));
132  hStripPed.push_back(ibooker.book1D("hStripPedMEm22","Pedestal Noise Distribution Chamber ME -2/2; ADC Counts",50,-25.,25.));
133  hStripPed.push_back(ibooker.book1D("hStripPedMEm21","Pedestal Noise Distribution Chamber ME -2/1; ADC Counts",50,-25.,25.));
134  hStripPed.push_back(ibooker.book1D("hStripPedMEm11a","Pedestal Noise Distribution Chamber ME -1/1; ADC Counts",50,-25.,25.));
135  hStripPed.push_back(ibooker.book1D("hStripPedMEm13","Pedestal Noise Distribution Chamber ME -1/3; ADC Counts",50,-25.,25.));
136  hStripPed.push_back(ibooker.book1D("hStripPedMEm12","Pedestal Noise Distribution Chamber ME -1/2; ADC Counts",50,-25.,25.));
137  hStripPed.push_back(ibooker.book1D("hStripPedMEm11b","Pedestal Noise Distribution Chamber ME -1/1; ADC Counts",50,-25.,25.));
138  hStripPed.push_back(ibooker.book1D("hStripPedMEp11b","Pedestal Noise Distribution Chamber ME +1/1; ADC Counts",50,-25.,25.));
139  hStripPed.push_back(ibooker.book1D("hStripPedMEp12","Pedestal Noise Distribution Chamber ME +1/2; ADC Counts",50,-25.,25.));
140  hStripPed.push_back(ibooker.book1D("hStripPedMEp13","Pedestal Noise Distribution Chamber ME +1/3; ADC Counts",50,-25.,25.));
141  hStripPed.push_back(ibooker.book1D("hStripPedMEp11a","Pedestal Noise Distribution Chamber ME +1/1; ADC Counts",50,-25.,25.));
142  hStripPed.push_back(ibooker.book1D("hStripPedMEp21","Pedestal Noise Distribution Chamber ME +2/1; ADC Counts",50,-25.,25.));
143  hStripPed.push_back(ibooker.book1D("hStripPedMEp22","Pedestal Noise Distribution Chamber ME +2/2; ADC Counts",50,-25.,25.));
144  hStripPed.push_back(ibooker.book1D("hStripPedMEp31","Pedestal Noise Distribution Chamber ME +3/1; ADC Counts",50,-25.,25.));
145  hStripPed.push_back(ibooker.book1D("hStripPedMEp32","Pedestal Noise Distribution Chamber ME +3/2; ADC Counts",50,-25.,25.));
146  hStripPed.push_back(ibooker.book1D("hStripPedMEp41","Pedestal Noise Distribution Chamber ME +4/1; ADC Counts",50,-25.,25.));
147  hStripPed.push_back(ibooker.book1D("hStripPedMEp42","Pedestal Noise Distribution Chamber ME +4/2; ADC Counts",50,-25.,25.));
148 
149  // rechits
150  ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/recHits");
151 
152  hRHnrechits = ibooker.book1D("hRHnrechits","recHits per Event (all chambers); # of RecHits",500,-0.50,499.5);
153  hRHGlobal.push_back(ibooker.book2D("hRHGlobalp1","recHit global X,Y station +1; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
154  hRHGlobal.push_back(ibooker.book2D("hRHGlobalp2","recHit global X,Y station +2; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
155  hRHGlobal.push_back(ibooker.book2D("hRHGlobalp3","recHit global X,Y station +3; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
156  hRHGlobal.push_back(ibooker.book2D("hRHGlobalp4","recHit global X,Y station +4; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
157  hRHGlobal.push_back(ibooker.book2D("hRHGlobalm1","recHit global X,Y station -1; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
158  hRHGlobal.push_back(ibooker.book2D("hRHGlobalm2","recHit global X,Y station -2; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
159  hRHGlobal.push_back(ibooker.book2D("hRHGlobalm3","recHit global X,Y station -3; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
160  hRHGlobal.push_back(ibooker.book2D("hRHGlobalm4","recHit global X,Y station -4; Global X (cm); Global Y (cm)",100,-800.,800.,100,-800.,800.));
161  hRHSumQ.push_back(ibooker.book1D("hRHSumQm42","Sum 3x3 recHit Charge (ME -4/2); ADC counts",100,0,2000));
162  hRHSumQ.push_back(ibooker.book1D("hRHSumQm41","Sum 3x3 recHit Charge (ME -4/1); ADC counts",100,0,2000));
163  hRHSumQ.push_back(ibooker.book1D("hRHSumQm32","Sum 3x3 recHit Charge (ME -3/2); ADC counts",100,0,2000));
164  hRHSumQ.push_back(ibooker.book1D("hRHSumQm31","Sum 3x3 recHit Charge (ME -3/1); ADC counts",100,0,2000));
165  hRHSumQ.push_back(ibooker.book1D("hRHSumQm22","Sum 3x3 recHit Charge (ME -2/2); ADC counts",100,0,2000));
166  hRHSumQ.push_back(ibooker.book1D("hRHSumQm21","Sum 3x3 recHit Charge (ME -2/1); ADC counts",100,0,2000));
167  hRHSumQ.push_back(ibooker.book1D("hRHSumQm11a","Sum 3x3 recHit Charge (ME -1/1a); ADC counts",100,0,4000));
168  hRHSumQ.push_back(ibooker.book1D("hRHSumQm13","Sum 3x3 recHit Charge (ME -1/3); ADC counts",100,0,2000));
169  hRHSumQ.push_back(ibooker.book1D("hRHSumQm12","Sum 3x3 recHit Charge (ME -1/2); ADC counts",100,0,2000));
170  hRHSumQ.push_back(ibooker.book1D("hRHSumQm11b","Sum 3x3 recHit Charge (ME -1/1b); ADC counts",100,0,4000));
171  hRHSumQ.push_back(ibooker.book1D("hRHSumQp11b","Sum 3x3 recHit Charge (ME +1/1b); ADC counts",100,0,4000));
172  hRHSumQ.push_back(ibooker.book1D("hRHSumQp12","Sum 3x3 recHit Charge (ME +1/2); ADC counts",100,0,2000));
173  hRHSumQ.push_back(ibooker.book1D("hRHSumQp13","Sum 3x3 recHit Charge (ME +1/3); ADC counts",100,0,2000));
174  hRHSumQ.push_back(ibooker.book1D("hRHSumQp11a","Sum 3x3 recHit Charge (ME +1/1a); ADC counts",100,0,4000));
175  hRHSumQ.push_back(ibooker.book1D("hRHSumQp21","Sum 3x3 recHit Charge (ME +2/1); ADC counts",100,0,2000));
176  hRHSumQ.push_back(ibooker.book1D("hRHSumQp22","Sum 3x3 recHit Charge (ME +2/2); ADC counts",100,0,2000));
177  hRHSumQ.push_back(ibooker.book1D("hRHSumQp31","Sum 3x3 recHit Charge (ME +3/1); ADC counts",100,0,2000));
178  hRHSumQ.push_back(ibooker.book1D("hRHSumQp32","Sum 3x3 recHit Charge (ME +3/2); ADC counts",100,0,2000));
179  hRHSumQ.push_back(ibooker.book1D("hRHSumQp41","Sum 3x3 recHit Charge (ME +4/1); ADC counts",100,0,2000));
180  hRHSumQ.push_back(ibooker.book1D("hRHSumQp42","Sum 3x3 recHit Charge (ME +4/2); ADC counts",100,0,2000));
181  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm42","Charge Ratio (Ql+Qr)/Qt (ME -4/2); (Ql+Qr)/Qt",100,-0.1,1.1));
182  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm41","Charge Ratio (Ql+Qr)/Qt (ME -4/1); (Ql+Qr)/Qt",100,-0.1,1.1));
183  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm32","Charge Ratio (Ql+Qr)/Qt (ME -3/2); (Ql+Qr)/Qt",100,-0.1,1.1));
184  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm31","Charge Ratio (Ql+Qr)/Qt (ME -3/1); (Ql+Qr)/Qt",100,-0.1,1.1));
185  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm22","Charge Ratio (Ql+Qr)/Qt (ME -2/2); (Ql+Qr)/Qt",100,-0.1,1.1));
186  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm21","Charge Ratio (Ql+Qr)/Qt (ME -2/1); (Ql+Qr)/Qt",100,-0.1,1.1));
187  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm11a","Charge Ratio (Ql+Qr)/Qt (ME -1/1a); (Ql+Qr)/Qt",100,-0.1,1.1));
188  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm13","Charge Ratio (Ql+Qr)/Qt (ME -1/3); (Ql+Qr)/Qt",100,-0.1,1.1));
189  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm12","Charge Ratio (Ql+Qr)/Qt (ME -1/2); (Ql+Qr)/Qt",100,-0.1,1.1));
190  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQm11b","Charge Ratio (Ql+Qr)/Qt (ME -1/1b); (Ql+Qr)/Qt",100,-0.1,1.1));
191  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp11b","Charge Ratio (Ql+Qr)/Qt (ME +1/1b); (Ql+Qr)/Qt",100,-0.1,1.1));
192  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp12","Charge Ratio (Ql+Qr)/Qt (ME +1/2); (Ql+Qr)/Qt",100,-0.1,1.1));
193  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp13","Charge Ratio (Ql+Qr)/Qt (ME +1/3); (Ql+Qr)/Qt",100,-0.1,1.1));
194  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp11a","Charge Ratio (Ql+Qr)/Qt (ME +1/1a); (Ql+Qr)/Qt",100,-0.1,1.1));
195  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp21","Charge Ratio (Ql+Qr)/Qt (ME +2/1); (Ql+Qr)/Qt",100,-0.1,1.1));
196  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp22","Charge Ratio (Ql+Qr)/Qt (ME +2/2); (Ql+Qr)/Qt",100,-0.1,1.1));
197  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp31","Charge Ratio (Ql+Qr)/Qt (ME +3/1); (Ql+Qr)/Qt",100,-0.1,1.1));
198  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp32","Charge Ratio (Ql+Qr)/Qt (ME +3/2); (Ql+Qr)/Qt",100,-0.1,1.1));
199  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp41","Charge Ratio (Ql+Qr)/Qt (ME +4/1); (Ql+Qr)/Qt",100,-0.1,1.1));
200  hRHRatioQ.push_back(ibooker.book1D("hRHRatioQp42","Charge Ratio (Ql+Qr)/Qt (ME +4/2); (Ql+Qr)/Qt",100,-0.1,1.1));
201  hRHTiming.push_back(ibooker.book1D("hRHTimingm42","recHit Time (ME -4/2); ns",200,-500.,500.));
202  hRHTiming.push_back(ibooker.book1D("hRHTimingm41","recHit Time (ME -4/1); ns",200,-500.,500.));
203  hRHTiming.push_back(ibooker.book1D("hRHTimingm32","recHit Time (ME -3/2); ns",200,-500.,500.));
204  hRHTiming.push_back(ibooker.book1D("hRHTimingm31","recHit Time (ME -3/1); ns",200,-500.,500.));
205  hRHTiming.push_back(ibooker.book1D("hRHTimingm22","recHit Time (ME -2/2); ns",200,-500.,500.));
206  hRHTiming.push_back(ibooker.book1D("hRHTimingm21","recHit Time (ME -2/1); ns",200,-500.,500.));
207  hRHTiming.push_back(ibooker.book1D("hRHTimingm11a","recHit Time (ME -1/1a); ns",200,-500.,500.));
208  hRHTiming.push_back(ibooker.book1D("hRHTimingm13","recHit Time (ME -1/3); ns",200,-500.,500.));
209  hRHTiming.push_back(ibooker.book1D("hRHTimingm12","recHit Time (ME -1/2); ns",200,-500.,500.));
210  hRHTiming.push_back(ibooker.book1D("hRHTimingm11b","recHit Time (ME -1/1b); ns",200,-500.,500.));
211  hRHTiming.push_back(ibooker.book1D("hRHTimingp11b","recHit Time (ME +1/1b); ns",200,-500.,500.));
212  hRHTiming.push_back(ibooker.book1D("hRHTimingp12","recHit Time (ME +1/2); ns",200,-500.,500.));
213  hRHTiming.push_back(ibooker.book1D("hRHTimingp13","recHit Time (ME +1/3); ns",200,-500.,500.));
214  hRHTiming.push_back(ibooker.book1D("hRHTimingp11a","recHit Time (ME +1/1a); ns",200,-500.,500.));
215  hRHTiming.push_back(ibooker.book1D("hRHTimingp21","recHit Time (ME +2/1); ns",200,-500.,500.));
216  hRHTiming.push_back(ibooker.book1D("hRHTimingp22","recHit Time (ME +2/2); ns",200,-500.,500.));
217  hRHTiming.push_back(ibooker.book1D("hRHTimingp31","recHit Time (ME +3/1); ns",200,-500.,500.));
218  hRHTiming.push_back(ibooker.book1D("hRHTimingp32","recHit Time (ME +3/2); ns",200,-500.,500.));
219  hRHTiming.push_back(ibooker.book1D("hRHTimingp41","recHit Time (ME +4/1); ns",200,-500.,500.));
220  hRHTiming.push_back(ibooker.book1D("hRHTimingp42","recHit Time (ME +4/2); ns",200,-500.,500.));
221  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem42","Anode recHit Time (ME -4/2); ns",80,-500.,500.));
222  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem41","Anode recHit Time (ME -4/1); ns",80,-500.,500.));
223  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem32","Anode recHit Time (ME -3/2); ns",80,-500.,500.));
224  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem31","Anode recHit Time (ME -3/1); ns",80,-500.,500.));
225  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem22","Anode recHit Time (ME -2/2); ns",80,-500.,500.));
226  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem21","Anode recHit Time (ME -2/1); ns",80,-500.,500.));
227  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem11a","Anode recHit Time (ME -1/1a); ns",80,-500.,500.));
228  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem13","Anode recHit Time (ME -1/3); ns",80,-500.,500.));
229  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem12","Anode recHit Time (ME -1/2); ns",80,-500.,500.));
230  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodem11b","Anode recHit Time (ME -1/1b); ns",80,-500.,500.));
231  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep11b","Anode recHit Time (ME +1/1b); ns",80,-500.,500.));
232  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep12","Anode recHit Time (ME +1/2); ns",80,-500.,500.));
233  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep13","Anode recHit Time (ME +1/3); ns",80,-500.,500.));
234  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep11a","Anode recHit Time (ME +1/1a); ns",80,-500.,500.));
235  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep21","Anode recHit Time (ME +2/1); ns",80,-500.,500.));
236  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep22","Anode recHit Time (ME +2/2); ns",80,-500.,500.));
237  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep31","Anode recHit Time (ME +3/1); ns",80,-500.,500.));
238  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep32","Anode recHit Time (ME +3/2); ns",80,-500.,500.));
239  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep41","Anode recHit Time (ME +4/1); ns",80,-500.,500.));
240  hRHTimingAnode.push_back(ibooker.book1D("hRHTimingAnodep42","Anode recHit Time (ME +4/2); ns",80,-500.,500.));
241  hRHstpos.push_back(ibooker.book1D("hRHstposm42","Reconstructed Position on Strip (ME -4/2); Strip Widths",120,-0.6,0.6));
242  hRHstpos.push_back(ibooker.book1D("hRHstposm41","Reconstructed Position on Strip (ME -4/1); Strip Widths",120,-0.6,0.6));
243  hRHstpos.push_back(ibooker.book1D("hRHstposm32","Reconstructed Position on Strip (ME -3/2); Strip Widths",120,-0.6,0.6));
244  hRHstpos.push_back(ibooker.book1D("hRHstposm31","Reconstructed Position on Strip (ME -3/1); Strip Widths",120,-0.6,0.6));
245  hRHstpos.push_back(ibooker.book1D("hRHstposm22","Reconstructed Position on Strip (ME -2/2); Strip Widths",120,-0.6,0.6));
246  hRHstpos.push_back(ibooker.book1D("hRHstposm21","Reconstructed Position on Strip (ME -2/1); Strip Widths",120,-0.6,0.6));
247  hRHstpos.push_back(ibooker.book1D("hRHstposm11a","Reconstructed Position on Strip (ME -1/1a); Strip Widths",120,-0.6,0.6));
248  hRHstpos.push_back(ibooker.book1D("hRHstposm13","Reconstructed Position on Strip (ME -1/3); Strip Widths",120,-0.6,0.6));
249  hRHstpos.push_back(ibooker.book1D("hRHstposm12","Reconstructed Position on Strip (ME -1/2); Strip Widths",120,-0.6,0.6));
250  hRHstpos.push_back(ibooker.book1D("hRHstposm11b","Reconstructed Position on Strip (ME -1/1b); Strip Widths",120,-0.6,0.6));
251  hRHstpos.push_back(ibooker.book1D("hRHstposp11b","Reconstructed Position on Strip (ME +1/1b); Strip Widths",120,-0.6,0.6));
252  hRHstpos.push_back(ibooker.book1D("hRHstposp12","Reconstructed Position on Strip (ME +1/2); Strip Widths",120,-0.6,0.6));
253  hRHstpos.push_back(ibooker.book1D("hRHstposp13","Reconstructed Position on Strip (ME +1/3); Strip Widths",120,-0.6,0.6));
254  hRHstpos.push_back(ibooker.book1D("hRHstposp11a","Reconstructed Position on Strip (ME +1/1a); Strip Widths",120,-0.6,0.6));
255  hRHstpos.push_back(ibooker.book1D("hRHstposp21","Reconstructed Position on Strip (ME +2/1); Strip Widths",120,-0.6,0.6));
256  hRHstpos.push_back(ibooker.book1D("hRHstposp22","Reconstructed Position on Strip (ME +2/2); Strip Widths",120,-0.6,0.6));
257  hRHstpos.push_back(ibooker.book1D("hRHstposp31","Reconstructed Position on Strip (ME +3/1); Strip Widths",120,-0.6,0.6));
258  hRHstpos.push_back(ibooker.book1D("hRHstposp32","Reconstructed Position on Strip (ME +3/2); Strip Widths",120,-0.6,0.6));
259  hRHstpos.push_back(ibooker.book1D("hRHstposp41","Reconstructed Position on Strip (ME +4/1); Strip Widths",120,-0.6,0.6));
260  hRHstpos.push_back(ibooker.book1D("hRHstposp42","Reconstructed Position on Strip (ME +4/2); Strip Widths",120,-0.6,0.6));
261  hRHsterr.push_back(ibooker.book1D("hRHsterrm42","Estimated Error on Strip Measurement (ME -4/2); Strip Widths",75,-0.01,0.24));
262  hRHsterr.push_back(ibooker.book1D("hRHsterrm41","Estimated Error on Strip Measurement (ME -4/1); Strip Widths",75,-0.01,0.24));
263  hRHsterr.push_back(ibooker.book1D("hRHsterrm32","Estimated Error on Strip Measurement (ME -3/2); Strip Widths",75,-0.01,0.24));
264  hRHsterr.push_back(ibooker.book1D("hRHsterrm31","Estimated Error on Strip Measurement (ME -3/1); Strip Widths",75,-0.01,0.24));
265  hRHsterr.push_back(ibooker.book1D("hRHsterrm22","Estimated Error on Strip Measurement (ME -2/2); Strip Widths",75,-0.01,0.24));
266  hRHsterr.push_back(ibooker.book1D("hRHsterrm21","Estimated Error on Strip Measurement (ME -2/1); Strip Widths",75,-0.01,0.24));
267  hRHsterr.push_back(ibooker.book1D("hRHsterrm11a","Estimated Error on Strip Measurement (ME -1/1a); Strip Widths",75,-0.01,0.24));
268  hRHsterr.push_back(ibooker.book1D("hRHsterrm13","Estimated Error on Strip Measurement (ME -1/3); Strip Widths",75,-0.01,0.24));
269  hRHsterr.push_back(ibooker.book1D("hRHsterrm12","Estimated Error on Strip Measurement (ME -1/2); Strip Widths",75,-0.01,0.24));
270  hRHsterr.push_back(ibooker.book1D("hRHsterrm11b","Estimated Error on Strip Measurement (ME -1/1b); Strip Widths",75,-0.01,0.24));
271  hRHsterr.push_back(ibooker.book1D("hRHsterrp11b","Estimated Error on Strip Measurement (ME +1/1b); Strip Widths",75,-0.01,0.24));
272  hRHsterr.push_back(ibooker.book1D("hRHsterrp12","Estimated Error on Strip Measurement (ME +1/2); Strip Widths",75,-0.01,0.24));
273  hRHsterr.push_back(ibooker.book1D("hRHsterrp13","Estimated Error on Strip Measurement (ME +1/3); Strip Widths",75,-0.01,0.24));
274  hRHsterr.push_back(ibooker.book1D("hRHsterrp11a","Estimated Error on Strip Measurement (ME +1/1a); Strip Widths",75,-0.01,0.24));
275  hRHsterr.push_back(ibooker.book1D("hRHsterrp21","Estimated Error on Strip Measurement (ME +2/1); Strip Widths",75,-0.01,0.24));
276  hRHsterr.push_back(ibooker.book1D("hRHsterrp22","Estimated Error on Strip Measurement (ME +2/2); Strip Widths",75,-0.01,0.24));
277  hRHsterr.push_back(ibooker.book1D("hRHsterrp31","Estimated Error on Strip Measurement (ME +3/1); Strip Widths",75,-0.01,0.24));
278  hRHsterr.push_back(ibooker.book1D("hRHsterrp32","Estimated Error on Strip Measurement (ME +3/2); Strip Widths",75,-0.01,0.24));
279  hRHsterr.push_back(ibooker.book1D("hRHsterrp41","Estimated Error on Strip Measurement (ME +4/1); Strip Widths",75,-0.01,0.24));
280  hRHsterr.push_back(ibooker.book1D("hRHsterrp42","Estimated Error on Strip Measurement (ME +4/2); Strip Widths",75,-0.01,0.24));
281 
282  // segments
283  ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/Segments");
284 
285  hSnSegments = ibooker.book1D("hSnSegments","Number of Segments per Event; # of Segments",26,-0.5,25.5);
286  hSnhitsAll = ibooker.book1D("hSnhits","N hits on Segments; # of hits",8,-0.5,7.5);
287  hSnhits.push_back(ibooker.book1D("hSnhitsm42","# of hits on Segments (ME -4/2); # of hits",8,-0.5,7.5));
288  hSnhits.push_back(ibooker.book1D("hSnhitsm41","# of hits on Segments (ME -4/1); # of hits",8,-0.5,7.5));
289  hSnhits.push_back(ibooker.book1D("hSnhitsm32","# of hits on Segments (ME -3/2); # of hits",8,-0.5,7.5));
290  hSnhits.push_back(ibooker.book1D("hSnhitsm31","# of hits on Segments (ME -3/1); # of hits",8,-0.5,7.5));
291  hSnhits.push_back(ibooker.book1D("hSnhitsm22","# of hits on Segments (ME -2/2); # of hits",8,-0.5,7.5));
292  hSnhits.push_back(ibooker.book1D("hSnhitsm21","# of hits on Segments (ME -2/1); # of hits",8,-0.5,7.5));
293  hSnhits.push_back(ibooker.book1D("hSnhitsm11a","# of hits on Segments (ME -1/1a); # of hits",8,-0.5,7.5));
294  hSnhits.push_back(ibooker.book1D("hSnhitsm13","# of hits on Segments (ME -1/3); # of hits",8,-0.5,7.5));
295  hSnhits.push_back(ibooker.book1D("hSnhitsm12","# of hits on Segments (ME -1/2); # of hits",8,-0.5,7.5));
296  hSnhits.push_back(ibooker.book1D("hSnhitsm11b","# of hits on Segments (ME -1/1b); # of hits",8,-0.5,7.5));
297  hSnhits.push_back(ibooker.book1D("hSnhitsp11b","# of hits on Segments (ME +1/1b); # of hits",8,-0.5,7.5));
298  hSnhits.push_back(ibooker.book1D("hSnhitsp12","# of hits on Segments (ME +1/2); # of hits",8,-0.5,7.5));
299  hSnhits.push_back(ibooker.book1D("hSnhitsp13","# of hits on Segments (ME +1/3); # of hits",8,-0.5,7.5));
300  hSnhits.push_back(ibooker.book1D("hSnhitsp11a","# of hits on Segments (ME +1/1a); # of hits",8,-0.5,7.5));
301  hSnhits.push_back(ibooker.book1D("hSnhitsp21","# of hits on Segments (ME +2/1); # of hits",8,-0.5,7.5));
302  hSnhits.push_back(ibooker.book1D("hSnhitsp22","# of hits on Segments (ME +2/2); # of hits",8,-0.5,7.5));
303  hSnhits.push_back(ibooker.book1D("hSnhitsp31","# of hits on Segments (ME +3/1); # of hits",8,-0.5,7.5));
304  hSnhits.push_back(ibooker.book1D("hSnhitsp32","# of hits on Segments (ME +3/2); # of hits",8,-0.5,7.5));
305  hSnhits.push_back(ibooker.book1D("hSnhitsp41","# of hits on Segments (ME +4/1); # of hits",8,-0.5,7.5));
306  hSnhits.push_back(ibooker.book1D("hSnhitsp42","# of hits on Segments (ME +4/2); # of hits",8,-0.5,7.5));
307  hSChiSqAll = ibooker.book1D("hSChiSq","Segment Normalized Chi2; Chi2/ndof",110,-0.05,10.5);
308  hSChiSq.push_back(ibooker.book1D("hSChiSqm42","Segment Normalized Chi2 (ME -4/2); Chi2/ndof",110,-0.05,10.5));
309  hSChiSq.push_back(ibooker.book1D("hSChiSqm41","Segment Normalized Chi2 (ME -4/1); Chi2/ndof",110,-0.05,10.5));
310  hSChiSq.push_back(ibooker.book1D("hSChiSqm32","Segment Normalized Chi2 (ME -3/2); Chi2/ndof",110,-0.05,10.5));
311  hSChiSq.push_back(ibooker.book1D("hSChiSqm31","Segment Normalized Chi2 (ME -3/1); Chi2/ndof",110,-0.05,10.5));
312  hSChiSq.push_back(ibooker.book1D("hSChiSqm22","Segment Normalized Chi2 (ME -2/2); Chi2/ndof",110,-0.05,10.5));
313  hSChiSq.push_back(ibooker.book1D("hSChiSqm21","Segment Normalized Chi2 (ME -2/1); Chi2/ndof",110,-0.05,10.5));
314  hSChiSq.push_back(ibooker.book1D("hSChiSqm11a","Segment Normalized Chi2 (ME -1/1a); Chi2/ndof",110,-0.05,10.5));
315  hSChiSq.push_back(ibooker.book1D("hSChiSqm13","Segment Normalized Chi2 (ME -1/3); Chi2/ndof",110,-0.05,10.5));
316  hSChiSq.push_back(ibooker.book1D("hSChiSqm12","Segment Normalized Chi2 (ME -1/2); Chi2/ndof",110,-0.05,10.5));
317  hSChiSq.push_back(ibooker.book1D("hSChiSqm11b","Segment Normalized Chi2 (ME -1/1b); Chi2/ndof",110,-0.05,10.5));
318  hSChiSq.push_back(ibooker.book1D("hSChiSqp11b","Segment Normalized Chi2 (ME +1/1b); Chi2/ndof",110,-0.05,10.5));
319  hSChiSq.push_back(ibooker.book1D("hSChiSqp12","Segment Normalized Chi2 (ME +1/2); Chi2/ndof",110,-0.05,10.5));
320  hSChiSq.push_back(ibooker.book1D("hSChiSqp13","Segment Normalized Chi2 (ME +1/3); Chi2/ndof",110,-0.05,10.5));
321  hSChiSq.push_back(ibooker.book1D("hSChiSqp11a","Segment Normalized Chi2 (ME +1/1a); Chi2/ndof",110,-0.05,10.5));
322  hSChiSq.push_back(ibooker.book1D("hSChiSqp21","Segment Normalized Chi2 (ME +2/1); Chi2/ndof",110,-0.05,10.5));
323  hSChiSq.push_back(ibooker.book1D("hSChiSqp22","Segment Normalized Chi2 (ME +2/2); Chi2/ndof",110,-0.05,10.5));
324  hSChiSq.push_back(ibooker.book1D("hSChiSqp31","Segment Normalized Chi2 (ME +3/1); Chi2/ndof",110,-0.05,10.5));
325  hSChiSq.push_back(ibooker.book1D("hSChiSqp32","Segment Normalized Chi2 (ME +3/2); Chi2/ndof",110,-0.05,10.5));
326  hSChiSq.push_back(ibooker.book1D("hSChiSqp41","Segment Normalized Chi2 (ME +4/1); Chi2/ndof",110,-0.05,10.5));
327  hSChiSq.push_back(ibooker.book1D("hSChiSqp42","Segment Normalized Chi2 (ME +4/2); Chi2/ndof",110,-0.05,10.5));
328  hSChiSqProbAll = ibooker.book1D("hSChiSqProb","Segment chi2 Probability; Probability",110,-0.05,1.05);
329  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm42","Segment chi2 Probability (ME -4/2); Probability",110,-0.05,1.05));
330  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm41","Segment chi2 Probability (ME -4/1); Probability",110,-0.05,1.05));
331  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm32","Segment chi2 Probability (ME -3/2); Probability",110,-0.05,1.05));
332  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm31","Segment chi2 Probability (ME -3/1); Probability",110,-0.05,1.05));
333  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm22","Segment chi2 Probability (ME -2/2); Probability",110,-0.05,1.05));
334  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm21","Segment chi2 Probability (ME -2/1); Probability",110,-0.05,1.05));
335  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm11a","Segment chi2 Probability (ME -1/1a); Probability",110,-0.05,1.05));
336  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm13","Segment chi2 Probability (ME -1/3); Probability",110,-0.05,1.05));
337  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm12","Segment chi2 Probability (ME -1/2); Probability",110,-0.05,1.05));
338  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbm11b","Segment chi2 Probability (ME -1/1b); Probability",110,-0.05,1.05));
339  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp11b","Segment chi2 Probability (ME +1/1b); Probability",110,-0.05,1.05));
340  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp12","Segment chi2 Probability (ME +1/2); Probability",110,-0.05,1.05));
341  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp13","Segment chi2 Probability (ME +1/3); Probability",110,-0.05,1.05));
342  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp11a","Segment chi2 Probability (ME +1/1a); Probability",110,-0.05,1.05));
343  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp21","Segment chi2 Probability (ME +2/1); Probability",110,-0.05,1.05));
344  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp22","Segment chi2 Probability (ME +2/2); Probability",110,-0.05,1.05));
345  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp31","Segment chi2 Probability (ME +3/1); Probability",110,-0.05,1.05));
346  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp32","Segment chi2 Probability (ME +3/2); Probability",110,-0.05,1.05));
347  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp41","Segment chi2 Probability (ME +4/1); Probability",110,-0.05,1.05));
348  hSChiSqProb.push_back(ibooker.book1D("hSChiSqProbp42","Segment chi2 Probability (ME +4/2); Probability",110,-0.05,1.05));
349  hSGlobalTheta = ibooker.book1D("hSGlobalTheta","Segment Direction (Global Theta); Global Theta (radians)",136,-0.1,3.3);
350  hSGlobalPhi = ibooker.book1D("hSGlobalPhi","Segment Direction (Global Phi); Global Phi (radians)", 128,-3.2,3.2);
351 
352  hSTimeDiff = ibooker.book1D("hSTimeDiff", "Anode Minus Cathode Segment Time [ns]",50,-50,50);
353  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m42", "Anode Minus Cathode Segment Time (ME -4/2) [ns]",50,-50,50));
354  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m41", "Anode Minus Cathode Segment Time (ME -4/1) [ns]",50,-50,50));
355  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m32", "Anode Minus Cathode Segment Time (ME -3/2) [ns]",50,-50,50));
356  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m31", "Anode Minus Cathode Segment Time (ME -3/2) [ns]",50,-50,50));
357  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m22", "Anode Minus Cathode Segment Time (ME -2/2) [ns]",50,-50,50));
358  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m21", "Anode Minus Cathode Segment Time (ME -2/1) [ns]",50,-50,50));
359  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m11a", "Anode Minus Cathode Segment Time (ME -1/1a) [ns]",50,-50,50));
360  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m13", "Anode Minus Cathode Segment Time (ME -1/3) [ns]",50,-50,50));
361  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m12", "Anode Minus Cathode Segment Time (ME -1/2) [ns]",50,-50,50));
362  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_m11b", "Anode Minus Cathode Segment Time (ME -1/1b) [ns]",50,-50,50));
363  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p11b", "Anode Minus Cathode Segment Time (ME +1/1b) [ns]",50,-50,50));
364  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p12", "Anode Minus Cathode Segment Time (ME +1/2) [ns]",50,-50,50));
365  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p13", "Anode Minus Cathode Segment Time (ME +1/3) [ns]",50,-50,50));
366  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p11a", "Anode Minus Cathode Segment Time (ME +1/1a) [ns]",50,-50,50));
367  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p21", "Anode Minus Cathode Segment Time (ME +2/1) [ns]",50,-50,50));
368  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p22", "Anode Minus Cathode Segment Time (ME +2/2) [ns]",50,-50,50));
369  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p31", "Anode Minus Cathode Segment Time (ME +3/1) [ns]",50,-50,50));
370  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p32", "Anode Minus Cathode Segment Time (ME +3/2) [ns]",50,-50,50));
371  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p41", "Anode Minus Cathode Segment Time (ME +4/1) [ns]",50,-50,50));
372  hSTimeDiffByChamberType.push_back(ibooker.book1D("hSTimeDiff_p42", "Anode Minus Cathode Segment Time (ME +4/2) [ns]",50,-50,50));
373 
374  hSTimeAnode = ibooker.book1D("hSTimeAnode", "Anode Only Segment Time [ns]",200,-200,200);
375  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m42", "Anode Only Segment Time (ME -4/2) [ns]",200,-200,200));
376  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m41", "Anode Only Segment Time (ME -4/1) [ns]",200,-200,200));
377  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m32", "Anode Only Segment Time (ME -3/2) [ns]",200,-200,200));
378  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m31", "Anode Only Segment Time (ME -3/2) [ns]",200,-200,200));
379  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m22", "Anode Only Segment Time (ME -2/2) [ns]",200,-200,200));
380  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m21", "Anode Only Segment Time (ME -2/1) [ns]",200,-200,200));
381  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m11a", "Anode Only Segment Time (ME -1/1a) [ns]",200,-200,200));
382  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m13", "Anode Only Segment Time (ME -1/3) [ns]",200,-200,200));
383  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m12", "Anode Only Segment Time (ME -1/2) [ns]",200,-200,200));
384  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_m11b", "Anode Only Segment Time (ME -1/1b) [ns]",200,-200,200));
385  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p11b", "Anode Only Segment Time (ME +1/1b) [ns]",200,-200,200));
386  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p12", "Anode Only Segment Time (ME +1/2) [ns]",200,-200,200));
387  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p13", "Anode Only Segment Time (ME +1/3) [ns]",200,-200,200));
388  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p11a", "Anode Only Segment Time (ME +1/1a) [ns]",200,-200,200));
389  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p21", "Anode Only Segment Time (ME +2/1) [ns]",200,-200,200));
390  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p22", "Anode Only Segment Time (ME +2/2) [ns]",200,-200,200));
391  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p31", "Anode Only Segment Time (ME +3/1) [ns]",200,-200,200));
392  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p32", "Anode Only Segment Time (ME +3/2) [ns]",200,-200,200));
393  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p41", "Anode Only Segment Time (ME +4/1) [ns]",200,-200,200));
394  hSTimeAnodeByChamberType.push_back(ibooker.book1D("hSTimeAnode_p42", "Anode Only Segment Time (ME +4/2) [ns]",200,-200,200));
395 
396  hSTimeCathode = ibooker.book1D("hSTimeCathode", "Cathode Only Segment Time [ns]",200,-200,200);
397  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m42", "Cathode Only Segment Time (ME -4/2) [ns]",200,-200,200));
398  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m41", "Cathode Only Segment Time (ME -4/1) [ns]",200,-200,200));
399  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m32", "Cathode Only Segment Time (ME -3/2) [ns]",200,-200,200));
400  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m31", "Cathode Only Segment Time (ME -3/2) [ns]",200,-200,200));
401  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m22", "Cathode Only Segment Time (ME -2/2) [ns]",200,-200,200));
402  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m21", "Cathode Only Segment Time (ME -2/1) [ns]",200,-200,200));
403  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m11a", "Cathode Only Segment Time (ME -1/1a) [ns]",200,-200,200));
404  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m13", "Cathode Only Segment Time (ME -1/3) [ns]",200,-200,200));
405  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m12", "Cathode Only Segment Time (ME -1/2) [ns]",200,-200,200));
406  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_m11b", "Cathode Only Segment Time (ME -1/1b) [ns]",200,-200,200));
407  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p11b", "Cathode Only Segment Time (ME +1/1b) [ns]",200,-200,200));
408  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p12", "Cathode Only Segment Time (ME +1/2) [ns]",200,-200,200));
409  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p13", "Cathode Only Segment Time (ME +1/3) [ns]",200,-200,200));
410  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p11a", "Cathode Only Segment Time (ME +1/1a) [ns]",200,-200,200));
411  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p21", "Cathode Only Segment Time (ME +2/1) [ns]",200,-200,200));
412  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p22", "Cathode Only Segment Time (ME +2/2) [ns]",200,-200,200));
413  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p31", "Cathode Only Segment Time (ME +3/1) [ns]",200,-200,200));
414  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p32", "Cathode Only Segment Time (ME +3/2) [ns]",200,-200,200));
415  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p41", "Cathode Only Segment Time (ME +4/1) [ns]",200,-200,200));
416  hSTimeCathodeByChamberType.push_back(ibooker.book1D("hSTimeCathode_p42", "Cathode Only Segment Time (ME +4/2) [ns]",200,-200,200));
417 
418  hSTimeCombined = ibooker.book1D("hSTimeCombined", "Segment Time (anode+cathode times) [ns]",200,-200,200);
419  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m42", "Segment Time (anode+cathode times) Segment Time (ME -4/2) [ns]",200,-200,200));
420  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m41", "Segment Time (anode+cathode times) Segment Time (ME -4/1) [ns]",200,-200,200));
421  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m32", "Segment Time (anode+cathode times) Segment Time (ME -3/2) [ns]",200,-200,200));
422  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m31", "Segment Time (anode+cathode times) Segment Time (ME -3/2) [ns]",200,-200,200));
423  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m22", "Segment Time (anode+cathode times) Segment Time (ME -2/2) [ns]",200,-200,200));
424  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m21", "Segment Time (anode+cathode times) Segment Time (ME -2/1) [ns]",200,-200,200));
425  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m11a", "Segment Time (anode+cathode times) Segment Time (ME -1/1a) [ns]",200,-200,200));
426  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m13", "Segment Time (anode+cathode times) Segment Time (ME -1/3) [ns]",200,-200,200));
427  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m12", "Segment Time (anode+cathode times) Segment Time (ME -1/2) [ns]",200,-200,200));
428  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_m11b", "Segment Time (anode+cathode times) Segment Time (ME -1/1b) [ns]",200,-200,200));
429  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p11b", "Segment Time (anode+cathode times) Segment Time (ME +1/1b) [ns]",200,-200,200));
430  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p12", "Segment Time (anode+cathode times) Segment Time (ME +1/2) [ns]",200,-200,200));
431  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p13", "Segment Time (anode+cathode times) Segment Time (ME +1/3) [ns]",200,-200,200));
432  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p11a", "Segment Time (anode+cathode times) Segment Time (ME +1/1a) [ns]",200,-200,200));
433  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p21", "Segment Time (anode+cathode times) Segment Time (ME +2/1) [ns]",200,-200,200));
434  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p22", "Segment Time (anode+cathode times) Segment Time (ME +2/2) [ns]",200,-200,200));
435  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p31", "Segment Time (anode+cathode times) Segment Time (ME +3/1) [ns]",200,-200,200));
436  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p32", "Segment Time (anode+cathode times) Segment Time (ME +3/2) [ns]",200,-200,200));
437  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p41", "Segment Time (anode+cathode times) Segment Time (ME +4/1) [ns]",200,-200,200));
438  hSTimeCombinedByChamberType.push_back(ibooker.book1D("hSTimeCombined_p42", "Segment Time (anode+cathode times) Segment Time (ME +4/2) [ns]",200,-200,200));
439 
440  hSTimeDiffSerial = ibooker.book2D("hSTimeDiffSerial", "Anode Minus Cathode Segment Time [ns]",601,-0.5,600.5,200,-50,50);
441  hSTimeAnodeSerial = ibooker.book2D("hSTimeAnodeSerial", "Anode Only Segment Time [ns]",601,-0.5,600.5,200,-200,200);
442  hSTimeCathodeSerial = ibooker.book2D("hSTimeCathodeSerial", "Cathode Only Segment Time [ns]",601,-0.5,600.5,200,-200,200);
443  hSTimeCombinedSerial = ibooker.book2D("hSTimeCombinedSerial", "Segment Time (anode+cathode times) [ns]",601,-0.5,600.5,200,-200,200);
444 
445 
446  hSTimeVsZ = ibooker.book2D("hSTimeVsZ","Segment Time vs. Z; [ns] vs. [cm]",200,-1200,1200,200,-200,200);
447  hSTimeVsTOF = ibooker.book2D("hSTimeVsTOF","Segment Time vs. Distance from IP; [ns] vs. [cm]",180,500,1400, 200,-200,200);
448 
449 
450  // resolution
451  ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/Resolution");
452 
453  hSResid.push_back(ibooker.book1D("hSResidm42","Fitted Position on Strip - Reconstructed for Layer 3 (ME -4/2); Strip Widths",100,-0.5,0.5));
454  hSResid.push_back(ibooker.book1D("hSResidm41","Fitted Position on Strip - Reconstructed for Layer 3 (ME -4/1); Strip Widths",100,-0.5,0.5));
455  hSResid.push_back(ibooker.book1D("hSResidm32","Fitted Position on Strip - Reconstructed for Layer 3 (ME -3/2); Strip Widths",100,-0.5,0.5));
456  hSResid.push_back(ibooker.book1D("hSResidm31","Fitted Position on Strip - Reconstructed for Layer 3 (ME -3/1); Strip Widths",100,-0.5,0.5));
457  hSResid.push_back(ibooker.book1D("hSResidm22","Fitted Position on Strip - Reconstructed for Layer 3 (ME -2/2); Strip Widths",100,-0.5,0.5));
458  hSResid.push_back(ibooker.book1D("hSResidm21","Fitted Position on Strip - Reconstructed for Layer 3 (ME -2/1); Strip Widths",100,-0.5,0.5));
459  hSResid.push_back(ibooker.book1D("hSResidm11a","Fitted Position on Strip - Reconstructed for Layer 3 (ME -1/1a); Strip Widths",100,-0.5,0.5));
460  hSResid.push_back(ibooker.book1D("hSResidm13","Fitted Position on Strip - Reconstructed for Layer 3 (ME -1/3); Strip Widths",100,-0.5,0.5));
461  hSResid.push_back(ibooker.book1D("hSResidm12","Fitted Position on Strip - Reconstructed for Layer 3 (ME -1/2); Strip Widths",100,-0.5,0.5));
462  hSResid.push_back(ibooker.book1D("hSResidm11b","Fitted Position on Strip - Reconstructed for Layer 3 (ME -1/1b); Strip Widths",100,-0.5,0.5));
463  hSResid.push_back(ibooker.book1D("hSResidp11b","Fitted Position on Strip - Reconstructed for Layer 3 (ME +1/1b); Strip Widths",100,-0.5,0.5));
464  hSResid.push_back(ibooker.book1D("hSResidp12","Fitted Position on Strip - Reconstructed for Layer 3 (ME +1/2); Strip Widths",100,-0.5,0.5));
465  hSResid.push_back(ibooker.book1D("hSResidp13","Fitted Position on Strip - Reconstructed for Layer 3 (ME +1/3); Strip Widths",100,-0.5,0.5));
466  hSResid.push_back(ibooker.book1D("hSResidp11a","Fitted Position on Strip - Reconstructed for Layer 3 (ME +1/1a); Strip Widths",100,-0.5,0.5));
467  hSResid.push_back(ibooker.book1D("hSResidp21","Fitted Position on Strip - Reconstructed for Layer 3 (ME +2/1); Strip Widths",100,-0.5,0.5));
468  hSResid.push_back(ibooker.book1D("hSResidp22","Fitted Position on Strip - Reconstructed for Layer 3 (ME +2/2); Strip Widths",100,-0.5,0.5));
469  hSResid.push_back(ibooker.book1D("hSResidp31","Fitted Position on Strip - Reconstructed for Layer 3 (ME +3/1); Strip Widths",100,-0.5,0.5));
470  hSResid.push_back(ibooker.book1D("hSResidp32","Fitted Position on Strip - Reconstructed for Layer 3 (ME +3/2); Strip Widths",100,-0.5,0.5));
471  hSResid.push_back(ibooker.book1D("hSResidp41","Fitted Position on Strip - Reconstructed for Layer 3 (ME +4/1); Strip Widths",100,-0.5,0.5));
472  hSResid.push_back(ibooker.book1D("hSResidp42","Fitted Position on Strip - Reconstructed for Layer 3 (ME +4/2); Strip Widths",100,-0.5,0.5));
473 
474  // efficiency
475  ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/Efficiency");
476 
477  // hSSTE = ibooker.book1D("hSSTE","hSSTE",40,0.5,40.5);
478  // hRHSTE = ibooker.book1D("hRHSTE","hRHSTE",40,0.5,40.5);
479  hSnum = ibooker.book1D("hSnum", "CSC w rechits in 2+ layers && segment(s)", 20, 0.5, 20.5);
480  hSden = ibooker.book1D("hSden", "CSC w rechits in 2+ layers", 20, 0.5, 20.5);
481  hRHnum = ibooker.book1D("hRHnum", "CSC w segment(s) && rechits in 6 layers", 20, 0.5, 20.5);
482  hRHden = ibooker.book1D("hRHden", "CSC w segment(s)", 20, 0.5, 20.5);
487 
488  // hSEff = ibooker.book1D("hSEff","Segment Efficiency",20,0.5,20.5);
489  // hRHEff = ibooker.book1D("hRHEff","recHit Efficiency",20,0.5,20.5);
490  hSSTE2 = ibooker.book2D("hSSTE2","hSSTE2",36,0.5,36.5, 20, 0.5, 20.5);
491  hRHSTE2 = ibooker.book2D("hRHSTE2","hRHSTE2",36,0.5,36.5, 20, 0.5, 20.5);
492  hStripSTE2 = ibooker.book2D("hStripSTE2","hStripSTE2",36,0.5,36.5, 20, 0.5, 20.5);
493  hWireSTE2 = ibooker.book2D("hWireSTE2","hWireSTE2",36,0.5,36.5, 20, 0.5, 20.5);
494  hEffDenominator = ibooker.book2D("hEffDenominator","hEffDenominator",36,0.5,36.5, 20, 0.5, 20.5);
495  // hSEff2 = ibooker.book2D("hSEff2","Segment Efficiency 2D",36,0.5,36.5, 18, 0.5, 18.5);
496  // hRHEff2 = ibooker.book2D("hRHEff2","recHit Efficiency 2D",36,0.5,36.5, 18, 0.5, 18.5);
497  // hStripReadoutEff2 = ibooker.book2D("hStripReadoutEff2","strip readout ratio [(strip+clct+wires)/(clct+wires)] 2D",36,0.5,36.5, 20, 0.5, 20.5);
498  // hStripReadoutEff2->setAxisTitle("Chamber #");
499  // hStripEff2 = ibooker.book2D("hStripEff2","strip Efficiency 2D",36,0.5,36.5, 18, 0.5, 18.5);
500  // hWireEff2 = ibooker.book2D("hWireEff2","wire Efficiency 2D",36,0.5,36.5, 18, 0.5, 18.5);
501  hSensitiveAreaEvt = ibooker.book2D("hSensitiveAreaEvt","Events Passing Selection for Efficiency",36,0.5,36.5, 20, 0.5, 20.5);
502 
503  // bx monitor for trigger synchronization
504  ibooker.setCurrentFolder("CSC/CSCOfflineMonitor/BXMonitor");
505 
506  hALCTgetBX = ibooker.book1D("hALCTgetBX","ALCT position in ALCT-L1A match window [BX]",7,-0.5,6.5);
507  // hALCTgetBXChamberMeans = ibooker.book1D("hALCTgetBXChamberMeans","Chamber Mean ALCT position in ALCT-L1A match window [BX]",60,0,6);
508  hALCTgetBXSerial = ibooker.book2D("hALCTgetBXSerial","ALCT position in ALCT-L1A match window [BX]",601,-0.5,600.5,7,-0.5,6.5);
509  hALCTgetBXSerial->setAxisTitle("Chamber Serial Number");
510  hALCTgetBX2DNumerator = ibooker.book2D("hALCTgetBX2DNumerator","ALCT position in ALCT-L1A match window [BX] (sum)",36,0.5,36.5,20,0.5,20.5);
511  // hALCTgetBX2DMeans = ibooker.book2D("hALCTgetBX2DMeans","ALCT position in ALCT-L1A match window [BX]",36,0.5,36.5,20,0.5,20.5);
512  hALCTgetBX2Denominator = ibooker.book2D("hALCTgetBX2Denominator","Number of ALCT Digis checked",36,0.5,36.5,20,0.5,20.5);
513  // hALCTgetBX2DMeans->setAxisTitle("Chamber #");
514  hALCTgetBX2Denominator->setAxisTitle("Chamber #");
515  hALCTMatch = ibooker.book1D("hALCTMatch","ALCT position in ALCT-CLCT match window [BX]",7,-0.5,6.5);
516  // hALCTMatchChamberMeans = ibooker.book1D("hALCTMatchChamberMeans","Chamber Mean ALCT position in ALCT-CLCT match window [BX]",60,0,6);
517  hALCTMatchSerial = ibooker.book2D("hALCTMatchSerial","ALCT position in ALCT-CLCT match window [BX]",601,-0.5,600.5,7,-0.5,6.5);
518  hALCTMatchSerial->setAxisTitle("Chamber Serial Number");
519  hALCTMatch2DNumerator = ibooker.book2D("hALCTMatch2DNumerator","ALCT position in ALCT-CLCT match window [BX] (sum)",36,0.5,36.5,20,0.5,20.5);
520  // hALCTMatch2DMeans = ibooker.book2D("hALCTMatch2DMeans","ALCT position in ALCT-CLCT match window [BX]",36,0.5,36.5,20,0.5,20.5);
521  hALCTMatch2Denominator = ibooker.book2D("hALCTMatch2Denominator","Number of ALCT-CLCT matches checked",36,0.5,36.5,20,0.5,20.5);
522  // hALCTMatch2DMeans->setAxisTitle("Chamber #");
523  hALCTMatch2Denominator->setAxisTitle("Chamber #");
524  hCLCTL1A = ibooker.book1D("hCLCTL1A","L1A - CLCTpreTrigger at TMB [BX]",40,149.5,189.5);
525  // hCLCTL1AChamberMeans = ibooker.book1D("hCLCTL1AChamberMeans","Chamber Mean L1A - CLCTpreTrigger at TMB [BX]",90,150,159);
526  hCLCTL1ASerial = ibooker.book2D("hCLCTL1ASerial","L1A - CLCTpreTrigger at TMB [BX]",601,-0.5,600.5,40,149.5,189.5);
527  hCLCTL1ASerial->setAxisTitle("Chamber Serial Number");
528  hCLCTL1A2DNumerator = ibooker.book2D("hCLCTL1A2DNumerator","L1A - CLCTpreTrigger at TMB [BX] (sum)",36,0.5,36.5,20,0.5,20.5);
529  // hCLCTL1A2DMeans = ibooker.book2D("hCLCTL1A2DMeans","L1A - CLCTpreTrigger at TMB [BX]",36,0.5,36.5,20,0.5,20.5);
530  hCLCTL1A2Denominator = ibooker.book2D("hCLCTL1A2Denominator","Number of TMB CLCTs checked",36,0.5,36.5,20,0.5,20.5);
531 
532 
533  // labels
540  // applyCSClabels(hSEff, EXTENDED, X);
541  // applyCSClabels(hRHEff, EXTENDED, X);
542  // applyCSClabels(hSEff2, SMALL, Y);
545  // applyCSClabels(hRHEff2, SMALL, Y);
547  // applyCSClabels(hStripReadoutEff2, EXTENDED, Y);
548  // applyCSClabels(hStripEff2, SMALL, Y);
550  // applyCSClabels(hWireEff2, SMALL, Y);
553  // applyCSClabels(hALCTgetBX2DMeans, EXTENDED, Y);
555  // applyCSClabels(hALCTMatch2DMeans, EXTENDED, Y);
557  // applyCSClabels(hCLCTL1A2DMeans, EXTENDED, Y);
559 }
MonitorElement * hEffDenominator
MonitorElement * hOSegmentsSerial
MonitorElement * hRHden
MonitorElement * hOWireSerial
MonitorElement * hSensitiveAreaEvt
MonitorElement * hOStrips
MonitorElement * hORecHits
MonitorElement * hStripSTE2
void cd(void)
Definition: DQMStore.cc:269
MonitorElement * hALCTMatch2DNumerator
std::vector< MonitorElement * > hRHGlobal
MonitorElement * hORecHitsSerial
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::vector< MonitorElement * > hSChiSq
MonitorElement * hSTimeAnodeSerial
MonitorElement * hWirenGroupsTotal
MonitorElement * hCLCTL1ASerial
MonitorElement * hOStripSerial
MonitorElement * hSSTE2
std::vector< MonitorElement * > hWireNumber
MonitorElement * hWireSTE2
MonitorElement * hSTimeAnode
MonitorElement * hSGlobalPhi
std::vector< MonitorElement * > hSnhits
MonitorElement * hOWires
MonitorElement * hSnSegments
std::vector< MonitorElement * > hRHSumQ
MonitorElement * hOStripsAndWiresAndCLCT
MonitorElement * hOSegments
std::vector< MonitorElement * > hStripPed
MonitorElement * hALCTMatchSerial
MonitorElement * hSnhitsAll
std::vector< MonitorElement * > hRHTiming
MonitorElement * hALCTgetBX
MonitorElement * hALCTMatch
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * hSGlobalTheta
MonitorElement * hSTimeDiffSerial
MonitorElement * hSTimeCombined
MonitorElement * hOWiresAndCLCT
std::vector< MonitorElement * > hRHsterr
MonitorElement * hSden
MonitorElement * hCLCTL1A2Denominator
MonitorElement * hALCTgetBX2Denominator
std::vector< MonitorElement * > hSTimeAnodeByChamberType
MonitorElement * hSTimeVsZ
MonitorElement * hRHSTE2
std::vector< MonitorElement * > hSTimeCathodeByChamberType
MonitorElement * hSChiSqAll
MonitorElement * hCSCOccupancy
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * hCLCTL1A2DNumerator
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * hALCTgetBX2DNumerator
std::vector< MonitorElement * > hStripNumber
MonitorElement * hALCTMatch2Denominator
std::vector< MonitorElement * > hWireTBin
MonitorElement * hCLCTL1A
MonitorElement * hSTimeDiff
std::vector< MonitorElement * > hSTimeDiffByChamberType
MonitorElement * hSTimeCathode
MonitorElement * hSTimeCathodeSerial
std::vector< MonitorElement * > hRHstpos
MonitorElement * hStripNFired
MonitorElement * hSTimeCombinedSerial
std::vector< MonitorElement * > hSResid
MonitorElement * hALCTgetBXSerial
MonitorElement * hSTimeVsTOF
MonitorElement * hRHnrechits
MonitorElement * hSnum
std::vector< MonitorElement * > hSChiSqProb
std::vector< MonitorElement * > hRHTimingAnode
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * hRHnum
MonitorElement * hSChiSqProbAll
std::vector< MonitorElement * > hSTimeCombinedByChamberType
std::vector< MonitorElement * > hRHRatioQ
void applyCSClabels(MonitorElement *meHisto, LabelType t, AxisType a)
int CSCOfflineMonitor::chamberSerial ( CSCDetId  id)
private

Definition at line 1884 of file CSCOfflineMonitor.cc.

References RecoEcal_EventContent_cff::ec.

1884  {
1885  int st = id.station();
1886  int ri = id.ring();
1887  int ch = id.chamber();
1888  int ec = id.endcap();
1889  int kSerial = ch;
1890  if (st == 1 && ri == 1) kSerial = ch;
1891  if (st == 1 && ri == 2) kSerial = ch + 36;
1892  if (st == 1 && ri == 3) kSerial = ch + 72;
1893  if (st == 1 && ri == 4) kSerial = ch;
1894  if (st == 2 && ri == 1) kSerial = ch + 108;
1895  if (st == 2 && ri == 2) kSerial = ch + 126;
1896  if (st == 3 && ri == 1) kSerial = ch + 162;
1897  if (st == 3 && ri == 2) kSerial = ch + 180;
1898  if (st == 4 && ri == 1) kSerial = ch + 216;
1899  if (st == 4 && ri == 2) kSerial = ch + 234; // from 2014
1900  if (ec == 2) kSerial = kSerial + 300;
1901  return kSerial;
1902 }
void CSCOfflineMonitor::doBXMonitor ( edm::Handle< CSCALCTDigiCollection alcts,
edm::Handle< CSCCLCTDigiCollection clcts,
const edm::Event event,
const edm::EventSetup eventSetup 
)
private

uncomment this for regional unpacking if (id!=SOME_ID) continue;

Take a reference to this FED's data

if fed has data then unpack it

get a pointer to data and pass it to constructor for unpacking

get a reference to dduData

set default detid to that for E=+z, S=1, R=1, C=1, L=1

skip the DDU if its data has serious errors define a mask for serious errors

get a reference to chamber data

first process chamber-wide digis such as LCT

default value for all digis not related to cfebs

layer=0 flags entire chamber

check alct data integrity

check tmb data integrity

Definition at line 1547 of file CSCOfflineMonitor.cc.

References CSCTMBHeader::ALCTMatchTime(), CSCTMBHeader::BXNCount(), CSCDetId::chamber(), trackerTree::check(), CSCDCCExaminer::check(), CSCDCCExaminer::crcALCT(), CSCDCCExaminer::crcCFEB(), CSCDCCExaminer::crcTMB(), FEDRawData::data(), data, CSCDCCEventData::dduData(), CSCCrateMap::detId(), CSCDetId::endcap(), CSCDCCExaminer::errors(), FEDRawDataCollection::FEDData(), edm::EventSetup::get(), edm::Event::getByToken(), mps_fire::i, triggerObjects_cff::id, LogTrace, FEDNumbering::MAXCSCDDUFEDID, FEDNumbering::MAXCSCFEDID, FEDNumbering::MINCSCDDUFEDID, FEDNumbering::MINCSCFEDID, edm::ESHandle< T >::product(), matplotRender::rawdata, DetId::rawId(), CSCDetId::ring(), CSCDCCExaminer::setMask(), FEDRawData::size(), and CSCDetId::station().

1548  {
1549 
1550  // Loop over ALCTDigis
1551 
1552  for (CSCALCTDigiCollection::DigiRangeIterator j=alcts->begin(); j!=alcts->end(); j++) {
1553  const CSCDetId& idALCT = (*j).first;
1554  const CSCALCTDigiCollection::Range& range =(*j).second;
1555  for (CSCALCTDigiCollection::const_iterator digiIt = range.first; digiIt!=range.second; ++digiIt){
1556  // Valid digi in the chamber (or in neighbouring chamber)
1557  if((*digiIt).isValid()){
1558  hALCTgetBX->Fill((*digiIt).getBX());
1559  hALCTgetBXSerial->Fill(chamberSerial(idALCT),(*digiIt).getBX());
1560  hALCTgetBX2DNumerator->Fill(idALCT.chamber(),typeIndex(idALCT,2),(*digiIt).getBX());
1561  hALCTgetBX2Denominator->Fill(idALCT.chamber(),typeIndex(idALCT,2));
1562  }
1563  }
1564  }// end ALCT Digi loop
1565 
1566 
1567  // Loop over raw data to get TMBHeader information
1568  // Taking code from EventFilter/CSCRawToDigis/CSCDCCUnpacker.cc
1570  eventSetup.get<CSCCrateMapRcd>().get(hcrate);
1571  const CSCCrateMap* pcrate = hcrate.product();
1572 
1573 
1574  // Try to get raw data
1576  if ( !( event.getByToken( rd_token, rawdata ) ) ){
1577  edm::LogWarning("CSCOfflineMonitor") << " FEDRawDataCollection not available";
1578  return;
1579  }
1580 
1581 
1582 
1583  bool goodEvent = false;
1584  unsigned long dccBinCheckMask = 0x06080016;
1585  unsigned int examinerMask = 0x1FEBF3F6;
1586  unsigned int errorMask = 0x0;
1587 
1588  // For new CSC readout layout, which doesn't include DCCs need to loop over DDU FED IDs.
1589  // DCC IDs are included for backward compatibility with old data
1590  std::vector<unsigned int> cscFEDids;
1591 
1592  for (unsigned int id=FEDNumbering::MINCSCFEDID;
1593  id<=FEDNumbering::MAXCSCFEDID; ++id) // loop over DCCs
1594  {
1595  cscFEDids.push_back(id);
1596  }
1597 
1598  for (unsigned int id=FEDNumbering::MINCSCDDUFEDID;
1599  id<=FEDNumbering::MAXCSCDDUFEDID; ++id) // loop over DDUs
1600  {
1601  cscFEDids.push_back(id);
1602  }
1603 
1604  for (unsigned int i=0; i<cscFEDids.size(); i++) // loop over all CSC FEDs (DCCs and DDUs)
1605  {
1606  unsigned int id = cscFEDids[i];
1607  bool isDDU_FED = ((id >= FEDNumbering::MINCSCDDUFEDID) && (id <= FEDNumbering::MAXCSCDDUFEDID))?true:false;
1608 
1611 
1613  const FEDRawData& fedData = rawdata->FEDData(id);
1614  unsigned long length = fedData.size();
1615 
1616  if (length>=32){
1617  CSCDCCExaminer* examiner = nullptr;
1618  std::stringstream examiner_out, examiner_err;
1619  goodEvent = true;
1620  examiner = new CSCDCCExaminer();
1621  if( examinerMask&0x40000 ) examiner->crcCFEB(true);
1622  if( examinerMask&0x8000 ) examiner->crcTMB (true);
1623  if( examinerMask&0x0400 ) examiner->crcALCT(true);
1624  examiner->setMask(examinerMask);
1625  const short unsigned int *data = (short unsigned int *)fedData.data();
1626 
1627  int res = examiner->check(data,long(fedData.size()/2));
1628  if( res < 0 ) {
1629  goodEvent=false;
1630  }
1631  else {
1632  goodEvent=!(examiner->errors()&dccBinCheckMask);
1633  }
1634 
1635 
1636  if (goodEvent) {
1638 
1639  CSCDCCExaminer * ptrExaminer = examiner;
1640 
1641  std::vector<CSCDDUEventData> fed_Data;
1642  std::vector<CSCDDUEventData>* ptr_fedData = &fed_Data;
1643 
1644 
1645  if (isDDU_FED) // Use new DDU FED readout mode
1646  {
1647 
1648  CSCDDUEventData single_dduData((short unsigned int *) fedData.data(), ptrExaminer);
1649  fed_Data.push_back(single_dduData);
1650 
1651  }
1652  else // Use old DCC FED readout mode
1653  {
1654  CSCDCCEventData dccData((short unsigned int *) fedData.data(), ptrExaminer);
1655  fed_Data = dccData.dduData();
1656  }
1657 
1659  const std::vector<CSCDDUEventData> & dduData = *ptr_fedData;
1660 
1662  CSCDetId layer(1, 1, 1, 1, 1);
1663  for (unsigned int iDDU=0; iDDU<dduData.size(); ++iDDU) { // loop over DDUs
1666  if (dduData[iDDU].trailer().errorstat()&errorMask) {
1667  LogTrace("CSCDCCUnpacker|CSCRawToDigi") << "DDU# " << iDDU << " has serious error - no digis unpacked! " <<
1668  std::hex << dduData[iDDU].trailer().errorstat();
1669  continue; // to next iteration of DDU loop
1670  }
1671 
1673  const std::vector<CSCEventData> & cscData = dduData[iDDU].cscData();
1674 
1675 
1676  for (unsigned int iCSC=0; iCSC<cscData.size(); ++iCSC) { // loop over CSCs
1677 
1679  int vmecrate = cscData[iCSC].dmbHeader()->crateID();
1680  int dmb = cscData[iCSC].dmbHeader()->dmbID();
1681 
1682  int icfeb = 0;
1683  int ilayer = 0;
1684 
1685  if ((vmecrate>=1)&&(vmecrate<=60) && (dmb>=1)&&(dmb<=10)&&(dmb!=6)) {
1686  layer = pcrate->detId(vmecrate, dmb,icfeb,ilayer );
1687  }
1688  else{
1689  LogTrace ("CSCOfflineMonitor") << " detID input out of range!!! ";
1690  LogTrace ("CSCOfflineMonitor")
1691  << " skipping chamber vme= " << vmecrate << " dmb= " << dmb;
1692  continue; // to next iteration of iCSC loop
1693  }
1694 
1695 
1697  int nalct = cscData[iCSC].dmbHeader()->nalct();
1698  bool goodALCT=false;
1699  //if (nalct&&(cscData[iCSC].dataPresent>>6&0x1)==1) {
1700  if (nalct&&cscData[iCSC].alctHeader()) {
1701  if (cscData[iCSC].alctHeader()->check()){
1702  goodALCT=true;
1703  }
1704  }
1705 
1707  int nclct = cscData[iCSC].dmbHeader()->nclct();
1708  bool goodTMB=false;
1709  if (nclct&&cscData[iCSC].tmbData()) {
1710  if (cscData[iCSC].tmbHeader()->check()){
1711  if (cscData[iCSC].clctData()->check()) goodTMB=true;
1712  }
1713  }
1714 
1715  if (goodTMB && goodALCT) {
1716  const CSCTMBHeader *tmbHead = cscData[iCSC].tmbHeader();
1717  std::vector<CSCCLCTDigi> clcts = cscData[iCSC].tmbHeader()->CLCTDigis(layer.rawId());
1718  if (clcts.empty() || !(clcts[0].isValid()))
1719  continue;
1720  // Check if the CLCT was in ME11a (ring 4)
1721  if(layer.station()==1 && layer.ring() ==1 && clcts[0].getKeyStrip()>128){
1722  layer = CSCDetId(layer.endcap(),layer.station(),4, layer.chamber());
1723  }
1724  hALCTMatch->Fill(tmbHead->ALCTMatchTime());
1725  hALCTMatchSerial->Fill(chamberSerial(layer),tmbHead->ALCTMatchTime());
1726  // Only fill big 2D display if ALCTMatchTime !=6, since this bin is polluted by the CLCT only triggers
1727  // One will have to look at the serial plots to see if the are a lot of entries here
1728  if(tmbHead->ALCTMatchTime()!=6){
1729  hALCTMatch2DNumerator->Fill(layer.chamber(),typeIndex(layer,2),tmbHead->ALCTMatchTime());
1730  hALCTMatch2Denominator->Fill(layer.chamber(),typeIndex(layer,2));
1731  }
1732 
1733  int TMB_CLCTpre_rel_L1A = tmbHead->BXNCount()-clcts[0].getFullBX();
1734  if (TMB_CLCTpre_rel_L1A > 3563)
1735  TMB_CLCTpre_rel_L1A = TMB_CLCTpre_rel_L1A - 3564;
1736  if (TMB_CLCTpre_rel_L1A < 0)
1737  TMB_CLCTpre_rel_L1A = TMB_CLCTpre_rel_L1A + 3564;
1738 
1739  hCLCTL1A->Fill(TMB_CLCTpre_rel_L1A);
1740  hCLCTL1ASerial->Fill(chamberSerial(layer),TMB_CLCTpre_rel_L1A);
1741  hCLCTL1A2DNumerator->Fill(layer.chamber(),typeIndex(layer,2),TMB_CLCTpre_rel_L1A);
1742  hCLCTL1A2Denominator->Fill(layer.chamber(),typeIndex(layer,2));
1743 
1744  }// end if goodTMB and goodALCT
1745  }// end loop CSCData
1746  }// end loop DDU
1747  }// end if good event
1748  if (examiner!=nullptr) delete examiner;
1749  }// end if non-zero fed data
1750  }// end DCC loop for NON-REFERENCE
1751 
1752  return;
1753 
1754 }
uint16_t BXNCount() const
Definition: CSCTMBHeader.h:42
01/20/05 A.Tumanov
int chamber() const
Definition: CSCDetId.h:68
void crcCFEB(bool enable)
int chamberSerial(CSCDetId id)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
CSCDetId detId(int vme, int dmb, int cfeb, int layer=0) const
Definition: CSCCrateMap.cc:11
MonitorElement * hALCTMatch2DNumerator
const std::vector< CSCDDUEventData > & dduData() const
accessor to dduData
MonitorElement * hCLCTL1ASerial
ExaminerStatusType errors(void) const
void crcALCT(bool enable)
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
Definition: Electron.h:4
void Fill(long long x)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
edm::EDGetTokenT< FEDRawDataCollection > rd_token
MonitorElement * hALCTMatchSerial
int typeIndex(CSCDetId id, int flag=1)
MonitorElement * hALCTgetBX
MonitorElement * hALCTMatch
void crcTMB(bool enable)
MonitorElement * hCLCTL1A2Denominator
MonitorElement * hALCTgetBX2Denominator
#define LogTrace(id)
uint16_t ALCTMatchTime() const
Definition: CSCTMBHeader.h:45
MonitorElement * hCLCTL1A2DNumerator
MonitorElement * hALCTgetBX2DNumerator
const T & get() const
Definition: EventSetup.h:55
MonitorElement * hALCTMatch2Denominator
std::vector< CSCALCTDigi >::const_iterator const_iterator
MonitorElement * hCLCTL1A
int32_t check(const uint16_t *&buffer, int32_t length)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
std::pair< const_iterator, const_iterator > Range
MonitorElement * hALCTgetBXSerial
def check(config)
Definition: trackerTree.py:14
T const * product() const
Definition: ESHandle.h:86
void setMask(ExaminerMaskType mask)
void CSCOfflineMonitor::doEfficiencies ( edm::Handle< CSCWireDigiCollection wires,
edm::Handle< CSCStripDigiCollection strips,
edm::Handle< CSCRecHit2DCollection recHits,
edm::Handle< CSCSegmentCollection cscSegments,
edm::ESHandle< CSCGeometry cscGeom 
)
private

Definition at line 1246 of file CSCOfflineMonitor.cc.

References stringResolutionProvider_cfi::bin, CSCDetId::chamber(), CSCGeometry::chamber(), CSCGeometry::chambers(), CSCChamberSpecs::chamberTypeName(), diffTreeTool::diff, CSCDetId::endcap(), plotBeamSpotDB::first, objects.autophobj::float, CSCLayer::geometry(), CSCChamber::id(), createfilelist::int, CSCChamber::layer(), CSCDetId::layer(), CSCSegment::localDirection(), CSCSegment::localPosition(), TrapezoidalPlaneBounds::parameters(), CSCDetId::ring(), CSCChamber::specs(), CSCDetId::station(), electronIdCutBased_cfi::threshold, GeomDet::toGlobal(), GeomDet::toLocal(), mps_merge::weight, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

1248  {
1249 
1250  bool allWires[2][4][4][36][6];
1251  bool allStrips[2][4][4][36][6];
1252  bool AllRecHits[2][4][4][36][6];
1253  bool AllSegments[2][4][4][36];
1254 
1255  //bool MultiSegments[2][4][4][36];
1256  for(int iE = 0;iE<2;iE++){
1257  for(int iS = 0;iS<4;iS++){
1258  for(int iR = 0; iR<4;iR++){
1259  for(int iC =0;iC<36;iC++){
1260  AllSegments[iE][iS][iR][iC] = false;
1261  //MultiSegments[iE][iS][iR][iC] = false;
1262  for(int iL=0;iL<6;iL++){
1263  allWires[iE][iS][iR][iC][iL] = false;
1264  allStrips[iE][iS][iR][iC][iL] = false;
1265  AllRecHits[iE][iS][iR][iC][iL] = false;
1266  }
1267  }
1268  }
1269  }
1270  }
1271 
1272 
1273  // Wires
1274  for (CSCWireDigiCollection::DigiRangeIterator dWDiter=wires->begin(); dWDiter!=wires->end(); dWDiter++) {
1275  CSCDetId idrec = (CSCDetId)(*dWDiter).first;
1276  std::vector<CSCWireDigi>::const_iterator wireIter = (*dWDiter).second.first;
1277  std::vector<CSCWireDigi>::const_iterator lWire = (*dWDiter).second.second;
1278  for( ; wireIter != lWire; ++wireIter) {
1279  allWires[idrec.endcap() -1][idrec.station() -1][idrec.ring() -1][idrec.chamber() -1][idrec.layer() -1] = true;
1280  break;
1281  }
1282  }
1283 
1284  //---- STRIPS
1285  for (CSCStripDigiCollection::DigiRangeIterator dSDiter=strips->begin(); dSDiter!=strips->end(); dSDiter++) {
1286  CSCDetId idrec = (CSCDetId)(*dSDiter).first;
1287  std::vector<CSCStripDigi>::const_iterator stripIter = (*dSDiter).second.first;
1288  std::vector<CSCStripDigi>::const_iterator lStrip = (*dSDiter).second.second;
1289  for( ; stripIter != lStrip; ++stripIter) {
1290  std::vector<int> myADCVals = stripIter->getADCCounts();
1291  bool thisStripFired = false;
1292  float thisPedestal = 0.5*(float)(myADCVals[0]+myADCVals[1]);
1293  float threshold = 13.3 ;
1294  float diff = 0.;
1295  for (unsigned int iCount = 0; iCount < myADCVals.size(); iCount++) {
1296  diff = (float)myADCVals[iCount]-thisPedestal;
1297  if (diff > threshold) {
1298  thisStripFired = true;
1299  break;
1300  }
1301  }
1302  if(thisStripFired){
1303  allStrips[idrec.endcap() -1][idrec.station() -1][idrec.ring() -1][idrec.chamber() -1][idrec.layer() -1] = true;
1304  break;
1305  }
1306  }
1307  }
1308 
1309  // Rechits
1310  for (CSCRecHit2DCollection::const_iterator recEffIt = recHits->begin(); recEffIt != recHits->end(); recEffIt++) {
1311  //CSCDetId idrec = (CSCDetId)(*recIt).cscDetId();
1312  CSCDetId idrec = (CSCDetId)(*recEffIt).cscDetId();
1313  AllRecHits[idrec.endcap() -1][idrec.station() -1][idrec.ring() -1][idrec.chamber() -1][idrec.layer() -1] = true;
1314 
1315  }
1316 
1317  std::vector <uint> seg_ME2(2,0) ;
1318  std::vector <uint> seg_ME3(2,0) ;
1319  std::vector < pair <CSCDetId, CSCSegment> > theSegments(4);
1320  // Segments
1321  for(CSCSegmentCollection::const_iterator segEffIt=cscSegments->begin(); segEffIt != cscSegments->end(); segEffIt++) {
1322  CSCDetId idseg = (CSCDetId)(*segEffIt).cscDetId();
1323  //if(AllSegments[idrec.endcap() -1][idrec.station() -1][idrec.ring() -1][idrec.chamber()]){
1324  //MultiSegments[idrec.endcap() -1][idrec.station() -1][idrec.ring() -1][idrec.chamber()] = true;
1325  //}
1326  AllSegments[idseg.endcap() -1][idseg.station() -1][idseg.ring() -1][idseg.chamber() -1] = true;
1327  // "Intrinsic" efficiency measurement relies on "good" segment extrapolation - we need the pre-selection below
1328  // station 2 "good" segment will be used for testing efficiencies in ME1 and ME3
1329  // station 3 "good" segment will be used for testing efficiencies in ME2 and ME4
1330  if(2==idseg.station() || 3==idseg.station()){
1331  uint seg_tmp ;
1332  if(2==idseg.station()){
1333  ++seg_ME2[idseg.endcap() -1];
1334  seg_tmp = seg_ME2[idseg.endcap() -1];
1335  }
1336  else{
1337  ++seg_ME3[idseg.endcap() -1];
1338  seg_tmp = seg_ME3[idseg.endcap() -1];
1339  }
1340  // is the segment good
1341  if(1== seg_tmp&& 6==(*segEffIt).nRecHits() && (*segEffIt).chi2()/(*segEffIt).degreesOfFreedom()<3.){
1342  pair <CSCDetId, CSCSegment> specSeg = make_pair( (CSCDetId)(*segEffIt).cscDetId(),*segEffIt);
1343  theSegments[2*(idseg.endcap()-1)+(idseg.station() -2)] = specSeg;
1344  }
1345  }
1346  /*
1347  if(2==idseg.station()){
1348  ++seg_ME2[idseg.endcap() -1];
1349  if(1==seg_ME2[idseg.endcap() -1] && 6==(*segEffIt).nRecHits() && (*segEffIt).chi2()/(*segEffIt).degreesOfFreedom()<3.){
1350  pair <CSCDetId, CSCSegment> specSeg = make_pair( (CSCDetId)(*segEffIt).cscDetId(),*segEffIt);
1351  theSegments[2*(idseg.endcap()-1)+(idseg.station() -2)] = specSeg;
1352  }
1353  }
1354  else if(3==idseg.station()){
1355  ++seg_ME3[idseg.endcap() -1];
1356  if(1==seg_ME3[idseg.endcap() -1] && 6==(*segEffIt).nRecHits() && (*segEffIt).chi2()/(*segEffIt).degreesOfFreedom()<3.){
1357  pair <CSCDetId, CSCSegment> specSeg = make_pair( (CSCDetId)(*segEffIt).cscDetId(),*segEffIt);
1358  theSegments[2*(idseg.endcap()-1)+(idseg.station() -2)] = specSeg;
1359  }
1360  }
1361  */
1362 
1363  }
1364  // Simple efficiency calculations
1365  for(int iE = 0;iE<2;iE++){
1366  for(int iS = 0;iS<4;iS++){
1367  for(int iR = 0; iR<4;iR++){
1368  for(int iC =0;iC<36;iC++){
1369  int NumberOfLayers = 0;
1370  for(int iL=0;iL<6;iL++){
1371  if(AllRecHits[iE][iS][iR][iC][iL]){
1372  NumberOfLayers++;
1373  }
1374  }
1375  int bin = 0;
1376  if (iS==0) bin = iR+1+(iE*10);
1377  else bin = (iS+1)*2 + (iR+1) + (iE*10);
1378  if(NumberOfLayers>1){
1379  //if(!(MultiSegments[iE][iS][iR][iC])){
1380  if(AllSegments[iE][iS][iR][iC]){
1381  //---- Efficient segment evenents
1382  hSnum->Fill(bin);
1383  }
1384  //---- All segment events (normalization)
1385  hSden->Fill(bin);
1386  //}
1387  }
1388  if(AllSegments[iE][iS][iR][iC]){
1389  if(NumberOfLayers==6){
1390  //---- Efficient rechit events
1391  hRHnum->Fill(bin);;
1392  }
1393  //---- All rechit events (normalization)
1394  hRHden->Fill(bin);;
1395  }
1396  }
1397  }
1398  }
1399  }
1400 
1401  // pick a segment only if there are no others in the station
1402  std::vector < pair <CSCDetId, CSCSegment> * > theSeg;
1403  if(1==seg_ME2[0]) theSeg.push_back(&theSegments[0]);
1404  if(1==seg_ME3[0]) theSeg.push_back(&theSegments[1]);
1405  if(1==seg_ME2[1]) theSeg.push_back(&theSegments[2]);
1406  if(1==seg_ME3[1]) theSeg.push_back(&theSegments[3]);
1407 
1408  // Needed for plots
1409  // at the end the chamber types will be numbered as 1 to 20
1410  // (ME-4./2, ME-4/1, -ME3/2, -ME3/1, ..., +ME3/1, +ME3/2, ME+4/1, ME+4/2)
1411  std::map <std::string, float> chamberTypes;
1412  chamberTypes["ME1/a"] = 0.5;
1413  chamberTypes["ME1/b"] = 1.5;
1414  chamberTypes["ME1/2"] = 2.5;
1415  chamberTypes["ME1/3"] = 3.5;
1416  chamberTypes["ME2/1"] = 4.5;
1417  chamberTypes["ME2/2"] = 5.5;
1418  chamberTypes["ME3/1"] = 6.5;
1419  chamberTypes["ME3/2"] = 7.5;
1420  chamberTypes["ME4/1"] = 8.5;
1421  chamberTypes["ME4/2"] = 9.5;
1422 
1423  if(!theSeg.empty()){
1424  std::map <int , GlobalPoint> extrapolatedPoint;
1425  std::map <int , GlobalPoint>::iterator it;
1426  const CSCGeometry::ChamberContainer& ChamberContainer = cscGeom->chambers();
1427  // Pick which chamber with which segment to test
1428  for(unsigned int nCh=0;nCh<ChamberContainer.size();nCh++){
1429  const CSCChamber *cscchamber = ChamberContainer[nCh];
1430  pair <CSCDetId, CSCSegment> * thisSegment = nullptr;
1431  for(uint iSeg =0;iSeg<theSeg.size();++iSeg ){
1432  if(cscchamber->id().endcap() == theSeg[iSeg]->first.endcap()){
1433  if(1==cscchamber->id().station() || 3==cscchamber->id().station() ){
1434  if(2==theSeg[iSeg]->first.station()){
1435  thisSegment = theSeg[iSeg];
1436  }
1437  }
1438  else if (2==cscchamber->id().station() || 4==cscchamber->id().station()){
1439  if(3==theSeg[iSeg]->first.station()){
1440  thisSegment = theSeg[iSeg];
1441  }
1442  }
1443  }
1444  }
1445  // this chamber is to be tested with thisSegment
1446  if(thisSegment){
1447  CSCSegment * seg = &(thisSegment->second);
1448  const CSCChamber *segChamber = cscGeom->chamber(thisSegment->first);
1449  LocalPoint localCenter(0.,0.,0);
1450  GlobalPoint cscchamberCenter = cscchamber->toGlobal(localCenter);
1451  // try to save some time (extrapolate a segment to a certain position only once)
1452  it = extrapolatedPoint.find(int(cscchamberCenter.z()));
1453  if(it==extrapolatedPoint.end()){
1454  GlobalPoint segPos = segChamber->toGlobal(seg->localPosition());
1455  GlobalVector segDir = segChamber->toGlobal(seg->localDirection());
1456  double paramaterLine = lineParametrization(segPos.z(),cscchamberCenter.z() , segDir.z());
1457  double xExtrapolated = extrapolate1D(segPos.x(),segDir.x(), paramaterLine);
1458  double yExtrapolated = extrapolate1D(segPos.y(),segDir.y(), paramaterLine);
1459  GlobalPoint globP (xExtrapolated, yExtrapolated, cscchamberCenter.z());
1460  extrapolatedPoint[int(cscchamberCenter.z())] = globP;
1461  }
1462  // Where does the extrapolated point lie in the (tested) chamber local frame? Here:
1463  LocalPoint extrapolatedPointLocal = cscchamber->toLocal(extrapolatedPoint[int(cscchamberCenter.z())]);
1464  const CSCLayer *layer_p = cscchamber->layer(1);//layer 1
1465  const CSCLayerGeometry *layerGeom = layer_p->geometry ();
1466  const std::array<const float, 4> & layerBounds = layerGeom->parameters ();
1467  float shiftFromEdge = 15.;//cm
1468  float shiftFromDeadZone = 10.;
1469  // is the extrapolated point within a sensitive region
1470  bool pass = withinSensitiveRegion(extrapolatedPointLocal, layerBounds,
1471  cscchamber->id().station(), cscchamber->id().ring(),
1472  shiftFromEdge, shiftFromDeadZone);
1473  if(pass){// the extrapolation point of the segment lies within sensitive region of that chamber
1474  // how many rechit layers are there in the chamber?
1475  // 0 - maybe the muon died or is deflected at large angle? do not use that case
1476  // 1 - could be noise...
1477  // 2 or more - this is promissing; this is our definition of a reliable signal; use it below
1478  // is other definition better?
1479  int nRHLayers = 0;
1480  for(int iL =0;iL<6;++iL){
1481  if(AllRecHits[cscchamber->id().endcap()-1]
1482  [cscchamber->id().station()-1]
1483  [cscchamber->id().ring()-1][cscchamber->id().chamber()-1][iL]){
1484  ++nRHLayers;
1485  }
1486  }
1487  //std::cout<<" nRHLayers = "<<nRHLayers<<std::endl;
1488  float verticalScale = chamberTypes[cscchamber->specs()->chamberTypeName()];
1489  if(cscchamberCenter.z()<0){
1490  verticalScale = - verticalScale;
1491  }
1492  verticalScale += 10.5;
1493  hSensitiveAreaEvt->Fill(float(cscchamber->id().chamber()),verticalScale);
1494  if(nRHLayers>1){// this chamber contains a reliable signal
1495  //chamberTypes[cscchamber->specs()->chamberTypeName()];
1496  // "intrinsic" efficiencies
1497  //std::cout<<" verticalScale = "<<verticalScale<<" chType = "<<cscchamber->specs()->chamberTypeName()<<std::endl;
1498  // this is the denominator forr all efficiencies
1499  hEffDenominator->Fill(float(cscchamber->id().chamber()),verticalScale);
1500  // Segment efficiency
1501  if(AllSegments[cscchamber->id().endcap()-1]
1502  [cscchamber->id().station()-1]
1503  [cscchamber->id().ring()-1][cscchamber->id().chamber()-1]){
1504  hSSTE2->Fill(float(cscchamber->id().chamber()),float(verticalScale));
1505  }
1506 
1507  for(int iL =0;iL<6;++iL){
1508  float weight = 1./6.;
1509  // one shold account for the weight in the efficiency...
1510  // Rechit efficiency
1511  if(AllRecHits[cscchamber->id().endcap()-1]
1512  [cscchamber->id().station()-1]
1513  [cscchamber->id().ring()-1][cscchamber->id().chamber()-1][iL]){
1514  hRHSTE2->Fill(float(cscchamber->id().chamber()),float(verticalScale),weight);
1515  }
1516  // Wire efficiency
1517  if(allWires[cscchamber->id().endcap()-1]
1518  [cscchamber->id().station()-1]
1519  [cscchamber->id().ring()-1][cscchamber->id().chamber()-1][iL]){
1520  // one shold account for the weight in the efficiency...
1521  hWireSTE2->Fill(float(cscchamber->id().chamber()),float(verticalScale),weight);
1522  }
1523  // Strip efficiency
1524  if(allStrips[cscchamber->id().endcap()-1]
1525  [cscchamber->id().station()-1]
1526  [cscchamber->id().ring()-1][cscchamber->id().chamber()-1][iL]){
1527  // one shold account for the weight in the efficiency...
1528  hStripSTE2->Fill(float(cscchamber->id().chamber()),float(verticalScale),weight);
1529  }
1530  }
1531  }
1532  }
1533  }
1534  }
1535  }
1536  //
1537 
1538 
1539 }
MonitorElement * hEffDenominator
int chamber() const
Definition: CSCDetId.h:68
MonitorElement * hRHden
MonitorElement * hSensitiveAreaEvt
LocalVector localDirection() const override
Local direction.
Definition: CSCSegment.h:41
virtual const std::array< const float, 4 > parameters() const
CSCDetId id() const
Get the (concrete) DetId.
Definition: CSCChamber.h:37
MonitorElement * hStripSTE2
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
T y() const
Definition: PV3DBase.h:63
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:69
Definition: weight.py:1
const ChamberContainer & chambers() const
Return a vector of all chambers.
Definition: CSCGeometry.cc:106
MonitorElement * hSSTE2
MonitorElement * hWireSTE2
int layer() const
Definition: CSCDetId.h:61
void Fill(long long x)
std::string chamberTypeName() const
int endcap() const
Definition: CSCDetId.h:93
const CSCChamberSpecs * specs() const
Definition: CSCChamber.h:42
T z() const
Definition: PV3DBase.h:64
LocalPoint localPosition() const override
Definition: CSCSegment.h:38
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:39
MonitorElement * hSden
bin
set the eta bin as selection string.
int ring() const
Definition: CSCDetId.h:75
MonitorElement * hRHSTE2
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
Definition: CSCGeometry.cc:118
bool withinSensitiveRegion(LocalPoint localPos, const std::array< const float, 4 > &layerBounds, int station, int ring, float shiftFromEdge, float shiftFromDeadZone)
std::vector< const CSCChamber * > ChamberContainer
Definition: CSCGeometry.h:32
int station() const
Definition: CSCDetId.h:86
MonitorElement * hSnum
double extrapolate1D(double initPosition, double initDirection, double parameterOfTheLine)
double lineParametrization(double z1Position, double z2Position, double z1Direction)
T x() const
Definition: PV3DBase.h:62
MonitorElement * hRHnum
const CSCLayerGeometry * geometry() const
Definition: CSCLayer.h:47
void CSCOfflineMonitor::doOccupancies ( edm::Handle< CSCStripDigiCollection strips,
edm::Handle< CSCWireDigiCollection wires,
edm::Handle< CSCRecHit2DCollection recHits,
edm::Handle< CSCSegmentCollection cscSegments,
edm::Handle< CSCCLCTDigiCollection clcts 
)
private

Definition at line 604 of file CSCOfflineMonitor.cc.

References EnergyCorrector::c, CSCDetId::chamber(), diffTreeTool::diff, MillePedeFileConverter_cfg::e, CSCDetId::endcap(), objects.autophobj::float, alignCSCRings::r, CSCDetId::ring(), alignCSCRings::s, CSCDetId::station(), and electronIdCutBased_cfi::threshold.

606  {
607 
608  bool clcto[2][4][4][36];
609  bool wireo[2][4][4][36];
610  bool stripo[2][4][4][36];
611  bool rechito[2][4][4][36];
612  bool segmento[2][4][4][36];
613 
614  bool hasWires = false;
615  bool hasStrips = false;
616  bool hasRecHits = false;
617  bool hasSegments = false;
618 
619  for (int e = 0; e < 2; e++){
620  for (int s = 0; s < 4; s++){
621  for (int r = 0; r < 4; r++){
622  for (int c = 0; c < 36; c++){
623  clcto[e][s][r][c] = false;
624  wireo[e][s][r][c] = false;
625  stripo[e][s][r][c] = false;
626  rechito[e][s][r][c] = false;
627  segmento[e][s][r][c] = false;
628  }
629  }
630  }
631  }
632 
633  //clcts
634  for (CSCCLCTDigiCollection::DigiRangeIterator j=clcts->begin(); j!=clcts->end(); j++) {
635  CSCDetId id = (CSCDetId)(*j).first;
636  int kEndcap = id.endcap();
637  int kRing = id.ring();
638  int kStation = id.station();
639  int kChamber = id.chamber();
640  const CSCCLCTDigiCollection::Range& range =(*j).second;
641  for (CSCCLCTDigiCollection::const_iterator digiIt = range.first; digiIt!=range.second; ++digiIt){
642  // Valid digi in the chamber (or in neighbouring chamber)
643  if((*digiIt).isValid()){
644  //Check whether this CLCT came from ME11a
645  if( kStation ==1 && kRing==1 && (*digiIt).getKeyStrip()>128)
646  kRing = 4;
647  clcto[kEndcap-1][kStation-1][kRing-1][kChamber-1] = true;
648  }
649  }
650  }
651 
652  //wires
653  for (CSCWireDigiCollection::DigiRangeIterator wi=wires->begin(); wi!=wires->end(); wi++) {
654  CSCDetId id = (CSCDetId)(*wi).first;
655  int kEndcap = id.endcap();
656  int kRing = id.ring();
657  int kStation = id.station();
658  int kChamber = id.chamber();
659  std::vector<CSCWireDigi>::const_iterator wireIt = (*wi).second.first;
660  std::vector<CSCWireDigi>::const_iterator lastWire = (*wi).second.second;
661  for( ; wireIt != lastWire; ++wireIt){
662  if (!wireo[kEndcap-1][kStation-1][kRing-1][kChamber-1]){
663  wireo[kEndcap-1][kStation-1][kRing-1][kChamber-1] = true;
664  hOWires->Fill(kChamber,typeIndex(id,2));
666  hasWires = true;
667  if( clcto[kEndcap-1][kStation-1][kRing-1][kChamber-1])
668  hOWiresAndCLCT->Fill(kChamber,typeIndex(id,2));
669  //Also check for a CLCT in ME11a if you're in ME11 already
670  if (kStation==1 && kRing==1 && clcto[kEndcap-1][kStation-1][3][kChamber-1]){
671  CSCDetId idME11a = CSCDetId(kEndcap, kStation, 4, kChamber);
672  hOWiresAndCLCT->Fill(kChamber,typeIndex(idME11a,2));
673  }
674  }
675  }//end for loop
676  }
677 
678  //strips
679  for (CSCStripDigiCollection::DigiRangeIterator si=strips->begin(); si!=strips->end(); si++) {
680  CSCDetId id = (CSCDetId)(*si).first;
681  int kEndcap = id.endcap();
682  int kRing = id.ring();
683  int kStation = id.station();
684  int kChamber = id.chamber();
685  std::vector<CSCStripDigi>::const_iterator stripIt = (*si).second.first;
686  std::vector<CSCStripDigi>::const_iterator lastStrip = (*si).second.second;
687  for( ; stripIt != lastStrip; ++stripIt) {
688  std::vector<int> myADCVals = stripIt->getADCCounts();
689  bool thisStripFired = false;
690  float thisPedestal = 0.5*(float)(myADCVals[0]+myADCVals[1]);
691  float threshold = 13.3 ;
692  float diff = 0.;
693  for (unsigned int iCount = 0; iCount < myADCVals.size(); iCount++) {
694  diff = (float)myADCVals[iCount]-thisPedestal;
695  if (diff > threshold) { thisStripFired = true; }
696  }
697  if (thisStripFired) {
698  if (!stripo[kEndcap-1][kStation-1][kRing-1][kChamber-1]){
699  stripo[kEndcap-1][kStation-1][kRing-1][kChamber-1] = true;
700  hOStrips->Fill(kChamber,typeIndex(id,2));
702  hasStrips = true;
703  if (clcto[kEndcap-1][kStation-1][kRing-1][kChamber-1]){
704  // check if there is a wire digi in this chamber too
705  // for ME 1/4 check for a wire in ME 1/1
706  if(wireo[kEndcap-1][kStation-1][kRing-1][kChamber-1] || (kRing==4 && wireo[kEndcap-1][kStation-1][0][kChamber-1]) ){
707  hOStripsAndWiresAndCLCT->Fill(kChamber,typeIndex(id,2));
708  }
709  }//end clct and wire digi check
710  }
711  }//end if (thisStripFired)
712  }
713  }
714 
715  //rechits
717  for (recIt = recHits->begin(); recIt != recHits->end(); recIt++) {
718  CSCDetId idrec = (CSCDetId)(*recIt).cscDetId();
719  int kEndcap = idrec.endcap();
720  int kRing = idrec.ring();
721  int kStation = idrec.station();
722  int kChamber = idrec.chamber();
723  if (!rechito[kEndcap-1][kStation-1][kRing-1][kChamber-1]){
724  rechito[kEndcap-1][kStation-1][kRing-1][kChamber-1] = true;
726  hORecHits->Fill(kChamber,typeIndex(idrec,2));
727  hasRecHits = true;
728  }
729  }
730 
731  //segments
732  for(CSCSegmentCollection::const_iterator segIt=cscSegments->begin(); segIt != cscSegments->end(); segIt++) {
733  CSCDetId id = (CSCDetId)(*segIt).cscDetId();
734  int kEndcap = id.endcap();
735  int kRing = id.ring();
736  int kStation = id.station();
737  int kChamber = id.chamber();
738  if (!segmento[kEndcap-1][kStation-1][kRing-1][kChamber-1]){
739  segmento[kEndcap-1][kStation-1][kRing-1][kChamber-1] = true;
741  hOSegments->Fill(kChamber,typeIndex(id,2));
742  hasSegments = true;
743  }
744  }
745 
746  //Overall CSC Occupancy
747  hCSCOccupancy->Fill(1);
748  if (hasWires) hCSCOccupancy->Fill(3);
749  if (hasStrips) hCSCOccupancy->Fill(5);
750  if (hasWires && hasStrips) hCSCOccupancy->Fill(7);
751  if (hasRecHits) hCSCOccupancy->Fill(9);
752  if (hasSegments) hCSCOccupancy->Fill(11);
753 
754 
755  }
MonitorElement * hOSegmentsSerial
int chamber() const
Definition: CSCDetId.h:68
MonitorElement * hOWireSerial
MonitorElement * hOStrips
int chamberSerial(CSCDetId id)
MonitorElement * hORecHits
MonitorElement * hORecHitsSerial
MonitorElement * hOStripSerial
void Fill(long long x)
MonitorElement * hOWires
int endcap() const
Definition: CSCDetId.h:93
MonitorElement * hOStripsAndWiresAndCLCT
MonitorElement * hOSegments
int typeIndex(CSCDetId id, int flag=1)
MonitorElement * hOWiresAndCLCT
int ring() const
Definition: CSCDetId.h:75
MonitorElement * hCSCOccupancy
std::vector< CSCCLCTDigi >::const_iterator const_iterator
int station() const
Definition: CSCDetId.h:86
std::pair< const_iterator, const_iterator > Range
void CSCOfflineMonitor::doPedestalNoise ( edm::Handle< CSCStripDigiCollection strips,
edm::ESHandle< CSCGeometry cscGeom 
)
private

Definition at line 835 of file CSCOfflineMonitor.cc.

References objects.autophobj::float, CSCGeometry::gangedStrips(), CSCDetId::station(), and electronIdCutBased_cfi::threshold.

836  {
837 
838  for (CSCStripDigiCollection::DigiRangeIterator dPNiter=strips->begin(); dPNiter!=strips->end(); dPNiter++) {
839  CSCDetId id = (CSCDetId)(*dPNiter).first;
840  int kStation = id.station();
841  int kRing = id.ring();
842  std::vector<CSCStripDigi>::const_iterator pedIt = (*dPNiter).second.first;
843  std::vector<CSCStripDigi>::const_iterator lStrip = (*dPNiter).second.second;
844  for( ; pedIt != lStrip; ++pedIt) {
845  int myStrip = pedIt->getStrip();
846  std::vector<int> myADCVals = pedIt->getADCCounts();
847  float TotalADC = getSignal(*strips, id, myStrip);
848  bool thisStripFired = false;
849  float thisPedestal = 0.5*(float)(myADCVals[0]+myADCVals[1]);
850  float thisSignal = (1./6)*(myADCVals[2]+myADCVals[3]+myADCVals[4]+myADCVals[5]+myADCVals[6]+myADCVals[7]);
851  float threshold = 13.3;
852 
853  // Why is this code block even here? Doesn't use myStrip after setting it (converts channel to strip
854  // for ganged ME11A
855  if( (kStation == 1 && kRing == 4) && cscGeom->gangedStrips() )
856  {
857  kRing = 1;
858  if(myStrip <= 16) myStrip += 64; // no trapping for any bizarreness
859  }
860 
861  if (TotalADC > threshold) { thisStripFired = true;}
862  if (!thisStripFired){
863  float ADC = thisSignal - thisPedestal;
864  hStripPed[typeIndex(id)-1]->Fill(ADC);
865  }
866  }
867  }
868 
869 }
float getSignal(const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip)
std::vector< MonitorElement * > hStripPed
int typeIndex(CSCDetId id, int flag=1)
bool gangedStrips() const
Definition: CSCGeometry.h:111
int station() const
Definition: CSCDetId.h:86
void CSCOfflineMonitor::doRecHits ( edm::Handle< CSCRecHit2DCollection recHits,
edm::Handle< CSCStripDigiCollection strips,
edm::ESHandle< CSCGeometry cscGeom 
)
private

Find the charge associated with this hit

Definition at line 878 of file CSCOfflineMonitor.cc.

References CSCDetId::endcap(), mps_fire::i, CSCGeometry::layer(), CSCDetId::station(), GeomDet::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

880  {
881 
882  // Get the RecHits collection :
883  int nRecHits = recHits->size();
884 
885  // ---------------------
886  // Loop over rechits
887  // ---------------------
888  // Build iterator for rechits and loop :
890  for (dRHIter = recHits->begin(); dRHIter != recHits->end(); dRHIter++) {
891 
892  // Find chamber with rechits in CSC
893  CSCDetId idrec = (CSCDetId)(*dRHIter).cscDetId();
894 
895  // Store rechit as a Local Point:
896  LocalPoint rhitlocal = (*dRHIter).localPosition();
897  //float xreco = rhitlocal.x();
898  //float yreco = rhitlocal.y();
899 
900  // Get the reconstucted strip position and error
901  float stpos = (*dRHIter).positionWithinStrip();
902  float sterr = (*dRHIter).errorWithinStrip();
903 
905 
906  int adcsize = dRHIter->nStrips()*dRHIter->nTimeBins();
907  float rHSumQ = 0;
908  float sumsides = 0;
909  for (unsigned int i = 0; i < dRHIter->nStrips(); i++){
910  for (unsigned int j=0; j<dRHIter->nTimeBins()-1; j++) {
911  rHSumQ+=dRHIter->adcs(i,j);
912  if ( i != 1 ) sumsides += dRHIter->adcs(i,j); // skip central strip
913  }
914  }
915 
916  float rHratioQ = sumsides/rHSumQ;
917  if (adcsize != 12) rHratioQ = -99;
918 
919  // Get the signal timing of this hit
920  float rHtime = (*dRHIter).tpeak(); //calculated from cathode SCA bins
921  float rHtimeAnode = (*dRHIter).wireTime(); // calculated from anode wire bx
922 
923  // Get pointer to the layer:
924  const CSCLayer* csclayer = cscGeom->layer( idrec );
925 
926  // Transform hit position from local chamber geometry to global CMS geom
927  GlobalPoint rhitglobal= csclayer->toGlobal(rhitlocal);
928  float grecx = rhitglobal.x();
929  float grecy = rhitglobal.y();
930 
931  // Fill some histograms
932  int sIndex = idrec.station() + ((idrec.endcap()-1) * 4);
933  int tIndex = typeIndex(idrec);
934  hRHSumQ[tIndex-1]->Fill(rHSumQ);
935  hRHRatioQ[tIndex-1]->Fill(rHratioQ);
936  hRHstpos[tIndex-1]->Fill(stpos);
937  hRHsterr[tIndex-1]->Fill(sterr);
938  hRHTiming[tIndex-1]->Fill(rHtime);
939  hRHTimingAnode[tIndex-1]->Fill(rHtimeAnode);
940  hRHGlobal[sIndex-1]->Fill(grecx,grecy);
941 
942  } //end rechit loop
943 
944  // if (nRecHits == 0) nRecHits = -1; // I see no point in doing this
945  hRHnrechits->Fill(nRecHits);
946 
947 }
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
std::vector< MonitorElement * > hRHGlobal
T y() const
Definition: PV3DBase.h:63
void Fill(long long x)
int endcap() const
Definition: CSCDetId.h:93
std::vector< MonitorElement * > hRHSumQ
int typeIndex(CSCDetId id, int flag=1)
std::vector< MonitorElement * > hRHTiming
std::vector< MonitorElement * > hRHsterr
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
Definition: CSCGeometry.cc:124
std::vector< MonitorElement * > hRHstpos
int station() const
Definition: CSCDetId.h:86
MonitorElement * hRHnrechits
std::vector< MonitorElement * > hRHTimingAnode
T x() const
Definition: PV3DBase.h:62
std::vector< MonitorElement * > hRHRatioQ
void CSCOfflineMonitor::doResolution ( edm::Handle< CSCSegmentCollection cscSegments,
edm::ESHandle< CSCGeometry cscGeom 
)
private

Find the strip containing this hit

Definition at line 1078 of file CSCOfflineMonitor.cc.

References kLayer(), CSCDetId::layer(), CSCDetId::ring(), and CSCDetId::station().

1079  {
1080 
1081  for(CSCSegmentCollection::const_iterator dSiter=cscSegments->begin(); dSiter != cscSegments->end(); dSiter++) {
1082  CSCDetId id = (CSCDetId)(*dSiter).cscDetId();
1083  //
1084  // try to get the CSC recHits that contribute to this segment.
1085  std::vector<CSCRecHit2D> theseRecHits = (*dSiter).specificRecHits();
1086  int nRH = (*dSiter).nRecHits();
1087  int jRH = 0;
1088  CLHEP::HepMatrix sp(6,1);
1089  CLHEP::HepMatrix se(6,1);
1090  for ( vector<CSCRecHit2D>::const_iterator iRH = theseRecHits.begin(); iRH != theseRecHits.end(); iRH++) {
1091  jRH++;
1092  CSCDetId idRH = (CSCDetId)(*iRH).cscDetId();
1093  //int kEndcap = idRH.endcap();
1094  int kRing = idRH.ring();
1095  int kStation = idRH.station();
1096  //int kChamber = idRH.chamber();
1097  int kLayer = idRH.layer();
1098 
1100  int centerid = iRH->nStrips()/2 + 1;
1101  int centerStrip = iRH->channels(centerid - 1);
1102 
1103  // If this segment has 6 hits, find the position of each hit on the strip in units of stripwidth and store values
1104  if (nRH == 6){
1105  float stpos = (*iRH).positionWithinStrip();
1106  se(kLayer,1) = (*iRH).errorWithinStrip();
1107  // Take into account half-strip staggering of layers (ME1/1 has no staggering)
1108  if (kStation == 1 && (kRing == 1 || kRing == 4)) sp(kLayer,1) = stpos + centerStrip;
1109  else{
1110  if (kLayer == 1 || kLayer == 3 || kLayer == 5) sp(kLayer,1) = stpos + centerStrip;
1111  if (kLayer == 2 || kLayer == 4 || kLayer == 6) sp(kLayer,1) = stpos - 0.5 + centerStrip;
1112  }
1113  }
1114 
1115  }
1116 
1117 
1118 
1119  // Fit all points except layer 3, then compare expected value for layer 3 to reconstructed value
1120  // float residual = -99.; // used to fill always
1121  if (nRH == 6){
1122  float expected = fitX(sp,se);
1123  float residual = expected - sp(3,1);
1124 
1125  hSResid[typeIndex(id)-1]->Fill(residual); // fill here so stats make sense
1126  }
1127 
1128  // hSResid[typeIndex(id)-1]->Fill(residual); // used to fill here but then stats distorted by underflows
1129 
1130  } // end segment loop
1131 
1132 
1133 
1134 }
int layer() const
Definition: CSCDetId.h:61
int typeIndex(CSCDetId id, int flag=1)
float fitX(const CLHEP::HepMatrix &sp, const CLHEP::HepMatrix &ep)
static const std::string kLayer("layer")
int ring() const
Definition: CSCDetId.h:75
std::vector< MonitorElement * > hSResid
int station() const
Definition: CSCDetId.h:86
void CSCOfflineMonitor::doSegments ( edm::Handle< CSCSegmentCollection cscSegments,
edm::ESHandle< CSCGeometry cscGeom 
)
private

Definition at line 956 of file CSCOfflineMonitor.cc.

References CSCGeometry::chamber(), ChiSquaredProbability(), mps_fire::i, nhits, PV3DBase< T, PVType, FrameType >::phi(), mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::theta(), GeomDet::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

957  {
958 
959  // get CSC segment collection
960  int nSegments = cscSegments->size();
961 
962  for(CSCSegmentCollection::const_iterator dSiter=cscSegments->begin(); dSiter != cscSegments->end(); dSiter++) {
963  CSCDetId id = (CSCDetId)(*dSiter).cscDetId();
964  float chisq = (*dSiter).chi2();
965  int nhits = (*dSiter).nRecHits();
966  int nDOF = 2*nhits-4;
967  float nChi2 = chisq/nDOF;
968  double chisqProb = ChiSquaredProbability( (double)chisq, nDOF );
969  LocalPoint localPos = (*dSiter).localPosition();
970  LocalVector segDir = (*dSiter).localDirection();
971 
972  // prepare to calculate segment times
973  float timeCathode = 0; //average from cathode information alone
974  float timeAnode = 0; //average from pruned anode information alone
975  float timeCombined = 0; //average from cathode hits and pruned anode list
976  std::vector<float> cathodeTimes;
977  std::vector<float> anodeTimes;
978  // Get the CSC recHits that contribute to this segment.
979  std::vector<CSCRecHit2D> theseRecHits = (*dSiter).specificRecHits();
980  for ( vector<CSCRecHit2D>::const_iterator iRH = theseRecHits.begin(); iRH != theseRecHits.end(); iRH++) {
981  if ( !((*iRH).isValid()) ) continue; // only interested in valid hits
982  cathodeTimes.push_back((*iRH).tpeak());
983  anodeTimes.push_back((*iRH).wireTime());
984  }//end rechit loop
985 
986  // Calculate cathode average
987  for (unsigned int i=0; i<cathodeTimes.size(); i++)
988  timeCathode+=cathodeTimes[i]/cathodeTimes.size();
989 
990  // Prune the anode list to deal with the late tail
991  float anodeMaxDiff;
992  bool modified = false;
993  std::vector<float>::iterator anodeMaxHit;
994  do {
995  if (anodeTimes.empty()) continue;
996  timeAnode=0;
997  anodeMaxDiff=0;
998  modified=false;
999 
1000  // Find the average
1001  for (unsigned int j=0; j<anodeTimes.size(); j++) timeAnode+=anodeTimes[j]/anodeTimes.size();
1002 
1003  // Find the maximum outlier hit
1004  for (unsigned int j=0; j<anodeTimes.size(); j++) {
1005  if (fabs(anodeTimes[j]-timeAnode)>anodeMaxDiff) {
1006  anodeMaxHit=anodeTimes.begin()+j;
1007  anodeMaxDiff=fabs(anodeTimes[j]-timeAnode);
1008  }
1009  }
1010 
1011  // Cut hit if its greater than some time away
1012  if (anodeMaxDiff>26) {
1013  modified=true;
1014  anodeTimes.erase(anodeMaxHit);
1015  }
1016  } while (modified);
1017 
1018  // Calculate combined anode and cathode time average
1019  if(cathodeTimes.size()+anodeTimes.size() >0 )
1020  timeCombined = (timeCathode*cathodeTimes.size() + timeAnode*anodeTimes.size())/(cathodeTimes.size()+anodeTimes.size());
1021 
1022  // global transformation
1023  float globX = 0.;
1024  float globY = 0.;
1025  float globZ = 0.;
1026  float globTOF = 0.;
1027  float globTheta = 0.;
1028  float globPhi = 0.;
1029  const CSCChamber* cscchamber = cscGeom->chamber(id);
1030  if (cscchamber) {
1031  GlobalPoint globalPosition = cscchamber->toGlobal(localPos);
1032  globX = globalPosition.x();
1033  globY = globalPosition.y();
1034  globZ = globalPosition.z();
1035  globTOF = sqrt(globX*globX+globY*globY+globZ*globZ);
1036  GlobalVector globalDirection = cscchamber->toGlobal(segDir);
1037  globTheta = globalDirection.theta();
1038  globPhi = globalDirection.phi();
1039  }
1040 
1041  // Fill histos
1042  int tIndex = typeIndex(id);
1043  hSnhitsAll->Fill(nhits);
1044  hSnhits[tIndex-1]->Fill(nhits);
1045  hSChiSqAll->Fill(nChi2);
1046  hSChiSq[tIndex-1]->Fill(nChi2);
1047  hSChiSqProbAll->Fill(chisqProb);
1048  hSChiSqProb[tIndex-1]->Fill(chisqProb);
1049  hSGlobalTheta->Fill(globTheta);
1050  hSGlobalPhi->Fill(globPhi);
1051  hSTimeDiff->Fill(timeAnode-timeCathode);
1052  hSTimeDiffByChamberType[tIndex-1]->Fill(timeAnode-timeCathode);
1053  hSTimeAnode->Fill(timeAnode);
1054  hSTimeAnodeByChamberType[tIndex-1]->Fill(timeAnode);
1055  hSTimeCathode->Fill(timeCathode);
1056  hSTimeCathodeByChamberType[tIndex-1]->Fill(timeCathode);
1057  hSTimeCombined->Fill(timeCombined);
1058  hSTimeCombinedByChamberType[tIndex-1]->Fill(timeCombined);
1059  hSTimeDiffSerial->Fill(chamberSerial(id),timeAnode-timeCathode);
1060  hSTimeAnodeSerial->Fill(chamberSerial(id),timeAnode);
1061  hSTimeCathodeSerial->Fill(chamberSerial(id),timeCathode);
1062  hSTimeCombinedSerial->Fill(chamberSerial(id),timeCombined);
1063  hSTimeVsZ->Fill(globZ, timeCombined);
1064  hSTimeVsTOF->Fill(globTOF, timeCombined);
1065 
1066  } // end segment loop
1067 
1068  // if (nSegments == 0) nSegments = -1; // I see no point in doing this
1069  hSnSegments->Fill(nSegments);
1070 
1071 }
int chamberSerial(CSCDetId id)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
std::vector< MonitorElement * > hSChiSq
MonitorElement * hSTimeAnodeSerial
MonitorElement * hSTimeAnode
MonitorElement * hSGlobalPhi
void Fill(long long x)
std::vector< MonitorElement * > hSnhits
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
MonitorElement * hSnSegments
int typeIndex(CSCDetId id, int flag=1)
MonitorElement * hSnhitsAll
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
MonitorElement * hSGlobalTheta
MonitorElement * hSTimeDiffSerial
float ChiSquaredProbability(double chiSquared, double nrDOF)
MonitorElement * hSTimeCombined
std::vector< MonitorElement * > hSTimeAnodeByChamberType
MonitorElement * hSTimeVsZ
std::vector< MonitorElement * > hSTimeCathodeByChamberType
MonitorElement * hSChiSqAll
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
Definition: CSCGeometry.cc:118
MonitorElement * hSTimeDiff
std::vector< MonitorElement * > hSTimeDiffByChamberType
MonitorElement * hSTimeCathode
MonitorElement * hSTimeCathodeSerial
MonitorElement * hSTimeCombinedSerial
MonitorElement * hSTimeVsTOF
std::vector< MonitorElement * > hSChiSqProb
T x() const
Definition: PV3DBase.h:62
MonitorElement * hSChiSqProbAll
std::vector< MonitorElement * > hSTimeCombinedByChamberType
void CSCOfflineMonitor::doStripDigis ( edm::Handle< CSCStripDigiCollection strips)
private

Definition at line 794 of file CSCOfflineMonitor.cc.

References diffTreeTool::diff, objects.autophobj::float, and electronIdCutBased_cfi::threshold.

794  {
795 
796  int nStripsFired = 0;
797  for (CSCStripDigiCollection::DigiRangeIterator dSDiter=strips->begin(); dSDiter!=strips->end(); dSDiter++) {
798  CSCDetId id = (CSCDetId)(*dSDiter).first;
799  std::vector<CSCStripDigi>::const_iterator stripIter = (*dSDiter).second.first;
800  std::vector<CSCStripDigi>::const_iterator lStrip = (*dSDiter).second.second;
801  for( ; stripIter != lStrip; ++stripIter) {
802  int myStrip = stripIter->getStrip();
803  std::vector<int> myADCVals = stripIter->getADCCounts();
804  bool thisStripFired = false;
805  float thisPedestal = 0.5*(float)(myADCVals[0]+myADCVals[1]);
806  float threshold = 13.3 ;
807  float diff = 0.;
808  for (unsigned int iCount = 0; iCount < myADCVals.size(); iCount++) {
809  diff = (float)myADCVals[iCount]-thisPedestal;
810  if (diff > threshold) { thisStripFired = true; }
811  }
812  if (thisStripFired) {
813  nStripsFired++;
814  hStripNumber[typeIndex(id)-1]->Fill(myStrip);
815  }
816  }
817  } // end strip loop
818 
819  // this way you can zero suppress but still store info on # events with no digis
820  // Tim: I guess the above comment means 'zero suppress' because the hist range is from -0.5.
821  // But doing this means the hist statistics are broken. If the zero bin is high, just apply log scale?
822  // if (nStripsFired == 0) nStripsFired = -1;
823  hStripNFired->Fill(nStripsFired);
824  // fill n per event
825 
826 }
void Fill(long long x)
int typeIndex(CSCDetId id, int flag=1)
std::vector< MonitorElement * > hStripNumber
MonitorElement * hStripNFired
void CSCOfflineMonitor::doWireDigis ( edm::Handle< CSCWireDigiCollection wires)
private

Definition at line 764 of file CSCOfflineMonitor.cc.

764  {
765 
766  int nWireGroupsTotal = 0;
767  for (CSCWireDigiCollection::DigiRangeIterator dWDiter=wires->begin(); dWDiter!=wires->end(); dWDiter++) {
768  CSCDetId id = (CSCDetId)(*dWDiter).first;
769  std::vector<CSCWireDigi>::const_iterator wireIter = (*dWDiter).second.first;
770  std::vector<CSCWireDigi>::const_iterator lWire = (*dWDiter).second.second;
771  for( ; wireIter != lWire; ++wireIter) {
772  int myWire = wireIter->getWireGroup();
773  int myTBin = wireIter->getTimeBin();
774  nWireGroupsTotal++;
775  hWireTBin[typeIndex(id)-1]->Fill(myTBin);
776  hWireNumber[typeIndex(id)-1]->Fill(myWire);
777  }
778  } // end wire loop
779 
780  // this way you can zero suppress but still store info on # events with no digis
781  // Tim: I'm unhappy with that since it breaks hist statistics
782  // if (nWireGroupsTotal == 0) nWireGroupsTotal = -1;
783  hWirenGroupsTotal->Fill(nWireGroupsTotal);
784 
785 }
MonitorElement * hWirenGroupsTotal
std::vector< MonitorElement * > hWireNumber
void Fill(long long x)
int typeIndex(CSCDetId id, int flag=1)
std::vector< MonitorElement * > hWireTBin
double CSCOfflineMonitor::extrapolate1D ( double  initPosition,
double  initDirection,
double  parameterOfTheLine 
)
inlineprivate

Definition at line 134 of file CSCOfflineMonitor.h.

References relativeConstraints::ring, relativeConstraints::station, and withinSensitiveRegion().

134  {
135  double extrapolatedPosition = initPosition + initDirection*parameterOfTheLine;
136  return extrapolatedPosition;
137  }
void CSCOfflineMonitor::fillEfficiencyHistos ( int  bin,
int  flag 
)
private
float CSCOfflineMonitor::fitX ( const CLHEP::HepMatrix &  sp,
const CLHEP::HepMatrix &  ep 
)
private

Definition at line 1142 of file CSCOfflineMonitor.cc.

References delta, benchmark_cfg::errors, mps_fire::i, hiPixelPairStep_cff::points, S(), and slope.

1142  {
1143 
1144  float S = 0;
1145  float Sx = 0;
1146  float Sy = 0;
1147  float Sxx = 0;
1148  float Sxy = 0;
1149  float sigma2 = 0;
1150 
1151  for (int i=1;i<7;i++){
1152  if (i != 3){
1153  sigma2 = errors(i,1)*errors(i,1);
1154  S = S + (1/sigma2);
1155  Sy = Sy + (points(i,1)/sigma2);
1156  Sx = Sx + ((i)/sigma2);
1157  Sxx = Sxx + (i*i)/sigma2;
1158  Sxy = Sxy + (((i)*points(i,1))/sigma2);
1159  }
1160  }
1161 
1162  float delta = S*Sxx - Sx*Sx;
1163  float intercept = (Sxx*Sy - Sx*Sxy)/delta;
1164  float slope = (S*Sxy - Sx*Sy)/delta;
1165 
1166  return (intercept + slope*3);
1167 
1168 }
dbl * delta
Definition: mlp_gen.cc:36
static const double slope[3]
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:99
float CSCOfflineMonitor::getSignal ( const CSCStripDigiCollection stripdigis,
CSCDetId  idRH,
int  centerStrip 
)
private

Definition at line 1177 of file CSCOfflineMonitor.cc.

References objects.autophobj::float, reco::if(), and plotBeamSpotDB::last.

1178  {
1179 
1180  float SigADC[5];
1181  float TotalADC = 0;
1182  SigADC[0] = 0;
1183  SigADC[1] = 0;
1184  SigADC[2] = 0;
1185  SigADC[3] = 0;
1186  SigADC[4] = 0;
1187 
1188 
1189  // Loop over strip digis
1191 
1192  for (sIt = stripdigis.begin(); sIt != stripdigis.end(); sIt++){
1193  CSCDetId id = (CSCDetId)(*sIt).first;
1194  if (id == idCS){
1195 
1196  // First, find the Signal-Pedestal for center strip
1197  vector<CSCStripDigi>::const_iterator digiItr = (*sIt).second.first;
1198  vector<CSCStripDigi>::const_iterator last = (*sIt).second.second;
1199  for ( ; digiItr != last; ++digiItr ) {
1200  int thisStrip = digiItr->getStrip();
1201  if (thisStrip == (centerStrip)){
1202  std::vector<int> myADCVals = digiItr->getADCCounts();
1203  float thisPedestal = 0.5*(float)(myADCVals[0]+myADCVals[1]);
1204  float thisSignal = (myADCVals[2]+myADCVals[3]+myADCVals[4]+myADCVals[5]+myADCVals[6]+myADCVals[7]);
1205  SigADC[0] = thisSignal - 6*thisPedestal;
1206  }
1207  // Now,find the Signal-Pedestal for neighbouring 4 strips
1208  if (thisStrip == (centerStrip+1)){
1209  std::vector<int> myADCVals = digiItr->getADCCounts();
1210  float thisPedestal = 0.5*(float)(myADCVals[0]+myADCVals[1]);
1211  float thisSignal = (myADCVals[2]+myADCVals[3]+myADCVals[4]+myADCVals[5]+myADCVals[6]+myADCVals[7]);
1212  SigADC[1] = thisSignal - 6*thisPedestal;
1213  }
1214  if (thisStrip == (centerStrip+2)){
1215  std::vector<int> myADCVals = digiItr->getADCCounts();
1216  float thisPedestal = 0.5*(float)(myADCVals[0]+myADCVals[1]);
1217  float thisSignal = (myADCVals[2]+myADCVals[3]+myADCVals[4]+myADCVals[5]+myADCVals[6]+myADCVals[7]);
1218  SigADC[2] = thisSignal - 6*thisPedestal;
1219  }
1220  if (thisStrip == (centerStrip-1)){
1221  std::vector<int> myADCVals = digiItr->getADCCounts();
1222  float thisPedestal = 0.5*(float)(myADCVals[0]+myADCVals[1]);
1223  float thisSignal = (myADCVals[2]+myADCVals[3]+myADCVals[4]+myADCVals[5]+myADCVals[6]+myADCVals[7]);
1224  SigADC[3] = thisSignal - 6*thisPedestal;
1225  }
1226  if (thisStrip == (centerStrip-2)){
1227  std::vector<int> myADCVals = digiItr->getADCCounts();
1228  float thisPedestal = 0.5*(float)(myADCVals[0]+myADCVals[1]);
1229  float thisSignal = (myADCVals[2]+myADCVals[3]+myADCVals[4]+myADCVals[5]+myADCVals[6]+myADCVals[7]);
1230  SigADC[4] = thisSignal - 6*thisPedestal;
1231  }
1232  }
1233  TotalADC = 0.2*(SigADC[0]+SigADC[1]+SigADC[2]+SigADC[3]+SigADC[4]);
1234  }
1235  }
1236  return TotalADC;
1237 }
if(dp >Float(M_PI)) dp-
double CSCOfflineMonitor::lineParametrization ( double  z1Position,
double  z2Position,
double  z1Direction 
)
inlineprivate

Definition at line 129 of file CSCOfflineMonitor.h.

129  {
130  double parameterLine = (z2Position-z1Position)/z1Direction;
131  return parameterLine;
132  }
int CSCOfflineMonitor::typeIndex ( CSCDetId  id,
int  flag = 1 
)
private

Definition at line 1857 of file CSCOfflineMonitor.cc.

References makeMuonMisalignmentScenario::endcap, diffTreeTool::index, relativeConstraints::ring, and relativeConstraints::station.

1857  {
1858 
1859  // linearized index based on endcap, station, and ring
1860 
1861  if (flag == 1){
1862  int index = 0;
1863  if (id.station() == 1) index = id.ring();
1864  else index = id.station()*2 + id.ring();
1865  if (id.endcap() == 1) index = index + 10;
1866  if (id.endcap() == 2) index = 11 - index;
1867  return index;
1868  }
1869 
1870  else if (flag == 2){
1871  int index = 0;
1872  if (id.station() == 1 && id.ring() != 4) index = id.ring()+1;
1873  if (id.station() == 1 && id.ring() == 4) index = 1;
1874  if (id.station() != 1) index = id.station()*2 + id.ring();
1875  if (id.endcap() == 1) index = index + 10;
1876  if (id.endcap() == 2) index = 11 - index;
1877  return index;
1878  }
1879 
1880  else return 0;
1881 
1882 }
bool CSCOfflineMonitor::withinSensitiveRegion ( LocalPoint  localPos,
const std::array< const float, 4 > &  layerBounds,
int  station,
int  ring,
float  shiftFromEdge,
float  shiftFromDeadZone 
)
private

Definition at line 1756 of file CSCOfflineMonitor.cc.

References funct::abs(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by extrapolate1D().

1757  {
1758 //---- check if it is in a good local region (sensitive area - geometrical and HV boundaries excluded)
1759  bool pass = false;
1760 
1761  float y_center = 0.;
1762  double yUp = layerBounds[3] + y_center;
1763  double yDown = - layerBounds[3] + y_center;
1764  double xBound1Shifted = layerBounds[0] - shiftFromEdge;//
1765  double xBound2Shifted = layerBounds[1] - shiftFromEdge;//
1766  double lineSlope = (yUp - yDown)/(xBound2Shifted-xBound1Shifted);
1767  double lineConst = yUp - lineSlope*xBound2Shifted;
1768  double yBorder = lineSlope*abs(localPos.x()) + lineConst;
1769 
1770  //bool withinChamberOnly = false;// false = "good region"; true - boundaries only
1771  std::vector <float> deadZoneCenter(6);
1772  float cutZone = shiftFromDeadZone;//cm
1773  //---- hardcoded... not good
1774  if(station>1 && station<5){
1775  if(2==ring){
1776  deadZoneCenter[0]= -162.48 ;
1777  deadZoneCenter[1] = -81.8744;
1778  deadZoneCenter[2] = -21.18165;
1779  deadZoneCenter[3] = 39.51105;
1780  deadZoneCenter[4] = 100.2939;
1781  deadZoneCenter[5] = 160.58;
1782 
1783  if(localPos.y() >yBorder &&
1784  ((localPos.y()> deadZoneCenter[0] + cutZone && localPos.y()< deadZoneCenter[1] - cutZone) ||
1785  (localPos.y()> deadZoneCenter[1] + cutZone && localPos.y()< deadZoneCenter[2] - cutZone) ||
1786  (localPos.y()> deadZoneCenter[2] + cutZone && localPos.y()< deadZoneCenter[3] - cutZone) ||
1787  (localPos.y()> deadZoneCenter[3] + cutZone && localPos.y()< deadZoneCenter[4] - cutZone) ||
1788  (localPos.y()> deadZoneCenter[4] + cutZone && localPos.y()< deadZoneCenter[5] - cutZone))){
1789  pass = true;
1790  }
1791  }
1792  else if(1==ring){
1793  if(2==station){
1794  deadZoneCenter[0]= -95.80 ;
1795  deadZoneCenter[1] = -27.47;
1796  deadZoneCenter[2] = 33.67;
1797  deadZoneCenter[3] = 90.85;
1798  }
1799  else if(3==station){
1800  deadZoneCenter[0]= -89.305 ;
1801  deadZoneCenter[1] = -39.705;
1802  deadZoneCenter[2] = 20.195;
1803  deadZoneCenter[3] = 77.395;
1804  }
1805  else if(4==station){
1806  deadZoneCenter[0]= -75.645;
1807  deadZoneCenter[1] = -26.055;
1808  deadZoneCenter[2] = 23.855;
1809  deadZoneCenter[3] = 70.575;
1810  }
1811  if(localPos.y() >yBorder &&
1812  ((localPos.y()> deadZoneCenter[0] + cutZone && localPos.y()< deadZoneCenter[1] - cutZone) ||
1813  (localPos.y()> deadZoneCenter[1] + cutZone && localPos.y()< deadZoneCenter[2] - cutZone) ||
1814  (localPos.y()> deadZoneCenter[2] + cutZone && localPos.y()< deadZoneCenter[3] - cutZone))){
1815  pass = true;
1816  }
1817  }
1818  }
1819  else if(1==station){
1820  if(3==ring){
1821  deadZoneCenter[0]= -83.155 ;
1822  deadZoneCenter[1] = -22.7401;
1823  deadZoneCenter[2] = 27.86665;
1824  deadZoneCenter[3] = 81.005;
1825  if(localPos.y() > yBorder &&
1826  ((localPos.y()> deadZoneCenter[0] + cutZone && localPos.y()< deadZoneCenter[1] - cutZone) ||
1827  (localPos.y()> deadZoneCenter[1] + cutZone && localPos.y()< deadZoneCenter[2] - cutZone) ||
1828  (localPos.y()> deadZoneCenter[2] + cutZone && localPos.y()< deadZoneCenter[3] - cutZone))){
1829  pass = true;
1830  }
1831  }
1832  else if(2==ring){
1833  deadZoneCenter[0]= -86.285 ;
1834  deadZoneCenter[1] = -32.88305;
1835  deadZoneCenter[2] = 32.867423;
1836  deadZoneCenter[3] = 88.205;
1837  if(localPos.y() > (yBorder) &&
1838  ((localPos.y()> deadZoneCenter[0] + cutZone && localPos.y()< deadZoneCenter[1] - cutZone) ||
1839  (localPos.y()> deadZoneCenter[1] + cutZone && localPos.y()< deadZoneCenter[2] - cutZone) ||
1840  (localPos.y()> deadZoneCenter[2] + cutZone && localPos.y()< deadZoneCenter[3] - cutZone))){
1841  pass = true;
1842  }
1843  }
1844  else{
1845  deadZoneCenter[0]= -81.0;
1846  deadZoneCenter[1] = 81.0;
1847  if(localPos.y() > (yBorder) &&
1848  (localPos.y()> deadZoneCenter[0] + cutZone && localPos.y()< deadZoneCenter[1] - cutZone )){
1849  pass = true;
1850  }
1851  }
1852  }
1853  return pass;
1854 }
T y() const
Definition: PV3DBase.h:63
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

edm::EDGetTokenT<CSCALCTDigiCollection> CSCOfflineMonitor::al_token
private

Definition at line 93 of file CSCOfflineMonitor.h.

edm::EDGetTokenT<CSCCLCTDigiCollection> CSCOfflineMonitor::cl_token
private

Definition at line 94 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hALCTgetBX
private

Definition at line 227 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hALCTgetBX2Denominator
private

Definition at line 231 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hALCTgetBX2DNumerator
private

Definition at line 232 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hALCTgetBXSerial
private

Definition at line 228 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hALCTMatch
private

Definition at line 234 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hALCTMatch2Denominator
private

Definition at line 238 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hALCTMatch2DNumerator
private

Definition at line 239 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hALCTMatchSerial
private

Definition at line 235 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hCLCTL1A
private

Definition at line 241 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hCLCTL1A2Denominator
private

Definition at line 245 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hCLCTL1A2DNumerator
private

Definition at line 246 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hCLCTL1ASerial
private

Definition at line 242 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hCSCOccupancy
private

Definition at line 205 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hEffDenominator
private

Definition at line 223 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hORecHits
private

Definition at line 199 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hORecHitsSerial
private

Definition at line 203 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hOSegments
private

Definition at line 200 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hOSegmentsSerial
private

Definition at line 204 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hOStrips
private

Definition at line 197 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hOStripsAndWiresAndCLCT
private

Definition at line 198 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hOStripSerial
private

Definition at line 202 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hOWires
private

Definition at line 195 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hOWiresAndCLCT
private

Definition at line 196 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hOWireSerial
private

Definition at line 201 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hRHden
private

Definition at line 211 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hRHGlobal
private

Definition at line 158 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hRHnrechits
private

Definition at line 157 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hRHnum
private

Definition at line 210 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hRHRatioQ
private

Definition at line 162 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hRHSTE2
private

Definition at line 215 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hRHsterr
private

Definition at line 164 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hRHstpos
private

Definition at line 163 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hRHSumQ
private

Definition at line 159 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hRHTiming
private

Definition at line 160 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hRHTimingAnode
private

Definition at line 161 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hSChiSq
private

Definition at line 171 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSChiSqAll
private

Definition at line 170 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hSChiSqProb
private

Definition at line 173 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSChiSqProbAll
private

Definition at line 172 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSden
private

Definition at line 209 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSensitiveAreaEvt
private

Definition at line 224 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSGlobalPhi
private

Definition at line 175 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSGlobalTheta
private

Definition at line 174 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hSnhits
private

Definition at line 169 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSnhitsAll
private

Definition at line 168 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSnSegments
private

Definition at line 167 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSnum
private

Definition at line 208 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hSResid
private

Definition at line 192 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSSTE2
private

Definition at line 214 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeAnode
private

Definition at line 178 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hSTimeAnodeByChamberType
private

Definition at line 179 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeAnodeSerial
private

Definition at line 185 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeCathode
private

Definition at line 180 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hSTimeCathodeByChamberType
private

Definition at line 181 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeCathodeSerial
private

Definition at line 186 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeCombined
private

Definition at line 182 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hSTimeCombinedByChamberType
private

Definition at line 183 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeCombinedSerial
private

Definition at line 187 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeDiff
private

Definition at line 176 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hSTimeDiffByChamberType
private

Definition at line 177 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeDiffSerial
private

Definition at line 184 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeVsTOF
private

Definition at line 189 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hSTimeVsZ
private

Definition at line 188 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hStripNFired
private

Definition at line 152 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hStripNumber
private

Definition at line 153 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hStripPed
private

Definition at line 154 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hStripSTE2
private

Definition at line 216 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hWirenGroupsTotal
private

Definition at line 147 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hWireNumber
private

Definition at line 149 of file CSCOfflineMonitor.h.

MonitorElement* CSCOfflineMonitor::hWireSTE2
private

Definition at line 217 of file CSCOfflineMonitor.h.

std::vector<MonitorElement*> CSCOfflineMonitor::hWireTBin
private

Definition at line 148 of file CSCOfflineMonitor.h.

edm::ParameterSet CSCOfflineMonitor::param
private

Definition at line 88 of file CSCOfflineMonitor.h.

edm::EDGetTokenT<FEDRawDataCollection> CSCOfflineMonitor::rd_token
private

Definition at line 90 of file CSCOfflineMonitor.h.

edm::EDGetTokenT<CSCRecHit2DCollection> CSCOfflineMonitor::rh_token
private

Definition at line 95 of file CSCOfflineMonitor.h.

edm::EDGetTokenT<CSCStripDigiCollection> CSCOfflineMonitor::sd_token
private

Definition at line 92 of file CSCOfflineMonitor.h.

edm::EDGetTokenT<CSCSegmentCollection> CSCOfflineMonitor::se_token
private

Definition at line 96 of file CSCOfflineMonitor.h.

edm::EDGetTokenT<CSCWireDigiCollection> CSCOfflineMonitor::wd_token
private

Definition at line 91 of file CSCOfflineMonitor.h.