////////////////////////////////////////////////////////// // This class has been automatically generated on // Thu Dec 16 00:52:22 2021 by ROOT version 6.24/04 // from TTree T/Simulazione // found on file: EsempioSimulazione.root ////////////////////////////////////////////////////////// #ifndef ProcessaSimulazione_h #define ProcessaSimulazione_h #include #include #include #include #include #include // Header file for the classes stored in the TTree if any. class ProcessaSimulazione { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Fixed size dimensions of array or collections stored in the TTree if any. // Declaration of leaf types Int_t Id; double EVera; double EMisurata; double ThVero; double ThMisurato; // List of branches TBranch *b_Id; //! TBranch *b_EVera; //! TBranch *b_EMisurata; //! TBranch *b_ThVero; //! TBranch *b_ThMisurato; //! ProcessaSimulazione(TTree *tree=0); virtual ~ProcessaSimulazione(); virtual Int_t Cut(long entry); virtual Int_t GetEntry(long entry); virtual long LoadTree(long entry); virtual void Init(TTree *tree); virtual void Loop(); virtual Bool_t Notify(); virtual void Show(long entry = -1); // miei metodi void atTheStart(); void atTheEnd(); // miei dati membro della classe ProcessaSimulazione int nEventi; // numero totale di eventi int nEventiPostTagli; // numero di eventi che passano i tagli di qualita' TFile* fout; // variabili per l'intervallo di energia double Emin; double Emax; // elenco istogrammi TH1F* fh_hprova; TH1F* fh_EVera; TH1F* fh_EMisurata; TH1F* fh_EffInRange; TH1F* fh_EVeraStimata; TH1F* fh_EVeraStimataN; TH1F* fh_P0EVera; TH1F* fh_P0EVeraN; TH2F* fh_PEC; TH2F* fh_PECNorm; }; #endif #ifdef ProcessaSimulazione_cxx ProcessaSimulazione::ProcessaSimulazione(TTree *tree) : fChain(0) { // if parameter tree is not specified (or zero), connect the file // used to generate this class and read the Tree. if (tree == 0) { TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("EsempioSimulazione.root"); if (!f || !f->IsOpen()) { f = new TFile("EsempioSimulazione.root"); } f->GetObject("T",tree); } Init(tree); } ProcessaSimulazione::~ProcessaSimulazione() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t ProcessaSimulazione::GetEntry(long entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } long ProcessaSimulazione::LoadTree(long entry) { // Set the environment to read one entry if (!fChain) return -5; long centry = fChain->LoadTree(entry); if (centry < 0) return centry; if (fChain->GetTreeNumber() != fCurrent) { fCurrent = fChain->GetTreeNumber(); Notify(); } return centry; } void ProcessaSimulazione::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses and branch // pointers of the tree will be set. // It is normally not necessary to make changes to the generated // code, but the routine can be extended by the user if needed. // Init() will be called many times when running on PROOF // (once per file to be processed). // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("Id", &Id, &b_Id); fChain->SetBranchAddress("EVera", &EVera, &b_EVera); fChain->SetBranchAddress("EMisurata", &EMisurata, &b_EMisurata); fChain->SetBranchAddress("ThVero", &ThVero, &b_ThVero); fChain->SetBranchAddress("ThMisurato", &ThMisurato, &b_ThMisurato); Notify(); } Bool_t ProcessaSimulazione::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. It is normally not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. The return value is currently not used. return kTRUE; } void ProcessaSimulazione::Show(long entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t ProcessaSimulazione::Cut(long entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef ProcessaSimulazione_cxx