1 #include "StEEmcMixQAMaker.h"
2 #include "StEEmcMixMaker.h"
3 #include "StEEmcPointMaker.h"
32 mBins.push_back(10.0);
33 mBins.push_back(15.0);
34 mBins.push_back(20.0);
35 mBins.push_back(200.0);
46 hNcandidates =
new TH1F(
"hNcandidates",
"Number of pairs",30,0.,30.);
48 hMassRall=
new TH1F(
"hMassRall",
"Dipoint invariant mass, integrated",360,0.,3.6);
49 hZvertexRall=
new TH1F(
"hZvertexRall",
"Event vertex",150,-150.,150.);
52 for ( Int_t sec=0;sec<13;sec++ )
54 TString name=
"hYXpair";name+=sec+1;
55 TString title=
"Y vs X [cm] of stable pi0, sector ";title+=sec+1;
56 hYXpair.push_back(
new TH2F(name,title,250,-250.,250.,250,-250.,250.));
57 name=
"hYXhigh";name+=sec+1;
58 title=
"Y vs X [cm] of higher energy gamma, sector ";title+=sec+1;
59 hYXhigh.push_back(
new TH2F(name,title,250,-250.,250.,250,-250.,250.));
60 name.ReplaceAll(
"high",
"low");
61 title.ReplaceAll(
"high",
"low");
62 hYXlow.push_back(
new TH2F(name,title,250,-250.,250.,250,-250.,250.));
63 name=
"hE1E2sec";name+=sec+1;
64 title=
"Energy point1 vs Energy point2 [GeV], sector ";title+=sec+1;
65 hE1E2.push_back(
new TH2F(name,title,100,0.,50.,100,0.,50.));
71 for ( Int_t sec=0;sec<13;sec++ )
75 std::vector<TH1F *> tmp;
78 hZggR.push_back( tmp );
82 TString sec_name =
"-sec";sec_name+=sec+1;
86 TString bin_name =
"-bin";bin_name+=
ptbin;
88 TString hname=
"hMassR";hname+=sec_name;hname+=bin_name;
89 TString htitle=
"Dipoint invariant mass, sector=";htitle+=sec+1;
90 htitle+=
", ptbin="; htitle+=(Int_t)
ptbin;
91 hMassR[sec].push_back(
new TH1F(hname,htitle,360,0.,3.60) );
93 hname=
"hZvertexR";hname+=sec_name;hname+=bin_name;
94 htitle=
"Event vertex";htitle+=sec+1;
95 htitle+=
", ptbin="; htitle+=(Int_t)
ptbin;
96 hZvertexR[sec].push_back(
new TH1F(hname,htitle,150,-150.,150.));
98 hname=
"hZggR";hname+=sec_name;hname+=bin_name;
99 htitle=
"Zgg = |E1-E2|/E, sector= ";htitle+=sec+1; htitle+=
", ptbin=";htitle+=(Int_t)
ptbin;
100 hZggR[sec].push_back(
new TH1F(hname,htitle,50,0.,1.));
102 hname=
"hPhiggR";hname+=sec_name;hname+=bin_name;
103 htitle=
"Opening angle, sector=";htitle+=sec+1;htitle+=
", ptbin=";htitle+=(Int_t)
ptbin;
104 hPhiggR[sec].push_back(
new TH1F(hname,htitle,50,0.,0.1));
106 hname=
"hEnergyR";hname+=sec_name;hname+=bin_name;
107 htitle+=
"Energy, sector=";htitle+=sec+1;htitle+=
", ptbin=";htitle+=(Int_t)
ptbin;
108 hEnergyR[sec].push_back(
new TH1F(hname,htitle,50,0.,50.));
113 TString hname=
"hMassR";hname+=sec_name;hname+=
"-unbinned";
114 TString htitle=
"Dipoint invariant mass, sector=";htitle+=sec+1;
115 hMassR[sec].push_back(
new TH1F(hname,htitle,360,0.,3.6) );
117 hname=
"hZvertexR";hname+=sec_name;hname+=
"-unbinned";
118 htitle=
"Event vertex, sector=";htitle+=sec+1;
119 hZvertexR[sec].push_back(
new TH1F(hname,htitle,150,-150.,150.));
121 hname=
"hZggR";hname+=sec_name;hname+=
"-unbinned";
122 htitle=
"Zgg = |E1-E2|/E, sector=";htitle+=sec+1;
123 hZggR[sec].push_back(
new TH1F(hname,htitle,50,0.,1.));
125 hname=
"hPhiggR";hname+=sec_name;hname+=
"-unbinned";
126 htitle=
"Opening angle, sector=";htitle+=sec+1;
127 hPhiggR[sec].push_back(
new TH1F(hname,htitle,50,0.,0.1));
129 hname=
"hEnergyR";hname+=sec_name;hname+=
"-unbinned";
130 htitle+=
"Energy, sector=";htitle+=sec+1;
131 hEnergyR[sec].push_back(
new TH1F(hname,htitle,50,0.,50.));
136 return StMaker::Init();
146 std::vector< StEEmcPairVec_t > pairs;
147 for ( Int_t sec=0;sec<12;sec++ )
150 pairs.push_back(tmp);
200 for ( UInt_t sec=0;sec<12;sec++ )
204 if ( pairs[sec].size() > (UInt_t)
maxPerSector )
continue;
207 for ( UInt_t i=0;i<pairs[sec].size();i++ )
216 Int_t bin =
ptbin( pair );
217 std::cout <<
"sector=" << sec <<
" mass=" << pair.
mass() <<
" pt = " << pair.
pt() <<
" bin=" << bin << std::endl;
218 if ( bin < 0 )
continue;
252 Float_t e1=point1.energy();
253 Float_t e2=point2.
energy();
255 TVector3 posp = ( e1 * pos1 + e2 * pos2 ) * ( 1.0/(e1+e2) );
257 hYXpair[sec] -> Fill( posp.X(), posp.Y() );
258 hYXhigh[sec] -> Fill( pos1.X(), pos1.Y() );
259 hYXlow[sec] -> Fill( pos2.X(), pos2.Y() );
260 hE1E2[sec] -> Fill( e2, e1 );
262 hYXpair[ 12] -> Fill( posp.X(), posp.Y() );
263 hYXhigh[ 12] -> Fill( pos1.X(), pos1.Y() );
264 hYXlow[ 12] -> Fill( pos2.X(), pos2.Y() );
265 hE1E2[ 12] -> Fill( e2, e1 );
280 for ( UInt_t i=0;i<
mBins.size()-1;i++ )
282 if ( pair.
pt() >
mBins[i] && pair.
pt() <=
mBins[i+1] )
return (Int_t)i;
294 assert(max>min && max>0.);
310 Bool_t towers[720];
for (Int_t i=0;i<720;i++ ) towers[i]=
false;
316 towers[ mytow.
index() ] =
true;
320 towers[ t2.
neighbor(i).index() ] =
true;
324 towers[ t1.
index() ] =
true;
325 towers[ t2.
index() ] =
true;
338 if ( towers[ t.
index() ] ) count++;
Int_t numberOfNeighbors() const
get the number of neighboring towers
StEEmcMixMaker * mEEmixer
Pointer to the pi0 mixer.
Base class for representing EEMC points.
Int_t Init()
initializes the maker
std::vector< std::vector< TH1F * > > hEnergyR
Pair energy [mMin,mMax].
void mixer(const Char_t *name, Float_t min=0., Float_t max=999.)
void energy(Float_t e, Int_t layer=0)
Set the energy of this point.
std::vector< std::vector< TH1F * > > hPhiggR
Opening angle [mMin,mMax].
Int_t sector() const
Returns the sector.
void neighbor(StEEmcTower *n)
add a tower to list of neighbors
StEEmcPoint point(Int_t ipoint)
Return a specified point.
Int_t Make()
processes a single event
TH1F * hZvertexRall
vertex for all events
A maker for creating pi0 histograms.
StEEmcPointMaker * mEEpoints
pointer to the point maker
Int_t numberOfCandidates()
returns the number of candidates
const TVector3 & vertex() const
Returns vertex of pair.
Class for building points from smd clusters.
std::vector< std::vector< TH1F * > > hZggR
Energy sharing [mMin,mMax].
std::vector< std::vector< TH1F * > > hZvertexR
Event vertex [mMin,mMax].
const StEEmcPoint & point(Int_t index) const
std::vector< Float_t > mBins
E1 vs E2.
Bool_t twoBodyCut(StEEmcPair p)
Int_t ptbin(StEEmcPair p)
returns the ptbin the pair is in
Int_t numberOfMixedCandidates()
returns the number of mixed-background candidates
Int_t numberOfPoints()
Return number of points.
Base class for representing tower, preshower and postshower elements.
std::vector< TH2F * > hYXhigh
Y vs X of higher energy gamma.
void points(const Char_t *name)
specifies the name of the point maker
std::vector< std::vector< TH1F * > > hMassR
Bin boundaries in pT.
void tower(const StEEmcTower &t, Float_t w=1.)
Add a tower with specified weight to the point.
void position(const TVector3 &p)
Set the position of this point at the SMD plane.
StEEmcMixQAMaker(const Char_t *name)
constructor
Float_t mass() const
Returns invariant mass of pair.
A class for mixing pi0 candidates.
TH1F * hMassRall
Mass spectrum for all events.
std::vector< TH2F * > hYXlow
Y vs X of lower energy gamma.
Float_t pt() const
Returns pt of pair.
std::vector< TH2F * > hYXpair
Y vs X of pi0 pairs.
std::vector< TH2F * > hE1E2
Energy of first gamma vs energy of second.
A class to represent pairs of points.