CMS 3D CMS Logo

Functions
playingWithJets.cc File Reference
#include "FWCore/Utilities/interface/InputTag.h"
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/PatCandidates/interface/Jet.h"
#include "DataFormats/Math/interface/deltaPhi.h"
#include "PhysicsTools/FWLite/interface/EventContainer.h"
#include "PhysicsTools/FWLite/interface/CommandLineParser.h"
#include "TROOT.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:

Prepare maps of good/bad channels:

Prepare maps of good/bad channels:

Definition at line 24 of file playingWithJets.cc.

References fwlite::EventContainer::add(), dir2webdir::argc, GCPpyPlots::argv, cms::cuda::assert(), fwlite::EventContainer::atEnd(), SiPixelRawToDigiRegional_cfi::deltaPhi, fwlite::EventContainer::getByLabel(), fwlite::EventContainer::hist(), edm::HandleBase::isValid(), commonCuts_cff::jetLabel, writedatasetfile::parser, and fwlite::EventContainer::toBegin().

25 {
27  // ////////////////////////// //
28  // // Command Line Options // //
29  // ////////////////////////// //
31 
32  // Tell people what this analysis code does and setup default options.
33  optutl::CommandLineParser parser ("Playing with jets");
34 
36  // Change any defaults or add any new command //
37  // line options you would like here. //
39  // change default output filename
40  parser.stringValue ("outputFile") = "jetInfo.root";
41 
42  // Parse the command line arguments
43  parser.parseArguments (argc, argv);
44 
46  // //////////////////////////// //
47  // // Create Event Container // //
48  // //////////////////////////// //
50 
51  // This object 'event' is used both to get all information from the
52  // event as well as to store histograms, etc.
53  fwlite::EventContainer eventCont (parser);
54 
56  // ////////////////////////////////// //
57  // // Begin Run // //
58  // // (e.g., book histograms, etc) // //
59  // ////////////////////////////////// //
61 
62  // Setup a style
63  gROOT->SetStyle ("Plain");
64 
65  // Book those histograms!
66  eventCont.add( new TH1F( "jetpt", "Jet p_{T} using standard absolute p_{T} calibration", 100, 0, 60) );
67  eventCont.add( new TH1F( "jeteta", "Jet eta using standard absolute p_{T} calibration", 100, 0, 10) );
68  eventCont.add( new TH1F( "reljetpt", "Jet p_{T} using relative inter eta calibration", 100, 0, 60) );
69  eventCont.add( new TH1F( "reljeteta", "Jet eta using relative inter eta calibration", 100, 0, 10) );
70  eventCont.add( new TH1F( "phijet1jet2", "Phi between Jet 1 and Jet 2", 100, 0, 3.5) );
71  eventCont.add( new TH1F( "invarMass", "Invariant Mass of the 4-vector sum of Two Jets", 100, 0, 200) );
72 
74  // //////////////// //
75  // // Event Loop // //
76  // //////////////// //
78 
79  // create labels
80  edm::InputTag jetLabel ("selectedLayer1Jets");
81 
82  for (eventCont.toBegin(); ! eventCont.atEnd(); ++eventCont)
83  {
85  // Take What We Need From Event //
87 
88  // Get jets
90  eventCont.getByLabel (jetLabel, jetHandle);
91  assert ( jetHandle.isValid() );
92 
93  const vector< pat::Jet >::const_iterator kJetEnd = jetHandle->end();
94  for (vector< pat::Jet >::const_iterator jetIter = jetHandle->begin();
95  jetIter != kJetEnd;
96  ++jetIter)
97  {
98  // A few correctedJet options:
99  // ABS - absolute pt calibration (automatic)
100  // REL - relative inter eta calibration
101  // EMF - calibration as a function of the jet EMF
102  eventCont.hist("reljetpt") ->Fill( jetIter->correctedJet("REL").pt() );
103  eventCont.hist("reljeteta")->Fill( jetIter->correctedJet("REL").eta() );
104  eventCont.hist("jetpt") ->Fill( jetIter->correctedJet("ABS").pt() );
105  // Automatically ABS
106  eventCont.hist("jeteta") ->Fill( jetIter->eta() );
107  } // for jetIter
108 
109  // Do we have at least two jets?
110  if (jetHandle->size() < 2)
111  {
112  // Nothing to do here
113  continue;
114  }
115 
116  // Store invariant mass and delta phi between two leading jets.
117  eventCont.hist("invarMass")->Fill( (jetHandle->at(0).p4() + jetHandle->at(1).p4()).M() );
118  eventCont.hist("phijet1jet2")->Fill( deltaPhi( jetHandle->at(0).phi(), jetHandle->at(1).phi() ) );
119  } // for eventCont
120 
121 
123  // ////////////////// //
124  // // Clean Up Job // //
125  // ////////////////// //
127 
128  // Histograms will be automatically written to the root file
129  // specificed by command line options.
130 
131  // All done! Bye bye.
132  return 0;
133 }
assert(be >=bs)
bool isValid() const
Definition: HandleBase.h:70