Changeset 18235 for branches


Ignore:
Timestamp:
06/18/15 15:22:04 (9 years ago)
Author:
dbaack
Message:
Fixed bug that creates empty or duplicated events for CSCAT=1 in Corsika
Location:
branches/Corsika7405Compatibility
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/Corsika7405Compatibility/mcorsika/MCorsikaEvtHeader.cc

    r15365 r18235  
    153153    // f[96] // Number of reuse of event [max=20]
    154154    fTotReuse = TMath::Nint(f[96]);
     155
     156    std::cout << "            Total Reuse:" << fTotReuse << std::endl;
     157
    155158    if (fTotReuse > 20)
    156159      {
  • branches/Corsika7405Compatibility/mcorsika/MCorsikaRead.cc

    r18180 r18235  
    406406      return kTRUE;
    407407
    408    if (fBlockType == 1204 && fReadState != 2)
     408   if (fBlockType == 1204 && (fReadState != 2 && fReadState != 15) )
    409409      // next is a new set of telescope arrays, we store the previous ones
    410410      // but not if this is the first one (fReadState != 2)
     
    478478Int_t MCorsikaRead::Process()
    479479{
    480         fEvent->Clear();
    481         fEvent->Reset();
     480        //fEvent->Clear();
     481
     482        //fEvent->Resize(0);
     483
     484
     485        std::cout << "\n\n MCorsikaRead Process " << std::endl;
    482486        fEvent->Resize(0);
    483 
    484 
    485         std::cout << "\n\n MCorsikaRead Process " << std::endl;
    486487   while (1)  // loop for multiple input files
    487488   {
     
    530531               status = fEvtHeader->ReadEvt(buffer);
    531532
     533               std::cout << "----------ArrayIndex:: " << fArrayIdx << std::endl;
    532534
    533535               if (fArrayIdx >= (Int_t)fEvtHeader->GetTotReuse())
     
    550552               else
    551553                  // skip this array of telescopes
     554                   {
    552555                  fInFormat->Seek(fBlockLength);
    553556                   std::cout << "Skip Array!" << std::endl;
     557                   }
    554558               break;
    555559
     
    558562               {
    559563               Int_t telIdx   = fBlockIdentifier % 1000;
     564
     565               std::cout << "----------TelescopeIndex:: " << fTelescopeIdx << std::endl;
    560566
    561567               if (fBlockVersion == 0  && (fTelescopeIdx < 0 || fTelescopeIdx ==  telIdx) )
     
    575581
    576582
    577                   bool tmpWeight = false;
     583                  /*bool tmpWeight = false;
    578584                  std::cout << "ReadEventIO Telescope data with " << fEvent->GetNumPhotons() << std::endl;
    579585                  for(int i=0; i<fEvent->GetNumPhotons(); i++)
     
    585591                  }
    586592                  if(tmpWeight)
    587                           std::cout << "CorsikaRead Photon weight != 1" << std::endl;
     593                          std::cout << "CorsikaRead Photon weight != 1" << std::endl;*/
    588594
    589595                  }
     
    629635            case 1105:  // event block of raw format
    630636                static int NmrEventBlock = 0;
    631                 //std::cout << "EventBlock ||||||" << ++NmrEventBlock << std::endl;
     637                std::cout << "EventBlock ||||||" << ++NmrEventBlock << std::endl;
    632638               if (fReadState == 2 || fReadState == 10)
    633639                  {
     
    677683            return status;
    678684
     685
    679686         Int_t headerStatus =  ReadNextBlockHeader();
     687
     688         std::cout << "fBlockType: " << fBlockType << "  fReadState: " << fReadState
     689                         << " HeaderStatus: " << headerStatus << std::endl;
     690
    680691
    681692         if (headerStatus == kFALSE)
  • branches/Corsika7405Compatibility/msim/MPhotonEvent.cc

    r18179 r18235  
    513513
    514514
    515    //std::cout << "BunchHeader: " << bunchHeader[0] << " "
    516         //         << bunchHeader[1] << " "
    517         //         << bunchHeader[2] << std::endl;
     515   /*std::cout << "BunchHeader: " << bunchHeader[0] << " "
     516                   << bunchHeader[1] << " "
     517                   << bunchHeader[2] << std::endl;*/
     518
     519   this->Resize(bunchHeader[2]);
    518520
    519521   Int_t n = 0;
     
    541543{
    542544   Int_t n = 0;
     545
     546   this->Resize(numEvents);
    543547
    544548   for (Int_t event = 0; event < numEvents; event++)
     
    602606    }
    603607}
     608
     609
     610void MPhotonEvent::Reset()
     611{
     612        std::cout << "Reset!!"; this->Clear(); this->Resize(0);
     613}
  • branches/Corsika7405Compatibility/msim/MPhotonEvent.h

    r10060 r18235  
    1111
    1212#include <iosfwd>
     13#include <iostream>
    1314
    1415using namespace std;
     
    6869    //void Clear(Option_t * = NULL);
    6970
     71    void Reset();
     72    //void Reset(){std::cout << "Reset!!"; this->Clear(); this->Resize(0); }
     73
    7074    ClassDef(MPhotonEvent, 1) //Container to store the raw Event Data
    7175};
  • branches/Corsika7405Compatibility/msimcamera/MSimAPD.cc

    r18179 r18235  
    307307            *fLog << err << "ERROR - MSimAPD: Weight of " << i << "-th photon not 1, but " << ph.GetWeight() << endl;
    308308            ph.Print();
    309             //return kERROR;
     309            return kERROR;
    310310        }
    311311
Note: See TracChangeset for help on using the changeset viewer.