1 #include "StEEmcMixMaker.h"
2 #include "StEEmcPointMaker.h"
3 #include "StEEmcA2EMaker.h"
5 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
6 #include "StMuDSTMaker/COMMON/StMuDst.h"
7 #include "StMuDSTMaker/COMMON/StMuEvent.h"
8 #include "StEvent/StTriggerIdCollection.h"
9 #include "StEvent/StTriggerId.h"
11 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
12 #include "StarRoot/TH1Helper.h"
41 for ( Int_t i=0; i<40; i++ )
mPool.push_back(points);
61 return StMaker::Init();
72 mH1[1]->Fill(
"accepted",1.0);
79 mH1[1]->Fill(
"2+ points", 1.0);
118 if ( !event ) return ;
120 TVector3
vertex = TVector3(v.x(),v.y(),v.z());
125 if ( v.z()==0. && v.x()==0. && v.y()==0. )
return;
134 for ( UInt_t ipoint=0; ipoint<
mPoints.size()-1; ipoint++ )
135 for ( UInt_t jpoint=ipoint+1; jpoint<
mPoints.size(); jpoint++ )
144 for ( UInt_t isec=0;isec<
mSectorList.size();isec++ )
149 if ( !(go1&&go2) )
continue;
169 if ( !
mPoints.size() )
return ;
174 Int_t bin=(Int_t)(high_tower.
adc()/100);
176 if ( bin>40 ) bin=40;
180 StEEmcPointVec_t &points =
mPool[bin];
183 if ( !event )
return;
185 TVector3 vertex = TVector3(v.x(),v.y(),v.z());
188 if ( v.z()==0. && v.x()==0. && v.y()==0. )
return;
197 for ( UInt_t i=0; i<
mPoints.size(); i++ ) {
202 for ( UInt_t j=0; j<points.size(); j++ ) {
209 for ( UInt_t isec=0;isec<
mSectorList.size();isec++ )
214 if ( !(go1&&go2) )
continue;
235 if ( !event )
return false;
241 mH1[0]->Fill(
"no selection",1.0);
248 go = l1trig.isTrigger( (*iter) );
256 mH1[0]->Fill(name,1.0);
266 mH1.push_back(
new TH1F(
"triggers",
"Number of triggers fired",1,0.,1.));
267 TH1Helper::SetCanRebin(
mH1[0]);
268 mH1.push_back(
new TH1F(
"status",
"Events processed up to...",1,0.,1.));
269 TH1Helper::SetCanRebin(
mH1[1]);
272 mH2.push_back(
new TH2F(
"uvha",
"<u> vs <v> for higher-energy gamma",288,0.,288.,288,0.,288.));
273 mH2.push_back(
new TH2F(
"uvla",
"<u> vs <v> for lower-energy gamma",288,0.,288.,288,0.,288.));
274 mH2.push_back(
new TH2F(
"uvhc",
"<u> vs <v> for higher-energy gamma, mass cut",288,0.,288.,288,0.,288.));
275 mH2.push_back(
new TH2F(
"uvlc",
"<u> vs <v> for lower-energy gamma, mass cut",288,0.,288.,288,0.,288.));
278 mH1real.push_back(
new TH1F(
"massR",
"Invariant mass of photon pairs",360,0.,3.6) );
279 mH1real.push_back(
new TH1F(
"energyR",
"Energy of photon pairs",200,0.,40.));
280 mH1real.push_back(
new TH1F(
"zggR",
"Energy sharing of photon pairs",50,0.,1.));
281 mH1real.push_back(
new TH1F(
"phiggR",
"Opening angle of photon pairs",100,0.,0.1));
282 mH1real.push_back(
new TH1F(
"ptR",
"p_{T} of photon pairs",100,0.,10.));
283 mH1real.push_back(
new TH1F(
"zvertexR",
"Z_{vertex} [cm]",100,-100.,100.));
285 mH1mix.push_back(
new TH1F(
"massM",
"Invariant mass of photon pairs",360,0.,3.6) );
286 mH1mix.push_back(
new TH1F(
"energyM",
"Energy of photon pairs",200,0.,40.));
287 mH1mix.push_back(
new TH1F(
"zggM",
"Energy sharing of photon pairs",50,0.,1.));
288 mH1mix.push_back(
new TH1F(
"phiggM",
"Opening angle of photon pairs",100,0.,0.1));
289 mH1mix.push_back(
new TH1F(
"ptM",
"p_{T} of photon pairs",100,0.,10.));
290 mH1mix.push_back(
new TH1F(
"zvertexM",
"Z_{vertex} [cm]",100,-100.,100.));
298 StEEmcPairVec_t::iterator ipair=
mCandidates.begin();
327 mH2[0]->Fill( uh.mean(), vh.mean() );
328 mH2[1]->Fill( ul.mean(), vl.mean() );
330 mH2[2]->Fill( uh.mean(), vh.mean() );
331 mH2[3]->Fill( ul.mean(), vl.mean() );
339 h[0]->Fill( pair.
mass() );
341 h[1]->Fill( pair.
energy() );
342 h[2]->Fill( pair.
zgg() );
343 h[3]->Fill( pair.
phigg() );
344 h[4]->Fill( pair.
vertex().Z() );
359 Int_t bin=(Int_t)(high_tower.
adc()/100);
361 if ( bin>40 ) bin=40;
365 StEEmcPointVec_t &points =
mPool[bin];
368 std::reverse(points.begin(),points.end());
371 for ( UInt_t i=0; i<
mPoints.size(); i++ ) {
373 TVector3 d=
mPoints[i].position();
381 if ( sec==high_tower.
sector() &&
383 eta==high_tower.
etabin() )
continue;
387 points.push_back(
mPoints[i] );
392 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.