void THisHandler::FillHists() { fTree->SetBranchStatus("*", 0); TVector3 position; fTree->SetBranchStatus("x", 1); fTree->SetBranchStatus("y", 1); fTree->SetBranchStatus("z", 1); fTree->SetBranchAddress("x", &position[0]); fTree->SetBranchAddress("y", &position[1]); fTree->SetBranchAddress("z", &position[2]); Char_t volumeName[256]; // Array size is enough? fTree->SetBranchStatus("VolumeName", 1); fTree->SetBranchAddress("VolumeName", volumeName); Double_t ene; fTree->SetBranchStatus("DepositEnergy", 1); fTree->SetBranchAddress("DepositEnergy", &ene); const Int_t kEntries = fTree->GetEntries(); for(Int_t iEntry = 0; iEntry < kEntries; iEntry++){ //if(iEntry%100000 == 0) cout << iEntry <<" / "<< kEntries << endl; fTree->GetEntry(iEntry); if(!(ene > 0.)) continue; fHisAll->Fill(position.X(), position.Y(), position.Z(), ene); if(TString(volumeName) == "Sealing") fHisSealing->Fill(position.X(), position.Y(), position.Z(), ene); else if(TString(volumeName) == "Window") fHisWindow->Fill(position.X(), position.Y(), position.Z(), ene); else if(TString(volumeName) == "Foil") fHisFoil->Fill(position.X(), position.Y(), position.Z(), ene); else if(TString(volumeName) == "Holder") fHisHolder->Fill(position.X(), position.Y(), position.Z(), ene); else if(TString(volumeName) == "Cassette") fHisCassette->Fill(position.X(), position.Y(), position.Z(), ene); else if(TString(volumeName) == "Air") fHisAir->Fill(position.X(), position.Y(), position.Z(), ene); else if(TString(volumeName) == "Plate" || TString(volumeName) == "Well" || TString(volumeName) == "Outer") fHisPlate->Fill(position.X(), position.Y(), position.Z(), ene); else if(TString(volumeName) == "Film") fHisFilm->Fill(position.X(), position.Y(), position.Z(), ene); else if(TString(volumeName) == "Stuff") fHisWell->Fill(position.X(), position.Y(), position.Z(), ene); else if(TString(volumeName) == "Cell"){ Int_t wellID = XYtoIndex(position.X(), position.Y()); fHisEachCell20[wellID]->Fill(position.X(), position.Y(), ene); fHisEachCell50[wellID]->Fill(position.X(), position.Y(), ene); } } }
Game::Outcome Game::Move(const Point& a, const Point& b, int& pointDelta) { return Move(XYtoIndex(a), XYtoIndex(b), pointDelta); }
Card Game::GetAt(const Point& p) const { return GetAt(XYtoIndex(p)); }