CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
CSCEfficiency Class Reference

#include <CSCEfficiency.h>

Inheritance diagram for CSCEfficiency:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  ChamberHistos
 
struct  StationHistos
 

Public Member Functions

 CSCEfficiency (const edm::ParameterSet &pset)
 Constructor. More...
 
 ~CSCEfficiency () override
 Destructor. More...
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilter () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

bool applyTrigger (edm::Handle< edm::TriggerResults > &hltR, const edm::TriggerNames &triggerNames)
 
void beginJob () override
 
void chamberCandidates (int station, int ring, float phi, std::vector< int > &coupleOfChambers)
 
bool checkLocal (double yLocal, double yBoundary, int station, int ring)
 
void chooseDirection (CLHEP::Hep3Vector &innerPosition, CLHEP::Hep3Vector &outerPosition)
 
bool efficienciesPerChamber (CSCDetId &id, const CSCChamber *cscChamber, FreeTrajectoryState &ftsChamber)
 
void endJob () override
 
double extrapolate1D (double initPosition, double initDirection, double parameterOfTheLine)
 
void fillDigiInfo (edm::Handle< CSCALCTDigiCollection > &alcts, edm::Handle< CSCCLCTDigiCollection > &clcts, edm::Handle< CSCCorrelatedLCTDigiCollection > &correlatedlcts, edm::Handle< CSCWireDigiCollection > &wires, edm::Handle< CSCStripDigiCollection > &strips, edm::Handle< edm::PSimHitContainer > &simhits, edm::Handle< CSCRecHit2DCollection > &rechits, edm::Handle< CSCSegmentCollection > &segments, edm::ESHandle< CSCGeometry > &cscGeom)
 
void fillLCT_info (edm::Handle< CSCALCTDigiCollection > &alcts, edm::Handle< CSCCLCTDigiCollection > &clcts, edm::Handle< CSCCorrelatedLCTDigiCollection > &correlatedlcts)
 
void fillRechitsSegments_info (edm::Handle< CSCRecHit2DCollection > &rechits, edm::Handle< CSCSegmentCollection > &segments, edm::ESHandle< CSCGeometry > &cscGeom)
 
void fillSimhit_info (edm::Handle< edm::PSimHitContainer > &simHits)
 
void fillStrips_info (edm::Handle< CSCStripDigiCollection > &strips)
 
void fillWG_info (edm::Handle< CSCWireDigiCollection > &wires, edm::ESHandle< CSCGeometry > &cscGeom)
 
bool filter (edm::Event &event, const edm::EventSetup &eventSetup) override
 
FreeTrajectoryState getFromCLHEP (const CLHEP::Hep3Vector &p3, const CLHEP::Hep3Vector &r3, int charge, const AlgebraicSymMatrix66 &cov, const MagneticField *field)
 
void getFromFTS (const FreeTrajectoryState &fts, CLHEP::Hep3Vector &p3, CLHEP::Hep3Vector &r3, int &charge, AlgebraicSymMatrix66 &cov)
 
bool inSensitiveLocalRegion (double xLocal, double yLocal, int station, int ring)
 
void linearExtrapolation (GlobalPoint initialPosition, GlobalVector initialDirection, float zSurface, std::vector< float > &posZY)
 
double lineParameter (double initZPosition, double destZPosition, double initZDirection)
 
TrajectoryStateOnSurface propagate (FreeTrajectoryState &ftsStart, const BoundPlane &bp)
 
const Propagatorpropagator (std::string propagatorName) const
 
bool recHitSegment_Efficiencies (CSCDetId &cscDetId, const CSCChamber *cscChamber, FreeTrajectoryState &ftsChamber)
 
bool recSimHitEfficiency (CSCDetId &id, FreeTrajectoryState &ftsChamber)
 
void returnTypes (CSCDetId &id, int &ec, int &st, int &rg, int &ch, int &secondRing)
 
void ringCandidates (int station, float absEta, std::map< std::string, bool > &chamberTypes)
 
bool stripWire_Efficiencies (CSCDetId &cscDetId, FreeTrajectoryState &ftsChamber)
 

Private Attributes

edm::EDGetTokenT< CSCALCTDigiCollectional_token
 
TH1F * ALCTPerEvent
 
bool allALCT [2][4][4][(36 - 1+1)]
 
bool allCLCT [2][4][4][(36 - 1+1)]
 
bool allCorrLCT [2][4][4][(36 - 1+1)]
 
std::vector< std::pair< LocalPoint, bool > > allRechits [2][4][4][(36 - 1+1)][6]
 
std::vector< std::pair< LocalPoint, LocalVector > > allSegments [2][4][4][(36 - 1+1)]
 
std::vector< std::pair< LocalPoint, int > > allSimhits [2][4][4][(36 - 1+1)][6]
 
std::vector< std::pair< int, float > > allStrips [2][4][4][(36 - 1+1)][6]
 
std::vector< std::pair< std::pair< int, float >, int > > allWG [2][4][4][(36 - 1+1)][6]
 
bool alongZ
 
bool andOr
 
bool applyIPangleCuts
 
struct CSCEfficiency::ChamberHistos ChHist [2][4][3][36 - 1+1]
 
edm::EDGetTokenT< CSCCLCTDigiCollectioncl_token
 
TH1F * CLCTPerEvent
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectionco_token
 
TH1F * DataFlow
 
double distanceFromDeadZone
 
bool emptyChambers [2][4][4][(36 - 1+1)]
 
edm::ESGetToken< CSCGeometry, MuonGeometryRecordgeomToken_
 
bool getAbsoluteEfficiency
 
edm::EDGetTokenT< edm::TriggerResultsht_token
 
bool isBeamdata
 
bool isData
 
bool isIPdata
 
double local_DX_DZ_Max
 
double local_DY_DZ_Max
 
double local_DY_DZ_Min
 
bool magField
 
double maxNormChi2
 
double maxP
 
double minP
 
unsigned int minTrackHits
 
std::vector< std::string > myTriggers
 
int nEventsAnalyzed
 
bool passTheEvent
 
std::vector< int > pointToTriggers
 
bool printalot
 
unsigned int printout_NEvents
 
TH1F * recHitsPerEvent
 
edm::EDGetTokenT< CSCRecHit2DCollectionrh_token
 
std::string rootFileName
 
edm::EDGetTokenT< CSCStripDigiCollectionsd_token
 
edm::EDGetTokenT< CSCSegmentCollectionse_token
 
TH1F * segmentsPerEvent
 
edm::EDGetTokenT< edm::PSimHitContainersh_token
 
struct CSCEfficiency::StationHistos StHist [2][4]
 
TFile * theFile
 
MuonServiceProxytheService
 
edm::EDGetTokenT< edm::View< reco::Track > > tk_token
 
TH1F * TriggersFired
 
bool useDigis
 
bool useTrigger
 
edm::EDGetTokenT< CSCWireDigiCollectionwd_token
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Efficiency calculations Stoyan Stoynev, Northwestern University

Definition at line 95 of file CSCEfficiency.h.

Constructor & Destructor Documentation

◆ CSCEfficiency()

CSCEfficiency::CSCEfficiency ( const edm::ParameterSet pset)

Constructor.

Definition at line 1645 of file CSCEfficiency.cc.

1645  {
1646  // const float Xmin = -70;
1647  //const float Xmax = 70;
1648  //const int nXbins = int(4.*(Xmax - Xmin));
1649  const float Ymin = -165;
1650  const float Ymax = 165;
1651  const int nYbins = int((Ymax - Ymin) / 2);
1652  const float Layer_min = -0.5;
1653  const float Layer_max = 9.5;
1654  const int nLayer_bins = int(Layer_max - Layer_min);
1655  //
1656 
1657  //---- Get the input parameters
1658  printout_NEvents = pset.getUntrackedParameter<unsigned int>("printout_NEvents", 0);
1659  rootFileName = pset.getUntrackedParameter<string>("rootFileName", "cscHists.root");
1660 
1661  isData = pset.getUntrackedParameter<bool>("runOnData", true); //
1662  isIPdata = pset.getUntrackedParameter<bool>("IPdata", false); //
1663  isBeamdata = pset.getUntrackedParameter<bool>("Beamdata", false); //
1664  getAbsoluteEfficiency = pset.getUntrackedParameter<bool>("getAbsoluteEfficiency", true); //
1665  useDigis = pset.getUntrackedParameter<bool>("useDigis", true); //
1666  distanceFromDeadZone = pset.getUntrackedParameter<double>("distanceFromDeadZone", 10.); //
1667  minP = pset.getUntrackedParameter<double>("minP", 20.); //
1668  maxP = pset.getUntrackedParameter<double>("maxP", 100.); //
1669  maxNormChi2 = pset.getUntrackedParameter<double>("maxNormChi2", 3.); //
1670  minTrackHits = pset.getUntrackedParameter<unsigned int>("minTrackHits", 10); //
1671 
1672  applyIPangleCuts = pset.getUntrackedParameter<bool>("applyIPangleCuts", false); //
1673  local_DY_DZ_Max = pset.getUntrackedParameter<double>("local_DY_DZ_Max", -0.1); //
1674  local_DY_DZ_Min = pset.getUntrackedParameter<double>("local_DY_DZ_Min", -0.8); //
1675  local_DX_DZ_Max = pset.getUntrackedParameter<double>("local_DX_DZ_Max", 0.2); //
1676 
1677  sd_token = consumes<CSCStripDigiCollection>(pset.getParameter<edm::InputTag>("stripDigiTag"));
1678  wd_token = consumes<CSCWireDigiCollection>(pset.getParameter<edm::InputTag>("wireDigiTag"));
1679  al_token = consumes<CSCALCTDigiCollection>(pset.getParameter<edm::InputTag>("alctDigiTag"));
1680  cl_token = consumes<CSCCLCTDigiCollection>(pset.getParameter<edm::InputTag>("clctDigiTag"));
1681  co_token = consumes<CSCCorrelatedLCTDigiCollection>(pset.getParameter<edm::InputTag>("corrlctDigiTag"));
1682  rh_token = consumes<CSCRecHit2DCollection>(pset.getParameter<edm::InputTag>("rechitTag"));
1683  se_token = consumes<CSCSegmentCollection>(pset.getParameter<edm::InputTag>("segmentTag"));
1684  tk_token = consumes<edm::View<reco::Track> >(pset.getParameter<edm::InputTag>("tracksTag"));
1685  sh_token = consumes<edm::PSimHitContainer>(pset.getParameter<edm::InputTag>("simHitTag"));
1686 
1687  geomToken_ = esConsumes<CSCGeometry, MuonGeometryRecord>();
1688 
1689  edm::ParameterSet serviceParameters = pset.getParameter<edm::ParameterSet>("ServiceParameters");
1690  // maybe use the service for getting magnetic field, propagators, etc. ...
1691  theService = new MuonServiceProxy(serviceParameters, consumesCollector());
1692 
1693  // Trigger
1694  useTrigger = pset.getUntrackedParameter<bool>("useTrigger", false);
1695 
1696  ht_token = consumes<edm::TriggerResults>(pset.getParameter<edm::InputTag>("HLTriggerResults"));
1697 
1698  myTriggers = pset.getParameter<std::vector<std::string> >("myTriggers");
1699  andOr = pset.getUntrackedParameter<bool>("andOr");
1700  pointToTriggers.clear();
1701 
1702  //---- set counter to zero
1703  nEventsAnalyzed = 0;
1704  //---- set presence of magnetic field
1705  magField = true;
1706  //
1707  std::string Path = "AllChambers/";
1708  std::string FullName;
1709  //---- File with output histograms
1710  theFile = new TFile(rootFileName.c_str(), "RECREATE");
1711  theFile->cd();
1712  //---- Book histograms for the analysis
1713  char SpecName[60];
1714 
1715  sprintf(SpecName, "DataFlow");
1716  DataFlow = new TH1F(SpecName, "Data flow;condition number;entries", 40, -0.5, 39.5);
1717  //
1718  sprintf(SpecName, "TriggersFired");
1719  TriggersFired = new TH1F(SpecName, "Triggers fired;trigger number;entries", 140, -0.5, 139.5);
1720  //
1721  int Chan = 50;
1722  float minChan = -0.5;
1723  float maxChan = 49.5;
1724  //
1725  sprintf(SpecName, "ALCTPerEvent");
1726  ALCTPerEvent = new TH1F(SpecName, "ALCTs per event;N digis;entries", Chan, minChan, maxChan);
1727  //
1728  sprintf(SpecName, "CLCTPerEvent");
1729  CLCTPerEvent = new TH1F(SpecName, "CLCTs per event;N digis;entries", Chan, minChan, maxChan);
1730  //
1731  sprintf(SpecName, "recHitsPerEvent");
1732  recHitsPerEvent = new TH1F(SpecName, "RecHits per event;N digis;entries", 150, -0.5, 149.5);
1733  //
1734  sprintf(SpecName, "segmentsPerEvent");
1735  segmentsPerEvent = new TH1F(SpecName, "segments per event;N digis;entries", Chan, minChan, maxChan);
1736  //
1737  //---- Book groups of histograms (for any chamber)
1738 
1739  map<std::string, bool>::iterator iter;
1740  for (int ec = 0; ec < 2; ++ec) {
1741  for (int st = 0; st < 4; ++st) {
1742  theFile->cd();
1743  sprintf(SpecName, "Stations__E%d_S%d", ec + 1, st + 1);
1744  theFile->mkdir(SpecName);
1745  theFile->cd(SpecName);
1746 
1747  //
1748  sprintf(SpecName, "segmentChi2_ndf_St%d", st + 1);
1749  StHist[ec][st].segmentChi2_ndf = new TH1F(SpecName, "Chi2/ndf of a segment;chi2/ndf;entries", 100, 0., 20.);
1750  //
1751  sprintf(SpecName, "hitsInSegment_St%d", st + 1);
1752  StHist[ec][st].hitsInSegment = new TH1F(SpecName, "Number of hits in a segment;nHits;entries", 7, -0.5, 6.5);
1753  //
1754  Chan = 170;
1755  minChan = 0.85;
1756  maxChan = 2.55;
1757  //
1758  sprintf(SpecName, "AllSegments_eta_St%d", st + 1);
1759  StHist[ec][st].AllSegments_eta = new TH1F(SpecName, "All segments in eta;eta;entries", Chan, minChan, maxChan);
1760  //
1761  sprintf(SpecName, "EfficientSegments_eta_St%d", st + 1);
1762  StHist[ec][st].EfficientSegments_eta =
1763  new TH1F(SpecName, "Efficient segments in eta;eta;entries", Chan, minChan, maxChan);
1764  //
1765  sprintf(SpecName, "ResidualSegments_St%d", st + 1);
1766  StHist[ec][st].ResidualSegments = new TH1F(SpecName, "Residual (segments);residual,cm;entries", 75, 0., 15.);
1767  //
1768  Chan = 200;
1769  minChan = -800.;
1770  maxChan = 800.;
1771  int Chan2 = 200;
1772  float minChan2 = -800.;
1773  float maxChan2 = 800.;
1774 
1775  sprintf(SpecName, "EfficientSegments_XY_St%d", st + 1);
1776  StHist[ec][st].EfficientSegments_XY =
1777  new TH2F(SpecName, "Efficient segments in XY;X;Y", Chan, minChan, maxChan, Chan2, minChan2, maxChan2);
1778  sprintf(SpecName, "InefficientSegments_XY_St%d", st + 1);
1779  StHist[ec][st].InefficientSegments_XY =
1780  new TH2F(SpecName, "Inefficient segments in XY;X;Y", Chan, minChan, maxChan, Chan2, minChan2, maxChan2);
1781  //
1782  Chan = 80;
1783  minChan = 0;
1784  maxChan = 3.2;
1785  sprintf(SpecName, "EfficientALCT_momTheta_St%d", st + 1);
1786  StHist[ec][st].EfficientALCT_momTheta =
1787  new TH1F(SpecName, "Efficient ALCT in theta (momentum);theta, rad;entries", Chan, minChan, maxChan);
1788  //
1789  sprintf(SpecName, "InefficientALCT_momTheta_St%d", st + 1);
1791  new TH1F(SpecName, "Inefficient ALCT in theta (momentum);theta, rad;entries", Chan, minChan, maxChan);
1792  //
1793  Chan = 160;
1794  minChan = -3.2;
1795  maxChan = 3.2;
1796  sprintf(SpecName, "EfficientCLCT_momPhi_St%d", st + 1);
1797  StHist[ec][st].EfficientCLCT_momPhi =
1798  new TH1F(SpecName, "Efficient CLCT in phi (momentum);phi, rad;entries", Chan, minChan, maxChan);
1799  //
1800  sprintf(SpecName, "InefficientCLCT_momPhi_St%d", st + 1);
1801  StHist[ec][st].InefficientCLCT_momPhi =
1802  new TH1F(SpecName, "Inefficient CLCT in phi (momentum);phi, rad;entries", Chan, minChan, maxChan);
1803  //
1804  theFile->cd();
1805  for (int rg = 0; rg < 3; ++rg) {
1806  if (0 != st && rg > 1) {
1807  continue;
1808  } else if (1 == rg && 3 == st) {
1809  continue;
1810  }
1811  for (int iChamber = FirstCh; iChamber < FirstCh + NumCh; iChamber++) {
1812  if (0 != st && 0 == rg && iChamber > 18) {
1813  continue;
1814  }
1815  theFile->cd();
1816  sprintf(SpecName, "Chambers__E%d_S%d_R%d_Chamber_%d", ec + 1, st + 1, rg + 1, iChamber);
1817  theFile->mkdir(SpecName);
1818  theFile->cd(SpecName);
1819  //
1820 
1821  sprintf(SpecName, "EfficientRechits_inSegment_Ch%d", iChamber);
1822  ChHist[ec][st][rg][iChamber - FirstCh].EfficientRechits_inSegment = new TH1F(
1823  SpecName, "Existing RecHit given a segment;layers (1-6);entries", nLayer_bins, Layer_min, Layer_max);
1824  //
1825  sprintf(SpecName, "InefficientSingleHits_Ch%d", iChamber);
1826  ChHist[ec][st][rg][iChamber - FirstCh].InefficientSingleHits = new TH1F(
1827  SpecName, "Single RecHits not in the segment;layers (1-6);entries ", nLayer_bins, Layer_min, Layer_max);
1828  //
1829  sprintf(SpecName, "AllSingleHits_Ch%d", iChamber);
1830  ChHist[ec][st][rg][iChamber - FirstCh].AllSingleHits = new TH1F(
1831  SpecName, "Single RecHits given a segment; layers (1-6);entries", nLayer_bins, Layer_min, Layer_max);
1832  //
1833  sprintf(SpecName, "digiAppearanceCount_Ch%d", iChamber);
1834  ChHist[ec][st][rg][iChamber - FirstCh].digiAppearanceCount =
1835  new TH1F(SpecName,
1836  "Digi appearance (no-yes): segment(0,1), ALCT(2,3), CLCT(4,5), CorrLCT(6,7); digi type;entries",
1837  8,
1838  -0.5,
1839  7.5);
1840  //
1841  Chan = 100;
1842  minChan = -1.1;
1843  maxChan = 0.9;
1844  sprintf(SpecName, "EfficientALCT_dydz_Ch%d", iChamber);
1845  ChHist[ec][st][rg][iChamber - FirstCh].EfficientALCT_dydz =
1846  new TH1F(SpecName, "Efficient ALCT; local dy/dz (ME 3 and 4 flipped);entries", Chan, minChan, maxChan);
1847  //
1848  sprintf(SpecName, "InefficientALCT_dydz_Ch%d", iChamber);
1849  ChHist[ec][st][rg][iChamber - FirstCh].InefficientALCT_dydz =
1850  new TH1F(SpecName, "Inefficient ALCT; local dy/dz (ME 3 and 4 flipped);entries", Chan, minChan, maxChan);
1851  //
1852  Chan = 100;
1853  minChan = -1.;
1854  maxChan = 1.0;
1855  sprintf(SpecName, "EfficientCLCT_dxdz_Ch%d", iChamber);
1856  ChHist[ec][st][rg][iChamber - FirstCh].EfficientCLCT_dxdz =
1857  new TH1F(SpecName, "Efficient CLCT; local dxdz;entries", Chan, minChan, maxChan);
1858  //
1859  sprintf(SpecName, "InefficientCLCT_dxdz_Ch%d", iChamber);
1860  ChHist[ec][st][rg][iChamber - FirstCh].InefficientCLCT_dxdz =
1861  new TH1F(SpecName, "Inefficient CLCT; local dxdz;entries", Chan, minChan, maxChan);
1862  //
1863  sprintf(SpecName, "EfficientRechits_good_Ch%d", iChamber);
1864  ChHist[ec][st][rg][iChamber - FirstCh].EfficientRechits_good = new TH1F(
1865  SpecName, "Existing RecHit - sensitive area only;layers (1-6);entries", nLayer_bins, Layer_min, Layer_max);
1866  //
1867  sprintf(SpecName, "EfficientStrips_Ch%d", iChamber);
1868  ChHist[ec][st][rg][iChamber - FirstCh].EfficientStrips =
1869  new TH1F(SpecName, "Existing strip;layer (1-6); entries", nLayer_bins, Layer_min, Layer_max);
1870  //
1871  sprintf(SpecName, "EfficientWireGroups_Ch%d", iChamber);
1872  ChHist[ec][st][rg][iChamber - FirstCh].EfficientWireGroups =
1873  new TH1F(SpecName, "Existing WireGroups;layer (1-6); entries ", nLayer_bins, Layer_min, Layer_max);
1874  //
1875  sprintf(SpecName, "StripWiresCorrelations_Ch%d", iChamber);
1876  ChHist[ec][st][rg][iChamber - FirstCh].StripWiresCorrelations =
1877  new TH1F(SpecName, "StripWire correlations;; entries ", 5, 0.5, 5.5);
1878  //
1879  Chan = 80;
1880  minChan = 0;
1881  maxChan = 3.2;
1882  sprintf(SpecName, "NoWires_momTheta_Ch%d", iChamber);
1883  ChHist[ec][st][rg][iChamber - FirstCh].NoWires_momTheta =
1884  new TH1F(SpecName,
1885  "No wires (all strips present) - in theta (momentum);theta, rad;entries",
1886  Chan,
1887  minChan,
1888  maxChan);
1889  //
1890  Chan = 160;
1891  minChan = -3.2;
1892  maxChan = 3.2;
1893  sprintf(SpecName, "NoStrips_momPhi_Ch%d", iChamber);
1894  ChHist[ec][st][rg][iChamber - FirstCh].NoStrips_momPhi = new TH1F(
1895  SpecName, "No strips (all wires present) - in phi (momentum);phi, rad;entries", Chan, minChan, maxChan);
1896  //
1897  for (int iLayer = 0; iLayer < 6; iLayer++) {
1898  sprintf(SpecName, "Y_InefficientRecHits_inSegment_Ch%d_L%d", iChamber, iLayer);
1899  ChHist[ec][st][rg][iChamber - FirstCh].Y_InefficientRecHits_inSegment.push_back(
1900  new TH1F(SpecName,
1901  "Missing RecHit/layer in a segment (local system, whole chamber);Y, cm; entries",
1902  nYbins,
1903  Ymin,
1904  Ymax));
1905  //
1906  sprintf(SpecName, "Y_EfficientRecHits_inSegment_Ch%d_L%d", iChamber, iLayer);
1907  ChHist[ec][st][rg][iChamber - FirstCh].Y_EfficientRecHits_inSegment.push_back(
1908  new TH1F(SpecName,
1909  "Efficient (extrapolated from the segment) RecHit/layer in a segment (local system, whole "
1910  "chamber);Y, cm; entries",
1911  nYbins,
1912  Ymin,
1913  Ymax));
1914  //
1915  Chan = 200;
1916  minChan = -0.2;
1917  maxChan = 0.2;
1918  sprintf(SpecName, "Phi_InefficientRecHits_inSegment_Ch%d_L%d", iChamber, iLayer);
1919  ChHist[ec][st][rg][iChamber - FirstCh].Phi_InefficientRecHits_inSegment.push_back(
1920  new TH1F(SpecName,
1921  "Missing RecHit/layer in a segment (local system, whole chamber);Phi, rad; entries",
1922  Chan,
1923  minChan,
1924  maxChan));
1925  //
1926  sprintf(SpecName, "Phi_EfficientRecHits_inSegment_Ch%d_L%d", iChamber, iLayer);
1927  ChHist[ec][st][rg][iChamber - FirstCh].Phi_EfficientRecHits_inSegment.push_back(
1928  new TH1F(SpecName,
1929  "Efficient (extrapolated from the segment) in a segment (local system, whole chamber);Phi, "
1930  "rad; entries",
1931  Chan,
1932  minChan,
1933  maxChan));
1934  }
1935  //
1936  sprintf(SpecName, "Sim_Rechits_Ch%d", iChamber);
1937  ChHist[ec][st][rg][iChamber - FirstCh].SimRechits =
1938  new TH1F(SpecName, "Existing RecHit (Sim);layers (1-6);entries", nLayer_bins, Layer_min, Layer_max);
1939  //
1940  sprintf(SpecName, "Sim_Simhits_Ch%d", iChamber);
1941  ChHist[ec][st][rg][iChamber - FirstCh].SimSimhits =
1942  new TH1F(SpecName, "Existing SimHit (Sim);layers (1-6);entries", nLayer_bins, Layer_min, Layer_max);
1943  //
1944  /*
1945  sprintf(SpecName,"Sim_Rechits_each_Ch%d",iChamber);
1946  ChHist[ec][st][rg][iChamber-FirstCh].SimRechits_each =
1947  new TH1F(SpecName,"Existing RecHit (Sim), each;layers (1-6);entries",nLayer_bins,Layer_min,Layer_max);
1948  //
1949  sprintf(SpecName,"Sim_Simhits_each_Ch%d",iChamber);
1950  ChHist[ec][st][rg][iChamber-FirstCh].SimSimhits_each =
1951  new TH1F(SpecName,"Existing SimHit (Sim), each;layers (1-6);entries",nLayer_bins,Layer_min,Layer_max);
1952  */
1953  theFile->cd();
1954  }
1955  }
1956  }
1957  }
1958 }

References PA_MinBiasSkim_cff::andOr, FirstCh, createfilelist::int, HLTBitAnalyser_cfi::isData, distMuonMETValueMapProducer_cff::maxNormChi2, RecoMuonValidator_cfi::maxP, alignBH_cfg::minP, HLT_FULL_cff::minTrackHits, MuonServiceProxy_cff::MuonServiceProxy, NumCh, mps_fire::Path, muonDTDigis_cfi::pset, CSCSkim_cfi::rootFileName, AlCaHLTBitMon_QueryRunRegistry::string, and interactiveExample::theFile.

◆ ~CSCEfficiency()

CSCEfficiency::~CSCEfficiency ( )
override

Destructor.

Definition at line 1961 of file CSCEfficiency.cc.

1961  {
1962  if (theService)
1963  delete theService;
1964  // Write the histos to a file
1965  theFile->cd();
1966  //
1967  char SpecName[60];
1968  std::vector<float> bins, Efficiency, EffError;
1969  std::vector<float> eff(2);
1970 
1971  //---- loop over chambers
1972  std::map<std::string, bool> chamberTypes;
1973  chamberTypes["ME11"] = false;
1974  chamberTypes["ME12"] = false;
1975  chamberTypes["ME13"] = false;
1976  chamberTypes["ME21"] = false;
1977  chamberTypes["ME22"] = false;
1978  chamberTypes["ME31"] = false;
1979  chamberTypes["ME32"] = false;
1980  chamberTypes["ME41"] = false;
1981 
1982  map<std::string, bool>::iterator iter;
1983  std::cout << " Writing proper histogram structure (patience)..." << std::endl;
1984  for (int ec = 0; ec < 2; ++ec) {
1985  for (int st = 0; st < 4; ++st) {
1986  snprintf(SpecName, sizeof(SpecName), "Stations__E%d_S%d", ec + 1, st + 1);
1987  theFile->cd(SpecName);
1988  StHist[ec][st].segmentChi2_ndf->Write();
1989  StHist[ec][st].hitsInSegment->Write();
1990  StHist[ec][st].AllSegments_eta->Write();
1991  StHist[ec][st].EfficientSegments_eta->Write();
1992  StHist[ec][st].ResidualSegments->Write();
1993  StHist[ec][st].EfficientSegments_XY->Write();
1994  StHist[ec][st].InefficientSegments_XY->Write();
1995  StHist[ec][st].EfficientALCT_momTheta->Write();
1996  StHist[ec][st].InefficientALCT_momTheta->Write();
1997  StHist[ec][st].EfficientCLCT_momPhi->Write();
1998  StHist[ec][st].InefficientCLCT_momPhi->Write();
1999  for (int rg = 0; rg < 3; ++rg) {
2000  if (0 != st && rg > 1) {
2001  continue;
2002  } else if (1 == rg && 3 == st) {
2003  continue;
2004  }
2005  for (int iChamber = FirstCh; iChamber < FirstCh + NumCh; iChamber++) {
2006  if (0 != st && 0 == rg && iChamber > 18) {
2007  continue;
2008  }
2009  snprintf(SpecName, sizeof(SpecName), "Chambers__E%d_S%d_R%d_Chamber_%d", ec + 1, st + 1, rg + 1, iChamber);
2010  theFile->cd(SpecName);
2011 
2012  ChHist[ec][st][rg][iChamber - FirstCh].EfficientRechits_inSegment->Write();
2013  ChHist[ec][st][rg][iChamber - FirstCh].AllSingleHits->Write();
2014  ChHist[ec][st][rg][iChamber - FirstCh].digiAppearanceCount->Write();
2015  ChHist[ec][st][rg][iChamber - FirstCh].EfficientALCT_dydz->Write();
2016  ChHist[ec][st][rg][iChamber - FirstCh].InefficientALCT_dydz->Write();
2017  ChHist[ec][st][rg][iChamber - FirstCh].EfficientCLCT_dxdz->Write();
2018  ChHist[ec][st][rg][iChamber - FirstCh].InefficientCLCT_dxdz->Write();
2019  ChHist[ec][st][rg][iChamber - FirstCh].InefficientSingleHits->Write();
2020  ChHist[ec][st][rg][iChamber - FirstCh].EfficientRechits_good->Write();
2021  ChHist[ec][st][rg][iChamber - FirstCh].EfficientStrips->Write();
2022  ChHist[ec][st][rg][iChamber - FirstCh].StripWiresCorrelations->Write();
2023  ChHist[ec][st][rg][iChamber - FirstCh].NoWires_momTheta->Write();
2024  ChHist[ec][st][rg][iChamber - FirstCh].NoStrips_momPhi->Write();
2025  ChHist[ec][st][rg][iChamber - FirstCh].EfficientWireGroups->Write();
2026  for (unsigned int iLayer = 0; iLayer < 6; iLayer++) {
2027  ChHist[ec][st][rg][iChamber - FirstCh].Y_InefficientRecHits_inSegment[iLayer]->Write();
2028  ChHist[ec][st][rg][iChamber - FirstCh].Y_EfficientRecHits_inSegment[iLayer]->Write();
2029  ChHist[ec][st][rg][iChamber - FirstCh].Phi_InefficientRecHits_inSegment[iLayer]->Write();
2030  ChHist[ec][st][rg][iChamber - FirstCh].Phi_EfficientRecHits_inSegment[iLayer]->Write();
2031  }
2032  ChHist[ec][st][rg][iChamber - FirstCh].SimRechits->Write();
2033  ChHist[ec][st][rg][iChamber - FirstCh].SimSimhits->Write();
2034  /*
2035  ChHist[ec][st][rg][iChamber-FirstCh].SimRechits_each->Write();
2036  ChHist[ec][st][rg][iChamber-FirstCh].SimSimhits_each->Write();
2037  */
2038  //
2039  theFile->cd(SpecName);
2040  theFile->cd();
2041  }
2042  }
2043  }
2044  }
2045  //
2046  snprintf(SpecName, sizeof(SpecName), "AllChambers");
2047  theFile->mkdir(SpecName);
2048  theFile->cd(SpecName);
2049  DataFlow->Write();
2050  TriggersFired->Write();
2051  ALCTPerEvent->Write();
2052  CLCTPerEvent->Write();
2053  recHitsPerEvent->Write();
2054  segmentsPerEvent->Write();
2055  //
2056  theFile->cd(SpecName);
2057  //---- Close the file
2058  theFile->Close();
2059 }

References trigObjTnPSource_cfi::bins, gather_cfg::cout, PixelTestBeamValidation_cfi::Efficiency, FirstCh, NumCh, and interactiveExample::theFile.

Member Function Documentation

◆ applyTrigger()

bool CSCEfficiency::applyTrigger ( edm::Handle< edm::TriggerResults > &  hltR,
const edm::TriggerNames triggerNames 
)
private

Definition at line 1566 of file CSCEfficiency.cc.

1566  {
1567  bool triggerPassed = true;
1568  std::vector<std::string> hlNames = triggerNames.triggerNames();
1569  pointToTriggers.clear();
1570  for (size_t imyT = 0; imyT < myTriggers.size(); ++imyT) {
1571  for (size_t iT = 0; iT < hlNames.size(); ++iT) {
1572  //std::cout<<" iT = "<<iT<<" hlNames[iT] = "<<hlNames[iT]<<
1573  //" : wasrun = "<<hltR->wasrun(iT)<<" accept = "<<
1574  // hltR->accept(iT)<<" !error = "<<
1575  // !hltR->error(iT)<<std::endl;
1576  if (!imyT) {
1577  if (hltR->wasrun(iT) && hltR->accept(iT) && !hltR->error(iT)) {
1578  TriggersFired->Fill(iT);
1579  }
1580  }
1581  if (hlNames[iT] == myTriggers[imyT]) {
1582  pointToTriggers.push_back(iT);
1583  if (imyT) {
1584  break;
1585  }
1586  }
1587  }
1588  }
1589  if (pointToTriggers.size() != myTriggers.size()) {
1590  pointToTriggers.clear();
1591  if (printalot) {
1592  std::cout << " Not all trigger names found - all trigger specifications will be ignored. Check your cfg file!"
1593  << std::endl;
1594  }
1595  } else {
1596  if (!pointToTriggers.empty()) {
1597  if (printalot) {
1598  std::cout << "The following triggers will be required in the event: " << std::endl;
1599  for (size_t imyT = 0; imyT < pointToTriggers.size(); ++imyT) {
1600  std::cout << " " << hlNames[pointToTriggers[imyT]];
1601  }
1602  std::cout << std::endl;
1603  std::cout << " in condition (AND/OR) : " << !andOr << "/" << andOr << std::endl;
1604  }
1605  }
1606  }
1607 
1608  if (hltR.isValid()) {
1609  if (pointToTriggers.empty()) {
1610  if (printalot) {
1611  std::cout
1612  << " No triggers specified in the configuration or all ignored - no trigger information will be considered"
1613  << std::endl;
1614  }
1615  }
1616  for (size_t imyT = 0; imyT < pointToTriggers.size(); ++imyT) {
1617  if (hltR->wasrun(pointToTriggers[imyT]) && hltR->accept(pointToTriggers[imyT]) &&
1618  !hltR->error(pointToTriggers[imyT])) {
1619  triggerPassed = true;
1620  if (andOr) {
1621  break;
1622  }
1623  } else {
1624  triggerPassed = false;
1625  if (!andOr) {
1626  triggerPassed = false;
1627  break;
1628  }
1629  }
1630  }
1631  } else {
1632  if (printalot) {
1633  std::cout << " TriggerResults handle returns invalid state?! No trigger information will be considered"
1634  << std::endl;
1635  }
1636  }
1637  if (printalot) {
1638  std::cout << " Trigger passed: " << triggerPassed << std::endl;
1639  }
1640  return triggerPassed;
1641 }

References edm::HLTGlobalStatus::accept(), PA_MinBiasSkim_cff::andOr, gather_cfg::cout, edm::HLTGlobalStatus::error(), edm::HandleBase::isValid(), L1TEGammaOffline_cfi::triggerNames, and edm::HLTGlobalStatus::wasrun().

◆ beginJob()

void CSCEfficiency::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 2062 of file CSCEfficiency.cc.

2062 {}

◆ chamberCandidates()

void CSCEfficiency::chamberCandidates ( int  station,
int  ring,
float  phi,
std::vector< int > &  coupleOfChambers 
)
private

Definition at line 1016 of file CSCEfficiency.cc.

1016  {
1017  coupleOfChambers.clear();
1018  // -pi< phi<+pi
1019  float phi_zero = 0.; // check! the phi at the "edge" of Ch 1
1020  float phi_const = 2. * M_PI / 36.;
1021  int last_chamber = 36;
1022  int first_chamber = 1;
1023  if (1 != station && 1 == ring) { // 18 chambers in the ring
1024  phi_const *= 2;
1025  last_chamber /= 2;
1026  }
1027  if (phi < 0.) {
1028  if (printalot)
1029  std::cout << " info: negative phi = " << phi << std::endl;
1030  phi += 2 * M_PI;
1031  }
1032  float chamber_float = (phi - phi_zero) / phi_const;
1033  int chamber_int = int(chamber_float);
1034  if (chamber_float - float(chamber_int) - 0.5 < 0.) {
1035  if (0 != chamber_int) {
1036  coupleOfChambers.push_back(chamber_int);
1037  } else {
1038  coupleOfChambers.push_back(last_chamber);
1039  }
1040  coupleOfChambers.push_back(chamber_int + 1);
1041 
1042  } else {
1043  coupleOfChambers.push_back(chamber_int + 1);
1044  if (last_chamber != chamber_int + 1) {
1045  coupleOfChambers.push_back(chamber_int + 2);
1046  } else {
1047  coupleOfChambers.push_back(first_chamber);
1048  }
1049  }
1050  if (printalot)
1051  std::cout << " phi = " << phi << " phi_zero = " << phi_zero << " phi_const = " << phi_const
1052  << " candidate chambers: first ch = " << coupleOfChambers[0] << " second ch = " << coupleOfChambers[1]
1053  << std::endl;
1054 }

References gather_cfg::cout, createfilelist::int, M_PI, relativeConstraints::ring, and relativeConstraints::station.

◆ checkLocal()

bool CSCEfficiency::checkLocal ( double  yLocal,
double  yBoundary,
int  station,
int  ring 
)
private

Definition at line 605 of file CSCEfficiency.cc.

605  {
606  //---- check if it is in a good local region (sensitive area - geometrical and HV boundaries excluded)
607  bool pass = false;
608  std::vector<float> deadZoneCenter(6);
609  const float deadZoneHalf = 0.32 * 7 / 2; // wire spacing * (wires missing + 1)/2
610  float cutZone = deadZoneHalf + distanceFromDeadZone; //cm
611  //---- hardcoded... not good
612  if (station > 1 && station < 5) {
613  if (2 == ring) {
614  deadZoneCenter[0] = -162.48;
615  deadZoneCenter[1] = -81.8744;
616  deadZoneCenter[2] = -21.18165;
617  deadZoneCenter[3] = 39.51105;
618  deadZoneCenter[4] = 100.2939;
619  deadZoneCenter[5] = 160.58;
620 
621  if (yLocal > yBoundary && ((yLocal > deadZoneCenter[0] + cutZone && yLocal < deadZoneCenter[1] - cutZone) ||
622  (yLocal > deadZoneCenter[1] + cutZone && yLocal < deadZoneCenter[2] - cutZone) ||
623  (yLocal > deadZoneCenter[2] + cutZone && yLocal < deadZoneCenter[3] - cutZone) ||
624  (yLocal > deadZoneCenter[3] + cutZone && yLocal < deadZoneCenter[4] - cutZone) ||
625  (yLocal > deadZoneCenter[4] + cutZone && yLocal < deadZoneCenter[5] - cutZone))) {
626  pass = true;
627  }
628  } else if (1 == ring) {
629  if (2 == station) {
630  deadZoneCenter[0] = -95.94;
631  deadZoneCenter[1] = -27.47;
632  deadZoneCenter[2] = 33.67;
633  deadZoneCenter[3] = 93.72;
634  } else if (3 == station) {
635  deadZoneCenter[0] = -85.97;
636  deadZoneCenter[1] = -36.21;
637  deadZoneCenter[2] = 23.68;
638  deadZoneCenter[3] = 84.04;
639  } else if (4 == station) {
640  deadZoneCenter[0] = -75.82;
641  deadZoneCenter[1] = -26.14;
642  deadZoneCenter[2] = 23.85;
643  deadZoneCenter[3] = 73.91;
644  }
645  if (yLocal > yBoundary && ((yLocal > deadZoneCenter[0] + cutZone && yLocal < deadZoneCenter[1] - cutZone) ||
646  (yLocal > deadZoneCenter[1] + cutZone && yLocal < deadZoneCenter[2] - cutZone) ||
647  (yLocal > deadZoneCenter[2] + cutZone && yLocal < deadZoneCenter[3] - cutZone))) {
648  pass = true;
649  }
650  }
651  } else if (1 == station) {
652  if (3 == ring) {
653  deadZoneCenter[0] = -83.155;
654  deadZoneCenter[1] = -22.7401;
655  deadZoneCenter[2] = 27.86665;
656  deadZoneCenter[3] = 81.005;
657  if (yLocal > yBoundary && ((yLocal > deadZoneCenter[0] + cutZone && yLocal < deadZoneCenter[1] - cutZone) ||
658  (yLocal > deadZoneCenter[1] + cutZone && yLocal < deadZoneCenter[2] - cutZone) ||
659  (yLocal > deadZoneCenter[2] + cutZone && yLocal < deadZoneCenter[3] - cutZone))) {
660  pass = true;
661  }
662  } else if (2 == ring) {
663  deadZoneCenter[0] = -86.285;
664  deadZoneCenter[1] = -32.88305;
665  deadZoneCenter[2] = 32.867423;
666  deadZoneCenter[3] = 88.205;
667  if (yLocal > (yBoundary) && ((yLocal > deadZoneCenter[0] + cutZone && yLocal < deadZoneCenter[1] - cutZone) ||
668  (yLocal > deadZoneCenter[1] + cutZone && yLocal < deadZoneCenter[2] - cutZone) ||
669  (yLocal > deadZoneCenter[2] + cutZone && yLocal < deadZoneCenter[3] - cutZone))) {
670  pass = true;
671  }
672  } else {
673  deadZoneCenter[0] = -81.0;
674  deadZoneCenter[1] = 81.0;
675  if (yLocal > (yBoundary) && ((yLocal > deadZoneCenter[0] + cutZone && yLocal < deadZoneCenter[1] - cutZone))) {
676  pass = true;
677  }
678  }
679  }
680  return pass;
681 }

References relativeConstraints::ring, and relativeConstraints::station.

◆ chooseDirection()

void CSCEfficiency::chooseDirection ( CLHEP::Hep3Vector &  innerPosition,
CLHEP::Hep3Vector &  outerPosition 
)
private

Definition at line 1512 of file CSCEfficiency.cc.

1512  {
1513  //---- Be careful with trigger conditions too
1514  if (!isIPdata) {
1515  float dy = outerPosition.y() - innerPosition.y();
1516  float dz = outerPosition.z() - innerPosition.z();
1517  if (isBeamdata) {
1518  if (dz > 0) {
1519  alongZ = true;
1520  } else {
1521  alongZ = false;
1522  }
1523  } else { //cosmics
1524  if (dy / dz > 0) {
1525  alongZ = false;
1526  } else {
1527  alongZ = true;
1528  }
1529  }
1530  }
1531 }

References PVValHelper::dy, and PVValHelper::dz.

◆ efficienciesPerChamber()

bool CSCEfficiency::efficienciesPerChamber ( CSCDetId id,
const CSCChamber cscChamber,
FreeTrajectoryState ftsChamber 
)
private

Definition at line 1057 of file CSCEfficiency.cc.

1059  {
1060  int ec, st, rg, ch, secondRing;
1061  returnTypes(id, ec, st, rg, ch, secondRing);
1062 
1063  LocalVector localDir = cscChamber->toLocal(ftsChamber.momentum());
1064  if (printalot) {
1065  std::cout << " global dir = " << ftsChamber.momentum() << std::endl;
1066  std::cout << " local dir = " << localDir << std::endl;
1067  std::cout << " local theta = " << localDir.theta() << std::endl;
1068  }
1069  float dxdz = localDir.x() / localDir.z();
1070  float dydz = localDir.y() / localDir.z();
1071  if (2 == st || 3 == st) {
1072  if (printalot) {
1073  std::cout << "st 3 or 4 ... flip dy/dz" << std::endl;
1074  }
1075  dydz = -dydz;
1076  }
1077  if (printalot) {
1078  std::cout << "dy/dz = " << dydz << std::endl;
1079  }
1080  // Apply angle cut
1081  bool out = true;
1082  if (applyIPangleCuts) {
1083  if (dydz > local_DY_DZ_Max || dydz < local_DY_DZ_Min || fabs(dxdz) > local_DX_DZ_Max) {
1084  out = false;
1085  }
1086  }
1087 
1088  // Segments
1089  bool firstCondition = !allSegments[ec][st][rg][ch].empty() ? true : false;
1090  bool secondCondition = false;
1091  //---- ME1 is special as usual - ME1a and ME1b are actually one chamber
1092  if (secondRing > -1) {
1093  secondCondition = !allSegments[ec][st][secondRing][ch].empty() ? true : false;
1094  }
1095  if (firstCondition || secondCondition) {
1096  if (out) {
1097  ChHist[ec][st][rg][ch].digiAppearanceCount->Fill(1);
1098  }
1099  } else {
1100  if (out) {
1101  ChHist[ec][st][rg][ch].digiAppearanceCount->Fill(0);
1102  }
1103  }
1104 
1105  if (useDigis) {
1106  // ALCTs
1107  firstCondition = allALCT[ec][st][rg][ch];
1108  secondCondition = false;
1109  if (secondRing > -1) {
1110  secondCondition = allALCT[ec][st][secondRing][ch];
1111  }
1112  if (firstCondition || secondCondition) {
1113  if (out) {
1114  ChHist[ec][st][rg][ch].digiAppearanceCount->Fill(3);
1115  }
1116  // always apply partial angle cuts for this kind of histos
1117  if (fabs(dxdz) < local_DX_DZ_Max) {
1118  StHist[ec][st].EfficientALCT_momTheta->Fill(ftsChamber.momentum().theta());
1119  ChHist[ec][st][rg][ch].EfficientALCT_dydz->Fill(dydz);
1120  }
1121  } else {
1122  if (out) {
1123  ChHist[ec][st][rg][ch].digiAppearanceCount->Fill(2);
1124  }
1125  if (fabs(dxdz) < local_DX_DZ_Max) {
1126  StHist[ec][st].InefficientALCT_momTheta->Fill(ftsChamber.momentum().theta());
1127  ChHist[ec][st][rg][ch].InefficientALCT_dydz->Fill(dydz);
1128  }
1129  if (printalot) {
1130  std::cout << " missing ALCT (dy/dz = " << dydz << ")";
1131  printf("\t\tendcap/station/ring/chamber: %i/%i/%i/%i\n", ec + 1, st + 1, rg + 1, ch + 1);
1132  }
1133  }
1134 
1135  // CLCTs
1136  firstCondition = allCLCT[ec][st][rg][ch];
1137  secondCondition = false;
1138  if (secondRing > -1) {
1139  secondCondition = allCLCT[ec][st][secondRing][ch];
1140  }
1141  if (firstCondition || secondCondition) {
1142  if (out) {
1143  ChHist[ec][st][rg][ch].digiAppearanceCount->Fill(5);
1144  }
1145  if (dydz < local_DY_DZ_Max && dydz > local_DY_DZ_Min) {
1146  StHist[ec][st].EfficientCLCT_momPhi->Fill(ftsChamber.momentum().phi()); // - phi chamber...
1147  ChHist[ec][st][rg][ch].EfficientCLCT_dxdz->Fill(dxdz);
1148  }
1149  } else {
1150  if (out) {
1151  ChHist[ec][st][rg][ch].digiAppearanceCount->Fill(4);
1152  }
1153  if (dydz < local_DY_DZ_Max && dydz > local_DY_DZ_Min) {
1154  StHist[ec][st].InefficientCLCT_momPhi->Fill(ftsChamber.momentum().phi()); // - phi chamber...
1155  ChHist[ec][st][rg][ch].InefficientCLCT_dxdz->Fill(dxdz);
1156  }
1157  if (printalot) {
1158  std::cout << " missing CLCT (dx/dz = " << dxdz << ")";
1159  printf("\t\tendcap/station/ring/chamber: %i/%i/%i/%i\n", ec + 1, st + 1, rg + 1, ch + 1);
1160  }
1161  }
1162  if (out) {
1163  // CorrLCTs
1164  firstCondition = allCorrLCT[ec][st][rg][ch];
1165  secondCondition = false;
1166  if (secondRing > -1) {
1167  secondCondition = allCorrLCT[ec][st][secondRing][ch];
1168  }
1169  if (firstCondition || secondCondition) {
1170  ChHist[ec][st][rg][ch].digiAppearanceCount->Fill(7);
1171  } else {
1172  ChHist[ec][st][rg][ch].digiAppearanceCount->Fill(6);
1173  }
1174  }
1175  }
1176  return out;
1177 }

References gather_cfg::cout, BeamSpotPI::dxdz, BeamSpotPI::dydz, FreeTrajectoryState::momentum(), MillePedeFileConverter_cfg::out, PV3DBase< T, PVType, FrameType >::phi(), PV3DBase< T, PVType, FrameType >::theta(), GeomDet::toLocal(), funct::true, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ endJob()

void CSCEfficiency::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 2065 of file CSCEfficiency.cc.

2065 {}

◆ extrapolate1D()

double CSCEfficiency::extrapolate1D ( double  initPosition,
double  initDirection,
double  parameterOfTheLine 
)
private

Definition at line 1502 of file CSCEfficiency.cc.

1502  {
1503  double extrapolatedPosition = initPosition + initDirection * parameterOfTheLine;
1504  return extrapolatedPosition;
1505 }

◆ fillDigiInfo()

void CSCEfficiency::fillDigiInfo ( edm::Handle< CSCALCTDigiCollection > &  alcts,
edm::Handle< CSCCLCTDigiCollection > &  clcts,
edm::Handle< CSCCorrelatedLCTDigiCollection > &  correlatedlcts,
edm::Handle< CSCWireDigiCollection > &  wires,
edm::Handle< CSCStripDigiCollection > &  strips,
edm::Handle< edm::PSimHitContainer > &  simhits,
edm::Handle< CSCRecHit2DCollection > &  rechits,
edm::Handle< CSCSegmentCollection > &  segments,
edm::ESHandle< CSCGeometry > &  cscGeom 
)
private

Definition at line 683 of file CSCEfficiency.cc.

691  {
692  for (int iE = 0; iE < 2; iE++) {
693  for (int iS = 0; iS < 4; iS++) {
694  for (int iR = 0; iR < 4; iR++) {
695  for (int iC = 0; iC < NumCh; iC++) {
696  allSegments[iE][iS][iR][iC].clear();
697  allCLCT[iE][iS][iR][iC] = allALCT[iE][iS][iR][iC] = allCorrLCT[iE][iS][iR][iC] = false;
698  for (int iL = 0; iL < 6; iL++) {
699  allStrips[iE][iS][iR][iC][iL].clear();
700  allWG[iE][iS][iR][iC][iL].clear();
701  allRechits[iE][iS][iR][iC][iL].clear();
702  allSimhits[iE][iS][iR][iC][iL].clear();
703  }
704  }
705  }
706  }
707  }
708  //
709  if (useDigis) {
710  fillLCT_info(alcts, clcts, correlatedlcts);
711  fillWG_info(wires, cscGeom);
713  }
714  fillRechitsSegments_info(rechits, segments, cscGeom);
715  if (!isData) {
717  }
718 }

References HLTBitAnalyser_cfi::isData, NumCh, HI_PhotonSkim_cff::rechits, HLTBitAnalyser_cfi::simhits, DigiDM_cff::strips, and DigiDM_cff::wires.

◆ fillLCT_info()

void CSCEfficiency::fillLCT_info ( edm::Handle< CSCALCTDigiCollection > &  alcts,
edm::Handle< CSCCLCTDigiCollection > &  clcts,
edm::Handle< CSCCorrelatedLCTDigiCollection > &  correlatedlcts 
)
private

Definition at line 720 of file CSCEfficiency.cc.

722  {
723  //---- ALCTDigis
724  int nSize = 0;
725  for (CSCALCTDigiCollection::DigiRangeIterator j = alcts->begin(); j != alcts->end(); j++) {
726  ++nSize;
727  const CSCDetId &id = (*j).first;
728  const CSCALCTDigiCollection::Range &range = (*j).second;
729  for (CSCALCTDigiCollection::const_iterator digiIt = range.first; digiIt != range.second; ++digiIt) {
730  // Valid digi in the chamber (or in neighbouring chamber)
731  if ((*digiIt).isValid()) {
732  allALCT[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - FirstCh] = true;
733  }
734  } // for digis in layer
735  } // end of for (j=...
736  ALCTPerEvent->Fill(nSize);
737  //---- CLCTDigis
738  nSize = 0;
739  for (CSCCLCTDigiCollection::DigiRangeIterator j = clcts->begin(); j != clcts->end(); j++) {
740  ++nSize;
741  const CSCDetId &id = (*j).first;
742  std::vector<CSCCLCTDigi>::const_iterator digiIt = (*j).second.first;
743  std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
744  for (; digiIt != last; ++digiIt) {
745  // Valid digi in the chamber (or in neighbouring chamber)
746  if ((*digiIt).isValid()) {
747  allCLCT[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - FirstCh] = true;
748  }
749  }
750  }
751  CLCTPerEvent->Fill(nSize);
752  //---- CorrLCTDigis
753  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j = correlatedlcts->begin(); j != correlatedlcts->end(); j++) {
754  const CSCDetId &id = (*j).first;
755  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiIt = (*j).second.first;
756  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
757  for (; digiIt != last; ++digiIt) {
758  // Valid digi in the chamber (or in neighbouring chamber)
759  if ((*digiIt).isValid()) {
760  allCorrLCT[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - FirstCh] = true;
761  }
762  }
763  }
764 }

References FirstCh, dqmiolumiharvest::j, dqmdumpme::last, and FastTimerService_cff::range.

◆ fillRechitsSegments_info()

void CSCEfficiency::fillRechitsSegments_info ( edm::Handle< CSCRecHit2DCollection > &  rechits,
edm::Handle< CSCSegmentCollection > &  segments,
edm::ESHandle< CSCGeometry > &  cscGeom 
)
private

Definition at line 843 of file CSCEfficiency.cc.

845  {
846  //---- RECHITS AND SEGMENTS
847  //---- Loop over rechits
848  if (printalot) {
849  //printf("\tGet the recHits collection.\t ");
850  printf(" The size of the rechit collection is %i\n", int(rechits->size()));
851  //printf("\t...start loop over rechits...\n");
852  }
853  recHitsPerEvent->Fill(rechits->size());
854  //---- Build iterator for rechits and loop :
856  for (recIt = rechits->begin(); recIt != rechits->end(); recIt++) {
857  //---- Find chamber with rechits in CSC
858  CSCDetId id = (CSCDetId)(*recIt).cscDetId();
859  if (printalot) {
860  const CSCLayer *csclayer = cscGeom->layer(id);
861  LocalPoint rhitlocal = (*recIt).localPosition();
862  LocalError rerrlocal = (*recIt).localPositionError();
863  GlobalPoint rhitglobal = csclayer->toGlobal(rhitlocal);
864  printf("\t\tendcap/station/ring/chamber/layer: %i/%i/%i/%i/%i\n",
865  id.endcap(),
866  id.station(),
867  id.ring(),
868  id.chamber(),
869  id.layer());
870  printf("\t\tx,y,z: %f, %f, %f\texx,eey,exy: %f, %f, %f\tglobal x,y,z: %f, %f, %f \n",
871  rhitlocal.x(),
872  rhitlocal.y(),
873  rhitlocal.z(),
874  rerrlocal.xx(),
875  rerrlocal.yy(),
876  rerrlocal.xy(),
877  rhitglobal.x(),
878  rhitglobal.y(),
879  rhitglobal.z());
880  }
881  std::pair<LocalPoint, bool> recHitPos((*recIt).localPosition(), false);
882  allRechits[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - FirstCh][id.layer() - 1].push_back(
883  recHitPos);
884  }
885  //---- "Empty" chambers
886  for (int iE = 0; iE < 2; iE++) {
887  for (int iS = 0; iS < 4; iS++) {
888  for (int iR = 0; iR < 4; iR++) {
889  for (int iC = 0; iC < NumCh; iC++) {
890  int numLayers = 0;
891  for (int iL = 0; iL < 6; iL++) {
892  if (!allRechits[iE][iS][iR][iC][iL].empty()) {
893  ++numLayers;
894  }
895  }
896  if (numLayers > 1) {
897  emptyChambers[iE][iS][iR][iC] = false;
898  } else {
899  emptyChambers[iE][iS][iR][iC] = true;
900  }
901  }
902  }
903  }
904  }
905 
906  //
907  if (printalot) {
908  printf(" The size of the segment collection is %i\n", int(segments->size()));
909  //printf("\t...start loop over segments...\n");
910  }
911  segmentsPerEvent->Fill(segments->size());
912  for (CSCSegmentCollection::const_iterator it = segments->begin(); it != segments->end(); it++) {
913  CSCDetId id = (CSCDetId)(*it).cscDetId();
914  StHist[id.endcap() - 1][id.station() - 1].segmentChi2_ndf->Fill((*it).chi2() / (*it).degreesOfFreedom());
915  StHist[id.endcap() - 1][id.station() - 1].hitsInSegment->Fill((*it).nRecHits());
916  if (printalot) {
917  printf("\tendcap/station/ring/chamber: %i %i %i %i\n", id.endcap(), id.station(), id.ring(), id.chamber());
918  std::cout << "\tposition(loc) = " << (*it).localPosition() << " error(loc) = " << (*it).localPositionError()
919  << std::endl;
920  std::cout << "\t chi2/ndf = " << (*it).chi2() / (*it).degreesOfFreedom() << " nhits = " << (*it).nRecHits()
921  << std::endl;
922  }
923  allSegments[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - FirstCh].push_back(
924  make_pair((*it).localPosition(), (*it).localDirection()));
925 
926  //---- try to get the CSC recHits that contribute to this segment.
927  //if (printalot) printf("\tGet the recHits for this segment.\t");
928  std::vector<CSCRecHit2D> theseRecHits = (*it).specificRecHits();
929  int nRH = (*it).nRecHits();
930  if (printalot) {
931  printf("\tGet the recHits for this segment.\t");
932  printf(" nRH = %i\n", nRH);
933  }
934  //---- Find which of the rechits in the chamber is in the segment
935  int layerRH = 0;
936  for (vector<CSCRecHit2D>::const_iterator iRH = theseRecHits.begin(); iRH != theseRecHits.end(); iRH++) {
937  ++layerRH;
938  CSCDetId idRH = (CSCDetId)(*iRH).cscDetId();
939  if (printalot) {
940  printf("\t%i RH\tendcap/station/ring/chamber/layer: %i/%i/%i/%i/%i\n",
941  layerRH,
942  idRH.endcap(),
943  idRH.station(),
944  idRH.ring(),
945  idRH.chamber(),
946  idRH.layer());
947  }
948  for (size_t jRH = 0;
949  jRH <
950  allRechits[idRH.endcap() - 1][idRH.station() - 1][idRH.ring() - 1][idRH.chamber() - FirstCh][idRH.layer() - 1]
951  .size();
952  ++jRH) {
953  float xDiff = iRH->localPosition().x() - allRechits[idRH.endcap() - 1][idRH.station() - 1][idRH.ring() - 1]
954  [idRH.chamber() - FirstCh][idRH.layer() - 1][jRH]
955  .first.x();
956  float yDiff = iRH->localPosition().y() - allRechits[idRH.endcap() - 1][idRH.station() - 1][idRH.ring() - 1]
957  [idRH.chamber() - FirstCh][idRH.layer() - 1][jRH]
958  .first.y();
959  if (fabs(xDiff) < 0.0001 && fabs(yDiff) < 0.0001) {
960  std::pair<LocalPoint, bool> recHitPos(allRechits[idRH.endcap() - 1][idRH.station() - 1][idRH.ring() - 1]
961  [idRH.chamber() - FirstCh][idRH.layer() - 1][jRH]
962  .first,
963  true);
964  allRechits[idRH.endcap() - 1][idRH.station() - 1][idRH.ring() - 1][idRH.chamber() - FirstCh][idRH.layer() - 1]
965  [jRH] = recHitPos;
966  if (printalot) {
967  std::cout << " number of the rechit (from zero) in the segment = " << jRH << std::endl;
968  }
969  }
970  }
971  }
972  }
973 }

References relativeConstraints::chamber, CSCDetId::chamber(), gather_cfg::cout, relativeConstraints::empty, CSCDetId::endcap(), makeMuonMisalignmentScenario::endcap, FirstCh, CSCDetId::layer(), CSCGeometry::layer(), NumCh, HI_PhotonSkim_cff::rechits, CSCDetId::ring(), relativeConstraints::ring, relativeConstraints::station, CSCDetId::station(), GeomDet::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

◆ fillSimhit_info()

void CSCEfficiency::fillSimhit_info ( edm::Handle< edm::PSimHitContainer > &  simHits)
private

Definition at line 831 of file CSCEfficiency.cc.

831  {
832  //---- SIMHITS
833  edm::PSimHitContainer::const_iterator dSHsimIter;
834  for (dSHsimIter = simhits->begin(); dSHsimIter != simhits->end(); dSHsimIter++) {
835  // Get DetID for this simHit:
836  CSCDetId sId = (CSCDetId)(*dSHsimIter).detUnitId();
837  std::pair<LocalPoint, int> simHitPos((*dSHsimIter).localPosition(), (*dSHsimIter).particleType());
838  allSimhits[sId.endcap() - 1][sId.station() - 1][sId.ring() - 1][sId.chamber() - FirstCh][sId.layer() - 1].push_back(
839  simHitPos);
840  }
841 }

References CSCDetId::chamber(), CSCDetId::endcap(), FirstCh, CSCDetId::layer(), CSCDetId::ring(), HLTBitAnalyser_cfi::simhits, and CSCDetId::station().

◆ fillStrips_info()

void CSCEfficiency::fillStrips_info ( edm::Handle< CSCStripDigiCollection > &  strips)
private

Definition at line 792 of file CSCEfficiency.cc.

792  {
793  //---- STRIPS
794  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin(); j != strips->end(); j++) {
795  CSCDetId id = (CSCDetId)(*j).first;
796  int largestADCValue = -1;
797  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
798  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
799  for (; digiItr != last; ++digiItr) {
800  int maxADC = largestADCValue;
801  int myStrip = digiItr->getStrip();
802  std::vector<int> myADCVals = digiItr->getADCCounts();
803  float thisPedestal = 0.5 * (float)(myADCVals[0] + myADCVals[1]);
804  float threshold = 13.3;
805  float diff = 0.;
806  float peakADC = -1000.;
807  for (unsigned int iCount = 0; iCount < myADCVals.size(); iCount++) {
808  diff = (float)myADCVals[iCount] - thisPedestal;
809  if (diff > threshold) {
810  if (myADCVals[iCount] > largestADCValue) {
811  largestADCValue = myADCVals[iCount];
812  }
813  }
814  if (diff > threshold && diff > peakADC) {
815  peakADC = diff;
816  }
817  }
818  if (largestADCValue > maxADC) { // FIX IT!!!
819  maxADC = largestADCValue;
820  std::pair<int, float> LayerSignal(myStrip, peakADC);
821 
822  //---- AllStrips contains basic information about strips
823  //---- (strip number and peak signal for most significant strip in the layer)
824  allStrips[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - 1][id.layer() - 1].clear();
825  allStrips[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - 1][id.layer() - 1].push_back(
826  LayerSignal);
827  }
828  }
829  }
830 }

References change_name::diff, dqmMemoryStats::float, cms::cuda::for(), dqmiolumiharvest::j, dqmdumpme::last, DigiDM_cff::strips, and remoteMonitoring_LED_IterMethod_cfg::threshold.

◆ fillWG_info()

void CSCEfficiency::fillWG_info ( edm::Handle< CSCWireDigiCollection > &  wires,
edm::ESHandle< CSCGeometry > &  cscGeom 
)
private

Definition at line 766 of file CSCEfficiency.cc.

766  {
767  //---- WIRE GROUPS
768  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin(); j != wires->end(); j++) {
769  CSCDetId id = (CSCDetId)(*j).first;
770  const CSCLayer *layer_p = cscGeom->layer(id);
771  const CSCLayerGeometry *layerGeom = layer_p->geometry();
772  //
773  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
774  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
775  //
776  for (; digiItr != last; ++digiItr) {
777  std::pair<int, float> WG_pos(digiItr->getWireGroup(), layerGeom->yOfWireGroup(digiItr->getWireGroup()));
778  std::pair<std::pair<int, float>, int> LayerSignal(WG_pos, digiItr->getTimeBin());
779 
780  //---- AllWG contains basic information about WG (WG number and Y-position, time bin)
781  allWG[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - FirstCh][id.layer() - 1].push_back(
782  LayerSignal);
783  if (printalot) {
784  //std::cout<<" WG check : "<<std::endl;
785  //printf("\t\tendcap/station/ring/chamber/layer: %i/%i/%i/%i/%i\n",id.endcap(),id.station(),id.ring(),id.chamber(),id.layer());
786  //std::cout<<" WG size = "<<allWG[id.endcap()-1][id.station()-1][id.ring()-1][id.chamber()-FirstCh]
787  //[id.layer()-1].size()<<std::endl;
788  }
789  }
790  }
791 }

References FirstCh, dqmiolumiharvest::j, dqmdumpme::last, CSCGeometry::layer(), DigiDM_cff::wires, and CSCLayerGeometry::yOfWireGroup().

◆ filter()

bool CSCEfficiency::filter ( edm::Event event,
const edm::EventSetup eventSetup 
)
overrideprivatevirtual

Implements edm::EDFilter.

Definition at line 22 of file CSCEfficiency.cc.

22  {
23  passTheEvent = false;
24  DataFlow->Fill(0.);
26 
27  //---- increment counter
29  // printalot debug output
31  edm::RunNumber_t const iRun = event.id().run();
32  edm::EventNumber_t const iEvent = event.id().event();
33  if (0 == fmod(double(nEventsAnalyzed), double(1000))) {
34  if (printalot) {
35  printf("\n==enter==CSCEfficiency===== run %u\tevent %llu\tn Analyzed %i\n", iRun, iEvent, nEventsAnalyzed);
36  }
37  }
38  theService->update(eventSetup);
39  //---- These declarations create handles to the types of records that you want
40  //---- to retrieve from event "e".
41  if (printalot)
42  printf("\tget handles for digi collections\n");
43 
44  //---- Pass the handle to the method "getByType", which is used to retrieve
45  //---- one and only one instance of the type in question out of event "e". If
46  //---- zero or more than one instance exists in the event an exception is thrown.
47  if (printalot)
48  printf("\tpass handles\n");
56  edm::Handle<edm::View<reco::Track> > trackCollectionH;
58 
59  if (useDigis) {
60  event.getByToken(wd_token, wires);
61  event.getByToken(sd_token, strips);
62  event.getByToken(al_token, alcts);
63  event.getByToken(cl_token, clcts);
64  event.getByToken(co_token, correlatedlcts);
65  }
66  if (!isData) {
67  event.getByToken(sh_token, simhits);
68  }
69  event.getByToken(rh_token, rechits);
70  event.getByToken(se_token, segments);
71  event.getByToken(tk_token, trackCollectionH);
72  const edm::View<reco::Track> trackCollection = *(trackCollectionH.product());
73 
74  //---- Get the CSC Geometry :
75  if (printalot)
76  printf("\tget the CSC geometry.\n");
77  edm::ESHandle<CSCGeometry> cscGeom = eventSetup.getHandle(geomToken_);
78 
79  // use theTrackingGeometry instead of cscGeom?
80  edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
81  eventSetup.get<GlobalTrackingGeometryRecord>().get(theTrackingGeometry);
82 
83  bool triggerPassed = true;
84  if (useTrigger) {
85  // access the trigger information
86  // trigger names can be find in HLTrigger/Configuration/python/HLT_2E30_cff.py (or?)
87  // get hold of TriggerResults
89  event.getByToken(ht_token, hltR);
90  const edm::TriggerNames &triggerNames = event.triggerNames(*hltR);
91  triggerPassed = applyTrigger(hltR, triggerNames);
92  }
93  if (!triggerPassed) {
94  return triggerPassed;
95  }
96  DataFlow->Fill(1.);
97  GlobalPoint gpZero(0., 0., 0.);
98  if (theService->magneticField()->inTesla(gpZero).mag2() < 0.1) {
99  magField = false;
100  } else {
101  magField = true;
102  }
103 
104  //---- store info from digis
105  fillDigiInfo(alcts, clcts, correlatedlcts, wires, strips, simhits, rechits, segments, cscGeom);
106  //
108  edm::InputTag muonTag_("muons");
109  event.getByLabel(muonTag_, muons);
110 
111  edm::Handle<reco::BeamSpot> beamSpotHandle;
112  event.getByLabel("offlineBeamSpot", beamSpotHandle);
113  reco::BeamSpot vertexBeamSpot = *beamSpotHandle;
114  //
115  std::vector<reco::MuonCollection::const_iterator> goodMuons_it;
116  unsigned int nPositiveZ = 0;
117  unsigned int nNegativeZ = 0;
118  float muonOuterZPosition = -99999.;
119  if (isIPdata) {
120  if (printalot)
121  std::cout << " muons.size() = " << muons->size() << std::endl;
122  for (reco::MuonCollection::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) {
123  DataFlow->Fill(31.);
124  if (printalot) {
125  std::cout << " iMuon = " << muon - muons->begin() << " charge = " << muon->charge() << " p = " << muon->p()
126  << " pt = " << muon->pt() << " eta = " << muon->eta() << " phi = " << muon->phi()
127  << " matches = " << muon->matches().size()
128  << " matched Seg = " << muon->numberOfMatches(reco::Muon::SegmentAndTrackArbitration)
129  << " GLB/TR/STA = " << muon->isGlobalMuon() << "/" << muon->isTrackerMuon() << "/"
130  << muon->isStandAloneMuon() << std::endl;
131  }
132  if (!(muon->isTrackerMuon() && muon->isGlobalMuon())) {
133  continue;
134  }
135  DataFlow->Fill(32.);
136  double relISO =
137  (muon->isolationR03().sumPt + muon->isolationR03().emEt + muon->isolationR03().hadEt) / muon->track()->pt();
138  if (printalot) {
139  std::cout << " relISO = " << relISO << " emVetoEt = " << muon->isolationR03().emVetoEt
140  << " caloComp = " << muon::caloCompatibility(*(muon))
141  << " dxy = " << fabs(muon->track()->dxy(vertexBeamSpot.position())) << std::endl;
142  }
143  if (
144  //relISO>0.1 || muon::caloCompatibility(*(muon))<.90 ||
145  fabs(muon->track()->dxy(vertexBeamSpot.position())) > 0.2 || muon->pt() < 6.) {
146  continue;
147  }
148  DataFlow->Fill(33.);
149  if (muon->track()->hitPattern().numberOfValidPixelHits() < 1 ||
150  muon->track()->hitPattern().numberOfValidTrackerHits() < 11 ||
151  muon->combinedMuon()->hitPattern().numberOfValidMuonHits() < 1 ||
152  muon->combinedMuon()->normalizedChi2() > 10. || muon->numberOfMatches() < 2) {
153  continue;
154  }
155  DataFlow->Fill(34.);
156  float zOuter = muon->combinedMuon()->outerPosition().z();
157  float rhoOuter = muon->combinedMuon()->outerPosition().rho();
158  bool passDepth = true;
159  // barrel region
160  //if ( fabs(zOuter) < 660. && rhoOuter > 400. && rhoOuter < 480.){
161  if (fabs(zOuter) < 660. && rhoOuter > 400. && rhoOuter < 540.) {
162  passDepth = false;
163  }
164  // endcap region
165  //else if( fabs(zOuter) > 550. && fabs(zOuter) < 650. && rhoOuter < 300.){
166  else if (fabs(zOuter) > 550. && fabs(zOuter) < 650. && rhoOuter < 300.) {
167  passDepth = false;
168  }
169  // overlap region
170  //else if ( fabs(zOuter) > 680. && fabs(zOuter) < 730. && rhoOuter < 480.){
171  else if (fabs(zOuter) > 680. && fabs(zOuter) < 880. && rhoOuter < 540.) {
172  passDepth = false;
173  }
174  if (!passDepth) {
175  continue;
176  }
177  DataFlow->Fill(35.);
178  goodMuons_it.push_back(muon);
179  if (muon->track()->momentum().z() > 0.) {
180  ++nPositiveZ;
181  }
182  if (muon->track()->momentum().z() < 0.) {
183  ++nNegativeZ;
184  }
185  }
186  }
187 
188  //
189 
190  if (printalot)
191  std::cout << "Start track loop over " << trackCollection.size() << " tracks" << std::endl;
192  for (edm::View<reco::Track>::size_type i = 0; i < trackCollection.size(); ++i) {
193  DataFlow->Fill(2.);
194  edm::RefToBase<reco::Track> track(trackCollectionH, i);
195  //std::cout<<" iTR = "<<i<<" eta = "<<track->eta()<<" phi = "<<track->phi()<<std::cout<<" pt = "<<track->pt()<<std::endl;
196  if (isIPdata) {
197  if (printalot) {
198  std::cout << " nNegativeZ = " << nNegativeZ << " nPositiveZ = " << nPositiveZ << std::endl;
199  }
200  if (nNegativeZ > 1 || nPositiveZ > 1) {
201  break;
202  }
203  bool trackOK = false;
204  if (printalot) {
205  std::cout << " goodMuons_it.size() = " << goodMuons_it.size() << std::endl;
206  }
207  for (size_t iM = 0; iM < goodMuons_it.size(); ++iM) {
208  //std::cout<<" iM = "<<iM<<" eta = "<<goodMuons_it[iM]->track()->eta()<<
209  //" phi = "<<goodMuons_it[iM]->track()->phi()<<
210  //" pt = "<<goodMuons_it[iM]->track()->pt()<<std::endl;
211  float deltaR = pow(track->phi() - goodMuons_it[iM]->track()->phi(), 2) +
212  pow(track->eta() - goodMuons_it[iM]->track()->eta(), 2);
213  deltaR = sqrt(deltaR);
214  if (printalot) {
215  std::cout << " TR mu match to a tr: deltaR = " << deltaR
216  << " dPt = " << track->pt() - goodMuons_it[iM]->track()->pt() << std::endl;
217  }
218  if (deltaR > 0.01 || fabs(track->pt() - goodMuons_it[iM]->track()->pt()) > 0.1) {
219  continue;
220  } else {
221  trackOK = true;
222  if (printalot) {
223  std::cout << " trackOK " << std::endl;
224  }
225  muonOuterZPosition = goodMuons_it[iM]->combinedMuon()->outerPosition().z();
226  break;
227  //++nChosenTracks;
228  }
229  }
230  if (!trackOK) {
231  if (printalot) {
232  std::cout << " failed: trackOK " << std::endl;
233  }
234  continue;
235  }
236  } else {
237  //---- Do we need a better "clean track" definition?
238  if (trackCollection.size() > 2) {
239  break;
240  }
241  DataFlow->Fill(3.);
242  if (!i && 2 == trackCollection.size()) {
244  edm::RefToBase<reco::Track> trackTwo(trackCollectionH, tType);
245  if (track->outerPosition().z() * trackTwo->outerPosition().z() > 0) { // in one and the same "endcap"
246  break;
247  }
248  }
249  }
250  DataFlow->Fill(4.);
251  if (printalot) {
252  std::cout << "i track = " << i << " P = " << track->p() << " chi2/ndf = " << track->normalizedChi2()
253  << " nSeg = " << segments->size() << std::endl;
254  std::cout << "quality undef/loose/tight/high/confirmed/goodIt/size " << track->quality(reco::Track::undefQuality)
255  << "/" << track->quality(reco::Track::loose) << "/" << track->quality(reco::Track::tight) << "/"
256  << track->quality(reco::Track::highPurity) << "/" << track->quality(reco::Track::confirmed) << "/"
257  << track->quality(reco::Track::goodIterative) << "/" << track->quality(reco::Track::qualitySize)
258  << std::endl;
259  std::cout << " pt = " << track->pt() << " +-" << track->ptError() << " q/pt = " << track->qoverp() << " +- "
260  << track->qoverpError() << std::endl;
261  //std::cout<<" const Pmin = "<<minTrackMomentum<<" pMax = "<<maxTrackMomentum<<" maxNormChi2 = "<<maxNormChi2<<std::endl;
262  std::cout << " track inner position = " << track->innerPosition()
263  << " outer position = " << track->outerPosition() << std::endl;
264  std::cout << "track eta (outer) = " << track->outerPosition().eta()
265  << " phi (outer) = " << track->outerPosition().phi() << std::endl;
266  if (fabs(track->innerPosition().z()) > 500.) {
267  DetId innerDetId(track->innerDetId());
268  std::cout << " dump inner state MUON detid = " << debug.dumpMuonId(innerDetId) << std::endl;
269  }
270  if (fabs(track->outerPosition().z()) > 500.) {
271  DetId outerDetId(track->outerDetId());
272  std::cout << " dump outer state MUON detid = " << debug.dumpMuonId(outerDetId) << std::endl;
273  }
274 
275  std::cout << " nHits = " << track->found() << std::endl;
276  /*
277  trackingRecHit_iterator rhbegin = track->recHitsBegin();
278  trackingRecHit_iterator rhend = track->recHitsEnd();
279  int iRH = 0;
280  for(trackingRecHit_iterator recHit = rhbegin; recHit != rhend; ++recHit){
281  const GeomDet* geomDet = theTrackingGeometry->idToDet((*recHit)->geographicalId());
282  std::cout<<"hit "<<iRH<<" loc pos = " <<(*recHit)->localPosition()<<
283  " glob pos = " <<geomDet->toGlobal((*recHit)->localPosition())<<std::endl;
284  ++iRH;
285  }
286  */
287  }
288  float dpT_ov_pT = 0.;
289  if (fabs(track->pt()) > 0.001) {
290  dpT_ov_pT = track->ptError() / track->pt();
291  }
292  //---- These define a "good" track
293  if (track->normalizedChi2() > maxNormChi2) { // quality
294  break;
295  }
296  DataFlow->Fill(5.);
297  if (track->found() < minTrackHits) { // enough data points
298  break;
299  }
300  DataFlow->Fill(6.);
301  if (!segments->size()) { // better have something in the CSC
302  break;
303  }
304  DataFlow->Fill(7.);
305  if (magField && (track->p() < minP || track->p() > maxP)) { // proper energy range
306  break;
307  }
308  DataFlow->Fill(8.);
309  if (magField && (dpT_ov_pT > 0.5)) { // not too crazy uncertainty
310  break;
311  }
312  DataFlow->Fill(9.);
313 
314  passTheEvent = true;
315  if (printalot)
316  std::cout << "good Track" << std::endl;
317  CLHEP::Hep3Vector r3T_inner(track->innerPosition().x(), track->innerPosition().y(), track->innerPosition().z());
318  CLHEP::Hep3Vector r3T(track->outerPosition().x(), track->outerPosition().y(), track->outerPosition().z());
319  chooseDirection(r3T_inner, r3T); // for non-IP
320 
321  CLHEP::Hep3Vector p3T(track->outerMomentum().x(), track->outerMomentum().y(), track->outerMomentum().z());
322  CLHEP::Hep3Vector p3_propagated, r3_propagated;
323  AlgebraicSymMatrix66 cov_propagated, covT;
324  covT *= 1e-20;
325  cov_propagated *= 1e-20;
326  int charge = track->charge();
327  FreeTrajectoryState ftsStart = getFromCLHEP(p3T, r3T, charge, covT, &*(theService->magneticField()));
328  if (printalot) {
329  std::cout << " p = " << track->p() << " norm chi2 = " << track->normalizedChi2() << std::endl;
330  std::cout << " dump the very first FTS = " << debug.dumpFTS(ftsStart) << std::endl;
331  }
332  TrajectoryStateOnSurface tSOSDest;
333  int endcap = 0;
334  //---- which endcap to look at
335  if (track->outerPosition().z() > 0) {
336  endcap = 1;
337  } else {
338  endcap = 2;
339  }
340  int chamber = 1;
341  //---- a "refference" CSCDetId for each ring
342  std::vector<CSCDetId> refME;
343  for (int iS = 1; iS < 5; ++iS) {
344  for (int iR = 1; iR < 4; ++iR) {
345  if (1 != iS && iR > 2) {
346  continue;
347  } else if (4 == iS && iR > 1) {
348  continue;
349  }
350  refME.push_back(CSCDetId(endcap, iS, iR, chamber));
351  }
352  }
353  //---- loop over the "refference" CSCDetIds
354  for (size_t iSt = 0; iSt < refME.size(); ++iSt) {
355  if (printalot) {
356  std::cout << "loop iStatation = " << iSt << std::endl;
357  std::cout << "refME[iSt]: st = " << refME[iSt].station() << " rg = " << refME[iSt].ring() << std::endl;
358  }
359  std::map<std::string, bool> chamberTypes;
360  chamberTypes["ME11"] = false;
361  chamberTypes["ME12"] = false;
362  chamberTypes["ME13"] = false;
363  chamberTypes["ME21"] = false;
364  chamberTypes["ME22"] = false;
365  chamberTypes["ME31"] = false;
366  chamberTypes["ME32"] = false;
367  chamberTypes["ME41"] = false;
368  const CSCChamber *cscChamber_base = cscGeom->chamber(refME[iSt].chamberId());
369  DetId detId = cscChamber_base->geographicalId();
370  if (printalot) {
371  std::cout << " base iStation : eta = " << cscGeom->idToDet(detId)->surface().position().eta()
372  << " phi = " << cscGeom->idToDet(detId)->surface().position().phi()
373  << " y = " << cscGeom->idToDet(detId)->surface().position().y() << std::endl;
374  std::cout << " dump base iStation detid = " << debug.dumpMuonId(detId) << std::endl;
375  std::cout << " dump FTS start = " << debug.dumpFTS(ftsStart) << std::endl;
376  }
377  //---- propagate to this ME
378  tSOSDest = propagate(ftsStart, cscGeom->idToDet(detId)->surface());
379  if (tSOSDest.isValid()) {
380  ftsStart = *tSOSDest.freeState();
381  if (printalot)
382  std::cout << " dump FTS end = " << debug.dumpFTS(ftsStart) << std::endl;
383  getFromFTS(ftsStart, p3_propagated, r3_propagated, charge, cov_propagated);
384  float feta = fabs(r3_propagated.eta());
385  float phi = r3_propagated.phi();
386  //---- which rings are (possibly) penetrated
387  ringCandidates(refME[iSt].station(), feta, chamberTypes);
388 
389  map<std::string, bool>::iterator iter;
390  int iterations = 0;
391  //---- loop over ring candidates
392  for (iter = chamberTypes.begin(); iter != chamberTypes.end(); iter++) {
393  ++iterations;
394  //---- is this ME a machinig candidate station
395  if (iter->second && (iterations - 1) == int(iSt)) {
396  if (printalot) {
397  std::cout << " Chamber type " << iter->first << " is a candidate..." << std::endl;
398  std::cout << " station() = " << refME[iSt].station() << " ring() = " << refME[iSt].ring()
399  << " iSt = " << iSt << std::endl;
400  }
401  std::vector<int> coupleOfChambers;
402  //---- which chamber (and its closes neighbor) is penetrated by the track - candidates
403  chamberCandidates(refME[iSt].station(), refME[iSt].ring(), phi, coupleOfChambers);
404  //---- loop over the two chamber candidates
405  for (size_t iCh = 0; iCh < coupleOfChambers.size(); ++iCh) {
406  DataFlow->Fill(11.);
407  if (printalot)
408  std::cout << " Check chamber N = " << coupleOfChambers.at(iCh) << std::endl;
409  ;
410  if ((!getAbsoluteEfficiency) &&
411  (true == emptyChambers[refME[iSt].endcap() - 1][refME[iSt].station() - 1][refME[iSt].ring() - 1]
412  [coupleOfChambers.at(iCh) - FirstCh])) {
413  continue;
414  }
415  CSCDetId theCSCId(refME[iSt].endcap(), refME[iSt].station(), refME[iSt].ring(), coupleOfChambers.at(iCh));
416  const CSCChamber *cscChamber = cscGeom->chamber(theCSCId.chamberId());
417  const BoundPlane bpCh = cscGeom->idToDet(cscChamber->geographicalId())->surface();
418  float zFTS = ftsStart.position().z();
419  float dz = fabs(bpCh.position().z() - zFTS);
420  float zDistInner = track->innerPosition().z() - bpCh.position().z();
421  float zDistOuter = track->outerPosition().z() - bpCh.position().z();
422  //---- only detectors between the inner and outer points of the track are considered for non IP-data
423  if (printalot) {
424  std::cout << " zIn = " << track->innerPosition().z() << " zOut = " << track->outerPosition().z()
425  << " zSurf = " << bpCh.position().z() << std::endl;
426  }
427  if (!isIPdata && (zDistInner * zDistOuter > 0. || fabs(zDistInner) < 15. ||
428  fabs(zDistOuter) < 15.)) { // for non IP-data
429  if (printalot) {
430  std::cout << " Not an intermediate (as defined) point... Skip." << std::endl;
431  }
432  continue;
433  }
434  if (isIPdata && fabs(track->eta()) < 1.8) {
435  if (fabs(muonOuterZPosition) - fabs(bpCh.position().z()) < 0 ||
436  fabs(muonOuterZPosition - bpCh.position().z()) < 15.) {
437  continue;
438  }
439  }
440  DataFlow->Fill(13.);
441  //---- propagate to the chamber (from this ME) if it is a different surface (odd/even chambers)
442  if (dz > 0.1) { // i.e. non-zero (float 0 check is bad)
443  //if(fabs(zChanmber - zFTS ) > 0.1){
444  tSOSDest = propagate(ftsStart, cscGeom->idToDet(cscChamber->geographicalId())->surface());
445  if (tSOSDest.isValid()) {
446  ftsStart = *tSOSDest.freeState();
447  } else {
448  if (printalot)
449  std::cout << "TSOS not valid! Break." << std::endl;
450  break;
451  }
452  } else {
453  if (printalot)
454  std::cout << " info: dz<0.1" << std::endl;
455  }
456  DataFlow->Fill(15.);
457  FreeTrajectoryState ftsInit = ftsStart;
458  bool inDeadZone = false;
459  //---- loop over the 6 layers
460  for (int iLayer = 0; iLayer < 6; ++iLayer) {
461  bool extrapolationPassed = true;
462  if (printalot) {
463  std::cout << " iLayer = " << iLayer << " dump FTS init = " << debug.dumpFTS(ftsInit) << std::endl;
464  std::cout << " dump detid = " << debug.dumpMuonId(cscChamber->geographicalId()) << std::endl;
465  std::cout << "Surface to propagate to: pos = " << cscChamber->layer(iLayer + 1)->surface().position()
466  << " eta = " << cscChamber->layer(iLayer + 1)->surface().position().eta()
467  << " phi = " << cscChamber->layer(iLayer + 1)->surface().position().phi() << std::endl;
468  }
469  //---- propagate to this layer
470  tSOSDest = propagate(ftsInit, cscChamber->layer(iLayer + 1)->surface());
471  if (tSOSDest.isValid()) {
472  ftsInit = *tSOSDest.freeState();
473  if (printalot)
474  std::cout << " Propagation between layers successful: dump FTS end = " << debug.dumpFTS(ftsInit)
475  << std::endl;
476  getFromFTS(ftsInit, p3_propagated, r3_propagated, charge, cov_propagated);
477  } else {
478  if (printalot)
479  std::cout << "Propagation between layers not successful - notValid TSOS" << std::endl;
480  extrapolationPassed = false;
481  inDeadZone = true;
482  }
483  //}
484  //---- Extrapolation passed? For each layer?
485  if (extrapolationPassed) {
486  GlobalPoint theExtrapolationPoint(r3_propagated.x(), r3_propagated.y(), r3_propagated.z());
487  LocalPoint theLocalPoint = cscChamber->layer(iLayer + 1)->toLocal(theExtrapolationPoint);
488  //std::cout<<" Candidate chamber: extrapolated LocalPoint = "<<theLocalPoint<<std::endl;
489  inDeadZone = (inDeadZone ||
491  theLocalPoint.x(), theLocalPoint.y(), refME[iSt].station(), refME[iSt].ring()));
492  if (printalot) {
493  std::cout << " Candidate chamber: extrapolated LocalPoint = " << theLocalPoint
494  << "inDeadZone = " << inDeadZone << std::endl;
495  }
496  //---- break if in dead zone for any layer ("clean" tracks)
497  if (inDeadZone) {
498  break;
499  }
500  } else {
501  break;
502  }
503  }
504  DataFlow->Fill(17.);
505  //---- Is a track in a sensitive area for each layer?
506  if (!inDeadZone) { //---- for any layer
507  DataFlow->Fill(19.);
508  if (printalot)
509  std::cout << "Do efficiencies..." << std::endl;
510  //---- Do efficiencies
511  // angle cuts applied (if configured)
512  bool angle_flag = true;
513  angle_flag = efficienciesPerChamber(theCSCId, cscChamber, ftsStart);
514  if (useDigis && angle_flag) {
515  stripWire_Efficiencies(theCSCId, ftsStart);
516  }
517  if (angle_flag) {
518  recHitSegment_Efficiencies(theCSCId, cscChamber, ftsStart);
519  if (!isData) {
520  recSimHitEfficiency(theCSCId, ftsStart);
521  }
522  }
523  } else {
524  if (printalot)
525  std::cout << " Not in active area for all layers" << std::endl;
526  }
527  }
528  if (tSOSDest.isValid()) {
529  ftsStart = *tSOSDest.freeState();
530  }
531  }
532  }
533  } else {
534  if (printalot)
535  std::cout << " TSOS not valid..." << std::endl;
536  }
537  }
538  }
539  //---- End
540  if (printalot)
541  printf("==exit===CSCEfficiency===== run %u\tevent %llu\n\n", iRun, iEvent);
542  return passTheEvent;
543 }

References muon::caloCompatibility(), relativeConstraints::chamber, CSCGeometry::chamber(), ALCARECOTkAlJpsiMuMu_cff::charge, reco::TrackBase::confirmed, gather_cfg::cout, debug, PbPb_ZMuSkimMuonDPG_cff::deltaR, PVValHelper::dz, MillePedeFileConverter_cfg::e, makeMuonMisalignmentScenario::endcap, PV3DBase< T, PVType, FrameType >::eta(), JetMETHLTOfflineSource_cfi::feta, FirstCh, TrajectoryStateOnSurface::freeState(), GeomDet::geographicalId(), edm::EventSetup::get(), get, edm::EventSetup::getHandle(), reco::TrackBase::goodIterative, reco::TrackBase::highPurity, mps_fire::i, CSCGeometry::idToDet(), iEvent, createfilelist::int, HLTBitAnalyser_cfi::isData, TrajectoryStateOnSurface::isValid(), reco::TrackBase::loose, distMuonMETValueMapProducer_cff::maxNormChi2, RecoMuonValidator_cfi::maxP, alignBH_cfg::minP, HLT_FULL_cff::minTrackHits, HLT_FULL_cff::muon, PDWG_BPHSkim_cff::muons, reco::Track::outerPosition(), PV3DBase< T, PVType, FrameType >::phi(), GloballyPositioned< T >::position(), reco::BeamSpot::position(), FreeTrajectoryState::position(), funct::pow(), edm::Handle< T >::product(), reco::TrackBase::qualitySize, HI_PhotonSkim_cff::rechits, relativeConstraints::ring, reco::Muon::SegmentAndTrackArbitration, HLTBitAnalyser_cfi::simhits, mathSSE::sqrt(), relativeConstraints::station, DigiDM_cff::strips, GeomDet::surface(), reco::TrackBase::tight, HLT_FULL_cff::track, duplicaterechits_cfi::trackCollection, L1TEGammaOffline_cfi::triggerNames, reco::TrackBase::undefQuality, DigiDM_cff::wires, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ getFromCLHEP()

FreeTrajectoryState CSCEfficiency::getFromCLHEP ( const CLHEP::Hep3Vector &  p3,
const CLHEP::Hep3Vector &  r3,
int  charge,
const AlgebraicSymMatrix66 cov,
const MagneticField field 
)
private

Definition at line 1476 of file CSCEfficiency.cc.

1480  {
1481  GlobalVector p3GV(p3.x(), p3.y(), p3.z());
1482  GlobalPoint r3GP(r3.x(), r3.y(), r3.z());
1483  GlobalTrajectoryParameters tPars(r3GP, p3GV, charge, field);
1484 
1485  CartesianTrajectoryError tCov(cov);
1486 
1487  return cov.kRows == 6 ? FreeTrajectoryState(tPars, tCov) : FreeTrajectoryState(tPars);
1488 }

References ALCARECOTkAlJpsiMuMu_cff::charge, and p3.

◆ getFromFTS()

void CSCEfficiency::getFromFTS ( const FreeTrajectoryState fts,
CLHEP::Hep3Vector &  p3,
CLHEP::Hep3Vector &  r3,
int &  charge,
AlgebraicSymMatrix66 cov 
)
private

◆ inSensitiveLocalRegion()

bool CSCEfficiency::inSensitiveLocalRegion ( double  xLocal,
double  yLocal,
int  station,
int  ring 
)
private

Definition at line 546 of file CSCEfficiency.cc.

546  {
547  //---- Good region means sensitive area of a chamber. "Local" stands for the local system
548  bool pass = false;
549  std::vector<double> chamberBounds(3); // the sensitive area
550  float y_center = 99999.;
551  //---- hardcoded... not good
552  if (station > 1 && station < 5) {
553  if (2 == ring) {
554  chamberBounds[0] = 66.46 / 2; // (+-)x1 shorter
555  chamberBounds[1] = 127.15 / 2; // (+-)x2 longer
556  chamberBounds[2] = 323.06 / 2;
557  y_center = -0.95;
558  } else {
559  if (2 == station) {
560  chamberBounds[0] = 54.00 / 2; // (+-)x1 shorter
561  chamberBounds[1] = 125.71 / 2; // (+-)x2 longer
562  chamberBounds[2] = 189.66 / 2;
563  y_center = -0.955;
564  } else if (3 == station) {
565  chamberBounds[0] = 61.40 / 2; // (+-)x1 shorter
566  chamberBounds[1] = 125.71 / 2; // (+-)x2 longer
567  chamberBounds[2] = 169.70 / 2;
568  y_center = -0.97;
569  } else if (4 == station) {
570  chamberBounds[0] = 69.01 / 2; // (+-)x1 shorter
571  chamberBounds[1] = 125.65 / 2; // (+-)x2 longer
572  chamberBounds[2] = 149.42 / 2;
573  y_center = -0.94;
574  }
575  }
576  } else if (1 == station) {
577  if (3 == ring) {
578  chamberBounds[0] = 63.40 / 2; // (+-)x1 shorter
579  chamberBounds[1] = 92.10 / 2; // (+-)x2 longer
580  chamberBounds[2] = 164.16 / 2;
581  y_center = -1.075;
582  } else if (2 == ring) {
583  chamberBounds[0] = 51.00 / 2; // (+-)x1 shorter
584  chamberBounds[1] = 83.74 / 2; // (+-)x2 longer
585  chamberBounds[2] = 174.49 / 2;
586  y_center = -0.96;
587  } else { // to be investigated
588  chamberBounds[0] = 30. / 2; //40./2; // (+-)x1 shorter
589  chamberBounds[1] = 60. / 2; //100./2; // (+-)x2 longer
590  chamberBounds[2] = 160. / 2; //142./2;
591  y_center = 0.;
592  }
593  }
594  double yUp = chamberBounds[2] + y_center;
595  double yDown = -chamberBounds[2] + y_center;
596  double xBound1Shifted = chamberBounds[0] - distanceFromDeadZone; //
597  double xBound2Shifted = chamberBounds[1] - distanceFromDeadZone; //
598  double lineSlope = (yUp - yDown) / (xBound2Shifted - xBound1Shifted);
599  double lineConst = yUp - lineSlope * xBound2Shifted;
600  double yBoundary = lineSlope * abs(xLocal) + lineConst;
601  pass = checkLocal(yLocal, yBoundary, station, ring);
602  return pass;
603 }

References funct::abs(), relativeConstraints::ring, and relativeConstraints::station.

◆ linearExtrapolation()

void CSCEfficiency::linearExtrapolation ( GlobalPoint  initialPosition,
GlobalVector  initialDirection,
float  zSurface,
std::vector< float > &  posZY 
)
private

Definition at line 1490 of file CSCEfficiency.cc.

1493  {
1494  double paramLine = lineParameter(initialPosition.z(), zSurface, initialDirection.z());
1495  double xPosition = extrapolate1D(initialPosition.x(), initialDirection.x(), paramLine);
1496  double yPosition = extrapolate1D(initialPosition.y(), initialDirection.y(), paramLine);
1497  posZY.clear();
1498  posZY.push_back(xPosition);
1499  posZY.push_back(yPosition);
1500 }

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

◆ lineParameter()

double CSCEfficiency::lineParameter ( double  initZPosition,
double  destZPosition,
double  initZDirection 
)
private

Definition at line 1507 of file CSCEfficiency.cc.

1507  {
1508  double paramLine = (destZPosition - initZPosition) / initZDirection;
1509  return paramLine;
1510 }

◆ propagate()

TrajectoryStateOnSurface CSCEfficiency::propagate ( FreeTrajectoryState ftsStart,
const BoundPlane bp 
)
private

Definition at line 1538 of file CSCEfficiency.cc.

1538  {
1539  TrajectoryStateOnSurface tSOSDest;
1541  /*
1542 // it would work if cosmic muons had properly assigned direction...
1543  bool dzPositive = bpDest.position().z() - ftsStart.position().z() > 0 ? true : false;
1544  //---- Be careful with trigger conditions too
1545  if(!isIPdata){
1546  bool rightDirection = !(alongZ^dzPositive);
1547  if(rightDirection){
1548  if(printalot) std::cout<<" propagate along momentum"<<std::endl;
1549  propagatorName = "SteppingHelixPropagatorAlong";
1550  }
1551  else{
1552  if(printalot) std::cout<<" propagate opposite momentum"<<std::endl;
1553  propagatorName = "SteppingHelixPropagatorOpposite";
1554  }
1555  }
1556  else{
1557  if(printalot) std::cout<<" propagate any (momentum)"<<std::endl;
1558  propagatorName = "SteppingHelixPropagatorAny";
1559  }
1560 */
1561  propagatorName = "SteppingHelixPropagatorAny";
1562  tSOSDest = propagator(propagatorName)->propagate(ftsStart, bpDest);
1563  return tSOSDest;
1564 }

References TrackCandidateProducer_cfi::propagator, HLT_FULL_cff::propagatorName, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ propagator()

const Propagator * CSCEfficiency::propagator ( std::string  propagatorName) const
private

Definition at line 1533 of file CSCEfficiency.cc.

1533  {
1534  return &*theService->propagator(propagatorName);
1535 }

References HLT_FULL_cff::propagatorName.

◆ recHitSegment_Efficiencies()

bool CSCEfficiency::recHitSegment_Efficiencies ( CSCDetId cscDetId,
const CSCChamber cscChamber,
FreeTrajectoryState ftsChamber 
)
private

Definition at line 1314 of file CSCEfficiency.cc.

1316  {
1317  int ec, st, rg, ch, secondRing;
1318  returnTypes(id, ec, st, rg, ch, secondRing);
1319  bool firstCondition, secondCondition;
1320 
1321  std::vector<bool> missingLayers_rh(6);
1322  std::vector<int> usedInSegment(6);
1323  // Rechits
1324  if (printalot)
1325  std::cout << "RecHits eff" << std::endl;
1326  for (int iLayer = 0; iLayer < 6; ++iLayer) {
1327  firstCondition = !allRechits[ec][st][rg][ch][iLayer].empty() ? true : false;
1328  secondCondition = false;
1329  int thisRing = rg;
1330  if (secondRing > -1) {
1331  secondCondition = !allRechits[ec][st][secondRing][ch][iLayer].empty() ? true : false;
1332  if (secondCondition) {
1333  thisRing = secondRing;
1334  }
1335  }
1336  if (firstCondition || secondCondition) {
1337  ChHist[ec][st][rg][ch].EfficientRechits_good->Fill(iLayer + 1);
1338  for (size_t iR = 0; iR < allRechits[ec][st][thisRing][ch][iLayer].size(); ++iR) {
1339  if (allRechits[ec][st][thisRing][ch][iLayer][iR].second) {
1340  usedInSegment[iLayer] = 1;
1341  break;
1342  } else {
1343  usedInSegment[iLayer] = -1;
1344  }
1345  }
1346  } else {
1347  missingLayers_rh[iLayer] = true;
1348  if (printalot) {
1349  std::cout << "missing rechits ";
1350  printf("\t\tendcap/station/ring/chamber/layer: %i/%i/%i/%i/%i\n",
1351  id.endcap(),
1352  id.station(),
1353  id.ring(),
1354  id.chamber(),
1355  iLayer + 1);
1356  }
1357  }
1358  }
1359  GlobalVector globalDir;
1360  GlobalPoint globalPos;
1361  // Segments
1362  firstCondition = !allSegments[ec][st][rg][ch].empty() ? true : false;
1363  secondCondition = false;
1364  int secondSize = 0;
1365  int thisRing = rg;
1366  if (secondRing > -1) {
1367  secondCondition = !allSegments[ec][st][secondRing][ch].empty() ? true : false;
1368  secondSize = allSegments[ec][st][secondRing][ch].size();
1369  if (secondCondition) {
1370  thisRing = secondRing;
1371  }
1372  }
1373  if (firstCondition || secondCondition) {
1374  if (printalot)
1375  std::cout << "segments - start ec = " << ec << " st = " << st << " rg = " << rg << " ch = " << ch << std::endl;
1376  StHist[ec][st].EfficientSegments_XY->Fill(ftsChamber.position().x(), ftsChamber.position().y());
1377  if (1 == allSegments[ec][st][rg][ch].size() + secondSize) {
1378  globalDir = cscChamber->toGlobal(allSegments[ec][st][thisRing][ch][0].second);
1379  globalPos = cscChamber->toGlobal(allSegments[ec][st][thisRing][ch][0].first);
1380  StHist[ec][st].EfficientSegments_eta->Fill(fabs(ftsChamber.position().eta()));
1381  double residual =
1382  sqrt(pow(ftsChamber.position().x() - globalPos.x(), 2) + pow(ftsChamber.position().y() - globalPos.y(), 2) +
1383  pow(ftsChamber.position().z() - globalPos.z(), 2));
1384  if (printalot)
1385  std::cout << " fts.position() = " << ftsChamber.position() << " segPos = " << globalPos << " res = " << residual
1386  << std::endl;
1387  StHist[ec][st].ResidualSegments->Fill(residual);
1388  }
1389  for (int iLayer = 0; iLayer < 6; ++iLayer) {
1390  if (printalot)
1391  std::cout << " iLayer = " << iLayer << " usedInSegment = " << usedInSegment[iLayer] << std::endl;
1392  if (0 != usedInSegment[iLayer]) {
1393  if (-1 == usedInSegment[iLayer]) {
1394  ChHist[ec][st][rg][ch].InefficientSingleHits->Fill(iLayer + 1);
1395  }
1396  ChHist[ec][st][rg][ch].AllSingleHits->Fill(iLayer + 1);
1397  }
1398  firstCondition = !allRechits[ec][st][rg][ch][iLayer].empty() ? true : false;
1399  secondCondition = false;
1400  if (secondRing > -1) {
1401  secondCondition = !allRechits[ec][st][secondRing][ch][iLayer].empty() ? true : false;
1402  }
1403  float stripAngle = 99999.;
1404  std::vector<float> posXY(2);
1405  bool oneSegment = false;
1406  if (1 == allSegments[ec][st][rg][ch].size() + secondSize) {
1407  oneSegment = true;
1408  const BoundPlane bp = cscChamber->layer(iLayer + 1)->surface();
1409  linearExtrapolation(globalPos, globalDir, bp.position().z(), posXY);
1410  GlobalPoint gp_extrapol(posXY.at(0), posXY.at(1), bp.position().z());
1411  const LocalPoint lp_extrapol = cscChamber->layer(iLayer + 1)->toLocal(gp_extrapol);
1412  posXY.at(0) = lp_extrapol.x();
1413  posXY.at(1) = lp_extrapol.y();
1414  int nearestStrip = cscChamber->layer(iLayer + 1)->geometry()->nearestStrip(lp_extrapol);
1415  stripAngle = cscChamber->layer(iLayer + 1)->geometry()->stripAngle(nearestStrip) - M_PI / 2.;
1416  }
1417  if (firstCondition || secondCondition) {
1418  ChHist[ec][st][rg][ch].EfficientRechits_inSegment->Fill(iLayer + 1);
1419  if (oneSegment) {
1420  ChHist[ec][st][rg][ch].Y_EfficientRecHits_inSegment[iLayer]->Fill(posXY.at(1));
1421  ChHist[ec][st][rg][ch].Phi_EfficientRecHits_inSegment[iLayer]->Fill(stripAngle);
1422  }
1423  } else {
1424  if (oneSegment) {
1425  ChHist[ec][st][rg][ch].Y_InefficientRecHits_inSegment[iLayer]->Fill(posXY.at(1));
1426  ChHist[ec][st][rg][ch].Phi_InefficientRecHits_inSegment[iLayer]->Fill(stripAngle);
1427  }
1428  }
1429  }
1430  } else {
1431  StHist[ec][st].InefficientSegments_XY->Fill(ftsChamber.position().x(), ftsChamber.position().y());
1432  if (printalot) {
1433  std::cout << "missing segment " << std::endl;
1434  printf("\t\tendcap/station/ring/chamber: %i/%i/%i/%i\n", id.endcap(), id.station(), id.ring(), id.chamber());
1435  std::cout << " fts.position() = " << ftsChamber.position() << std::endl;
1436  }
1437  }
1438  // Normalization
1439  ChHist[ec][st][rg][ch].EfficientRechits_good->Fill(8);
1440  if (allSegments[ec][st][rg][ch].size() + secondSize < 2) {
1441  StHist[ec][st].AllSegments_eta->Fill(fabs(ftsChamber.position().eta()));
1442  }
1443  ChHist[ec][st][rg][id.chamber() - FirstCh].EfficientRechits_inSegment->Fill(9);
1444 
1445  return true;
1446 }

References relativeConstraints::chamber, gather_cfg::cout, makeMuonMisalignmentScenario::endcap, PV3DBase< T, PVType, FrameType >::eta(), dqmdumpme::first, FirstCh, CSCLayer::geometry(), CSCChamber::layer(), M_PI, CSCLayerGeometry::nearestStrip(), FreeTrajectoryState::position(), funct::pow(), relativeConstraints::ring, edm::second(), findQualityFiles::size, mathSSE::sqrt(), relativeConstraints::station, CSCLayerGeometry::stripAngle(), GeomDet::surface(), GeomDet::toGlobal(), GeomDet::toLocal(), funct::true, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ recSimHitEfficiency()

bool CSCEfficiency::recSimHitEfficiency ( CSCDetId id,
FreeTrajectoryState ftsChamber 
)
private

Definition at line 1270 of file CSCEfficiency.cc.

1270  {
1271  int ec, st, rg, ch, secondRing;
1272  returnTypes(id, ec, st, rg, ch, secondRing);
1273  bool firstCondition, secondCondition;
1274  for (int iLayer = 0; iLayer < 6; iLayer++) {
1275  firstCondition = !allSimhits[ec][st][rg][ch][iLayer].empty() ? true : false;
1276  secondCondition = false;
1277  int thisRing = rg;
1278  if (secondRing > -1) {
1279  secondCondition = !allSimhits[ec][st][secondRing][ch][iLayer].empty() ? true : false;
1280  if (secondCondition) {
1281  thisRing = secondRing;
1282  }
1283  }
1284  if (firstCondition || secondCondition) {
1285  for (size_t iSH = 0; iSH < allSimhits[ec][st][thisRing][ch][iLayer].size(); ++iSH) {
1286  if (13 == fabs(allSimhits[ec][st][thisRing][ch][iLayer][iSH].second)) {
1287  ChHist[ec][st][rg][ch].SimSimhits->Fill(iLayer + 1);
1288  if (!allRechits[ec][st][thisRing][ch][iLayer].empty()) {
1289  ChHist[ec][st][rg][ch].SimRechits->Fill(iLayer + 1);
1290  }
1291  break;
1292  }
1293  }
1294  //---- Next is not too usefull...
1295  /*
1296  for(unsigned int iSimHits=0;
1297  iSimHits<allSimhits[id.endcap()-1][id.station()-1][id.ring()-1][id.chamber()-FirstCh][iLayer].size();
1298  iSimHits++){
1299  ChHist[ec][st][rg][id.chamber()-FirstCh].SimSimhits_each->Fill(iLayer+1);
1300  }
1301  for(unsigned int iRecHits=0;
1302  iRecHits<allRechits[id.endcap()-1][id.station()-1][id.ring()-1][id.chamber()-FirstCh][iLayer].size();
1303  iRecHits++){
1304  ChHist[ec][st][rg][id.chamber()-FirstCh].SimRechits_each->Fill(iLayer+1);
1305  }
1306  */
1307  //
1308  }
1309  }
1310  return true;
1311 }

References relativeConstraints::empty, edm::second(), and funct::true.

◆ returnTypes()

void CSCEfficiency::returnTypes ( CSCDetId id,
int &  ec,
int &  st,
int &  rg,
int &  ch,
int &  secondRing 
)
private

Definition at line 1448 of file CSCEfficiency.cc.

1448  {
1449  ec = id.endcap() - 1;
1450  st = id.station() - 1;
1451  rg = id.ring() - 1;
1452  secondRing = -1;
1453  if (1 == id.station() && (4 == id.ring() || 1 == id.ring())) {
1454  rg = 0;
1455  secondRing = 3;
1456  }
1457  ch = id.chamber() - FirstCh;
1458 }

References FirstCh, relativeConstraints::ring, and relativeConstraints::station.

◆ ringCandidates()

void CSCEfficiency::ringCandidates ( int  station,
float  absEta,
std::map< std::string, bool > &  chamberTypes 
)
private

Definition at line 976 of file CSCEfficiency.cc.

976  {
977  // yeah, hardcoded again...
978  switch (station) {
979  case 1:
980  if (feta > 0.85 && feta < 1.18) { //ME13
981  chamberTypes["ME13"] = true;
982  }
983  if (feta > 1.18 && feta < 1.7) { //ME12
984  chamberTypes["ME12"] = true;
985  }
986  if (feta > 1.5 && feta < 2.45) { //ME11
987  chamberTypes["ME11"] = true;
988  }
989  break;
990  case 2:
991  if (feta > 0.95 && feta < 1.6) { //ME22
992  chamberTypes["ME22"] = true;
993  }
994  if (feta > 1.55 && feta < 2.45) { //ME21
995  chamberTypes["ME21"] = true;
996  }
997  break;
998  case 3:
999  if (feta > 1.08 && feta < 1.72) { //ME32
1000  chamberTypes["ME32"] = true;
1001  }
1002  if (feta > 1.69 && feta < 2.45) { //ME31
1003  chamberTypes["ME31"] = true;
1004  }
1005  break;
1006  case 4:
1007  if (feta > 1.78 && feta < 2.45) { //ME41
1008  chamberTypes["ME41"] = true;
1009  }
1010  break;
1011  default:
1012  break;
1013  }
1014 }

References JetMETHLTOfflineSource_cfi::feta, and relativeConstraints::station.

◆ stripWire_Efficiencies()

bool CSCEfficiency::stripWire_Efficiencies ( CSCDetId cscDetId,
FreeTrajectoryState ftsChamber 
)
private

Definition at line 1180 of file CSCEfficiency.cc.

1180  {
1181  int ec, st, rg, ch, secondRing;
1182  returnTypes(id, ec, st, rg, ch, secondRing);
1183 
1184  bool firstCondition, secondCondition;
1185  int missingLayers_s = 0;
1186  int missingLayers_wg = 0;
1187  for (int iLayer = 0; iLayer < 6; iLayer++) {
1188  //----Strips
1189  if (printalot) {
1190  printf("\t%i swEff: \tendcap/station/ring/chamber/layer: %i/%i/%i/%i/%i\n",
1191  iLayer + 1,
1192  id.endcap(),
1193  id.station(),
1194  id.ring(),
1195  id.chamber(),
1196  iLayer + 1);
1197  std::cout << " size S = "
1198  << allStrips[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - FirstCh][iLayer].size()
1199  << "size W = "
1200  << allWG[id.endcap() - 1][id.station() - 1][id.ring() - 1][id.chamber() - FirstCh][iLayer].size()
1201  << std::endl;
1202  }
1203  firstCondition = !allStrips[ec][st][rg][ch][iLayer].empty() ? true : false;
1204  //allSegments[ec][st][rg][ch].size() ? true : false;
1205  secondCondition = false;
1206  if (secondRing > -1) {
1207  secondCondition = !allStrips[ec][st][secondRing][ch][iLayer].empty() ? true : false;
1208  }
1209  if (firstCondition || secondCondition) {
1210  ChHist[ec][st][rg][ch].EfficientStrips->Fill(iLayer + 1);
1211  } else {
1212  if (printalot) {
1213  std::cout << "missing strips ";
1214  printf("\t\tendcap/station/ring/chamber/layer: %i/%i/%i/%i/%i\n",
1215  id.endcap(),
1216  id.station(),
1217  id.ring(),
1218  id.chamber(),
1219  iLayer + 1);
1220  }
1221  }
1222  // Wires
1223  firstCondition = !allWG[ec][st][rg][ch][iLayer].empty() ? true : false;
1224  secondCondition = false;
1225  if (secondRing > -1) {
1226  secondCondition = !allWG[ec][st][secondRing][ch][iLayer].empty() ? true : false;
1227  }
1228  if (firstCondition || secondCondition) {
1229  ChHist[ec][st][rg][ch].EfficientWireGroups->Fill(iLayer + 1);
1230  } else {
1231  if (printalot) {
1232  std::cout << "missing wires ";
1233  printf("\t\tendcap/station/ring/chamber/layer: %i/%i/%i/%i/%i\n",
1234  id.endcap(),
1235  id.station(),
1236  id.ring(),
1237  id.chamber(),
1238  iLayer + 1);
1239  }
1240  }
1241  }
1242  // Normalization
1243  if (6 != missingLayers_s) {
1244  ChHist[ec][st][rg][ch].EfficientStrips->Fill(8);
1245  }
1246  if (6 != missingLayers_wg) {
1247  ChHist[ec][st][rg][ch].EfficientWireGroups->Fill(8);
1248  }
1249  ChHist[ec][st][rg][ch].EfficientStrips->Fill(9);
1250  ChHist[ec][st][rg][ch].EfficientWireGroups->Fill(9);
1251  //
1252  ChHist[ec][st][rg][ch].StripWiresCorrelations->Fill(1);
1253  if (missingLayers_s != missingLayers_wg) {
1254  ChHist[ec][st][rg][ch].StripWiresCorrelations->Fill(2);
1255  if (6 == missingLayers_wg) {
1256  ChHist[ec][st][rg][ch].StripWiresCorrelations->Fill(3);
1257  ChHist[ec][st][rg][ch].NoWires_momTheta->Fill(ftsChamber.momentum().theta());
1258  }
1259  if (6 == missingLayers_s) {
1260  ChHist[ec][st][rg][ch].StripWiresCorrelations->Fill(4);
1261  ChHist[ec][st][rg][ch].NoStrips_momPhi->Fill(ftsChamber.momentum().theta());
1262  }
1263  } else if (6 == missingLayers_s) {
1264  ChHist[ec][st][rg][ch].StripWiresCorrelations->Fill(5);
1265  }
1266 
1267  return true;
1268 }

References relativeConstraints::chamber, gather_cfg::cout, makeMuonMisalignmentScenario::endcap, FirstCh, FreeTrajectoryState::momentum(), relativeConstraints::ring, relativeConstraints::station, PV3DBase< T, PVType, FrameType >::theta(), and funct::true.

Member Data Documentation

◆ al_token

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

Definition at line 118 of file CSCEfficiency.h.

◆ ALCTPerEvent

TH1F* CSCEfficiency::ALCTPerEvent
private

Definition at line 256 of file CSCEfficiency.h.

◆ allALCT

bool CSCEfficiency::allALCT[2][4][4][(36 - 1+1)]
private

Definition at line 173 of file CSCEfficiency.h.

◆ allCLCT

bool CSCEfficiency::allCLCT[2][4][4][(36 - 1+1)]
private

Definition at line 172 of file CSCEfficiency.h.

◆ allCorrLCT

bool CSCEfficiency::allCorrLCT[2][4][4][(36 - 1+1)]
private

Definition at line 174 of file CSCEfficiency.h.

◆ allRechits

std::vector<std::pair<LocalPoint, bool> > CSCEfficiency::allRechits[2][4][4][(36 - 1+1)][6]
private

Definition at line 188 of file CSCEfficiency.h.

◆ allSegments

std::vector<std::pair<LocalPoint, LocalVector> > CSCEfficiency::allSegments[2][4][4][(36 - 1+1)]
private

Definition at line 191 of file CSCEfficiency.h.

◆ allSimhits

std::vector<std::pair<LocalPoint, int> > CSCEfficiency::allSimhits[2][4][4][(36 - 1+1)][6]
private

Definition at line 184 of file CSCEfficiency.h.

◆ allStrips

std::vector<std::pair<int, float> > CSCEfficiency::allStrips[2][4][4][(36 - 1+1)][6]
private

Definition at line 177 of file CSCEfficiency.h.

◆ allWG

std::vector<std::pair<std::pair<int, float>, int> > CSCEfficiency::allWG[2][4][4][(36 - 1+1)][6]
private

Definition at line 180 of file CSCEfficiency.h.

◆ alongZ

bool CSCEfficiency::alongZ
private

Definition at line 166 of file CSCEfficiency.h.

◆ andOr

bool CSCEfficiency::andOr
private

Definition at line 153 of file CSCEfficiency.h.

◆ applyIPangleCuts

bool CSCEfficiency::applyIPangleCuts
private

Definition at line 144 of file CSCEfficiency.h.

◆ ChHist

struct CSCEfficiency::ChamberHistos CSCEfficiency::ChHist[2][4][3][ 36 - 1 + 1]
private

◆ cl_token

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

Definition at line 119 of file CSCEfficiency.h.

◆ CLCTPerEvent

TH1F* CSCEfficiency::CLCTPerEvent
private

Definition at line 257 of file CSCEfficiency.h.

◆ co_token

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CSCEfficiency::co_token
private

Definition at line 120 of file CSCEfficiency.h.

◆ DataFlow

TH1F* CSCEfficiency::DataFlow
private

Definition at line 253 of file CSCEfficiency.h.

◆ distanceFromDeadZone

double CSCEfficiency::distanceFromDeadZone
private

Definition at line 138 of file CSCEfficiency.h.

◆ emptyChambers

bool CSCEfficiency::emptyChambers[2][4][4][(36 - 1+1)]
private

Definition at line 194 of file CSCEfficiency.h.

◆ geomToken_

edm::ESGetToken<CSCGeometry, MuonGeometryRecord> CSCEfficiency::geomToken_
private

Definition at line 129 of file CSCEfficiency.h.

◆ getAbsoluteEfficiency

bool CSCEfficiency::getAbsoluteEfficiency
private

Definition at line 136 of file CSCEfficiency.h.

◆ ht_token

edm::EDGetTokenT<edm::TriggerResults> CSCEfficiency::ht_token
private

Definition at line 127 of file CSCEfficiency.h.

◆ isBeamdata

bool CSCEfficiency::isBeamdata
private

Definition at line 135 of file CSCEfficiency.h.

◆ isData

bool CSCEfficiency::isData
private

Definition at line 133 of file CSCEfficiency.h.

◆ isIPdata

bool CSCEfficiency::isIPdata
private

Definition at line 134 of file CSCEfficiency.h.

◆ local_DX_DZ_Max

double CSCEfficiency::local_DX_DZ_Max
private

Definition at line 147 of file CSCEfficiency.h.

◆ local_DY_DZ_Max

double CSCEfficiency::local_DY_DZ_Max
private

Definition at line 145 of file CSCEfficiency.h.

◆ local_DY_DZ_Min

double CSCEfficiency::local_DY_DZ_Min
private

Definition at line 146 of file CSCEfficiency.h.

◆ magField

bool CSCEfficiency::magField
private

Definition at line 164 of file CSCEfficiency.h.

◆ maxNormChi2

double CSCEfficiency::maxNormChi2
private

Definition at line 141 of file CSCEfficiency.h.

◆ maxP

double CSCEfficiency::maxP
private

Definition at line 140 of file CSCEfficiency.h.

◆ minP

double CSCEfficiency::minP
private

Definition at line 139 of file CSCEfficiency.h.

◆ minTrackHits

unsigned int CSCEfficiency::minTrackHits
private

Definition at line 142 of file CSCEfficiency.h.

◆ myTriggers

std::vector<std::string> CSCEfficiency::myTriggers
private

Definition at line 151 of file CSCEfficiency.h.

◆ nEventsAnalyzed

int CSCEfficiency::nEventsAnalyzed
private

Definition at line 162 of file CSCEfficiency.h.

◆ passTheEvent

bool CSCEfficiency::passTheEvent
private

Definition at line 168 of file CSCEfficiency.h.

◆ pointToTriggers

std::vector<int> CSCEfficiency::pointToTriggers
private

Definition at line 152 of file CSCEfficiency.h.

◆ printalot

bool CSCEfficiency::printalot
private

Definition at line 160 of file CSCEfficiency.h.

◆ printout_NEvents

unsigned int CSCEfficiency::printout_NEvents
private

Definition at line 132 of file CSCEfficiency.h.

◆ recHitsPerEvent

TH1F* CSCEfficiency::recHitsPerEvent
private

Definition at line 258 of file CSCEfficiency.h.

◆ rh_token

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

Definition at line 121 of file CSCEfficiency.h.

◆ rootFileName

std::string CSCEfficiency::rootFileName
private

Definition at line 112 of file CSCEfficiency.h.

◆ sd_token

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

Definition at line 117 of file CSCEfficiency.h.

◆ se_token

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

Definition at line 122 of file CSCEfficiency.h.

◆ segmentsPerEvent

TH1F* CSCEfficiency::segmentsPerEvent
private

Definition at line 259 of file CSCEfficiency.h.

◆ sh_token

edm::EDGetTokenT<edm::PSimHitContainer> CSCEfficiency::sh_token
private

Definition at line 125 of file CSCEfficiency.h.

◆ StHist

struct CSCEfficiency::StationHistos CSCEfficiency::StHist[2][4]
private

◆ theFile

TFile* CSCEfficiency::theFile
private

Definition at line 158 of file CSCEfficiency.h.

◆ theService

MuonServiceProxy* CSCEfficiency::theService
private

Definition at line 156 of file CSCEfficiency.h.

◆ tk_token

edm::EDGetTokenT<edm::View<reco::Track> > CSCEfficiency::tk_token
private

Definition at line 124 of file CSCEfficiency.h.

◆ TriggersFired

TH1F* CSCEfficiency::TriggersFired
private

Definition at line 254 of file CSCEfficiency.h.

◆ useDigis

bool CSCEfficiency::useDigis
private

Definition at line 137 of file CSCEfficiency.h.

◆ useTrigger

bool CSCEfficiency::useTrigger
private

Definition at line 150 of file CSCEfficiency.h.

◆ wd_token

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

Definition at line 116 of file CSCEfficiency.h.

Vector3DBase< float, LocalTag >
CSCEfficiency::propagate
TrajectoryStateOnSurface propagate(FreeTrajectoryState &ftsStart, const BoundPlane &bp)
Definition: CSCEfficiency.cc:1538
CSCEfficiency::ChamberHistos::EfficientStrips
TH1F * EfficientStrips
Definition: CSCEfficiency.h:285
change_name.diff
diff
Definition: change_name.py:13
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
CSCEfficiency::theService
MuonServiceProxy * theService
Definition: CSCEfficiency.h:156
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
CSCEfficiency::cl_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
Definition: CSCEfficiency.h:119
CSCEfficiency::StationHistos::AllSegments_eta
TH1F * AllSegments_eta
Definition: CSCEfficiency.h:264
CSCEfficiency::alongZ
bool alongZ
Definition: CSCEfficiency.h:166
CSCEfficiency::ChamberHistos::SimRechits
TH1F * SimRechits
Definition: CSCEfficiency.h:295
CSCEfficiency::ChamberHistos::InefficientALCT_dydz
TH1F * InefficientALCT_dydz
Definition: CSCEfficiency.h:282
mps_fire.i
i
Definition: mps_fire.py:428
NumCh
#define NumCh
Definition: CSCEfficiency.h:82
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
CSCEfficiency::StationHistos::InefficientALCT_momTheta
TH1F * InefficientALCT_momTheta
Definition: CSCEfficiency.h:270
CSCEfficiency::StationHistos::InefficientCLCT_momPhi
TH1F * InefficientCLCT_momPhi
Definition: CSCEfficiency.h:272
CSCEfficiency::StationHistos::ResidualSegments
TH1F * ResidualSegments
Definition: CSCEfficiency.h:266
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
CSCChamber::layer
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30
reco::TrackBase::tight
Definition: TrackBase.h:153
CSCEfficiency::local_DX_DZ_Max
double local_DX_DZ_Max
Definition: CSCEfficiency.h:147
reco::TrackBase::loose
Definition: TrackBase.h:152
edm::Handle::product
T const * product() const
Definition: Handle.h:70
FreeTrajectoryState::hasError
bool hasError() const
Definition: FreeTrajectoryState.h:77
reco::Muon::SegmentAndTrackArbitration
Definition: Muon.h:190
CSCEfficiency::recSimHitEfficiency
bool recSimHitEfficiency(CSCDetId &id, FreeTrajectoryState &ftsChamber)
Definition: CSCEfficiency.cc:1270
CSCEfficiency::theFile
TFile * theFile
Definition: CSCEfficiency.h:158
reco::TrackBase::goodIterative
Definition: TrackBase.h:156
CSCEfficiency::sh_token
edm::EDGetTokenT< edm::PSimHitContainer > sh_token
Definition: CSCEfficiency.h:125
CSCEfficiency::inSensitiveLocalRegion
bool inSensitiveLocalRegion(double xLocal, double yLocal, int station, int ring)
Definition: CSCEfficiency.cc:546
LocalError::xy
float xy() const
Definition: LocalError.h:23
CSCEfficiency::chamberCandidates
void chamberCandidates(int station, int ring, float phi, std::vector< int > &coupleOfChambers)
Definition: CSCEfficiency.cc:1016
muon
Definition: MuonCocktails.h:17
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
CSCEfficiency::magField
bool magField
Definition: CSCEfficiency.h:164
CSCEfficiency::rh_token
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
Definition: CSCEfficiency.h:121
reco::TrackBase::confirmed
Definition: TrackBase.h:155
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCEfficiency::allSimhits
std::vector< std::pair< LocalPoint, int > > allSimhits[2][4][4][(36 - 1+1)][6]
Definition: CSCEfficiency.h:184
CSCDetId::ring
int ring() const
Definition: CSCDetId.h:68
DigiDM_cff.wires
wires
Definition: DigiDM_cff.py:33
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
CSCGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: CSCGeometry.cc:91
reco::TrackBase::undefQuality
Definition: TrackBase.h:151
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CSCEfficiency::isIPdata
bool isIPdata
Definition: CSCEfficiency.h:134
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
edm::HLTGlobalStatus::wasrun
bool wasrun() const
Was at least one path run?
Definition: HLTGlobalStatus.h:47
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:46
CSCEfficiency::tk_token
edm::EDGetTokenT< edm::View< reco::Track > > tk_token
Definition: CSCEfficiency.h:124
CSCEfficiency::stripWire_Efficiencies
bool stripWire_Efficiencies(CSCDetId &cscDetId, FreeTrajectoryState &ftsChamber)
Definition: CSCEfficiency.cc:1180
CSCLayer
Definition: CSCLayer.h:24
edm::HLTGlobalStatus::error
bool error() const
Has any path encountered an error (exception)
Definition: HLTGlobalStatus.h:51
CSCEfficiency::StationHistos::hitsInSegment
TH1F * hitsInSegment
Definition: CSCEfficiency.h:263
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCEfficiency::ChamberHistos::Y_EfficientRecHits_inSegment
std::vector< TH1F * > Y_EfficientRecHits_inSegment
Definition: CSCEfficiency.h:291
edm::Handle< CSCALCTDigiCollection >
CSCEfficiency::getAbsoluteEfficiency
bool getAbsoluteEfficiency
Definition: CSCEfficiency.h:136
dqmdumpme.first
first
Definition: dqmdumpme.py:55
CSCEfficiency::maxNormChi2
double maxNormChi2
Definition: CSCEfficiency.h:141
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:14
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
CSCEfficiency::wd_token
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: CSCEfficiency.h:116
PixelTestBeamValidation_cfi.Efficiency
Efficiency
Definition: PixelTestBeamValidation_cfi.py:79
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
CSCEfficiency::pointToTriggers
std::vector< int > pointToTriggers
Definition: CSCEfficiency.h:152
CSCEfficiency::ChamberHistos::NoWires_momTheta
TH1F * NoWires_momTheta
Definition: CSCEfficiency.h:287
DetId
Definition: DetId.h:17
CSCEfficiency::passTheEvent
bool passTheEvent
Definition: CSCEfficiency.h:168
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
CSCEfficiency::allCLCT
bool allCLCT[2][4][4][(36 - 1+1)]
Definition: CSCEfficiency.h:172
dqmdumpme.last
last
Definition: dqmdumpme.py:56
debug
#define debug
Definition: HDRShower.cc:19
CSCEfficiency::local_DY_DZ_Max
double local_DY_DZ_Max
Definition: CSCEfficiency.h:145
CSCEfficiency::ChamberHistos::SimSimhits
TH1F * SimSimhits
Definition: CSCEfficiency.h:296
CSCEfficiency::returnTypes
void returnTypes(CSCDetId &id, int &ec, int &st, int &rg, int &ch, int &secondRing)
Definition: CSCEfficiency.cc:1448
CSCEfficiency::andOr
bool andOr
Definition: CSCEfficiency.h:153
CSCEfficiency::StHist
struct CSCEfficiency::StationHistos StHist[2][4]
TrajectoryStateOnSurface::freeState
FreeTrajectoryState const * freeState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:58
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
CSCEfficiency::StationHistos::segmentChi2_ndf
TH1F * segmentChi2_ndf
Definition: CSCEfficiency.h:262
FreeTrajectoryState::cartesianError
CartesianTrajectoryError cartesianError() const
Definition: FreeTrajectoryState.h:81
CSCEfficiency::ChamberHistos::StripWiresCorrelations
TH1F * StripWiresCorrelations
Definition: CSCEfficiency.h:286
MuonPatternRecoDumper
Definition: MuonPatternRecoDumper.h:18
CSCEfficiency::lineParameter
double lineParameter(double initZPosition, double destZPosition, double initZDirection)
Definition: CSCEfficiency.cc:1507
LocalError::xx
float xx() const
Definition: LocalError.h:22
CSCEfficiency::linearExtrapolation
void linearExtrapolation(GlobalPoint initialPosition, GlobalVector initialDirection, float zSurface, std::vector< float > &posZY)
Definition: CSCEfficiency.cc:1490
HLT_FULL_cff.muon
muon
Definition: HLT_FULL_cff.py:11776
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
CSCEfficiency::allRechits
std::vector< std::pair< LocalPoint, bool > > allRechits[2][4][4][(36 - 1+1)][6]
Definition: CSCEfficiency.h:188
CSCLayerGeometry
Definition: CSCLayerGeometry.h:25
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
muon::caloCompatibility
float caloCompatibility(const reco::Muon &muon)
Definition: MuonSelectors.cc:58
reco::BeamSpot
Definition: BeamSpot.h:21
CSCDetId::layer
int layer() const
Definition: CSCDetId.h:56
AlgebraicSymMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Definition: AlgebraicROOTObjects.h:24
edm::ESHandle< CSCGeometry >
CSCEfficiency::fillDigiInfo
void fillDigiInfo(edm::Handle< CSCALCTDigiCollection > &alcts, edm::Handle< CSCCLCTDigiCollection > &clcts, edm::Handle< CSCCorrelatedLCTDigiCollection > &correlatedlcts, edm::Handle< CSCWireDigiCollection > &wires, edm::Handle< CSCStripDigiCollection > &strips, edm::Handle< edm::PSimHitContainer > &simhits, edm::Handle< CSCRecHit2DCollection > &rechits, edm::Handle< CSCSegmentCollection > &segments, edm::ESHandle< CSCGeometry > &cscGeom)
Definition: CSCEfficiency.cc:683
CSCChamber
Definition: CSCChamber.h:22
BeamSpotPI::dxdz
Definition: BeamSpotPayloadInspectorHelper.h:36
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
CSCEfficiency::StationHistos::EfficientCLCT_momPhi
TH1F * EfficientCLCT_momPhi
Definition: CSCEfficiency.h:271
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
CSCLayer::geometry
const CSCLayerGeometry * geometry() const
Definition: CSCLayer.h:44
HI_PhotonSkim_cff.rechits
rechits
Definition: HI_PhotonSkim_cff.py:76
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
CSCEfficiency::ChamberHistos::EfficientALCT_dydz
TH1F * EfficientALCT_dydz
Definition: CSCEfficiency.h:281
Point3DBase< float, LocalTag >
CSCEfficiency::ChHist
struct CSCEfficiency::ChamberHistos ChHist[2][4][3][36 - 1+1]
GeomDet::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
CSCEfficiency::getFromCLHEP
FreeTrajectoryState getFromCLHEP(const CLHEP::Hep3Vector &p3, const CLHEP::Hep3Vector &r3, int charge, const AlgebraicSymMatrix66 &cov, const MagneticField *field)
Definition: CSCEfficiency.cc:1476
reco::TrackBase::qualitySize
Definition: TrackBase.h:160
CSCEfficiency::fillLCT_info
void fillLCT_info(edm::Handle< CSCALCTDigiCollection > &alcts, edm::Handle< CSCCLCTDigiCollection > &clcts, edm::Handle< CSCCorrelatedLCTDigiCollection > &correlatedlcts)
Definition: CSCEfficiency.cc:720
CSCEfficiency::allSegments
std::vector< std::pair< LocalPoint, LocalVector > > allSegments[2][4][4][(36 - 1+1)]
Definition: CSCEfficiency.h:191
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
CSCEfficiency::ChamberHistos::InefficientCLCT_dxdz
TH1F * InefficientCLCT_dxdz
Definition: CSCEfficiency.h:284
CSCEfficiency::StationHistos::EfficientSegments_XY
TH2F * EfficientSegments_XY
Definition: CSCEfficiency.h:267
CSCEfficiency::ChamberHistos::EfficientRechits_good
TH1F * EfficientRechits_good
Definition: CSCEfficiency.h:280
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CSCLayerGeometry::nearestStrip
int nearestStrip(const LocalPoint &lp) const
Definition: CSCLayerGeometry.h:96
CSCEfficiency::ChamberHistos::InefficientSingleHits
TH1F * InefficientSingleHits
Definition: CSCEfficiency.h:277
CSCEfficiency::allCorrLCT
bool allCorrLCT[2][4][4][(36 - 1+1)]
Definition: CSCEfficiency.h:174
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
edm::View
Definition: CaloClusterFwd.h:14
funct::true
true
Definition: Factorize.h:173
HLT_FULL_cff.propagatorName
propagatorName
Definition: HLT_FULL_cff.py:9587
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
JetMETHLTOfflineSource_cfi.feta
feta
Definition: JetMETHLTOfflineSource_cfi.py:30
FirstCh
#define FirstCh
Definition: CSCEfficiency.h:81
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
CSCEfficiency::fillSimhit_info
void fillSimhit_info(edm::Handle< edm::PSimHitContainer > &simHits)
Definition: CSCEfficiency.cc:831
CSCEfficiency::maxP
double maxP
Definition: CSCEfficiency.h:140
HLTBitAnalyser_cfi.simhits
simhits
SIM objects.
Definition: HLTBitAnalyser_cfi.py:21
CSCEfficiency::propagator
const Propagator * propagator(std::string propagatorName) const
Definition: CSCEfficiency.cc:1533
CSCEfficiency::ChamberHistos::EfficientRechits_inSegment
TH1F * EfficientRechits_inSegment
Definition: CSCEfficiency.h:276
edm::ParameterSet
Definition: ParameterSet.h:47
CSCEfficiency::rootFileName
std::string rootFileName
Definition: CSCEfficiency.h:112
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
LocalError
Definition: LocalError.h:12
CSCEfficiency::emptyChambers
bool emptyChambers[2][4][4][(36 - 1+1)]
Definition: CSCEfficiency.h:194
edm::RangeMap::const_iterator
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
CSCEfficiency::myTriggers
std::vector< std::string > myTriggers
Definition: CSCEfficiency.h:151
CSCEfficiency::nEventsAnalyzed
int nEventsAnalyzed
Definition: CSCEfficiency.h:162
CSCEfficiency::extrapolate1D
double extrapolate1D(double initPosition, double initDirection, double parameterOfTheLine)
Definition: CSCEfficiency.cc:1502
CSCEfficiency::useTrigger
bool useTrigger
Definition: CSCEfficiency.h:150
CSCEfficiency::ChamberHistos::EfficientWireGroups
TH1F * EfficientWireGroups
Definition: CSCEfficiency.h:289
CSCDetId
Definition: CSCDetId.h:26
CSCEfficiency::distanceFromDeadZone
double distanceFromDeadZone
Definition: CSCEfficiency.h:138
BeamSpotPI::dydz
Definition: BeamSpotPayloadInspectorHelper.h:37
CSCEfficiency::printalot
bool printalot
Definition: CSCEfficiency.h:160
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
CSCEfficiency::ChamberHistos::Phi_InefficientRecHits_inSegment
std::vector< TH1F * > Phi_InefficientRecHits_inSegment
Definition: CSCEfficiency.h:292
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
CSCEfficiency::StationHistos::EfficientSegments_eta
TH1F * EfficientSegments_eta
Definition: CSCEfficiency.h:265
CSCEfficiency::TriggersFired
TH1F * TriggersFired
Definition: CSCEfficiency.h:254
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
CSCEfficiency::isBeamdata
bool isBeamdata
Definition: CSCEfficiency.h:135
CSCEfficiency::geomToken_
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
Definition: CSCEfficiency.h:129
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
CSCEfficiency::ChamberHistos::Phi_EfficientRecHits_inSegment
std::vector< TH1F * > Phi_EfficientRecHits_inSegment
Definition: CSCEfficiency.h:293
CSCEfficiency::fillWG_info
void fillWG_info(edm::Handle< CSCWireDigiCollection > &wires, edm::ESHandle< CSCGeometry > &cscGeom)
Definition: CSCEfficiency.cc:766
PVValHelper::dy
Definition: PVValidationHelpers.h:49
CSCDetId::chamber
int chamber() const
Definition: CSCDetId.h:62
CSCEfficiency::chooseDirection
void chooseDirection(CLHEP::Hep3Vector &innerPosition, CLHEP::Hep3Vector &outerPosition)
Definition: CSCEfficiency.cc:1512
CSCEfficiency::applyTrigger
bool applyTrigger(edm::Handle< edm::TriggerResults > &hltR, const edm::TriggerNames &triggerNames)
Definition: CSCEfficiency.cc:1566
CSCEfficiency::CLCTPerEvent
TH1F * CLCTPerEvent
Definition: CSCEfficiency.h:257
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
CSCLayerGeometry::stripAngle
float stripAngle(int strip) const
Definition: CSCLayerGeometry.cc:147
get
#define get
CSCEfficiency::local_DY_DZ_Min
double local_DY_DZ_Min
Definition: CSCEfficiency.h:146
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:27
CSCEfficiency::printout_NEvents
unsigned int printout_NEvents
Definition: CSCEfficiency.h:132
CartesianTrajectoryError::matrix
const AlgebraicSymMatrix66 & matrix() const
Definition: CartesianTrajectoryError.h:28
CSCEfficiency::getFromFTS
void getFromFTS(const FreeTrajectoryState &fts, CLHEP::Hep3Vector &p3, CLHEP::Hep3Vector &r3, int &charge, AlgebraicSymMatrix66 &cov)
Definition: CSCEfficiency.cc:1461
DDAxes::phi
CSCEfficiency::co_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
Definition: CSCEfficiency.h:120
CSCEfficiency::ht_token
edm::EDGetTokenT< edm::TriggerResults > ht_token
Definition: CSCEfficiency.h:127
CartesianTrajectoryError
Definition: CartesianTrajectoryError.h:15
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
mps_fire.Path
Path
Definition: mps_fire.py:298
CSCEfficiency::DataFlow
TH1F * DataFlow
Definition: CSCEfficiency.h:253
CSCGeometry::layer
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
Definition: CSCGeometry.cc:105
CSCEfficiency::allStrips
std::vector< std::pair< int, float > > allStrips[2][4][4][(36 - 1+1)][6]
Definition: CSCEfficiency.h:177
CSCEfficiency::fillRechitsSegments_info
void fillRechitsSegments_info(edm::Handle< CSCRecHit2DCollection > &rechits, edm::Handle< CSCSegmentCollection > &segments, edm::ESHandle< CSCGeometry > &cscGeom)
Definition: CSCEfficiency.cc:843
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
CSCEfficiency::recHitSegment_Efficiencies
bool recHitSegment_Efficiencies(CSCDetId &cscDetId, const CSCChamber *cscChamber, FreeTrajectoryState &ftsChamber)
Definition: CSCEfficiency.cc:1314
PVValHelper::dz
Definition: PVValidationHelpers.h:50
CSCDetId::endcap
int endcap() const
Definition: CSCDetId.h:85
CSCEfficiency::checkLocal
bool checkLocal(double yLocal, double yBoundary, int station, int ring)
Definition: CSCEfficiency.cc:605
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
BoundPlane
CSCEfficiency::ALCTPerEvent
TH1F * ALCTPerEvent
Definition: CSCEfficiency.h:256
edm::TriggerNames
Definition: TriggerNames.h:55
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CSCEfficiency::ChamberHistos::AllSingleHits
TH1F * AllSingleHits
Definition: CSCEfficiency.h:279
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
MuonDigiCollection::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
edm::RefToBase< reco::Track >
p3
double p3[4]
Definition: TauolaWrapper.h:91
CSCEfficiency::ChamberHistos::digiAppearanceCount
TH1F * digiAppearanceCount
Definition: CSCEfficiency.h:278
CSCEfficiency::se_token
edm::EDGetTokenT< CSCSegmentCollection > se_token
Definition: CSCEfficiency.h:122
edm::HLTGlobalStatus::accept
bool accept() const
Has at least one path accepted the event?
Definition: HLTGlobalStatus.h:49
CSCEfficiency::ChamberHistos::Y_InefficientRecHits_inSegment
std::vector< TH1F * > Y_InefficientRecHits_inSegment
Definition: CSCEfficiency.h:290
CSCEfficiency::fillStrips_info
void fillStrips_info(edm::Handle< CSCStripDigiCollection > &strips)
Definition: CSCEfficiency.cc:792
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CSCEfficiency::minTrackHits
unsigned int minTrackHits
Definition: CSCEfficiency.h:142
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
CSCEfficiency::StationHistos::EfficientALCT_momTheta
TH1F * EfficientALCT_momTheta
Definition: CSCEfficiency.h:269
CSCEfficiency::ChamberHistos::EfficientCLCT_dxdz
TH1F * EfficientCLCT_dxdz
Definition: CSCEfficiency.h:283
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
CSCLayerGeometry::yOfWireGroup
float yOfWireGroup(int wireGroup, float x=0.) const
Definition: CSCLayerGeometry.h:201
CSCEfficiency::ChamberHistos::NoStrips_momPhi
TH1F * NoStrips_momPhi
Definition: CSCEfficiency.h:288
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
CSCEfficiency::minP
double minP
Definition: CSCEfficiency.h:139
CSCEfficiency::efficienciesPerChamber
bool efficienciesPerChamber(CSCDetId &id, const CSCChamber *cscChamber, FreeTrajectoryState &ftsChamber)
Definition: CSCEfficiency.cc:1057
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
DigiContainerIterator
Definition: MuonDigiCollection.h:30
CSCEfficiency::ringCandidates
void ringCandidates(int station, float absEta, std::map< std::string, bool > &chamberTypes)
Definition: CSCEfficiency.cc:976
CSCEfficiency::recHitsPerEvent
TH1F * recHitsPerEvent
Definition: CSCEfficiency.h:258
CSCEfficiency::isData
bool isData
Definition: CSCEfficiency.h:133
LocalError::yy
float yy() const
Definition: LocalError.h:24
edm::InputTag
Definition: InputTag.h:15
DigiDM_cff.strips
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
Definition: DigiDM_cff.py:32
CSCEfficiency::useDigis
bool useDigis
Definition: CSCEfficiency.h:137
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
CSCGeometry::chamber
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
Definition: CSCGeometry.cc:100
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
CSCEfficiency::allWG
std::vector< std::pair< std::pair< int, float >, int > > allWG[2][4][4][(36 - 1+1)][6]
Definition: CSCEfficiency.h:180
edm::View::size_type
unsigned int size_type
Definition: View.h:90
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
CSCEfficiency::applyIPangleCuts
bool applyIPangleCuts
Definition: CSCEfficiency.h:144
CSCEfficiency::al_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
Definition: CSCEfficiency.h:118
CSCEfficiency::sd_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: CSCEfficiency.h:117
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CSCEfficiency::segmentsPerEvent
TH1F * segmentsPerEvent
Definition: CSCEfficiency.h:259
CSCEfficiency::allALCT
bool allALCT[2][4][4][(36 - 1+1)]
Definition: CSCEfficiency.h:173
reco::TrackBase::highPurity
Definition: TrackBase.h:154
CSCEfficiency::StationHistos::InefficientSegments_XY
TH2F * InefficientSegments_XY
Definition: CSCEfficiency.h:268