24 #include "StEEmcMixMaker.h"
25 #include "StEEmcPool/StEEmcA2EMaker/StEEmcA2EMaker.h"
26 #include "StEEmcPool/StEEmcPointMaker/StEEmcPointMaker.h"
28 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
29 #include "StMuDSTMaker/COMMON/StMuDst.h"
30 #include "StMuDSTMaker/COMMON/StMuEvent.h"
31 #include "StEvent/StTriggerIdCollection.h"
32 #include "StEvent/StTriggerId.h"
34 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
35 #include "StarRoot/TH1Helper.h"
64 for ( Int_t i=0; i<40; i++ )
mPool.push_back(points);
86 return StMaker::Init();
97 mH1[1]->Fill(
"accepted",1.0);
104 mH1[1]->Fill(
"2+ points", 1.0);
143 if ( !event ) return ;
145 TVector3
vertex = TVector3(v.x(),v.y(),v.z());
150 if ( v.z()==0. && v.x()==0. && v.y()==0. )
return;
159 for ( UInt_t ipoint=0; ipoint<
mPoints.size()-1; ipoint++ )
160 for ( UInt_t jpoint=ipoint+1; jpoint<
mPoints.size(); jpoint++ )
169 for ( UInt_t isec=0;isec<
mSectorList.size();isec++ )
174 if ( !(go1&&go2) )
continue;
194 if ( !
mPoints.size() )
return ;
199 Int_t bin=(Int_t)(high_tower.
adc()/100);
201 if ( bin>40 ) bin=40;
208 if ( !event )
return;
210 TVector3
vertex = TVector3(v.x(),v.y(),v.z());
213 if ( v.z()==0. && v.x()==0. && v.y()==0. )
return;
222 for ( UInt_t i=0; i<
mPoints.size(); i++ ) {
227 for ( UInt_t j=0; j<points.size(); j++ ) {
234 for ( UInt_t isec=0;isec<
mSectorList.size();isec++ )
239 if ( !(go1&&go2) )
continue;
264 Int_t ss1=TMath::Max(s1,s2);
265 Int_t ss2=TMath::Min(s1,s2);
278 if ( !event )
return false;
284 mH1[0]->Fill(
"no selection",1.0);
291 go = l1trig.isTrigger( (*iter) );
299 mH1[0]->Fill(name,1.0);
309 mH1.push_back(
new TH1F(
"triggers",
"Number of triggers fired",1,0.,1.));
310 TH1Helper::SetCanRebin(
mH1[0]);
311 mH1.push_back(
new TH1F(
"status",
"Events processed up to...",1,0.,1.));
312 TH1Helper::SetCanRebin(
mH1[1]);
315 mH2.push_back(
new TH2F(
"uvha",
"<u> vs <v> for higher-energy gamma",288,0.,288.,288,0.,288.));
316 mH2.push_back(
new TH2F(
"uvla",
"<u> vs <v> for lower-energy gamma",288,0.,288.,288,0.,288.));
317 mH2.push_back(
new TH2F(
"uvhc",
"<u> vs <v> for higher-energy gamma, mass cut",288,0.,288.,288,0.,288.));
318 mH2.push_back(
new TH2F(
"uvlc",
"<u> vs <v> for lower-energy gamma, mass cut",288,0.,288.,288,0.,288.));
321 mH1real.push_back(
new TH1F(
"massR",
"Invariant mass of photon pairs",360,0.,3.6) );
322 mH1real.push_back(
new TH1F(
"energyR",
"Energy of photon pairs",200,0.,40.));
323 mH1real.push_back(
new TH1F(
"zggR",
"Energy sharing of photon pairs",50,0.,1.));
324 mH1real.push_back(
new TH1F(
"phiggR",
"Opening angle of photon pairs",100,0.,0.1));
325 mH1real.push_back(
new TH1F(
"ptR",
"p_{T} of photon pairs",100,0.,10.));
326 mH1real.push_back(
new TH1F(
"zvertexR",
"Z_{vertex} [cm]",100,-100.,100.));
328 mH1mix.push_back(
new TH1F(
"massM",
"Invariant mass of photon pairs",360,0.,3.6) );
329 mH1mix.push_back(
new TH1F(
"energyM",
"Energy of photon pairs",200,0.,40.));
330 mH1mix.push_back(
new TH1F(
"zggM",
"Energy sharing of photon pairs",50,0.,1.));
331 mH1mix.push_back(
new TH1F(
"phiggM",
"Opening angle of photon pairs",100,0.,0.1));
332 mH1mix.push_back(
new TH1F(
"ptM",
"p_{T} of photon pairs",100,0.,10.));
333 mH1mix.push_back(
new TH1F(
"zvertexM",
"Z_{vertex} [cm]",100,-100.,100.));
341 StEEmcPairVec_t::iterator ipair=
mCandidates.begin();
370 mH2[0]->Fill( uh.mean(), vh.mean() );
371 mH2[1]->Fill( ul.mean(), vl.mean() );
373 mH2[2]->Fill( uh.mean(), vh.mean() );
374 mH2[3]->Fill( ul.mean(), vl.mean() );
382 h[0]->Fill( pair.
mass() );
384 h[1]->Fill( pair.
energy() );
385 h[2]->Fill( pair.
zgg() );
386 h[3]->Fill( pair.
phigg() );
387 h[4]->Fill( pair.
vertex().Z() );
402 Int_t bin=(Int_t)(high_tower.
adc()/100);
404 if ( bin>40 ) bin=40;
411 std::reverse(points.begin(),points.end());
414 for ( UInt_t i=0; i<
mPoints.size(); i++ ) {
416 TVector3 d=
mPoints[i].position();
424 if ( sec==high_tower.
sector() &&
426 eta==high_tower.
etabin() )
continue;
430 points.push_back(
mPoints[i] );
435 std::reverse(points.begin(),points.end());
TString mPointMakerName
Point maker name.
void cluster(const StEEmcSmdCluster &c, Int_t plane)
Add an smd cluster to this point.
std::vector< TH1F * > mH1mix
1D mixed histos
EEmc ADC –> energy maker.
Base class for representing EEMC points.
EEmcGeomSimple * mEEmcTow
Pointer to tower geom.
void book()
create 1d and 2d histograms
void minEpoint(Float_t m)
minimum energy for a given point
void energy(Float_t e, Int_t layer=0)
Set the energy of this point.
TRandom * mRandom
Random number generator for event mixing.
void fill()
fill 1d and 2d histograms
void Clear(Option_t *opts="")
Clear.
Int_t sector() const
Returns the sector.
std::vector< StEEmcPointVec_t > mPool
StEEmcPointVec_t points()
Return vector of all points found in endcap.
const TVector3 & vertex() const
Returns vertex of pair.
Class for building points from smd clusters.
std::vector< TH1F * > mH1real
1D real histos
TString mAnalysisName
Analaysis name.
void mixBackground()
Mix combinatoric pairs.
Int_t etabin() const
Returns the etabin of this tower, pre- or postshower element.
void mixReal()
Mix real pairs.
const StEEmcPoint & point(Int_t index) const
std::vector< TH2F * > mH2
2D histos
Int_t subsector() const
Returns subsector of this tower, pre- or postshower element.
StEEmcPointMaker * mEEpoints
Pointer to points.
void minET(Float_t et)
set minimum ET for pair of points
Base class for representing tower, preshower and postshower elements.
StMuDstMaker * mMuDstMaker
Pointer to MuDst.
StEEmcTower & hightower(Int_t layer=0)
void maxZ(Float_t z)
set maximum Zgg for pair of points
Float_t zgg() const
Returns energy-sharing of pair.
std::vector< Int_t > mTriggerList
Int_t sector() const
Returns sector of this tower, pre- or postshower element.
Float_t energy() const
Returns energy of pair.
A base class for representing clusters of EEMC smd strips.
Int_t mPoolSize
Size of mixed event pool.
void adc(Float_t a)
Set the pedestal-subtracted ADC for this element.
std::vector< TH1F * > mH1
1D histos
Float_t mass() const
Returns invariant mass of pair.
A class for mixing pi0 candidates.
Float_t phigg() const
Returns opening-angle of pair.
void range(Float_t min, Float_t max)
Mass range for qa histograms.
bool getTower(const TVector3 &r, int &sec, int &sub, int &etabin, Float_t &dphi, Float_t &deta) const
TString mMuDstMakerName
MuDst name.
StEEmcPairVec_t mBackground
Background pairs mixed on each event.
StEEmcPairVec_t mCandidates
Point pairs mixed on each event.
Bool_t accept(StMuEvent *)
Accept or reject this event (trigger, qa, etc...)
void points(const Char_t *name)
sets the name of the point maker
A class to represent pairs of points.
Collection of trigger ids as stored in MuDst.
StEEmcMixMaker(const Char_t *name, Int_t size=20)
StEEmcA2EMaker * mEEanalysis
Pointer to ADC 2 energy.
void fillQA(std::vector< TH2F * > &h, StEEmcPair pair)
Fill qa distributions.
std::vector< Int_t > mSectorList
Float_t mMinMass
Min and max mass for gated quantities.
StEEmcPointVec_t mPoints
Vector of points to mix into X–>gamma gamma.