![]() |
|
|||
File indexing completed on 2023-03-17 11:26:07
0001 // 0002 // 0003 0004 /** 0005 @file LeptonTranslatorBase.h 0006 0007 @brief Template class of function object to translate lepton physics 0008 object to HitFit's Lepjets_Event_Lep object. 0009 0010 @author Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch> 0011 0012 @par Creation date: 0013 Nov-2009 0014 0015 @par Terms of Usage: 0016 With consent from the original author (Haryo Sumowidagdo). 0017 */ 0018 0019 #ifndef HitFit_LeptonTranslatorBase_h 0020 #define HitFit_LeptonTranslatorBase_h 0021 0022 #include "TopQuarkAnalysis/TopHitFit/interface/EtaDepResolution.h" 0023 #include "TopQuarkAnalysis/TopHitFit/interface/Lepjets_Event_Lep.h" 0024 #include "TopQuarkAnalysis/TopHitFit/interface/fourvec.h" 0025 0026 namespace hitfit { 0027 0028 /** 0029 @class LeptonTranslatorBase. 0030 0031 @brief Template class of function object to translate lepton physics 0032 object to HitFit's Lepjets_Event_Lep object. Users need to write an 0033 implementation of a template specialization of this class for their 0034 lepton physics object class. Then users combine this header file and 0035 their implementation for their analysis code. With this approach, it is 0036 possible to use HitFit for different lepton physics object class in 0037 different experiments. 0038 0039 @param ALepton The typename of the lepton physics object class to 0040 be translated into HitFit's Lepjets_Event_Lep. 0041 0042 */ 0043 template <class ALepton> 0044 class LeptonTranslatorBase { 0045 public: 0046 /** 0047 @brief Default constructor. 0048 */ 0049 LeptonTranslatorBase(); 0050 0051 /** 0052 @brief Constructor, instantiate a LeptonTranslatorBase object 0053 using the name of and input file in std::string format. 0054 0055 @param ifile The path of the input file. 0056 */ 0057 LeptonTranslatorBase(const std::string& ifile); 0058 0059 /** 0060 @brief Destructor. 0061 */ 0062 ~LeptonTranslatorBase(); 0063 0064 /** 0065 @brief Convert a lepton physics object of type ALepton into 0066 HitFit lepton physics object of type Lepjets_Event_Lep. 0067 0068 @param lepton The lepton physics object to be translated. 0069 0070 @param type The typecode of the lepton to be translated. 0071 0072 @param useObjEmbRes Boolean parameter to indicate if the 0073 user would like to use the resolution embedded in the object, 0074 and not the resolution read when instantiating the class. 0075 */ 0076 Lepjets_Event_Lep operator()(const ALepton& lepton, int type = hitfit::lepton_label, bool useObjEmbRes = false); 0077 0078 /** 0079 @brief Return the \f$ \eta- \f$ dependent resolution of the lepton. 0080 */ 0081 const EtaDepResolution& resolution() const; 0082 0083 /** 0084 @brief Check if a lepton has \f$ \eta \f$ value which is within the 0085 valid \f$ \eta \f$ range of the resolution. 0086 0087 @param lepton The lepton whose \f$ \eta \f$ value is to be checked. 0088 */ 0089 bool CheckEta(const ALepton& lepton) const; 0090 0091 private: 0092 /** 0093 @brief The \f$ \eta- \f$ dependent resolution. 0094 */ 0095 EtaDepResolution resolution_; 0096 }; 0097 0098 } // namespace hitfit 0099 0100 #endif // #ifndef HitFit_LeptonTranslatorBase_h
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |
![]() ![]() |