1 #include "StEEmcMixEvent.h"
5 StEEmcMixEvent::StEEmcMixEvent()
7 for ( Int_t ii=0;ii<90;ii++ )
13 for ( Int_t ii=0;ii<10;ii++ )
15 pedEEmcDSM_TP[ii+00] = (ii%2)? 3 : 5;
16 pedEEmcDSM_TP[ii+20] = (ii%2)? 3 : 5;
17 pedEEmcDSM_TP[ii+30] = (ii%2)? 3 : 5;
18 pedEEmcDSM_TP[ii+50] = (ii%2)? 3 : 5;
19 pedEEmcDSM_TP[ii+60] = (ii%2)? 3 : 5;
20 pedEEmcDSM_TP[ii+80] = (ii%2)? 3 : 5;
26 void StEEmcMixEvent::setEvent(
StMuEvent *event )
30 mEventNumber =
event->eventNumber();
31 mRunId =
event->runId();
32 mRunNumber =
event->runNumber();
33 mEventInfo =
event->eventInfo();
34 mRunInfo =
event->runInfo();
35 mL0trigger =
event->l0Trigger();
36 mMuTriggerIdCollection =
event->triggerIdCollection();
37 mMagneticField =
event->magneticField();
38 mBbcTrigger =
event->bbcTriggerDetector();
39 mEmcTrigger =
event->emcTriggerDetector();
45 void StEEmcMixEvent::Clear(Option_t *o)
104 mNumberOfTowerClusters.clear();
105 mNumberOfSmduClusters.clear();
106 mNumberOfSmdvClusters.clear();
108 for ( Int_t ii=0;ii<720;ii++ ) {
126 void StEEmcMixEvent::addPair (
StEEmcPair p ) {
130 mMass.push_back ( p.
mass() );
131 mPT.push_back( p.
pt() );
132 mEta.push_back( p.
momentum().Eta() );
133 mPhi.push_back( p.
momentum().Phi() );
134 mPhigg.push_back( p.
phigg() );
135 mZgg.push_back( p.
zgg() );
136 mEnergy.push_back( p.
energy() );
160 mEpre1.push_back( epre1 );
161 mEpre2.push_back( epre2 );
162 mEpost.push_back( epost );
163 mEsmdu.push_back( esmdu );
164 mEsmdv.push_back( esmdv );
166 mZvertex.push_back( p.
vertex().Z() );
168 mTower1.push_back( p.
point(0).
tower(0).index() );
169 mTower2.push_back( p.
point(1).
tower(0).index() );
180 Float_t sum=this->
mADC[index];
181 Int_t ieta = index%12;
182 Int_t iphi = index/12;
184 for ( Int_t jeta=ieta-1;jeta<=ieta+1;jeta++ ) {
185 if ( jeta<0||jeta>11 )
continue;
186 for ( Int_t jphi=iphi-1;jphi<=iphi+1;jphi++ ) {
188 Int_t myphi=(jphi+60)%60;
189 if ( myeta==ieta&&myphi==iphi )
continue;
190 Float_t myEt=this->
mADC[ myeta + 12*myphi ];
196 Float_t StEEmcMixEvent::sum3x3()
200 for ( Int_t ii=0;ii<720;ii++ )
201 if ( this->
mADC[ii] > max ) {
207 Float_t StEEmcMixEvent::htdsm()
210 for ( Int_t ii=0;ii<90;ii++ ) {
211 Float_t dsm=mEmcTrigger.highTowerEndcap(ii);
212 dsm-=pedEEmcDSM_HT[ii];
213 if ( dsm>max ) max=dsm;
217 Float_t StEEmcMixEvent::tpdsm()
220 for ( Int_t ii=0;ii<90;ii++ ) {
221 Float_t dsm=mEmcTrigger.patchEndcap(ii);
222 dsm-=pedEEmcDSM_TP[ii];
223 if ( dsm>max ) max=dsm;
227 Int_t StEEmcMixEvent::npi0()
230 for ( Int_t ii=0;ii<TMath::Min(5,
nPairs);ii++ )
232 if ( mMass[ii]>0.11 && mMass[ii]<0.17 ) count++;
236 Int_t StEEmcMixEvent::deta(Int_t
id)
240 Int_t del = ( mTower1[id]%12 - mTower2[id]%12 );
241 return TMath::Abs(del);
243 Int_t StEEmcMixEvent::dphi(Int_t
id)
247 Int_t del = ( mTower1[id]/12 - mTower2[id]/12 + 60 ) % 60;
248 return TMath::Abs(del);
Int_t nPairs
From EEMC point-maker.
void cluster(const StEEmcSmdCluster &c, Int_t plane)
Add an smd cluster to this point.
void energy(Float_t e, Int_t layer=0)
Set the energy of this point.
const TVector3 & momentum() const
Returns momentum of pair.
const TVector3 & vertex() const
Returns vertex of pair.
const StEEmcPoint & point(Int_t index) const
std::vector< Int_t > mNumberOfPoints
Float_t sum3x3(Int_t index)
Float_t zgg() const
Returns energy-sharing of pair.
Float_t energy() const
Returns energy of pair.
void tower(const StEEmcTower &t, Float_t w=1.)
Add a tower with specified weight to the point.
Int_t mEventId
Items to be copied from StMuEvent.
std::vector< Int_t > mNumberOfTracks
Float_t mass() const
Returns invariant mass of pair.
Float_t phigg() const
Returns opening-angle of pair.
Float_t pt() const
Returns pt of pair.
A class to represent pairs of points.