CMS 3D CMS Logo

Functions
JPsiFWLiteAnalyzer.cc File Reference
#include <memory>
#include <string>
#include <vector>
#include <sstream>
#include <fstream>
#include <iostream>
#include <TH1F.h>
#include <TROOT.h>
#include <TFile.h>
#include <TSystem.h>
#include "DataFormats/FWLite/interface/Handle.h"
#include "DataFormats/PatCandidates/interface/Muon.h"
#include "DataFormats/PatCandidates/interface/CompositeCandidate.h"
#include "FWCore/FWLite/interface/FWLiteEnabler.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

===============================================================================================================================================================================================


variant2: for each run define phi-averaged A for normalization channel (Dref,16) and then, divide Rijk on it, i.e. get RRijk

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=29 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=19

eta=17

eta=25

eta=23

eta=22

eta=21

eta=26

eta=24

eta=20

eta=19

eta=18

eta=27 L1=1

eta=25 L1=1

eta=23 L1=1

eta=22 L1=1

eta=21 L1=1

eta=26 L1=1

eta=24 L1=1

eta=20 L1=1

eta=19 L1=1

eta=18 L1=1

eta=17 L1=1

eta=28 L7=1

eta=27 L7=1

eta=25 L7=1

eta=23 L7=1

eta=22 L7=1

eta=21 L7=1

eta=26 L7=1

eta=24 L7=1

eta=20 L7=1

eta=19 L7=1

eta=18 L7=1

eta=17 L7=1

eta=27

eta=28

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

errA with average Amplitudes

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

Summed Amplitude Plots:

RBX:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Definition at line 20 of file JPsiFWLiteAnalyzer.cc.

21 {
22  // ----------------------------------------------------------------------
23  // First Part:
24  //
25  // * enable FWLite
26  // * book the histograms of interest
27  // * open the input file
28  // ----------------------------------------------------------------------
29 
30  // load framework libraries
31  gSystem->Load( "libFWCoreFWLite" );
33 
34  // open input file (can be located on castor)
35  TFile* inFile = TFile::Open( "file:jpsi.root" );
36 
37  // ----------------------------------------------------------------------
38  // Second Part:
39  //
40  // * loop the events in the input file
41  // * receive the collections of interest via fwlite::Handle
42  // * fill the histograms
43  // * after the loop close the input file
44  // ----------------------------------------------------------------------
45 
46  // loop the events
47  unsigned int iEvent=0;
48  fwlite::Event event(inFile);
49  for(event.toBegin(); !event.atEnd(); ++event, ++iEvent){
50  // break loop after end of file is reached
51  // or after 1000 events have been processed
52  if( iEvent==1000 ) break;
53 
54  // simple event counter
55  if(iEvent>0 && iEvent%1==0){
56  std::cout << " processing event: " << iEvent << std::endl;
57  }
58 
59  // fwlite::Handle to to jpsi collection
61  jpsis.getByLabel(event, "patJPsiCandidates");
62 
63  // loop jpsi collection and fill histograms
64  for(unsigned i=0; i<jpsis->size(); ++i){
65  cout << "jpsi " << i << ", mass = " << jpsis->at(i).mass() << ", dR = " << jpsis->at(i).userFloat("dR") << endl;
66  }
67  }
68  // close input file
69  inFile->Close();
70 
71  // that's it!
72  return 0;
73 }

References gather_cfg::cout, FWLiteEnabler::enable(), edmPickEvents::event, fwlite::Handle< T >::getByLabel(), mps_fire::i, and iEvent.

mps_fire.i
i
Definition: mps_fire.py:428
gather_cfg.cout
cout
Definition: gather_cfg.py:144
fwlite::Handle
Definition: Handle.h:39
FWLiteEnabler::enable
static void enable()
enable automatic library loading
Definition: FWLiteEnabler.cc:46
edmPickEvents.event
event
Definition: edmPickEvents.py:273
iEvent
int iEvent
Definition: GenABIO.cc:224
fwlite::Handle::getByLabel
void getByLabel(const P &iP, const char *iModuleLabel, const char *iProductInstanceLabel=nullptr, const char *iProcessLabel=nullptr)
Definition: Handle.h:100
fwlite::Event
Definition: Event.h:87
event
Definition: event.py:1