Commit a68f1707 authored by Luca Mastrolorenzo's avatar Luca Mastrolorenzo

update some histograms in CoefficientDetClu3D.hh

parent 080fac3b
......@@ -25,7 +25,7 @@
double Eta_min = 1.7;
double Eta_max = 2.7;
unsigned minC2dInC3d = 3;
TString ParticleType = "photon";
TString ParticleType = "pion";
bool debug_ = false;
class CoefficientDetClu3D : public AnalysisBase {
......@@ -98,9 +98,12 @@ public:
h_NC3d_vs_C3dMipT = new TH2F("h_NC3d_vs_C3dMipT","h_NC3d_vs_C3dMipT", 400,0,16000,600,0,600);
h_NC3d_vs_C3dTrueSigMipT = new TH2F( "h_NC3d_vs_C3dTrueSigMipT", "h_NC3d_vs_C3dTrueSigMipT", 400, 0, 16000, 600, 0, 600 );
h_C3dMipT_spectrum = new TH1F( "h_C3dMipT_spectrum", "h_C3dMipT_spectrum", 400, 0, 16000 );
h_C3dTrueSimMipT_spectrum = new TH1F( "h_C3dTrueSimMipT_spectrum", "h_C3dTrueSimMipT_spectrum", 500, 0, 20000 );
h_C3dTrueSimMipT_spectrum = new TH1F( "h_C3dTrueSimMipT_spectrum", "h_C3dTrueSimMipT_spectrum", 400, 0, 16000 );
h_C3dNoiseAndPU_spectrum = new TH1F( "h_C3dNoiseAndPU_spectrum", "h_C3dNoiseAndPU_spectrum", 800, -8000, 8000 );
h_C3dNoiseAndPU_spectrum_norm = new TH1F( "h_C3dNoiseAndPU_spectrum_norm", "h_C3dNoiseAndPU_spectrum_norm", 200, -5, 5 );
h_MaxC3dMipT_spectrum = new TH1F( "h_MaxC3dMipT_spectrum", "h_MaxC3dMipT_spectrum", 400, 0, 16000 );
h_MaxC3dTrueSimMipT_spectrum = new TH1F( "h_MaxC3dTrueSimMipT_spectrum", "h_MaxC3dTrueSimMipT_spectrum", 400, 0, 16000 );
h_MaxC3dNoiseAndPU_spectrum = new TH1F( "h_MaxC3dNoiseAndPU_spectrum", "h_MAxC3dNoiseAndPU_spectrum", 800, -8000, 8000 );
h_NTrgHitPerC2d = new TH1F("h_NTrgHitPerC2d", "h_NTrgHitPerC2d", 50, 0, 50);
h_NTrgHitPerLayer = new TH1F("h_NTrgHitPerLayer", "h_NTrgHitPerLayer", 75, 0, 75);
h_NC2dPerLayer = new TH1F("h_NC2dPerLayer", "h_NC2dPerLayer", 52, 0, 52);
......@@ -128,7 +131,7 @@ public:
h_MaxC3dSimMipToSimHitsMipT_vs_SimHitsMipT = new TH2F("h_MaxC3dSimMipToSimHitsMipT_vs_SimHitsMipT", "h_MaxC3dSimMipToSimHitsMipT_vs_SimHitsMipT", 400, 0, 16000,200, 0, 2);
h_NC3dWithSigMipT = new TH1F("h_NC3dWithSigMipT","h_NC3dWithSigMipT", 50,0,50);
h_NC3dWithSigMipT_vs_TOTsimMipT = new TH2F("h_NC3dWithSigMipT_vs_TOTsimMipT","h_NC3dWithSigMipT_vs_TOTsimMipT",400, 0, 16000, 50,0,50);
h_C3dNumber_vs_SigMipTfrac = new TH2F("h_C3dNumber_vs_SigMipTfrac","h_C3dNumber_vs_SigMipTfrac", 30,0,30,140,0,1.4);
double deltaEta(double eta1, double eta2);
double deltaPhi(double phi1, double phi2);
double dist2D(double x1, double y1, double x2, double y2);
......@@ -137,9 +140,6 @@ public:
for(unsigned l(0); l<52; l++)
for(unsigned w(0); w<700; w++)
MatrixEvent[e][l][w] = -1;
}
virtual ~CoefficientDetClu3D() {
......@@ -245,6 +245,7 @@ public:
int nC3dWithSigMipT=0;
if(vTrgC3d.size()<=0) continue;
int iC3d=0;
for( std::vector<TrgC3d>::iterator clu3d = vTrgC3d.begin(); clu3d != vTrgC3d.end(); clu3d++ ) {
if(debug_) std::cout<< "C3d mipT = " << clu3d->transverseMips() << " ( " << clu3d->simTransverseMips(true) << " )" << std::endl;
......@@ -276,7 +277,13 @@ public:
}
}
if( vTrgC2d.size() <= minC2dInC3d ) continue;
if( vTrgC2d.size() <= minC2dInC3d ){
iC3d++;
continue;
}
std::cout << "cluster # " << iC3d << " signal energy fraction = " << clu3d->simTransverseMips(true)/mipT_TOT_endcap << std::endl;
h_C3dNumber_vs_SigMipTfrac->Fill(iC3d, clu3d->simTransverseMips(true)/mipT_TOT_endcap);
iC3d++;
h_mipTsimVsC3d_RatioAllC3d->Fill( clu3d->simTransverseMips(true)/clu3d->transverseMips() );
h_mipTsimVsC3d_RatioAllC3d_vs_C3dMipT->Fill( clu3d->transverseMips(), clu3d->simTransverseMips(true)/clu3d->transverseMips() );
h_mipTsimVsC3d_RatioAllC3d_vs_C3dTrueSigMipT->Fill( clu3d->simTransverseMips(true), clu3d->simTransverseMips(true)/clu3d->transverseMips() );
......@@ -340,6 +347,10 @@ public:
h_mipTsimVsC3d_RatioMaxC3d_vs_C3dMipT->Fill( vTrgC3d[0].transverseMips(), vTrgC3d[0].simTransverseMips(true)/vTrgC3d[0].transverseMips() );
h_mipTsimVsC3d_RatioMaxC3d_vs_C3dTrueSigMipT->Fill(vTrgC3d[0].simTransverseMips(true), vTrgC3d[0].simTransverseMips(true)/vTrgC3d[0].transverseMips() );
h_MaxC3dMipT_spectrum->Fill(vTrgC3d[0].transverseMips());
h_MaxC3dTrueSimMipT_spectrum->Fill(vTrgC3d[0].simTransverseMips(true));
h_MaxC3dNoiseAndPU_spectrum->Fill( (vTrgC3d[0].transverseMips() - vTrgC3d[0].simTransverseMips(true)) );
// h_CluEtaResponseVsEtaC3d->Fill( fabs(vSig[0].position().eta()), deltaEta( vTrgC3d[0].eta(), vSig[0].position().eta() ) );
// h_CluPhiResponseVsPhiC3d->Fill( vSig[0].position().phi(), deltaPhi( vTrgC3d[0].phi(), vSig[0].position().phi() ) );
// h_CluEtaC3dResponseVsEtTrue->Fill( vSig[0].FourP().Et(), deltaEta( vTrgC3d[0].eta(), vSig[0].position().eta() ) );
......@@ -500,6 +511,9 @@ private:
TH1F *h_C3dTrueSimMipT_spectrum;
TH1F *h_C3dNoiseAndPU_spectrum;
TH1F *h_C3dNoiseAndPU_spectrum_norm;
TH1F *h_MaxC3dMipT_spectrum;
TH1F *h_MaxC3dTrueSimMipT_spectrum;
TH1F *h_MaxC3dNoiseAndPU_spectrum;
TH1F *h_NTrgHitPerC2d;
TH1F *h_NTrgHitPerLayer;
TH2F *h_NC2dInC3d_vs_C3dSigToTotMipT;
......@@ -534,7 +548,7 @@ private:
TH2F *h_MaxC3dSimMipToSimHitsMipT_vs_SimHitsMipT;
TH1F *h_NC3dWithSigMipT;
TH2F *h_NC3dWithSigMipT_vs_TOTsimMipT;
TH2F *h_C3dNumber_vs_SigMipTfrac;
int MatrixEvent[2][52][700];
double deltaPhi( double phi1, double phi2) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment