AttenCorr Class Reference

#include <AttenCorr.h>

List of all members.

Public Member Functions

 AttenCorr ()
 ~AttenCorr ()
void CalcCorr (const NtpStRecord *record, const NtpSRStrip *strip, Float_t meanUTPos, Float_t meanVTPos, unsigned short qtype=0)

Public Attributes

int detector
Float_t qpeE
Float_t qpeW
Float_t lE
Float_t lW
Float_t halflength
Float_t wlspigtail_w
Float_t wlspigtail_e
Float_t clearfiber_w
Float_t clearfiber_e
Float_t centeru
Float_t centerv
Float_t qpeWcor
Float_t qpeEcor
Float_t qpecor
Float_t attenE
Float_t attenW

Private Member Functions

void Setup (const NtpStRecord *record, const NtpSRStrip *strip, unsigned short qtype)
void CalcPECorr (const int)
void Reset ()

Detailed Description

Definition at line 14 of file AttenCorr.h.


Constructor & Destructor Documentation

AttenCorr::AttenCorr (  ) 

Definition at line 24 of file AttenCorr.cxx.

References Reset().

00025 {  
00026   Reset();
00027 }

AttenCorr::~AttenCorr (  ) 

Definition at line 29 of file AttenCorr.cxx.

00030 {
00031 }


Member Function Documentation

void AttenCorr::CalcCorr ( const NtpStRecord record,
const NtpSRStrip strip,
Float_t  meanUTPos,
Float_t  meanVTPos,
unsigned short  qtype = 0 
)

Definition at line 153 of file AttenCorr.cxx.

References CalcPECorr(), centeru, centerv, detector, halflength, lE, lW, NtpSRStrip::planeview, and Setup().

Referenced by MinosCompactEvent::MinosCompactEvent().

00153                                                                                                                                     {
00154 
00155   Setup(record,strip,qtype);
00156 
00157   if(strip->planeview==2){ //U view
00158     //location in V of E end:
00159     lE = centerv + halflength - meanVTPos; 
00160     lW = meanVTPos - (centerv - halflength);
00161   }else{  //V view
00162     lE = meanUTPos - (centeru - halflength);
00163     lW = centeru+halflength -meanUTPos;
00164   }
00165 
00166   //cout << "The lE, lW and halflength " << endl;//<--tmp
00167   //cout << lE << "," << lW << "," << halflength << endl;
00168 
00169   CalcPECorr(detector);
00170 
00171   //MHO0509
00172   //cout << "MHO - AttenCorr found attenE*MEAN_ATTEN " << attenE*MEAN_ATTEN << " and attenW*MEAN_ATTEN " << attenW*MEAN_ATTEN << " in strip " << strip->strip << " and plane " << strip->plane << endl;
00173   
00174 }

void AttenCorr::CalcPECorr ( const   int  )  [private]

Definition at line 95 of file AttenCorr.cxx.

References attenE, attenW, clearfiber_e, clearfiber_w, detector, halflength, lE, lW, MEAN_ATTEN, ND_CORRECTION, qpecor, qpeE, qpeEcor, qpeW, qpeWcor, REFLECTIVITY, wlspigtail_e, and wlspigtail_w.

Referenced by CalcCorr().

00095                                    {
00096 
00097   float lwlsE = 0;
00098   float lwlsW = 0;
00099   float fE = 0;
00100   float fW = 0;
00101 
00102   if(detector==0x02 || detector==0x04){//<-- Far Detector OR Caldet
00103 
00104     Double_t extra_scale = 1;
00105     if (detector==0x04) {
00106       // for caldet
00107       extra_scale = 1.58;
00108     }
00109 
00110     lwlsE = wlspigtail_e + lE;
00111     lwlsW = wlspigtail_w + lW;
00112     fE = extra_scale/( 0.666*exp(-lwlsE/7.05)+ 0.333*exp(-lwlsE/1.05));
00113     fW = extra_scale/( 0.666*exp(-lwlsW/7.05)+ 0.333*exp(-lwlsW/1.05));
00114     fE = fE*exp(+(clearfiber_e/10.));
00115     fW = fW*exp(+(clearfiber_w/10.));
00116     qpeEcor = qpeE*fE*MEAN_ATTEN;
00117     qpeWcor = qpeW*fW*MEAN_ATTEN;
00118     qpecor = (qpeEcor+qpeWcor)*ND_CORRECTION;  
00119 
00120 
00121     attenE=fE;
00122     attenW=fW;
00123     
00124   } else if(detector==0x01){//<--Near Detector (only W readout; reflection in E)
00125 
00126     lwlsW = wlspigtail_w + lW;
00127     lwlsE = 4*halflength - fabs(lW) + wlspigtail_w;
00128       
00129     fW = 1.*(0.666*exp(-lwlsW/7.05)+ 0.333*exp(-lwlsW/1.05));//Caution: it's not 1/fW as in FarDet; same for fE below;
00130 
00131     //A la Pedro
00132     fE = 1.*(0.666*exp(-lwlsE/7.05)+ 0.333*exp(-lwlsE/1.05))*REFLECTIVITY;
00133     float fCor = 2./((fE+fW)*exp(-clearfiber_w/10.));
00134     fCor=fCor*1.587;//determined from muons, on Nov-23-2007, for cedar_phy
00135     
00136     //A la Caius
00137     //float fCor = 1./(fW*exp(-clearfiber_w/10.));//<--tmp
00138     //fCor=fCor*1.9454;
00139 
00140     qpeWcor = qpeW*fCor*MEAN_ATTEN;
00141     qpecor = qpeWcor*ND_CORRECTION;
00142        
00143     attenE=0;
00144     attenW=fCor;
00145     
00146   }
00147 
00148 
00149 }

void AttenCorr::Reset (  )  [private]

Definition at line 35 of file AttenCorr.cxx.

References attenE, attenW, centeru, centerv, clearfiber_e, clearfiber_w, halflength, lE, lW, qpeE, qpeEcor, qpeW, qpeWcor, wlspigtail_e, and wlspigtail_w.

Referenced by AttenCorr(), and Setup().

00035                      {
00036 
00037   qpeE=-100;
00038   qpeW=-100;
00039   lE=-1;
00040   lW=-1;
00041   halflength=-1;
00042   wlspigtail_w=-1;
00043   wlspigtail_e=-1;
00044   clearfiber_w=-1;
00045   clearfiber_e=-1;
00046   centeru=-1;
00047   centerv=-1;
00048   qpeWcor=-100;
00049   qpeEcor=-100;;
00050   attenE=-1;
00051   attenW=-1;
00052 
00053 }

void AttenCorr::Setup ( const NtpStRecord record,
const NtpSRStrip strip,
unsigned short  qtype 
) [private]

Definition at line 56 of file AttenCorr.cxx.

References centeru, centerv, clearfiber_e, clearfiber_w, detector, VldContext::GetDetector(), RecRecordImp< T >::GetHeader(), RecHeader::GetVldContext(), halflength, StripEnd::kEast, StripEnd::kWest, NtpSRPulseHeight::pe, NtpSRStrip::ph0, NtpSRStrip::ph1, NtpSRStrip::plane, qpeE, qpeW, Reset(), NtpSRPulseHeight::sigcor, NtpSRStrip::strip, wlspigtail_e, and wlspigtail_w.

Referenced by CalcCorr().

00056                                                                                            {
00057 
00058   Reset();
00059 
00060   //Geometry handles and such
00061   UgliGeomHandle ugh(record->GetHeader().GetVldContext()); 
00062   detector = record->GetHeader().GetVldContext().GetDetector();  
00063   PlexStripEndId pseid(record->GetHeader().GetVldContext().GetDetector()
00064                        ,strip->plane, strip->strip);
00065   UgliStripHandle stripgeom(ugh.GetStripHandle(pseid));
00066 
00067   //Necessary quantities
00068   if (qtype == 0) {
00069     qpeE=strip->ph0.pe;
00070     qpeW=strip->ph1.pe;
00071   }
00072   if (qtype == 5) {
00073     qpeE = strip->ph0.sigcor;
00074     qpeW = strip->ph1.sigcor;
00075   }
00076   halflength = stripgeom.GetHalfLength();
00077   wlspigtail_w = stripgeom.WlsPigtail(StripEnd::kWest);
00078   wlspigtail_e = stripgeom.WlsPigtail(StripEnd::kEast);
00079   clearfiber_w = stripgeom.ClearFiber(StripEnd::kWest);
00080   clearfiber_e = stripgeom.ClearFiber(StripEnd::kEast);
00081   const TVector3 globalpos(stripgeom.GlobalPos(0));
00082   centerv = .7071067812*(globalpos.Y()-globalpos.X());
00083   centeru = .7071067812*(globalpos.Y()+globalpos.X());
00084 
00085   /*cout << "The wlspigtails " << endl;//<--tmp
00086   cout << wlspigtail_w << "," << wlspigtail_e << endl;
00087   cout << "The clearfibers " << endl;
00088   cout << clearfiber_w << "," << clearfiber_e << endl;
00089   cout << "The centeru and centerv " << endl;
00090   cout << centeru << "," << centerv << endl;*/
00091 
00092 }


Member Data Documentation

Definition at line 38 of file AttenCorr.h.

Referenced by CalcPECorr(), and Reset().

Definition at line 39 of file AttenCorr.h.

Referenced by CalcPECorr(), and Reset().

Definition at line 32 of file AttenCorr.h.

Referenced by CalcCorr(), Reset(), and Setup().

Definition at line 33 of file AttenCorr.h.

Referenced by CalcCorr(), Reset(), and Setup().

Definition at line 31 of file AttenCorr.h.

Referenced by CalcPECorr(), Reset(), and Setup().

Definition at line 30 of file AttenCorr.h.

Referenced by CalcPECorr(), Reset(), and Setup().

Definition at line 22 of file AttenCorr.h.

Referenced by CalcCorr(), CalcPECorr(), and Setup().

Definition at line 27 of file AttenCorr.h.

Referenced by CalcCorr(), CalcPECorr(), Reset(), and Setup().

Float_t AttenCorr::lE

Definition at line 25 of file AttenCorr.h.

Referenced by CalcCorr(), CalcPECorr(), MinosCompactEvent::MinosCompactEvent(), and Reset().

Float_t AttenCorr::lW

Definition at line 26 of file AttenCorr.h.

Referenced by CalcCorr(), CalcPECorr(), MinosCompactEvent::MinosCompactEvent(), and Reset().

Definition at line 37 of file AttenCorr.h.

Referenced by CalcPECorr(), and MinosCompactEvent::MinosCompactEvent().

Float_t AttenCorr::qpeE

Definition at line 23 of file AttenCorr.h.

Referenced by CalcPECorr(), Reset(), and Setup().

Definition at line 36 of file AttenCorr.h.

Referenced by CalcPECorr(), and Reset().

Float_t AttenCorr::qpeW

Definition at line 24 of file AttenCorr.h.

Referenced by CalcPECorr(), Reset(), and Setup().

Definition at line 35 of file AttenCorr.h.

Referenced by CalcPECorr(), and Reset().

Definition at line 29 of file AttenCorr.h.

Referenced by CalcPECorr(), Reset(), and Setup().

Definition at line 28 of file AttenCorr.h.

Referenced by CalcPECorr(), Reset(), and Setup().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1