NtpMaker Class Reference

#include <NtpMaker.h>

Inheritance diagram for NtpMaker:
JobCModule

List of all members.

Public Member Functions

 NtpMaker ()
 ~NtpMaker ()
void BeginJob ()
JobCResult Ana (const MomNavigator *mom)
const RegistryDefaultConfig () const
void Config (const Registry &r)
void EndJob ()

Private Member Functions

void FillMCInfo (SimSnarlRecord *simrec)
void FillRawInfo (RawRecord *rawrec)
void FillCandInfo (CandRecord *candrec)
void FillDataQualityInfo (TObject *tob)
void FillDeMuxInfo (TObject *tob)
void FillShieldInfo (TObject *tob)
void FillStripInfo (TObject *tob)
void FillSliceInfo (TObject *tob)
void FillFitTrackInfo (TObject *tob)
void FillTrackInfo (TObject *tob)
void FillShowerInfo (TObject *tob)
void FillEventInfo (TObject *tob)
void FillSpillInfo (const VldContext &vldc)

Private Attributes

TFile * fFile
TTree * fTree
TString fNtpName
Double_t fMaxFileSizeBytes
Int_t fFileNumber
Bool_t fWriteStrips
Bool_t fWriteScintHits
Bool_t fWriteStdHEPs
AtmosEventfEvent
vector< AtmosStripfStrpList [500]

Detailed Description

Definition at line 22 of file NtpMaker.h.


Constructor & Destructor Documentation

NtpMaker::NtpMaker (  ) 

Definition at line 80 of file NtpMaker.cxx.

References fEvent, fFile, fFileNumber, fMaxFileSizeBytes, fNtpName, fTree, fWriteScintHits, fWriteStdHEPs, fWriteStrips, Msg::kDebug, and MSG.

00081 {
00082   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::NtpMaker() *** " << endl;
00083   
00084   fFile = 0;
00085   fTree = 0;
00086   fNtpName = "ntp.root";
00087   fMaxFileSizeBytes = 0.0;
00088   fFileNumber = 1;
00089   fWriteStrips = true;
00090   fWriteScintHits = true;
00091   fWriteStdHEPs = true;
00092   fEvent = new AtmosEvent();
00093 }

NtpMaker::~NtpMaker (  ) 

Definition at line 97 of file NtpMaker.cxx.

References Msg::kDebug, and MSG.

00098 {
00099   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::~NtpMaker() *** " << endl;
00100 }


Member Function Documentation

JobCResult NtpMaker::Ana ( const MomNavigator mom  )  [virtual]

Implement this for read only access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 112 of file NtpMaker.cxx.

References AtmosEvent::Date, fEvent, fFile, fFileNumber, FillCandInfo(), FillMCInfo(), FillRawInfo(), fMaxFileSizeBytes, fNtpName, fTree, fWriteScintHits, fWriteStdHEPs, fWriteStrips, RerootExodus::GetEventNo(), MomNavigator::GetFragment(), RecMinos::GetHeader(), RawDaqSnarlHeader::GetNumRawDigits(), RawRecord::GetRawHeader(), RawDaqSnarlHeader::GetRemoteSpillType(), CandHeader::GetRun(), RawDaqHeader::GetRun(), RecDataHeader::GetRun(), RerootExodus::GetRunNo(), RecDataHeader::GetRunType(), RawDaqHeader::GetRunType(), VldContext::GetSimFlag(), SimSnarlRecord::GetSimSnarlHeader(), RawDaqSnarlHeader::GetSnarl(), CandHeader::GetSnarl(), RecPhysicsHeader::GetSnarl(), RecDataHeader::GetSubRun(), RawDaqHeader::GetSubRun(), RawDaqHeader::GetTimeFrameNum(), VldContext::GetTimeStamp(), RawDaqSnarlHeader::GetTrigSrc(), RecMinosHdr::GetVldContext(), RecMinos::GetVldContext(), RecRecordImp< T >::GetVldContext(), Calibrator::Instance(), Msg::kDebug, Msg::kError, Msg::kFatal, Msg::kInfo, JobCResult::kPassed, Msg::kWarning, AtmosEvent::MicroSec, MSG, AtmosEvent::NanoSec, AtmosEvent::Ndigits, AtmosEvent::NScintHits, AtmosEvent::NStdHEPs, AtmosEvent::NStrips, Calibrator::ReInitialise(), AtmosEvent::Reset(), run(), AtmosEvent::Run, AtmosEvent::RunType, AtmosEvent::ScintHitList, AtmosEvent::SimFlag, AtmosEvent::Snarl, AtmosEvent::SpillInfo, AtmosSpill::spilltype, AtmosEvent::StdHEPList, AtmosEvent::StripList, AtmosEvent::SubRun, AtmosEvent::Time, AtmosEvent::TimeFrame, AtmosEvent::TrigSrc, and AtmosEvent::UnixTime.

00113 {
00114   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::Ana(...) *** " << endl;
00115 
00116   JobCResult result(JobCResult::kPassed);  
00117   Int_t simflag=-1;
00118   Int_t run=-1, subrun=-1, snarl=-1;  
00119   Int_t runtype=-1, trigsrc=-1, timeframe=-1;
00120   Int_t date=-1, time=-1, microsec=-1, nanosec=-1, unixtime=-1;
00121   Int_t ndigits=-1;
00122   fEvent->Reset();
00123 
00124   // Process the SimSnarlRecord
00125   SimSnarlRecord* simrec = dynamic_cast<SimSnarlRecord *>(mom->GetFragment("SimSnarlRecord"));
00126   if(simrec)
00127     {
00128       MSG("NtpMaker",Msg::kDebug) << " *** PROCESS SIMSNARLRECORD *** " << endl;
00129       
00130       if(simflag<0) simflag = simrec->GetVldContext()->GetSimFlag();
00131       
00132       const SimSnarlHeader* hdr = dynamic_cast<const SimSnarlHeader*>(simrec->GetSimSnarlHeader());
00133       if(hdr) {
00134         if(run<0) run = hdr->GetRun();
00135         if(subrun<0) subrun = hdr->GetSubRun();
00136         if(snarl<0) snarl = hdr->GetSnarl();
00137         if(runtype<0) runtype = hdr->GetRunType();
00138       } else {
00139         if(run<0) run=RerootExodus::GetRunNo();
00140         if(snarl<0) snarl=RerootExodus::GetEventNo();
00141       }
00142       
00143       this->FillMCInfo(simrec);  
00144     }
00145 
00146   // Process the RawRecord
00147   RawRecord* rawrec = dynamic_cast<RawRecord*>(mom->GetFragment("RawRecord"));
00148   if(rawrec)
00149     {
00150       MSG("NtpMaker",Msg::kDebug) << " *** PROCESS RAWRECORD *** " << endl;
00151 
00152       if(simflag<0) simflag = rawrec->GetVldContext()->GetSimFlag();
00153 
00154       const RawDaqSnarlHeader* hdr = dynamic_cast<const RawDaqSnarlHeader*>(rawrec->GetRawHeader());
00155       if(hdr)
00156         {
00157       
00158           if(run<0) run = hdr->GetRun(); 
00159           if(subrun<0) subrun = hdr->GetSubRun();
00160           if(snarl<0) snarl = hdr->GetSnarl();
00161           if(runtype<0) runtype = hdr->GetRunType();
00162           if(trigsrc<0) trigsrc = hdr->GetTrigSrc();
00163           if(timeframe<0) timeframe = hdr->GetTimeFrameNum();
00164           if(ndigits<0) ndigits = hdr->GetNumRawDigits();
00165           if(unixtime<0) unixtime = ((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetSec();
00166           if(date<0) date = (((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetSec()-1059696000)/(3600*24);
00167           if(time<0) time = (((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetSec()-1059696000)%(3600*24);
00168           if(nanosec<0) nanosec = (Int_t)(1.000*(((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetNanoSec()));
00169           if(microsec<0) microsec = (Int_t)(0.001*(((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetNanoSec()));
00170           if(fEvent->SpillInfo.spilltype<0) fEvent->SpillInfo.spilltype =  hdr->GetRemoteSpillType();
00171         }      
00172       this->FillRawInfo(rawrec);
00173     }
00174 
00175   // Process the CandRecord
00176   CandRecord* candrec = dynamic_cast<CandRecord*>(mom->GetFragment("CandRecord"));
00177   if(candrec)
00178     {
00179       MSG("NtpMaker",Msg::kDebug) << " *** PROCESS CANDRECORD *** " << endl;
00180       
00181       if(simflag<0) simflag = candrec->GetVldContext()->GetSimFlag();
00182 
00183       const CandHeader* hdr  = dynamic_cast<const CandHeader*>(candrec->GetHeader());
00184       if(hdr)
00185         {
00186           Calibrator& cal = Calibrator::Instance();
00187           cal.ReInitialise(hdr->GetVldContext());
00188           
00189           if(run<0) run = hdr->GetRun();
00190           if(snarl<0) snarl = hdr->GetSnarl();
00191           if(unixtime<0) unixtime = ((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetSec();
00192           if(date<0) date = (((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetSec()-1059696000)/(3600*24);
00193           if(time<0) time = (((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetSec()-1059696000)%(3600*24);
00194           if(nanosec<0) nanosec = (Int_t)(1.000*(((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetNanoSec()));
00195           if(microsec<0) microsec = (Int_t)(0.001*(((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetNanoSec()));
00196         }
00197       
00198       this->FillCandInfo(candrec);
00199     }
00200 
00201   fEvent->Run = run;
00202   fEvent->SubRun = subrun;  
00203   fEvent->Snarl = snarl;            
00204   fEvent->RunType = runtype;          
00205   fEvent->TrigSrc = trigsrc;           
00206   fEvent->TimeFrame = timeframe;        
00207   fEvent->Date = date;   
00208   fEvent->Time = time;       
00209   fEvent->MicroSec = microsec;     
00210   fEvent->NanoSec = nanosec;      
00211   fEvent->UnixTime = unixtime;     
00212   fEvent->Ndigits = ndigits;
00213   fEvent->SimFlag = simflag;
00214 
00215   MSG("NtpMaker",Msg::kDebug) << " *** EVENT SUMMARY *** " << endl
00216                               << "   Run = " << fEvent->Run << endl
00217                               << "   SubRun = " << fEvent->SubRun << endl
00218                               << "   Snarl = " << fEvent->Snarl << endl
00219                               << "   RunType = " << fEvent->RunType << endl 
00220                               << "   TrigSrc = " << fEvent->TrigSrc << endl
00221                               << "   TimeFrame = " << fEvent->TimeFrame << endl 
00222                               << "   Date = " << fEvent->Date << endl
00223                               << "   Time = " << fEvent->Time << endl
00224                               << "   MicroSec = " << fEvent->MicroSec << endl
00225                               << "   NanoSec = " << fEvent->NanoSec << endl
00226                               << "   UnixTime = " << fEvent->UnixTime << endl
00227                               << "   Ndigits = " << fEvent->Ndigits << endl
00228                               << "   SimFlag = " << fEvent->SimFlag << endl;
00229 
00230   
00231   MSG("NtpMaker",Msg::kInfo) << " *** NtpMaker: " << fEvent->Run << "/" << fEvent->SubRun << " " << fEvent->Snarl << " DONE *** " << endl;
00232 
00233   //Check if user wants strips written to file.
00234   if (!fWriteStrips)
00235     {
00236       fEvent->NStrips = 0;
00237       fEvent->StripList->Clear();
00238     }
00239 
00240   //Check if user wants strips written to file.
00241   if (!fWriteScintHits)
00242     {
00243       fEvent->NScintHits = 0;
00244       fEvent->ScintHitList->Clear();
00245     }
00246 
00247   //Check if user wants strips written to file.
00248   if (!fWriteStdHEPs)
00249     {
00250       fEvent->NStdHEPs = 0;
00251       fEvent->StdHEPList->Clear();
00252     }
00253 
00254   // create output file
00255   if(!fFile)
00256     {
00257       MSG("NtpMaker",Msg::kInfo) << " CREATING OUTPUT FILE: " << fNtpName.Data() << endl;
00258 
00259       // create the output file
00260       TDirectory *tmpd = gDirectory;
00261       fFile = TFile::Open(fNtpName.Data(), "recreate");
00262       fTree = new TTree("ntp", "FarDet Atmos Events");
00263       fTree->SetDirectory(fFile);
00264       fTree->Branch("evt", "AtmosEvent", &fEvent);
00265       fTree->SetAutoSave(100);
00266       tmpd->cd();
00267     }
00268 
00269   // re-create output file (at maximum file size)
00270   if( fFile
00271    && fMaxFileSizeBytes>0 
00272    && fFile->GetBytesWritten()>fMaxFileSizeBytes )
00273     {
00274       MSG("NtpMaker",Msg::kWarning) << " FILE SIZE EXCEEDS LIMIT (" << 1.0e-6*fFile->GetBytesWritten() << ">" << 1.0e-6*fMaxFileSizeBytes << ")" << endl;
00275       MSG("NtpMaker",Msg::kWarning) << "  ... SWITCHING TO NEW FILE" << endl;
00276 
00277       // write out the current file
00278       TDirectory *tmpd = gDirectory;
00279       fFile->cd();
00280       fFile->Write();
00281       fFile->Close();
00282       gDirectory = tmpd;
00283 
00284       // adjust the file name
00285       fFileNumber++;
00286       TDirectory *tmpd2 = gDirectory;
00287       TString filename = fNtpName;
00288       TString tempfilename = ".";
00289       tempfilename += fFileNumber;
00290 
00291       if( filename.EndsWith(".root") ){
00292         filename.Insert(filename.Length()-5,tempfilename);
00293       }
00294       else{
00295         filename.Append(tempfilename);
00296       }
00297 
00298       MSG("NtpMaker",Msg::kWarning) << "  ... CREATING NEW OUTPUT FILE: " << filename.Data() << endl;
00299 
00300       // create the new output file
00301       fFile = TFile::Open(filename.Data(), "recreate");
00302       fTree = new TTree("ntp", "FarDet Atmos Events");
00303       fTree->SetDirectory(fFile);
00304       fTree->Branch("evt", "AtmosEvent", &fEvent);
00305       fTree->SetAutoSave(100);
00306       tmpd2->cd();   
00307     }
00308 
00309   // check that both output file and tree exist
00310   if(!fFile)
00311     {
00312       MSG("NtpMaker",Msg::kError) << " Can't find output file: " << fNtpName.Data() << endl;
00313       MSG("NtpMaker",Msg::kFatal) << " Aaaggghhh... " << endl;
00314       assert(0);
00315     }
00316   if(!fTree)
00317     {
00318       MSG("NtpMaker",Msg::kError) << " Can't find output tree: " << fNtpName.Data() << endl;
00319       MSG("NtpMaker",Msg::kFatal) << " Aaaggghhh... " << endl;
00320       assert(0);
00321     }
00322 
00323   // write current event to file
00324   if(fFile)
00325     {
00326       MSG("NtpMaker",Msg::kDebug) << " writing event to file... " << endl;
00327       Int_t filesize(0),filesizeNew(0); 
00328 
00329       TDirectory* tmpd = gDirectory;
00330       filesize = fFile->GetBytesWritten();
00331       fFile->cd();
00332       fTree->Fill();
00333       filesizeNew = fFile->GetBytesWritten();
00334       gDirectory = tmpd;
00335       
00336       MSG("NtpMaker",Msg::kDebug) << "  ... bytes written: " << filesizeNew-filesize << endl;
00337       MSG("NtpMaker",Msg::kDebug) << "  ... current file size: " << filesizeNew << endl;
00338     }
00339 
00340   return result;
00341 }

void NtpMaker::BeginJob ( void   )  [virtual]

Implement for notification of begin of job

Reimplemented from JobCModule.

Definition at line 104 of file NtpMaker.cxx.

References Msg::kDebug, and MSG.

00105 {
00106   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::BeginJob() *** " << endl;
00107 
00108 }

void NtpMaker::Config ( const Registry r  )  [virtual]

Return the actual configuration. If your module directly pulls its configuration from the fConfig Registry, you don't need to override this. Override if you have local config variables.

Reimplemented from JobCModule.

Definition at line 368 of file NtpMaker.cxx.

References fMaxFileSizeBytes, fNtpName, fWriteScintHits, fWriteStdHEPs, fWriteStrips, Registry::Get(), Msg::kDebug, and MSG.

00369 {
00370   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::Config(...) *** " << endl;
00371 
00372   // Configure the module given the Registry r
00373   Int_t tmpint; const char* tmpchar = 0;
00374   if(r.Get("NtpFileName",tmpchar)) { fNtpName = tmpchar; }
00375   if(r.Get("MaxFileSize",tmpint)) { fMaxFileSizeBytes = 1.0e6*tmpint; }
00376   if(r.Get("WriteStrips",tmpint)) { fWriteStrips = (Bool_t)tmpint; }
00377   if(r.Get("WriteScintHits",tmpint)) { fWriteScintHits = (Bool_t)tmpint; }
00378   if(r.Get("WriteStdHEPs",tmpint)) { fWriteStdHEPs = (Bool_t)tmpint; }
00379 }

const Registry & NtpMaker::DefaultConfig ( void   )  const [virtual]

Get the default configuration registry. This should normally be overridden. One useful idiom is to implement it like:

const Registry& MyModule::DefaultConfig() const { static Registry cfg; // never is destroyed if (cfg.Size()) return cfg; // already filled it // set defaults: cfg.Set("TheAnswer",42); cfg.Set("Units","unknown"); return cfg; }

Reimplemented from JobCModule.

Definition at line 345 of file NtpMaker.cxx.

References JobCModule::GetName(), Msg::kDebug, Registry::LockKeys(), Registry::LockValues(), MSG, Registry::Set(), Registry::UnLockKeys(), and Registry::UnLockValues().

00346 {
00347   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::DefaultConfig() *** " << endl;
00348 
00349   // Supply default configuration for the module
00350   static Registry r; 
00351   std::string name = this->GetName();
00352   name += ".config.default";
00353   r.SetName(name.c_str());
00354   r.UnLockKeys();
00355   r.UnLockValues();
00356   r.Set("NtpFileName","ntp.root");
00357   r.Set("MaxFileSize",0);
00358   r.Set("WriteStrips",1);
00359   r.Set("WriteScintHits",1);
00360   r.Set("WriteStdHEPs",1);
00361   r.LockValues();
00362   r.LockKeys();
00363   return r;
00364 }

void NtpMaker::EndJob (  )  [virtual]

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 383 of file NtpMaker.cxx.

References fEvent, fFile, fNtpName, fTree, Msg::kDebug, Msg::kWarning, and MSG.

00384 {
00385   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::EndJob(...) *** " << endl;
00386   if( !fFile )
00387     {
00388       //Create the output file if it doesn't already exist.
00389       MSG("NtpMaker",Msg::kWarning) << " *** NTPMAKER: CREATING EMPTY OUTPUT FILE *** " << endl;
00390       TDirectory *tmpd = gDirectory;
00391       fFile = TFile::Open(fNtpName.Data(), "recreate");
00392       fTree = new TTree("ntp", "FarDet Atmos Events");
00393       fTree->SetDirectory(fFile);
00394       fTree->Branch("evt", "AtmosEvent", &fEvent);
00395       fTree->SetAutoSave(100);
00396       tmpd->cd();
00397     }
00398   // write out file
00399   if( fFile )
00400     {
00401       TDirectory* tmpd = gDirectory;
00402       fFile->cd();
00403       MSG("NtpMaker",Msg::kDebug) << " WRITING FILE: " << fFile->GetBytesWritten() << " bytes (before)" << endl;
00404       fFile->Write();
00405       MSG("NtpMaker",Msg::kDebug) << " WRITING FILE: " << fFile->GetBytesWritten() << " bytes (after)" << endl;
00406       fFile->Close();
00407       gDirectory = tmpd;
00408     }
00409 }

void NtpMaker::FillCandInfo ( CandRecord candrec  )  [private]

Definition at line 413 of file NtpMaker.cxx.

References AtmosCalculator::EventProperties(), fEvent, FillDataQualityInfo(), FillDeMuxInfo(), FillEventInfo(), FillFitTrackInfo(), FillShieldInfo(), FillShowerInfo(), FillSliceInfo(), FillStripInfo(), FillTrackInfo(), CandRecord::GetCandHandleIter(), Msg::kDebug, MSG, AtmosEvent::ShowerList, AtmosCalculator::ShowerProperties(), AtmosEvent::StripList, AtmosEvent::TrackList, and AtmosCalculator::TrackProperties().

Referenced by Ana().

00414 {
00415   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::FillCandInfo(...) *** " << endl;
00416 
00417   // Fill information from the candidates
00418   TIter candbit(candrec->GetCandHandleIter());
00419   while(TObject* tob = (TObject*)(candbit()))
00420     {
00421       MSG("NtpMaker",Msg::kDebug) << tob->GetName() << endl;
00422   
00423       if(tob->InheritsFrom("CandDataQualityHandle"))
00424         {
00425           FillDataQualityInfo(tob); continue;
00426         }
00427 
00428       if(tob->InheritsFrom("CandDeMuxDigitListHandle"))
00429         {
00430           FillDeMuxInfo(tob); continue;
00431         }
00432       if(tob->InheritsFrom("FarDetShieldPlankListHandle"))
00433         {
00434           FillShieldInfo(tob); continue;
00435         }
00436   
00437       if(tob->InheritsFrom("FarDetStripListHandle"))
00438         {
00439           FillStripInfo(tob); continue;
00440         }
00441  
00442       if(tob->InheritsFrom("FarDetSliceListHandle"))
00443         {
00444           FillSliceInfo(tob); continue;
00445         }
00446 
00447       if(tob->InheritsFrom("CandFitTrackListHandle"))
00448         {
00449           FillFitTrackInfo(tob); continue;
00450         }      
00451 
00452       if(tob->InheritsFrom("CandTrackListHandle"))
00453         {
00454           FillTrackInfo(tob); continue;
00455         }
00456   
00457       if(tob->InheritsFrom("CandShowerListHandle"))
00458         {
00459           FillShowerInfo(tob); continue;
00460         }
00461   
00462       if(tob->InheritsFrom("FarDetEventListHandle"))
00463         {
00464           FillEventInfo(tob); continue;
00465         }
00466       MSG("NtpMaker",Msg::kDebug) << "   NtpMaker has no use for " << tob->GetName() <<endl;
00467     }
00468 
00469   // now we've got all the information from the candidates, we can calculate 
00470   // the atmospheric neutrino analysis variables using the AtmosCalculator tool
00471 
00472   MSG("NtpMaker",Msg::kDebug) << " Running AtmosCalculator..." << endl;
00473   AtmosCalculator AtmosCalc;
00474   TClonesArray& MyFitList = *(fEvent->TrackList);
00475   TClonesArray* MyStrpList = (fEvent->StripList);
00476   TClonesArray& MyShowerList = *(fEvent->ShowerList);
00477 
00478   int trklimit = MyFitList.GetLast()+1;
00479   for(int i=0; i<trklimit; ++i)
00480     {
00481       AtmosTrack* MyFit = (AtmosTrack*)(MyFitList[i]);
00482       AtmosCalc.TrackProperties(MyFit,MyStrpList);
00483     }
00484 
00485   int shwlimit = MyShowerList.GetLast()+1;
00486   for(int i=0; i<shwlimit; ++i)
00487     {
00488       AtmosShower* MyShower = (AtmosShower*)(MyShowerList[i]);
00489       AtmosCalc.ShowerProperties(MyShower,MyStrpList);
00490     }
00491 
00492   AtmosCalc.EventProperties(fEvent,MyStrpList);
00493 
00494   MSG("NtpMaker",Msg::kDebug) << " ... AtmosCalculator Finished" << endl;
00495 
00496   return;
00497 }

void NtpMaker::FillDataQualityInfo ( TObject *  tob  )  [private]

Definition at line 501 of file NtpMaker.cxx.

References AtmosData::BusyChips, AtmosData::ColdChips, AtmosDeadChip::Crate, AtmosData::CrateMask, AtmosEvent::DataInfo, AtmosData::DataQualityBitMap, AtmosEvent::DeadChipList, AtmosDeadChip::ErrorCode, AtmosData::ErrorCode, fEvent, CandDataQualityHandle::GetBusyChips(), CandDataQualityHandle::GetColdChips(), RawChannelId::GetCrate(), CandDataQualityHandle::GetCrateMask(), CandDataQualityHandle::GetDataQuality(), CandHandle::GetDaughterIterator(), CandDataQualityHandle::GetErrorCode(), CandDataQualityHandle::GetHotChips(), CandDataQualityHandle::GetLiCalibPoint(), CandDataQualityHandle::GetLiCalibType(), CandDataQualityHandle::GetLiPulseHeight(), CandDataQualityHandle::GetLiPulserBox(), CandDataQualityHandle::GetLiPulserLed(), CandDataQualityHandle::GetLiPulseWidth(), CandDataQualityHandle::GetLiRelativeTime(), CandDataQualityHandle::GetLiSubtractedTime(), CandDataQualityHandle::GetLiTime(), CandDataQualityHandle::GetLiTrigger(), PlexSEIdAltL::GetPlane(), CandDataQualityHandle::GetPostTriggerDigits(), CandDataQualityHandle::GetPreTriggerDigits(), CandDataQualityHandle::GetReadoutErrors(), PlexHandle::GetSEIdAltL(), CandDataQualityHandle::GetSnarlMultiplicity(), CandDataQualityHandle::GetSpillStatus(), CandDataQualityHandle::GetSpillTimeError(), CandDataQualityHandle::GetSpillType(), CandDataQualityHandle::GetTriggerSource(), CandDataQualityHandle::GetTriggerTime(), RawChannelId::GetVaAdcSel(), RawChannelId::GetVaChip(), RawChannelId::GetVarcId(), CandHandle::GetVldContext(), RawChannelId::GetVmm(), AtmosData::HotChips, AtmosDeadChip::InReadout, PlexSEIdAltL::IsValid(), PlexSEIdAltL::IsVetoShield(), Msg::kDebug, Detector::kFar, ElecType::kVA, AtmosData::LiCalibPoint, AtmosData::LiCalibType, AtmosData::LiPulseHeight, AtmosData::LiPulserBox, AtmosData::LiPulserLed, AtmosData::LiPulseWidth, AtmosData::LiRelativeTime, AtmosData::LiSubtractedTime, AtmosData::LiTime, AtmosData::LiTrigger, MSG, AtmosEvent::NDeadChips, AtmosDeadChip::Plane, AtmosData::PostTriggerDigits, AtmosData::PreTriggerDigits, AtmosData::ReadoutErrors, AtmosDeadChip::Shield, AtmosData::SnarlMultiplicity, AtmosData::SpillStatus, AtmosData::SpillTimeError, AtmosData::SpillType, AtmosDeadChip::Status, AtmosData::TriggerSource, AtmosData::TriggerTime, AtmosDeadChip::VaAdc, AtmosDeadChip::VaChip, AtmosDeadChip::Varc, and AtmosDeadChip::Vmm.

Referenced by FillCandInfo().

00502 {
00503   // Fill data quality information
00504   // (uses CandDataQualityHandle from CandMorgue package)
00505   CandDataQualityHandle* Data = (CandDataQualityHandle*)(tob);
00506   MSG("NtpMaker",Msg::kDebug) << " ... found CandDataQualityHandle " << endl;
00507   TClonesArray& MyDeadChipList = *(fEvent->DeadChipList);
00508 
00509   fEvent->DataInfo.TriggerSource =     Data->GetTriggerSource();
00510   fEvent->DataInfo.TriggerTime =       Data->GetTriggerTime();
00511   fEvent->DataInfo.ErrorCode =         Data->GetErrorCode();
00512   fEvent->DataInfo.CrateMask =         Data->GetCrateMask();
00513   fEvent->DataInfo.PreTriggerDigits =  Data->GetPreTriggerDigits();
00514   fEvent->DataInfo.PostTriggerDigits = Data->GetPostTriggerDigits();
00515   fEvent->DataInfo.SnarlMultiplicity = Data->GetSnarlMultiplicity();
00516   fEvent->DataInfo.SpillStatus =       Data->GetSpillStatus();
00517   fEvent->DataInfo.SpillType =         Data->GetSpillType();
00518   fEvent->DataInfo.SpillTimeError =    Data->GetSpillTimeError();
00519   fEvent->DataInfo.LiTrigger =         Data->GetLiTrigger();
00520   fEvent->DataInfo.LiTime =            Data->GetLiTime();
00521   fEvent->DataInfo.LiSubtractedTime =  Data->GetLiSubtractedTime();
00522   fEvent->DataInfo.LiRelativeTime =    Data->GetLiRelativeTime();
00523   fEvent->DataInfo.LiCalibPoint =      Data->GetLiCalibPoint();
00524   fEvent->DataInfo.LiCalibType =       Data->GetLiCalibType();
00525   fEvent->DataInfo.LiPulserBox =       Data->GetLiPulserBox();
00526   fEvent->DataInfo.LiPulserLed =       Data->GetLiPulserLed();
00527   fEvent->DataInfo.LiPulseHeight =     Data->GetLiPulseHeight();
00528   fEvent->DataInfo.LiPulseWidth =      Data->GetLiPulseWidth();
00529   fEvent->DataInfo.ColdChips =         Data->GetColdChips();
00530   fEvent->DataInfo.HotChips =          Data->GetHotChips();  
00531   fEvent->DataInfo.BusyChips =         Data->GetBusyChips();
00532   fEvent->DataInfo.ReadoutErrors =     Data->GetReadoutErrors();
00533   fEvent->DataInfo.DataQualityBitMap = (Int_t)Data->GetDataQuality();
00534 
00535   //Get Details of Dead Chips
00536   PlexHandle plex(*(Data->GetVldContext()));
00537   TIter DataItr(Data->GetDaughterIterator());
00538   while(CandDeadChipHandle* DeadChip = dynamic_cast<CandDeadChipHandle*>(DataItr()))
00539     {
00540       AtmosDeadChip* MyDeadChip = new( MyDeadChipList[(fEvent->NDeadChips)++] ) AtmosDeadChip();
00541       RawChannelId rcid = DeadChip->GetChannelId();
00542       
00543       MyDeadChip->Crate = rcid.GetCrate();
00544       MyDeadChip->Varc = rcid.GetVarcId();
00545       MyDeadChip->Vmm = rcid.GetVmm();
00546       MyDeadChip->VaAdc = rcid.GetVaAdcSel();
00547       MyDeadChip->VaChip = rcid.GetVaChip();
00548       RawChannelId rcidCheck = RawChannelId(Detector::kFar,ElecType::kVA,
00549                                             MyDeadChip->Crate,  MyDeadChip->Varc,
00550                                             MyDeadChip->Vmm, MyDeadChip->VaAdc, 
00551                                             MyDeadChip->VaChip, 10);
00552 
00553       if( plex.GetSEIdAltL(rcidCheck).IsValid() && plex.GetSEIdAltL(rcidCheck).GetPlane()>=0 && plex.GetSEIdAltL(rcidCheck).GetPlane()<1000 )
00554         {
00555           MyDeadChip->InReadout = 1;
00556 
00557           // Veto Shield
00558           if(plex.GetSEIdAltL(rcidCheck).IsVetoShield())
00559             {
00560               MyDeadChip->Shield = 1;
00561             }
00562 
00563           // Main Detector
00564           if(!plex.GetSEIdAltL(rcidCheck).IsVetoShield())
00565             {//Only set the plane numbers if we're in the main detector 
00566           
00567               RawChannelId rcidLow = RawChannelId(Detector::kFar,ElecType::kVA,
00568                                                   MyDeadChip->Crate,  MyDeadChip->Varc,
00569                                                   MyDeadChip->Vmm, MyDeadChip->VaAdc, 
00570                                                   0,2);
00571 
00572               RawChannelId rcidHigh = RawChannelId(Detector::kFar,ElecType::kVA,
00573                                                    MyDeadChip->Crate,  MyDeadChip->Varc,
00574                                                    MyDeadChip->Vmm, MyDeadChip->VaAdc, 
00575                                                    1,17);
00576 
00577               if(MyDeadChip->VaChip!=1) MyDeadChip->Plane[0] = plex.GetSEIdAltL(rcidLow).GetPlane();
00578               if(MyDeadChip->VaChip!=0) MyDeadChip->Plane[1] = plex.GetSEIdAltL(rcidHigh).GetPlane();
00579             }
00580         }
00581       
00582       MyDeadChip->ErrorCode = DeadChip->GetErrorCode();
00583       MyDeadChip->Status = (Int_t)DeadChip->GetChipStatus();
00584     }
00585 
00586   return;
00587 }

void NtpMaker::FillDeMuxInfo ( TObject *  tob  )  [private]

Definition at line 591 of file NtpMaker.cxx.

References AtmosReco::AbsTime, AtmosReco::DeMuxFlagWord, fEvent, CandDigitListHandle::GetAbsTime(), CandHandle::GetDaughterIterator(), CandDeMuxDigitListHandle::GetDeMuxDigitListFlagWord(), CandHandle::GetNDaughters(), Msg::kDebug, CandDeMuxDigitList::kMultipleMuonEvent, MSG, AtmosReco::MultipleMuonFlag, AtmosReco::Ndigits, AtmosReco::Nplndigits, and AtmosEvent::RecoInfo.

Referenced by FillCandInfo().

00592 {
00593   // Get output from demuxing 
00594   CandDeMuxDigitListHandle* DigitList = (CandDeMuxDigitListHandle*)(tob);
00595   MSG("NtpMaker",Msg::kDebug) << " ... found CandDeMuxDigitListHandle " << endl;
00596   fEvent->RecoInfo.Ndigits = DigitList->GetNDaughters();
00597   fEvent->RecoInfo.DeMuxFlagWord = DigitList->GetDeMuxDigitListFlagWord();
00598   fEvent->RecoInfo.MultipleMuonFlag = (Int_t)((DigitList->GetDeMuxDigitListFlagWord())&(CandDeMuxDigitList::kMultipleMuonEvent));
00599   fEvent->RecoInfo.AbsTime = DigitList->GetAbsTime();
00600 
00601   fEvent->RecoInfo.Nplndigits = 0;
00602   TIter digitr(DigitList->GetDaughterIterator());
00603   while(CandDigitHandle* cdh = dynamic_cast<CandDigitHandle*>(digitr()))
00604     {
00605       if( cdh )
00606         {
00607           if( !cdh->GetPlexSEIdAltL().IsVetoShield() 
00608            && cdh->GetPlexSEIdAltL().GetPlane()>=0
00609            && cdh->GetPlexSEIdAltL().GetPlane()<500 
00610            && cdh->GetSubtractedTime()>=0 )
00611             {
00612               ++fEvent->RecoInfo.Nplndigits;
00613             }
00614         }
00615     }
00616 
00617 
00618   return;
00619 }

void NtpMaker::FillEventInfo ( TObject *  tob  )  [private]

Definition at line 623 of file NtpMaker.cxx.

References AtmosReco::EMCharge, fEvent, CandHandle::GetDaughter(), FarDetEventHandle::GetEMCharge(), FarDetEventHandle::GetMaxPlane(), FarDetEventHandle::GetMaxZ(), FarDetEventHandle::GetMinPlane(), FarDetEventHandle::GetMinZ(), FarDetEventHandle::GetMuDirCosU(), FarDetEventHandle::GetMuDirCosV(), FarDetEventHandle::GetMuDirCosZ(), FarDetEventHandle::GetMuMomentumCurve(), FarDetEventHandle::GetMuMomentumRange(), FarDetEventHandle::GetMuReco(), CandHandle::GetNDaughters(), FarDetEventHandle::GetShwDirCosU(), FarDetEventHandle::GetShwDirCosV(), FarDetEventHandle::GetShwDirCosZ(), FarDetEventHandle::GetShwEnergyGeVDeweighted(), FarDetEventHandle::GetShwEnergyGeVLinear(), FarDetEventHandle::GetShwMipsDeweighted(), FarDetEventHandle::GetShwMipsLinear(), FarDetEventHandle::GetShwReco(), FarDetEventHandle::GetVtxPlane(), FarDetEventHandle::GetVtxTime(), FarDetEventHandle::GetVtxU(), FarDetEventHandle::GetVtxV(), FarDetEventHandle::GetVtxZ(), Msg::kDebug, Msg::kWarning, AtmosReco::MaxPlane, AtmosReco::MaxZ, AtmosReco::MinPlane, AtmosReco::MinZ, MSG, AtmosReco::MuDirCosU, AtmosReco::MuDirCosV, AtmosReco::MuDirCosX, AtmosReco::MuDirCosY, AtmosReco::MuDirCosZ, AtmosReco::MuMomentumCurve, AtmosReco::MuMomentumRange, AtmosReco::MuReco, AtmosEvent::RecoInfo, AtmosReco::ShwDirCosU, AtmosReco::ShwDirCosV, AtmosReco::ShwDirCosX, AtmosReco::ShwDirCosY, AtmosReco::ShwDirCosZ, AtmosReco::ShwEnergyGeVDeweighted, AtmosReco::ShwEnergyGeVLinear, AtmosReco::ShwMipsDeweighted, AtmosReco::ShwMipsLinear, AtmosReco::ShwReco, AtmosReco::VtxPlane, AtmosReco::VtxTime, AtmosReco::VtxU, AtmosReco::VtxV, AtmosReco::VtxX, AtmosReco::VtxY, and AtmosReco::VtxZ.

Referenced by FillCandInfo().

00624 {
00625   FarDetEventListHandle* EventList = (FarDetEventListHandle*)(tob);
00626   MSG("NtpMaker",Msg::kDebug) << " ... found FarDetEventListHandle " << endl;
00627 
00628   if(EventList->GetNDaughters()<1) 
00629     {
00630       MSG("NtpMaker",Msg::kWarning) << " ... FarDetEventListHandle has no daughters. " << endl;
00631       MSG("NtpMaker",Msg::kWarning) << " ... failed to find FarDetEventHandle " << endl;
00632       return;
00633     }
00634   // for atmospheric neutrinos in the Far Detector, assume only 1 event per snarl
00635   const FarDetEventHandle* Event = dynamic_cast<const FarDetEventHandle*>(EventList->GetDaughter(0));
00636   
00637   if(Event==0) 
00638     {
00639       MSG("NtpMaker",Msg::kWarning) << " ... failed to find FarDetEventHandle " << endl;
00640       return;
00641     }
00642   MSG("NtpMaker",Msg::kDebug) << " ... found FarDetEventHandle " << endl;
00643 
00644   fEvent->RecoInfo.EMCharge = Event->GetEMCharge();
00645 
00646   fEvent->RecoInfo.MuReco = Event->GetMuReco();
00647   fEvent->RecoInfo.MuMomentumRange = Event->GetMuMomentumRange();
00648   fEvent->RecoInfo.MuMomentumCurve = Event->GetMuMomentumCurve();
00649   fEvent->RecoInfo.MuDirCosU = Event->GetMuDirCosU();
00650   fEvent->RecoInfo.MuDirCosV = Event->GetMuDirCosV();
00651   fEvent->RecoInfo.MuDirCosZ = Event->GetMuDirCosZ();
00652   fEvent->RecoInfo.MuDirCosX = -999;
00653   fEvent->RecoInfo.MuDirCosY = -999;
00654   if( fEvent->RecoInfo.MuReco )
00655     {
00656       fEvent->RecoInfo.MuDirCosX = 0.7071*(Event->GetMuDirCosU()-Event->GetMuDirCosV());
00657       fEvent->RecoInfo.MuDirCosY = 0.7071*(Event->GetMuDirCosU()+Event->GetMuDirCosV());
00658     }
00659   
00660   fEvent->RecoInfo.ShwReco = Event->GetShwReco();
00661   fEvent->RecoInfo.ShwMipsLinear = Event->GetShwMipsLinear();
00662   fEvent->RecoInfo.ShwMipsDeweighted = Event->GetShwMipsDeweighted();
00663   fEvent->RecoInfo.ShwEnergyGeVLinear = Event->GetShwEnergyGeVLinear(); 
00664   fEvent->RecoInfo.ShwEnergyGeVDeweighted = Event->GetShwEnergyGeVDeweighted(); 
00665   fEvent->RecoInfo.ShwDirCosU = Event->GetShwDirCosU();
00666   fEvent->RecoInfo.ShwDirCosV = Event->GetShwDirCosV();
00667   fEvent->RecoInfo.ShwDirCosZ = Event->GetShwDirCosZ();
00668   fEvent->RecoInfo.ShwDirCosX = -999;
00669   fEvent->RecoInfo.ShwDirCosY = -999;
00670   if( fEvent->RecoInfo.ShwReco )
00671     {
00672       fEvent->RecoInfo.ShwDirCosX = 0.7071*(Event->GetShwDirCosU()-Event->GetShwDirCosV());
00673       fEvent->RecoInfo.ShwDirCosY = 0.7071*(Event->GetShwDirCosU()+Event->GetShwDirCosV());
00674     }
00675 
00676   fEvent->RecoInfo.VtxTime = Event->GetVtxTime();
00677   fEvent->RecoInfo.VtxU = Event->GetVtxU();
00678   fEvent->RecoInfo.VtxV = Event->GetVtxV();
00679   fEvent->RecoInfo.VtxX = 0.7071*(Event->GetVtxU()-Event->GetVtxV());
00680   fEvent->RecoInfo.VtxY = 0.7071*(Event->GetVtxU()+Event->GetVtxV());
00681   fEvent->RecoInfo.VtxZ = Event->GetVtxZ();
00682   fEvent->RecoInfo.VtxPlane = Event->GetVtxPlane();
00683 
00684   fEvent->RecoInfo.MinPlane = Event->GetMinPlane();
00685   fEvent->RecoInfo.MaxPlane = Event->GetMaxPlane();
00686   fEvent->RecoInfo.MinZ = Event->GetMinZ();
00687   fEvent->RecoInfo.MaxZ = Event->GetMaxZ();
00688 
00689   return;
00690 
00691 }

void NtpMaker::FillFitTrackInfo ( TObject *  tob  )  [private]

Definition at line 695 of file NtpMaker.cxx.

References AtmosStrip::dS, AtmosTrack::EMcharge, AtmosTrack::EndDirCosU, AtmosTrack::EndDirCosV, AtmosTrack::EndDirCosX, AtmosTrack::EndDirCosY, AtmosTrack::EndDirCosZ, AtmosTrack::EndDirTimeFitNdf, AtmosTrack::EndDirTimeFitRMS, AtmosTrack::EndPlane, AtmosTrack::EndR, AtmosTrack::EndTime, AtmosTrack::EndTrace, AtmosTrack::EndTraceZ, AtmosTrack::EndU, AtmosTrack::EndV, AtmosTrack::EndX, AtmosTrack::EndY, AtmosTrack::EndZ, fEvent, AtmosTrack::FitPass, Calibrator::GetAttenCorrected(), CandHandle::GetDaughterIterator(), Calibrator::GetMIP(), CandHandle::GetNDaughters(), AtmosStrip::GreenFibre, AtmosStrip::HalfLength, AtmosTrack::Index, Calibrator::Instance(), Msg::kDebug, Detector::kFar, StripEnd::kNegative, StripEnd::kPositive, PlaneCoverage::kTotal, PlaneView::kU, PlaneView::kV, Msg::kVerbose, StripEnd::kWhole, AtmosStrip::L, AtmosStrip::MIP, AtmosTrack::Momentum, AtmosTrack::MomentumCurve, AtmosTrack::MomentumRange, MSG, AtmosEvent::NFits, AtmosTrack::Nplanes, AtmosEvent::NStrips, AtmosTrack::Nstrips, AtmosEvent::NTracks, AtmosStrip::Plane, AtmosTrack::QPvtx, AtmosTrack::QPvtxChi2, AtmosTrack::QPvtxErr, AtmosTrack::QPvtxNdf, AtmosTrack::QPvtxTweaked, AtmosTrack::RangeGCM2, AtmosTrack::RangeMetres, AtmosStrip::Sigcorr, AtmosStrip::Sigmap, AtmosStrip::Strip, AtmosEvent::StripList, AtmosTrack::TimeOffset, AtmosTrack::TimeSlope, AtmosTrack::TimingFitChi2, AtmosTrack::TimingFitNdf, AtmosEvent::TrackList, AtmosStrip::Trk, AtmosStrip::View, AtmosTrack::VtxDirCosU, AtmosTrack::VtxDirCosV, AtmosTrack::VtxDirCosX, AtmosTrack::VtxDirCosY, AtmosTrack::VtxDirCosZ, AtmosTrack::VtxDirTimeFitNdf, AtmosTrack::VtxDirTimeFitRMS, AtmosTrack::VtxPlane, AtmosTrack::VtxR, AtmosTrack::VtxTime, AtmosTrack::VtxTrace, AtmosTrack::VtxTraceZ, AtmosTrack::VtxU, AtmosTrack::VtxV, AtmosTrack::VtxX, AtmosTrack::VtxY, and AtmosTrack::VtxZ.

Referenced by FillCandInfo().

00696 {
00697   CandFitTrackListHandle* FitList = (CandFitTrackListHandle*)(tob);
00698   MSG("NtpMaker",Msg::kDebug) << " ... found CandFitTrackListHandle containing "<<FitList->GetNDaughters()<<" tracks."<< endl;
00699   float nstripcalib(0.0),stripsintrack(0.0);
00700   Calibrator& cal = Calibrator::Instance(); 
00701       
00702   //Reset the track flags
00703   TClonesArray* MyStrpList = (TClonesArray*)(fEvent->StripList);
00704   for(Int_t myint=0;myint<fEvent->NStrips;myint++)
00705     {
00706       AtmosStrip& MyStrp = *((AtmosStrip*)(MyStrpList->At(myint)));
00707       MyStrp.Trk = 0;
00708       MyStrp.dS = -999.9;
00709     }
00710 
00711   // Set information from CandFitTrackHandles
00712   // assume same number of CandTracks and CandFitTracks
00713   // (the CandFitTracks entirely overwrite the CandTracks)
00714   TClonesArray* MyFitList = (TClonesArray*)(fEvent->TrackList);  
00715   TIter FitItr(FitList->GetDaughterIterator());
00716   fEvent->NFits = 0; 
00717   while(CandFitTrackHandle* Fit = (CandFitTrackHandle*)(FitItr()))
00718     {
00719       if( fEvent->NFits < fEvent->NTracks )
00720         {
00721           AtmosTrack* MyFit = (AtmosTrack*)(MyFitList->At(fEvent->NFits++));
00722           MyFit->VtxPlane = Fit->GetVtxPlane();
00723           MyFit->VtxTime = Fit->GetVtxT();
00724           MyFit->VtxU = Fit->GetVtxU();
00725           MyFit->VtxV = Fit->GetVtxV();
00726           MyFit->VtxR = sqrt((MyFit->VtxU*MyFit->VtxU)+(MyFit->VtxV*MyFit->VtxV));
00727           MyFit->VtxX = 0.7071*(Fit->GetVtxU()-Fit->GetVtxV());
00728           MyFit->VtxY = 0.7071*(Fit->GetVtxU()+Fit->GetVtxV());
00729           MyFit->VtxZ = Fit->GetVtxZ();
00730           MyFit->VtxTrace = Fit->GetVtxTrace();
00731           MyFit->VtxTraceZ = Fit->GetVtxTraceZ();
00732           MyFit->VtxDirCosU = Fit->GetDirCosU();
00733           MyFit->VtxDirCosV = Fit->GetDirCosV();
00734           MyFit->VtxDirCosX = 0.7071*(Fit->GetDirCosU()-Fit->GetDirCosV());
00735           MyFit->VtxDirCosY = 0.7071*(Fit->GetDirCosU()+Fit->GetDirCosV());
00736           MyFit->VtxDirCosZ = Fit->GetDirCosZ();
00737           MyFit->EndPlane = Fit->GetEndPlane();
00738           MyFit->EndTime = Fit->GetEndT();
00739           MyFit->EndU = Fit->GetEndU();
00740           MyFit->EndV = Fit->GetEndV();
00741           MyFit->EndR = sqrt((MyFit->EndU*MyFit->EndU)+(MyFit->EndV*MyFit->EndV)); 
00742           MyFit->EndX = 0.7071*(Fit->GetEndU()-Fit->GetEndV());
00743           MyFit->EndY = 0.7071*(Fit->GetEndU()+Fit->GetEndV());
00744           MyFit->EndZ = Fit->GetEndZ();
00745           MyFit->EndTrace = Fit->GetEndTrace();
00746           MyFit->EndTraceZ = Fit->GetEndTraceZ();
00747           MyFit->EndDirCosU = Fit->GetEndDirCosU();
00748           MyFit->EndDirCosV = Fit->GetEndDirCosV();
00749           MyFit->EndDirCosX = 0.7071*(Fit->GetEndDirCosU()-Fit->GetEndDirCosV());
00750           MyFit->EndDirCosY = 0.7071*(Fit->GetEndDirCosU()+Fit->GetEndDirCosV());
00751           MyFit->EndDirCosZ = Fit->GetEndDirCosZ();
00752           MyFit->RangeGCM2 = Fit->GetRange(Fit->GetVtxPlane());//NB this will lose the extrapolation at vtx and end
00753           MyFit->RangeMetres = Fit->GetdS(Fit->GetVtxPlane());//NB this will lose the extrapolation at vtx and end
00754           MyFit->Nstrips = Fit->GetNStrip(); // AtNu Trk->GetNStrips();
00755           MyFit->Nplanes = abs(MyFit->EndPlane-MyFit->VtxPlane)+1;//Trk->GetNPlane() // AtNu Trk->GetNPlanes();
00756 
00757           MyFit->TimingFitChi2 = Fit->GetTimeFitChi2();
00758           MyFit->TimingFitNdf = Fit->GetNTimeFitDigit()-2;
00759           MyFit->TimeSlope = Fit->GetTimeSlope();
00760           MyFit->TimeOffset = Fit->GetTimeOffset(); 
00761 
00762           if(MyFit->EndPlane-MyFit->VtxPlane>0)
00763             {//Forward and Backward variables defined relative to increasing Z
00764               MyFit->VtxDirTimeFitRMS = Fit->GetTimeForwardFitRMS();  
00765               MyFit->EndDirTimeFitRMS = Fit->GetTimeBackwardFitRMS(); 
00766               MyFit->VtxDirTimeFitNdf = Fit->GetTimeForwardFitNDOF(); 
00767               MyFit->EndDirTimeFitNdf = Fit->GetTimeBackwardFitNDOF();
00768             }
00769           else
00770             {
00771               MyFit->VtxDirTimeFitRMS = Fit->GetTimeBackwardFitRMS(); 
00772               MyFit->EndDirTimeFitRMS = Fit->GetTimeForwardFitRMS();  
00773               MyFit->VtxDirTimeFitNdf = Fit->GetTimeBackwardFitNDOF();
00774               MyFit->EndDirTimeFitNdf = Fit->GetTimeForwardFitNDOF(); 
00775             }
00776 
00777           MyFit->Momentum = Fit->GetMomentumCurve();
00778           MyFit->MomentumRange = Fit->GetMomentumRange();
00779           MyFit->MomentumCurve = Fit->GetMomentumCurve();
00780 
00781           MyFit->FitPass = Fit->GetPass();    
00782           MyFit->EMcharge = Fit->GetEMCharge();
00783           MyFit->QPvtxChi2 = Fit->GetChi2();
00784           MyFit->QPvtxNdf = Fit->GetNDOF();
00785           MyFit->QPvtx = Fit->GetPlaneQP(MyFit->VtxPlane);
00786           MyFit->QPvtxTweaked = (MyFit->Momentum!=0.0)?MyFit->EMcharge/MyFit->Momentum:0.0;
00787           MyFit->QPvtxErr = Fit->GetVtxQPError();
00788 
00789           if( fEvent->NFits<32 ){
00790             MyFit->Index = (int)pow(2.,fEvent->NFits-1);
00791           }
00792           else{
00793             MyFit->Index = 0;
00794           }
00795 
00796           // (don't) reset track strips
00797           //for(Int_t myint=0;myint<fEvent->NStrips;myint++)
00798           //  {
00799           //    AtmosStrip& MyStrp = *((AtmosStrip*)(MyStrpList->At(myint)));
00800           //    MyStrp.Trk = 0;
00801           //  }
00802 
00803           //set information for strips that are part of this track
00804           nstripcalib=(0.0); stripsintrack = Fit->GetNDaughters();
00805           TIter StrpItr(Fit->GetDaughterIterator());
00806           PlexStripEndId* seidP = 0;
00807           PlexStripEndId* seidN = 0;
00808           while(CandStripHandle* TrkStrp = (CandStripHandle*)(StrpItr()))
00809             {
00810               for(Int_t myint=0;myint<fEvent->NStrips;myint++)
00811                 {
00812                   AtmosStrip& MyStrp = *((AtmosStrip*)(MyStrpList->At(myint)));
00813 
00814                   if( TrkStrp->GetPlane()==MyStrp.Plane && TrkStrp->GetStrip()==MyStrp.Strip )
00815                     {
00816                       if( MyStrp.Trk==0 && Fit->IsTPosValid(MyStrp.Plane) )
00817                         { // (using MyStrp.Trk==0 as primary track info should dominate)
00818                           if( MyStrp.View==0 )
00819                             {
00820                               MyStrp.L = Fit->GetV(MyStrp.Plane);
00821                               MyStrp.dS = Fit->GetdS(MyStrp.Plane);
00822                               MyStrp.GreenFibre[0] = MyStrp.HalfLength - MyStrp.L;
00823                               MyStrp.GreenFibre[1] = MyStrp.HalfLength + MyStrp.L;
00824                               seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
00825                               seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
00826                             }
00827                           if( MyStrp.View==1 )
00828                             {
00829                               MyStrp.L = Fit->GetU(MyStrp.Plane);
00830                               MyStrp.dS = Fit->GetdS(MyStrp.Plane);
00831                               MyStrp.GreenFibre[0] = MyStrp.HalfLength + MyStrp.L;
00832                               MyStrp.GreenFibre[1] = MyStrp.HalfLength - MyStrp.L;
00833                               seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
00834                               seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
00835                             }
00836                           double lsign = pow(-1.0, (1.0+double(MyStrp.View)) );
00837                           if(seidN && MyStrp.Sigcorr[0]>0.0)
00838                             {
00839                               MyStrp.Sigmap[0] = cal.GetAttenCorrected(MyStrp.Sigcorr[0], lsign*MyStrp.L, *(seidN) );
00840                               MyStrp.MIP[0] = cal.GetMIP(MyStrp.Sigmap[0], *(seidN) );
00841                             }
00842                           if(seidP && MyStrp.Sigcorr[1]>0.0)
00843                             {
00844                               MyStrp.Sigmap[1] = cal.GetAttenCorrected(MyStrp.Sigcorr[1], lsign*MyStrp.L, *(seidP) );
00845                               MyStrp.MIP[1] = cal.GetMIP(MyStrp.Sigmap[1], *(seidP) );
00846                             }
00847                           if(MyStrp.Sigcorr[0]>0.0 || MyStrp.Sigcorr[1]>0.0) nstripcalib+=1.0;
00848                         }
00849                       MyStrp.Trk += MyFit->Index;
00850 
00851                       if(seidP) delete seidP; seidP = 0;
00852                       if(seidN) delete seidN; seidN = 0;
00853 
00854                       break; // break out of loop
00855                              // faster - this should be ok as long as the
00856                              // same strip doesn't exist twice in a snarl
00857                     }
00858                 } 
00859             }
00860 
00861           MSG("NtpMaker",Msg::kVerbose) <<"   "<<(int)stripsintrack<<" strips in the fitted track of which "<<(int)nstripcalib<<" were calibrated."<<endl<<flush;
00862         }
00863     }
00864   return;
00865 }

void NtpMaker::FillMCInfo ( SimSnarlRecord simrec  )  [private]

Definition at line 869 of file NtpMaker.cxx.

References REROOT_NeuKin::A(), AtmosMC::A, AtmosStdHEP::Child, AtmosScintHit::DE, AtmosScintHit::DS, AtmosStdHEP::E, AtmosMC::Eel, AtmosMC::Ehad, AtmosMC::EMfrac, REROOT_NeuKin::EMFrac(), AtmosMC::Emu, AtmosMC::Enu, AtmosMC::Etarg, fEvent, RecDataRecord< T >::GetComponents(), PlexPlaneId::GetPlaneView(), UgliGeomHandle::GetStripHandle(), RecRecordImp< T >::GetVldContext(), REROOT_NeuKin::IAction(), REROOT_NeuKin::IBoson(), AtmosScintHit::Id, AtmosStdHEP::Id, AtmosMC::IDact, AtmosMC::IDboson, AtmosMC::IDnu, AtmosMC::IDnunoosc, AtmosMC::IDres, AtmosMC::IDtarget, AtmosStdHEP::Index, REROOT_NeuKin::INu(), REROOT_NeuKin::INuNoOsc(), REROOT_NeuKin::IResonance(), REROOT_NeuKin::ITg(), Msg::kDebug, PlaneView::kU, PlaneView::kV, UgliStripHandle::LocalToGlobal(), AtmosStdHEP::Mass, AtmosEvent::MCInfo, MSG, AtmosMC::MuEndDistToEdge, AtmosMC::MuEndPlane, AtmosMC::MuEndStrip, AtmosMC::MuEndU, AtmosMC::MuEndV, AtmosMC::MuEndX, AtmosMC::MuEndY, AtmosMC::MuEndZ, AtmosMC::MuPbeg, AtmosMC::MuPend, AtmosMC::MuVtxDistToEdge, AtmosMC::MuVtxPlane, AtmosMC::MuVtxStrip, AtmosMC::MuVtxU, AtmosMC::MuVtxV, AtmosMC::MuVtxX, AtmosMC::MuVtxY, AtmosMC::MuVtxZ, NeuKin, AtmosEvent::NScintHits, AtmosEvent::NStdHEPs, REROOT_NeuKin::P4El1(), REROOT_NeuKin::P4Mu1(), REROOT_NeuKin::P4Neu(), REROOT_NeuKin::P4Shw(), REROOT_NeuKin::P4Tgt(), AtmosStdHEP::Parent, AtmosScintHit::ParticleE, AtmosMC::PelX, AtmosMC::PelY, AtmosMC::PelZ, AtmosMC::PhadX, AtmosMC::PhadY, AtmosMC::PhadZ, AtmosScintHit::Plane, AtmosMC::PmuX, AtmosMC::PmuY, AtmosMC::PmuZ, AtmosMC::PnuX, AtmosMC::PnuY, AtmosMC::PnuZ, AtmosMC::PtargX, AtmosMC::PtargY, AtmosMC::PtargZ, AtmosStdHEP::PX, AtmosStdHEP::PY, AtmosStdHEP::PZ, AtmosMC::Q2, REROOT_NeuKin::Q2(), AtmosEvent::ScintHitList, REROOT_NeuKin::Sigma(), AtmosStdHEP::Status, AtmosEvent::StdHEPList, AtmosScintHit::Strip, AtmosScintHit::T, AtmosScintHit::TrkId, AtmosScintHit::U, AtmosScintHit::V, AtmosScintHit::View, AtmosStdHEP::VtxT, AtmosMC::VtxU, AtmosMC::VtxV, AtmosMC::VtxX, AtmosStdHEP::VtxX, AtmosMC::VtxY, AtmosStdHEP::VtxY, AtmosMC::VtxZ, AtmosMC::W2, REROOT_NeuKin::W2(), AtmosMC::x, AtmosScintHit::X, REROOT_NeuKin::X(), AtmosMC::Xsection, REROOT_NeuKin::Y(), AtmosMC::y, AtmosScintHit::Y, REROOT_NeuKin::Z(), AtmosMC::Z, and AtmosScintHit::Z.

Referenced by Ana().

00870 {
00871   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::FillMCInfo(...) *** " << endl;
00872 
00873   UgliGeomHandle ugh = (*(simrec->GetVldContext())); 
00874   const TObjArray arr(simrec->GetComponents());
00875   TIter iter(arr.MakeIterator());
00876   while(const TObject* tob = (const TObject*)(iter()))
00877     {
00878       MSG("NtpMaker",Msg::kDebug) << tob->GetName() << endl;
00879 
00880       // original code assumes one REROOT_NeuKin at the top level, 
00881       // provide for case where there is a TClonesArray NeuKinList
00882       // by picking off first element
00883       if(tob->GetName()==TString("NeuKinList")) {
00884         const TClonesArray* neukinlist = 
00885           dynamic_cast<const TClonesArray*>(tob);
00886         if ( neukinlist ) {
00887           size_t nneukin = neukinlist->GetLast()+1;
00888           MSG("NtpMaker",Msg::kDebug) << "NeuKinList has " 
00889                                       << nneukin << " elements" << endl;
00890           if ( nneukin > 0 ) {
00891             const REROOT_NeuKin* neukin = 
00892               dynamic_cast<const REROOT_NeuKin*>(neukinlist->At(0));
00893             if ( neukin ) {
00894               MSG("NtpMaker",Msg::kDebug) 
00895                 << tob->GetName() << " change to first element" << endl;
00896               tob = neukin;  // let next bit of code handle this
00897             }
00898           }
00899         }
00900       }
00901 
00902       if(tob->GetName()==TString("REROOT_NeuKin"))
00903         {
00904           const REROOT_NeuKin* NeuKin = dynamic_cast<const REROOT_NeuKin*>(tob);
00905           MSG("NtpMaker",Msg::kDebug) << " ... found REROOT_NeuKin " << endl;
00906           fEvent->MCInfo.IDnu = NeuKin->INu();
00907           fEvent->MCInfo.IDnunoosc = NeuKin->INuNoOsc();
00908           fEvent->MCInfo.IDact = NeuKin->IAction();
00909           fEvent->MCInfo.IDres = NeuKin->IResonance();
00910           fEvent->MCInfo.IDboson = NeuKin->IBoson();
00911           fEvent->MCInfo.IDtarget = NeuKin->ITg();
00912           fEvent->MCInfo.A = NeuKin->A();
00913           fEvent->MCInfo.Z = NeuKin->Z();
00914           fEvent->MCInfo.Xsection = NeuKin->Sigma();
00915           fEvent->MCInfo.EMfrac = NeuKin->EMFrac();
00916           fEvent->MCInfo.W2 = NeuKin->W2();
00917           fEvent->MCInfo.Q2 = NeuKin->Q2();
00918           fEvent->MCInfo.x = NeuKin->X();
00919           fEvent->MCInfo.y = NeuKin->Y();
00920           fEvent->MCInfo.PnuX = NeuKin->P4Neu()[0];
00921           fEvent->MCInfo.PnuY = NeuKin->P4Neu()[1];
00922           fEvent->MCInfo.PnuZ = NeuKin->P4Neu()[2];
00923           fEvent->MCInfo.Enu = NeuKin->P4Neu()[3];
00924           fEvent->MCInfo.PmuX = NeuKin->P4Mu1()[0];
00925           fEvent->MCInfo.PmuY = NeuKin->P4Mu1()[1];
00926           fEvent->MCInfo.PmuZ = NeuKin->P4Mu1()[2];
00927           fEvent->MCInfo.Emu = NeuKin->P4Mu1()[3];
00928           fEvent->MCInfo.PelX = NeuKin->P4El1()[0];
00929           fEvent->MCInfo.PelY = NeuKin->P4El1()[1];
00930           fEvent->MCInfo.PelZ = NeuKin->P4El1()[2];
00931           fEvent->MCInfo.Eel = NeuKin->P4El1()[3];
00932           fEvent->MCInfo.PhadX = NeuKin->P4Shw()[0];
00933           fEvent->MCInfo.PhadY = NeuKin->P4Shw()[1];
00934           fEvent->MCInfo.PhadZ = NeuKin->P4Shw()[2];
00935           fEvent->MCInfo.Ehad = NeuKin->P4Shw()[3];
00936           fEvent->MCInfo.PtargX = NeuKin->P4Tgt()[0];
00937           fEvent->MCInfo.PtargY = NeuKin->P4Tgt()[1];
00938           fEvent->MCInfo.PtargZ = NeuKin->P4Tgt()[2];
00939           fEvent->MCInfo.Etarg = NeuKin->P4Tgt()[3];
00940         }
00941 
00942       if(tob->GetName()==TString("StdHep"))
00943         {
00944           TClonesArray* ParticleList = (TClonesArray*)(tob);
00945           MSG("NtpMaker",Msg::kDebug) << " ... found StdHep " << endl;        
00946           TClonesArray& MyStdHEPList = *(fEvent->StdHEPList);
00947 
00948           TParticle* Particle = dynamic_cast<TParticle*>(ParticleList->At(0));
00949           fEvent->MCInfo.VtxU = 0.7071*(Particle->Vy()+Particle->Vx()); 
00950           fEvent->MCInfo.VtxV = 0.7071*(Particle->Vy()-Particle->Vx()); 
00951           fEvent->MCInfo.VtxX = Particle->Vx(); 
00952           fEvent->MCInfo.VtxY = Particle->Vy(); 
00953           fEvent->MCInfo.VtxZ = Particle->Vz();
00954           TIter ParticleItr(ParticleList->MakeIterator());
00955           while( const TParticle* StdHEP = dynamic_cast<const TParticle*>(ParticleItr()))
00956             {
00957               AtmosStdHEP* MyStdHEP = new( MyStdHEPList[(fEvent->NStdHEPs)++] ) AtmosStdHEP();
00958               MyStdHEP->Index     = fEvent->NStdHEPs - 1;
00959 
00960               MyStdHEP->Parent[0] = StdHEP->GetMother(0);
00961               MyStdHEP->Parent[1] = StdHEP->GetMother(1);
00962               MyStdHEP->Child[0]  = StdHEP->GetDaughter(0);
00963               MyStdHEP->Child[1]  = StdHEP->GetDaughter(1);
00964               MyStdHEP->Id        = StdHEP->GetPdgCode();
00965               MyStdHEP->Status    = StdHEP->GetStatusCode();
00966               MyStdHEP->Mass      = StdHEP->GetCalcMass();
00967               MyStdHEP->PX        = StdHEP->Px();
00968               MyStdHEP->PY        = StdHEP->Py();
00969               MyStdHEP->PZ        = StdHEP->Pz();
00970               MyStdHEP->E         = StdHEP->Energy();
00971               MyStdHEP->VtxX      = StdHEP->Vx();
00972               MyStdHEP->VtxY      = StdHEP->Vy();
00973               MyStdHEP->VtxX      = StdHEP->Vz();
00974               MyStdHEP->VtxT      = StdHEP->T();
00975             }
00976         }
00977 
00978       if(tob->GetName()==TString("DigiScintHits"))
00979         {
00980           TClonesArray* ScintHitList = (TClonesArray*)(tob); 
00981           MSG("NtpMaker",Msg::kDebug) << " ... found DigitScintHits " << endl;
00982           TClonesArray& MyScintHitList = *(fEvent->ScintHitList);
00983 
00984           Int_t plane,strip;
00985           Int_t idnu,ipdg,trkid;
00986           Double_t u,v,x,y,z,r;
00987           Double_t xm,xp,ym,yp,um,up,vm,vp;
00988           Double_t muvtxU,muvtxV;
00989           Double_t muvtxX,muvtxY,muvtxZ;
00990           Double_t muvtxR,muendR;
00991           Double_t muendU,muendV;
00992           Double_t muendX,muendY,muendZ;
00993           Int_t muvtxpln,muendpln;
00994           Int_t muvtxstrp,muendstrp;
00995           Double_t pmu,maxpmu,minpmu;
00996 
00997           muvtxU=0.0; muvtxV=0.0; 
00998           muvtxX=0.0; muvtxY=0.0; muvtxZ=0.0; 
00999           muendU=0.0; muendV=0.0; 
01000           muendX=0.0; muendY=0.0; muendZ=0.0; 
01001           muvtxR=999.9; muendR=999.9;
01002           muvtxpln=-999; muendpln=-999;
01003           muvtxstrp=-999; muendstrp=-999; 
01004           maxpmu=-999.9; minpmu=-999.9;
01005 
01006           PlexStripEndId seid;
01007           UgliStripHandle ush;
01008           TVector3 myglobal;
01009           TIter ScintHitItr(ScintHitList->MakeIterator());
01010           while( const DigiScintHit* ScintHit = dynamic_cast<const DigiScintHit*>(ScintHitItr()))
01011             {
01012               if( ScintHit->DE()<1.0E-4 && abs(ScintHit->ParticleId())!=13 ) continue; 
01013                  //this is to prevent huge numbers of scinthits being stored in the ntuple
01014 
01015               AtmosScintHit* MyScintHit = new( MyScintHitList[(fEvent->NScintHits)++] ) AtmosScintHit();
01016               MyScintHit->Id = ScintHit->ParticleId();
01017               MyScintHit->TrkId = ScintHit->TrackId();        
01018               MyScintHit->Plane = ScintHit->Plane();
01019               MyScintHit->Strip = ScintHit->Strip();
01020                 
01021               seid = ScintHit->StripEndId();
01022               MyScintHit->View = -1;
01023               if(seid.GetPlaneView()==PlaneView::kU) MyScintHit->View = 0;
01024               if(seid.GetPlaneView()==PlaneView::kV) MyScintHit->View = 1;
01025 
01026               ush = ugh.GetStripHandle(seid);
01027       
01028               TVector3 mylocal( ScintHit->X1(), ScintHit->Y1(), ScintHit->Z1() );
01029               myglobal = ush.LocalToGlobal(mylocal);
01030             //Note: doubles are all being converted to floats here
01031             // SHOULD PROBABLY DO CHECKS HERE TO PREVENT DOUBLES LARGER 
01032             // THAN FLT_MAX FROM SCREWING THINGS UP
01033               MyScintHit->U[0]  = float(0.7071*(myglobal.Y()+myglobal.X())); 
01034               MyScintHit->V[0]  = float(0.7071*(myglobal.Y()-myglobal.X()));
01035               MyScintHit->X[0]  = float(myglobal.X()); 
01036               MyScintHit->Y[0]  = float(myglobal.Y());
01037               MyScintHit->Z[0]  = float(myglobal.Z());
01038               MyScintHit->T[0]  = float(ScintHit->T1());
01039 
01040               mylocal.SetXYZ( ScintHit->X2(), ScintHit->Y2(), ScintHit->Z2() );
01041               myglobal = ush.LocalToGlobal(mylocal);
01042        
01043               MyScintHit->U[1]  = float(0.7071*(myglobal.Y()+myglobal.X())); 
01044               MyScintHit->V[1]  = float(0.7071*(myglobal.Y()-myglobal.X()));
01045               MyScintHit->X[1]  = float(myglobal.X()); 
01046               MyScintHit->Y[1]  = float(myglobal.Y());
01047               MyScintHit->Z[1]  = float(myglobal.Z());
01048               MyScintHit->T[1]  = float(ScintHit->T2());
01049 
01050               MyScintHit->DS = float(ScintHit->DS());
01051               MyScintHit->DE = float(ScintHit->DE());
01052               MyScintHit->ParticleE = float(ScintHit->ParticleEnergy());
01053 
01054               idnu = fEvent->MCInfo.IDnu;
01055               trkid = ScintHit->TrackId();
01056               ipdg = ScintHit->ParticleId();
01057 
01058               if( trkid>=0 
01059                && ( (idnu==0 && (ipdg==13 || ipdg==-13) ) 
01060                  || (idnu==14 && ipdg==13) || (idnu==-14 && ipdg==-13) ) )
01061                 {
01062                   plane = ScintHit->Plane();
01063                   strip = ScintHit->Strip();
01064                   x = myglobal.X(); y = myglobal.Y(); z = myglobal.Z();
01065                   u = 0.7071*(y + x); v = 0.7071*(y - x);  
01066                   pmu = ScintHit->ParticleEnergy();
01067 
01068                   r=999.9;
01069                   up=4.0-u; if(up<r) r=up;
01070                   um=4.0+u; if(um<r) r=um;
01071                   vp=4.0-v; if(vp<r) r=vp;
01072                   vm=4.0+v; if(vm<r) r=vm;
01073                   xp=4.0-x; if(xp<r) r=xp;
01074                   xm=4.0+x; if(xm<r) r=xm;
01075                   yp=4.0-y; if(yp<r) r=yp;
01076                   ym=4.0+y; if(ym<r) r=ym;
01077 
01078                   if( minpmu<0 || pmu<minpmu )
01079                     {
01080                       muendU=u; muendV=v;
01081                       muendX=x; muendY=y; muendZ=z; muendR=r;
01082                       muendstrp=strip; muendpln=plane; minpmu=pmu;
01083                     }
01084                   if( maxpmu<0 || pmu>maxpmu )
01085                     {
01086                       muvtxU=u; muvtxV=v;
01087                       muvtxX=x; muvtxY=y; muvtxZ=z; muvtxR=r;
01088                       muvtxstrp=strip; muvtxpln=plane; maxpmu=pmu;
01089                     }
01090                 }
01091             }
01092 
01093           fEvent->MCInfo.MuVtxU = muvtxU;              
01094           fEvent->MCInfo.MuVtxV = muvtxV;    
01095           fEvent->MCInfo.MuVtxX = muvtxX;              
01096           fEvent->MCInfo.MuVtxY = muvtxY;               
01097           fEvent->MCInfo.MuVtxZ = muvtxZ;               
01098           fEvent->MCInfo.MuVtxDistToEdge = muvtxR;               
01099           fEvent->MCInfo.MuVtxPlane = muvtxpln; 
01100           fEvent->MCInfo.MuVtxStrip = muvtxstrp; 
01101           fEvent->MCInfo.MuEndU = muendU;            
01102           fEvent->MCInfo.MuEndV = muendV;      
01103           fEvent->MCInfo.MuEndX = muendX;            
01104           fEvent->MCInfo.MuEndY = muendY;            
01105           fEvent->MCInfo.MuEndZ = muendZ;            
01106           fEvent->MCInfo.MuEndDistToEdge = muendR;            
01107           fEvent->MCInfo.MuEndPlane = muendpln;          
01108           fEvent->MCInfo.MuEndStrip = muendstrp;      
01109           fEvent->MCInfo.MuPbeg = maxpmu;               
01110           fEvent->MCInfo.MuPend = minpmu;               
01111 
01112         }
01113     }
01114 
01115   return;
01116 }

void NtpMaker::FillRawInfo ( RawRecord rawrec  )  [private]

Definition at line 1120 of file NtpMaker.cxx.

References FillSpillInfo(), RecMinos::GetVldContext(), Msg::kDebug, and MSG.

Referenced by Ana().

01121 {
01122   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::FillRawInfo(...) *** " << endl;
01123   
01124   const VldContext& vldc = *(rawrec->GetVldContext());
01125   this->FillSpillInfo(vldc);
01126 
01127   return;
01128 }

void NtpMaker::FillShieldInfo ( TObject *  tob  )  [private]

Definition at line 1132 of file NtpMaker.cxx.

References AtmosShieldPlank::ClearFibre, fEvent, CandHandle::GetDaughterIterator(), AtmosShieldPlank::GreenFibre, Msg::kDebug, StripEnd::kNegative, CalTimeType::kNone, CalDigitType::kNone, CalDigitType::kPE, StripEnd::kPositive, CalTimeType::kT0, MSG, AtmosShieldPlank::Ndigits, AtmosShieldPlank::Nerrors, AtmosEvent::NShieldPlanks, AtmosShieldPlank::Nstrips, AtmosShieldPlank::Plane, AtmosShieldPlank::Plank, AtmosShieldPlank::Qadc, AtmosShieldPlank::QPE, AtmosShieldPlank::Section, AtmosEvent::ShieldPlankList, AtmosShieldPlank::SubSection, AtmosShieldPlank::Tcal, AtmosShieldPlank::Traw, AtmosShieldPlank::WlsPigtail, AtmosShieldPlank::X, AtmosShieldPlank::Y, and AtmosShieldPlank::Z.

Referenced by FillCandInfo().

01133 {
01134   FarDetShieldPlankListHandle* ShldList = (FarDetShieldPlankListHandle*)(tob);
01135   MSG("NtpMaker",Msg::kDebug) << " ... found FarDetShieldPlankListHandle " << endl;
01136   TClonesArray& MyShldList = *(fEvent->ShieldPlankList);
01137 
01138   TIter ShldItr(ShldList->GetDaughterIterator());
01139   while(FarDetShieldPlankHandle* Shld = (FarDetShieldPlankHandle*)(ShldItr()))
01140     {
01141       AtmosShieldPlank* MyShld = new( MyShldList[(fEvent->NShieldPlanks)++] ) AtmosShieldPlank();
01142 
01143       MyShld->Section = Shld->GetSection();       
01144       MyShld->SubSection = Shld->GetSubSection();
01145       MyShld->Plane = Shld->GetPlane();
01146       MyShld->Plank = Shld->GetPlank();
01147       MyShld->Nstrips = Shld->GetNStrips();
01148       MyShld->Nerrors = Shld->GetGeomErrors();
01149       MyShld->Ndigits = Shld->GetNDaughters();    
01150       MyShld->X = Shld->GetX();
01151       MyShld->Y = Shld->GetY();  
01152       MyShld->Z[0] = Shld->GetZ(StripEnd::kNegative);
01153       MyShld->Z[1] = Shld->GetZ(StripEnd::kPositive);
01154       MyShld->Traw[0] = Shld->GetTime(StripEnd::kNegative,CalTimeType::kNone);
01155       MyShld->Traw[1] = Shld->GetTime(StripEnd::kPositive,CalTimeType::kNone);
01156       MyShld->Tcal[0] = Shld->GetTime(StripEnd::kNegative,CalTimeType::kT0);
01157       MyShld->Tcal[1] = Shld->GetTime(StripEnd::kPositive,CalTimeType::kT0);
01158       MyShld->Qadc[0] = Shld->GetCharge(StripEnd::kNegative,CalDigitType::kNone);
01159       MyShld->Qadc[1] = Shld->GetCharge(StripEnd::kPositive,CalDigitType::kNone);
01160       MyShld->QPE[0] = Shld->GetCharge(StripEnd::kNegative,CalDigitType::kPE);
01161       MyShld->QPE[1] = Shld->GetCharge(StripEnd::kPositive,CalDigitType::kPE);
01162       //Do we add info for sigmap and mips?
01163       MyShld->GreenFibre[0] = Shld->GetGreenFibre(StripEnd::kNegative);
01164       MyShld->GreenFibre[1] = Shld->GetGreenFibre(StripEnd::kPositive);
01165       MyShld->WlsPigtail[0] = Shld->GetWlsPigtail(StripEnd::kNegative);
01166       MyShld->WlsPigtail[1] = Shld->GetWlsPigtail(StripEnd::kPositive);
01167       MyShld->ClearFibre[0] = Shld->GetClearFibre(StripEnd::kNegative);
01168       MyShld->ClearFibre[1] = Shld->GetClearFibre(StripEnd::kPositive);
01169 
01170     }
01171   return;
01172 }

void NtpMaker::FillShowerInfo ( TObject *  tob  )  [private]

Definition at line 1176 of file NtpMaker.cxx.

References AtmosShower::Energy, fEvent, Calibrator::GetAttenCorrected(), CandHandle::GetDaughterIterator(), Calibrator::GetMIP(), CandHandle::GetNDaughters(), AtmosStrip::GreenFibre, AtmosStrip::HalfLength, AtmosShower::Index, Calibrator::Instance(), Msg::kDebug, Detector::kFar, StripEnd::kNegative, StripEnd::kPositive, PlaneCoverage::kTotal, PlaneView::kU, PlaneView::kV, Msg::kVerbose, StripEnd::kWhole, AtmosStrip::L, AtmosStrip::MIP, MSG, AtmosShower::Nplanes, AtmosEvent::NShowers, AtmosEvent::NStrips, AtmosShower::Nstrips, AtmosStrip::Plane, AtmosEvent::ShowerList, AtmosStrip::Shw, AtmosStrip::Sigcorr, AtmosStrip::Sigmap, AtmosStrip::Strip, AtmosEvent::StripList, AtmosShower::TimeOffset, AtmosShower::TimeSlope, AtmosStrip::Trk, AtmosStrip::View, AtmosShower::VtxDirCosU, AtmosShower::VtxDirCosV, AtmosShower::VtxDirCosX, AtmosShower::VtxDirCosY, AtmosShower::VtxDirCosZ, AtmosShower::VtxPlane, AtmosShower::VtxR, AtmosShower::VtxTime, AtmosShower::VtxU, AtmosShower::VtxV, AtmosShower::VtxX, AtmosShower::VtxY, and AtmosShower::VtxZ.

Referenced by FillCandInfo().

01177 {
01178   CandShowerListHandle* ShwList = (CandShowerListHandle*)(tob);
01179   MSG("NtpMaker",Msg::kDebug) << " ... found CandShowerListHandle containing "<<ShwList->GetNDaughters()<<" showers."<< endl;
01180   float nstripcalib(0.0), nshwstrips(0.0);
01181   Calibrator& cal = Calibrator::Instance();
01182   TClonesArray* MyStrpList = (TClonesArray*)(fEvent->StripList);
01183 
01184   // Set information from CandShowerHandle
01185   TClonesArray& MyShwList = *(fEvent->ShowerList);
01186   TIter ShwItr(ShwList->GetDaughterIterator());
01187   while(CandShowerHandle* Shw = (CandShowerHandle*)(ShwItr()))
01188     {
01189       AtmosShower* MyShw = new( MyShwList[(fEvent->NShowers)++] ) AtmosShower();
01190         
01191       MyShw->VtxPlane = Shw->GetVtxPlane();
01192       MyShw->VtxTime = Shw->GetVtxT();
01193       MyShw->VtxU = Shw->GetVtxU();
01194       MyShw->VtxV = Shw->GetVtxV();
01195       MyShw->VtxR = sqrt((MyShw->VtxU*MyShw->VtxU)+(MyShw->VtxV*MyShw->VtxV));
01196       MyShw->VtxX = 0.7071*(Shw->GetVtxU()-Shw->GetVtxV());
01197       MyShw->VtxY = 0.7071*(Shw->GetVtxU()+Shw->GetVtxV());
01198       MyShw->VtxZ = Shw->GetVtxZ();
01199 
01200       MyShw->VtxDirCosU = Shw->GetDirCosU();
01201       MyShw->VtxDirCosV = Shw->GetDirCosV();
01202       MyShw->VtxDirCosX = 0.7071*(Shw->GetDirCosU()-Shw->GetDirCosV());
01203       MyShw->VtxDirCosY = 0.7071*(Shw->GetDirCosU()+Shw->GetDirCosV());
01204       MyShw->VtxDirCosZ = Shw->GetDirCosZ();   
01205       MyShw->TimeSlope = Shw->GetTimeSlope();
01206       MyShw->TimeOffset = Shw->GetTimeOffset(); 
01207       MyShw->Energy = Shw->GetEnergy();
01208       
01209       MyShw->Nstrips = Shw->GetNStrip(); //AtNu Shw->GetNStrips();
01210       MyShw->Nplanes = Shw->GetNPlane(); //AtNu Shw->GetNPlanes();
01211 
01212       if( fEvent->NShowers<32 ){
01213         MyShw->Index = (int)pow(2.,fEvent->NShowers-1);
01214       }
01215       else{
01216         MyShw->Index = 0;
01217       }
01218 
01219       // Set information for strips that are part of this shower      
01220       nshwstrips=Shw->GetNDaughters(); nstripcalib=0.0;
01221       TIter StrpItr(Shw->GetDaughterIterator());
01222       PlexStripEndId* seidP = 0;
01223       PlexStripEndId* seidN = 0;
01224       while(CandStripHandle* ShwStrp = (CandStripHandle*)(StrpItr()))
01225         {
01226           for(Int_t myint=0;myint<fEvent->NStrips;myint++)
01227             {
01228               AtmosStrip& MyStrp = *((AtmosStrip*)(MyStrpList->At(myint)));
01229               if( ShwStrp->GetPlane()==MyStrp.Plane && ShwStrp->GetStrip()==MyStrp.Strip )
01230                 {
01231                   if( MyStrp.Trk==0 && MyStrp.Shw==0 && Shw->GetU(MyStrp.Plane)>-999.9 && Shw->GetV(MyStrp.Plane)>-999.9 )
01232                     {
01233                       
01234                       if( MyStrp.View==0 )
01235                         {
01236                           MyStrp.L = Shw->GetV(MyStrp.Plane);
01237                           MyStrp.GreenFibre[0] = MyStrp.HalfLength - MyStrp.L;
01238                           MyStrp.GreenFibre[1] = MyStrp.HalfLength + MyStrp.L;
01239                           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01240                           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01241                         }
01242                       if( MyStrp.View==1 )
01243                         {
01244                           MyStrp.L = Shw->GetU(MyStrp.Plane);
01245                           MyStrp.GreenFibre[0] = MyStrp.HalfLength + MyStrp.L;
01246                           MyStrp.GreenFibre[1] = MyStrp.HalfLength - MyStrp.L;
01247                           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01248                           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01249                         }
01250                       double lsign = pow(-1.0, (1.0+double(MyStrp.View)) );
01251                       if(seidN && MyStrp.Sigcorr[0]>0.0)
01252                         {
01253                           MyStrp.Sigmap[0] = cal.GetAttenCorrected(MyStrp.Sigcorr[0], lsign*MyStrp.L, *(seidN) );
01254                           MyStrp.MIP[0] = cal.GetMIP(MyStrp.Sigmap[0], *(seidN) );
01255                         }
01256                       if(seidP && MyStrp.Sigcorr[1]>0.0)
01257                         {
01258                           MyStrp.Sigmap[1] = cal.GetAttenCorrected(MyStrp.Sigcorr[1], lsign*MyStrp.L, *(seidP) );
01259                           MyStrp.MIP[1] = cal.GetMIP(MyStrp.Sigmap[1], *(seidP) );
01260                         }
01261                     }
01262                   if(MyStrp.Sigcorr[0]>0.0 || MyStrp.Sigcorr[1]>0.0) nstripcalib+=1.0;
01263                   MyStrp.Shw += MyShw->Index;
01264                 }
01265 
01266               if(seidP) delete seidP; seidP = 0;
01267               if(seidN) delete seidN; seidN = 0;
01268             }
01269         }
01270       MSG("NtpMaker",Msg::kVerbose) <<"   "<<(int)nshwstrips<<" strips in the shower of which "<<(int)nstripcalib<<" were calibrated."<<endl<<flush;
01271     }
01272   return;
01273 }

void NtpMaker::FillSliceInfo ( TObject *  tob  )  [private]

Definition at line 1277 of file NtpMaker.cxx.

References AtmosFilter::Edges, AtmosFilter::EdgesSM1, AtmosFilter::EdgesSM2, AtmosFilter::EventId, AtmosFilter::EventIdSM1, AtmosFilter::EventIdSM2, AtmosFilter::EventIdX, fEvent, AtmosFilter::FidCharge, AtmosFilter::FidChargeSM1, AtmosFilter::FidChargeSM2, AtmosEvent::FilterInfo, CandHandle::GetDaughterIterator(), FarDetSliceHandle::GetEdges(), FarDetSliceHandle::GetEdgesSM1(), FarDetSliceHandle::GetEdgesSM2(), FarDetSliceHandle::GetEventId(), FarDetSliceHandle::GetEventIdSM1(), FarDetSliceHandle::GetEventIdSM2(), FarDetSliceHandle::GetEventIdX(), FarDetSliceHandle::GetFidCharge(), FarDetSliceHandle::GetFidChargeSM1(), FarDetSliceHandle::GetFidChargeSM2(), FarDetSliceHandle::GetGoodPlanes(), FarDetSliceHandle::GetGoodStrips(), FarDetSliceHandle::GetGoodUPlanes(), FarDetSliceHandle::GetGoodVPlanes(), FarDetSliceHandle::GetMaxPlaneCharge(), FarDetSliceHandle::GetMeanXPosSM1(), FarDetSliceHandle::GetMeanXPosSM2(), FarDetSliceHandle::GetMeanYPosSM1(), FarDetSliceHandle::GetMeanYPosSM2(), FarDetSliceHandle::GetMeanZPosSM1(), FarDetSliceHandle::GetMeanZPosSM2(), FarDetSliceHandle::GetTotalCharge(), AtmosFilter::GoodPlanes, AtmosFilter::GoodStrips, AtmosFilter::GoodUPlanes, AtmosFilter::GoodVPlanes, Msg::kDebug, AtmosFilter::MaxPlaneCharge, AtmosFilter::MeanXPosSM1, AtmosFilter::MeanXPosSM2, AtmosFilter::MeanYPosSM1, AtmosFilter::MeanYPosSM2, AtmosFilter::MeanZPosSM1, AtmosFilter::MeanZPosSM2, MSG, and AtmosFilter::TotalCharge.

Referenced by FillCandInfo().

01278 {
01279   FarDetSliceListHandle* SliceList = (FarDetSliceListHandle*)(tob);
01280   MSG("NtpMaker",Msg::kDebug) << " ... found FarDetSliceListHandle " << endl;
01281 
01282   TIter SliceItr = SliceList->GetDaughterIterator();
01283   FarDetSliceHandle* Slice = dynamic_cast<FarDetSliceHandle*>(SliceItr()); 
01284   if( Slice )
01285     {
01286       fEvent->FilterInfo.EventId = Slice->GetEventId();
01287       fEvent->FilterInfo.EventIdSM1 = Slice->GetEventIdSM1();
01288       fEvent->FilterInfo.EventIdSM2 = Slice->GetEventIdSM2();
01289       fEvent->FilterInfo.EventIdX = Slice->GetEventIdX();
01290       fEvent->FilterInfo.Edges=Slice->GetEdges();
01291       fEvent->FilterInfo.EdgesSM1=Slice->GetEdgesSM1();
01292       fEvent->FilterInfo.EdgesSM2=Slice->GetEdgesSM2();
01293       fEvent->FilterInfo.GoodUPlanes = Slice->GetGoodUPlanes();
01294       fEvent->FilterInfo.GoodVPlanes = Slice->GetGoodVPlanes();
01295       fEvent->FilterInfo.GoodPlanes = Slice->GetGoodPlanes();
01296       fEvent->FilterInfo.GoodStrips = Slice->GetGoodStrips();
01297       fEvent->FilterInfo.FidCharge = Slice->GetFidCharge();
01298       fEvent->FilterInfo.TotalCharge = Slice->GetTotalCharge();
01299       fEvent->FilterInfo.MaxPlaneCharge = Slice->GetMaxPlaneCharge();
01300 
01301       for(Int_t myint=0; myint<11; myint++)
01302         {
01303           fEvent->FilterInfo.FidChargeSM1[myint] = Slice->GetFidChargeSM1(myint);
01304           fEvent->FilterInfo.FidChargeSM2[myint] = Slice->GetFidChargeSM2(myint);
01305           fEvent->FilterInfo.MeanXPosSM1[myint] = Slice->GetMeanXPosSM1(myint);
01306           fEvent->FilterInfo.MeanXPosSM2[myint] = Slice->GetMeanXPosSM2(myint);
01307           fEvent->FilterInfo.MeanYPosSM1[myint] = Slice->GetMeanYPosSM1(myint);
01308           fEvent->FilterInfo.MeanYPosSM2[myint] = Slice->GetMeanYPosSM2(myint);
01309           fEvent->FilterInfo.MeanZPosSM1[myint] = Slice->GetMeanZPosSM1(myint);
01310           fEvent->FilterInfo.MeanZPosSM2[myint] = Slice->GetMeanZPosSM2(myint);
01311         }
01312     } 
01313   return;
01314 }

void NtpMaker::FillSpillInfo ( const VldContext vldc  )  [private]

Definition at line 1318 of file NtpMaker.cxx.

References AtmosSpill::beam_type, AtmosSpill::BeamSelectSpill, BeamMonSpill::BeamType(), AtmosSpill::bmsDataAvailable, AtmosSpill::bmsStatus, AtmosSpill::bpmint, AtmosSpill::bposx, AtmosSpill::bposy, AtmosSpill::bwidx, AtmosSpill::bwidy, SpillTimeFinder::DataIsAvailable(), MuELoss::e, BeamMonSpill::fBpmInt, fEvent, BeamMonSpill::fHadInt, BeamMonSpill::fHornCur, BeamMonSpill::fMuInt1, BeamMonSpill::fMuInt2, BeamMonSpill::fMuInt3, BeamMonSpill::fProfWidX, BeamMonSpill::fProfWidY, BeamMonSpill::fTargBpmX, BeamMonSpill::fTargBpmY, BeamMonSpill::fTor101, BeamMonSpill::fTortgt, BeamMonSpill::fTr101d, BeamMonSpill::fTrtgtd, JobCModule::Get(), VldTimeStamp::GetNanoSec(), SpillTimeFinder::GetNearestSpill(), VldTimeStamp::GetSec(), VldTimeStamp::GetSeconds(), VldContext::GetSimFlag(), BeamMonSpill::GetStatusBits(), BeamMonSpill::GetStatusInt(), SpillTimeND::GetTimeStamp(), SpillTimeFinder::GetTimeToNearestSpill(), AtmosSpill::hadint, BeamMonSpill::StatusBits::horn_on, AtmosSpill::horn_on, AtmosSpill::horncur, SpillTimeFinder::Instance(), SimFlag::kData, Msg::kDebug, MSG, AtmosSpill::muint1, AtmosSpill::muint2, AtmosSpill::muint3, BeamMonSpill::StatusBits::n_batches, AtmosSpill::n_batches, BMSpillAna::SelectSpill(), BMSpillAna::SetSpill(), BMSpillAna::SetTimeDiff(), AtmosEvent::SpillInfo, BeamMonSpill::SpillTime(), AtmosSpill::stfDataAvailable, BeamMonSpill::StatusBits::target_in, AtmosSpill::target_in, AtmosSpill::TimeToNearestSpill_bms, AtmosSpill::TimeToNearestSpill_stf, AtmosSpill::tor101, AtmosSpill::tortgt, AtmosSpill::tr101d, AtmosSpill::trtgtd, and BMSpillAna::UseDatabaseCuts().

Referenced by FillRawInfo().

01319 {
01320   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::FillSpillInfo(...) *** " << endl;
01321   double dt1(0.0),dt2(0.0),dt(0.0); 
01322 
01323   // only apply to data
01324   if(vldc.GetSimFlag()==SimFlag::kData)
01325     {
01326       
01327       SpillTimeFinder &stf = SpillTimeFinder::Instance();
01328       fEvent->SpillInfo.stfDataAvailable = stf.DataIsAvailable(vldc);
01329       fEvent->SpillInfo.TimeToNearestSpill_stf = stf.GetTimeToNearestSpill(vldc);
01330 
01331       const SpillTimeND& ndspill = stf.GetNearestSpill(vldc);
01332      
01333       // use timestamp of nearest spill to search for BeamMon record
01334       VldTimeStamp ts = ndspill.GetTimeStamp();
01335       const BeamMonSpill* bmspill = BDSpillAccessor::Get().LoadSpill(ts);
01336 
01337       // fill members with info from the BeamMonSpill
01338       if( bmspill )
01339         {    
01340           VldTimeStamp ndspilltime = ndspill.GetTimeStamp();
01341           VldTimeStamp bmspilltime = bmspill->SpillTime();
01342           dt1 = bmspilltime.GetSec() - ndspilltime.GetSec();
01343           dt2 = ( bmspilltime.GetNanoSec() - ndspilltime.GetNanoSec() )*1e-9;
01344           dt = dt1 + dt2;
01345 
01346           fEvent->SpillInfo.bmsDataAvailable = false;
01347           fEvent->SpillInfo.TimeToNearestSpill_bms = fEvent->SpillInfo.TimeToNearestSpill_stf + dt;
01348 
01349           if( abs(fEvent->SpillInfo.TimeToNearestSpill_stf)<86400.0 )
01350             {
01351               fEvent->SpillInfo.bmsDataAvailable = true;
01352 
01353               // Beam Status Info
01354               fEvent->SpillInfo.beam_type = bmspill->BeamType();
01355               fEvent->SpillInfo.bmsStatus = bmspill->GetStatusInt();
01356 
01357               BeamMonSpill::StatusBits status_bits = bmspill->GetStatusBits();
01358               fEvent->SpillInfo.horn_on = status_bits.horn_on;
01359               fEvent->SpillInfo.target_in = status_bits.target_in;
01360               fEvent->SpillInfo.n_batches = status_bits.n_batches;
01361 
01362               //Beam Monitoring Info
01363               fEvent->SpillInfo.tor101 = bmspill->fTor101;           
01364               fEvent->SpillInfo.tr101d = bmspill->fTr101d;           
01365               fEvent->SpillInfo.tortgt = bmspill->fTortgt;           
01366               fEvent->SpillInfo.trtgtd = bmspill->fTrtgtd;
01367               fEvent->SpillInfo.horncur = bmspill->fHornCur;     
01368               for (Int_t i=0;i<6;++i)
01369                 {
01370                   fEvent->SpillInfo.bposx[i]=bmspill->fTargBpmX[i];
01371                   fEvent->SpillInfo.bposy[i]=bmspill->fTargBpmY[i];
01372                   fEvent->SpillInfo.bpmint[i]=bmspill->fBpmInt[i];
01373                 }
01374               fEvent->SpillInfo.bwidx = bmspill->fProfWidX;  
01375               fEvent->SpillInfo.bwidy = bmspill->fProfWidY;  
01376               fEvent->SpillInfo.hadint = bmspill->fHadInt; 
01377               fEvent->SpillInfo.muint1 = bmspill->fMuInt1;  
01378               fEvent->SpillInfo.muint2 = bmspill->fMuInt2;  
01379               fEvent->SpillInfo.muint3 = bmspill->fMuInt3; 
01380 
01381               VldTimeStamp BMsubtime = bmspilltime-ndspill.GetTimeStamp();
01382               BMSpillAna BMana;
01383               BMana.UseDatabaseCuts();
01384               BMana.SetSpill(*bmspill);
01385               BMana.SetTimeDiff(BMsubtime.GetSeconds());
01386               fEvent->SpillInfo.BeamSelectSpill = BMana.SelectSpill(); 
01387             }
01388         }
01389       else
01390         { 
01391           MSG("NtpMaker",Msg::kDebug)<< "No BeamMonSpill found!" <<endl;
01392         }
01393   
01394     }
01395 
01396   return;
01397 }

void NtpMaker::FillStripInfo ( TObject *  tob  )  [private]

Definition at line 1401 of file NtpMaker.cxx.

References AtmosStrip::ClearFibre, fEvent, fStrpList, Calibrator::GetAttenCorrected(), CandHandle::GetDaughterIterator(), Calibrator::GetMIP(), AtmosStrip::GreenFibre, AtmosStrip::HalfLength, Calibrator::Instance(), Msg::kDebug, Detector::kFar, StripEnd::kNegative, CalTimeType::kNone, CalDigitType::kNone, CalDigitType::kPE, StripEnd::kPositive, CalDigitType::kSigCorr, CalTimeType::kT0, PlaneCoverage::kTotal, PlaneView::kU, PlaneView::kV, Msg::kVerbose, StripEnd::kWhole, AtmosStrip::L, AtmosStrip::MIP, MSG, AtmosStrip::Ndigits, AtmosEvent::NStrips, AtmosStrip::Plane, AtmosStrip::Qadc, AtmosStrip::QPE, AtmosStrip::QPEcorr, AtmosStrip::Sigcorr, AtmosStrip::Sigmap, AtmosStrip::Strip, AtmosEvent::StripList, AtmosStrip::T, AtmosStrip::Tcal, AtmosStrip::Traw, AtmosStrip::View, AtmosStrip::WlsPigtail, AtmosStrip::Xtalk, and AtmosStrip::Z.

Referenced by FillCandInfo().

01402 {
01403   FarDetStripListHandle* StrpList = (FarDetStripListHandle*)(tob);
01404   MSG("NtpMaker",Msg::kDebug) << " ... found FarDetStripListHandle " << endl;
01405   TClonesArray& MyStrpList = *(fEvent->StripList);
01406   Calibrator& cal = Calibrator::Instance();
01407   float nstripcalib(0.0);
01408   Int_t pln;
01409   Double_t totq,totqo,opos;
01410 
01411   TIter StrpItr(StrpList->GetDaughterIterator());        
01412   while(FarDetStripHandle* Strp = dynamic_cast<FarDetStripHandle*>(StrpItr()))
01413     {
01414       AtmosStrip* MyStrp = new( MyStrpList[ (fEvent->NStrips)++] ) AtmosStrip();
01415 
01416       MyStrp->Plane = Strp->GetPlane();
01417       MyStrp->Strip = Strp->GetStrip();
01418       if(Strp->GetPlaneView()==PlaneView::kU) MyStrp->View = 0;
01419       if(Strp->GetPlaneView()==PlaneView::kV) MyStrp->View = 1;
01420       MyStrp->L = 0.0;
01421       MyStrp->T = Strp->GetTPos();
01422       MyStrp->Z = Strp->GetZPos();
01423       MyStrp->Ndigits = Strp->GetNDaughters();
01424       MyStrp->Traw[0] = Strp->GetTime(StripEnd::kNegative,CalTimeType::kNone);
01425       MyStrp->Traw[1] = Strp->GetTime(StripEnd::kPositive,CalTimeType::kNone);
01426       MyStrp->Tcal[0] = Strp->GetTime(StripEnd::kNegative,CalTimeType::kT0);
01427       MyStrp->Tcal[1] = Strp->GetTime(StripEnd::kPositive,CalTimeType::kT0);
01428       MyStrp->Qadc[0] = Strp->GetCharge(StripEnd::kNegative,CalDigitType::kNone);
01429       MyStrp->Qadc[1] = Strp->GetCharge(StripEnd::kPositive,CalDigitType::kNone);
01430       MyStrp->QPE[0] = Strp->GetCharge(StripEnd::kNegative,CalDigitType::kPE);
01431       MyStrp->QPE[1] = Strp->GetCharge(StripEnd::kPositive,CalDigitType::kPE);
01432       MyStrp->Sigcorr[0] = Strp->GetCharge(StripEnd::kNegative,CalDigitType::kSigCorr);
01433       MyStrp->Sigcorr[1] = Strp->GetCharge(StripEnd::kPositive,CalDigitType::kSigCorr);
01434       MyStrp->QPEcorr[0] = MyStrp->Sigcorr[0]/65.0; // PEcorr=Sigcorr/<Gain>
01435       MyStrp->QPEcorr[1] = MyStrp->Sigcorr[1]/65.0; // hack the conversion
01436       MyStrp->GreenFibre[0] = Strp->GetGreenFibre(StripEnd::kNegative);
01437       MyStrp->GreenFibre[1] = Strp->GetGreenFibre(StripEnd::kPositive);     
01438       MyStrp->WlsPigtail[0] = Strp->GetWlsPigtail(StripEnd::kNegative);
01439       MyStrp->WlsPigtail[1] = Strp->GetWlsPigtail(StripEnd::kPositive);
01440       MyStrp->ClearFibre[0] = Strp->GetClearFibre(StripEnd::kNegative);
01441       MyStrp->ClearFibre[1] = Strp->GetClearFibre(StripEnd::kPositive);
01442       MyStrp->HalfLength = Strp->GetHalfLength();
01443       MyStrp->Xtalk = Strp->IsXtalk(StripEnd::kWhole);
01444       
01445       if( MyStrp->Plane>0 && MyStrp->Plane<500 && MyStrp->Xtalk==0 && MyStrp->QPE[0]+MyStrp->QPE[1]>2.0 )
01446         {
01447           fStrpList[MyStrp->Plane].push_back(*MyStrp);
01448         }
01449     }
01450   vector<AtmosStrip>::iterator PlaneStrpIter;
01451   vector<AtmosStrip>::iterator PlaneListEnd;
01452   PlexStripEndId* seidP = 0;
01453   PlexStripEndId* seidN = 0;
01454   for(Int_t myint=0;myint<fEvent->NStrips;myint++)
01455     {
01456       AtmosStrip& MyStrp = *((AtmosStrip*)(MyStrpList.At(myint)));
01457       pln = MyStrp.Plane;
01458 
01459       totqo=0.0; totq=0.0; opos=0.0;
01460       if( (pln>1 && pln<249) || (pln>250 && pln<498) )
01461         {
01462           PlaneStrpIter = fStrpList[pln-1].begin();
01463           PlaneListEnd = fStrpList[pln-1].end();
01464           while(PlaneStrpIter!=PlaneListEnd)
01465             {
01466               AtmosStrip& mystrip = *(PlaneStrpIter);  
01467               totqo+=(mystrip.QPE[0]+mystrip.QPE[1])*(mystrip.T);
01468               totq+=(mystrip.QPE[0]+mystrip.QPE[1]);
01469               ++PlaneStrpIter;
01470             } 
01471         }        
01472       if( (pln>0 && pln<248) || (pln>249 && pln<497) )
01473         {
01474           PlaneStrpIter = fStrpList[pln+1].begin();
01475           PlaneListEnd = fStrpList[pln+1].end();
01476           while(PlaneStrpIter!=PlaneListEnd)
01477             {
01478               AtmosStrip& mystrip = *(PlaneStrpIter);  
01479               totqo+=(mystrip.QPE[0]+mystrip.QPE[1])*(mystrip.T);
01480               totq+=(mystrip.QPE[0]+mystrip.QPE[1]);
01481               ++PlaneStrpIter;
01482             }
01483         }
01484       if(totq>0.0){ opos=totqo/totq; } else{ opos=0.0; }
01485 
01486       MyStrp.L = opos;
01487       if( MyStrp.View==0 )
01488         {           
01489           MyStrp.GreenFibre[0] = MyStrp.HalfLength - MyStrp.L;
01490           MyStrp.GreenFibre[1] = MyStrp.HalfLength + MyStrp.L;
01491           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01492           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01493         }
01494       if( MyStrp.View==1 )
01495         {
01496           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01497           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01498           MyStrp.GreenFibre[0] = MyStrp.HalfLength + MyStrp.L;
01499           MyStrp.GreenFibre[1] = MyStrp.HalfLength - MyStrp.L;
01500         }
01501       
01502       double lsign = pow(-1.0, (1.0+double(MyStrp.View)) );
01503       if(seidN && MyStrp.Sigcorr[0]>0.0)
01504         {
01505           MyStrp.Sigmap[0] = cal.GetAttenCorrected(MyStrp.Sigcorr[0], lsign*opos, *(seidN) );
01506           MyStrp.MIP[0] = cal.GetMIP(MyStrp.Sigmap[0], *(seidN) );
01507         }
01508       if(seidP && MyStrp.Sigcorr[1]>0.0)
01509         {
01510           MyStrp.Sigmap[1] = cal.GetAttenCorrected(MyStrp.Sigcorr[1], lsign*opos, *(seidP) );
01511           MyStrp.MIP[1] = cal.GetMIP(MyStrp.Sigmap[1], *(seidP) );
01512         }
01513       if(MyStrp.Sigcorr[0]>0.0 || MyStrp.Sigcorr[1]>0.0) nstripcalib+=1.0;
01514 
01515       if(seidP) delete seidP; seidP = 0;
01516       if(seidN) delete seidN; seidN = 0;
01517     }
01518   MSG("NtpMaker",Msg::kVerbose) <<"   "<<(int)(fEvent->NStrips)<<" strips in the event of which "<<(int)nstripcalib<< " were calibrated."<<endl<<flush;
01519 
01520   for(Int_t myi=0;myi<500;myi++)
01521     {
01522       fStrpList[myi].clear();        
01523     }
01524   return;
01525 }

void NtpMaker::FillTrackInfo ( TObject *  tob  )  [private]

Definition at line 1529 of file NtpMaker.cxx.

References AtmosTrack::AtNuNplanes, AtmosStrip::dS, AtmosTrack::EndDirCosU, AtmosTrack::EndDirCosV, AtmosTrack::EndDirCosX, AtmosTrack::EndDirCosY, AtmosTrack::EndDirCosZ, AtmosTrack::EndDirTimeFitNdf, AtmosTrack::EndDirTimeFitRMS, AtmosTrack::EndPlane, AtmosTrack::EndR, AtmosTrack::EndTime, AtmosTrack::EndTrace, AtmosTrack::EndTraceZ, AtmosTrack::EndU, AtmosTrack::EndV, AtmosTrack::EndX, AtmosTrack::EndY, AtmosTrack::EndZ, fEvent, Calibrator::GetAttenCorrected(), CandHandle::GetDaughterIterator(), Calibrator::GetMIP(), CandHandle::GetNDaughters(), AtmosStrip::GreenFibre, AtmosStrip::HalfLength, AtmosTrack::Index, Calibrator::Instance(), Msg::kDebug, Detector::kFar, StripEnd::kNegative, StripEnd::kPositive, PlaneCoverage::kTotal, PlaneView::kU, PlaneView::kV, Msg::kVerbose, StripEnd::kWhole, AtmosStrip::L, AtmosStrip::MIP, AtmosTrack::Momentum, AtmosTrack::MomentumRange, MSG, AtmosTrack::Nplanes, AtmosEvent::NStrips, AtmosTrack::Nstrips, AtmosEvent::NTracks, AtmosStrip::Plane, AtmosTrack::RangeGCM2, AtmosTrack::RangeMetres, AtmosStrip::Sigcorr, AtmosStrip::Sigmap, AtmosStrip::Strip, AtmosEvent::StripList, AtmosTrack::TimeOffset, AtmosTrack::TimeSlope, AtmosTrack::TimingFitChi2, AtmosTrack::TimingFitNdf, AtmosEvent::TrackList, AtmosStrip::Trk, AtmosStrip::View, AtmosTrack::VtxDirCosU, AtmosTrack::VtxDirCosV, AtmosTrack::VtxDirCosX, AtmosTrack::VtxDirCosY, AtmosTrack::VtxDirCosZ, AtmosTrack::VtxDirTimeFitNdf, AtmosTrack::VtxDirTimeFitRMS, AtmosTrack::VtxPlane, AtmosTrack::VtxR, AtmosTrack::VtxTime, AtmosTrack::VtxTrace, AtmosTrack::VtxTraceZ, AtmosTrack::VtxU, AtmosTrack::VtxV, AtmosTrack::VtxX, AtmosTrack::VtxY, and AtmosTrack::VtxZ.

Referenced by FillCandInfo().

01530 {
01531   CandTrackListHandle* TrkList = (CandTrackListHandle*)(tob);
01532   MSG("NtpMaker",Msg::kDebug) << " ... found CandTrackListHandle containing "<<TrkList->GetNDaughters()<<" tracks."<< endl;
01533   float nstripcalib(0.0),stripsintrack(0.0);
01534   Calibrator& cal = Calibrator::Instance();
01535   TClonesArray* MyStrpList = (TClonesArray*)(fEvent->StripList);
01536 
01537   // Set information from CandTrackHandle
01538   TClonesArray& MyTrkList = *(fEvent->TrackList);
01539   TIter TrkItr = TrkList->GetDaughterIterator();
01540   while(CandTrackHandle* Trk = dynamic_cast<CandTrackHandle*>(TrkItr()))
01541     {
01542       AtmosTrack* MyTrk = new( MyTrkList[(fEvent->NTracks)++] ) AtmosTrack();
01543       MyTrk->VtxPlane = Trk->GetVtxPlane();
01544       MyTrk->VtxTime = Trk->GetVtxT();
01545       MyTrk->VtxU = Trk->GetVtxU();
01546       MyTrk->VtxV = Trk->GetVtxV();
01547       MyTrk->VtxR = sqrt( (MyTrk->VtxU*MyTrk->VtxU) + (MyTrk->VtxV*MyTrk->VtxV) );
01548       MyTrk->VtxX = 0.7071*(Trk->GetVtxU()-Trk->GetVtxV());
01549       MyTrk->VtxY = 0.7071*(Trk->GetVtxU()+Trk->GetVtxV());
01550       MyTrk->VtxZ = Trk->GetVtxZ();
01551       MyTrk->VtxTrace = Trk->GetVtxTrace();
01552       MyTrk->VtxTraceZ = Trk->GetVtxTraceZ();
01553       MyTrk->VtxDirCosU = Trk->GetDirCosU();
01554       MyTrk->VtxDirCosV = Trk->GetDirCosV();
01555       MyTrk->VtxDirCosX = 0.7071*(Trk->GetDirCosU()-Trk->GetDirCosV());
01556       MyTrk->VtxDirCosY = 0.7071*(Trk->GetDirCosU()+Trk->GetDirCosV());
01557       MyTrk->VtxDirCosZ = Trk->GetDirCosZ();
01558       MyTrk->EndPlane = Trk->GetEndPlane();
01559       MyTrk->EndTime = Trk->GetEndT();
01560       MyTrk->EndU = Trk->GetEndU();
01561       MyTrk->EndV = Trk->GetEndV();
01562       MyTrk->EndR = sqrt((MyTrk->EndU*MyTrk->EndU)+(MyTrk->EndV*MyTrk->EndV));
01563       MyTrk->EndX = 0.7071*(Trk->GetEndU()-Trk->GetEndV());
01564       MyTrk->EndY = 0.7071*(Trk->GetEndU()+Trk->GetEndV());
01565       MyTrk->EndZ = Trk->GetEndZ();
01566       MyTrk->EndTrace = Trk->GetEndTrace();
01567       MyTrk->EndTraceZ = Trk->GetEndTraceZ();
01568       MyTrk->EndDirCosU = Trk->GetEndDirCosU();
01569       MyTrk->EndDirCosV = Trk->GetEndDirCosV();
01570       MyTrk->EndDirCosX = 0.7071*(Trk->GetEndDirCosU()-Trk->GetEndDirCosV());
01571       MyTrk->EndDirCosY = 0.7071*(Trk->GetEndDirCosU()+Trk->GetEndDirCosV());
01572       MyTrk->EndDirCosZ = Trk->GetEndDirCosZ();
01573       MyTrk->RangeGCM2 = Trk->GetRange(Trk->GetEndPlane());
01574        // NB this will lose the extrapolation at vtx and end
01575       MyTrk->RangeMetres = Trk->GetdS(Trk->GetEndPlane());
01576        // NB this will lose the extrapolation at vtx and end
01577       MyTrk->Nstrips = Trk->GetNStrip(); 
01578       MyTrk->Nplanes = abs(MyTrk->EndPlane-MyTrk->VtxPlane)+1;
01579       MyTrk->AtNuNplanes = MyTrk->Nplanes;
01580 
01581       MyTrk->TimingFitChi2 = Trk->GetTimeFitChi2();
01582       MyTrk->TimingFitNdf = Trk->GetNTimeFitDigit()-2;
01583       MyTrk->TimeSlope = Trk->GetTimeSlope();
01584       MyTrk->TimeOffset = Trk->GetTimeOffset(); 
01585 
01586       if(MyTrk->EndPlane-MyTrk->VtxPlane>0)
01587         {//Forward and Backward variables defined relative to increasing Z
01588           MyTrk->VtxDirTimeFitRMS = Trk->GetTimeForwardFitRMS();  
01589           MyTrk->EndDirTimeFitRMS = Trk->GetTimeBackwardFitRMS(); 
01590           MyTrk->VtxDirTimeFitNdf = Trk->GetTimeForwardFitNDOF(); 
01591           MyTrk->EndDirTimeFitNdf = Trk->GetTimeBackwardFitNDOF();
01592         }
01593       else
01594         {
01595           MyTrk->VtxDirTimeFitRMS = Trk->GetTimeBackwardFitRMS(); 
01596           MyTrk->EndDirTimeFitRMS = Trk->GetTimeForwardFitRMS();  
01597           MyTrk->VtxDirTimeFitNdf = Trk->GetTimeBackwardFitNDOF();
01598           MyTrk->EndDirTimeFitNdf = Trk->GetTimeForwardFitNDOF(); 
01599         }
01600 
01601       MyTrk->Momentum = Trk->GetMomentum();
01602       MyTrk->MomentumRange = Trk->GetMomentum();
01603 
01604       if( fEvent->NTracks<32 ){
01605         MyTrk->Index = (int)pow(2.,fEvent->NTracks-1);
01606       }
01607       else{
01608         MyTrk->Index = 0;
01609       }
01610 
01611       //set information for strips that are part of this track
01612       TIter StrpItr(Trk->GetDaughterIterator());
01613       nstripcalib=(0.0); stripsintrack = Trk->GetNDaughters();
01614       PlexStripEndId* seidP = 0;
01615       PlexStripEndId* seidN = 0;
01616       while(CandStripHandle* TrkStrp = (CandStripHandle*)(StrpItr()))
01617         {
01618           for(Int_t myint=0;myint<fEvent->NStrips;myint++)
01619             {
01620               AtmosStrip& MyStrp = *((AtmosStrip*)(MyStrpList->At(myint)));
01621               
01622               if( TrkStrp->GetPlane()==MyStrp.Plane && TrkStrp->GetStrip()==MyStrp.Strip )
01623                 {
01624                   if( MyStrp.Trk==0 && Trk->IsTPosValid(MyStrp.Plane) )
01625                     {
01626                       if( MyStrp.View==0 )
01627                         {
01628                           MyStrp.L = Trk->GetV(MyStrp.Plane);
01629                           MyStrp.dS = Trk->GetdS(MyStrp.Plane);
01630                           MyStrp.GreenFibre[0] = MyStrp.HalfLength - MyStrp.L;
01631                           MyStrp.GreenFibre[1] = MyStrp.HalfLength + MyStrp.L;
01632                           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01633                           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01634                         }
01635                       if( MyStrp.View==1 )
01636                         {
01637                           MyStrp.L = Trk->GetU(MyStrp.Plane);
01638                           MyStrp.dS = Trk->GetdS(MyStrp.Plane);
01639                           MyStrp.GreenFibre[0] = MyStrp.HalfLength + MyStrp.L;
01640                           MyStrp.GreenFibre[1] = MyStrp.HalfLength - MyStrp.L;
01641                           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01642                           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01643                         }
01644                       double lsign = pow(-1.0, (1.0+double(MyStrp.View)) );
01645                       if(seidN && MyStrp.Sigcorr[0]>0.0)
01646                         {
01647                           MyStrp.Sigmap[0] = cal.GetAttenCorrected(MyStrp.Sigcorr[0], lsign*MyStrp.L, *(seidN) );
01648                           MyStrp.MIP[0] = cal.GetMIP(MyStrp.Sigmap[0], *(seidN) );
01649                         }
01650                       if(seidP && MyStrp.Sigcorr[1]>0.0)
01651                         {
01652                           MyStrp.Sigmap[1] = cal.GetAttenCorrected(MyStrp.Sigcorr[1], lsign*MyStrp.L, *(seidP) );
01653                           MyStrp.MIP[1] = cal.GetMIP(MyStrp.Sigmap[1], *(seidP) );
01654                         }
01655                       if(MyStrp.Sigcorr[0]>0.0 || MyStrp.Sigcorr[1]>0.0) nstripcalib+=1.0;
01656                     }
01657                   MyStrp.Trk += MyTrk->Index;
01658                   
01659                   if(seidP) delete seidP; seidP = 0;
01660                   if(seidN) delete seidN; seidN = 0;
01661 
01662                   break; // break out of loop
01663                          // faster - this should be ok as long as the
01664                          // same strip doesn't exist twice in a snarl
01665                 }
01666             }
01667         }
01668       MSG("NtpMaker",Msg::kVerbose) <<"   "<<(int)stripsintrack<<" strips in the track of which "<<(int)nstripcalib<< " were calibrated."<<endl<<flush;
01669     }
01670   return;
01671 }


Member Data Documentation

TFile* NtpMaker::fFile [private]

Definition at line 49 of file NtpMaker.h.

Referenced by Ana(), EndJob(), and NtpMaker().

Int_t NtpMaker::fFileNumber [private]

Definition at line 53 of file NtpMaker.h.

Referenced by Ana(), and NtpMaker().

Double_t NtpMaker::fMaxFileSizeBytes [private]

Definition at line 52 of file NtpMaker.h.

Referenced by Ana(), Config(), and NtpMaker().

TString NtpMaker::fNtpName [private]

Definition at line 51 of file NtpMaker.h.

Referenced by Ana(), Config(), EndJob(), and NtpMaker().

vector<AtmosStrip> NtpMaker::fStrpList[500] [private]

Definition at line 59 of file NtpMaker.h.

Referenced by FillStripInfo().

TTree* NtpMaker::fTree [private]

Definition at line 50 of file NtpMaker.h.

Referenced by Ana(), EndJob(), and NtpMaker().

Bool_t NtpMaker::fWriteScintHits [private]

Definition at line 55 of file NtpMaker.h.

Referenced by Ana(), Config(), and NtpMaker().

Bool_t NtpMaker::fWriteStdHEPs [private]

Definition at line 56 of file NtpMaker.h.

Referenced by Ana(), Config(), and NtpMaker().

Bool_t NtpMaker::fWriteStrips [private]

Definition at line 54 of file NtpMaker.h.

Referenced by Ana(), Config(), and NtpMaker().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1