StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTrgSoftMuDstTriggerSimuMaker.cxx
1 // $Id: StjTrgSoftMuDstTriggerSimuMaker.cxx,v 1.1 2008/08/18 06:37:26 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjTrgSoftMuDstTriggerSimuMaker.h"
4 
5 #include "StTriggerUtilities/StTriggerSimuMaker.h"
6 #include "StTriggerUtilities/StTriggerSimuResult.h"
7 
8 #include <StjTrg.h>
9 
10 #include <StjTrgSoftGetAdcEt.h>
11 
13 
15 : _simuTrig(simuTrig), _adcEt(adcEt)
16 {
17 
18 }
19 
20 void StjTrgSoftMuDstTriggerSimuMaker::setTrg(StjTrg* trg)
21 {
22  _trg = trg;
23  _adcEt->setTrg(_trg);
24 }
25 
26 bool StjTrgSoftMuDstTriggerSimuMaker::soft()
27 {
28  return _simuTrig->isTrigger(_trg->id());
29 }
30 
31 std::vector<int> StjTrgSoftMuDstTriggerSimuMaker::towers()
32 {
33  StTriggerSimuResult trigResult = _simuTrig->detailedResult(_trg->id());
34 
35  std::vector<short> towerId = trigResult.highTowerIds();
36 
37  std::vector<int> ret;
38 
39  std::copy(towerId.begin(), towerId.end(), back_inserter(ret));
40 
41  return ret;
42 }
43 
44 std::vector<int> StjTrgSoftMuDstTriggerSimuMaker::towerDsmAdc()
45 {
46  StTriggerSimuResult trigResult = _simuTrig->detailedResult(_trg->id());
47 
48  std::vector<short> towerId = trigResult.highTowerIds();
49 
50  std::vector<int> ret;
51 
52  for(size_t i = 0; i != towerId.size(); ++i){
53  ret.push_back(trigResult.highTowerAdc(towerId[i]));
54  }
55 
56  return ret;
57 }
58 
59 std::vector<int> StjTrgSoftMuDstTriggerSimuMaker::jetPatches()
60 {
61  StTriggerSimuResult trigResult = _simuTrig->detailedResult(_trg->id());
62 
63  std::vector<short> jpId = trigResult.jetPatchIds();
64 
65  std::vector<int> ret;
66 
67  std::copy(jpId.begin(), jpId.end(), back_inserter(ret));
68 
69  return ret;
70 }
71 
72 std::vector<int> StjTrgSoftMuDstTriggerSimuMaker::jetPatchDsmAdc()
73 {
74  StTriggerSimuResult trigResult = _simuTrig->detailedResult(_trg->id());
75 
76  std::vector<short> jpId = trigResult.jetPatchIds();
77 
78  std::vector<int> ret;
79 
80  for(size_t i = 0; i != jpId.size(); ++i){
81  ret.push_back(trigResult.jetPatchAdc(jpId[i]));
82  }
83 
84  return ret;
85 }
86 
87 std::vector<unsigned int> StjTrgSoftMuDstTriggerSimuMaker::towerAdc()
88 {
89  return _adcEt->towerAdc();
90 }
91 
92 std::vector<double> StjTrgSoftMuDstTriggerSimuMaker::towerEnergy()
93 {
94  return _adcEt->towerEnergy();
95 }
96 
97 std::vector<double> StjTrgSoftMuDstTriggerSimuMaker::towerEt()
98 {
99  return _adcEt->towerEt();
100 }
101 
102 std::vector<unsigned int> StjTrgSoftMuDstTriggerSimuMaker::jetPatchAdc()
103 {
104  return _adcEt->jetPatchAdc();
105 }
106 
107 std::vector<double> StjTrgSoftMuDstTriggerSimuMaker::jetPatchEnergy()
108 {
109  return _adcEt->jetPatchEnergy();
110 }
111 
112 std::vector<double> StjTrgSoftMuDstTriggerSimuMaker::jetPatchEt()
113 {
114  return _adcEt->jetPatchEt();
115 }
int jetPatchAdc(short jetPatchId) const
returns DSM ADC if above trigger threshold, otherwise -1
int highTowerAdc(short towerId) const
returns DSM ADC if above trigger threshold, otherwise -1
Definition: StjTrg.h:11
const StTriggerSimuResult & detailedResult(int trigId)
returns object containing detailed information about simulation of given trigger