Commit 4bcc06f8 authored by dauncey's avatar dauncey

Major rewrite: geometry V1, V2 and V10; Zoltan/Split; panels

parent 8d9965b3
......@@ -82,6 +82,7 @@ CXXFLAGS += $(HEPMC_FLAGS)
CXXFLAGS += -I$(NAVIGATION_DIR)
CXXFLAGS += -I$(INTERFACE_DIR)
CXXFLAGS += -I$(TOP)/src
CXXFLAGS += -I$(CURRENT)
CXXFLAGS += -I$(RAWDATA_DIR)
#CXXFLAGS += -I$(PYTHON_EXE)
......
No preview for this file type
......@@ -387,6 +387,7 @@ This can be inverted to give
x = x_\mathrm{min}\left(\frac{x_\mathrm{max}}{x_\mathrm{min}}\right)^{y/(2^n-1)}
\end{equation}
\newpage
\subsection{Float representation}
Here, the $2^n$ values are split into an exponent of $E$ bits and a mantissa of
$M$ bits. The naive approach is simply to take the actual value as the
......@@ -474,7 +475,7 @@ value represented has $M+1$ bits also, again with a reduction of 0 bits.
For the extreme value of $M=0$, then the representation is
just the number of bits in the input word. E.g. for $M=0$, $E=4$, then the
table is given below. The value range is less thn $2^{15}=32768$.
table is given below. The value range is less than $2^{15}=32768$.
\bigskip
\begin{center}
......@@ -522,7 +523,7 @@ $E=0$ & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \cr
\end{tabular}
\end{center}
\newpage
\section{Template fit of energy in depth}
Assume a template shape for a photon of $P_l$ per photon energy GeV
......
// Run this using: trgAnalysis.exe -a 2 -s 2
// Run this using: trgAnalysis.exe -a 2 -s 3
#ifndef AnalysisDigHit_HH
#define AnalysisDigHit_HH
......@@ -11,6 +11,8 @@
#include "TH1F.h"
#include "TH2F.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TH1A.hh"
#include "TH2A.hh"
......@@ -27,30 +29,158 @@ public:
AnalysisDigHit(const std::string &sRoot="", const std::string &sOut="")
: AnalysisBase("AnalysisDigHit",sRoot,sOut) {
hNumberOfSimHitSensorCells=new TH1D((fName+"_NumberOfSimHitSensorCells").c_str(),
";Number of sensor cells with SimHits/event",
200,0.0,20000.0);
hNumberOfSimHitSensorCellsVsLayer=new TH2D((fName+"_NumberOfSimHitSensorCellsVsLayer").c_str(),
";Layer;Number of sensor cells with SimHits/event",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,500.0);
hGevOfSimHitSensorCells=new TH1D((fName+"_GevOfSimHitSensorCells").c_str(),
";Deposited energy of SimHits/event (GeV)",
100,0.0,2.0);
hGevOfSimHitSensorCellsVsLayer=new TH2D((fName+"_GevOfSimHitSensorCellsVsLayer").c_str(),
";Layer;Deposited energy of SimHits/event (GeV)",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,0.1);
hNumberOfDigHitSensorCells=new TH1D((fName+"_NumberOfDigHitSensorCells").c_str(),
";Number of sensor cells above DAQ threshold/event",
100,0.0,100000.0);
hNumberOfDigHitSensorCellsVsLayer=new TH2D((fName+"_NumberOfDigHitSensorCellsVsLayer").c_str(),
";Layer;Number of sensor cells above DAQ threshold/event",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,5000.0);
hSimNumberOfDigHitSensorCells=new TH1D((fName+"_SimNumberOfDigHitSensorCells").c_str(),
";Number of sensor cells with SimHits above DAQ threshold/event",
200,0.0,20000.0);
hSimNumberOfDigHitSensorCellsVsLayer=new TH2D((fName+"_SimNumberOfDigHitSensorCellsVsLayer").c_str(),
";Layer;Number of sensor cells with SimHits above DAQ threshold/event",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,500.0);
hSimGevOfDigHitSensorCells=new TH1D((fName+"_SimGevOfDigHitSensorCells").c_str(),
";Deposited sim energy of DigHits/event (GeV)",
100,0.0,2.0);
hSimGevOfDigHitSensorCellsVsLayer=new TH2D((fName+"_SimGevOfDigHitSensorCellsVsLayer").c_str(),
";Layer;Deposited sim energy of DigHits/event (GeV)",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,0.1);
hNumberOfSimHitSensorCells2=new TH1D((fName+"_NumberOfSimHitSensorCells2").c_str(),
";Number of sensor cells with SimHits/event",
100,0.0,10000.0*200.0);
hNumberOfSimHitSensorCellsVsLayer2=new TH2D((fName+"_NumberOfSimHitSensorCellsVsLayer2").c_str(),
";Layer;Number of sensor cells with SimHits/event",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,500.0*200.0);
hGevOfSimHitSensorCells2=new TH1D((fName+"_GevOfSimHitSensorCells2").c_str(),
";Deposited energy of SimHits/event (GeV)",
100,0.0,2.0*200.0);
hGevOfSimHitSensorCellsVsLayer2=new TH2D((fName+"_GevOfSimHitSensorCellsVsLayer2").c_str(),
";Layer;Deposited energy of SimHits/event (GeV)",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,0.1*200.0);
hNumberOfDigHitSensorCells2=new TH1D((fName+"_NumberOfDigHitSensorCells2").c_str(),
";Number of sensor cells above DAQ threshold/event",
100,0.0,100000.0*200.0);
hNumberOfDigHitSensorCellsVsLayer2=new TH2D((fName+"_NumberOfDigHitSensorCellsVsLayer2").c_str(),
";Layer;Number of sensor cells above DAQ threshold/event",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,5000.0*200.0);
hSimNumberOfDigHitSensorCells2=new TH1D((fName+"_SimNumberOfDigHitSensorCells2").c_str(),
";Number of sensor cells with SimHits above DAQ threshold/event",
100,0.0,10000.0*200.0);
hSimNumberOfDigHitSensorCellsVsLayer2=new TH2D((fName+"_SimNumberOfDigHitSensorCellsVsLayer2").c_str(),
";Layer;Number of sensor cells with SimHits above DAQ threshold/event",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,500.0*200.0);
hSimGevOfDigHitSensorCells2=new TH1D((fName+"_SimGevOfDigHitSensorCells2").c_str(),
";Deposited sim energy of DigHits/event (GeV)",
100,0.0,2.0*200);
hSimGevOfDigHitSensorCellsVsLayer2=new TH2D((fName+"_SimGevOfDigHitSensorCellsVsLayer2").c_str(),
";Layer;Deposited sim energy of DigHits/event (GeV)",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
100,0.0,0.1*200.0);
hNoiseModelVsLayerRhoFc=new TH2A((fName+"_"+"NoiseModelVsLayerRhoFc").c_str(),
";Layer;#rho (cm);Noise (fC)",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
150,0.0,300.0);
90,0.0,360.0);
hNoiseModelVsLayerRhoMips=new TH2A((fName+"_"+"NoiseModelVsLayerRhoMips").c_str(),
";Layer;#rho (cm);Noise (MIPs)",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
150,0.0,300.0);
90,0.0,360.0);
hNoiseVsLayerRhoFc=new TH2A((fName+"_"+"NoiseVsLayerRhoFc").c_str(),
";Layer;#rho (cm);Noise (fC)",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
150,0.0,300.0);
90,0.0,360.0);
hNoiseVsLayerRhoMips=new TH2A((fName+"_"+"NoiseVsLayerRhoMips").c_str(),
";Layer;#rho (cm);Noise (MIPs)",
Geometry::kNumberOfLayers,0.0,Geometry::kNumberOfLayers,
150,0.0,300.0);
90,0.0,360.0);
std::vector<std::string> sSL(numbers("SL",3));
std::vector<std::string> sLO(numbers("LO",4));
for(unsigned lo(0);lo<4;lo++) {
for(unsigned sl(0);sl<3;sl++) {
hSimGeVDaqSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"SimGeVDaqSL").c_str(),
";Sim deposited energy (GeV)",
100,0.0,2.0e-4);
hSimFcDaqSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"SimFcDaqSL").c_str(),
";Sim charge (fC)",
100,0.0,10.0);
hSimMipsDaqSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"SimMipsDaqSL").c_str(),
";Sim MIPs",
100,0.0,10.0);
hGeVDaqSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"GeVDaqSL").c_str(),
";Deposited energy (GeV)",
100,0.0,2.0e-4);
hFcDaqSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"FcDaqSL").c_str(),
";Charge (fC)",
100,0.0,10.0);
hMipsDaqSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"MipsDaqSL").c_str(),
";MIPs",
100,0.0,10.0);
hSimGeVTpgSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"SimGeVTpgSL").c_str(),
";Sim deposited energy (GeV)",
100,0.0,2.0e-4);
hSimFcTpgSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"SimFcTpgSL").c_str(),
";Sim charge (fC)",
100,0.0,10.0);
hSimMipsTpgSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"SimMipsTpgSL").c_str(),
";Sim MIPs",
100,0.0,10.0);
hGeVTpgSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"GeVTpgSL").c_str(),
";Deposited energy (GeV)",
100,0.0,2.0e-4);
hFcTpgSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"FcTpgSL").c_str(),
";Charge (fC)",
100,0.0,10.0);
hMipsTpgSL[lo][sl]=new TH1R((fName+"_"+sLO[lo]+sSL[sl]+"MipsTpgSL").c_str(),
";MIPs",
100,0.0,10.0);
}
}
for(unsigned l(0);l<=Geometry::kNumberOfLayers;l++) {
hHitNumber[l]=new TH1F((fName+"_"+sLayerLabel[l]+"HitNumber").c_str(),
(sLayerTitle[l]+";Number").c_str(),
100,0.0,1000.0);
hSimGeV[l]=new TH1F((fName+"_"+sLayerLabel[l]+"SimGeV").c_str(),
hSimGeV[l]=new TH1R((fName+"_"+sLayerLabel[l]+"SimGeV").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV)").c_str(),
100,0.0,2.0e-4);
hSimFc[l][0]=new TH1F((fName+"_"+sLayerLabel[l]+"SimFc0").c_str(),
......@@ -68,7 +198,7 @@ public:
hSimFc[l][4]=new TH1F((fName+"_"+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((fName+"_"+sLayerLabel[l]+"SimMips").c_str(),
hSimMips[l]=new TH1R((fName+"_"+sLayerLabel[l]+"SimMips").c_str(),
(sLayerTitle[l]+";MIPs").c_str(),
100,0.0,10.0);
......@@ -158,13 +288,13 @@ public:
(sLayerTitle[l]+";Charge (fC);Charge (fC)").c_str(),
100,0.0,400.0,100,0.0,400.0);
hGeV[l]=new TH1F((fName+"_"+sLayerLabel[l]+"GeV").c_str(),
hGeV[l]=new TH1R((fName+"_"+sLayerLabel[l]+"GeV").c_str(),
(sLayerTitle[l]+";Deposited energy (GeV)").c_str(),
100,0.0,2.0e-4);
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((fName+"_"+sLayerLabel[l]+"Mips").c_str(),
hMips[l]=new TH1R((fName+"_"+sLayerLabel[l]+"Mips").c_str(),
(sLayerTitle[l]+";MIPs").c_str(),
100,0.0,10.0);
hDeltaMips[l]=new TH1F((fName+"_"+sLayerLabel[l]+"DeltaMips").c_str(),
......@@ -200,10 +330,11 @@ public:
//AdcReading::printStatics();
// Unirradiated noise!!!
DigNoise::setIrradiated(true);
//DigNoise::setIrradiated(false);
//DigNoise::setIrradiated(true);
DigNoise::setIrradiated(false);
DigNoise::resetScale();
//DigNoise::setScale(0.001);
std::cout << "0.5 MIP in thickness 0 = " << DigHit::mipToLoAdc(0,0.5) << " ADC units" << std::endl;
std::cout << "0.5 MIP in thickness 1 = " << DigHit::mipToLoAdc(1,0.5) << " ADC units" << std::endl;
std::cout << "0.5 MIP in thickness 2 = " << DigHit::mipToLoAdc(2,0.5) << " ADC units" << std::endl;
......@@ -235,25 +366,86 @@ public:
}
virtual ~AnalysisDigHit() {
std::cout << std::endl << "Number of SimHits/event" << std::endl;
fNshscAvg.print();
std::cout << std::endl << "GeV of SimHits/event" << std::endl;
fEshscAvg.print();
std::cout << std::endl << "Number of DigHits/event" << std::endl;
fNdhscAvg.print();
std::cout << std::endl << "Number of DigHits with SimHits/event" << std::endl;
fSdhscAvg.print();
std::cout << std::endl << "GeV of SimHits in DigHits/event" << std::endl;
fEdhscAvg.print();
}
virtual bool event(Event &event) {
std::cout << fName << " Event " << fEventNumber << std::endl;
unsigned nshsc(0);
double eshsc(0.0);
unsigned ndhsc(0);
unsigned sdhsc(0);
double edhsc(0.0);
unsigned nTotHits[5]={0,0,0,0,0};
for(unsigned e(0);e<Geometry::kNumberOfEndcaps;e++) {
for(unsigned l(0);l<Geometry::kNumberOfLayers;l++) {
unsigned nshscpl(0);
double eshscpl(0.0);
unsigned ndhscpl(0);
unsigned sdhscpl(0);
double edhscpl(0.0);
unsigned nDigHit(0);
const unsigned wHi(Geometry::numberOfWafersPerLayer(l));
for(unsigned w(0);w<wHi;w++) {
if(Geometry::validWafer(l,w)) {
unsigned lo(Geometry::waferLayout(l,w));
unsigned sl(Geometry::numberOfSublayers(l,w)-1);
DigHit *vDigHit(event.digHits(e,l,w));
const unsigned scHi(Geometry::numberOfSensorCellsPerWafer(l,w));
for(unsigned sc(0);sc<scHi;sc++) {
//if(vDigHit[sc].noiseMips()>0.4) {
if(vDigHit[sc].valid()) {
bool daqSel(vDigHit[sc].daqSelected());
bool tpgSel(vDigHit[sc].tpgSelected());
if(l<40) {
if(vDigHit[sc].simDeposit()>0.0) nshscpl++;
eshscpl+=vDigHit[sc].simDeposit();
if(daqSel) {
ndhscpl++;
if(vDigHit[sc].simDeposit()>0.0) sdhscpl++;
edhscpl+=vDigHit[sc].simDeposit();
}
}
hSimGeVDaqSL[lo][sl]->Fill(vDigHit[sc].simDeposit(),daqSel);
hSimFcDaqSL[lo][sl]->Fill(vDigHit[sc].simCharge(),daqSel);
hSimMipsDaqSL[lo][sl]->Fill(vDigHit[sc].simMips(),daqSel);
hGeVDaqSL[lo][sl]->Fill(vDigHit[sc].deposit(),daqSel);
hFcDaqSL[lo][sl]->Fill(vDigHit[sc].charge(),daqSel);
hMipsDaqSL[lo][sl]->Fill(vDigHit[sc].mips(),daqSel);
hSimGeVTpgSL[lo][sl]->Fill(vDigHit[sc].simDeposit(),tpgSel);
hSimFcTpgSL[lo][sl]->Fill(vDigHit[sc].simCharge(),tpgSel);
hSimMipsTpgSL[lo][sl]->Fill(vDigHit[sc].simMips(),tpgSel);
hGeVTpgSL[lo][sl]->Fill(vDigHit[sc].deposit(),tpgSel);
hFcTpgSL[lo][sl]->Fill(vDigHit[sc].charge(),tpgSel);
hMipsTpgSL[lo][sl]->Fill(vDigHit[sc].mips(),tpgSel);
#if 0
//if(vDigHit[sc].noiseMips()>0.4) {
if(vDigHit[sc].noiseMips()>0.5) nTotHits[0]++;
if(vDigHit[sc].inputMips()>0.5) nTotHits[1]++;
......@@ -277,7 +469,7 @@ public:
vDigHit[sc].print();
vDigHit[sc].process();
vDigHit[sc].print();
assert(false);
//assert(false);
}
Point p(Geometry::point(vDigHit[sc]));
......@@ -307,13 +499,15 @@ public:
hDigHiVsRho[j]->Fill(p.rho(),vDigHit[sc].mips()>0.5);
hSimGeV[j]->Fill(vDigHit[sc].simDeposit());
hSimGeV[j]->Fill(vDigHit[sc].simDeposit(),daqSel);
hSimMips[j]->Fill(vDigHit[sc].simMips(),daqSel);
hSimFc[j][0]->Fill(vDigHit[sc].simCharge());
hSimFc[j][1]->Fill(vDigHit[sc].simCharge());
hSimFc[j][2]->Fill(vDigHit[sc].simCharge());
hSimFc[j][3]->Fill(log10(vDigHit[sc].simCharge()));
hSimFc[j][4]->Fill(log10(vDigHit[sc].simCharge()),vDigHit[sc].simCharge());
hSimMips[j]->Fill(vDigHit[sc].simMips());
hRhoVsSimGeV[j]->Fill(vDigHit[sc].simDeposit(),p.rho());
hRhoVsSimFc[j]->Fill(vDigHit[sc].simCharge(),p.rho());
......@@ -343,9 +537,9 @@ public:
AdcReading::resetMethod();
hChargeVsFc[j]->Fill(vDigHit[sc].simCharge(),vDigHit[sc].charge());
hGeV[j]->Fill(vDigHit[sc].deposit());
hGeV[j]->Fill(vDigHit[sc].deposit(),daqSel);
hFc[j]->Fill(vDigHit[sc].charge());
hMips[j]->Fill(vDigHit[sc].mips());
hMips[j]->Fill(vDigHit[sc].mips(),daqSel);
hDeltaMips[j]->Fill(vDigHit[sc].mips()-vDigHit[sc].simMips());
hRhoVsGeV[j]->Fill(vDigHit[sc].deposit(),p.rho());
......@@ -363,14 +557,54 @@ public:
// << ", " << vDigHit[sc].simCharge() << std::endl;
//hRhoVsFc[j]->Fill(vDigHit[sc].simCharge(),p.rho());
}
//}
#endif
}
}
}
}
hHitNumber[l]->Fill(nDigHit);
hHitNumber[Geometry::kNumberOfLayers]->Fill(nDigHit);
hNumberOfSimHitSensorCellsVsLayer->Fill(l,nshscpl);
hGevOfSimHitSensorCellsVsLayer->Fill(l,eshscpl);
hNumberOfDigHitSensorCellsVsLayer->Fill(l,ndhscpl);
hSimNumberOfDigHitSensorCellsVsLayer->Fill(l,sdhscpl);
hSimGevOfDigHitSensorCellsVsLayer->Fill(l,edhscpl);
hNumberOfSimHitSensorCellsVsLayer2->Fill(l,nshscpl);
hGevOfSimHitSensorCellsVsLayer2->Fill(l,eshscpl);
hNumberOfDigHitSensorCellsVsLayer2->Fill(l,ndhscpl);
hSimNumberOfDigHitSensorCellsVsLayer2->Fill(l,sdhscpl);
hSimGevOfDigHitSensorCellsVsLayer2->Fill(l,edhscpl);
nshsc+=nshscpl;
eshsc+=eshscpl;
ndhsc+=ndhscpl;
sdhsc+=sdhscpl;
edhsc+=edhscpl;
}
}
fNshscAvg+=nshsc;
fEshscAvg+=eshsc;
fNdhscAvg+=ndhsc;
fSdhscAvg+=sdhsc;
fEdhscAvg+=edhsc;
hNumberOfSimHitSensorCells->Fill(nshsc);
hGevOfSimHitSensorCells->Fill(eshsc);
hNumberOfDigHitSensorCells->Fill(ndhsc);
hSimNumberOfDigHitSensorCells->Fill(sdhsc);
hSimGevOfDigHitSensorCells->Fill(edhsc);
hNumberOfSimHitSensorCells2->Fill(nshsc);
hGevOfSimHitSensorCells2->Fill(eshsc);
hNumberOfDigHitSensorCells2->Fill(ndhsc);
hSimNumberOfDigHitSensorCells2->Fill(sdhsc);
hSimGevOfDigHitSensorCells2->Fill(edhsc);
std::cout << "Total hits above threshold = "
<< nTotHits[0]
<< ", " << nTotHits[1]
......@@ -382,11 +616,39 @@ public:
}
protected:
Average fNshscAvg;
Average fEshscAvg;
Average fNdhscAvg;
Average fSdhscAvg;
Average fEdhscAvg;
TH1D *hNumberOfSimHitSensorCells;
TH2D *hNumberOfSimHitSensorCellsVsLayer;
TH1D *hGevOfSimHitSensorCells;
TH2D *hGevOfSimHitSensorCellsVsLayer;
TH1D *hNumberOfDigHitSensorCells;
TH2D *hNumberOfDigHitSensorCellsVsLayer;
TH1D *hSimNumberOfDigHitSensorCells;
TH2D *hSimNumberOfDigHitSensorCellsVsLayer;
TH1D *hSimGevOfDigHitSensorCells;
TH2D *hSimGevOfDigHitSensorCellsVsLayer;
TH1D *hNumberOfSimHitSensorCells2;
TH2D *hNumberOfSimHitSensorCellsVsLayer2;
TH1D *hGevOfSimHitSensorCells2;
TH2D *hGevOfSimHitSensorCellsVsLayer2;
TH1D *hNumberOfDigHitSensorCells2;
TH2D *hNumberOfDigHitSensorCellsVsLayer2;
TH1D *hSimNumberOfDigHitSensorCells2;
TH2D *hSimNumberOfDigHitSensorCellsVsLayer2;
TH1D *hSimGevOfDigHitSensorCells2;
TH2D *hSimGevOfDigHitSensorCellsVsLayer2;
TH1F *hHitNumber[Geometry::kNumberOfLayers+1];
TH1F *hSimGeV[Geometry::kNumberOfLayers+1];
TH1F *hSimFc[Geometry::kNumberOfLayers][5+1];
TH1F *hSimMips[Geometry::kNumberOfLayers+1];
TH1R *hSimGeV[Geometry::kNumberOfLayers+1];
TH1F *hSimFc[Geometry::kNumberOfLayers+1][5];
TH1R *hSimMips[Geometry::kNumberOfLayers+1];
TH2F *hRhoVsSimGeV[Geometry::kNumberOfLayers+1];
TH2F *hRhoVsSimFc[Geometry::kNumberOfLayers+1];
TH2F *hRhoVsSimMips[Geometry::kNumberOfLayers+1];
......@@ -419,15 +681,29 @@ protected:
TH2F *hResultVsFc[Geometry::kNumberOfLayers+1][AdcReading::fMaximumNumberOfMethods];
TH2F *hChargeVsFc[Geometry::kNumberOfLayers+1];
TH1F *hGeV[Geometry::kNumberOfLayers+1];
TH1R *hGeV[Geometry::kNumberOfLayers+1];
TH1F *hFc[Geometry::kNumberOfLayers+1];
TH1F *hMips[Geometry::kNumberOfLayers+1];
TH1R *hMips[Geometry::kNumberOfLayers+1];
TH1F *hDeltaMips[Geometry::kNumberOfLayers+1];
TH2F *hRhoVsGeV[Geometry::kNumberOfLayers+1];
TH2F *hRhoVsFc[Geometry::kNumberOfLayers+1];
TH2F *hRhoVsMips[Geometry::kNumberOfLayers+1];
TH2F *hRhoVsDeltaMips[Geometry::kNumberOfLayers+1];
TH1R *hSimGeVDaqSL[4][3];
TH1R *hSimFcDaqSL[4][3];
TH1R *hSimMipsDaqSL[4][3];
TH1R *hGeVDaqSL[4][3];
TH1R *hFcDaqSL[4][3];
TH1R *hMipsDaqSL[4][3];
TH1R *hSimGeVTpgSL[4][3];
TH1R *hSimFcTpgSL[4][3];
TH1R *hSimMipsTpgSL[4][3];
TH1R *hGeVTpgSL[4][3];
TH1R *hFcTpgSL[4][3];
TH1R *hMipsTpgSL[4][3];
TH2F *hDeltaFcVsSimFc[Geometry::kNumberOfLayers+1];
TH2F *hDeltaFcVsRho[Geometry::kNumberOfLayers+1];
};
......
// Run this using: trgAnalysis.exe -a 16384 -s 4
#ifndef AnalysisMaps_HH
#define AnalysisMaps_HH
#include <cassert>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include "TH1F.h"
#include "TH2F.h"
#include "TProfile.h"
#include "AnalysisBase.hh"
class AnalysisMaps : public AnalysisBase {
public:
enum {
kMaximumTrgHits=1000
};
AnalysisMaps(const std::string &sRoot="",
const std::string &sOut="",
unsigned sAnal=0)
: AnalysisBase("AnalysisMaps",sRoot,sOut) {
hSeparation=new TH2F((fName+"_Separation").c_str(),
";Separation cut;Number of clusters",
100,0.0,0.1,1000,0.0,1000.0);
hEvent=new TH1F((fName+"_Event").c_str(),
";Layer;Number of trgHits",100,0.0,1000.0);
for(unsigned l(0);l<Geometry::kNumberOfLayers;l++) {
hSimHitNumber[l]=new TH1F((fName+"_"+sLayerLabel[l]+"SimHitNumber").c_str(),
(sLayerTitle[l]+";Number").c_str(),
100,0.0,1000.0);
/*
hRatioSum[l]=new TH2F((fName+"_"+sLayerLabel[l]+"RatioSum").c_str(),
";Truth energy (GeV);SimHit energy (GeV)",
100,0.0,200.0,100,0.0,200.0);
*/
}
std::vector<std::string> combo(numbers("Como",6));
for(unsigned c(0);c<combo.size();c++) {
hRatioSumAll[c]=new TH2F((fName+"_"+combo[c]+"RatioSumAll").c_str(),
";Truth energy (GeV);SimHit energy (GeV)",
120,0.0,600.0,120,0.0,600.0);
hRatioSum3x3[c]=new TH2F((fName+"_"+combo[c]+"RatioSum3x3").c_str(),
";Truth energy (GeV);SimHit energy (GeV)",
120,0.0,600.0,120,0.0,600.0);
hRatioSum5x5[c]=new TH2F((fName+"_"+combo[c]+"RatioSum5x5").c_str(),
";Truth energy (GeV);SimHit energy (GeV)",
120,0.0,600.0,120,0.0,600.0);
}
hRatioTruthVsSimHit=new TH2F((fName+"_RatioTruthVsSimHit").c_str(),
";Truth energy (GeV);DigHit energy (GeV)",
100,0.0,200.0,100,0.0,200.0);
hRatioTruthVsDigHit=new TH2F((fName+"_RatioTruthVsDigHit").c_str(),
";Truth energy (GeV);DigHit energy (GeV)",
100,0.0,200.0,100,0.0,200.0);
hRatioSimHitVsDigHit=new TH2F((fName+"_RatioSimHitVsDigHit").c_str(),
";Truth energy (GeV);DigHit energy (GeV)",
100,0.0,200.0,100,0.0,200.0);
hRatioTruthVsTrgHit=new TH2F((fName+"_RatioTruthVsTrgHit").c_str(),