2 #include "StEEmcIUMixEvent.h"
9 StEEmcIUMixEvent::StEEmcIUMixEvent()
11 for ( Int_t ii=0;ii<90;ii++ )
17 for ( Int_t ii=0;ii<10;ii++ )
19 pedEEmcDSM_TP[ii+00] = (ii%2)? 3 : 5;
20 pedEEmcDSM_TP[ii+20] = (ii%2)? 3 : 5;
21 pedEEmcDSM_TP[ii+30] = (ii%2)? 3 : 5;
22 pedEEmcDSM_TP[ii+50] = (ii%2)? 3 : 5;
23 pedEEmcDSM_TP[ii+60] = (ii%2)? 3 : 5;
24 pedEEmcDSM_TP[ii+80] = (ii%2)? 3 : 5;
30 void StEEmcIUMixEvent::setEvent(
StMuEvent *event )
34 mEventNumber =
event->eventNumber();
35 mRunId =
event->runId();
36 mRunNumber =
event->runNumber();
37 mEventInfo =
event->eventInfo();
38 mRunInfo =
event->runInfo();
39 mL0trigger =
event->l0Trigger();
40 mMuTriggerIdCollection =
event->triggerIdCollection();
41 mMagneticField =
event->magneticField();
42 mBbcTrigger =
event->bbcTriggerDetector();
43 mEmcTrigger =
event->emcTriggerDetector();
45 mPrimaryVertex =
event->primaryVertexPosition();
49 void StEEmcIUMixEventHead::setEvent(
StMuEvent *event )
52 mEventId =
event->eventId();
53 mEventNumber =
event->eventNumber();
54 mRunId =
event->runId();
55 mRunNumber =
event->runNumber();
57 mNumberOfCandidates = 0;
62 void StEEmcIUMixEvent::Clear(Option_t *o)
65 for ( Int_t i=0;i<MAX_PAIRS;i++ )
94 for ( Int_t ii=0;ii<720;ii++ ) {
113 if (
nPairs >= MAX_PAIRS )
return;
123 float hHeight=p.
pt()*(270.0-p.
vertex().Z())/p.pz()+Rxy;
124 float etatheta=TMath::ATan(hHeight/270.0);
126 float mideta=tan(etatheta/2.0);
127 float eemceta=-log(mideta);
167 Float_t sum=this->
mADC[index];
168 Int_t ieta = index%12;
169 Int_t iphi = index/12;
171 for ( Int_t jeta=ieta-1;jeta<=ieta+1;jeta++ ) {
172 if ( jeta<0||jeta>11 )
continue;
173 for ( Int_t jphi=iphi-1;jphi<=iphi+1;jphi++ ) {
175 Int_t myphi=(jphi+60)%60;
176 if ( myeta==ieta&&myphi==iphi )
continue;
177 Float_t myEt=this->
mADC[ myeta + 12*myphi ];
183 Float_t StEEmcIUMixEvent::sum3x3()
187 for ( Int_t ii=0;ii<720;ii++ )
188 if ( this->
mADC[ii] > max ) {
194 Float_t StEEmcIUMixEvent::htdsm()
197 for ( Int_t ii=0;ii<90;ii++ ) {
198 Float_t dsm=mEmcTrigger.highTowerEndcap(ii);
199 dsm-=pedEEmcDSM_HT[ii];
200 if ( dsm>max ) max=dsm;
204 Float_t StEEmcIUMixEvent::tpdsm()
207 for ( Int_t ii=0;ii<90;ii++ ) {
208 Float_t dsm=mEmcTrigger.patchEndcap(ii);
209 dsm-=pedEEmcDSM_TP[ii];
210 if ( dsm>max ) max=dsm;
214 Int_t StEEmcIUMixEvent::npi0()
217 for ( Int_t ii=0;ii<TMath::Min(5,
nPairs);ii++ )
219 if ( mMass[ii]>0.08 && mMass[ii]<0.18 ) count++;
223 Int_t StEEmcIUMixEvent::deta(Int_t
id)
227 Int_t del = ( mTower1[id]%12 - mTower2[id]%12 );
228 return TMath::Abs(del);
230 Int_t StEEmcIUMixEvent::dphi(Int_t
id)
234 Int_t del = ( mTower1[id]/12 - mTower2[id]/12 + 60 ) % 60;
235 return TMath::Abs(del);
240 void StEEmcIUMixEventHead::Clear(Option_t *opts)
246 mNumberOfCandidates=0;
250 void StEEmcIUMixEventClust::Clear(Option_t *opts)
Float_t phigg()
Returns opening-angle of pair.
Float_t sum3x3(Int_t index)
Float_t pt()
Returns pt of pair.
TVector3 vertex()
Returns vertex of pair.
void energy(Float_t e, Int_t layer=0)
Set the energy of this point.
Int_t mEventId
Items to be copied from StMuEvent.
Int_t nPairs
From EEMC point-maker.
void cluster(StEEmcIUSmdCluster c, Int_t plane)
Add an smd cluster to this point.
Float_t mass()
Returns invariant mass of pair.
Float_t energy()
Returns energy of pair.
StEEmcIUPoint point(Int_t index)
void tower(StEEmcTower t, Float_t w=1.)
Add a tower with specified weight to the point.
TVector3 momentum()
Returns momentum of pair.
Float_t zgg()
Returns energy-sharing of pair.