Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F7879729
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Subscribers
None
View Options
diff --git a/inc/LauFlavTag.hh b/inc/LauFlavTag.hh
index e3ac94e..677eb6c 100644
--- a/inc/LauFlavTag.hh
+++ b/inc/LauFlavTag.hh
@@ -1,187 +1,188 @@
// Copyright University of Warwick 2006 - 2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Authors:
// Thomas Latham
// John Back
// Paul Harrison
/*! \file LauFlavTag.hh
\brief File containing declaration of LauFlavTag class.
*/
/*! \class LauFlavTag
\brief Class for defining the flavour tagging approach.
Define the flavour tagging categories and all associated parameters
to be passed to the relevant fit models.
*/
#ifndef LAU_FLAVTAG
#define LAU_FLAVTAG
#include <vector>
#include <map>
#include <set>
#include <iostream>
#include "TString.h"
#include "TStopwatch.h"
#include "TSystem.h"
#include "LauConstants.hh"
#include "LauParameter.hh"
#include "LauFitDataTree.hh"
#include "LauAbsFitModel.hh"
class LauFlavTag {
public:
//! Constructor
/*!
\param [in] modelB0bar DP model for the antiparticle
\param [in] modelB0 DP model for the particle
\param [in] useUntaggedEvents should the untagged sample be used or excluded?
\param [in] tagVarName the variable name in the data tree that specifies the event tag
\param [in] tagCatVarName the variable name in the data tree that specifies the event tagging category
*/
LauFlavTag(const std::vector<LauAbsRValue*>& params, const Bool_t useUntaggedEvents = kTRUE, const TString& tagVarName = "tagFlv", const TString& tagCatVarName = "tagCat");
//! Destructor
virtual ~LauFlavTag();
//! Add a tagging category to the list of valid categories
/*!
NB category 0 is always valid and corresponds to untagged events.
Whether untagged events are used in the fit or note is controlled by a constructor argument.
\param [in] tagCat the tagging category ID
*/
void addValidTagCat(const Int_t tagCat);
//! Add several tagging categories to the list of valid categories
/*!
NB category 0 is always valid and corresponds to untagged events.
Whether untagged events are used in the fit or note is controlled by a constructor argument.
\param [in] tagCats the list of tagging category IDs
*/
void addValidTagCats(const std::vector<Int_t>& tagCats);
//! Check the validity of the given tagging category
/*!
\param [in] tagCat the tagging category ID
*/
Bool_t validTagCat(const Int_t tagCat) const;
//! Change the dilutions, delta dilutions and tagCatFrac for signal if needed
/*!
\param [in] tagCat the tagging category to adjust
\param [in] tagCatFrac the tagging category fraction
\param [in] dilution the tagging category average dilution = (1 - 2 * avg_mistag_fraction)
\param [in] deltaDilution the tagging category dilution difference TODO - check sign convention
\param [in] fixTCFrac whether to fix or float the tagging category fraction
\param [in] usePerEvtMistag whether to use per event mistag information or not
\param [in] mistagVarName the name of the branch in the tree containing per event mistag information
*/
void setSignalTagCatPars(const Int_t tagCat, const Double_t tagCatFrac, const Double_t dilution, const Double_t deltaDilution,
const Bool_t fixTCFrac = kTRUE, const Bool_t usePerEvtMistag = kFALSE, const TString& mistagVarName = "tagMistag");
//! Read in the input fit data variables, e.g. m13Sq and m23Sq
void cacheInputFitVars(LauFitDataTree* inputFitData);
Bool_t getUsePerEvtMistag(){return usePerEvtMistag_;};
typedef std::map< Int_t, LauParameter> LauTagCatParamMap;
LauTagCatParamMap getDilution(){return dilution_;};
LauTagCatParamMap getDeltaDilution(){return deltaDilution_;};
LauTagCatParamMap& getSignalTagCatFrac(){return signalTagCatFrac_;};
//! Calculates the fraction of the first tagging category based on the others
/*!
\param [in,out] theMap the container of tagcat fractions
*/
void setFirstTagCatFrac(LauTagCatParamMap& theMap);
std::vector<Int_t> getEvtTagFlvVals(){return evtTagFlvVals_;};
std::vector<Int_t> getEvtTagCatVals(){return evtTagCatVals_;};
std::vector<Double_t> getEvtMistagVals(){return evtMistagVals_;};
TString getMistagVarName(){return mistagVarName_;};
LauAbsRValue* findParameter(const TString& parName);
std::vector<LauParameter*> getFitParameters();
+ Double_t getPerEvtAvgMistag(){return perEvtAvgMistag_;};
protected:
//! Check that the tagging category fractions are all present and sum to unity
/*!
\param [in] theMap the container of tagcat fractions
*/
Bool_t checkTagCatFracMap(const LauTagCatParamMap& theMap) const;
//! Check the signal tagging category fractions
void checkSignalTagCatFractions();
private:
//! Whether or not to use untagged events
const Bool_t useUntaggedEvents_;
//! Signal tagging category fractions
LauTagCatParamMap signalTagCatFrac_;
//! Flavour tagging variable name
TString tagVarName_;
//! Tagging category variable name
TString tagCatVarName_;
//! Per event mistag variable name
TString mistagVarName_;
//! The allowed tagging categories
std::set<Int_t> validTagCats_;
//! Flavour tag for current event
Int_t curEvtTagFlv_;
//! Tagging category for current event
Int_t curEvtTagCat_;
//! Per event mistag for current event
Double_t curEvtMistag_;
//! Vector to store event flavour tags
std::vector<Int_t> evtTagFlvVals_;
//! Vector to store event tagging categories
std::vector<Int_t> evtTagCatVals_;
//! Vector to store event mistag values
std::vector<Double_t> evtMistagVals_;
//! Average dilutions
LauTagCatParamMap dilution_;
//! Dilution differences
LauTagCatParamMap deltaDilution_;
//! Use per event mistag
Bool_t usePerEvtMistag_;
//! Per-event average mistag value (eta hat)
Double_t perEvtAvgMistag_;
//! Calibration parameters
LauParameter* calib_p0_;
LauParameter* calib_p1_;
//! Input parameters
std::vector<LauAbsRValue*> params_;
ClassDef(LauFlavTag,0) // Flaour tagging set up
};
#endif
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Nov 19, 8:48 PM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3806154
Default Alt Text
(6 KB)
Attached To
rLAURA laura
Event Timeline
Log In to Comment