Commit 14d9bd18 authored by dauncey's avatar dauncey

First reorganisation of geometry files for 8 inch wafers (again)

parents 1b8095c2 bfdc1392
......@@ -316,7 +316,7 @@ public:
hC3dMips[e] ->Fill( clu3d->mips() );
hC3dTmips[e]->Fill( clu3d->transverseMips() );
for( int iC2d = 0; iC2d < vTrgC2d.size(); iC2d++ ) {
for( unsigned iC2d = 0; iC2d < vTrgC2d.size(); iC2d++ ) {
if( vTrgC2d[iC2d]->containsSigEne() )
nC2dSigEne++;
......
......@@ -289,6 +289,7 @@ public:
return Calibration::fFcPerGev;
}
public:
static bool fIrradiated;
......
......@@ -244,9 +244,9 @@ public:
h_MipTmaxC2d_SimMipTmaxC2d->Fill( MIPt_C2d_Max / SimMIPt_C2d_Max );
if(debug) std::cout << " Pion position --- eta,phi =" << vSigProj[i].FourP().Eta() << ", "<< vSigProj[i].position().phi() << " atan2(y,x) = " << TMath::ATan2(vSigProj[i].position().y(), vSigProj[i].position().x() )<<" (x,y) = "<< vSigProj[i].position().x() << ", " << vSigProj[i].position().y() << std::endl;
if(debug) std::cout << " position eta,phi = " << Eta_C2d_Max << ", "<< Phi_C2d_Max << std::endl;
double PtTrue = TMath::Sqrt(vSigProj[i].momentum().x()*vSigProj[i].momentum().x() + vSigProj[i].momentum().y()*vSigProj[i].momentum().y());
//double PtTrue = TMath::Sqrt(vSigProj[i].momentum().x()*vSigProj[i].momentum().x() + vSigProj[i].momentum().y()*vSigProj[i].momentum().y());
double PhiTrue= vSigProj[i].position().phi() ;
double EtaTrue= vSigProj[i].position().eta() ;
//double EtaTrue= vSigProj[i].position().eta() ;
h_PhiTrueFromXY->Fill(PhiTrue);
h_PhiTrueFrom4P->Fill(vSigProj[i].position().phi());
......
......@@ -25,7 +25,7 @@
double Eta_min = 1.7;
double Eta_max = 2.7;
unsigned minC2dInC3d = 3;
TString ParticleType = "pion";
TString ParticleType = "photon";
bool debug_ = false;
class CoefficientDetClu3D : public AnalysisBase {
......@@ -58,7 +58,18 @@ public:
h_C3dPtResponse2D = new TH2F("h_C3dPtResponse2D","h_C3dPtResponse2D",600,0,300,600,0,300);
h_C3dPtResponseGammaPi2D = new TH2F("h_C3dPtResponseGammaPi2D","h_C3dPtResponseGammaPi2D",600,0,300,600,0,300);
h_C3dPtDensityGammaPi2D = new TH2F("h_C3dPtDensityGammaPi2D","h_C3dPtDensityGammaPi2D",100,0,5,100,0,5);
h_C3dShowerCenter = new TH1F("h_C3dShowerCenter","h_C3dShowerCenter",120,0,120);
h_C3dShowerCenter_vs_EtPi = new TH2F("h_C3dShowerCenter_vs_EtPi","h_C3dShowerCenter_vs_EtPi",200,0,200,120,0,120);
h_C3dShowerCenter_vs_TruePt = new TH2F("h_C3dShowerCenter_vs_TruePt","h_C3dShowerCenter_vs_TruePt",200,0,200,120,0,120);
h_C3dShowerCenter_vs_EtGamma = new TH2F("h_C3dShowerCenter_vs_EtGamma","h_C3dShowerCenter_vs_EtGamma",200,0,200,120,0,120);
h_C3dShowerCenter_vs_MipT = new TH2F("h_C3dShowerCenter_vs_MipT","h_C3dShowerCenter_vs_MipT",400,0,16000,120,0,120);
h_C3dShowerCenter_vs_NTrgHitPerC3d = new TH2F("h_C3dShowerCenter_vs_NTrgHitPerC3d","h_C3dShowerCenter_vs_NTrgHitPerC3d",250,0,1000,120,0,120);
h_DistC2dCenterAndMostEneTrgHit = new TH2F("h_DistC2dCenterAndMostEneTrgHit", "h_DistC2dCenterAndMostEneTrgHit",52,0,52,100,0.0,0.1);
h_DistC2dFromMaxC3dCenterAndMostEneTrgHit = new TH2F("h_DistC2dFromMaxC3dCenterAndMostEneTrgHit", "h_DistC2dFromMaxC3dCenterAndMostEneTrgHit",52,0,52,100,0.0,0.1);
h_C3dShowerStart_vs_MipT = new TH2F("h_C3dShowerStart_vs_MipT","h_C3dShowerStart_vs_MipT", 400,0,16000, 120,0,120);
h_C3dShowerStartLayer_vs_MipT = new TH2F("h_C3dShowerStartLayer_vs_MipT","h_C3dShowerStartLayer_vs_MipT", 400,0,16000, 120,0,120);
h_C3dShowerStart_vs_TruePt = new TH2F("h_C3dShowerStart_vs_TruePt","h_C3dShowerStart_vs_TruePt",200,0,200, 120,0,120);
h_C3dShowerStartLayer_vs_TruePt = new TH2F("h_C3dShowerStartLayer_vs_TruePt","h_C3dShowerStartLayer_vs_TruePt", 200,0,200, 120,0,120);
h_CluEtaResponseVsEtaC2d = new TH2F("h_CluEtaResponseVsEtaC2d","h_CluEtaResponseVsEtaC2d",200,1.4,3.2, 200, -0.5, 0.5);
h_CluPhiResponseVsPhiC2d = new TH2F("h_CluPhiResponseVsPhiC2d","h_CluPhiResponseVsPhiC2d",200,-3.5,3.5, 200, -0.5, 0.5);
h_CluEtaResponseVsEtTrue = new TH2F("h_CluEtaResponseVsEtTrue","h_CluEtaResponseVsEtTrue",150,0,150, 200, -0.5, 0.5);
......@@ -72,8 +83,8 @@ public:
h_CluPhiC3dResponseVsEtTrue = new TH2F("h_CluPhiC3dResponseVsEtTrue","h_CluPhiC3dResponseVsEtTrue",150,0,150, 200, -0.5, 0.5);
h_CluEtaC3dVsEtaTrue = new TH2F("h_CluEtaC3dVsEtaTrue","h_CluEtaC3dVsEtaTrue", 200, -3.2, 3.2, 200, -3.2, 3.2);
h_CluPhiC3dVsPhiTrue = new TH2F("h_CluPhiC3dVsPhiTrue","h_CluPhiC3dVsPhiTrue", 200, -3.5, 3.5, 200, -3.5, 3.5);
h_C3dEtaResponse = new TH1F("h_C3dEtaResponse","h_C3dEtaResponse",100,-1,1);
h_C3dPhiResponse = new TH1F("h_C3dPhiResponse","h_C3dPhiResponse",100,-1,1);
h_C3dEtaResponse = new TH1F("h_C3dEtaResponse","h_C3dEtaResponse",200,-0.5,0.5);
h_C3dPhiResponse = new TH1F("h_C3dPhiResponse","h_C3dPhiResponse",200,-0.5,0.5);
// for(unsigned e(0); e<=Geometry::kNumberOfEndcaps; e++){
// if(debug_) std::cout<< ("endcap name "+sEndcapLabel[e]).c_str() << std::endl;
......@@ -101,6 +112,9 @@ public:
h_C2dMipTvsC2dLayer = new TH2F("h_C2dMipTvsC2dLayer", "h_C2dMipTvsC2dLayer", 52, 0, 52, 250, 0, 1000);
h_C2dSigMipTvsC2dLayer = new TH2F("h_C2dSigMipTvsC2dLayer", "h_C2dSigMipTvsC2dLayer", 52, 0, 52, 250, 0, 1000);
h_C2dMaxVsAllRatio = new TH1F("h_C2dMaxVsAllRatio","h_C2dMaxVsAllRatio",110,0,1.1);
h_C2dMaxVsAllRatio_vs_MipT = new TH2F("h_C2dMaxVsAllRatio_vs_MipT","h_C2dMaxVsAllRatio_vs_MipT",400,0,16000,110,0,1.1);
h_NC3d = new TH1F("h_NC3d","h_NC3d",1200,0,1200);
h_NC3d_vs_C3dMipT = new TH2F("h_NC3d_vs_C3dMipT","h_NC3d_vs_C3dMipT", 400,0,16000,1200,0,1200);
h_NC3d_vs_C3dTrueSigMipT = new TH2F( "h_NC3d_vs_C3dTrueSigMipT", "h_NC3d_vs_C3dTrueSigMipT", 400, 0, 16000, 1200, 0, 1200 );
......@@ -112,7 +126,7 @@ public:
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_NTrgHitPerC3d = new TH1F("h_NTrgHitPerC3d", "h_NTrgHitPerC3d", 250, 0, 250);
h_NTrgHitPerC3d = new TH1F("h_NTrgHitPerC3d", "h_NTrgHitPerC3d", 250, 0, 1000);
h_NTrgHitPerLayer = new TH1F("h_NTrgHitPerLayer", "h_NTrgHitPerLayer", 75, 0, 75);
h_NC2dPerLayer = new TH1F("h_NC2dPerLayer", "h_NC2dPerLayer", 52, 0, 52);
h_NC2dInC3d_vs_C3dSigToTotMipT = new TH2F("h_NC2dInC3d_vs_C3dSigToTotMipT", "h_NC2dInC3d_vs_C3dSigToTotMipT", 200, 0, 2, 100,0,100);
......@@ -179,9 +193,11 @@ public:
h_EvtWithSharedC3d = new TH1F("h_EvtWithSharedC3d","h_EvtWithSharedC3d",2,0,2);
h_SharedC2dLayerVsSharedFrac = new TH2F("h_SharedC2dLayerVsSharedFrac","h_SharedC2dLayerVsSharedFrac",52,0,52,200,0,1.2);
h_NotSharedC2dLayerVsSharedFrac = new TH2F("h_NotSharedC2dLayerVsSharedFrac","h_NotSharedC2dLayerVsSharedFrac",52,0,52,200,0,1.2);
h_layerGap_vs_C3dSigMipT = new TH2F("h_layerGap_vs_C3dSigMipT","h_layerGap_vs_C3dSigMipT",52,0,52, 400, 0, 16000 );
h_layerGap_vs_C3dSigMipT = new TH2F("h_layerGap_vs_C3dSigMipT","h_layerGap_vs_C3dSigMipT",400,0,16000, 52,0,52);
h_TrgHitSigMipTFrac_vs_Threshold = new TH2F("h_TrgHitSigMipTFrac_vs_Threshold","h_TrgHitSigMipTFrac_vs_Threshold",20,0,10,200,0,1.2);
h_TrgHitSigMipFrac_vs_Threshold = new TH2F("h_TrgHitSigMipFrac_vs_Threshold","h_TrgHitSigMipFrac_vs_Threshold",11,0,22,200,0,1.2);
h_EoH_Gamma = new TH1F("h_EoH_Gamma","h_EoH_Gamma", 100, 0, 1);
h_EoH_Pi = new TH1F("h_EoH_Pi","h_EoH_Pi", 100, 0, 1);
double deltaEta(double eta1, double eta2);
double deltaPhi(double phi1, double phi2);
......@@ -380,7 +396,7 @@ public:
/** LOOP 3d clusters **/
int TotC2dInC3d=0;
std::vector<TrgC3d> &vTrgC3dOrg( event.trgC3ds(e) );
//std::vector<TrgC3d> &vTrgC3dOrg( event.trgC3ds(e) );
std::vector<TrgC3d> vTrgC3d( event.trgC3ds(e) );
std::sort( vTrgC3d.begin(), vTrgC3d.end(), eneTranOrderC3d );
h_NC3d->Fill( vTrgC3d.size() );
......@@ -392,11 +408,13 @@ public:
if(vTrgC3d.size()<=0) continue;
int iC3d=0;
std::cout << "Shared Energy = " << vTrgC3d[0].C3dSharedTransverseMips(&vTrgC3d[1]) << std::endl;
if(vTrgC3d.size()>1) std::cout << "Shared Energy = " << vTrgC3d[0].C3dSharedTransverseMips(&vTrgC3d[1]) << std::endl;
else std::cout << "There is only one reconstructed C3d!!" << std::endl;
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;
std::vector<TrgC2d*> &vTrgC2d( clu3d->trgC2ds() );
if( vTrgC2d.size() <=1 ) continue;
TotC2dInC3d += vTrgC2d.size();
h_NC2dInC3d_vs_C3dSigToTotMipT->Fill(clu3d->simTransverseMips(true)/clu3d->transverseMips(), vTrgC2d.size());
unsigned nC2dSigEne = 0;
......@@ -428,19 +446,16 @@ public:
if(debug_) std::cout <<" TrgHits from C2d " << iC2d << " layer: " << vTrgHits_fromC2d_fromC3d[ith]->layer() << " Wafer: "<< vTrgHits_fromC2d_fromC3d[ith]->wafer() << std::endl;
h_TrgHitWaferVsLayer_fromC2d_fromC3d[e]->Fill(vTrgHits_fromC2d_fromC3d[ith]->layer(), vTrgHits_fromC2d_fromC3d[ith]->wafer());
if(MatrixEvent[e][th_layer][th_wafer] != fEventNumber){
if(MatrixEvent[e][th_layer][th_wafer] != (int)fEventNumber){
MatrixEvent[e][th_layer][th_wafer]=fEventNumber;
h_WaferNorm[e]->Fill(th_layer,th_wafer);
}
Point trgHit_point = vTrgHits_fromC2d_fromC3d[ith]->point();
if( vTrgHits_fromC2d_fromC3d[ith]->simTransverseMips(true) ){
h_TrgHitWaferVsLayer_fromC2d_fromC3d_Signal[e]->Fill(vTrgHits_fromC2d_fromC3d[ith]->layer(), vTrgHits_fromC2d_fromC3d[ith]->wafer());
wSigDist += vTrgHits_fromC2d_fromC3d[ith]->transverseMips() * ( vTrgC2d[iC2d]->distFromPoint( &vTrgHits_fromC2d_fromC3d[ith]->point() ) );
wSigDist += vTrgHits_fromC2d_fromC3d[ith]->transverseMips() * ( vTrgC2d[iC2d]->distFromPoint( &trgHit_point ) );
}else{
wDist += vTrgHits_fromC2d_fromC3d[ith]->transverseMips() * ( vTrgC2d[iC2d]->distFromPoint( &vTrgHits_fromC2d_fromC3d[ith]->point() ) );
wDist += vTrgHits_fromC2d_fromC3d[ith]->transverseMips() * ( vTrgC2d[iC2d]->distFromPoint( &trgHit_point ) );
}
}
h_AvgDist_TrgCell_C2d ->Fill(vTrgC2d[iC2d]->layer(), wDist/vTrgC2d[iC2d]->transverseMips());
......@@ -482,6 +497,7 @@ public:
h_NC2dPerLayer->Fill(vTrgC2d[iC2d]->layer());
h_C2dMipTvsTotSimHitsMipT->Fill( mipT_TOT_endcap, vTrgC2d[iC2d]->transverseMips() );
h_C2dMipTvsC2dLayer->Fill( vTrgC2d[iC2d]->layer(), vTrgC2d[iC2d]->transverseMips() );
h_DistC2dCenterAndMostEneTrgHit->Fill(vTrgC2d[iC2d]->layer(), vTrgC2d[iC2d]->distFromMostEneTrgHit() );
if( vTrgC2d[iC2d]->containsSigEne() ){
nC2dSigEne++;
h_layer_fromAllSig2D->Fill(vTrgC2d[iC2d]->layer() );
......@@ -533,8 +549,10 @@ public:
h_CluPhiC3dResponseVsEtTrue->Fill( vSig[0].FourP().Et(), deltaPhi( vTrgC3d[0].centerEtaPhi().second, vSig[0].project(Geometry::layerZ(e,0)).FourP().Phi() ) );
h_CluEtaC3dVsEtaTrue->Fill( vSig[0].project(Geometry::layerZ(e,0)).FourP().Eta(), vTrgC3d[0].centerEtaPhi().first );
h_CluPhiC3dVsPhiTrue->Fill( vSig[0].project(Geometry::layerZ(e,0)).FourP().Phi(), vTrgC3d[0].centerEtaPhi().second );
// h_layerGap_vs_C3dSigMipT->Fill(vTrgC3d[0].simTransverseMips(true),vTrgC3d[0].LayerGapInC3d() );
h_C3dShowerCenter->Fill( vTrgC3d[0].ShowerDepth() );
std::cout << " Shower Center "<< vTrgC3d[0].ShowerDepth() << std::endl;
h_layerGap_vs_C3dSigMipT->Fill(vTrgC3d[0].simTransverseMips(true),vTrgC3d[0].NofLayerGapsInC3d() );
bool IsShared=false;
//internal loop over all the C3d in order to evaluate the mutual distance
for(std::vector<TrgC3d>::iterator clu3d_tmp = vTrgC3d.begin(); clu3d_tmp != vTrgC3d.end(); clu3d_tmp++ ){
......@@ -594,6 +612,8 @@ public:
h_SigEneDensity_vs_C2dSigMipT->Fill( vTrgC2d_fromMaxC3d[iC2d]->transverseMips(), C2d_EneDensity );
h_EneDensity_vs_C2dMipt->Fill( vTrgC2d_fromMaxC3d[iC2d]->simTransverseMips(true), C2d_SigEneDensity );
h_C2dMaxVsAllRatio->Fill(vTrgC2d_fromMaxC3d[iC2d]->trgC2dMaxVsAllHitRatio());
h_C2dMaxVsAllRatio_vs_MipT->Fill(vTrgC3d[0].transverseMips(),vTrgC2d_fromMaxC3d[iC2d]->trgC2dMaxVsAllHitRatio());
double eta_sig = vSig[0].project(Geometry::layerZ(e,0)).FourP().Eta();
double phi_sig = vSig[0].project(Geometry::layerZ(e,0)).FourP().Phi();
......@@ -603,7 +623,8 @@ public:
h_CluPhiResponseVsEtTrue->Fill( vSig[0].FourP().Et(), deltaPhi( vTrgC2d_fromMaxC3d[iC2d]->phi(), phi_sig ) );
h_CluEtaC2dVsEtaTrue->Fill( eta_sig, vTrgC2d_fromMaxC3d[iC2d]->eta() );
h_CluPhiC2dVsPhiTrue->Fill( phi_sig, vTrgC2d_fromMaxC3d[iC2d]->phi() );
h_DistC2dFromMaxC3dCenterAndMostEneTrgHit->Fill(vTrgC2d_fromMaxC3d[iC2d]->layer(), vTrgC2d_fromMaxC3d[iC2d]->distFromMostEneTrgHit() );
if(debug_) std::cout<< "------- C2d energy = " << vTrgC2d_fromMaxC3d[iC2d]->transverseMips() << " layer " << vTrgC2d_fromMaxC3d[iC2d]->layer() << std::endl;
double C2d_eta = vTrgC2d_fromMaxC3d[iC2d]->centerEtaPhi().first;
double C2d_phi = vTrgC2d_fromMaxC3d[iC2d]->centerEtaPhi().second;
......@@ -670,7 +691,11 @@ public:
double E_CluCalibMIPt_26trgLayers = calibCluster(t_deposits_T);
double E_CluCalibMIPt_GammaCoeff = calibClusterGamma(t_deposits_T);
double E_CluCalibMIPt_PiCoeff = calibClusterPion(t_deposits_T);
double eoh_pi = EoH_Pi(t_deposits_T);
double eoh_gamma = EoH_Gamma(t_deposits_T);
h_EoH_Pi->Fill(eoh_pi);
h_EoH_Gamma->Fill(eoh_gamma);
std::cout << "H/(E+H)|_pi = "<< eoh_pi << " H/(E+H)|_gamma = "<< eoh_gamma << std::endl;
if(vTrgC3d.size()>0){
double fracMaxC3d = vTrgC3d[0].transverseMips() / totC3dMipT;
h_totC3dMipT_vs_Sig->Fill(totC3dMipT);
......@@ -682,6 +707,15 @@ public:
h_C3dPtResponseGammaPi2D->Fill(E_CluCalibMIPt_GammaCoeff, E_CluCalibMIPt_PiCoeff);
h_C3dPtDensityGammaPi2D->Fill(E_CluCalibMIPt_GammaCoeff/vTrgC3d[0].numberOfTrgHits(), E_CluCalibMIPt_PiCoeff/ vTrgC3d[0].numberOfTrgHits());
h_NTrgHitPerC3d->Fill(vTrgC3d[0].numberOfTrgHits());
h_C3dShowerCenter_vs_TruePt->Fill( vSig[0].FourP().Et(), vTrgC3d[0].ShowerDepth() );
h_C3dShowerCenter_vs_EtPi->Fill( E_CluCalibMIPt_PiCoeff, vTrgC3d[0].ShowerDepth() );
h_C3dShowerCenter_vs_EtGamma->Fill( E_CluCalibMIPt_GammaCoeff, vTrgC3d[0].ShowerDepth() );
h_C3dShowerCenter_vs_MipT->Fill( vTrgC3d[0].transverseMips(), vTrgC3d[0].ShowerDepth() );
h_C3dShowerCenter_vs_NTrgHitPerC3d->Fill( vTrgC3d[0].numberOfTrgHits(), vTrgC3d[0].ShowerDepth() );
h_C3dShowerStart_vs_MipT->Fill(vTrgC3d[0].transverseMips(), vTrgC3d[0].ShowerStart());
h_C3dShowerStartLayer_vs_MipT->Fill(vTrgC3d[0].transverseMips(), vTrgC3d[0].ShowerStartLayer());
h_C3dShowerStart_vs_TruePt->Fill( vSig[0].FourP().Et(), vTrgC3d[0].ShowerStart());
h_C3dShowerStartLayer_vs_TruePt->Fill( vSig[0].FourP().Et(), vTrgC3d[0].ShowerStartLayer());
}else{
if(debug_) std::cout << "fraction of the energy in the main cluster: " << 0. << std::endl;
h_FracMipTMaxC3d->Fill(0.);
......@@ -722,6 +756,18 @@ private:
TH1F *h_C3dPtResponse;
TH2F *h_C3dPtResponse2D;
TH2F *h_C3dPtResponseGammaPi2D;
TH1F *h_C3dShowerCenter;
TH2F *h_C3dShowerCenter_vs_EtPi;
TH2F *h_C3dShowerCenter_vs_TruePt;
TH2F *h_C3dShowerCenter_vs_EtGamma ;
TH2F *h_C3dShowerCenter_vs_MipT;
TH2F *h_C3dShowerCenter_vs_NTrgHitPerC3d;
TH2F *h_C3dShowerStart_vs_MipT;
TH2F *h_C3dShowerStartLayer_vs_MipT;
TH2F *h_C3dShowerStart_vs_TruePt;
TH2F *h_C3dShowerStartLayer_vs_TruePt;
TH2F *h_DistC2dCenterAndMostEneTrgHit;
TH2F *h_DistC2dFromMaxC3dCenterAndMostEneTrgHit;
TH2F *h_C3dPtDensityGammaPi2D;
TH1F *h_C3dEtaResponse;
TH1F *h_C3dPhiResponse;
......@@ -782,6 +828,7 @@ private:
TH2F *h_C2dMipTvsC2dLayer;
TH2F *h_C2dSigMipTvsC2dLayer;
TH1F *h_C2dMaxVsAllRatio;
TH2F *h_C2dMaxVsAllRatio_vs_MipT;
TH2F *h_SigEneDensity_vs_C2dLayer;
TH2F *h_EneDensity_vs_C2dLayer;
TH2F *h_SigEneDensity_vs_C2dSigMipT;
......@@ -842,6 +889,10 @@ private:
TH2F *h_TrgHitSigMipFrac_vs_Threshold;
TH2F *h_layerGap_vs_C3dSigMipT;
TH2F *h_NotSharedC2dLayerVsSharedFrac;
TH1F *h_EoH_Pi;
TH1F *h_EoH_Gamma;
int MatrixEvent[2][52][700];
......
......@@ -1300,8 +1300,10 @@ double Event::fTrgHitSelectorMipsCut=5.0;
unsigned Event::fTrgC2dCreatorMethod=4; /*near neighbours (version 3)*/
unsigned Event::fTrgC3dCreatorMethod=2; /* xyNorm front-back clustering */
//unsigned Event::fTrgC3dCreatorMethod=2; /* xyNorm front-back clustering */
//unsigned Event::fTrgC3dCreatorMethod=3; /* xyNorm back-front clustering */
unsigned Event::fTrgC3dCreatorMethod=4; /* xyNorm CNLC (Closest Next Layer C2d) clustering avoid double C3d counting */
//unsigned Event::fTrgC3dCreatorMethod=5; /* xyNorm AntiKt-CNLC (Closest Next Layer C2d) clustering avoid double C3d counting */
/* energy thr for 2d clustering (in mips) */
double Event::fENERGY_CUT_Et = 5.;
......
......@@ -413,6 +413,20 @@ public:
return sqrt( ( fCenter.first-p->x() ) * ( fCenter.first-p->x() ) + ( fCenter.second-p->y() ) * ( fCenter.second-p->y() ) );
}
double distFromMostEneTrgHit(){
double maxE = -1.0;
int i_max = -1;
for(unsigned i_hit=0; i_hit<vTrgHit.size(); i_hit++){
if( vTrgHit.at(i_hit)->transverseMips() > maxE){
maxE = vTrgHit.at(i_hit)->transverseMips();
i_max = i_hit;
}
}
double x_max = vTrgHit.at(i_max)->x() / vTrgHit.at(i_max)->z() ;
double y_max = vTrgHit.at(i_max)->y() / vTrgHit.at(i_max)->z() ;
return sqrt( ( this->centerNorm().first-x_max ) * ( this->centerNorm().first-x_max ) + ( this->centerNorm().second-y_max ) * ( this->centerNorm().second-y_max ) );
}
/* near neighbour */
......
......@@ -199,6 +199,51 @@ public:
return fCenterEtaPhi;
}
double ShowerCenter(){
float showerCenter(0.0);
float zC3d(0.0);
double e(0.0);
for(unsigned i(0);i<vTrgC2d.size();i++) {
zC3d += vTrgC2d[i]->transverseMips() * Geometry::layerZ( vTrgC2d[i]->endcap(), vTrgC2d[i]->layer() );
e+=vTrgC2d[i]->transverseMips();
}
showerCenter = fabs( ( zC3d / e )) - fabs(Geometry::layerZ( 0, 0 ));
float etaC3d = this->centerEtaPhi().first;
float cosTheta = cos(2* atan( exp(-etaC3d) ) );
showerCenter = showerCenter/cosTheta;
return showerCenter;
}
double ShowerDepth(){
float showerDepth(0.0);
float zC3d(0.0);
double e(0.0);
for(unsigned i(0);i<vTrgC2d.size();i++) {
zC3d += vTrgC2d[i]->transverseMips() * Geometry::layerZ( vTrgC2d[i]->endcap(), vTrgC2d[i]->layer() );
e+=vTrgC2d[i]->transverseMips();
}
showerDepth = fabs( ( zC3d / e )) - fabs(Geometry::layerZ(vTrgC2d.front()->endcap(), vTrgC2d.front()->layer() ) );
float etaC3d = this->centerEtaPhi().first;
float cosTheta = cos(2* atan( exp(-etaC3d) ) );
showerDepth = showerDepth/cosTheta;
return showerDepth;
}
double ShowerStart(){
float showerStart(0.0);
showerStart = Geometry::layerZ( vTrgC2d.front()->endcap(), vTrgC2d.front()->layer() ) - Geometry::layerZ( vTrgC2d.front()->endcap(), 0 );
return showerStart;
}
double ShowerStartLayer(){
float showerStartLayer(0.0);
showerStartLayer = vTrgC2d.front()->layer();
return showerStartLayer;
}
pair<float,float> CoGNorm(){
float xC3d(0.0);
float yC3d(0.0);
......@@ -236,14 +281,15 @@ public:
float C3dSharedTransverseMips( TrgC3d *Clu3d ){
double SharedMipT=0.0;
std::vector<TrgC2d*> extV = Clu3d->trgC2ds();
for(unsigned i(0); i<extV.size(); i++ ){
for(unsigned j(0); j<vTrgC2d.size(); j++ ){
if( vTrgC2d[j]->getUniqueId() == extV[i]->getUniqueId() ){
SharedMipT+=vTrgC2d[j]->transverseMips();
if(extV.size()>0){
for(unsigned i(0); i<extV.size(); i++ ){
for(unsigned j(0); j<vTrgC2d.size(); j++ ){
if( vTrgC2d[j]->getUniqueId() == extV[i]->getUniqueId() ){
SharedMipT+=vTrgC2d[j]->transverseMips();
}
}
}
}
}
return SharedMipT;
}
......@@ -276,21 +322,36 @@ public:
return vNotSharedC2dLayer;
}
int LayerGapInC3d(){
int gapInC3d = 0;
std::vector<int> vGap_tmp;
std::vector<double> LayerGapInC3d(){
std::vector<double> vGapLayers;
vGapLayers.push_back(-1);
for(unsigned i(0); i<vTrgC2d.size()-1; i++ ){
if(vTrgC2d[i+1]->layer() - vTrgC2d[i]->layer() != 1) continue;
else{
gapInC3d = (vTrgC2d[i+1]->layer() - vTrgC2d[i]->layer());
vGap_tmp.push_back(gapInC3d);
vGapLayers.push_back(vTrgC2d[i]->layer());
}
}
std::sort( vGap_tmp.begin(), vGap_tmp.end() );
return vGap_tmp.back();
return vGapLayers;
}
int NofLayerGapsInC3d(){
std::vector<double> gapLayers = this->LayerGapInC3d();
bool isNewGap=true;
int Ngaps=0;
if(gapLayers.size()>1){;
gapLayers.erase(gapLayers.begin());
for(unsigned i(0); i<gapLayers.size()-1; i++ ){
if(gapLayers.at(i+1) - gapLayers.at(i) == 1){
if(isNewGap) Ngaps++;
isNewGap=false;
}else{
isNewGap=true;
}
}
}
return Ngaps;
}
Point position() const {
return fPosition;
......@@ -336,6 +397,13 @@ public:
return e;
}
float C2dAntiKtDistanceNorm( pair<float,float> C2dCenter, double C2d_MipT, double R ){
int p = -1;
float dist = (fCenterNorm.first-C2dCenter.first)*(fCenterNorm.first-C2dCenter.first) + (fCenterNorm.second-C2dCenter.second)*(fCenterNorm.second-C2dCenter.second) ;
float minE = std::min( pow(transverseMips(),2*p), pow(C2d_MipT,2*p) );
return minE * dist / R;
}
unsigned numberOfTrgC2ds() const {
return vTrgC2d.size();
}
......@@ -485,8 +553,8 @@ private:
pair<float,float> fCenterNorm;
pair<float,float> fCoGNorm;
pair<float,float> fCenterEtaPhi;
float fLenght;
float fLenght;
};
#endif
......@@ -6,19 +6,31 @@ double calibCluster(double dep[]){
//double MaxCluCoeff_26l[52] = { 0, 0.0877179, 0, 0.108814, 0, 0.0363762, 0, 0.0217084, 0, 0.0217784, 0, 0.0379644, 0, 0.0342662, 0, 0.0311304, 0, 0.0401337, 0, 0.0419444, 0, 0.0527232, 0, 0.0427343, 0, 0.0539223, 0, 0.0679392, 0.0791275, 0.0887525, 0.0778766, 0.0845525, 0.0826954, 0.065352, 0.0929196, 0.097882, 0.0824936, 0.0832312, 0.109067, 0.170409, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. };
//coefficient from C3d pions
double C3dCluCoeff_26l[52] = { 0, 0.0496421, 0, 0.0406136, 0, 0.0841348, 0, 0.0510543, 0, 0.0733869, 0, 0.0307511, 0, 0.0641894, 0, 0.0855152, 0, 0.0330387, 0, 0.0623249, 0, 0.0673885, 0, 0.067226, 0, 0.0921128, 0, 0.0835333, 0.103395, 0.0981839, 0.104409, 0.103367, 0.113767, 0.0369492, 0.0989041, 0.127434, 0.143822, 0.0649015, 0.0555431, 0.18853, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. };
double MaxCluCoeffPi_26l_PU200[52]={ 0., 0.096771, 0., 0.154984, 0., 0.0779117, 0., 0.0391791, 0., 0.0202955, 0., -0.00381858, 0., 0.0310921, 0., 0.0345703, 0., 0.0468705, 0., 0.0265336, 0., 0.0499438, 0., 0.0400726, 0., 0.0617824, 0., 0.0555374, 0.0868473, 0.0817456, 0.0630983, 0.0738757, 0.0833486, 0.0631033, 0.085771, 0.0676589, 0.0921196, 0.0785368, 0.0359822, 0.287156, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double C3dCluCoeff_26l[52] = { 0, 0.0496421, 0, 0.0406136, 0, 0.0841348, 0, 0.0510543, 0, 0.0733869, 0, 0.0307511, 0, 0.0641894, 0, 0.0855152, 0, 0.0330387, 0, 0.0623249, 0, 0.0673885, 0, 0.067226, 0, 0.0921128, 0, 0.0835333, 0.103395, 0.0981839, 0.104409, 0.103367, 0.113767, 0.0369492, 0.0989041, 0.127434, 0.143822, 0.0649015, 0.0555431, 0.18853, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. };
//double MaxCluCoeffPi_26l_PU200[52]={ 0., 0.096771, 0., 0.154984, 0., 0.0779117, 0., 0.0391791, 0., 0.0202955, 0., -0.00381858, 0., 0.0310921, 0., 0.0345703, 0., 0.0468705, 0., 0.0265336, 0., 0.0499438, 0., 0.0400726, 0., 0.0617824, 0., 0.0555374, 0.0868473, 0.0817456, 0.0630983, 0.0738757, 0.0833486, 0.0631033, 0.085771, 0.0676589, 0.0921196, 0.0785368, 0.0359822, 0.287156, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//coefficient from photons - most energetic 2Dcluster/layer - 1.6<|eta|<2.8 - Seed Threshold = 10 mips, TrgHit Threshold = 5 mips
double MaxCluCoeffGamma_26l[52] = { 0., -0.0219692, 0., 0.060302, 0., 0.0294461, 0., 0.0273296, 0., 0.0235929, 0., 0.0276696, 0., 0.0271923, 0., 0.0291319, 0., 0.0331845, 0., 0.0338663, 0., 0.0441056, 0., 0.0134572, 0., 0.00226337, 0., 0.080997, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double MaxCluCoeffGamma_26l_PU200[52] = { 0., -0.0809621, 0., 0.0374175, 0., 0.0464561, 0., 0.0293506, 0., 0.013936, 0., 0.0195492, 0., 0.0292146, 0., 0.0284587, 0., 0.04483, 0., 0.00696123, 0., 0.0471003, 0., 0.0268109, 0., 0.0396946, 0., 0.119308, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l[52] = { 0., -0.0219692, 0., 0.060302, 0., 0.0294461, 0., 0.0273296, 0., 0.0235929, 0., 0.0276696, 0., 0.0271923, 0., 0.0291319, 0., 0.0331845, 0., 0.0338663, 0., 0.0441056, 0., 0.0134572, 0., 0.00226337, 0., 0.080997, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double MaxCluCoeffGamma_26l_NoPU_SE5_TE2_CLNC[52] = {0., 0.0352848, 0., 0.059895, 0., 0.00465402, 0., 0.0267362, 0., 0.0194918, 0., 0.0267167, 0., 0.0179824, 0., 0.0203467, 0., 0.0222751, 0., 0.0353316, 0., 0.0391406, 0., 0.0508248, 0., 0.0342962, 0., -0.00432278, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200[52] = { 0., -0.0809621, 0., 0.0374175, 0., 0.0464561, 0., 0.0293506, 0., 0.013936, 0., 0.0195492, 0., 0.0292146, 0., 0.0284587, 0., 0.04483, 0., 0.00696123, 0., 0.0471003, 0., 0.0268109, 0., 0.0396946, 0., 0.119308, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200[52] = { 0., -0.0599269, 0., 0.0402738, 0., 0.040123, 0., 0.0290021, 0., 0.0253999, 0., 0.019065, 0., 0.0200553, 0., 0.0432537, 0., 0.0156327, 0., 0.0515298, 0., 0.03971, 0., 0.00684734, 0., 0.0495789, 0., 0.127418, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200[52] = { 0., -0.0603812, 0., 0.0512034, 0., 0.0377916, 0., 0.0217979, 0., 0.0321427, 0., 0.0186655, 0., 0.0333685, 0., 0.026813, 0., 0.0282801, 0., 0.039641, 0., 0.0450659, 0., 0.014953, 0., 0.0540349, 0., 0.143498, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200[52] = { 0., -0.0564826, 0., 0.0468913, 0., 0.0363248, 0., 0.0252378, 0., 0.0347685, 0., 0.022995, 0., 0.0277085, 0., 0.0219204, 0., 0.0400089, 0., 0.0418655, 0., 0.0405099, 0., 0.00744019, 0., 0.071766, 0., 0.144541, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double MaxCluCoeffPi_26l_PU200_SE5_TE2[52] = { 0., 0.0996778, 0., 0.155557, 0., 0.0719019, 0., 0.0466329, 0., 0.0218486, 0., -0.00821533, 0., 0.02755, 0., 0.0377559, 0., 0.0446513, 0., 0.0313937, 0., 0.0508217, 0., 0.040939, 0., 0.0576841, 0., 0.0636717, 0.0795114, 0.0765338, 0.0687591, 0.0715714, 0.0849673, 0.0628037, 0.0796929, 0.0767633, 0.0920608, 0.0829156, 0.0211392, 0.291555, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
// double MaxCluCoeffPi_26l_PU200_SE5_TE2[52] = { 0., 0.0996778, 0., 0.155557, 0., 0.0719019, 0., 0.0466329, 0., 0.0218486, 0., -0.00821533, 0., 0.02755, 0., 0.0377559, 0., 0.0446513, 0., 0.0313937, 0., 0.0508217, 0., 0.040939, 0., 0.0576841, 0., 0.0636717, 0.0795114, 0.0765338, 0.0687591, 0.0715714, 0.0849673, 0.0628037, 0.0796929, 0.0767633, 0.0920608, 0.0829156, 0.0211392, 0.291555, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffPi_26l_NoPU_SE5_TE2_CLNC[52] = { 0., 0.239727, 0., 0.0835479, 0., 0.00698107, 0., 0.0900101, 0., 0.00967192, 0., 0.0103657, 0., 0.0359061, 0., 0.0491837, 0., 0.0560882, 0., -0.0118776, 0., 0.0419837, 0., 0.068005, 0., 0.0633778, 0., 0.0605883, 0.0561405, 0.114536, 0.0650109, 0.0771515, 0.0726268, 0.0354285, 0.0720976, 0.138771, 0.0325978, 0.0941171, 0.142806, 0.298379, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNC[52] = { 0., 0.243136, 0., 0.105334, 0., 0.0537036, 0., 0.0544763, 0., 0.0139393, 0., 0.0153183, 0., 0.0168236, 0., 0.0667744, 0., 0.0285565, 0., 0.00896993, 0., 0.0373169, 0., 0.0677213, 0., 0.0598281, 0., 0.0545277, 0.0664654, 0.101408, 0.066066, 0.0861542, 0.0608636, 0.0425438, 0.077951, 0.104783, 0.0583152, 0.0777367, 0.147345, 0.283037, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNCAntiKt[52] = {0., 0.237915, 0., 0.0997974, 0., 0.0784578, 0., 0.0251434, 0., 0.014483, 0., 0.0232978, 0., 0.0149218, 0., 0.0612324, 0., 0.0326521, 0., 0.0141553, 0., 0.0327655, 0., 0.0609829, 0., 0.0727558, 0., 0.0659208, 0.060256, 0.0974282, 0.0662228, 0.0925795, 0.0627426, 0.038193, 0.060546, 0.139707, 0.0511201, 0.0580411, 0.155648, 0.297544, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//low thresholds
//SE=5 TE=2
// double MaxCluCoeffGamma_26l_PU200_0[52] = { 0., 0.0374321, 0., 0.0272364, 0., 0.0156208, 0., 0.0326081, 0., 0.0179549, 0., 0.0182417, 0., 0.022536, 0., 0.0179443, 0., 0.0337885, 0., 0.030553, 0., 0.0226521, 0., 0.0555469, 0., 0.0511783, 0., -0.000738704, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double MaxCluCoeffGamma_26l_PU200_SE5_TE2[52] = { 0., -0.0368211, 0., 0.0460783, 0., 0.0198967, 0., 0.0293057, 0., 0.0196438, 0., 0.0217098, 0., 0.0193689, 0., 0.0204774, 0., 0.0295688, 0., 0.0348411, 0., 0.039395, 0., 0.0318608, 0., 0.018608, 0., 0.0462604, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
// double MaxCluCoeffGamma_26l_PU200_SE5_TE2[52] = { 0., -0.0368211, 0., 0.0460783, 0., 0.0198967, 0., 0.0293057, 0., 0.0196438, 0., 0.0217098, 0., 0.0193689, 0., 0.0204774, 0., 0.0295688, 0., 0.0348411, 0., 0.039395, 0., 0.0318608, 0., 0.018608, 0., 0.0462604, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200_SE5_TE2_CLNC[52] = {0., 0.00024634, 0., 0.0500156, 0., 0.0172009, 0., 0.0263568, 0., 0.00885754, 0., 0.0338889, 0., 0.0131343, 0., 0.0252333, 0., 0.0203498, 0., 0.0270886, 0., 0.0644027, 0., 0.0452737, 0., -0.0261373, 0., 0.0187863, 0.0898389, 0.223298, 0.0897308, 0.107828, 0.0293437, 0.155335, 0.268383, 0.137431, -0.110794, -0.0766309, 0.551558, 0.862192, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200_SE5_TE2_CLNCAntiKt[52] = {0., 0.013174, 0., 0.0400699, 0., 0.0149247, 0., 0.025419, 0., 0.0135483, 0., 0.0340571, 0., 0.0121246, 0., 0.0239587, 0., 0.0217994, 0., 0.0320199, 0., 0.051447, 0., 0.0350091, 0., -0.000942148, 0., 0.038388, 0.0561229, 0.227584, 0.105078, 0.0434252, 0.0367317, 0.163532, 0.287103, 0.149305, -0.0687913, -0.0417236, 0.551156, 0.837537, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//SE=10 TE=2
//double MaxCluCoeffGamma_26l_PU200_1[52] = { 0., 0.0107559, 0., 0.0466378, 0., 0.0146156, 0., 0.0290959, 0., 0.0173818, 0., 0.0195449, 0., 0.024002, 0., 0.0203891, 0., 0.0271457, 0., 0.0316444, 0., 0.0321694, 0., 0.0501885, 0., 0.0293529, 0., 0.0206603, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
......@@ -36,8 +48,10 @@ double calibCluster(double dep[]){
// %%%% For photons
//E += dep[i] * MaxCluCoeffGamma_26l[i];
//Gamma MaxC3d with PU200
//E += dep[i] * MaxCluCoeffGamma_26l_PU200_SE5_TE2[i];
E += dep[i] * MaxCluCoeffPi_26l_PU200_SE5_TE2[i];
//E += dep[i] * MaxCluCoeffGamma_26l_PU200_SE5_TE2_CLNC[i];
E += dep[i] * MaxCluCoeffGamma_26l_NoPU_SE5_TE2_CLNC[i];
//E += dep[i] * MaxCluCoeffPi_26l_NoPU_SE5_TE2_CLNC[i];
//E += dep[i] * MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNC[i];
//E += dep[i] * MaxCluCoeffPi_26l_PU200[i];
//std::cout << " dep[i]*a[i] = " << dep[i] <<" * " << MaxCluCoeffPi_26l_PU200[i] << " = " <<E << std::endl;
......@@ -48,19 +62,61 @@ double calibCluster(double dep[]){
double calibClusterGamma(double dep[]){
double E=0.;
double MaxCluCoeffGamma_26l_PU200_SE5_TE2[52] = { 0., -0.0368211, 0., 0.0460783, 0., 0.0198967, 0., 0.0293057, 0., 0.0196438, 0., 0.0217098, 0., 0.0193689, 0., 0.0204774, 0., 0.0295688, 0., 0.0348411, 0., 0.039395, 0., 0.0318608, 0., 0.018608, 0., 0.0462604, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200_SE5_TE2[52] = { 0., -0.0368211, 0., 0.0460783, 0., 0.0198967, 0., 0.0293057, 0., 0.0196438, 0., 0.0217098, 0., 0.0193689, 0., 0.0204774, 0., 0.0295688, 0., 0.0348411, 0., 0.039395, 0., 0.0318608, 0., 0.018608, 0., 0.0462604, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double MaxCluCoeffGamma_26l_NoPU_SE5_TE2_CLNC[52] = {0., 0.0352848, 0., 0.059895, 0., 0.00465402, 0., 0.0267362, 0., 0.0194918, 0., 0.0267167, 0., 0.0179824, 0., 0.0203467, 0., 0.0222751, 0., 0.0353316, 0., 0.0391406, 0., 0.0508248, 0., 0.0342962, 0., -0.00432278, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200_SE5_TE2_CLNC[52] = {0., 0.00024634, 0., 0.0500156, 0., 0.0172009, 0., 0.0263568, 0., 0.00885754, 0., 0.0338889, 0., 0.0131343, 0., 0.0252333, 0., 0.0203498, 0., 0.0270886, 0., 0.0644027, 0., 0.0452737, 0., -0.0261373, 0., 0.0187863, 0.0898389, 0.223298, 0.0897308, 0.107828, 0.0293437, 0.155335, 0.268383, 0.137431, -0.110794, -0.0766309, 0.551558, 0.862192, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200_SE5_TE2_CLNCAntiKt[52] = {0., 0.013174, 0., 0.0400699, 0., 0.0149247, 0., 0.025419, 0., 0.0135483, 0., 0.0340571, 0., 0.0121246, 0., 0.0239587, 0., 0.0217994, 0., 0.0320199, 0., 0.051447, 0., 0.0350091, 0., -0.000942148, 0., 0.038388, 0.0561229, 0.227584, 0.105078, 0.0434252, 0.0367317, 0.163532, 0.287103, 0.149305, -0.0687913, -0.0417236, 0.551156, 0.837537, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
for(int i=0; i<40; i++){
E += dep[i] * MaxCluCoeffGamma_26l_PU200_SE5_TE2[i];
//E += dep[i] * MaxCluCoeffGamma_26l_PU200_SE5_TE2_CLNC[i];
E += dep[i] * MaxCluCoeffGamma_26l_NoPU_SE5_TE2_CLNC[i];
}
return E;
}
double calibClusterPion(double dep[]){
double E=0.;
double MaxCluCoeffPi_26l_PU200_SE5_TE2[52] = { 0., 0.0996778, 0., 0.155557, 0., 0.0719019, 0., 0.0466329, 0., 0.0218486, 0., -0.00821533, 0., 0.02755, 0., 0.0377559, 0., 0.0446513, 0., 0.0313937, 0., 0.0508217, 0., 0.040939, 0., 0.0576841, 0., 0.0636717, 0.0795114, 0.0765338, 0.0687591, 0.0715714, 0.0849673, 0.0628037, 0.0796929, 0.0767633, 0.0920608, 0.0829156, 0.0211392, 0.291555, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffPi_26l_PU200_SE5_TE2[52] = { 0., 0.0996778, 0., 0.155557, 0., 0.0719019, 0., 0.0466329, 0., 0.0218486, 0., -0.00821533, 0., 0.02755, 0., 0.0377559, 0., 0.0446513, 0., 0.0313937, 0., 0.0508217, 0., 0.040939, 0., 0.0576841, 0., 0.0636717, 0.0795114, 0.0765338, 0.0687591, 0.0715714, 0.0849673, 0.0628037, 0.0796929, 0.0767633, 0.0920608, 0.0829156, 0.0211392, 0.291555, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNCAntiKt[52] = {0., 0.237915, 0., 0.0997974, 0., 0.0784578, 0., 0.0251434, 0., 0.014483, 0., 0.0232978, 0., 0.0149218, 0., 0.0612324, 0., 0.0326521, 0., 0.0141553, 0., 0.0327655, 0., 0.0609829, 0., 0.0727558, 0., 0.0659208, 0.060256, 0.0974282, 0.0662228, 0.0925795, 0.0627426, 0.038193, 0.060546, 0.139707, 0.0511201, 0.0580411, 0.155648, 0.297544, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double MaxCluCoeffPi_26l_NoPU_SE5_TE2_CLNC[52] = { 0., 0.239727, 0., 0.0835479, 0., 0.00698107, 0., 0.0900101, 0., 0.00967192, 0., 0.0103657, 0., 0.0359061, 0., 0.0491837, 0., 0.0560882, 0., -0.0118776, 0., 0.0419837, 0., 0.068005, 0., 0.0633778, 0., 0.0605883, 0.0561405, 0.114536, 0.0650109, 0.0771515, 0.0726268, 0.0354285, 0.0720976, 0.138771, 0.0325978, 0.0941171, 0.142806, 0.298379, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNC[52] = { 0., 0.243136, 0., 0.105334, 0., 0.0537036, 0., 0.0544763, 0., 0.0139393, 0., 0.0153183, 0., 0.0168236, 0., 0.0667744, 0., 0.0285565, 0., 0.00896993, 0., 0.0373169, 0., 0.0677213, 0., 0.0598281, 0., 0.0545277, 0.0664654, 0.101408, 0.066066, 0.0861542, 0.0608636, 0.0425438, 0.077951, 0.104783, 0.0583152, 0.0777367, 0.147345, 0.283037, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
for(int i=0; i<40; i++){
E += dep[i] * MaxCluCoeffPi_26l_PU200_SE5_TE2[i];
// E += dep[i] * MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNC[i];
E += dep[i] * MaxCluCoeffPi_26l_NoPU_SE5_TE2_CLNC[i];
}
return E;
}
double EoH_Pi(double dep[]){
float EoH=0.;
double E=0.;
double H=0.;
//double MaxCluCoeffPi_26l_NoPU_SE5_TE2_CLNC[52] = { 0., 0.239727, 0., 0.0835479, 0., 0.00698107, 0., 0.0900101, 0., 0.00967192, 0., 0.0103657, 0., 0.0359061, 0., 0.0491837, 0., 0.0560882, 0., -0.0118776, 0., 0.0419837, 0., 0.068005, 0., 0.0633778, 0., 0.0605883, 0.0561405, 0.114536, 0.0650109, 0.0771515, 0.0726268, 0.0354285, 0.0720976, 0.138771, 0.0325978, 0.0941171, 0.142806, 0.298379, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNC[52] = { 0., 0.243136, 0., 0.105334, 0., 0.0537036, 0., 0.0544763, 0., 0.0139393, 0., 0.0153183, 0., 0.0168236, 0., 0.0667744, 0., 0.0285565, 0., 0.00896993, 0., 0.0373169, 0., 0.0677213, 0., 0.0598281, 0., 0.0545277, 0.0664654, 0.101408, 0.066066, 0.0861542, 0.0608636, 0.0425438, 0.077951, 0.104783, 0.0583152, 0.0777367, 0.147345, 0.283037, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
for(int i=0; i<40; i++){
if(i<28) E += dep[i] * MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNC[i];
else if(i>=28) H += dep[i] * MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNC[i];
}
std::cout << "E: " << E << " H: " << H << " H/(E+H)" << H/(E+H) << std::endl;
EoH = H/(E+H);
return EoH;
}
double EoH_Gamma(double dep[]){
float EoH=0.;
double E=0.;
double H=0.;
double MaxCluCoeffGamma_26l_NoPU_SE5_TE2_CLNC[52] = { 0., 0.0352848, 0., 0.059895, 0., 0.00465402, 0., 0.0267362, 0., 0.0194918, 0., 0.0267167, 0., 0.0179824, 0., 0.0203467, 0., 0.0222751, 0., 0.0353316, 0., 0.0391406, 0., 0.0508248, 0., 0.0342962, 0., -0.00432278, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. , 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffGamma_26l_PU200_SE5_TE2_CLNC[52] = {0., 0.00024634, 0., 0.0500156, 0., 0.0172009, 0., 0.0263568, 0., 0.00885754, 0., 0.0338889, 0., 0.0131343, 0., 0.0252333, 0., 0.0203498, 0., 0.0270886, 0., 0.0644027, 0., 0.0452737, 0., -0.0261373, 0., 0.0187863, 0.0898389, 0.223298, 0.0897308, 0.107828, 0.0293437, 0.155335, 0.268383, 0.137431, -0.110794, -0.0766309, 0.551558, 0.862192, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
double MaxCluCoeffPi_26l_NoPU_SE5_TE2_CLNC[52] = { 0., 0.239727, 0., 0.0835479, 0., 0.00698107, 0., 0.0900101, 0., 0.00967192, 0., 0.0103657, 0., 0.0359061, 0., 0.0491837, 0., 0.0560882, 0., -0.0118776, 0., 0.0419837, 0., 0.068005, 0., 0.0633778, 0., 0.0605883, 0.0561405, 0.114536, 0.0650109, 0.0771515, 0.0726268, 0.0354285, 0.0720976, 0.138771, 0.0325978, 0.0941171, 0.142806, 0.298379, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
//double MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNC[52] = { 0., 0.243136, 0., 0.105334, 0., 0.0537036, 0., 0.0544763, 0., 0.0139393, 0., 0.0153183, 0., 0.0168236, 0., 0.0667744, 0., 0.0285565, 0., 0.00896993, 0., 0.0373169, 0., 0.0677213, 0., 0.0598281, 0., 0.0545277, 0.0664654, 0.101408, 0.066066, 0.0861542, 0.0608636, 0.0425438, 0.077951, 0.104783, 0.0583152, 0.0777367, 0.147345, 0.283037, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
for(int i=0; i<40; i++){
if(i<28) E += dep[i] * MaxCluCoeffGamma_26l_NoPU_SE5_TE2_CLNC[i];
//if(i<28) E += dep[i] * MaxCluCoeffGamma_26l_PU200_SE5_TE2_CLNC[i];
else if(i>=28) H += dep[i] * MaxCluCoeffPi_26l_NoPU_SE5_TE2_CLNC[i];
//else if(i>=28) H += dep[i] * MaxCluCoeffPi_26l_PU200_SE5_TE2_CLNC[i];
}
EoH = H/(E+H);
return EoH;
}
......@@ -249,6 +249,62 @@ This method DOES NOT allow for duplicaiton of 2d clusters in a 3d cluster. In ca
} // method 4
/* Method 5