Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

MakeAlignmentModule Class Reference

#include <MakeAlignmentModule.h>

Inheritance diagram for MakeAlignmentModule:

JobCModule List of all members.

Public Member Functions

 MakeAlignmentModule ()
virtual ~MakeAlignmentModule ()
void BeginJob ()
JobCResult Ana (const MomNavigator *mom)
void EndJob ()

Private Member Functions

bool ProcessRecord (const NtpAlignmentRecord *ntprec, const VldContext &vldc)
bool RecalculateResiduals (const VldContext &vldc)
bool GetTrackRecoQuality (const NtpAlignmentRecord *ntprec)
void CountNHits (const PlexStripEndId &plexid)
void FillPlanePlexHistogram ()
void FillHitStripHistograms (const NtpAlignmentRecord *ntprec)
double FitTrackLessOne (vector< AlignmentStrip >::const_iterator begin, vector< AlignmentStrip >::const_iterator end, vector< AlignmentStrip >::const_iterator skip)
bool FitTrack (vector< AlignmentStrip >::const_iterator begin, vector< AlignmentStrip >::const_iterator end, LinearTrackFitResult &result)
void CompareSRTrackAndMaxChargeTrack ()
void ConvertToLocal (AlignmentStrip &astrip, PlexStripEndId &plexid, UgliGeomHandle &ugh, UgliStripHandle &ush)
void PrintTopHitStripsAndModules (unsigned int n=10)
void PrintJobStatistics ()
UInt_t FillMaxChargeTrack (map< int, AlignmentStrip > &track, const AlignmentStrip &astrip)
void FillRunSummary (const NtpAlignmentRecord *ntprec)
void InitRunSummary (int run, int subrun)
void PrintAlignmentStrip (const AlignmentStrip &astrip)
bool GetDirectionalCosines (Double_t &cosx, Double_t &cosy, Double_t &cosz, Double_t &length, Double_t &sigma, const VldContext &vld)

Private Attributes

TStopwatch fTimer
TStopwatch fTimerInterval
AlignmentHistogramsfHistogram
int fIteration
int fRun
int fSubRun
std::string fAlignmentPath
vector< AlignmentStripfTrackVStrip
vector< AlignmentStripfTrackUStrip
vector< AlignmentStripfCandVStrip
vector< AlignmentStripfCandUStrip
map< int, TrackLengthResidualfResidualvsMuonPathLength
vector< RunSummaryfRunSummaryVector
RunSummary fRunSummary
map< PlexStripEndId, int > fNStripHits
map< PlexScintMdlId, int > fNMdlHits
map< int, AlignmentStripfMaxChargeVTrack
map< int, AlignmentStripfMaxChargeUTrack
Double_t fTrackA_U
Double_t fTrackA_V
Double_t fTrackB_U
Double_t fTrackB_V
const Double_t fMaxTrackChargeCut
const Double_t fMinTrackChargeCut
const Double_t fMaxSigmaOfTPosCut
const Double_t fTrackChargeRatioCut
const Double_t fMinCosZCut
const Double_t fMinTrackStripChargeCut
const Double_t fMaxTrackStripChargeCut
bool fRecalculateResidual
bool fApplyCuts
Double_t fTrackVCharge
Double_t fTrackUCharge
Double_t fCandVCharge
Double_t fCandUCharge
unsigned int fNFailedFit
unsigned int fNRecords
unsigned int fNFailedRead
unsigned int fNMissedVPlane
unsigned int fNMissedUPlane
unsigned int fTotalVPlaneHits
unsigned int fTotalUPlaneHits
unsigned int fFailedCut
unsigned int fNHitsOutsideStrip
unsigned int fNFailedCutMaxVStripCharge
unsigned int fNFailedCutMaxUStripCharge
LinearTrackFitResult fVTrackFitResult
LinearTrackFitResult fUTrackFitResult
Double_t fMissedVPlaneMeanCharge
Double_t fMissedUPlaneMeanCharge
Double_t fMissedVPlaneChargeSigma
Double_t fMissedUPlaneChargeSigma
TFile * fTrackDirectionFile
TTree * fTrackDirectionTree
Double_t fCosX
Double_t fCosY
Double_t fCosZ
Double_t fLength
Double_t fSigma
Double_t fTime
Double_t fAltitude
Double_t fAzimuth
Double_t fCharge
Double_t fNStrip
UInt_t fYear
UInt_t fMonth
UInt_t fDay
UInt_t fHour
UInt_t fMinute
UInt_t fSec
unsigned int fNFailedTrackChargeCut
unsigned int fNFailedStripChargeCut
unsigned int fNFailedCosZCut
unsigned int fNFailedChargeRatioCut
unsigned int fNFailedSigmaTPosCut
int minu
int minv
int maxv
int maxu

Constructor & Destructor Documentation

MakeAlignmentModule::MakeAlignmentModule  ) 
 

Definition at line 65 of file MakeAlignmentModule.cxx.

00066    :fHistogram(0),
00067     fIteration(0),                   //Alignment iteration number
00068     fRun(0),
00069     fSubRun(0),
00070     fMaxTrackChargeCut(60000.0),       //cut on max 2d track charge used for alignment
00071     fMinTrackChargeCut(4000.0),        //cut on min 2d track charge used for alignment
00072     fMaxSigmaOfTPosCut(0.03),          //cut on uncertainty in tpos from 2d track fit
00073     fTrackChargeRatioCut(0.5),         //min 3d track's charge ratio to total snarl charge
00074     fMinCosZCut(0.25),                 //min fabs(cosz) of 3d track angle with Z axis
00075     fMinTrackStripChargeCut(100.0),    //min charge in a alternative track strip 
00076     fMaxTrackStripChargeCut(5000.0),   //max charge in a hit alignment strip
00077     fRecalculateResidual(false),
00078     fApplyCuts(true),
00079     fNFailedFit(0),
00080     fNRecords(0),
00081     fNFailedRead(0),
00082     fNMissedVPlane(0),
00083     fNMissedUPlane(0),
00084     fTotalVPlaneHits(0),
00085     fTotalUPlaneHits(0),
00086     fFailedCut(0),
00087     fNHitsOutsideStrip(0),
00088     fNFailedCutMaxVStripCharge(0),
00089     fNFailedCutMaxUStripCharge(0),
00090     fMissedVPlaneMeanCharge(0.0),
00091     fMissedUPlaneMeanCharge(0.0),
00092     fMissedVPlaneChargeSigma(0.0),
00093     fMissedUPlaneChargeSigma(0.0),
00094     fTrackDirectionFile(0),
00095     fNFailedTrackChargeCut(0),
00096     fNFailedStripChargeCut(0),
00097     fNFailedCosZCut(0),
00098     fNFailedChargeRatioCut(0),
00099     fNFailedSigmaTPosCut(0)
00100 {
00101    minu=100, minv=100, maxv=0, maxu=0;
00102 }

virtual MakeAlignmentModule::~MakeAlignmentModule  )  [inline, virtual]
 

Definition at line 53 of file MakeAlignmentModule.h.

00053 {};


Member Function Documentation

JobCResult MakeAlignmentModule::Ana const MomNavigator mom  )  [virtual]
 

Implement this for read only access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 180 of file MakeAlignmentModule.cxx.

References CompareSRTrackAndMaxChargeTrack(), fAlignmentPath, fCharge, fCosX, fCosY, fCosZ, fDay, fFailedCut, fHistogram, fHour, FillHitStripHistograms(), FillPlanePlexHistogram(), FillRunSummary(), fIteration, fLength, fMinute, fMonth, fNRecords, fNStrip, fRecalculateResidual, fRunSummary, fRunSummaryVector, fSec, fSigma, fTime, fTimerInterval, fTrackDirectionTree, fYear, VldTimeStamp::GetDate(), VldContext::GetDetector(), GetDirectionalCosines(), MomNavigator::GetFragment(), RecRecordImp< T >::GetHeader(), VldTimeStamp::GetSec(), VldTimeStamp::GetTime(), VldContext::GetTimeStamp(), GetTrackRecoQuality(), RecHeader::GetVldContext(), InitRunSummary(), AstUtil::LocalToHorizon(), MSG, ProcessRecord(), RecalculateResiduals(), RunSummary::run, and RunSummary::subrun.

00181 {
00182 
00183    NtpAlignmentRecord* ntprec =
00184       dynamic_cast<NtpAlignmentRecord*>(mom->GetFragment("NtpAlignmentRecord"));
00185    
00186    if(!ntprec)
00187       return JobCResult::kAOK;   
00188 
00189    const RecHeader hdr = ntprec->GetHeader();
00190    const VldContext vldc = hdr.GetVldContext();
00191    Int_t run = (ntprec -> GetHeader()).GetRun();
00192    Int_t subrun = (ntprec -> GetHeader()).GetSubRun();
00193    if(fNRecords % 10000 == 0){
00194       if(fNRecords == 0){
00195          InitRunSummary(run, subrun);
00196          stringstream ss;
00197          if(fApplyCuts)
00198             ss << fAlignmentPath << "/alignment_" << fIteration << ".root";
00199          else
00200             ss << fAlignmentPath << "/alignment_no_cuts_" << fIteration << ".root";      
00201          fHistogram = new AlignmentHistograms(ss.str().c_str(), vldc);
00202       }
00203       MsgFormat f("%10d");
00204       
00205       MSG("Align", Msg::kInfo) << "Found NtpAlignmentRecord #" << f(fNRecords)
00206                                << " from run #" << run << ", subrun #" << subrun
00207                                << ", cpu time = " << fTimerInterval.RealTime() <<endl;
00208       fTimerInterval.Reset();
00209       fTimerInterval.Start();
00210    }   
00211       
00212    if(fRunSummary.run != run || fRunSummary.subrun != subrun){
00213       fRunSummaryVector.push_back(fRunSummary);
00214       InitRunSummary(run, subrun);
00215    }
00216 
00217    FillRunSummary(ntprec);
00218 
00219    fNRecords++;      
00220    
00221    if(!GetTrackRecoQuality(ntprec)){
00222       fFailedCut++;
00223       return JobCResult::kAOK;   
00224    }      
00225       
00226    //Read residuals and other strips' info to vectors of AlignmentStrips
00227    //This is the main function where lots of work is done
00228    if(!ProcessRecord(ntprec, vldc)){
00229       fFailedCut++;
00230       return JobCResult::kAOK;      
00231    }   
00232 
00233    fHistogram -> FillTrackInfo(ntprec);      
00234 
00235    if(fRecalculateResidual && !RecalculateResiduals(vldc))
00236       return JobCResult::kAOK;
00237    
00238    if(GetDirectionalCosines(fCosX, fCosY, fCosZ, fLength, fSigma, vldc)){
00239       fHistogram -> FillDirectionalCosines(fCosX, fCosY, fCosZ, fLength);
00240       if(fTrackDirectionFile){
00241          fTime = vldc.GetTimeStamp().GetSec();
00242          vldc.GetTimeStamp().GetDate(kTRUE, 0, &fYear, &fMonth, &fDay);
00243          vldc.GetTimeStamp().GetTime(kTRUE, 0, &fHour, &fMinute, &fSec);
00244          fCharge = ntprec -> ucharge + ntprec -> vcharge;
00245          fNStrip = ntprec -> ntrackustrip + ntprec -> ntrackvstrip;
00246          AstUtil::LocalToHorizon(fCosX, fCosY, fCosZ, vldc.GetDetector(), fAltitude, fAzimuth);
00247          fTrackDirectionTree -> Fill();
00248       }
00249    }
00250 
00251    FillHitStripHistograms(ntprec);
00252    
00253    FillPlanePlexHistogram();
00254    CompareSRTrackAndMaxChargeTrack();
00255    
00256    return JobCResult::kAOK;   
00257 }

void MakeAlignmentModule::BeginJob  )  [virtual]
 

Implement for notification of begin of job

Reimplemented from JobCModule.

Definition at line 104 of file MakeAlignmentModule.cxx.

References atoi(), fAlignmentPath, fAltitude, fApplyCuts, fAzimuth, fCharge, fCosX, fCosY, fCosZ, fDay, fHour, fIteration, fLength, fMinute, fMonth, fNStrip, fRecalculateResidual, fSec, fSigma, fTime, fTimer, fTimerInterval, fTrackDirectionFile, fTrackDirectionTree, fYear, MSG, and strlen().

00105 { 
00106    MSG("Align", Msg::kDebug) << "MakeAlignmentModule::BeginJob()"<< endl;
00107    MSG("Align", Msg::kInfo) << "Initializing variables and histograms..." << endl;
00108 
00109    const char* strENV_ALIGN_ITER = getenv("ENV_ALIGN_ITER");
00110    if ( strENV_ALIGN_ITER == 0 || strlen(strENV_ALIGN_ITER) == 0 )
00111    {
00112       MSG("Align", Msg::kFatal) << "ENV_ALIGN_ITER is not set!" <<endl
00113                                 << " Program is terminating now." <<endl;
00114       abort();
00115    } else 
00116       fIteration = atoi(strENV_ALIGN_ITER);
00117    
00118    const char* strENV_ALIGN_DIR = getenv("ENV_ALIGN_DIR");
00119    if ( strENV_ALIGN_DIR == 0 || strlen(strENV_ALIGN_DIR) == 0 )
00120    {
00121       MSG("Align", Msg::kFatal) << "ENV_ALIGN_DIR is not set!"
00122                                 << " Program is terminating now." <<endl;
00123       abort();
00124    } else 
00125       fAlignmentPath = string(strENV_ALIGN_DIR);
00126 
00127 
00128    const char* strENV_ALIGN_APPLYCUTS = getenv("ENV_ALIGN_APPLYCUTS");
00129    if ( strENV_ALIGN_APPLYCUTS == 0 || strlen(strENV_ALIGN_APPLYCUTS) == 0 )
00130    {
00131       MSG("Align", Msg::kWarning) << "ENV_ALIGN_APPLYCUTS is not set!"
00132                                   << " Using default value: fApplyCuts=true" <<endl;
00133    } else 
00134       if(atoi(strENV_ALIGN_APPLYCUTS)==0)
00135          fApplyCuts = false;
00136    
00137    
00138    const char* strENV_ALIGN_RECALCULATE = getenv("ENV_ALIGN_RECALCULATE");
00139    if ( strENV_ALIGN_RECALCULATE == 0 || strlen(strENV_ALIGN_RECALCULATE) == 0 )
00140    {
00141       MSG("Align", Msg::kWarning) << "ENV_ALIGN_RECALCULATE is not set!"
00142                                   << " Using default value: fRecalculateResidual=false" <<endl;
00143    } else 
00144       if(atoi(strENV_ALIGN_RECALCULATE)==1)
00145          fRecalculateResidual = true;
00146    
00147    MSG("Align", Msg::kInfo) << endl << "fIteration = " << fIteration << endl
00148                             << "fAlignmentPath = " << fAlignmentPath << endl
00149                             << "fApplyCuts = " << fApplyCuts <<endl
00150                             << "fRecalculateResidual = " << fRecalculateResidual <<endl << endl;
00151    
00152    if(!fApplyCuts){
00153       stringstream ss;
00154       ss << fAlignmentPath << "/track_direction_" << fIteration << ".root";
00155       fTrackDirectionFile = new TFile(ss.str().c_str(), "RECREATE");
00156       fTrackDirectionTree = new TTree("TrackDirection", "TrackDirection");   
00157       fTrackDirectionTree -> Branch("CosX", &fCosX, "fCosX/D"); 
00158       fTrackDirectionTree -> Branch("CosY", &fCosY, "fCosY/D"); 
00159       fTrackDirectionTree -> Branch("CosZ", &fCosZ, "fCosZ/D"); 
00160       fTrackDirectionTree -> Branch("Length", &fLength, "fLength/D"); 
00161       fTrackDirectionTree -> Branch("Sigma", &fSigma, "fSigma/D"); 
00162       fTrackDirectionTree -> Branch("Time", &fTime, "fTime/D"); 
00163       fTrackDirectionTree -> Branch("Altitude", &fAltitude, "fAltitude/D"); 
00164       fTrackDirectionTree -> Branch("Azimuth", &fAzimuth, "fAzimuth/D"); 
00165       fTrackDirectionTree -> Branch("Charge", &fCharge, "fCharge/D"); 
00166       fTrackDirectionTree -> Branch("NStrip", &fNStrip, "fNStrip/D"); 
00167       fTrackDirectionTree -> Branch("Year", &fYear, "fYear/i"); 
00168       fTrackDirectionTree -> Branch("Month", &fMonth, "fMonth/i"); 
00169       fTrackDirectionTree -> Branch("Day", &fDay, "fDay/i"); 
00170       fTrackDirectionTree -> Branch("Hour", &fHour, "fHour/i"); 
00171       fTrackDirectionTree -> Branch("Minute", &fMinute, "fMinute/i"); 
00172       fTrackDirectionTree -> Branch("Sec", &fSec, "fSec/i"); 
00173    }   
00174 
00175    fTimer.Start();
00176    fTimerInterval.Start();
00177 }

void MakeAlignmentModule::CompareSRTrackAndMaxChargeTrack  )  [private]
 

Definition at line 755 of file MakeAlignmentModule.cxx.

References AlignmentStrip::charge, fHistogram, find(), FitTrack(), fMaxChargeUTrack, fMaxChargeVTrack, fMissedUPlaneChargeSigma, fMissedUPlaneMeanCharge, fMissedVPlaneChargeSigma, fMissedVPlaneMeanCharge, fNMissedUPlane, fNMissedVPlane, fTrackUStrip, fTrackVStrip, MSG, AlignmentStrip::plane, AlignmentStrip::plexseid, and LinearTrackFitResult::SigmaOfTPos.

Referenced by Ana().

00756 {
00757    
00758    double vcharge = 0.0;
00759    double ucharge = 0.0;
00760 
00761    vector<AlignmentStrip> vtrack;
00762    vector<AlignmentStrip> utrack;
00763    
00764    for(map<int, AlignmentStrip>::const_iterator it = fMaxChargeVTrack.begin(); 
00765        it != fMaxChargeVTrack.end(); ++it){
00766       AlignmentStrip astrip = it->second;
00767 
00768       vcharge += astrip.charge;
00769       vtrack.push_back(astrip);
00770 
00771       vector<AlignmentStrip>::iterator fit =
00772          find(fTrackVStrip.begin(), fTrackVStrip.end(), astrip);
00773       
00774       if( fit != fTrackVStrip.end()){
00775          MSG("Align", Msg::kVerbose) << "Found track V strip in fMaxChargeVTrack"<<endl;
00776          continue;
00777       }
00778 
00779       bool missplane = true;
00780       int plane = astrip.plane;
00781       for(unsigned int j = 0; j < fTrackVStrip.size(); ++j)
00782          if(fTrackVStrip[j].plane == plane){
00783             PlexStripEndId trkplexid(fTrackVStrip[j].plexseid);
00784             PlexStripEndId candplexid(astrip.plexseid);
00785             fHistogram -> FillAlternativeTrackHits(trkplexid, candplexid);
00786             missplane = false;
00787          }      
00788 
00789       if(missplane){
00790          fNMissedVPlane++;
00791          fMissedVPlaneMeanCharge  += astrip.charge;
00792          fMissedVPlaneChargeSigma += astrip.charge*astrip.charge;
00793       }
00794    }
00795    
00796    
00797    for(map<int, AlignmentStrip>::const_iterator it = fMaxChargeUTrack.begin(); 
00798        it != fMaxChargeUTrack.end(); ++it){
00799       AlignmentStrip astrip = it->second;
00800 
00801       ucharge += astrip.charge;
00802       utrack.push_back(astrip);
00803 
00804       vector<AlignmentStrip>::iterator fit =
00805          find(fTrackUStrip.begin(), fTrackUStrip.end(), astrip);
00806       
00807       if( fit != fTrackUStrip.end()){
00808          MSG("Align", Msg::kVerbose) << "Found track V strip in fMaxChargeVTrack"<<endl;
00809          continue;
00810       }
00811       
00812       bool missplane = true;
00813       int plane = astrip.plane;
00814       for(unsigned int j = 0; j < fTrackUStrip.size(); ++j)
00815          if(fTrackUStrip[j].plane == plane){
00816             PlexStripEndId trkplexid(fTrackUStrip[j].plexseid);
00817             PlexStripEndId candplexid(astrip.plexseid);
00818             fHistogram -> FillAlternativeTrackHits(trkplexid, candplexid);
00819             missplane = false;
00820          }
00821       
00822       if(missplane){
00823          fNMissedUPlane++;
00824          fMissedUPlaneMeanCharge  += astrip.charge;
00825          fMissedUPlaneChargeSigma += astrip.charge*astrip.charge;
00826       }
00827    }
00828 
00829    double vsize = vtrack.size();
00830    double usize = utrack.size();
00831    
00832    LinearTrackFitResult FitResult;
00833 
00834    FitTrack(vtrack.begin(), vtrack.end(), FitResult);
00835    double vtpos = FitResult.SigmaOfTPos;
00836    FitTrack(utrack.begin(), utrack.end(), FitResult);
00837    double utpos = FitResult.SigmaOfTPos;
00838 
00839    fHistogram -> FillMaxChargeTrackInfo(vtpos, utpos, vsize, usize, vcharge, ucharge);
00840 }

void MakeAlignmentModule::ConvertToLocal AlignmentStrip astrip,
PlexStripEndId plexid,
UgliGeomHandle ugh,
UgliStripHandle ush
[private]
 

Definition at line 952 of file MakeAlignmentModule.cxx.

References fNHitsOutsideStrip, UgliStripHandle::GetHalfLength(), PlexPlaneId::GetPlaneView(), PlexStripEndId::GetStrip(), AlignmentStrip::ghitpos, UgliStripHandle::GlobalToLocal(), AlignmentStrip::goodhit, AlignmentStrip::length, AlignmentStrip::lhitpos, maxu, maxv, minu, minv, AlignmentStrip::pigtail, AlignmentStrip::residual, AlignmentStrip::tpos, UgliGeomHandle::uvz2xyz(), v, UgliStripHandle::WlsBypass(), AlignmentStrip::wlsbypass, UgliStripHandle::WlsPigtail(), and AlignmentStrip::zpos.

Referenced by ProcessRecord().

00956 {
00957    // calculate the position of strip ends in (strip) local co-ordinates
00958    // x = distance along the strip, y=distance in +tpos coordinate
00959    // the "logical" strip is the one as-if there were no coil/bypass
00960    Double_t halflen = ush.GetHalfLength();
00961    //   TVector3 localCenter(0,0,0);  // center of the "logical" strip
00962    //   TVector3 localEastEnd(-halflen,0,0);
00963    TVector3 localWestEnd(+halflen, 0.0, 0.0);
00964    //   TVector3 localHitLPos(astrip.lhitpos,0,0);
00965    
00966    // calculate the positions in global XYZ space
00967    //TVector3 xyz0 = ush.LocalToGlobal(localCenter);
00968    //TVector3 xyzE = ush.LocalToGlobal(localEastEnd);
00969    //TVector3 xyzW = ush.LocalToGlobal(localWestEnd);
00970 
00971    Double_t u = 0.0, v = 0.0;
00972 
00973    if(plexid.GetPlaneView() == PlaneView::kU){
00974       v = astrip.ghitpos;
00975       u = astrip.residual + astrip.tpos;
00976    } else {
00977       u = astrip.ghitpos;
00978       v = astrip.residual + astrip.tpos;
00979    }
00980    
00981 
00982    TVector3 ghituvz(u, v, astrip.zpos);
00983    TVector3 ghitxyz = ugh.uvz2xyz(ghituvz);
00984    TVector3 lhitxyz = ush.GlobalToLocal(ghitxyz);
00985       
00986    astrip.length = 2.0*halflen;
00987    astrip.lhitpos = lhitxyz.x();
00988    astrip.pigtail = ush.WlsPigtail(StripEnd::kWest);
00989    astrip.wlsbypass = ush.WlsBypass();
00990 
00991    if(astrip.wlsbypass > 0.01){
00992       if(plexid.GetPlaneView() == PlaneView::kU)
00993       {
00994          if(maxu<plexid.GetStrip())
00995             maxu=plexid.GetStrip();
00996          if(minu>plexid.GetStrip())
00997             minu=plexid.GetStrip();
00998       }
00999       if(plexid.GetPlaneView() == PlaneView::kV)
01000       {
01001          if(maxv<plexid.GetStrip())
01002             maxv=plexid.GetStrip();
01003          if(minv>plexid.GetStrip())
01004             minv=plexid.GetStrip();
01005       }
01006    }
01007 
01008    if(fabs(lhitxyz.x()) > halflen){
01009       astrip.goodhit = false;
01010       fNHitsOutsideStrip++;
01011    }
01012 
01013    return;
01014 /*   
01015      double y = lhitxyz.y();
01016      double z = lhitxyz.z();
01017      fHistogram -> FillRoundingErrors(plexid, y, z);
01018      if(fabs(y + z) > 1.0e-4)
01019      MSG("Align", Msg::kWarning) <<"In local coordinates y + z = " << fabs(y + z) << endl;
01020 */
01021 }

void MakeAlignmentModule::CountNHits const PlexStripEndId plexid  )  [private]
 

Definition at line 330 of file MakeAlignmentModule.cxx.

References fNMdlHits, fNStripHits, and PlexStripEndId::GetScintMdlId().

Referenced by FillHitStripHistograms().

00331 {
00332    map<PlexStripEndId, int>::iterator fit = fNStripHits.find(plexid);
00333    if(fit ==  fNStripHits.end())
00334       fNStripHits[plexid] = 1;
00335    else 
00336       fit->second += 1;
00337 
00338    PlexScintMdlId plexmdlid = plexid.GetScintMdlId();   
00339    map<PlexScintMdlId, int>::iterator fitr = fNMdlHits.find(plexmdlid);
00340    if(fitr ==  fNMdlHits.end())
00341       fNMdlHits[plexmdlid] = 1;
00342    else 
00343       fitr->second += 1;
00344 }

void MakeAlignmentModule::EndJob  )  [virtual]
 

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 259 of file MakeAlignmentModule.cxx.

References fHistogram, FillRunSummary(), fNMdlHits, fNStripHits, fRunSummaryVector, fTrackDirectionFile, MSG, and PrintJobStatistics().

00260 { 
00261    PrintJobStatistics();   
00262    
00263    if(fTrackDirectionFile){
00264       fTrackDirectionFile -> Write();
00265       fTrackDirectionFile -> Close();
00266    }
00267 
00268    fHistogram -> FillNumberOfHits(fNStripHits, fNMdlHits);
00269    fHistogram -> ProcessHistograms();
00270    fHistogram -> FillRunSummary(fRunSummaryVector);
00271 
00272    delete fHistogram;
00273    
00274    MSG("Align", Msg::kInfo) << "MakeAlignmentModule is done." <<endl;
00275 }

void MakeAlignmentModule::FillHitStripHistograms const NtpAlignmentRecord ntprec  )  [private]
 

Definition at line 551 of file MakeAlignmentModule.cxx.

References abs(), CountNHits(), fHistogram, fResidualvsMuonPathLength, fTrackUStrip, fTrackVStrip, NtpAlignmentRecord::hcosz, AlignmentStrip::length, TrackLengthResidual::length, AlignmentStrip::plane, AlignmentStrip::residual, TrackLengthResidual::residual, and AlignmentStrip::zpos.

Referenced by Ana().

00552 {   
00553    fResidualvsMuonPathLength.clear();
00554 
00555 
00556    const double &cosz = ntprec->hcosz;
00557    for(unsigned int i = 0; i < fTrackVStrip.size(); ++i){
00558       PlexStripEndId plexid(fTrackVStrip[i].plexseid);
00559       CountNHits(plexid);     
00560       const AlignmentStrip &astrip = fTrackVStrip[i];
00561       fHistogram -> FillHistograms(plexid, astrip, ntprec);
00562       TrackLengthResidual hit;      
00563       hit.residual = astrip.residual;
00564       hit.length   = astrip.zpos;
00565       pair<int, TrackLengthResidual>p(astrip.plane, hit);
00566       fResidualvsMuonPathLength.insert(p);
00567    }
00568 
00569    for(unsigned int i = 0; i < fTrackUStrip.size(); ++i){
00570       PlexStripEndId plexid(fTrackUStrip[i].plexseid);
00571       CountNHits(plexid);     
00572       const AlignmentStrip &astrip = fTrackUStrip[i];
00573       fHistogram -> FillHistograms(plexid, astrip, ntprec);
00574       TrackLengthResidual hit;
00575       hit.residual = astrip.residual;
00576       hit.length   = astrip.zpos;
00577       pair<int, TrackLengthResidual>p(astrip.plane, hit);
00578       fResidualvsMuonPathLength.insert(p);
00579    }
00580 
00581 
00582    int prevplane = fResidualvsMuonPathLength.begin() -> first;
00583    for(map<int, TrackLengthResidual>::iterator itr = fResidualvsMuonPathLength.begin();
00584        itr != fResidualvsMuonPathLength.end(); ++itr)
00585    {
00586       if(abs(prevplane - itr->first) > 1)
00587          return;
00588       else
00589          prevplane = itr->first;
00590    }
00591    
00592    if(cosz < 0){
00593       map<int, TrackLengthResidual>::iterator itr = fResidualvsMuonPathLength.begin();
00594       const double &z0 = (itr->second).length;
00595       for(; itr != fResidualvsMuonPathLength.end(); ++itr){
00596          TrackLengthResidual &hit = itr->second;
00597          hit.length = fabs((hit.length-z0)*cosz);
00598          fHistogram ->  FillResidualvsMuonPathLength(hit.length, hit.residual, false);
00599       }
00600    }
00601 
00602    if(cosz > 0){
00603       map<int, TrackLengthResidual>::reverse_iterator itr = 
00604          fResidualvsMuonPathLength.rbegin();
00605       const double &z0 = (itr->second).length;
00606       for(; itr != fResidualvsMuonPathLength.rend(); ++itr){
00607          TrackLengthResidual &hit = itr->second;
00608          hit.length = fabs((hit.length-z0)*cosz);
00609          fHistogram ->  FillResidualvsMuonPathLength(hit.length, hit.residual, false);
00610       }
00611    }
00612 
00613 }

UInt_t MakeAlignmentModule::FillMaxChargeTrack map< int, AlignmentStrip > &  track,
const AlignmentStrip astrip
[private]
 

Definition at line 735 of file MakeAlignmentModule.cxx.

References AlignmentStrip::charge, AlignmentStrip::plane, and AlignmentStrip::plexseid.

Referenced by ProcessRecord().

00737 {
00738    const int &plane = astrip.plane;
00739    map<int, AlignmentStrip>::iterator fit = track.find(plane);
00740    if(fit != track.end()){
00741       if((fit->second).charge < astrip.charge){
00742          UInt_t plexseid = (fit->second).plexseid;
00743          fit->second = astrip;
00744          return plexseid;
00745       }
00746    } else
00747       if(astrip.charge > fMinTrackStripChargeCut){
00748          track[plane] = astrip;
00749          return 0;
00750       }
00751    return 0;
00752 }

void MakeAlignmentModule::FillPlanePlexHistogram  )  [private]
 

Definition at line 704 of file MakeAlignmentModule.cxx.

References fCandUStrip, fCandVStrip, fHistogram, fTrackUStrip, fTrackVStrip, and PlexPlaneId::GetPlane().

Referenced by Ana().

00705 {
00706    for(unsigned int i = 0; i < fTrackVStrip.size(); ++i)
00707       if(fTrackVStrip[i].charge > 0.0){
00708          PlexStripEndId trackstrip(fTrackVStrip[i].plexseid);
00709          fHistogram -> FillPlanePlex(trackstrip, trackstrip, 1.0);
00710          for(unsigned int j = 0; j < fCandVStrip.size(); ++j){
00711             PlexStripEndId candstrip(fCandVStrip[j].plexseid);
00712             if(trackstrip.GetPlane() == candstrip.GetPlane()){
00713                Double_t ratio = fCandVStrip[j].charge/fTrackVStrip[i].charge;
00714                fHistogram -> FillPlanePlex(trackstrip, candstrip, ratio);
00715             }
00716          }
00717       }
00718 
00719    for(unsigned int i = 0; i < fTrackUStrip.size(); ++i)
00720       if(fTrackUStrip[i].charge > 0.0){
00721          PlexStripEndId trackstrip(fTrackUStrip[i].plexseid);
00722          fHistogram -> FillPlanePlex(trackstrip, trackstrip, 1.0);
00723          for(unsigned int j = 0; j < fCandUStrip.size(); ++j){
00724             PlexStripEndId candstrip(fCandUStrip[j].plexseid);
00725             if(trackstrip.GetPlane() == candstrip.GetPlane()){
00726                Double_t ratio = fCandUStrip[j].charge/fTrackUStrip[i].charge;
00727                fHistogram -> FillPlanePlex(trackstrip, candstrip, ratio);
00728             }
00729          }
00730       }
00731 }

void MakeAlignmentModule::FillRunSummary const NtpAlignmentRecord ntprec  )  [private]
 

Definition at line 1120 of file MakeAlignmentModule.cxx.

References RunSummary::canducharge, RunSummary::candvcharge, fRunSummary, RunSummary::ncandustrip, RunSummary::ncandvstrip, RunSummary::nrecord, RunSummary::ntrackustrip, RunSummary::ntrackvstrip, RunSummary::trackucharge, and RunSummary::trackvcharge.

Referenced by Ana(), and EndJob().

01121 {  
01122    fRunSummary.nrecord += 1.0;
01123    fRunSummary.ntrackvstrip += ntprec -> ntrackvstrip;
01124    fRunSummary.ntrackustrip += ntprec -> ntrackustrip;
01125    fRunSummary.ncandvstrip += ntprec -> ncandvstrip;
01126    fRunSummary.ncandustrip += ntprec -> ncandustrip;
01127    fRunSummary.trackvcharge += ntprec -> vcharge;
01128    fRunSummary.trackucharge += ntprec -> ucharge;
01129    fRunSummary.candvcharge += ntprec -> vcandcharge;
01130    fRunSummary.canducharge += ntprec -> ucandcharge;
01131 }

bool MakeAlignmentModule::FitTrack vector< AlignmentStrip >::const_iterator  begin,
vector< AlignmentStrip >::const_iterator  end,
LinearTrackFitResult result
[private]
 

Definition at line 889 of file MakeAlignmentModule.cxx.

References LinearTrackFitResult::CovAB, F, LinearTrackFitResult::FitA, LinearTrackFitResult::FitB, MSG, LinearTrackFitResult::quality, LinearTrackFitResult::SigmaOfA, LinearTrackFitResult::SigmaOfB, and LinearTrackFitResult::SigmaOfTPos.

Referenced by CompareSRTrackAndMaxChargeTrack().

00892 {
00893    MSG("Align", Msg::kVerbose) << "FitTrack..." << endl;
00894 
00895    // Linear regression parameters least squares method. See for eg. Num Rec Ch 15
00896    // Fit y = ax + b, as in W. R. Leo, Techniques for ..., Section 4.7.2
00897    // x is strip's Z position, y is strip's transverse position (U or V).
00898    double A = 0.0, B=0.0, C=0.0, D=0.0, E=0.0, F=0.0, S=0.0;
00899    
00900    //MSG("Align", Msg::kInfo) << "New track" << endl;
00901    for (vector<AlignmentStrip>::const_iterator run = begin; run != end; ++run){
00902       //MSG("Align", Msg::kInfo) << run -> plexseid << endl;
00903          
00904       double x = run -> zpos;
00905       double y = run -> tpos;
00906       A += x;
00907       B += 1.0;
00908       C += y;
00909       D += x*x;
00910       E += x*y;
00911       F += y*y;
00912    }
00913    
00914    double det = B*D - A*A; //determinant of error matrix
00915    if(fabs(det) < 0.000001){
00916       MSG("Align", Msg::kWarning) << "Linear fit failed!" << endl;
00917       result.quality = false;
00918       return false;
00919    }
00920    
00921    // The linear fit: y = ax + b
00922    double a  = (E*B-C*A)/det;
00923    double b  = (D*C-E*A)/det;
00924    result.FitA = a;
00925    result.FitB = b;
00926    result.SigmaOfA = pow(B/det, 0.5);
00927    result.SigmaOfB = pow(D/det, 0.5);
00928    result.CovAB    = -A/det;   
00929    
00930    double npoints = 0.0;
00931    for (vector<AlignmentStrip>::const_iterator run = begin; run != end; ++run){
00932       double x = run -> zpos;
00933       double y = run -> tpos;
00934       S += (y-a*x-b)*(y-a*x-b);
00935       npoints += 1.0;
00936    }
00937    
00938    if( (npoints-2.0) < 0.9){
00939       MSG("Align", Msg::kWarning) << "Linear fit failed!" << endl;
00940       result.quality = false;
00941       return false;
00942    }
00943    
00944    //error in fitted y and chi2 are mutualy exclusive
00945    result.SigmaOfTPos = pow(S/(npoints-2.0), 0.5);   
00946    result.quality = true;
00947    return true;
00948    MSG("Align", Msg::kVerbose) << "FitTrack Done!" << endl;
00949 }

double MakeAlignmentModule::FitTrackLessOne vector< AlignmentStrip >::const_iterator  begin,
vector< AlignmentStrip >::const_iterator  end,
vector< AlignmentStrip >::const_iterator  skip
[private]
 

Definition at line 845 of file MakeAlignmentModule.cxx.

References F, and MSG.

Referenced by RecalculateResiduals().

00848 {
00849 
00850    
00851    MSG("Align", Msg::kVerbose) << "FitTrackLessOne..." << endl;
00852    // Linear regression parameters least squares method. See for eg. Num Rec Ch 15
00853    // Fit y = ax + b, as in W. R. Leo, Techniques for ..., Section 4.7.2
00854    // x is strip's Z position, y is strip's transverse position (U or V).
00855    double A=0.0, B=0.0, C=0.0, D=0.0, E=0.0, F=0.0;
00856 
00857    for (vector<AlignmentStrip>::const_iterator run = begin; run != end; ++run) 
00858       if (run != skip){
00859          double x = run -> zpos;
00860          double y = run -> tpos;
00861          A += x;
00862          B += 1.0;
00863          C += y;
00864          D += x*x;
00865          E += x*y;
00866          F += y*y;
00867       }
00868    
00869    double det = B*D - A*A; //determinant of error matrix
00870    if(fabs(det) < 0.000001){
00871       MSG("Align", Msg::kWarning) << "Linear fit failed!" << endl;
00872       return -100.0;
00873    }
00874    
00875    // The linear fit: y = ax + b
00876    double a  = (E*B-C*A)/det;
00877    double b  = (D*C-E*A)/det;
00878 
00879    double skipped_x = skip -> zpos;
00880    double skipped_y = skip -> tpos;
00881    double predict   = a*skipped_x + b;       
00882     
00883    MSG("Align", Msg::kVerbose) << "FitTrackLessOne Done!" << endl;
00884    return (predict - skipped_y);
00885     
00886 }

bool MakeAlignmentModule::GetDirectionalCosines Double_t &  cosx,
Double_t &  cosy,
Double_t &  cosz,
Double_t &  length,
Double_t &  sigma,
const VldContext vld
[private]
 

Definition at line 616 of file MakeAlignmentModule.cxx.

References fTrackUStrip, fTrackVStrip, AlignmentStrip::ghitpos, MSG, AlignmentStrip::plane, AlignmentStrip::tpos, UgliGeomHandle::uvz2xyz(), v, and AlignmentStrip::zpos.

Referenced by Ana().

00618 {
00619    UgliGeomHandle ugh(vld);
00620    map<int, TVector3> track;
00621    for(unsigned int i = 0; i < fTrackVStrip.size(); ++i){
00622       AlignmentStrip &astrip = fTrackVStrip[i];
00623       TVector3 uvz(astrip.ghitpos, astrip.tpos, astrip.zpos);
00624       TVector3 xyz = ugh.uvz2xyz(uvz);
00625       pair <int, TVector3> p(astrip.plane, xyz);
00626       track.insert(p);
00627    }
00628    
00629    for(unsigned int i = 0; i < fTrackUStrip.size(); ++i){
00630       AlignmentStrip &astrip = fTrackUStrip[i];
00631       TVector3 uvz(astrip.tpos, astrip.ghitpos, astrip.zpos);
00632       TVector3 xyz = ugh.uvz2xyz(uvz);
00633       pair <int, TVector3> p(astrip.plane, xyz);
00634       track.insert(p);
00635    }
00636    
00637    Double_t A=0.0, B=0.0, D=0.0;
00638    Double_t Cx=0.0, Ex=0.0, Fx=0.0;
00639    Double_t Cy=0.0, Ey=0.0, Fy=0.0;
00640 
00641    int firstplane=1000, lastplane=0;
00642    for(map<int, TVector3>::const_iterator it = track.begin(); it != track.end(); ++it){
00643       const TVector3 &v = it->second;
00644       const Double_t &x = v.x();
00645       const Double_t &y = v.y();
00646       const Double_t &z = v.z();
00647       A += z, B += 1.0, D += z*z;
00648       Cx += x, Ex += z*x, Fx += x*x;
00649       Cy += y, Ey += z*y, Fy += y*y;
00650       const int &plane = it -> first;
00651       if(firstplane > plane)
00652          firstplane = plane;
00653       if(lastplane < plane)
00654          lastplane = plane;
00655    }
00656 
00657    Double_t det = B*D - A*A;
00658 
00659    if(fabs(det) < 0.000001){
00660       MSG("Align", Msg::kWarning) << "Linear fit failed!" << endl;
00661       return false;
00662    }
00663    
00664    Double_t FitAx = (Ex*B-Cx*A)/det;
00665    Double_t FitAy = (Ey*B-Cy*A)/det;
00666    Double_t FitBx = (D*Cx-Ex*A)/det;
00667    Double_t FitBy = (D*Cy-Ey*A)/det;
00668 
00669    if(FitAy < 0.0)
00670       cosz = - pow(1.0/(FitAx*FitAx + FitAy*FitAy + 1.0), 0.5);
00671    else 
00672       cosz = pow(1.0/(FitAx*FitAx + FitAy*FitAy + 1.0), 0.5);
00673 
00674    cosy = fabs(FitAy*cosz);
00675    cosx = FitAx*fabs(cosz);
00676    
00677    const TVector3 &fs = track[firstplane];
00678    const TVector3 &ls = track[lastplane];
00679    TVector3 tl(fs.x()-ls.x(), fs.y()-ls.y(), fs.z()-ls.z());
00680    length = tl.Mag();
00681 
00682    Double_t sumx=0.0, sumy=0.0, npoints=0.0;
00683    for(map<int, TVector3>::const_iterator it = track.begin(); it != track.end(); ++it){
00684       const TVector3 &v = it->second;
00685       const Double_t &x = v.x();
00686       const Double_t &y = v.y();
00687       const Double_t &z = v.z();
00688       sumx += (x-FitAx*z-FitBx)*(x-FitAx*z-FitBx);
00689       sumy += (y-FitAy*z-FitBy)*(y-FitAy*z-FitBy);
00690       npoints += 1.0;
00691    }
00692    
00693    npoints = npoints - 2.0;
00694    if(npoints < 0.9){
00695       MSG("Align", Msg::kWarning) << "Linear fit failed!" << endl;
00696       return false;
00697    }
00698    sigma = pow(sumx/npoints, 0.5) + pow(sumy/npoints, 0.5);
00699    return true;
00700 }

bool MakeAlignmentModule::GetTrackRecoQuality const NtpAlignmentRecord ntprec  )  [private]
 

Definition at line 277 of file MakeAlignmentModule.cxx.

References fCandUCharge, fCandVCharge, fMaxSigmaOfTPosCut, fMaxTrackChargeCut, fMinTrackChargeCut, fNFailedChargeRatioCut, fNFailedCosZCut, fNFailedSigmaTPosCut, fNFailedTrackChargeCut, fTrackUCharge, fTrackVCharge, NtpAlignmentRecord::hcosz, NtpAlignmentRecord::ucharge, NtpAlignmentRecord::usigmaoftpos, NtpAlignmentRecord::vcharge, and NtpAlignmentRecord::vsigmaoftpos.

Referenced by Ana().

00278 {
00279    //Check that: 1) Ratio of track charge to total charge in the current 
00280    //            record is greater than fTrackChargeRatioCut
00281    //            2) Uncertainty in tpos of a fit is less that fSigmaOfTPosCut
00282    //            3) Charge of 2d tracks is less that fTrackChargeCut
00283 
00284    if(!fApplyCuts)
00285       return true;
00286 
00287    //Cut on 2d track charge
00288    if(ntprec->vcharge > fMaxTrackChargeCut || ntprec->vcharge < fMinTrackChargeCut ||
00289       ntprec->ucharge > fMaxTrackChargeCut || ntprec->ucharge < fMinTrackChargeCut)
00290    {
00291       fNFailedTrackChargeCut++;
00292       return false;
00293    }
00294 
00295    //Cut in tpos uncertainty from linear fit to a track
00296    if(ntprec->vsigmaoftpos > fMaxSigmaOfTPosCut || ntprec->usigmaoftpos > fMaxSigmaOfTPosCut)
00297    {
00298       fNFailedSigmaTPosCut++;
00299       return false;
00300    }
00301 
00302    //Cut on 3d track Hough cos with horizontal z axis
00303    if(fabs(ntprec->hcosz) < fMinCosZCut)
00304    {
00305       fNFailedCosZCut++;
00306       return false;
00307    }
00308 
00309    fTrackVCharge = ntprec -> vcharge;
00310    fTrackUCharge = ntprec -> ucharge;
00311    fCandVCharge  = ntprec -> vcandcharge;
00312    fCandUCharge  = ntprec -> ucandcharge;
00313    
00314    double allcharge = fCandVCharge + fCandUCharge + fTrackVCharge + fTrackUCharge;
00315    if(allcharge < 1.0)
00316       return false;
00317    
00318    Double_t ratio = (fTrackVCharge+fTrackUCharge)/allcharge;
00319    
00320    if(ratio < fTrackChargeRatioCut)
00321    {
00322       fNFailedChargeRatioCut++;
00323       return false;
00324    }   
00325 
00326    return true;
00327 }

void MakeAlignmentModule::InitRunSummary int  run,
int  subrun
[private]
 

Definition at line 1133 of file MakeAlignmentModule.cxx.

References RunSummary::canducharge, RunSummary::candvcharge, fRunSummary, RunSummary::ncandustrip, RunSummary::ncandvstrip, RunSummary::nrecord, RunSummary::ntrackustrip, RunSummary::ntrackvstrip, RunSummary::run, RunSummary::subrun, RunSummary::trackucharge, and RunSummary::trackvcharge.

Referenced by Ana().

01134 {  
01135    fRunSummary.run = run;
01136    fRunSummary.subrun = subrun;
01137    fRunSummary.nrecord = 0.0;
01138    fRunSummary.ntrackvstrip = 0.0;
01139    fRunSummary.ntrackustrip = 0.0;
01140    fRunSummary.ncandvstrip = 0.0;
01141    fRunSummary.ncandustrip = 0.0;
01142    fRunSummary.trackvcharge = 0.0;
01143    fRunSummary.trackucharge = 0.0;
01144    fRunSummary.candvcharge = 0.0;
01145    fRunSummary.canducharge = 0.0;
01146 }

void MakeAlignmentModule::PrintAlignmentStrip const AlignmentStrip astrip  )  [private]
 

Definition at line 1149 of file MakeAlignmentModule.cxx.

References AlignmentStrip::begtime, AlignmentStrip::charge, MSG, AlignmentStrip::ndigit, AlignmentStrip::plexseid, and AlignmentStrip::residual.

01150 {   
01151    //Format msg service so that time and charge can be properly deisplayed
01152    MsgFormat ffmt("%10.9f");
01153    MsgFormat ffrt("%5.4f");
01154    MsgFormat fimt("%5d");
01155    
01156    MSG("Align", Msg::kVerbose) << PlexStripEndId(astrip.plexseid)
01157                                << " charge = " << fimt(astrip.charge)
01158                                << " begtime = " << ffmt(astrip.begtime)
01159                                << " ndigit = " << astrip.ndigit
01160                                << " residual = " << ffrt(astrip.residual) << endl;
01161 }

void MakeAlignmentModule::PrintJobStatistics  )  [private]
 

Definition at line 1024 of file MakeAlignmentModule.cxx.

References fFailedCut, fMissedUPlaneChargeSigma, fMissedUPlaneMeanCharge, fMissedVPlaneChargeSigma, fMissedVPlaneMeanCharge, fNFailedChargeRatioCut, fNFailedCosZCut, fNFailedCutMaxUStripCharge, fNFailedCutMaxVStripCharge, fNFailedFit, fNFailedRead, fNFailedSigmaTPosCut, fNFailedStripChargeCut, fNFailedTrackChargeCut, fNHitsOutsideStrip, fNMdlHits, fNMissedUPlane, fNMissedVPlane, fNRecords, fNStripHits, fTimer, fTotalUPlaneHits, fTotalVPlaneHits, maxu, maxv, minu, minv, and MSG.

Referenced by EndJob().

01025 {
01026    cout << "minu = "<<minu <<endl;
01027    cout << "maxu = "<<maxu <<endl;
01028    cout << "minv = "<<minv <<endl;
01029    cout << "maxv = "<<maxv <<endl;
01030 
01031    MSG("Align", Msg::kInfo) << "MakeAlignmentModule::EndJob()"<< endl << endl;    
01032 
01033    MSG("Align", Msg::kInfo) << "Cpu time = " << fTimer.CpuTime() <<endl;
01034    MSG("Align", Msg::kInfo) << "Real time = " << fTimer.RealTime() <<endl;
01035    MSG("Align", Msg::kInfo) << "fNRecords  = " << fNRecords << endl;
01036    MSG("Align", Msg::kInfo) << "fFailedCut = " << fFailedCut << endl;
01037    MSG("Align", Msg::kInfo) << "fNFailedFit = " << fNFailedFit << endl;
01038    MSG("Align", Msg::kInfo) << "fNFailedRead = " << fNFailedRead << endl;
01039    MSG("Align", Msg::kInfo) << "fNMissedVPlane = " << fNMissedVPlane << endl;
01040    MSG("Align", Msg::kInfo) << "fNMissedUPlane = " << fNMissedUPlane << endl;
01041    MSG("Align", Msg::kInfo) << "fTotalVPlaneHits = " << fTotalVPlaneHits << endl;
01042    MSG("Align", Msg::kInfo) << "fTotalUPlaneHits = " << fTotalUPlaneHits << endl;
01043    MSG("Align", Msg::kInfo) << "fNStripHits.size() = " << fNStripHits.size() <<endl;
01044    MSG("Align", Msg::kInfo) << "fNMdlHits.size() = " << fNMdlHits.size() <<endl;   
01045    MSG("Align", Msg::kInfo) << "fNFailedCutMaxVStripCharge = " << fNFailedCutMaxVStripCharge <<endl;
01046    MSG("Align", Msg::kInfo) << "fNFailedCutMaxUStripCharge = " << fNFailedCutMaxUStripCharge <<endl;
01047    MSG("Align", Msg::kInfo) << "fNHitsOutsideStrip = "      << fNHitsOutsideStrip << endl;
01048    MSG("Align", Msg::kInfo) << "fNFailedTrackChargeCut  = " << fNFailedTrackChargeCut << endl;
01049    MSG("Align", Msg::kInfo) << "fNFailedCosZCut  = "        << fNFailedCosZCut << endl;
01050    MSG("Align", Msg::kInfo) << "fNFailedSigmaTPosCut  = "   << fNFailedSigmaTPosCut << endl;
01051    MSG("Align", Msg::kInfo) << "fNFailedChargeRatioCut  = " << fNFailedChargeRatioCut << endl;
01052    MSG("Align", Msg::kInfo) << "fNFailedStripChargeCut  = " << fNFailedStripChargeCut << endl;
01053 
01054 
01055    MSG("Align", Msg::kInfo) << endl;
01056    
01057    if(fNMissedVPlane > 1){
01058       Double_t size = fNMissedVPlane;
01059       fMissedVPlaneMeanCharge = fMissedVPlaneMeanCharge/size;
01060       fMissedVPlaneChargeSigma = pow(fMissedVPlaneChargeSigma/size -
01061                                      fMissedVPlaneMeanCharge*fMissedVPlaneMeanCharge, 0.5);
01062       MSG("Align", Msg::kInfo) << "fMissedVPlaneMeanCharge = " << fMissedVPlaneMeanCharge
01063                                << " +/- " << fMissedVPlaneChargeSigma <<endl;
01064    }
01065    
01066    if(fNMissedUPlane > 1){
01067       Double_t size = fNMissedUPlane;
01068       fMissedUPlaneMeanCharge = fMissedUPlaneMeanCharge/size;
01069       fMissedUPlaneChargeSigma = pow(fMissedUPlaneChargeSigma/size -
01070                                      fMissedUPlaneMeanCharge*fMissedUPlaneMeanCharge, 0.5);
01071       MSG("Align", Msg::kInfo) << "fMissedUPlaneMeanCharge = " << fMissedUPlaneMeanCharge
01072                                << " +/- " << fMissedUPlaneChargeSigma <<endl;
01073    }     
01074 
01075    
01076    MSG("Align", Msg::kInfo) << endl;
01077 }

void MakeAlignmentModule::PrintTopHitStripsAndModules unsigned int  n = 10  )  [private]
 

Definition at line 1080 of file MakeAlignmentModule.cxx.

References fNMdlHits, fNStripHits, and MSG.

01081 {
01082    multimap<int, PlexStripEndId> nhitsr;
01083    for(map<PlexStripEndId, int>::const_iterator itr = fNStripHits.begin(); 
01084        itr != fNStripHits.end(); ++itr){
01085       pair<int, PlexStripEndId>p(itr -> second, itr -> first);
01086       nhitsr.insert(p);
01087    }
01088 
01089    unsigned int counter = 0;
01090    //top n hit strips in the detector
01091    MSG("Align", Msg::kInfo) << "Top " << n << " strips with largest number of muon hits:" << endl;
01092    for(multimap<int, PlexStripEndId>::reverse_iterator itr = nhitsr.rbegin(); 
01093        itr != nhitsr.rend(); ++itr){
01094       counter++;
01095       MSG("Align", Msg::kInfo) << itr -> second << " " << itr -> first << endl;
01096       if(counter == n)
01097          break;
01098    }
01099    
01100    multimap<int, PlexScintMdlId> nmdlhitsrev;
01101    for(map<PlexScintMdlId, int>::const_iterator itr = fNMdlHits.begin(); 
01102        itr != fNMdlHits.end(); ++itr){
01103       pair<int, PlexScintMdlId>p(itr -> second, itr -> first);
01104       nmdlhitsrev.insert(p);
01105    }
01106    
01107    counter = 0;
01108    //top n hit modules in the detector
01109    MSG("Align", Msg::kInfo) << "Top " << n << " modules with largest number of muon hits:" << endl;
01110    for(multimap<int, PlexScintMdlId>::reverse_iterator itr = nmdlhitsrev.rbegin(); 
01111        itr != nmdlhitsrev.rend(); ++itr){
01112       counter++;
01113       MSG("Align", Msg::kInfo) << itr -> second << " " << itr -> first << endl;
01114       if(counter == n)
01115          break;
01116    }
01117    
01118 }

bool MakeAlignmentModule::ProcessRecord const NtpAlignmentRecord ntprec,
const VldContext vldc
[private]
 

Definition at line 347 of file MakeAlignmentModule.cxx.

References NtpAlignmentRecord::candustrip, NtpAlignmentRecord::candvstrip, AlignmentStrip::charge, ConvertToLocal(), fApplyCuts, fCandUStrip, fCandVStrip, fHistogram, FillMaxChargeTrack(), fMaxChargeUTrack, fMaxChargeVTrack, fNFailedCutMaxUStripCharge, fNFailedCutMaxVStripCharge, fNFailedStripChargeCut, fTotalUPlaneHits, fTotalVPlaneHits, fTrackA_U, fTrackA_V, fTrackB_U, fTrackB_V, fTrackUStrip, fTrackVStrip, UgliStripHandle::GetLPosRelMdl(), UgliStripHandle::GetScintPlnHandle(), UgliGeomHandle::GetStripHandle(), UgliStripHandle::GetTPos(), UgliStripHandle::GetTPosRelMdl(), UgliPlnHandle::GetZ0(), AlignmentStrip::ghitpos, AlignmentStrip::lposrelmdl, AlignmentStrip::plane, AlignmentStrip::plexseid, AlignmentStrip::strip, AlignmentStrip::tpos, AlignmentStrip::tposrelmdl, NtpAlignmentRecord::trackustrip, NtpAlignmentRecord::trackvstrip, and AlignmentStrip::zpos.

Referenced by Ana().

00349 {
00350    fTrackVStrip.clear();
00351    fTrackUStrip.clear();
00352    fCandVStrip.clear();
00353    fCandUStrip.clear();
00354 
00355    fMaxChargeVTrack.clear();
00356    fMaxChargeUTrack.clear();
00357    
00358    fTrackA_V = ntprec -> vfita;
00359    fTrackA_U = ntprec -> ufita;
00360    
00361    fTrackB_V = ntprec -> vfitb;
00362    fTrackB_U = ntprec -> ufitb;
00363    
00364    UgliGeomHandle ugh(vldc);
00365    
00366 
00367    for(unsigned int i = 0; i < ntprec -> ntrackvstrip; ++i){
00368       NtpAlignTrackStrip* strip = dynamic_cast<NtpAlignTrackStrip*>(ntprec->trackvstrip->At(i));
00369       assert(strip);
00370       
00371       AlignmentStrip astrip(strip);
00372       if(fApplyCuts && astrip.charge > fMaxTrackStripChargeCut){
00373          fNFailedCutMaxVStripCharge++;
00374          fNFailedStripChargeCut++;
00375          return false;
00376       }
00377       
00378       PlexStripEndId plexid(astrip.plexseid);
00379       UgliStripHandle ush = ugh.GetStripHandle(plexid);
00380 
00381       astrip.plane = plexid.GetPlane();
00382       astrip.strip = plexid.GetStrip();
00383       astrip.tpos = ush.GetTPos();
00384       astrip.zpos = ush.GetScintPlnHandle().GetZ0();
00385       astrip.tposrelmdl = ush.GetTPosRelMdl();
00386       astrip.lposrelmdl = ush.GetLPosRelMdl();
00387       astrip.ghitpos = fTrackA_U*astrip.zpos + fTrackB_U;      
00388 
00389       ConvertToLocal(astrip, plexid, ugh, ush);
00390       fTrackVStrip.push_back(astrip);
00391 
00392       FillMaxChargeTrack(fMaxChargeVTrack, astrip);      
00393    }
00394 
00395 
00396    for(unsigned int i = 0; i < ntprec -> ntrackustrip; ++i){
00397       NtpAlignTrackStrip* strip = dynamic_cast<NtpAlignTrackStrip*>(ntprec->trackustrip->At(i));
00398       assert(strip);
00399       
00400       AlignmentStrip astrip(strip);      
00401       if(fApplyCuts && astrip.charge > fMaxTrackStripChargeCut){
00402          fNFailedCutMaxUStripCharge++;
00403          fNFailedStripChargeCut++;
00404          return false;
00405       }
00406 
00407       PlexStripEndId plexid(astrip.plexseid);
00408       UgliStripHandle ush = ugh.GetStripHandle(plexid);
00409 
00410       astrip.plane = plexid.GetPlane();
00411       astrip.strip = plexid.GetStrip(); 
00412       astrip.tpos = ush.GetTPos();
00413       astrip.zpos = ush.GetScintPlnHandle().GetZ0();
00414       astrip.tposrelmdl = ush.GetTPosRelMdl();
00415       astrip.lposrelmdl = ush.GetLPosRelMdl();
00416       astrip.ghitpos = fTrackA_V*astrip.zpos + fTrackB_V;
00417       
00418       ConvertToLocal(astrip, plexid, ugh, ush);
00419       fTrackUStrip.push_back(astrip);
00420 
00421       FillMaxChargeTrack(fMaxChargeUTrack, astrip);
00422    }
00423 
00424 
00425    for(unsigned int i = 0; i < ntprec -> ncandvstrip; ++i){
00426       NtpAlignCandStrip* strip = dynamic_cast<NtpAlignCandStrip*>(ntprec->candvstrip->At(i));
00427       assert(strip);
00428       
00429       AlignmentStrip astrip(strip);
00430       PlexStripEndId plexid(astrip.plexseid);
00431       UgliStripHandle ush = ugh.GetStripHandle(plexid);
00432 
00433       astrip.tpos = ush.GetTPos();
00434       astrip.zpos = ush.GetScintPlnHandle().GetZ0();
00435       astrip.tposrelmdl = ush.GetTPosRelMdl();
00436       astrip.lposrelmdl = ush.GetLPosRelMdl();
00437       astrip.plane = plexid.GetPlane();
00438       astrip.strip = plexid.GetStrip();
00439       fCandVStrip.push_back(astrip);
00440 
00441       FillMaxChargeTrack(fMaxChargeVTrack, astrip);
00442       fHistogram -> FillCandStrip(plexid, astrip);
00443    }
00444 
00445    for(unsigned int i = 0; i < ntprec -> ncandustrip; ++i){
00446       NtpAlignCandStrip* strip = dynamic_cast<NtpAlignCandStrip*>(ntprec->candustrip->At(i));
00447       assert(strip);
00448 
00449       AlignmentStrip astrip(strip);
00450       PlexStripEndId plexid(astrip.plexseid);
00451       UgliStripHandle ush = ugh.GetStripHandle(plexid);
00452 
00453       astrip.tpos = ush.GetTPos();
00454       astrip.zpos = ush.GetScintPlnHandle().GetZ0();
00455       astrip.tposrelmdl = ush.GetTPosRelMdl();
00456       astrip.lposrelmdl = ush.GetLPosRelMdl();
00457       astrip.plane = plexid.GetPlane();
00458       astrip.strip = plexid.GetStrip();
00459       fCandUStrip.push_back(astrip);
00460 
00461       FillMaxChargeTrack(fMaxChargeUTrack, astrip);
00462       fHistogram -> FillCandStrip(plexid, astrip);
00463    }
00464 
00465    fTotalVPlaneHits += fTrackVStrip.size();
00466    fTotalUPlaneHits += fTrackUStrip.size();
00467    return true;
00468 }

bool MakeAlignmentModule::RecalculateResiduals const VldContext vldc  )  [private]
 

Definition at line 471 of file MakeAlignmentModule.cxx.

References FitTrackLessOne(), fTrackUStrip, fTrackVStrip, UgliGeomHandle::GetStripHandle(), UgliStripHandle::GlobalPos(), AlignmentStrip::lhitpos, MSG, AlignmentStrip::plexseid, AlignmentStrip::residual, AlignmentStrip::tpos, UgliGeomHandle::xyz2uvz(), and AlignmentStrip::zpos.

Referenced by Ana().

00472 {
00473    
00474    UgliGeomHandle ugh(vldc);   
00475 
00476    for(unsigned int i = 0; i < fTrackVStrip.size(); ++i){
00477       AlignmentStrip &astrip = fTrackVStrip[i];
00478       PlexStripEndId plexid(astrip.plexseid);
00479       UgliStripHandle ush = ugh.GetStripHandle(plexid);    
00480       TVector3 local(astrip.lhitpos, 0, 0);
00481       TVector3 globalxyz = ush.GlobalPos(astrip.lhitpos);
00482       TVector3 globaluvz = ugh.xyz2uvz(globalxyz);
00483       double tpos = globaluvz.y();
00484       double zpos = globaluvz.z();
00485       if(fabs(astrip.tpos-tpos) > 0.001){
00486          MsgFormat f("%10.9f");
00487          MSG("Align",Msg::kError) << "global tpos - local tpos = " << f(astrip.tpos-tpos) <<endl;
00488       }
00489       if(fabs(astrip.zpos-zpos) > 0.001){
00490          MsgFormat f("%10.9f");
00491          MSG("Align",Msg::kError) << "zpos before - zpos after = " << f(astrip.zpos-zpos) <<endl;
00492       }
00493       astrip.tpos = globaluvz.y();
00494    }
00495    
00496    for(unsigned int i = 0; i < fTrackUStrip.size(); ++i){
00497       AlignmentStrip &astrip = fTrackUStrip[i];
00498       PlexStripEndId plexid(astrip.plexseid);
00499       UgliStripHandle ush = ugh.GetStripHandle(plexid);      
00500       TVector3 local(astrip.lhitpos, 0, 0);
00501       TVector3 globalxyz = ush.GlobalPos(astrip.lhitpos);
00502       TVector3 globaluvz = ugh.xyz2uvz(globalxyz);
00503       double tpos = globaluvz.x();
00504       double zpos = globaluvz.z();
00505       if(fabs(astrip.tpos-tpos) > 0.001){
00506          MsgFormat f("%10.9f");
00507          MSG("Align",Msg::kError) << "global tpos - local tpos = " << f(astrip.tpos-tpos) <<endl;
00508       }
00509       if(fabs(astrip.zpos-zpos) > 0.001){
00510          MsgFormat f("%10.9f");
00511          MSG("Align",Msg::kError) << "zpos before - zpos after = " << f(astrip.zpos-zpos) <<endl;
00512       }
00513 
00514       astrip.tpos = globaluvz.x();
00515    }
00516 
00517    for(vector<AlignmentStrip>::iterator vit = fTrackVStrip.begin(); 
00518        vit != fTrackVStrip.end(); ++vit){
00519       double residual = FitTrackLessOne(fTrackVStrip.begin(),   fTrackVStrip.end(), vit);
00520       if(fabs(residual) > 1.0)
00521          return false;
00522       AlignmentStrip &astrip = *vit;
00523       if(fabs(astrip.residual-residual) > 0.00001){
00524          MsgFormat ffrt("%7.6f");
00525          MSG("Align", Msg::kError) << "V residual diff after tpos correction for " 
00526                                    << PlexStripEndId(astrip.plexseid) << " = "
00527                                    << ffrt(residual - astrip.residual) << endl;
00528       }
00529       astrip.residual = residual;
00530    }
00531    
00532    for(vector<AlignmentStrip>::iterator uit = fTrackUStrip.begin(); 
00533        uit != fTrackUStrip.end(); ++uit){
00534       double residual = FitTrackLessOne(fTrackUStrip.begin(),   fTrackUStrip.end(), uit);
00535       if(fabs(residual) > 1.0)
00536          return false;
00537       AlignmentStrip &astrip = *uit;
00538       if(fabs(astrip.residual-residual) > 0.00001){
00539          MsgFormat ffrt("%7.6f");
00540          MSG("Align", Msg::kError) << "U residual diff after tpos correction for " 
00541                                    << PlexStripEndId(astrip.plexseid) << " = "
00542                                    << ffrt(residual - astrip.residual) << endl;
00543       }
00544 
00545       astrip.residual = residual;
00546    }
00547    return true;
00548 }


Member Data Documentation

std::string MakeAlignmentModule::fAlignmentPath [private]
 

Definition at line 114 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

Double_t MakeAlignmentModule::fAltitude [private]
 

Definition at line 182 of file MakeAlignmentModule.h.

Referenced by BeginJob().

bool MakeAlignmentModule::fApplyCuts [private]
 

Definition at line 146 of file MakeAlignmentModule.h.

Referenced by BeginJob(), and ProcessRecord().

Double_t MakeAlignmentModule::fAzimuth [private]
 

Definition at line 183 of file MakeAlignmentModule.h.

Referenced by BeginJob().

Double_t MakeAlignmentModule::fCandUCharge [private]
 

Definition at line 151 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality().

vector<AlignmentStrip> MakeAlignmentModule::fCandUStrip [private]
 

Definition at line 119 of file MakeAlignmentModule.h.

Referenced by FillPlanePlexHistogram(), and ProcessRecord().

Double_t MakeAlignmentModule::fCandVCharge [private]
 

Definition at line 150 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality().

vector<AlignmentStrip> MakeAlignmentModule::fCandVStrip [private]
 

Definition at line 118 of file MakeAlignmentModule.h.

Referenced by FillPlanePlexHistogram(), and ProcessRecord().

Double_t MakeAlignmentModule::fCharge [private]
 

Definition at line 184 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

Double_t MakeAlignmentModule::fCosX [private]
 

Definition at line 176 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

Double_t MakeAlignmentModule::fCosY [private]
 

Definition at line 177 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

Double_t MakeAlignmentModule::fCosZ [private]
 

Definition at line 178 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

UInt_t MakeAlignmentModule::fDay [private]
 

Definition at line 186 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

unsigned int MakeAlignmentModule::fFailedCut [private]
 

Definition at line 160 of file MakeAlignmentModule.h.

Referenced by Ana(), and PrintJobStatistics().

AlignmentHistograms* MakeAlignmentModule::fHistogram [private]
 

Definition at line 108 of file MakeAlignmentModule.h.

Referenced by Ana(), CompareSRTrackAndMaxChargeTrack(), EndJob(), FillHitStripHistograms(), FillPlanePlexHistogram(), and ProcessRecord().

UInt_t MakeAlignmentModule::fHour [private]
 

Definition at line 186 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

int MakeAlignmentModule::fIteration [private]
 

Definition at line 110 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

Double_t MakeAlignmentModule::fLength [private]
 

Definition at line 179 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

map<int, AlignmentStrip> MakeAlignmentModule::fMaxChargeUTrack [private]
 

Definition at line 130 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), and ProcessRecord().

map<int, AlignmentStrip> MakeAlignmentModule::fMaxChargeVTrack [private]
 

Definition at line 129 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), and ProcessRecord().

const Double_t MakeAlignmentModule::fMaxSigmaOfTPosCut [private]
 

Definition at line 139 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality().

const Double_t MakeAlignmentModule::fMaxTrackChargeCut [private]
 

Definition at line 137 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality().

const Double_t MakeAlignmentModule::fMaxTrackStripChargeCut [private]
 

Definition at line 143 of file MakeAlignmentModule.h.

const Double_t MakeAlignmentModule::fMinCosZCut [private]
 

Definition at line 141 of file MakeAlignmentModule.h.

const Double_t MakeAlignmentModule::fMinTrackChargeCut [private]
 

Definition at line 138 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality().

const Double_t MakeAlignmentModule::fMinTrackStripChargeCut [private]
 

Definition at line 142 of file MakeAlignmentModule.h.

UInt_t MakeAlignmentModule::fMinute [private]
 

Definition at line 186 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

Double_t MakeAlignmentModule::fMissedUPlaneChargeSigma [private]
 

Definition at line 172 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), and PrintJobStatistics().

Double_t MakeAlignmentModule::fMissedUPlaneMeanCharge [private]
 

Definition at line 170 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), and PrintJobStatistics().

Double_t MakeAlignmentModule::fMissedVPlaneChargeSigma [private]
 

Definition at line 171 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), and PrintJobStatistics().

Double_t MakeAlignmentModule::fMissedVPlaneMeanCharge [private]
 

Definition at line 169 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), and PrintJobStatistics().

UInt_t MakeAlignmentModule::fMonth [private]
 

Definition at line 186 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

unsigned int MakeAlignmentModule::fNFailedChargeRatioCut [private]
 

Definition at line 191 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality(), and PrintJobStatistics().

unsigned int MakeAlignmentModule::fNFailedCosZCut [private]
 

Definition at line 190 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality(), and PrintJobStatistics().

unsigned int MakeAlignmentModule::fNFailedCutMaxUStripCharge [private]
 

Definition at line 163 of file MakeAlignmentModule.h.

Referenced by PrintJobStatistics(), and ProcessRecord().

unsigned int MakeAlignmentModule::fNFailedCutMaxVStripCharge [private]
 

Definition at line 162 of file MakeAlignmentModule.h.

Referenced by PrintJobStatistics(), and ProcessRecord().

unsigned int MakeAlignmentModule::fNFailedFit [private]
 

Definition at line 153 of file MakeAlignmentModule.h.

Referenced by PrintJobStatistics().

unsigned int MakeAlignmentModule::fNFailedRead [private]
 

Definition at line 155 of file MakeAlignmentModule.h.

Referenced by PrintJobStatistics().

unsigned int MakeAlignmentModule::fNFailedSigmaTPosCut [private]
 

Definition at line 192 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality(), and PrintJobStatistics().

unsigned int MakeAlignmentModule::fNFailedStripChargeCut [private]
 

Definition at line 189 of file MakeAlignmentModule.h.

Referenced by PrintJobStatistics(), and ProcessRecord().

unsigned int MakeAlignmentModule::fNFailedTrackChargeCut [private]
 

Definition at line 188 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality(), and PrintJobStatistics().

unsigned int MakeAlignmentModule::fNHitsOutsideStrip [private]
 

Definition at line 161 of file MakeAlignmentModule.h.

Referenced by ConvertToLocal(), and PrintJobStatistics().

map<PlexScintMdlId, int> MakeAlignmentModule::fNMdlHits [private]
 

Definition at line 127 of file MakeAlignmentModule.h.

Referenced by CountNHits(), EndJob(), PrintJobStatistics(), and PrintTopHitStripsAndModules().

unsigned int MakeAlignmentModule::fNMissedUPlane [private]
 

Definition at line 157 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), and PrintJobStatistics().

unsigned int MakeAlignmentModule::fNMissedVPlane [private]
 

Definition at line 156 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), and PrintJobStatistics().

unsigned int MakeAlignmentModule::fNRecords [private]
 

Definition at line 154 of file MakeAlignmentModule.h.

Referenced by Ana(), and PrintJobStatistics().

Double_t MakeAlignmentModule::fNStrip [private]
 

Definition at line 185 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

map<PlexStripEndId, int> MakeAlignmentModule::fNStripHits [private]
 

Definition at line 126 of file MakeAlignmentModule.h.

Referenced by CountNHits(), EndJob(), PrintJobStatistics(), and PrintTopHitStripsAndModules().

bool MakeAlignmentModule::fRecalculateResidual [private]
 

Definition at line 145 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

map<int, TrackLengthResidual> MakeAlignmentModule::fResidualvsMuonPathLength [private]
 

Definition at line 121 of file MakeAlignmentModule.h.

Referenced by FillHitStripHistograms().

int MakeAlignmentModule::fRun [private]
 

Definition at line 111 of file MakeAlignmentModule.h.

RunSummary MakeAlignmentModule::fRunSummary [private]
 

Definition at line 124 of file MakeAlignmentModule.h.

Referenced by Ana(), FillRunSummary(), and InitRunSummary().

vector<RunSummary> MakeAlignmentModule::fRunSummaryVector [private]
 

Definition at line 123 of file MakeAlignmentModule.h.

Referenced by Ana(), and EndJob().

UInt_t MakeAlignmentModule::fSec [private]
 

Definition at line 186 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

Double_t MakeAlignmentModule::fSigma [private]
 

Definition at line 180 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

int MakeAlignmentModule::fSubRun [private]
 

Definition at line 112 of file MakeAlignmentModule.h.

Double_t MakeAlignmentModule::fTime [private]
 

Definition at line 181 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

TStopwatch MakeAlignmentModule::fTimer [private]
 

Definition at line 105 of file MakeAlignmentModule.h.

Referenced by BeginJob(), and PrintJobStatistics().

TStopwatch MakeAlignmentModule::fTimerInterval [private]
 

Definition at line 106 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

unsigned int MakeAlignmentModule::fTotalUPlaneHits [private]
 

Definition at line 159 of file MakeAlignmentModule.h.

Referenced by PrintJobStatistics(), and ProcessRecord().

unsigned int MakeAlignmentModule::fTotalVPlaneHits [private]
 

Definition at line 158 of file MakeAlignmentModule.h.

Referenced by PrintJobStatistics(), and ProcessRecord().

Double_t MakeAlignmentModule::fTrackA_U [private]
 

Definition at line 132 of file MakeAlignmentModule.h.

Referenced by ProcessRecord().

Double_t MakeAlignmentModule::fTrackA_V [private]
 

Definition at line 133 of file MakeAlignmentModule.h.

Referenced by ProcessRecord().

Double_t MakeAlignmentModule::fTrackB_U [private]
 

Definition at line 134 of file MakeAlignmentModule.h.

Referenced by ProcessRecord().

Double_t MakeAlignmentModule::fTrackB_V [private]
 

Definition at line 135 of file MakeAlignmentModule.h.

Referenced by ProcessRecord().

const Double_t MakeAlignmentModule::fTrackChargeRatioCut [private]
 

Definition at line 140 of file MakeAlignmentModule.h.

TFile* MakeAlignmentModule::fTrackDirectionFile [private]
 

Definition at line 174 of file MakeAlignmentModule.h.

Referenced by BeginJob(), and EndJob().

TTree* MakeAlignmentModule::fTrackDirectionTree [private]
 

Definition at line 175 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

Double_t MakeAlignmentModule::fTrackUCharge [private]
 

Definition at line 149 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality().

vector<AlignmentStrip> MakeAlignmentModule::fTrackUStrip [private]
 

Definition at line 117 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), FillHitStripHistograms(), FillPlanePlexHistogram(), GetDirectionalCosines(), ProcessRecord(), and RecalculateResiduals().

Double_t MakeAlignmentModule::fTrackVCharge [private]
 

Definition at line 148 of file MakeAlignmentModule.h.

Referenced by GetTrackRecoQuality().

vector<AlignmentStrip> MakeAlignmentModule::fTrackVStrip [private]
 

Definition at line 116 of file MakeAlignmentModule.h.

Referenced by CompareSRTrackAndMaxChargeTrack(), FillHitStripHistograms(), FillPlanePlexHistogram(), GetDirectionalCosines(), ProcessRecord(), and RecalculateResiduals().

LinearTrackFitResult MakeAlignmentModule::fUTrackFitResult [private]
 

Definition at line 167 of file MakeAlignmentModule.h.

LinearTrackFitResult MakeAlignmentModule::fVTrackFitResult [private]
 

Definition at line 166 of file MakeAlignmentModule.h.

UInt_t MakeAlignmentModule::fYear [private]
 

Definition at line 186 of file MakeAlignmentModule.h.

Referenced by Ana(), and BeginJob().

int MakeAlignmentModule::maxu [private]
 

Definition at line 194 of file MakeAlignmentModule.h.

Referenced by ConvertToLocal(), and PrintJobStatistics().

int MakeAlignmentModule::maxv [private]
 

Definition at line 194 of file MakeAlignmentModule.h.

Referenced by ConvertToLocal(), and PrintJobStatistics().

int MakeAlignmentModule::minu [private]
 

Definition at line 194 of file MakeAlignmentModule.h.

Referenced by ConvertToLocal(), and PrintJobStatistics().

int MakeAlignmentModule::minv [private]
 

Definition at line 194 of file MakeAlignmentModule.h.

Referenced by ConvertToLocal(), and PrintJobStatistics().


The documentation for this class was generated from the following files:
Generated on Thu Nov 1 15:57:09 2007 for loon by  doxygen 1.3.9.1