/[PAMELA software]/DarthVader/CalorimeterLevel2/src/CaloLevel2.cpp
ViewVC logotype

Diff of /DarthVader/CalorimeterLevel2/src/CaloLevel2.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by mocchiut, Thu Nov 29 14:20:30 2007 UTC revision 1.20 by pam-fi, Wed Oct 15 12:06:21 2014 UTC
# Line 99  CaloLevel2::CaloLevel2() {     Line 99  CaloLevel2::CaloLevel2() {    
99  void CaloLevel2::Set(){//ELENA  void CaloLevel2::Set(){//ELENA
100      if(!CaloTrk)CaloTrk = new TClonesArray("CaloTrkVar",1); //ELENA      if(!CaloTrk)CaloTrk = new TClonesArray("CaloTrkVar",1); //ELENA
101  }//ELENA  }//ELENA
102    //--------------------------------------
103    //
104    //
105    //--------------------------------------
106    void CaloLevel2::SetTrackArray(TClonesArray *track){//ELENA
107    //    if(track && strcmp(track->GetClass()->GetName(),"CaloTrkVar")==0){
108        if(track ){
109            if(CaloTrk)CaloTrk->Clear("C");
110            CaloTrk = track;
111        }
112    }
113    
114  /**  /**
115   * Clear the CaloLevel2 object   * Clear the CaloLevel2 object
# Line 147  void CaloLevel2::Delete(Option_t *t) {   Line 158  void CaloLevel2::Delete(Option_t *t) {  
158  } //ELENA  } //ELENA
159    
160  /**  /**
161     * CaloLevel2
162    **/
163    Bool_t CaloLevel2::IsGood(Bool_t strict) {  
164      //
165      if ( strict ){
166        if ( !good ) return(false);
167        if ( perr[0] ) return(false);
168        if ( perr[1] ) return(false);
169        if ( perr[2] ) return(false);
170        if ( perr[3] ) return(false);
171        if ( swerr[0] ) return(false);
172        if ( swerr[1] ) return(false);
173        if ( swerr[2] ) return(false);
174        if ( swerr[3] ) return(false);
175        if ( crc[0] ) return(false);
176        if ( crc[1] ) return(false);
177        if ( crc[2] ) return(false);
178        if ( crc[3] ) return(false);
179      } else {
180        if ( perr[0] == 129 ||  perr[0] == 136 || perr[0] == 142 || perr[0] == 143 ) return(false);
181        if ( perr[1] == 129 ||  perr[1] == 136 || perr[1] == 142 || perr[1] == 143 ) return(false);
182        if ( perr[2] == 129 ||  perr[2] == 136 || perr[2] == 142 || perr[2] == 143 ) return(false);
183        if ( perr[3] == 129 ||  perr[3] == 136 || perr[3] == 142 || perr[3] == 143 ) return(false);
184      };
185      //
186      return(true);
187    }
188    
189    /**
190   * Fills a struct cCaloLevel2 with values from a CaloLevel2 object (to put data into a F77 common).   * Fills a struct cCaloLevel2 with values from a CaloLevel2 object (to put data into a F77 common).
191   */   */
192  void CaloLevel2::GetLevel2Struct(cCaloLevel2 *l2) const {  void CaloLevel2::GetLevel2Struct(cCaloLevel2 *l2) const {
# Line 262  Float_t CaloLevel2::impy(Int_t tr){ Line 302  Float_t CaloLevel2::impy(Int_t tr){
302  **/  **/
303  void CaloLevel2::GetElectronEnergy(Float_t &energy, Float_t &sigma){  void CaloLevel2::GetElectronEnergy(Float_t &energy, Float_t &sigma){
304    if ( nstrip == 0 ) return;    if ( nstrip == 0 ) return;
305    energy = qtot * 260.;    energy = qtot / 260.;
306    //  energy = qtot * 40.82 * 0.000106;    //  energy = qtot * 40.82 * 0.000106;
307    sigma = 0.;    sigma = 0.;
308    if ( energy > 0. ) sigma = energy * (0.01183 + 0.121/sqrt(energy));    if ( energy > 0. ) sigma = energy * (0.01183 + 0.121/sqrt(energy));

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.23