|
ATLAS Offline Software
|
#include <TrackCounting.h>
|
| TrackCounting (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~TrackCounting () |
| Implementations of the methods defined in the abstract base class. More...
|
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
void | finalizeHistos () |
| finalize the histos: Normalize other histos and fill the integratedNegativeIP histos. More...
|
|
void | setOrigin (const Trk::VxCandidate *priVtx) |
| Set the primary vertex. More...
|
|
void | tagJet (xAOD::Jet &jetToTag) |
| called by BJetBuilder More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
| DeclareInterfaceID (ITagTool, 1, 0) |
|
virtual StatusCode | tagJet (const xAOD::Vertex &priVtx, const xAOD::Jet &, xAOD::BTagging &, const std::string &) const =0 |
| Method to return the name of the tagging tool. More...
|
|
|
template<class T > |
static bool | m_greater (T a, T b) |
| sort algorithm for vectors More...
|
|
Definition at line 38 of file TrackCounting.h.
◆ StoreGateSvc_t
◆ TrackCounting()
Analysis::TrackCounting::TrackCounting |
( |
const std::string & |
name, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TrackCounting()
Analysis::TrackCounting::~TrackCounting |
( |
| ) |
|
|
virtual |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ DeclareInterfaceID()
Analysis::ITagTool::DeclareInterfaceID |
( |
ITagTool |
, |
|
|
1 |
, |
|
|
0 |
|
|
) |
| |
|
inherited |
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode Analysis::TrackCounting::finalize |
( |
| ) |
|
◆ finalizeHistos()
void Analysis::TrackCounting::finalizeHistos |
( |
| ) |
|
|
inlinevirtual |
◆ initialize()
StatusCode Analysis::TrackCounting::initialize |
( |
| ) |
|
retrieving TrackToVertex:
creation of TrackSelector: (private instance)
retrieving the track grade factory
prepare the track partitions:
Definition at line 78 of file TrackCounting.cxx.
83 return StatusCode::FAILURE;
103 return StatusCode::FAILURE;
111 return StatusCode::FAILURE;
118 ATH_MSG_DEBUG(
"#BTAG# Defining " << nbPart <<
" track partitions: ");
119 for(
int i=0;
i<nbPart;
i++) {
120 TrackGradePartition*
part(0);
124 catch(std::string
error) {
126 ATH_MSG_ERROR(
"#BTAG# List of categories provided to TrackCounting by jO : ");
128 for (
int l=0;
l<nbPart;
l++) {
134 const TrackGradesDefinition &trackFactoryGradesDefinition =
m_trackGradeFactory->getTrackGradesDefinition();
135 const std::vector<TrackGrade> &gradeList = trackFactoryGradesDefinition.getList();
137 std::vector<TrackGrade>::const_iterator listIter=gradeList.begin();
138 std::vector<TrackGrade>::const_iterator listEnd=gradeList.end();
140 for ( ; listIter !=listEnd ; ++listIter ) {
141 ATH_MSG_ERROR(
"#BTAG# n. " << (*listIter).gradeNumber() <<
" string " << (*listIter).gradeString());
145 return StatusCode::FAILURE;
150 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ m_greater()
template<class T >
static bool Analysis::TrackCounting::m_greater |
( |
T |
a, |
|
|
T |
b |
|
) |
| |
|
inlinestaticprivate |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ setOrigin()
Set the primary vertex.
TODO: This is temporary ! The primary vertex should be part of the JetTag IParticle interface implementation. The trouble with ElementLink and persistency has to be solved for that. Revisit ...
Definition at line 111 of file TrackCounting.h.
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ tagJet() [1/2]
Method to return the name of the tagging tool.
The tagging method.
TODO: The first argument is temporary ! The primary vertex should be part of the JetTag IParticle interface implementation. The trouble with ElementLink and persistency has to be solved for that. Revisit ...
TODO: The second argument will be removed as soon as we have the JetTag containing the necessary pointers to the constituent TrackParticles via navigation. But maybe this is not a very good idea since then a JetTag always must be created even if the tagging does not work. Think ...
◆ tagJet() [2/2]
void Analysis::TrackCounting::tagJet |
( |
xAOD::Jet & |
jetToTag | ) |
|
called by BJetBuilder
author to know which jet algorithm:
getting sign from SecVxFinderTool
getting Bad Tracks from SecVxFinderTool
extract the TrackParticles from the jet and apply track selection:
jet direction:
sign of the impact parameter
signed ip and significances
sort vector of significances in descending order
give information to the info class.
tagging done. Fill the JetTag and return ... fill most powerfull discriminating variable it's not a likelihood, but this can directly be accessed from the Jet without changing the getFlavourTagWeight() method
Definition at line 160 of file TrackCounting.cxx.
163 std::string
author = jetToTag.jetAuthor();
169 std::vector<const Trk::Track*> TrkFromV0;
171 bool canUseSvxDirection=
false;
175 m_SVForIPTool->getDirectionFromSecondaryVertexInfo(SvxDirection,canUseSvxDirection,
181 m_SVForIPTool->getTrkFromV0FromSecondaryVertexInfo(TrkFromV0,
185 ATH_MSG_VERBOSE(
"#BTAG# TrkFromV0 : number of reconstructed bad tracks: " << TrkFromV0.size());
189 std::vector<const xAOD::TrackParticle*>* trackVector = NULL;
195 trackVector = jetToTag.getAssociation<TrackAssociation>(
"Tracks")->tracks();
197 for( jetItr = trackVector->begin(); jetItr != trackVector->end() ; ++jetItr ) {
205 ATH_MSG_VERBOSE(
"#BTAG# result of selectTrack is OK, grade= " << (std::string)(*theGrade));
207 bool tobeUsed =
false;
208 for(
int i=0;
i<nbPart;
i++) {
215 if (
std::find(TrkFromV0.begin(),TrkFromV0.end(),*aTemp->
track()) != TrkFromV0.end()) {
216 ATH_MSG_VERBOSE(
"#BTAG# Bad track in jet, pt = " << aTemp->
pt() <<
" eta = " << aTemp->
eta() <<
" phi = " << aTemp->
phi());
219 if (tobeUsed)
m_tracksInJet.push_back(GradedTrack(aTemp, *theGrade));
235 unit = SvxDirection.unit();
236 ATH_MSG_DEBUG(
"#BTAG# Using direction from sec vertex finder tool '"
238 <<
" phi: " <<
unit.phi()
239 <<
" theta: " <<
unit.theta()
240 <<
" instead of jet direction phi: " << jetDirection.phi()
241 <<
" theta: " << jetDirection.theta());
247 const int nbTrackMean = 3;
248 vectD0Signi.reserve(nbTrackMean);
249 vectD0Signi_abs.reserve(nbTrackMean);
255 double d0wrtPriVtx(0.);
256 double d0ErrwrtPriVtx(1.);
261 if(myIPandSigma==0) {
264 d0wrtPriVtx=myIPandSigma->
IPd0;
265 d0ErrwrtPriVtx=myIPandSigma->
sigmad0;
276 double sd0 = signOfIP*fabs(d0wrtPriVtx);
277 double sd0significance = signOfIP*fabs(d0wrtPriVtx/d0ErrwrtPriVtx);
279 vectD0Signi.push_back(sd0significance);
280 vectD0Signi_abs.push_back( fabs(sd0significance) );
282 ATH_MSG_VERBOSE(
"#BTAG# TrackCounting: Trk: grade= " << (std::string)(*trkItr).grade
283 <<
" Eta= " << trk->
eta() <<
" Phi= " << trk->
phi() <<
" pT= " << trk->
pt()
285 <<
"+-" << d0ErrwrtPriVtx
286 <<
" d0sig= " << sd0significance );
292 sort( vectD0Signi.begin(), vectD0Signi.end(), m_greater<float> );
293 sort( vectD0Signi_abs.begin(), vectD0Signi_abs.end(), m_greater<float> );
297 std::string instanceName(
"TrackCounting2D");
298 if (
m_flipIP) instanceName +=
"Neg";
299 TrackCountingInfo* infoTrackCounting = NULL;
302 infoTrackCounting =
new TrackCountingInfo(instanceName);
304 int ntrk = vectD0Signi.size();
305 infoTrackCounting->setnTracks( ntrk );
308 ATH_MSG_DEBUG(
"#BTAG# " << ntrk <<
" tracks used for TrackCounting, ordered ip2d significance / |ip2d significance|:" );
309 for(
uint i=0;
i<vectD0Signi.size();
i++){
310 ATH_MSG_DEBUG(
"#BTAG# trk " <<
i+1 <<
"/" << ntrk <<
": " << vectD0Signi.at(
i) <<
" / " << vectD0Signi_abs.at(
i));
313 ATH_MSG_DEBUG(
"#BTAG# filling 2nd / 2nd abs: " << vectD0Signi.at(1) <<
" / " << vectD0Signi_abs.at(1));
314 infoTrackCounting->setd0sig_2nd( vectD0Signi.at(1) );
315 infoTrackCounting->setd0sig_abs_2nd( vectD0Signi_abs.at(1) );
318 ATH_MSG_DEBUG(
"#BTAG# filling 3rd / 3rd abs: " << vectD0Signi.at(2) <<
" / " << vectD0Signi_abs.at(2));
319 infoTrackCounting->setd0sig_3rd( vectD0Signi.at(2) );
320 infoTrackCounting->setd0sig_abs_3rd( vectD0Signi_abs.at(2) );
328 if(infoTrackCounting){
329 std::vector<double> v_tofill;
330 double tofill =
exp(-20.);
331 if(vectD0Signi.size()>=2){
332 tofill =
exp(vectD0Signi.at(1));
333 infoTrackCounting->makeValid();
335 v_tofill.push_back( tofill );
336 v_tofill.push_back(1.);
337 infoTrackCounting->setTagLikelihood( v_tofill );
338 jetToTag.addInfo( infoTrackCounting );
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_flipIP
bool Analysis::TrackCounting::m_flipIP |
|
private |
◆ m_jetCollectionList
std::vector<std::string> Analysis::TrackCounting::m_jetCollectionList |
|
private |
◆ m_priVtx
Storage for the primary vertex.
Can be removed when JetTag provides origin().
Definition at line 71 of file TrackCounting.h.
◆ m_purificationDeltaR
double Analysis::TrackCounting::m_purificationDeltaR |
|
private |
◆ m_RejectBadTracks
bool Analysis::TrackCounting::m_RejectBadTracks |
|
private |
possibility to exclude Bad Tracks found with SVTagger and possibility to use the sign of the impact parameter with SVTagger/JetFitter
Definition at line 79 of file TrackCounting.h.
◆ m_secVxFinderNameForIPSign
std::string Analysis::TrackCounting::m_secVxFinderNameForIPSign |
|
private |
◆ m_secVxFinderNameForV0Removal
std::string Analysis::TrackCounting::m_secVxFinderNameForV0Removal |
|
private |
◆ m_SignWithSvx
bool Analysis::TrackCounting::m_SignWithSvx |
|
private |
◆ m_SVForIPTool
ToolHandle< SVForIPTool > Analysis::TrackCounting::m_SVForIPTool |
|
private |
◆ m_trackGradeFactory
◆ m_trackGradePartitions
◆ m_trackGradePartitionsDefinition
std::vector<std::string> Analysis::TrackCounting::m_trackGradePartitionsDefinition |
|
private |
◆ m_trackSelectorTool
ToolHandle< TrackSelector > Analysis::TrackCounting::m_trackSelectorTool |
|
private |
◆ m_tracksInJet
std::vector<GradedTrack> Analysis::TrackCounting::m_tracksInJet |
|
private |
The jet of TrackParticles to be tagged.
Definition at line 66 of file TrackCounting.h.
◆ m_trackToVertexIPEstimator
◆ m_trackToVertexTool
◆ m_truthMatchingName
std::string Analysis::TrackCounting::m_truthMatchingName |
|
private |
◆ m_unbiasIPEstimation
bool Analysis::TrackCounting::m_unbiasIPEstimation |
|
private |
option to unbias IP estimation (remove track from vertex)
Definition at line 103 of file TrackCounting.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeInfo
bool Analysis::TrackCounting::m_writeInfo |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
bool m_unbiasIPEstimation
option to unbias IP estimation (remove track from vertex)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
std::string m_truthMatchingName
ToolHandle< TrackSelector > m_trackSelectorTool
Track selection cuts for TrackCounting.
const Trk::RecVertex & recVertex(void) const
Returns a reference to reconstructed vertex.
std::string find(const std::string &s)
return a remapped string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< std::string > m_trackGradePartitionsDefinition
track classification.
#define ATH_MSG_VERBOSE(x)
bool m_writeInfo
write tagging info to info class
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
Tool for the estimation of the IPs to the Vertex.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
std::string m_secVxFinderNameForV0Removal
virtual void setOwner(IDataHandleHolder *o)=0
ToolHandle< ITrackGradeFactory > m_trackGradeFactory
ToolHandle for the ITrackGradeFactory tool.
std::vector< double > FloatVec
const Trk::Perigee & perigeeParameters() const
Returns the Trk::MeasuredPerigee track parameters.
ToolHandle< SVForIPTool > m_SVForIPTool
float pz() const
The z-component of the jet's momentum.
std::vector< TrackGradePartition * > m_trackGradePartitions
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
const Amg::Vector3D & position() const
return position of vertex
float py() const
The y-component of the jet's momentum.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
float px() const
The x-component of the jet's momentum.
std::string m_secVxFinderNameForIPSign
Eigen::Matrix< double, 3, 1 > Vector3D
virtual FourMom_t p4() const
The full 4-momentum of the particle.
std::vector< GradedTrack > m_tracksInJet
The jet of TrackParticles to be tagged.
#define ATH_MSG_WARNING(x)
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Class describing a TrackParticle.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
bool m_RejectBadTracks
possibility to exclude Bad Tracks found with SVTagger and possibility to use the sign of the impact p...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const Trk::VxCandidate * m_priVtx
Storage for the primary vertex.
double m_purificationDeltaR
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
TrackToVertex tool.