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
HLTOniaSource Class Reference

#include <HLTOniaSource.h>

Inheritance diagram for HLTOniaSource:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 HLTOniaSource (const edm::ParameterSet &)
 
 ~HLTOniaSource ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void beginJob () override
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void bookOniaTriggerInvariantMassMEs (std::map< std::string, MonitorElement * > &, std::string, std::string)
 
void bookOniaTriggerMEs (std::map< std::string, MonitorElement * > &, std::string)
 
bool checkHLTConfiguration (const edm::Run &, const edm::EventSetup &, std::string)
 
virtual void endJob () override
 
void fillInvariantMass (std::vector< reco::RecoChargedCandidateRef > &, reco::RecoChargedCandidateCollection &, std::string, std::string)
 
void fillInvariantMass (std::vector< reco::RecoChargedCandidateRef > &, std::vector< reco::RecoChargedCandidateRef > &, std::string, std::string)
 
void fillInvariantMass (std::vector< reco::RecoChargedCandidateRef > &, reco::TrackCollection &, std::string, std::string)
 
void fillOniaTriggerMEs (edm::Handle< reco::RecoChargedCandidateCollection > &, std::string, std::map< std::string, MonitorElement * > &)
 
void fillOniaTriggerMEs (edm::Handle< reco::TrackCollection > &, std::string, std::map< std::string, MonitorElement * > &)
 
void fillOniaTriggerMEs (std::vector< reco::RecoChargedCandidateRef > &, std::string, std::map< std::string, MonitorElement * > &)
 

Private Attributes

edm::InputTag beamSpotTag_
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
reco::BeamSpot::Point BSPosition_
 
DQMStoredbe_
 
bool hltConfigInit_
 
std::string hltProcessName_
 
std::map< std::string,
MonitorElement * > 
massME_
 
std::map< std::string,
MonitorElement * > 
muonME_
 
std::vector< edm::InputTagoniaMuonTag_
 
std::map< std::string,
MonitorElement * > 
pixelAfterFilterME_
 
std::map< std::string,
MonitorElement * > 
pixelME_
 
edm::InputTag pixelTag_
 
std::vector< edm::InputTagpixelTagsAfterFilter_
 
edm::EDGetTokenT
< reco::TrackCollection
pixelToken_
 
std::string subsystemFolder_
 
std::map< std::string,
MonitorElement * > 
trackAfterFilterME_
 
std::map< std::string,
MonitorElement * > 
trackME_
 
edm::InputTag trackTag_
 
std::vector< edm::InputTagtrackTagsAfterFilter_
 
edm::EDGetTokenT
< reco::RecoChargedCandidateCollection
trackToken_
 
std::vector< std::string > triggerPath_
 
edm::InputTag triggerSummaryRAWTag_
 
edm::EDGetTokenT
< trigger::TriggerEventWithRefs
triggerSummaryRAWToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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

Definition at line 28 of file HLTOniaSource.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file HLTOniaSource.cc.

References beamSpotTag_, beamSpotToken_, edm::ParameterSet::getUntrackedParameter(), hltProcessName_, oniaMuonTag_, pixelTag_, pixelTagsAfterFilter_, pixelToken_, AlCaHLTBitMon_QueryRunRegistry::string, subsystemFolder_, trackTag_, trackTagsAfterFilter_, trackToken_, triggerPath_, triggerSummaryRAWTag_, and triggerSummaryRAWToken_.

25  {
26 
27  edm::LogVerbatim ("oniatriggermonitor") << "[HLTOniaSource]: Constructor";
28 
29  //HLTrigger Path Names
30  std::vector<std::string> myTriggerPaths;
31  myTriggerPaths.push_back("HLT_Mu0_Track0_Jpsi");
32  myTriggerPaths.push_back("HLT_Mu3_Track0_Jpsi");
33  myTriggerPaths.push_back("HLT_Mu5_Track0_Jpsi");
34  triggerPath_ = pset.getUntrackedParameter<std::vector<std::string> >("TriggerPathNames",myTriggerPaths);
35 
36  //Tag for Onia Muons
37  std::vector<edm::InputTag> myOniaMuonTags;
38 
39  myOniaMuonTags.push_back(edm::InputTag("hltMu0TrackJpsiL3Filtered0", "", "HLT"));
40  myOniaMuonTags.push_back(edm::InputTag("hltMu3TrackJpsiL3Filtered3", "", "HLT"));
41  myOniaMuonTags.push_back(edm::InputTag("hltMu5TrackJpsiL3Filtered5", "", "HLT"));
42  oniaMuonTag_ = pset.getUntrackedParameter<std::vector<edm::InputTag> >("OniaMuonTag",myOniaMuonTags);
43 
44  //Tag for Pixel tracks before Onia filter
45  pixelTag_ = pset.getUntrackedParameter<edm::InputTag>("PixelTag",edm::InputTag("hltPixelTracks", "", "HLT"));
46 
47  //Tag for Tracker tracks before Onia filter
48  trackTag_ = pset.getUntrackedParameter<edm::InputTag>("TrackTag",edm::InputTag("hltMuTrackJpsiCtfTrackCands","", "HLT"));
49 
50  beamSpotTag_ = pset.getUntrackedParameter<edm::InputTag>("BeamSpotTag",edm::InputTag("hltOfflineBeamSpot", "", "HLT"));
51 
52  //Tag Trigger Summary
53  triggerSummaryRAWTag_ = pset.getUntrackedParameter<edm::InputTag>("TriggerSummaryTag",edm::InputTag("hltTriggerSummaryRAW", "", "HLT"));
54  hltProcessName_ = pset.getUntrackedParameter<std::string>("TriggerProcessName","HLT");
55  //Tag for Pixel tracks after Onia filter
56  std::vector<edm::InputTag> pxlTagsAfterFilter;
57  pxlTagsAfterFilter.push_back(edm::InputTag("hltMu0TrackJpsiPixelMassFiltered", "", "HLT"));
58  pxlTagsAfterFilter.push_back(edm::InputTag("hltMu3TrackJpsiPixelMassFiltered", "", "HLT"));
59  pxlTagsAfterFilter.push_back(edm::InputTag("hltMu5TrackJpsiPixelMassFiltered", "", "HLT"));
60  pixelTagsAfterFilter_= pset.getUntrackedParameter< std::vector<edm::InputTag> >("PixelTagAfterFilter",pxlTagsAfterFilter);
61 
62  //Tag for Tracker tracks after Onia filter
63  std::vector<edm::InputTag> trxTagsAfterFilter;
64  trxTagsAfterFilter.push_back(edm::InputTag("hltMu0TrackJpsiTrackMassFiltered", "", "HLT"));
65  trxTagsAfterFilter.push_back(edm::InputTag("hltMu3TrackJpsiTrackMassFiltered", "", "HLT"));
66  trxTagsAfterFilter.push_back(edm::InputTag("hltMu5TrackJpsiTrackMassFiltered", "", "HLT"));
67  trackTagsAfterFilter_ = pset.getUntrackedParameter< std::vector<edm::InputTag> >("TrackTagAfterFilter",trxTagsAfterFilter);
68 
69  //Foldering output
70  subsystemFolder_ = pset.getUntrackedParameter<std::string>("SubSystemFolder","HLT/HLTMonMuon/Onia");
71 
72  //set Token(-s)
73  pixelToken_ = consumes<reco::TrackCollection>(pset.getUntrackedParameter<edm::InputTag>("PixelTag",edm::InputTag("hltPixelTracks", "", "HLT")));
74  trackToken_ = consumes<reco::RecoChargedCandidateCollection>(pset.getUntrackedParameter<edm::InputTag>("TrackTag",edm::InputTag("hltMuTrackJpsiCtfTrackCands","", "HLT")));
75  beamSpotToken_ = consumes<reco::BeamSpot>(pset.getUntrackedParameter<edm::InputTag>("BeamSpotTag",edm::InputTag("hltOfflineBeamSpot", "", "HLT")));
76  triggerSummaryRAWToken_ = consumes<trigger::TriggerEventWithRefs>(pset.getUntrackedParameter<edm::InputTag>("TriggerSummaryTag",edm::InputTag("hltTriggerSummaryRAW", "", "HLT")));
77 }
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag triggerSummaryRAWTag_
Definition: HLTOniaSource.h:62
edm::InputTag trackTag_
Definition: HLTOniaSource.h:65
std::vector< edm::InputTag > pixelTagsAfterFilter_
Definition: HLTOniaSource.h:60
std::vector< edm::InputTag > oniaMuonTag_
Definition: HLTOniaSource.h:59
std::vector< edm::InputTag > trackTagsAfterFilter_
Definition: HLTOniaSource.h:61
edm::InputTag beamSpotTag_
Definition: HLTOniaSource.h:64
std::vector< std::string > triggerPath_
Definition: HLTOniaSource.h:58
edm::InputTag pixelTag_
Definition: HLTOniaSource.h:63
edm::EDGetTokenT< reco::TrackCollection > pixelToken_
Definition: HLTOniaSource.h:76
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: HLTOniaSource.h:78
std::string hltProcessName_
Definition: HLTOniaSource.h:56
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > trackToken_
Definition: HLTOniaSource.h:77
std::string subsystemFolder_
Definition: HLTOniaSource.h:55
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerSummaryRAWToken_
Definition: HLTOniaSource.h:79
HLTOniaSource::~HLTOniaSource ( )

Definition at line 80 of file HLTOniaSource.cc.

References dbe_.

80 {dbe_ = 0;}
DQMStore * dbe_
Definition: HLTOniaSource.h:66

Member Function Documentation

void HLTOniaSource::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 147 of file HLTOniaSource.cc.

References beamSpotTag_, beamSpotToken_, BSPosition_, fillInvariantMass(), fillOniaTriggerMEs(), edm::Event::getByToken(), hltConfigInit_, i, edm::HandleBase::isValid(), edm::InputTag::label(), diffTwoXMLs::label, muonME_, oniaMuonTag_, pixelAfterFilterME_, pixelME_, pixelTag_, pixelTagsAfterFilter_, pixelToken_, findQualityFiles::size, python.multivaluedict::sort(), trackAfterFilterME_, trackME_, trackTag_, trackTagsAfterFilter_, trackToken_, trigger::TriggerMuon, triggerSummaryRAWTag_, triggerSummaryRAWToken_, and trigger::TriggerTrack.

147  {
148 
149  if(!hltConfigInit_) return;
150 
151  //Get Pixel Tracks
153  iEvent.getByToken(pixelToken_, pixelCands);
154 
155  reco::TrackCollection mypixelCands; //This is needed for the sort!!!!
156  if (pixelCands.isValid()) {
157  mypixelCands = * pixelCands;
158  sort(mypixelCands.begin(), mypixelCands.end(),PtGreater());
159  this->fillOniaTriggerMEs(pixelCands , pixelTag_.label(), pixelME_ );
160  }else {
161  edm::LogVerbatim ("oniatriggermonitor") << "[HLTOniaSource]: Could not access pixel collection with tag "<<pixelTag_;
162  }
163 
164  //Get Tracker Tracks
166  iEvent.getByToken(trackToken_, trackCands);
167  reco::RecoChargedCandidateCollection mytrackCands; //This is needed for the sort!!!!
168  if(trackCands.isValid()) {
169  mytrackCands = * trackCands;
170  sort(mytrackCands.begin(),mytrackCands.end(),PtGreater());
171  this->fillOniaTriggerMEs(trackCands , trackTag_.label(), trackME_ );
172  }else {
173  edm::LogVerbatim ("oniatriggermonitor") << "[HLTOniaSource]: Could not access track collection with tag "<<trackTag_;
174  }
175 
176  //Get Beamspot
177  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
178  iEvent.getByToken(beamSpotToken_, recoBeamSpotHandle);
179  if (recoBeamSpotHandle.isValid()) {
180  BSPosition_ = recoBeamSpotHandle->position();
181  }else {
182  edm::LogVerbatim ("oniatriggermonitor") << "[HLTOniaSource]: Could not access beam spot info with tag "<<beamSpotTag_;
183  }
184 
185 
186  //Get Trigger Summary RA
188  iEvent.getByToken(triggerSummaryRAWToken_, rawTriggerEvent);
189  if( rawTriggerEvent.isValid() ){
190 
191  for(size_t i=0; i<oniaMuonTag_.size(); i++){
192 
193  std::vector<reco::RecoChargedCandidateRef> myMuonFilterCands;
194  std::vector<reco::RecoChargedCandidateRef> myPixelFilterCands;
195  std::vector<reco::RecoChargedCandidateRef> myTrackFilterCands;
196 
197  //Get Onia Muons
198  size_t indexM = rawTriggerEvent->filterIndex(oniaMuonTag_[i]);
199 
200  if ( indexM < rawTriggerEvent->size() ){
201  rawTriggerEvent->getObjects( indexM, trigger::TriggerMuon, myMuonFilterCands );
202  this->fillOniaTriggerMEs( myMuonFilterCands, oniaMuonTag_[i].label(), muonME_ );
203  }else{
204  edm::LogVerbatim ("oniatriggermonitor") << "[HLTOniaSource]: Did not find muons with tag "<<oniaMuonTag_[i];
205  }
206  //Get Onia Pixel
207  size_t indexP = rawTriggerEvent->filterIndex(pixelTagsAfterFilter_[i]);
208  if ( indexP < rawTriggerEvent->size() ){
209  rawTriggerEvent->getObjects( indexP, trigger::TriggerTrack , myPixelFilterCands );
210  this->fillOniaTriggerMEs( myPixelFilterCands,pixelTagsAfterFilter_[i].label(), pixelAfterFilterME_);
211  sort(myPixelFilterCands.begin(), myPixelFilterCands.end(),PtGreaterRef());
212  }else{
213  edm::LogVerbatim ("oniatriggermonitor") << "[HLTOniaSource]: Did not find pixel with tag "<<pixelTagsAfterFilter_[i];
214  }
215 
216  //Get Onia Tracker Tracks
217  size_t indexT = rawTriggerEvent->filterIndex(trackTagsAfterFilter_[i]);
218  if ( indexT < rawTriggerEvent->size() ){
219  rawTriggerEvent->getObjects( indexT, trigger::TriggerTrack , myTrackFilterCands );
220  this->fillOniaTriggerMEs( myTrackFilterCands,trackTagsAfterFilter_[i].label(), trackAfterFilterME_ );
221  sort(myTrackFilterCands.begin(), myTrackFilterCands.end(),PtGreaterRef());
222  }else{
223  edm::LogVerbatim ("oniatriggermonitor") << "[HLTOniaSource]: Did not find tracks with tag "<<trackTagsAfterFilter_[i];
224  }
225 
226  if( myMuonFilterCands.size() > 0){
227  if ( myPixelFilterCands.size() > 0 )this->fillInvariantMass( myMuonFilterCands, myPixelFilterCands ,oniaMuonTag_[i].label(),pixelTagsAfterFilter_[i].label());
228  if ( myTrackFilterCands.size() > 0 )this->fillInvariantMass( myMuonFilterCands, myTrackFilterCands ,oniaMuonTag_[i].label(),trackTagsAfterFilter_[i].label());
229  if (pixelCands.isValid()) this->fillInvariantMass( myMuonFilterCands, mypixelCands , oniaMuonTag_[i].label(), pixelTag_.label());
230  if (trackCands.isValid()) this->fillInvariantMass( myMuonFilterCands, mytrackCands , oniaMuonTag_[i].label(), trackTag_.label());
231  }
232 
233 
234  }//ADD INVARIANT MASSES
235  }else{
236  edm::LogVerbatim ("oniatriggermonitor") << "[HLTOniaSource]: Could not access trigger collection with tag "<<triggerSummaryRAWTag_;
237  }
238 
239 }
int i
Definition: DBlmapReader.cc:9
edm::InputTag triggerSummaryRAWTag_
Definition: HLTOniaSource.h:62
edm::InputTag trackTag_
Definition: HLTOniaSource.h:65
std::map< std::string, MonitorElement * > pixelAfterFilterME_
Definition: HLTOniaSource.h:67
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
std::map< std::string, MonitorElement * > pixelME_
Definition: HLTOniaSource.h:69
std::vector< edm::InputTag > pixelTagsAfterFilter_
Definition: HLTOniaSource.h:60
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:13
std::vector< edm::InputTag > oniaMuonTag_
Definition: HLTOniaSource.h:59
std::map< std::string, MonitorElement * > trackME_
Definition: HLTOniaSource.h:71
void fillInvariantMass(std::vector< reco::RecoChargedCandidateRef > &, reco::RecoChargedCandidateCollection &, std::string, std::string)
std::vector< edm::InputTag > trackTagsAfterFilter_
Definition: HLTOniaSource.h:61
std::map< std::string, MonitorElement * > trackAfterFilterME_
Definition: HLTOniaSource.h:68
edm::InputTag beamSpotTag_
Definition: HLTOniaSource.h:64
edm::InputTag pixelTag_
Definition: HLTOniaSource.h:63
reco::BeamSpot::Point BSPosition_
Definition: HLTOniaSource.h:41
bool isValid() const
Definition: HandleBase.h:76
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
edm::EDGetTokenT< reco::TrackCollection > pixelToken_
Definition: HLTOniaSource.h:76
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: HLTOniaSource.h:78
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > trackToken_
Definition: HLTOniaSource.h:77
std::string const & label() const
Definition: InputTag.h:42
std::map< std::string, MonitorElement * > muonME_
Definition: HLTOniaSource.h:70
void fillOniaTriggerMEs(edm::Handle< reco::RecoChargedCandidateCollection > &, std::string, std::map< std::string, MonitorElement * > &)
tuple size
Write out results.
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerSummaryRAWToken_
Definition: HLTOniaSource.h:79
void HLTOniaSource::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 82 of file HLTOniaSource.cc.

References dbe_, and cppFunctionSkipper::operator.

82  {
83 
85  if( !dbe_ ) {
86  edm::LogVerbatim ("oniatriggermonitor") << "[HLTOniaSource]: Could not access DQM Store.";
87  return;
88  }
89 }
DQMStore * dbe_
Definition: HLTOniaSource.h:66
void HLTOniaSource::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 91 of file HLTOniaSource.cc.

References bookOniaTriggerInvariantMassMEs(), bookOniaTriggerMEs(), checkHLTConfiguration(), dbe_, hltConfigInit_, hltProcessName_, i, edm::InputTag::label(), diffTwoXMLs::label, massME_, muonME_, oniaMuonTag_, pixelAfterFilterME_, pixelME_, pixelTag_, pixelTagsAfterFilter_, DQMStore::setCurrentFolder(), subsystemFolder_, trackAfterFilterME_, trackME_, trackTag_, and trackTagsAfterFilter_.

91  {
92 
93  if (!dbe_) return;
94 
95  // Book Pixel Histos
96  if (pixelTag_.label()!= ""){
99  }
100 
101  // Book Track Histos
102  if (trackTag_.label()!= ""){
105  }
106 
107 
108  //Book Onia Histos
109  for (size_t i = 0 ; i<oniaMuonTag_.size() && i<pixelTagsAfterFilter_.size() && i<trackTagsAfterFilter_.size(); i++){
110 
111  if (oniaMuonTag_[i].label()!= "") {
112  dbe_->setCurrentFolder(subsystemFolder_+"/MuonFilters");
114  }
115  if (pixelTagsAfterFilter_[i].label() != ""){
116  dbe_->setCurrentFolder(subsystemFolder_+"/PixelFilters");
118  }
119  if (trackTagsAfterFilter_[i].label() != ""){
120  dbe_->setCurrentFolder(subsystemFolder_+"/TrackFilters");
122  }
123  if (oniaMuonTag_[i].label()!= "" && pixelTag_.label() != ""){
126  }
127  if (oniaMuonTag_[i].label() != "" && trackTag_.label()!= "" ){
130  }
131  if (oniaMuonTag_[i].label()!= "" && pixelTagsAfterFilter_[i].label()!= ""){
132  dbe_->setCurrentFolder(subsystemFolder_+"/PixelFilters");
134  }
135  if (oniaMuonTag_[i].label()!= "" && trackTagsAfterFilter_[i].label()!= ""){
136  dbe_->setCurrentFolder(subsystemFolder_+"/TrackFilters");
138  }
139  }
140 
142 
143 }
int i
Definition: DBlmapReader.cc:9
edm::InputTag trackTag_
Definition: HLTOniaSource.h:65
std::map< std::string, MonitorElement * > pixelAfterFilterME_
Definition: HLTOniaSource.h:67
std::map< std::string, MonitorElement * > pixelME_
Definition: HLTOniaSource.h:69
std::vector< edm::InputTag > pixelTagsAfterFilter_
Definition: HLTOniaSource.h:60
void bookOniaTriggerMEs(std::map< std::string, MonitorElement * > &, std::string)
std::vector< edm::InputTag > oniaMuonTag_
Definition: HLTOniaSource.h:59
std::map< std::string, MonitorElement * > trackME_
Definition: HLTOniaSource.h:71
std::map< std::string, MonitorElement * > massME_
Definition: HLTOniaSource.h:72
std::vector< edm::InputTag > trackTagsAfterFilter_
Definition: HLTOniaSource.h:61
std::map< std::string, MonitorElement * > trackAfterFilterME_
Definition: HLTOniaSource.h:68
edm::InputTag pixelTag_
Definition: HLTOniaSource.h:63
void bookOniaTriggerInvariantMassMEs(std::map< std::string, MonitorElement * > &, std::string, std::string)
std::string hltProcessName_
Definition: HLTOniaSource.h:56
std::string const & label() const
Definition: InputTag.h:42
std::string subsystemFolder_
Definition: HLTOniaSource.h:55
std::map< std::string, MonitorElement * > muonME_
Definition: HLTOniaSource.h:70
DQMStore * dbe_
Definition: HLTOniaSource.h:66
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:684
bool checkHLTConfiguration(const edm::Run &, const edm::EventSetup &, std::string)
void HLTOniaSource::bookOniaTriggerInvariantMassMEs ( std::map< std::string, MonitorElement * > &  myMap,
std::string  label1,
std::string  label2 
)
private

Definition at line 331 of file HLTOniaSource.cc.

References DQMStore::book1D(), dbe_, and massME_.

Referenced by beginRun().

331  {
332 
333  std::stringstream meName;
334  //Same charge
335  meName.str("");
336  meName<<label1<<"_"<<label2<<"_SameCharge_InvariantMass";
337  massME_[label1+label2+"same"]=dbe_->book1D(meName.str(), meName.str(),120, 0.0, 6.0);
338  massME_[label1+label2+"same"]->setAxisTitle("mass (GeV)", 1);
339 
340  //Opposite charge
341  meName.str("");
342  meName<<label1<<"_"<<label2<<"_OppositeCharge_InvariantMass";
343  massME_[label1+label2+"opposite"]=dbe_->book1D(meName.str(), meName.str(),120, 0.0, 6.0);
344  massME_[label1+label2+"opposite"]->setAxisTitle("mass (GeV)", 1);
345 
346  //Same charge Highest PT
347  meName.str("");
348  meName<<label1<<"_"<<label2<<"_SameCharge_HighestPT_InvariantMass";
349  massME_[label1+label2+"same"+"highestpt"]=dbe_->book1D(meName.str(), meName.str(),120, 0.0, 6.0);
350  massME_[label1+label2+"same"+"highestpt"]->setAxisTitle("mass (GeV)", 1);
351 
352  //Opposite charge Highest PT
353  meName.str("");
354  meName<<label1<<"_"<<label2<<"_OppositeCharge_HighestPT_InvariantMass";
355  massME_[label1+label2+"opposite"+"highestpt"]=dbe_->book1D(meName.str(), meName.str(),120, 0.0, 6.0);
356  massME_[label1+label2+"opposite"+"highestpt"]->setAxisTitle("mass (GeV)", 1);
357 
358 
359 
360  // Same Charge Deltaz Muon - Track Highest PT
361  meName.str("");
362  meName<<label1<<"_"<<label2<<"_SameCharge_HighestPT_MaxDzMuonTrack";
363  massME_[label1+label2+"same"+"highestpt"+"maxdzmuontrack"]=dbe_->book1D(meName.str(), meName.str(),50, 0.0, 5.0);
364  massME_[label1+label2+"same"+"highestpt"+"maxdzmuontrack"]->setAxisTitle("MaxDz Muon-Track", 1);
365  // Same Charge Deltaz Muon - Track
366  meName.str("");
367  meName<<label1<<"_"<<label2<<"_SameCharge_MaxDzMuonTrack";
368  massME_[label1+label2+"same"+"maxdzmuontrack"]=dbe_->book1D(meName.str(), meName.str(),50, 0.0, 5.0);
369  massME_[label1+label2+"same"+"maxdzmuontrack"]->setAxisTitle("MaxDz Muon-Track", 1);
370  // Opposite charge Deltaz Muon - Track Highest PT
371  meName.str("");
372  meName<<label1<<"_"<<label2<<"_OppositeCharge_HighestPT_MaxDzMuonTrack";
373  massME_[label1+label2+"opposite"+"highestpt"+"maxdzmuontrack"]=dbe_->book1D(meName.str(), meName.str(),50, 0.0, 5.0);
374  massME_[label1+label2+"opposite"+"highestpt"+"maxdzmuontrack"]->setAxisTitle("MaxDz Muon-Track", 1);
375  // Opposite charge Deltaz Muon - Track
376  meName.str("");
377  meName<<label1<<"_"<<label2<<"_OppositeCharge_MaxDzMuonTrack";
378  massME_[label1+label2+"opposite"+"maxdzmuontrack"]=dbe_->book1D(meName.str(), meName.str(),50, 0.0, 5.0);
379  massME_[label1+label2+"opposite"+"maxdzmuontrack"]->setAxisTitle("MaxDz Muon-Track", 1);
380 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:971
std::map< std::string, MonitorElement * > massME_
Definition: HLTOniaSource.h:72
DQMStore * dbe_
Definition: HLTOniaSource.h:66
void HLTOniaSource::bookOniaTriggerMEs ( std::map< std::string, MonitorElement * > &  myMap,
std::string  meName 
)
private

Definition at line 244 of file HLTOniaSource.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe_, and MonitorElement::setAxisTitle().

Referenced by beginRun().

244  {
245 
246  std::stringstream myMeName;
247 
248  //PT
249  myMeName.str("");
250  myMeName<<meName<<"_Pt";
251  myMap[meName+"pt"]=dbe_->book1D(myMeName.str(), myMeName.str(),200, 0.0, 20.0);
252  myMap[meName+"pt"]->setAxisTitle("Pt (GeV)", 1);
253 
254  //P
255  myMeName.str("");
256  myMeName<<meName<<"_P";
257  myMap[meName+"p"]=dbe_->book1D(myMeName.str(), myMeName.str(),250, 0.0, 50.0);
258  myMap[meName+"p"]->setAxisTitle("P (GeV)", 1);
259 
260  //Eta
261  myMeName.str("");
262  myMeName<<meName<<"_Eta";
263  myMap[meName+"eta"]=dbe_->book1D(myMeName.str(), myMeName.str(), 50, -2.5, 2.5 );
264  myMap[meName+"eta"]->setAxisTitle("Eta", 1);
265 
266  //Phi
267  myMeName.str("");
268  myMeName<<meName<<"_Phi";
269  myMap[meName+"phi"]=dbe_->book1D(myMeName.str(), myMeName.str(), 144, -3.1416, 3.1416 );
270  myMap[meName+"phi"]->setAxisTitle("Phi", 1);
271 
272  //Phi
273  myMeName.str("");
274  myMeName<<meName<<"_Phi";
275  myMap[meName+"phi"]=dbe_->book1D(myMeName.str(), myMeName.str(), 144, -3.1416, 3.1416 );
276  myMap[meName+"phi"]->setAxisTitle("Phi", 1);
277 
278  //Charge
279  myMeName.str("");
280  myMeName<<meName<<"_Charge";
281  myMap[meName+"charge"]=dbe_->book1D(myMeName.str(), myMeName.str(), 3, -1.5, 1.5 );
282  myMap[meName+"charge"]->setAxisTitle("charge", 1);
283 
284  //Dz
285  myMeName.str("");
286  myMeName<<meName<<"_Dz";
287  myMap[meName+"dz"]=dbe_->book1D(myMeName.str(), myMeName.str(), 400, -20.0, 20.0 );
288  myMap[meName+"dz"]->setAxisTitle("dz", 1);
289 
290  //Dxy
291  myMeName.str("");
292  myMeName<<meName<<"_Dxy";
293  myMap[meName+"dxy"]=dbe_->book1D(myMeName.str(), myMeName.str(), 100, -0.5, 0.5 );
294  myMap[meName+"dxy"]->setAxisTitle("dxy", 1);
295 
296  //EtaVsPhi
297  myMeName.str("");
298  myMeName<<meName<<"_EtaPhi";
299  myMap[meName+"etaphi"]=dbe_->book2D(myMeName.str(), myMeName.str(), 144, -3.1416, 3.1416 ,50, -2.5, 2.5 );
300  myMap[meName+"etaphi"]->setAxisTitle("Phi", 1);
301  myMap[meName+"etaphi"]->setAxisTitle("Eta", 2);
302 
303  //EtaVsPt
304  myMeName.str("");
305  myMeName<<meName<<"_EtaPt";
306  myMap[meName+"etapt"]=dbe_->book2D(myMeName.str(), myMeName.str(), 100, 0.0, 100.0, 50, -2.5, 2.5 );
307  myMap[meName+"etapt"]->setAxisTitle("Pt (GeV)", 1);
308  myMap[meName+"etapt"]->setAxisTitle("Eta", 2);
309 
310  //ValidHits
311  myMeName.str("");
312  myMeName<<meName<<"_ValidHits";
313  myMap[meName+"validhits"]=dbe_->book1D(myMeName.str(), myMeName.str(), 50, 0.0, 50.0 );
314  myMap[meName+"validhits"]->setAxisTitle("ValidHits", 1);
315 
316  //Norm Chi2
317  myMeName.str("");
318  myMeName<<meName<<"_NormChi2";
319  myMap[meName+"normchi"]=dbe_->book1D(myMeName.str(), myMeName.str(), 300, 0.0, 30.0 );
320  myMap[meName+"normchi"]->setAxisTitle("Normalized Chi2", 1);
321 
322  //Number Of Candi
323  myMeName.str("");
324  myMeName<<meName<<"_NrCandidates";
325  myMap[meName+"nrcand"]=dbe_->book1D(myMeName.str(), myMeName.str(), 50, 0.0, 50.0 );
326  myMap[meName+"nrcand"]->setAxisTitle("Nr per Event", 1);
327  //return true;
328 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:971
DQMStore * dbe_
Definition: HLTOniaSource.h:66
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1099
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
bool HLTOniaSource::checkHLTConfiguration ( const edm::Run run,
const edm::EventSetup setup,
std::string  triggerProcessName 
)
private

Definition at line 602 of file HLTOniaSource.cc.

References spr::find(), HltComparatorCreateWorkflow::hltConfig, i, HLTConfigProvider::init(), j, HLTConfigProvider::moduleLabels(), mergeVDriftHistosByStation::name, HLTConfigProvider::triggerNames(), and triggerPath_.

Referenced by beginRun().

602  {
603 
605  bool changed(false);
606  if(hltConfig.init(run , setup, triggerProcessName, changed)){
607  edm::LogVerbatim("hltoniasource") << "Successfully initialized HLTConfigProvider with process name: "<<triggerProcessName;
608 
609  std::stringstream os;
610  std::vector<std::string> triggerNames = hltConfig.triggerNames();
611 
612  for( size_t i = 0; i < triggerNames.size(); i++) {
613  if (find(triggerPath_.begin(), triggerPath_.end(), triggerNames[i]) == triggerPath_.end()) continue;
614  edm::LogVerbatim("hltoniasource") << "[HLTOniaSource]: Trigger Path: "<<triggerNames[i];
615  std::vector<std::string> moduleNames = hltConfig.moduleLabels( triggerNames[i] );
616  for( size_t j = 0; j < moduleNames.size(); j++) {
617  TString name = moduleNames[j];
618  edm::LogVerbatim("hltoniasource") << "\t Fliter Name: "<<moduleNames[j];
619  }
620  }
621 
622  return true;
623 
624  }else{
625  edm::LogVerbatim("hltoniasource") << "Could not initialize HLTConfigProvider with process name: "<<triggerProcessName;
626  return false;
627  }
628  return true;
629 }
int i
Definition: DBlmapReader.cc:9
const std::vector< std::string > & triggerNames() const
names of trigger paths
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::vector< std::string > triggerPath_
Definition: HLTOniaSource.h:58
int j
Definition: DBlmapReader.cc:9
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
void HLTOniaSource::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 242 of file HLTOniaSource.cc.

242 {}
void HLTOniaSource::fillInvariantMass ( std::vector< reco::RecoChargedCandidateRef > &  cand1,
reco::RecoChargedCandidateCollection cand2,
std::string  cand1Label,
std::string  cand2Label 
)
private

Definition at line 516 of file HLTOniaSource.cc.

References i, massME_, p4, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by analyze().

516  {
517 
518  typedef reco::RecoChargedCandidateCollection::const_iterator cand;
519  //Loop on collection to calculate invariate mass
520  for(size_t i = 0 ; i< cand1.size(); i++) {
521  //Highest PT
522  if(cand2.begin() != cand2.end() && cand2.begin()->p()>3) {
523  cand candItr = cand2.begin();
524  std::string chargeLabel = "same";
525  //Check relative charge
526  if(cand1[i]->charge() * candItr->charge() < 0) chargeLabel = "opposite";
527  if(massME_[cand1Label+cand2Label+chargeLabel+"highestpt"]){
528  massME_[cand1Label+cand2Label+chargeLabel+"highestpt"]->Fill((cand1[i]->p4()+candItr->p4()).mass());
529  }
530 
531  if(massME_[cand1Label+cand2Label+chargeLabel+"highestpt"+"maxdzmuontrack"]){
532  reco::RecoChargedCandidate tk1 = (*cand1[i]);
533  reco::RecoChargedCandidate tk2 = (*candItr);
534  // massME_[cand1Label+cand2Label+chargeLabel+"highestpt"+"maxdzmuontrack"]->Fill(fabs(tk1->dz(BSPosition_) - tk2->dz(BSPosition_)));
535  }
536  }
537 
538  for (cand candItr2= cand2.begin(); candItr2!=cand2.end(); candItr2++) {
539  if(candItr2->p() < 3) continue; //Check if momentum is greater than 3GeV.
540  std::string chargeLabel = "same";
541  //Check relative charge
542  if(cand1[i]->charge() * candItr2->charge() < 0) chargeLabel = "opposite";
543  if(massME_[cand1Label+cand2Label+chargeLabel]){
544  massME_[cand1Label+cand2Label+chargeLabel]->Fill((cand1[i]->p4()+candItr2->p4()).mass());
545  }
546  if(massME_[cand1Label+cand2Label+chargeLabel+"maxdzmuontrack"]){
547  reco::RecoChargedCandidate tk1 = (*cand1[i]);
548  reco::RecoChargedCandidate tk2 = (*candItr2);
549  // massME_[cand1Label+cand2Label+chargeLabel+"maxdzmuontrack"]->Fill(fabs(tk1->dz(BSPosition_) - tk2->dz(BSPosition_)));
550  }
551  }
552  }
553 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, MonitorElement * > massME_
Definition: HLTOniaSource.h:72
double p4[4]
Definition: TauolaWrapper.h:92
void HLTOniaSource::fillInvariantMass ( std::vector< reco::RecoChargedCandidateRef > &  cand1,
std::vector< reco::RecoChargedCandidateRef > &  cand2,
std::string  cand1Label,
std::string  cand2Label 
)
private

Definition at line 475 of file HLTOniaSource.cc.

References i, j, massME_, AlCaHLTBitMon_ParallelJobs::p, p4, and AlCaHLTBitMon_QueryRunRegistry::string.

475  {
476 
477  //Loop on collection to calculate invariate mass
478  for(size_t i = 0 ; i< cand1.size(); i++) {
479 
480  //Highest PT
481  std::string chargeLabel = "same";
482 
483  //Check relative charge
484  if(cand1[i]->charge() * cand2[0]->charge() < 0) chargeLabel = "opposite";
485  if(massME_[cand1Label+cand2Label+chargeLabel+"highestpt"]){
486  massME_[cand1Label+cand2Label+chargeLabel+"highestpt"]->Fill((cand1[i]->p4()+cand2[0]->p4()).mass());
487  }
488  if(massME_[cand1Label+cand2Label+chargeLabel+"highestpt"+"maxdzmuontrack"]){
489  reco::RecoChargedCandidate tk1 = (*cand1[i]);
490  reco::RecoChargedCandidate tk2 = (*cand2[0]);
491  // TrackRef tk1 = cand1[i]->get<TrackRef>();
492  // massME_[cand1Label+cand2Label+chargeLabel+"highestpt"+"maxdzmuontrack"]->Fill(fabs(tk1->dz(BSPosition_) - tk2->dz(BSPosition_)));
493  }
494 
495 
496  for (size_t j= 0; j< cand2.size(); j++) {
497 
498  if(cand2[j]->p() < 3) continue; //Check if momentum is greater than 3GeV.
499  std::string chargeLabel = "same";
500  //Check relative charge
501  if(cand1[i]->charge() * cand2[j]->charge() < 0) chargeLabel = "opposite";
502  if(massME_[cand1Label+cand2Label+chargeLabel]){
503  massME_[cand1Label+cand2Label+chargeLabel]->Fill((cand1[i]->p4()+cand2[j]->p4()).mass());
504  }
505  if(massME_[cand1Label+cand2Label+chargeLabel+"maxdzmuontrack"]){
506  reco::RecoChargedCandidate tk1 = (*cand1[i]);
507  reco::RecoChargedCandidate tk2 = (*cand2[j]);
508  // massME_[cand1Label+cand2Label+chargeLabel+"maxdzmuontrack"]->Fill(fabs(tk1->dz(BSPosition_) - tk2->dz(BSPosition_)));
509  }
510  }
511  }
512 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, MonitorElement * > massME_
Definition: HLTOniaSource.h:72
double p4[4]
Definition: TauolaWrapper.h:92
int j
Definition: DBlmapReader.cc:9
void HLTOniaSource::fillInvariantMass ( std::vector< reco::RecoChargedCandidateRef > &  cand1,
reco::TrackCollection cand2,
std::string  cand1Label,
std::string  cand2Label 
)
private

Definition at line 557 of file HLTOniaSource.cc.

References i, massME_, p4, and AlCaHLTBitMon_QueryRunRegistry::string.

557  {
558 
559  typedef reco::TrackCollection::const_iterator cand;
560 
561  //Loop on collection to calculate invariate mass
562  for(size_t i = 0 ; i< cand1.size(); i++) {
563  //Highest PT
564  if(cand2.begin() != cand2.end() && cand2.begin()->p()>3) {
565  cand candItr = cand2.begin();
566  math::PtEtaPhiMLorentzVector bestPtCandLVector(candItr->pt(), candItr->eta(), candItr->phi(), 1.056);
567 
568  std::string chargeLabel = "same";
569 
570  //Check relative charge
571  if(cand1[i]->charge() * candItr->charge() < 0) chargeLabel = "opposite";
572  if(massME_[cand1Label+cand2Label+chargeLabel+"highestpt"]){
573  massME_[cand1Label+cand2Label+chargeLabel+"highestpt"]->Fill((cand1[i]->p4()+bestPtCandLVector).mass());
574  }
575 
576  if(massME_[cand1Label+cand2Label+chargeLabel+"highestpt"+"maxdzmuontrack"]){
577  reco::RecoChargedCandidate tk1 = (*cand1[i]);
578  // massME_[cand1Label+cand2Label+chargeLabel+"highestpt"+"maxdzmuontrack"]->Fill(fabs(tk->dz(BSPosition_) - candItr->dz(BSPosition_)));
579  }
580  }
581 
582  for (cand candIter= cand2.begin(); candIter!=cand2.end(); candIter++) {
583 
584  if(candIter->p() < 3) continue; //Check if momentum is greater than 3GeV.
585 
586  math::PtEtaPhiMLorentzVector candLVector(candIter->pt(), candIter->eta(), candIter->phi(), 1.056);
587 
588  std::string chargeLabel = "same";
589  //Check relative charge
590  if(cand1[i]->charge() * candIter->charge() < 0) chargeLabel = "opposite";
591  if(massME_[cand1Label+cand2Label+chargeLabel]){
592  massME_[cand1Label+cand2Label+chargeLabel]->Fill((cand1[i]->p4()+candLVector).mass());
593  }
594  if(massME_[cand1Label+cand2Label+chargeLabel+"maxdzmuontrack"]){
595  reco::RecoChargedCandidate tk1 = (*cand1[i]);
596  // massME_[cand1Label+cand2Label+chargeLabel+"maxdzmuontrack"]->Fill(fabs(tk->dz(BSPosition_) - candIter->dz(BSPosition_)));
597  }
598  }
599  }
600 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, MonitorElement * > massME_
Definition: HLTOniaSource.h:72
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
double p4[4]
Definition: TauolaWrapper.h:92
void HLTOniaSource::fillOniaTriggerMEs ( edm::Handle< reco::RecoChargedCandidateCollection > &  collection,
std::string  collectionLabel,
std::map< std::string, MonitorElement * > &  mapME 
)
private

Definition at line 442 of file HLTOniaSource.cc.

References reco::LeafCandidate::charge(), runEdmFileComparison::collection, reco::LeafCandidate::eta(), i, edm::HandleBase::isValid(), pileupDistInMC::num, reco::LeafCandidate::p(), reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

Referenced by analyze().

442  {
443 
445  if (collection.isValid()) {
446  myCollection = * collection;
447 
448  // int nCollection= myCollection.size();
449  int num = 0;
450  typedef reco::RecoChargedCandidateCollection::const_iterator cand;
451  for (cand i=myCollection.begin(); i!=myCollection.end(); i++) {
452  reco::RecoChargedCandidate tk = (*i);
453 
454  num++;
455  //Fill MEs
456  if(mapME[collectionLabel+"pt"]){ mapME[collectionLabel+"pt"]->Fill(tk.pt()); }
457  if(mapME[collectionLabel+"p"]) { mapME[collectionLabel+"p"]->Fill(tk.p()); }
458  if(mapME[collectionLabel+"eta"]) { mapME[collectionLabel+"eta"]->Fill(tk.eta()); }
459  if(mapME[collectionLabel+"phi"]) { mapME[collectionLabel+"phi"]->Fill(tk.phi()); }
460  if(mapME[collectionLabel+"etaphi"]){ mapME[collectionLabel+"etaphi"]->Fill(tk.phi(),tk.eta()); }
461  if(mapME[collectionLabel+"etapt"]){ mapME[collectionLabel+"etapt"]->Fill(tk.pt(),tk.eta()); }
462  if(mapME[collectionLabel+"charge"]){ mapME[collectionLabel+"charge"]->Fill(tk.charge()); }
463 
464  // if(mapME[collectionLabel+"dxy"]){ mapME[collectionLabel+"dxy"]->Fill(tk.dxy(BSPosition_)); }
465 // if(mapME[collectionLabel+"dz"]){ mapME[collectionLabel+"dz"]->Fill(tk.dz(BSPosition_)); }
466 
467 // if(mapME[collectionLabel+"validhits"]) { mapME[collectionLabel+"validhits"]->Fill(tk.numberOfValidHits()); }
468 // if(mapME[collectionLabel+"normchi"]){ mapME[collectionLabel+"normchi"]->Fill(tk.normalizedChi2()); }
469  }
470  if(mapME[collectionLabel+"nrcand"]){ mapME[collectionLabel+"nrcand"]->Fill(num);}
471  }
472 }
int i
Definition: DBlmapReader.cc:9
virtual double p() const
magnitude of momentum vector
virtual float pt() const
transverse momentum
virtual float phi() const
momentum azimuthal angle
virtual float eta() const
momentum pseudorapidity
virtual int charge() const
electric charge
bool isValid() const
Definition: HandleBase.h:76
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
void HLTOniaSource::fillOniaTriggerMEs ( edm::Handle< reco::TrackCollection > &  collection,
std::string  collectionLabel,
std::map< std::string, MonitorElement * > &  mapME 
)
private

Definition at line 383 of file HLTOniaSource.cc.

References runEdmFileComparison::collection, edm::HandleBase::isValid(), and pileupDistInMC::num.

383  {
384  // cout << "[HLTOniaSource]: fillOniaTriggerMEs " << collectionLabel << endl;
385 
386  reco::TrackCollection myCollection;
387  if (collection.isValid()) {
388  myCollection = * collection;
389 
390  // int nCollection= myCollection.size();
391 
392  typedef reco::TrackCollection::const_iterator cand;
393  int num = 0;
394  for (cand tk=myCollection.begin(); tk!=myCollection.end(); tk++) {
395  num++;
396  //Fill MEs
397  if(mapME[collectionLabel+"pt"]){ mapME[collectionLabel+"pt"]->Fill(tk->pt()); }
398  if(mapME[collectionLabel+"p"]) { mapME[collectionLabel+"p"]->Fill(tk->p()); }
399  if(mapME[collectionLabel+"eta"]) { mapME[collectionLabel+"eta"]->Fill(tk->eta()); }
400  if(mapME[collectionLabel+"phi"]) { mapME[collectionLabel+"phi"]->Fill(tk->phi()); }
401  if(mapME[collectionLabel+"etaphi"]){ mapME[collectionLabel+"etaphi"]->Fill(tk->phi(),tk->eta()); }
402  if(mapME[collectionLabel+"etapt"]){ mapME[collectionLabel+"etapt"]->Fill(tk->pt(),tk->eta()); }
403  if(mapME[collectionLabel+"charge"]){ mapME[collectionLabel+"charge"]->Fill(tk->charge()); }
404 
405  // if(mapME[collectionLabel+"dxy"]){ mapME[collectionLabel+"dxy"]->Fill(tk->dxy(BSPosition_)); }
406 // if(mapME[collectionLabel+"dz"]){ mapME[collectionLabel+"dz"]->Fill(tk->dz(BSPosition_)); }
407 
408 // if(mapME[collectionLabel+"validhits"]) { mapME[collectionLabel+"validhits"]->Fill(tk->numberOfValidHits()); }
409 // if(mapME[collectionLabel+"normchi"]){ mapME[collectionLabel+"normchi"]->Fill(tk->normalizedChi2()); }
410  }
411  if(mapME[collectionLabel+"nrcand"]){ mapME[collectionLabel+"nrcand"]->Fill(num);}
412 
413  }
414 }
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:13
bool isValid() const
Definition: HandleBase.h:76
void HLTOniaSource::fillOniaTriggerMEs ( std::vector< reco::RecoChargedCandidateRef > &  candidateVector,
std::string  collectionLabel,
std::map< std::string, MonitorElement * > &  mapME 
)
private

Definition at line 417 of file HLTOniaSource.cc.

References reco::LeafCandidate::charge(), reco::LeafCandidate::eta(), i, reco::LeafCandidate::p(), reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

417  {
418 
419  for (unsigned int i=0; i!=candidateVector.size(); i++) {
420  reco::RecoChargedCandidate tk = (*candidateVector[i]);
421 
422  //Fill MEs
423  if(mapME[collectionLabel+"pt"]){ mapME[collectionLabel+"pt"]->Fill(tk.pt()); }
424  if(mapME[collectionLabel+"p"]) { mapME[collectionLabel+"p"]->Fill(tk.p()); }
425  if(mapME[collectionLabel+"eta"]) { mapME[collectionLabel+"eta"]->Fill(tk.eta()); }
426  if(mapME[collectionLabel+"phi"]) { mapME[collectionLabel+"phi"]->Fill(tk.phi()); }
427  if(mapME[collectionLabel+"etaphi"]){ mapME[collectionLabel+"etaphi"]->Fill(tk.phi(),tk.eta()); }
428  if(mapME[collectionLabel+"etapt"]){ mapME[collectionLabel+"etapt"]->Fill(tk.pt(),tk.eta()); }
429  if(mapME[collectionLabel+"charge"]){ mapME[collectionLabel+"charge"]->Fill(tk.charge()); }
430 
431  // if(mapME[collectionLabel+"dxy"]){ mapME[collectionLabel+"dxy"]->Fill(tk.dxy(BSPosition_)); }
432 // if(mapME[collectionLabel+"dz"]){ mapME[collectionLabel+"dz"]->Fill(tk.dz(BSPosition_)); }
433 
434 // if(mapME[collectionLabel+"validhits"]) { mapME[collectionLabel+"validhits"]->Fill(tk.numberOfValidHits()); }
435 // if(mapME[collectionLabel+"normchi"]){ mapME[collectionLabel+"normchi"]->Fill(tk.normalizedChi2()); }
436  }
437 
438  if(mapME[collectionLabel+"nrcand"]){ mapME[collectionLabel+"nrcand"]->Fill( candidateVector.size());}
439 }
int i
Definition: DBlmapReader.cc:9
virtual double p() const
magnitude of momentum vector
virtual float pt() const
transverse momentum
virtual float phi() const
momentum azimuthal angle
virtual float eta() const
momentum pseudorapidity
virtual int charge() const
electric charge

Member Data Documentation

edm::InputTag HLTOniaSource::beamSpotTag_
private

Definition at line 64 of file HLTOniaSource.h.

Referenced by analyze(), and HLTOniaSource().

edm::EDGetTokenT<reco::BeamSpot> HLTOniaSource::beamSpotToken_
private

Definition at line 78 of file HLTOniaSource.h.

Referenced by analyze(), and HLTOniaSource().

reco::BeamSpot::Point HLTOniaSource::BSPosition_
private

Definition at line 41 of file HLTOniaSource.h.

Referenced by analyze().

DQMStore* HLTOniaSource::dbe_
private
bool HLTOniaSource::hltConfigInit_
private

Definition at line 73 of file HLTOniaSource.h.

Referenced by analyze(), and beginRun().

std::string HLTOniaSource::hltProcessName_
private

Definition at line 56 of file HLTOniaSource.h.

Referenced by beginRun(), and HLTOniaSource().

std::map<std::string, MonitorElement *> HLTOniaSource::massME_
private

Definition at line 72 of file HLTOniaSource.h.

Referenced by beginRun(), bookOniaTriggerInvariantMassMEs(), and fillInvariantMass().

std::map<std::string, MonitorElement *> HLTOniaSource::muonME_
private

Definition at line 70 of file HLTOniaSource.h.

Referenced by analyze(), and beginRun().

std::vector<edm::InputTag> HLTOniaSource::oniaMuonTag_
private

Definition at line 59 of file HLTOniaSource.h.

Referenced by analyze(), beginRun(), and HLTOniaSource().

std::map<std::string, MonitorElement *> HLTOniaSource::pixelAfterFilterME_
private

Definition at line 67 of file HLTOniaSource.h.

Referenced by analyze(), and beginRun().

std::map<std::string, MonitorElement *> HLTOniaSource::pixelME_
private

Definition at line 69 of file HLTOniaSource.h.

Referenced by analyze(), and beginRun().

edm::InputTag HLTOniaSource::pixelTag_
private

Definition at line 63 of file HLTOniaSource.h.

Referenced by analyze(), beginRun(), and HLTOniaSource().

std::vector<edm::InputTag> HLTOniaSource::pixelTagsAfterFilter_
private

Definition at line 60 of file HLTOniaSource.h.

Referenced by analyze(), beginRun(), and HLTOniaSource().

edm::EDGetTokenT<reco::TrackCollection> HLTOniaSource::pixelToken_
private

Definition at line 76 of file HLTOniaSource.h.

Referenced by analyze(), and HLTOniaSource().

std::string HLTOniaSource::subsystemFolder_
private

Definition at line 55 of file HLTOniaSource.h.

Referenced by beginRun(), and HLTOniaSource().

std::map<std::string, MonitorElement *> HLTOniaSource::trackAfterFilterME_
private

Definition at line 68 of file HLTOniaSource.h.

Referenced by analyze(), and beginRun().

std::map<std::string, MonitorElement *> HLTOniaSource::trackME_
private

Definition at line 71 of file HLTOniaSource.h.

Referenced by analyze(), and beginRun().

edm::InputTag HLTOniaSource::trackTag_
private

Definition at line 65 of file HLTOniaSource.h.

Referenced by analyze(), beginRun(), and HLTOniaSource().

std::vector<edm::InputTag> HLTOniaSource::trackTagsAfterFilter_
private

Definition at line 61 of file HLTOniaSource.h.

Referenced by analyze(), beginRun(), and HLTOniaSource().

edm::EDGetTokenT<reco::RecoChargedCandidateCollection> HLTOniaSource::trackToken_
private

Definition at line 77 of file HLTOniaSource.h.

Referenced by analyze(), and HLTOniaSource().

std::vector< std::string> HLTOniaSource::triggerPath_
private

Definition at line 58 of file HLTOniaSource.h.

Referenced by checkHLTConfiguration(), and HLTOniaSource().

edm::InputTag HLTOniaSource::triggerSummaryRAWTag_
private

Definition at line 62 of file HLTOniaSource.h.

Referenced by analyze(), and HLTOniaSource().

edm::EDGetTokenT<trigger::TriggerEventWithRefs> HLTOniaSource::triggerSummaryRAWToken_
private

Definition at line 79 of file HLTOniaSource.h.

Referenced by analyze(), and HLTOniaSource().