24 #include "StEEmcIUMixMaker.h"
25 #include "StEEmcPool/StEEmcA2EMaker/StEEmcA2EMaker.h"
26 #include "StEEmcIUPointMaker.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"
40 #include "StMcOutputMaker.h"
65 for ( Int_t i=0; i<40; i++ )
mPool.push_back(points);
88 return StMaker::Init();
102 mH1[1]->Fill(
"accepted",1.0);
109 mH1[1]->Fill(
"2+ points", 1.0);
147 if ( !event ) return ;
150 TVector3
vertex = TVector3(v.x(),v.y(),v.z());
154 if ( v.z()==0. && v.x()==0. && v.y()==0. )
return;
166 for ( UInt_t ipoint=0; ipoint<
mPoints.size()-1; ipoint++ ){
167 for ( UInt_t jpoint=ipoint+1; jpoint<
mPoints.size(); jpoint++ )
176 for ( UInt_t isec=0;isec<
mSectorList.size();isec++ )
183 numberofFailpoint.push_back(1);
191 numberofFailpoint.push_back(1);
211 if ( !
mPoints.size() )
return ;
216 Int_t bin=(Int_t)(high_tower.
adc()/100);
218 if ( bin>40 ) bin=40;
225 if ( !event )
return;
227 TVector3
vertex = TVector3(v.x(),v.y(),v.z());
230 if ( v.z()==0. && v.x()==0. && v.y()==0. )
return;
239 for ( UInt_t i=0; i<
mPoints.size(); i++ ) {
244 for ( UInt_t j=0; j<points.size(); j++ ) {
251 for ( UInt_t isec=0;isec<
mSectorList.size();isec++ )
256 if ( !(go1&&go2) )
continue;
281 Int_t ss1=TMath::Max(s1,s2);
282 Int_t ss2=TMath::Min(s1,s2);
295 if ( !event )
return false;
301 mH1[0]->Fill(
"no selection",1.0);
308 go = l1trig.isTrigger( (*iter) );
316 mH1[0]->Fill(name,1.0);
326 mH1.push_back(
new TH1F(
"triggers",
"Number of triggers fired",1,0.,1.));
327 TH1Helper::SetCanRebin(
mH1[0]);
328 mH1.push_back(
new TH1F(
"status",
"Events processed up to...",1,0.,1.));
329 TH1Helper::SetCanRebin(
mH1[1]);
332 mH2.push_back(
new TH2F(
"uvha",
"<u> vs <v> for higher-energy gamma",288,0.,288.,288,0.,288.));
333 mH2.push_back(
new TH2F(
"uvla",
"<u> vs <v> for lower-energy gamma",288,0.,288.,288,0.,288.));
334 mH2.push_back(
new TH2F(
"uvhc",
"<u> vs <v> for higher-energy gamma, mass cut",288,0.,288.,288,0.,288.));
335 mH2.push_back(
new TH2F(
"uvlc",
"<u> vs <v> for lower-energy gamma, mass cut",288,0.,288.,288,0.,288.));
338 mH1real.push_back(
new TH1F(
"massR",
"Invariant mass of photon pairs",360,0.,3.6) );
339 mH1real.push_back(
new TH1F(
"energyR",
"Energy of photon pairs",200,0.,40.));
340 mH1real.push_back(
new TH1F(
"zggR",
"Energy sharing of photon pairs",50,0.,1.));
341 mH1real.push_back(
new TH1F(
"phiggR",
"Opening angle of photon pairs",100,0.,0.1));
342 mH1real.push_back(
new TH1F(
"ptR",
"p_{T} of photon pairs",100,0.,10.));
343 mH1real.push_back(
new TH1F(
"zvertexR",
"Z_{vertex} [cm]",100,-100.,100.));
345 mH1mix.push_back(
new TH1F(
"massM",
"Invariant mass of photon pairs",360,0.,3.6) );
346 mH1mix.push_back(
new TH1F(
"energyM",
"Energy of photon pairs",200,0.,40.));
347 mH1mix.push_back(
new TH1F(
"zggM",
"Energy sharing of photon pairs",50,0.,1.));
348 mH1mix.push_back(
new TH1F(
"phiggM",
"Opening angle of photon pairs",100,0.,0.1));
349 mH1mix.push_back(
new TH1F(
"ptM",
"p_{T} of photon pairs",100,0.,10.));
350 mH1mix.push_back(
new TH1F(
"zvertexM",
"Z_{vertex} [cm]",100,-100.,100.));
358 StEEmcIUPairVec_t::iterator ipair=
mCandidates.begin();
399 h[0]->Fill( pair.
mass() );
401 h[1]->Fill( pair.
energy() );
402 h[2]->Fill( pair.
zgg() );
403 h[3]->Fill( pair.
phigg() );
404 h[4]->Fill( pair.
vertex().Z() );
419 Int_t bin=(Int_t)(high_tower.
adc()/100);
421 if ( bin>40 ) bin=40;
428 std::reverse(points.begin(),points.end());
431 for ( UInt_t i=0; i<
mPoints.size(); i++ ) {
433 TVector3 d=
mPoints[i].position();
441 if ( sec==high_tower.
sector() &&
443 eta==high_tower.
etabin() )
continue;
447 points.push_back(
mPoints[i] );
452 std::reverse(points.begin(),points.end());
Float_t phigg()
Returns opening-angle of pair.
EEmc ADC –> energy maker.
A class for mixing pi0 candidates.
TString mPointMakerName
Point maker name.
TRandom * mRandom
Random number generator for event mixing.
void fillQA(std::vector< TH2F * > &h, StEEmcIUPair pair)
Fill qa distributions.
TVector3 vertex()
Returns vertex of pair.
TString mMuDstMakerName
MuDst name.
void energy(Float_t e, Int_t layer=0)
Set the energy of this point.
void minET(Float_t et)
set minimum ET for pair of points
StEEmcA2EMaker * mEEanalysis
Pointer to ADC 2 energy.
StEEmcIUPointVec_t points()
Return a unique key assigned by the cluster maker.
Int_t mPoolSize
Size of mixed event pool.
void fill()
fill 1d and 2d histograms
Class for building points from smd clusters.
void range(Float_t min, Float_t max)
Mass range for qa histograms.
void mixBackground()
Mix combinatoric pairs.
Int_t etabin() const
Returns the etabin of this tower, pre- or postshower element.
StEEmcIUPairVec_t mBackground
Background pairs mixed on each event.
StEEmcIUPairVec_t mCandidates
Point pairs mixed on each event.
Int_t subsector() const
Returns subsector of this tower, pre- or postshower element.
StEEmcIUMixMaker(const Char_t *name, Int_t size=20)
std::vector< TH1F * > mH1mix
1D mixed histos
std::vector< TH2F * > mH2
2D histos
void cluster(StEEmcIUSmdCluster c, Int_t plane)
Add an smd cluster to this point.
StMuDstMaker * mMuDstMaker
Pointer to MuDst.
void book()
create 1d and 2d histograms
Base class for representing tower, preshower and postshower elements.
Float_t mass()
Returns invariant mass of pair.
Int_t sector()
Returns the sector.
StEEmcTower & hightower(Int_t layer=0)
std::vector< StEEmcIUPointVec_t > mPool
Int_t sector() const
Returns sector of this tower, pre- or postshower element.
Float_t mean()
Return the mean strip number of this cluster.
Float_t energy()
Returns energy of pair.
void maxZ(Float_t z)
set maximum Zgg for pair of points
std::vector< TH1F * > mH1
1D histos
Float_t mMinMass
Min and max mass for gated quantities.
A base class for representing clusters of EEMC smd strips.
void points(const Char_t *name)
sets the name of the point maker
Base class for representing EEMC points.
void minEpoint(Float_t m)
minimum energy for a given point
void mixReal()
Mix real pairs.
void adc(Float_t a)
Set the pedestal-subtracted ADC for this element.
StEEmcIUPoint point(Int_t index)
std::vector< TH1F * > mH1real
1D real histos
bool getTower(const TVector3 &r, int &sec, int &sub, int &etabin, Float_t &dphi, Float_t &deta) const
Bool_t accept(StMuEvent *)
Accept or reject this event (trigger, qa, etc...)
TString mAnalysisName
Analaysis name.
void Clear(Option_t *opts="")
Clear.
StEEmcIUPointVec_t mPoints
Vector of points to mix into X–>gamma gamma.
EEmcGeomSimple * mEEmcTow
Pointer to tower geom.
std::vector< Int_t > mSectorList
StEEmcIUPointMaker * mEEpoints
Pointer to points.
std::vector< Int_t > mTriggerList
Collection of trigger ids as stored in MuDst.
Float_t zgg()
Returns energy-sharing of pair.