StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTrgSoftMuDstEmcTriggerMaker.cxx
1 // $Id: StjTrgSoftMuDstEmcTriggerMaker.cxx,v 1.1 2008/08/18 06:37:25 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjTrgSoftMuDstEmcTriggerMaker.h"
4 
5 #include <StEmcTriggerMaker/StEmcTriggerMaker.h>
6 
7 #include <StjTrgSoftGetAdcEt.h>
8 
9 #include <StjTrg.h>
10 
12 
14 : _emcTrigMaker(emcTrigMaker), _adcEt(adcEt)
15 {
16 
17 }
18 
19 void StjTrgSoftMuDstEmcTriggerMaker::setTrg(StjTrg* trg)
20 {
21  _trg = trg;
22  _adcEt->setTrg(_trg);
23 }
24 
25 bool StjTrgSoftMuDstEmcTriggerMaker::soft()
26 {
27  return _emcTrigMaker->isTrigger(_trg->id());
28 }
29 
30 std::vector<int> StjTrgSoftMuDstEmcTriggerMaker::towers()
31 {
32  std::vector<int> ret;
33  std::map<int,int> towerMap = _emcTrigMaker->barrelTowersAboveThreshold(_trg->id());
34  for(std::map<int,int>::const_iterator tower = towerMap.begin(); tower != towerMap.end(); ++tower) {
35  ret.push_back(tower->first);
36  }
37  return ret;
38 }
39 
40 std::vector<int> StjTrgSoftMuDstEmcTriggerMaker::towerDsmAdc()
41 {
42  std::vector<int> ret;
43  std::map<int,int> towerMap = _emcTrigMaker->barrelTowersAboveThreshold(_trg->id());
44  for(std::map<int,int>::const_iterator tower = towerMap.begin(); tower != towerMap.end(); ++tower) {
45  ret.push_back(tower->second);
46  }
47  return ret;
48 }
49 
50 std::vector<int> StjTrgSoftMuDstEmcTriggerMaker::jetPatches()
51 {
52  vector<int> ret;
53  map<int,int> jetPatchMap = _emcTrigMaker->barrelJetPatchesAboveThreshold(_trg->id());
54  for(map<int,int>::const_iterator jp = jetPatchMap.begin(); jp != jetPatchMap.end(); ++jp) {
55  ret.push_back(jp->first);
56  }
57  return ret;
58 }
59 
60 std::vector<int> StjTrgSoftMuDstEmcTriggerMaker::jetPatchDsmAdc()
61 {
62  vector<int> ret;
63  map<int,int> jetPatchMap = _emcTrigMaker->barrelJetPatchesAboveThreshold(_trg->id());
64  for(map<int,int>::const_iterator jp = jetPatchMap.begin(); jp != jetPatchMap.end(); ++jp) {
65  ret.push_back(jp->second);
66  }
67  return ret;
68 }
69 
70 std::vector<unsigned int> StjTrgSoftMuDstEmcTriggerMaker::towerAdc()
71 {
72  return _adcEt->towerAdc();
73 }
74 
75 std::vector<double> StjTrgSoftMuDstEmcTriggerMaker::towerEnergy()
76 {
77  return _adcEt->towerEnergy();
78 }
79 
80 std::vector<double> StjTrgSoftMuDstEmcTriggerMaker::towerEt()
81 {
82  return _adcEt->towerEt();
83 }
84 
85 std::vector<unsigned int> StjTrgSoftMuDstEmcTriggerMaker::jetPatchAdc()
86 {
87  return _adcEt->jetPatchAdc();
88 }
89 
90 std::vector<double> StjTrgSoftMuDstEmcTriggerMaker::jetPatchEnergy()
91 {
92  return _adcEt->jetPatchEnergy();
93 }
94 
95 std::vector<double> StjTrgSoftMuDstEmcTriggerMaker::jetPatchEt()
96 {
97  return _adcEt->jetPatchEt();
98 }
Definition: StjTrg.h:11
map< int, int > barrelJetPatchesAboveThreshold(int trigId)
map contains (key,value) = (patchId,ADC) of all JP above DSM threshold. map is empty if threshold = 0...
map< int, int > barrelTowersAboveThreshold(int trigId)
map contains (key,value) = (softId,ADC) of all towers above DSM threshold. map is empty if threshold ...
int isTrigger(int trigId)
1==Yes,0==No,-1==Don&#39;t Know. Same convention holds for other methods where appropriate.