CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GenPurposeSkimmerData.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: GenPurposeSkimmerData
4 // Class: GenPurposeSkimmerData
5 //
40 //
41 // Original Author: Nikolaos Rompotis
42 // Created: Thu Oct 16 17:11:55 CEST 2008
43 //
44 //
45 
47 
48 //
49 //
50 //
55 //
56 //
58 
59 {
60 //
61 // I N P U T P A R A M E T E R S
62 //
63  // output file name
64  outputFile_ = ps.getUntrackedParameter<std::string>("outputfile");
65  //
66  // Electron Collection
68  //
69  // MC:
70  //MCCollection_ = ps.getUntrackedParameter<edm::InputTag>("MCCollection");
71  //MCMatch_Deta_ = ps.getUntrackedParameter<double>("MCMatch_Deta",0.1);
72  //MCMatch_Dphi_ = ps.getUntrackedParameter<double>("MCMatch_Dphi",0.35);
73  //
74  // MET Collections:
75  MetCollectionTag_ = ps.getUntrackedParameter<edm::InputTag>("MetCollectionTag");
76  mcMetCollectionTag_ = ps.getUntrackedParameter<edm::InputTag>("mcMetCollectionTag");
77  t1MetCollectionTag_ = ps.getUntrackedParameter<edm::InputTag>("t1MetCollectionTag");
78  pfMetCollectionTag_ = ps.getUntrackedParameter<edm::InputTag>("pfMetCollectionTag");
79  tcMetCollectionTag_ = ps.getUntrackedParameter<edm::InputTag>("tcMetCollectionTag");
80  // genMetCollectionTag_ = ps.getUntrackedParameter<edm::InputTag>("genMetCollectionTag");
81  //
82  // HLT parameters:
83  // allow info for 2 paths and 2 filters
84  // ---------------------------------------------------------------------------
85  HLTCollectionE29_= ps.getUntrackedParameter<edm::InputTag>("HLTCollectionE29");
86  HLTCollectionE31_= ps.getUntrackedParameter<edm::InputTag>("HLTCollectionE31");
87  HLTTriggerResultsE29_ = ps.getUntrackedParameter<edm::InputTag>("HLTTriggerResultsE29");
88  HLTTriggerResultsE31_ = ps.getUntrackedParameter<edm::InputTag>("HLTTriggerResultsE31");
89  //HLTPath_ = ps.getUntrackedParameter<std::string>("HLTPath","HLT_Ele15_LW_L1R");
90  //HLTFilterType_ =ps.getUntrackedParameter<edm::InputTag>("HLTFilterType");
91  //
92  // matching HLT objects to electrons
93  ProbeHLTObjMaxDR= ps.getUntrackedParameter<double>("ProbeHLTObjMaxDR",0.2);
94  //
95  // ----------------------------------------------------------------------------
96  //
97  // detector geometry
98  //
99  BarrelMaxEta = ps.getUntrackedParameter<double>("BarrelMaxEta");
100  EndcapMinEta = ps.getUntrackedParameter<double>("EndcapMinEta");
101  EndcapMaxEta = ps.getUntrackedParameter<double>("EndcapMaxEta");
102  //
103  ctfTracksTag_ = ps.getUntrackedParameter<edm::InputTag>("ctfTracksTag");
104  corHybridsc_ = ps.getUntrackedParameter<edm::InputTag>("corHybridsc");
105  multi5x5sc_ = ps.getUntrackedParameter<edm::InputTag>("multi5x5sc");
106 
107 }
108 
109 
111 {
112 
113  // do anything here that needs to be done at desctruction time
114  // (e.g. close files, deallocate resources etc.)
115 
116 }
117 
118 
119 //
120 // member functions
121 //
122 
123 // ------------ method called to for each event ------------
124 void
126 {
127  // MC Collection ------------------------------------------------
128 
129  // edm::Handle<reco::GenParticleCollection> pGenPart;
130  // evt.getByLabel(MCCollection_, pGenPart);
131  // if ( not pGenPart.isValid() ) {
132  // std::cout <<"Error! Can't get "<<MCCollection_.label() << std::endl;
133  // return;
134  // }
135 
136  // const reco::GenParticleCollection *McCand = pGenPart.product();
137 
138  // GsF Electron Collection ---------------------------------------
140 
141  try{
142  evt.getByLabel(ElectronCollection_, pElectrons);
143  }
144  catch (cms::Exception)
145  {
146  edm::LogError("")<< "Error! Can't get ElectronCollection by label. ";
147  }
148  // ***********************************************************************
149  // check which trigger has accepted the event ****************************
150  // ***********************************************************************
151  //
152  // path allocation: first 10 paths belong to the low lum menu, the rest
153  // in the high lum one
154  //
155  // Low Luminosity Menu (8e29)
156  //
157  /*
158  edm::Handle<edm::TriggerResults> HLTResultsE29;
159  evt.getByLabel(HLTTriggerResultsE29_, HLTResultsE29);
160  if (not HLTResultsE29.isValid()) {
161  std::cout << "HLT Results with label: " << HLTTriggerResultsE29_
162  << " not found" << std::endl;
163  return;
164  }
165  //
166  edm::Handle<trigger::TriggerEvent> pHLTe29;
167  evt.getByLabel(HLTCollectionE29_, pHLTe29);
168  if (not pHLTe29.isValid()) {
169  std::cout << "HLT Results with label: " << HLTCollectionE29_
170  << " not found" << std::endl;
171  return;
172  }
173  //
174  int sum = 0;
175  //
176  for (int iT=0; iT<10; ++iT) {
177  event_HLTPath[iT] = 0;
178  numberOfHLTFilterObjects[iT] =0;
179  //
180  const edm::TriggerNames & triggerNames = evt.triggerNames(*HLTResultsE29);
181  unsigned int trigger_size = HLTResultsE29->size();
182  unsigned int trigger_position = triggerNames.triggerIndex(HLTPath_[iT]);
183  if (trigger_position < trigger_size )
184  event_HLTPath[iT] = (int) HLTResultsE29->accept(trigger_position);
185  //
186  numberOfHLTFilterObjects[iT] = 0;
187  // check explicitly that the filter is there
188  const int nF(pHLTe29->sizeFilters());
189  const int filterInd = pHLTe29->filterIndex(HLTFilterType_[iT]);
190  if (nF != filterInd) {
191  const trigger::Vids& VIDS (pHLTe29->filterIds(filterInd));
192  const trigger::Keys& KEYS(pHLTe29->filterKeys(filterInd));
193  const int nI(VIDS.size());
194  const int nK(KEYS.size());
195  numberOfHLTFilterObjects[iT] = (nI>nK)? nI:nK;
196  }
197  //if (iT==2) // HLT_Ele15_LW_L1R only this trigger is required
198  sum += numberOfHLTFilterObjects[iT];
199  }
200  //
201  // High Luminosity Menu (1e31) DISABLED - only low lumi level
202  //
203  edm::Handle<edm::TriggerResults> HLTResultsE31;
204  evt.getByLabel(HLTTriggerResultsE31_, HLTResultsE31);
205  if (not HLTResultsE31.isValid()) {
206  std::cout << "HLT Results with label: " << HLTTriggerResultsE31_
207  << " not found" << std::endl;
208  return;
209  }
211  edm::Handle<trigger::TriggerEvent> pHLTe31;
212  evt.getByLabel(HLTCollectionE31_, pHLTe31);
213  if (not pHLTe31.isValid()) {
214  std::cout << "HLT Results with label: " << HLTCollectionE31_
215  << " not found" << std::endl;
216  return;
217  }
219  for (int iT=10; iT<25; ++iT) {
220  event_HLTPath[iT] = 0;
221  numberOfHLTFilterObjects[iT] =0;
222  //
223  const edm::TriggerNames & triggerNames = evt.triggerNames(*HLTResultsE31);
224  unsigned int trigger_size = HLTResultsE31->size();
225  unsigned int trigger_position = triggerNames.triggerIndex(HLTPath_[iT]);
226  if (trigger_position < trigger_size )
227  event_HLTPath[iT] = (int) HLTResultsE31->accept(trigger_position);
228  //
229  numberOfHLTFilterObjects[iT] = 0;
230  // check explicitly that the filter is there
231  const int nF(pHLTe31->sizeFilters());
232  const int filterInd = pHLTe31->filterIndex(HLTFilterType_[iT]);
233  if (nF != filterInd) {
234  const trigger::Vids& VIDS (pHLTe31->filterIds(filterInd));
235  const trigger::Keys& KEYS(pHLTe31->filterKeys(filterInd));
236  const int nI(VIDS.size());
237  const int nK(KEYS.size());
238  numberOfHLTFilterObjects[iT] = (nI>nK)? nI:nK;
239  }
240  // not needed
241  sum += numberOfHLTFilterObjects[iT];
242  }
243  if (sum == 0) {
244  //std::cout << "No trigger found in this event..." << std::endl;
245  return;
246  }
247  */
248  //std::cout << "HLT objects: #" << sum << std::endl;
249  // print out the triggers that exist in this event
250  // comment this out if you want to see the names of the existing triggers
252  evt.getByLabel(HLTCollectionE29_, pHLTe29);
253  if (not pHLTe29.isValid()){
254  std::cout << "Error!!! HLT is missing!" << std::endl;
255  return;
256  } /*
257  else {
258  // check explicitly that the filter is there
259  const int nF(pHLTe29->sizeFilters());
260  for (int filterInd=0; filterInd< nF; ++filterInd) {
261  const trigger::Vids& VIDS (pHLTe29->filterIds(filterInd));
262  const trigger::Keys& KEYS(pHLTe29->filterKeys(filterInd));
263  const int nI(VIDS.size());
264  const int nK(KEYS.size());
265  int nObjects = (nI>nK)? nI:nK;
266  const edm::InputTag filterTag = pHLTe29->filterTag(filterInd);
267  std::cout << "Found filter with name " << filterTag
268  << " and #objects: #" << nObjects << std::endl;
269  }
270  }
271  */
272  // *********************************************************************
273  // MET Collections:
274  //
276  evt.getByLabel(MetCollectionTag_, caloMET);
277  //
279  evt.getByLabel(t1MetCollectionTag_, t1MET);
280  //
282  evt.getByLabel(mcMetCollectionTag_, mcMET);
283  //
285  evt.getByLabel(tcMetCollectionTag_, tcMET);
286  //
288  evt.getByLabel(pfMetCollectionTag_, pfMET);
289  //
290  // edm::Handle<reco::GenMETCollection> genMET;
291  // evt.getByLabel(genMetCollectionTag_, genMET);
292  //
293  // initialize the MET variables ........................................
294  event_MET = -99.; event_MET_phi = -99.; event_MET_sig = -99.;
295  event_mcMET = -99.; event_mcMET_phi = -99.; event_mcMET_sig = -99.;
296  event_tcMET = -99.; event_tcMET_phi = -99.; event_tcMET_sig = -99.;
297  event_pfMET = -99.; event_pfMET_phi = -99.; event_pfMET_sig = -99.;
298  event_t1MET = -99.; event_t1MET_phi = -99.; event_t1MET_sig = -99.;
299  //
300  //event_genMET = -99.; event_genMET_phi= -99.; event_genMET_sig = -99.;
301  //
302  // get the values, if they are available
303  if ( caloMET.isValid() ) {
304  const reco::CaloMETRef MET(caloMET, 0);
305  event_MET = MET->et(); event_MET_phi = MET->phi();
306  event_MET_sig = MET->mEtSig();
307  }
308  else {
309  std::cout << "caloMET not valid: input Tag: " << MetCollectionTag_
310  << std::endl;
311  }
312  if ( tcMET.isValid() ) {
313  const reco::METRef MET(tcMET, 0);
314  event_tcMET = MET->et(); event_tcMET_phi = MET->phi();
315  event_tcMET_sig = MET->mEtSig();
316  }
317  if ( pfMET.isValid() ) {
318  const reco::PFMETRef MET(pfMET, 0);
319  event_pfMET = MET->et(); event_pfMET_phi = MET->phi();
320  event_pfMET_sig = MET->mEtSig();
321  }
322  if ( t1MET.isValid() ) {
323  const pat::METRef MET(t1MET, 0);
324  event_t1MET = MET->et(); event_t1MET_phi = MET->phi();
325  event_t1MET_sig = MET->mEtSig();
326  }
327  if ( mcMET.isValid() ) {
328  const pat::METRef MET(mcMET, 0);
329  event_mcMET = MET->et(); event_mcMET_phi = MET->phi();
330  event_mcMET_sig = MET->mEtSig();
331  }
332 
333  // if ( genMET.isValid() ) {
334  // const reco::GenMETRef MET(genMET, 0);
335  // event_genMET = MET->et(); event_genMET_phi = MET->phi();
336  // event_genMET_sig = MET->mEtSig();
337  // }
338 
339  // std::cout << "t1MET: " << event_t1MET << " twikiT1MET: "
340  // << event_twikiT1MET << ", calo="<<event_MET << std::endl;
341  //
342  // some supercluster collections ...........................................
343  // correcyedHybridSuperClusters
344  //InputTag corHybridsc("correctedHybridSuperClusters","",InputTagEnding_);
346  evt.getByLabel(corHybridsc_,SC1);
347  const reco::SuperClusterCollection *sc1 = SC1.product();
348  // multi5x5SuperClustersWithPreshower
349  //edm::InputTag multi5x5sc("multi5x5SuperClustersWithPreshower",
350  // "", InputTagEnding_);
352  evt.getByLabel(multi5x5sc_,SC2);
353  const reco::SuperClusterCollection *sc2 = SC2.product();
354  //
355  const int n1 = sc1->size();
356  const int n2 = sc2->size();
357  //std::cout << "SC found: hybrid: " << n1 << ", multi5x5: "
358  // << n2 << std::endl;
359  // keep details of the 5 highest ET superclusters
360  for (int i=0; i<5; ++i) {
361  sc_hybrid_et[i] = -9999.;
362  sc_hybrid_eta[i] = -9999.;
363  sc_hybrid_phi[i] = -9999.;
364  //
365  sc_multi5x5_et[i] = -9999.;
366  sc_multi5x5_eta[i] = -9999.;
367  sc_multi5x5_phi[i] = -9999.;
368  //
369  }
370  // sort the energies of the first sc
371  std::vector<double> ETsc1;
372  std::vector<reco::SuperCluster>::const_iterator sc;
373  for (sc = sc1->begin(); sc != sc1->end(); ++sc) {
374  reco::SuperCluster mySc = *sc;
375  double scEt = mySc.energy()/(cosh(mySc.eta()));
376  ETsc1.push_back(scEt);
377 
378  }
379  int *sorted1 = new int[n1];
380  double *et1 = new double[n1];
381  for (int i=0; i<n1; ++i) {
382  et1[i] = ETsc1[i];
383  }
384  // array sorted now has the indices of the highest ET electrons
385  TMath::Sort(n1, et1, sorted1, true);
386  // .........................................................................
387  std::vector<double> ETsc2;
388  for (sc = sc2->begin(); sc != sc2->end(); ++sc) {
389  reco::SuperCluster mySc = *sc;
390  double scEt = mySc.energy()/(cosh(mySc.eta()));
391  ETsc2.push_back(scEt);
392 
393  }
394  int *sorted2 = new int[n2];
395  double *et2 = new double[n2];
396  for (int i=0; i<n2; ++i) {
397  et2[i] = ETsc2[i];
398  }
399  // array sorted now has the indices of the highest ET electrons
400  TMath::Sort(n2, et2, sorted2, true);
401  //
402  //
403  for( int probeSc = 0; probeSc < n1; ++probeSc)
404  {
405  //std::cout<<"sorted["<< probeIt<< "]=" << sorted[probeIt] << std::endl;
406  // break if you have more than the appropriate number of electrons
407  if (probeSc >= 5) break;
408  //
409  int sc_index = sorted1[probeSc];
410  std::vector<reco::SuperCluster>::const_iterator
411  Rprobe = sc1->begin() + sc_index;
412  //
413  reco::SuperCluster sc0 = *Rprobe;
414  // now keep the relevant stuff:
415  sc_hybrid_et[probeSc] = sc0.energy()/(cosh(sc0.eta()));
416  sc_hybrid_eta[probeSc] = sc0.eta();
417  sc_hybrid_phi[probeSc] = sc0.phi();
418  }
419  // .........................................................................
420  for( int probeSc = 0; probeSc < n2; ++probeSc)
421  {
422  //std::cout<<"sorted["<< probeIt<< "]=" << sorted[probeIt] << std::endl;
423  // break if you have more than the appropriate number of electrons
424  if (probeSc >= 5) break;
425  //
426  int sc_index = sorted2[probeSc];
427  std::vector<reco::SuperCluster>::const_iterator
428  Rprobe = sc2->begin() + sc_index;
429  //
430  reco::SuperCluster sc0 = *Rprobe;
431  // now keep the relevant stuff:
432  sc_multi5x5_et[probeSc] = sc0.energy()/(cosh(sc0.eta()));
433  sc_multi5x5_eta[probeSc] = sc0.eta();
434  sc_multi5x5_phi[probeSc] = sc0.phi();
435  }
436  delete [] sorted1; delete [] sorted2;
437  delete [] et1; delete [] et2;
439  // edm::InputTag ctfTracksTag("generalTracks", "", InputTagEnding_);
441  evt.getByLabel(ctfTracksTag_, ctfTracks);
442  const reco::TrackCollection *ctf = ctfTracks.product();
443  reco::TrackCollection::const_iterator tr;
444  const int ntracks = ctf->size();
445  //
446  // get the beam spot for the parameter of the track
447  edm::Handle<reco::BeamSpot> pBeamSpot;
448  evt.getByLabel("offlineBeamSpot", pBeamSpot);
449  const reco::BeamSpot *bspot = pBeamSpot.product();
450  const math::XYZPoint bspotPosition = bspot->position();
451  //
452  for (int i=0; i<20; ++i) {
453  ctf_track_pt[i] = -9999.;
454  ctf_track_eta[i] = -9999.;
455  ctf_track_phi[i] = -9999.;
456  ctf_track_vx[i] = -9999.; ctf_track_vy[i]=-9999.; ctf_track_vz[i] =-9999.;
457  ctf_track_tip[i] = -9999.; ctf_track_tip_bs[i] = -9999.;
458  }
459  //
460  std::vector<double> ETtrack;
461  for (tr = ctf->begin(); tr != ctf->end(); ++tr) {
462  reco::Track mySc = *tr;
463  double scEt = mySc.pt();
464  ETtrack.push_back(scEt);
465  }
466  int *sortedTr = new int[ntracks];
467  double *etTr = new double[ntracks];
468  for (int i=0; i<ntracks; ++i) {
469  etTr[i] = ETtrack[i];
470  }
471  // array sorted now has the indices of the highest ET electrons
472  TMath::Sort(ntracks, etTr, sortedTr, true);
473  //
474  for( int probeSc = 0; probeSc < ntracks; ++probeSc)
475  {
476  //std::cout<<"sorted["<< probeIt<< "]=" << sorted[probeIt] << std::endl;
477  // break if you have more than the appropriate number of electrons
478  if (probeSc >= 20) break;
479  //
480  int sc_index = sortedTr[probeSc];
481  std::vector<reco::Track>::const_iterator
482  Rprobe = ctf->begin() + sc_index;
483  //
484  reco::Track sc0 = *Rprobe;
485  // now keep the relevant stuff:
486  ctf_track_pt[probeSc] = sc0.pt();
487  ctf_track_eta[probeSc] = sc0.eta();
488  ctf_track_phi[probeSc] = sc0.phi();
489  ctf_track_vx[probeSc] = sc0.vx();
490  ctf_track_vy[probeSc] = sc0.vy();
491  ctf_track_vz[probeSc] = sc0.vz();
492  ctf_track_tip[probeSc] = -sc0.dxy();
493  ctf_track_tip_bs[probeSc] = -sc0.dxy(bspotPosition);
494  }
495  delete [] sortedTr; delete [] etTr;
496  //
497  // keep 4 of the selectedLayer1Muons for reference
499  evt.getByLabel("selectedLayer1Muons", pMuons);
500  const pat::MuonCollection *pmuon = pMuons.product();
501  pat::MuonCollection::const_iterator muon;
502  const int nmuons = pMuons->size();
503  //
504  for (int i=0; i<4; ++i) {
505  muon_pt[i] = -9999.;
506  muon_eta[i] = -9999.;
507  muon_phi[i] = -9999.;
508  muon_vx[i] = -9999.; muon_vy[i] = -9999.; muon_vz[i] = -9999.;
509  muon_tip[i] = -9999.; muon_tip_bs[i] = -9999.;
510  }
511  //
512  std::vector<double> ETmuons;
513  for (muon = pmuon->begin(); muon != pmuon->end(); ++muon) {
514  pat::Muon mySc = *muon;
515  double scEt = mySc.track()->pt();
516  ETmuons.push_back(scEt);
517  }
518  int *sortedMu = new int[nmuons];
519  double *etMu = new double[nmuons];
520  for (int i=0; i<nmuons; ++i) {
521  etMu[i] = ETmuons[i];
522  }
523  // array sorted now has the indices of the highest ET electrons
524  TMath::Sort(nmuons, etMu, sortedMu, true);
525  //
526  for( int probeSc = 0; probeSc < nmuons; ++probeSc)
527  {
528  //std::cout<<"sorted["<< probeIt<< "]=" << sorted[probeIt] << std::endl;
529  // break if you have more than the appropriate number of electrons
530  if (probeSc >= 4) break;
531  //
532  int sc_index = sortedMu[probeSc];
533  std::vector<pat::Muon>::const_iterator
534  Rprobe = pmuon->begin() + sc_index;
535  //
536  pat::Muon sc0 = *Rprobe;
537  // now keep the relevant stuff:
538  muon_pt[probeSc] = sc0.track()->pt();
539  muon_eta[probeSc] = sc0.track()->eta();
540  muon_phi[probeSc] = sc0.track()->phi();
541  muon_vx[probeSc] = sc0.track()->vx();
542  muon_vy[probeSc] = sc0.track()->vy();
543  muon_vz[probeSc] = sc0.track()->vz();
544  muon_tip[probeSc] = -sc0.track()->dxy();
545  muon_tip_bs[probeSc] = -sc0.track()->dxy(bspotPosition);
546  }
547  delete [] sortedMu; delete [] etMu;
548  //
549  if (n1+n2+ntracks == 0) {
550  std::cout << "Return: no sc in this event" << std::endl;
551  return;
552  }
553  // /////////////////////////////////////////////////////////////////////////
554  // electron details
556  const int MAX_PROBES = 4;
557  for(int i =0; i < MAX_PROBES; i++){
558  probe_ele_eta_for_tree[i] = -99.0;
559  probe_ele_et_for_tree[i] = -99.0;
560  probe_ele_phi_for_tree[i] = -99.0;
561  probe_ele_Xvertex_for_tree[i] = -99.0;
562  probe_ele_Yvertex_for_tree[i] = -99.0;
563  probe_ele_Zvertex_for_tree[i] = -99.0;
564  probe_ele_tip[i] = -999.;
565 
566  probe_sc_eta_for_tree[i] = -99.0;
567  probe_sc_et_for_tree[i] = -99.0;
568  probe_sc_phi_for_tree[i] = -99.0;
569 
570  probe_charge_for_tree[i] = -99;
573  //
574  // probe isolation values ............
575  probe_isolation_value[i] = 999.0;
576  probe_iso_user[i] = 999.0;
578  probe_ecal_iso_user[i] = 999;
580  probe_hcal_iso_user[i] = 999;
581 
582  probe_ele_hoe[i] = 999.;
583  probe_ele_shh[i] = 999.;
584  probe_ele_sihih[i] = 999.;
585  probe_ele_dhi[i] = 999.;
586  probe_ele_dfi[i] = 999.;
587  probe_ele_eop[i] = 999.;
588  probe_ele_pin[i] = 999.;
589  probe_ele_pout[i] = 999.;
590  probe_ele_e5x5[i] = 999.;
591  probe_ele_e2x5[i] = 999.;
592  probe_ele_e1x5[i] = 999.;
593 
594  //
595  //
596  //for (int j=0; j<25; ++j) {
597  // probe_pass_trigger_cut[i][j]=0;
598  //}
599  //probe_hlt_matched_dr[i]=0;
600  //probe_mc_matched[i] = 0;
601  //probe_mc_matched_deta[i] = 999.;
602  //probe_mc_matched_dphi[i] = 999.;
603  //probe_mc_matched_denergy[i] = 999.;
604  //probe_mc_matched_mother[i] = 999;
605  //
606  //
607  }
608  const pat::ElectronCollection *electrons= pElectrons.product();
609 
610 
611  elec_number_in_event = electrons->size();
612  //std::cout << "In this event " << elec_number_in_event <<
613  // " electrons were found" << std::endl;
614  // if (elec_number_in_event == 0) return;
615 
616  std::vector<pat::ElectronRef> UniqueElectrons;
617  // edm::LogInfo("") << "Starting loop over electrons.";
618  int index =0;
619  //***********************************************************************
620  // NEW METHOD by D WARDROPE implemented 26.05.08 ************************
621  //************* DUPLICATE ****** REMOVAL *******************************
622  // 02.06.08: due to a bug in the hybrid algorithm that affects detid ****
623  // we change detid matching to superCluster ref matching ******
624  for(pat::ElectronCollection::const_iterator
625  elec = electrons->begin(); elec != electrons->end();++elec) {
626  const pat::ElectronRef electronRef(pElectrons, index);
627  //Remove duplicate electrons which share a supercluster
628  pat::ElectronCollection::const_iterator BestDuplicate = elec;
629  int index2 = 0;
630  for(pat::ElectronCollection::const_iterator
631  elec2 = electrons->begin();
632  elec2 != electrons->end(); ++elec2)
633  {
634  if(elec != elec2)
635  {
636  if( elec->superCluster() == elec2->superCluster())
637  {
638  if(fabs(BestDuplicate->eSuperClusterOverP()-1.)
639  >= fabs(elec2->eSuperClusterOverP()-1.))
640  {
641  BestDuplicate = elec2;
642  }
643  }
644  }
645  ++index2;
646  }
647  if(BestDuplicate == elec) UniqueElectrons.push_back(electronRef);
648  ++index;
649  }
650  //
651  // debugging: store electrons after duplicate removal
652  elec_1_duplicate_removal = UniqueElectrons.size();
653  //std::cout << "In this event there are " << elec_1_duplicate_removal
654  // << " electrons" << std::endl;
655  //
656  //
657  // duplicate removal is done now:
658  // the electron collection is in UniqueElectrons
659  //
660  // run over probes - now probe electrons and store
661  //
662  // the electron collection is now
663  // vector<reco::PixelMatchGsfElectronRef> UniqueElectrons
664  std::vector<double> ETs;
665  std::vector<pat::ElectronRef>::const_iterator elec;
666  for (elec = UniqueElectrons.begin(); elec != UniqueElectrons.end(); ++elec) {
667  pat::ElectronRef probeEle;
668  probeEle = *elec;
669  double probeEt = probeEle->caloEnergy()/(cosh(probeEle->caloPosition().eta()));
670  ETs.push_back(probeEt);
671 
672  }
673  int *sorted = new int[elec_1_duplicate_removal];
674  double *et = new double[elec_1_duplicate_removal];
675  //std::cout << "Elecs: " << elec_1_duplicate_removal << std::endl;
676  for (int i=0; i<elec_1_duplicate_removal; ++i) {
677  et[i] = ETs[i];
678  //std::cout << "et["<< i << "]=" << et[i] << std::endl;
679  }
680  // array sorted now has the indices of the highest ET electrons
681  TMath::Sort(elec_1_duplicate_removal, et, sorted, true);
682  //
683  //
684  for( int probeIt = 0; probeIt < elec_1_duplicate_removal; ++probeIt)
685  {
686  //std::cout<<"sorted["<< probeIt<< "]=" << sorted[probeIt] << std::endl;
687  // break if you have more than the appropriate number of electrons
688  if (probeIt >= MAX_PROBES) break;
689  //
690  int elec_index = sorted[probeIt];
691  std::vector<pat::ElectronRef>::const_iterator
692  Rprobe = UniqueElectrons.begin() + elec_index;
693  //
694  pat::ElectronRef probeEle;
695  probeEle = *Rprobe;
696  double probeEt = probeEle->caloEnergy()/(cosh(probeEle->caloPosition().eta()));
697  probe_sc_eta_for_tree[probeIt] = probeEle->caloPosition().eta();
698  probe_sc_phi_for_tree[probeIt] = probeEle->caloPosition().phi();
699  probe_sc_et_for_tree[probeIt] = probeEt;
700  // fiducial cut ...............................
701  if(fabs(probeEle->caloPosition().eta()) < BarrelMaxEta ||
702  (fabs(probeEle->caloPosition().eta()) > EndcapMinEta &&
703  fabs(probeEle->caloPosition().eta()) < EndcapMaxEta)){
704  probe_sc_pass_fiducial_cut[probeIt] = 1;
705  }
706  //
707  probe_charge_for_tree[probeIt] = probeEle->charge();
708  probe_ele_eta_for_tree[probeIt] = probeEle->eta();
709  probe_ele_et_for_tree[probeIt] = probeEle->et();
710  probe_ele_phi_for_tree[probeIt] =probeEle->phi();
711  probe_ele_Xvertex_for_tree[probeIt] =probeEle->vx();
712  probe_ele_Yvertex_for_tree[probeIt] =probeEle->vy();
713  probe_ele_Zvertex_for_tree[probeIt] =probeEle->vz();
715  probeEle->classification();
716  double ProbeTIP = probeEle->gsfTrack()->d0();
717  probe_ele_tip[probeIt] = ProbeTIP;
718  // isolation ..................................
719  // these are the default values: trk 03, ecal, hcal 04
720  // I know that there is a more direct way, but in this way it
721  // is clearer what you get each time :P
722  probe_isolation_value[probeIt] = probeEle->dr03IsolationVariables().tkSumPt;
723  probe_ecal_isolation_value[probeIt] = probeEle->dr04IsolationVariables().ecalRecHitSumEt;
724  probe_hcal_isolation_value[probeIt] =
725  probeEle->dr04IsolationVariables().hcalDepth1TowerSumEt +
726  probeEle->dr04IsolationVariables().hcalDepth2TowerSumEt;
727  // one extra isos:
728  probe_iso_user[probeIt] = probeEle->dr04IsolationVariables().tkSumPt;
729  probe_ecal_iso_user[probeIt] = probeEle->dr03IsolationVariables().ecalRecHitSumEt;
730  probe_hcal_iso_user[probeIt] =
731  probeEle->dr03IsolationVariables().hcalDepth1TowerSumEt +
732  probeEle->dr03IsolationVariables().hcalDepth2TowerSumEt;
733  // ele id variables
734  double hOverE = probeEle->hadronicOverEm();
735  double deltaPhiIn = probeEle->deltaPhiSuperClusterTrackAtVtx();
736  double deltaEtaIn = probeEle->deltaEtaSuperClusterTrackAtVtx();
737  double eOverP = probeEle->eSuperClusterOverP();
738  double pin = probeEle->trackMomentumAtVtx().R();
739  double pout = probeEle->trackMomentumOut().R();
740  double sigmaee = probeEle->scSigmaEtaEta();
741  double sigma_IetaIeta = probeEle->scSigmaIEtaIEta();
742  // correct if in endcaps
743  if( fabs (probeEle->caloPosition().eta()) > 1.479 ) {
744  sigmaee = sigmaee - 0.02*(fabs(probeEle->caloPosition().eta()) -2.3);
745  }
746  //
747  //double e5x5, e2x5Right, e2x5Left, e2x5Top, e2x5Bottom, e1x5;
748  double e5x5, e2x5, e1x5;
749  e5x5 = probeEle->scE5x5();
750  e1x5 = probeEle->scE1x5();
751  e2x5 = probeEle->scE2x5Max();
752  //
753  // electron ID variables
754  probe_ele_hoe[probeIt] = hOverE;
755  probe_ele_shh[probeIt] = sigmaee;
756  probe_ele_sihih[probeIt] = sigma_IetaIeta;
757  probe_ele_dfi[probeIt] = deltaPhiIn;
758  probe_ele_dhi[probeIt] = deltaEtaIn;
759  probe_ele_eop[probeIt] = eOverP;
760  probe_ele_pin[probeIt] = pin;
761  probe_ele_pout[probeIt] = pout;
762  probe_ele_e5x5[probeIt] = e5x5;
763  probe_ele_e2x5[probeIt] = e2x5;
764  probe_ele_e1x5[probeIt] = e1x5;
765 
766  //
767  // HLT filter ------------------------------------------------------
768  //
769  //
770  // low luminosity filters
771  /*************************************************************
772  for (int filterNum=0; filterNum<10; ++filterNum) {
773  int trigger_int_probe = 0;
774 
775  //double hlt_matched_dr = -1.;
776  const int nF(pHLTe29->sizeFilters());
777  //
778  // default (tag) trigger filter
779  //
780  // find how many relevant
781  const int iF = pHLTe29->filterIndex(HLTFilterType_[filterNum]);
782  // loop over these objects to see whether they match
783  const trigger::TriggerObjectCollection& TOC(pHLTe29->getObjects());
784  if (nF != iF) {
785  // find how many objects there are
786  const trigger::Keys& KEYS(pHLTe29->filterKeys(iF));
787  const int nK(KEYS.size());
788  for (int iTrig = 0;iTrig <nK; ++iTrig ) {
789  const trigger::TriggerObject& TO(TOC[KEYS[iTrig]]);
790  //std::cout << "--> filter: "<< HLTFilterType_[filterNum] <<" TO id: " << TO.id() << std::endl;
791  // this is better to be left out: HLT matching is with an HLT object
792  // and we don't care what this object is
793  //if (abs(TO.id())==11 ) { // demand it to be an electron
794  double dr_ele_HLT =
795  reco::deltaR(probeEle->eta(), probeEle->phi(), TO.eta(), TO.phi());
796  if (fabs(dr_ele_HLT) < ProbeHLTObjMaxDR) {++trigger_int_probe;
797  //hlt_matched_dr = dr_ele_HLT;
798  }
799  //}
800  }
801  }
802  //
803  if(trigger_int_probe>0) probe_pass_trigger_cut[probeIt][filterNum] = 1;
804  //probe_hlt_matched_dr[probeIt] = hlt_matched_dr;
805  }
806  // high lumi filters
807  for (int filterNum=10; filterNum<25; ++filterNum) {
808  int trigger_int_probe = 0;
809 
810  //double hlt_matched_dr = -1.;
811  const int nF(pHLTe31->sizeFilters());
812  //
813  // default (tag) trigger filter
814  //
815  // find how many relevant
816  const int iF = pHLTe31->filterIndex(HLTFilterType_[filterNum]);
817  // loop over these objects to see whether they match
818  const trigger::TriggerObjectCollection& TOC(pHLTe31->getObjects());
819  if (nF != iF) {
820  // find how many objects there are
821  const trigger::Keys& KEYS(pHLTe31->filterKeys(iF));
822  const int nK(KEYS.size());
823  for (int iTrig = 0;iTrig <nK; ++iTrig ) {
824  const trigger::TriggerObject& TO(TOC[KEYS[iTrig]]);
825  //if (abs(TO.id())==11 ) { // demand it to be an electron
826  double dr_ele_HLT =
827  reco::deltaR(probeEle->eta(), probeEle->phi(), TO.eta(), TO.phi());
828  if (fabs(dr_ele_HLT) < ProbeHLTObjMaxDR) {++trigger_int_probe;
829  //hlt_matched_dr = dr_ele_HLT;
830  }
831  }
832  }
833 
834  //
835  if(trigger_int_probe>0) probe_pass_trigger_cut[probeIt][filterNum] = 1;
836  //probe_hlt_matched_dr[probeIt] = hlt_matched_dr;
837  }
838  ******************************************/
839  // ------------------------------------------------------------------
840  //
841  // MC Matching ......................................................
842  // check whether these electrons are matched to a MC electron
843  /*
844  int mc_index = 0;
845  int matched = 0; int mother_id = 999;
846  double deta_matched = 999.; double dphi_matched = 999.;
847  double denergy_matched = 999.;
848  for(reco::GenParticleCollection::const_iterator McParticle =
849  McCand->begin(); McParticle != McCand->end(); ++McParticle)
850  {
851  // check only for electrons
852  if(abs(McParticle->pdgId())==11 && McParticle->status()==1) {
853  mc_index++;
854  // check whether it matches a gsf electron
855  double deta = McParticle->eta() - probeEle->eta();
856  double dphi = McParticle->phi() - probeEle->phi();
857  if ( fabs(deta) < MCMatch_Deta_ && fabs(dphi) < MCMatch_Dphi_){
858  ++matched;
859  deta_matched = deta; dphi_matched = dphi;
860  denergy_matched = McParticle->energy() - probeEle->caloEnergy();
861  // find the mother of the MC electron
862  const reco::Candidate *mum;
863  bool mother_finder = true;
864  if (abs(McParticle->mother()->pdgId()) != 11)
865  mum = McParticle->mother();
866  else if (abs(McParticle->mother()->mother()->pdgId())!= 11)
867  mum = McParticle->mother()->mother();
868  else {
869  edm::LogInfo("info") << "Going too far to find the mum";
870  mother_finder = false;
871  }
872  if (mother_finder) {
873  mother_id = mum->pdgId();
874  }
875  }
876  }
877  }
878  probe_mc_matched[probeIt] = matched;
879  probe_mc_matched_deta[probeIt] = deta_matched;
880  probe_mc_matched_dphi[probeIt] = dphi_matched;
881  probe_mc_matched_denergy[probeIt] = denergy_matched;
882  probe_mc_matched_mother[probeIt] = mother_id;
883  */
884  }
885 
886  probe_tree->Fill();
887  ++ tree_fills_;
888  delete [] sorted;
889  delete [] et;
890 }
891 
892 
893 // ------------ method called once each job just before starting event loop --
894 void
896 {
897  //std::cout << "In beginJob()" << std::endl;
898  TString filename_histo = outputFile_;
899  histofile = new TFile(filename_histo,"RECREATE");
900  tree_fills_ = 0;
901 
902  probe_tree = new TTree("probe_tree","Tree to store probe variables");
903 
904  //probe_tree->Branch("probe_ele_eta",probe_ele_eta_for_tree,"probe_ele_eta[4]/D");
905  //probe_tree->Branch("probe_ele_phi",probe_ele_phi_for_tree,"probe_ele_phi[4]/D");
906  //probe_tree->Branch("probe_ele_et",probe_ele_et_for_tree,"probe_ele_et[4]/D");
907  probe_tree->Branch("probe_ele_tip",probe_ele_tip,"probe_ele_tip[4]/D");
908  probe_tree->Branch("probe_ele_vertex_x",probe_ele_Xvertex_for_tree,
909  "probe_ele_vertex_x[4]/D");
910  probe_tree->Branch("probe_ele_vertex_y",probe_ele_Yvertex_for_tree,
911  "probe_ele_vertex_y[4]/D");
912  probe_tree->Branch("probe_ele_vertex_z",probe_ele_Zvertex_for_tree,
913  "probe_ele_vertex_z[4]/D");
914  probe_tree->Branch("probe_sc_eta",probe_sc_eta_for_tree,"probe_sc_eta[4]/D");
915  probe_tree->Branch("probe_sc_phi",probe_sc_phi_for_tree,"probe_sc_phi[4]/D");
916  probe_tree->Branch("probe_sc_et",probe_sc_et_for_tree,"probe_sc_et[4]/D");
917 
918  // trigger related variables
919  //probe_tree->Branch("probe_trigger_cut",probe_pass_trigger_cut,"probe_trigger_cut[4][25]/I");
920  //probe_tree->Branch("probe_hlt_matched_dr", probe_hlt_matched_dr,"probe_hlt_matched_dr[4]/D");
921  // mc matching to electrons
922  // probe_tree->Branch("probe_mc_matched",probe_mc_matched,"probe_mc_matched[4]/I");
923  //probe_tree->Branch("probe_mc_matched_deta",probe_mc_matched_deta,
924  // "probe_mc_matched_deta[4]/D");
925  //probe_tree->Branch("probe_mc_matched_dphi",probe_mc_matched_dphi,
926  // "probe_mc_matched_dphi[4]/D");
927  //probe_tree->Branch("probe_mc_matched_denergy",probe_mc_matched_denergy,
928  // "probe_mc_matched_denergy[4]/D");
929  //probe_tree->Branch("probe_mc_matched_mother",probe_mc_matched_mother,
930  // "probe_mc_matched_mother[4]/I");
931  //
932  probe_tree->Branch("probe_charge",probe_charge_for_tree,"probe_charge[4]/I");
933  //probe_tree->Branch("probe_sc_fiducial_cut",probe_sc_pass_fiducial_cut,
934  // "probe_sc_fiducial_cut[4]/I");
935 
936 
937 
938  //probe_tree->Branch("probe_classification",
939  // probe_classification_index_for_tree,"probe_classification[4]/I");
940  //
941  // Isolation related variables ........................................
942  //
943  probe_tree->Branch("probe_isolation_value",probe_isolation_value, "probe_isolation_value[4]/D");
944  probe_tree->Branch("probe_ecal_isolation_value",probe_ecal_isolation_value, "probe_ecal_isolation_value[4]/D");
945  probe_tree->Branch("probe_hcal_isolation_value",probe_hcal_isolation_value,"probe_hcal_isolation_value[4]/D");
946  //
947  probe_tree->Branch("probe_iso_user", probe_iso_user, "probe_iso_user[4]/D");
948  probe_tree->Branch("probe_ecal_iso_user",probe_ecal_iso_user, "probe_ecal_iso_user[4]/D");
949  probe_tree->Branch("probe_hcal_iso_user",probe_hcal_iso_user, "probe_hcal_iso_user[4]/D");
950 
951  //......................................................................
952  // Electron ID Related variables .......................................
953  probe_tree->Branch("probe_ele_hoe",probe_ele_hoe, "probe_ele_hoe[4]/D");
954  //probe_tree->Branch("probe_ele_shh",probe_ele_shh, "probe_ele_shh[4]/D");
955  probe_tree->Branch("probe_ele_sihih",probe_ele_sihih,"probe_ele_sihih[4]/D");
956  probe_tree->Branch("probe_ele_dfi",probe_ele_dfi, "probe_ele_dfi[4]/D");
957  probe_tree->Branch("probe_ele_dhi",probe_ele_dhi, "probe_ele_dhi[4]/D");
958  probe_tree->Branch("probe_ele_eop",probe_ele_eop, "probe_ele_eop[4]/D");
959  probe_tree->Branch("probe_ele_pin",probe_ele_pin, "probe_ele_pin[4]/D");
960  probe_tree->Branch("probe_ele_pout",probe_ele_pout, "probe_ele_pout[4]/D");
961  // probe_tree->Branch("probe_ele_e5x5",probe_ele_e5x5, "probe_ele_e5x5[4]/D");
962  //probe_tree->Branch("probe_ele_e2x5",probe_ele_e2x5, "probe_ele_e2x5[4]/D");
963  //probe_tree->Branch("probe_ele_e1x5",probe_ele_e1x5, "probe_ele_e1x5[4]/D");
964 
965  //.......................................................................
966  //
967  // each entry for each trigger path
968  //probe_tree->Branch("event_HLTPath",event_HLTPath,"event_HLTPath[25]/I");
969  //probe_tree->Branch("numberOfHLTFilterObjects", numberOfHLTFilterObjects,
970  // "numberOfHLTFilterObjects[25]/I");
971  //
972  // debugging info:
973  //probe_tree->Branch("elec_number_in_event",&elec_number_in_event,"elec_number_in_event/I");
974  probe_tree->Branch("elec_1_duplicate_removal",&elec_1_duplicate_removal,"elec_1_duplicate_removal/I");
975  //
976 
977  // Missing ET in the event
978  probe_tree->Branch("event_MET",&event_MET,"event_MET/D");
979  probe_tree->Branch("event_MET_phi",&event_MET_phi,"event_MET_phi/D");
980  // probe_tree->Branch("event_MET_sig",&event_MET_sig,"event_MET_sig/D");
981  probe_tree->Branch("event_mcMET",&event_mcMET,"event_mcMET/D");
982  probe_tree->Branch("event_mcMET_phi",&event_mcMET_phi,"event_mcMET_phi/D");
983  //
984  probe_tree->Branch("event_tcMET",&event_tcMET,"event_tcMET/D");
985  probe_tree->Branch("event_tcMET_phi",&event_tcMET_phi,"event_tcMET_phi/D");
986  // probe_tree->Branch("event_tcMET_sig",&event_tcMET_sig,"event_tcMET_sig/D");
987 
988  probe_tree->Branch("event_pfMET",&event_pfMET,"event_pfMET/D");
989  probe_tree->Branch("event_pfMET_phi",&event_pfMET_phi,"event_pfMET_phi/D");
990  // probe_tree->Branch("event_pfMET_sig",&event_pfMET_sig,"event_pfMET_sig/D");
991 
992  // probe_tree->Branch("event_genMET",&event_genMET,"event_genMET/D");
993  // probe_tree->Branch("event_genMET_phi",&event_genMET_phi, "event_genMET_phi/D");
994  // probe_tree->Branch("event_genMET_sig",&event_genMET_sig, "event_genMET_sig/D");
995  //..... type 1 corrected MET
996  probe_tree->Branch("event_t1MET", &event_t1MET, "event_t1MET/D");
997  probe_tree->Branch("event_t1MET_phi", &event_t1MET_phi,"event_t1MET_phi/D");
998  //probe_tree->Branch("event_t1MET_sig",&event_t1MET_sig,"event_t1MET_sig/D");
999 
1000  //
1001  // some sc related variables
1002  probe_tree->Branch("sc_hybrid_et", sc_hybrid_et, "sc_hybrid_et[5]/D");
1003  probe_tree->Branch("sc_hybrid_eta", sc_hybrid_eta, "sc_hybrid_eta[5]/D");
1004  probe_tree->Branch("sc_hybrid_phi", sc_hybrid_phi, "sc_hybrid_phi[5]/D");
1005  //
1006  probe_tree->Branch("sc_multi5x5_et",sc_multi5x5_et, "sc_multi5x5_et[5]/D");
1007  probe_tree->Branch("sc_multi5x5_eta",sc_multi5x5_eta,"sc_multi5x5_eta[5]/D");
1008  probe_tree->Branch("sc_multi5x5_phi",sc_multi5x5_phi,"sc_multi5x5_phi[5]/D");
1009  // /////////////////////////////////////////////////////////////////////////
1010  // general tracks in the event: keep 20 tracks
1011  probe_tree->Branch("ctf_track_pt", ctf_track_pt, "ctf_track_pt[20]/D");
1012  probe_tree->Branch("ctf_track_eta", ctf_track_eta, "ctf_track_eta[20]/D");
1013  probe_tree->Branch("ctf_track_phi", ctf_track_phi, "ctf_track_phi[20]/D");
1014  probe_tree->Branch("ctf_track_vx", ctf_track_vx, "ctf_track_vx[20]/D");
1015  probe_tree->Branch("ctf_track_vy", ctf_track_vy, "ctf_track_vy[20]/D");
1016  probe_tree->Branch("ctf_track_vz", ctf_track_vz, "ctf_track_vz[20]/D");
1017  probe_tree->Branch("ctf_track_tip", ctf_track_tip, "ctf_track_tip[20]/D");
1018  probe_tree->Branch("ctf_track_tip_bs", ctf_track_tip_bs,
1019  "ctf_track_tip_bs[20]/D");
1020  //
1021  probe_tree->Branch("muon_pt", muon_pt, "muon_pt[4]/D");
1022  probe_tree->Branch("muon_eta", muon_eta, "muon_eta[4]/D");
1023  probe_tree->Branch("muon_phi", muon_phi, "muon_phi[4]/D");
1024  probe_tree->Branch("muon_vx", muon_vx, "muon_vx[4]/D");
1025  probe_tree->Branch("muon_vy", muon_vy, "muon_vy[4]/D");
1026  probe_tree->Branch("muon_vz", muon_vz, "muon_vz[4]/D");
1027  probe_tree->Branch("muon_tip", muon_tip, "muon_tip[4]/D");
1028  probe_tree->Branch("muon_tip_bs", muon_tip_bs, "muon_tip_bs[4]/D");
1029 
1030 }
1031 
1032 // ------------ method called once each job just after ending the event loop -
1033 void
1035  //std::cout << "In endJob()" << std::endl;
1036  if (tree_fills_ == 0) {
1037  std::cout << "Empty tree: no output..." << std::endl;
1038  return;
1039  }
1040  //probe_tree->Print();
1041  histofile->Write();
1042  histofile->Close();
1043 
1044 }
1045 
1046 
1047 //define this as a plug-in
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
edm::InputTag HLTTriggerResultsE31_
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:137
tuple pfMET
Definition: pfMET_cfi.py:7
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:161
GenPurposeSkimmerData(const edm::ParameterSet &)
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:139
std::vector< Electron > ElectronCollection
Definition: Electron.h:35
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
double pt() const
track transverse momentum
Definition: TrackBase.h:129
double energy() const
cluster energy
Definition: CaloCluster.h:120
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:145
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
T const * product() const
Definition: Handle.h:81
std::vector< Muon > MuonCollection
Definition: Muon.h:34
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:143
edm::InputTag HLTTriggerResultsE29_
tuple cout
Definition: gather_cfg.py:121
const Point & position() const
position
Definition: BeamSpot.h:62
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:164
virtual void analyze(const edm::Event &, const edm::EventSetup &)
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:119
Analysis-level muon class.
Definition: Muon.h:49
reco::TrackRef track() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
Definition: Muon.cc:141
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:141