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
 
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)]
 
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 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>
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 114 of file CSCEfficiency.h.

Constructor & Destructor Documentation

◆ CSCEfficiency()

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

Constructor.

Definition at line 1646 of file CSCEfficiency.cc.

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

References PA_MinBiasSkim_cff::andOr, FirstCh, createfilelist::int, HLTBitAnalyser_cfi::isData, distMuonMETValueMapProducer_cff::maxNormChi2, RecoMuonValidator_cfi::maxP, alignBH_cfg::minP, HLT_2018_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 1960 of file CSCEfficiency.cc.

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

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 1567 of file CSCEfficiency.cc.

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

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 2061 of file CSCEfficiency.cc.

2061 {}

◆ chamberCandidates()

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

Definition at line 1017 of file CSCEfficiency.cc.

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

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 606 of file CSCEfficiency.cc.

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

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

◆ chooseDirection()

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

Definition at line 1513 of file CSCEfficiency.cc.

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

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

◆ efficienciesPerChamber()

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

Definition at line 1058 of file CSCEfficiency.cc.

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

References gather_cfg::cout, BeamSpotFakeParameters_cfi::dxdz, BeamSpotFakeParameters_cfi::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 2064 of file CSCEfficiency.cc.

2064 {}

◆ extrapolate1D()

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

Definition at line 1503 of file CSCEfficiency.cc.

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

◆ 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 684 of file CSCEfficiency.cc.

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

References HLTBitAnalyser_cfi::isData, NumCh, TrackInfoProducer_cfi::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 721 of file CSCEfficiency.cc.

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

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 844 of file CSCEfficiency.cc.

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

References relativeConstraints::chamber, CSCDetId::chamber(), gather_cfg::cout, std::empty(), CSCDetId::endcap(), makeMuonMisalignmentScenario::endcap, FirstCh, CSCDetId::layer(), CSCGeometry::layer(), NumCh, TrackInfoProducer_cfi::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 832 of file CSCEfficiency.cc.

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

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 793 of file CSCEfficiency.cc.

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

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 767 of file CSCEfficiency.cc.

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

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

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, 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_2018_cff::minTrackHits, HLT_2018_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, TrackInfoProducer_cfi::rechits, relativeConstraints::ring, reco::Muon::SegmentAndTrackArbitration, HLTBitAnalyser_cfi::simhits, mathSSE::sqrt(), relativeConstraints::station, DigiDM_cff::strips, GeomDet::surface(), reco::TrackBase::tight, HLT_2018_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 1477 of file CSCEfficiency.cc.

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

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 547 of file CSCEfficiency.cc.

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

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 1491 of file CSCEfficiency.cc.

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

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 1508 of file CSCEfficiency.cc.

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

◆ propagate()

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

Definition at line 1539 of file CSCEfficiency.cc.

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

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

◆ propagator()

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

Definition at line 1534 of file CSCEfficiency.cc.

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

References HLT_2018_cff::propagatorName.

◆ recHitSegment_Efficiencies()

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

Definition at line 1315 of file CSCEfficiency.cc.

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

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(), std::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 1271 of file CSCEfficiency.cc.

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

References std::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 1449 of file CSCEfficiency.cc.

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

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 977 of file CSCEfficiency.cc.

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

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

◆ stripWire_Efficiencies()

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

Definition at line 1181 of file CSCEfficiency.cc.

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

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 137 of file CSCEfficiency.h.

◆ ALCTPerEvent

TH1F* CSCEfficiency::ALCTPerEvent
private

Definition at line 273 of file CSCEfficiency.h.

◆ allALCT

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

Definition at line 190 of file CSCEfficiency.h.

◆ allCLCT

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

Definition at line 189 of file CSCEfficiency.h.

◆ allCorrLCT

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

Definition at line 191 of file CSCEfficiency.h.

◆ allRechits

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

Definition at line 205 of file CSCEfficiency.h.

◆ allSegments

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

Definition at line 208 of file CSCEfficiency.h.

◆ allSimhits

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

Definition at line 201 of file CSCEfficiency.h.

◆ allStrips

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

Definition at line 194 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 197 of file CSCEfficiency.h.

◆ alongZ

bool CSCEfficiency::alongZ
private

Definition at line 183 of file CSCEfficiency.h.

◆ andOr

bool CSCEfficiency::andOr
private

Definition at line 170 of file CSCEfficiency.h.

◆ applyIPangleCuts

bool CSCEfficiency::applyIPangleCuts
private

Definition at line 161 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 138 of file CSCEfficiency.h.

◆ CLCTPerEvent

TH1F* CSCEfficiency::CLCTPerEvent
private

Definition at line 274 of file CSCEfficiency.h.

◆ co_token

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

Definition at line 139 of file CSCEfficiency.h.

◆ DataFlow

TH1F* CSCEfficiency::DataFlow
private

Definition at line 270 of file CSCEfficiency.h.

◆ distanceFromDeadZone

double CSCEfficiency::distanceFromDeadZone
private

Definition at line 155 of file CSCEfficiency.h.

◆ emptyChambers

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

Definition at line 211 of file CSCEfficiency.h.

◆ getAbsoluteEfficiency

bool CSCEfficiency::getAbsoluteEfficiency
private

Definition at line 153 of file CSCEfficiency.h.

◆ ht_token

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

Definition at line 146 of file CSCEfficiency.h.

◆ isBeamdata

bool CSCEfficiency::isBeamdata
private

Definition at line 152 of file CSCEfficiency.h.

◆ isData

bool CSCEfficiency::isData
private

Definition at line 150 of file CSCEfficiency.h.

◆ isIPdata

bool CSCEfficiency::isIPdata
private

Definition at line 151 of file CSCEfficiency.h.

◆ local_DX_DZ_Max

double CSCEfficiency::local_DX_DZ_Max
private

Definition at line 164 of file CSCEfficiency.h.

◆ local_DY_DZ_Max

double CSCEfficiency::local_DY_DZ_Max
private

Definition at line 162 of file CSCEfficiency.h.

◆ local_DY_DZ_Min

double CSCEfficiency::local_DY_DZ_Min
private

Definition at line 163 of file CSCEfficiency.h.

◆ magField

bool CSCEfficiency::magField
private

Definition at line 181 of file CSCEfficiency.h.

◆ maxNormChi2

double CSCEfficiency::maxNormChi2
private

Definition at line 158 of file CSCEfficiency.h.

◆ maxP

double CSCEfficiency::maxP
private

Definition at line 157 of file CSCEfficiency.h.

◆ minP

double CSCEfficiency::minP
private

Definition at line 156 of file CSCEfficiency.h.

◆ minTrackHits

unsigned int CSCEfficiency::minTrackHits
private

Definition at line 159 of file CSCEfficiency.h.

◆ myTriggers

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

Definition at line 168 of file CSCEfficiency.h.

◆ nEventsAnalyzed

int CSCEfficiency::nEventsAnalyzed
private

Definition at line 179 of file CSCEfficiency.h.

◆ passTheEvent

bool CSCEfficiency::passTheEvent
private

Definition at line 185 of file CSCEfficiency.h.

◆ pointToTriggers

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

Definition at line 169 of file CSCEfficiency.h.

◆ printalot

bool CSCEfficiency::printalot
private

Definition at line 177 of file CSCEfficiency.h.

◆ printout_NEvents

unsigned int CSCEfficiency::printout_NEvents
private

Definition at line 149 of file CSCEfficiency.h.

◆ recHitsPerEvent

TH1F* CSCEfficiency::recHitsPerEvent
private

Definition at line 275 of file CSCEfficiency.h.

◆ rh_token

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

Definition at line 140 of file CSCEfficiency.h.

◆ rootFileName

std::string CSCEfficiency::rootFileName
private

Definition at line 131 of file CSCEfficiency.h.

◆ sd_token

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

Definition at line 136 of file CSCEfficiency.h.

◆ se_token

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

Definition at line 141 of file CSCEfficiency.h.

◆ segmentsPerEvent

TH1F* CSCEfficiency::segmentsPerEvent
private

Definition at line 276 of file CSCEfficiency.h.

◆ sh_token

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

Definition at line 144 of file CSCEfficiency.h.

◆ StHist

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

◆ theFile

TFile* CSCEfficiency::theFile
private

Definition at line 175 of file CSCEfficiency.h.

◆ theService

MuonServiceProxy* CSCEfficiency::theService
private

Definition at line 173 of file CSCEfficiency.h.

◆ tk_token

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

Definition at line 143 of file CSCEfficiency.h.

◆ TriggersFired

TH1F* CSCEfficiency::TriggersFired
private

Definition at line 271 of file CSCEfficiency.h.

◆ useDigis

bool CSCEfficiency::useDigis
private

Definition at line 154 of file CSCEfficiency.h.

◆ useTrigger

bool CSCEfficiency::useTrigger
private

Definition at line 167 of file CSCEfficiency.h.

◆ wd_token

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

Definition at line 135 of file CSCEfficiency.h.

Vector3DBase< float, LocalTag >
CSCEfficiency::propagate
TrajectoryStateOnSurface propagate(FreeTrajectoryState &ftsStart, const BoundPlane &bp)
Definition: CSCEfficiency.cc:1539
CSCEfficiency::ChamberHistos::EfficientStrips
TH1F * EfficientStrips
Definition: CSCEfficiency.h:302
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:173
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:138
CSCEfficiency::StationHistos::AllSegments_eta
TH1F * AllSegments_eta
Definition: CSCEfficiency.h:281
CSCEfficiency::alongZ
bool alongZ
Definition: CSCEfficiency.h:183
BeamSpotFakeParameters_cfi.dxdz
dxdz
Definition: BeamSpotFakeParameters_cfi.py:12
CSCEfficiency::ChamberHistos::SimRechits
TH1F * SimRechits
Definition: CSCEfficiency.h:312
CSCEfficiency::ChamberHistos::InefficientALCT_dydz
TH1F * InefficientALCT_dydz
Definition: CSCEfficiency.h:299
mps_fire.i
i
Definition: mps_fire.py:355
NumCh
#define NumCh
Definition: CSCEfficiency.h:101
CSCEfficiency::StationHistos::InefficientALCT_momTheta
TH1F * InefficientALCT_momTheta
Definition: CSCEfficiency.h:287
CSCEfficiency::StationHistos::InefficientCLCT_momPhi
TH1F * InefficientCLCT_momPhi
Definition: CSCEfficiency.h:289
CSCEfficiency::StationHistos::ResidualSegments
TH1F * ResidualSegments
Definition: CSCEfficiency.h:283
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:164
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:1271
CSCEfficiency::theFile
TFile * theFile
Definition: CSCEfficiency.h:175
reco::TrackBase::goodIterative
Definition: TrackBase.h:156
CSCEfficiency::sh_token
edm::EDGetTokenT< edm::PSimHitContainer > sh_token
Definition: CSCEfficiency.h:144
CSCEfficiency::inSensitiveLocalRegion
bool inSensitiveLocalRegion(double xLocal, double yLocal, int station, int ring)
Definition: CSCEfficiency.cc:547
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:1017
muon
Definition: MuonCocktails.h:17
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
CSCEfficiency::magField
bool magField
Definition: CSCEfficiency.h:181
CSCEfficiency::rh_token
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
Definition: CSCEfficiency.h:140
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:201
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:151
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:215
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:71
CSCEfficiency::tk_token
edm::EDGetTokenT< edm::View< reco::Track > > tk_token
Definition: CSCEfficiency.h:143
CSCEfficiency::stripWire_Efficiencies
bool stripWire_Efficiencies(CSCDetId &cscDetId, FreeTrajectoryState &ftsChamber)
Definition: CSCEfficiency.cc:1181
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:280
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
HLT_2018_cff.muon
muon
Definition: HLT_2018_cff.py:10349
CSCEfficiency::ChamberHistos::Y_EfficientRecHits_inSegment
std::vector< TH1F * > Y_EfficientRecHits_inSegment
Definition: CSCEfficiency.h:308
edm::Handle< CSCALCTDigiCollection >
CSCEfficiency::getAbsoluteEfficiency
bool getAbsoluteEfficiency
Definition: CSCEfficiency.h:153
dqmdumpme.first
first
Definition: dqmdumpme.py:55
CSCEfficiency::maxNormChi2
double maxNormChi2
Definition: CSCEfficiency.h:158
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:15
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:135
PixelTestBeamValidation_cfi.Efficiency
Efficiency
Definition: PixelTestBeamValidation_cfi.py:66
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
CSCEfficiency::pointToTriggers
std::vector< int > pointToTriggers
Definition: CSCEfficiency.h:169
CSCEfficiency::ChamberHistos::NoWires_momTheta
TH1F * NoWires_momTheta
Definition: CSCEfficiency.h:304
DetId
Definition: DetId.h:17
CSCEfficiency::passTheEvent
bool passTheEvent
Definition: CSCEfficiency.h:185
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:189
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:162
CSCEfficiency::ChamberHistos::SimSimhits
TH1F * SimSimhits
Definition: CSCEfficiency.h:313
CSCEfficiency::returnTypes
void returnTypes(CSCDetId &id, int &ec, int &st, int &rg, int &ch, int &secondRing)
Definition: CSCEfficiency.cc:1449
CSCEfficiency::andOr
bool andOr
Definition: CSCEfficiency.h:170
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:73
CSCEfficiency::StationHistos::segmentChi2_ndf
TH1F * segmentChi2_ndf
Definition: CSCEfficiency.h:279
FreeTrajectoryState::cartesianError
CartesianTrajectoryError cartesianError() const
Definition: FreeTrajectoryState.h:81
CSCEfficiency::ChamberHistos::StripWiresCorrelations
TH1F * StripWiresCorrelations
Definition: CSCEfficiency.h:303
MuonPatternRecoDumper
Definition: MuonPatternRecoDumper.h:18
CSCEfficiency::lineParameter
double lineParameter(double initZPosition, double destZPosition, double initZDirection)
Definition: CSCEfficiency.cc:1508
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:1491
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
HLT_2018_cff.propagatorName
propagatorName
Definition: HLT_2018_cff.py:8200
CSCEfficiency::allRechits
std::vector< std::pair< LocalPoint, bool > > allRechits[2][4][4][(36 - 1+1)][6]
Definition: CSCEfficiency.h:205
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:684
CSCChamber
Definition: CSCChamber.h:22
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
CSCEfficiency::StationHistos::EfficientCLCT_momPhi
TH1F * EfficientCLCT_momPhi
Definition: CSCEfficiency.h:288
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
CSCLayer::geometry
const CSCLayerGeometry * geometry() const
Definition: CSCLayer.h:44
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
CSCEfficiency::ChamberHistos::EfficientALCT_dydz
TH1F * EfficientALCT_dydz
Definition: CSCEfficiency.h:298
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:1477
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:721
CSCEfficiency::allSegments
std::vector< std::pair< LocalPoint, LocalVector > > allSegments[2][4][4][(36 - 1+1)]
Definition: CSCEfficiency.h:208
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
CSCEfficiency::ChamberHistos::InefficientCLCT_dxdz
TH1F * InefficientCLCT_dxdz
Definition: CSCEfficiency.h:301
CSCEfficiency::StationHistos::EfficientSegments_XY
TH2F * EfficientSegments_XY
Definition: CSCEfficiency.h:284
CSCEfficiency::ChamberHistos::EfficientRechits_good
TH1F * EfficientRechits_good
Definition: CSCEfficiency.h:297
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:294
CSCEfficiency::allCorrLCT
bool allCorrLCT[2][4][4][(36 - 1+1)]
Definition: CSCEfficiency.h:191
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
edm::View
Definition: CaloClusterFwd.h:14
funct::true
true
Definition: Factorize.h:173
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:100
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:832
CSCEfficiency::maxP
double maxP
Definition: CSCEfficiency.h:157
HLTBitAnalyser_cfi.simhits
simhits
SIM objects.
Definition: HLTBitAnalyser_cfi.py:21
CSCEfficiency::propagator
const Propagator * propagator(std::string propagatorName) const
Definition: CSCEfficiency.cc:1534
CSCEfficiency::ChamberHistos::EfficientRechits_inSegment
TH1F * EfficientRechits_inSegment
Definition: CSCEfficiency.h:293
edm::ParameterSet
Definition: ParameterSet.h:36
CSCEfficiency::rootFileName
std::string rootFileName
Definition: CSCEfficiency.h:131
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:211
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:168
CSCEfficiency::nEventsAnalyzed
int nEventsAnalyzed
Definition: CSCEfficiency.h:179
CSCEfficiency::extrapolate1D
double extrapolate1D(double initPosition, double initDirection, double parameterOfTheLine)
Definition: CSCEfficiency.cc:1503
CSCEfficiency::useTrigger
bool useTrigger
Definition: CSCEfficiency.h:167
CSCEfficiency::ChamberHistos::EfficientWireGroups
TH1F * EfficientWireGroups
Definition: CSCEfficiency.h:306
CSCDetId
Definition: CSCDetId.h:26
TrackInfoProducer_cfi.rechits
rechits
Definition: TrackInfoProducer_cfi.py:9
CSCEfficiency::distanceFromDeadZone
double distanceFromDeadZone
Definition: CSCEfficiency.h:155
CSCEfficiency::printalot
bool printalot
Definition: CSCEfficiency.h:177
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
CSCEfficiency::ChamberHistos::Phi_InefficientRecHits_inSegment
std::vector< TH1F * > Phi_InefficientRecHits_inSegment
Definition: CSCEfficiency.h:309
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
CSCEfficiency::StationHistos::EfficientSegments_eta
TH1F * EfficientSegments_eta
Definition: CSCEfficiency.h:282
CSCEfficiency::TriggersFired
TH1F * TriggersFired
Definition: CSCEfficiency.h:271
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
CSCEfficiency::isBeamdata
bool isBeamdata
Definition: CSCEfficiency.h:152
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
CSCEfficiency::ChamberHistos::Phi_EfficientRecHits_inSegment
std::vector< TH1F * > Phi_EfficientRecHits_inSegment
Definition: CSCEfficiency.h:310
CSCEfficiency::fillWG_info
void fillWG_info(edm::Handle< CSCWireDigiCollection > &wires, edm::ESHandle< CSCGeometry > &cscGeom)
Definition: CSCEfficiency.cc:767
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:1513
CSCEfficiency::applyTrigger
bool applyTrigger(edm::Handle< edm::TriggerResults > &hltR, const edm::TriggerNames &triggerNames)
Definition: CSCEfficiency.cc:1567
CSCEfficiency::CLCTPerEvent
TH1F * CLCTPerEvent
Definition: CSCEfficiency.h:274
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:163
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:149
BeamSpotFakeParameters_cfi.dydz
dydz
Definition: BeamSpotFakeParameters_cfi.py:13
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:1462
DDAxes::phi
CSCEfficiency::co_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
Definition: CSCEfficiency.h:139
CSCEfficiency::ht_token
edm::EDGetTokenT< edm::TriggerResults > ht_token
Definition: CSCEfficiency.h:146
CartesianTrajectoryError
Definition: CartesianTrajectoryError.h:15
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
mps_fire.Path
Path
Definition: mps_fire.py:290
CSCEfficiency::DataFlow
TH1F * DataFlow
Definition: CSCEfficiency.h:270
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:194
CSCEfficiency::fillRechitsSegments_info
void fillRechitsSegments_info(edm::Handle< CSCRecHit2DCollection > &rechits, edm::Handle< CSCSegmentCollection > &segments, edm::ESHandle< CSCGeometry > &cscGeom)
Definition: CSCEfficiency.cc:844
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
CSCEfficiency::recHitSegment_Efficiencies
bool recHitSegment_Efficiencies(CSCDetId &cscDetId, const CSCChamber *cscChamber, FreeTrajectoryState &ftsChamber)
Definition: CSCEfficiency.cc:1315
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:606
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
BoundPlane
CSCEfficiency::ALCTPerEvent
TH1F * ALCTPerEvent
Definition: CSCEfficiency.h:273
edm::TriggerNames
Definition: TriggerNames.h:55
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CSCEfficiency::ChamberHistos::AllSingleHits
TH1F * AllSingleHits
Definition: CSCEfficiency.h:296
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:295
CSCEfficiency::se_token
edm::EDGetTokenT< CSCSegmentCollection > se_token
Definition: CSCEfficiency.h:141
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:307
CSCEfficiency::fillStrips_info
void fillStrips_info(edm::Handle< CSCStripDigiCollection > &strips)
Definition: CSCEfficiency.cc:793
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CSCEfficiency::minTrackHits
unsigned int minTrackHits
Definition: CSCEfficiency.h:159
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
CSCEfficiency::StationHistos::EfficientALCT_momTheta
TH1F * EfficientALCT_momTheta
Definition: CSCEfficiency.h:286
CSCEfficiency::ChamberHistos::EfficientCLCT_dxdz
TH1F * EfficientCLCT_dxdz
Definition: CSCEfficiency.h:300
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:305
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
CSCEfficiency::minP
double minP
Definition: CSCEfficiency.h:156
CSCEfficiency::efficienciesPerChamber
bool efficienciesPerChamber(CSCDetId &id, const CSCChamber *cscChamber, FreeTrajectoryState &ftsChamber)
Definition: CSCEfficiency.cc:1058
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:977
CSCEfficiency::recHitsPerEvent
TH1F * recHitsPerEvent
Definition: CSCEfficiency.h:275
CSCEfficiency::isData
bool isData
Definition: CSCEfficiency.h:150
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
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:154
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:197
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:161
CSCEfficiency::al_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
Definition: CSCEfficiency.h:137
CSCEfficiency::sd_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: CSCEfficiency.h:136
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:276
CSCEfficiency::allALCT
bool allALCT[2][4][4][(36 - 1+1)]
Definition: CSCEfficiency.h:190
reco::TrackBase::highPurity
Definition: TrackBase.h:154
CSCEfficiency::StationHistos::InefficientSegments_XY
TH2F * InefficientSegments_XY
Definition: CSCEfficiency.h:285