ATLAS Offline Software
Loading...
Searching...
No Matches
EffiCollection.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4
9#include <TTree.h>
10namespace CP {
11 namespace {
12 static const std::vector<std::string> ToRemove { "GeV", "MeV", "[", "]", "{", "}", "(", ")", "#", " " };
13 typedef std::pair<std::string,std::string> stringpair;
14 static const std::vector<stringpair> ToReplace { stringpair("-","minus"), stringpair(".","p")};
15
16 }
18 m_ref_tool(ref_tool),
20 m_calo_eff(),
26 m_syst_set(std::make_unique<SystematicSet>()){
27
28 ref_tool.addSubtool (*this);
29
30 m_central_eff = std::make_shared<CollectionContainer>(m_ref_tool, CollectionType::Central);
31 m_central_eff->addSubtoolsTo(*this);
32 if (m_ref_tool.filename_Calo() != m_ref_tool.filename_Central()){
33 m_calo_eff = std::make_shared<CollectionContainer>(m_ref_tool,CollectionType::Calo);
34 m_calo_eff->addSubtoolsTo(*this);
36
37 if (m_ref_tool.filename_HighEta() != m_ref_tool.filename_Central()){
38 m_forward_eff = std::make_shared<CollectionContainer>(m_ref_tool,CollectionType::Forward);
39 m_forward_eff->addSubtoolsTo(*this);
41
42 if (m_ref_tool.lowPtTransition() > 0 && m_ref_tool.filename_LowPt() != m_ref_tool.filename_Central()){
43 m_lowpt_central_eff = std::make_shared<CollectionContainer>(m_ref_tool,CollectionType::CentralLowPt);
44 m_lowpt_central_eff->addSubtoolsTo(*this);
46
47 if (m_ref_tool.lowPtTransition() > 0 && m_ref_tool.filename_LowPtCalo() != m_ref_tool.filename_Central()){
48 m_lowpt_calo_eff = std::make_shared<CollectionContainer>(m_ref_tool, CollectionType::CaloLowPt);
49 m_lowpt_calo_eff->addSubtoolsTo(*this);
51
52 if(m_ref_tool.use_lrt()) {
53 if (m_ref_tool.filename_LRTCentral() != m_ref_tool.filename_Central()) {
54 m_lrt_central_eff = std::make_shared<CollectionContainer>(m_ref_tool,CollectionType::Central);
55 }
56 else {
58 }
59 if (m_ref_tool.lowPtTransition() > 0 ) {
60 if (m_ref_tool.filename_LRTLowPt() == m_ref_tool.filename_LowPt()) {
62 }
63 else if (m_ref_tool.filename_LRTLowPt() == m_ref_tool.filename_Central()) {
65 }
66 else {
67 m_lrt_lowpt_central_eff = std::make_shared<CollectionContainer>(m_ref_tool,CollectionType::CentralLowPt);
68 }
69 }
70 else {
72 }
73 }
74 }
75
76 EffiCollection::EffiCollection(const EffiCollection* Nominal, MuonEfficiencyScaleFactors& ref_tool, const std::string& syst, int syst_bit_map, bool is_up):
77 m_ref_tool(ref_tool),
79 m_calo_eff(),
85 m_syst_set() {
86
87 ref_tool.addSubtool (*this);
88
89 if (is_up) syst_bit_map |= EffiCollection::UpVariation;
91 std::function< std::shared_ptr<CollectionContainer>(CollectionType)> make_variation = [this,&ref_tool, Nominal, syst_bit_map, syst](CollectionType type){
92 if (syst_bit_map & type) {
93 return std::make_shared<CollectionContainer>(ref_tool,
94 Nominal->retrieveContainer(type).get(),
95 syst, syst_bit_map); }
97 if (ref_tool.measurement() != MuonEfficiencyType::Reco) return m_central_eff;
98 return Nominal->retrieveContainer(type);
99 };
100 m_central_eff = make_variation(CollectionType::Central);
101 m_central_eff->addSubtoolsTo (*this);
102 m_forward_eff = make_variation(CollectionType::Forward);
103 m_forward_eff->addSubtoolsTo (*this);
104 m_calo_eff = make_variation(CollectionType::Calo);
105 m_calo_eff->addSubtoolsTo (*this);
107 m_lowpt_central_eff->addSubtoolsTo (*this);
109 m_lowpt_calo_eff->addSubtoolsTo (*this);
110
111 if (m_ref_tool.use_lrt()) {
114 }
115 }
116
117 std::shared_ptr<CollectionContainer> EffiCollection::retrieveContainer(CollectionType Type) const {
120 if (Type == CollectionType::Calo) return m_calo_eff;
123 return std::shared_ptr<CollectionContainer>();
124 }
126 if (!m_central_eff || !m_central_eff->CheckConsistency()) {
127 Error("EffiCollection()", "Consistency check for central file failed");
128 return false;
129 }
130 if (!m_calo_eff || !m_calo_eff->CheckConsistency()) {
131 Error("EffiCollection()", "Consistency check for calo file failed");
132 return false;
133 }
134 if (!m_forward_eff || !m_forward_eff->CheckConsistency()) {
135 Error("EffiCollection()", "Consistency check for forward file failed");
136 return false;
137 }
138 if (!m_lowpt_central_eff || !m_lowpt_central_eff->CheckConsistency()) {
139 Error("EffiCollection()", "Consistency check for low-pt file failed");
140 return false;
141 }
142 if (!m_lowpt_calo_eff || !m_lowpt_calo_eff->CheckConsistency()) {
143 Error("EffiCollection()", "Consistency check for low-pt calo file failed");
144 return false;
145 }
146 if (m_ref_tool.use_lrt()) {
147 if (!m_lrt_central_eff || !m_lrt_central_eff->CheckConsistency()) {
148 Error("EffiCollection()", "Consistency check for LRT central file failed");
149 return false;
150 }
151 if (!m_lrt_lowpt_central_eff || !m_lrt_lowpt_central_eff->CheckConsistency()) {
152 Error("EffiCollection()", "Consistency check for LRT low-pt file failed");
153 return false;
154 }
155 }
159 unsigned int n = m_central_eff->nBins();
160 std::function<void (CollectionContainer*)> assign_mapping = [this, &n](CollectionContainer* container){
161 if (container != m_central_eff.get() && container->separateBinSyst()){
162 container->SetGlobalOffSet(n);
163 n += container->nBins();
164 };
165 };
166 assign_mapping(m_calo_eff.get());
167 assign_mapping(m_calo_eff.get());
168 assign_mapping(m_lowpt_central_eff.get());
169 assign_mapping(m_lowpt_calo_eff.get());
170
171 assign_mapping(m_forward_eff.get());
172
173 if (m_ref_tool.use_lrt()) {
174 assign_mapping(m_lrt_central_eff.get());
175 assign_mapping(m_lrt_lowpt_central_eff.get());
176 }
179 if (!m_syst_set){
180 m_syst_set = std::make_unique<CP::SystematicSet>();
181 size_t glob_sys = m_ref_tool.getPosition(this);
182 if (glob_sys > m_ref_tool.getNCollections()){
183 Error("EffiCollection()", "Invalid position in the list of systematics. It seems that I'm not part of the referring ScaleFactorTool.");
184 return false;
185 }
188
189 std::shared_ptr<CollectionContainer> container = retrieveContainer(file_type);
190 if (container->isNominal()) continue;
191 if (container->separateBinSyst()){
194 for (unsigned int b = container->nBins() - 1; b > 0 ; --b){
195 unsigned int bin = b + container->globalOffSet();
196 if (container->isOverFlowBin(bin)) continue;
197 m_syst_set->insert(CP::SystematicVariation::makeToyVariation("MUON_EFF_" + container->sysname() + GetBinName(bin) , bin, glob_sys));
198 }
199 } else {
200 m_syst_set->insert( SystematicVariation("MUON_EFF_" + container->sysname(), container->isUpVariation() ? 1 : -1));
201 }
202 }
203 }
204 return true;
205 }
206
208 if (m_ref_tool.use_lrt()) {
209 if (isLRTmuon.isAvailable(mu)) {
210 if (isLRTmuon(mu)) return FindLRTContainer(mu);
211 }
212 else {
213 static const SG::AuxElement::Accessor<uint64_t> patternAcc("patternRecoInfo");
214 const xAOD::TrackParticle* idtrack = mu.getXAODObject().trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
215 if(idtrack) {
216 if(!patternAcc.isAvailable(*idtrack)) {
217 Error("CollectionContainer", "No information available to tell if the muon is LRT or standard. Either run MuonLRTMergingAlg to decorate with `isLRT` flag, or supply the patternRecoInfo for the original ID track.");
218 }
219 std::bitset<xAOD::NumberOfTrackRecoInfo> patternBitSet(patternAcc(*idtrack));
220 if (patternBitSet.test(xAOD::SiSpacePointsSeedMaker_LargeD0)) return FindLRTContainer(mu);
221 }
222 }
223 }
224 if (ptAcc(mu) < m_ref_tool.lowPtTransition()) {
225 if (std::abs(etaAcc(mu)) >= 2.5) {
226 return m_forward_eff.get();
227 }
228 if (muonTypeAcc(mu) == xAOD::Muon::CaloTagged) {
229 return m_lowpt_calo_eff.get();
230 }
231 return m_lowpt_central_eff.get();
232 }
233 if (muonTypeAcc(mu) == xAOD::Muon::CaloTagged) {
234 return m_calo_eff.get();
235 } else if (std::abs(etaAcc(mu)) < 2.5) {
236 return m_central_eff.get();
237 } else {
238 return m_forward_eff.get();
239 }
240 }
242 if (m_central_eff->isBinInMap(bin)) return m_central_eff.get();
243 if (m_forward_eff->isBinInMap(bin)) return m_forward_eff.get();
244 if (m_calo_eff->isBinInMap(bin)) return m_calo_eff.get();
245 if (m_lowpt_central_eff->isBinInMap(bin)) return m_lowpt_central_eff.get();
246 if (m_lowpt_calo_eff->isBinInMap(bin)) return m_lowpt_calo_eff.get();
247 if (m_ref_tool.use_lrt()) {
248 if (m_lrt_central_eff->isBinInMap(bin)) return m_lrt_central_eff.get();
249 if (m_lrt_lowpt_central_eff->isBinInMap(bin)) return m_lrt_lowpt_central_eff.get();
250 }
251 return nullptr;
252 }
254 if (ptAcc(mu) < m_ref_tool.lowPtTransition()) return m_lrt_lowpt_central_eff.get();
255 else return m_lrt_central_eff.get();
256 }
257 EfficiencyScaleFactor* EffiCollection::retrieveSF(const xAOD::Muon& mu, unsigned int RunNumber) const {
258 return retrieveSF (columnar::MuonId (mu), RunNumber);
259 }
262 if (Cont != nullptr) return Cont->retrieve(RunNumber);
263 Warning("EffiCollection::retrieveSF()", "Invalid muon");
264 return nullptr;
265 }
266 unsigned int EffiCollection::nBins() const {
267 unsigned int Nbins = 0;
268 if (m_central_eff) {
269 Nbins += m_central_eff->nBins();
270 }
271 if (m_central_eff != m_calo_eff) {
272 Nbins += m_calo_eff->nBins();
273 }
275 Nbins += m_forward_eff->nBins();
276 }
278 Nbins += m_lowpt_central_eff->nBins();
279 }
281 Nbins += m_lowpt_calo_eff->nBins();
282 }
283 if (m_ref_tool.use_lrt()) {
284 if (m_lrt_central_eff) {
285 Nbins += m_lrt_central_eff->nBins();
286 }
288 Nbins += m_lrt_lowpt_central_eff->nBins();
289 }
290 }
291 return Nbins;
292 }
293 bool EffiCollection::SetSystematicBin(unsigned int Bin) {
295 if (!Cont) return false;
296 return Cont->SetSystematicBin(Bin);
297 }
298 bool EffiCollection::IsLowPtBin(unsigned int Bin) const {
299 return (m_central_eff != m_lowpt_central_eff && m_lowpt_central_eff->isBinInMap(Bin)) ||
300 (m_central_eff != m_lowpt_calo_eff && m_lowpt_calo_eff->isBinInMap(Bin));
301 }
302 bool EffiCollection::IsForwardBin(unsigned int Bin) const {
303 return m_forward_eff != m_central_eff && m_forward_eff->isBinInMap(Bin);
304 }
305
307 if (T == CollectionType::Central) return "Central";
308 if (T == CollectionType::Calo) return "Calo";
309 if (T == CollectionType::Forward) return "Forward";
310 if (T == CollectionType::CentralLowPt) return "CentralLowPt";
311 if (T == CollectionType::CaloLowPt) return "CaloLowPt";
312 return "EffiCollection::FileTypeName() - WARNING: Unknown EffiCollection::CollectionType!";
313 }
314
315 std::string EffiCollection::GetBinName(unsigned int bin) const {
317 if (Cont) {
318 std::string BinName = FileTypeName(Cont->type()) +"_"+ Cont->GetBinName(bin);
319 for (const std::string& R : ToRemove) {
320 BinName = ReplaceExpInString(BinName, R, "");
321 }
322 for (const stringpair& R : ToReplace) {
323 BinName = ReplaceExpInString(BinName, R.first, R.second);
324 }
325 return BinName;
326 }
327 Warning("EffiCollection::GetBinName()", "Unknown bin %u", bin);
328
329 return "UNKNOWN_BIN";
330 }
333 if (container) return container->FindBinSF(mu);
334 return -1;
335 }
337 return m_syst_set.get();
338 }
340 return m_syst_set->find(variation) != m_syst_set->end();
341 }
343 if (set.empty()) return m_syst_set->empty();
344 for (const SystematicVariation& variation: set){
345 if (isAffectedBySystematic(variation)) return true;
346 }
347 return false;
348 }
349
350
351 //################################################################################
352 // CollectionContainer
353 //################################################################################
355 m_SF(),
356 m_currentSF(nullptr),
357 m_FileType(FileType),
358 m_binOffSet(0){
359
360 std::map<std::string, std::pair<unsigned int, unsigned int>> map = findPeriods(ref_tool);
361 for (auto& period : map) {
362 m_SF.push_back(std::make_shared<EfficiencyScaleFactor>(ref_tool, fileName(ref_tool), period.first));
363 m_SF.back()->setFirstLastRun(period.second.first, period.second.second);
364 }
365 }
366 CollectionContainer::CollectionContainer(const MuonEfficiencyScaleFactors& ref_tool, CollectionContainer* Nominal, const std::string& syst_name, unsigned int syst_bit_map):
367 m_SF(),
368 m_currentSF(nullptr),
369 m_FileType(Nominal->type()),
370 m_binOffSet(0) {
371 std::map<std::string, std::pair<unsigned int, unsigned int>> map = findPeriods(ref_tool);
372 for (auto& period : map) {
373 std::vector< std::shared_ptr<EfficiencyScaleFactor>>::const_iterator itr = std::find_if( Nominal->m_SF.begin(),
374 Nominal->m_SF.end(),
375 [&period](const std::shared_ptr<EfficiencyScaleFactor>& a){
376 return a->coversRunNumber(period.second.first);
377 });
378 m_SF.push_back(std::make_shared<EfficiencyScaleFactor>(*itr, ref_tool, fileName(ref_tool), period.first, syst_name, syst_bit_map));
379 m_SF.back()->setFirstLastRun(period.second.first, period.second.second);
380 }
381 }
382 std::map<std::string, std::pair<unsigned int, unsigned int>> CollectionContainer::findPeriods(const MuonEfficiencyScaleFactors& ref_tool) const{
383
384 std::string file_name = fileName(ref_tool);
385 std::map<std::string, std::pair<unsigned int, unsigned int>> map;
386
387 std::unique_ptr<TFile> fin (TFile::Open(file_name.c_str()));
388 if (!fin || !fin->IsOpen()) {
389 Error("CollectionContainer","Unable to open file %s", file_name.c_str());
390 return map;
391 }
392 TTree* intree = 0;
393 fin->GetObject("LumiData", intree);
394
395 // if no Lumi tree is found, we assume that the SF are not binned in time
396 if (!intree) {
397 map["All"] = std::pair<unsigned int,unsigned int>(1, 999999);
398 } else {
399 std::string *period = 0;
400 unsigned int firstRun = 0;
401 unsigned int lastRun = 0;
402 intree->SetBranchAddress("Period", &period);
403 intree->SetBranchAddress("FirstRun", &firstRun);
404 intree->SetBranchAddress("LastRun", &lastRun);
405 for (int t = 0; intree->GetEntry(t); t++) {
406 map[*period] = std::pair<unsigned int, unsigned int>(firstRun, lastRun);
407 }
408 }
409 return map;
410 }
413 if (type() == EffiCollection::CollectionType::Calo) return ref_tool.filename_Calo();
416 return ref_tool.filename_HighEta();
417 }
418
420 if (m_SF.empty()) {
421 Error("CollectionContainer", "Could not retrieve any SFs from the input file");
422 return false;
423 }
425 for (std::vector< std::shared_ptr<EfficiencyScaleFactor>>::const_iterator first_sf = m_SF.begin() ; first_sf != m_SF.end(); ++first_sf) {
426 if (!(*first_sf)->CheckConsistency()) return false;
427 for (std::vector< std::shared_ptr<EfficiencyScaleFactor>>::const_iterator second_sf = m_SF.begin(); second_sf != first_sf; ++second_sf) {
428 if ( (*first_sf)->coversRunNumber( (*second_sf)->firstRun()) || (*first_sf)->coversRunNumber((*second_sf)->lastRun()) ||
429 (*second_sf)->coversRunNumber( (*first_sf)->firstRun()) || (*second_sf)->coversRunNumber((*first_sf)->lastRun())){
430 Error("CollectionContainer", "Overlapping periods observed in file type %s. As run %i is in period %i - %i. Please check your SF file!",
431 EffiCollection::FileTypeName(m_FileType).c_str(), (*first_sf)->firstRun(), (*second_sf)->firstRun(), (*second_sf)->lastRun());
432 return false;
433 }
434 }
435 }
436
437 std::sort(m_SF.begin(), m_SF.end(), [](const std::shared_ptr<EfficiencyScaleFactor>& a, const std::shared_ptr<EfficiencyScaleFactor>& b){
438 return a->firstRun() < b->firstRun();});
439 return true;
440 }
441 bool CollectionContainer::LoadPeriod(unsigned int RunNumber) {
442 if (!m_currentSF || !m_currentSF->coversRunNumber(RunNumber)) {
443 for (auto& period : m_SF) {
444 if (period->coversRunNumber(RunNumber)) {
445 m_currentSF = period.get();
446 return true;
447 }
448 }
449 } else return true;
450 Warning("CollectionContainer", "Could not find any SF period in %s matching the run number %u", EffiCollection::FileTypeName(type()).c_str(), RunNumber);
451 return false;
452 }
454 if (!LoadPeriod(RunNumber)) {
455 return (*m_SF.begin()).get();
456 }
457 return m_currentSF;
458 }
460 for ( std::shared_ptr<EfficiencyScaleFactor>& Period : m_SF) {
461 if (!Period->SetSystematicBin(Bin- m_binOffSet)) {
462 return false;
463 }
464 }
465 return true;
466 }
467 unsigned int CollectionContainer::nBins() const {
468 return m_SF.empty() ? 0 : (*m_SF.begin())->nBins();
469 }
471 return m_SF.empty() ? 0 : (*m_SF.begin())->nOverFlowBins();
472 }
474 return m_SF.empty() ? true : (*m_SF.begin())->isOverFlowBin(b-m_binOffSet);
475 }
476 bool CollectionContainer::isBinInMap(unsigned int bin) const{
477 return m_binOffSet <= bin && bin < m_binOffSet + nBins();
478 }
482 std::string CollectionContainer::GetBinName(unsigned int Bin) const {
483 return (*m_SF.begin())->GetBinName(Bin- m_binOffSet);
484 }
486 if (m_SF.empty() ) return -1;
487 int bin = (*m_SF.begin())->FindBinSF(mu);
488 return bin > 0 ? m_binOffSet + bin : bin;
489 }
490 void CollectionContainer::SetGlobalOffSet(unsigned int OffSet){
491 m_binOffSet = OffSet;
492 }
494 return m_binOffSet;
495 }
497 if (m_SF.empty()) return false;
498 return (*m_SF.begin())->sysname(false).empty();
499 }
501 if (m_SF.empty()) return false;
502 return (*m_SF.begin())->IsUpVariation();
503 }
505 if (m_SF.empty()) return false;
506 return (*m_SF.begin())->separateBinSyst();
507 }
508 std::string CollectionContainer::sysname() const{
509 if (m_SF.empty()) return "UNKNOWN SYST";
510 return (*m_SF.begin())->sysname(false);
511 }
513 for (auto& SF : m_SF)
514 parentTool.addSubtool(*SF);
515 }
516}
static Double_t a
The collection container manages the time binning of a particular scale-factor map.
std::map< std::string, std::pair< unsigned int, unsigned int > > findPeriods(const MuonEfficiencyScaleFactors &ref_tool) const
unsigned int nOverFlowBins() const
Number of overflow bins in the map.
EffiCollection::CollectionType m_FileType
void addSubtoolsTo(columnar::ColumnarTool<> &parentTool)
std::vector< std::shared_ptr< EfficiencyScaleFactor > > m_SF
bool isBinInMap(unsigned int bin) const
Checks if the global bin number belongs to this map.
bool isOverFlowBin(int b) const
Check whether the bin is overflow or not.
std::string GetBinName(unsigned int Bin) const
Name of the i-th bin.
EffiCollection::CollectionType type() const
File type of the map.
std::string fileName(const MuonEfficiencyScaleFactors &ref_tool) const
std::string sysname() const
Returns MUON_EFF_<sysname()>
int FindBinSF(const xAOD::Muon &mu) const
Returns the global bin number corresponding to the muon kinematics.
EfficiencyScaleFactor * m_currentSF
bool LoadPeriod(unsigned int RunNumber)
void SetGlobalOffSet(unsigned int OffSet)
Sets the global offset to align the order in the map into a global numbering scheme.
EfficiencyScaleFactor * retrieve(unsigned int RunNumer)
Retrieve the scale-factor map belonging to that particular run of data-taking.
unsigned int nBins() const
Number of bins of the map itself.
unsigned int m_binOffSet
Offset to translate between the bin-numbers in the bin numbers of each file against the global bin-nu...
unsigned int globalOffSet() const
Global offset of the bin numbers.
CollectionContainer(const MuonEfficiencyScaleFactors &ref_tool, EffiCollection::CollectionType FileType)
Nominal constructor... Only needs to know about it's type and the file to load.
bool SetSystematicBin(unsigned int Bin)
Activate this bin to run in the uncorrelated systematic mode.
bool CheckConsistency()
Consistency check of all scale-factor maps managed by the container instance.
columnar::MuonAccessor< columnar::RetypeColumn< double, float > > etaAcc
columnar::MuonAccessor< columnar::RetypeColumn< xAOD::Muon::MuonType, std::uint16_t > > muonTypeAcc
std::shared_ptr< CollectionContainer > m_forward_eff
bool isAffectedBySystematic(const SystematicVariation &variation) const
Returns whether the given set has variations affecting this Collection.
CollectionContainer * FindContainer(unsigned int bin) const
std::shared_ptr< CollectionContainer > m_central_eff
Make the collection container shared ptr to allow that a systematic EffiCollection can use the same c...
int getUnCorrelatedSystBin(const xAOD::Muon &mu) const
Returns the bin number from which the scale-factor of the muon is going to be retrieved....
CollectionContainer * FindLRTContainer(columnar::MuonId mu) const
bool IsLowPtBin(unsigned int Bin) const
Checks whether the i-th bin belongs to the low-pt map...
std::shared_ptr< CollectionContainer > m_calo_eff
std::shared_ptr< CollectionContainer > m_lrt_central_eff
columnar::MuonAccessor< columnar::RetypeColumn< double, float > > ptAcc
@ Central
The five different scale-factor maps.
bool CheckConsistency()
a consistency check of the scale-factor maps.
columnar::MuonAccessor< char > isLRTmuon
std::string GetBinName(unsigned int bin) const
Returns the global bin name conststucted from the axis titles and the bin borders.
EfficiencyScaleFactor * retrieveSF(const xAOD::Muon &mu, unsigned int RunNumber) const
return the correct SF type to provide, depending on eta and the author
static std::string FileTypeName(EffiCollection::CollectionType T)
bool IsForwardBin(unsigned int Bin) const
Checks whether the i-th bin belongs to the forward map.
std::shared_ptr< CollectionContainer > m_lowpt_central_eff
std::shared_ptr< CollectionContainer > m_lowpt_calo_eff
std::unique_ptr< SystematicSet > m_syst_set
The systematic set is returned back to the MuonEfficiencyScaleFactors instance to register The known ...
bool SetSystematicBin(unsigned int Bin)
If systematic decorrelation is activated then the user needs to loop manually over the syst bins.
unsigned int nBins() const
Get the number of all bins in the scale-factor maps including the overflow & underflow bins.
EffiCollection(MuonEfficiencyScaleFactors &ref_tool)
const MuonEfficiencyScaleFactors & m_ref_tool
std::shared_ptr< CollectionContainer > m_lrt_lowpt_central_eff
std::shared_ptr< CollectionContainer > retrieveContainer(CollectionType Type) const
Method to retrieve a container from the class ordered by a collection type This method is mainly used...
SystematicSet * getSystSet() const
Returns the systematic set affecting this collection.
std::string filename_HighEta() const
High-eta reconstruction scale-factors are not obtained by the means of are not obtained by the means ...
std::string filename_Calo() const
Reconstruction scale-factors have a dedicated map for calo-tag muons around |\eta|<0....
std::string filename_Central() const
The following methods are meant to propagate information from the central tool to the subtool managin...
CP::MuonEfficiencyType measurement() const
Returns the type of the measurement to be carried out... E.g. Reco/TTVA/Iso.
std::string filename_LowPt() const
Returns the scale-factor maps from a complementary scale-factor measurement using the J/Psi or Upsilo...
Class to wrap a set of SystematicVariations.
static SystematicVariation makeToyVariation(const std::string &basename, unsigned toyIndex, float toyScale)
constructor for toy systematics
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
STL class.
STL class.
Select isolated Photons, Electrons and Muons.
std::string ReplaceExpInString(std::string str, const std::string &exp, const std::string &rep)
Replaces all expressions an string by something else.
ObjectId< ContainerId::muon > MuonId
Definition MuonDef.h:25
STL namespace.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version:
@ SiSpacePointsSeedMaker_LargeD0