CMS 3D CMS Logo

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

#include <RecoLocalMuon/CSCSkim/src/CSCSkim.cc>

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

Public Member Functions

void beginJob () override
 
 CSCSkim (const edm::ParameterSet &pset)
 
void endJob () override
 
bool filter (edm::Event &event, const edm::EventSetup &eventSetup) override
 
 ~CSCSkim () override
 
- 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
 
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)
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

int chamberSerial (int kE, int kS, int kR, int kCh)
 
bool doBFieldStudySelection (edm::Handle< reco::TrackCollection > saTracks, edm::Handle< reco::TrackCollection > Tracks, edm::Handle< reco::MuonCollection > gMuons)
 
bool doCertainChamberSelection (edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips)
 
bool doCSCSkimming (edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
 
bool doDTOverlap (edm::Handle< CSCSegmentCollection > cscSegments)
 
bool doHaloLike (edm::Handle< CSCSegmentCollection > cscSegments)
 
bool doLongSATrack (edm::Handle< reco::TrackCollection > saTracks)
 
bool doMessyEventSkimming (edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
 
bool doOverlapSkimming (edm::Handle< CSCSegmentCollection > cscSegments)
 

Private Attributes

bool demandChambersBothSides
 
edm::EDGetTokenT< reco::MuonCollectionglm_token
 
std::string histogramFileName
 
TH1F * hxnHitChambers
 
TH1F * hxnRecHits
 
TH1F * hxnRecHitsSel
 
TH1F * hxnSegments
 
int iEvent
 
int iRun
 
bool isSimulation
 
bool makeHistograms
 
bool makeHistogramsForMessyEvents
 
TH1F * mevnChambers0
 
TH1F * mevnChambers1
 
TH1F * mevnRecHits0
 
TH1F * mevnRecHits1
 
TH1F * mevnSegments0
 
TH1F * mevnSegments1
 
int minimumHitChambers
 
int minimumSegments
 
int nCSCHitsMin
 
int nEventsAnalyzed
 
int nEventsCertainChamber
 
int nEventsChambersBothSides
 
int nEventsDTOverlap
 
int nEventsForBFieldStudies
 
int nEventsHaloLike
 
int nEventsLongSATrack
 
int nEventsMessy
 
int nEventsOverlappingChambers
 
int nEventsSelected
 
int nLayersWithHitsMinimum
 
int nTrHitsMin
 
int nValidHitsMin
 
std::string outputFileName
 
float pMin
 
float redChiSqMax
 
float rExtMax
 
edm::EDGetTokenT< CSCRecHit2DCollectionrh_token
 
edm::EDGetTokenT< reco::TrackCollectionsam_token
 
edm::EDGetTokenT< CSCStripDigiCollectionsdr_token
 
edm::EDGetTokenT< CSCStripDigiCollectionsds_token
 
edm::EDGetTokenT< CSCSegmentCollectionseg_token
 
TFile * theHistogramFile
 
edm::EDGetTokenT< reco::TrackCollectiontrk_token
 
int typeOfSkim
 
edm::EDGetTokenT< CSCWireDigiCollectionwdr_token
 
edm::EDGetTokenT< CSCWireDigiCollectionwds_token
 
int whichChamber
 
int whichEndcap
 
int whichRing
 
int whichStation
 
TH1F * xxnCSCHits
 
TH1F * xxnTrackerHits
 
TH1F * xxnValidHits
 
TH1F * xxP
 
TH1F * xxredChiSq
 
float zInnerMax
 
float zLengthMin
 
float zLengthTrMin
 

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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

This simple program selects minimal CSC events for output.

Michael Schmitt, Northwestern University, July 2008

Description: Offline skim module for CSC cosmic ray data

Implementation: <Notes on="" implementation>="">

Definition at line 73 of file CSCSkim.h.

Constructor & Destructor Documentation

CSCSkim::CSCSkim ( const edm::ParameterSet pset)
explicit

Definition at line 52 of file CSCSkim.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), postProcessorL1Gen_cff::outputFileName, ALCARECOTkAlMinBias_cff::pMin, and AlCaHLTBitMon_QueryRunRegistry::string.

53 {
54  // tokens from tags
55 
56  // Really should define the wire and digi tags in config, but for now, to avoid having to modify
57  // multiple config files, just hard-code those tags, to be equivalent to the pre-consumes code
58 
59  // wds_token = consumes<CSCWireDigiCollection>(pset.getParameter<InputTag>("simWireDigiTag"));
60  // sds_token = consumes<CSCStripDigiCollection>(pset.getParameter<InputTag>("simStripDigiTag"));
61  // wdr_token = consumes<CSCWireDigiCollection>(pset.getParameter<InputTag>("wireDigiTag"));
62  // sdr_token = consumes<CSCStripDigiCollection>(pset.getParameter<InputTag>("stripDigiTag"));
63 
64  wds_token = consumes<CSCWireDigiCollection>(edm::InputTag("simMuonCSCDigis","MuonCSCWireDigi") );
65  sds_token = consumes<CSCStripDigiCollection>(edm::InputTag("simMuonCSCDigis","MuonCSCStripDigi") );
66  wdr_token = consumes<CSCWireDigiCollection>(edm::InputTag("muonCSCDigis","MuonCSCWireDigi") );
67  sdr_token = consumes<CSCStripDigiCollection>(edm::InputTag("muonCSCDigis","MuonCSCStripDigi") );
68 
69  rh_token = consumes<CSCRecHit2DCollection>(pset.getParameter<InputTag>("cscRecHitTag"));
70  seg_token = consumes<CSCSegmentCollection>(pset.getParameter<InputTag>("cscSegmentTag"));
71 
72  sam_token = consumes<reco::TrackCollection>(pset.getParameter<InputTag>("SAMuonTag"));
73  trk_token = consumes<reco::TrackCollection>(pset.getParameter<InputTag>("trackTag"));
74  glm_token = consumes<reco::MuonCollection>(pset.getParameter<InputTag>("GLBMuonTag"));
75 
76  // Get the various input parameters
77  outputFileName = pset.getUntrackedParameter<std::string>("outputFileName","outputSkim.root");
78  histogramFileName = pset.getUntrackedParameter<std::string>("histogramFileName","histos.root");
79  typeOfSkim = pset.getUntrackedParameter<int>("typeOfSkim",1);
80  nLayersWithHitsMinimum = pset.getUntrackedParameter<int>("nLayersWithHitsMinimum",3);
81  minimumHitChambers = pset.getUntrackedParameter<int>("minimumHitChambers",1);
82  minimumSegments = pset.getUntrackedParameter<int>("minimumSegments",3);
83  demandChambersBothSides = pset.getUntrackedParameter<bool>("demandChambersBothSides",false);
84  makeHistograms = pset.getUntrackedParameter<bool>("makeHistograms",false);
85  makeHistogramsForMessyEvents = pset.getUntrackedParameter<bool>("makeHistogramsForMessyEvebts",false);
86  whichEndcap = pset.getUntrackedParameter<int>("whichEndcap",2);
87  whichStation = pset.getUntrackedParameter<int>("whichStation",3);
88  whichRing = pset.getUntrackedParameter<int>("whichRing",2);
89  whichChamber = pset.getUntrackedParameter<int>("whichChamber",24);
90 
91  // for BStudy selection (skim type 9)
92  pMin = pset.getUntrackedParameter<double>("pMin",3.);
93  zLengthMin = pset.getUntrackedParameter<double>("zLengthMin",200.);
94  nCSCHitsMin = pset.getUntrackedParameter<int>("nCSCHitsMin",9);
95  zInnerMax = pset.getUntrackedParameter<double>("zInnerMax",9000.);
96  nTrHitsMin = pset.getUntrackedParameter<int>("nTrHitsMin",8);
97  zLengthTrMin = pset.getUntrackedParameter<double>("zLengthTrMin",180.);
98  rExtMax = pset.getUntrackedParameter<double>("rExtMax",3000.);
99  redChiSqMax = pset.getUntrackedParameter<double>("redChiSqMax",20.);
100  nValidHitsMin = pset.getUntrackedParameter<int>("nValidHitsMin",8);
101 
102  LogInfo("[CSCSkim] Setup")
103  << "\n\t===== CSCSkim =====\n"
104  << "\t\ttype of skim ...............................\t" << typeOfSkim
105  << "\t\tminimum number of layers with hits .........\t" << nLayersWithHitsMinimum
106  << "\n\t\tminimum number of chambers w/ hit layers..\t" << minimumHitChambers
107  << "\n\t\tminimum number of segments ...............\t" << minimumSegments
108  << "\n\t\tdemand chambers on both sides.............\t" << demandChambersBothSides
109  << "\n\t\tmake histograms...........................\t" << makeHistograms
110  << "\n\t\t..for messy events........................\t" << makeHistogramsForMessyEvents
111  << "\n\t===================\n\n";
112 
113 }
edm::EDGetTokenT< CSCSegmentCollection > seg_token
Definition: CSCSkim.h:150
edm::EDGetTokenT< reco::TrackCollection > sam_token
Definition: CSCSkim.h:151
float zInnerMax
Definition: CSCSkim.h:172
T getParameter(std::string const &) const
float rExtMax
Definition: CSCSkim.h:175
T getUntrackedParameter(std::string const &, T const &) const
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:163
int whichEndcap
Definition: CSCSkim.h:164
int nCSCHitsMin
Definition: CSCSkim.h:171
int nLayersWithHitsMinimum
Definition: CSCSkim.h:158
float zLengthMin
Definition: CSCSkim.h:170
edm::EDGetTokenT< CSCWireDigiCollection > wds_token
Definition: CSCSkim.h:144
std::string outputFileName
Definition: CSCSkim.h:140
float pMin
Definition: CSCSkim.h:169
int minimumHitChambers
Definition: CSCSkim.h:159
int typeOfSkim
Definition: CSCSkim.h:157
edm::EDGetTokenT< reco::TrackCollection > trk_token
Definition: CSCSkim.h:152
float zLengthTrMin
Definition: CSCSkim.h:174
int whichChamber
Definition: CSCSkim.h:167
int minimumSegments
Definition: CSCSkim.h:160
edm::EDGetTokenT< reco::MuonCollection > glm_token
Definition: CSCSkim.h:153
std::string histogramFileName
Definition: CSCSkim.h:141
edm::EDGetTokenT< CSCStripDigiCollection > sds_token
Definition: CSCSkim.h:145
int nValidHitsMin
Definition: CSCSkim.h:177
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
Definition: CSCSkim.h:149
bool makeHistograms
Definition: CSCSkim.h:162
int nTrHitsMin
Definition: CSCSkim.h:173
int whichStation
Definition: CSCSkim.h:165
int whichRing
Definition: CSCSkim.h:166
edm::EDGetTokenT< CSCWireDigiCollection > wdr_token
Definition: CSCSkim.h:146
edm::EDGetTokenT< CSCStripDigiCollection > sdr_token
Definition: CSCSkim.h:147
bool demandChambersBothSides
Definition: CSCSkim.h:161
float redChiSqMax
Definition: CSCSkim.h:176
CSCSkim::~CSCSkim ( )
override

Definition at line 118 of file CSCSkim.cc.

119 {
120 }

Member Function Documentation

void CSCSkim::beginJob ( void  )
overridevirtual

Reimplemented from edm::EDFilter.

Definition at line 127 of file CSCSkim.cc.

References iEvent.

128 {
129  // set counters to zero
130  nEventsAnalyzed = 0;
131  nEventsSelected = 0;
134  nEventsMessy = 0;
136  nEventsDTOverlap = 0;
137  nEventsHaloLike = 0;
138  nEventsLongSATrack = 0;
140  iRun = 0;
141  iEvent = 0;
142 
144 
145  // Create the root file for the histograms
146  theHistogramFile = new TFile(histogramFileName.c_str(), "RECREATE");
147  theHistogramFile->cd();
148 
149  if (makeHistograms) {
150  // book histograms for the skimming module
151  hxnRecHits = new TH1F("hxnRecHits","n RecHits",61,-0.5,60.5);
152  hxnSegments = new TH1F("hxnSegments","n Segments",11,-0.5,10.5);
153  hxnHitChambers = new TH1F("hxnHitsChambers","n chambers with hits",11,-0.5,10.5);
154  hxnRecHitsSel = new TH1F("hxnRecHitsSel","n RecHits selected",61,-0.5,60.5);
155 
156  xxP = new TH1F("xxP","P global",100,0.,200.);
157  xxnValidHits = new TH1F("xxnValidHits","n valid hits global",61,-0.5,60.5);
158  xxnTrackerHits = new TH1F("xxnTrackerHits","n tracker hits global",61,-0.5,60.5);
159  xxnCSCHits = new TH1F("xxnCSCHits","n CSC hits global",41,-0.5,40.5);
160  xxredChiSq = new TH1F("xxredChiSq","red chisq global",100,0.,100.);
161 
162 
163 
164  }
166  // book histograms for the messy event skimming module
167  mevnRecHits0 = new TH1F("mevnRecHits0","n RecHits",121,-0.5,120.5);
168  mevnChambers0 = new TH1F("mevnChambers0","n chambers with hits",21,-0.5,20.5);
169  mevnSegments0 = new TH1F("mevnSegments0","n Segments",21,-0.5,20.5);
170  mevnRecHits1 = new TH1F("mevnRecHits1","n RecHits",100,0.,300.);
171  mevnChambers1 = new TH1F("mevnChambers1","n chambers with hits",50,0.,50.);
172  mevnSegments1 = new TH1F("mevnSegments1","n Segments",30,0.,30.);
173  }
174 
175  }
176 }
TH1F * hxnRecHitsSel
Definition: CSCSkim.h:184
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:163
int nEventsForBFieldStudies
Definition: CSCSkim.h:130
int nEventsChambersBothSides
Definition: CSCSkim.h:123
TH1F * mevnRecHits0
Definition: CSCSkim.h:185
TH1F * mevnRecHits1
Definition: CSCSkim.h:188
TH1F * mevnSegments0
Definition: CSCSkim.h:187
TH1F * mevnSegments1
Definition: CSCSkim.h:190
TH1F * hxnRecHits
Definition: CSCSkim.h:181
TH1F * xxnCSCHits
Definition: CSCSkim.h:192
int nEventsDTOverlap
Definition: CSCSkim.h:127
TH1F * xxnTrackerHits
Definition: CSCSkim.h:192
int nEventsOverlappingChambers
Definition: CSCSkim.h:124
int nEventsSelected
Definition: CSCSkim.h:122
TH1F * hxnSegments
Definition: CSCSkim.h:182
std::string histogramFileName
Definition: CSCSkim.h:141
bool makeHistograms
Definition: CSCSkim.h:162
int nEventsLongSATrack
Definition: CSCSkim.h:129
int nEventsAnalyzed
Definition: CSCSkim.h:121
int nEventsCertainChamber
Definition: CSCSkim.h:126
TH1F * mevnChambers1
Definition: CSCSkim.h:189
TFile * theHistogramFile
Definition: CSCSkim.h:137
int nEventsMessy
Definition: CSCSkim.h:125
TH1F * hxnHitChambers
Definition: CSCSkim.h:183
int iEvent
Definition: CSCSkim.h:134
int nEventsHaloLike
Definition: CSCSkim.h:128
int iRun
Definition: CSCSkim.h:133
TH1F * xxnValidHits
Definition: CSCSkim.h:192
TH1F * mevnChambers0
Definition: CSCSkim.h:186
TH1F * xxredChiSq
Definition: CSCSkim.h:192
TH1F * xxP
Definition: CSCSkim.h:192
int CSCSkim::chamberSerial ( int  kE,
int  kS,
int  kR,
int  kCh 
)
private

Definition at line 1272 of file CSCSkim.cc.

References DEFINE_FWK_MODULE.

1272  {
1273  int kSerial = kChamber;
1274  if (kStation == 1 && kRing == 1) {kSerial = kChamber;}
1275  if (kStation == 1 && kRing == 2) {kSerial = kChamber + 36;}
1276  if (kStation == 1 && kRing == 3) {kSerial = kChamber + 72;}
1277  if (kStation == 1 && kRing == 4) {kSerial = kChamber;}
1278  if (kStation == 2 && kRing == 1) {kSerial = kChamber + 108;}
1279  if (kStation == 2 && kRing == 2) {kSerial = kChamber + 126;}
1280  if (kStation == 3 && kRing == 1) {kSerial = kChamber + 162;}
1281  if (kStation == 3 && kRing == 2) {kSerial = kChamber + 180;}
1282  if (kStation == 4 && kRing == 1) {kSerial = kChamber + 216;}
1283  if (kStation == 4 && kRing == 2) {kSerial = kChamber + 234;} // one day...
1284  if (kEndcap == 2) {kSerial = kSerial + 300;}
1285  return kSerial;
1286 }
bool CSCSkim::doBFieldStudySelection ( edm::Handle< reco::TrackCollection saTracks,
edm::Handle< reco::TrackCollection Tracks,
edm::Handle< reco::MuonCollection gMuons 
)
private

Definition at line 1081 of file CSCSkim.cc.

References funct::abs(), MuonSubdetId::CSC, MuonSubdetId::DT, spr::goodTrack(), AnalysisDataFormats_SUSYBSMObjects::hp, DetId::Muon, metsig::muon, gen::n, reco::HitPattern::numberOfValidTrackerHits(), ALCARECOTkAlMinBias_cff::pMin, mathSSE::sqrt(), HiIsolationCommonParameters_cff::track, and PV3DBase< T, PVType, FrameType >::z().

1081  {
1082 
1083  bool acceptThisEvent = false;
1084 
1085  //-----------------------------------
1086  // examine the stand-alone tracks
1087  //-----------------------------------
1088  int nGoodSAMuons = 0;
1089  for (reco::TrackCollection::const_iterator muon = saMuons->begin(); muon != saMuons->end(); ++ muon ) {
1090  float preco = muon->p();
1091 
1092  math::XYZPoint innerPo = muon->innerPosition();
1093  GlobalPoint iPnt(innerPo.x(), innerPo.y(),innerPo.z());
1094  math::XYZPoint outerPo = muon->outerPosition();
1095  GlobalPoint oPnt(outerPo.x(), outerPo.y(),outerPo.z());
1096  float zLength = abs( iPnt.z() - oPnt.z() );
1097 
1098  math::XYZVector innerMom = muon->innerMomentum();
1099  GlobalVector iP(innerMom.x(), innerMom.y(), innerMom.z() );
1100  math::XYZVector outerMom = muon->outerMomentum();
1101  GlobalVector oP(outerMom.x(), outerMom.y(), outerMom.z() );
1102 
1103  const float zRef = 300.;
1104  float xExt = 10000.;
1105  float yExt = 10000.;
1106  if (abs(oPnt.z()) < abs(iPnt.z())) {
1107  float deltaZ = 0.;
1108  if (oPnt.z() > 0) {
1109  deltaZ = zRef - oPnt.z();
1110  } else {
1111  deltaZ = -zRef - oPnt.z();
1112  }
1113  xExt = oPnt.x() + deltaZ * oP.x() / oP.z();
1114  yExt = oPnt.y() + deltaZ * oP.y() / oP.z();
1115  } else {
1116  float deltaZ = 0.;
1117  if (iPnt.z() > 0) {
1118  deltaZ = zRef - iPnt.z();
1119  } else {
1120  deltaZ = -zRef - iPnt.z();
1121  }
1122  xExt = iPnt.x() + deltaZ * iP.x() / iP.z();
1123  yExt = iPnt.y() + deltaZ * iP.y() / iP.z();
1124  }
1125  float rExt = sqrt( xExt*xExt + yExt*yExt );
1126 
1127  int kHit = 0;
1128  int nDTHits = 0;
1129  int nCSCHits = 0;
1130  for (trackingRecHit_iterator hit = muon->recHitsBegin(); hit != muon->recHitsEnd(); ++hit ) {
1131  ++kHit;
1132  const DetId detId( (*hit)->geographicalId() );
1133  if (detId.det() == DetId::Muon) {
1134  if (detId.subdetId() == MuonSubdetId::DT) {
1135  nDTHits++;
1136  }
1137  else if (detId.subdetId() == MuonSubdetId::CSC) {
1138  nCSCHits++;
1139  }
1140  }
1141  } // end loop over hits
1142 
1143  float zInner = -1.;
1144  if (nCSCHits >= nCSCHitsMin) {
1145  if (abs(iPnt.z()) < abs(iPnt.z())) {
1146  zInner = iPnt.z();
1147  } else {
1148  zInner = oPnt.z();
1149  }
1150  }
1151 
1152  bool goodSAMuon = (preco > pMin)
1153  && ( zLength > zLengthMin )
1154  && ( nCSCHits >= nCSCHitsMin )
1155  && ( zInner < zInnerMax )
1156  && ( rExt < rExtMax ) ;
1157 
1158  if (goodSAMuon) {nGoodSAMuons++;}
1159 
1160  } // end loop over stand-alone muon collection
1161 
1162 
1163 
1164 
1165  //-----------------------------------
1166  // examine the tracker tracks
1167  //-----------------------------------
1168  int nGoodTracks = 0;
1169  for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++ track ) {
1170  float preco = track->p();
1171  int n = track->recHitsSize();
1172 
1173  math::XYZPoint innerPo = track->innerPosition();
1174  GlobalPoint iPnt(innerPo.x(), innerPo.y(),innerPo.z());
1175  math::XYZPoint outerPo = track->outerPosition();
1176  GlobalPoint oPnt(outerPo.x(), outerPo.y(),outerPo.z());
1177  float zLength = abs( iPnt.z() - oPnt.z() );
1178 
1179  math::XYZVector innerMom = track->innerMomentum();
1180  GlobalVector iP(innerMom.x(), innerMom.y(), innerMom.z() );
1181  math::XYZVector outerMom = track->outerMomentum();
1182  GlobalVector oP(outerMom.x(), outerMom.y(), outerMom.z() );
1183 
1184  const float zRef = 300.;
1185  float xExt = 10000.;
1186  float yExt = 10000.;
1187  if (abs(oPnt.z()) > abs(iPnt.z())) {
1188  float deltaZ = 0.;
1189  if (oPnt.z() > 0) {
1190  deltaZ = zRef - oPnt.z();
1191  } else {
1192  deltaZ = -zRef - oPnt.z();
1193  }
1194  xExt = oPnt.x() + deltaZ * oP.x() / oP.z();
1195  yExt = oPnt.y() + deltaZ * oP.y() / oP.z();
1196  } else {
1197  float deltaZ = 0.;
1198  if (iPnt.z() > 0) {
1199  deltaZ = zRef - iPnt.z();
1200  } else {
1201  deltaZ = -zRef - iPnt.z();
1202  }
1203  xExt = iPnt.x() + deltaZ * iP.x() / iP.z();
1204  yExt = iPnt.y() + deltaZ * iP.y() / iP.z();
1205  }
1206  float rExt = sqrt( xExt*xExt + yExt*yExt );
1207 
1208  bool goodTrack = (preco > pMin)
1209  && (n >= nTrHitsMin)
1210  && (zLength > zLengthTrMin)
1211  && ( rExt < rExtMax ) ;
1212 
1213  if (goodTrack) {nGoodTracks++;}
1214 
1215  } // end loop over tracker tracks
1216 
1217 
1218  //-----------------------------------
1219  // examine the global muons
1220  //-----------------------------------
1221  int nGoodGlobalMuons = 0;
1222  for (reco::MuonCollection::const_iterator global = gMuons->begin(); global != gMuons->end(); ++global ) {
1223 
1224  if (global->isGlobalMuon()) {
1225 
1226  float pDef = global->p();
1227  float redChiSq = global->globalTrack()->normalizedChi2();
1228  const reco::HitPattern& hp = (global->globalTrack())->hitPattern();
1229  // int nTotalHits = hp.numberOfHits();
1230  // int nValidHits = hp.numberOfValidHits();
1231  int nTrackerHits = hp.numberOfValidTrackerHits();
1232  // int nPixelHits = hp.numberOfValidPixelHits();
1233  // int nStripHits = hp.numberOfValidStripHits();
1234 
1235  int nDTHits = 0;
1236  int nCSCHits = 0;
1237  for (trackingRecHit_iterator hit = (global->globalTrack())->recHitsBegin(); hit != (global->globalTrack())->recHitsEnd(); ++hit ) {
1238  const DetId detId( (*hit)->geographicalId() );
1239  if (detId.det() == DetId::Muon) {
1240  if (detId.subdetId() == MuonSubdetId::DT) {
1241  nDTHits++;
1242  }
1243  else if (detId.subdetId() == MuonSubdetId::CSC) {
1244  nCSCHits++;
1245  }
1246  }
1247  } // end loop over hits
1248 
1249  bool goodGlobalMuon = (pDef > pMin)
1250  && ( nTrackerHits >= nValidHitsMin )
1251  && ( nCSCHits >= nCSCHitsMin )
1252  && ( redChiSq < redChiSqMax );
1253 
1254  if (goodGlobalMuon) {nGoodGlobalMuons++;}
1255 
1256  } // this is a global muon
1257  } // end loop over stand-alone muon collection
1258 
1259  //-----------------------------------
1260  // do we accept this event?
1261  //-----------------------------------
1262 
1263  acceptThisEvent = ( (nGoodSAMuons > 0) && (nGoodTracks > 0) ) || (nGoodGlobalMuons > 0) ;
1264 
1265  return acceptThisEvent;
1266 }
float zInnerMax
Definition: CSCSkim.h:172
float rExtMax
Definition: CSCSkim.h:175
int nCSCHitsMin
Definition: CSCSkim.h:171
float zLengthMin
Definition: CSCSkim.h:170
float pMin
Definition: CSCSkim.h:169
float zLengthTrMin
Definition: CSCSkim.h:174
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int nValidHitsMin
Definition: CSCSkim.h:177
int nTrHitsMin
Definition: CSCSkim.h:173
Definition: DetId.h:18
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
int numberOfValidTrackerHits() const
Definition: HitPattern.h:829
static constexpr int DT
Definition: MuonSubdetId.h:12
static constexpr int CSC
Definition: MuonSubdetId.h:13
float redChiSqMax
Definition: CSCSkim.h:176
bool CSCSkim::doCertainChamberSelection ( edm::Handle< CSCWireDigiCollection wires,
edm::Handle< CSCStripDigiCollection strips 
)
private

Definition at line 706 of file CSCSkim.cc.

References CSCDetId::endcap().

707  {
708 
709  // Loop through the wire DIGIs, looking for a match
710  bool certainChamberIsPresentInWires = false;
711  for (CSCWireDigiCollection::DigiRangeIterator jw=wires->begin(); jw!=wires->end(); jw++) {
712  CSCDetId id = (CSCDetId)(*jw).first;
713  int kEndcap = id.endcap();
714  int kRing = id.ring();
715  int kStation = id.station();
716  int kChamber = id.chamber();
717  if ( (kEndcap == whichEndcap) &&
718  (kStation == whichStation) &&
719  (kRing == whichRing) &&
720  (kChamber == whichChamber) )
721  {certainChamberIsPresentInWires = true;}
722  } // end wire loop
723 
724 
725  // Loop through the strip DIGIs, looking for a match
726  bool certainChamberIsPresentInStrips = false;
727  for (CSCStripDigiCollection::DigiRangeIterator js=strips->begin(); js!=strips->end(); js++) {
728  CSCDetId id = (CSCDetId)(*js).first;
729  int kEndcap = id.endcap();
730  int kRing = id.ring();
731  int kStation = id.station();
732  int kChamber = id.chamber();
733  if ( (kEndcap == whichEndcap) &&
734  (kStation == whichStation) &&
735  (kRing == whichRing) &&
736  (kChamber == whichChamber) )
737  {certainChamberIsPresentInStrips = true;}
738  }
739 
740  bool certainChamberIsPresent = certainChamberIsPresentInWires || certainChamberIsPresentInStrips;
741 
742  return certainChamberIsPresent;
743 }
int whichEndcap
Definition: CSCSkim.h:164
int endcap() const
Definition: CSCDetId.h:93
int whichChamber
Definition: CSCSkim.h:167
int whichStation
Definition: CSCSkim.h:165
int whichRing
Definition: CSCSkim.h:166
bool CSCSkim::doCSCSkimming ( edm::Handle< CSCRecHit2DCollection cscRecHits,
edm::Handle< CSCSegmentCollection cscSegments 
)
private

Definition at line 365 of file CSCSkim.cc.

References CSCDetId::chamber(), CSCDetId::endcap(), objects.autophobj::float, mps_fire::i, createfilelist::int, kLayer(), CSCDetId::layer(), LogDebug, funct::pow(), CSCDetId::ring(), and CSCDetId::station().

365  {
366 
367  // how many RecHits in the collection?
368  int nRecHits = cscRecHits->size();
369 
370  // zero the recHit counter
371  int cntRecHit[600];
372  for (int i = 0; i < 600; i++) {
373  cntRecHit[i] = 0;
374  }
375 
376  // ---------------------
377  // Loop over rechits
378  // ---------------------
379 
381  for (recIt = cscRecHits->begin(); recIt != cscRecHits->end(); recIt++) {
382 
383  // which chamber is it?
384  CSCDetId idrec = (CSCDetId)(*recIt).cscDetId();
385  int kEndcap = idrec.endcap();
386  int kRing = idrec.ring();
387  int kStation = idrec.station();
388  int kChamber = idrec.chamber();
389  int kLayer = idrec.layer();
390 
391  // compute chamber serial number
392  int kSerial = chamberSerial( kEndcap, kStation, kRing, kChamber ) ;
393 
394  // increment recHit counter
395  // (each layer is represented by a different power of 10)
396  int kDigit = (int) pow((float)10.,(float)(kLayer-1));
397  cntRecHit[kSerial] += kDigit;
398 
399  } //end rechit loop
400 
401 
402  // ------------------------------------------------------
403  // Are there chambers with the minimum number of hits?
404  // ------------------------------------------------------
405 
406  int nChambersWithMinimalHits = 0;
407  int nChambersWithMinimalHitsPOS = 0;
408  int nChambersWithMinimalHitsNEG = 0;
409  if (nRecHits > 0) {
410  for (int i = 0; i < 600; i++) {
411  if (cntRecHit[i] > 0) {
412  int nLayersWithHits = 0;
413  float dummy = (float) cntRecHit[i];
414  for (int j = 5; j > -1; j--) {
415  float digit = dummy / pow( (float)10., (float)j );
416  int kCount = (int) digit;
417  if (kCount > 0) nLayersWithHits++;
418  dummy = dummy - ( (float) kCount) * pow( (float)10., (float)j );
419  }
420  if (nLayersWithHits > nLayersWithHitsMinimum) {
421  if (i < 300) {nChambersWithMinimalHitsPOS++;}
422  else {nChambersWithMinimalHitsNEG++;}
423  }
424  }
425  }
426  nChambersWithMinimalHits = nChambersWithMinimalHitsPOS + nChambersWithMinimalHitsNEG;
427  }
428 
429  // how many Segments?
430  int nSegments = cscSegments->size();
431 
432  // ----------------------
433  // fill histograms
434  // ----------------------
435 
436  if (makeHistograms) {
437  hxnRecHits->Fill(nRecHits);
438  if (nRecHits > 0) {
439  hxnSegments->Fill(nSegments);
440  hxnHitChambers->Fill(nChambersWithMinimalHits);
441  }
442  if (nChambersWithMinimalHits > 0) {
443  hxnRecHitsSel->Fill(nRecHits);
444  }
445  }
446 
447  // ----------------------
448  // set the filter flag
449  // ----------------------
450  bool basicEvent = ( nChambersWithMinimalHits >= minimumHitChambers ) && ( nSegments >= minimumSegments );
451 
452  bool chambersOnBothSides = ((nChambersWithMinimalHitsPOS >= minimumHitChambers) && (nChambersWithMinimalHitsNEG >= minimumHitChambers));
453 
454  if (chambersOnBothSides) {nEventsChambersBothSides++;}
455 
456  bool selectEvent = false;
457  if (typeOfSkim == 1) {selectEvent = basicEvent;}
458  if (typeOfSkim == 2) {selectEvent = chambersOnBothSides;}
459 
460 
461  // debug
462  LogDebug("[CSCSkim]") << "----- nRecHits = " << nRecHits
463  << "\tnChambersWithMinimalHits = " << nChambersWithMinimalHits
464  << "\tnSegments = " << nSegments
465  << "\tselect? " << selectEvent << std::endl;
466 
467  /*
468  if ((nChambersWithMinimalHitsPOS >= minimumHitChambers) && (nChambersWithMinimalHitsNEG >= minimumHitChambers)) {
469  std::cout << "\n==========================================================================\n"
470  << "\tinteresting event - chambers hit on both sides\n"
471  << "\t " << nEventsAnalyzed
472  << "\trun " << iRun << "\tevent " << iEvent << std::endl;
473  std::cout << "----- nRecHits = " << nRecHits
474  << "\tnChambersWithMinimalHits = " << nChambersWithMinimalHits
475  << "\tnSegments = " << nSegments
476  << "\tselect? " << selectEvent << std::endl;
477  for (int i = 0; i < 600; i++) {
478  if (cntRecHit[i] > 0) {
479  cout << "\t\t" << i << "\tcntRecHit= " << cntRecHit[i] << std::endl;
480  }
481  }
482  std::cout << "==========================================================================\n\n" ;
483  }
484  */
485 
486  return selectEvent;
487 }
#define LogDebug(id)
TH1F * hxnRecHitsSel
Definition: CSCSkim.h:184
int chamber() const
Definition: CSCDetId.h:68
int nLayersWithHitsMinimum
Definition: CSCSkim.h:158
int nEventsChambersBothSides
Definition: CSCSkim.h:123
TH1F * hxnRecHits
Definition: CSCSkim.h:181
int minimumHitChambers
Definition: CSCSkim.h:159
int layer() const
Definition: CSCDetId.h:61
int endcap() const
Definition: CSCDetId.h:93
int typeOfSkim
Definition: CSCSkim.h:157
int minimumSegments
Definition: CSCSkim.h:160
TH1F * hxnSegments
Definition: CSCSkim.h:182
bool makeHistograms
Definition: CSCSkim.h:162
static const std::string kLayer("layer")
int ring() const
Definition: CSCDetId.h:75
TH1F * hxnHitChambers
Definition: CSCSkim.h:183
int station() const
Definition: CSCDetId.h:86
int chamberSerial(int kE, int kS, int kR, int kCh)
Definition: CSCSkim.cc:1272
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
bool CSCSkim::doDTOverlap ( edm::Handle< CSCSegmentCollection cscSegments)
private

Definition at line 752 of file CSCSkim.cc.

References CSCDetId::endcap(), mps_fire::i, and nhits.

752  {
753  const float chisqMax = 100.;
754  const int nhitsMin = 5;
755  const int maxNSegments = 3;
756 
757  // initialize
758  bool DTOverlapCandidate = false;
759  int cntMEP13[36];
760  int cntMEN13[36];
761  int cntMEP22[36];
762  int cntMEN22[36];
763  int cntMEP32[36];
764  int cntMEN32[36];
765  for (int i=0; i<36; ++i) {
766  cntMEP13[i] = 0;
767  cntMEN13[i] = 0;
768  cntMEP22[i] = 0;
769  cntMEN22[i] = 0;
770  cntMEP32[i] = 0;
771  cntMEN32[i] = 0;
772  }
773 
774  // -----------------------
775  // loop over segments
776  // -----------------------
777 
778  int nSegments = cscSegments->size();
779  if (nSegments < 2) return DTOverlapCandidate;
780 
781  for(CSCSegmentCollection::const_iterator it=cscSegments->begin(); it != cscSegments->end(); it++) {
782  // which chamber?
783  CSCDetId id = (CSCDetId)(*it).cscDetId();
784  int kEndcap = id.endcap();
785  int kStation = id.station();
786  int kRing = id.ring();
787  int kChamber = id.chamber();
788  // segment information
789  float chisq = (*it).chi2();
790  int nhits = (*it).nRecHits();
791  bool goodSegment = (chisq < chisqMax) && (nhits >= nhitsMin) ;
792  if (goodSegment) {
793  if ( (kStation == 1) && (kRing == 3) ) {
794  if (kEndcap == 1) {cntMEP13[kChamber-1]++;}
795  if (kEndcap == 2) {cntMEN13[kChamber-1]++;}
796  }
797  if ( (kStation == 2) && (kRing == 2) ) {
798  if (kEndcap == 1) {cntMEP22[kChamber-1]++;}
799  if (kEndcap == 2) {cntMEN22[kChamber-1]++;}
800  }
801  if ( (kStation == 3) && (kRing == 2) ) {
802  if (kEndcap == 1) {cntMEP32[kChamber-1]++;}
803  if (kEndcap == 2) {cntMEN32[kChamber-1]++;}
804  }
805  } // this is a good segment
806  } // end loop over segments
807 
808  // ---------------------------------------------
809  // veto messy events
810  // ---------------------------------------------
811  bool tooManySegments = false;
812  for (int i=0; i<36; ++i) {
813  if ( (cntMEP13[i] > maxNSegments) ||
814  (cntMEN13[i] > maxNSegments) ||
815  (cntMEP22[i] > maxNSegments) ||
816  (cntMEN22[i] > maxNSegments) ||
817  (cntMEP32[i] > maxNSegments) ||
818  (cntMEN32[i] > maxNSegments) ) tooManySegments = true;
819  }
820  if (tooManySegments) {
821  return DTOverlapCandidate;
822  }
823 
824  // ---------------------------------------------
825  // check for relevant matchup of segments
826  // ---------------------------------------------
827  bool matchup = false;
828  for (int i=0; i<36; ++i) {
829  if ( (cntMEP13[i] > 0) && (cntMEP22[i]+cntMEP32[i] > 0) ) {matchup = true;}
830  if ( (cntMEN13[i] > 0) && (cntMEN22[i]+cntMEN32[i] > 0) ) {matchup = true;}
831  }
832  /*
833  if (matchup) {
834  std::cout << "\tYYY looks like a good event. Select!\n";
835  std::cout << "-- pos endcap --\n"
836  << "ME1/3: ";
837  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEP13[k];}
838  std::cout << "\nME2/2: ";
839  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEP22[k];}
840  std::cout << "\nME3/2: ";
841  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEP32[k];}
842  std::cout << std::endl;
843  }
844  */
845 
846  // set the selection flag
847  DTOverlapCandidate = matchup;
848  return DTOverlapCandidate;
849 }
int endcap() const
Definition: CSCDetId.h:93
bool CSCSkim::doHaloLike ( edm::Handle< CSCSegmentCollection cscSegments)
private

Definition at line 860 of file CSCSkim.cc.

References CSCDetId::endcap(), mps_fire::i, and nhits.

860  {
861  const float chisqMax = 100.;
862  const int nhitsMin = 5; // on a segment
863  const int maxNSegments = 3; // in a chamber
864 
865  // initialize
866  bool HaloLike = false;
867  int cntMEP11[36];
868  int cntMEN11[36];
869  int cntMEP12[36];
870  int cntMEN12[36];
871  int cntMEP21[36];
872  int cntMEN21[36];
873  int cntMEP31[36];
874  int cntMEN31[36];
875  int cntMEP41[36];
876  int cntMEN41[36];
877  for (int i=0; i<36; ++i) {
878  cntMEP11[i] = 0;
879  cntMEN11[i] = 0;
880  cntMEP12[i] = 0;
881  cntMEN12[i] = 0;
882  cntMEP21[i] = 0;
883  cntMEN21[i] = 0;
884  cntMEP31[i] = 0;
885  cntMEN31[i] = 0;
886  cntMEP41[i] = 0;
887  cntMEN41[i] = 0;
888  }
889 
890  // -----------------------
891  // loop over segments
892  // -----------------------
893  int nSegments = cscSegments->size();
894  if (nSegments < 4) return HaloLike;
895 
896  for(CSCSegmentCollection::const_iterator it=cscSegments->begin(); it != cscSegments->end(); it++) {
897  // which chamber?
898  CSCDetId id = (CSCDetId)(*it).cscDetId();
899  int kEndcap = id.endcap();
900  int kStation = id.station();
901  int kRing = id.ring();
902  int kChamber = id.chamber();
903  // segment information
904  float chisq = (*it).chi2();
905  int nhits = (*it).nRecHits();
906  bool goodSegment = (chisq < chisqMax) && (nhits >= nhitsMin) ;
907  if (goodSegment) {
908  if ( (kStation == 1) && (kRing == 1) ) {
909  if (kEndcap == 1) {cntMEP11[kChamber-1]++;}
910  if (kEndcap == 2) {cntMEN11[kChamber-1]++;}
911  }
912  if ( (kStation == 1) && (kRing == 2) ) {
913  if (kEndcap == 1) {cntMEP12[kChamber-1]++;}
914  if (kEndcap == 2) {cntMEN12[kChamber-1]++;}
915  }
916  if ( (kStation == 2) && (kRing == 1) ) {
917  if (kEndcap == 1) {cntMEP21[kChamber-1]++;}
918  if (kEndcap == 2) {cntMEN21[kChamber-1]++;}
919  }
920  if ( (kStation == 3) && (kRing == 1) ) {
921  if (kEndcap == 1) {cntMEP31[kChamber-1]++;}
922  if (kEndcap == 2) {cntMEN31[kChamber-1]++;}
923  }
924  if ( (kStation == 4) && (kRing == 1) ) {
925  if (kEndcap == 1) {cntMEP41[kChamber-1]++;}
926  if (kEndcap == 2) {cntMEN41[kChamber-1]++;}
927  }
928  } // this is a good segment
929  } // end loop over segments
930 
931  // ---------------------------------------------
932  // veto messy events
933  // ---------------------------------------------
934  bool tooManySegments = false;
935  for (int i=0; i<36; ++i) {
936  if ( (cntMEP11[i] > 3*maxNSegments) ||
937  (cntMEN11[i] > 3*maxNSegments) ||
938  (cntMEP12[i] > maxNSegments) ||
939  (cntMEN12[i] > maxNSegments) ||
940  (cntMEP21[i] > maxNSegments) ||
941  (cntMEN21[i] > maxNSegments) ||
942  (cntMEP31[i] > maxNSegments) ||
943  (cntMEN31[i] > maxNSegments) ||
944  (cntMEP41[i] > maxNSegments) ||
945  (cntMEN41[i] > maxNSegments) ) tooManySegments = true;
946  }
947  if (tooManySegments) {
948  return HaloLike;
949  }
950 
951  // ---------------------------------------------
952  // check for relevant matchup of segments
953  // ---------------------------------------------
954  bool matchup = false;
955  for (int i=0; i<36; ++i) {
956  if ( (cntMEP11[i]+cntMEP12[i] > 0) &&
957  (cntMEP21[i] > 0) &&
958  (cntMEP31[i] > 0) &&
959  (cntMEP41[i] > 0) ) {matchup = true;}
960  if ( (cntMEN11[i]+cntMEN12[i] > 0) &&
961  (cntMEN21[i] > 0) &&
962  (cntMEN31[i] > 0) &&
963  (cntMEN41[i] > 0) ) {matchup = true;}
964  }
965  /*
966  if (matchup) {
967  std::cout << "\tYYY looks like a good event. Select!\n";
968  std::cout << "-- pos endcap --\n"
969  << "ME1/1: ";
970  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEP11[k];}
971  std::cout << "\nME1/2: ";
972  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEP12[k];}
973  std::cout << "\nME2/1: ";
974  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEP21[k];}
975  std::cout << "\nME3/1: ";
976  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEP31[k];}
977  std::cout << "\nME4/1: ";
978  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEP41[k];}
979  std::cout << std::endl;
980  std::cout << "-- neg endcap --\n"
981  << "ME1/1: ";
982  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEN11[k];}
983  std::cout << "\nME1/2: ";
984  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEN12[k];}
985  std::cout << "\nME2/1: ";
986  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEN21[k];}
987  std::cout << "\nME3/1: ";
988  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEN31[k];}
989  std::cout << "\nME4/1: ";
990  for (int k=0; k<36; ++k) {std::cout << " " << setw(3) << cntMEN41[k];}
991  std::cout << std::endl;
992  std::cout << "\tn Analyzed = " << nEventsAnalyzed << "\tn Halo-like = " << nEventsHaloLike << std::endl;
993  }
994  */
995 
996  // set the selection flag
997  HaloLike = matchup;
998  return HaloLike;
999 }
int endcap() const
Definition: CSCDetId.h:93
bool CSCSkim::doLongSATrack ( edm::Handle< reco::TrackCollection saTracks)
private

Definition at line 1005 of file CSCSkim.cc.

References MuonSubdetId::CSC, MuonSubdetId::DT, min(), DetId::Muon, metsig::muon, TauGenJetsDecayModeSelectorAllHadrons_cfi::select, and PV3DBase< T, PVType, FrameType >::z().

1005  {
1006 
1007  const float zDistanceMax = 2500.;
1008  const float zDistanceMin = 700.;
1009  const int nCSCHitsMin = 25;
1010  const int nCSCHitsMax = 50;
1011  const float zInnerMax = 80000.;
1012 
1013  const int nNiceMuonsMin = 1;
1014 
1015  //
1016  // Loop through the track collection and test each one
1017  //
1018 
1019  int nNiceMuons = 0;
1020 
1021  for(reco::TrackCollection::const_iterator muon = saMuons->begin(); muon != saMuons->end(); ++ muon ) {
1022 
1023  // basic information
1024  math::XYZVector innerMo = muon->innerMomentum();
1025  GlobalVector im(innerMo.x(),innerMo.y(),innerMo.z());
1026  math::XYZPoint innerPo = muon->innerPosition();
1027  GlobalPoint ip(innerPo.x(), innerPo.y(),innerPo.z());
1028  math::XYZPoint outerPo = muon->outerPosition();
1029  GlobalPoint op(outerPo.x(), outerPo.y(),outerPo.z());
1030  float zInner = ip.z();
1031  float zOuter = op.z();
1032  float zDistance = fabs(zOuter-zInner);
1033 
1034 
1035 
1036  // loop over hits
1037  int nDTHits = 0;
1038  int nCSCHits = 0;
1039  for (trackingRecHit_iterator hit = muon->recHitsBegin(); hit != muon->recHitsEnd(); ++hit ) {
1040  const DetId detId( (*hit)->geographicalId() );
1041  if (detId.det() == DetId::Muon) {
1042  if (detId.subdetId() == MuonSubdetId::DT) {
1043  //DTChamberId dtId(detId.rawId());
1044  //int chamberId = dtId.sector();
1045  nDTHits++;
1046  }
1047  else if (detId.subdetId() == MuonSubdetId::CSC) {
1048  //CSCDetId cscId(detId.rawId());
1049  //int chamberId = cscId.chamber();
1050  nCSCHits++;
1051  }
1052  }
1053  }
1054 
1055  // is this a nice muon?
1056  if ( (zDistance < zDistanceMax) && (zDistance > zDistanceMin)
1057  && (nCSCHits > nCSCHitsMin) && (nCSCHits < nCSCHitsMax)
1058  && (min ( fabs(zInner), fabs(zOuter) ) < zInnerMax)
1059  && (fabs(innerMo.z()) > 0.000000001) ) {
1060  nNiceMuons++;
1061  }
1062  }
1063 
1064  bool select = (nNiceMuons >= nNiceMuonsMin);
1065 
1066  return select;
1067 }
float zInnerMax
Definition: CSCSkim.h:172
int nCSCHitsMin
Definition: CSCSkim.h:171
T z() const
Definition: PV3DBase.h:64
T min(T a, T b)
Definition: MathUtil.h:58
Definition: DetId.h:18
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
static constexpr int DT
Definition: MuonSubdetId.h:12
static constexpr int CSC
Definition: MuonSubdetId.h:13
bool CSCSkim::doMessyEventSkimming ( edm::Handle< CSCRecHit2DCollection cscRecHits,
edm::Handle< CSCSegmentCollection cscSegments 
)
private

Definition at line 575 of file CSCSkim.cc.

References CSCDetId::chamber(), CSCDetId::endcap(), objects.autophobj::float, mps_fire::i, createfilelist::int, kLayer(), CSCDetId::layer(), LogDebug, funct::pow(), CSCDetId::ring(), and CSCDetId::station().

575  {
576 
577  // how many RecHits in the collection?
578  int nRecHits = cscRecHits->size();
579 
580  // zero the recHit counter
581  int cntRecHit[600];
582  for (int i = 0; i < 600; i++) {
583  cntRecHit[i] = 0;
584  }
585 
586  // ---------------------
587  // Loop over rechits
588  // ---------------------
589 
591  for (recIt = cscRecHits->begin(); recIt != cscRecHits->end(); recIt++) {
592 
593  // which chamber is it?
594  CSCDetId idrec = (CSCDetId)(*recIt).cscDetId();
595  int kEndcap = idrec.endcap();
596  int kRing = idrec.ring();
597  int kStation = idrec.station();
598  int kChamber = idrec.chamber();
599  int kLayer = idrec.layer();
600 
601  // compute chamber serial number
602  int kSerial = chamberSerial( kEndcap, kStation, kRing, kChamber ) ;
603 
604  // increment recHit counter
605  // (each layer is represented by a different power of 10)
606  int kDigit = (int) pow((float)10.,(float)(kLayer-1));
607  cntRecHit[kSerial] += kDigit;
608 
609  } //end rechit loop
610 
611 
612  // ------------------------------------------------------
613  // Are there chambers with the minimum number of hits?
614  // ------------------------------------------------------
615 
616  int nChambersWithMinimalHits = 0;
617  int nChambersWithMinimalHitsPOS = 0;
618  int nChambersWithMinimalHitsNEG = 0;
619  if (nRecHits > 0) {
620  for (int i = 0; i < 600; i++) {
621  if (cntRecHit[i] > 0) {
622  int nLayersWithHits = 0;
623  float dummy = (float) cntRecHit[i];
624  for (int j = 5; j > -1; j--) {
625  float digit = dummy / pow( (float)10., (float)j );
626  int kCount = (int) digit;
627  if (kCount > 0) nLayersWithHits++;
628  dummy = dummy - ( (float) kCount) * pow( (float)10., (float)j );
629  }
630  if (nLayersWithHits > nLayersWithHitsMinimum) {
631  if (i < 300) {nChambersWithMinimalHitsPOS++;}
632  else {nChambersWithMinimalHitsNEG++;}
633  }
634  }
635  }
636  nChambersWithMinimalHits = nChambersWithMinimalHitsPOS + nChambersWithMinimalHitsNEG;
637  }
638 
639  // how many Segments?
640  int nSegments = cscSegments->size();
641 
642  // ----------------------
643  // fill histograms
644  // ----------------------
645 
647  if (nRecHits > 8) {
648  mevnRecHits0->Fill(nRecHits);
649  mevnChambers0->Fill(nChambersWithMinimalHits);
650  mevnSegments0->Fill(nSegments);
651  }
652  if (nRecHits > 54) {
653  double dummy = (double) nRecHits;
654  if (dummy > 299.9) dummy = 299.9;
655  mevnRecHits1->Fill(dummy);
656  dummy = (double) nChambersWithMinimalHits;
657  if (dummy > 49.9) dummy = 49.9;
658  mevnChambers1->Fill(dummy);
659  dummy = (double) nSegments;
660  if (dummy > 29.9) dummy = 29.9;
661  mevnSegments1->Fill(dummy);
662  }
663  }
664 
665  // ----------------------
666  // set the filter flag
667  // ----------------------
668 
669  bool selectEvent = false;
670  if ( (nRecHits > 54) && (nChambersWithMinimalHits > 5) ) {selectEvent = true;}
671 
672  // debug
673  LogDebug("[CSCSkim]") << "----- nRecHits = " << nRecHits
674  << "\tnChambersWithMinimalHits = " << nChambersWithMinimalHits
675  << "\tnSegments = " << nSegments
676  << "\tselect? " << selectEvent << std::endl;
677 
678  /*
679  if (selectEvent) {
680  std::cout << "\n==========================================================================\n"
681  << "\tmessy event!\n"
682  << "\t " << nEventsAnalyzed
683  << "\trun " << iRun << "\tevent " << iEvent << std::endl;
684  std::cout << "----- nRecHits = " << nRecHits
685  << "\tnChambersWithMinimalHits = " << nChambersWithMinimalHits
686  << "\tnSegments = " << nSegments
687  << "\tselect? " << selectEvent << std::endl;
688  for (int i = 0; i < 600; i++) {
689  if (cntRecHit[i] > 0) {
690  cout << "\t\t" << i << "\tcntRecHit= " << cntRecHit[i] << std::endl;
691  }
692  }
693  std::cout << "==========================================================================\n\n" ;
694  }
695  */
696 
697  return selectEvent;
698 }
#define LogDebug(id)
int chamber() const
Definition: CSCDetId.h:68
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:163
int nLayersWithHitsMinimum
Definition: CSCSkim.h:158
TH1F * mevnRecHits0
Definition: CSCSkim.h:185
TH1F * mevnRecHits1
Definition: CSCSkim.h:188
TH1F * mevnSegments0
Definition: CSCSkim.h:187
TH1F * mevnSegments1
Definition: CSCSkim.h:190
int layer() const
Definition: CSCDetId.h:61
int endcap() const
Definition: CSCDetId.h:93
static const std::string kLayer("layer")
int ring() const
Definition: CSCDetId.h:75
TH1F * mevnChambers1
Definition: CSCSkim.h:189
int station() const
Definition: CSCDetId.h:86
int chamberSerial(int kE, int kS, int kR, int kCh)
Definition: CSCSkim.cc:1272
TH1F * mevnChambers0
Definition: CSCSkim.h:186
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
bool CSCSkim::doOverlapSkimming ( edm::Handle< CSCSegmentCollection cscSegments)
private

Definition at line 493 of file CSCSkim.cc.

References CSCDetId::endcap(), mps_fire::i, and nhits.

493  {
494 
495  const int nhitsMinimum = 4;
496  const float chisqMaximum = 100.;
497  const int nAllMaximum = 3;
498 
499  // how many Segments?
500  // int nSegments = cscSegments->size();
501 
502  // zero arrays
503  int nAll[600];
504  int nGood[600];
505  for (int i=0; i<600; i++) {
506  nAll[i] = 0;
507  nGood[i] = 0;
508  }
509 
510  // -----------------------
511  // loop over segments
512  // -----------------------
513  for(CSCSegmentCollection::const_iterator it=cscSegments->begin(); it != cscSegments->end(); it++) {
514 
515  // which chamber?
516  CSCDetId id = (CSCDetId)(*it).cscDetId();
517  int kEndcap = id.endcap();
518  int kStation = id.station();
519  int kRing = id.ring();
520  int kChamber = id.chamber();
521  int kSerial = chamberSerial( kEndcap, kStation, kRing, kChamber);
522 
523  // segment information
524  float chisq = (*it).chi2();
525  int nhits = (*it).nRecHits();
526 
527  // is this a good segment?
528  bool goodSegment = (nhits >= nhitsMinimum) && (chisq < chisqMaximum) ;
529 
530  /*
531  LocalPoint localPos = (*it).localPosition();
532  float segX = localPos.x();
533  float segY = localPos.y();
534  std::cout << "E/S/R/Ch: " << kEndcap << "/" << kStation << "/" << kRing << "/" << kChamber
535  << "\tnhits/chisq: " << nhits << "/" << chisq
536  << "\tX/Y: " << segX << "/" << segY
537  << "\tgood? " << goodSegment << std::endl;
538  */
539 
540  // count
541  nAll[kSerial-1]++;
542  if (goodSegment) nGood[kSerial]++;
543 
544  } // end loop over segments
545 
546  //----------------------
547  // select the event
548  //----------------------
549 
550  // does any chamber have too many segments?
551  bool messyChamber = false;
552  for (int i = 0; i < 600; i++) {
553  if (nAll[i] > nAllMaximum) messyChamber = true;
554  }
555 
556  // are there consecutive chambers with good segments
557  // (This is a little sloppy but is probably fine for skimming...)
558  bool consecutiveChambers = false;
559  for (int i = 0; i < 599; i++) {
560  if ( (nGood[i]>0) && (nGood[i+1]>0) ) consecutiveChambers = true;
561  }
562 
563  bool selectThisEvent = !messyChamber && consecutiveChambers;
564 
565  return selectThisEvent;
566 
567 }
int endcap() const
Definition: CSCDetId.h:93
int chamberSerial(int kE, int kS, int kR, int kCh)
Definition: CSCSkim.cc:1272
void CSCSkim::endJob ( void  )
overridevirtual

Reimplemented from edm::EDFilter.

Definition at line 182 of file CSCSkim.cc.

References objects.autophobj::float, dedxEstimators_cff::fraction, and LogDebug.

182  {
183 
184  // Write out results
185 
186  float fraction = 0.;
187  if (nEventsAnalyzed > 0) {fraction = (float)nEventsSelected / (float)nEventsAnalyzed;}
188 
189  LogInfo("[CSCSkim] Summary")
190  << "\n\n\t====== CSCSkim ==========================================================\n"
191  << "\t\ttype of skim ...............................\t" << typeOfSkim << "\n"
192  << "\t\tevents analyzed ..............\t" << nEventsAnalyzed << "\n"
193  << "\t\tevents selected ..............\t" << nEventsSelected << "\tfraction= " << fraction << std::endl
194  << "\t\tevents chambers both sides ...\t" << nEventsChambersBothSides << "\n"
195  << "\t\tevents w/ overlaps .......... \t" << nEventsOverlappingChambers << "\n"
196  << "\t\tevents lots of hit chambers . \t" << nEventsMessy << "\n"
197  << "\t\tevents from certain chamber . \t" << nEventsCertainChamber << "\n"
198  << "\t\tevents in DT-CSC overlap .... \t" << nEventsDTOverlap << "\n"
199  << "\t\tevents halo-like ............ \t" << nEventsHaloLike << "\n"
200  << "\t\tevents w/ long SA track ..... \t" << nEventsLongSATrack << "\n"
201  << "\t\tevents good for BField ..... \t" << nEventsForBFieldStudies << "\n"
202  << "\t=========================================================================\n\n";
203 
205  // Write the histos to file
206  LogDebug("[CSCSkim]") << "======= write out my histograms ====\n" ;
207  theHistogramFile->cd();
208  if (makeHistograms) {
209  hxnRecHits->Write();
210  hxnSegments->Write();
211  hxnHitChambers->Write();
212  hxnRecHitsSel->Write();
213  }
215  mevnRecHits0->Write();
216  mevnChambers0->Write();
217  mevnSegments0->Write();
218  mevnRecHits1->Write();
219  mevnChambers1->Write();
220  mevnSegments1->Write();
221  }
222  theHistogramFile->Close();
223  }
224 }
#define LogDebug(id)
TH1F * hxnRecHitsSel
Definition: CSCSkim.h:184
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:163
int nEventsForBFieldStudies
Definition: CSCSkim.h:130
int nEventsChambersBothSides
Definition: CSCSkim.h:123
TH1F * mevnRecHits0
Definition: CSCSkim.h:185
TH1F * mevnRecHits1
Definition: CSCSkim.h:188
TH1F * mevnSegments0
Definition: CSCSkim.h:187
TH1F * mevnSegments1
Definition: CSCSkim.h:190
TH1F * hxnRecHits
Definition: CSCSkim.h:181
int nEventsDTOverlap
Definition: CSCSkim.h:127
int nEventsOverlappingChambers
Definition: CSCSkim.h:124
int typeOfSkim
Definition: CSCSkim.h:157
int nEventsSelected
Definition: CSCSkim.h:122
TH1F * hxnSegments
Definition: CSCSkim.h:182
bool makeHistograms
Definition: CSCSkim.h:162
int nEventsLongSATrack
Definition: CSCSkim.h:129
int nEventsAnalyzed
Definition: CSCSkim.h:121
int nEventsCertainChamber
Definition: CSCSkim.h:126
TH1F * mevnChambers1
Definition: CSCSkim.h:189
TFile * theHistogramFile
Definition: CSCSkim.h:137
int nEventsMessy
Definition: CSCSkim.h:125
TH1F * hxnHitChambers
Definition: CSCSkim.h:183
int nEventsHaloLike
Definition: CSCSkim.h:128
TH1F * mevnChambers0
Definition: CSCSkim.h:186
bool CSCSkim::filter ( edm::Event event,
const edm::EventSetup eventSetup 
)
override

Definition at line 230 of file CSCSkim.cc.

References cscSegments_cfi::cscSegments, edm::Event::eventAuxiliary(), edm::EventSetup::get(), iEvent, edm::EventAuxiliary::isRealData(), LogDebug, RecoTauPiZeroBuilderPlugins_cfi::strips, l1t::tracks, and muonCSCDigis_cfi::wires.

Referenced by Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView().

231 {
232  // increment counter
233  nEventsAnalyzed++;
234 
235  iRun = event.id().run();
236  iEvent = event.id().event();
237 
238  LogDebug("[CSCSkim] EventInfo") << "Run: " << iRun << "\tEvent: " << iEvent << "\tn Analyzed: " << nEventsAnalyzed;
239 
240  // Get the CSC Geometry :
241  ESHandle<CSCGeometry> cscGeom;
242  eventSetup.get<MuonGeometryRecord>().get(cscGeom);
243 
244  // Get the DIGI collections
247 
248  if (event.eventAuxiliary().isRealData()){
249  event.getByToken(wdr_token,wires);
250  event.getByToken(sdr_token,strips);
251  }
252  else {
253  event.getByToken(wds_token,wires);
254  event.getByToken(sds_token,strips);
255  }
256 
257  // Get the RecHits collection :
259  event.getByToken(rh_token,cscRecHits);
260 
261  // get CSC segment collection
263  event.getByToken(seg_token,cscSegments);
264 
265  // get the cosmic muons collection
267  if (typeOfSkim == 8) {
268  event.getByToken(sam_token,saMuons);
269  }
270 
271  // get the stand-alone muons collection
274  if (typeOfSkim == 9) {
275  event.getByToken(sam_token,saMuons);
276  event.getByToken(trk_token,tracks);
277  event.getByToken(glm_token,gMuons);
278  }
279 
280 
281  //======================================
282  // evaluate the skimming routines
283  //======================================
284 
285 
286  // basic skimming
287  bool basicEvent = false;
288  if (typeOfSkim == 1 || typeOfSkim == 2) {
289  basicEvent = doCSCSkimming(cscRecHits,cscSegments);
290  }
291 
292  // overlapping chamber skim
293  bool goodOverlapEvent = false;
294  if (typeOfSkim == 3) {
295  goodOverlapEvent = doOverlapSkimming(cscSegments);
296  if (goodOverlapEvent) {nEventsOverlappingChambers++;}
297  }
298 
299  // messy events skim
300  bool messyEvent = false;
301  if (typeOfSkim == 4) {
302  messyEvent = doMessyEventSkimming(cscRecHits,cscSegments);
303  if (messyEvent) {nEventsMessy++;}
304  }
305 
306  // select events with DIGIs in a certain chamber
307  bool hasChamber = false;
308  if (typeOfSkim == 5) {
309  hasChamber = doCertainChamberSelection(wires,strips);
310  if (hasChamber) {nEventsCertainChamber++;}
311  }
312 
313  // select events in the DT-CSC overlap region
314  bool DTOverlapCandidate = false;
315  if (typeOfSkim == 6) {
316  DTOverlapCandidate = doDTOverlap(cscSegments);
317  if (DTOverlapCandidate) {nEventsDTOverlap++;}
318  }
319 
320  // select halo-like events
321  bool HaloLike = false;
322  if (typeOfSkim == 7) {
323  HaloLike = doHaloLike(cscSegments);
324  if (HaloLike) {nEventsHaloLike++;}
325  }
326 
327  // select long cosmic tracks
328  bool LongSATrack = false;
329  if (typeOfSkim == 8) {
330  LongSATrack = doLongSATrack(saMuons);
331  if (LongSATrack) {nEventsLongSATrack++;}
332  }
333 
334  // select events suitable for a B-field study. They have tracks in the tracker.
335  bool GoodForBFieldStudy = false;
336  if (typeOfSkim == 9) {
337  GoodForBFieldStudy = doBFieldStudySelection(saMuons,tracks,gMuons);
338  if (GoodForBFieldStudy) {nEventsForBFieldStudies++;}
339  }
340 
341 
342  // set filter flag
343  bool selectThisEvent = false;
344  if (typeOfSkim == 1 || typeOfSkim == 2) {selectThisEvent = basicEvent;}
345  if (typeOfSkim == 3) {selectThisEvent = goodOverlapEvent;}
346  if (typeOfSkim == 4) {selectThisEvent = messyEvent;}
347  if (typeOfSkim == 5) {selectThisEvent = hasChamber;}
348  if (typeOfSkim == 6) {selectThisEvent = DTOverlapCandidate;}
349  if (typeOfSkim == 7) {selectThisEvent = HaloLike;}
350  if (typeOfSkim == 8) {selectThisEvent = LongSATrack;}
351  if (typeOfSkim == 9) {selectThisEvent = GoodForBFieldStudy;}
352 
353  if (selectThisEvent) {nEventsSelected++;}
354 
355  return selectThisEvent;
356 }
#define LogDebug(id)
edm::EDGetTokenT< CSCSegmentCollection > seg_token
Definition: CSCSkim.h:150
edm::EDGetTokenT< reco::TrackCollection > sam_token
Definition: CSCSkim.h:151
bool isRealData() const
int nEventsForBFieldStudies
Definition: CSCSkim.h:130
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:93
edm::EDGetTokenT< CSCWireDigiCollection > wds_token
Definition: CSCSkim.h:144
bool doLongSATrack(edm::Handle< reco::TrackCollection > saTracks)
Definition: CSCSkim.cc:1005
bool doOverlapSkimming(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:493
int nEventsDTOverlap
Definition: CSCSkim.h:127
bool doDTOverlap(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:752
int nEventsOverlappingChambers
Definition: CSCSkim.h:124
int typeOfSkim
Definition: CSCSkim.h:157
edm::EDGetTokenT< reco::TrackCollection > trk_token
Definition: CSCSkim.h:152
int nEventsSelected
Definition: CSCSkim.h:122
edm::EDGetTokenT< reco::MuonCollection > glm_token
Definition: CSCSkim.h:153
edm::EDGetTokenT< CSCStripDigiCollection > sds_token
Definition: CSCSkim.h:145
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
Definition: CSCSkim.h:149
int nEventsLongSATrack
Definition: CSCSkim.h:129
bool doCSCSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:365
bool doCertainChamberSelection(edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips)
Definition: CSCSkim.cc:706
bool doBFieldStudySelection(edm::Handle< reco::TrackCollection > saTracks, edm::Handle< reco::TrackCollection > Tracks, edm::Handle< reco::MuonCollection > gMuons)
Definition: CSCSkim.cc:1081
int nEventsAnalyzed
Definition: CSCSkim.h:121
int nEventsCertainChamber
Definition: CSCSkim.h:126
bool doMessyEventSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:575
int nEventsMessy
Definition: CSCSkim.h:125
T get() const
Definition: EventSetup.h:63
int iEvent
Definition: CSCSkim.h:134
edm::EDGetTokenT< CSCWireDigiCollection > wdr_token
Definition: CSCSkim.h:146
int nEventsHaloLike
Definition: CSCSkim.h:128
edm::EDGetTokenT< CSCStripDigiCollection > sdr_token
Definition: CSCSkim.h:147
int iRun
Definition: CSCSkim.h:133
bool doHaloLike(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:860

Member Data Documentation

bool CSCSkim::demandChambersBothSides
private

Definition at line 161 of file CSCSkim.h.

edm::EDGetTokenT<reco::MuonCollection> CSCSkim::glm_token
private

Definition at line 153 of file CSCSkim.h.

std::string CSCSkim::histogramFileName
private

Definition at line 141 of file CSCSkim.h.

TH1F* CSCSkim::hxnHitChambers
private

Definition at line 183 of file CSCSkim.h.

TH1F* CSCSkim::hxnRecHits
private

Definition at line 181 of file CSCSkim.h.

TH1F* CSCSkim::hxnRecHitsSel
private

Definition at line 184 of file CSCSkim.h.

TH1F* CSCSkim::hxnSegments
private

Definition at line 182 of file CSCSkim.h.

int CSCSkim::iEvent
private

Definition at line 134 of file CSCSkim.h.

int CSCSkim::iRun
private

Definition at line 133 of file CSCSkim.h.

bool CSCSkim::isSimulation
private

Definition at line 156 of file CSCSkim.h.

bool CSCSkim::makeHistograms
private

Definition at line 162 of file CSCSkim.h.

bool CSCSkim::makeHistogramsForMessyEvents
private

Definition at line 163 of file CSCSkim.h.

TH1F* CSCSkim::mevnChambers0
private

Definition at line 186 of file CSCSkim.h.

TH1F* CSCSkim::mevnChambers1
private

Definition at line 189 of file CSCSkim.h.

TH1F* CSCSkim::mevnRecHits0
private

Definition at line 185 of file CSCSkim.h.

TH1F* CSCSkim::mevnRecHits1
private

Definition at line 188 of file CSCSkim.h.

TH1F* CSCSkim::mevnSegments0
private

Definition at line 187 of file CSCSkim.h.

TH1F* CSCSkim::mevnSegments1
private

Definition at line 190 of file CSCSkim.h.

int CSCSkim::minimumHitChambers
private

Definition at line 159 of file CSCSkim.h.

int CSCSkim::minimumSegments
private

Definition at line 160 of file CSCSkim.h.

int CSCSkim::nCSCHitsMin
private

Definition at line 171 of file CSCSkim.h.

int CSCSkim::nEventsAnalyzed
private

Definition at line 121 of file CSCSkim.h.

int CSCSkim::nEventsCertainChamber
private

Definition at line 126 of file CSCSkim.h.

int CSCSkim::nEventsChambersBothSides
private

Definition at line 123 of file CSCSkim.h.

int CSCSkim::nEventsDTOverlap
private

Definition at line 127 of file CSCSkim.h.

int CSCSkim::nEventsForBFieldStudies
private

Definition at line 130 of file CSCSkim.h.

int CSCSkim::nEventsHaloLike
private

Definition at line 128 of file CSCSkim.h.

int CSCSkim::nEventsLongSATrack
private

Definition at line 129 of file CSCSkim.h.

int CSCSkim::nEventsMessy
private

Definition at line 125 of file CSCSkim.h.

int CSCSkim::nEventsOverlappingChambers
private

Definition at line 124 of file CSCSkim.h.

int CSCSkim::nEventsSelected
private

Definition at line 122 of file CSCSkim.h.

int CSCSkim::nLayersWithHitsMinimum
private

Definition at line 158 of file CSCSkim.h.

int CSCSkim::nTrHitsMin
private

Definition at line 173 of file CSCSkim.h.

int CSCSkim::nValidHitsMin
private

Definition at line 177 of file CSCSkim.h.

std::string CSCSkim::outputFileName
private
float CSCSkim::pMin
private

Definition at line 169 of file CSCSkim.h.

float CSCSkim::redChiSqMax
private

Definition at line 176 of file CSCSkim.h.

float CSCSkim::rExtMax
private

Definition at line 175 of file CSCSkim.h.

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

Definition at line 149 of file CSCSkim.h.

edm::EDGetTokenT<reco::TrackCollection> CSCSkim::sam_token
private

Definition at line 151 of file CSCSkim.h.

edm::EDGetTokenT<CSCStripDigiCollection> CSCSkim::sdr_token
private

Definition at line 147 of file CSCSkim.h.

edm::EDGetTokenT<CSCStripDigiCollection> CSCSkim::sds_token
private

Definition at line 145 of file CSCSkim.h.

edm::EDGetTokenT<CSCSegmentCollection> CSCSkim::seg_token
private

Definition at line 150 of file CSCSkim.h.

TFile* CSCSkim::theHistogramFile
private

Definition at line 137 of file CSCSkim.h.

edm::EDGetTokenT<reco::TrackCollection> CSCSkim::trk_token
private

Definition at line 152 of file CSCSkim.h.

int CSCSkim::typeOfSkim
private

Definition at line 157 of file CSCSkim.h.

edm::EDGetTokenT<CSCWireDigiCollection> CSCSkim::wdr_token
private

Definition at line 146 of file CSCSkim.h.

edm::EDGetTokenT<CSCWireDigiCollection> CSCSkim::wds_token
private

Definition at line 144 of file CSCSkim.h.

int CSCSkim::whichChamber
private

Definition at line 167 of file CSCSkim.h.

int CSCSkim::whichEndcap
private

Definition at line 164 of file CSCSkim.h.

int CSCSkim::whichRing
private

Definition at line 166 of file CSCSkim.h.

int CSCSkim::whichStation
private

Definition at line 165 of file CSCSkim.h.

TH1F * CSCSkim::xxnCSCHits
private

Definition at line 192 of file CSCSkim.h.

TH1F * CSCSkim::xxnTrackerHits
private

Definition at line 192 of file CSCSkim.h.

TH1F * CSCSkim::xxnValidHits
private

Definition at line 192 of file CSCSkim.h.

TH1F* CSCSkim::xxP
private

Definition at line 192 of file CSCSkim.h.

TH1F * CSCSkim::xxredChiSq
private

Definition at line 192 of file CSCSkim.h.

float CSCSkim::zInnerMax
private

Definition at line 172 of file CSCSkim.h.

float CSCSkim::zLengthMin
private

Definition at line 170 of file CSCSkim.h.

float CSCSkim::zLengthTrMin
private

Definition at line 174 of file CSCSkim.h.