30   TFile *f2 = 
new TFile(infile);  
    31   TTree *oldtree = (TTree*)f2->Get(
"wcsimGeoT");
    33   TBranch *gb = oldtree->GetBranch(
"wcsimrootgeom");
    34   gb->SetAddress(&oldgeom);
    37   Printf(
"Initial Number of PMTs: %d", oldpmtnum);
    40   TFile *f3 = 
new TFile(
outfile,
"RECREATE");
    41   TTree *newtree = oldtree->CloneTree(0);
    43   newtree->SetBranchAddress(
"wcsimrootgeom",&newgeom);
    47   newgeom->SetMailBox_x(oldgeom->GetMailBox_x());
    48   newgeom->SetMailBox_y(oldgeom->GetMailBox_y());
    49   newgeom->SetMailBox_z(oldgeom->GetMailBox_z());
    60   const int asize = oldpmtnum + 1;
    65   for (
int i=0;
i<oldpmtnum;
i++)
    69       double ft = removefrac*( (double) 
i);
    70       int icc = (
int) floor(ft);  
    75           pmtassoc[oldtubeno] = -1;  
    79           pmtassoc[oldtubeno] = newpmtnum+1;
    94   std::cout << 
"New PMT count: " << newpmtnum << std::endl;
   102   TTree *oldevtree = (TTree*) f2->Get(
"wcsimT");
   103   int nevent = oldevtree->GetEntries();
   104   std::cout << 
"Number of events: " << nevent << std::endl;
   108   TBranch *branch = oldevtree->GetBranch(
"wcsimrootevent");
   109   branch->SetAddress(&oldsuperevent);
   111   oldevtree->GetBranch(
"wcsimrootevent")->SetAutoDelete(kTRUE);
   115   TTree *newevtree = oldevtree->CloneTree(0);
   118   newevtree->SetBranchAddress(
"wcsimrootevent",&newsuperevent);
   121   for (
int ev=0; ev<nevent; ev++)
   124       oldevtree->GetEntry(ev);      
   129       for (
int itrigger = 0; itrigger < oldsuperevent->
GetNumberOfEvents(); itrigger++)
   133           oldtrigger = oldsuperevent->
GetTrigger(itrigger);
   147           float pi0vtx[3],gammae[2],gammavtx[2][3];
   149           for (
int i=0;
i<3;
i++)
   155           for (
int i=0;
i<2;
i++)
   160           newtrigger->
SetPi0Info(pi0vtx,gammaid,gammae,gammavtx);
   168           for (
int i=0; 
i<ntrack; 
i++)
   174               float dir[3],pdir[3],stop[3],start[3];
   175               for (
int j=0;
j<3;
j++)
   224           for (
int i=0; 
i< ncherenkovhits; 
i++)
   229               int tubeNumber     = wcsimrootcherenkovhit->
GetTubeID();
   230               int timeArrayIndex = wcsimrootcherenkovhit->
GetTotalPe(0);
   231               int peForTube      = wcsimrootcherenkovhit->
GetTotalPe(1);
   233               if (tubeNumber < 1 || tubeNumber > oldpmtnum)
   235                   std::cout << 
"Error in pmtremove: tube number out of range: " << tubeNumber << 
" max: " << oldpmtnum << std::endl;
   238               int newtubenumber = pmtassoc[tubeNumber];
   239               if (newtubenumber > 0)   
   241                   vector<float> truetime;
   243                   for (
int j=0; 
j<peForTube; 
j++)
   257           for (
int i=0;
i<ncherenkovdigihits_slots;
i++)
   265               int tubeNumber = wcsimrootcherenkovdigihit->
GetTubeId();
   266               if (tubeNumber < 1 || tubeNumber > oldpmtnum)
   268                   std::cout << 
"Error in pmtremove: tube number out of range: " << tubeNumber << 
" max: " << oldpmtnum << std::endl;
   271               int newtubenumber = pmtassoc[tubeNumber];
   272               if (newtubenumber > 0)   
   275                                                   wcsimrootcherenkovdigihit->
GetT(),
   277                   sumq += wcsimrootcherenkovdigihit->
GetQ();
 
void SetPMT(Int_t i, Int_t tubeno, Int_t mPMTNo, Int_t mPMT_PMTno, Int_t cyl_loc, Double_t rot[3], Double_t pos[3], bool expand=true, bool hybridsecondtype=false)
Detector geometry information (also containing PMT information arrays) 
Float_t GetWCPMTRadius(bool hybridsecondtype=false) const
Float_t GetWCCylLength() const
Float_t GetStop(Int_t i=0) const
WCSimRootPMT GetPMT(Int_t i, bool hybridsecondtype=false)
Class holding digitised hit (aka digit or digi) information (after PMT & electronics simulation + tri...
void SetWCNumPMT(Int_t i, bool hybridsecondtype=false)
Float_t GetWCCylRadius() const
Float_t GetGammaVtx(int i, int j) const
Int_t GetGeo_Type() const
void SetWCCylRadius(Double_t f)
Double_t GetTruetime() const
void SetWCCylLength(Double_t f)
WCSimRootEventHeader * GetHeader()
void pmtremove(TString infile, TString outfile, double removefrac)
WCSimRootTrack * AddTrack(Int_t ipnu, Int_t flag, Double_t m, Double_t p, Double_t E, Int_t startvol, Int_t stopvol, Double_t dir[3], Double_t pdir[3], Double_t stop[3], Double_t start[3], Int_t parenttype, ProcessType_t creatorProcess, Double_t time, Int_t id, Int_t idParent, std::vector< std::vector< float >> bPs, std::vector< float > bKEs, std::vector< double > bTimes, std::vector< int > bTypes)
Class storing information about pi0 decays. 
TClonesArray * GetTracks() const
Int_t GetNcherenkovhits() const
Float_t GetDir(Int_t i=0) const
Float_t GetVtx(Int_t i=0)
Int_t GetOrientation() const
Int_t GetParenttype() const
void SetOrientation(Int_t o)
WCSimRootPi0 * GetPi0Info()
PMT geometry information. 
Float_t GetStart(Int_t i=0) const
Int_t GetWCNumPMT(bool hybridsecondtype=false) const
Float_t GetGammaE(int i) const
Int_t GetNtrack_slots() const
TClonesArray * GetCherenkovHits() const
Class holding true (Cherenkov photon + dark noise) hit information. 
void SetGeo_Type(Int_t f)
Int_t GetNcherenkovdigihits() const
Class storing trigger information. 
void SetWCOffset(Double_t x, Double_t y, Double_t z)
void SetPi0Info(Double_t pi0Vtx[3], Int_t gammaID[2], Double_t gammaE[2], Double_t gammaVtx[2][3])
Int_t GetTotalPe(int i) const
WCSimRootTrigger * GetTrigger(int number)
TClonesArray * GetCherenkovHitTimes() const
Int_t GetStartvol() const
Int_t GetGammaID(int i) const
Int_t GetNumberOfEvents() const
Class containing event information. 
WCSimRootCherenkovDigiHit * AddCherenkovDigiHit(Double_t q, Double_t t, Int_t tubeid, Int_t mpmtid, Int_t mpmt_pmtid, std::vector< int > photon_ids)
Float_t GetWCOffset(Int_t i) const
Int_t GetParentID() const
Float_t GetPi0Vtx(int i) const
Int_t GetNcherenkovdigihits_slots() const
Float_t GetPdir(Int_t i=0) const
void SetHeader(Int_t i, Int_t run, int64_t date, Int_t subevtn=1)
Class holding true (Cherenkov photon + dark noise) hit information. 
Float_t GetOrientation(Int_t i=0) const
TClonesArray * GetCherenkovDigiHits() const
Class holding true track information. 
WCSimRootCherenkovHit * AddCherenkovHit(Int_t tubeID, Int_t mPMTID, Int_t mPMT_PMTID, std::vector< Double_t > truetime, std::vector< Int_t > primParID, std::vector< Float_t > photonStartTime, std::vector< TVector3 > photonStartPos, std::vector< TVector3 > photonEndPos, std::vector< TVector3 > photonStartDir, std::vector< TVector3 > photonEndDir, std::vector< ProcessType_t > photonCreatorProcess)
void SetWCPMTRadius(Double_t f, int hybridsecondtype=false)
void SetVtx(Int_t i, Double_t f)
Float_t GetPosition(Int_t i=0) const