CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual void beginJob ()
 
 CSCSkim (const edm::ParameterSet &pset)
 
virtual void endJob ()
 
virtual bool filter (edm::Event &event, const edm::EventSetup &eventSetup) override
 
 ~CSCSkim ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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

edm::InputTag cscRecHitTag
 
edm::InputTag cscSegmentTag
 
bool demandChambersBothSides
 
edm::InputTag GLBMuonTag
 
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::InputTag SAMuonTag
 
TFile * theHistogramFile
 
edm::InputTag trackTag
 
int typeOfSkim
 
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
 
typedef WorkerT< EDFilterWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDFilter
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 74 of file CSCSkim.h.

Constructor & Destructor Documentation

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

Definition at line 53 of file CSCSkim.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), RPCNoise_example::histogramFileName, dumpDBToFile_GT_ttrig_cfg::outputFileName, and AlCaHLTBitMon_QueryRunRegistry::string.

54 {
55 
56  // input tags
57  cscRecHitTag = pset.getParameter<edm::InputTag>("cscRecHitTag");
58  cscSegmentTag = pset.getParameter<edm::InputTag>("cscSegmentTag");
59  SAMuonTag = pset.getParameter<edm::InputTag>("SAMuonTag");
60  GLBMuonTag = pset.getParameter<edm::InputTag>("GLBMuonTag");
61  trackTag = pset.getParameter<edm::InputTag>("trackTag");
62 
63  // Get the various input parameters
64  outputFileName = pset.getUntrackedParameter<std::string>("outputFileName","outputSkim.root");
65  histogramFileName = pset.getUntrackedParameter<std::string>("histogramFileName","histos.root");
66  typeOfSkim = pset.getUntrackedParameter<int>("typeOfSkim",1);
67  nLayersWithHitsMinimum = pset.getUntrackedParameter<int>("nLayersWithHitsMinimum",3);
68  minimumHitChambers = pset.getUntrackedParameter<int>("minimumHitChambers",1);
69  minimumSegments = pset.getUntrackedParameter<int>("minimumSegments",3);
70  demandChambersBothSides = pset.getUntrackedParameter<bool>("demandChambersBothSides",false);
71  makeHistograms = pset.getUntrackedParameter<bool>("makeHistograms",false);
72  makeHistogramsForMessyEvents = pset.getUntrackedParameter<bool>("makeHistogramsForMessyEvebts",false);
73  whichEndcap = pset.getUntrackedParameter<int>("whichEndcap",2);
74  whichStation = pset.getUntrackedParameter<int>("whichStation",3);
75  whichRing = pset.getUntrackedParameter<int>("whichRing",2);
76  whichChamber = pset.getUntrackedParameter<int>("whichChamber",24);
77 
78  // for BStudy selection (skim type 9)
79  pMin = pset.getUntrackedParameter<double>("pMin",3.);
80  zLengthMin = pset.getUntrackedParameter<double>("zLengthMin",200.);
81  nCSCHitsMin = pset.getUntrackedParameter<int>("nCSCHitsMin",9);
82  zInnerMax = pset.getUntrackedParameter<double>("zInnerMax",9000.);
83  nTrHitsMin = pset.getUntrackedParameter<int>("nTrHitsMin",8);
84  zLengthTrMin = pset.getUntrackedParameter<double>("zLengthTrMin",180.);
85  rExtMax = pset.getUntrackedParameter<double>("rExtMax",3000.);
86  redChiSqMax = pset.getUntrackedParameter<double>("redChiSqMax",20.);
87  nValidHitsMin = pset.getUntrackedParameter<int>("nValidHitsMin",8);
88 
89  LogInfo("[CSCSkim] Setup")
90  << "\n\t===== CSCSkim =====\n"
91  << "\t\ttype of skim ...............................\t" << typeOfSkim
92  << "\t\tminimum number of layers with hits .........\t" << nLayersWithHitsMinimum
93  << "\n\t\tminimum number of chambers w/ hit layers..\t" << minimumHitChambers
94  << "\n\t\tminimum number of segments ...............\t" << minimumSegments
95  << "\n\t\tdemand chambers on both sides.............\t" << demandChambersBothSides
96  << "\n\t\tmake histograms...........................\t" << makeHistograms
97  << "\n\t\t..for messy events........................\t" << makeHistogramsForMessyEvents
98  << "\n\t===================\n\n";
99 
100 }
float zInnerMax
Definition: CSCSkim.h:168
T getParameter(std::string const &) const
float rExtMax
Definition: CSCSkim.h:171
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag trackTag
Definition: CSCSkim.h:149
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:159
int whichEndcap
Definition: CSCSkim.h:160
int nCSCHitsMin
Definition: CSCSkim.h:167
int nLayersWithHitsMinimum
Definition: CSCSkim.h:154
float zLengthMin
Definition: CSCSkim.h:166
edm::InputTag GLBMuonTag
Definition: CSCSkim.h:148
std::string outputFileName
Definition: CSCSkim.h:141
float pMin
Definition: CSCSkim.h:165
int minimumHitChambers
Definition: CSCSkim.h:155
edm::InputTag cscRecHitTag
Definition: CSCSkim.h:145
int typeOfSkim
Definition: CSCSkim.h:153
float zLengthTrMin
Definition: CSCSkim.h:170
int whichChamber
Definition: CSCSkim.h:163
int minimumSegments
Definition: CSCSkim.h:156
std::string histogramFileName
Definition: CSCSkim.h:142
int nValidHitsMin
Definition: CSCSkim.h:173
bool makeHistograms
Definition: CSCSkim.h:158
int nTrHitsMin
Definition: CSCSkim.h:169
int whichStation
Definition: CSCSkim.h:161
int whichRing
Definition: CSCSkim.h:162
edm::InputTag SAMuonTag
Definition: CSCSkim.h:147
edm::InputTag cscSegmentTag
Definition: CSCSkim.h:146
bool demandChambersBothSides
Definition: CSCSkim.h:157
float redChiSqMax
Definition: CSCSkim.h:172
CSCSkim::~CSCSkim ( )

Definition at line 105 of file CSCSkim.cc.

106 {
107 }

Member Function Documentation

void CSCSkim::beginJob ( void  )
virtual

Reimplemented from edm::EDFilter.

Definition at line 114 of file CSCSkim.cc.

References RPCNoise_example::histogramFileName, and iEvent.

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

Definition at line 1259 of file CSCSkim.cc.

1259  {
1260  int kSerial = kChamber;
1261  if (kStation == 1 && kRing == 1) {kSerial = kChamber;}
1262  if (kStation == 1 && kRing == 2) {kSerial = kChamber + 36;}
1263  if (kStation == 1 && kRing == 3) {kSerial = kChamber + 72;}
1264  if (kStation == 1 && kRing == 4) {kSerial = kChamber;}
1265  if (kStation == 2 && kRing == 1) {kSerial = kChamber + 108;}
1266  if (kStation == 2 && kRing == 2) {kSerial = kChamber + 126;}
1267  if (kStation == 3 && kRing == 1) {kSerial = kChamber + 162;}
1268  if (kStation == 3 && kRing == 2) {kSerial = kChamber + 180;}
1269  if (kStation == 4 && kRing == 1) {kSerial = kChamber + 216;}
1270  if (kStation == 4 && kRing == 2) {kSerial = kChamber + 234;} // one day...
1271  if (kEndcap == 2) {kSerial = kSerial + 300;}
1272  return kSerial;
1273 }
bool CSCSkim::doBFieldStudySelection ( edm::Handle< reco::TrackCollection saTracks,
edm::Handle< reco::TrackCollection Tracks,
edm::Handle< reco::MuonCollection gMuons 
)
private

Definition at line 1068 of file CSCSkim.cc.

References abs, MuonSubdetId::CSC, MuonSubdetId::DT, spr::goodTrack(), DetId::Muon, metsig::muon, n, reco::HitPattern::numberOfValidTrackerHits(), mathSSE::sqrt(), and PV3DBase< T, PVType, FrameType >::z().

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

Definition at line 693 of file CSCSkim.cc.

References CSCDetId, and CSCDetId::endcap().

694  {
695 
696  // Loop through the wire DIGIs, looking for a match
697  bool certainChamberIsPresentInWires = false;
698  for (CSCWireDigiCollection::DigiRangeIterator jw=wires->begin(); jw!=wires->end(); jw++) {
699  CSCDetId id = (CSCDetId)(*jw).first;
700  int kEndcap = id.endcap();
701  int kRing = id.ring();
702  int kStation = id.station();
703  int kChamber = id.chamber();
704  if ( (kEndcap == whichEndcap) &&
705  (kStation == whichStation) &&
706  (kRing == whichRing) &&
707  (kChamber == whichChamber) )
708  {certainChamberIsPresentInWires = true;}
709  } // end wire loop
710 
711 
712  // Loop through the strip DIGIs, looking for a match
713  bool certainChamberIsPresentInStrips = false;
714  for (CSCStripDigiCollection::DigiRangeIterator js=strips->begin(); js!=strips->end(); js++) {
715  CSCDetId id = (CSCDetId)(*js).first;
716  int kEndcap = id.endcap();
717  int kRing = id.ring();
718  int kStation = id.station();
719  int kChamber = id.chamber();
720  if ( (kEndcap == whichEndcap) &&
721  (kStation == whichStation) &&
722  (kRing == whichRing) &&
723  (kChamber == whichChamber) )
724  {certainChamberIsPresentInStrips = true;}
725  }
726 
727  bool certainChamberIsPresent = certainChamberIsPresentInWires || certainChamberIsPresentInStrips;
728 
729  return certainChamberIsPresent;
730 }
int whichEndcap
Definition: CSCSkim.h:160
int endcap() const
Definition: CSCDetId.h:95
int whichChamber
Definition: CSCSkim.h:163
int whichStation
Definition: CSCSkim.h:161
int whichRing
Definition: CSCSkim.h:162
bool CSCSkim::doCSCSkimming ( edm::Handle< CSCRecHit2DCollection cscRecHits,
edm::Handle< CSCSegmentCollection cscSegments 
)
private

Definition at line 352 of file CSCSkim.cc.

References CSCDetId::chamber(), CSCDetId, CSCDetId::endcap(), i, j, kLayer(), CSCDetId::layer(), LogDebug, funct::pow(), CSCDetId::ring(), and CSCDetId::station().

352  {
353 
354  // how many RecHits in the collection?
355  int nRecHits = cscRecHits->size();
356 
357  // zero the recHit counter
358  int cntRecHit[600];
359  for (int i = 0; i < 600; i++) {
360  cntRecHit[i] = 0;
361  }
362 
363  // ---------------------
364  // Loop over rechits
365  // ---------------------
366 
368  for (recIt = cscRecHits->begin(); recIt != cscRecHits->end(); recIt++) {
369 
370  // which chamber is it?
371  CSCDetId idrec = (CSCDetId)(*recIt).cscDetId();
372  int kEndcap = idrec.endcap();
373  int kRing = idrec.ring();
374  int kStation = idrec.station();
375  int kChamber = idrec.chamber();
376  int kLayer = idrec.layer();
377 
378  // compute chamber serial number
379  int kSerial = chamberSerial( kEndcap, kStation, kRing, kChamber ) ;
380 
381  // increment recHit counter
382  // (each layer is represented by a different power of 10)
383  int kDigit = (int) pow((float)10.,(float)(kLayer-1));
384  cntRecHit[kSerial] += kDigit;
385 
386  } //end rechit loop
387 
388 
389  // ------------------------------------------------------
390  // Are there chambers with the minimum number of hits?
391  // ------------------------------------------------------
392 
393  int nChambersWithMinimalHits = 0;
394  int nChambersWithMinimalHitsPOS = 0;
395  int nChambersWithMinimalHitsNEG = 0;
396  if (nRecHits > 0) {
397  for (int i = 0; i < 600; i++) {
398  if (cntRecHit[i] > 0) {
399  int nLayersWithHits = 0;
400  float dummy = (float) cntRecHit[i];
401  for (int j = 5; j > -1; j--) {
402  float digit = dummy / pow( (float)10., (float)j );
403  int kCount = (int) digit;
404  if (kCount > 0) nLayersWithHits++;
405  dummy = dummy - ( (float) kCount) * pow( (float)10., (float)j );
406  }
407  if (nLayersWithHits > nLayersWithHitsMinimum) {
408  if (i < 300) {nChambersWithMinimalHitsPOS++;}
409  else {nChambersWithMinimalHitsNEG++;}
410  }
411  }
412  }
413  nChambersWithMinimalHits = nChambersWithMinimalHitsPOS + nChambersWithMinimalHitsNEG;
414  }
415 
416  // how many Segments?
417  int nSegments = cscSegments->size();
418 
419  // ----------------------
420  // fill histograms
421  // ----------------------
422 
423  if (makeHistograms) {
424  hxnRecHits->Fill(nRecHits);
425  if (nRecHits > 0) {
426  hxnSegments->Fill(nSegments);
427  hxnHitChambers->Fill(nChambersWithMinimalHits);
428  }
429  if (nChambersWithMinimalHits > 0) {
430  hxnRecHitsSel->Fill(nRecHits);
431  }
432  }
433 
434  // ----------------------
435  // set the filter flag
436  // ----------------------
437  bool basicEvent = ( nChambersWithMinimalHits >= minimumHitChambers ) && ( nSegments >= minimumSegments );
438 
439  bool chambersOnBothSides = ((nChambersWithMinimalHitsPOS >= minimumHitChambers) && (nChambersWithMinimalHitsNEG >= minimumHitChambers));
440 
441  if (chambersOnBothSides) {nEventsChambersBothSides++;}
442 
443  bool selectEvent = false;
444  if (typeOfSkim == 1) {selectEvent = basicEvent;}
445  if (typeOfSkim == 2) {selectEvent = chambersOnBothSides;}
446 
447 
448  // debug
449  LogDebug("[CSCSkim]") << "----- nRecHits = " << nRecHits
450  << "\tnChambersWithMinimalHits = " << nChambersWithMinimalHits
451  << "\tnSegments = " << nSegments
452  << "\tselect? " << selectEvent << std::endl;
453 
454  /*
455  if ((nChambersWithMinimalHitsPOS >= minimumHitChambers) && (nChambersWithMinimalHitsNEG >= minimumHitChambers)) {
456  std::cout << "\n==========================================================================\n"
457  << "\tinteresting event - chambers hit on both sides\n"
458  << "\t " << nEventsAnalyzed
459  << "\trun " << iRun << "\tevent " << iEvent << std::endl;
460  std::cout << "----- nRecHits = " << nRecHits
461  << "\tnChambersWithMinimalHits = " << nChambersWithMinimalHits
462  << "\tnSegments = " << nSegments
463  << "\tselect? " << selectEvent << std::endl;
464  for (int i = 0; i < 600; i++) {
465  if (cntRecHit[i] > 0) {
466  cout << "\t\t" << i << "\tcntRecHit= " << cntRecHit[i] << std::endl;
467  }
468  }
469  std::cout << "==========================================================================\n\n" ;
470  }
471  */
472 
473  return selectEvent;
474 }
#define LogDebug(id)
TH1F * hxnRecHitsSel
Definition: CSCSkim.h:180
int chamber() const
Definition: CSCDetId.h:70
int i
Definition: DBlmapReader.cc:9
int nLayersWithHitsMinimum
Definition: CSCSkim.h:154
int nEventsChambersBothSides
Definition: CSCSkim.h:124
TH1F * hxnRecHits
Definition: CSCSkim.h:177
int minimumHitChambers
Definition: CSCSkim.h:155
int layer() const
Definition: CSCDetId.h:63
int endcap() const
Definition: CSCDetId.h:95
int typeOfSkim
Definition: CSCSkim.h:153
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
int minimumSegments
Definition: CSCSkim.h:156
TH1F * hxnSegments
Definition: CSCSkim.h:178
int j
Definition: DBlmapReader.cc:9
bool makeHistograms
Definition: CSCSkim.h:158
static const std::string kLayer("layer")
int ring() const
Definition: CSCDetId.h:77
TH1F * hxnHitChambers
Definition: CSCSkim.h:179
int station() const
Definition: CSCDetId.h:88
int chamberSerial(int kE, int kS, int kR, int kCh)
Definition: CSCSkim.cc:1259
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 739 of file CSCSkim.cc.

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

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

Definition at line 847 of file CSCSkim.cc.

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

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

Definition at line 992 of file CSCSkim.cc.

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

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

Definition at line 562 of file CSCSkim.cc.

References CSCDetId::chamber(), CSCDetId, CSCDetId::endcap(), i, j, kLayer(), CSCDetId::layer(), LogDebug, funct::pow(), CSCDetId::ring(), and CSCDetId::station().

562  {
563 
564  // how many RecHits in the collection?
565  int nRecHits = cscRecHits->size();
566 
567  // zero the recHit counter
568  int cntRecHit[600];
569  for (int i = 0; i < 600; i++) {
570  cntRecHit[i] = 0;
571  }
572 
573  // ---------------------
574  // Loop over rechits
575  // ---------------------
576 
578  for (recIt = cscRecHits->begin(); recIt != cscRecHits->end(); recIt++) {
579 
580  // which chamber is it?
581  CSCDetId idrec = (CSCDetId)(*recIt).cscDetId();
582  int kEndcap = idrec.endcap();
583  int kRing = idrec.ring();
584  int kStation = idrec.station();
585  int kChamber = idrec.chamber();
586  int kLayer = idrec.layer();
587 
588  // compute chamber serial number
589  int kSerial = chamberSerial( kEndcap, kStation, kRing, kChamber ) ;
590 
591  // increment recHit counter
592  // (each layer is represented by a different power of 10)
593  int kDigit = (int) pow((float)10.,(float)(kLayer-1));
594  cntRecHit[kSerial] += kDigit;
595 
596  } //end rechit loop
597 
598 
599  // ------------------------------------------------------
600  // Are there chambers with the minimum number of hits?
601  // ------------------------------------------------------
602 
603  int nChambersWithMinimalHits = 0;
604  int nChambersWithMinimalHitsPOS = 0;
605  int nChambersWithMinimalHitsNEG = 0;
606  if (nRecHits > 0) {
607  for (int i = 0; i < 600; i++) {
608  if (cntRecHit[i] > 0) {
609  int nLayersWithHits = 0;
610  float dummy = (float) cntRecHit[i];
611  for (int j = 5; j > -1; j--) {
612  float digit = dummy / pow( (float)10., (float)j );
613  int kCount = (int) digit;
614  if (kCount > 0) nLayersWithHits++;
615  dummy = dummy - ( (float) kCount) * pow( (float)10., (float)j );
616  }
617  if (nLayersWithHits > nLayersWithHitsMinimum) {
618  if (i < 300) {nChambersWithMinimalHitsPOS++;}
619  else {nChambersWithMinimalHitsNEG++;}
620  }
621  }
622  }
623  nChambersWithMinimalHits = nChambersWithMinimalHitsPOS + nChambersWithMinimalHitsNEG;
624  }
625 
626  // how many Segments?
627  int nSegments = cscSegments->size();
628 
629  // ----------------------
630  // fill histograms
631  // ----------------------
632 
634  if (nRecHits > 8) {
635  mevnRecHits0->Fill(nRecHits);
636  mevnChambers0->Fill(nChambersWithMinimalHits);
637  mevnSegments0->Fill(nSegments);
638  }
639  if (nRecHits > 54) {
640  double dummy = (double) nRecHits;
641  if (dummy > 299.9) dummy = 299.9;
642  mevnRecHits1->Fill(dummy);
643  dummy = (double) nChambersWithMinimalHits;
644  if (dummy > 49.9) dummy = 49.9;
645  mevnChambers1->Fill(dummy);
646  dummy = (double) nSegments;
647  if (dummy > 29.9) dummy = 29.9;
648  mevnSegments1->Fill(dummy);
649  }
650  }
651 
652  // ----------------------
653  // set the filter flag
654  // ----------------------
655 
656  bool selectEvent = false;
657  if ( (nRecHits > 54) && (nChambersWithMinimalHits > 5) ) {selectEvent = true;}
658 
659  // debug
660  LogDebug("[CSCSkim]") << "----- nRecHits = " << nRecHits
661  << "\tnChambersWithMinimalHits = " << nChambersWithMinimalHits
662  << "\tnSegments = " << nSegments
663  << "\tselect? " << selectEvent << std::endl;
664 
665  /*
666  if (selectEvent) {
667  std::cout << "\n==========================================================================\n"
668  << "\tmessy event!\n"
669  << "\t " << nEventsAnalyzed
670  << "\trun " << iRun << "\tevent " << iEvent << std::endl;
671  std::cout << "----- nRecHits = " << nRecHits
672  << "\tnChambersWithMinimalHits = " << nChambersWithMinimalHits
673  << "\tnSegments = " << nSegments
674  << "\tselect? " << selectEvent << std::endl;
675  for (int i = 0; i < 600; i++) {
676  if (cntRecHit[i] > 0) {
677  cout << "\t\t" << i << "\tcntRecHit= " << cntRecHit[i] << std::endl;
678  }
679  }
680  std::cout << "==========================================================================\n\n" ;
681  }
682  */
683 
684  return selectEvent;
685 }
#define LogDebug(id)
int chamber() const
Definition: CSCDetId.h:70
int i
Definition: DBlmapReader.cc:9
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:159
int nLayersWithHitsMinimum
Definition: CSCSkim.h:154
TH1F * mevnRecHits0
Definition: CSCSkim.h:181
TH1F * mevnRecHits1
Definition: CSCSkim.h:184
TH1F * mevnSegments0
Definition: CSCSkim.h:183
TH1F * mevnSegments1
Definition: CSCSkim.h:186
int layer() const
Definition: CSCDetId.h:63
int endcap() const
Definition: CSCDetId.h:95
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
int j
Definition: DBlmapReader.cc:9
static const std::string kLayer("layer")
int ring() const
Definition: CSCDetId.h:77
TH1F * mevnChambers1
Definition: CSCSkim.h:185
int station() const
Definition: CSCDetId.h:88
int chamberSerial(int kE, int kS, int kR, int kCh)
Definition: CSCSkim.cc:1259
TH1F * mevnChambers0
Definition: CSCSkim.h:182
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 480 of file CSCSkim.cc.

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

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

Reimplemented from edm::EDFilter.

Definition at line 169 of file CSCSkim.cc.

References LogDebug.

169  {
170 
171  // Write out results
172 
173  float fraction = 0.;
174  if (nEventsAnalyzed > 0) {fraction = (float)nEventsSelected / (float)nEventsAnalyzed;}
175 
176  LogInfo("[CSCSkim] Summary")
177  << "\n\n\t====== CSCSkim ==========================================================\n"
178  << "\t\ttype of skim ...............................\t" << typeOfSkim << "\n"
179  << "\t\tevents analyzed ..............\t" << nEventsAnalyzed << "\n"
180  << "\t\tevents selected ..............\t" << nEventsSelected << "\tfraction= " << fraction << std::endl
181  << "\t\tevents chambers both sides ...\t" << nEventsChambersBothSides << "\n"
182  << "\t\tevents w/ overlaps .......... \t" << nEventsOverlappingChambers << "\n"
183  << "\t\tevents lots of hit chambers . \t" << nEventsMessy << "\n"
184  << "\t\tevents from certain chamber . \t" << nEventsCertainChamber << "\n"
185  << "\t\tevents in DT-CSC overlap .... \t" << nEventsDTOverlap << "\n"
186  << "\t\tevents halo-like ............ \t" << nEventsHaloLike << "\n"
187  << "\t\tevents w/ long SA track ..... \t" << nEventsLongSATrack << "\n"
188  << "\t\tevents good for BField ..... \t" << nEventsForBFieldStudies << "\n"
189  << "\t=========================================================================\n\n";
190 
192  // Write the histos to file
193  LogDebug("[CSCSkim]") << "======= write out my histograms ====\n" ;
194  theHistogramFile->cd();
195  if (makeHistograms) {
196  hxnRecHits->Write();
197  hxnSegments->Write();
198  hxnHitChambers->Write();
199  hxnRecHitsSel->Write();
200  }
202  mevnRecHits0->Write();
203  mevnChambers0->Write();
204  mevnSegments0->Write();
205  mevnRecHits1->Write();
206  mevnChambers1->Write();
207  mevnSegments1->Write();
208  }
209  theHistogramFile->Close();
210  }
211 }
#define LogDebug(id)
TH1F * hxnRecHitsSel
Definition: CSCSkim.h:180
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:159
int nEventsForBFieldStudies
Definition: CSCSkim.h:131
int nEventsChambersBothSides
Definition: CSCSkim.h:124
TH1F * mevnRecHits0
Definition: CSCSkim.h:181
TH1F * mevnRecHits1
Definition: CSCSkim.h:184
TH1F * mevnSegments0
Definition: CSCSkim.h:183
TH1F * mevnSegments1
Definition: CSCSkim.h:186
TH1F * hxnRecHits
Definition: CSCSkim.h:177
int nEventsDTOverlap
Definition: CSCSkim.h:128
int nEventsOverlappingChambers
Definition: CSCSkim.h:125
int typeOfSkim
Definition: CSCSkim.h:153
int nEventsSelected
Definition: CSCSkim.h:123
TH1F * hxnSegments
Definition: CSCSkim.h:178
bool makeHistograms
Definition: CSCSkim.h:158
int nEventsLongSATrack
Definition: CSCSkim.h:130
int nEventsAnalyzed
Definition: CSCSkim.h:122
int nEventsCertainChamber
Definition: CSCSkim.h:127
TH1F * mevnChambers1
Definition: CSCSkim.h:185
TFile * theHistogramFile
Definition: CSCSkim.h:138
int nEventsMessy
Definition: CSCSkim.h:126
TH1F * hxnHitChambers
Definition: CSCSkim.h:179
int nEventsHaloLike
Definition: CSCSkim.h:129
TH1F * mevnChambers0
Definition: CSCSkim.h:182
bool CSCSkim::filter ( edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

Implements edm::EDFilter.

Definition at line 217 of file CSCSkim.cc.

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

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().

218 {
219  // increment counter
220  nEventsAnalyzed++;
221 
222  iRun = event.id().run();
223  iEvent = event.id().event();
224 
225  LogDebug("[CSCSkim] EventInfo") << "Run: " << iRun << "\tEvent: " << iEvent << "\tn Analyzed: " << nEventsAnalyzed;
226 
227  // Get the CSC Geometry :
228  ESHandle<CSCGeometry> cscGeom;
229  eventSetup.get<MuonGeometryRecord>().get(cscGeom);
230 
231  // Get the DIGI collections
234 
235  if (event.eventAuxiliary().isRealData()){
236  event.getByLabel("muonCSCDigis","MuonCSCWireDigi",wires);
237  event.getByLabel("muonCSCDigis","MuonCSCStripDigi",strips);
238  }
239  else {
240  event.getByLabel("simMuonCSCDigis","MuonCSCWireDigi",wires);
241  event.getByLabel("simMuonCSCDigis","MuonCSCStripDigi",strips);
242  }
243 
244  // Get the RecHits collection :
246  event.getByLabel(cscRecHitTag,cscRecHits);
247 
248  // get CSC segment collection
250  event.getByLabel(cscSegmentTag, cscSegments);
251 
252  // get the cosmic muons collection
254  if (typeOfSkim == 8) {
255  event.getByLabel(SAMuonTag,saMuons);
256  }
257 
258  // get the stand-alone muons collection
261  if (typeOfSkim == 9) {
262  event.getByLabel(SAMuonTag,saMuons);
263  event.getByLabel(trackTag,tracks);
264  event.getByLabel(GLBMuonTag,gMuons);
265  }
266 
267 
268  //======================================
269  // evaluate the skimming routines
270  //======================================
271 
272 
273  // basic skimming
274  bool basicEvent = false;
275  if (typeOfSkim == 1 || typeOfSkim == 2) {
276  basicEvent = doCSCSkimming(cscRecHits,cscSegments);
277  }
278 
279  // overlapping chamber skim
280  bool goodOverlapEvent = false;
281  if (typeOfSkim == 3) {
282  goodOverlapEvent = doOverlapSkimming(cscSegments);
283  if (goodOverlapEvent) {nEventsOverlappingChambers++;}
284  }
285 
286  // messy events skim
287  bool messyEvent = false;
288  if (typeOfSkim == 4) {
289  messyEvent = doMessyEventSkimming(cscRecHits,cscSegments);
290  if (messyEvent) {nEventsMessy++;}
291  }
292 
293  // select events with DIGIs in a certain chamber
294  bool hasChamber = false;
295  if (typeOfSkim == 5) {
296  hasChamber = doCertainChamberSelection(wires,strips);
297  if (hasChamber) {nEventsCertainChamber++;}
298  }
299 
300  // select events in the DT-CSC overlap region
301  bool DTOverlapCandidate = false;
302  if (typeOfSkim == 6) {
303  DTOverlapCandidate = doDTOverlap(cscSegments);
304  if (DTOverlapCandidate) {nEventsDTOverlap++;}
305  }
306 
307  // select halo-like events
308  bool HaloLike = false;
309  if (typeOfSkim == 7) {
310  HaloLike = doHaloLike(cscSegments);
311  if (HaloLike) {nEventsHaloLike++;}
312  }
313 
314  // select long cosmic tracks
315  bool LongSATrack = false;
316  if (typeOfSkim == 8) {
317  LongSATrack = doLongSATrack(saMuons);
318  if (LongSATrack) {nEventsLongSATrack++;}
319  }
320 
321  // select events suitable for a B-field study. They have tracks in the tracker.
322  bool GoodForBFieldStudy = false;
323  if (typeOfSkim == 9) {
324  GoodForBFieldStudy = doBFieldStudySelection(saMuons,tracks,gMuons);
325  if (GoodForBFieldStudy) {nEventsForBFieldStudies++;}
326  }
327 
328 
329  // set filter flag
330  bool selectThisEvent = false;
331  if (typeOfSkim == 1 || typeOfSkim == 2) {selectThisEvent = basicEvent;}
332  if (typeOfSkim == 3) {selectThisEvent = goodOverlapEvent;}
333  if (typeOfSkim == 4) {selectThisEvent = messyEvent;}
334  if (typeOfSkim == 5) {selectThisEvent = hasChamber;}
335  if (typeOfSkim == 6) {selectThisEvent = DTOverlapCandidate;}
336  if (typeOfSkim == 7) {selectThisEvent = HaloLike;}
337  if (typeOfSkim == 8) {selectThisEvent = LongSATrack;}
338  if (typeOfSkim == 9) {selectThisEvent = GoodForBFieldStudy;}
339 
340  if (selectThisEvent) {nEventsSelected++;}
341 
342  return selectThisEvent;
343 }
#define LogDebug(id)
edm::InputTag trackTag
Definition: CSCSkim.h:149
bool isRealData() const
int nEventsForBFieldStudies
Definition: CSCSkim.h:131
edm::InputTag GLBMuonTag
Definition: CSCSkim.h:148
bool doLongSATrack(edm::Handle< reco::TrackCollection > saTracks)
Definition: CSCSkim.cc:992
bool doOverlapSkimming(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:480
int nEventsDTOverlap
Definition: CSCSkim.h:128
bool doDTOverlap(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:739
edm::InputTag cscRecHitTag
Definition: CSCSkim.h:145
int nEventsOverlappingChambers
Definition: CSCSkim.h:125
int typeOfSkim
Definition: CSCSkim.h:153
int nEventsSelected
Definition: CSCSkim.h:123
int nEventsLongSATrack
Definition: CSCSkim.h:130
bool doCSCSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:352
bool doCertainChamberSelection(edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips)
Definition: CSCSkim.cc:693
bool doBFieldStudySelection(edm::Handle< reco::TrackCollection > saTracks, edm::Handle< reco::TrackCollection > Tracks, edm::Handle< reco::MuonCollection > gMuons)
Definition: CSCSkim.cc:1068
int nEventsAnalyzed
Definition: CSCSkim.h:122
int nEventsCertainChamber
Definition: CSCSkim.h:127
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:65
tuple tracks
Definition: testEve_cfg.py:39
const T & get() const
Definition: EventSetup.h:55
bool doMessyEventSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:562
int nEventsMessy
Definition: CSCSkim.h:126
edm::InputTag SAMuonTag
Definition: CSCSkim.h:147
int iEvent
Definition: CSCSkim.h:135
int nEventsHaloLike
Definition: CSCSkim.h:129
edm::InputTag cscSegmentTag
Definition: CSCSkim.h:146
int iRun
Definition: CSCSkim.h:134
bool doHaloLike(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:847

Member Data Documentation

edm::InputTag CSCSkim::cscRecHitTag
private

Definition at line 145 of file CSCSkim.h.

edm::InputTag CSCSkim::cscSegmentTag
private

Definition at line 146 of file CSCSkim.h.

bool CSCSkim::demandChambersBothSides
private

Definition at line 157 of file CSCSkim.h.

edm::InputTag CSCSkim::GLBMuonTag
private

Definition at line 148 of file CSCSkim.h.

std::string CSCSkim::histogramFileName
private

Definition at line 142 of file CSCSkim.h.

TH1F* CSCSkim::hxnHitChambers
private

Definition at line 179 of file CSCSkim.h.

TH1F* CSCSkim::hxnRecHits
private

Definition at line 177 of file CSCSkim.h.

TH1F* CSCSkim::hxnRecHitsSel
private

Definition at line 180 of file CSCSkim.h.

TH1F* CSCSkim::hxnSegments
private

Definition at line 178 of file CSCSkim.h.

int CSCSkim::iEvent
private

Definition at line 135 of file CSCSkim.h.

int CSCSkim::iRun
private

Definition at line 134 of file CSCSkim.h.

bool CSCSkim::isSimulation
private

Definition at line 152 of file CSCSkim.h.

bool CSCSkim::makeHistograms
private

Definition at line 158 of file CSCSkim.h.

bool CSCSkim::makeHistogramsForMessyEvents
private

Definition at line 159 of file CSCSkim.h.

TH1F* CSCSkim::mevnChambers0
private

Definition at line 182 of file CSCSkim.h.

TH1F* CSCSkim::mevnChambers1
private

Definition at line 185 of file CSCSkim.h.

TH1F* CSCSkim::mevnRecHits0
private

Definition at line 181 of file CSCSkim.h.

TH1F* CSCSkim::mevnRecHits1
private

Definition at line 184 of file CSCSkim.h.

TH1F* CSCSkim::mevnSegments0
private

Definition at line 183 of file CSCSkim.h.

TH1F* CSCSkim::mevnSegments1
private

Definition at line 186 of file CSCSkim.h.

int CSCSkim::minimumHitChambers
private

Definition at line 155 of file CSCSkim.h.

int CSCSkim::minimumSegments
private

Definition at line 156 of file CSCSkim.h.

int CSCSkim::nCSCHitsMin
private

Definition at line 167 of file CSCSkim.h.

int CSCSkim::nEventsAnalyzed
private

Definition at line 122 of file CSCSkim.h.

int CSCSkim::nEventsCertainChamber
private

Definition at line 127 of file CSCSkim.h.

int CSCSkim::nEventsChambersBothSides
private

Definition at line 124 of file CSCSkim.h.

int CSCSkim::nEventsDTOverlap
private

Definition at line 128 of file CSCSkim.h.

int CSCSkim::nEventsForBFieldStudies
private

Definition at line 131 of file CSCSkim.h.

int CSCSkim::nEventsHaloLike
private

Definition at line 129 of file CSCSkim.h.

int CSCSkim::nEventsLongSATrack
private

Definition at line 130 of file CSCSkim.h.

int CSCSkim::nEventsMessy
private

Definition at line 126 of file CSCSkim.h.

int CSCSkim::nEventsOverlappingChambers
private

Definition at line 125 of file CSCSkim.h.

int CSCSkim::nEventsSelected
private

Definition at line 123 of file CSCSkim.h.

int CSCSkim::nLayersWithHitsMinimum
private

Definition at line 154 of file CSCSkim.h.

int CSCSkim::nTrHitsMin
private

Definition at line 169 of file CSCSkim.h.

int CSCSkim::nValidHitsMin
private

Definition at line 173 of file CSCSkim.h.

std::string CSCSkim::outputFileName
private

Definition at line 141 of file CSCSkim.h.

float CSCSkim::pMin
private

Definition at line 165 of file CSCSkim.h.

float CSCSkim::redChiSqMax
private

Definition at line 172 of file CSCSkim.h.

float CSCSkim::rExtMax
private

Definition at line 171 of file CSCSkim.h.

edm::InputTag CSCSkim::SAMuonTag
private

Definition at line 147 of file CSCSkim.h.

TFile* CSCSkim::theHistogramFile
private

Definition at line 138 of file CSCSkim.h.

edm::InputTag CSCSkim::trackTag
private

Definition at line 149 of file CSCSkim.h.

int CSCSkim::typeOfSkim
private

Definition at line 153 of file CSCSkim.h.

int CSCSkim::whichChamber
private

Definition at line 163 of file CSCSkim.h.

int CSCSkim::whichEndcap
private

Definition at line 160 of file CSCSkim.h.

int CSCSkim::whichRing
private

Definition at line 162 of file CSCSkim.h.

int CSCSkim::whichStation
private

Definition at line 161 of file CSCSkim.h.

TH1F * CSCSkim::xxnCSCHits
private

Definition at line 188 of file CSCSkim.h.

TH1F * CSCSkim::xxnTrackerHits
private

Definition at line 188 of file CSCSkim.h.

TH1F * CSCSkim::xxnValidHits
private

Definition at line 188 of file CSCSkim.h.

TH1F* CSCSkim::xxP
private

Definition at line 188 of file CSCSkim.h.

TH1F * CSCSkim::xxredChiSq
private

Definition at line 188 of file CSCSkim.h.

float CSCSkim::zInnerMax
private

Definition at line 168 of file CSCSkim.h.

float CSCSkim::zLengthMin
private

Definition at line 166 of file CSCSkim.h.

float CSCSkim::zLengthTrMin
private

Definition at line 170 of file CSCSkim.h.