Commit 6757535c authored by dauncey's avatar dauncey
Browse files

Add multiple arguments to trgAnalysis but still need event start to be implemented

parent 6ffeb278
Pipeline #20038 skipped
No preview for this file type
......@@ -78,6 +78,38 @@ But since the solution is defined by $Ma=v$, then $a^T M a = a^T v$. Hence
\mathrm{RMS}^2_\mathrm{min} = \frac{1}{N} \sum_e T_e^2 - a^T M a
= \frac{1}{N} \sum_e T_e^2 - v^T M^{-1} v
\end{equation}
The above can be extended slightly, which may improve the energy response
linearity as well as the RMS. The energy estimation for the event (i.e. the
first equation in this section) can be generally considered to be a polynomial
in the $d_{e,i}$, but with the quadratic and higher terms neglected. However,
it also neglects any constant term. A more general expression would then be
to add another coefficient $b$ to give
\begin{equation}
E_e = b + \sum_i a_i d_{e,i}
\end{equation}
The easiest way to handle this is to allow the index $i$ to go one higher than
previously, specifically change from $i=0,27$ to $i=0,28$ and then define
$a_{28}=b$ and $d_{e,28}=1$. This means the expression simplifies to
\begin{equation}
E_e = \sum_{i=0}^{28} a_i d_{e,i}
\end{equation}
and so an identical calculation to previously holds, simply with the index
running
over a larger range. Explicitly,
the matrix $M$ is now $29\times 29$ with the extra elements being
\begin{equation}
M_{i,28} = M_{28,i} = \frac{1}{N} \sum_e d_{e,28}d_{e,i}
= \frac{1}{N} \sum_e d_{e,i}
\end{equation}
and
\begin{equation}
M_{28,28} = \frac{1}{N} \sum_e d_{e,28}d_{e,28} = 1
\end{equation}
while the extra element in $v$ is
\begin{equation}
v_{28} = \frac{1}{N} \sum_e T_e d_{e,28} = \frac{1}{N} \sum_e T_e
\end{equation}
\section{Units}
Keeping quantities to 16-bit integers.
......
......@@ -14,8 +14,9 @@
class AnalysisBase {
public:
AnalysisBase(const std::string &sName="Base") // ctor
: fName(sName), fTFileHandler(fName) {
AnalysisBase(const std::string &sName="Base",
const std::string &sRoot="") // ctor
: fName(sName), fTFileHandler(fName+(sRoot==""?sRoot:"_"+sRoot)) {
fEventSelect=0;
fPrintLevel=0;
......
......@@ -132,7 +132,7 @@ public:
nWafer[Geometry::numberOfSublayers(l,w)-1]++;
fWaferRho[l][w]=Geometry::waferPoint(l,w).rho();
fWaferRho[l][w]=Geometry::waferPoint(1,l,w).rho();
for(unsigned c(0);c<Geometry::numberOfCells(l,w);c++) {
Point p(Geometry::waferCellPoint(1,l,w,c));
......
......@@ -322,50 +322,107 @@ public:
(sTitle.str()+";Rho (cm);Energy difference (GeV)").c_str(),
200,0.0,200.0);
}
TH1F *hFC000=new TH1F("FC000",";Layer;Coefficient",28,0.0,28.0);
TH1F *hFC200=new TH1F("FC200",";Layer;Coefficient",28,0.0,28.0);
// SimHits; all 1k events fitted with 0 or 200 PU
//if(true) {
// 0 PU
fFitCoeff[0]=5.66014;
fFitCoeff[1]=4.19688;
fFitCoeff[2]=0.307786;
fFitCoeff[3]=2.37461;
fFitCoeff[4]=2.27252;
fFitCoeff[5]=0.264792;
fFitCoeff[6]=0.882856;
fFitCoeff[7]=0.710141;
fFitCoeff[8]=1.40916;
fFitCoeff[9]=1.49218;
fFitCoeff[10]=1.19712;
fFitCoeff[11]=1.05946;
fFitCoeff[12]=1.34921;
fFitCoeff[13]=0.960359;
fFitCoeff[14]=0.817771;
fFitCoeff[15]=1.28552;
fFitCoeff[16]=1.62068;
fFitCoeff[17]=1.56386;
fFitCoeff[18]=1.25811;
fFitCoeff[19]=0.799995;
fFitCoeff[20]=0.749894;
fFitCoeff[21]=1.1302;
fFitCoeff[22]=1.76742;
fFitCoeff[23]=1.09919;
fFitCoeff[24]=1.29918;
fFitCoeff[25]=0.043092;
fFitCoeff[26]=2.54908;
fFitCoeff[27]=1.0863;
fFitCoeff[28]=0;
fFitCoeff[29]=0;
fFitCoeff[30]=0;
fFitCoeff[31]=0;
fFitCoeff[32]=0;
fFitCoeff[33]=0;
fFitCoeff[34]=0;
fFitCoeff[35]=0;
fFitCoeff[36]=0;
fFitCoeff[37]=0;
fFitCoeff[38]=0;
fFitCoeff[39]=0;
for(unsigned i(0);i<28;i++) {
hFC000->SetBinContent(i+1,fFitCoeff[i]);
}
// SimHits; all 1k events fitted with 200 PU
fFitCoeff[0]=-2.24876;
fFitCoeff[1]=1.28108;
fFitCoeff[2]=1.01436;
fFitCoeff[3]=2.49601;
fFitCoeff[4]=1.98179;
fFitCoeff[5]=1.20344;
fFitCoeff[6]=1.00278;
fFitCoeff[7]=0.695715;
fFitCoeff[8]=1.19054;
fFitCoeff[9]=1.68355;
fFitCoeff[10]=0.800412;
fFitCoeff[11]=1.32589;
fFitCoeff[12]=0.91138;
fFitCoeff[13]=1.3035;
fFitCoeff[14]=0.689325;
fFitCoeff[15]=1.25186;
fFitCoeff[16]=1.46017;
fFitCoeff[17]=1.68828;
fFitCoeff[18]=0.939856;
fFitCoeff[19]=0.682892;
fFitCoeff[20]=0.434451;
fFitCoeff[21]=1.63003;
fFitCoeff[22]=1.94675;
fFitCoeff[23]=2.39824;
fFitCoeff[24]=1.11453;
fFitCoeff[25]=-0.842631;
fFitCoeff[26]=-0.687827;
fFitCoeff[27]=-0.360403;
fFitCoeff[28]=0;
fFitCoeff[29]=0;
fFitCoeff[30]=0;
fFitCoeff[31]=0;
fFitCoeff[32]=0;
fFitCoeff[33]=0;
fFitCoeff[34]=0;
fFitCoeff[35]=0;
fFitCoeff[36]=0;
fFitCoeff[37]=0;
fFitCoeff[38]=0;
fFitCoeff[39]=0;
// } else {
// 200 PU
fFitCoeff[0]=-2.24876;
fFitCoeff[1]=1.28108;
fFitCoeff[2]=1.01436;
fFitCoeff[3]=2.49601;
fFitCoeff[4]=1.98179;
fFitCoeff[5]=1.20344;
fFitCoeff[6]=1.00278;
fFitCoeff[7]=0.695715;
fFitCoeff[8]=1.19054;
fFitCoeff[9]=1.68355;
fFitCoeff[10]=0.800412;
fFitCoeff[11]=1.32589;
fFitCoeff[12]=0.91138;
fFitCoeff[13]=1.3035;
fFitCoeff[14]=0.689325;
fFitCoeff[15]=1.25186;
fFitCoeff[16]=1.46017;
fFitCoeff[17]=1.68828;
fFitCoeff[18]=0.939856;
fFitCoeff[19]=0.682892;
fFitCoeff[20]=0.434451;
fFitCoeff[21]=1.63003;
fFitCoeff[22]=1.94675;
fFitCoeff[23]=2.39824;
fFitCoeff[24]=1.11453;
fFitCoeff[25]=-0.842631;
fFitCoeff[26]=-0.687827;
fFitCoeff[27]=-0.360403;
fFitCoeff[28]=0;
fFitCoeff[29]=0;
fFitCoeff[30]=0;
fFitCoeff[31]=0;
fFitCoeff[32]=0;
fFitCoeff[33]=0;
fFitCoeff[34]=0;
fFitCoeff[35]=0;
fFitCoeff[36]=0;
fFitCoeff[37]=0;
fFitCoeff[38]=0;
fFitCoeff[39]=0;
for(unsigned i(0);i<28;i++) {
hFC200->SetBinContent(i+1,fFitCoeff[i]);
}
// }
// SimHits: all 1k events in SinglePhotonPt35_simHit_1kev
fSgShape[0]=0.00261114;
......
......@@ -20,127 +20,153 @@
class AnalysisSimHit : public AnalysisBase {
public:
AnalysisSimHit(const std::string &sName="AnalysisSimHit") : AnalysisBase(sName) {
hGenVertexX=new TH1F((sName+"_GenVertexX").c_str(),
AnalysisSimHit(const std::string &sRoot="") : AnalysisBase("AnalysisSimHit",sRoot) {
hGenVertexX=new TH1F((fName+"_GenVertexX").c_str(),
";Vertex x (cm)",
100,0.0,1.0);
hGenVertexY=new TH1F((sName+"_GenVertexY").c_str(),
hGenVertexY=new TH1F((fName+"_GenVertexY").c_str(),
";Vertex y (cm)",
100,0.0,1.0);
hGenVertexZ=new TH1F((sName+"_GenVertexZ").c_str(),
hGenVertexZ=new TH1F((fName+"_GenVertexZ").c_str(),
";Vertex z (cm)",
100,-100.0,100.0);
hGenVertexT=new TH1F((sName+"_GenVertexT").c_str(),
hGenVertexT=new TH1F((fName+"_GenVertexT").c_str(),
";Vertex c#tau (cm)",
100,-100.0,100.0);
hMipsVsLayer[0]=new TH2F((fName+"_"+"MipsVsLayer0").c_str(),
";Layer;MIPs",
52,0.0,52.0,100,0.0,10.0);
hMipsVsLayerP[0]=new TProfile((fName+"_"+"MipsVsLayer0P").c_str(),
";Layer;MIPs",
52,0.0,52.0,0.0,10.0);
hMipsVsLayer[1]=new TH2F((fName+"_"+"MipsVsLayer1").c_str(),
";Layer;MIPs",
52,0.0,52.0,100,0.0,100.0);
hMipsVsLayerP[1]=new TProfile((fName+"_"+"MipsVsLayer1P").c_str(),
";Layer;MIPs",
52,0.0,52.0,0.0,100.0);
hMipsVsLayer[2]=new TH2F((fName+"_"+"MipsVsLayer2").c_str(),
";Layer;MIPs",
52,0.0,52.0,100,0.0,1000.0);
hMipsVsLayerP[2]=new TProfile((fName+"_"+"MipsVsLayer2P").c_str(),
";Layer;MIPs",
52,0.0,52.0,0.0,1000.0);
hMipsVsLayer[3]=new TH2F((fName+"_"+"MipsVsLayer3").c_str(),
";Layer;MIPs",
52,0.0,52.0,100,0.0,10000.0);
hMipsVsLayerP[3]=new TProfile((fName+"_"+"MipsVsLayer3P").c_str(),
";Layer;MIPs",
52,0.0,52.0,0.0,10000.0);
for(unsigned l(0);l<=Geometry::kNumberOfLayers;l++) {
hHitNumber[l]=new TH1F((sName+sLayerLabel[l]+"HitNumber").c_str(),
hHitNumber[l]=new TH1F((fName+sLayerLabel[l]+"HitNumber").c_str(),
(sLayerTitle[l]+";Number").c_str(),
100,0.0,l<Geometry::kNumberOfLayers?1000.0:100000.0);
hScaledYVsX[l]=new TH2F((sName+sLayerLabel[l]+"ScaledYVsX").c_str(),
hScaledYVsX[l]=new TH2F((fName+sLayerLabel[l]+"ScaledYVsX").c_str(),
(sLayerTitle[l]+";Scaled x;Scaled y").c_str(),
100,-0.5,0.5,100,-0.5,0.5);
hGev[l]=new TH1F((sName+sLayerLabel[l]+"Gev").c_str(),
hGev[l]=new TH1F((fName+sLayerLabel[l]+"Gev").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV)").c_str(),
100,0.0,2.0e-4);
hFc[l]=new TH1F((sName+sLayerLabel[l]+"Fc").c_str(),
hFc[l]=new TH1F((fName+sLayerLabel[l]+"Fc").c_str(),
(sLayerTitle[l]+";Charge (fC)").c_str(),
100,0.0,20.0);
hMips[l]=new TH1F((sName+sLayerLabel[l]+"Mips").c_str(),
hMips[l]=new TH1F((fName+sLayerLabel[l]+"Mips").c_str(),
(sLayerTitle[l]+";MIPs").c_str(),
100,0.0,10.0);
hCosGev[l]=new TH1F((sName+sLayerLabel[l]+"CosGev").c_str(),
hCosGev[l]=new TH1F((fName+sLayerLabel[l]+"CosGev").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV)").c_str(),
100,0.0,2.0e-4);
hCosFc[l]=new TH1F((sName+sLayerLabel[l]+"CosFc").c_str(),
hCosFc[l]=new TH1F((fName+sLayerLabel[l]+"CosFc").c_str(),
(sLayerTitle[l]+";Charge (fC)").c_str(),
100,0.0,20.0);
hCosMips[l]=new TH1F((sName+sLayerLabel[l]+"CosMips").c_str(),
hCosMips[l]=new TH1F((fName+sLayerLabel[l]+"CosMips").c_str(),
(sLayerTitle[l]+";MIPs").c_str(),
100,0.0,10.0);
hGevVsRho[l]=new TH2F((sName+sLayerLabel[l]+"GevVsRho").c_str(),
hGevVsRho[l]=new TH2F((fName+sLayerLabel[l]+"GevVsRho").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV);#rho (cm)").c_str(),
100,0.0,200.0,100,0.0,2.0e-4);
hFcVsRho[l]=new TH2F((sName+sLayerLabel[l]+"FcVsRho").c_str(),
hFcVsRho[l]=new TH2F((fName+sLayerLabel[l]+"FcVsRho").c_str(),
(sLayerTitle[l]+";Charge (fC);#rho (cm)").c_str(),
100,0.0,200.0,100,0.0,20.0);
hMipsVsRho[l]=new TH2F((sName+sLayerLabel[l]+"MipsVsRho").c_str(),
hMipsVsRho[l]=new TH2F((fName+sLayerLabel[l]+"MipsVsRho").c_str(),
(sLayerTitle[l]+";MIPs;#rho (cm)").c_str(),
100,0.0,200.0,100,0.0,10.0);
hCosGevVsRho[l]=new TH2F((sName+sLayerLabel[l]+"CosGevVsRho").c_str(),
hCosGevVsRho[l]=new TH2F((fName+sLayerLabel[l]+"CosGevVsRho").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV);#rho (cm)").c_str(),
100,0.0,200.0,100,0.0,2.0e-4);
hCosFcVsRho[l]=new TH2F((sName+sLayerLabel[l]+"CosFcVsRho").c_str(),
hCosFcVsRho[l]=new TH2F((fName+sLayerLabel[l]+"CosFcVsRho").c_str(),
(sLayerTitle[l]+";Charge (fC);#rho (cm)").c_str(),
100,0.0,200.0,100,0.0,20.0);
hCosMipsVsRho[l]=new TH2F((sName+sLayerLabel[l]+"CosMipsVsRho").c_str(),
hCosMipsVsRho[l]=new TH2F((fName+sLayerLabel[l]+"CosMipsVsRho").c_str(),
(sLayerTitle[l]+";MIPs;#rho (cm)").c_str(),
100,0.0,200.0,100,0.0,10.0);
hDRho[0][l]=new TH1F((sName+sLayerLabel[l]+"DRho0").c_str(),
hDRho[0][l]=new TH1F((fName+sLayerLabel[l]+"DRho0").c_str(),
(sLayerTitle[l]+";#Delta#rho (cm)").c_str(),
100,-25.0,25.0);
hDRhoPhi[0][l]=new TH1F((sName+sLayerLabel[l]+"DRhoPhi0").c_str(),
hDRhoPhi[0][l]=new TH1F((fName+sLayerLabel[l]+"DRhoPhi0").c_str(),
(sLayerTitle[l]+";#rho#Delta#phi (cm)").c_str(),
100,-25.0,25.0);
hDRhoVsDRhoPhi[0][l]=new TH2F((sName+sLayerLabel[l]+"DRhoVsDRhoPhi0").c_str(),
hDRhoVsDRhoPhi[0][l]=new TH2F((fName+sLayerLabel[l]+"DRhoVsDRhoPhi0").c_str(),
(sLayerTitle[l]+";#rho#Delta#phi (cm);#Delta#rho (cm)").c_str(),
100,-25.0,25.0,100,-25.0,25.0);
hDRho[1][l]=new TH1F((sName+sLayerLabel[l]+"DRho1").c_str(),
hDRho[1][l]=new TH1F((fName+sLayerLabel[l]+"DRho1").c_str(),
(sLayerTitle[l]+";#Delta#rho (cm)").c_str(),
100,-25.0,25.0);
hDRhoPhi[1][l]=new TH1F((sName+sLayerLabel[l]+"DRhoPhi1").c_str(),
hDRhoPhi[1][l]=new TH1F((fName+sLayerLabel[l]+"DRhoPhi1").c_str(),
(sLayerTitle[l]+";#rho#Delta#phi (cm)").c_str(),
100,-25.0,25.0);
hDRhoVsDRhoPhi[1][l]=new TH2F((sName+sLayerLabel[l]+"DRhoVsDRhoPhi1").c_str(),
hDRhoVsDRhoPhi[1][l]=new TH2F((fName+sLayerLabel[l]+"DRhoVsDRhoPhi1").c_str(),
(sLayerTitle[l]+";#rho#Delta#phi (cm);#Delta#rho (cm)").c_str(),
100,-25.0,25.0,100,-25.0,25.0);
pGevVsRho[l]=new TProfile((sName+sLayerLabel[l]+"GevVsRhoP").c_str(),
pGevVsRho[l]=new TProfile((fName+sLayerLabel[l]+"GevVsRhoP").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV);#rho (cm)").c_str(),
100,0.0,200.0);
pFcVsRho[l]=new TProfile((sName+sLayerLabel[l]+"FcVsRhoP").c_str(),
pFcVsRho[l]=new TProfile((fName+sLayerLabel[l]+"FcVsRhoP").c_str(),
(sLayerTitle[l]+";Charge (fC);#rho (cm)").c_str(),
100,0.0,200.0);
pMipsVsRho[l]=new TProfile((sName+sLayerLabel[l]+"MipsVsRhoP").c_str(),
pMipsVsRho[l]=new TProfile((fName+sLayerLabel[l]+"MipsVsRhoP").c_str(),
(sLayerTitle[l]+";MIPs;#rho (cm)").c_str(),
100,0.0,200.0);
pCosGevVsRho[l]=new TProfile((sName+sLayerLabel[l]+"CosGevVsRhoP").c_str(),
pCosGevVsRho[l]=new TProfile((fName+sLayerLabel[l]+"CosGevVsRhoP").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV);#rho (cm)").c_str(),
100,0.0,200.0);
pCosFcVsRho[l]=new TProfile((sName+sLayerLabel[l]+"CosFcVsRhoP").c_str(),
pCosFcVsRho[l]=new TProfile((fName+sLayerLabel[l]+"CosFcVsRhoP").c_str(),
(sLayerTitle[l]+";Charge (fC);#rho (cm)").c_str(),
100,0.0,200.0);
pCosMipsVsRho[l]=new TProfile((sName+sLayerLabel[l]+"CosMipsVsRhoP").c_str(),
pCosMipsVsRho[l]=new TProfile((fName+sLayerLabel[l]+"CosMipsVsRhoP").c_str(),
(sLayerTitle[l]+";MIPs;#rho (cm)").c_str(),
100,0.0,200.0);
}
hBhEtaVsTkEta=new TH2F((sName+"_BhEtaVsTkEta").c_str(),
hBhEtaVsTkEta=new TH2F((fName+"_BhEtaVsTkEta").c_str(),
";Track #eta;BH #eta",
200,1.0,3.0,200,1.0,3.0);
hDBhEtaVsTkEta=new TH2F((sName+"_DBhEtaVsTkEta").c_str(),
hDBhEtaVsTkEta=new TH2F((fName+"_DBhEtaVsTkEta").c_str(),
";Track #eta;BH #eta",
200,1.0,3.0,200,-0.2,0.2);
hBhPhiVsTkPhi=new TH2F((sName+"_BhPhiVsTkPhi").c_str(),
hBhPhiVsTkPhi=new TH2F((fName+"_BhPhiVsTkPhi").c_str(),
";Track #phi;BH #phi",
140,-3.5,3.5,140,-3.5,3.5);
hDBhPhiVsTkPhi=new TH2F((sName+"_DBhPhiVsTkPhi").c_str(),
hDBhPhiVsTkPhi=new TH2F((fName+"_DBhPhiVsTkPhi").c_str(),
";Track #phi;BH #phi",
140,-3.5,3.5,200,-0.2,0.2);
for(unsigned l(0);l<=Geometry::kNumberOfBHLayers;l++) {
hBhGev[l]=new TH1F((sName+"_"+sLayerLabel[l]+"BhGev").c_str(),
hBhGev[l]=new TH1F((fName+"_"+sLayerLabel[l]+"BhGev").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV)").c_str(),
100,0.0,2.0e-3);
hBhMips[l]=new TH1F((sName+"_"+sLayerLabel[l]+"BhMips").c_str(),
hBhMips[l]=new TH1F((fName+"_"+sLayerLabel[l]+"BhMips").c_str(),
(sLayerTitle[l]+";MIPs").c_str(),
100,0.0,5.0);
}
......@@ -148,7 +174,7 @@ public:
std::vector<std::string> sEta(numbers("EtaBin",20));
for(unsigned i(0);i<20;i++) {
hBhEtaBin[i]=new TH1F((sName+"_"+sEta[i]+"TkEta").c_str(),
hBhEtaBin[i]=new TH1F((fName+"_"+sEta[i]+"TkEta").c_str(),
";Track #eta",
150,1.0,1.5);
}
......@@ -229,6 +255,8 @@ public:
}
unsigned nSimHitLayer(0);
double simHitMips(0.0);
for(unsigned w(0);w<Geometry::numberOfWafers(l);w++) {
if(Geometry::validWafer(l,w)) {
......@@ -246,6 +274,7 @@ public:
vSimHit[i].print();
}
simHitMips+=vSimHit[i].mips();
Point p(Geometry::point(vSimHit[i]));
Point2D ps(p.scale());
......@@ -297,6 +326,14 @@ public:
hHitNumber[l]->Fill(nSimHitLayer);
hHitNumber[Geometry::kNumberOfLayers]->Fill(nSimHit);
hMipsVsLayer[0]->Fill(l,simHitMips);
hMipsVsLayerP[0]->Fill(l,simHitMips);
hMipsVsLayer[1]->Fill(l,simHitMips);
hMipsVsLayerP[1]->Fill(l,simHitMips);
hMipsVsLayer[2]->Fill(l,simHitMips);
hMipsVsLayerP[2]->Fill(l,simHitMips);
hMipsVsLayer[3]->Fill(l,simHitMips);
hMipsVsLayerP[3]->Fill(l,simHitMips);
}
for(unsigned l(0);l<Geometry::kNumberOfBHLayers;l++) {
......@@ -307,8 +344,10 @@ public:
vL1TrackProj.push_back(vL1Track[i].project(Geometry::layerZBh(e,l)));
}
}
unsigned nSimHitLayer(0);
double simHitMips(0.0);
for(unsigned h(0);h<Geometry::kNumberOfFineEtas;h++) {
for(unsigned f(0);f<Geometry::kNumberOfFinePhis;f++) {
const std::vector<SimHbh>& vSimHbh(event.simHbhs(e,l,h,f));
......@@ -317,6 +356,8 @@ public:
nSimHitLayer+=vSimHbh.size();
for(unsigned i(0);i<vSimHbh.size();i++) {
simHitMips+=vSimHbh[i].mips();
for(unsigned k(0);k<2;k++) {
unsigned j(k==0?l:Geometry::kNumberOfBHLayers);
hBhGev[j]->Fill(vSimHbh[i].deposit());
......@@ -352,6 +393,15 @@ public:
}
}
}
hMipsVsLayer[0]->Fill(l+40,simHitMips);
hMipsVsLayerP[0]->Fill(l+40,simHitMips);
hMipsVsLayer[1]->Fill(l+40,simHitMips);
hMipsVsLayerP[1]->Fill(l+40,simHitMips);
hMipsVsLayer[2]->Fill(l+40,simHitMips);
hMipsVsLayerP[2]->Fill(l+40,simHitMips);
hMipsVsLayer[3]->Fill(l+40,simHitMips);
hMipsVsLayerP[3]->Fill(l+40,simHitMips);
}
}
......@@ -366,6 +416,9 @@ protected:
TH1F *hGenVertexZ;
TH1F *hGenVertexT;
TH2F *hMipsVsLayer[4];
TProfile *hMipsVsLayerP[4];
TH1F *hHitNumber[Geometry::kNumberOfLayers+1];
TH2F *hScaledYVsX[Geometry::kNumberOfLayers+1];
......
#ifndef AnalysisTrgHit_HH
#define AnalysisTrgHit_HH
#include <cassert>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include "TH1F.h"
#include "TH2F.h"
#include "TProfile.h"
#include "DigNoise.hh"
#include "AnalysisBase.hh"
class AnalysisTrgHit : public AnalysisBase {
public:
AnalysisTrgHit(const std::string &sName="AnalysisTrgHit") : AnalysisBase(sName) {
for(unsigned l(0);l<=Geometry::kNumberOfLayers;l++) {
hHitNumber[l]=new TH1F((sName+"_"+sLayerLabel[l]+"HitNumber").c_str(),
(sLayerTitle[l]+";Number").c_str(),
100,0.0,1000.0);
hSelMips[l]=new TH1F((sName+"_"+sLayerLabel[l]+"SelMips").c_str(),
(sLayerTitle[l]+";Deposited energy (MIPs)").c_str(),
100,0.0,1000.0);
hUnsMips[l]=new TH1F((sName+"_"+sLayerLabel[l]+"UnsMips").c_str(),
(sLayerTitle[l]+";Deposited energy (MIPs)").c_str(),
100,0.0,1000.0);
hSimGeV[l]=new TH1F((sName+"_"+sLayerLabel[l]+"SimGeV").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV)").c_str(),
100,0.0,2.0e-4);
hSimFc[l][0]=new TH1F((sName+"_"+sLayerLabel[l]+"SimFc0").c_str(),
(sLayerTitle[l]+";Charge (fC)").c_str(),
100,0.0,20.0);
hSimFc[l][1]=new TH1F((sName+"_"+sLayerLabel[l]+"SimFc1").c_str(),
(sLayerTitle[l]+";Charge (fC)").c_str(),
100,0.0,500.0);
hSimFc[l][2]=new TH1F((sName+"_"+sLayerLabel[l]+"SimFc2").c_str(),
(sLayerTitle[l]+";Charge (fC)").c_str(),
250,0.0,2500.0);
hSimFc[l][3]=new TH1F((sName+"_"+sLayerLabel[l]+"SimFc3").c_str(),
(sLayerTitle[l]+";log_{10}[Charge (fC)]").c_str(),
200,0.0,4.0);
hSimFc[l][4]=new TH1F((sName+"_"+sLayerLabel[l]+"SimFc4").c_str(),
(sLayerTitle[l]+";log_{10}[Charge (fC)];Energy weighted entries").c_str(),
200,0.0,4.0);
hSimMips[l]=new TH1F((sName+"_"+sLayerLabel[l]+"SimMips").c_str(),
(sLayerTitle[l]+";MIPs").c_str(),
100,0.0,10.0);
hNoise[l]=new TH1F((sName+"_"+sLayerLabel[l]+"Noise").c_str(),
(sLayerTitle[l]+";Noise (fC)").c_str(),
100,-2.5,2.5);
hRhoVsSimGeV[l]=new TH2F((sName+"_"+sLayerLabel[l]+"RhoVsSimGeV").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV);#rho (cm)").c_str(),
100,0.0,2.0e-4,100,0.0,200.0);
hRhoVsSimFc[l]=new TH2F((sName+"_"+sLayerLabel[l]+"RhoVsSimFc").c_str(),
(sLayerTitle[l]+";Charge (fC);#rho (cm)").c_str(),
100,0.0,20.0,100,0.0,200.0);
hRhoVsSimMips[l]=new TH2F((sName+"_"+sLayerLabel[l]+"RhoVsSimMips").c_str(),
(sLayerTitle[l]+";MIPs;#rho (cm)").c_str(),
100,0.0,10.0,100,0.0,200.0);
hNoiseVsRho[l]=new TH2F((sName+"_"+sLayerLabel[l]+"NoiseVsRho").c_str(),
(sLayerTitle[l]+";#rho (cm);Noise (fC)").c_str(),
100,0.0,200.0,100,-2.5,2.5);
hAdcVsFcA[l]=new TH2F((sName+"_"+sLayerLabel[l]+"AdcVsFcA").c_str(),
(sLayerTitle[l]+";Charge (fC);Data value").c_str(),
100,0.0,10.0,100,0.0,100.0);
hAdcVsFcB[l]=new TH2F((sName+"_"+sLayerLabel[l]+"AdcVsFcB").c_str(),
(sLayerTitle[l]+";Charge (fC);Data value").c_str(),
120,0.0,120.0,120,0.0,1200.0);
hTotVsFcA[l]=new TH2F((sName+"_"+sLayerLabel[l]+"TotVsFcA").c_str(),
(sLayerTitle[l]+";Charge (fC);Data value").c_str(),
100,0.0,500.0,80,0.0,80.0);
hTotVsFcB[l]=new TH2F((sName+"_"+sLayerLabel[l]+"TotVsFcB").c_str(),
(sLayerTitle[l]+";Charge (fC);Data value").c_str(),