e4nu / e4nuanalysiscode

Placeholder for all e4nu analyses
1 stars 2 forks source link

Fiducial variation #165

Open jtenavidal opened 4 months ago

jtenavidal commented 4 months ago
Bool_t GetEPhiLimits(double beam_en, Float_t momentum, Float_t theta, Int_t sector,Float_t *EPhiMin, Float_t *EPhiMax);
    Bool_t EFiducialCut(double beam_en, TVector3 momentum);
    Bool_t PFiducialCut(double beam_en, TVector3 momentum);
    Bool_t PiplFiducialCut(double beam_en, TVector3 momentum,Float_t *philow,Float_t *phiup);
    Bool_t PimiFiducialCut(double beam_en, TVector3 momentum, Float_t *pimi_philow, Float_t *pimi_phiup);

PiplFiducialCut returns philow, and phiup. We can apply a variation there and see if it is still in fiducial

For electron we use GetEPhiLimits

We can add this as a new function with default 0 variation

jtenavidal commented 4 months ago
jtenavidal commented 4 months ago

Angle shift was already included:

    } else if ( param[i] == "SystFidAngleShift" ) {
      fFidAngleShift = stod(value[i]) ;
    }
jtenavidal commented 4 months ago

bool GetFidAngleShift(void) { return fFidAngleShift; }

jtenavidal commented 4 months ago

EDIT THIS AND ADD IN CODE: `Bool_t Fiducial::GetFiducialCut(unsigned int pdg, double beam_en, TVector3 momentum, double shift = 0){

bool in_fid = false ; if( pdg == conf::kPdgElectron ) in_fid = Fiducial::EFiducialCut( beam_en, momentum); if( pdg == conf::kPdgProton ) in_fid = PFiducialCut( beam_en, momentum ) ; if( pdg == conf::kPdgPim ) in_fid = PimiFiducialCut( beam_en, momentum ) ; if( pdg == conf::kPdgPip ) in_fid return in_fid ; / Bool_t PFiducialCut(double beam_en, TVector3 momentum);
Bool_t PiplFiducialCut(double beam_en, TVector3 momentum,Float_t
philow,Float_t phiup);
Bool_t PimiFiducialCut(double beam_en, TVector3 momentum, Float_t
pimi_philow, Float_t pimi_phiup);
bool Phot_fid(TVector3 V3_phot);
bool Pi_phot_fid_united(double beam_en, TVector3 V3_pi_phot, int q_pi_phot);
/ } `

jtenavidal commented 4 months ago

Configured correctly:

image
jtenavidal commented 4 months ago

2GeV

image

Still breaks sometimes but at least calcualted sometimes

4GeV No message

jtenavidal commented 4 months ago

References:

https://www.jlab.org/Hall-B/general/clas_thesis.html https://www.jlab.org/Hall-B/secure/e2/bzh/efiducialcut.html https://misportal.jlab.org/ul/Physics/Hall-B/clas/viewFile.cfm/2023-001.pdf?documentId=802

Line code L604, get reference for ephi limits

[sector][theta][momparam]

jtenavidal commented 2 months ago

Change approach. Change each particle Phi

For a given sector, increase/decrease particle phy to decrease/increase acceptance. Need to understand how it will affect particle

jtenavidal commented 2 months ago
image
jtenavidal commented 2 months ago

I also changed the background code