55double JetCnvE(
float px,
float py,
float pz,
float m){
56 return std::sqrt( px*px + py*py + pz*pz + m*m);
59void JetCnv_p6::persToTrans(
const Jet_p6* pers,
61 MsgStream&
msg )
const
63 if(
msg.level() == MSG::DEBUG )
msg << MSG::DEBUG <<
"JetCnv_p6 Loading Jet from persistent state... " <<
endmsg;
71 ElementLink<VxContainer> origin;
96 trans->
setCalE ( momentum[ 3 ] );
101 trans->
setRawE ( momentum[ 7 ] );
135 vector<const JetTagInfoBase *> *ptags =
137 if (ptags !=
nullptr) {
138 vector<const JetTagInfoBase*> &
tags (*ptags);
139 for (
unsigned int i = 0;
i <
tags.size();
i++) {
159 trans->
m_assocStore =
new vector<const JetAssociationBase*> ();
160 vector<const JetAssociationBase *> *pass =
163 if (pass !=
nullptr) {
164 vector<const JetAssociationBase *> &ass (*pass);
166 for (
unsigned int i = 0;
i < ass.size();
i++) {
167 unsigned int index = ass[
i]->m_keyIndex;
168 if (index >=
store.size()) {
169 store.resize(index+1,
nullptr);
181 if(
msg.level() == MSG::DEBUG )
msg << MSG::DEBUG <<
"Loaded Jet from persistent state [OK]. Final e=" << trans->
e()
191void JetCnv_p6::transToPers(
const Jet* trans,
193 MsgStream&
msg )
const
195 if(
msg.level() == MSG::DEBUG )
msg << MSG::DEBUG <<
"JetCnv_p6 writing Jet to persistent state... " << trans->
jetAuthor() <<
" id="<<trans->
id() <<
endmsg;
197 if( ! s_write0constit) {
242 vector<const JetTagInfoBase*> goodTagInfo;
243 const vector<const JetTagInfoBase*> &tagInfo(*(trans->
m_tagInfoStore));
244 for (
unsigned int i = 0;
i < tagInfo.size();
i++) {
245 if (tagInfo[i] !=
nullptr) {
246 goodTagInfo.push_back(tagInfo[i]);
257 vector<const JetAssociationBase*> goodAssInfo;
258 const vector<const JetAssociationBase*> &assInfo(*trans->
m_assocStore);
260 for (
unsigned int i = 0;
i < assInfo.size();
i++) {
261 if( (assInfo[i] !=
nullptr) &&
262 ( !
bool(
dynamic_cast<const JetINav4MomAssociation*
>(assInfo[i])) ) ){
263 goodAssInfo.push_back(assInfo[i]);
270 if(
msg.level() == MSG::DEBUG ){
271 msg << MSG::DEBUG <<
"Created persistent state of Jet [OK]" <<
endmsg;
NavigableCnv_p1< Navigable< INavigable4MomentumCollection, double > > NavigableCnv_t
This file contains the class definition for the DataLinkCnv_p2 class and DataLinkVectorCnv_p2 class.
This file contains the class definition for the ElementLinkCnv_p3 class.
static const NavigableCnv_t navCnv
double JetCnvE(float px, float py, float pz, float m)
This file contains the class definition for the NavigableCnv_p2 class.
static const VxLinkCnv_t vxCnv
ElementLinkCnv_p1< ElementLink< VxContainer > > VxLinkCnv_t
void persToTrans(const PersLink_t &pers, Link_t &trans, MsgStream &log) const
void transToPers(const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
float m_momentum[12]
the 4-mom part
Navigable_p2< uint32_t, float > m_nav
the navigable part
int m_constituentSigState
we store the recoStatus for jets here
std::vector< TPObjRef > m_associations
JetAssociationBase objects.
ElementLinkInt_p3 m_origin
link to the particle's origin (vertex)
unsigned int m_author
storing what jet algorithm the jet belongs to
std::vector< TPObjRef > m_tagJetInfo
JetTagInfoBase objects.
unsigned int m_constituentsN
size_t id() const
Index category for jet shapes.
double getCScalePy() const
size_t m_jetId
the identifier of this jet within its collection.
double getCScalePz() const
void setCalE(double e)
Sets calibrated .
void addInfo(const TAGINFO *tag)
Add tag info object.
void setFastjetPtr(const fastjet::PseudoJet *fj)
tagstore_t * m_tagInfoStore
Tag info store.
std::string jetAuthor() const
Author and calibration history are encoded in a simple way inside the jet object.
double getCScalePx() const
size_t m_jetAuthor
Jet author store.
void setCalPy(double py)
Sets calibrated .
assostore_t * m_assocStore
key descriptor for all jet stores
double getCScaleE() const
void setCalPz(double pz)
Sets calibrated .
void setCScaleE(double e)
Sets uncalibrated .
void setCScalePy(double py)
Sets uncalibrated .
void setRawPx(double px)
Sets uncalibrated .
void setCScalePx(double px)
Sets uncalibrated .
void setRawE(double e)
Sets uncalibrated .
void setRawPy(double py)
Sets uncalibrated .
void setCalPx(double px)
Sets calibrated .
numconstit_t m_constituentsN
void setCScalePz(double pz)
Sets uncalibrated .
void setRawPz(double pz)
Sets uncalibrated .
signalstate_t m_constituentSigState
Constituent Signal State.
void transToPers(const Navigable_t &trans, PersNavigable_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
void persToTrans(const PersNavigable_t &pers, Navigable_t &trans, MsgStream &log) const
virtual bool setSignalState(state_t s)
set the current signal state
virtual ParticleDataType::DataType dataType() const
Return enum indicating real data, fast, or full simulation Return Type has a DataType enum with the f...
virtual double e() const
energy
virtual void set_origin(const VxContainer *theContainer, int index)
const navigable_type & navigableBase() const
access to underlying base type (INavigable-like)
virtual const ElementLink< VxContainer > & originLink() const
Return an ElementLink corresponding to particle's Origin.
virtual void set_dataType(ParticleDataType::DataType x)
std::vector< std::string > tags