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

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
AtmosEventfEvent
vector< AtmosStripfStrpList [500]

Constructor & Destructor Documentation

NtpMaker::NtpMaker  ) 
 

Definition at line 79 of file NtpMaker.cxx.

References fEvent, fFile, fFileNumber, fMaxFileSizeBytes, fNtpName, fTree, fWriteScintHits, fWriteStrips, and MSG.

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

NtpMaker::~NtpMaker  ) 
 

Definition at line 95 of file NtpMaker.cxx.

References MSG.

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


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 110 of file NtpMaker.cxx.

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

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

void NtpMaker::BeginJob  )  [virtual]
 

Implement for notification of begin of job

Reimplemented from JobCModule.

Definition at line 102 of file NtpMaker.cxx.

References MSG.

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

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 357 of file NtpMaker.cxx.

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

00358 {
00359   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::Config(...) *** " << endl;
00360 
00361   // Configure the module given the Registry r
00362   Int_t tmpint; const char* tmpchar = 0;
00363   if(r.Get("NtpFileName",tmpchar)) { fNtpName = tmpchar; }
00364   if(r.Get("MaxFileSize",tmpint)) { fMaxFileSizeBytes = 1.0e6*tmpint; }
00365   if(r.Get("WriteStrips",tmpint)) { fWriteStrips = (Bool_t)tmpint; }
00366   if(r.Get("WriteScintHits",tmpint)) { fWriteScintHits = (Bool_t)tmpint; }
00367 }

const Registry & NtpMaker::DefaultConfig  )  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 335 of file NtpMaker.cxx.

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

00336 {
00337   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::DefaultConfig() *** " << endl;
00338 
00339   // Supply default configuration for the module
00340   static Registry r; 
00341   std::string name = this->GetName();
00342   name += ".config.default";
00343   r.SetName(name.c_str());
00344   r.UnLockKeys();
00345   r.UnLockValues();
00346   r.Set("NtpFileName","ntp.root");
00347   r.Set("MaxFileSize",0);
00348   r.Set("WriteStrips",1);
00349   r.Set("WriteScintHits",1);
00350   r.LockValues();
00351   r.LockKeys();
00352   return r;
00353 }

void NtpMaker::EndJob  )  [virtual]
 

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 371 of file NtpMaker.cxx.

References fEvent, fFile, fNtpName, fTree, and MSG.

00372 {
00373   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::EndJob(...) *** " << endl;
00374   if( !fFile )
00375     {
00376       //Create the output file if it doesn't already exist.
00377       MSG("NtpMaker",Msg::kWarning) << " NTPMAKER: CREATING OUTPUT FILE *** " << endl;
00378       TDirectory *tmpd = gDirectory;
00379       fFile = TFile::Open(fNtpName.Data(), "recreate");
00380       fTree = new TTree("ntp", "FarDet Atmos Events");
00381       fTree->SetDirectory(fFile);
00382       fTree->Branch("evt", "AtmosEvent", &fEvent);
00383       fTree->SetAutoSave(100);
00384       tmpd->cd();
00385     }
00386   // write out file
00387   if( fFile )
00388     {
00389       TDirectory* tmpd = gDirectory;
00390       fFile->cd();
00391       MSG("NtpMaker",Msg::kDebug) << " WRITING FILE: " << fFile->GetBytesWritten() << " bytes (before)" << endl;
00392       fFile->Write();
00393       MSG("NtpMaker",Msg::kDebug) << " WRITING FILE: " << fFile->GetBytesWritten() << " bytes (after)" << endl;
00394       fFile->Close();
00395       gDirectory = tmpd;
00396     }
00397 }

void NtpMaker::FillCandInfo CandRecord candrec  )  [private]
 

Definition at line 401 of file NtpMaker.cxx.

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

Referenced by Ana().

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

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

Definition at line 489 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(), CandDeadChipHandle::GetChannelId(), CandDeadChipHandle::GetChipStatus(), CandDataQualityHandle::GetColdChips(), RawChannelId::GetCrate(), CandDataQualityHandle::GetCrateMask(), CandDataQualityHandle::GetDataQuality(), CandHandle::GetDaughterIterator(), CandDeadChipHandle::GetErrorCode(), CandDataQualityHandle::GetErrorCode(), CandDataQualityHandle::GetHotChips(), CandDataQualityHandle::GetLiCalibPoint(), CandDataQualityHandle::GetLiCalibType(), CandDataQualityHandle::GetLiPulseHeight(), CandDataQualityHandle::GetLiPulserBox(), CandDataQualityHandle::GetLiPulserLed(), CandDataQualityHandle::GetLiPulseWidth(), CandDataQualityHandle::GetLiRelativeTime(), CandDataQualityHandle::GetLiSubtractedTime(), CandDataQualityHandle::GetLiTime(), CandDataQualityHandle::GetLiTrigger(), CandDataQualityHandle::GetPostTriggerDigits(), CandDataQualityHandle::GetPreTriggerDigits(), CandDataQualityHandle::GetReadoutErrors(), 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, 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().

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

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

Definition at line 579 of file NtpMaker.cxx.

References AtmosReco::AbsTime, AtmosReco::DeMuxFlagWord, fEvent, CandDigitListHandle::GetAbsTime(), CandHandle::GetDaughterIterator(), CandDeMuxDigitListHandle::GetDeMuxDigitListFlagWord(), CandHandle::GetNDaughters(), PlexSEIdAltL::GetPlane(), CandDigitHandle::GetPlexSEIdAltL(), CandDigitHandle::GetSubtractedTime(), PlexSEIdAltL::IsVetoShield(), MSG, AtmosReco::MultipleMuonFlag, AtmosReco::Ndigits, AtmosReco::Nplndigits, and AtmosEvent::RecoInfo.

Referenced by FillCandInfo().

00580 {
00581   // Get output from demuxing 
00582   CandDeMuxDigitListHandle* DigitList = (CandDeMuxDigitListHandle*)(tob);
00583   MSG("NtpMaker",Msg::kDebug) << " ... found CandDeMuxDigitListHandle " << endl;
00584   fEvent->RecoInfo.Ndigits = DigitList->GetNDaughters();
00585   fEvent->RecoInfo.DeMuxFlagWord = DigitList->GetDeMuxDigitListFlagWord();
00586   fEvent->RecoInfo.MultipleMuonFlag = (Int_t)((DigitList->GetDeMuxDigitListFlagWord())&(CandDeMuxDigitList::kMultipleMuonEvent));
00587   fEvent->RecoInfo.AbsTime = DigitList->GetAbsTime();
00588 
00589   fEvent->RecoInfo.Nplndigits = 0;
00590   TIter digitr(DigitList->GetDaughterIterator());
00591   while(CandDigitHandle* cdh = dynamic_cast<CandDigitHandle*>(digitr()))
00592     {
00593       if( cdh )
00594         {
00595           if( !cdh->GetPlexSEIdAltL().IsVetoShield() 
00596            && cdh->GetPlexSEIdAltL().GetPlane()>=0
00597            && cdh->GetPlexSEIdAltL().GetPlane()<500 
00598            && cdh->GetSubtractedTime()>=0 )
00599             {
00600               ++fEvent->RecoInfo.Nplndigits;
00601             }
00602         }
00603     }
00604 
00605 
00606   return;
00607 }

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

Definition at line 611 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(), 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().

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

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

Definition at line 683 of file NtpMaker.cxx.

References abs(), 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(), CandFitTrackHandle::GetChi2(), CandHandle::GetDaughterIterator(), CandRecoHandle::GetDirCosU(), CandRecoHandle::GetDirCosV(), CandRecoHandle::GetDirCosZ(), CandTrackHandle::GetdS(), CandFitTrackHandle::GetEMCharge(), CandRecoHandle::GetEndDirCosU(), CandRecoHandle::GetEndDirCosV(), CandRecoHandle::GetEndDirCosZ(), CandRecoHandle::GetEndPlane(), CandRecoHandle::GetEndT(), CandTrackHandle::GetEndTrace(), CandTrackHandle::GetEndTraceZ(), CandRecoHandle::GetEndU(), CandRecoHandle::GetEndV(), CandRecoHandle::GetEndZ(), Calibrator::GetMIP(), CandFitTrackHandle::GetMomentumCurve(), CandFitTrackHandle::GetMomentumRange(), CandHandle::GetNDaughters(), CandFitTrackHandle::GetNDOF(), CandRecoHandle::GetNStrip(), CandTrackHandle::GetNTimeFitDigit(), CandFitTrackHandle::GetPass(), CandStripHandle::GetPlane(), CandFitTrackHandle::GetPlaneQP(), CandTrackHandle::GetRange(), CandStripHandle::GetStrip(), CandTrackHandle::GetTimeBackwardFitNDOF(), CandTrackHandle::GetTimeBackwardFitRMS(), CandTrackHandle::GetTimeFitChi2(), CandTrackHandle::GetTimeForwardFitNDOF(), CandTrackHandle::GetTimeForwardFitRMS(), CandRecoHandle::GetTimeOffset(), CandRecoHandle::GetTimeSlope(), CandTrackHandle::GetU(), CandTrackHandle::GetV(), CandRecoHandle::GetVtxPlane(), CandFitTrackHandle::GetVtxQPError(), CandRecoHandle::GetVtxT(), CandTrackHandle::GetVtxTrace(), CandTrackHandle::GetVtxTraceZ(), CandRecoHandle::GetVtxU(), CandRecoHandle::GetVtxV(), CandRecoHandle::GetVtxZ(), AtmosStrip::GreenFibre, AtmosStrip::HalfLength, AtmosTrack::Index, Calibrator::Instance(), CandTrackHandle::IsTPosValid(), AtmosStrip::L, AtmosStrip::MIP, AtmosTrack::Momentum, AtmosTrack::MomentumCurve, AtmosTrack::MomentumRange, MSG, AtmosEvent::NFits, AtmosTrack::Nplanes, AtmosTrack::Nstrips, AtmosEvent::NStrips, AtmosEvent::NTracks, AtmosStrip::Plane, pow(), 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().

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

void NtpMaker::FillMCInfo SimSnarlRecord simrec  )  [private]
 

Definition at line 852 of file NtpMaker.cxx.

References NEUKIN_DEF::A, AtmosMC::A, abs(), AtmosScintHit::DE, DigiScintHit::DE(), DigiScintHit::DS(), AtmosScintHit::DS, AtmosMC::Eel, AtmosMC::Ehad, NEUKIN_DEF::EMFrac, AtmosMC::EMfrac, AtmosMC::Emu, AtmosMC::Enu, AtmosMC::Etarg, fEvent, RecDataRecord< T >::GetComponents(), PlexPlaneId::GetPlaneView(), UgliGeomHandle::GetStripHandle(), RecRecordImp< T >::GetVldContext(), NEUKIN_DEF::IAction, NEUKIN_DEF::IBoson, AtmosScintHit::Id, AtmosMC::IDact, AtmosMC::IDboson, AtmosMC::IDnu, AtmosMC::IDnunoosc, AtmosMC::IDres, AtmosMC::IDtarget, NEUKIN_DEF::INu, NEUKIN_DEF::INuNoOsc, NEUKIN_DEF::IResonance, NEUKIN_DEF::ITg, UgliStripHandle::LocalToGlobal(), 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, NEUKIN_DEF::P4El1, NEUKIN_DEF::P4Mu1, NEUKIN_DEF::P4Neu, NEUKIN_DEF::P4Shw, NEUKIN_DEF::P4Tgt, AtmosScintHit::ParticleE, DigiScintHit::ParticleEnergy(), DigiScintHit::ParticleId(), AtmosMC::PelX, AtmosMC::PelY, AtmosMC::PelZ, AtmosMC::PhadX, AtmosMC::PhadY, AtmosMC::PhadZ, DigiScintHit::Plane(), AtmosScintHit::Plane, AtmosMC::PmuX, AtmosMC::PmuY, AtmosMC::PmuZ, AtmosMC::PnuX, AtmosMC::PnuY, AtmosMC::PnuZ, AtmosMC::PtargX, AtmosMC::PtargY, AtmosMC::PtargZ, NEUKIN_DEF::Q2, AtmosMC::Q2, AtmosEvent::ScintHitList, NEUKIN_DEF::Sigma, DigiScintHit::Strip(), AtmosScintHit::Strip, DigiScintHit::StripEndId(), AtmosScintHit::T, DigiScintHit::T1(), DigiScintHit::T2(), DigiScintHit::TrackId(), AtmosScintHit::TrkId, AtmosScintHit::U, AtmosScintHit::V, AtmosScintHit::View, AtmosMC::VtxU, AtmosMC::VtxV, AtmosMC::VtxX, AtmosMC::VtxY, AtmosMC::VtxZ, NEUKIN_DEF::W2, AtmosMC::W2, AtmosScintHit::X, NEUKIN_DEF::X, AtmosMC::x, DigiScintHit::X1(), DigiScintHit::X2(), AtmosMC::Xsection, AtmosScintHit::Y, NEUKIN_DEF::Y, AtmosMC::y, DigiScintHit::Y1(), DigiScintHit::Y2(), AtmosScintHit::Z, NEUKIN_DEF::Z, AtmosMC::Z, DigiScintHit::Z1(), and DigiScintHit::Z2().

Referenced by Ana().

00853 {
00854   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::FillMCInfo(...) *** " << endl;
00855 
00856   UgliGeomHandle ugh = (*(simrec->GetVldContext())); 
00857   const TObjArray arr(simrec->GetComponents());
00858   TIter iter(arr.MakeIterator());
00859   while(TObject* tob = (TObject*)(iter()))
00860     {
00861       MSG("NtpMaker",Msg::kDebug) << tob->GetName() << endl;
00862 
00863       if(tob->GetName()==TString("REROOT_NeuKin"))
00864         {
00865           REROOT_NeuKin* NeuKin = dynamic_cast<REROOT_NeuKin*>(tob);
00866           MSG("NtpMaker",Msg::kDebug) << " ... found REROOT_NeuKin " << endl;
00867           fEvent->MCInfo.IDnu = NeuKin->INu();
00868           fEvent->MCInfo.IDnunoosc = NeuKin->INuNoOsc();
00869           fEvent->MCInfo.IDact = NeuKin->IAction();
00870           fEvent->MCInfo.IDres = NeuKin->IResonance();
00871           fEvent->MCInfo.IDboson = NeuKin->IBoson();
00872           fEvent->MCInfo.IDtarget = NeuKin->ITg();
00873           fEvent->MCInfo.A = NeuKin->A();
00874           fEvent->MCInfo.Z = NeuKin->Z();
00875           fEvent->MCInfo.Xsection = NeuKin->Sigma();
00876           fEvent->MCInfo.EMfrac = NeuKin->EMFrac();
00877           fEvent->MCInfo.W2 = NeuKin->W2();
00878           fEvent->MCInfo.Q2 = NeuKin->Q2();
00879           fEvent->MCInfo.x = NeuKin->X();
00880           fEvent->MCInfo.y = NeuKin->Y();
00881           fEvent->MCInfo.PnuX = NeuKin->P4Neu()[0];
00882           fEvent->MCInfo.PnuY = NeuKin->P4Neu()[1];
00883           fEvent->MCInfo.PnuZ = NeuKin->P4Neu()[2];
00884           fEvent->MCInfo.Enu = NeuKin->P4Neu()[3];
00885           fEvent->MCInfo.PmuX = NeuKin->P4Mu1()[0];
00886           fEvent->MCInfo.PmuY = NeuKin->P4Mu1()[1];
00887           fEvent->MCInfo.PmuZ = NeuKin->P4Mu1()[2];
00888           fEvent->MCInfo.Emu = NeuKin->P4Mu1()[3];
00889           fEvent->MCInfo.PelX = NeuKin->P4El1()[0];
00890           fEvent->MCInfo.PelY = NeuKin->P4El1()[1];
00891           fEvent->MCInfo.PelZ = NeuKin->P4El1()[2];
00892           fEvent->MCInfo.Eel = NeuKin->P4El1()[3];
00893           fEvent->MCInfo.PhadX = NeuKin->P4Shw()[0];
00894           fEvent->MCInfo.PhadY = NeuKin->P4Shw()[1];
00895           fEvent->MCInfo.PhadZ = NeuKin->P4Shw()[2];
00896           fEvent->MCInfo.Ehad = NeuKin->P4Shw()[3];
00897           fEvent->MCInfo.PtargX = NeuKin->P4Tgt()[0];
00898           fEvent->MCInfo.PtargY = NeuKin->P4Tgt()[1];
00899           fEvent->MCInfo.PtargZ = NeuKin->P4Tgt()[2];
00900           fEvent->MCInfo.Etarg = NeuKin->P4Tgt()[3];
00901         }
00902 
00903       if(tob->GetName()==TString("StdHep"))
00904         {
00905           TClonesArray* ParticleList = (TClonesArray*)(tob);
00906           MSG("NtpMaker",Msg::kDebug) << " ... found StdHep " << endl;        
00907           TParticle* Particle = dynamic_cast<TParticle*>(ParticleList->At(0));
00908           fEvent->MCInfo.VtxU = 0.7071*(Particle->Vy()+Particle->Vx()); 
00909           fEvent->MCInfo.VtxV = 0.7071*(Particle->Vy()-Particle->Vx()); 
00910           fEvent->MCInfo.VtxX = Particle->Vx(); 
00911           fEvent->MCInfo.VtxY = Particle->Vy(); 
00912           fEvent->MCInfo.VtxZ = Particle->Vz();
00913         }
00914 
00915       if(tob->GetName()==TString("DigiScintHits"))
00916         {
00917           TClonesArray* ScintHitList = (TClonesArray*)(tob); 
00918           MSG("NtpMaker",Msg::kDebug) << " ... found DigitScintHits " << endl;
00919           TClonesArray& MyScintHitList = *(fEvent->ScintHitList);
00920 
00921           Int_t plane,strip;
00922           Int_t idnu,ipdg,trkid;
00923           Double_t u,v,x,y,z,r;
00924           Double_t xm,xp,ym,yp,um,up,vm,vp;
00925           Double_t muvtxU,muvtxV;
00926           Double_t muvtxX,muvtxY,muvtxZ;
00927           Double_t muvtxR,muendR;
00928           Double_t muendU,muendV;
00929           Double_t muendX,muendY,muendZ;
00930           Int_t muvtxpln,muendpln;
00931           Int_t muvtxstrp,muendstrp;
00932           Double_t pmu,maxpmu,minpmu;
00933 
00934           muvtxU=0.0; muvtxV=0.0; 
00935           muvtxX=0.0; muvtxY=0.0; muvtxZ=0.0; 
00936           muendU=0.0; muendV=0.0; 
00937           muendX=0.0; muendY=0.0; muendZ=0.0; 
00938           muvtxR=999.9; muendR=999.9;
00939           muvtxpln=-999; muendpln=-999;
00940           muvtxstrp=-999; muendstrp=-999; 
00941           maxpmu=-999.9; minpmu=-999.9;
00942 
00943           PlexStripEndId seid;
00944           UgliStripHandle ush;
00945           TVector3 myglobal;
00946           TIter ScintHitItr(ScintHitList->MakeIterator());
00947           while( const DigiScintHit* ScintHit = dynamic_cast<const DigiScintHit*>(ScintHitItr()))
00948             {
00949               if( ScintHit->DE()<1.0E-4 && abs(ScintHit->ParticleId())!=13 ) continue; 
00950                  //this is to prevent huge numbers of scinthits being stored in the ntuple
00951 
00952               AtmosScintHit* MyScintHit = new( MyScintHitList[(fEvent->NScintHits)++] ) AtmosScintHit();
00953               MyScintHit->Id = ScintHit->ParticleId();
00954               MyScintHit->TrkId = ScintHit->TrackId();        
00955               MyScintHit->Plane = ScintHit->Plane();
00956               MyScintHit->Strip = ScintHit->Strip();
00957                 
00958               seid = ScintHit->StripEndId();
00959               MyScintHit->View = -1;
00960               if(seid.GetPlaneView()==PlaneView::kU) MyScintHit->View = 0;
00961               if(seid.GetPlaneView()==PlaneView::kV) MyScintHit->View = 1;
00962 
00963               ush = ugh.GetStripHandle(seid);
00964       
00965               TVector3 mylocal( ScintHit->X1(), ScintHit->Y1(), ScintHit->Z1() );
00966               myglobal = ush.LocalToGlobal(mylocal);
00967             //Note: doubles are all being converted to floats here
00968             // SHOULD PROBABLY DO CHECKS HERE TO PREVENT DOUBLES LARGER 
00969             // THAN FLT_MAX FROM SCREWING THINGS UP
00970               MyScintHit->U[0]  = float(0.7071*(myglobal.Y()+myglobal.X())); 
00971               MyScintHit->V[0]  = float(0.7071*(myglobal.Y()-myglobal.X()));
00972               MyScintHit->X[0]  = float(myglobal.X()); 
00973               MyScintHit->Y[0]  = float(myglobal.Y());
00974               MyScintHit->Z[0]  = float(myglobal.Z());
00975               MyScintHit->T[0]  = float(ScintHit->T1());
00976 
00977               mylocal.SetXYZ( ScintHit->X2(), ScintHit->Y2(), ScintHit->Z2() );
00978               myglobal = ush.LocalToGlobal(mylocal);
00979        
00980               MyScintHit->U[1]  = float(0.7071*(myglobal.Y()+myglobal.X())); 
00981               MyScintHit->V[1]  = float(0.7071*(myglobal.Y()-myglobal.X()));
00982               MyScintHit->X[1]  = float(myglobal.X()); 
00983               MyScintHit->Y[1]  = float(myglobal.Y());
00984               MyScintHit->Z[1]  = float(myglobal.Z());
00985               MyScintHit->T[1]  = float(ScintHit->T2());
00986 
00987               MyScintHit->DS = float(ScintHit->DS());
00988               MyScintHit->DE = float(ScintHit->DE());
00989               MyScintHit->ParticleE = float(ScintHit->ParticleEnergy());
00990 
00991               idnu = fEvent->MCInfo.IDnu;
00992               trkid = ScintHit->TrackId();
00993               ipdg = ScintHit->ParticleId();
00994 
00995               if( trkid>=0 
00996                && ( (idnu==0 && (ipdg==13 || ipdg==-13) ) 
00997                  || (idnu==14 && ipdg==13) || (idnu==-14 && ipdg==-13) ) )
00998                 {
00999                   plane = ScintHit->Plane();
01000                   strip = ScintHit->Strip();
01001                   x = myglobal.X(); y = myglobal.Y(); z = myglobal.Z();
01002                   u = 0.7071*(y + x); v = 0.7071*(y - x);  
01003                   pmu = ScintHit->ParticleEnergy();
01004 
01005                   r=999.9;
01006                   up=4.0-u; if(up<r) r=up;
01007                   um=4.0+u; if(um<r) r=um;
01008                   vp=4.0-v; if(vp<r) r=vp;
01009                   vm=4.0+v; if(vm<r) r=vm;
01010                   xp=4.0-x; if(xp<r) r=xp;
01011                   xm=4.0+x; if(xm<r) r=xm;
01012                   yp=4.0-y; if(yp<r) r=yp;
01013                   ym=4.0+y; if(ym<r) r=ym;
01014 
01015                   if( minpmu<0 || pmu<minpmu )
01016                     {
01017                       muendU=u; muendV=v;
01018                       muendX=x; muendY=y; muendZ=z; muendR=r;
01019                       muendstrp=strip; muendpln=plane; minpmu=pmu;
01020                     }
01021                   if( maxpmu<0 || pmu>maxpmu )
01022                     {
01023                       muvtxU=u; muvtxV=v;
01024                       muvtxX=x; muvtxY=y; muvtxZ=z; muvtxR=r;
01025                       muvtxstrp=strip; muvtxpln=plane; maxpmu=pmu;
01026                     }
01027                 }
01028             }
01029 
01030           fEvent->MCInfo.MuVtxU = muvtxU;              
01031           fEvent->MCInfo.MuVtxV = muvtxV;    
01032           fEvent->MCInfo.MuVtxX = muvtxX;              
01033           fEvent->MCInfo.MuVtxY = muvtxY;               
01034           fEvent->MCInfo.MuVtxZ = muvtxZ;               
01035           fEvent->MCInfo.MuVtxDistToEdge = muvtxR;               
01036           fEvent->MCInfo.MuVtxPlane = muvtxpln; 
01037           fEvent->MCInfo.MuVtxStrip = muvtxstrp; 
01038           fEvent->MCInfo.MuEndU = muendU;            
01039           fEvent->MCInfo.MuEndV = muendV;      
01040           fEvent->MCInfo.MuEndX = muendX;            
01041           fEvent->MCInfo.MuEndY = muendY;            
01042           fEvent->MCInfo.MuEndZ = muendZ;            
01043           fEvent->MCInfo.MuEndDistToEdge = muendR;            
01044           fEvent->MCInfo.MuEndPlane = muendpln;          
01045           fEvent->MCInfo.MuEndStrip = muendstrp;      
01046           fEvent->MCInfo.MuPbeg = maxpmu;               
01047           fEvent->MCInfo.MuPend = minpmu;               
01048 
01049         }
01050     }
01051 
01052   return;
01053 }

void NtpMaker::FillRawInfo RawRecord rawrec  )  [private]
 

Definition at line 1057 of file NtpMaker.cxx.

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

Referenced by Ana().

01058 {
01059   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::FillRawInfo(...) *** " << endl;
01060   
01061   const VldContext& vldc = *(rawrec->GetVldContext());
01062   this->FillSpillInfo(vldc);
01063 
01064   return;
01065 }

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

Definition at line 1069 of file NtpMaker.cxx.

References AtmosShieldPlank::ClearFibre, fEvent, FarDetShieldPlankHandle::GetCharge(), FarDetShieldPlankHandle::GetClearFibre(), CandHandle::GetDaughterIterator(), FarDetShieldPlankHandle::GetGeomErrors(), FarDetShieldPlankHandle::GetGreenFibre(), CandHandle::GetNDaughters(), FarDetShieldPlankHandle::GetNStrips(), FarDetShieldPlankHandle::GetPlane(), FarDetShieldPlankHandle::GetPlank(), FarDetShieldPlankHandle::GetSection(), FarDetShieldPlankHandle::GetSubSection(), FarDetShieldPlankHandle::GetTime(), FarDetShieldPlankHandle::GetWlsPigtail(), FarDetShieldPlankHandle::GetX(), FarDetShieldPlankHandle::GetY(), FarDetShieldPlankHandle::GetZ(), AtmosShieldPlank::GreenFibre, 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().

01070 {
01071   FarDetShieldPlankListHandle* ShldList = (FarDetShieldPlankListHandle*)(tob);
01072   MSG("NtpMaker",Msg::kDebug) << " ... found FarDetShieldPlankListHandle " << endl;
01073   TClonesArray& MyShldList = *(fEvent->ShieldPlankList);
01074 
01075   TIter ShldItr(ShldList->GetDaughterIterator());
01076   while(FarDetShieldPlankHandle* Shld = (FarDetShieldPlankHandle*)(ShldItr()))
01077     {
01078       AtmosShieldPlank* MyShld = new( MyShldList[(fEvent->NShieldPlanks)++] ) AtmosShieldPlank();
01079 
01080       MyShld->Section = Shld->GetSection();       
01081       MyShld->SubSection = Shld->GetSubSection();
01082       MyShld->Plane = Shld->GetPlane();
01083       MyShld->Plank = Shld->GetPlank();
01084       MyShld->Nstrips = Shld->GetNStrips();
01085       MyShld->Nerrors = Shld->GetGeomErrors();
01086       MyShld->Ndigits = Shld->GetNDaughters();    
01087       MyShld->X = Shld->GetX();
01088       MyShld->Y = Shld->GetY();  
01089       MyShld->Z[0] = Shld->GetZ(StripEnd::kNegative);
01090       MyShld->Z[1] = Shld->GetZ(StripEnd::kPositive);
01091       MyShld->Traw[0] = Shld->GetTime(StripEnd::kNegative,CalTimeType::kNone);
01092       MyShld->Traw[1] = Shld->GetTime(StripEnd::kPositive,CalTimeType::kNone);
01093       MyShld->Tcal[0] = Shld->GetTime(StripEnd::kNegative,CalTimeType::kT0);
01094       MyShld->Tcal[1] = Shld->GetTime(StripEnd::kPositive,CalTimeType::kT0);
01095       MyShld->Qadc[0] = Shld->GetCharge(StripEnd::kNegative,CalDigitType::kNone);
01096       MyShld->Qadc[1] = Shld->GetCharge(StripEnd::kPositive,CalDigitType::kNone);
01097       MyShld->QPE[0] = Shld->GetCharge(StripEnd::kNegative,CalDigitType::kPE);
01098       MyShld->QPE[1] = Shld->GetCharge(StripEnd::kPositive,CalDigitType::kPE);
01099       //Do we add info for sigmap and mips?
01100       MyShld->GreenFibre[0] = Shld->GetGreenFibre(StripEnd::kNegative);
01101       MyShld->GreenFibre[1] = Shld->GetGreenFibre(StripEnd::kPositive);
01102       MyShld->WlsPigtail[0] = Shld->GetWlsPigtail(StripEnd::kNegative);
01103       MyShld->WlsPigtail[1] = Shld->GetWlsPigtail(StripEnd::kPositive);
01104       MyShld->ClearFibre[0] = Shld->GetClearFibre(StripEnd::kNegative);
01105       MyShld->ClearFibre[1] = Shld->GetClearFibre(StripEnd::kPositive);
01106 
01107     }
01108   return;
01109 }

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

Definition at line 1113 of file NtpMaker.cxx.

References AtmosShower::Energy, fEvent, Calibrator::GetAttenCorrected(), CandHandle::GetDaughterIterator(), CandRecoHandle::GetDirCosU(), CandRecoHandle::GetDirCosV(), CandRecoHandle::GetDirCosZ(), CandShowerHandle::GetEnergy(), Calibrator::GetMIP(), CandHandle::GetNDaughters(), CandRecoHandle::GetNPlane(), CandRecoHandle::GetNStrip(), CandStripHandle::GetPlane(), CandStripHandle::GetStrip(), CandRecoHandle::GetTimeOffset(), CandRecoHandle::GetTimeSlope(), CandShowerHandle::GetU(), CandShowerHandle::GetV(), CandRecoHandle::GetVtxPlane(), CandRecoHandle::GetVtxT(), CandRecoHandle::GetVtxU(), CandRecoHandle::GetVtxV(), CandRecoHandle::GetVtxZ(), AtmosStrip::GreenFibre, AtmosStrip::HalfLength, AtmosShower::Index, Calibrator::Instance(), AtmosStrip::L, AtmosStrip::MIP, MSG, AtmosShower::Nplanes, AtmosEvent::NShowers, AtmosEvent::NStrips, AtmosShower::Nstrips, AtmosStrip::Plane, pow(), 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().

01114 {
01115   CandShowerListHandle* ShwList = (CandShowerListHandle*)(tob);
01116   MSG("NtpMaker",Msg::kDebug) << " ... found CandShowerListHandle containing "<<ShwList->GetNDaughters()<<" showers."<< endl;
01117   float nstripcalib(0.0), nshwstrips(0.0);
01118   Calibrator& cal = Calibrator::Instance();
01119   TClonesArray* MyStrpList = (TClonesArray*)(fEvent->StripList);
01120 
01121   // Set information from CandShowerHandle
01122   TClonesArray& MyShwList = *(fEvent->ShowerList);
01123   TIter ShwItr(ShwList->GetDaughterIterator());
01124   while(CandShowerHandle* Shw = (CandShowerHandle*)(ShwItr()))
01125     {
01126       AtmosShower* MyShw = new( MyShwList[(fEvent->NShowers)++] ) AtmosShower();
01127         
01128       MyShw->VtxPlane = Shw->GetVtxPlane();
01129       MyShw->VtxTime = Shw->GetVtxT();
01130       MyShw->VtxU = Shw->GetVtxU();
01131       MyShw->VtxV = Shw->GetVtxV();
01132       MyShw->VtxR = sqrt((MyShw->VtxU*MyShw->VtxU)+(MyShw->VtxV*MyShw->VtxV));
01133       MyShw->VtxX = 0.7071*(Shw->GetVtxU()-Shw->GetVtxV());
01134       MyShw->VtxY = 0.7071*(Shw->GetVtxU()+Shw->GetVtxV());
01135       MyShw->VtxZ = Shw->GetVtxZ();
01136 
01137       MyShw->VtxDirCosU = Shw->GetDirCosU();
01138       MyShw->VtxDirCosV = Shw->GetDirCosV();
01139       MyShw->VtxDirCosX = 0.7071*(Shw->GetDirCosU()-Shw->GetDirCosV());
01140       MyShw->VtxDirCosY = 0.7071*(Shw->GetDirCosU()+Shw->GetDirCosV());
01141       MyShw->VtxDirCosZ = Shw->GetDirCosZ();   
01142       MyShw->TimeSlope = Shw->GetTimeSlope();
01143       MyShw->TimeOffset = Shw->GetTimeOffset(); 
01144       MyShw->Energy = Shw->GetEnergy();
01145       
01146       MyShw->Nstrips = Shw->GetNStrip(); //AtNu Shw->GetNStrips();
01147       MyShw->Nplanes = Shw->GetNPlane(); //AtNu Shw->GetNPlanes();
01148       MyShw->Index = (int)pow(2.,fEvent->NShowers-1);
01149 
01150       // Set information for strips that are part of this shower      
01151       nshwstrips=Shw->GetNDaughters(); nstripcalib=0.0;
01152       TIter StrpItr(Shw->GetDaughterIterator());
01153       PlexStripEndId* seidP = 0;
01154       PlexStripEndId* seidN = 0;
01155       while(CandStripHandle* ShwStrp = (CandStripHandle*)(StrpItr()))
01156         {
01157           for(Int_t myint=0;myint<fEvent->NStrips;myint++)
01158             {
01159               AtmosStrip& MyStrp = *((AtmosStrip*)(MyStrpList->At(myint)));
01160               if( ShwStrp->GetPlane()==MyStrp.Plane && ShwStrp->GetStrip()==MyStrp.Strip )
01161                 {
01162                   if( MyStrp.Trk==0 && MyStrp.Shw==0 && Shw->GetU(MyStrp.Plane)>-999.9 && Shw->GetV(MyStrp.Plane)>-999.9 )
01163                     {
01164                       
01165                       if( MyStrp.View==0 )
01166                         {
01167                           MyStrp.L = Shw->GetV(MyStrp.Plane);
01168                           MyStrp.GreenFibre[0] = MyStrp.HalfLength - MyStrp.L;
01169                           MyStrp.GreenFibre[1] = MyStrp.HalfLength + MyStrp.L;
01170                           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01171                           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01172                         }
01173                       if( MyStrp.View==1 )
01174                         {
01175                           MyStrp.L = Shw->GetU(MyStrp.Plane);
01176                           MyStrp.GreenFibre[0] = MyStrp.HalfLength + MyStrp.L;
01177                           MyStrp.GreenFibre[1] = MyStrp.HalfLength - MyStrp.L;
01178                           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01179                           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01180                         }
01181                       double lsign = pow(-1.0, (1.0+double(MyStrp.View)) );
01182                       if(seidN && MyStrp.Sigcorr[0]>0.0)
01183                         {
01184                           MyStrp.Sigmap[0] = cal.GetAttenCorrected(MyStrp.Sigcorr[0], lsign*MyStrp.L, *(seidN) );
01185                           MyStrp.MIP[0] = cal.GetMIP(MyStrp.Sigmap[0], *(seidN) );
01186                         }
01187                       if(seidP && MyStrp.Sigcorr[1]>0.0)
01188                         {
01189                           MyStrp.Sigmap[1] = cal.GetAttenCorrected(MyStrp.Sigcorr[1], lsign*MyStrp.L, *(seidP) );
01190                           MyStrp.MIP[1] = cal.GetMIP(MyStrp.Sigmap[1], *(seidP) );
01191                         }
01192                     }
01193                   if(MyStrp.Sigcorr[0]>0.0 || MyStrp.Sigcorr[1]>0.0) nstripcalib+=1.0;
01194                   MyStrp.Shw += MyShw->Index;
01195                 }
01196 
01197               if(seidP) delete seidP; seidP = 0;
01198               if(seidN) delete seidN; seidN = 0;
01199             }
01200         }
01201       MSG("NtpMaker",Msg::kVerbose) <<"   "<<(int)nshwstrips<<" strips in the shower of which "<<(int)nstripcalib<<" were calibrated."<<endl<<flush;
01202     }
01203   return;
01204 }

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

Definition at line 1208 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, AtmosFilter::MaxPlaneCharge, AtmosFilter::MeanXPosSM1, AtmosFilter::MeanXPosSM2, AtmosFilter::MeanYPosSM1, AtmosFilter::MeanYPosSM2, AtmosFilter::MeanZPosSM1, AtmosFilter::MeanZPosSM2, MSG, and AtmosFilter::TotalCharge.

Referenced by FillCandInfo().

01209 {
01210   FarDetSliceListHandle* SliceList = (FarDetSliceListHandle*)(tob);
01211   MSG("NtpMaker",Msg::kDebug) << " ... found FarDetSliceListHandle " << endl;
01212 
01213   TIter SliceItr = SliceList->GetDaughterIterator();
01214   FarDetSliceHandle* Slice = dynamic_cast<FarDetSliceHandle*>(SliceItr()); 
01215   if( Slice )
01216     {
01217       fEvent->FilterInfo.EventId = Slice->GetEventId();
01218       fEvent->FilterInfo.EventIdSM1 = Slice->GetEventIdSM1();
01219       fEvent->FilterInfo.EventIdSM2 = Slice->GetEventIdSM2();
01220       fEvent->FilterInfo.EventIdX = Slice->GetEventIdX();
01221       fEvent->FilterInfo.Edges=Slice->GetEdges();
01222       fEvent->FilterInfo.EdgesSM1=Slice->GetEdgesSM1();
01223       fEvent->FilterInfo.EdgesSM2=Slice->GetEdgesSM2();
01224       fEvent->FilterInfo.GoodUPlanes = Slice->GetGoodUPlanes();
01225       fEvent->FilterInfo.GoodVPlanes = Slice->GetGoodVPlanes();
01226       fEvent->FilterInfo.GoodPlanes = Slice->GetGoodPlanes();
01227       fEvent->FilterInfo.GoodStrips = Slice->GetGoodStrips();
01228       fEvent->FilterInfo.FidCharge = Slice->GetFidCharge();
01229       fEvent->FilterInfo.TotalCharge = Slice->GetTotalCharge();
01230       fEvent->FilterInfo.MaxPlaneCharge = Slice->GetMaxPlaneCharge();
01231 
01232       for(Int_t myint=0; myint<11; myint++)
01233         {
01234           fEvent->FilterInfo.FidChargeSM1[myint] = Slice->GetFidChargeSM1(myint);
01235           fEvent->FilterInfo.FidChargeSM2[myint] = Slice->GetFidChargeSM2(myint);
01236           fEvent->FilterInfo.MeanXPosSM1[myint] = Slice->GetMeanXPosSM1(myint);
01237           fEvent->FilterInfo.MeanXPosSM2[myint] = Slice->GetMeanXPosSM2(myint);
01238           fEvent->FilterInfo.MeanYPosSM1[myint] = Slice->GetMeanYPosSM1(myint);
01239           fEvent->FilterInfo.MeanYPosSM2[myint] = Slice->GetMeanYPosSM2(myint);
01240           fEvent->FilterInfo.MeanZPosSM1[myint] = Slice->GetMeanZPosSM1(myint);
01241           fEvent->FilterInfo.MeanZPosSM2[myint] = Slice->GetMeanZPosSM2(myint);
01242         }
01243     } 
01244   return;
01245 }

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

Definition at line 1249 of file NtpMaker.cxx.

References abs(), BeamMonSpill::StatusBits::beam_type, AtmosSpill::beam_type, AtmosSpill::BeamSelectSpill, AtmosSpill::bmsDataAvailable, AtmosSpill::bmsStatus, AtmosSpill::bpmint, AtmosSpill::bposx, AtmosSpill::bposy, AtmosSpill::bwidx, AtmosSpill::bwidy, SpillTimeFinder::DataIsAvailable(), 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, BDSpillAccessor::Get(), VldTimeStamp::GetNanoSec(), VldTimeStamp::GetSec(), VldTimeStamp::GetSeconds(), VldContext::GetSimFlag(), BeamMonSpill::GetStatusBits(), BeamMonSpill::GetStatusInt(), VldContext::GetTimeStamp(), SpillTimeFinder::GetTimeToNearestSpill(), AtmosSpill::hadint, BeamMonSpill::StatusBits::horn_on, AtmosSpill::horn_on, AtmosSpill::horncur, SpillTimeFinder::Instance(), BDSpillAccessor::LoadSpill(), 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().

01250 {
01251   MSG("NtpMaker",Msg::kDebug) << " *** NtpMaker::FillSpillInfo(...) *** " << endl;
01252   double dt1(0.0),dt2(0.0),dt(0.0); 
01253 
01254   // only apply to data
01255   if(vldc.GetSimFlag()==SimFlag::kData)
01256     {
01257       // if it's MC, the beam monitoring still thinks it's data!
01258       const BeamMonSpill* spill = BDSpillAccessor::Get().LoadSpill(vldc.GetTimeStamp());
01259 
01260       // fill members with info from the BeamMonSpill
01261       if(spill)
01262         {    
01263           VldTimeStamp snarltime = vldc.GetTimeStamp();
01264           VldTimeStamp spilltime = spill->SpillTime();
01265           dt1 = spilltime.GetSec() - snarltime.GetSec();
01266           dt2 = ( spilltime.GetNanoSec() - snarltime.GetNanoSec() )*1e-9;
01267           dt = dt1 + dt2;
01268 
01269           fEvent->SpillInfo.bmsDataAvailable = false;
01270           fEvent->SpillInfo.TimeToNearestSpill_bms = dt;
01271 
01272           if( abs(dt)<86400.0 )
01273             {
01274               fEvent->SpillInfo.bmsDataAvailable = true;
01275 
01276               // Beam Status Info
01277               fEvent->SpillInfo.bmsStatus = spill->GetStatusInt();
01278 
01279               BeamMonSpill::StatusBits status_bits = spill->GetStatusBits();
01280               fEvent->SpillInfo.horn_on = status_bits.horn_on;
01281               fEvent->SpillInfo.target_in = status_bits.target_in;
01282               fEvent->SpillInfo.beam_type = status_bits.beam_type;
01283               fEvent->SpillInfo.n_batches = status_bits.n_batches;
01284 
01285               //Beam Line Info
01286               fEvent->SpillInfo.tor101 = spill->fTor101;           
01287               fEvent->SpillInfo.tr101d = spill->fTr101d;           
01288               fEvent->SpillInfo.tortgt = spill->fTortgt;           
01289               fEvent->SpillInfo.trtgtd = spill->fTrtgtd;
01290               fEvent->SpillInfo.horncur = spill->fHornCur;     
01291               for (Int_t i=0;i<6;++i)
01292                 {
01293                   fEvent->SpillInfo.bposx[i]=spill->fTargBpmX[i];
01294                   fEvent->SpillInfo.bposy[i]=spill->fTargBpmY[i];
01295                   fEvent->SpillInfo.bpmint[i]=spill->fBpmInt[i];
01296                 }
01297               fEvent->SpillInfo.bwidx = spill->fProfWidX;  
01298               fEvent->SpillInfo.bwidy = spill->fProfWidY;  
01299               fEvent->SpillInfo.hadint = spill->fHadInt; 
01300               fEvent->SpillInfo.muint1 = spill->fMuInt1;  
01301               fEvent->SpillInfo.muint2 = spill->fMuInt2;  
01302               fEvent->SpillInfo.muint3 = spill->fMuInt3; 
01303 
01304               VldTimeStamp BMsubtime = spilltime-vldc.GetTimeStamp();
01305               BMSpillAna BMana;
01306               BMana.UseDatabaseCuts();
01307               BMana.SetSpill(*spill);
01308               BMana.SetTimeDiff(BMsubtime.GetSeconds());
01309               fEvent->SpillInfo.BeamSelectSpill = BMana.SelectSpill(); 
01310             }
01311         }
01312       else
01313         { 
01314           MSG("NtpMaker",Msg::kDebug)<< "No BeamMonSpill found!" <<endl;
01315         }
01316   
01317       SpillTimeFinder &stf = SpillTimeFinder::Instance();
01318       fEvent->SpillInfo.stfDataAvailable = stf.DataIsAvailable(vldc);
01319       fEvent->SpillInfo.TimeToNearestSpill_stf = stf.GetTimeToNearestSpill(vldc);
01320     }
01321 
01322   return;
01323 }

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

Definition at line 1327 of file NtpMaker.cxx.

References AtmosStrip::ClearFibre, fEvent, fStrpList, Calibrator::GetAttenCorrected(), FarDetStripHandle::GetCharge(), FarDetStripHandle::GetClearFibre(), CandHandle::GetDaughterIterator(), FarDetStripHandle::GetGreenFibre(), FarDetStripHandle::GetHalfLength(), Calibrator::GetMIP(), CandHandle::GetNDaughters(), FarDetStripHandle::GetPlane(), CandStripHandle::GetPlaneView(), FarDetStripHandle::GetStrip(), FarDetStripHandle::GetTime(), CandStripHandle::GetTPos(), FarDetStripHandle::GetWlsPigtail(), CandStripHandle::GetZPos(), AtmosStrip::GreenFibre, AtmosStrip::HalfLength, Calibrator::Instance(), FarDetStripHandle::IsXtalk(), AtmosStrip::L, AtmosStrip::MIP, MSG, AtmosStrip::Ndigits, AtmosEvent::NStrips, AtmosStrip::Plane, pow(), 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().

01328 {
01329   FarDetStripListHandle* StrpList = (FarDetStripListHandle*)(tob);
01330   MSG("NtpMaker",Msg::kDebug) << " ... found FarDetStripListHandle " << endl;
01331   TClonesArray& MyStrpList = *(fEvent->StripList);
01332   Calibrator& cal = Calibrator::Instance();
01333   float nstripcalib(0.0);
01334   Int_t pln;
01335   Double_t totq,totqo,opos;
01336 
01337   TIter StrpItr(StrpList->GetDaughterIterator());        
01338   while(FarDetStripHandle* Strp = dynamic_cast<FarDetStripHandle*>(StrpItr()))
01339     {
01340       AtmosStrip* MyStrp = new( MyStrpList[ (fEvent->NStrips)++] ) AtmosStrip();
01341 
01342       MyStrp->Plane = Strp->GetPlane();
01343       MyStrp->Strip = Strp->GetStrip();
01344       if(Strp->GetPlaneView()==PlaneView::kU) MyStrp->View = 0;
01345       if(Strp->GetPlaneView()==PlaneView::kV) MyStrp->View = 1;
01346       MyStrp->L = 0.0;
01347       MyStrp->T = Strp->GetTPos();
01348       MyStrp->Z = Strp->GetZPos();
01349       MyStrp->Ndigits = Strp->GetNDaughters();
01350       MyStrp->Traw[0] = Strp->GetTime(StripEnd::kNegative,CalTimeType::kNone);
01351       MyStrp->Traw[1] = Strp->GetTime(StripEnd::kPositive,CalTimeType::kNone);
01352       MyStrp->Tcal[0] = Strp->GetTime(StripEnd::kNegative,CalTimeType::kT0);
01353       MyStrp->Tcal[1] = Strp->GetTime(StripEnd::kPositive,CalTimeType::kT0);
01354       MyStrp->Qadc[0] = Strp->GetCharge(StripEnd::kNegative,CalDigitType::kNone);
01355       MyStrp->Qadc[1] = Strp->GetCharge(StripEnd::kPositive,CalDigitType::kNone);
01356       MyStrp->QPE[0] = Strp->GetCharge(StripEnd::kNegative,CalDigitType::kPE);
01357       MyStrp->QPE[1] = Strp->GetCharge(StripEnd::kPositive,CalDigitType::kPE);
01358       MyStrp->Sigcorr[0] = Strp->GetCharge(StripEnd::kNegative,CalDigitType::kSigCorr);
01359       MyStrp->Sigcorr[1] = Strp->GetCharge(StripEnd::kPositive,CalDigitType::kSigCorr);
01360       MyStrp->QPEcorr[0] = MyStrp->Sigcorr[0]/65.0; // PEcorr=Sigcorr/<Gain>
01361       MyStrp->QPEcorr[1] = MyStrp->Sigcorr[1]/65.0; // hack the conversion
01362       MyStrp->GreenFibre[0] = Strp->GetGreenFibre(StripEnd::kNegative);
01363       MyStrp->GreenFibre[1] = Strp->GetGreenFibre(StripEnd::kPositive);     
01364       MyStrp->WlsPigtail[0] = Strp->GetWlsPigtail(StripEnd::kNegative);
01365       MyStrp->WlsPigtail[1] = Strp->GetWlsPigtail(StripEnd::kPositive);
01366       MyStrp->ClearFibre[0] = Strp->GetClearFibre(StripEnd::kNegative);
01367       MyStrp->ClearFibre[1] = Strp->GetClearFibre(StripEnd::kPositive);
01368       MyStrp->HalfLength = Strp->GetHalfLength();
01369       MyStrp->Xtalk = Strp->IsXtalk(StripEnd::kWhole);
01370       
01371       if( MyStrp->Plane>0 && MyStrp->Plane<500 && MyStrp->Xtalk==0 && MyStrp->QPE[0]+MyStrp->QPE[1]>2.0 )
01372         {
01373           fStrpList[MyStrp->Plane].push_back(*MyStrp);
01374         }
01375     }
01376   vector<AtmosStrip>::iterator PlaneStrpIter;
01377   vector<AtmosStrip>::iterator PlaneListEnd;
01378   PlexStripEndId* seidP = 0;
01379   PlexStripEndId* seidN = 0;
01380   for(Int_t myint=0;myint<fEvent->NStrips;myint++)
01381     {
01382       AtmosStrip& MyStrp = *((AtmosStrip*)(MyStrpList.At(myint)));
01383       pln = MyStrp.Plane;
01384 
01385       totqo=0.0; totq=0.0; opos=0.0;
01386       if( (pln>1 && pln<249) || (pln>250 && pln<498) )
01387         {
01388           PlaneStrpIter = fStrpList[pln-1].begin();
01389           PlaneListEnd = fStrpList[pln-1].end();
01390           while(PlaneStrpIter!=PlaneListEnd)
01391             {
01392               AtmosStrip& mystrip = *(PlaneStrpIter);  
01393               totqo+=(mystrip.QPE[0]+mystrip.QPE[1])*(mystrip.T);
01394               totq+=(mystrip.QPE[0]+mystrip.QPE[1]);
01395               ++PlaneStrpIter;
01396             } 
01397         }        
01398       if( (pln>0 && pln<248) || (pln>249 && pln<497) )
01399         {
01400           PlaneStrpIter = fStrpList[pln+1].begin();
01401           PlaneListEnd = fStrpList[pln+1].end();
01402           while(PlaneStrpIter!=PlaneListEnd)
01403             {
01404               AtmosStrip& mystrip = *(PlaneStrpIter);  
01405               totqo+=(mystrip.QPE[0]+mystrip.QPE[1])*(mystrip.T);
01406               totq+=(mystrip.QPE[0]+mystrip.QPE[1]);
01407               ++PlaneStrpIter;
01408             }
01409         }
01410       if(totq>0.0){ opos=totqo/totq; } else{ opos=0.0; }
01411 
01412       MyStrp.L = opos;
01413       if( MyStrp.View==0 )
01414         {           
01415           MyStrp.GreenFibre[0] = MyStrp.HalfLength - MyStrp.L;
01416           MyStrp.GreenFibre[1] = MyStrp.HalfLength + MyStrp.L;
01417           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01418           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01419         }
01420       if( MyStrp.View==1 )
01421         {
01422           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01423           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01424           MyStrp.GreenFibre[0] = MyStrp.HalfLength + MyStrp.L;
01425           MyStrp.GreenFibre[1] = MyStrp.HalfLength - MyStrp.L;
01426         }
01427       
01428       double lsign = pow(-1.0, (1.0+double(MyStrp.View)) );
01429       if(seidN && MyStrp.Sigcorr[0]>0.0)
01430         {
01431           MyStrp.Sigmap[0] = cal.GetAttenCorrected(MyStrp.Sigcorr[0], lsign*opos, *(seidN) );
01432           MyStrp.MIP[0] = cal.GetMIP(MyStrp.Sigmap[0], *(seidN) );
01433         }
01434       if(seidP && MyStrp.Sigcorr[1]>0.0)
01435         {
01436           MyStrp.Sigmap[1] = cal.GetAttenCorrected(MyStrp.Sigcorr[1], lsign*opos, *(seidP) );
01437           MyStrp.MIP[1] = cal.GetMIP(MyStrp.Sigmap[1], *(seidP) );
01438         }
01439       if(MyStrp.Sigcorr[0]>0.0 || MyStrp.Sigcorr[1]>0.0) nstripcalib+=1.0;
01440 
01441       if(seidP) delete seidP; seidP = 0;
01442       if(seidN) delete seidN; seidN = 0;
01443     }
01444   MSG("NtpMaker",Msg::kVerbose) <<"   "<<(int)(fEvent->NStrips)<<" strips in the event of which "<<(int)nstripcalib<< " were calibrated."<<endl<<flush;
01445 
01446   for(Int_t myi=0;myi<500;myi++)
01447     {
01448       fStrpList[myi].clear();        
01449     }
01450   return;
01451 }

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

Definition at line 1455 of file NtpMaker.cxx.

References abs(), 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(), CandRecoHandle::GetDirCosU(), CandRecoHandle::GetDirCosV(), CandRecoHandle::GetDirCosZ(), CandTrackHandle::GetdS(), CandRecoHandle::GetEndDirCosU(), CandRecoHandle::GetEndDirCosV(), CandRecoHandle::GetEndDirCosZ(), CandRecoHandle::GetEndPlane(), CandRecoHandle::GetEndT(), CandTrackHandle::GetEndTrace(), CandTrackHandle::GetEndTraceZ(), CandRecoHandle::GetEndU(), CandRecoHandle::GetEndV(), CandRecoHandle::GetEndZ(), Calibrator::GetMIP(), CandTrackHandle::GetMomentum(), CandHandle::GetNDaughters(), CandRecoHandle::GetNStrip(), CandTrackHandle::GetNTimeFitDigit(), CandStripHandle::GetPlane(), CandTrackHandle::GetRange(), CandStripHandle::GetStrip(), CandTrackHandle::GetTimeBackwardFitNDOF(), CandTrackHandle::GetTimeBackwardFitRMS(), CandTrackHandle::GetTimeFitChi2(), CandTrackHandle::GetTimeForwardFitNDOF(), CandTrackHandle::GetTimeForwardFitRMS(), CandRecoHandle::GetTimeOffset(), CandRecoHandle::GetTimeSlope(), CandTrackHandle::GetU(), CandTrackHandle::GetV(), CandRecoHandle::GetVtxPlane(), CandRecoHandle::GetVtxT(), CandTrackHandle::GetVtxTrace(), CandTrackHandle::GetVtxTraceZ(), CandRecoHandle::GetVtxU(), CandRecoHandle::GetVtxV(), CandRecoHandle::GetVtxZ(), AtmosStrip::GreenFibre, AtmosStrip::HalfLength, AtmosTrack::Index, Calibrator::Instance(), CandTrackHandle::IsTPosValid(), AtmosStrip::L, AtmosStrip::MIP, AtmosTrack::Momentum, AtmosTrack::MomentumRange, MSG, AtmosTrack::Nplanes, AtmosEvent::NStrips, AtmosTrack::Nstrips, AtmosEvent::NTracks, AtmosStrip::Plane, pow(), 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().

01456 {
01457   CandTrackListHandle* TrkList = (CandTrackListHandle*)(tob);
01458   MSG("NtpMaker",Msg::kDebug) << " ... found CandTrackListHandle containing "<<TrkList->GetNDaughters()<<" tracks."<< endl;
01459   float nstripcalib(0.0),stripsintrack(0.0);
01460   Calibrator& cal = Calibrator::Instance();
01461   TClonesArray* MyStrpList = (TClonesArray*)(fEvent->StripList);
01462 
01463   // Set information from CandTrackHandle
01464   TClonesArray& MyTrkList = *(fEvent->TrackList);
01465   TIter TrkItr = TrkList->GetDaughterIterator();
01466   while(CandTrackHandle* Trk = dynamic_cast<CandTrackHandle*>(TrkItr()))
01467     {
01468       AtmosTrack* MyTrk = new( MyTrkList[(fEvent->NTracks)++] ) AtmosTrack();
01469       MyTrk->VtxPlane = Trk->GetVtxPlane();
01470       MyTrk->VtxTime = Trk->GetVtxT();
01471       MyTrk->VtxU = Trk->GetVtxU();
01472       MyTrk->VtxV = Trk->GetVtxV();
01473       MyTrk->VtxR = sqrt( (MyTrk->VtxU*MyTrk->VtxU) + (MyTrk->VtxV*MyTrk->VtxV) );
01474       MyTrk->VtxX = 0.7071*(Trk->GetVtxU()-Trk->GetVtxV());
01475       MyTrk->VtxY = 0.7071*(Trk->GetVtxU()+Trk->GetVtxV());
01476       MyTrk->VtxZ = Trk->GetVtxZ();
01477       MyTrk->VtxTrace = Trk->GetVtxTrace();
01478       MyTrk->VtxTraceZ = Trk->GetVtxTraceZ();
01479       MyTrk->VtxDirCosU = Trk->GetDirCosU();
01480       MyTrk->VtxDirCosV = Trk->GetDirCosV();
01481       MyTrk->VtxDirCosX = 0.7071*(Trk->GetDirCosU()-Trk->GetDirCosV());
01482       MyTrk->VtxDirCosY = 0.7071*(Trk->GetDirCosU()+Trk->GetDirCosV());
01483       MyTrk->VtxDirCosZ = Trk->GetDirCosZ();
01484       MyTrk->EndPlane = Trk->GetEndPlane();
01485       MyTrk->EndTime = Trk->GetEndT();
01486       MyTrk->EndU = Trk->GetEndU();
01487       MyTrk->EndV = Trk->GetEndV();
01488       MyTrk->EndR = sqrt((MyTrk->EndU*MyTrk->EndU)+(MyTrk->EndV*MyTrk->EndV));
01489       MyTrk->EndX = 0.7071*(Trk->GetEndU()-Trk->GetEndV());
01490       MyTrk->EndY = 0.7071*(Trk->GetEndU()+Trk->GetEndV());
01491       MyTrk->EndZ = Trk->GetEndZ();
01492       MyTrk->EndTrace = Trk->GetEndTrace();
01493       MyTrk->EndTraceZ = Trk->GetEndTraceZ();
01494       MyTrk->EndDirCosU = Trk->GetEndDirCosU();
01495       MyTrk->EndDirCosV = Trk->GetEndDirCosV();
01496       MyTrk->EndDirCosX = 0.7071*(Trk->GetEndDirCosU()-Trk->GetEndDirCosV());
01497       MyTrk->EndDirCosY = 0.7071*(Trk->GetEndDirCosU()+Trk->GetEndDirCosV());
01498       MyTrk->EndDirCosZ = Trk->GetEndDirCosZ();
01499       MyTrk->RangeGCM2 = Trk->GetRange(Trk->GetEndPlane());
01500        // NB this will lose the extrapolation at vtx and end
01501       MyTrk->RangeMetres = Trk->GetdS(Trk->GetEndPlane());
01502        // NB this will lose the extrapolation at vtx and end
01503       MyTrk->Nstrips = Trk->GetNStrip(); 
01504       MyTrk->Nplanes = abs(MyTrk->EndPlane-MyTrk->VtxPlane)+1;
01505       MyTrk->AtNuNplanes = MyTrk->Nplanes;
01506 
01507       MyTrk->TimingFitChi2 = Trk->GetTimeFitChi2();
01508       MyTrk->TimingFitNdf = Trk->GetNTimeFitDigit()-2;
01509       MyTrk->TimeSlope = Trk->GetTimeSlope();
01510       MyTrk->TimeOffset = Trk->GetTimeOffset(); 
01511 
01512       if(MyTrk->EndPlane-MyTrk->VtxPlane>0)
01513         {//Forward and Backward variables defined relative to increasing Z
01514           MyTrk->VtxDirTimeFitRMS = Trk->GetTimeForwardFitRMS();  
01515           MyTrk->EndDirTimeFitRMS = Trk->GetTimeBackwardFitRMS(); 
01516           MyTrk->VtxDirTimeFitNdf = Trk->GetTimeForwardFitNDOF(); 
01517           MyTrk->EndDirTimeFitNdf = Trk->GetTimeBackwardFitNDOF();
01518         }
01519       else
01520         {
01521           MyTrk->VtxDirTimeFitRMS = Trk->GetTimeBackwardFitRMS(); 
01522           MyTrk->EndDirTimeFitRMS = Trk->GetTimeForwardFitRMS();  
01523           MyTrk->VtxDirTimeFitNdf = Trk->GetTimeBackwardFitNDOF();
01524           MyTrk->EndDirTimeFitNdf = Trk->GetTimeForwardFitNDOF(); 
01525         }
01526 
01527       MyTrk->Momentum = Trk->GetMomentum();
01528       MyTrk->MomentumRange = Trk->GetMomentum();
01529 
01530       MyTrk->Index = (int)pow(2.,fEvent->NTracks-1);
01531 
01532       //set information for strips that are part of this track
01533       TIter StrpItr(Trk->GetDaughterIterator());
01534       nstripcalib=(0.0); stripsintrack = Trk->GetNDaughters();
01535       PlexStripEndId* seidP = 0;
01536       PlexStripEndId* seidN = 0;
01537       while(CandStripHandle* TrkStrp = (CandStripHandle*)(StrpItr()))
01538         {
01539           for(Int_t myint=0;myint<fEvent->NStrips;myint++)
01540             {
01541               AtmosStrip& MyStrp = *((AtmosStrip*)(MyStrpList->At(myint)));
01542               
01543               if( TrkStrp->GetPlane()==MyStrp.Plane && TrkStrp->GetStrip()==MyStrp.Strip )
01544                 {
01545                   if( MyStrp.Trk==0 && Trk->IsTPosValid(MyStrp.Plane) )
01546                     {
01547                       if( MyStrp.View==0 )
01548                         {
01549                           MyStrp.L = Trk->GetV(MyStrp.Plane);
01550                           MyStrp.dS = Trk->GetdS(MyStrp.Plane);
01551                           MyStrp.GreenFibre[0] = MyStrp.HalfLength - MyStrp.L;
01552                           MyStrp.GreenFibre[1] = MyStrp.HalfLength + MyStrp.L;
01553                           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01554                           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kU, PlaneCoverage::kTotal);
01555                         }
01556                       if( MyStrp.View==1 )
01557                         {
01558                           MyStrp.L = Trk->GetU(MyStrp.Plane);
01559                           MyStrp.dS = Trk->GetdS(MyStrp.Plane);
01560                           MyStrp.GreenFibre[0] = MyStrp.HalfLength + MyStrp.L;
01561                           MyStrp.GreenFibre[1] = MyStrp.HalfLength - MyStrp.L;
01562                           seidN = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kNegative, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01563                           seidP = new PlexStripEndId(Detector::kFar, MyStrp.Plane, MyStrp.Strip, StripEnd::kPositive, StripEnd::kWhole, PlaneView::kV, PlaneCoverage::kTotal);
01564                         }
01565                       double lsign = pow(-1.0, (1.0+double(MyStrp.View)) );
01566                       if(seidN && MyStrp.Sigcorr[0]>0.0)
01567                         {
01568                           MyStrp.Sigmap[0] = cal.GetAttenCorrected(MyStrp.Sigcorr[0], lsign*MyStrp.L, *(seidN) );
01569                           MyStrp.MIP[0] = cal.GetMIP(MyStrp.Sigmap[0], *(seidN) );
01570                         }
01571                       if(seidP && MyStrp.Sigcorr[1]>0.0)
01572                         {
01573                           MyStrp.Sigmap[1] = cal.GetAttenCorrected(MyStrp.Sigcorr[1], lsign*MyStrp.L, *(seidP) );
01574                           MyStrp.MIP[1] = cal.GetMIP(MyStrp.Sigmap[1], *(seidP) );
01575                         }
01576                       if(MyStrp.Sigcorr[0]>0.0 || MyStrp.Sigcorr[1]>0.0) nstripcalib+=1.0;
01577                     }
01578                   MyStrp.Trk += MyTrk->Index;
01579                   
01580                   if(seidP) delete seidP; seidP = 0;
01581                   if(seidN) delete seidN; seidN = 0;
01582 
01583                   break; // break out of loop
01584                          // faster - this should be ok as long as the
01585                          // same strip doesn't exist twice in a snarl
01586                 }
01587             }
01588         }
01589       MSG("NtpMaker",Msg::kVerbose) <<"   "<<(int)stripsintrack<<" strips in the track of which "<<(int)nstripcalib<< " were calibrated."<<endl<<flush;
01590     }
01591   return;
01592 }


Member Data Documentation

AtmosEvent* NtpMaker::fEvent [private]
 

Definition at line 57 of file NtpMaker.h.

Referenced by Ana(), EndJob(), FillCandInfo(), FillDataQualityInfo(), FillDeMuxInfo(), FillEventInfo(), FillFitTrackInfo(), FillMCInfo(), FillShieldInfo(), FillShowerInfo(), FillSliceInfo(), FillSpillInfo(), FillStripInfo(), FillTrackInfo(), and NtpMaker().

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 58 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 Config(), and NtpMaker().

Bool_t NtpMaker::fWriteStrips [private]
 

Definition at line 54 of file NtpMaker.h.

Referenced by Config(), and NtpMaker().


The documentation for this class was generated from the following files:
Generated on Fri Mar 28 16:06:44 2008 for loon by  doxygen 1.3.9.1