All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
TrueJet Class Reference

Example processor for marlin. More...

#include <TrueJet.h>

Inheritance diagram for TrueJet:
[legend]

Public Member Functions

virtual ProcessornewProcessor ()
 
 TrueJet ()
 
TrueJetoperator= (const TrueJet &)=delete
 
 TrueJet (const TrueJet &)=delete
 
virtual void init ()
 Called at the begin of the job before anything is read. More...
 
virtual void processRunHeader (LCRunHeader *run)
 Called for every run. More...
 
virtual void processEvent (LCEvent *evt)
 Called for every event - the working horse. More...
 
virtual void check (LCEvent *evt)
 
virtual void end ()
 Called after data processing for clean up. More...
 
void readback (LCEvent *evt)
 

Protected Attributes

std::string _MCParticleColllectionName {}
 Input collection name. More...
 
std::string _recoParticleCollectionName {}
 
std::string _recoMCTruthLink {}
 
std::string _trueJetCollectionName {}
 ouput collection names. More...
 
std::string _finalColourNeutralCollectionName {}
 
std::string _initialColourNeutralCollectionName {}
 
std::string _trueJetPFOLink {}
 
std::string _trueJetMCParticleLink {}
 
std::string _finalElementonLink {}
 
std::string _initialElementonLink {}
 
std::string _finalColourNeutralLink {}
 
std::string _initialColourNeutralLink {}
 
int _nRun {}
 
int _nEvt {}
 

Private Member Functions

void getPyjets (LCCollection *mcpcol)
 
void stdhep_reader_bug_workaround (int line94)
 
void true_lepton ()
 
void cluster ()
 
void string ()
 
void assign_jet (int jet1, int jet2, int this_fafp)
 
void first_parton (int this_partic, int this_jet, int &first_partic, int &last_94_parent, int &nfsr, int &info, int &info2)
 
int flavour (int k2)
 
void isr ()
 
void photon ()
 
void grouping ()
 

Private Attributes

LCEvent * evt {}
 
double p [4001][6] {}
 
int k [4001][9] {}
 
int nlund {}
 
MCParticleVec mcp_pyjets {}
 
int jet [4001] {}
 
int companion [4001] {}
 
int current_jet {}
 
int first_line {}
 
int njet {}
 
int n_djb {}
 
int n_dje {}
 
int nstr {}
 
int n_hard_lepton {}
 
int nboson {}
 
int nclu {}
 
int nisr {}
 
int nphot {}
 
int n_mixed {}
 
int n_jetless {}
 
int n_2jet_clu {}
 
int n_0_E_jets {}
 
int n_beam_jet {}
 
int fafp_last [26] {}
 
int elementon [26] {}
 
int boson [26] {}
 
int fafp_boson [26] {}
 
int fafp [26] {}
 
int nfsr [26] {}
 
int type [26] {}
 
int group [26][26] {}
 
int dijet_begining [26] {}
 
int dijet_end [26] {}
 
double tmom [26][3] {}
 
double tE [26] {}
 
int jets_begin [26][26] {}
 
int jets_end [26][26] {}
 
bool _whiz1 = false
 
bool _top_event = false
 
bool _higgs_to_glue_glue = false
 

Detailed Description

Example processor for marlin.

If compiled with MARLIN_USE_AIDA it creates a histogram (cloud) of the MCParticle energies.

Input - Prerequisites

Needs the collection of MCParticles.

Output

A histogram.

Parameters
CollectionNameName of the MCParticle collection
Author
F. Gaede, DESY
Version
Id:
TrueJet.h,v 1.4 2005-10-11 12:57:39 gaede Exp

Definition at line 38 of file TrueJet.h.

Constructor & Destructor Documentation

TrueJet::TrueJet ( )

Definition at line 27 of file TrueJet.cc.

TrueJet::TrueJet ( const TrueJet )
delete

Member Function Documentation

void TrueJet::assign_jet ( int  jet1,
int  jet2,
int  this_fafp 
)
private

Definition at line 2202 of file TrueJet.cc.

void TrueJet::check ( LCEvent *  evt)
virtual

Definition at line 2747 of file TrueJet.cc.

void TrueJet::cluster ( )
private

Jet-assignment: Decide if the particle should be assigned to the first or last quark end of the cluster, by checking the sign of the projection of the hadron momentum on the difference between the two quark directions.

First of all: find first and second quark going into the cluster, normally the first is the mother of the cluster, and the second is the line after, or possibly a few linese later.

Definition at line 1913 of file TrueJet.cc.

void TrueJet::end ( )
virtual

Called after data processing for clean up.

Definition at line 2752 of file TrueJet.cc.

void TrueJet::first_parton ( int  this_partic,
int  this_jet,
int &  first_partic,
int &  last_94_parent,
int &  nfsr,
int &  info,
int &  info2 
)
private

back-track quarks to the begining of the event record, or until the quark-chain is broken Beginning of record is hit when the parent of a quark is an electron, photon or a whizard inserted boson and the chain is brocken if the parent of a quark is a gluon (21) or a W (24, non-resonanc-insertion).

start at this_quark, which might on entry actually be something else (a gluon or a W)

step back in the history

looking at a gluon or a W. We've alredy steped to the parent of the boson (which should be a quark), so now we might be loking at a different flavour:

jet-assignment if requested. Set to -ve to indicate that we are in the parton shower,

Internal brems ? If the line after this quark is a photon, and this quark and

the photon has the same mother, it is an FSR

assign the FST to the jet of the quark. It's a real particle, so it assigned a +ve jet number

we are here because we've reached the end of the chain. If this happened becasue the parent was a boson radiated during the PS, we recurse. (Else we arrived at the initial state and are done.)

recurse.

jet-number set to 0 => do not assign jet numbers anymore. The untimate first partic will go into boson_ancestor, parent of the last 94 into boson_last_94_parent.

the way this bottoms-out: second to last argument (istat in the call) is set to 0 if we didn't find a boson.. In that case ...

... we end up here. Here we set the argument to something different from 0 (namely boson_ancestor), so whoever called me in this step will ...

... end up here, where the same information is further transmitted up the stack.

... and so on until we are back at the top of the stack.

bottom-out

Definition at line 2280 of file TrueJet.cc.

int TrueJet::flavour ( int  k2)
private

Definition at line 2424 of file TrueJet.cc.

void TrueJet::getPyjets ( LCCollection *  mcpcol)
private

Definition at line 1192 of file TrueJet.cc.

void TrueJet::grouping ( )
private

! Add info on jet-type to return (1=from string,2=lepton,3=from cluster,4=isr,5=overlay,6=M.E. photon. ! (+ x00=comes from boson, boson from jet x) and indication of the companion.

figure out the different jet combinations. (If there are no bosons, it's straight forward: it's just the odd+even combinations. Also if one only cares about the final singlet the same aplies, boson or not)

Definition at line 2440 of file TrueJet.cc.

void TrueJet::init ( )
virtual

Called at the begin of the job before anything is read.

Use to initialize the processor, e.g. book histograms.

Definition at line 124 of file TrueJet.cc.

void TrueJet::isr ( )
private

Definition at line 2007 of file TrueJet.cc.

virtual Processor* TrueJet::newProcessor ( )
inlinevirtual

Definition at line 42 of file TrueJet.h.

TrueJet& TrueJet::operator= ( const TrueJet )
delete
void TrueJet::photon ( )
private

Definition at line 1957 of file TrueJet.cc.

void TrueJet::processEvent ( LCEvent *  evt)
virtual

Called for every event - the working horse.

Definition at line 144 of file TrueJet.cc.

void TrueJet::processRunHeader ( LCRunHeader *  run)
virtual

Called for every run.

Definition at line 137 of file TrueJet.cc.

void TrueJet::readback ( LCEvent *  evt)
void TrueJet::stdhep_reader_bug_workaround ( int  line94)
private

Definition at line 1540 of file TrueJet.cc.

void TrueJet::string ( )
private

! Move jets away to make room for string-induced ones at the lowest indicies

Decode the event record. First find the line of the first string, the last quark of the last string (lquark, at the line before the first string), the last string (lstr, the daughter of the lquark quark), and the number of strings (nstr).

now the jet-assignment. Start by looking at the last string (lstr), stop once the first has been reached. decide if the particle should be assigned to the first or last quark end of the string, by checking the sign of the projection of the hadron momentum on the difference between the two quark directions.

the previous string is the mother of its hadrons, eg. the last one, which is on the line before the current string:

new string:

back-up: end-quark of the previous string is the line before the start-quark of the present string:

! Once again the very unusual case: need to search for the end of the new string backwards ! print a message and the event for now. This one actually happens now and then: If there ! is a cluster in the event, there might be a part of the parton shower after the direct parents ! of one string that eventually ends up in a later string (not a cluster, that would have ! been taken care of),

decrement the string-counter

Definition at line 2046 of file TrueJet.cc.

void TrueJet::true_lepton ( )
private

count number of hard leptons. The condition is: it should be a lepton lepton (pdg 11 to 16). In whiz2, it is hard if the status of its parent is 21, or it comes from a W or a Z. In whiz1, it is hard either if it is comming from line 3, or if comes from line 1, goes to a single daughter which is an electron. (The second part is needed for beam-remenant electrons in odd-f events)

Sort the leptons in "color singlets", ie. in groups of flavour/anti-flavour. In most events this is the order they come in, but in the case of all flavour being the same, it isn't

assign to jets. Basically the jet is the index in the list, -ve if it later on goes into a 94, +ve otherwise.

Definition at line 1641 of file TrueJet.cc.

Member Data Documentation

std::string TrueJet::_finalColourNeutralCollectionName {}
protected

Definition at line 83 of file TrueJet.h.

std::string TrueJet::_finalColourNeutralLink {}
protected

Definition at line 89 of file TrueJet.h.

std::string TrueJet::_finalElementonLink {}
protected

Definition at line 87 of file TrueJet.h.

bool TrueJet::_higgs_to_glue_glue = false
private

Definition at line 208 of file TrueJet.h.

std::string TrueJet::_initialColourNeutralCollectionName {}
protected

Definition at line 84 of file TrueJet.h.

std::string TrueJet::_initialColourNeutralLink {}
protected

Definition at line 90 of file TrueJet.h.

std::string TrueJet::_initialElementonLink {}
protected

Definition at line 88 of file TrueJet.h.

std::string TrueJet::_MCParticleColllectionName {}
protected

Input collection name.

Definition at line 78 of file TrueJet.h.

int TrueJet::_nEvt {}
protected

Definition at line 92 of file TrueJet.h.

int TrueJet::_nRun {}
protected

Definition at line 91 of file TrueJet.h.

std::string TrueJet::_recoMCTruthLink {}
protected

Definition at line 80 of file TrueJet.h.

std::string TrueJet::_recoParticleCollectionName {}
protected

Definition at line 79 of file TrueJet.h.

bool TrueJet::_top_event = false
private

Definition at line 207 of file TrueJet.h.

std::string TrueJet::_trueJetCollectionName {}
protected

ouput collection names.

The corresponding collections are filled from the internal data structues at the end of processEvent

Definition at line 82 of file TrueJet.h.

std::string TrueJet::_trueJetMCParticleLink {}
protected

Definition at line 86 of file TrueJet.h.

std::string TrueJet::_trueJetPFOLink {}
protected

Definition at line 85 of file TrueJet.h.

bool TrueJet::_whiz1 = false
private

Definition at line 206 of file TrueJet.h.

int TrueJet::boson[26] {}
private

Definition at line 188 of file TrueJet.h.

int TrueJet::companion[4001] {}
private

Definition at line 152 of file TrueJet.h.

int TrueJet::current_jet {}
private

Definition at line 155 of file TrueJet.h.

int TrueJet::dijet_begining[26] {}
private

Definition at line 194 of file TrueJet.h.

int TrueJet::dijet_end[26] {}
private

Definition at line 196 of file TrueJet.h.

int TrueJet::elementon[26] {}
private

Definition at line 184 of file TrueJet.h.

LCEvent* TrueJet::evt {}
private

Definition at line 108 of file TrueJet.h.

int TrueJet::fafp[26] {}
private

Definition at line 190 of file TrueJet.h.

int TrueJet::fafp_boson[26] {}
private

Definition at line 189 of file TrueJet.h.

int TrueJet::fafp_last[26] {}
private

Definition at line 182 of file TrueJet.h.

int TrueJet::first_line {}
private

Definition at line 156 of file TrueJet.h.

int TrueJet::group[26][26] {}
private

Definition at line 193 of file TrueJet.h.

int TrueJet::jet[4001] {}
private

Definition at line 151 of file TrueJet.h.

int TrueJet::jets_begin[26][26] {}
private

Definition at line 201 of file TrueJet.h.

int TrueJet::jets_end[26][26] {}
private

Definition at line 204 of file TrueJet.h.

int TrueJet::k[4001][9] {}
private

Definition at line 119 of file TrueJet.h.

MCParticleVec TrueJet::mcp_pyjets {}
private

Definition at line 147 of file TrueJet.h.

int TrueJet::n_0_E_jets {}
private

Definition at line 175 of file TrueJet.h.

int TrueJet::n_2jet_clu {}
private

Definition at line 174 of file TrueJet.h.

int TrueJet::n_beam_jet {}
private

Definition at line 176 of file TrueJet.h.

int TrueJet::n_djb {}
private

Definition at line 161 of file TrueJet.h.

int TrueJet::n_dje {}
private

Definition at line 162 of file TrueJet.h.

int TrueJet::n_hard_lepton {}
private

Definition at line 165 of file TrueJet.h.

int TrueJet::n_jetless {}
private

Definition at line 173 of file TrueJet.h.

int TrueJet::n_mixed {}
private

Definition at line 172 of file TrueJet.h.

int TrueJet::nboson {}
private

Definition at line 166 of file TrueJet.h.

int TrueJet::nclu {}
private

Definition at line 167 of file TrueJet.h.

int TrueJet::nfsr[26] {}
private

Definition at line 191 of file TrueJet.h.

int TrueJet::nisr {}
private

Definition at line 170 of file TrueJet.h.

int TrueJet::njet {}
private

Definition at line 160 of file TrueJet.h.

int TrueJet::nlund {}
private

Definition at line 146 of file TrueJet.h.

int TrueJet::nphot {}
private

Definition at line 171 of file TrueJet.h.

int TrueJet::nstr {}
private

Definition at line 164 of file TrueJet.h.

double TrueJet::p[4001][6] {}
private

Definition at line 118 of file TrueJet.h.

double TrueJet::tE[26] {}
private

Definition at line 198 of file TrueJet.h.

double TrueJet::tmom[26][3] {}
private

Definition at line 197 of file TrueJet.h.

int TrueJet::type[26] {}
private

Definition at line 192 of file TrueJet.h.


The documentation for this class was generated from the following files: