26 static const float BINS[]={30., 40., 50., 60., 70., 80., 100., 125., 150.};
73 corrLevel_(cfg.getParameter<std::
string>(
"corrLevel")),
74 jetsToken_(consumes<edm::
View<pat::
Jet> >(cfg.getParameter<edm::InputTag>(
"src")))
80 hists_[
"mult" ]=fs->
make<TH1F>(
"mult" ,
"N_{Jet}" , 15, 0., 15.);
82 hists_[
"pt" ]=fs->
make<TH1F>(
"pt" ,
"p_{T}(Jet) [GeV]" , 60, 0., 300.);
84 hists_[
"eta" ]=fs->
make<TH1F>(
"eta" ,
"#eta (Jet)" , 60, -3., 3.);
86 hists_[
"phi" ]=fs->
make<TH1F>(
"phi" ,
"#phi (Jet)" , 60, 3.2, 3.2);
88 hists_[
"mass" ]=fs->
make<TH1F>(
"mass" ,
"M_{jj} [GeV]" , 50, 0., 500.);
91 char buffer [10]; sprintf (buffer,
"jes_%i",
idx);
92 char title [50]; sprintf (title ,
"p_{T}^{rec}/p_{T}^{gen} [%i GeV - %i GeV]", (
int)
BINS[
idx], (
int)
BINS[idx+1]);
118 char buffer [10]; sprintf (buffer,
"jes_%i",
idx);
119 fill( buffer, resp );
125 fill(
"mult" , jets->size());
127 if(jets->size()>1){
fill(
"mass", ((*jets)[0].
p4()+(*jets)[1].
p4()).mass());}
134 std::cout <<
"[" << idx <<
"] :: eta=" << std::setw(10) << jet->eta() <<
" phi=" << std::setw(10) << jet->phi() <<
" size: " << jet->availableJECLevels().
size() << std::endl;
135 for(
unsigned int idx=0; idx<jet->availableJECLevels().
size(); ++
idx){
137 if(jet->availableJECLevels()[
idx].find(
"L5Flavor")!=std::string::npos||
138 jet->availableJECLevels()[
idx].find(
"L7Parton")!=std::string::npos ){
std::string corrLevel_
correction level for pat jet
virtual float pt() const
transverse momentum
#define DEFINE_FWK_MODULE(type)
PatJetAnalyzer(const edm::ParameterSet &cfg)
default contructor
T * make(const Args &...args) const
make new ROOT object
void fill(const std::string histName, double value) const
fill histogram if it had been booked before
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup) override
everything that needs to be done during the even loop
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< edm::View< pat::Jet > > jetsToken_
pat jets
std::map< std::string, TH1F * > hists_
management of 1d histograms
static const float BINS[]
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Analysis-level calorimeter jet class.
Module to analyze pat::Jets in the context of a more complex exercise.
bool booked(const std::string histName) const
check if histogram was booked
static const unsigned int MAXBIN
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
~PatJetAnalyzer()
default destructor
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void print(edm::View< pat::Jet >::const_iterator &jet, unsigned int idx)